import{$e as Pn,Bc as yl,Be as wl,Cc as vl,Ce as di,Da as ml,Dc as ci,De as ns,Ec as es,Ee as Dl,Fc as ts,Fe as Ol,Gb as xe,Ge as rs,He as ss,Ie as El,J as cl,Je as Pl,Ke as Tl,Le as Ml,Me as kl,Ne as Nl,Oe as On,Pe as Bl,Q as Wr,Qd as xl,Qe as En,Re as os,S as bn,Se as Ll,T as ul,Td as bl,Te as Rl,Ud as Pt,Ue as Fl,Vd as de,Ve as Vl,We as zl,Xe as Ul,Y as $r,Ya as fl,Ye as as,Z as dl,Ze as ls,_e as cs,a as tl,aa as Xr,b as il,ba as Zr,be as Sl,de as M,ee as De,f as Ze,fa as hl,fb as gl,fe as Oe,g as z,ga as Sn,ge as ke,ha as In,i as nl,ia as jr,ie as O,j as rl,ke as se,le as et,m as sl,mb as be,me as P,ne as Il,ob as Et,p as ol,pe as is,q as al,qc as _l,qe as ui,rc as Cl,re as An,sa as pl,se as wn,t as ll,te as Tt,ue as Dn,ve as Ne,w as je,we as j,xe as _t,ye as Ct,z as Ee,ze as Al}from"./chunk-7QNGSTYJ.js";import{a as L,b as V,d as Me,f as li,h as ve}from"./chunk-JTGFI4FN.js";var jd=Me(ka=>{"use strict";ka.supported=Ma;ka.notSupportedReason=Zd;function Ma(i){return!Zd(i)}function Zd(i){if(!q_())return"not a browser";if(!K_())return"insufficient worker support";if(!Q_())return"insufficient Canvas/getImageData support";if(!J_(i&&i.failIfMajorPerformanceCaveat))return"insufficient WebGL2 support";if(!X_())return"insufficient ECMAScript 6 support"}function q_(){return typeof window<"u"&&typeof document<"u"}function K_(){if(!("Worker"in window&&"Blob"in window&&"URL"in window))return!1;var i=new Blob([""],{type:"text/javascript"}),t=URL.createObjectURL(i),e,n;try{n=new Worker(t),e=!0}catch{e=!1}return n&&n.terminate(),URL.revokeObjectURL(t),e}function Q_(){var i=document.createElement("canvas");i.width=i.height=1;var t=i.getContext("2d");if(!t)return!1;var e=t.getImageData(0,0,1,1);return e&&e.width===i.width}var Ta={};function J_(i){return Ta[i]===void 0&&(Ta[i]=$_(i)),Ta[i]}Ma.webGLContextAttributes={antialias:!1,alpha:!0,stencil:!0,depth:!0};function W_(i){var t=document.createElement("canvas"),e=Object.create(Ma.webGLContextAttributes);return e.failIfMajorPerformanceCaveat=i,t.getContext("webgl2",e)}function $_(i){var t=W_(i);if(!t)return!1;var e;try{e=t.createShader(t.VERTEX_SHADER)}catch{return!1}return!e||t.isContextLost()?!1:(t.shaderSource(e,"void main() {}"),t.compileShader(e),t.getShaderParameter(e,t.COMPILE_STATUS)===!0)}function X_(){return!document.documentMode}});var oh=Me((l3,sh)=>{"use strict";sh.exports=function(t,e,n,r){var s=t[0],o=t[1],a=!1;n===void 0&&(n=0),r===void 0&&(r=e.length);for(var l=(r-n)/2,c=0,u=l-1;co!=g>o&&s<(m-d)*(o-h)/(g-h)+d;_&&(a=!a)}return a}});var lh=Me((c3,ah)=>{"use strict";ah.exports=function(t,e,n,r){var s=t[0],o=t[1],a=!1;n===void 0&&(n=0),r===void 0&&(r=e.length);for(var l=r-n,c=0,u=l-1;co!=g>o&&s<(m-d)*(o-h)/(g-h)+d;_&&(a=!a)}return a}});var dh=Me((u3,zr)=>{"use strict";var ch=oh(),uh=lh();zr.exports=function(t,e,n,r){return e.length>0&&Array.isArray(e[0])?uh(t,e,n,r):ch(t,e,n,r)};zr.exports.nested=uh;zr.exports.flat=ch});var fh=Me((Fa,Va)=>{"use strict";(function(i,t){typeof Fa=="object"&&typeof Va<"u"?Va.exports=t():typeof define=="function"&&define.amd?define(t):(i=i||self).RBush=t()})(Fa,function(){"use strict";function i(p,f,C,v,x){(function y(b,A,S,D,T){for(;D>S;){if(D-S>600){var E=D-S+1,k=A-S+1,X=Math.log(E),re=.5*Math.exp(2*X/3),U=.5*Math.sqrt(X*re*(E-re)/E)*(k-E/2<0?-1:1),q=Math.max(S,Math.floor(A-k*re/E+U)),Z=Math.min(D,Math.floor(A+(E-k)*re/E+U));y(b,A,q,Z,T)}var ge=b[A],te=S,ue=D;for(t(b,S,A),T(b[D],ge)>0&&t(b,S,D);te0;)ue--}T(b[S],ge)===0?t(b,S,ue):t(b,++ue,D),ue<=A&&(S=ue+1),A<=ue&&(D=ue-1)}})(p,f,C||0,v||p.length-1,x||e)}function t(p,f,C){var v=p[f];p[f]=p[C],p[C]=v}function e(p,f){return pf?1:0}var n=function(p){p===void 0&&(p=9),this._maxEntries=Math.max(4,p),this._minEntries=Math.max(2,Math.ceil(.4*this._maxEntries)),this.clear()};function r(p,f,C){if(!C)return f.indexOf(p);for(var v=0;v=p.minX&&f.maxY>=p.minY}function g(p){return{children:p,height:1,leaf:!0,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0}}function _(p,f,C,v,x){for(var y=[f,C];y.length;)if(!((C=y.pop())-(f=y.pop())<=v)){var b=f+Math.ceil((C-f)/v/2)*v;i(p,b,f,C,x),y.push(f,b,b,C)}}return n.prototype.all=function(){return this._all(this.data,[])},n.prototype.search=function(p){var f=this.data,C=[];if(!m(p,f))return C;for(var v=this.toBBox,x=[];f;){for(var y=0;y=0&&x[f].children.length>this._maxEntries;)this._split(x,f),f--;this._adjustParentBBoxes(v,x,f)},n.prototype._split=function(p,f){var C=p[f],v=C.children.length,x=this._minEntries;this._chooseSplitAxis(C,x,v);var y=this._chooseSplitIndex(C,x,v),b=g(C.children.splice(y,C.children.length-y));b.height=C.height,b.leaf=C.leaf,s(C,this.toBBox),s(b,this.toBBox),f?p[f-1].children.push(b):this._splitRoot(C,b)},n.prototype._splitRoot=function(p,f){this.data=g([p,f]),this.data.height=p.height+1,this.data.leaf=!1,s(this.data,this.toBBox)},n.prototype._chooseSplitIndex=function(p,f,C){for(var v,x,y,b,A,S,D,T=1/0,E=1/0,k=f;k<=C-f;k++){var X=o(p,0,k,this.toBBox),re=o(p,k,C,this.toBBox),U=(x=X,y=re,b=void 0,A=void 0,S=void 0,D=void 0,b=Math.max(x.minX,y.minX),A=Math.max(x.minY,y.minY),S=Math.min(x.maxX,y.maxX),D=Math.min(x.maxY,y.maxY),Math.max(0,S-b)*Math.max(0,D-A)),q=u(X)+u(re);U=f;T--){var E=p.children[T];a(b,p.leaf?x(E):E),A+=d(b)}return A},n.prototype._adjustParentBBoxes=function(p,f,C){for(var v=C;v>=0;v--)a(f[v],p)},n.prototype._condense=function(p){for(var f=p.length-1,C=void 0;f>=0;f--)p[f].children.length===0?f>0?(C=p[f-1].children).splice(C.indexOf(p[f]),1):this.clear():s(p[f],this.toBBox)},n})});var Ya=Me(N=>{"use strict";Object.defineProperty(N,"__esModule",{value:!0});N.earthRadius=63710088e-1;N.factors={centimeters:N.earthRadius*100,centimetres:N.earthRadius*100,degrees:N.earthRadius/111325,feet:N.earthRadius*3.28084,inches:N.earthRadius*39.37,kilometers:N.earthRadius/1e3,kilometres:N.earthRadius/1e3,meters:N.earthRadius,metres:N.earthRadius,miles:N.earthRadius/1609.344,millimeters:N.earthRadius*1e3,millimetres:N.earthRadius*1e3,nauticalmiles:N.earthRadius/1852,radians:1,yards:N.earthRadius*1.0936};N.unitsFactors={centimeters:100,centimetres:100,degrees:1/111325,feet:3.28084,inches:39.37,kilometers:1/1e3,kilometres:1/1e3,meters:1,metres:1,miles:1/1609.344,millimeters:1e3,millimetres:1e3,nauticalmiles:1/1852,radians:1/N.earthRadius,yards:1.0936133};N.areaFactors={acres:247105e-9,centimeters:1e4,centimetres:1e4,feet:10.763910417,hectares:1e-4,inches:1550.003100006,kilometers:1e-6,kilometres:1e-6,meters:1,metres:1,miles:386e-9,millimeters:1e6,millimetres:1e6,yards:1.195990046};function pt(i,t,e){e===void 0&&(e={});var n={type:"Feature"};return(e.id===0||e.id)&&(n.id=e.id),e.bbox&&(n.bbox=e.bbox),n.properties=t||{},n.geometry=i,n}N.feature=pt;function CC(i,t,e){switch(e===void 0&&(e={}),i){case"Point":return za(t).geometry;case"LineString":return Ga(t).geometry;case"Polygon":return Ua(t).geometry;case"MultiPoint":return _h(t).geometry;case"MultiLineString":return gh(t).geometry;case"MultiPolygon":return Ch(t).geometry;default:throw new Error(i+" is invalid")}}N.geometry=CC;function za(i,t,e){if(e===void 0&&(e={}),!i)throw new Error("coordinates is required");if(!Array.isArray(i))throw new Error("coordinates must be an Array");if(i.length<2)throw new Error("coordinates must be at least 2 numbers long");if(!Gr(i[0])||!Gr(i[1]))throw new Error("coordinates must contain numbers");var n={type:"Point",coordinates:i};return pt(n,t,e)}N.point=za;function yC(i,t,e){return e===void 0&&(e={}),Hr(i.map(function(n){return za(n,t)}),e)}N.points=yC;function Ua(i,t,e){e===void 0&&(e={});for(var n=0,r=i;n=0))throw new Error("precision must be a positive number");var e=Math.pow(10,t||0);return Math.round(i*e)/e}N.round=SC;function yh(i,t){t===void 0&&(t="kilometers");var e=N.factors[t];if(!e)throw new Error(t+" units is invalid");return i*e}N.radiansToLength=yh;function Ha(i,t){t===void 0&&(t="kilometers");var e=N.factors[t];if(!e)throw new Error(t+" units is invalid");return i/e}N.lengthToRadians=Ha;function IC(i,t){return vh(Ha(i,t))}N.lengthToDegrees=IC;function AC(i){var t=i%360;return t<0&&(t+=360),t}N.bearingToAzimuth=AC;function vh(i){var t=i%(2*Math.PI);return t*180/Math.PI}N.radiansToDegrees=vh;function wC(i){var t=i%360;return t*Math.PI/180}N.degreesToRadians=wC;function DC(i,t,e){if(t===void 0&&(t="kilometers"),e===void 0&&(e="kilometers"),!(i>=0))throw new Error("length must be a positive number");return yh(Ha(i,t),e)}N.convertLength=DC;function OC(i,t,e){if(t===void 0&&(t="meters"),e===void 0&&(e="kilometers"),!(i>=0))throw new Error("area must be a positive number");var n=N.areaFactors[t];if(!n)throw new Error("invalid original units");var r=N.areaFactors[e];if(!r)throw new Error("invalid final units");return i/n*r}N.convertArea=OC;function Gr(i){return!isNaN(i)&&i!==null&&!Array.isArray(i)}N.isNumber=Gr;function EC(i){return!!i&&i.constructor===Object}N.isObject=EC;function PC(i){if(!i)throw new Error("bbox is required");if(!Array.isArray(i))throw new Error("bbox must be an Array");if(i.length!==4&&i.length!==6)throw new Error("bbox must be an Array of 4 or 6 numbers");i.forEach(function(t){if(!Gr(t))throw new Error("bbox must only contain numbers")})}N.validateBBox=PC;function TC(i){if(!i)throw new Error("id is required");if(["string","number"].indexOf(typeof i)===-1)throw new Error("id must be a number or a string")}N.validateId=TC});var Ah=Me(le=>{"use strict";Object.defineProperty(le,"__esModule",{value:!0});var Ce=Ya();function yn(i,t,e){if(i!==null)for(var n,r,s,o,a,l,c,u=0,d=0,h,m=i.type,g=m==="FeatureCollection",_=m==="Feature",p=g?i.features.length:1,f=0;fl||g>c||_>u){a=d,l=n,c=g,u=_,s=0;return}var p=Ce.lineString([a,d],e.properties);if(t(p,n,r,_,s)===!1)return!1;s++,a=d})===!1)return!1}}})}function FC(i,t,e){var n=e,r=!1;return Sh(i,function(s,o,a,l,c){r===!1&&e===void 0?n=s:n=t(n,s,o,a,l,c),r=!0}),n}function Ih(i,t){if(!i)throw new Error("geojson is required");Yr(i,function(e,n,r){if(e.geometry!==null){var s=e.geometry.type,o=e.geometry.coordinates;switch(s){case"LineString":if(t(e,n,r,0,0)===!1)return!1;break;case"Polygon":for(var a=0;a{"use strict";Object.defineProperty(Y,"__esModule",{value:!0});var we=63710088e-1,Qa={centimeters:we*100,centimetres:we*100,degrees:360/(2*Math.PI),feet:we*3.28084,inches:we*39.37,kilometers:we/1e3,kilometres:we/1e3,meters:we,metres:we,miles:we/1609.344,millimeters:we*1e3,millimetres:we*1e3,nauticalmiles:we/1852,radians:1,yards:we*1.0936},Ka={acres:247105e-9,centimeters:1e4,centimetres:1e4,feet:10.763910417,hectares:1e-4,inches:1550.003100006,kilometers:1e-6,kilometres:1e-6,meters:1,metres:1,miles:386e-9,nauticalmiles:29155334959812285e-23,millimeters:1e6,millimetres:1e6,yards:1.195990046};function mt(i,t,e={}){let n={type:"Feature"};return(e.id===0||e.id)&&(n.id=e.id),e.bbox&&(n.bbox=e.bbox),n.properties=t||{},n.geometry=i,n}function GC(i,t,e={}){switch(i){case"Point":return Ja(t).geometry;case"LineString":return $a(t).geometry;case"Polygon":return Wa(t).geometry;case"MultiPoint":return Dh(t).geometry;case"MultiLineString":return wh(t).geometry;case"MultiPolygon":return Oh(t).geometry;default:throw new Error(i+" is invalid")}}function Ja(i,t,e={}){if(!i)throw new Error("coordinates is required");if(!Array.isArray(i))throw new Error("coordinates must be an Array");if(i.length<2)throw new Error("coordinates must be at least 2 numbers long");if(!qr(i[0])||!qr(i[1]))throw new Error("coordinates must contain numbers");return mt({type:"Point",coordinates:i},t,e)}function HC(i,t,e={}){return Kr(i.map(n=>Ja(n,t)),e)}function Wa(i,t,e={}){for(let r of i){if(r.length<4)throw new Error("Each LinearRing of a Polygon must have 4 or more Positions.");if(r[r.length-1].length!==r[0].length)throw new Error("First and last Position are not equivalent.");for(let s=0;sWa(n,t)),e)}function $a(i,t,e={}){if(i.length<2)throw new Error("coordinates must be an array of two or more positions");return mt({type:"LineString",coordinates:i},t,e)}function qC(i,t,e={}){return Kr(i.map(n=>$a(n,t)),e)}function Kr(i,t={}){let e={type:"FeatureCollection"};return t.id&&(e.id=t.id),t.bbox&&(e.bbox=t.bbox),e.features=i,e}function wh(i,t,e={}){return mt({type:"MultiLineString",coordinates:i},t,e)}function Dh(i,t,e={}){return mt({type:"MultiPoint",coordinates:i},t,e)}function Oh(i,t,e={}){return mt({type:"MultiPolygon",coordinates:i},t,e)}function KC(i,t,e={}){return mt({type:"GeometryCollection",geometries:i},t,e)}function QC(i,t=0){if(t&&!(t>=0))throw new Error("precision must be a positive number");let e=Math.pow(10,t||0);return Math.round(i*e)/e}function Eh(i,t="kilometers"){let e=Qa[t];if(!e)throw new Error(t+" units is invalid");return i*e}function Xa(i,t="kilometers"){let e=Qa[t];if(!e)throw new Error(t+" units is invalid");return i/e}function JC(i,t){return Ph(Xa(i,t))}function WC(i){let t=i%360;return t<0&&(t+=360),t}function $C(i){return i=i%360,i>180?i-360:i<-180?i+360:i}function Ph(i){return i%(2*Math.PI)*180/Math.PI}function XC(i){return i%360*Math.PI/180}function ZC(i,t="kilometers",e="kilometers"){if(!(i>=0))throw new Error("length must be a positive number");return Eh(Xa(i,t),e)}function jC(i,t="meters",e="kilometers"){if(!(i>=0))throw new Error("area must be a positive number");let n=Ka[t];if(!n)throw new Error("invalid original units");let r=Ka[e];if(!r)throw new Error("invalid final units");return i/n*r}function qr(i){return!isNaN(i)&&i!==null&&!Array.isArray(i)}function ey(i){return i!==null&&typeof i=="object"&&!Array.isArray(i)}function ty(i){if(!i)throw new Error("bbox is required");if(!Array.isArray(i))throw new Error("bbox must be an Array");if(i.length!==4&&i.length!==6)throw new Error("bbox must be an Array of 4 or 6 numbers");i.forEach(t=>{if(!qr(t))throw new Error("bbox must only contain numbers")})}function iy(i){if(!i)throw new Error("id is required");if(["string","number"].indexOf(typeof i)===-1)throw new Error("id must be a number or a string")}Y.areaFactors=Ka;Y.azimuthToBearing=$C;Y.bearingToAzimuth=WC;Y.convertArea=jC;Y.convertLength=ZC;Y.degreesToRadians=XC;Y.earthRadius=we;Y.factors=Qa;Y.feature=mt;Y.featureCollection=Kr;Y.geometry=GC;Y.geometryCollection=KC;Y.isNumber=qr;Y.isObject=ey;Y.lengthToDegrees=JC;Y.lengthToRadians=Xa;Y.lineString=$a;Y.lineStrings=qC;Y.multiLineString=wh;Y.multiPoint=Dh;Y.multiPolygon=Oh;Y.point=Ja;Y.points=HC;Y.polygon=Wa;Y.polygons=YC;Y.radiansToDegrees=Ph;Y.radiansToLength=Eh;Y.round=QC;Y.validateBBox=ty;Y.validateId=iy});var Lh=Me(ce=>{"use strict";Object.defineProperty(ce,"__esModule",{value:!0});var ye=Th();function vn(i,t,e){if(i!==null)for(var n,r,s,o,a,l,c,u=0,d=0,h,m=i.type,g=m==="FeatureCollection",_=m==="Feature",p=g?i.features.length:1,f=0;fl||g>c||_>u){a=d,l=n,c=g,u=_,s=0;return}var p=ye.lineString.call(void 0,[a,d],e.properties);if(t(p,n,r,_,s)===!1)return!1;s++,a=d})===!1)return!1}}})}function cy(i,t,e){var n=e,r=!1;return Nh(i,function(s,o,a,l,c){r===!1&&e===void 0?n=s:n=t(n,s,o,a,l,c),r=!0}),n}function Bh(i,t){if(!i)throw new Error("geojson is required");Qr(i,function(e,n,r){if(e.geometry!==null){var s=e.geometry.type,o=e.geometry.coordinates;switch(s){case"LineString":if(t(e,n,r,0,0)===!1)return!1;break;case"Polygon":for(var a=0;a{"use strict";Object.defineProperty(Jr,"__esModule",{value:!0});var py=Lh();function Rh(i,t={}){if(i.bbox!=null&&t.recompute!==!0)return i.bbox;let e=[1/0,1/0,-1/0,-1/0];return py.coordEach.call(void 0,i,n=>{e[0]>n[0]&&(e[0]=n[0]),e[1]>n[1]&&(e[1]=n[1]),e[2]{"use strict";var Ye=fh(),zh=Ya(),Uh=Ah(),si=Fh().default,fy=Uh.featureEach,_5=Uh.coordEach,C5=zh.polygon,Vh=zh.featureCollection;function Gh(i){var t=new Ye(i);return t.insert=function(e){if(e.type!=="Feature")throw new Error("invalid feature");return e.bbox=e.bbox?e.bbox:si(e),Ye.prototype.insert.call(this,e)},t.load=function(e){var n=[];return Array.isArray(e)?e.forEach(function(r){if(r.type!=="Feature")throw new Error("invalid features");r.bbox=r.bbox?r.bbox:si(r),n.push(r)}):fy(e,function(r){if(r.type!=="Feature")throw new Error("invalid features");r.bbox=r.bbox?r.bbox:si(r),n.push(r)}),Ye.prototype.load.call(this,n)},t.remove=function(e,n){if(e.type!=="Feature")throw new Error("invalid feature");return e.bbox=e.bbox?e.bbox:si(e),Ye.prototype.remove.call(this,e,n)},t.clear=function(){return Ye.prototype.clear.call(this)},t.search=function(e){var n=Ye.prototype.search.call(this,this.toBBox(e));return Vh(n)},t.collides=function(e){return Ye.prototype.collides.call(this,this.toBBox(e))},t.all=function(){var e=Ye.prototype.all.call(this);return Vh(e)},t.toJSON=function(){return Ye.prototype.toJSON.call(this)},t.fromJSON=function(e){return Ye.prototype.fromJSON.call(this,e)},t.toBBox=function(e){var n;if(e.bbox)n=e.bbox;else if(Array.isArray(e)&&e.length===4)n=e;else if(Array.isArray(e)&&e.length===6)n=[e[0],e[1],e[3],e[4]];else if(e.type==="Feature")n=si(e);else if(e.type==="FeatureCollection")n=si(e);else throw new Error("invalid geojson");return{minX:n[0],minY:n[1],maxX:n[2],maxY:n[3]}},t}ja.exports=Gh;ja.exports.default=Gh});function mi(i){return i+.5|0}var tt=(i,t,e)=>Math.max(Math.min(i,e),t);function hi(i){return tt(mi(i*2.55),0,255)}function it(i){return tt(mi(i*255),0,255)}function qe(i){return tt(mi(i/2.55)/100,0,1)}function Gl(i){return tt(mi(i*100),0,100)}var Pe={0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,A:10,B:11,C:12,D:13,E:14,F:15,a:10,b:11,c:12,d:13,e:14,f:15},ds=[..."0123456789ABCDEF"],Qh=i=>ds[i&15],Jh=i=>ds[(i&240)>>4]+ds[i&15],Tn=i=>(i&240)>>4===(i&15),Wh=i=>Tn(i.r)&&Tn(i.g)&&Tn(i.b)&&Tn(i.a);function $h(i){var t=i.length,e;return i[0]==="#"&&(t===4||t===5?e={r:255&Pe[i[1]]*17,g:255&Pe[i[2]]*17,b:255&Pe[i[3]]*17,a:t===5?Pe[i[4]]*17:255}:(t===7||t===9)&&(e={r:Pe[i[1]]<<4|Pe[i[2]],g:Pe[i[3]]<<4|Pe[i[4]],b:Pe[i[5]]<<4|Pe[i[6]],a:t===9?Pe[i[7]]<<4|Pe[i[8]]:255})),e}var Xh=(i,t)=>i<255?t(i):"";function Zh(i){var t=Wh(i)?Qh:Jh;return i?"#"+t(i.r)+t(i.g)+t(i.b)+Xh(i.a,t):void 0}var jh=/^(hsla?|hwb|hsv)\(\s*([-+.e\d]+)(?:deg)?[\s,]+([-+.e\d]+)%[\s,]+([-+.e\d]+)%(?:[\s,]+([-+.e\d]+)(%)?)?\s*\)$/;function Kl(i,t,e){let n=t*Math.min(e,1-e),r=(s,o=(s+i/30)%12)=>e-n*Math.max(Math.min(o-3,9-o,1),-1);return[r(0),r(8),r(4)]}function ep(i,t,e){let n=(r,s=(r+i/60)%6)=>e-e*t*Math.max(Math.min(s,4-s,1),0);return[n(5),n(3),n(1)]}function tp(i,t,e){let n=Kl(i,1,.5),r;for(t+e>1&&(r=1/(t+e),t*=r,e*=r),r=0;r<3;r++)n[r]*=1-t-e,n[r]+=t;return n}function ip(i,t,e,n,r){return i===r?(t-e)/n+(t.5?u/(2-s-o):u/(s+o),l=ip(e,n,r,u,s),l=l*60+.5),[l|0,c||0,a]}function ps(i,t,e,n){return(Array.isArray(t)?i(t[0],t[1],t[2]):i(t,e,n)).map(it)}function ms(i,t,e){return ps(Kl,i,t,e)}function np(i,t,e){return ps(tp,i,t,e)}function rp(i,t,e){return ps(ep,i,t,e)}function Ql(i){return(i%360+360)%360}function sp(i){let t=jh.exec(i),e=255,n;if(!t)return;t[5]!==n&&(e=t[6]?hi(+t[5]):it(+t[5]));let r=Ql(+t[2]),s=+t[3]/100,o=+t[4]/100;return t[1]==="hwb"?n=np(r,s,o):t[1]==="hsv"?n=rp(r,s,o):n=ms(r,s,o),{r:n[0],g:n[1],b:n[2],a:e}}function op(i,t){var e=hs(i);e[0]=Ql(e[0]+t),e=ms(e),i.r=e[0],i.g=e[1],i.b=e[2]}function ap(i){if(!i)return;let t=hs(i),e=t[0],n=Gl(t[1]),r=Gl(t[2]);return i.a<255?`hsla(${e}, ${n}%, ${r}%, ${qe(i.a)})`:`hsl(${e}, ${n}%, ${r}%)`}var Hl={x:"dark",Z:"light",Y:"re",X:"blu",W:"gr",V:"medium",U:"slate",A:"ee",T:"ol",S:"or",B:"ra",C:"lateg",D:"ights",R:"in",Q:"turquois",E:"hi",P:"ro",O:"al",N:"le",M:"de",L:"yello",F:"en",K:"ch",G:"arks",H:"ea",I:"ightg",J:"wh"},Yl={OiceXe:"f0f8ff",antiquewEte:"faebd7",aqua:"ffff",aquamarRe:"7fffd4",azuY:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"0",blanKedOmond:"ffebcd",Xe:"ff",XeviTet:"8a2be2",bPwn:"a52a2a",burlywood:"deb887",caMtXe:"5f9ea0",KartYuse:"7fff00",KocTate:"d2691e",cSO:"ff7f50",cSnflowerXe:"6495ed",cSnsilk:"fff8dc",crimson:"dc143c",cyan:"ffff",xXe:"8b",xcyan:"8b8b",xgTMnPd:"b8860b",xWay:"a9a9a9",xgYF:"6400",xgYy:"a9a9a9",xkhaki:"bdb76b",xmagFta:"8b008b",xTivegYF:"556b2f",xSange:"ff8c00",xScEd:"9932cc",xYd:"8b0000",xsOmon:"e9967a",xsHgYF:"8fbc8f",xUXe:"483d8b",xUWay:"2f4f4f",xUgYy:"2f4f4f",xQe:"ced1",xviTet:"9400d3",dAppRk:"ff1493",dApskyXe:"bfff",dimWay:"696969",dimgYy:"696969",dodgerXe:"1e90ff",fiYbrick:"b22222",flSOwEte:"fffaf0",foYstWAn:"228b22",fuKsia:"ff00ff",gaRsbSo:"dcdcdc",ghostwEte:"f8f8ff",gTd:"ffd700",gTMnPd:"daa520",Way:"808080",gYF:"8000",gYFLw:"adff2f",gYy:"808080",honeyMw:"f0fff0",hotpRk:"ff69b4",RdianYd:"cd5c5c",Rdigo:"4b0082",ivSy:"fffff0",khaki:"f0e68c",lavFMr:"e6e6fa",lavFMrXsh:"fff0f5",lawngYF:"7cfc00",NmoncEffon:"fffacd",ZXe:"add8e6",ZcSO:"f08080",Zcyan:"e0ffff",ZgTMnPdLw:"fafad2",ZWay:"d3d3d3",ZgYF:"90ee90",ZgYy:"d3d3d3",ZpRk:"ffb6c1",ZsOmon:"ffa07a",ZsHgYF:"20b2aa",ZskyXe:"87cefa",ZUWay:"778899",ZUgYy:"778899",ZstAlXe:"b0c4de",ZLw:"ffffe0",lime:"ff00",limegYF:"32cd32",lRF:"faf0e6",magFta:"ff00ff",maPon:"800000",VaquamarRe:"66cdaa",VXe:"cd",VScEd:"ba55d3",VpurpN:"9370db",VsHgYF:"3cb371",VUXe:"7b68ee",VsprRggYF:"fa9a",VQe:"48d1cc",VviTetYd:"c71585",midnightXe:"191970",mRtcYam:"f5fffa",mistyPse:"ffe4e1",moccasR:"ffe4b5",navajowEte:"ffdead",navy:"80",Tdlace:"fdf5e6",Tive:"808000",TivedBb:"6b8e23",Sange:"ffa500",SangeYd:"ff4500",ScEd:"da70d6",pOegTMnPd:"eee8aa",pOegYF:"98fb98",pOeQe:"afeeee",pOeviTetYd:"db7093",papayawEp:"ffefd5",pHKpuff:"ffdab9",peru:"cd853f",pRk:"ffc0cb",plum:"dda0dd",powMrXe:"b0e0e6",purpN:"800080",YbeccapurpN:"663399",Yd:"ff0000",Psybrown:"bc8f8f",PyOXe:"4169e1",saddNbPwn:"8b4513",sOmon:"fa8072",sandybPwn:"f4a460",sHgYF:"2e8b57",sHshell:"fff5ee",siFna:"a0522d",silver:"c0c0c0",skyXe:"87ceeb",UXe:"6a5acd",UWay:"708090",UgYy:"708090",snow:"fffafa",sprRggYF:"ff7f",stAlXe:"4682b4",tan:"d2b48c",teO:"8080",tEstN:"d8bfd8",tomato:"ff6347",Qe:"40e0d0",viTet:"ee82ee",JHt:"f5deb3",wEte:"ffffff",wEtesmoke:"f5f5f5",Lw:"ffff00",LwgYF:"9acd32"};function lp(){let i={},t=Object.keys(Yl),e=Object.keys(Hl),n,r,s,o,a;for(n=0;n>16&255,s>>8&255,s&255]}return i}var Mn;function cp(i){Mn||(Mn=lp(),Mn.transparent=[0,0,0,0]);let t=Mn[i.toLowerCase()];return t&&{r:t[0],g:t[1],b:t[2],a:t.length===4?t[3]:255}}var up=/^rgba?\(\s*([-+.\d]+)(%)?[\s,]+([-+.e\d]+)(%)?[\s,]+([-+.e\d]+)(%)?(?:[\s,/]+([-+.e\d]+)(%)?)?\s*\)$/;function dp(i){let t=up.exec(i),e=255,n,r,s;if(t){if(t[7]!==n){let o=+t[7];e=t[8]?hi(o):tt(o*255,0,255)}return n=+t[1],r=+t[3],s=+t[5],n=255&(t[2]?hi(n):tt(n,0,255)),r=255&(t[4]?hi(r):tt(r,0,255)),s=255&(t[6]?hi(s):tt(s,0,255)),{r:n,g:r,b:s,a:e}}}function hp(i){return i&&(i.a<255?`rgba(${i.r}, ${i.g}, ${i.b}, ${qe(i.a)})`:`rgb(${i.r}, ${i.g}, ${i.b})`)}var us=i=>i<=.0031308?i*12.92:Math.pow(i,1/2.4)*1.055-.055,Mt=i=>i<=.04045?i/12.92:Math.pow((i+.055)/1.055,2.4);function pp(i,t,e){let n=Mt(qe(i.r)),r=Mt(qe(i.g)),s=Mt(qe(i.b));return{r:it(us(n+e*(Mt(qe(t.r))-n))),g:it(us(r+e*(Mt(qe(t.g))-r))),b:it(us(s+e*(Mt(qe(t.b))-s))),a:i.a+e*(t.a-i.a)}}function kn(i,t,e){if(i){let n=hs(i);n[t]=Math.max(0,Math.min(n[t]+n[t]*e,t===0?360:1)),n=ms(n),i.r=n[0],i.g=n[1],i.b=n[2]}}function Jl(i,t){return i&&Object.assign(t||{},i)}function ql(i){var t={r:0,g:0,b:0,a:255};return Array.isArray(i)?i.length>=3&&(t={r:i[0],g:i[1],b:i[2],a:255},i.length>3&&(t.a=it(i[3]))):(t=Jl(i,{r:0,g:0,b:0,a:1}),t.a=it(t.a)),t}function mp(i){return i.charAt(0)==="r"?dp(i):sp(i)}var pi=class i{constructor(t){if(t instanceof i)return t;let e=typeof t,n;e==="object"?n=ql(t):e==="string"&&(n=$h(t)||cp(t)||mp(t)),this._rgb=n,this._valid=!!n}get valid(){return this._valid}get rgb(){var t=Jl(this._rgb);return t&&(t.a=qe(t.a)),t}set rgb(t){this._rgb=ql(t)}rgbString(){return this._valid?hp(this._rgb):void 0}hexString(){return this._valid?Zh(this._rgb):void 0}hslString(){return this._valid?ap(this._rgb):void 0}mix(t,e){if(t){let n=this.rgb,r=t.rgb,s,o=e===s?.5:e,a=2*o-1,l=n.a-r.a,c=((a*l===-1?a:(a+l)/(1+a*l))+1)/2;s=1-c,n.r=255&c*n.r+s*r.r+.5,n.g=255&c*n.g+s*r.g+.5,n.b=255&c*n.b+s*r.b+.5,n.a=o*n.a+(1-o)*r.a,this.rgb=n}return this}interpolate(t,e){return t&&(this._rgb=pp(this._rgb,t._rgb,e)),this}clone(){return new i(this.rgb)}alpha(t){return this._rgb.a=it(t),this}clearer(t){let e=this._rgb;return e.a*=1-t,this}greyscale(){let t=this._rgb,e=mi(t.r*.3+t.g*.59+t.b*.11);return t.r=t.g=t.b=e,this}opaquer(t){let e=this._rgb;return e.a*=1+t,this}negate(){let t=this._rgb;return t.r=255-t.r,t.g=255-t.g,t.b=255-t.b,this}lighten(t){return kn(this._rgb,2,t),this}darken(t){return kn(this._rgb,2,-t),this}saturate(t){return kn(this._rgb,1,t),this}desaturate(t){return kn(this._rgb,1,-t),this}rotate(t){return op(this._rgb,t),this}};function Ve(){}var sc=(()=>{let i=0;return()=>i++})();function R(i){return i==null}function J(i){if(Array.isArray&&Array.isArray(i))return!0;let t=Object.prototype.toString.call(i);return t.slice(0,7)==="[object"&&t.slice(-6)==="Array]"}function F(i){return i!==null&&Object.prototype.toString.call(i)==="[object Object]"}function ee(i){return(typeof i=="number"||i instanceof Number)&&isFinite(+i)}function Se(i,t){return ee(i)?i:t}function B(i,t){return typeof i>"u"?t:i}var oc=(i,t)=>typeof i=="string"&&i.endsWith("%")?parseFloat(i)/100:+i/t,Cs=(i,t)=>typeof i=="string"&&i.endsWith("%")?parseFloat(i)/100*t:+i;function Q(i,t,e){if(i&&typeof i.call=="function")return i.apply(e,t)}function K(i,t,e,n){let r,s,o;if(J(i))if(s=i.length,n)for(r=s-1;r>=0;r--)t.call(e,i[r],r);else for(r=0;ri,x:i=>i.x,y:i=>i.y};function _p(i){let t=i.split("."),e=[],n="";for(let r of t)n+=r,n.endsWith("\\")?n=n.slice(0,-1)+".":(e.push(n),n="");return e}function Cp(i){let t=_p(i);return e=>{for(let n of t){if(n==="")break;e=e&&e[n]}return e}}function Je(i,t){return(Wl[t]||(Wl[t]=Cp(t)))(i)}function Gn(i){return i.charAt(0).toUpperCase()+i.slice(1)}var Rt=i=>typeof i<"u",Ke=i=>typeof i=="function",ys=(i,t)=>{if(i.size!==t.size)return!1;for(let e of i)if(!t.has(e))return!1;return!0};function lc(i){return i.type==="mouseup"||i.type==="click"||i.type==="contextmenu"}var H=Math.PI,W=2*H,yp=W+H,Vn=Number.POSITIVE_INFINITY,vp=H/180,ie=H/2,yt=H/4,$l=H*2/3,Qe=Math.log10,Be=Math.sign;function Ft(i,t,e){return Math.abs(i-t)r-s).pop(),t}function xp(i){return typeof i=="symbol"||typeof i=="object"&&i!==null&&!(Symbol.toPrimitive in i||"toString"in i||"valueOf"in i)}function bt(i){return!xp(i)&&!isNaN(parseFloat(i))&&isFinite(i)}function uc(i,t){let e=Math.round(i);return e-t<=i&&e+t>=i}function xs(i,t,e){let n,r,s;for(n=0,r=i.length;nl&&c=Math.min(t,e)-n&&i<=Math.max(t,e)+n}function Yn(i,t,e){e=e||(o=>i[o]1;)s=r+n>>1,e(s)?r=s:n=s;return{lo:r,hi:n}}var Re=(i,t,e,n)=>Yn(i,e,n?r=>{let s=i[r][t];return si[r][t]Yn(i,e,n=>i[n][t]>=e);function pc(i,t,e){let n=0,r=i.length;for(;nn&&i[r-1]>e;)r--;return n>0||r{let n="_onData"+Gn(e),r=i[e];Object.defineProperty(i,e,{configurable:!0,enumerable:!1,value(...s){let o=r.apply(this,s);return i._chartjs.listeners.forEach(a=>{typeof a[n]=="function"&&a[n](...s)}),o}})})}function Is(i,t){let e=i._chartjs;if(!e)return;let n=e.listeners,r=n.indexOf(t);r!==-1&&n.splice(r,1),!(n.length>0)&&(mc.forEach(s=>{delete i[s]}),delete i._chartjs)}function As(i){let t=new Set(i);return t.size===i.length?i:Array.from(t)}var ws=(function(){return typeof window>"u"?function(i){return i()}:window.requestAnimationFrame})();function Ds(i,t){let e=[],n=!1;return function(...r){e=r,n||(n=!0,ws.call(window,()=>{n=!1,i.apply(t,e)}))}}function gc(i,t){let e;return function(...n){return t?(clearTimeout(e),e=setTimeout(i,t,n)):i.apply(this,n),t}}var qn=i=>i==="start"?"left":i==="end"?"right":"center",pe=(i,t,e)=>i==="start"?t:i==="end"?e:(t+e)/2,_c=(i,t,e,n)=>i===(n?"left":"right")?e:i==="center"?(t+e)/2:t;function Os(i,t,e){let n=t.length,r=0,s=n;if(i._sorted){let{iScale:o,vScale:a,_parsed:l}=i,c=i.dataset&&i.dataset.options?i.dataset.options.spanGaps:null,u=o.axis,{min:d,max:h,minDefined:m,maxDefined:g}=o.getUserBounds();if(m){if(r=Math.min(Re(l,u,d).lo,e?n:Re(t,u,o.getPixelForValue(d)).lo),c){let _=l.slice(0,r+1).reverse().findIndex(p=>!R(p[a.axis]));r-=Math.max(0,_)}r=ae(r,0,n-1)}if(g){let _=Math.max(Re(l,o.axis,h,!0).hi+1,e?0:Re(t,u,o.getPixelForValue(h),!0).hi+1);if(c){let p=l.slice(_-1).findIndex(f=>!R(f[a.axis]));_+=Math.max(0,p)}s=ae(_,r,n)-r}else s=n-r}return{start:r,count:s}}function Es(i){let{xScale:t,yScale:e,_scaleRanges:n}=i,r={xmin:t.min,xmax:t.max,ymin:e.min,ymax:e.max};if(!n)return i._scaleRanges=r,!0;let s=n.xmin!==t.min||n.xmax!==t.max||n.ymin!==e.min||n.ymax!==e.max;return Object.assign(n,r),s}var Nn=i=>i===0||i===1,Xl=(i,t,e)=>-(Math.pow(2,10*(i-=1))*Math.sin((i-t)*W/e)),Zl=(i,t,e)=>Math.pow(2,-10*i)*Math.sin((i-t)*W/e)+1,kt={linear:i=>i,easeInQuad:i=>i*i,easeOutQuad:i=>-i*(i-2),easeInOutQuad:i=>(i/=.5)<1?.5*i*i:-.5*(--i*(i-2)-1),easeInCubic:i=>i*i*i,easeOutCubic:i=>(i-=1)*i*i+1,easeInOutCubic:i=>(i/=.5)<1?.5*i*i*i:.5*((i-=2)*i*i+2),easeInQuart:i=>i*i*i*i,easeOutQuart:i=>-((i-=1)*i*i*i-1),easeInOutQuart:i=>(i/=.5)<1?.5*i*i*i*i:-.5*((i-=2)*i*i*i-2),easeInQuint:i=>i*i*i*i*i,easeOutQuint:i=>(i-=1)*i*i*i*i+1,easeInOutQuint:i=>(i/=.5)<1?.5*i*i*i*i*i:.5*((i-=2)*i*i*i*i+2),easeInSine:i=>-Math.cos(i*ie)+1,easeOutSine:i=>Math.sin(i*ie),easeInOutSine:i=>-.5*(Math.cos(H*i)-1),easeInExpo:i=>i===0?0:Math.pow(2,10*(i-1)),easeOutExpo:i=>i===1?1:-Math.pow(2,-10*i)+1,easeInOutExpo:i=>Nn(i)?i:i<.5?.5*Math.pow(2,10*(i*2-1)):.5*(-Math.pow(2,-10*(i*2-1))+2),easeInCirc:i=>i>=1?i:-(Math.sqrt(1-i*i)-1),easeOutCirc:i=>Math.sqrt(1-(i-=1)*i),easeInOutCirc:i=>(i/=.5)<1?-.5*(Math.sqrt(1-i*i)-1):.5*(Math.sqrt(1-(i-=2)*i)+1),easeInElastic:i=>Nn(i)?i:Xl(i,.075,.3),easeOutElastic:i=>Nn(i)?i:Zl(i,.075,.3),easeInOutElastic(i){return Nn(i)?i:i<.5?.5*Xl(i*2,.1125,.45):.5+.5*Zl(i*2-1,.1125,.45)},easeInBack(i){return i*i*((1.70158+1)*i-1.70158)},easeOutBack(i){return(i-=1)*i*((1.70158+1)*i+1.70158)+1},easeInOutBack(i){let t=1.70158;return(i/=.5)<1?.5*(i*i*(((t*=1.525)+1)*i-t)):.5*((i-=2)*i*(((t*=1.525)+1)*i+t)+2)},easeInBounce:i=>1-kt.easeOutBounce(1-i),easeOutBounce(i){return i<1/2.75?7.5625*i*i:i<2/2.75?7.5625*(i-=1.5/2.75)*i+.75:i<2.5/2.75?7.5625*(i-=2.25/2.75)*i+.9375:7.5625*(i-=2.625/2.75)*i+.984375},easeInOutBounce:i=>i<.5?kt.easeInBounce(i*2)*.5:kt.easeOutBounce(i*2-1)*.5+.5};function Ps(i){if(i&&typeof i=="object"){let t=i.toString();return t==="[object CanvasPattern]"||t==="[object CanvasGradient]"}return!1}function Ts(i){return Ps(i)?i:new pi(i)}function fs(i){return Ps(i)?i:new pi(i).saturate(.5).darken(.1).hexString()}var Sp=["x","y","borderWidth","radius","tension"],Ip=["color","borderColor","backgroundColor"];function Ap(i){i.set("animation",{delay:void 0,duration:1e3,easing:"easeOutQuart",fn:void 0,from:void 0,loop:void 0,to:void 0,type:void 0}),i.describe("animation",{_fallback:!1,_indexable:!1,_scriptable:t=>t!=="onProgress"&&t!=="onComplete"&&t!=="fn"}),i.set("animations",{colors:{type:"color",properties:Ip},numbers:{type:"number",properties:Sp}}),i.describe("animations",{_fallback:"animation"}),i.set("transitions",{active:{animation:{duration:400}},resize:{animation:{duration:0}},show:{animations:{colors:{from:"transparent"},visible:{type:"boolean",duration:0}}},hide:{animations:{colors:{to:"transparent"},visible:{type:"boolean",easing:"linear",fn:t=>t|0}}}})}function wp(i){i.set("layout",{autoPadding:!0,padding:{top:0,right:0,bottom:0,left:0}})}var jl=new Map;function Dp(i,t){t=t||{};let e=i+JSON.stringify(t),n=jl.get(e);return n||(n=new Intl.NumberFormat(i,t),jl.set(e,n)),n}function zt(i,t,e){return Dp(t,e).format(i)}var Cc={values(i){return J(i)?i:""+i},numeric(i,t,e){if(i===0)return"0";let n=this.chart.options.locale,r,s=i;if(e.length>1){let c=Math.max(Math.abs(e[0].value),Math.abs(e[e.length-1].value));(c<1e-4||c>1e15)&&(r="scientific"),s=Op(i,e)}let o=Qe(Math.abs(s)),a=isNaN(o)?1:Math.max(Math.min(-1*Math.floor(o),20),0),l={notation:r,minimumFractionDigits:a,maximumFractionDigits:a};return Object.assign(l,this.options.ticks.format),zt(i,n,l)},logarithmic(i,t,e){if(i===0)return"0";let n=e[t].significand||i/Math.pow(10,Math.floor(Qe(i)));return[1,2,3,5,10,15].includes(n)||t>.8*e.length?Cc.numeric.call(this,i,t,e):""}};function Op(i,t){let e=t.length>3?t[2].value-t[1].value:t[1].value-t[0].value;return Math.abs(e)>=1&&i!==Math.floor(i)&&(e=i-Math.floor(i)),e}var Ci={formatters:Cc};function Ep(i){i.set("scale",{display:!0,offset:!1,reverse:!1,beginAtZero:!1,bounds:"ticks",clip:!0,grace:0,grid:{display:!0,lineWidth:1,drawOnChartArea:!0,drawTicks:!0,tickLength:8,tickWidth:(t,e)=>e.lineWidth,tickColor:(t,e)=>e.color,offset:!1},border:{display:!0,dash:[],dashOffset:0,width:1},title:{display:!1,text:"",padding:{top:4,bottom:4}},ticks:{minRotation:0,maxRotation:50,mirror:!1,textStrokeWidth:0,textStrokeColor:"",padding:3,display:!0,autoSkip:!0,autoSkipPadding:3,labelOffset:0,callback:Ci.formatters.values,minor:{},major:{},align:"center",crossAlign:"near",showLabelBackdrop:!1,backdropColor:"rgba(255, 255, 255, 0.75)",backdropPadding:2}}),i.route("scale.ticks","color","","color"),i.route("scale.grid","color","","borderColor"),i.route("scale.border","color","","borderColor"),i.route("scale.title","color","","color"),i.describe("scale",{_fallback:!1,_scriptable:t=>!t.startsWith("before")&&!t.startsWith("after")&&t!=="callback"&&t!=="parser",_indexable:t=>t!=="borderDash"&&t!=="tickBorderDash"&&t!=="dash"}),i.describe("scales",{_fallback:"scale"}),i.describe("scale.ticks",{_scriptable:t=>t!=="backdropPadding"&&t!=="callback",_indexable:t=>t!=="backdropPadding"})}var rt=Object.create(null),Kn=Object.create(null);function fi(i,t){if(!t)return i;let e=t.split(".");for(let n=0,r=e.length;nn.chart.platform.getDevicePixelRatio(),this.elements={},this.events=["mousemove","mouseout","click","touchstart","touchmove"],this.font={family:"'Helvetica Neue', 'Helvetica', 'Arial', sans-serif",size:12,style:"normal",lineHeight:1.2,weight:null},this.hover={},this.hoverBackgroundColor=(n,r)=>fs(r.backgroundColor),this.hoverBorderColor=(n,r)=>fs(r.borderColor),this.hoverColor=(n,r)=>fs(r.color),this.indexAxis="x",this.interaction={mode:"nearest",intersect:!0,includeInvisible:!1},this.maintainAspectRatio=!0,this.onHover=null,this.onClick=null,this.parsing=!0,this.plugins={},this.responsive=!0,this.scale=void 0,this.scales={},this.showLine=!0,this.drawActiveElementsOnTop=!0,this.describe(t),this.apply(e)}set(t,e){return gs(this,t,e)}get(t){return fi(this,t)}describe(t,e){return gs(Kn,t,e)}override(t,e){return gs(rt,t,e)}route(t,e,n,r){let s=fi(this,t),o=fi(this,n),a="_"+e;Object.defineProperties(s,{[a]:{value:s[e],writable:!0},[e]:{enumerable:!0,get(){let l=this[a],c=o[r];return F(l)?Object.assign({},c,l):B(l,c)},set(l){this[a]=l}}})}apply(t){t.forEach(e=>e(this))}},$=new _s({_scriptable:i=>!i.startsWith("on"),_indexable:i=>i!=="events",hover:{_fallback:"interaction"},interaction:{_scriptable:!1,_indexable:!1}},[Ap,wp,Ep]);function Pp(i){return!i||R(i.size)||R(i.family)?null:(i.style?i.style+" ":"")+(i.weight?i.weight+" ":"")+i.size+"px "+i.family}function gi(i,t,e,n,r){let s=t[r];return s||(s=t[r]=i.measureText(r).width,e.push(r)),s>n&&(n=s),n}function yc(i,t,e,n){n=n||{};let r=n.data=n.data||{},s=n.garbageCollect=n.garbageCollect||[];n.font!==t&&(r=n.data={},s=n.garbageCollect=[],n.font=t),i.save(),i.font=t;let o=0,a=e.length,l,c,u,d,h;for(l=0;le.length){for(l=0;l0&&i.stroke()}}function Fe(i,t,e){return e=e||.5,!t||i&&i.x>t.left-e&&i.xt.top-e&&i.y0&&s.strokeColor!=="",l,c;for(i.save(),i.font=r.string,Tp(i,s),l=0;l+i||0;function Jn(i,t){let e={},n=F(t),r=n?Object.keys(t):t,s=F(i)?n?o=>B(i[o],i[t[o]]):o=>i[o]:()=>i;for(let o of r)e[o]=Rp(s(o));return e}function Ns(i){return Jn(i,{top:"y",right:"x",bottom:"y",left:"x"})}function at(i){return Jn(i,["topLeft","topRight","bottomLeft","bottomRight"])}function me(i){let t=Ns(i);return t.width=t.left+t.right,t.height=t.top+t.bottom,t}function oe(i,t){i=i||{},t=t||$.font;let e=B(i.size,t.size);typeof e=="string"&&(e=parseInt(e,10));let n=B(i.style,t.style);n&&!(""+n).match(Bp)&&(console.warn('Invalid font style specified: "'+n+'"'),n=void 0);let r={family:B(i.family,t.family),lineHeight:Lp(B(i.lineHeight,t.lineHeight),e),size:e,style:n,weight:B(i.weight,t.weight),string:""};return r.string=Pp(r),r}function Gt(i,t,e,n){let r=!0,s,o,a;for(s=0,o=i.length;se&&a===0?0:a+l;return{min:o(n,-Math.abs(s)),max:o(r,s)}}function We(i,t){return Object.assign(Object.create(i),t)}function Wn(i,t=[""],e,n,r=()=>i[0]){let s=e||i;typeof n>"u"&&(n=Ac("_fallback",i));let o={[Symbol.toStringTag]:"Object",_cacheable:!0,_scopes:i,_rootScopes:s,_fallback:n,_getTarget:r,override:a=>Wn([a,...i],t,s,n)};return new Proxy(o,{deleteProperty(a,l){return delete a[l],delete a._keys,delete i[0][l],!0},get(a,l){return Sc(a,l,()=>qp(l,t,i,a))},getOwnPropertyDescriptor(a,l){return Reflect.getOwnPropertyDescriptor(a._scopes[0],l)},getPrototypeOf(){return Reflect.getPrototypeOf(i[0])},has(a,l){return tc(a).includes(l)},ownKeys(a){return tc(a)},set(a,l,c){let u=a._storage||(a._storage=r());return a[l]=u[l]=c,delete a._keys,!0}})}function xt(i,t,e,n){let r={_cacheable:!1,_proxy:i,_context:t,_subProxy:e,_stack:new Set,_descriptors:Bs(i,n),setContext:s=>xt(i,s,e,n),override:s=>xt(i.override(s),t,e,n)};return new Proxy(r,{deleteProperty(s,o){return delete s[o],delete i[o],!0},get(s,o,a){return Sc(s,o,()=>Vp(s,o,a))},getOwnPropertyDescriptor(s,o){return s._descriptors.allKeys?Reflect.has(i,o)?{enumerable:!0,configurable:!0}:void 0:Reflect.getOwnPropertyDescriptor(i,o)},getPrototypeOf(){return Reflect.getPrototypeOf(i)},has(s,o){return Reflect.has(i,o)},ownKeys(){return Reflect.ownKeys(i)},set(s,o,a){return i[o]=a,delete s[o],!0}})}function Bs(i,t={scriptable:!0,indexable:!0}){let{_scriptable:e=t.scriptable,_indexable:n=t.indexable,_allKeys:r=t.allKeys}=i;return{allKeys:r,scriptable:e,indexable:n,isScriptable:Ke(e)?e:()=>e,isIndexable:Ke(n)?n:()=>n}}var Fp=(i,t)=>i?i+Gn(t):t,Ls=(i,t)=>F(t)&&i!=="adapters"&&(Object.getPrototypeOf(t)===null||t.constructor===Object);function Sc(i,t,e){if(Object.prototype.hasOwnProperty.call(i,t)||t==="constructor")return i[t];let n=e();return i[t]=n,n}function Vp(i,t,e){let{_proxy:n,_context:r,_subProxy:s,_descriptors:o}=i,a=n[t];return Ke(a)&&o.isScriptable(t)&&(a=zp(t,a,i,e)),J(a)&&a.length&&(a=Up(t,a,i,o.isIndexable)),Ls(t,a)&&(a=xt(a,r,s&&s[t],o)),a}function zp(i,t,e,n){let{_proxy:r,_context:s,_subProxy:o,_stack:a}=e;if(a.has(i))throw new Error("Recursion detected: "+Array.from(a).join("->")+"->"+i);a.add(i);let l=t(s,o||n);return a.delete(i),Ls(i,l)&&(l=Rs(r._scopes,r,i,l)),l}function Up(i,t,e,n){let{_proxy:r,_context:s,_subProxy:o,_descriptors:a}=e;if(typeof s.index<"u"&&n(i))return t[s.index%t.length];if(F(t[0])){let l=t,c=r._scopes.filter(u=>u!==l);t=[];for(let u of l){let d=Rs(c,r,i,u);t.push(xt(d,s,o&&o[i],a))}}return t}function Ic(i,t,e){return Ke(i)?i(t,e):i}var Gp=(i,t)=>i===!0?t:typeof i=="string"?Je(t,i):void 0;function Hp(i,t,e,n,r){for(let s of t){let o=Gp(e,s);if(o){i.add(o);let a=Ic(o._fallback,e,r);if(typeof a<"u"&&a!==e&&a!==n)return a}else if(o===!1&&typeof n<"u"&&e!==n)return null}return!1}function Rs(i,t,e,n){let r=t._rootScopes,s=Ic(t._fallback,e,n),o=[...i,...r],a=new Set;a.add(n);let l=ec(a,o,e,s||e,n);return l===null||typeof s<"u"&&s!==e&&(l=ec(a,o,s,l,n),l===null)?!1:Wn(Array.from(a),[""],r,s,()=>Yp(t,e,n))}function ec(i,t,e,n,r){for(;e;)e=Hp(i,t,e,n,r);return e}function Yp(i,t,e){let n=i._getTarget();t in n||(n[t]={});let r=n[t];return J(r)&&F(e)?e:r||{}}function qp(i,t,e,n){let r;for(let s of t)if(r=Ac(Fp(s,i),e),typeof r<"u")return Ls(i,r)?Rs(e,n,i,r):r}function Ac(i,t){for(let e of t){if(!e)continue;let n=e[i];if(typeof n<"u")return n}}function tc(i){let t=i._keys;return t||(t=i._keys=Kp(i._scopes)),t}function Kp(i){let t=new Set;for(let e of i)for(let n of Object.keys(e).filter(r=>!r.startsWith("_")))t.add(n);return Array.from(t)}function Fs(i,t,e,n){let{iScale:r}=i,{key:s="r"}=this._parsing,o=new Array(n),a,l,c,u;for(a=0,l=n;ati==="x"?"y":"x";function Jp(i,t,e,n){let r=i.skip?t:i,s=t,o=e.skip?t:e,a=zn(s,r),l=zn(o,s),c=a/(a+l),u=l/(a+l);c=isNaN(c)?0:c,u=isNaN(u)?0:u;let d=n*c,h=n*u;return{previous:{x:s.x-d*(o.x-r.x),y:s.y-d*(o.y-r.y)},next:{x:s.x+h*(o.x-r.x),y:s.y+h*(o.y-r.y)}}}function Wp(i,t,e){let n=i.length,r,s,o,a,l,c=Bt(i,0);for(let u=0;u!c.skip)),t.cubicInterpolationMode==="monotone")Xp(i,r);else{let c=n?i[i.length-1]:i[0];for(s=0,o=i.length;si.ownerDocument.defaultView.getComputedStyle(i,null);function jp(i,t){return Zn(i).getPropertyValue(t)}var em=["top","right","bottom","left"];function vt(i,t,e){let n={};e=e?"-"+e:"";for(let r=0;r<4;r++){let s=em[r];n[s]=parseFloat(i[t+"-"+s+e])||0}return n.width=n.left+n.right,n.height=n.top+n.bottom,n}var tm=(i,t,e)=>(i>0||t>0)&&(!e||!e.shadowRoot);function im(i,t){let e=i.touches,n=e&&e.length?e[0]:i,{offsetX:r,offsetY:s}=n,o=!1,a,l;if(tm(r,s,i.target))a=r,l=s;else{let c=t.getBoundingClientRect();a=n.clientX-c.left,l=n.clientY-c.top,o=!0}return{x:a,y:l,box:o}}function lt(i,t){if("native"in i)return i;let{canvas:e,currentDevicePixelRatio:n}=t,r=Zn(e),s=r.boxSizing==="border-box",o=vt(r,"padding"),a=vt(r,"border","width"),{x:l,y:c,box:u}=im(i,e),d=o.left+(u&&a.left),h=o.top+(u&&a.top),{width:m,height:g}=t;return s&&(m-=o.width+a.width,g-=o.height+a.height),{x:Math.round((l-d)/m*e.width/n),y:Math.round((c-h)/g*e.height/n)}}function nm(i,t,e){let n,r;if(t===void 0||e===void 0){let s=i&&Xn(i);if(!s)t=i.clientWidth,e=i.clientHeight;else{let o=s.getBoundingClientRect(),a=Zn(s),l=vt(a,"border","width"),c=vt(a,"padding");t=o.width-c.width-l.width,e=o.height-c.height-l.height,n=Un(a.maxWidth,s,"clientWidth"),r=Un(a.maxHeight,s,"clientHeight")}}return{width:t,height:e,maxWidth:n||Vn,maxHeight:r||Vn}}var Ln=i=>Math.round(i*10)/10;function Oc(i,t,e,n){let r=Zn(i),s=vt(r,"margin"),o=Un(r.maxWidth,i,"clientWidth")||Vn,a=Un(r.maxHeight,i,"clientHeight")||Vn,l=nm(i,t,e),{width:c,height:u}=l;if(r.boxSizing==="content-box"){let h=vt(r,"border","width"),m=vt(r,"padding");c-=m.width+h.width,u-=m.height+h.height}return c=Math.max(0,c-s.width),u=Math.max(0,n?c/n:u-s.height),c=Ln(Math.min(c,o,l.maxWidth)),u=Ln(Math.min(u,a,l.maxHeight)),c&&!u&&(u=Ln(c/2)),(t!==void 0||e!==void 0)&&n&&l.height&&u>l.height&&(u=l.height,c=Ln(Math.floor(u*n))),{width:c,height:u}}function Vs(i,t,e){let n=t||1,r=Math.floor(i.height*n),s=Math.floor(i.width*n);i.height=Math.floor(i.height),i.width=Math.floor(i.width);let o=i.canvas;return o.style&&(e||!o.style.height&&!o.style.width)&&(o.style.height=`${i.height}px`,o.style.width=`${i.width}px`),i.currentDevicePixelRatio!==n||o.height!==r||o.width!==s?(i.currentDevicePixelRatio=n,o.height=r,o.width=s,i.ctx.setTransform(n,0,0,n,0,0),!0):!1}var Ec=(function(){let i=!1;try{let t={get passive(){return i=!0,!1}};$n()&&(window.addEventListener("test",null,t),window.removeEventListener("test",null,t))}catch{}return i})();function zs(i,t){let e=jp(i,t),n=e&&e.match(/^(\d+)(\.\d+)?px$/);return n?+n[1]:void 0}function nt(i,t,e,n){return{x:i.x+e*(t.x-i.x),y:i.y+e*(t.y-i.y)}}function Pc(i,t,e,n){return{x:i.x+e*(t.x-i.x),y:n==="middle"?e<.5?i.y:t.y:n==="after"?e<1?i.y:t.y:e>0?t.y:i.y}}function Tc(i,t,e,n){let r={x:i.cp2x,y:i.cp2y},s={x:t.cp1x,y:t.cp1y},o=nt(i,r,e),a=nt(r,s,e),l=nt(s,t,e),c=nt(o,a,e),u=nt(a,l,e);return nt(c,u,e)}var rm=function(i,t){return{x(e){return i+i+t-e},setWidth(e){t=e},textAlign(e){return e==="center"?e:e==="right"?"left":"right"},xPlus(e,n){return e-n},leftForLtr(e,n){return e-n}}},sm=function(){return{x(i){return i},setWidth(i){},textAlign(i){return i},xPlus(i,t){return i+t},leftForLtr(i,t){return i}}};function St(i,t,e){return i?rm(t,e):sm()}function Us(i,t){let e,n;(t==="ltr"||t==="rtl")&&(e=i.canvas.style,n=[e.getPropertyValue("direction"),e.getPropertyPriority("direction")],e.setProperty("direction",t,"important"),i.prevTextDirection=n)}function Gs(i,t){t!==void 0&&(delete i.prevTextDirection,i.canvas.style.setProperty("direction",t[0],t[1]))}function Mc(i){return i==="angle"?{between:Vt,compare:bp,normalize:he}:{between:ze,compare:(t,e)=>t-e,normalize:t=>t}}function ic({start:i,end:t,count:e,loop:n,style:r}){return{start:i%e,end:t%e,loop:n&&(t-i+1)%e===0,style:r}}function om(i,t,e){let{property:n,start:r,end:s}=e,{between:o,normalize:a}=Mc(n),l=t.length,{start:c,end:u,loop:d}=i,h,m;if(d){for(c+=l,u+=l,h=0,m=l;hl(r,v,f)&&a(r,v)!==0,y=()=>a(s,f)===0||l(s,v,f),b=()=>_||x(),A=()=>!_||y();for(let S=u,D=u;S<=d;++S)C=t[S%o],!C.skip&&(f=c(C[n]),f!==v&&(_=l(f,r,s),p===null&&b()&&(p=a(f,r)===0?S:D),p!==null&&A()&&(g.push(ic({start:p,end:S,loop:h,count:o,style:m})),p=null),D=S,v=f));return p!==null&&g.push(ic({start:p,end:d,loop:h,count:o,style:m})),g}function Ys(i,t){let e=[],n=i.segments;for(let r=0;rr&&i[s%t].skip;)s--;return s%=t,{start:r,end:s}}function lm(i,t,e,n){let r=i.length,s=[],o=t,a=i[t],l;for(l=t+1;l<=e;++l){let c=i[l%r];c.skip||c.stop?a.skip||(n=!1,s.push({start:t%r,end:(l-1)%r,loop:n}),t=o=c.stop?l:null):(o=l,a.skip&&(t=l)),a=c}return o!==null&&s.push({start:t%r,end:o%r,loop:n}),s}function kc(i,t){let e=i.points,n=i.options.spanGaps,r=e.length;if(!r)return[];let s=!!i._loop,{start:o,end:a}=am(e,r,s,n);if(n===!0)return nc(i,[{start:o,end:a,loop:s}],e,t);let l=aa({chart:t,initial:e.initial,numSteps:o,currentStep:Math.min(n-e.start,o)}))}_refresh(){this._request||(this._running=!0,this._request=ws.call(window,()=>{this._update(),this._request=null,this._running&&this._refresh()}))}_update(t=Date.now()){let e=0;this._charts.forEach((n,r)=>{if(!n.running||!n.items.length)return;let s=n.items,o=s.length-1,a=!1,l;for(;o>=0;--o)l=s[o],l._active?(l._total>n.duration&&(n.duration=l._total),l.tick(t),a=!0):(s[o]=s[s.length-1],s.pop());a&&(r.draw(),this._notify(r,n,t,"progress")),s.length||(n.running=!1,this._notify(r,n,t,"complete"),n.initial=!1),e+=s.length}),this._lastDate=t,e===0&&(this._running=!1)}_getAnims(t){let e=this._charts,n=e.get(t);return n||(n={running:!1,initial:!0,items:[],listeners:{complete:[],progress:[]}},e.set(t,n)),n}listen(t,e,n){this._getAnims(t).listeners[e].push(n)}add(t,e){!e||!e.length||this._getAnims(t).items.push(...e)}has(t){return this._getAnims(t).items.length>0}start(t){let e=this._charts.get(t);e&&(e.running=!0,e.start=Date.now(),e.duration=e.items.reduce((n,r)=>Math.max(n,r._duration),0),this._refresh())}running(t){if(!this._running)return!1;let e=this._charts.get(t);return!(!e||!e.running||!e.items.length)}stop(t){let e=this._charts.get(t);if(!e||!e.items.length)return;let n=e.items,r=n.length-1;for(;r>=0;--r)n[r].cancel();e.items=[],this._notify(t,e,Date.now(),"complete")}remove(t){return this._charts.delete(t)}},$e=new no,Nc="transparent",hm={boolean(i,t,e){return e>.5?t:i},color(i,t,e){let n=Ts(i||Nc),r=n.valid&&Ts(t||Nc);return r&&r.valid?r.mix(n,e).hexString():t},number(i,t,e){return i+(t-i)*e}},ro=class{constructor(t,e,n,r){let s=e[n];r=Gt([t.to,r,s,t.from]);let o=Gt([t.from,s,r]);this._active=!0,this._fn=t.fn||hm[t.type||typeof o],this._easing=kt[t.easing]||kt.linear,this._start=Math.floor(Date.now()+(t.delay||0)),this._duration=this._total=Math.floor(t.duration),this._loop=!!t.loop,this._target=e,this._prop=n,this._from=o,this._to=r,this._promises=void 0}active(){return this._active}update(t,e,n){if(this._active){this._notify(!1);let r=this._target[this._prop],s=n-this._start,o=this._duration-s;this._start=n,this._duration=Math.floor(Math.max(o,t.duration)),this._total+=s,this._loop=!!t.loop,this._to=Gt([t.to,e,r,t.from]),this._from=Gt([t.from,r,e])}}cancel(){this._active&&(this.tick(Date.now()),this._active=!1,this._notify(!1))}tick(t){let e=t-this._start,n=this._duration,r=this._prop,s=this._from,o=this._loop,a=this._to,l;if(this._active=s!==a&&(o||e1?2-l:l,l=this._easing(Math.min(1,Math.max(0,l))),this._target[r]=this._fn(s,a,l)}wait(){let t=this._promises||(this._promises=[]);return new Promise((e,n)=>{t.push({res:e,rej:n})})}_notify(t){let e=t?"res":"rej",n=this._promises||[];for(let r=0;r{let s=t[r];if(!F(s))return;let o={};for(let a of e)o[a]=s[a];(J(s.properties)&&s.properties||[r]).forEach(a=>{(a===r||!n.has(a))&&n.set(a,o)})})}_animateOptions(t,e){let n=e.options,r=mm(t,n);if(!r)return[];let s=this._createAnimations(r,n);return n.$shared&&pm(t.options.$animations,n).then(()=>{t.options=n},()=>{}),s}_createAnimations(t,e){let n=this._properties,r=[],s=t.$animations||(t.$animations={}),o=Object.keys(e),a=Date.now(),l;for(l=o.length-1;l>=0;--l){let c=o[l];if(c.charAt(0)==="$")continue;if(c==="options"){r.push(...this._animateOptions(t,e));continue}let u=e[c],d=s[c],h=n.get(c);if(d)if(h&&d.active()){d.update(h,u,a);continue}else d.cancel();if(!h||!h.duration){t[c]=u;continue}s[c]=d=new ro(h,t,c,u),r.push(d)}return r}update(t,e){if(this._properties.size===0){Object.assign(t,e);return}let n=this._createAnimations(t,e);if(n.length)return $e.add(this._chart,n),!0}};function pm(i,t){let e=[],n=Object.keys(t);for(let r=0;r0||!e&&s<0)return r.index}return null}function Fc(i,t){let{chart:e,_cachedMeta:n}=i,r=e._stacks||(e._stacks={}),{iScale:s,vScale:o,index:a}=n,l=s.axis,c=o.axis,u=Cm(s,o,n),d=t.length,h;for(let m=0;me[n].axis===t).shift()}function xm(i,t){return We(i,{active:!1,dataset:void 0,datasetIndex:t,index:t,mode:"default",type:"dataset"})}function bm(i,t,e){return We(i,{active:!1,dataIndex:t,parsed:void 0,raw:void 0,element:e,index:t,mode:"default",type:"data"})}function xi(i,t){let e=i.controller.index,n=i.vScale&&i.vScale.axis;if(n){t=t||i._parsed;for(let r of t){let s=r._stacks;if(!s||s[n]===void 0||s[n][e]===void 0)return;delete s[n][e],s[n]._visualValues!==void 0&&s[n]._visualValues[e]!==void 0&&delete s[n]._visualValues[e]}}}var Js=i=>i==="reset"||i==="none",Vc=(i,t)=>t?i:Object.assign({},i),Sm=(i,t,e)=>i&&!t.hidden&&t._stacked&&{keys:Nu(e,!0),values:null},ut=(()=>{class i{static defaults={};static datasetElementType=null;static dataElementType=null;constructor(e,n){this.chart=e,this._ctx=e.ctx,this.index=n,this._cachedDataOpts={},this._cachedMeta=this.getMeta(),this._type=this._cachedMeta.type,this.options=void 0,this._parsing=!1,this._data=void 0,this._objectData=void 0,this._sharedOptions=void 0,this._drawStart=void 0,this._drawCount=void 0,this.enableOptionSharing=!1,this.supportsDecimation=!1,this.$context=void 0,this._syncList=[],this.datasetElementType=new.target.datasetElementType,this.dataElementType=new.target.dataElementType,this.initialize()}initialize(){let e=this._cachedMeta;this.configure(),this.linkScales(),e._stacked=Ks(e.vScale,e),this.addElements(),this.options.fill&&!this.chart.isPluginEnabled("filler")&&console.warn("Tried to use the 'fill' option without the 'Filler' plugin enabled. Please import and register the 'Filler' plugin and make sure it is not disabled in the options")}updateIndex(e){this.index!==e&&xi(this._cachedMeta),this.index=e}linkScales(){let e=this.chart,n=this._cachedMeta,r=this.getDataset(),s=(h,m,g,_)=>h==="x"?m:h==="r"?_:g,o=n.xAxisID=B(r.xAxisID,Qs(e,"x")),a=n.yAxisID=B(r.yAxisID,Qs(e,"y")),l=n.rAxisID=B(r.rAxisID,Qs(e,"r")),c=n.indexAxis,u=n.iAxisID=s(c,o,a,l),d=n.vAxisID=s(c,a,o,l);n.xScale=this.getScaleForId(o),n.yScale=this.getScaleForId(a),n.rScale=this.getScaleForId(l),n.iScale=this.getScaleForId(u),n.vScale=this.getScaleForId(d)}getDataset(){return this.chart.data.datasets[this.index]}getMeta(){return this.chart.getDatasetMeta(this.index)}getScaleForId(e){return this.chart.scales[e]}_getOtherScale(e){let n=this._cachedMeta;return e===n.iScale?n.vScale:n.iScale}reset(){this._update("reset")}_destroy(){let e=this._cachedMeta;this._data&&Is(this._data,this),e._stacked&&xi(e)}_dataCheck(){let e=this.getDataset(),n=e.data||(e.data=[]),r=this._data;if(F(n)){let s=this._cachedMeta;this._data=_m(n,s)}else if(r!==n){if(r){Is(r,this);let s=this._cachedMeta;xi(s),s._parsed=[]}n&&Object.isExtensible(n)&&fc(n,this),this._syncList=[],this._data=n}}addElements(){let e=this._cachedMeta;this._dataCheck(),this.datasetElementType&&(e.dataset=new this.datasetElementType)}buildOrUpdateElements(e){let n=this._cachedMeta,r=this.getDataset(),s=!1;this._dataCheck();let o=n._stacked;n._stacked=Ks(n.vScale,n),n.stack!==r.stack&&(s=!0,xi(n),n.stack=r.stack),this._resyncElements(e),(s||o!==n._stacked)&&(Fc(this,n._parsed),n._stacked=Ks(n.vScale,n))}configure(){let e=this.chart.config,n=e.datasetScopeKeys(this._type),r=e.getOptionScopes(this.getDataset(),n,!0);this.options=e.createResolver(r,this.getContext()),this._parsing=this.options.parsing,this._cachedDataOpts={}}parse(e,n){let{_cachedMeta:r,_data:s}=this,{iScale:o,_stacked:a}=r,l=o.axis,c=e===0&&n===s.length?!0:r._sorted,u=e>0&&r._parsed[e-1],d,h,m;if(this._parsing===!1)r._parsed=s,r._sorted=!0,m=s;else{J(s[e])?m=this.parseArrayData(r,s,e,n):F(s[e])?m=this.parseObjectData(r,s,e,n):m=this.parsePrimitiveData(r,s,e,n);let g=()=>h[l]===null||u&&h[l]p||h=0;--m)if(!_()){this.updateRangeFromParsed(u,e,g,c);break}}return u}getAllParsedValues(e){let n=this._cachedMeta._parsed,r=[],s,o,a;for(s=0,o=n.length;s=0&&ethis.getContext(r,s,n),p=u.resolveNamedOptions(m,g,_,h);return p.$shared&&(p.$shared=c,o[a]=Object.freeze(Vc(p,c))),p}_resolveAnimations(e,n,r){let s=this.chart,o=this._cachedDataOpts,a=`animation-${n}`,l=o[a];if(l)return l;let c;if(s.options.animation!==!1){let d=this.chart.config,h=d.datasetAnimationScopeKeys(this._type,n),m=d.getOptionScopes(this.getDataset(),h);c=d.createResolver(m,this.getContext(e,r,n))}let u=new ar(s,c&&c.animations);return c&&c._cacheable&&(o[a]=Object.freeze(u)),u}getSharedOptions(e){if(e.$shared)return this._sharedOptions||(this._sharedOptions=Object.assign({},e))}includeOptions(e,n){return!n||Js(e)||this.chart._animationsDisabled}_getSharedOptions(e,n){let r=this.resolveDataElementOptions(e,n),s=this._sharedOptions,o=this.getSharedOptions(r),a=this.includeOptions(n,o)||o!==s;return this.updateSharedOptions(o,n,r),{sharedOptions:o,includeOptions:a}}updateElement(e,n,r,s){Js(s)?Object.assign(e,r):this._resolveAnimations(n,s).update(e,r)}updateSharedOptions(e,n,r){e&&!Js(n)&&this._resolveAnimations(void 0,n).update(e,r)}_setStyle(e,n,r,s){e.active=s;let o=this.getStyle(n,s);this._resolveAnimations(n,r,s).update(e,{options:!s&&this.getSharedOptions(o)||o})}removeHoverStyle(e,n,r){this._setStyle(e,r,"active",!1)}setHoverStyle(e,n,r){this._setStyle(e,r,"active",!0)}_removeDatasetHoverStyle(){let e=this._cachedMeta.dataset;e&&this._setStyle(e,void 0,"active",!1)}_setDatasetHoverStyle(){let e=this._cachedMeta.dataset;e&&this._setStyle(e,void 0,"active",!0)}_resyncElements(e){let n=this._data,r=this._cachedMeta.data;for(let[l,c,u]of this._syncList)this[l](c,u);this._syncList=[];let s=r.length,o=n.length,a=Math.min(o,s);a&&this.parse(0,a),o>s?this._insertElements(s,o-s,e):o{for(u.length+=n,l=u.length-1;l>=a;l--)u[l]=u[l-n]};for(c(o),l=e;lr-s))}return i._cache.$bar}function Am(i){let t=i.iScale,e=Im(t,i.type),n=t._length,r,s,o,a,l=()=>{o===32767||o===-32768||(Rt(a)&&(n=Math.min(n,Math.abs(o-a)||n)),a=o)};for(r=0,s=e.length;r0?r[i-1]:null,a=iMath.abs(a)&&(l=a,c=o),t[e.axis]=c,t._custom={barStart:l,barEnd:c,start:r,end:s,min:o,max:a}}function Bu(i,t,e,n){return J(i)?Om(i,t,e,n):t[e.axis]=e.parse(i,n),t}function zc(i,t,e,n){let r=i.iScale,s=i.vScale,o=r.getLabels(),a=r===s,l=[],c,u,d,h;for(c=e,u=e+n;c=e?1:-1)}function Pm(i){let t,e,n,r,s;return i.horizontal?(t=i.base>i.x,e="left",n="right"):(t=i.base{class i extends ut{static id="bar";static defaults={datasetElementType:!1,dataElementType:"bar",categoryPercentage:.8,barPercentage:.9,grouped:!0,animations:{numbers:{type:"number",properties:["x","y","base","width","height"]}}};static overrides={scales:{_index_:{type:"category",offset:!0,grid:{offset:!0}},_value_:{type:"linear",beginAtZero:!0}}};parsePrimitiveData(e,n,r,s){return zc(e,n,r,s)}parseArrayData(e,n,r,s){return zc(e,n,r,s)}parseObjectData(e,n,r,s){let{iScale:o,vScale:a}=e,{xAxisKey:l="x",yAxisKey:c="y"}=this._parsing,u=o.axis==="x"?l:c,d=a.axis==="x"?l:c,h=[],m,g,_,p;for(m=r,g=r+s;md.controller.options.grouped),o=r.options.stacked,a=[],l=this._cachedMeta.controller.getParsed(n),c=l&&l[r.axis],u=d=>{let h=d._parsed.find(g=>g[r.axis]===c),m=h&&h[d.vScale.axis];if(R(m)||isNaN(m))return!0};for(let d of s)if(!(n!==void 0&&u(d))&&((o===!1||a.indexOf(d.stack)===-1||o===void 0&&d.stack===void 0)&&a.push(d.stack),d.index===e))break;return a.length||a.push(void 0),a}_getStackCount(e){return this._getStacks(void 0,e).length}_getAxisCount(){return this._getAxis().length}getFirstScaleIdForIndexAxis(){let e=this.chart.scales,n=this.chart.options.indexAxis;return Object.keys(e).filter(r=>e[r].axis===n).shift()}_getAxis(){let e={},n=this.getFirstScaleIdForIndexAxis();for(let r of this.chart.data.datasets)e[B(this.chart.options.indexAxis==="x"?r.xAxisID:r.yAxisID,n)]=!0;return Object.keys(e)}_getStackIndex(e,n,r){let s=this._getStacks(e,r),o=n!==void 0?s.indexOf(n):-1;return o===-1?s.length-1:o}_getRuler(){let e=this.options,n=this._cachedMeta,r=n.iScale,s=[],o,a;for(o=0,a=n.data.length;o{class i extends ut{static id="bubble";static defaults={datasetElementType:!1,dataElementType:"point",animations:{numbers:{type:"number",properties:["x","y","borderWidth","radius"]}}};static overrides={scales:{x:{type:"linear"},y:{type:"linear"}}};initialize(){this.enableOptionSharing=!0,super.initialize()}parsePrimitiveData(e,n,r,s){let o=super.parsePrimitiveData(e,n,r,s);for(let a=0;a=0;--r)n=Math.max(n,e[r].size(this.resolveDataElementOptions(r))/2);return n>0&&n}getLabelAndValue(e){let n=this._cachedMeta,r=this.chart.data.labels||[],{xScale:s,yScale:o}=n,a=this.getParsed(e),l=s.getLabelForValue(a.x),c=o.getLabelForValue(a.y),u=a._custom;return{label:r[e]||"",value:"("+l+", "+c+(u?", "+u:"")+")"}}update(e){let n=this._cachedMeta.data;this.updateElements(n,0,n.length,e)}updateElements(e,n,r,s){let o=s==="reset",{iScale:a,vScale:l}=this._cachedMeta,{sharedOptions:c,includeOptions:u}=this._getSharedOptions(n,s),d=a.axis,h=l.axis;for(let m=n;mVt(v,a,l,!0)?1:Math.max(x,x*e,y,y*e),g=(v,x,y)=>Vt(v,a,l,!0)?-1:Math.min(x,x*e,y,y*e),_=m(0,c,d),p=m(ie,u,h),f=g(H,c,d),C=g(H+ie,u,h);n=(_-f)/2,r=(p-C)/2,s=-(_+f)/2,o=-(p+C)/2}return{ratioX:n,ratioY:r,offsetX:s,offsetY:o}}var Ao=(()=>{class i extends ut{static id="doughnut";static defaults={datasetElementType:!1,dataElementType:"arc",animation:{animateRotate:!0,animateScale:!1},animations:{numbers:{type:"number",properties:["circumference","endAngle","innerRadius","outerRadius","startAngle","x","y","offset","borderWidth","spacing"]}},cutout:"50%",rotation:0,circumference:360,radius:"100%",spacing:0,indexAxis:"r"};static descriptors={_scriptable:e=>e!=="spacing",_indexable:e=>e!=="spacing"&&!e.startsWith("borderDash")&&!e.startsWith("hoverBorderDash")};static overrides={aspectRatio:1,plugins:{legend:{labels:{generateLabels(e){let n=e.data;if(n.labels.length&&n.datasets.length){let{labels:{pointStyle:r,color:s}}=e.legend.options;return n.labels.map((o,a)=>{let c=e.getDatasetMeta(0).controller.getStyle(a);return{text:o,fillStyle:c.backgroundColor,strokeStyle:c.borderColor,fontColor:s,lineWidth:c.borderWidth,pointStyle:r,hidden:!e.getDataVisibility(a),index:a}})}return[]}},onClick(e,n,r){r.chart.toggleDataVisibility(n.index),r.chart.update()}}}};constructor(e,n){super(e,n),this.enableOptionSharing=!0,this.innerRadius=void 0,this.outerRadius=void 0,this.offsetX=void 0,this.offsetY=void 0}linkScales(){}parse(e,n){let r=this.getDataset().data,s=this._cachedMeta;if(this._parsing===!1)s._parsed=r;else{let o=c=>+r[c];if(F(r[e])){let{key:c="value"}=this._parsing;o=u=>+Je(r[u],c)}let a,l;for(a=e,l=e+n;a0&&!isNaN(e)?W*(Math.abs(e)/n):0}getLabelAndValue(e){let n=this._cachedMeta,r=this.chart,s=r.data.labels||[],o=zt(n._parsed[e],r.options.locale);return{label:s[e]||"",value:o}}getMaxBorderWidth(e){let n=0,r=this.chart,s,o,a,l,c;if(!e){for(s=0,o=r.data.datasets.length;s{class i extends ut{static id="line";static defaults={datasetElementType:"line",dataElementType:"point",showLine:!0,spanGaps:!1};static overrides={scales:{_index_:{type:"category"},_value_:{type:"linear"}}};initialize(){this.enableOptionSharing=!0,this.supportsDecimation=!0,super.initialize()}update(e){let n=this._cachedMeta,{dataset:r,data:s=[],_dataset:o}=n,a=this.chart._animationsDisabled,{start:l,count:c}=Os(n,s,a);this._drawStart=l,this._drawCount=c,Es(n)&&(l=0,c=s.length),r._chart=this.chart,r._datasetIndex=this.index,r._decimated=!!o._decimated,r.points=s;let u=this.resolveDatasetElementOptions(e);this.options.showLine||(u.borderWidth=0),u.segment=this.options.segment,this.updateElement(r,void 0,{animated:!a,options:u},e),this.updateElements(s,l,c,e)}updateElements(e,n,r,s){let o=s==="reset",{iScale:a,vScale:l,_stacked:c,_dataset:u}=this._cachedMeta,{sharedOptions:d,includeOptions:h}=this._getSharedOptions(n,s),m=a.axis,g=l.axis,{spanGaps:_,segment:p}=this.options,f=bt(_)?_:Number.POSITIVE_INFINITY,C=this.chart._animationsDisabled||o||s==="none",v=n+r,x=e.length,y=n>0&&this.getParsed(n-1);for(let b=0;b=v){S.skip=!0;continue}let D=this.getParsed(b),T=R(D[g]),E=S[m]=a.getPixelForValue(D[m],b),k=S[g]=o||T?l.getBasePixel():l.getPixelForValue(c?this.applyStack(l,D,c):D[g],b);S.skip=isNaN(E)||isNaN(k)||T,S.stop=b>0&&Math.abs(D[m]-y[m])>f,p&&(S.parsed=D,S.raw=u.data[b]),h&&(S.options=d||this.resolveDataElementOptions(b,A.active?"active":s)),C||this.updateElement(A,b,S,s),y=D}}getMaxOverflow(){let e=this._cachedMeta,n=e.dataset,r=n.options&&n.options.borderWidth||0,s=e.data||[];if(!s.length)return r;let o=s[0].size(this.resolveDataElementOptions(0)),a=s[s.length-1].size(this.resolveDataElementOptions(s.length-1));return Math.max(r,o,a)/2}draw(){let e=this._cachedMeta;e.dataset.updateControlPoints(this.chart.chartArea,e.iScale.axis),super.draw()}}return i})(),Lu=(()=>{class i extends ut{static id="polarArea";static defaults={dataElementType:"arc",animation:{animateRotate:!0,animateScale:!0},animations:{numbers:{type:"number",properties:["x","y","startAngle","endAngle","innerRadius","outerRadius"]}},indexAxis:"r",startAngle:0};static overrides={aspectRatio:1,plugins:{legend:{labels:{generateLabels(e){let n=e.data;if(n.labels.length&&n.datasets.length){let{labels:{pointStyle:r,color:s}}=e.legend.options;return n.labels.map((o,a)=>{let c=e.getDatasetMeta(0).controller.getStyle(a);return{text:o,fillStyle:c.backgroundColor,strokeStyle:c.borderColor,fontColor:s,lineWidth:c.borderWidth,pointStyle:r,hidden:!e.getDataVisibility(a),index:a}})}return[]}},onClick(e,n,r){r.chart.toggleDataVisibility(n.index),r.chart.update()}}},scales:{r:{type:"radialLinear",angleLines:{display:!1},beginAtZero:!0,grid:{circular:!0},pointLabels:{display:!1},startAngle:0}}};constructor(e,n){super(e,n),this.innerRadius=void 0,this.outerRadius=void 0}getLabelAndValue(e){let n=this._cachedMeta,r=this.chart,s=r.data.labels||[],o=zt(n._parsed[e].r,r.options.locale);return{label:s[e]||"",value:o}}parseObjectData(e,n,r,s){return Fs.bind(this)(e,n,r,s)}update(e){let n=this._cachedMeta.data;this._updateRadius(),this.updateElements(n,0,n.length,e)}getMinMax(){let e=this._cachedMeta,n={min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY};return e.data.forEach((r,s)=>{let o=this.getParsed(s).r;!isNaN(o)&&this.chart.getDataVisibility(s)&&(on.max&&(n.max=o))}),n}_updateRadius(){let e=this.chart,n=e.chartArea,r=e.options,s=Math.min(n.right-n.left,n.bottom-n.top),o=Math.max(s/2,0),a=Math.max(r.cutoutPercentage?o/100*r.cutoutPercentage:1,0),l=(o-a)/e.getVisibleDatasetCount();this.outerRadius=o-l*this.index,this.innerRadius=this.outerRadius-l}updateElements(e,n,r,s){let o=s==="reset",a=this.chart,c=a.options.animation,u=this._cachedMeta.rScale,d=u.xCenter,h=u.yCenter,m=u.getIndexAngle(0)-.5*H,g=m,_,p=360/this.countVisibleElements();for(_=0;_{!isNaN(this.getParsed(s).r)&&this.chart.getDataVisibility(s)&&n++}),n}_computeAngle(e,n,r){return this.chart.getDataVisibility(e)?Te(this.resolveDataElementOptions(e,n).angle||r):0}}return i})(),Fm=(()=>{class i extends Ao{static id="pie";static defaults={cutout:0,rotation:0,circumference:360,radius:"100%"}}return i})(),Vm=(()=>{class i extends ut{static id="radar";static defaults={datasetElementType:"line",dataElementType:"point",indexAxis:"r",showLine:!0,elements:{line:{fill:"start"}}};static overrides={aspectRatio:1,scales:{r:{type:"radialLinear"}}};getLabelAndValue(e){let n=this._cachedMeta.vScale,r=this.getParsed(e);return{label:n.getLabels()[e],value:""+n.getLabelForValue(r[n.axis])}}parseObjectData(e,n,r,s){return Fs.bind(this)(e,n,r,s)}update(e){let n=this._cachedMeta,r=n.dataset,s=n.data||[],o=n.iScale.getLabels();if(r.points=s,e!=="resize"){let a=this.resolveDatasetElementOptions(e);this.options.showLine||(a.borderWidth=0);let l={_loop:!0,_fullLoop:o.length===s.length,options:a};this.updateElement(r,void 0,l,e)}this.updateElements(s,0,s.length,e)}updateElements(e,n,r,s){let o=this._cachedMeta.rScale,a=s==="reset";for(let l=n;l{class i extends ut{static id="scatter";static defaults={datasetElementType:!1,dataElementType:"point",showLine:!1,fill:!1};static overrides={interaction:{mode:"point"},scales:{x:{type:"linear"},y:{type:"linear"}}};getLabelAndValue(e){let n=this._cachedMeta,r=this.chart.data.labels||[],{xScale:s,yScale:o}=n,a=this.getParsed(e),l=s.getLabelForValue(a.x),c=o.getLabelForValue(a.y);return{label:r[e]||"",value:"("+l+", "+c+")"}}update(e){let n=this._cachedMeta,{data:r=[]}=n,s=this.chart._animationsDisabled,{start:o,count:a}=Os(n,r,s);if(this._drawStart=o,this._drawCount=a,Es(n)&&(o=0,a=r.length),this.options.showLine){this.datasetElementType||this.addElements();let{dataset:l,_dataset:c}=n;l._chart=this.chart,l._datasetIndex=this.index,l._decimated=!!c._decimated,l.points=r;let u=this.resolveDatasetElementOptions(e);u.segment=this.options.segment,this.updateElement(l,void 0,{animated:!s,options:u},e)}else this.datasetElementType&&(delete n.dataset,this.datasetElementType=!1);this.updateElements(r,o,a,e)}addElements(){let{showLine:e}=this.options;!this.datasetElementType&&e&&(this.datasetElementType=this.chart.registry.getElement("line")),super.addElements()}updateElements(e,n,r,s){let o=s==="reset",{iScale:a,vScale:l,_stacked:c,_dataset:u}=this._cachedMeta,d=this.resolveDataElementOptions(n,s),h=this.getSharedOptions(d),m=this.includeOptions(s,h),g=a.axis,_=l.axis,{spanGaps:p,segment:f}=this.options,C=bt(p)?p:Number.POSITIVE_INFINITY,v=this.chart._animationsDisabled||o||s==="none",x=n>0&&this.getParsed(n-1);for(let y=n;y0&&Math.abs(A[g]-x[g])>C,f&&(S.parsed=A,S.raw=u.data[y]),m&&(S.options=h||this.resolveDataElementOptions(y,b.active?"active":s)),v||this.updateElement(b,y,S,s),x=A}this.updateSharedOptions(h,s,d)}getMaxOverflow(){let e=this._cachedMeta,n=e.data||[];if(!this.options.showLine){let l=0;for(let c=n.length-1;c>=0;--c)l=Math.max(l,n[c].size(this.resolveDataElementOptions(c))/2);return l>0&&l}let r=e.dataset,s=r.options&&r.options.borderWidth||0;if(!n.length)return s;let o=n[0].size(this.resolveDataElementOptions(0)),a=n[n.length-1].size(this.resolveDataElementOptions(n.length-1));return Math.max(s,o,a)/2}}return i})(),Um=Object.freeze({__proto__:null,BarController:Nm,BubbleController:Bm,DoughnutController:Ao,LineController:Rm,PieController:Fm,PolarAreaController:Lu,RadarController:Vm,ScatterController:zm});function It(){throw new Error("This method is not implemented: Check that a complete date adapter is provided.")}var so=class i{static override(t){Object.assign(i.prototype,t)}options;constructor(t){this.options=t||{}}init(){}formats(){return It()}parse(){return It()}format(){return It()}add(){return It()}diff(){return It()}startOf(){return It()}endOf(){return It()}},Gm={_date:so};function Hm(i,t,e,n){let{controller:r,data:s,_sorted:o}=i,a=r._cachedMeta.iScale,l=i.dataset&&i.dataset.options?i.dataset.options.spanGaps:null;if(a&&t===a.axis&&t!=="r"&&o&&s.length){let c=a._reversePixels?hc:Re;if(n){if(r._sharedOptions){let u=s[0],d=typeof u.getRange=="function"&&u.getRange(t);if(d){let h=c(s,t,e-d),m=c(s,t,e+d);return{lo:h.lo,hi:m.hi}}}}else{let u=c(s,t,e);if(l){let{vScale:d}=r._cachedMeta,{_parsed:h}=i,m=h.slice(0,u.lo+1).reverse().findIndex(_=>!R(_[d.axis]));u.lo-=Math.max(0,m);let g=h.slice(u.hi).findIndex(_=>!R(_[d.axis]));u.hi+=Math.max(0,g)}return u}}return{lo:0,hi:s.length-1}}function Ti(i,t,e,n,r){let s=i.getSortedVisibleDatasetMetas(),o=e[t];for(let a=0,l=s.length;a{l[o]&&l[o](t[e],r)&&(s.push({element:l,datasetIndex:c,index:u}),a=a||l.inRange(t.x,t.y,r))}),n&&!a?[]:s}var Qm={evaluateInteractionItems:Ti,modes:{index(i,t,e,n){let r=lt(t,i),s=e.axis||"x",o=e.includeInvisible||!1,a=e.intersect?$s(i,r,s,n,o):Xs(i,r,s,!1,n,o),l=[];return a.length?(i.getSortedVisibleDatasetMetas().forEach(c=>{let u=a[0].index,d=c.data[u];d&&!d.skip&&l.push({element:d,datasetIndex:c.index,index:u})}),l):[]},dataset(i,t,e,n){let r=lt(t,i),s=e.axis||"xy",o=e.includeInvisible||!1,a=e.intersect?$s(i,r,s,n,o):Xs(i,r,s,!1,n,o);if(a.length>0){let l=a[0].datasetIndex,c=i.getDatasetMeta(l).data;a=[];for(let u=0;ue.pos===t)}function Yc(i,t){return i.filter(e=>Ru.indexOf(e.pos)===-1&&e.box.axis===t)}function Si(i,t){return i.sort((e,n)=>{let r=t?n:e,s=t?e:n;return r.weight===s.weight?r.index-s.index:r.weight-s.weight})}function Jm(i){let t=[],e,n,r,s,o,a;for(e=0,n=(i||[]).length;ec.box.fullSize),!0),n=Si(bi(t,"left"),!0),r=Si(bi(t,"right")),s=Si(bi(t,"top"),!0),o=Si(bi(t,"bottom")),a=Yc(t,"x"),l=Yc(t,"y");return{fullSize:e,leftAndTop:n.concat(s),rightAndBottom:r.concat(l).concat(o).concat(a),chartArea:bi(t,"chartArea"),vertical:n.concat(r).concat(l),horizontal:s.concat(o).concat(a)}}function qc(i,t,e,n){return Math.max(i[e],t[e])+Math.max(i[n],t[n])}function Fu(i,t){i.top=Math.max(i.top,t.top),i.left=Math.max(i.left,t.left),i.bottom=Math.max(i.bottom,t.bottom),i.right=Math.max(i.right,t.right)}function Zm(i,t,e,n){let{pos:r,box:s}=e,o=i.maxPadding;if(!F(r)){e.size&&(i[r]-=e.size);let d=n[e.stack]||{size:0,count:1};d.size=Math.max(d.size,e.horizontal?s.height:s.width),e.size=d.size/d.count,i[r]+=e.size}s.getPadding&&Fu(o,s.getPadding());let a=Math.max(0,t.outerWidth-qc(o,i,"left","right")),l=Math.max(0,t.outerHeight-qc(o,i,"top","bottom")),c=a!==i.w,u=l!==i.h;return i.w=a,i.h=l,e.horizontal?{same:c,other:u}:{same:u,other:c}}function jm(i){let t=i.maxPadding;function e(n){let r=Math.max(t[n]-i[n],0);return i[n]+=r,r}i.y+=e("top"),i.x+=e("left"),e("right"),e("bottom")}function ef(i,t){let e=t.maxPadding;function n(r){let s={left:0,top:0,right:0,bottom:0};return r.forEach(o=>{s[o]=Math.max(t[o],e[o])}),s}return n(i?["left","right"]:["top","bottom"])}function wi(i,t,e,n){let r=[],s,o,a,l,c,u;for(s=0,o=i.length,c=0;s{typeof _.beforeLayout=="function"&&_.beforeLayout()});let u=l.reduce((_,p)=>p.box.options&&p.box.options.display===!1?_:_+1,0)||1,d=Object.freeze({outerWidth:t,outerHeight:e,padding:r,availableWidth:s,availableHeight:o,vBoxMaxWidth:s/2/u,hBoxMaxHeight:o/2}),h=Object.assign({},r);Fu(h,me(n));let m=Object.assign({maxPadding:h,w:s,h:o,x:r.left,y:r.top},r),g=$m(l.concat(c),d);wi(a.fullSize,m,d,g),wi(l,m,d,g),wi(c,m,d,g)&&wi(l,m,d,g),jm(m),Kc(a.leftAndTop,m,d,g),m.x+=m.w,m.y+=m.h,Kc(a.rightAndBottom,m,d,g),i.chartArea={left:m.left,top:m.top,right:m.left+m.w,bottom:m.top+m.h,height:m.h,width:m.w},K(a.chartArea,_=>{let p=_.box;Object.assign(p,i.chartArea),p.update(m.w,m.h,{left:0,top:0,right:0,bottom:0})})}},lr=class{acquireContext(t,e){}releaseContext(t){return!1}addEventListener(t,e,n){}removeEventListener(t,e,n){}getDevicePixelRatio(){return 1}getMaximumSize(t,e,n,r){return e=Math.max(0,e||t.width),n=n||t.height,{width:e,height:Math.max(0,r?Math.floor(e/r):n)}}isAttached(t){return!0}updateConfig(t){}},oo=class extends lr{acquireContext(t){return t&&t.getContext&&t.getContext("2d")||null}updateConfig(t){t.options.animation=!1}},sr="$chartjs",tf={touchstart:"mousedown",touchmove:"mousemove",touchend:"mouseup",pointerenter:"mouseenter",pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointerleave:"mouseout",pointerout:"mouseout"},Qc=i=>i===null||i==="";function nf(i,t){let e=i.style,n=i.getAttribute("height"),r=i.getAttribute("width");if(i[sr]={initial:{height:n,width:r,style:{display:e.display,height:e.height,width:e.width}}},e.display=e.display||"block",e.boxSizing=e.boxSizing||"border-box",Qc(r)){let s=zs(i,"width");s!==void 0&&(i.width=s)}if(Qc(n))if(i.style.height==="")i.height=i.width/(t||2);else{let s=zs(i,"height");s!==void 0&&(i.height=s)}return i}var Vu=Ec?{passive:!0}:!1;function rf(i,t,e){i&&i.addEventListener(t,e,Vu)}function sf(i,t,e){i&&i.canvas&&i.canvas.removeEventListener(t,e,Vu)}function of(i,t){let e=tf[i.type]||i.type,{x:n,y:r}=lt(i,t);return{type:e,chart:t,native:i,x:n!==void 0?n:null,y:r!==void 0?r:null}}function cr(i,t){for(let e of i)if(e===t||e.contains(t))return!0}function af(i,t,e){let n=i.canvas,r=new MutationObserver(s=>{let o=!1;for(let a of s)o=o||cr(a.addedNodes,n),o=o&&!cr(a.removedNodes,n);o&&e()});return r.observe(document,{childList:!0,subtree:!0}),r}function lf(i,t,e){let n=i.canvas,r=new MutationObserver(s=>{let o=!1;for(let a of s)o=o||cr(a.removedNodes,n),o=o&&!cr(a.addedNodes,n);o&&e()});return r.observe(document,{childList:!0,subtree:!0}),r}var Oi=new Map,Jc=0;function zu(){let i=window.devicePixelRatio;i!==Jc&&(Jc=i,Oi.forEach((t,e)=>{e.currentDevicePixelRatio!==i&&t()}))}function cf(i,t){Oi.size||window.addEventListener("resize",zu),Oi.set(i,t)}function uf(i){Oi.delete(i),Oi.size||window.removeEventListener("resize",zu)}function df(i,t,e){let n=i.canvas,r=n&&Xn(n);if(!r)return;let s=Ds((a,l)=>{let c=r.clientWidth;e(a,l),c{let l=a[0],c=l.contentRect.width,u=l.contentRect.height;c===0&&u===0||s(c,u)});return o.observe(r),cf(i,s),o}function Zs(i,t,e){e&&e.disconnect(),t==="resize"&&uf(i)}function hf(i,t,e){let n=i.canvas,r=Ds(s=>{i.ctx!==null&&e(of(s,i))},i);return rf(n,t,r),r}var ao=class extends lr{acquireContext(t,e){let n=t&&t.getContext&&t.getContext("2d");return n&&n.canvas===t?(nf(t,e),n):null}releaseContext(t){let e=t.canvas;if(!e[sr])return!1;let n=e[sr].initial;["height","width"].forEach(s=>{let o=n[s];R(o)?e.removeAttribute(s):e.setAttribute(s,o)});let r=n.style||{};return Object.keys(r).forEach(s=>{e.style[s]=r[s]}),e.width=e.width,delete e[sr],!0}addEventListener(t,e,n){this.removeEventListener(t,e);let r=t.$proxies||(t.$proxies={}),o={attach:af,detach:lf,resize:df}[e]||hf;r[e]=o(t,e,n)}removeEventListener(t,e){let n=t.$proxies||(t.$proxies={}),r=n[e];if(!r)return;({attach:Zs,detach:Zs,resize:Zs}[e]||sf)(t,e,r),n[e]=void 0}getDevicePixelRatio(){return window.devicePixelRatio}getMaximumSize(t,e,n,r){return Oc(t,e,n,r)}isAttached(t){let e=t&&Xn(t);return!!(e&&e.isConnected)}};function pf(i){return!$n()||typeof OffscreenCanvas<"u"&&i instanceof OffscreenCanvas?oo:ao}var Le=class{static defaults={};static defaultRoutes=void 0;x;y;active=!1;options;$animations;tooltipPosition(t){let{x:e,y:n}=this.getProps(["x","y"],t);return{x:e,y:n}}hasValue(){return bt(this.x)&&bt(this.y)}getProps(t,e){let n=this.$animations;if(!e||!n)return this;let r={};return t.forEach(s=>{r[s]=n[s]&&n[s].active()?n[s]._to:this[s]}),r}};function mf(i,t){let e=i.options.ticks,n=ff(i),r=Math.min(e.maxTicksLimit||n,n),s=e.major.enabled?_f(t):[],o=s.length,a=s[0],l=s[o-1],c=[];if(o>r)return Cf(t,c,s,o/r),c;let u=gf(s,t,r);if(o>0){let d,h,m=o>1?Math.round((l-a)/(o-1)):null;for(er(t,c,u,R(m)?0:a-m,a),d=0,h=o-1;dr)return l}return Math.max(r,1)}function _f(i){let t=[],e,n;for(e=0,n=i.length;ei==="left"?"right":i==="right"?"left":i,Wc=(i,t,e)=>t==="top"||t==="left"?i[t]+e:i[t]-e,$c=(i,t)=>Math.min(t||i,i);function Xc(i,t){let e=[],n=i.length/t,r=i.length,s=0;for(;so+a)))return l}function bf(i,t){K(i,e=>{let n=e.gc,r=n.length/2,s;if(r>t){for(s=0;sn?n:e,n=r&&e>n?e:n,{min:Se(e,Se(n,e)),max:Se(n,Se(e,n))}}getPadding(){return{left:this.paddingLeft||0,top:this.paddingTop||0,right:this.paddingRight||0,bottom:this.paddingBottom||0}}getTicks(){return this.ticks}getLabels(){let t=this.chart.data;return this.options.labels||(this.isHorizontal()?t.xLabels:t.yLabels)||t.labels||[]}getLabelItems(t=this.chart.chartArea){return this._labelItems||(this._labelItems=this._computeLabelItems(t))}beforeLayout(){this._cache={},this._dataLimitsCached=!1}beforeUpdate(){Q(this.options.beforeUpdate,[this])}update(t,e,n){let{beginAtZero:r,grace:s,ticks:o}=this.options,a=o.sampleSize;this.beforeUpdate(),this.maxWidth=t,this.maxHeight=e,this._margins=n=Object.assign({left:0,right:0,top:0,bottom:0},n),this.ticks=null,this._labelSizes=null,this._gridLineItems=null,this._labelItems=null,this.beforeSetDimensions(),this.setDimensions(),this.afterSetDimensions(),this._maxLength=this.isHorizontal()?this.width+n.left+n.right:this.height+n.top+n.bottom,this._dataLimitsCached||(this.beforeDataLimits(),this.determineDataLimits(),this.afterDataLimits(),this._range=bc(this,s,r),this._dataLimitsCached=!0),this.beforeBuildTicks(),this.ticks=this.buildTicks()||[],this.afterBuildTicks();let l=a=s||n<=1||!this.isHorizontal()){this.labelRotation=r;return}let u=this._getLabelSizes(),d=u.widest.width,h=u.highest.height,m=ae(this.chart.width-d,0,this.maxWidth);a=t.offset?this.maxWidth/n:m/(n-1),d+6>a&&(a=m/(n-(t.offset?.5:1)),l=this.maxHeight-Ii(t.grid)-e.padding-Zc(t.title,this.chart.options.font),c=Math.sqrt(d*d+h*h),o=Hn(Math.min(Math.asin(ae((u.highest.height+6)/a,-1,1)),Math.asin(ae(l/c,-1,1))-Math.asin(ae(h/c,-1,1)))),o=Math.max(r,Math.min(s,o))),this.labelRotation=o}afterCalculateLabelRotation(){Q(this.options.afterCalculateLabelRotation,[this])}afterAutoSkip(){}beforeFit(){Q(this.options.beforeFit,[this])}fit(){let t={width:0,height:0},{chart:e,options:{ticks:n,title:r,grid:s}}=this,o=this._isVisible(),a=this.isHorizontal();if(o){let l=Zc(r,e.options.font);if(a?(t.width=this.maxWidth,t.height=Ii(s)+l):(t.height=this.maxHeight,t.width=Ii(s)+l),n.display&&this.ticks.length){let{first:c,last:u,widest:d,highest:h}=this._getLabelSizes(),m=n.padding*2,g=Te(this.labelRotation),_=Math.cos(g),p=Math.sin(g);if(a){let f=n.mirror?0:p*d.width+_*h.height;t.height=Math.min(this.maxHeight,t.height+f+m)}else{let f=n.mirror?0:_*d.width+p*h.height;t.width=Math.min(this.maxWidth,t.width+f+m)}this._calculatePadding(c,u,p,_)}}this._handleMargins(),a?(this.width=this._length=e.width-this._margins.left-this._margins.right,this.height=t.height):(this.width=t.width,this.height=this._length=e.height-this._margins.top-this._margins.bottom)}_calculatePadding(t,e,n,r){let{ticks:{align:s,padding:o},position:a}=this.options,l=this.labelRotation!==0,c=a!=="top"&&this.axis==="x";if(this.isHorizontal()){let u=this.getPixelForTick(0)-this.left,d=this.right-this.getPixelForTick(this.ticks.length-1),h=0,m=0;l?c?(h=r*t.width,m=n*e.height):(h=n*t.height,m=r*e.width):s==="start"?m=e.width:s==="end"?h=t.width:s!=="inner"&&(h=t.width/2,m=e.width/2),this.paddingLeft=Math.max((h-u+o)*this.width/(this.width-u),0),this.paddingRight=Math.max((m-d+o)*this.width/(this.width-d),0)}else{let u=e.height/2,d=t.height/2;s==="start"?(u=0,d=t.height):s==="end"&&(u=e.height,d=0),this.paddingTop=u+o,this.paddingBottom=d+o}}_handleMargins(){this._margins&&(this._margins.left=Math.max(this.paddingLeft,this._margins.left),this._margins.top=Math.max(this.paddingTop,this._margins.top),this._margins.right=Math.max(this.paddingRight,this._margins.right),this._margins.bottom=Math.max(this.paddingBottom,this._margins.bottom))}afterFit(){Q(this.options.afterFit,[this])}isHorizontal(){let{axis:t,position:e}=this.options;return e==="top"||e==="bottom"||t==="x"}isFullSize(){return this.options.fullSize}_convertTicksToLabels(t){this.beforeTickToLabelConversion(),this.generateTickLabels(t);let e,n;for(e=0,n=t.length;e({width:o[D]||0,height:a[D]||0});return{first:S(0),last:S(e-1),widest:S(b),highest:S(A),widths:o,heights:a}}getLabelForValue(t){return t}getPixelForValue(t,e){return NaN}getValueForPixel(t){}getPixelForTick(t){let e=this.ticks;return t<0||t>e.length-1?null:this.getPixelForValue(e[t].value)}getPixelForDecimal(t){this._reversePixels&&(t=1-t);let e=this._startPixel+t*this._length;return dc(this._alignToPixels?st(this.chart,e,0):e)}getDecimalForPixel(t){let e=(t-this._startPixel)/this._length;return this._reversePixels?1-e:e}getBasePixel(){return this.getPixelForValue(this.getBaseValue())}getBaseValue(){let{min:t,max:e}=this;return t<0&&e<0?e:t>0&&e>0?t:0}getContext(t){let e=this.ticks||[];if(t>=0&&ta*r?a/n:l/r:l*r0}_computeGridLineItems(t){let e=this.axis,n=this.chart,r=this.options,{grid:s,position:o,border:a}=r,l=s.offset,c=this.isHorizontal(),d=this.ticks.length+(l?1:0),h=Ii(s),m=[],g=a.setContext(this.getContext()),_=g.display?g.width:0,p=_/2,f=function(q){return st(n,q,_)},C,v,x,y,b,A,S,D,T,E,k,X;if(o==="top")C=f(this.bottom),A=this.bottom-h,D=C-p,E=f(t.top)+p,X=t.bottom;else if(o==="bottom")C=f(this.top),E=t.top,X=f(t.bottom)-p,A=C+p,D=this.top+h;else if(o==="left")C=f(this.right),b=this.right-h,S=C-p,T=f(t.left)+p,k=t.right;else if(o==="right")C=f(this.left),T=t.left,k=f(t.right)-p,b=C+p,S=this.left+h;else if(e==="x"){if(o==="center")C=f((t.top+t.bottom)/2+.5);else if(F(o)){let q=Object.keys(o)[0],Z=o[q];C=f(this.chart.scales[q].getPixelForValue(Z))}E=t.top,X=t.bottom,A=C+p,D=A+h}else if(e==="y"){if(o==="center")C=f((t.left+t.right)/2);else if(F(o)){let q=Object.keys(o)[0],Z=o[q];C=f(this.chart.scales[q].getPixelForValue(Z))}b=C-p,S=b-h,T=t.left,k=t.right}let re=B(r.ticks.maxTicksLimit,d),U=Math.max(1,Math.ceil(d/re));for(v=0;v0&&(gt-=ft/2);break}xn={left:gt,top:ai,width:ft+Ot.width,height:oi+Ot.height,color:U.backdropColor}}p.push({label:x,font:D,textOffset:k,options:{rotation:_,color:Z,strokeColor:ge,strokeWidth:te,textAlign:ue,textBaseline:X,translation:[y,b],backdrop:xn}})}return p}_getXAxisLabelAlignment(){let{position:t,ticks:e}=this.options;if(-Te(this.labelRotation))return t==="top"?"left":"right";let r="center";return e.align==="start"?r="left":e.align==="end"?r="right":e.align==="inner"&&(r="inner"),r}_getYAxisLabelAlignment(t){let{position:e,ticks:{crossAlign:n,mirror:r,padding:s}}=this.options,o=this._getLabelSizes(),a=t+s,l=o.widest.width,c,u;return e==="left"?r?(u=this.right+s,n==="near"?c="left":n==="center"?(c="center",u+=l/2):(c="right",u+=l)):(u=this.right-a,n==="near"?c="right":n==="center"?(c="center",u-=l/2):(c="left",u=this.left)):e==="right"?r?(u=this.left+s,n==="near"?c="right":n==="center"?(c="center",u-=l/2):(c="left",u-=l)):(u=this.left+a,n==="near"?c="left":n==="center"?(c="center",u+=l/2):(c="right",u=this.right)):c="right",{textAlign:c,x:u}}_computeLabelArea(){if(this.options.ticks.mirror)return;let t=this.chart,e=this.options.position;if(e==="left"||e==="right")return{top:0,left:this.left,bottom:t.height,right:this.right};if(e==="top"||e==="bottom")return{top:this.top,left:0,bottom:this.bottom,right:t.width}}drawBackground(){let{ctx:t,options:{backgroundColor:e},left:n,top:r,width:s,height:o}=this;e&&(t.save(),t.fillStyle=e,t.fillRect(n,r,s,o),t.restore())}getLineWidthForValue(t){let e=this.options.grid;if(!this._isVisible()||!e.display)return 0;let r=this.ticks.findIndex(s=>s.value===t);return r>=0?e.setContext(this.getContext(r)).lineWidth:0}drawGrid(t){let e=this.options.grid,n=this.ctx,r=this._gridLineItems||(this._gridLineItems=this._computeGridLineItems(t)),s,o,a=(l,c,u)=>{!u.width||!u.color||(n.save(),n.lineWidth=u.width,n.strokeStyle=u.color,n.setLineDash(u.borderDash||[]),n.lineDashOffset=u.borderDashOffset,n.beginPath(),n.moveTo(l.x,l.y),n.lineTo(c.x,c.y),n.stroke(),n.restore())};if(e.display)for(s=0,o=r.length;s{this.draw(s)}}]:[{z:n,draw:s=>{this.drawBackground(),this.drawGrid(s),this.drawTitle()}},{z:r,draw:()=>{this.drawBorder()}},{z:e,draw:s=>{this.drawLabels(s)}}]}getMatchingVisibleMetas(t){let e=this.chart.getSortedVisibleDatasetMetas(),n=this.axis+"AxisID",r=[],s,o;for(s=0,o=e.length;s{let n=e.split("."),r=n.pop(),s=[i].concat(n).join("."),o=t[e].split("."),a=o.pop(),l=o.join(".");$.route(s,r,l,a)})}function Ef(i){return"id"in i&&"defaults"in i}var lo=class{constructor(){this.controllers=new Yt(ut,"datasets",!0),this.elements=new Yt(Le,"elements"),this.plugins=new Yt(Object,"plugins"),this.scales=new Yt(wt,"scales"),this._typedRegistries=[this.controllers,this.scales,this.elements]}add(...t){this._each("register",t)}remove(...t){this._each("unregister",t)}addControllers(...t){this._each("register",t,this.controllers)}addElements(...t){this._each("register",t,this.elements)}addPlugins(...t){this._each("register",t,this.plugins)}addScales(...t){this._each("register",t,this.scales)}getController(t){return this._get(t,this.controllers,"controller")}getElement(t){return this._get(t,this.elements,"element")}getPlugin(t){return this._get(t,this.plugins,"plugin")}getScale(t){return this._get(t,this.scales,"scale")}removeControllers(...t){this._each("unregister",t,this.controllers)}removeElements(...t){this._each("unregister",t,this.elements)}removePlugins(...t){this._each("unregister",t,this.plugins)}removeScales(...t){this._each("unregister",t,this.scales)}_each(t,e,n){[...e].forEach(r=>{let s=n||this._getRegistryForType(r);n||s.isForType(r)||s===this.plugins&&r.id?this._exec(t,s,r):K(r,o=>{let a=n||this._getRegistryForType(o);this._exec(t,a,o)})})}_exec(t,e,n){let r=Gn(t);Q(n["before"+r],[],n),e[t](n),Q(n["after"+r],[],n)}_getRegistryForType(t){for(let e=0;es.filter(a=>!o.some(l=>a.plugin.id===l.plugin.id));this._notify(r(e,n),t,"stop"),this._notify(r(n,e),t,"start")}};function Pf(i){let t={},e=[],n=Object.keys(Ge.plugins.items);for(let s=0;s1&&jc(i[0].toLowerCase());if(n)return n}throw new Error(`Cannot determine type of '${i}' axis. Please provide 'axis' or 'position' option.`)}function eu(i,t,e){if(e[t+"AxisID"]===i)return{axis:t}}function Rf(i,t){if(t.data&&t.data.datasets){let e=t.data.datasets.filter(n=>n.xAxisID===i||n.yAxisID===i);if(e.length)return eu(i,"x",e[0])||eu(i,"y",e[0])}return{}}function Ff(i,t){let e=rt[i.type]||{scales:{}},n=t.scales||{},r=uo(i.type,t),s=Object.create(null);return Object.keys(n).forEach(o=>{let a=n[o];if(!F(a))return console.error(`Invalid scale configuration for scale: ${o}`);if(a._proxy)return console.warn(`Ignoring resolver passed as options for scale: ${o}`);let l=ho(o,a,Rf(o,i),$.scales[a.type]),c=Bf(l,r),u=e.scales||{};s[o]=Lt(Object.create(null),[{axis:l},a,u[l],u[c]])}),i.data.datasets.forEach(o=>{let a=o.type||i.type,l=o.indexAxis||uo(a,t),u=(rt[a]||{}).scales||{};Object.keys(u).forEach(d=>{let h=Nf(d,l),m=o[h+"AxisID"]||h;s[m]=s[m]||Object.create(null),Lt(s[m],[{axis:h},n[m],u[d]])})}),Object.keys(s).forEach(o=>{let a=s[o];Lt(a,[$.scales[a.type],$.scale])}),s}function Uu(i){let t=i.options||(i.options={});t.plugins=B(t.plugins,{}),t.scales=Ff(i,t)}function Gu(i){return i=i||{},i.datasets=i.datasets||[],i.labels=i.labels||[],i}function Vf(i){return i=i||{},i.data=Gu(i.data),Uu(i),i}var tu=new Map,Hu=new Set;function tr(i,t){let e=tu.get(i);return e||(e=t(),tu.set(i,e),Hu.add(e)),e}var Ai=(i,t,e)=>{let n=Je(t,e);n!==void 0&&i.add(n)},po=class{constructor(t){this._config=Vf(t),this._scopeCache=new Map,this._resolverCache=new Map}get platform(){return this._config.platform}get type(){return this._config.type}set type(t){this._config.type=t}get data(){return this._config.data}set data(t){this._config.data=Gu(t)}get options(){return this._config.options}set options(t){this._config.options=t}get plugins(){return this._config.plugins}update(){let t=this._config;this.clearCache(),Uu(t)}clearCache(){this._scopeCache.clear(),this._resolverCache.clear()}datasetScopeKeys(t){return tr(t,()=>[[`datasets.${t}`,""]])}datasetAnimationScopeKeys(t,e){return tr(`${t}.transition.${e}`,()=>[[`datasets.${t}.transitions.${e}`,`transitions.${e}`],[`datasets.${t}`,""]])}datasetElementScopeKeys(t,e){return tr(`${t}-${e}`,()=>[[`datasets.${t}.elements.${e}`,`datasets.${t}`,`elements.${e}`,""]])}pluginScopeKeys(t){let e=t.id,n=this.type;return tr(`${n}-plugin-${e}`,()=>[[`plugins.${e}`,...t.additionalOptionScopes||[]]])}_cachedScopes(t,e){let n=this._scopeCache,r=n.get(t);return(!r||e)&&(r=new Map,n.set(t,r)),r}getOptionScopes(t,e,n){let{options:r,type:s}=this,o=this._cachedScopes(t,n),a=o.get(e);if(a)return a;let l=new Set;e.forEach(u=>{t&&(l.add(t),u.forEach(d=>Ai(l,t,d))),u.forEach(d=>Ai(l,r,d)),u.forEach(d=>Ai(l,rt[s]||{},d)),u.forEach(d=>Ai(l,$,d)),u.forEach(d=>Ai(l,Kn,d))});let c=Array.from(l);return c.length===0&&c.push(Object.create(null)),Hu.has(e)&&o.set(e,c),c}chartOptionScopes(){let{options:t,type:e}=this;return[t,rt[e]||{},$.datasets[e]||{},{type:e},$,Kn]}resolveNamedOptions(t,e,n,r=[""]){let s={$shared:!0},{resolver:o,subPrefixes:a}=iu(this._resolverCache,t,r),l=o;if(Uf(o,e)){s.$shared=!1,n=Ke(n)?n():n;let c=this.createResolver(t,n,a);l=xt(o,n,c)}for(let c of e)s[c]=l[c];return s}createResolver(t,e,n=[""],r){let{resolver:s}=iu(this._resolverCache,t,n);return F(e)?xt(s,e,void 0,r):s}};function iu(i,t,e){let n=i.get(t);n||(n=new Map,i.set(t,n));let r=e.join(),s=n.get(r);return s||(s={resolver:Wn(t,e),subPrefixes:e.filter(a=>!a.toLowerCase().includes("hover"))},n.set(r,s)),s}var zf=i=>F(i)&&Object.getOwnPropertyNames(i).some(t=>Ke(i[t]));function Uf(i,t){let{isScriptable:e,isIndexable:n}=Bs(i);for(let r of t){let s=e(r),o=n(r),a=(o||s)&&i[r];if(s&&(Ke(a)||zf(a))||o&&J(a))return!0}return!1}var Gf="4.5.0",Hf=["top","bottom","left","right","chartArea"];function nu(i,t){return i==="top"||i==="bottom"||Hf.indexOf(i)===-1&&t==="x"}function ru(i,t){return function(e,n){return e[i]===n[i]?e[t]-n[t]:e[i]-n[i]}}function su(i){let t=i.chart,e=t.options.animation;t.notifyPlugins("afterRender"),Q(e&&e.onComplete,[i],t)}function Yf(i){let t=i.chart,e=t.options.animation;Q(e&&e.onProgress,[i],t)}function Yu(i){return $n()&&typeof i=="string"?i=document.getElementById(i):i&&i.length&&(i=i[0]),i&&i.canvas&&(i=i.canvas),i}var or={},ou=i=>{let t=Yu(i);return Object.values(or).filter(e=>e.canvas===t).pop()};function qf(i,t,e){let n=Object.keys(i);for(let r of n){let s=+r;if(s>=t){let o=i[r];delete i[r],(e>0||s>t)&&(i[s+e]=o)}}}function Kf(i,t,e,n){return!e||i.type==="mouseout"?null:n?t:i}var dt=(()=>{class i{static defaults=$;static instances=or;static overrides=rt;static registry=Ge;static version=Gf;static getChart=ou;static register(...e){Ge.add(...e),au()}static unregister(...e){Ge.remove(...e),au()}constructor(e,n){let r=this.config=new po(n),s=Yu(e),o=ou(s);if(o)throw new Error("Canvas is already in use. Chart with ID '"+o.id+"' must be destroyed before the canvas with ID '"+o.canvas.id+"' can be reused.");let a=r.createResolver(r.chartOptionScopes(),this.getContext());this.platform=new(r.platform||pf(s)),this.platform.updateConfig(r);let l=this.platform.acquireContext(s,a.aspectRatio),c=l&&l.canvas,u=c&&c.height,d=c&&c.width;if(this.id=sc(),this.ctx=l,this.canvas=c,this.width=d,this.height=u,this._options=a,this._aspectRatio=this.aspectRatio,this._layers=[],this._metasets=[],this._stacks=void 0,this.boxes=[],this.currentDevicePixelRatio=void 0,this.chartArea=void 0,this._active=[],this._lastEvent=void 0,this._listeners={},this._responsiveListeners=void 0,this._sortedMetasets=[],this.scales={},this._plugins=new co,this.$proxies={},this._hiddenIndices={},this.attached=!1,this._animationsDisabled=void 0,this.$context=void 0,this._doResize=gc(h=>this.update(h),a.resizeDelay||0),this._dataChanges=[],or[this.id]=this,!l||!c){console.error("Failed to create chart: can't acquire context from the given item");return}$e.listen(this,"complete",su),$e.listen(this,"progress",Yf),this._initialize(),this.attached&&this.update()}get aspectRatio(){let{options:{aspectRatio:e,maintainAspectRatio:n},width:r,height:s,_aspectRatio:o}=this;return R(e)?n&&o?o:s?r/s:null:e}get data(){return this.config.data}set data(e){this.config.data=e}get options(){return this._options}set options(e){this.config.options=e}get registry(){return Ge}_initialize(){return this.notifyPlugins("beforeInit"),this.options.responsive?this.resize():Vs(this,this.options.devicePixelRatio),this.bindEvents(),this.notifyPlugins("afterInit"),this}clear(){return Ms(this.canvas,this.ctx),this}stop(){return $e.stop(this),this}resize(e,n){$e.running(this)?this._resizeBeforeDraw={width:e,height:n}:this._resize(e,n)}_resize(e,n){let r=this.options,s=this.canvas,o=r.maintainAspectRatio&&this.aspectRatio,a=this.platform.getMaximumSize(s,e,n,o),l=r.devicePixelRatio||this.platform.getDevicePixelRatio(),c=this.width?"resize":"attach";this.width=a.width,this.height=a.height,this._aspectRatio=this.aspectRatio,Vs(this,l,!0)&&(this.notifyPlugins("resize",{size:a}),Q(r.onResize,[this,a],this),this.attached&&this._doResize(c)&&this.render())}ensureScalesHaveIDs(){let n=this.options.scales||{};K(n,(r,s)=>{r.id=s})}buildOrUpdateScales(){let e=this.options,n=e.scales,r=this.scales,s=Object.keys(r).reduce((a,l)=>(a[l]=!1,a),{}),o=[];n&&(o=o.concat(Object.keys(n).map(a=>{let l=n[a],c=ho(a,l),u=c==="r",d=c==="x";return{options:l,dposition:u?"chartArea":d?"bottom":"left",dtype:u?"radialLinear":d?"category":"linear"}}))),K(o,a=>{let l=a.options,c=l.id,u=ho(c,l),d=B(l.type,a.dtype);(l.position===void 0||nu(l.position,u)!==nu(a.dposition))&&(l.position=a.dposition),s[c]=!0;let h=null;if(c in r&&r[c].type===d)h=r[c];else{let m=Ge.getScale(d);h=new m({id:c,type:d,ctx:this.ctx,chart:this}),r[h.id]=h}h.init(l,e)}),K(s,(a,l)=>{a||delete r[l]}),K(r,a=>{_e.configure(this,a,a.options),_e.addBox(this,a)})}_updateMetasets(){let e=this._metasets,n=this.data.datasets.length,r=e.length;if(e.sort((s,o)=>s.index-o.index),r>n){for(let s=n;sn.length&&delete this._stacks,e.forEach((r,s)=>{n.filter(o=>o===r._dataset).length===0&&this._destroyDatasetMeta(s)})}buildOrUpdateControllers(){let e=[],n=this.data.datasets,r,s;for(this._removeUnreferencedMetasets(),r=0,s=n.length;r{this.getDatasetMeta(n).controller.reset()},this)}reset(){this._resetElements(),this.notifyPlugins("reset")}update(e){let n=this.config;n.update();let r=this._options=n.createResolver(n.chartOptionScopes(),this.getContext()),s=this._animationsDisabled=!r.animation;if(this._updateScales(),this._checkEventBindings(),this._updateHiddenIndices(),this._plugins.invalidate(),this.notifyPlugins("beforeUpdate",{mode:e,cancelable:!0})===!1)return;let o=this.buildOrUpdateControllers();this.notifyPlugins("beforeElementsUpdate");let a=0;for(let u=0,d=this.data.datasets.length;u{u.reset()}),this._updateDatasets(e),this.notifyPlugins("afterUpdate",{mode:e}),this._layers.sort(ru("z","_idx"));let{_active:l,_lastEvent:c}=this;c?this._eventHandler(c,!0):l.length&&this._updateHoverStyles(l,l,!0),this.render()}_updateScales(){K(this.scales,e=>{_e.removeBox(this,e)}),this.ensureScalesHaveIDs(),this.buildOrUpdateScales()}_checkEventBindings(){let e=this.options,n=new Set(Object.keys(this._listeners)),r=new Set(e.events);(!ys(n,r)||!!this._responsiveListeners!==e.responsive)&&(this.unbindEvents(),this.bindEvents())}_updateHiddenIndices(){let{_hiddenIndices:e}=this,n=this._getUniformDataChanges()||[];for(let{method:r,start:s,count:o}of n){let a=r==="_removeElements"?-o:o;qf(e,s,a)}}_getUniformDataChanges(){let e=this._dataChanges;if(!e||!e.length)return;this._dataChanges=[];let n=this.data.datasets.length,r=o=>new Set(e.filter(a=>a[0]===o).map((a,l)=>l+","+a.splice(1).join(","))),s=r(0);for(let o=1;oo.split(",")).map(o=>({method:o[1],start:+o[2],count:+o[3]}))}_updateLayout(e){if(this.notifyPlugins("beforeLayout",{cancelable:!0})===!1)return;_e.update(this,this.width,this.height,e);let n=this.chartArea,r=n.width<=0||n.height<=0;this._layers=[],K(this.boxes,s=>{r&&s.position==="chartArea"||(s.configure&&s.configure(),this._layers.push(...s._layers()))},this),this._layers.forEach((s,o)=>{s._idx=o}),this.notifyPlugins("afterLayout")}_updateDatasets(e){if(this.notifyPlugins("beforeDatasetsUpdate",{mode:e,cancelable:!0})!==!1){for(let n=0,r=this.data.datasets.length;n=0;--n)this._drawDataset(e[n]);this.notifyPlugins("afterDatasetsDraw")}_drawDataset(e){let n=this.ctx,r={meta:e,index:e.index,cancelable:!0},s=qs(this,e);this.notifyPlugins("beforeDatasetDraw",r)!==!1&&(s&&yi(n,s),e.controller.draw(),s&&vi(n),r.cancelable=!1,this.notifyPlugins("afterDatasetDraw",r))}isPointInArea(e){return Fe(e,this.chartArea,this._minPadding)}getElementsAtEventForMode(e,n,r,s){let o=Qm.modes[n];return typeof o=="function"?o(this,e,r,s):[]}getDatasetMeta(e){let n=this.data.datasets[e],r=this._metasets,s=r.filter(o=>o&&o._dataset===n).pop();return s||(s={type:null,data:[],dataset:null,controller:null,hidden:null,xAxisID:null,yAxisID:null,order:n&&n.order||0,index:e,_dataset:n,_parsed:[],_sorted:!1},r.push(s)),s}getContext(){return this.$context||(this.$context=We(null,{chart:this,type:"chart"}))}getVisibleDatasetCount(){return this.getSortedVisibleDatasetMetas().length}isDatasetVisible(e){let n=this.data.datasets[e];if(!n)return!1;let r=this.getDatasetMeta(e);return typeof r.hidden=="boolean"?!r.hidden:!n.hidden}setDatasetVisibility(e,n){let r=this.getDatasetMeta(e);r.hidden=!n}toggleDataVisibility(e){this._hiddenIndices[e]=!this._hiddenIndices[e]}getDataVisibility(e){return!this._hiddenIndices[e]}_updateVisibility(e,n,r){let s=r?"show":"hide",o=this.getDatasetMeta(e),a=o.controller._resolveAnimations(void 0,s);Rt(n)?(o.data[n].hidden=!r,this.update()):(this.setDatasetVisibility(e,r),a.update(o,{visible:r}),this.update(l=>l.datasetIndex===e?s:void 0))}hide(e,n){this._updateVisibility(e,n,!1)}show(e,n){this._updateVisibility(e,n,!0)}_destroyDatasetMeta(e){let n=this._metasets[e];n&&n.controller&&n.controller._destroy(),delete this._metasets[e]}_stop(){let e,n;for(this.stop(),$e.remove(this),e=0,n=this.data.datasets.length;e{n.addEventListener(this,o,a),e[o]=a},s=(o,a,l)=>{o.offsetX=a,o.offsetY=l,this._eventHandler(o)};K(this.options.events,o=>r(o,s))}bindResponsiveEvents(){this._responsiveListeners||(this._responsiveListeners={});let e=this._responsiveListeners,n=this.platform,r=(c,u)=>{n.addEventListener(this,c,u),e[c]=u},s=(c,u)=>{e[c]&&(n.removeEventListener(this,c,u),delete e[c])},o=(c,u)=>{this.canvas&&this.resize(c,u)},a,l=()=>{s("attach",l),this.attached=!0,this.resize(),r("resize",o),r("detach",a)};a=()=>{this.attached=!1,s("resize",o),this._stop(),this._resize(0,0),r("attach",l)},n.isAttached(this.canvas)?l():a()}unbindEvents(){K(this._listeners,(e,n)=>{this.platform.removeEventListener(this,n,e)}),this._listeners={},K(this._responsiveListeners,(e,n)=>{this.platform.removeEventListener(this,n,e)}),this._responsiveListeners=void 0}updateHoverStyle(e,n,r){let s=r?"set":"remove",o,a,l,c;for(n==="dataset"&&(o=this.getDatasetMeta(e[0].datasetIndex),o.controller["_"+s+"DatasetHoverStyle"]()),l=0,c=e.length;l{let l=this.getDatasetMeta(o);if(!l)throw new Error("No dataset found at index "+o);return{datasetIndex:o,element:l.data[a],index:a}});!_i(r,n)&&(this._active=r,this._lastEvent=null,this._updateHoverStyles(r,n))}notifyPlugins(e,n,r){return this._plugins.notify(this,e,n,r)}isPluginEnabled(e){return this._plugins._cache.filter(n=>n.plugin.id===e).length===1}_updateHoverStyles(e,n,r){let s=this.options.hover,o=(c,u)=>c.filter(d=>!u.some(h=>d.datasetIndex===h.datasetIndex&&d.index===h.index)),a=o(n,e),l=r?e:o(e,n);a.length&&this.updateHoverStyle(a,s.mode,!1),l.length&&s.mode&&this.updateHoverStyle(l,s.mode,!0)}_eventHandler(e,n){let r={event:e,replay:n,cancelable:!0,inChartArea:this.isPointInArea(e)},s=a=>(a.options.events||this.options.events).includes(e.native.type);if(this.notifyPlugins("beforeEvent",r,s)===!1)return;let o=this._handleEvent(e,n,r.inChartArea);return r.cancelable=!1,this.notifyPlugins("afterEvent",r,s),(o||r.changed)&&this.render(),this}_handleEvent(e,n,r){let{_active:s=[],options:o}=this,a=n,l=this._getActiveElements(e,s,r,a),c=lc(e),u=Kf(e,this._lastEvent,r,c);r&&(this._lastEvent=null,Q(o.onHover,[e,l,this],this),c&&Q(o.onClick,[e,l,this],this));let d=!_i(l,s);return(d||n)&&(this._active=l,this._updateHoverStyles(l,s,n)),this._lastEvent=u,d}_getActiveElements(e,n,r,s){if(e.type==="mouseout")return[];if(!r)return n;let o=this.options.hover;return this.getElementsAtEventForMode(e,o.mode,o,s)}}return i})();function au(){return K(dt.instances,i=>i._plugins.invalidate())}function Qf(i,t,e){let{startAngle:n,x:r,y:s,outerRadius:o,innerRadius:a,options:l}=t,{borderWidth:c,borderJoinStyle:u}=l,d=Math.min(c/o,he(n-e));if(i.beginPath(),i.arc(r,s,o-c/2,n+d/2,e-d/2),a>0){let h=Math.min(c/a,he(n-e));i.arc(r,s,a+c/2,e-h/2,n+h/2,!0)}else{let h=Math.min(c/2,o*he(n-e));if(u==="round")i.arc(r,s,h,e-H/2,n+H/2,!0);else if(u==="bevel"){let m=2*h*h,g=-m*Math.cos(e+H/2)+r,_=-m*Math.sin(e+H/2)+s,p=m*Math.cos(n+H/2)+r,f=m*Math.sin(n+H/2)+s;i.lineTo(g,_),i.lineTo(p,f)}}i.closePath(),i.moveTo(0,0),i.rect(0,0,i.canvas.width,i.canvas.height),i.clip("evenodd")}function Jf(i,t,e){let{startAngle:n,pixelMargin:r,x:s,y:o,outerRadius:a,innerRadius:l}=t,c=r/a;i.beginPath(),i.arc(s,o,a,n-c,e+c),l>r?(c=r/l,i.arc(s,o,l,e+c,n-c,!0)):i.arc(s,o,r,e+ie,n-ie),i.closePath(),i.clip()}function Wf(i){return Jn(i,["outerStart","outerEnd","innerStart","innerEnd"])}function $f(i,t,e,n){let r=Wf(i.options.borderRadius),s=(e-t)/2,o=Math.min(s,n*t/2),a=l=>{let c=(e-Math.min(s,l))*n/2;return ae(l,0,Math.min(s,c))};return{outerStart:a(r.outerStart),outerEnd:a(r.outerEnd),innerStart:ae(r.innerStart,0,o),innerEnd:ae(r.innerEnd,0,o)}}function Ht(i,t,e,n){return{x:e+i*Math.cos(t),y:n+i*Math.sin(t)}}function ur(i,t,e,n,r,s){let{x:o,y:a,startAngle:l,pixelMargin:c,innerRadius:u}=t,d=Math.max(t.outerRadius+n+e-c,0),h=u>0?u+n+e+c:0,m=0,g=r-l;if(n){let U=u>0?u-n:0,q=d>0?d-n:0,Z=(U+q)/2,ge=Z!==0?g*Z/(Z+n):g;m=(g-ge)/2}let _=Math.max(.001,g*d-e/H)/d,p=(g-_)/2,f=l+p+m,C=r-p-m,{outerStart:v,outerEnd:x,innerStart:y,innerEnd:b}=$f(t,h,d,C-f),A=d-v,S=d-x,D=f+v/A,T=C-x/S,E=h+y,k=h+b,X=f+y/E,re=C-b/k;if(i.beginPath(),s){let U=(D+T)/2;if(i.arc(o,a,d,D,U),i.arc(o,a,d,U,T),x>0){let te=Ht(S,T,o,a);i.arc(te.x,te.y,x,T,C+ie)}let q=Ht(k,C,o,a);if(i.lineTo(q.x,q.y),b>0){let te=Ht(k,re,o,a);i.arc(te.x,te.y,b,C+ie,re+Math.PI)}let Z=(C-b/h+(f+y/h))/2;if(i.arc(o,a,h,C-b/h,Z,!0),i.arc(o,a,h,Z,f+y/h,!0),y>0){let te=Ht(E,X,o,a);i.arc(te.x,te.y,y,X+Math.PI,f-ie)}let ge=Ht(A,f,o,a);if(i.lineTo(ge.x,ge.y),v>0){let te=Ht(A,D,o,a);i.arc(te.x,te.y,v,f-ie,D)}}else{i.moveTo(o,a);let U=Math.cos(D)*d+o,q=Math.sin(D)*d+a;i.lineTo(U,q);let Z=Math.cos(T)*d+o,ge=Math.sin(T)*d+a;i.lineTo(Z,ge)}i.closePath()}function Xf(i,t,e,n,r){let{fullCircles:s,startAngle:o,circumference:a}=t,l=t.endAngle;if(s){ur(i,t,e,n,l,r);for(let c=0;c=H&&m===0&&u!=="miter"&&Qf(i,t,_),s||(ur(i,t,e,n,_,r),i.stroke())}var mo=class extends Le{static id="arc";static defaults={borderAlign:"center",borderColor:"#fff",borderDash:[],borderDashOffset:0,borderJoinStyle:void 0,borderRadius:0,borderWidth:2,offset:0,spacing:0,angle:void 0,circular:!0,selfJoin:!1};static defaultRoutes={backgroundColor:"backgroundColor"};static descriptors={_scriptable:!0,_indexable:t=>t!=="borderDash"};circumference;endAngle;fullCircles;innerRadius;outerRadius;pixelMargin;startAngle;constructor(t){super(),this.options=void 0,this.circumference=void 0,this.startAngle=void 0,this.endAngle=void 0,this.innerRadius=void 0,this.outerRadius=void 0,this.pixelMargin=0,this.fullCircles=0,t&&Object.assign(this,t)}inRange(t,e,n){let r=this.getProps(["x","y"],n),{angle:s,distance:o}=Ss(r,{x:t,y:e}),{startAngle:a,endAngle:l,innerRadius:c,outerRadius:u,circumference:d}=this.getProps(["startAngle","endAngle","innerRadius","outerRadius","circumference"],n),h=(this.options.spacing+this.options.borderWidth)/2,m=B(d,l-a),g=Vt(s,a,l)&&a!==l,_=m>=W||g,p=ze(o,c+h,u+h);return _&&p}getCenterPoint(t){let{x:e,y:n,startAngle:r,endAngle:s,innerRadius:o,outerRadius:a}=this.getProps(["x","y","startAngle","endAngle","innerRadius","outerRadius"],t),{offset:l,spacing:c}=this.options,u=(r+s)/2,d=(o+a+c+l)/2;return{x:e+Math.cos(u)*d,y:n+Math.sin(u)*d}}tooltipPosition(t){return this.getCenterPoint(t)}draw(t){let{options:e,circumference:n}=this,r=(e.offset||0)/4,s=(e.spacing||0)/2,o=e.circular;if(this.pixelMargin=e.borderAlign==="inner"?.33:0,this.fullCircles=n>W?Math.floor(n/W):0,n===0||this.innerRadius<0||this.outerRadius<0)return;t.save();let a=(this.startAngle+this.endAngle)/2;t.translate(Math.cos(a)*r,Math.sin(a)*r);let l=1-Math.sin(Math.min(H,n||0)),c=r*l;t.fillStyle=e.backgroundColor,t.strokeStyle=e.borderColor,Xf(t,this,c,s,o),Zf(t,this,c,s,o),t.restore()}};function qu(i,t,e=t){i.lineCap=B(e.borderCapStyle,t.borderCapStyle),i.setLineDash(B(e.borderDash,t.borderDash)),i.lineDashOffset=B(e.borderDashOffset,t.borderDashOffset),i.lineJoin=B(e.borderJoinStyle,t.borderJoinStyle),i.lineWidth=B(e.borderWidth,t.borderWidth),i.strokeStyle=B(e.borderColor,t.borderColor)}function jf(i,t,e){i.lineTo(e.x,e.y)}function eg(i){return i.stepped?vc:i.tension||i.cubicInterpolationMode==="monotone"?xc:jf}function Ku(i,t,e={}){let n=i.length,{start:r=0,end:s=n-1}=e,{start:o,end:a}=t,l=Math.max(r,o),c=Math.min(s,a),u=ra&&s>a;return{count:n,start:l,loop:t.loop,ilen:c(o+(c?a-x:x))%s,v=()=>{_!==p&&(i.lineTo(u,p),i.lineTo(u,_),i.lineTo(u,f))};for(l&&(m=r[C(0)],i.moveTo(m.x,m.y)),h=0;h<=a;++h){if(m=r[C(h)],m.skip)continue;let x=m.x,y=m.y,b=x|0;b===g?(y<_?_=y:y>p&&(p=y),u=(d*u+x)/++d):(v(),i.lineTo(x,y),g=b,d=0,_=p=y),f=y}v()}function fo(i){let t=i.options,e=t.borderDash&&t.borderDash.length;return!i._decimated&&!i._loop&&!t.tension&&t.cubicInterpolationMode!=="monotone"&&!t.stepped&&!e?ig:tg}function ng(i){return i.stepped?Pc:i.tension||i.cubicInterpolationMode==="monotone"?Tc:nt}function rg(i,t,e,n){let r=t._path;r||(r=t._path=new Path2D,t.path(r,e,n)&&r.closePath()),qu(i,t.options),i.stroke(r)}function sg(i,t,e,n){let{segments:r,options:s}=t,o=fo(t);for(let a of r)qu(i,s,a.style),i.beginPath(),o(i,t,a,{start:e,end:e+n-1})&&i.closePath(),i.stroke()}var og=typeof Path2D=="function";function ag(i,t,e,n){og&&!t.options.segment?rg(i,t,e,n):sg(i,t,e,n)}var pr=(()=>{class i extends Le{static id="line";static defaults={borderCapStyle:"butt",borderDash:[],borderDashOffset:0,borderJoinStyle:"miter",borderWidth:3,capBezierPoints:!0,cubicInterpolationMode:"default",fill:!1,spanGaps:!1,stepped:!1,tension:0};static defaultRoutes={backgroundColor:"backgroundColor",borderColor:"borderColor"};static descriptors={_scriptable:!0,_indexable:e=>e!=="borderDash"&&e!=="fill"};constructor(e){super(),this.animated=!0,this.options=void 0,this._chart=void 0,this._loop=void 0,this._fullLoop=void 0,this._path=void 0,this._points=void 0,this._segments=void 0,this._decimated=!1,this._pointsUpdated=!1,this._datasetIndex=void 0,e&&Object.assign(this,e)}updateControlPoints(e,n){let r=this.options;if((r.tension||r.cubicInterpolationMode==="monotone")&&!r.stepped&&!this._pointsUpdated){let s=r.spanGaps?this._loop:this._fullLoop;Dc(this._points,r,e,s,n),this._pointsUpdated=!0}}set points(e){this._points=e,delete this._segments,delete this._path,this._pointsUpdated=!1}get points(){return this._points}get segments(){return this._segments||(this._segments=kc(this,this.options.segment))}first(){let e=this.segments,n=this.points;return e.length&&n[e[0].start]}last(){let e=this.segments,n=this.points,r=e.length;return r&&n[e[r-1].end]}interpolate(e,n){let r=this.options,s=e[n],o=this.points,a=Ys(this,{property:n,start:s,end:s});if(!a.length)return;let l=[],c=ng(r),u,d;for(u=0,d=a.length;u{class i extends Le{static id="point";parsed;skip;stop;static defaults={borderWidth:1,hitRadius:1,hoverBorderWidth:1,hoverRadius:4,pointStyle:"circle",radius:3,rotation:0};static defaultRoutes={backgroundColor:"backgroundColor",borderColor:"borderColor"};constructor(e){super(),this.options=void 0,this.parsed=void 0,this.skip=void 0,this.stop=void 0,e&&Object.assign(this,e)}inRange(e,n,r){let s=this.options,{x:o,y:a}=this.getProps(["x","y"],r);return Math.pow(e-o,2)+Math.pow(n-a,2)i.replace("rgb(","rgba(").replace(")",", 0.5)"));function Ju(i){return _o[i%_o.length]}function Wu(i){return cu[i%cu.length]}function fg(i,t){return i.borderColor=Ju(t),i.backgroundColor=Wu(t),++t}function gg(i,t){return i.backgroundColor=i.data.map(()=>Ju(t++)),t}function _g(i,t){return i.backgroundColor=i.data.map(()=>Wu(t++)),t}function Cg(i){let t=0;return(e,n)=>{let r=i.getDatasetMeta(n).controller;r instanceof Ao?t=gg(e,t):r instanceof Lu?t=_g(e,t):r&&(t=fg(e,t))}}function uu(i){let t;for(t in i)if(i[t].borderColor||i[t].backgroundColor)return!0;return!1}function yg(i){return i&&(i.borderColor||i.backgroundColor)}function vg(){return $.borderColor!=="rgba(0,0,0,0.1)"||$.backgroundColor!=="rgba(0,0,0,0.1)"}var xg={id:"colors",defaults:{enabled:!0,forceOverride:!1},beforeLayout(i,t,e){if(!e.enabled)return;let{data:{datasets:n},options:r}=i.config,{elements:s}=r,o=uu(n)||yg(r)||s&&uu(s)||vg();if(!e.forceOverride&&o)return;let a=Cg(i);n.forEach(a)}};function bg(i,t,e,n,r){let s=r.samples||n;if(s>=e)return i.slice(t,t+e);let o=[],a=(e-2)/(s-2),l=0,c=t+e-1,u=t,d,h,m,g,_;for(o[l++]=i[u],d=0;dm&&(m=g,h=i[C],_=C);o[l++]=h,u=_}return o[l++]=i[c],o}function Sg(i,t,e,n){let r=0,s=0,o,a,l,c,u,d,h,m,g,_,p=[],f=t+e-1,C=i[t].x,x=i[f].x-C;for(o=t;o_&&(_=c,h=o),r=(s*r+a.x)/++s;else{let b=o-1;if(!R(d)&&!R(h)){let A=Math.min(d,h),S=Math.max(d,h);A!==m&&A!==b&&p.push(V(L({},i[A]),{x:r})),S!==m&&S!==b&&p.push(V(L({},i[S]),{x:r}))}o>0&&b!==m&&p.push(i[b]),p.push(a),u=y,s=0,g=_=c,d=h=m=o}}return p}function $u(i){if(i._decimated){let t=i._data;delete i._decimated,delete i._data,Object.defineProperty(i,"data",{configurable:!0,enumerable:!0,writable:!0,value:t})}}function du(i){i.data.datasets.forEach(t=>{$u(t)})}function Ig(i,t){let e=t.length,n=0,r,{iScale:s}=i,{min:o,max:a,minDefined:l,maxDefined:c}=s.getUserBounds();return l&&(n=ae(Re(t,s.axis,o).lo,0,e-1)),c?r=ae(Re(t,s.axis,a).hi+1,n,e)-n:r=e-n,{start:n,count:r}}var Ag={id:"decimation",defaults:{algorithm:"min-max",enabled:!1},beforeElementsUpdate:(i,t,e)=>{if(!e.enabled){du(i);return}let n=i.width;i.data.datasets.forEach((r,s)=>{let{_data:o,indexAxis:a}=r,l=i.getDatasetMeta(s),c=o||r.data;if(Gt([a,i.options.indexAxis])==="y"||!l.controller.supportsDecimation)return;let u=i.scales[l.xAxisID];if(u.type!=="linear"&&u.type!=="time"||i.options.parsing)return;let{start:d,count:h}=Ig(l,c),m=e.threshold||4*n;if(h<=m){$u(r);return}R(o)&&(r._data=c,delete r.data,Object.defineProperty(r,"data",{configurable:!0,enumerable:!0,get:function(){return this._decimated},set:function(_){this._data=_}}));let g;switch(e.algorithm){case"lttb":g=bg(c,d,h,n,e);break;case"min-max":g=Sg(c,d,h,n);break;default:throw new Error(`Unsupported decimation algorithm '${e.algorithm}'`)}r._decimated=g})},destroy(i){du(i)}};function wg(i,t,e){let n=i.segments,r=i.points,s=t.points,o=[];for(let a of n){let{start:l,end:c}=a;c=mr(l,c,r);let u=Co(e,r[l],r[c],a.loop);if(!t.segments){o.push({source:a,target:u,start:r[l],end:r[c]});continue}let d=Ys(t,u);for(let h of d){let m=Co(e,s[h.start],s[h.end],h.loop),g=Hs(a,r,m);for(let _ of g)o.push({source:_,target:h,start:{[e]:hu(u,m,"start",Math.max)},end:{[e]:hu(u,m,"end",Math.min)}})}}return o}function Co(i,t,e,n){if(n)return;let r=t[i],s=e[i];return i==="angle"&&(r=he(r),s=he(s)),{property:i,start:r,end:s}}function Dg(i,t){let{x:e=null,y:n=null}=i||{},r=t.points,s=[];return t.segments.forEach(({start:o,end:a})=>{a=mr(o,a,r);let l=r[o],c=r[a];n!==null?(s.push({x:l.x,y:n}),s.push({x:c.x,y:n})):e!==null&&(s.push({x:e,y:l.y}),s.push({x:e,y:c.y}))}),s}function mr(i,t,e){for(;t>i;t--){let n=e[t];if(!isNaN(n.x)&&!isNaN(n.y))break}return t}function hu(i,t,e,n){return i&&t?n(i[e],t[e]):i?i[e]:t?t[e]:0}function Xu(i,t){let e=[],n=!1;return J(i)?(n=!0,e=i):e=Dg(i,t),e.length?new pr({points:e,options:{tension:0},_loop:n,_fullLoop:n}):null}function pu(i){return i&&i.fill!==!1}function Og(i,t,e){let r=i[t].fill,s=[t],o;if(!e)return r;for(;r!==!1&&s.indexOf(r)===-1;){if(!ee(r))return r;if(o=i[r],!o)return!1;if(o.visible)return r;s.push(r),r=o.fill}return!1}function Eg(i,t,e){let n=kg(i);if(F(n))return isNaN(n.value)?!1:n;let r=parseFloat(n);return ee(r)&&Math.floor(r)===r?Pg(n[0],t,r,e):["origin","start","end","stack","shape"].indexOf(n)>=0&&n}function Pg(i,t,e,n){return(i==="-"||i==="+")&&(e=t+e),e===t||e<0||e>=n?!1:e}function Tg(i,t){let e=null;return i==="start"?e=t.bottom:i==="end"?e=t.top:F(i)?e=t.getPixelForValue(i.value):t.getBasePixel&&(e=t.getBasePixel()),e}function Mg(i,t,e){let n;return i==="start"?n=e:i==="end"?n=t.options.reverse?t.min:t.max:F(i)?n=i.value:n=t.getBaseValue(),n}function kg(i){let t=i.options,e=t.fill,n=B(e&&e.target,e);return n===void 0&&(n=!!t.backgroundColor),n===!1||n===null?!1:n===!0?"origin":n}function Ng(i){let{scale:t,index:e,line:n}=i,r=[],s=n.segments,o=n.points,a=Bg(t,e);a.push(Xu({x:null,y:t.bottom},n));for(let l=0;l=0;--o){let a=r[o].$filler;a&&(a.line.updateControlPoints(s,a.axis),n&&a.fill&&to(i.ctx,a,s))}},beforeDatasetsDraw(i,t,e){if(e.drawTime!=="beforeDatasetsDraw")return;let n=i.getSortedVisibleDatasetMetas();for(let r=n.length-1;r>=0;--r){let s=n[r].$filler;pu(s)&&to(i.ctx,s,i.chartArea)}},beforeDatasetDraw(i,t,e){let n=t.meta.$filler;!pu(n)||e.drawTime!=="beforeDatasetDraw"||to(i.ctx,n,i.chartArea)},defaults:{propagate:!0,drawTime:"beforeDatasetDraw"}},_u=(i,t)=>{let{boxHeight:e=t,boxWidth:n=t}=i;return i.usePointStyle&&(e=Math.min(e,t),n=i.pointStyleWidth||Math.min(n,t)),{boxWidth:n,boxHeight:e,itemHeight:Math.max(t,e)}},Kg=(i,t)=>i!==null&&t!==null&&i.datasetIndex===t.datasetIndex&&i.index===t.index,hr=class extends Le{constructor(t){super(),this._added=!1,this.legendHitBoxes=[],this._hoveredItem=null,this.doughnutMode=!1,this.chart=t.chart,this.options=t.options,this.ctx=t.ctx,this.legendItems=void 0,this.columnSizes=void 0,this.lineWidths=void 0,this.maxHeight=void 0,this.maxWidth=void 0,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.height=void 0,this.width=void 0,this._margins=void 0,this.position=void 0,this.weight=void 0,this.fullSize=void 0}update(t,e,n){this.maxWidth=t,this.maxHeight=e,this._margins=n,this.setDimensions(),this.buildLabels(),this.fit()}setDimensions(){this.isHorizontal()?(this.width=this.maxWidth,this.left=this._margins.left,this.right=this.width):(this.height=this.maxHeight,this.top=this._margins.top,this.bottom=this.height)}buildLabels(){let t=this.options.labels||{},e=Q(t.generateLabels,[this.chart],this)||[];t.filter&&(e=e.filter(n=>t.filter(n,this.chart.data))),t.sort&&(e=e.sort((n,r)=>t.sort(n,r,this.chart.data))),this.options.reverse&&e.reverse(),this.legendItems=e}fit(){let{options:t,ctx:e}=this;if(!t.display){this.width=this.height=0;return}let n=t.labels,r=oe(n.font),s=r.size,o=this._computeTitleHeight(),{boxWidth:a,itemHeight:l}=_u(n,s),c,u;e.font=r.string,this.isHorizontal()?(c=this.maxWidth,u=this._fitRows(o,s,a,l)+10):(u=this.maxHeight,c=this._fitCols(o,r,a,l)+10),this.width=Math.min(c,t.maxWidth||this.maxWidth),this.height=Math.min(u,t.maxHeight||this.maxHeight)}_fitRows(t,e,n,r){let{ctx:s,maxWidth:o,options:{labels:{padding:a}}}=this,l=this.legendHitBoxes=[],c=this.lineWidths=[0],u=r+a,d=t;s.textAlign="left",s.textBaseline="middle";let h=-1,m=-u;return this.legendItems.forEach((g,_)=>{let p=n+e/2+s.measureText(g.text).width;(_===0||c[c.length-1]+p+2*a>o)&&(d+=u,c[c.length-(_>0?0:1)]=0,m+=u,h++),l[_]={left:0,top:m,row:h,width:p,height:r},c[c.length-1]+=p+a}),d}_fitCols(t,e,n,r){let{ctx:s,maxHeight:o,options:{labels:{padding:a}}}=this,l=this.legendHitBoxes=[],c=this.columnSizes=[],u=o-t,d=a,h=0,m=0,g=0,_=0;return this.legendItems.forEach((p,f)=>{let{itemWidth:C,itemHeight:v}=Qg(n,e,s,p,r);f>0&&m+v+2*a>u&&(d+=h+a,c.push({width:h,height:m}),g+=h+a,_++,h=m=0),l[f]={left:g,top:m,col:_,width:C,height:v},h=Math.max(h,C),m+=v+a}),d+=h,c.push({width:h,height:m}),d}adjustHitBoxes(){if(!this.options.display)return;let t=this._computeTitleHeight(),{legendHitBoxes:e,options:{align:n,labels:{padding:r},rtl:s}}=this,o=St(s,this.left,this.width);if(this.isHorizontal()){let a=0,l=pe(n,this.left+r,this.right-this.lineWidths[a]);for(let c of e)a!==c.row&&(a=c.row,l=pe(n,this.left+r,this.right-this.lineWidths[a])),c.top+=this.top+t+r,c.left=o.leftForLtr(o.x(l),c.width),l+=c.width+r}else{let a=0,l=pe(n,this.top+t+r,this.bottom-this.columnSizes[a].height);for(let c of e)c.col!==a&&(a=c.col,l=pe(n,this.top+t+r,this.bottom-this.columnSizes[a].height)),c.top=l,c.left+=this.left+r,c.left=o.leftForLtr(o.x(c.left),c.width),l+=c.height+r}}isHorizontal(){return this.options.position==="top"||this.options.position==="bottom"}draw(){if(this.options.display){let t=this.ctx;yi(t,this),this._draw(),vi(t)}}_draw(){let{options:t,columnSizes:e,lineWidths:n,ctx:r}=this,{align:s,labels:o}=t,a=$.color,l=St(t.rtl,this.left,this.width),c=oe(o.font),{padding:u}=o,d=c.size,h=d/2,m;this.drawTitle(),r.textAlign=l.textAlign("left"),r.textBaseline="middle",r.lineWidth=.5,r.font=c.string;let{boxWidth:g,boxHeight:_,itemHeight:p}=_u(o,d),f=function(b,A,S){if(isNaN(g)||g<=0||isNaN(_)||_<0)return;r.save();let D=B(S.lineWidth,1);if(r.fillStyle=B(S.fillStyle,a),r.lineCap=B(S.lineCap,"butt"),r.lineDashOffset=B(S.lineDashOffset,0),r.lineJoin=B(S.lineJoin,"miter"),r.lineWidth=D,r.strokeStyle=B(S.strokeStyle,a),r.setLineDash(B(S.lineDash,[])),o.usePointStyle){let T={radius:_*Math.SQRT2/2,pointStyle:S.pointStyle,rotation:S.rotation,borderWidth:D},E=l.xPlus(b,g/2),k=A+h;ks(r,T,E,k,o.pointStyleWidth&&g)}else{let T=A+Math.max((d-_)/2,0),E=l.leftForLtr(b,g),k=at(S.borderRadius);r.beginPath(),Object.values(k).some(X=>X!==0)?Ut(r,{x:E,y:T,w:g,h:_,radius:k}):r.rect(E,T,g,_),r.fill(),D!==0&&r.stroke()}r.restore()},C=function(b,A,S){ot(r,S.text,b,A+p/2,c,{strikethrough:S.hidden,textAlign:l.textAlign(S.textAlign)})},v=this.isHorizontal(),x=this._computeTitleHeight();v?m={x:pe(s,this.left+u,this.right-n[0]),y:this.top+u+x,line:0}:m={x:this.left+u,y:pe(s,this.top+x+u,this.bottom-e[0].height),line:0},Us(this.ctx,t.textDirection);let y=p+u;this.legendItems.forEach((b,A)=>{r.strokeStyle=b.fontColor,r.fillStyle=b.fontColor;let S=r.measureText(b.text).width,D=l.textAlign(b.textAlign||(b.textAlign=o.textAlign)),T=g+h+S,E=m.x,k=m.y;l.setWidth(this.width),v?A>0&&E+T+u>this.right&&(k=m.y+=y,m.line++,E=m.x=pe(s,this.left+u,this.right-n[m.line])):A>0&&k+y>this.bottom&&(E=m.x=E+e[m.line].width+u,m.line++,k=m.y=pe(s,this.top+x+u,this.bottom-e[m.line].height));let X=l.x(E);if(f(X,k,b),E=_c(D,E+g+h,v?E+T:this.right,t.rtl),C(l.x(E),k,b),v)m.x+=T+u;else if(typeof b.text!="string"){let re=c.lineHeight;m.y+=Zu(b,re)+u}else m.y+=y}),Gs(this.ctx,t.textDirection)}drawTitle(){let t=this.options,e=t.title,n=oe(e.font),r=me(e.padding);if(!e.display)return;let s=St(t.rtl,this.left,this.width),o=this.ctx,a=e.position,l=n.size/2,c=r.top+l,u,d=this.left,h=this.width;if(this.isHorizontal())h=Math.max(...this.lineWidths),u=this.top+c,d=pe(t.align,d,this.right-h);else{let g=this.columnSizes.reduce((_,p)=>Math.max(_,p.height),0);u=c+pe(t.align,this.top,this.bottom-g-t.labels.padding-this._computeTitleHeight())}let m=pe(a,d,d+h);o.textAlign=s.textAlign(qn(a)),o.textBaseline="middle",o.strokeStyle=e.color,o.fillStyle=e.color,o.font=n.string,ot(o,e.text,m,u,n)}_computeTitleHeight(){let t=this.options.title,e=oe(t.font),n=me(t.padding);return t.display?e.lineHeight+n.height:0}_getLegendItemAt(t,e){let n,r,s;if(ze(t,this.left,this.right)&&ze(e,this.top,this.bottom)){for(s=this.legendHitBoxes,n=0;ns.length>o.length?s:o)),t+e.size/2+n.measureText(r).width}function Wg(i,t,e){let n=i;return typeof t.text!="string"&&(n=Zu(t,e)),n}function Zu(i,t){let e=i.text?i.text.length:0;return t*e}function $g(i,t){return!!((i==="mousemove"||i==="mouseout")&&(t.onHover||t.onLeave)||t.onClick&&(i==="click"||i==="mouseup"))}var Xg={id:"legend",_element:hr,start(i,t,e){let n=i.legend=new hr({ctx:i.ctx,options:e,chart:i});_e.configure(i,n,e),_e.addBox(i,n)},stop(i){_e.removeBox(i,i.legend),delete i.legend},beforeUpdate(i,t,e){let n=i.legend;_e.configure(i,n,e),n.options=e},afterUpdate(i){let t=i.legend;t.buildLabels(),t.adjustHitBoxes()},afterEvent(i,t){t.replay||i.legend.handleEvent(t.event)},defaults:{display:!0,position:"top",align:"center",fullSize:!0,reverse:!1,weight:1e3,onClick(i,t,e){let n=t.datasetIndex,r=e.chart;r.isDatasetVisible(n)?(r.hide(n),t.hidden=!0):(r.show(n),t.hidden=!1)},onHover:null,onLeave:null,labels:{color:i=>i.chart.options.color,boxWidth:40,padding:10,generateLabels(i){let t=i.data.datasets,{labels:{usePointStyle:e,pointStyle:n,textAlign:r,color:s,useBorderRadius:o,borderRadius:a}}=i.legend.options;return i._getSortedDatasetMetas().map(l=>{let c=l.controller.getStyle(e?0:void 0),u=me(c.borderWidth);return{text:t[l.index].label,fillStyle:c.backgroundColor,fontColor:s,hidden:!l.visible,lineCap:c.borderCapStyle,lineDash:c.borderDash,lineDashOffset:c.borderDashOffset,lineJoin:c.borderJoinStyle,lineWidth:(u.width+u.height)/4,strokeStyle:c.borderColor,pointStyle:n||c.pointStyle,rotation:c.rotation,textAlign:r||c.textAlign,borderRadius:o&&(a||c.borderRadius),datasetIndex:l.index}},this)}},title:{color:i=>i.chart.options.color,display:!1,position:"center",text:""}},descriptors:{_scriptable:i=>!i.startsWith("on"),labels:{_scriptable:i=>!["generateLabels","filter","sort"].includes(i)}}},Ei=class extends Le{constructor(t){super(),this.chart=t.chart,this.options=t.options,this.ctx=t.ctx,this._padding=void 0,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.width=void 0,this.height=void 0,this.position=void 0,this.weight=void 0,this.fullSize=void 0}update(t,e){let n=this.options;if(this.left=0,this.top=0,!n.display){this.width=this.height=this.right=this.bottom=0;return}this.width=this.right=t,this.height=this.bottom=e;let r=J(n.text)?n.text.length:1;this._padding=me(n.padding);let s=r*oe(n.font).lineHeight+this._padding.height;this.isHorizontal()?this.height=s:this.width=s}isHorizontal(){let t=this.options.position;return t==="top"||t==="bottom"}_drawArgs(t){let{top:e,left:n,bottom:r,right:s,options:o}=this,a=o.align,l=0,c,u,d;return this.isHorizontal()?(u=pe(a,n,s),d=e+t,c=s-n):(o.position==="left"?(u=n+t,d=pe(a,r,e),l=H*-.5):(u=s-t,d=pe(a,e,r),l=H*.5),c=r-e),{titleX:u,titleY:d,maxWidth:c,rotation:l}}draw(){let t=this.ctx,e=this.options;if(!e.display)return;let n=oe(e.font),s=n.lineHeight/2+this._padding.top,{titleX:o,titleY:a,maxWidth:l,rotation:c}=this._drawArgs(s);ot(t,e.text,0,0,n,{color:e.color,maxWidth:l,rotation:c,textAlign:qn(e.align),textBaseline:"middle",translation:[o,a]})}};function Zg(i,t){let e=new Ei({ctx:i.ctx,options:t,chart:i});_e.configure(i,e,t),_e.addBox(i,e),i.titleBlock=e}var jg={id:"title",_element:Ei,start(i,t,e){Zg(i,e)},stop(i){let t=i.titleBlock;_e.removeBox(i,t),delete i.titleBlock},beforeUpdate(i,t,e){let n=i.titleBlock;_e.configure(i,n,e),n.options=e},defaults:{align:"center",display:!1,font:{weight:"bold"},fullSize:!0,padding:10,position:"top",text:"",weight:2e3},defaultRoutes:{color:"color"},descriptors:{_scriptable:!0,_indexable:!1}},ir=new WeakMap,e0={id:"subtitle",start(i,t,e){let n=new Ei({ctx:i.ctx,options:e,chart:i});_e.configure(i,n,e),_e.addBox(i,n),ir.set(i,n)},stop(i){_e.removeBox(i,ir.get(i)),ir.delete(i)},beforeUpdate(i,t,e){let n=ir.get(i);_e.configure(i,n,e),n.options=e},defaults:{align:"center",display:!1,font:{weight:"normal"},fullSize:!0,padding:0,position:"top",text:"",weight:1500},defaultRoutes:{color:"color"},descriptors:{_scriptable:!0,_indexable:!1}},Di={average(i){if(!i.length)return!1;let t,e,n=new Set,r=0,s=0;for(t=0,e=i.length;ta+l)/n.size,y:r/s}},nearest(i,t){if(!i.length)return!1;let e=t.x,n=t.y,r=Number.POSITIVE_INFINITY,s,o,a;for(s=0,o=i.length;s-1?i.split(` `):i}function t0(i,t){let{element:e,datasetIndex:n,index:r}=t,s=i.getDatasetMeta(n).controller,{label:o,value:a}=s.getLabelAndValue(r);return{chart:i,label:o,parsed:s.getParsed(r),raw:i.data.datasets[n].data[r],formattedValue:a,dataset:s.getDataset(),dataIndex:r,datasetIndex:n,element:e}}function Cu(i,t){let e=i.chart.ctx,{body:n,footer:r,title:s}=i,{boxWidth:o,boxHeight:a}=t,l=oe(t.bodyFont),c=oe(t.titleFont),u=oe(t.footerFont),d=s.length,h=r.length,m=n.length,g=me(t.padding),_=g.height,p=0,f=n.reduce((x,y)=>x+y.before.length+y.lines.length+y.after.length,0);if(f+=i.beforeBody.length+i.afterBody.length,d&&(_+=d*c.lineHeight+(d-1)*t.titleSpacing+t.titleMarginBottom),f){let x=t.displayColors?Math.max(a,l.lineHeight):l.lineHeight;_+=m*x+(f-m)*l.lineHeight+(f-1)*t.bodySpacing}h&&(_+=t.footerMarginTop+h*u.lineHeight+(h-1)*t.footerSpacing);let C=0,v=function(x){p=Math.max(p,e.measureText(x).width+C)};return e.save(),e.font=c.string,K(i.title,v),e.font=l.string,K(i.beforeBody.concat(i.afterBody),v),C=t.displayColors?o+2+t.boxPadding:0,K(n,x=>{K(x.before,v),K(x.lines,v),K(x.after,v)}),C=0,e.font=u.string,K(i.footer,v),e.restore(),p+=g.width,{width:p,height:_}}function i0(i,t){let{y:e,height:n}=t;return ei.height-n/2?"bottom":"center"}function n0(i,t,e,n){let{x:r,width:s}=n,o=e.caretSize+e.caretPadding;if(i==="left"&&r+s+o>t.width||i==="right"&&r-s-o<0)return!0}function r0(i,t,e,n){let{x:r,width:s}=e,{width:o,chartArea:{left:a,right:l}}=i,c="center";return n==="center"?c=r<=(a+l)/2?"left":"right":r<=s/2?c="left":r>=o-s/2&&(c="right"),n0(c,i,t,e)&&(c="center"),c}function yu(i,t,e){let n=e.yAlign||t.yAlign||i0(i,e);return{xAlign:e.xAlign||t.xAlign||r0(i,t,e,n),yAlign:n}}function s0(i,t){let{x:e,width:n}=i;return t==="right"?e-=n:t==="center"&&(e-=n/2),e}function o0(i,t,e){let{y:n,height:r}=i;return t==="top"?n+=e:t==="bottom"?n-=r+e:n-=r/2,n}function vu(i,t,e,n){let{caretSize:r,caretPadding:s,cornerRadius:o}=i,{xAlign:a,yAlign:l}=e,c=r+s,{topLeft:u,topRight:d,bottomLeft:h,bottomRight:m}=at(o),g=s0(t,a),_=o0(t,l,c);return l==="center"?a==="left"?g+=c:a==="right"&&(g-=c):a==="left"?g-=Math.max(u,h)+r:a==="right"&&(g+=Math.max(d,m)+r),{x:ae(g,0,n.width-t.width),y:ae(_,0,n.height-t.height)}}function nr(i,t,e){let n=me(e.padding);return t==="center"?i.x+i.width/2:t==="right"?i.x+i.width-n.right:i.x+n.left}function xu(i){return Ue([],Xe(i))}function a0(i,t,e){return We(i,{tooltip:t,tooltipItems:e,type:"tooltip"})}function bu(i,t){let e=t&&t.dataset&&t.dataset.tooltip&&t.dataset.tooltip.callbacks;return e?i.override(e):i}var ju={beforeTitle:Ve,title(i){if(i.length>0){let t=i[0],e=t.chart.data.labels,n=e?e.length:0;if(this&&this.options&&this.options.mode==="dataset")return t.dataset.label||"";if(t.label)return t.label;if(n>0&&t.dataIndex"u"?ju[t].call(e,n):r}var Su=(()=>{class i extends Le{static positioners=Di;constructor(e){super(),this.opacity=0,this._active=[],this._eventPosition=void 0,this._size=void 0,this._cachedAnimations=void 0,this._tooltipItems=[],this.$animations=void 0,this.$context=void 0,this.chart=e.chart,this.options=e.options,this.dataPoints=void 0,this.title=void 0,this.beforeBody=void 0,this.body=void 0,this.afterBody=void 0,this.footer=void 0,this.xAlign=void 0,this.yAlign=void 0,this.x=void 0,this.y=void 0,this.height=void 0,this.width=void 0,this.caretX=void 0,this.caretY=void 0,this.labelColors=void 0,this.labelPointStyles=void 0,this.labelTextColors=void 0}initialize(e){this.options=e,this._cachedAnimations=void 0,this.$context=void 0}_resolveAnimations(){let e=this._cachedAnimations;if(e)return e;let n=this.chart,r=this.options.setContext(this.getContext()),s=r.enabled&&n.options.animation&&r.animations,o=new ar(this.chart,s);return s._cacheable&&(this._cachedAnimations=Object.freeze(o)),o}getContext(){return this.$context||(this.$context=a0(this.chart.getContext(),this,this._tooltipItems))}getTitle(e,n){let{callbacks:r}=n,s=Ie(r,"beforeTitle",this,e),o=Ie(r,"title",this,e),a=Ie(r,"afterTitle",this,e),l=[];return l=Ue(l,Xe(s)),l=Ue(l,Xe(o)),l=Ue(l,Xe(a)),l}getBeforeBody(e,n){return xu(Ie(n.callbacks,"beforeBody",this,e))}getBody(e,n){let{callbacks:r}=n,s=[];return K(e,o=>{let a={before:[],lines:[],after:[]},l=bu(r,o);Ue(a.before,Xe(Ie(l,"beforeLabel",this,o))),Ue(a.lines,Ie(l,"label",this,o)),Ue(a.after,Xe(Ie(l,"afterLabel",this,o))),s.push(a)}),s}getAfterBody(e,n){return xu(Ie(n.callbacks,"afterBody",this,e))}getFooter(e,n){let{callbacks:r}=n,s=Ie(r,"beforeFooter",this,e),o=Ie(r,"footer",this,e),a=Ie(r,"afterFooter",this,e),l=[];return l=Ue(l,Xe(s)),l=Ue(l,Xe(o)),l=Ue(l,Xe(a)),l}_createItems(e){let n=this._active,r=this.chart.data,s=[],o=[],a=[],l=[],c,u;for(c=0,u=n.length;ce.filter(d,h,m,r))),e.itemSort&&(l=l.sort((d,h)=>e.itemSort(d,h,r))),K(l,d=>{let h=bu(e.callbacks,d);s.push(Ie(h,"labelColor",this,d)),o.push(Ie(h,"labelPointStyle",this,d)),a.push(Ie(h,"labelTextColor",this,d))}),this.labelColors=s,this.labelPointStyles=o,this.labelTextColors=a,this.dataPoints=l,l}update(e,n){let r=this.options.setContext(this.getContext()),s=this._active,o,a=[];if(!s.length)this.opacity!==0&&(o={opacity:0});else{let l=Di[r.position].call(this,s,this._eventPosition);a=this._createItems(r),this.title=this.getTitle(a,r),this.beforeBody=this.getBeforeBody(a,r),this.body=this.getBody(a,r),this.afterBody=this.getAfterBody(a,r),this.footer=this.getFooter(a,r);let c=this._size=Cu(this,r),u=Object.assign({},l,c),d=yu(this.chart,r,u),h=vu(r,u,d,this.chart);this.xAlign=d.xAlign,this.yAlign=d.yAlign,o={opacity:1,x:h.x,y:h.y,width:c.width,height:c.height,caretX:l.x,caretY:l.y}}this._tooltipItems=a,this.$context=void 0,o&&this._resolveAnimations().update(this,o),e&&r.external&&r.external.call(this,{chart:this.chart,tooltip:this,replay:n})}drawCaret(e,n,r,s){let o=this.getCaretPosition(e,r,s);n.lineTo(o.x1,o.y1),n.lineTo(o.x2,o.y2),n.lineTo(o.x3,o.y3)}getCaretPosition(e,n,r){let{xAlign:s,yAlign:o}=this,{caretSize:a,cornerRadius:l}=r,{topLeft:c,topRight:u,bottomLeft:d,bottomRight:h}=at(l),{x:m,y:g}=e,{width:_,height:p}=n,f,C,v,x,y,b;return o==="center"?(y=g+p/2,s==="left"?(f=m,C=f-a,x=y+a,b=y-a):(f=m+_,C=f+a,x=y-a,b=y+a),v=f):(s==="left"?C=m+Math.max(c,d)+a:s==="right"?C=m+_-Math.max(u,h)-a:C=this.caretX,o==="top"?(x=g,y=x-a,f=C-a,v=C+a):(x=g+p,y=x+a,f=C+a,v=C-a),b=x),{x1:f,x2:C,x3:v,y1:x,y2:y,y3:b}}drawTitle(e,n,r){let s=this.title,o=s.length,a,l,c;if(o){let u=St(r.rtl,this.x,this.width);for(e.x=nr(this,r.titleAlign,r),n.textAlign=u.textAlign(r.titleAlign),n.textBaseline="middle",a=oe(r.titleFont),l=r.titleSpacing,n.fillStyle=r.titleColor,n.font=a.string,c=0;cv!==0)?(e.beginPath(),e.fillStyle=o.multiKeyBackground,Ut(e,{x:p,y:_,w:u,h:c,radius:C}),e.fill(),e.stroke(),e.fillStyle=a.backgroundColor,e.beginPath(),Ut(e,{x:f,y:_+1,w:u-2,h:c-2,radius:C}),e.fill()):(e.fillStyle=o.multiKeyBackground,e.fillRect(p,_,u,c),e.strokeRect(p,_,u,c),e.fillStyle=a.backgroundColor,e.fillRect(f,_+1,u-2,c-2))}e.fillStyle=this.labelTextColors[r]}drawBody(e,n,r){let{body:s}=this,{bodySpacing:o,bodyAlign:a,displayColors:l,boxHeight:c,boxWidth:u,boxPadding:d}=r,h=oe(r.bodyFont),m=h.lineHeight,g=0,_=St(r.rtl,this.x,this.width),p=function(D){n.fillText(D,_.x(e.x+g),e.y+m/2),e.y+=m+o},f=_.textAlign(a),C,v,x,y,b,A,S;for(n.textAlign=a,n.textBaseline="middle",n.font=h.string,e.x=nr(this,f,r),n.fillStyle=r.bodyColor,K(this.beforeBody,p),g=l&&f!=="right"?a==="center"?u/2+d:u+2+d:0,y=0,A=s.length;y0&&n.stroke()}_updateAnimationTarget(e){let n=this.chart,r=this.$animations,s=r&&r.x,o=r&&r.y;if(s||o){let a=Di[e.position].call(this,this._active,this._eventPosition);if(!a)return;let l=this._size=Cu(this,e),c=Object.assign({},a,this._size),u=yu(n,e,c),d=vu(e,c,u,n);(s._to!==d.x||o._to!==d.y)&&(this.xAlign=u.xAlign,this.yAlign=u.yAlign,this.width=l.width,this.height=l.height,this.caretX=a.x,this.caretY=a.y,this._resolveAnimations().update(this,d))}}_willRender(){return!!this.opacity}draw(e){let n=this.options.setContext(this.getContext()),r=this.opacity;if(!r)return;this._updateAnimationTarget(n);let s={width:this.width,height:this.height},o={x:this.x,y:this.y};r=Math.abs(r)<.001?0:r;let a=me(n.padding),l=this.title.length||this.beforeBody.length||this.body.length||this.afterBody.length||this.footer.length;n.enabled&&l&&(e.save(),e.globalAlpha=r,this.drawBackground(o,e,s,n),Us(e,n.textDirection),o.y+=a.top,this.drawTitle(o,e,n),this.drawBody(o,e,n),this.drawFooter(o,e,n),Gs(e,n.textDirection),e.restore())}getActiveElements(){return this._active||[]}setActiveElements(e,n){let r=this._active,s=e.map(({datasetIndex:l,index:c})=>{let u=this.chart.getDatasetMeta(l);if(!u)throw new Error("Cannot find a dataset at index "+l);return{datasetIndex:l,element:u.data[c],index:c}}),o=!_i(r,s),a=this._positionChanged(s,n);(o||a)&&(this._active=s,this._eventPosition=n,this._ignoreReplayEvents=!0,this.update(!0))}handleEvent(e,n,r=!0){if(n&&this._ignoreReplayEvents)return!1;this._ignoreReplayEvents=!1;let s=this.options,o=this._active||[],a=this._getActiveElements(e,o,n,r),l=this._positionChanged(a,e),c=n||!_i(a,o)||l;return c&&(this._active=a,(s.enabled||s.external)&&(this._eventPosition={x:e.x,y:e.y},this.update(!0,n))),c}_getActiveElements(e,n,r,s){let o=this.options;if(e.type==="mouseout")return[];if(!s)return n.filter(l=>this.chart.data.datasets[l.datasetIndex]&&this.chart.getDatasetMeta(l.datasetIndex).controller.getParsed(l.index)!==void 0);let a=this.chart.getElementsAtEventForMode(e,o.mode,o,r);return o.reverse&&a.reverse(),a}_positionChanged(e,n){let{caretX:r,caretY:s,options:o}=this,a=Di[o.position].call(this,e,n);return a!==!1&&(r!==a.x||s!==a.y)}}return i})(),l0={id:"tooltip",_element:Su,positioners:Di,afterInit(i,t,e){e&&(i.tooltip=new Su({chart:i,options:e}))},beforeUpdate(i,t,e){i.tooltip&&i.tooltip.initialize(e)},reset(i,t,e){i.tooltip&&i.tooltip.initialize(e)},afterDraw(i){let t=i.tooltip;if(t&&t._willRender()){let e={tooltip:t};if(i.notifyPlugins("beforeTooltipDraw",V(L({},e),{cancelable:!0}))===!1)return;t.draw(i.ctx),i.notifyPlugins("afterTooltipDraw",e)}},afterEvent(i,t){if(i.tooltip){let e=t.replay;i.tooltip.handleEvent(t.event,e,t.inChartArea)&&(t.changed=!0)}},defaults:{enabled:!0,external:null,position:"average",backgroundColor:"rgba(0,0,0,0.8)",titleColor:"#fff",titleFont:{weight:"bold"},titleSpacing:2,titleMarginBottom:6,titleAlign:"left",bodyColor:"#fff",bodySpacing:2,bodyFont:{},bodyAlign:"left",footerColor:"#fff",footerSpacing:2,footerMarginTop:6,footerFont:{weight:"bold"},footerAlign:"left",padding:6,caretPadding:2,caretSize:5,cornerRadius:6,boxHeight:(i,t)=>t.bodyFont.size,boxWidth:(i,t)=>t.bodyFont.size,multiKeyBackground:"#fff",displayColors:!0,boxPadding:0,borderColor:"rgba(0,0,0,0)",borderWidth:0,animation:{duration:400,easing:"easeOutQuart"},animations:{numbers:{type:"number",properties:["x","y","width","height","caretX","caretY"]},opacity:{easing:"linear",duration:200}},callbacks:ju},defaultRoutes:{bodyFont:"font",footerFont:"font",titleFont:"font"},descriptors:{_scriptable:i=>i!=="filter"&&i!=="itemSort"&&i!=="external",_indexable:!1,callbacks:{_scriptable:!1,_indexable:!1},animation:{_fallback:!1},animations:{_fallback:"animation"}},additionalOptionScopes:["interaction"]},c0=Object.freeze({__proto__:null,Colors:xg,Decimation:Ag,Filler:qg,Legend:Xg,SubTitle:e0,Title:jg,Tooltip:l0}),u0=(i,t,e,n)=>(typeof t=="string"?(e=i.push(t)-1,n.unshift({index:e,label:t})):isNaN(t)&&(e=null),e);function d0(i,t,e,n){let r=i.indexOf(t);if(r===-1)return u0(i,t,e,n);let s=i.lastIndexOf(t);return r!==s?e:r}var h0=(i,t)=>i===null?null:ae(Math.round(i),0,t);function Iu(i){let t=this.getLabels();return i>=0&&i{class i extends wt{static id="category";static defaults={ticks:{callback:Iu}};constructor(e){super(e),this._startValue=void 0,this._valueRange=0,this._addedLabels=[]}init(e){let n=this._addedLabels;if(n.length){let r=this.getLabels();for(let{index:s,label:o}of n)r[s]===o&&r.splice(s,1);this._addedLabels=[]}super.init(e)}parse(e,n){if(R(e))return null;let r=this.getLabels();return n=isFinite(n)&&r[n]===e?n:d0(r,e,B(n,e),this._addedLabels),h0(n,r.length-1)}determineDataLimits(){let{minDefined:e,maxDefined:n}=this.getUserBounds(),{min:r,max:s}=this.getMinMax(!0);this.options.bounds==="ticks"&&(e||(r=0),n||(s=this.getLabels().length-1)),this.min=r,this.max=s}buildTicks(){let e=this.min,n=this.max,r=this.options.offset,s=[],o=this.getLabels();o=e===0&&n===o.length-1?o:o.slice(e,n+1),this._valueRange=Math.max(o.length-(r?0:1),1),this._startValue=this.min-(r?.5:0);for(let a=e;a<=n;a++)s.push({value:a});return s}getLabelForValue(e){return Iu.call(this,e)}configure(){super.configure(),this.isHorizontal()||(this._reversePixels=!this._reversePixels)}getPixelForValue(e){return typeof e!="number"&&(e=this.parse(e)),e===null?NaN:this.getPixelForDecimal((e-this._startValue)/this._valueRange)}getPixelForTick(e){let n=this.ticks;return e<0||e>n.length-1?null:this.getPixelForValue(n[e].value)}getValueForPixel(e){return Math.round(this._startValue+this.getDecimalForPixel(e)*this._valueRange)}getBasePixel(){return this.bottom}}return i})();function m0(i,t){let e=[],{bounds:r,step:s,min:o,max:a,precision:l,count:c,maxTicks:u,maxDigits:d,includeBounds:h}=i,m=s||1,g=u-1,{min:_,max:p}=t,f=!R(o),C=!R(a),v=!R(c),x=(p-_)/(d+1),y=vs((p-_)/g/m)*m,b,A,S,D;if(y<1e-14&&!f&&!C)return[{value:_},{value:p}];D=Math.ceil(p/y)-Math.floor(_/y),D>g&&(y=vs(D*y/g/m)*m),R(l)||(b=Math.pow(10,l),y=Math.ceil(y*b)/b),r==="ticks"?(A=Math.floor(_/y)*y,S=Math.ceil(p/y)*y):(A=_,S=p),f&&C&&s&&uc((a-o)/s,y/1e3)?(D=Math.round(Math.min((a-o)/y,u)),y=(a-o)/D,A=o,S=a):v?(A=f?o:A,S=C?a:S,D=c-1,y=(S-A)/D):(D=(S-A)/y,Ft(D,Math.round(D),y/1e3)?D=Math.round(D):D=Math.ceil(D));let T=Math.max(bs(y),bs(A));b=Math.pow(10,R(l)?T:l),A=Math.round(A*b)/b,S=Math.round(S*b)/b;let E=0;for(f&&(h&&A!==o?(e.push({value:o}),Aa)break;e.push({value:k})}return C&&h&&S!==a?e.length&&Ft(e[e.length-1].value,a,Au(a,x,i))?e[e.length-1].value=a:e.push({value:a}):(!C||S===a)&&e.push({value:S}),e}function Au(i,t,{horizontal:e,minRotation:n}){let r=Te(n),s=(e?Math.sin(r):Math.cos(r))||.001,o=.75*t*(""+i).length;return Math.min(t/s,o)}var qt=class extends wt{constructor(t){super(t),this.start=void 0,this.end=void 0,this._startValue=void 0,this._endValue=void 0,this._valueRange=0}parse(t,e){return R(t)||(typeof t=="number"||t instanceof Number)&&!isFinite(+t)?null:+t}handleTickRangeOptions(){let{beginAtZero:t}=this.options,{minDefined:e,maxDefined:n}=this.getUserBounds(),{min:r,max:s}=this,o=l=>r=e?r:l,a=l=>s=n?s:l;if(t){let l=Be(r),c=Be(s);l<0&&c<0?a(0):l>0&&c>0&&o(0)}if(r===s){let l=s===0?1:Math.abs(s*.05);a(s+l),t||o(r-l)}this.min=r,this.max=s}getTickLimit(){let t=this.options.ticks,{maxTicksLimit:e,stepSize:n}=t,r;return n?(r=Math.ceil(this.max/n)-Math.floor(this.min/n)+1,r>1e3&&(console.warn(`scales.${this.id}.ticks.stepSize: ${n} would result generating up to ${r} ticks. Limiting to 1000.`),r=1e3)):(r=this.computeTickLimit(),e=e||11),e&&(r=Math.min(e,r)),r}computeTickLimit(){return Number.POSITIVE_INFINITY}buildTicks(){let t=this.options,e=t.ticks,n=this.getTickLimit();n=Math.max(2,n);let r={maxTicks:n,bounds:t.bounds,min:t.min,max:t.max,precision:e.precision,step:e.stepSize,count:e.count,maxDigits:this._maxDigits(),horizontal:this.isHorizontal(),minRotation:e.minRotation||0,includeBounds:e.includeBounds!==!1},s=this._range||this,o=m0(r,s);return t.bounds==="ticks"&&xs(o,this,"value"),t.reverse?(o.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),o}configure(){let t=this.ticks,e=this.min,n=this.max;if(super.configure(),this.options.offset&&t.length){let r=(n-e)/Math.max(t.length-1,1)/2;e-=r,n+=r}this._startValue=e,this._endValue=n,this._valueRange=n-e}getLabelForValue(t){return zt(t,this.chart.options.locale,this.options.ticks.format)}},yo=class extends qt{static id="linear";static defaults={ticks:{callback:Ci.formatters.numeric}};determineDataLimits(){let{min:t,max:e}=this.getMinMax(!0);this.min=ee(t)?t:0,this.max=ee(e)?e:1,this.handleTickRangeOptions()}computeTickLimit(){let t=this.isHorizontal(),e=t?this.width:this.height,n=Te(this.options.ticks.minRotation),r=(t?Math.sin(n):Math.cos(n))||.001,s=this._resolveTickFontOptions(0);return Math.ceil(e/Math.min(40,s.lineHeight/r))}getPixelForValue(t){return t===null?NaN:this.getPixelForDecimal((t-this._startValue)/this._valueRange)}getValueForPixel(t){return this._startValue+this.getDecimalForPixel(t)*this._valueRange}},Pi=i=>Math.floor(Qe(i)),At=(i,t)=>Math.pow(10,Pi(i)+t);function wu(i){return i/Math.pow(10,Pi(i))===1}function Du(i,t,e){let n=Math.pow(10,e),r=Math.floor(i/n);return Math.ceil(t/n)-r}function f0(i,t){let e=t-i,n=Pi(e);for(;Du(i,t,n)>10;)n++;for(;Du(i,t,n)<10;)n--;return Math.min(n,Pi(i))}function g0(i,{min:t,max:e}){t=Se(i.min,t);let n=[],r=Pi(t),s=f0(t,e),o=s<0?Math.pow(10,Math.abs(s)):1,a=Math.pow(10,s),l=r>s?Math.pow(10,r):0,c=Math.round((t-l)*o)/o,u=Math.floor((t-l)/a/10)*a*10,d=Math.floor((c-u)/Math.pow(10,s)),h=Se(i.min,Math.round((l+u+d*Math.pow(10,s))*o)/o);for(;h=10?d=d<15?15:20:d++,d>=20&&(s++,d=2,o=s>=0?1:o),h=Math.round((l+u+d*Math.pow(10,s))*o)/o;let m=Se(i.max,h);return n.push({value:m,major:wu(m),significand:d}),n}var vo=class extends wt{static id="logarithmic";static defaults={ticks:{callback:Ci.formatters.logarithmic,major:{enabled:!0}}};constructor(t){super(t),this.start=void 0,this.end=void 0,this._startValue=void 0,this._valueRange=0}parse(t,e){let n=qt.prototype.parse.apply(this,[t,e]);if(n===0){this._zero=!0;return}return ee(n)&&n>0?n:null}determineDataLimits(){let{min:t,max:e}=this.getMinMax(!0);this.min=ee(t)?Math.max(0,t):null,this.max=ee(e)?Math.max(0,e):null,this.options.beginAtZero&&(this._zero=!0),this._zero&&this.min!==this._suggestedMin&&!ee(this._userMin)&&(this.min=t===At(this.min,0)?At(this.min,-1):At(this.min,0)),this.handleTickRangeOptions()}handleTickRangeOptions(){let{minDefined:t,maxDefined:e}=this.getUserBounds(),n=this.min,r=this.max,s=a=>n=t?n:a,o=a=>r=e?r:a;n===r&&(n<=0?(s(1),o(10)):(s(At(n,-1)),o(At(r,1)))),n<=0&&s(At(r,-1)),r<=0&&o(At(n,1)),this.min=n,this.max=r}buildTicks(){let t=this.options,e={min:this._userMin,max:this._userMax},n=g0(e,this);return t.bounds==="ticks"&&xs(n,this,"value"),t.reverse?(n.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),n}getLabelForValue(t){return t===void 0?"0":zt(t,this.chart.options.locale,this.options.ticks.format)}configure(){let t=this.min;super.configure(),this._startValue=Qe(t),this._valueRange=Qe(this.max)-Qe(t)}getPixelForValue(t){return(t===void 0||t===0)&&(t=this.min),t===null||isNaN(t)?NaN:this.getPixelForDecimal(t===this.min?0:(Qe(t)-this._startValue)/this._valueRange)}getValueForPixel(t){let e=this.getDecimalForPixel(t);return Math.pow(10,this._startValue+e*this._valueRange)}};function xo(i){let t=i.ticks;if(t.display&&i.display){let e=me(t.backdropPadding);return B(t.font&&t.font.size,$.font.size)+e.height}return 0}function _0(i,t,e){return e=J(e)?e:[e],{w:yc(i,t.string,e),h:e.length*t.lineHeight}}function Ou(i,t,e,n,r){return i===n||i===r?{start:t-e/2,end:t+e/2}:ir?{start:t-e,end:t}:{start:t,end:t+e}}function C0(i){let t={l:i.left+i._padding.left,r:i.right-i._padding.right,t:i.top+i._padding.top,b:i.bottom-i._padding.bottom},e=Object.assign({},t),n=[],r=[],s=i._pointLabels.length,o=i.options.pointLabels,a=o.centerPointLabels?H/s:0;for(let l=0;lt.r&&(a=(n.end-t.r)/s,i.r=Math.max(i.r,t.r+a)),r.startt.b&&(l=(r.end-t.b)/o,i.b=Math.max(i.b,t.b+l))}function v0(i,t,e){let n=i.drawingArea,{extra:r,additionalAngle:s,padding:o,size:a}=e,l=i.getPointPosition(t,n+r+o,s),c=Math.round(Hn(he(l.angle+ie))),u=A0(l.y,a.h,c),d=S0(c),h=I0(l.x,a.w,d);return{visible:!0,x:l.x,y:u,textAlign:d,left:h,top:u,right:h+a.w,bottom:u+a.h}}function x0(i,t){if(!t)return!0;let{left:e,top:n,right:r,bottom:s}=i;return!(Fe({x:e,y:n},t)||Fe({x:e,y:s},t)||Fe({x:r,y:n},t)||Fe({x:r,y:s},t))}function b0(i,t,e){let n=[],r=i._pointLabels.length,s=i.options,{centerPointLabels:o,display:a}=s.pointLabels,l={extra:xo(s)/2,additionalAngle:o?H/r:0},c;for(let u=0;u270||e<90)&&(i-=t),i}function w0(i,t,e){let{left:n,top:r,right:s,bottom:o}=e,{backdropColor:a}=t;if(!R(a)){let l=at(t.borderRadius),c=me(t.backdropPadding);i.fillStyle=a;let u=n-c.left,d=r-c.top,h=s-n+c.width,m=o-r+c.height;Object.values(l).some(g=>g!==0)?(i.beginPath(),Ut(i,{x:u,y:d,w:h,h:m,radius:l}),i.fill()):i.fillRect(u,d,h,m)}}function D0(i,t){let{ctx:e,options:{pointLabels:n}}=i;for(let r=t-1;r>=0;r--){let s=i._pointLabelItems[r];if(!s.visible)continue;let o=n.setContext(i.getPointLabelContext(r));w0(e,o,s);let a=oe(o.font),{x:l,y:c,textAlign:u}=s;ot(e,i._pointLabels[r],l,c+a.lineHeight/2,a,{color:o.color,textAlign:u,textBaseline:"middle"})}}function ed(i,t,e,n){let{ctx:r}=i;if(e)r.arc(i.xCenter,i.yCenter,t,0,W);else{let s=i.getPointPosition(0,t);r.moveTo(s.x,s.y);for(let o=1;o{let r=Q(this.options.pointLabels.callback,[e,n],this);return r||r===0?r:""}).filter((e,n)=>this.chart.getDataVisibility(n))}fit(){let t=this.options;t.display&&t.pointLabels.display?C0(this):this.setCenterPoint(0,0,0,0)}setCenterPoint(t,e,n,r){this.xCenter+=Math.floor((t-e)/2),this.yCenter+=Math.floor((n-r)/2),this.drawingArea-=Math.min(this.drawingArea/2,Math.max(t,e,n,r))}getIndexAngle(t){let e=W/(this._pointLabels.length||1),n=this.options.startAngle||0;return he(t*e+Te(n))}getDistanceFromCenterForValue(t){if(R(t))return NaN;let e=this.drawingArea/(this.max-this.min);return this.options.reverse?(this.max-t)*e:(t-this.min)*e}getValueForDistanceFromCenter(t){if(R(t))return NaN;let e=t/(this.drawingArea/(this.max-this.min));return this.options.reverse?this.max-e:this.min+e}getPointLabelContext(t){let e=this._pointLabels||[];if(t>=0&&t{if(d!==0||d===0&&this.min<0){l=this.getDistanceFromCenterForValue(u.value);let h=this.getContext(d),m=r.setContext(h),g=s.setContext(h);O0(this,m,l,o,g)}}),n.display){for(t.save(),a=o-1;a>=0;a--){let u=n.setContext(this.getPointLabelContext(a)),{color:d,lineWidth:h}=u;!h||!d||(t.lineWidth=h,t.strokeStyle=d,t.setLineDash(u.borderDash),t.lineDashOffset=u.borderDashOffset,l=this.getDistanceFromCenterForValue(e.reverse?this.min:this.max),c=this.getPointPosition(a,l),t.beginPath(),t.moveTo(this.xCenter,this.yCenter),t.lineTo(c.x,c.y),t.stroke())}t.restore()}}drawBorder(){}drawLabels(){let t=this.ctx,e=this.options,n=e.ticks;if(!n.display)return;let r=this.getIndexAngle(0),s,o;t.save(),t.translate(this.xCenter,this.yCenter),t.rotate(r),t.textAlign="center",t.textBaseline="middle",this.ticks.forEach((a,l)=>{if(l===0&&this.min>=0&&!e.reverse)return;let c=n.setContext(this.getContext(l)),u=oe(c.font);if(s=this.getDistanceFromCenterForValue(this.ticks[l].value),c.showLabelBackdrop){t.font=u.string,o=t.measureText(a.label).width,t.fillStyle=c.backdropColor;let d=me(c.backdropPadding);t.fillRect(-o/2-d.left,-s-u.size/2-d.top,o+d.width,u.size+d.height)}ot(t,a.label,0,-s,u,{color:c.color,strokeColor:c.textStrokeColor,strokeWidth:c.textStrokeWidth})}),t.restore()}drawTitle(){}},fr={millisecond:{common:!0,size:1,steps:1e3},second:{common:!0,size:1e3,steps:60},minute:{common:!0,size:6e4,steps:60},hour:{common:!0,size:36e5,steps:24},day:{common:!0,size:864e5,steps:30},week:{common:!1,size:6048e5,steps:4},month:{common:!0,size:2628e6,steps:12},quarter:{common:!1,size:7884e6,steps:4},year:{common:!0,size:3154e7}},Ae=Object.keys(fr);function Eu(i,t){return i-t}function Pu(i,t){if(R(t))return null;let e=i._adapter,{parser:n,round:r,isoWeekday:s}=i._parseOpts,o=t;return typeof n=="function"&&(o=n(o)),ee(o)||(o=typeof n=="string"?e.parse(o,n):e.parse(o)),o===null?null:(r&&(o=r==="week"&&(bt(s)||s===!0)?e.startOf(o,"isoWeek",s):e.startOf(o,r)),+o)}function Tu(i,t,e,n){let r=Ae.length;for(let s=Ae.indexOf(i);s=Ae.indexOf(e);s--){let o=Ae[s];if(fr[o].common&&i._adapter.diff(r,n,o)>=t-1)return o}return Ae[e?Ae.indexOf(e):0]}function T0(i){for(let t=Ae.indexOf(i)+1,e=Ae.length;t=t?e[n]:e[r];i[s]=!0}}function M0(i,t,e,n){let r=i._adapter,s=+r.startOf(t[0].value,n),o=t[t.length-1].value,a,l;for(a=s;a<=o;a=+r.add(a,1,n))l=e[a],l>=0&&(t[l].major=!0);return t}function ku(i,t,e){let n=[],r={},s=t.length,o,a;for(o=0;o{class i extends wt{static id="time";static defaults={bounds:"data",adapters:{},time:{parser:!1,unit:!1,round:!1,isoWeekday:!1,minUnit:"millisecond",displayFormats:{}},ticks:{source:"auto",callback:!1,major:{enabled:!1}}};constructor(e){super(e),this._cache={data:[],labels:[],all:[]},this._unit="day",this._majorUnit=void 0,this._offsets={},this._normalized=!1,this._parseOpts=void 0}init(e,n={}){let r=e.time||(e.time={}),s=this._adapter=new Gm._date(e.adapters.date);s.init(n),Lt(r.displayFormats,s.formats()),this._parseOpts={parser:r.parser,round:r.round,isoWeekday:r.isoWeekday},super.init(e),this._normalized=n.normalized}parse(e,n){return e===void 0?null:Pu(this,e)}beforeLayout(){super.beforeLayout(),this._cache={data:[],labels:[],all:[]}}determineDataLimits(){let e=this.options,n=this._adapter,r=e.time.unit||"day",{min:s,max:o,minDefined:a,maxDefined:l}=this.getUserBounds();function c(u){!a&&!isNaN(u.min)&&(s=Math.min(s,u.min)),!l&&!isNaN(u.max)&&(o=Math.max(o,u.max))}(!a||!l)&&(c(this._getLabelBounds()),(e.bounds!=="ticks"||e.ticks.source!=="labels")&&c(this.getMinMax(!1))),s=ee(s)&&!isNaN(s)?s:+n.startOf(Date.now(),r),o=ee(o)&&!isNaN(o)?o:+n.endOf(Date.now(),r)+1,this.min=Math.min(s,o-1),this.max=Math.max(s+1,o)}_getLabelBounds(){let e=this.getLabelTimestamps(),n=Number.POSITIVE_INFINITY,r=Number.NEGATIVE_INFINITY;return e.length&&(n=e[0],r=e[e.length-1]),{min:n,max:r}}buildTicks(){let e=this.options,n=e.time,r=e.ticks,s=r.source==="labels"?this.getLabelTimestamps():this._generate();e.bounds==="ticks"&&s.length&&(this.min=this._userMin||s[0],this.max=this._userMax||s[s.length-1]);let o=this.min,a=this.max,l=pc(s,o,a);return this._unit=n.unit||(r.autoSkip?Tu(n.minUnit,this.min,this.max,this._getLabelCapacity(o)):P0(this,l.length,n.minUnit,this.min,this.max)),this._majorUnit=!r.major.enabled||this._unit==="year"?void 0:T0(this._unit),this.initOffsets(s),e.reverse&&l.reverse(),ku(this,l,this._majorUnit)}afterAutoSkip(){this.options.offsetAfterAutoskip&&this.initOffsets(this.ticks.map(e=>+e.value))}initOffsets(e=[]){let n=0,r=0,s,o;this.options.offset&&e.length&&(s=this.getDecimalForValue(e[0]),e.length===1?n=1-s:n=(this.getDecimalForValue(e[1])-s)/2,o=this.getDecimalForValue(e[e.length-1]),e.length===1?r=o:r=(o-this.getDecimalForValue(e[e.length-2]))/2);let a=e.length<3?.5:.25;n=ae(n,0,a),r=ae(r,0,a),this._offsets={start:n,end:r,factor:1/(n+1+r)}}_generate(){let e=this._adapter,n=this.min,r=this.max,s=this.options,o=s.time,a=o.unit||Tu(o.minUnit,n,r,this._getLabelCapacity(n)),l=B(s.ticks.stepSize,1),c=a==="week"?o.isoWeekday:!1,u=bt(c)||c===!0,d={},h=n,m,g;if(u&&(h=+e.startOf(h,"isoWeek",c)),h=+e.startOf(h,u?"day":a),e.diff(r,n,a)>1e5*l)throw new Error(n+" and "+r+" are too far apart with stepSize of "+l+" "+a);let _=s.ticks.source==="data"&&this.getDataTimestamps();for(m=h,g=0;m+p)}getLabelForValue(e){let n=this._adapter,r=this.options.time;return r.tooltipFormat?n.format(e,r.tooltipFormat):n.format(e,r.displayFormats.datetime)}format(e,n){let s=this.options.time.displayFormats,o=this._unit,a=n||s[o];return this._adapter.format(e,a)}_tickFormatFunction(e,n,r,s){let o=this.options,a=o.ticks.callback;if(a)return Q(a,[e,n,r],this);let l=o.time.displayFormats,c=this._unit,u=this._majorUnit,d=c&&l[c],h=u&&l[u],m=r[n],g=u&&h&&m&&m.major;return this._adapter.format(e,s||(g?h:d))}generateTickLabels(e){let n,r,s;for(n=0,r=e.length;n0?l:1}getDataTimestamps(){let e=this._cache.data||[],n,r;if(e.length)return e;let s=this.getMatchingVisibleMetas();if(this._normalized&&s.length)return this._cache.data=s[0].controller.getAllParsedValues(this);for(n=0,r=s.length;n=i[n].pos&&t<=i[r].pos&&({lo:n,hi:r}=Re(i,"pos",t)),{pos:s,time:a}=i[n],{pos:o,time:l}=i[r]):(t>=i[n].time&&t<=i[r].time&&({lo:n,hi:r}=Re(i,"time",t)),{time:s,pos:a}=i[n],{time:o,pos:l}=i[r]);let c=o-s;return c?a+(l-a)*(t-s)/c:a}var Io=class extends So{static id="timeseries";static defaults=So.defaults;constructor(t){super(t),this._table=[],this._minPos=void 0,this._tableRange=void 0}initOffsets(){let t=this._getTimestampsForTable(),e=this._table=this.buildLookupTable(t);this._minPos=rr(e,this.min),this._tableRange=rr(e,this.max)-this._minPos,super.initOffsets(t)}buildLookupTable(t){let{min:e,max:n}=this,r=[],s=[],o,a,l,c,u;for(o=0,a=t.length;o=e&&c<=n&&r.push(c);if(r.length<2)return[{time:e,pos:0},{time:n,pos:1}];for(o=0,a=r.length;or-s)}_getTimestampsForTable(){let t=this._cache.all||[];if(t.length)return t;let e=this.getDataTimestamps(),n=this.getLabelTimestamps();return e.length&&n.length?t=this.normalize(e.concat(n)):t=e.length?e:n,t=this._cache.all=t,t}getDecimalForValue(t){return(rr(this._table,t)-this._minPos)/this._tableRange}getValueForPixel(t){let e=this._offsets,n=this.getDecimalForPixel(t)/e.factor-e.end;return rr(this._table,n*this._tableRange+this._minPos,!0)}},k0=Object.freeze({__proto__:null,CategoryScale:p0,LinearScale:yo,LogarithmicScale:vo,RadialLinearScale:bo,TimeScale:So,TimeSeriesScale:Io}),Ly=[Um,mg,c0,k0];var Kt=class i{static fromObj(t){let e=null,n=null,r;t.createdDate&&(e=new Date(t.createdDate)),t.modifiedDate&&(n=new Date(t.modifiedDate)),t.administrativeDistrictId!==0&&t.address&&t.address.city&&(r=Mi.fromObject(t.address));let s=t.clinicInformation?wo.fromObject(t.clinicInformation):void 0;return new i(t.id,t.name,e,n,t.highestPermission,r,s,t.benchmarkable,void 0)}static fromObjArr(t){return t.map(i.fromObj)}constructor(t,e,n,r,s,o,a,l,c,u){this.id=t,this.name=e,this.createdDate=n,this.modifiedDate=r,this.highestPermission=s,this.address=o,this.clinicInformation=a,this.benchmarkable=l,this.hasError=c,this.labels=u,this.resourceName=de.VIRTUAL_CLINIC}clone(){return new i(this.id,this.name,this.createdDate,this.modifiedDate,this.highestPermission,this.address?.clone(),this.clinicInformation?.clone(),this.benchmarkable,this.hasError,this.labels?[...this.labels]:void 0)}},wo=class i{static fromObject(t){let e;return t&&t.dismissalDateRange&&(e=new ci(new Date(t.dismissalDateRange.from),new Date(t.dismissalDateRange.to))),new i(t.origin,t.costDataExists,t.postalCodeExists,t.referralDataExists,e)}constructor(t,e,n,r,s){this.origin=t,this.costDataExists=e,this.postalCodeExists=n,this.referralDataExists=r,this.dismissalDateRange=s}clone(...t){return new i(JSON.parse(JSON.stringify(this.origin)),this.costDataExists,this.postalCodeExists,this.referralDataExists,this.dismissalDateRange?this.dismissalDateRange.clone():void 0)}toLabels(){let t=[];return this.postalCodeExists&&t.push("PLZ-Analyse"),this.costDataExists&&t.push("Kosten-Daten"),this.referralDataExists&&t.push("Einweiser-Daten"),t}},Mi=class i{static fromObject(t){return new i(t.street,t.houseNumber,t.postalCode,t.city,t.country,t.location,t.administrativeDistrictId?j.create(t.administrativeDistrictId):null)}constructor(t,e,n,r,s,o,a){this.street=t,this.houseNumber=e,this.postalCode=n,this.city=r,this.country=s,this.location=o,this.administrativeDistrictId=a}isEmpty(){return this.street===void 0&&this.houseNumber===void 0&&this.city===void 0&&this.postalCode===void 0}toString(){return`${this.street} ${this.houseNumber}, ${this.postalCode} ${this.city}`}clone(){return new i(this.street,this.houseNumber,this.postalCode,this.city,this.country,this.location,this.administrativeDistrictId?.clone())}},gr=class i{static fromObjArr(t){return t.map(i.fromObj)}static fromObj(t){return new i(t.virtualClinicId,t.year,t.beds,t.clinicSize,t.clinicType,t.isUniversity,t.medicalCareLevel)}constructor(t,e,n,r,s,o,a){this.virtualClinicId=t,this.year=e,this.beds=n,this.clinicSize=r,this.clinicType=s,this.isUniversity=o,this.medicalCareLevel=a}},_r=class i{constructor(t,e,n){this.year=t,this.virtualClinicId=e,this.parts=n}static fromObj(t){return new i(t.year,t.virtualClinicId,t.parts)}static fromObjArr(t){return t.map(i.fromObj)}},ki=class i{static fromObjArr(t){return t.map(i.fromObj)}static fromObj(t){return new i(t.year,t.virtualClinicId,t.specialtyDepartmentId,t.nursing,t.medical)}constructor(t,e,n,r,s){this.year=t,this.virtualClinicId=e,this.specialtyDepartmentId=n,this.nursing=r,this.medical=s}},Ni=class i{static fromObjArr(t){return t.map(i.fromObj)}static fromObj(t){return new i(t.year,t.virtualClinicId,t.specialtyDepartmentId,t.cmi,t.caseCount)}constructor(t,e,n,r,s){this.year=t,this.virtualClinicId=e,this.specialtyDepartmentId=n,this.cmi=r,this.caseCount=s}};var Bi=class i{static fromObject(t={}){return new i(t.from,t.to)}constructor(t,e){this.from=t,this.to=e}equals(t){return this.to===t.to&&this.from===t.from}clone(){return new i(this.from,this.to)}};var N0=["mainDiagnosis","secondaryDiagnosis","skCode"],B0=["opsCode","mainProcedure"],L0=["mainDiagnosis","secondaryDiagnosis"],R0=["mainDiagnosis","secondaryDiagnosis"],F0=["opcs","mainProcedure"],V0=["procedure"];var Cv={"ICD-10-GM":N0.map(i=>i),"ICD-10-AT":L0.map(i=>i),"ICD-10-UK":R0.map(i=>i),OPS:B0.map(i=>i),"OPCS-4":F0.map(i=>i),"PROCEDURE-AT":V0.map(i=>i),"G-DRG":[]};var ne=class i{static validateCodeName(t,e){let n;switch(e){case"OPS":n=!!t.match(/^[0-9]-\S{2,3}(\.\S{1,2})?$/);break;case"ICD-10-GM":case"ICD-10-AT":n=!!t.match(/^[A-Z]\d{2}(\.\d{1,2})?(\+)?$/);break;case"G-DRG":n=!!t.match(/^[0-9A-Z][0-9][0-9][A-Z]$/);break;default:n=!0}return n}static fromObject(t){return new i(t.name,t.description,t.codingSystem,t.hierarchyElementType,t.year)}constructor(t,e,n,r,s){this.name=t,this.description=e,this.codingSystem=n,this.hierarchyElementType=r,this.year=s}clone(){return new i(this.name,this.description,this.codingSystem,this.hierarchyElementType,this.year)}numberOfDigits(){switch(this.hierarchyElementType){case"chapter":return 1;case"block":return;case"specific":switch(this.codingSystem){case"G-DRG":return 3;case"ICD-10-GM":case"ICD-10-AT":case"ICD-10-UK":return this._cleanName(this.name).length;case"OPS":return this._cleanName(this.name).length;default:return}}}toJSON(){return{name:this.name,codingSystem:this.codingSystem,hierarchyElementType:this.hierarchyElementType,year:this.year}}_cleanName(t){let e=new RegExp("[-+.!*]");return t.match(e)?this._cleanName(t.replace(e,"")):t}};var Li=class i{static fromObjArr(t){let e=n=>i.fromObj(n);return t.map(e)}static fromObj(t){let e=t.code?ne.fromObject(t.code):null,n=Do.fromObj(t.additionalInformation);return new i(t.caseId,t.internMark,n,t.amount,t.casemix,t.casemixRelevantAmount,e,t.count,t.fabKey,t.specialtyDepartmentId,t.virtualClinicId,t.year,Eo.fromObjArray(t.procedures),Oo.fromObjectArray(t.diagnoses),t.mainDiagnosis?ne.fromObject(t.mainDiagnosis):void 0,t.mainProcedure?ne.fromObject(t.mainProcedure):void 0,Po.fromObjectArray(t.charges),t.chargeRealm)}constructor(t,e,n,r,s,o,a,l,c,u,d,h,m,g,_,p,f=[],C=null){this.caseId=t,this.internMark=e,this.additionalInformation=n,this.amount=r,this.casemix=s,this.casemixRelevantAmount=o,this.code=a,this.count=l,this.fabKey=c,this.specialtyDepartmentId=u,this.virtualClinicId=d,this.year=h,this.procedures=m,this.diagnoses=g,this.mainDiagnosis=_,this.mainProcedure=p,this.charges=f,this.chargeRealm=C}},Do=class i{constructor(t,e,n,r,s,o,a){this.administrativeDistrictId=t,this.postalCode=e,this.fabs=n,this.admission=r,this.dismissal=s,this.patientInformation=o,this.caseInformation=a}static fromObj(t){let e=t.administrativeDistrictId?j.createFromNumber(t.administrativeDistrictId):null;return new i(e,t.postalCode,t.fabs.map(n=>V(L({},n),{admissionDate:new Date(n.admissionDate),dismissalDate:new Date(n.dismissalDate)})),V(L({},t.admission),{date:new Date(t.admission.date)}),V(L({},t.dismissal),{date:new Date(t.dismissal.date)}),t.patientInformation,t.caseInformation)}},Oo=class i{static fromObjectArray(t){return t.map(e=>i.fromObject(e))}static fromObject(t){return new i(t.count,t.diagnoseType,t.chargeRealm,t.version,ne.fromObject(t.code),t.localisation,t.diagnosisSecurity,t.skCode?ne.fromObject(t.skCode):void 0,t.skLocalisation,t.skDiagnosisSecurity)}constructor(t,e,n,r,s,o,a,l,c,u){this.count=t,this.diagnoseType=e,this.chargeRealm=n,this.version=r,this.code=s,this.localisation=o,this.diagnosisSecurity=a,this.skCode=l,this.skLocalisation=c,this.skDiagnosisSecurity=u}},Eo=class i{static fromObjArray(t){return t.map(e=>i.fromObj(e))}static fromObj(t){return new i(t.count,new Date(t.procedureDate),t.localisation,ne.fromObject(t.code))}constructor(t,e,n,r){this.count=t,this.procedureDate=e,this.localisation=n,this.code=r}},Po=class i{static fromObjectArray(t){return t.map(e=>i.fromObject(e))}static fromObject(t){return new i(t.accountingStart?new Date(t.accountingStart):void 0,t.accountingEnd?new Date(t.accountingEnd):void 0,t.amount,t.chargeRealm,t.count,t.dayOfTreatment,t.daysWithoutCharge,t.type)}constructor(t,e,n,r,s,o,a,l){this.accountingStart=t,this.accountingEnd=e,this.amount=n,this.chargeRealm=r,this.count=s,this.dayOfTreatment=o,this.daysWithoutCharge=a,this.type=l}typeDescription(){switch(this.type.slice(0,2)){case"01":return"Tagesgleicher Pflegesatz f\xFCr Allgemeine Psychiatrie, Kinder- und Jugendpsychiatrie, und Psychosomatik/Psychotherapie";case"02":return"Erm\xE4\xDFigter Abteilungspflegesatz f\xFCr Allgemeine Psychiatrie, Kinder- und Jugendpsychiatrie, und Psychosomatik/Psychotherapie nach \xA7 14 Abs. 2 Satz 3 oder Abs. 7 Satz 2 BPflV";case"40":return"Zuschlag nach \xA7 8 Abs. 3 BPflV bzw. \xA7 8 Abs. 3 KHEntgG (Investitionszuschlag)";case"41":return"Entgelt f\xFCr vorstation\xE4re Behandlung";case"42":return"Entgelt f\xFCr nachstation\xE4re Behandlung";case"43":return"Pflegesatz bei Beurlaubung";case"44":return"Modellvorhaben nach \xA7 24 BPflV bzw. \xA7 26 BPflV";case"45":return"Wahlleistung Unterkunft (nur f\xFCr Knappschaft)";case"46":return"Zuschlag f\xFCr Qualit\xE4tssicherung nach \xA7 7 Absatz 1 Satz 1 Nr. 7 KHEntgG oder \xA7 7 Satz 1 Nr.3 BPflV";case"47":return"Zu-und Abschlag nach \xA7 7 Abs. 1 Satz 1 Nr. 4 KHEntgG bzw. \xA7 7 Satz 1 Nr. 3 und Satz 2 BPflV und sonstiger Zu- und Abschlag";case"48":return"DRG Systemzuschlag";case"49":return"Abrechnungserg\xE4nzungen";case"60":return"Sonderfall";case"61":return"Entgelt f\xFCr integrierte Versorgung nach \xA7 140c SGB V";case"62":return"Abschlag bei Entgelten f\xFCr integrierte Versorgung nach \xA7 140c SGB V";case"63":return"Entgelt f\xFCr Modellvorhaben nach \xA7 63 SGB V";case"65":return"Zusatzentgelt f\xFCr DMP";case"70":return"DRG-Fallpauschale nach \xA7 7 Abs. 1 Satz 1 Nr. 1 KHEntgG";case"71":return"Entgelt bei \xDCberschreiten der oberen GVD nach \xA7 1 Abs. 2 Satz 1 FPV oder tagesbezogene teilstation\xE4re DRG-Fallpauschale ab 2. Tag";case"72":return"Abschlag bei Verlegungen nach \xA7 1 Abs. 1 Satz 3 FPV";case"73":return"Abschlag bei Nichterreichen der unteren GVD nach \xA7 1 Abs. 3 Satz 1 FPV";case"74":return"Entgelt f\xFCr Pflegeerl\xF6s/Tag";case"75":return"Zu- und Abschlag nach \xA7 7 Abs. 1 Satz 1 Nr. 4 KHEntgG";case"76":return"Zusatzentgelt nach \xA7 7 Abs. 1 Satz 1 Nr. 2, 3, 5 oder 6 KHEntgG";case"78":return"Teilstation\xE4re Leistung nach \xA7 6 Abs. 2 FPV";case"80":return"Entgelt f\xFCr neue Untersuchungs- und Behandlungsmethoden nach \xA7 6 Abs. 2 KHEntgG (fallbezogen)";case"81":return"Entgelt bei \xDCberschreiten der oberen GVD f\xFCr fallbezogene Entgelte nach \xA7 6 Abs. 2 KHEntgG";case"82":return"Abschlag bei Verlegung f\xFCr fallbezogene Entgelte nach \xA7 6 Abs. 2 KHEntgG";case"83":return"Abschlag bei Nichterreichen der unteren GVD f\xFCr fallbezogene Entgelte nach \xA7 6 Abs. 2 KHEntgG";case"84":return"Pflegeanteil f\xFCr tages- oder fallbezogenes Entgelt nach \xA7 7 Abs. 1 Satz 1 Nr. 5 KHEntgG";case"85":return"Tagesbezogenes Entgelt nach \xA7 7 Abs. 1 Satz 1 Nr. 5 KHEntgG";case"86":return"Fallbezogenes Entgelt nach \xA7 7 Abs.1 Satz 1 Nr. 5 KHEntgG";case"87":return"Entgelt bei \xDCberschreiten der oberen GVD f\xFCr fallbezogen Entgelt nach \xA7 7 Abs. 1 Satz 1 Nr.5 KHEntgG";case"88":return"Abschlag bei Verlegung f\xFCr fallbezogene Entgelte nach \xA7 7 Abs. 1 Satz 1 Nr. 5 KHEntgG";case"89":return"Abschlag bei Nichterreichen der unteren GVD f\xFCr fallbezogene Entgelte nach \xA7 7 Abs. 1 Satz 1 Nr. 5 KHEntgG";case"90":return"Qualit\xE4tsvertr\xE4ge nach \xA7 110a SGB V";case"91":return"\xDCbergangspflege";default:return""}}};var z0=["1","1.1","2","2.1","3","3.1","4","4.1","5","5.1","6","6.1","7","7.1","7.2","8","8.1","8.2","8.3","8.4","9","9.1","10","10.1","11","11.1","12","12.1","12.2","12.3","13","13.1","13.2","14","14.1","14.2","14.3","14.4","14.5","15","15.1","16","16.1","16.2","16.3","16.4","16.5","17","17.1","18","18.1","19","19.1","20","20.1","21","21.1","21.2","21.3","21.4","22","22.1","22.2","22.3","23","23.1","23.2","23.3","24","24.1","24.2","25","25.1","26","26.1","26.2","26.3","27","27.1","28","28.1","29","29.1","30","30.1","30.2","30.3","30.4","30.5","30.6","31","31.1","31.2","32","32.1","32.2"],To=class{constructor(t,e){this.id=t,this.name=e}parent(){if(this.isLeistungsgruppe()){let t=this.id.slice(0,this.id.indexOf("."));return td.find(e=>e.id===t)}else return}children(){return this.isLeistungsbereich()?td.filter(t=>t.isLeistungsgruppe()).filter(t=>t.parent()?.id===this.id):[]}isLeistungsbereich(){return!this.id.includes(".")}isLeistungsgruppe(){return this.id.includes(".")}},U0={1:"Allgemeine Innere Medizin","1.1":"Allgemeine Innere Medizin",2:"Endokrinologie und Diabetologie","2.1":"Komplexe Endokrinologie und Diabetologie",3:"Gastroenterologie","3.1":"Komplexe Gastroenterologie",4:"Nephrologie","4.1":"Komplexe Nephrologie",5:"Pneumologie","5.1":"Komplexe Pneumologie",6:"Rheumatologie","6.1":"Komplexe Rheumatologie",7:"H\xE4matologie und Onkologie","7.1":"Stammzelltransplantation","7.2":"Leuk\xE4mie und Lymphome",8:"Kardiologie","8.1":"EPU/Ablation","8.2":"Interventionelle Kardiologie","8.3":"Kardiale Devices","8.4":"Minimalinvasive Herzklappeninvervention",9:"Allgemeine Chirurgie","9.1":"Allgemeine Chirurgie",10:"Kinder- und Jugendchirurgie","10.1":"Kinder- und Jugendchirurgie",11:"Plastische und Rekonstruktive Chirurgie","11.1":"Plastische und Rekonstruktive Chirurgie",12:"Gef\xE4\xDFmedizin","12.1":"Bauchaortenaneurysma","12.2":"Carotis operativ/ interventionell","12.3":"Komplexe periphere arterielle Gef\xE4\xDFe",13:"Herzchirurgie","13.1":"Herzchirurgie","13.2":"Herzchirurgie - Kinder und Jugendliche",14:"Orthop\xE4die und Unfallchirurgie","14.1":"Endoprothetik H\xFCfte","14.2":"Endoprothetik Knie","14.3":"Revision H\xFCftendoprothese","14.4":"Revision Knieendoprothese","14.5":"Wirbels\xE4uleneingriffe",15:"Thoraxchirurgie","15.1":"Thoraxchirurgie",16:"Viszeralchirurgie","16.1":"Bariatrische Chirurgie","16.2":"Lebereingriffe","16.3":"\xD6sophaguseingriffe","16.4":"Pankreaseingriffe","16.5":"Tiefe Rektumeingriffe",17:"Augenheilkunde","17.1":"Augenheilkunde",18:"Haut- und Geschlechtskrankheiten","18.1":"Haut- und Geschlechtskrankheiten",19:"MKG","19.1":"MKG",20:"Urologie","20.1":"Urologie",21:"Frauenheilkunde und Geburtshilfe","21.1":"Allgemeine Frauenheilkunde","21.2":"Ovarial-CA","21.3":"Senologie","21.4":"Geburten",22:"Neonatologie","22.1":"Perinataler Schwerpunkt","22.2":"Perinatalzentrum Level 1","22.3":"Perinatalzentrum Level 2",23:"Kinder- und Jugendmedizin","23.1":"Allgemeine Kinder- und Jugendmedizin","23.2":"Kinder-H\xE4matologie und -Onkologie - Stammzelltransplantation","23.3":"Kinder-H\xE4matologie und -Onkologie - Leuk\xE4mie und Lymphome",24:"HNO","24.1":"HNO","24.2":"Cochleaimplantate",25:"Neurochirurgie","25.1":"Neurochirurgie",26:"Neurologie","26.1":"Allgemeine Neurologie","26.2":"Stroke Unit","26.3":"Neuro-Fr\xFChreha (NNF, Phase B)",27:"Geriatrie","27.1":"Geriatrie",28:"Intensivmedizin","28.1":"Intensivmedizin",29:"Palliativmedizin","29.1":"Palliativmedizin",30:"Transplantation solider Organe","30.1":"Darmtransplantation","30.2":"Herztransplantation","30.3":"Lebertransplantation","30.4":"Lungentransplantation","30.5":"Nierentransplantation","30.6":"Pankreastransplantation",31:"Psychiatrie und Psychotherapie und Psychosomatische Medizin und Psychotherapie","31.1":"Psychiatrie und Psychotherapie und Psychosomatische Medizin und Psychotherapie - vollstation\xE4r","31.2":"Psychiatrie und Psychotherapie und Psychosomatische Medizin und Psychotherapie - teilstation\xE4r",32:"Kinder- und Jugendpsychiatrie und -psychotherapie","32.1":"Kinder- und Jugendpsychiatrie und -psychotherapie - vollstation\xE4r","32.2":"Kinder- und Jugend-psychiatrie und -psychotherapie - teilstation\xE4r"},td=z0.map(i=>new To(i,U0[i]));var yr=class i{static fromObj(t){let e=t.modifiedDate?this.fixUTC(new Date(t.modifiedDate)):null,n=t.createdDate?this.fixUTC(new Date(t.createdDate)):null;return new i(t.id,t.originalFileName,t.errorRecipientEmailAddress,t.recipientEmailAddress,t.fabSelectionStrategy,t.status,t.virtualClinicId,t.blobReference,n,e)}static fixUTC(t){return t.setHours(t.getHours()+2),t}constructor(t,e,n,r,s,o,a,l,c,u){this.id=t,this.name=e,this.errorRecipientEmailAddress=n,this.recipientEmailAddress=r,this.fabSelectionStrategy=s,this.status=o,this.virtualClinicId=a,this.blobReference=l,this.createdDate=c,this.modifiedDate=u}clone(){return new i(this.id,this.name,this.errorRecipientEmailAddress,this.recipientEmailAddress,this.fabSelectionStrategy,this.status,this.virtualClinicId,L({},this.blobReference),this.createdDate,this.modifiedDate)}};var Qt=class i{constructor(t,e,n,r,s){this.fabKey=t,this.id=e,this.virtualClinicId=n,this.name=r,this.fabIntern=s}static fromObj(t){return new i(t.fabKey,t.id,t.virtualClinicId,t.name,t.fabIntern)}static fromObjArr(t){return t.map(i.fromObj)}};var Jt=class{constructor(t){this._environmentService=t,this.baseUrl=this._environmentService.load("AYS_VIRTUAL_CLINIC_ANALYSIS_URL")}availableResultSetOperations(){return`${this.baseUrl}/operating-numbers/result-set-operations/available`}availableGroupBys(){return`${this.baseUrl}/operating-numbers/group-by/available`}availableVirtualClinicOperatingNumbers(){return`${this.baseUrl}/operating-numbers/virtual-clinic-operating-numbers/available`}availableFullyInpatientCaseOperatingNumbers(){return`${this.baseUrl}/operating-numbers/fully-inpatient-case-operating-numbers/available`}groupedOperatingNumbers(){return`${this.baseUrl}/operating-numbers/calculate/grouped`}export(){return`${this.baseUrl}/exports/`}preCalculations(){return`${this.baseUrl}/operating-numbers/precalculations`}};var cb=(()=>{class i{constructor(e,n,r){this._httpClient=e,this._cache=n,this._api=new Jt(r)}availableVirtualClinicOperatingNumbers(){let e=this._api.availableVirtualClinicOperatingNumbers();return this._cache.cacheObservable("availableVirtualClinicOperatingNumbers",this._httpClient.get(e))}availableFullyInpatientCaseOperatingNumbers(){let e=this._api.availableFullyInpatientCaseOperatingNumbers();return this._cache.cacheObservable(e,this._httpClient.get(e))}resolve(e){let n=this._api.groupedOperatingNumbers(),r=Object.keys(e).slice(),s={requests:e};return this._httpClient.post(n,s).pipe(sl(o=>{let a=this._createErrorResponse(r,"Server Fehler");return o.status===403&&(a=this._createErrorResponse(r,"Keine Berechtigung")),o.status===400&&(a=this._createErrorResponse(r,"Fehlerhafte Anfrage")),Ze(a)}))}preCalculation(e){let n=`${this._api.preCalculations()}/${e}/`;return this._httpClient.get(n)}_createErrorResponse(e,n){let r={requests:{}};return e.forEach(s=>{r.requests[s]={statusType:"error",aggregatedValue:null,additionalInformation:null,groupedValues:null,errors:[{text:{de:n}}]}}),r}static{this.\u0275fac=function(n){return new(n||i)(Ee(Et),Ee(bl),Ee(xe))}}static{this.\u0275prov=je({token:i,factory:i.\u0275fac,providedIn:"root"})}}return i})();var xr=class{constructor(t){this.baseUrl=t}virtualClinics(){return`${this.baseUrl}/virtual-clinics/`}virtualClinicById(t){return`${this.baseUrl}/virtual-clinics/${t}/`}specialtyDepartments(t){return`${this.virtualClinicById(t)}specialty-departments/`}specialtyDepartment(t,e){return`${this.specialtyDepartments(t)}${e}/`}leistungsgruppenNrw(){return`${this.baseUrl}/leistungsgruppen/nrw/`}leistungsgruppenKHTG(){return`${this.baseUrl}/leistungsgruppen/khtg/`}fileOfTruth(){return`${this.baseUrl}/intuitive-fot`}address(t){return`${this.virtualClinicById(t)}address`}additionalInfo(t){return`${this.virtualClinicById(t)}additional-info`}annualAccount(t){return`${this.virtualClinicById(t)}annual-account`}caseNumbers(t){return`${this.virtualClinicById(t)}case-number`}fullyInpatientCases(t){return`${this.virtualClinicById(t)}fully-inpatient-cases/paged/`}fullyInpatientCase(t,e){return`${this.virtualClinicById(t)}fully-inpatient-cases/${e}/`}staffing(t){return`${this.virtualClinicById(t)}staffing`}relatedVirtualClinics(t){return`${this.virtualClinicById(t)}related-virtual-clinics`}kostImports(t){return`${this.virtualClinicById(t)}kost-imports`}};var I=class{constructor(t){this.type=t}equals(t){return!!t&&this.type===t.type}valid(){let t=this.toValue();return t instanceof Array?!!t&&t.length>0:!!t}hasRelativeTimeSelection(){return!1}getChildResources(){return{}}overrideClone(t){return this.clone()}getOverrideProperties(t,e){return[]}};var Ri=class{static fromObject(t,e){switch(t.kind){case"AND":return Dt.fromObject(t,e);case"OR":return Wt.fromObject(t,e);default:throw new Error(`Missing implementation for FilterConditionCombinations.fromObject for input[${JSON.stringify(t)}]`)}}static fromConditionJson(t,e,n){switch(t){case Dn:return Dt.fromConditionJson(e,n);case wn:return Wt.fromConditionJson(e,n);default:throw new Error(`Missing implementation for FilterConditionCombinations.fromObject for input[${JSON.stringify(e)}]`)}}},br=class{static fromObject(t,e){throw new Error(JSON.stringify([t,e]))}static fromConditionJson(t,e){throw new Error(JSON.stringify([t,e]))}constructor(t){this.expression=t,this.type="combination"}equals(t){return M.equals(this,t,(e,n)=>e.type===n.type)&&M.equals(this.kind,t.kind)&&M.equals(this.expression,t.expression,(e,n)=>e.length===n.length)&&this.expression.every((e,n)=>fe.equals(e,t.expression.at(n)))}valid(){return!!this.kind&&(this.expression.length===0||this.expression.every(t=>t.valid()))}getChildResources(){return this.expression.map(t=>t.getChildResources()).reduce((t,e)=>Pt.merge(t,e),{})}getOverrideProperties(t,e){return this.expression.map(n=>n.getOverrideProperties(t,e)).reduce((n,r)=>[...n,...r],[])}hasRelativeTimeSelection(){return this.expression.some(t=>t.hasRelativeTimeSelection())}toJSON(){return{type:this.type,kind:this.kind,expression:this.expression.filter(t=>!!t).map(t=>t.toJSON())}}toText(){return this.expression.filter(t=>!!t).map(t=>t.type==="combination"?`( ${t.toText()} )`:t.toText()).join(` ${this.kindToText()} `)}},Dt=class i extends br{static fromObject(t,e){return Promise.all(t.expression.map(n=>fe.fromObject(n,e))).then(n=>new i(n))}static fromConditionJson(t,e){return Promise.all(t.conditions.map(n=>fe.fromConditionJson(n,e))).then(n=>new i(n))}constructor(t){super(t),this.kind="AND"}clone(){return new i([...this.expression.map(t=>t.clone())])}overrideClone(t){return new i(this.expression.map(e=>e.overrideClone(t)).filter(e=>!!e))}toCondition(t){return Promise.all(this.expression.filter(e=>e.valid()).map(e=>e.toCondition(t))).then(e=>new Ne(e))}kindToText(){return"und"}},Wt=class i extends br{static fromObject(t,e){return Promise.all(t.expression.map(n=>fe.fromObject(n,e))).then(n=>new i(n))}static fromConditionJson(t,e){let n=t.conditions.map(r=>fe.fromConditionJson(r,e));return Promise.all(n).then(r=>new i(r))}constructor(t){super(t),this.kind="OR"}clone(){return new i([...this.expression.map(t=>t.clone())])}overrideClone(t){return new i(this.expression.map(e=>e.overrideClone(t)).filter(e=>!!e))}toCondition(t){return Promise.all(this.expression.filter(e=>e.valid()).map(e=>e.toCondition(t))).then(e=>new Tt(e))}kindToText(){return"oder"}};var H0="administrativeDistrictId",nd={type:"administrativeDistrictIds",category:"person",displayName:{de:"Landkreise"},sortingIndex:4,occurrence:"single",fromObject(i){return Promise.resolve(new Fi(i.administrativeDistrictIds.map(t=>j.create(t))))},fromCondition(i){return Promise.resolve(new Fi(i?.includes?.map(t=>j.create(t))))},newInstance(){return Promise.resolve(new Fi([]))}},Fi=(()=>{class i extends I{static{this.Specification=nd}constructor(e){super(nd.type),this.administrativeDistrictIds=e}clone(){return new i([...this.administrativeDistrictIds.map(e=>e.clone())])}equals(e){return super.equals(e)&&O.equals(this.administrativeDistrictIds,e.administrativeDistrictIds,(n,r)=>n.value===r.value)}validationToText(){return this.administrativeDistrictIds.length===0?"Mindestens einen Landkreis ausw\xE4hlen":""}toCondition(){return Promise.resolve(new $t(this.administrativeDistrictIds))}toJSON(){return{type:this.type,administrativeDistrictIds:this.administrativeDistrictIds.map(e=>e.getNumericValue())}}toText(){return this.administrativeDistrictIds.length===1?"ein Landkreis":`${this.administrativeDistrictIds.length} Landkreise`}toValue(){return this.administrativeDistrictIds}}return i})(),$t=class extends P{constructor(t,e){super(H0,t?t.map(n=>n.getNumericValue()):null,e?e.map(n=>n.getNumericValue()):null)}};var Y0="administrativeRegion",rd={type:"administrativeRegionIds",category:"person",displayName:{de:"Regierungsbezirke"},sortingIndex:2,occurrence:"single",fromObject(i){return Promise.resolve(new ko(i.administrativeRegionIds))},fromCondition(i){return Promise.resolve(new ko(i.includes))},newInstance(){return Promise.resolve(new ko([]))}},ko=(()=>{class i extends I{static{this.Specification=rd}constructor(e){super(rd.type),this.administrativeRegionIds=e}clone(){return new i([...this.administrativeRegionIds?this.administrativeRegionIds:[]])}equals(e){return super.equals(e)&&O.equals(this.administrativeRegionIds,e.administrativeRegionIds)}validationToText(){return this.administrativeRegionIds.length===0?"Mindestens einen Regierungsbezirk ausw\xE4hlen":""}toCondition(){return Promise.resolve(new No(this.administrativeRegionIds,[]))}toJSON(){return{type:this.type,administrativeRegionIds:this.administrativeRegionIds}}toText(){switch(this.administrativeRegionIds.length){case 0:return"keine Regierungsbezirke";case 1:return"ein Regierungsbezirk";default:return`${this.administrativeRegionIds.length} Regierungsbezirke`}}toValue(){return this.administrativeRegionIds}}return i})(),No=class extends P{constructor(t,e){super(Y0,t,e)}};var q0="admissionCause",sd={type:"admissionCauses",category:"case",displayName:{de:"Aufnahmeanlass"},sortingIndex:8,occurrence:"single",fromObject(i){return Promise.resolve(new Vi(i.admissionCauses))},fromCondition(i){return Promise.resolve(new Vi(i?.includes??[]))},newInstance(){return Promise.resolve(new Vi([]))}},Vi=(()=>{class i extends I{static{this.Specification=sd}constructor(e){super(sd.type),this.admissionCauses=e}clone(){return new i([...this.admissionCauses.slice()])}equals(e){return super.equals(e)&&O.equals(this.admissionCauses,e.admissionCauses)}validationToText(){return this.admissionCauses.length===0?"Mindestens einen Aufnahmeanlass ausw\xE4hlen":""}toCondition(){return Promise.resolve(new Bo(this.admissionCauses,[]))}toJSON(){return{type:this.type,admissionCauses:this.admissionCauses}}toText(){return this.admissionCauses.length===1?"ein Aufnahmeanlass":`${this.admissionCauses.length} Aufnahmeanl\xE4sse`}toValue(){return this.admissionCauses}}return i})(),Bo=class extends P{constructor(t,e){super(q0,t,e)}};var K0="admissionReason",od={type:"admissionReasons",category:"case",displayName:{de:"Aufnahmegrund"},sortingIndex:8,occurrence:"single",fromObject(i){return Promise.resolve(new zi(i.admissionReasons))},fromCondition(i){return Promise.resolve(new zi(i.includes))},newInstance(){return Promise.resolve(new zi([]))}},zi=(()=>{class i extends I{static{this.Specification=od}constructor(e){super(od.type),this.admissionReasons=e}clone(){return new i([...this.admissionReasons])}equals(e){return super.equals(e)&&O.equals(this.admissionReasons,e.admissionReasons)}validationToText(){return this.admissionReasons.length===0?"Mindestens einen Aufnahmegrund ausw\xE4hlen":""}toCondition(){return Promise.resolve(new Lo(this.admissionReasons,[]))}toJSON(){return{type:this.type,admissionReasons:this.admissionReasons}}toText(){return this.admissionReasons.length===1?"ein Aufnahmegrund":`${this.admissionReasons.length} Aufnahmegr\xFCnde`}toValue(){return this.admissionReasons}}return i})(),Lo=class extends P{constructor(t,e){super(K0,t,e)}};var Q0="agmId",ad={type:"ageGroups",category:"person",displayName:{de:"Altersgruppen"},sortingIndex:8,occurrence:"single",fromObject(i){return Promise.resolve(new Ui(i.agm))},fromCondition(i){return Promise.resolve(new Ui(i.includes))},newInstance(){return Promise.resolve(new Ui([]))}},Ui=(()=>{class i extends I{static{this.Specification=ad}constructor(e){super(ad.type),this.agm=e}clone(){return new i([...this.agm])}equals(e){return super.equals(e)&&O.equals(this.agm,e.agm)}validationToText(){return this.agm.length===0?"Mindestens eine Altersgruppe ausw\xE4hlen":""}toCondition(){return Promise.resolve(new Ro(this.agm,[]))}toJSON(){return{type:this.type,agm:this.agm}}toText(){return this.agm.length===1?"eine Altersgruppe":`${this.agm.length} Altersgruppen`}toValue(){return this.agm}}return i})(),Ro=class extends P{constructor(t,e){super(Q0,t,e)}};var J0="artificialRespirationHours",ld={type:"artificialRespirationHours",category:"case",displayName:{de:"K\xFCnstliche Beatmungsstunden"},sortingIndex:8,occurrence:"single",fromObject(i){return Promise.resolve(new Sr(Bi.fromObject(i.artificialRespirationHours)))},fromCondition(i){return Promise.reject(new Error("Not implemented"))},newInstance(){return Promise.resolve(new Sr(new Bi(null,null)))}},Sr=(()=>{class i extends I{static{this.Specification=ld}constructor(e){super(ld.type),this.artificialRespirationHours=e}clone(){return new i(this.artificialRespirationHours.clone())}equals(e){return super.equals(e)&&M.equals(this.artificialRespirationHours,e.artificialRespirationHours,(n,r)=>n.equals(r))}valid(){return this.artificialRespirationHours?Number.isInteger(this.artificialRespirationHours.to)&&Number.isInteger(this.artificialRespirationHours.from)?this.artificialRespirationHours.from{class i extends I{static{this.Specification=cd}constructor(e){super(cd.type),this.careServiceAreaIds=e}clone(){return new i([...this.careServiceAreaIds?this.careServiceAreaIds:[]])}equals(e){return super.equals(e)&&O.equals(this.careServiceAreaIds,e.careServiceAreaIds)}validationToText(){return this.careServiceAreaIds.length===0?"Mindestens ein Versorgungsgebiet ausw\xE4hlen":""}toCondition(){return Promise.resolve(new Vo(this.careServiceAreaIds,[]))}toJSON(){return{type:this.type,careServiceAreaIds:this.careServiceAreaIds}}toText(){switch(this.careServiceAreaIds.length){case 0:return"keine Versorgungsgebiete";case 1:return"ein Versorgungsgebiet";default:return`${this.careServiceAreaIds.length} Versorgungsgebiete`}}toValue(){return this.careServiceAreaIds}}return i})(),Vo=class extends P{constructor(t,e){super(W0,t,e)}};var $0="chargeRealm",ud={type:"chargeRealm",category:"case",displayName:{de:"Entgeltbereich"},sortingIndex:8,occurrence:"multiple",fromObject(i){return Promise.resolve(new Gi(i.includes))},fromCondition(i){return Promise.resolve(new Gi(i.includes))},newInstance(){return Promise.resolve(new Gi([]))}},Gi=(()=>{class i extends I{static{this.Specification=ud}constructor(e){super(ud.type),this.includes=e}clone(){return new i([...this.includes])}equals(e){return super.equals(e)&&O.equals(this.includes,e.includes)}validationToText(){return this.includes.length===0?"Mindestens einen Entgeltbereich ausw\xE4hlen":""}toCondition(){return Promise.resolve(new zo(this.includes,[]))}toJSON(){return{type:this.type,includes:this.includes}}toText(){return this.includes.length===1?"ein Entgeltbereich":`${this.includes.length} Entgeltbereiche`}toValue(){return this.includes}}return i})(),zo=class extends P{constructor(t,e){super($0,t,e)}};var X0="clinicBeds",dd={type:"clinicBeds",category:"clinic",displayName:{de:"Klinik-Betten"},sortingIndex:8,occurrence:"single",fromObject(i){return Promise.resolve(new Uo(i.from,i.to))},fromCondition(i){return Promise.resolve(new Uo(i.from,i.to))},newInstance(){return Promise.resolve(new Uo(null,null))}},Uo=(()=>{class i extends I{static{this.Specification=dd}constructor(e,n){super(dd.type),this.from=e,this.to=n}clone(){return new i(this.from,this.to)}equals(e){return super.equals(e)&&M.equals(this.from,e.from)&&M.equals(this.to,e.to)}valid(){return Number.isInteger(this.to)&&Number.isInteger(this.from)?this.from{class i extends I{static{this.Specification=hd}constructor(e,n){super(hd.type),this.nrwServiceGroupId=e,this.qualification=n}clone(){return new i(this.nrwServiceGroupId,this.qualification)}equals(e){return super.equals(e)&&M.equals(this.nrwServiceGroupId,e.nrwServiceGroupId)&&M.equals(this.qualification,e.qualification)}valid(){return!!this.nrwServiceGroupId&&this.qualification!==null}validationToText(){return this.nrwServiceGroupId?this.qualification===null||this.qualification===void 0?"Qualifikation ausw\xE4hlen":"":"Leistungsgruppe ausw\xE4hlen"}toCondition(){return Promise.resolve(new Yo(this.nrwServiceGroupId,this.qualification))}toJSON(){return{type:this.type,nrwServiceGroupId:this.nrwServiceGroupId,qualification:this.qualification}}toText(){return"Qualit\xE4tskriterien - Ger\xE4tevorhaltung"}toValue(){return{nrwServiceGroupId:this.nrwServiceGroupId,qualification:this.qualification}}}return i})(),Yo=class extends se{constructor(t,e){super(Z0),this.lgNr=t,this.flag=e}toJSON(){return{[this.id]:{lgNr:this.lgNr,flag:this.flag}}}};var j0="clinicLevel",pd={type:"clinicLevels",category:"clinic",displayName:{de:"Versorgungslevel"},sortingIndex:8,occurrence:"single",fromObject(i){return Promise.resolve(new qo(i.includes))},fromCondition(i){return Promise.resolve(new qo(i.includes))},newInstance(){return Promise.resolve(new qo([]))}},qo=(()=>{class i extends I{static{this.Specification=pd}constructor(e){super(pd.type),this.includes=e}clone(){return new i([...this.includes])}equals(e){return super.equals(e)&&O.equals(this.includes,e.includes)}validationToText(){return this.includes.length===0?"Mindestens ein Versorgungslevel ausw\xE4hlen":""}toCondition(){return Promise.resolve(new Ko(this.includes,[]))}toJSON(){return{type:this.type,includes:this.includes}}toText(){return this.includes.length===1?"ein Versorgungslevel":`${this.includes.length} Versorgungslevel`}toValue(){return{includes:this.includes}}}return i})(),Ko=class extends P{constructor(t,e){super(j0,t,e)}};var e_="physicianRequirements",md={type:"clinicPhysicianRequirements",category:"clinic",displayName:{de:"Qualit\xE4tskriterien - Fach\xE4rtzliche Vorgaben"},sortingIndex:8,occurrence:"multiple",fromObject(i){return Promise.resolve(new Qo(i.nrwServiceGroupId,i.qualification,i.availability))},fromCondition(i){return Promise.resolve(new Qo(i.lgNr,i.qualification,i.availability))},newInstance(){return Promise.resolve(new Qo(null,null,null))}},Qo=(()=>{class i extends I{static{this.Specification=md}constructor(e,n,r){super(md.type),this.nrwServiceGroupId=e,this.qualification=n,this.availability=r}clone(){return new i(this.nrwServiceGroupId,this.qualification,this.availability)}equals(e){return super.equals(e)&&M.equals(this.nrwServiceGroupId,e.nrwServiceGroupId)&&M.equals(this.availability,e.availability)&&M.equals(this.qualification,e.qualification)}valid(){return!!this.nrwServiceGroupId&&this.qualification!==null&&this.availability!==null}validationToText(){return this.nrwServiceGroupId?this.availability===null||this.availability===void 0?"Verf\xFCgbarkeit ausw\xE4hlen":this.qualification===null||this.qualification===void 0?"Qualifikation ausw\xE4hlen":"":"Leistungsgruppe ausw\xE4hlen"}toCondition(){return Promise.resolve(new Jo(this.nrwServiceGroupId,this.qualification,this.availability))}toJSON(){return{type:this.type,nrwServiceGroupId:this.nrwServiceGroupId,availability:this.availability,qualification:this.qualification}}toText(){return"Qualit\xE4tskriterien - Fach\xE4rtzliche Vorgaben"}toValue(){return{nrwServiceGroupId:this.nrwServiceGroupId,qualification:this.qualification,availability:this.availability}}}return i})(),Jo=class extends se{constructor(t,e,n){super(e_),this.lgNr=t,this.qualification=e,this.availability=n}toJSON(){return{[this.id]:{lgNr:this.lgNr,qualification:this.qualification,availability:this.availability}}}};var t_="clinicSize",fd={type:"clinicSizes",category:"clinic",displayName:{de:"Klinik-Gr\xF6\xDFe"},sortingIndex:8,occurrence:"single",fromObject(i){return Promise.resolve(new Hi(i.clinicSizes))},fromCondition(i){return Promise.resolve(new Hi(i.includes))},newInstance(){return Promise.resolve(new Hi([]))}},Hi=(()=>{class i extends I{static{this.Specification=fd}constructor(e){super(fd.type),this.clinicSizes=e}clone(){return new i([...this.clinicSizes])}equals(e){return super.equals(e)&&O.equals(this.clinicSizes,e.clinicSizes)}validationToText(){return this.clinicSizes.length===0?"Mindestens eine Klinik-Gr\xF6\xDFe ausw\xE4hlen":""}toCondition(){return Promise.resolve(new Wo(this.clinicSizes,[]))}toJSON(){return{type:this.type,clinicSizes:this.clinicSizes}}toText(){return this.clinicSizes.length===1?"eine Klinik-Gr\xF6\xDFe":`${this.clinicSizes.length} Klinik-Gr\xF6\xDFen`}toValue(){return this.clinicSizes}}return i})(),Wo=class extends P{constructor(t,e){super(t_,t,e)}};var i_="clinicType",gd={type:"clinicTypes",category:"clinic",displayName:{de:"Tr\xE4gerart"},sortingIndex:8,occurrence:"single",fromObject(i){return Promise.resolve(new Yi(i.clinicTypes))},fromCondition(i){return Promise.resolve(new Yi(i.includes))},newInstance(){return Promise.resolve(new Yi([]))}},Yi=(()=>{class i extends I{static{this.Specification=gd}constructor(e){super(gd.type),this.clinicTypes=e}clone(){return new i([...this.clinicTypes])}equals(e){return super.equals(e)&&O.equals(this.clinicTypes,e.clinicTypes)}validationToText(){return this.clinicTypes.length===0?"Mindestens eine Tr\xE4gerart ausw\xE4hlen":""}toCondition(){return Promise.resolve(new $o(this.clinicTypes,[]))}toJSON(){return{type:this.type,clinicTypes:this.clinicTypes}}toText(){return this.clinicTypes.length===1?"eine Tr\xE4gerart":`${this.clinicTypes.length} Tr\xE4gerarten`}toValue(){return this.clinicTypes}}return i})(),$o=class extends P{constructor(t,e){super(i_,t,e)}};var Xt=class i{static fromString(t){let e=t.split("_"),n=e[2]?parseInt(e[2],10):void 0;return new i(e[0],e[1],n)}static fromObj(t={}){return new i(t.ik.toString(),t.sn.toString(),t.year)}constructor(t,e,n){this.ik=t,this.sn=e,this.year=n}toString(){let t=null;return this.ik&&this.sn!==null&&this.sn!==void 0&&(t=`${this.ik}_${this.sn}`,this.year&&(t=`${t}_${this.year}`)),t}clone(){return new i(this.ik,this.sn,this.year)}equals(t){return!!this&&!!t&&this.toString()===t.toString()}equalsByIkAndSn(t){return M.equals(this.ik,t.ik)&&M.equals(this.sn,t.sn)}};var Zt=(function(i){return i.WITH_UNIVERSITIES="WITH_UNIVERSITIES",i.WITHOUT_UNIVERSITIES="WITHOUT_UNIVERSITIES",i.ONLY_UNIVERSITIES="ONLY_UNIVERSITIES",i})(Zt||{}),qI={[Zt.WITH_UNIVERSITIES]:"Mit Universit\xE4ts-Kliniken",[Zt.WITHOUT_UNIVERSITIES]:"Ohne Universit\xE4ts-Kliniken",[Zt.ONLY_UNIVERSITIES]:"Nur Universit\xE4ts-Kliniken"};var n_=V(L({},dt.defaults.plugins.tooltip),{backgroundColor:"rgb(255,255,255)",titleFont:{family:"Roboto, sans-serif",size:12,style:"normal",lineHeight:dt.defaults.font.lineHeight,weight:dt.defaults.font.weight},bodyFont:{family:"Roboto, sans-serif",size:14,style:dt.defaults.font.style,lineHeight:dt.defaults.font.lineHeight,weight:dt.defaults.font.weight},titleColor:"rgba(0,0,0,0.84)",bodyColor:"rgba(0,0,0,0.84)",titleSpacing:8,padding:12,cornerRadius:2,borderWidth:1,borderColor:"rgba(0,0,1,0.15)",titleMarginBottom:6});var r_="university",_d={type:"universityType",category:"clinic",displayName:{de:"Universit\xE4tskliniken"},sortingIndex:8,occurrence:"single",fromObject(i){return Promise.resolve(new qi(i.universityType))},fromCondition(i){return Promise.resolve(new qi(i.flag))},newInstance(){return Promise.resolve(new qi(Zt.WITH_UNIVERSITIES))}},qi=(()=>{class i extends I{static{this.Specification=_d}constructor(e){super(_d.type),this.universityType=e}equals(e){return super.equals(e)&&M.equals(this.universityType,e.universityType)}validationToText(){return this.universityType?"":"Art der Universit\xE4tskliniken ausw\xE4hlen"}clone(){return new i(this.universityType)}toCondition(){return Promise.resolve(new Xo(this.universityType))}toJSON(){return{type:this.type,universityType:this.universityType}}toText(){return"Universit\xE4tskliniken"}toValue(){return this.universityType}}return i})(),Xo=class extends se{constructor(t){super(r_),this.flag=t}toJSON(){return{[this.id]:{flag:this.flag}}}};var Ki=class i extends ne{static fromObject(t){return new i(t.name,t.description,t.codingSystem,t.hierarchyElementType,t.year,t.codeSpectrumId,t.weight)}constructor(t,e,n,r,s,o,a){super(t,e,n,r,s),this.codeSpectrumId=o,this.weight=a}clone(){return new i(this.name,this.description,this.codingSystem,this.hierarchyElementType,this.year,this.codeSpectrumId,this.weight)}toJSON(){return V(L({},super.toJSON()),{codeSpectrumId:this.codeSpectrumId,weight:this.weight})}};var o_="drgCode";var Qi=class extends P{constructor(t,e){super(o_,t,e)}};var Ar={type:"codes",category:"case",displayName:{de:"Ziffer-Spektra"},sortingIndex:8,occurrence:"multiple",fromObject(i){let t=i.matching||"exact",e;return i.codeTypeSpecification&&(e=i.codeTypeSpecification),Promise.resolve(new Ji(i.codeSpectrumIds||[],i.codingSystem,t,e,i.codeTypeClassification,i.includes,i.grouperVersionYear))},fromCondition(i){let t=[];return i.includes&&(t=i.includes.map(e=>e).map(e=>new Ki(e.name,e.description,e.codingSystem,e.hierarchyElementType,e.year,e.codeSpectrumId,e.weight??0))),i.excludes&&(t=i.excludes.map(e=>e).map(e=>new Ki(e.name,e.description,e.codingSystem,e.hierarchyElementType,e.year,e.codeSpectrumId,e.weight??0))),Promise.resolve(new Ji(i.codeSpectrumIds,i.codingSystem,i.matching,i.codeTypeSpecification,i.codeTypeClassification,!i?.excludes,i.grouperVersionYear,t))},newInstance(){return Promise.resolve(new Ji([],"OPS"))}},Ji=(()=>{class i extends I{static{this.Specification=Ar}constructor(e,n,r="exact",s,o,a=!0,l,c=[]){super(Ar.type),this.codeSpectrumIds=e,this.codingSystem=n,this.matching=r,this.codeTypeSpecification=s,this.codeTypeClassification=o,this.includes=a,this.grouperVersionYear=l,this.codes=c}clone(){return new i([...this.codeSpectrumIds],this.codingSystem,this.matching?JSON.parse(JSON.stringify(this.matching)):null,this.codeTypeSpecification?JSON.parse(JSON.stringify(this.codeTypeSpecification)):null,this.codeTypeClassification?JSON.parse(JSON.stringify(this.codeTypeClassification)):null,this.includes,this.grouperVersionYear,this.codes?[...this.codes.map(e=>e.clone())]:null)}equals(e){return super.equals(e)&&O.equals(this.codeSpectrumIds,e.codeSpectrumIds)&&M.equals(this.codingSystem,e.codingSystem)&&M.equals(this.matching,e.matching)&&M.equals(this.codeTypeClassification,e.codeTypeClassification,(n,r)=>M.equals(n?.name,r?.name)&&M.equals(n?.numberOfDigit,r?.numberOfDigit))&&M.equals(this.codeTypeSpecification,e.codeTypeSpecification,(n,r)=>JSON.stringify(n)===JSON.stringify(r))&&M.equals(this.includes,e.includes)&&M.equals(this.grouperVersionYear,e.grouperVersionYear)}getChildResources(){let e=[];return this.codeSpectrumIds.forEach(n=>{e.indexOf(n)===-1&&e.push(n)}),{[de.CODE_SPECTRUM]:e}}valid(){return super.valid()&&this.codeSpectrumIds&&this.codeSpectrumIds.length>0}validationToText(){return this.codeSpectrumIds.length===0?"Mindestens ein Ziffer-Spektrum ausw\xE4hlen":""}toText(){return this.codeSpectrumIds.length===1?"ein Ziffer-Spektrum":`${this.codeSpectrumIds.length} Ziffer-Spektra`}toJSON(){return{type:this.type,codeSpectrumIds:this.codeSpectrumIds,codingSystem:this.codingSystem,codeTypeSpecification:this.codeTypeSpecification,codeTypeClassification:this.codeTypeClassification,matching:this.matching,includes:this.includes,grouperVersionYear:this.grouperVersionYear}}toValue(){return this}toCondition(e){if(!e.codeSpectra)throw new Error("Missing dependency resolver: codeSpectra");return e.codeSpectra.resolve({codeSpectrumIds:this.codeSpectrumIds,codingSystem:this.codingSystem}).then(r=>{this.codes=r;let s=null;switch(this.codingSystem){case"ICD-10-UK":case"ICD-10-AT":case"ICD-10-GM":s=this._toIcdCondition();break;case"OPS":s=this._toOpsCondition();break;case"G-DRG":this.grouperVersionYear?s=this.includes?new is(this.grouperVersionYear,this.codes,null):new is(this.grouperVersionYear,null,this.codes):s=this.includes?new Qi(this.codes,null):new Qi(null,this.codes);break;default:throw new Error(`Invalid coding system: ${this.codingSystem}`)}return s})}_toIcdCondition(){let e=this.codeTypeSpecification,n;switch(e){case"secondaryDiagnosis":{n=this._toSecondaryDiagnosisCondition();break}case"skCode":{n=this._toIcdSecondaryCode();break}default:{n=this._toMainDiagnosisCondition();break}}return this.includes?n.includes=this.codes:n.excludes=this.codes,n}_toMainDiagnosisCondition(){return this.matching==="exact"?new rs(null,null,this.codeSpectrumIds,this.codingSystem,this.matching,this.codeTypeSpecification,this.codeTypeClassification,this.grouperVersionYear):new ss(null,null,this.codeSpectrumIds,this.codingSystem,this.matching,this.codeTypeSpecification,this.codeTypeClassification,this.grouperVersionYear,this.codeTypeClassification?this.codeTypeClassification.numberOfDigit:null)}_toSecondaryDiagnosisCondition(){return this.matching==="exact"?new as(null,null,this.codeSpectrumIds,this.codingSystem,this.matching,this.codeTypeSpecification,this.codeTypeClassification,this.grouperVersionYear):new ls(null,null,this.codeSpectrumIds,this.codingSystem,this.matching,this.codeTypeSpecification,this.codeTypeClassification,this.grouperVersionYear,this.codeTypeClassification?this.codeTypeClassification.numberOfDigit:null)}_toOpsCondition(){let e=this.codeTypeSpecification,n;switch(e){case"mainProcedure":{n=this._toOpsMainProcedure();break}default:{n=this._toOpsCode();break}}return this.includes?n.includes=this.codes:n.excludes=this.codes,n}_toOpsMainProcedure(){return this.matching==="exact"?new Tl(null,null,this.codeSpectrumIds,this.codingSystem,this.matching,this.codeTypeSpecification,this.codeTypeClassification,this.grouperVersionYear):new Ml(null,null,this.codeSpectrumIds,this.codingSystem,this.matching,this.codeTypeSpecification,this.codeTypeClassification,this.grouperVersionYear,this.codeTypeClassification?this.codeTypeClassification.numberOfDigit:null)}_toIcdSecondaryCode(){return this.matching==="exact"?new Fl(null,null,this.codeSpectrumIds,this.codingSystem,this.matching,this.codeTypeSpecification,this.codeTypeClassification,this.grouperVersionYear):new Vl(null,null,this.codeSpectrumIds,this.codingSystem,this.matching,this.codeTypeSpecification,this.codeTypeClassification,this.grouperVersionYear,this.codeTypeClassification?this.codeTypeClassification.numberOfDigit:null)}_toOpsCode(){return this.matching==="exact"?new On(null,null,this.codeSpectrumIds,this.codingSystem,this.matching,this.codeTypeSpecification,this.codeTypeClassification,this.grouperVersionYear):new Bl(null,null,this.codeSpectrumIds,this.codingSystem,this.matching,this.codeTypeSpecification,this.codeTypeClassification,this.grouperVersionYear,this.codeTypeClassification?this.codeTypeClassification.numberOfDigit:null)}}return i})();var Cd={type:"dismissalDate",category:"case",displayName:{de:"Entlass-Datum"},sortingIndex:8,occurrence:"multiple",fromObject(i){return Promise.resolve(new wr(es.fromObject(i.timeSelection)))},fromCondition(i){return Promise.reject(new Error("Not yet implemented"))},newInstance(){return Promise.resolve(new wr(new ts(new ci(new Date,new Date))))}},wr=(()=>{class i extends I{static{this.Specification=Cd}constructor(e){super(Cd.type),this.timeSelection=e}hasRelativeTimeSelection(){return this.timeSelection.type==="relative"}toCondition(){switch(this.timeSelection.type){case"relative":{let e=this.timeSelection;return Promise.resolve(new os(e.intervalRelative))}default:{let e=this.timeSelection;return Promise.resolve(new ns(e.interval))}}}toJSON(){return{type:this.type,timeSelection:this.timeSelection.toJSON()}}toText(){return"Entlass-Datum"}toValue(){return this.timeSelection}getOverrideProperties(e,n){return[new De(e,"dismissalDate",this.timeSelection,this.timeSelection,"possible",void 0,(r,s)=>r.equals(s),r=>r.clone())]}overrideClone(e){let n=Oe.overrideProperty(this.timeSelection,"dismissalDate",e,r=>r.clone());return n?new i(n):null}equals(e){return super.equals(e)&&this.timeSelection.equals(e.timeSelection)}valid(){return super.valid()&&this.timeSelection.valid()}validationToText(){return this.timeSelection&&this.timeSelection.valid()?"":"Einen g\xFCltigen Zeitraum ausw\xE4hlen"}clone(){return new i(this.timeSelection.clone())}}return i})();var yd={type:"dismissalYear",category:"case",displayName:{de:"Entlass Jahr"},sortingIndex:8,occurrence:"multiple",fromObject(i){return Promise.resolve(new Wi(i.year))},fromCondition(i){return i.includes&&i.includes.length===1?Promise.resolve(new Wi(i.includes[0])):Promise.reject(new Error("Missing DismissalYear"))},newInstance(){return Promise.resolve(new Wi(new Date().getFullYear()))}},Wi=(()=>{class i extends I{static{this.Specification=yd}constructor(e){super(yd.type),this.year=e}clone(){return new i(this.year)}equals(e){return super.equals(e)&&M.equals(this.year,e.year)}validationToText(){return this.year?"":"Entlass-Jahr auw\xE4hlen"}toCondition(){return Promise.resolve(new Pn([this.year],[]))}toJSON(){return{type:this.type,year:this.year}}toText(){return"Entlass-Jahr"}toValue(){return this.year}}return i})();var a_="dismissalReason",vd={type:"dismissionCauses",category:"case",displayName:{de:"Entlassgrund"},sortingIndex:8,occurrence:"single",fromObject(i){return Promise.resolve(new $i(i.dismissionCauses))},fromCondition(i){return Promise.resolve(new $i(i.includes))},newInstance(){return Promise.resolve(new $i([]))}},$i=(()=>{class i extends I{static{this.Specification=vd}constructor(e){super(vd.type),this.dismissionCauses=e}clone(){return new i([...this.dismissionCauses])}equals(e){return super.equals(e)&&O.equals(this.dismissionCauses,e.dismissionCauses)}validationToText(){return this.dismissionCauses.length===0?"Mindestens einen Entlassgrund ausw\xE4hlen":""}toCondition(){return Promise.resolve(new Zo(this.dismissionCauses,[]))}toJSON(){return{type:this.type,dismissionCauses:this.dismissionCauses}}toText(){return this.dismissionCauses.length===1?"einen Entlassgrund":`${this.dismissionCauses.length} Entlassgr\xFCnde`}toValue(){return this.dismissionCauses}}return i})(),Zo=class extends P{constructor(t,e){super(a_,t,e)}};var l_="drgCodeExists",xd={type:"drgCodeExists",category:"case",displayName:{de:"DRG vorhanden"},sortingIndex:11,occurrence:"multiple",fromObject(i){return Promise.resolve(new Xi(i.isNotNull??i._isNotNull))},fromCondition(i){return Promise.resolve(new Xi(i.isNotNull))},newInstance(){return Promise.resolve(new Xi(!0))}},Xi=(()=>{class i extends I{static{this.Specification=xd}constructor(e){super(xd.type),this._isNotNull=e}toCondition(){return Promise.resolve(new jo(this._isNotNull))}toJSON(){return{type:this.type,isNotNull:this._isNotNull}}toText(){return"DRG vorhanden"}toValue(){return this._isNotNull}equals(e){return super.equals(e)&&this._isNotNull===e._isNotNull}valid(){return this._isNotNull!==null&&this._isNotNull!==void 0}validationToText(){return this.valid()?"":"Ja/Nein ausw\xE4hlen"}clone(){return new i(this._isNotNull)}}return i})(),jo=class extends se{constructor(t){super(l_),this.isNotNull=t}toJSON(){return{[this.id]:{isNotNull:this.isNotNull}}}};var bd={type:"drivingTime",category:"case",displayName:{de:"Erreichbarkeit innerhalb Fahrzeit"},sortingIndex:8,occurrence:"multiple",fromObject(i){return Promise.resolve(new Dr(i.includeRanges))},fromCondition(i){return Promise.reject(new Error("Not yet implemented"))},newInstance(){return Promise.resolve(new Dr([]))}},Dr=(()=>{class i extends I{static{this.Specification=bd}constructor(e){super(bd.type),this.includeRanges=e}toCondition(){return this.includeRanges&&this.includeRanges.length===1?Promise.resolve(this._rangeToCondition(this.includeRanges[0])):this.includeRanges&&this.includeRanges.length>1?Promise.resolve(new Tt(this.includeRanges.map(e=>this._rangeToCondition(e)))):Promise.resolve(new cs)}toJSON(){return{type:this.type,includeRanges:this.includeRanges}}toText(){return"Erreichbarkeit innerhalb einer Fahrzeit"}toValue(){return this.includeRanges}equals(e){return super.equals(e)&&O.equals(this.includeRanges,e.includeRanges,(n,r)=>M.equals(n.min,r.min)&&M.equals(n.max,r.max))}validationToText(){return this.includeRanges.length===0?"Mindestens eine Erreichbarkeit ausw\xE4hlen":""}clone(){return new i(this.includeRanges.map(e=>JSON.parse(JSON.stringify(e))))}_rangeToCondition(e){return e.min!==void 0&&e.max!==void 0?new Ne([new ui(e.min,et.GREATER_OR_EQUAL),new ui(e.max,et.LESS_OR_EQUAL)]):e.min!==void 0?new ui(e.min,et.GREATER_OR_EQUAL):new ui(e.max,et.LESS_OR_EQUAL)}}return i})();var c_="fabKey",Sd={type:"fabKeys",category:"case",displayName:{de:"\xA7301 Fachabteilungsschl\xFCssel"},sortingIndex:8,occurrence:"single",fromObject(i){return Promise.resolve(new Zi(i.fabKeys))},fromCondition(i){return Promise.resolve(new Zi(i.includes))},newInstance(){return Promise.resolve(new Zi([]))}},Zi=(()=>{class i extends I{static{this.Specification=Sd}constructor(e){super(Sd.type),this.fabKeys=e}clone(){return new i([...this.fabKeys])}equals(e){return super.equals(e)&&O.equals(this.fabKeys,e.fabKeys)}overrideClone(e){let n=this.fabKeys?Oe.overrideProperties(this.fabKeys,"fabKey",e,r=>r):null;return new i(n)}getOverrideProperties(e,n){return this.fabKeys.map(r=>new De(e,"fabKey",r,r,"possible",n))}validationToText(){return this.fabKeys.length===0?"Mindestens einen \xA7301 Fachabteilungsschl\xFCssel ausw\xE4hlen":""}toCondition(){return Promise.resolve(new ea(this.fabKeys,[]))}toText(){return this.fabKeys.length===1?"einen \xA7301 Fachabteilungsschl\xFCssel":`${this.fabKeys.length} \xA7301 Fachabteilungsschl\xFCssel`}toJSON(){return{type:this.type,fabKeys:this.fabKeys}}toValue(){return this.fabKeys}}return i})(),ea=class extends P{constructor(t,e){super(c_,t,e)}};var u_="fullyInpatientCases",Id={type:"fullyInpatientCases",category:"clinic",displayName:{de:"Fallzahl"},sortingIndex:8,occurrence:"multiple",fromObject(i){return Promise.resolve(new ta(i.from,i.to))},fromCondition(i){return Promise.resolve(new ta(i.from,i.to))},newInstance(){return Promise.resolve(new ta(null,null))}},ta=(()=>{class i extends I{static{this.Specification=Id}constructor(e,n){super(Id.type),this.from=e,this.to=n}clone(){return new i(this.from,this.to)}equals(e){return super.equals(e)&&M.equals(this.from,e.from)&&M.equals(this.to,e.to)}valid(){return Number.isInteger(this.to)&&Number.isInteger(this.from)?this.from{class i extends I{static{this.Specification=Ad}constructor(e){super(Ad.type),this.bool=e}clone(){return new i(this.bool)}equals(e){return super.equals(e)&&M.equals(this.bool,e.bool)}valid(){return this.bool!==null&&this.bool!==void 0}validationToText(){return this.valid()?"":"Kriterium ausw\xE4hlen"}toCondition(){return Promise.resolve(new ra(this.bool))}toJSON(){return{type:this.type,inekCalculationLocation:this.bool}}toText(){return this.bool?"mit InEK Kalkulationskrankenh\xE4user":"ohne InEK Kalkulationskrankenh\xE4user"}toValue(){return this.bool}}return i})(),ra=class extends Il{constructor(t){super(d_,t),this.flag=t}};var h_="inlierType";var Or=class extends An{constructor(t){super(h_,t)}};var wd={type:"inlierTypes",category:"case",displayName:{de:"Verweildauer"},sortingIndex:8,occurrence:"single",fromObject(i){return Promise.resolve(new Er(i.inlierTypes))},fromCondition(i){return Promise.reject(new Error("Not yet implemented"))},newInstance(){return Promise.resolve(new Er([]))}},Er=(()=>{class i extends I{static{this.Specification=wd}constructor(e){super(wd.type),this.inlierTypes=e}clone(){return new i([...this.inlierTypes])}equals(e){return super.equals(e)&&O.equals(this.inlierTypes,e.inlierTypes)}validationToText(){return this.valid()?"":"Mindestens eine Verweildauer ausw\xE4hlen"}toCondition(){return Promise.resolve(new Tt(this.inlierTypes.map(e=>new Or(e))))}toJSON(){return{type:this.type,inlierTypes:this.inlierTypes}}toText(){return this.inlierTypes.length===1?"ein Typ der Verweildauer":`${this.inlierTypes.length} Typen der Verweildauer`}toValue(){return this.inlierTypes}}return i})();var p_="insuranceType",Dd={type:"insuranceType",category:"person",displayName:{de:"Versicherungsart"},sortingIndex:8,occurrence:"single",fromObject(i){return Promise.resolve(new ji(i.insuranceType))},fromCondition(i){return Promise.resolve(new ji(i.equals))},newInstance(){return Promise.resolve(new ji(null))}},ji=(()=>{class i extends I{static{this.Specification=Dd}constructor(e){super(Dd.type),this.insuranceType=e}clone(){return new i(this.insuranceType)}equals(e){return super.equals(e)&&M.equals(this.insuranceType,e.insuranceType)}validationToText(){return this.valid()?"":"Versicherungsart ausw\xE4hlen"}toCondition(){return Promise.resolve(new sa(this.insuranceType))}toJSON(){return{type:this.type,insuranceType:this.insuranceType}}toText(){return"Versicherungsart"}toValue(){return this.insuranceType}}return i})(),sa=class extends An{constructor(t){super(p_,t)}};var m_="khtgLeistungsgruppe",Od={type:"khtgLeistungsgruppe",category:"case",displayName:{de:"KHTG Leistungsgruppen"},sortingIndex:8,occurrence:"single",fromObject(i){return Promise.resolve(new Pr(i.leistungsgruppen))},fromCondition(i){return Promise.reject(new Error("not yet implemented"))},newInstance(){return Promise.resolve(new Pr([]))}},Pr=(()=>{class i extends I{static{this.Specification=Od}constructor(e){super(Od.type),this.leistungsgruppen=e}clone(){return new i([...this.leistungsgruppen])}equals(e){return super.equals(e)&&O.equals(this.leistungsgruppen,e.leistungsgruppen)}validationToText(){return this.valid()?"":"Mindestens eine KHTG Leistungsgruppe ausw\xE4hlen"}toCondition(){return Promise.resolve(new oa(this.leistungsgruppen,[]))}toText(){return this.leistungsgruppen.length===1?"eine KHTG Leistungsgruppe":`${this.leistungsgruppen.length} KHTG Leistungsgruppen`}toJSON(){return{type:this.type,leistungsgruppen:this.leistungsgruppen}}toValue(){return this.leistungsgruppen}}return i})(),oa=class extends P{constructor(t,e){super(m_,t,e)}};var f_="stateId",Ed={type:"stateIds",category:"person",displayName:{de:"Bundesl\xE4nder"},sortingIndex:1,occurrence:"single",fromObject(i){return Promise.resolve(new en(i.stateIds))},fromCondition(i){return Promise.resolve(new en(i.includes))},newInstance(){return Promise.resolve(new en([]))}},en=(()=>{class i extends I{static{this.Specification=Ed}constructor(e){super(Ed.type),this.stateIds=e}clone(){return new i([...this.stateIds??[]])}equals(e){return super.equals(e)&&O.equals(this.stateIds,e.stateIds)}validationToText(){return this.stateIds.length===0?"Mindestens ein Bundesland ausw\xE4hlen":""}toCondition(){return Promise.resolve(new jt(this.stateIds,[]))}toJSON(){return{type:this.type,stateIds:this.stateIds}}toText(){return this.stateIds.length===1?"ein Bundesland":`${this.stateIds.length} Bundesl\xE4nder`}toValue(){return this.stateIds}}return i})(),jt=class extends P{constructor(t,e){super(f_,t,e)}};var g_="postalCode",Pd={type:"postalCodes",category:"person",displayName:{de:"Postleitzahlen"},sortingIndex:5,occurrence:"single",fromObject(i){return Promise.resolve(new tn(i.postalCodes))},fromCondition(i){return Promise.resolve(new tn(i.includes))},newInstance(){return Promise.resolve(new tn([]))}},tn=(()=>{class i extends I{static{this.Specification=Pd}constructor(e){super(Pd.type),this.postalCodes=e}clone(){return new i([...this.postalCodes])}equals(e){return super.equals(e)&&O.equals(this.postalCodes,e.postalCodes)}validationToText(){return this.postalCodes.length===0?"Mindestens eine Postleitzahl ausw\xE4hlen":""}toCondition(){return Promise.resolve(new ei(this.postalCodes,[]))}toJSON(){return{type:this.type,postalCodes:this.postalCodes}}toText(){return this.postalCodes.length===1?"eine Postleitzahl":`${this.postalCodes.length} Postleitzahlen`}toValue(){return this.postalCodes}}return i})(),ei=class extends P{constructor(t,e){super(g_,t,e)}};var Td={type:"markets",category:"person",displayName:{de:"M\xE4rkte"},sortingIndex:8,occurrence:"single",fromObject(i){return Promise.resolve(new Tr(i.marketIds))},fromCondition(i){return Promise.reject(new Error("Not yet implemented"))},newInstance(){return Promise.resolve(new Tr([]))}},Tr=(()=>{class i extends I{static{this.Specification=Td}constructor(e){super(Td.type),this.marketIds=e}clone(){return new i([...this.marketIds])}equals(e){return super.equals(e)&&O.equals(this.marketIds,e.marketIds)}overrideClone(e){return new i(this.marketIds?Oe.overrideProperties(this.marketIds,"market",e,n=>n):[])}getOverrideProperties(e,n){return this.marketIds.map(r=>new De(e,"market",r,r,"possible"))}getChildResources(){return{[de.MARKET]:this.marketIds}}validationToText(){return this.marketIds.length===0?"Mindestens einen Markt ausw\xE4hlen":""}toCondition(e){if(!e.markets)throw new Error("Missing dependency resolver: markets");return e.markets.transform(this.marketIds,[{value:"stateId"},{value:"administrativeDistrictId"},{value:"postalCode"}]).then(r=>{let s=[],o=Object.values(r).flat().map(c=>parseInt(c.label,10));o.length>0&&s.push(new jt(o,[]));let a=Object.values(r).flat().map(c=>c.children??[]).flat().map(c=>j.create(c.label));a.length>0&&s.push(new $t(a,[]));let l=Object.values(r).flat().map(c=>c.children??[]).flat().map(c=>c.children??[]).flat().map(c=>c.label);return l.length>0&&s.push(new ei(l,[])),new Ne(s)})}toJSON(){return{type:this.type,marketIds:this.marketIds}}toText(){return this.marketIds.length===1?"ein Markt":`${this.marketIds.length} M\xE4rkte`}toValue(){return this.marketIds}}return i})();var __="nrwServiceGroup",Md={type:"nrwServiceGroups",category:"case",displayName:{de:"NRW Leistungsgruppen"},sortingIndex:7,occurrence:"single",fromObject(i){return Promise.resolve(new nn(i.nrwServiceGroupIds))},fromCondition(i){return Promise.resolve(new nn(i.includes))},newInstance(){return Promise.resolve(new nn([]))}},nn=(()=>{class i extends I{static{this.Specification=Md}constructor(e){super(Md.type),this.nrwServiceGroupIds=e}clone(){return new i([...this.nrwServiceGroupIds])}equals(e){return super.equals(e)&&O.equals(this.nrwServiceGroupIds,e.nrwServiceGroupIds)}validationToText(){return this.nrwServiceGroupIds.length===0?"Mindestens eine NRW Leistungsgruppe ausw\xE4hlen":""}toCondition(){return Promise.resolve(new aa(this.nrwServiceGroupIds,[]))}toJSON(){return{type:this.type,nrwServiceGroupIds:this.nrwServiceGroupIds}}toText(){return this.nrwServiceGroupIds.length===1?"eine NRW Leistungsgruppe":`${this.nrwServiceGroupIds.length} NRW Leistungsgruppen`}toValue(){return this.nrwServiceGroupIds}}return i})(),aa=class extends P{constructor(t,e=[]){super(__,t,e)}};var C_="specialEquipment",kd={type:"specialEquipment",category:"clinic",displayName:{de:"Klinik-Ausstattung"},occurrence:"single",sortingIndex:8,fromObject(i){return Promise.resolve(new la(i.includeSpecialEquipmentKeys))},newInstance(){return Promise.resolve(new la)},fromCondition(i){return Promise.resolve(new la(i.includes,i.excludes))}},la=(()=>{class i extends I{static{this.Specification=kd}constructor(e=[],n=[]){super(kd.type),this.includeKeys=e,this.excludeKeys=n}toCondition(){return Promise.resolve(new ca(this.includeKeys,this.excludeKeys))}toJSON(){return{type:this.type,includeSpecialEquipmentKeys:this.includeKeys}}toText(){return this.includeKeys.length===1?"ein Ausstattungs-Merkmal":`${this.includeKeys.length} Ausstattungs-Merkmale`}validationToText(){return this.valid()?"":"Ausstattungs-Merkmale ausw\xE4hlen"}toValue(){return this.includeKeys}clone(){return new i([...this.includeKeys],[...this.excludeKeys])}equals(e){return super.equals(e)&&O.equals(this.includeKeys,e.includeKeys)&&O.equals(this.excludeKeys,e.excludeKeys)}}return i})(),ca=class extends P{constructor(t=[],e=[]){super(C_,t,e)}};var y_="specialtyDepartmentId",Mr={type:"specialtyDepartmentIds",category:"case",displayName:{de:"Fachabteilung"},sortingIndex:8,occurrence:"single",fromObject(i){return Promise.resolve(new rn(i.specialtyDepartmentIds))},fromCondition(i){return Promise.resolve(new rn(i.includes))},newInstance(){return Promise.resolve(new rn([]))}},rn=(()=>{class i extends I{static{this.Specification=Mr}constructor(e){super(Mr.type),this.specialtyDepartmentIds=e}clone(){return new i([...this.specialtyDepartmentIds])}equals(e){return super.equals(e)&&O.equals(this.specialtyDepartmentIds,e.specialtyDepartmentIds)}getOverrideProperties(e,n){return this.specialtyDepartmentIds.map(r=>new De(e,"specialtyDepartmentId",r,r,"possible",n))}overrideClone(e){let n=Oe.overrideProperties(this.specialtyDepartmentIds,"specialtyDepartmentId",e,r=>r);return new i(n)}validationToText(){return this.specialtyDepartmentIds.length===0?"Mindestens eine Fachabteilung ausw\xE4hlen":""}toCondition(){return Promise.resolve(new ua(this.specialtyDepartmentIds))}toJSON(){return{type:this.type,specialtyDepartmentIds:this.specialtyDepartmentIds}}toText(){return this.specialtyDepartmentIds.length===1?"eine Fachabteilung":`${this.specialtyDepartmentIds.length} Fachabteilungen`}toValue(){return this.specialtyDepartmentIds}}return i})(),ua=class extends P{constructor(t=[],e=[]){super(y_,t,e)}};var v_="virtualClinicBenchmarkingGroupIds",Nd={type:"virtualBenchmarkingGroupIds",category:"clinic",displayName:{de:"Benchmarking Gruppe"},sortingIndex:8,occurrence:"single",fromObject(i){return Promise.resolve(new sn(i.virtualBenchmarkingGroupIds))},fromCondition(i){return Promise.resolve(new sn(i.includes))},newInstance(){return Promise.resolve(new sn([]))}},sn=(()=>{class i extends I{static{this.Specification=Nd}constructor(e){super(Nd.type),this.virtualBenchmarkingGroupIds=e}clone(){return new i([...this.virtualBenchmarkingGroupIds])}equals(e){return super.equals(e)&&O.equals(this.virtualBenchmarkingGroupIds,e.virtualBenchmarkingGroupIds)}getChildResources(){let e={};return e[de.VIRTUAL_CLINIC_BENCHMARKING_GROUP]=this.virtualBenchmarkingGroupIds,e}getOverrideProperties(e,n){let r=[];return this.virtualBenchmarkingGroupIds&&this.virtualBenchmarkingGroupIds.length>0&&this.virtualBenchmarkingGroupIds.forEach(s=>{r.push(new De(e,"virtualBenchmarkingGroupId",s,s,"possible",void 0))}),r}overrideClone(e){let n=this.virtualBenchmarkingGroupIds?Oe.overrideProperties(this.virtualBenchmarkingGroupIds,"virtualBenchmarkingGroupId",e,r=>r):[];return new i(n)}validationToText(){return this.virtualBenchmarkingGroupIds.length===0?"Mindestens eine Benchmarking Gruppe ausw\xE4hlen":""}toCondition(){return Promise.resolve(new da(this.virtualBenchmarkingGroupIds))}toJSON(){return{type:this.type,virtualBenchmarkingGroupIds:this.virtualBenchmarkingGroupIds}}toText(){return this.virtualBenchmarkingGroupIds.length===1?"eine Benchmarking Gruppe":`${this.virtualBenchmarkingGroupIds.length} Benchmarking Gruppen`}toValue(){return this.virtualBenchmarkingGroupIds}}return i})(),da=class extends P{constructor(t=[],e=[]){super(v_,t,e)}};var fe=class i{static EMPTY(){return new Dt([])}static equals(t,e){return M.equals(t,e,()=>{if(t.type!==e.type)return!1;switch(t.type){case"combination":return t.equals(e);default:return t.equals(e)}})}static fromConditionJson(t,e){let n=Object.keys(t);if(n.length===0||n.length>1)throw new Error(`${i.name}.fromObject not possible for input [${JSON.stringify(t)}]`);let r=n[0],s=t[n[0]];switch(r){case wn:case Dn:return Ri.fromConditionJson(r,s,e);case zl:case Ul:case Dl:case Ol:case El:case Pl:case kl:case Nl:case Ll:case Rl:return Ar.fromCondition(s);default:{let o=e.find(a=>a.filterConditionId===r);return o?o.filterConditionPluginSpecification.fromCondition(s):Promise.reject(new Error(`No filter plugin found for ${r}, input [${JSON.stringify(t)}]`))}}}static fromObject(t,e){if(!t.type)throw new Error(`${i.name}.fromObject not possible for input [${JSON.stringify(t)}]`);switch(t.type){case"combination":return Ri.fromObject(t,e);default:{let n=e.find(r=>r.filterType===t.type);return n?n.filterConditionPluginSpecification.fromObject(t):Promise.reject(new Error(`${i.name}.fromObject not possible for input [${JSON.stringify(t)}]`))}}}static withoutType(t,e){switch(t.type){case"combination":{let n=t;return n.expression=n.expression.map(r=>i.withoutType(r,e)).filter(r=>!!r),n}default:return t.type===e.type?null:t}}static findAll(t,e){switch(e.type){case"combination":return e.expression.map(n=>this.findAll(t,n)).flat();case t.type:return[e];default:return[]}}static and(t,e){return t.type==="combination"&&t.kind==="AND"?(t.expression.push(e),t):e.type==="combination"&&e.kind==="AND"?(e.expression.push(t),e):new Dt([t,e])}static or(t,e){return t.type==="combination"&&t.kind==="OR"?(t.expression.push(e),t):e.type==="combination"&&e.kind==="OR"?(e.expression.push(t),e):new Wt([t,e])}static formatter(t){switch(t.type){case"combination":{let e=t.kindToText();return t.expression.map(n=>({kind:e,expressionText:this.formatter(n)}))}default:return t.toText()}}};var ti=class{constructor(t,e){this.type=t,this.expression=e}getOverrideProperties(t,e){return[...this.expression.getOverrideProperties(t,e)]}toJSON(){return{type:this.type,expression:this.expression.toJSON()}}getChildResources(){return this.expression.getChildResources()}toRequestBody(t){return this.expression.toCondition(t)}equals(t){return M.equals(this.type,t.type)&&fe.equals(this.expression,t.expression)}};var x_="aop",Bd={type:"aop",category:"case",displayName:{de:"AOP Kriterien"},sortingIndex:8,occurrence:"multiple",fromObject(i){return Promise.resolve(new ii(i.aopVersionYear,i.abschnitt1??null,i.abschnitt2??null,i.abschnitt1Oder2??null,i.icdNichtAmbulant??null,i.opsStationaer??null,i.funktionseinschraenkungen??null,i.pflegegrad??null,i.beatmung??null,i.altersgrenze??null,i.beidseitig??null,i.ophthalm??null,i.aop??null))},fromCondition(i){return Promise.resolve(new ii(i.aopVersionYear,i.abschnitt1??null,i.abschnitt2??null,i.abschnitt1Oder2??null,i.icdNichtAmbulant??null,i.opsStationaer??null,i.funktionseinschraenkungen??null,i.pflegegrad??null,i.beatmung??null,i.altersgrenze??null,i.beidseitig??null,i.ophthalm??null,i.aop??null))},newInstance(){return Promise.resolve(new ii(ii.DEFAULT_AOP_VERSION_YEAR,null,null,!0,!0,!0,!0,!0,!0,!0,!0,!0,null))}},ii=(()=>{class i extends I{static{this.DEFAULT_AOP_VERSION_YEAR=2025}static{this.Specification=Bd}constructor(e,n=null,r=null,s=null,o=null,a=null,l=null,c=null,u=null,d=null,h=null,m=null,g=null){super(Bd.type),this._aopVersionYear=e,this._abschnitt1=n,this._abschnitt2=r,this._abschnitt1Oder2=s,this._icdNichtAmbulant=o,this._opsStationaer=a,this._funktionseinschraenkungen=l,this._pflegegrad=c,this._beatmung=u,this._altersgrenze=d,this._beidseitig=h,this._ophthalm=m,this._aop=g}clone(){return new i(this._aopVersionYear,this._abschnitt1,this._abschnitt2,this._abschnitt1Oder2,this._icdNichtAmbulant,this._opsStationaer,this._funktionseinschraenkungen,this._pflegegrad,this._beatmung,this._altersgrenze,this._beidseitig,this._ophthalm,this._aop)}equals(e){return super.equals(e)&&this._aopVersionYear===e._aopVersionYear&&this._abschnitt1===e.abschnitt1&&this._abschnitt2===e.abschnitt2&&this._abschnitt1Oder2===e.abschnitt1Oder2&&this._icdNichtAmbulant===e.icdNichtAmbulant&&this._opsStationaer===e.opsStationaer&&this._funktionseinschraenkungen===e.funktionseinschraenkungen&&this._pflegegrad===e.pflegegrad&&this._beatmung===e.beatmung&&this._altersgrenze===e.altersgrenze&&this._beidseitig===e.beidseitig&&this._ophthalm===e.ophthalm&&this._aop===e.aop}valid(){return!!this._aopVersionYear}validationToText(){return""}toCondition(){return Promise.resolve(new ha(this._aopVersionYear,this._abschnitt1,this._abschnitt2,this._abschnitt1Oder2,this._icdNichtAmbulant,this._opsStationaer,this._funktionseinschraenkungen,this._pflegegrad,this._beatmung,this._altersgrenze,this._beidseitig,this._ophthalm,this._aop))}toJSON(){return{type:this.type,aopVersionYear:this._aopVersionYear,abschnitt1:this._abschnitt1,abschnitt2:this._abschnitt2,abschnitt1Oder2:this._abschnitt1Oder2,icdNichtAmbulant:this._icdNichtAmbulant,opsStationaer:this._opsStationaer,funktionseinschraenkungen:this._funktionseinschraenkungen,pflegegrad:this._pflegegrad,beatmung:this._beatmung,altersgrenze:this._altersgrenze,beidseitig:this._beidseitig,ophthalm:this._ophthalm,aop:this._aop}}toText(){return"AOP Kriterien"}toValue(){return this}get abschnitt1(){return this._abschnitt1}set abschnitt1(e){this._abschnitt1=e}get abschnitt2(){return this._abschnitt2}set abschnitt2(e){this._abschnitt2=e}get icdNichtAmbulant(){return this._icdNichtAmbulant}set icdNichtAmbulant(e){this._icdNichtAmbulant=e}get opsStationaer(){return this._opsStationaer}set opsStationaer(e){this._opsStationaer=e}get funktionseinschraenkungen(){return this._funktionseinschraenkungen}set funktionseinschraenkungen(e){this._funktionseinschraenkungen=e}get pflegegrad(){return this._pflegegrad}set pflegegrad(e){this._pflegegrad=e}get beatmung(){return this._beatmung}set beatmung(e){this._beatmung=e}get altersgrenze(){return this._altersgrenze}set altersgrenze(e){this._altersgrenze=e}get beidseitig(){return this._beidseitig}set beidseitig(e){this._beidseitig=e}get ophthalm(){return this._ophthalm}set ophthalm(e){this._ophthalm=e}get aopVersionYear(){return this._aopVersionYear}set aopVersionYear(e){this._aopVersionYear=e}get abschnitt1Oder2(){return this._abschnitt1Oder2}set abschnitt1Oder2(e){this._abschnitt1Oder2=e}get aop(){return this._aop}set aop(e){this._aop=e}}return i})(),ha=class extends se{constructor(t,e,n,r,s,o,a,l,c,u,d,h,m){super(x_),this.aopVersionYear=t,this.abschnitt1=e,this.abschnitt2=n,this.abschnitt1Oder2=r,this.icdNichtAmbulant=s,this.opsStationaer=o,this.funktionseinschraenkungen=a,this.pflegegrad=l,this.beatmung=c,this.altersgrenze=u,this.beidseitig=d,this.ophthalm=h,this.aop=m}toJSON(){return{[this.id]:{aopVersionYear:this.aopVersionYear,abschnitt1:this.abschnitt1,abschnitt2:this.abschnitt2,abschnitt1Oder2:this.abschnitt1Oder2,icdNichtAmbulant:this.icdNichtAmbulant,opsStationaer:this.opsStationaer,funktionseinschraenkungen:this.funktionseinschraenkungen,pflegegrad:this.pflegegrad,beatmung:this.beatmung,altersgrenze:this.altersgrenze,beidseitig:this.beidseitig,ophthalm:this.ophthalm,aop:this.aop}}}};var b_="hartmannGroup",Ld={type:"hartmannCodeGroupIds",category:"case",displayName:{de:"Hartmann Gruppen"},sortingIndex:8,occurrence:"single",fromObject(i){return Promise.resolve(new on(i.hartmannCodeGroupIds))},fromCondition(i){return Promise.resolve(new on(i.includes))},newInstance(){return Promise.resolve(new on([]))}},on=(()=>{class i extends I{static{this.Specification=Ld}constructor(e){super(Ld.type),this.hartmannCodeGroupIds=e}clone(){return new i([...this.hartmannCodeGroupIds])}equals(e){return super.equals(e)&&O.equals(this.hartmannCodeGroupIds,e.hartmannCodeGroupIds)}validationToText(){return this.hartmannCodeGroupIds.length===0?"Mindestens eine Hartmann Gruppe ausw\xE4hlen":""}toCondition(){return Promise.resolve(new pa(this.hartmannCodeGroupIds,[]))}toJSON(){return{type:this.type,hartmannCodeGroupIds:this.hartmannCodeGroupIds}}toText(){return this.hartmannCodeGroupIds.length===1?"eine Hartmann Gruppe":`${this.hartmannCodeGroupIds.length} Hartmann Gruppen`}toValue(){return this.hartmannCodeGroupIds}}return i})(),pa=class extends P{constructor(t,e){super(b_,t,e)}};var an=class i{static fromObject(t={}){return new i(t.einschlussKriterien??null,t.k1DrgStationaer??null,t.k2OpsStationaer??null,t.k3StationaereBehandlungBeatmung??null,t.k5IcdBetreuungsbedarf??null,t.k6IcdStationaer??null,t.k6sErhoehterAufwand??null,t.k7Pccl??null,t.k8Pflegegrade??null,t.kSharpAlter??null)}constructor(t,e,n,r,s,o,a,l,c,u){this._einschlussKriterien=t,this._k1DrgStationaer=e,this._k2OpsStationaer=n,this._k3StationaereBehandlungBeatmung=r,this._k5IcdBetreuungsbedarf=s,this._k6IcdStationaer=o,this._k6sErhoehterAufwand=a,this._k7Pccl=l,this._k8Pflegegrade=c,this._kSharpAlter=u}clone(){return new i(this._einschlussKriterien,this._k1DrgStationaer,this._k2OpsStationaer,this._k3StationaereBehandlungBeatmung,this._k5IcdBetreuungsbedarf,this._k6IcdStationaer,this._k6sErhoehterAufwand,this._k7Pccl,this._k8Pflegegrade,this._kSharpAlter)}equals(t){return!!t&&this._einschlussKriterien===t._einschlussKriterien&&this._k1DrgStationaer===t.k1DrgStationaer&&this._k2OpsStationaer===t.k2OpsStationaer&&this._k3StationaereBehandlungBeatmung===t.k3StationaereBehandlungBeatmung&&this._k5IcdBetreuungsbedarf===t.k5IcdBetreuungsbedarf&&this._k6IcdStationaer===t.k6IcdStationaer&&this._k6sErhoehterAufwand===t.k6sErhoehterAufwand&&this._k7Pccl===t.k7Pccl&&this._k8Pflegegrade===t.k8Pflegegrade&&this._kSharpAlter===t.kSharpAlter}toJSON(){return{einschlussKriterien:this._einschlussKriterien,k1DrgStationaer:this._k1DrgStationaer,k2OpsStationaer:this._k2OpsStationaer,k3StationaereBehandlungBeatmung:this._k3StationaereBehandlungBeatmung,k5IcdBetreuungsbedarf:this._k5IcdBetreuungsbedarf,k6IcdStationaer:this._k6IcdStationaer,k6sErhoehterAufwand:this._k6sErhoehterAufwand,k7Pccl:this._k7Pccl,k8Pflegegrade:this._k8Pflegegrade,kSharpAlter:this._kSharpAlter}}set einschlussKriterien(t){this._einschlussKriterien=t}set k1DrgStationaer(t){this._k1DrgStationaer=t}set k2OpsStationaer(t){this._k2OpsStationaer=t}set k3StationaereBehandlungBeatmung(t){this._k3StationaereBehandlungBeatmung=t}set k6IcdStationaer(t){this._k6IcdStationaer=t}set k5IcdBetreuungsbedarf(t){this._k5IcdBetreuungsbedarf=t}set k8Pflegegrade(t){this._k8Pflegegrade=t}set k6sErhoehterAufwand(t){this._k6sErhoehterAufwand=t}get einschlussKriterien(){return this._einschlussKriterien}get k1DrgStationaer(){return this._k1DrgStationaer}get k2OpsStationaer(){return this._k2OpsStationaer}get k3StationaereBehandlungBeatmung(){return this._k3StationaereBehandlungBeatmung}get k6IcdStationaer(){return this._k6IcdStationaer}get k5IcdBetreuungsbedarf(){return this._k5IcdBetreuungsbedarf}get k8Pflegegrade(){return this._k8Pflegegrade}get k6sErhoehterAufwand(){return this._k6sErhoehterAufwand}get kSharpAlter(){return this._kSharpAlter}set kSharpAlter(t){this._kSharpAlter=t}get k7Pccl(){return this._k7Pccl}set k7Pccl(t){this._k7Pccl=t}};var S_="iges",Rd={type:"iges",category:"case",displayName:{de:"IGES Kriterien"},sortingIndex:8,occurrence:"single",fromObject(i){return Promise.resolve(new ln(an.fromObject(i.iges)))},fromCondition(i){return Promise.resolve(new ln(an.fromObject(i)))},newInstance(){return Promise.resolve(new ln(null))}},ln=(()=>{class i extends I{static{this.Specification=Rd}constructor(e){super(Rd.type),this._iges=e}clone(){let e=this._iges?this._iges.clone():null;return new i(e)}equals(e){return super.equals(e)&&M.equals(this._iges,e._iges,(n,r)=>n.equals(r))}toCondition(){return Promise.resolve(new ma(this._iges.einschlussKriterien,this._iges.k1DrgStationaer,this._iges.k2OpsStationaer,this._iges.k3StationaereBehandlungBeatmung,this._iges.k5IcdBetreuungsbedarf,this._iges.k6IcdStationaer,this._iges.k6sErhoehterAufwand,this._iges.k7Pccl,this._iges.k8Pflegegrade,this._iges.kSharpAlter))}validationToText(){return"IGES Kriterien ausw\xE4hlen"}toJSON(){return{type:this.type,iges:this._iges}}toText(){return"IGES Kriterien"}toValue(){return this._iges}}return i})(),ma=class extends se{constructor(t,e,n,r,s,o,a,l,c,u){super(S_),this.einschlussKriterien=t,this.k1DrgStationaer=e,this.k2OpsStationaer=n,this.k3StationaereBehandlungBeatmung=r,this.k5IcdBetreuungsbedarf=s,this.k6IcdStationaer=o,this.k6sErhoehterAufwand=a,this.k7Pccl=l,this.k8Pflegegrade=c,this.kSharpAlter=u}toJSON(){return{[this.id]:{einschlussKriterien:this.einschlussKriterien,k1DrgStationaer:this.k1DrgStationaer,k2OpsStationaer:this.k2OpsStationaer,k3StationaereBehandlungBeatmung:this.k3StationaereBehandlungBeatmung,k6IcdStationaer:this.k6IcdStationaer,k5IcdBetreuungsbedarf:this.k5IcdBetreuungsbedarf,k8Pflegegrade:this.k8Pflegegrade,k6sErhoehterAufwand:this.k6sErhoehterAufwand,k7Pccl:this.k7Pccl,kSharpAlter:this.kSharpAlter}}}};var I_="pccl",Fd={type:"pccl",category:"case",displayName:{de:"PCCL Kriterium"},sortingIndex:8,occurrence:"single",fromObject(i){return Promise.resolve(new cn(i.pccl))},fromCondition(i){return Promise.resolve(new cn(i.includes))},newInstance(){return Promise.resolve(new cn([]))}},cn=(()=>{class i extends I{static{this.Specification=Fd}constructor(e){super(Fd.type),this.pccl=e}clone(){return new i([...this.pccl])}equals(e){return super.equals(e)&&O.equals(this.pccl,e.pccl)}validationToText(){return this.pccl.length===0?"Mindestens ein PCCL Kriterium ausw\xE4hlen":""}toCondition(){return Promise.resolve(new fa(this.pccl,[]))}toJSON(){return{type:this.type,pccl:this.pccl}}toText(){return this.pccl.length===1?"ein PCCL Kriterium":`${this.pccl.length} PCCL Kriterien`}toValue(){return this.pccl}}return i})(),fa=class extends P{constructor(t,e){super(I_,t,e)}};var A_="fullyInpatientCaseOperatingNumberValue",Vd={type:"operatingNumberFilter",category:"case",displayName:{de:"Kennzahl-Filter"},sortingIndex:9,occurrence:"multiple",fromObject(i){return Promise.resolve(new un(i.operatingNumberId,i.value,i.comparison))},fromCondition(i){return Promise.resolve(new un(i.operatingNumberId,i.value,i.comparison))},newInstance(){return Promise.resolve(new un("counts","0","EQUAL"))}},un=(()=>{class i extends I{static{this.Specification=Vd}constructor(e,n,r){super(Vd.type),this.operatingNumberId=e,this.value=n,this.comparison=r}clone(){return new i(this.operatingNumberId,this.value,this.comparison)}equals(e){return super.equals(e)&&M.equals(this.value,e.value)&&M.equals(this.operatingNumberId,e.operatingNumberId)&&M.equals(this.comparison,e.comparison)}valid(){return!!this.operatingNumberId&&!!this.value&&this.value.match("^-?\\d+[.,]?\\d*$")&&!!this.comparison}validationToText(){return this.operatingNumberId?this.comparison?Number.isInteger(this.value)?"":"Wert ausw\xE4hlen":"Vergleich ausw\xE4hlen":"Kennzahl ausw\xE4hlen"}toCondition(){return Promise.resolve(new ga(this.operatingNumberId,this.value,this.comparison))}toJSON(){return{type:this.type,comparison:this.comparison,value:this.value.toString(),operatingNumberId:this.operatingNumberId}}toText(){let e;switch(this.comparison){case"EQUAL":{e="gleich";break}case"GREATER":{e="gr\xF6\xDFer als";break}case"GREATER_OR_EQUAL":{e="gr\xF6\xDFer oder gleich";break}case"LESS":{e="kleiner als";break}case"LESS_OR_EQUAL":{e="kleiner oder gleich";break}}return`Kennzahl ist ${e} ${this.value}`}toValue(){return{comparison:this.comparison,operatingNumberId:this.operatingNumberId,value:this.value}}}return i})(),ga=class extends se{constructor(t,e,n){super(A_),this.operatingNumberId=t,this.value=e,this.comparison=n}toJSON(){return{[this.id]:{operatingNumberId:this.operatingNumberId,value:this.value.replace(",","."),comparison:this.comparison}}}};var ni=class i{static fromObject(t={}){return new i(t.hybridDrgVersionYear,t.ops_p115f_a1_s1_n2_sgb??null,t.icdNichtAmbulant??null,t.opsStationaer??null,t.funktionseinschraenkungen??null,t.pflegegrad??null,t.beatmung??null,t.altersgrenze??null,t.beidseitig??null,t.ophthalm??null,t.belegungstage_lt_2??null,t.pccl_lt_3??null,t.keine_neubildungen??null)}constructor(t=2025,e=!0,n=!0,r=!0,s=!0,o=!0,a=!0,l=!0,c=!0,u=!0,d=!0,h=!0,m=!0){this._hybridDrgVersionYear=t,this._ops_p115f_a1_s1_n2_sgb=e,this._icdNichtAmbulant=n,this._opsStationaer=r,this._funktionseinschraenkungen=s,this._pflegegrad=o,this._beatmung=a,this._altersgrenze=l,this._beidseitig=c,this._ophthalm=u,this._belegungstage_lt_2=d,this._pccl_lt_3=h,this._keine_neubildungen=m}clone(){return new i(this._hybridDrgVersionYear,this._ops_p115f_a1_s1_n2_sgb,this._icdNichtAmbulant,this._opsStationaer,this._funktionseinschraenkungen,this._pflegegrad,this._beatmung,this._altersgrenze,this._beidseitig,this._ophthalm,this._belegungstage_lt_2,this._pccl_lt_3,this._keine_neubildungen)}equals(t){return!!t&&M.equals(this._hybridDrgVersionYear,t._hybridDrgVersionYear)&&this._ops_p115f_a1_s1_n2_sgb===t._ops_p115f_a1_s1_n2_sgb&&this._icdNichtAmbulant===t.icdNichtAmbulant&&this._opsStationaer===t.opsStationaer&&this._funktionseinschraenkungen===t.funktionseinschraenkungen&&this._pflegegrad===t.pflegegrad&&this._beatmung===t.beatmung&&this._altersgrenze===t.altersgrenze&&this._beidseitig===t.beidseitig&&this._ophthalm===t.ophthalm&&this._belegungstage_lt_2===t.belegungstage_lt_2&&this._pccl_lt_3===t.pccl_lt_3&&this._keine_neubildungen===t.keine_neubildungen}toJSON(){return{hybridDrgVersionYear:this._hybridDrgVersionYear,ops_p115f_a1_s1_n2_sgb:this._ops_p115f_a1_s1_n2_sgb,icdNichtAmbulant:this._icdNichtAmbulant,opsStationaer:this._opsStationaer,funktionseinschraenkungen:this._funktionseinschraenkungen,pflegegrad:this._pflegegrad,beatmung:this._beatmung,altersgrenze:this._altersgrenze,beidseitig:this._beidseitig,ophthalm:this._ophthalm,belegungstage_lt_2:this._belegungstage_lt_2,pccl_lt_3:this._pccl_lt_3,keine_neubildungen:this._keine_neubildungen}}get hybridDrgVersionYear(){return this._hybridDrgVersionYear}set hybridDrgVersionYear(t){this._hybridDrgVersionYear=t}get ops_p115f_a1_s1_n2_sgb(){return this._ops_p115f_a1_s1_n2_sgb}set ops_p115f_a1_s1_n2_sgb(t){this._ops_p115f_a1_s1_n2_sgb=t}get icdNichtAmbulant(){return this._icdNichtAmbulant}set icdNichtAmbulant(t){this._icdNichtAmbulant=t}get opsStationaer(){return this._opsStationaer}set opsStationaer(t){this._opsStationaer=t}get funktionseinschraenkungen(){return this._funktionseinschraenkungen}set funktionseinschraenkungen(t){this._funktionseinschraenkungen=t}get pflegegrad(){return this._pflegegrad}set pflegegrad(t){this._pflegegrad=t}get beatmung(){return this._beatmung}set beatmung(t){this._beatmung=t}get altersgrenze(){return this._altersgrenze}set altersgrenze(t){this._altersgrenze=t}get beidseitig(){return this._beidseitig}set beidseitig(t){this._beidseitig=t}get ophthalm(){return this._ophthalm}set ophthalm(t){this._ophthalm=t}get belegungstage_lt_2(){return this._belegungstage_lt_2}set belegungstage_lt_2(t){this._belegungstage_lt_2=t}get pccl_lt_3(){return this._pccl_lt_3}set pccl_lt_3(t){this._pccl_lt_3=t}get keine_neubildungen(){return this._keine_neubildungen}set keine_neubildungen(t){this._keine_neubildungen=t}};var w_="hybridDrg",zd={type:"hybridDrg",category:"case",displayName:{de:"Hybrid DRG"},sortingIndex:10,occurrence:"single",fromObject(i){return Promise.resolve(new dn(ni.fromObject(i.hybridDrg)))},fromCondition(i){return Promise.resolve(new dn(ni.fromObject(i)))},newInstance(){return Promise.resolve(new dn(new ni))}},dn=(()=>{class i extends I{static{this.Specification=zd}constructor(e){super(zd.type),this._hybridDrg=e}clone(){let e=this._hybridDrg?this._hybridDrg.clone():null;return new i(e)}equals(e){return e&&super.equals(e)&&this._hybridDrg.equals(e._hybridDrg)}toCondition(){return Promise.resolve(new _a(this._hybridDrg.hybridDrgVersionYear,this._hybridDrg.ops_p115f_a1_s1_n2_sgb,this._hybridDrg.icdNichtAmbulant,this._hybridDrg.opsStationaer,this._hybridDrg.funktionseinschraenkungen,this._hybridDrg.pflegegrad,this._hybridDrg.beatmung,this._hybridDrg.altersgrenze,this._hybridDrg.beidseitig,this._hybridDrg.ophthalm,this._hybridDrg.belegungstage_lt_2,this._hybridDrg.pccl_lt_3,this._hybridDrg.keine_neubildungen))}validationToText(){return"Hybrid DRG Kriterien ausw\xE4hlen"}toJSON(){return{type:this.type,hybridDrg:this._hybridDrg.toJSON()}}toText(){return"Hybrid DRG Kriterien"}toValue(){return this._hybridDrg}}return i})(),_a=class extends se{constructor(t=2025,e,n=null,r=null,s=null,o=null,a=null,l=null,c=null,u=null,d=null,h=null,m=null){super(w_),this._hybridDrgVersionYear=t,this._ops_p115f_a1_s1_n2_sgb=e,this._icdNichtAmbulant=n,this._opsStationaer=r,this._funktionseinschraenkungen=s,this._pflegegrad=o,this._beatmung=a,this._altersgrenze=l,this._beidseitig=c,this._ophthalm=u,this._belegungstage_lt_2=d,this._pccl_lt_3=h,this._keine_neubildungen=m}toJSON(){return{[this.id]:{hybridDrgVersionYear:this._hybridDrgVersionYear,ops_p115f_a1_s1_n2_sgb:this._ops_p115f_a1_s1_n2_sgb,icdNichtAmbulant:this._icdNichtAmbulant,opsStationaer:this._opsStationaer,funktionseinschraenkungen:this._funktionseinschraenkungen,pflegegrad:this._pflegegrad,beatmung:this._beatmung,altersgrenze:this._altersgrenze,beidseitig:this._beidseitig,ophthalm:this._ophthalm,belegungstage_lt_2:this._belegungstage_lt_2,pccl_lt_3:this._pccl_lt_3,keine_neubildungen:this._keine_neubildungen}}}};var D_="intuitiveFotCategory",Ud={type:"intuitiveFotCategory",category:"case",displayName:{de:"Intuitive File of Truth Category",en:"Intuitive File of Truth Category"},sortingIndex:8,occurrence:"single",newInstance(){return Promise.resolve(new hn([],null))},fromCondition(i){return Promise.resolve(new hn(i.includes?i.includes:null,i.excludes?i.excludes:null))},fromObject(i){return Promise.resolve(new hn(i.includes?i.includes:null,i.excludes?i.excludes:null))}},hn=(()=>{class i extends I{static{this.Specification=Ud}constructor(e,n){super(Ud.type),this.includes=e,this.excludes=n}clone(){return new i(this.includes?[...this.includes]:null,this.excludes?[...this.excludes]:null)}toCondition(){return Promise.resolve(new Ca(this.includes,this.excludes))}toJSON(){return{type:this.type,includes:this.includes?this.includes:null,excludes:this.excludes?this.excludes:null}}toValue(){return{includes:this.includes,excludes:this.excludes}}valid(){return this.includes&&this.includes.length>0||this.excludes&&this.excludes.length>0}validationToText(){return!this.includes&&!this.excludes||this.includes&&this.includes.length===0||this.excludes&&this.excludes.length===0?"Mindestens eine Intuitive File of Truth Category ausw\xE4hlen":""}toText(){return!this.includes&&!this.excludes?"":this.excludes?this.excludes.length===1?"eine Intuitive File of Truth Category":`${this.excludes.length} Intuitive File of Truth Categories`:this.includes.length===1?"eine Intuitive File of Truth Category":`${this.includes.length} Intuitive File of Truth Categories`}}return i})(),Ca=class extends P{constructor(t,e){super(D_,t,e)}};var O_="intuitiveFotProcedureName",Gd={type:"intuitiveFotProcedureName",category:"case",displayName:{de:"Intuitive File of Truth Procedure Name",en:"Intuitive File of Truth Procedure Name"},sortingIndex:8,occurrence:"single",newInstance(){return Promise.resolve(new pn([],null))},fromCondition(i){return Promise.resolve(new pn(i.includes?i.includes:null,i.excludes?i.excludes:null))},fromObject(i){return Promise.resolve(new pn(i.includes?i.includes:null,i.excludes?i.excludes:null))}},pn=(()=>{class i extends I{static{this.Specification=Gd}constructor(e,n){super(Gd.type),this.includes=e,this.excludes=n}clone(){return new i(this.includes?[...this.includes]:null,this.excludes?[...this.excludes]:null)}toCondition(){return Promise.resolve(new ya(this.includes,this.excludes))}toJSON(){return{type:this.type,includes:this.includes?this.includes:null,excludes:this.excludes?this.excludes:null}}toValue(){return{includes:this.includes,excludes:this.excludes}}valid(){return this.includes&&this.includes.length>0||this.excludes&&this.excludes.length>0}validationToText(){return!this.includes&&!this.excludes||this.includes&&this.includes.length===0||this.excludes&&this.excludes.length===0?"Mindestens eine Intuitive File of Truth Procedure Name ausw\xE4hlen":""}toText(){return!this.includes&&!this.excludes?"":this.excludes?this.excludes.length===1?"ein Intuitive File of Truth Procedure Name":`${this.excludes.length} Intuitive File of Truth Procedure Names`:this.includes.length===1?"ein Intuitive File of Truth Procedure Name":`${this.includes.length} Intuitive File of Truth Procedure Names`}}return i})(),ya=class extends P{constructor(t,e){super(O_,t,e)}};var E_="intuitiveFotProcedureSubject",Hd={type:"intuitiveFotProcedureSubject",category:"case",displayName:{de:"Intuitive File of Truth Procedure Subject",en:"Intuitive File of Truth Procedure Subject"},sortingIndex:8,occurrence:"single",newInstance(){return Promise.resolve(new mn([],null))},fromCondition(i){return Promise.resolve(new mn(i.includes?i.includes:null,i.excludes?i.excludes:null))},fromObject(i){return Promise.resolve(new mn(i.includes?i.includes:null,i.excludes?i.excludes:null))}},mn=(()=>{class i extends I{static{this.Specification=Hd}constructor(e,n){super(Hd.type),this.includes=e,this.excludes=n}clone(){return new i(this.includes?[...this.includes]:null,this.excludes?[...this.excludes]:null)}toCondition(){return Promise.resolve(new va(this.includes,this.excludes))}toJSON(){return{type:this.type,includes:this.includes?this.includes:null,excludes:this.excludes?this.excludes:null}}toValue(){return{includes:this.includes,excludes:this.excludes}}valid(){return this.includes&&this.includes.length>0||this.excludes&&this.excludes.length>0}validationToText(){return!this.includes&&!this.excludes||this.includes&&this.includes.length===0||this.excludes&&this.excludes.length===0?"Mindestens eine Intuitive File of Truth Procedure Subject ausw\xE4hlen":""}toText(){return!this.includes&&!this.excludes?"":this.excludes?this.excludes.length===1?"ein Intuitive File of Truth Procedure Subject":`${this.excludes.length} Intuitive File of Truth Procedure Subjects`:this.includes.length===1?"ein Intuitive File of Truth Procedure Subject":`${this.includes.length} Intuitive File of Truth Procedure Subjects`}}return i})(),va=class extends P{constructor(t,e){super(E_,t,e)}};var P_="intuitiveFotTypeOfEntry",Yd={type:"intuitiveFotTypeOfEntry",category:"case",displayName:{de:"Intuitive File of Truth Type of Entry",en:"Intuitive File of Truth Type of Entry"},sortingIndex:8,occurrence:"single",newInstance(){return Promise.resolve(new fn([],null))},fromCondition(i){return Promise.resolve(new fn(i.includes?i.includes:null,i.excludes?i.excludes:null))},fromObject(i){return Promise.resolve(new fn(i.includes?i.includes:null,i.excludes?i.excludes:null))}},fn=(()=>{class i extends I{static{this.Specification=Yd}constructor(e,n){super(Yd.type),this.includes=e,this.excludes=n}clone(){return new i(this.includes?[...this.includes]:null,this.excludes?[...this.excludes]:null)}toCondition(){return Promise.resolve(new xa(this.includes,this.excludes))}toJSON(){return{type:this.type,includes:this.includes?this.includes:null,excludes:this.excludes?this.excludes:null}}toValue(){return{includes:this.includes,excludes:this.excludes}}valid(){return this.includes&&this.includes.length>0||this.excludes&&this.excludes.length>0}validationToText(){return!this.includes&&!this.excludes||this.includes&&this.includes.length===0||this.excludes&&this.excludes.length===0?"Mindestens eine Intuitive File of Truth Type of Entry ausw\xE4hlen":""}toText(){return!this.includes&&!this.excludes?"":this.excludes?this.excludes.length===1?"eine Intuitive File of Truth Type of Entry":`${this.excludes.length} Intuitive File of Truth Type of Entries`:this.includes.length===1?"eine Intuitive File of Truth Type of Entry":`${this.includes.length} Intuitive File of Truth Type of Entries`}}return i})(),xa=class extends P{constructor(t,e){super(P_,t,e)}};var ba=class i extends ti{static{this.SPECIFICATIONS=[{specification:Tr.Specification},{specification:ii.Specification},{specification:on.Specification,permissions:["HARTMANN_VIRTUAL_CLINIC_ANALYSIS:BASE"]},{specification:ln.Specification},{specification:dn.Specification},{specification:cn.Specification},{specification:Fi.Specification},{specification:Ui.Specification},{specification:Ji.Specification},{specification:tn.Specification},{specification:en.Specification},{specification:Zi.Specification},{specification:Vi.Specification},{specification:zi.Specification},{specification:wr.Specification},{specification:Er.Specification},{specification:ji.Specification},{specification:Sr.Specification},{specification:$i.Specification},{specification:nn.Specification},{specification:Pr.Specification},{specification:rn.Specification},{specification:un.Specification},{specification:Dr.Specification},{specification:Gi.Specification},{specification:Xi.Specification},{specification:hn.Specification,permissions:["INTUITIVE_META_VIRTUAL_CLINIC_ANALYSIS:BASE"]},{specification:pn.Specification,permissions:["INTUITIVE_META_VIRTUAL_CLINIC_ANALYSIS:BASE"]},{specification:mn.Specification,permissions:["INTUITIVE_META_VIRTUAL_CLINIC_ANALYSIS:BASE"]},{specification:fn.Specification,permissions:["INTUITIVE_META_VIRTUAL_CLINIC_ANALYSIS:BASE"]}]}static fromObject(t,e){return ve(this,null,function*(){return fe.fromObject(t.expression,e).then(n=>new i(n))})}constructor(t=fe.EMPTY()){super("fully-inpatient-cases-filter",t)}clone(){return new i(this.expression.clone())}overrideClone(t){return new i(this.expression.overrideClone(t))}onUpdateVirtualClinicId(t){this.expression=fe.withoutType(this.expression,Mr)}};var Sa=class i extends ti{static{this.TYPES=[{specification:Wi.Specification},{specification:sn.Specification},{specification:qi.Specification},{specification:Yi.Specification},{specification:Hi.Specification}]}static fromObject(t,e){return fe.fromObject(t.expression,e).then(n=>new i(n))}constructor(t=fe.EMPTY()){super("clinics-filter",t)}clone(){return new i(this.expression.clone())}overrideClone(t){return new i(this.expression.overrideClone(t))}};var kr=class i{static of(t,e,n){let r={};return t.groupedValues.forEach(s=>{let o={},a=s.aggregated/t.aggregatedValue,l=e[s.label.key]?e[s.label.key].displayName():"n/a";s.groupedValues.forEach(c=>{let u=n[c.label.key]?n[c.label.key].getDisplayName():c.label.shortDisplayName;o[c.label.key]={count:c.value,name:u}}),r[s.label.key]={count:s.aggregated,name:l,percentage:a,postalCodes:o}}),new i(r)}constructor(t){this.patientCount=t,this.init(),this.postalCodeLayerData=this.data.reduce((e,n)=>(n.children.forEach(r=>e[r.postalCode]=r.total),e),{})}init(){let t=Object.keys(this.patientCount);this.data=t.map(e=>{let n=this.patientCount[e],r={adId:e,name:n.name},s=Object.keys(n.postalCodes);return r.children=s.map(o=>{let a=n.postalCodes[o];return{postalCode:o,name:a.name,total:a.count}}).sort((o,a)=>{let l=0;return o.total>a.total?l=-1:o.totalo+a.total,0),r}).sort((e,n)=>{let r=0;return e.total>n.total?r=-1:e.totalKt.fromObjArr(s)))}findById(t){let e=this._api.virtualClinicById(t);return this._cache.cacheObservable(this.key(t),this._httpClient.get(e).pipe(z(Kt.fromObj),z(n=>n.clone())))}create(t){let e=this._api.virtualClinics();return this._httpClient.post(e,t).pipe(z(Kt.fromObj))}update(t){this.deleteCacheForKey(t.id);let e=this._api.virtualClinicById(t.id);return this._httpClient.post(e,t).pipe(z(()=>null))}getSpecialtyDepartments(t,e){let n=this._api.specialtyDepartments(t);return e&&(n=this._api.specialtyDepartment(t,e)),this._httpClient.get(n).pipe(z(Qt.fromObjArr))}khtgLeistungsgruppen(){let t=this._api.leistungsgruppenKHTG();return this._cache.cacheObservable(t,this._httpClient.get(t))}fileOfTruthCategories(){let t=`${this._api.fileOfTruth()}/categories`;return this._cache.cacheObservable("fileOfTruthCategories",this._httpClient.get(t))}fileOfTruthTypeOfEntries(){let t=`${this._api.fileOfTruth()}/type-of-entries`;return this._cache.cacheObservable("fileOfTruthTypeOfEntries",this._httpClient.get(t))}fileOfTruthProcedureSubjects(){let t=`${this._api.fileOfTruth()}/categories/procedure-subjects`;return this._cache.cacheObservable("fileOfTruthProcedureSubjects",this._httpClient.get(t))}fileOfTruthProcedureNames(){let t=`${this._api.fileOfTruth()}/categories/procedure-names`;return this._cache.cacheObservable("fileOfTruthProcedureNames",this._httpClient.get(t))}saveAddress(t,e){let n=this._api.address(t),r=V(L({},e),{administrativeDistrictId:e?.administrativeDistrictId?.getNumericValue()});return this._httpClient.post(n,r).pipe(ll(()=>this.deleteCacheForKey(t)),z(s=>Mi.fromObject(s)))}getCaseNumber(t,e,n){let r=this._api.caseNumbers(t);e&&(r=`${this._api.specialtyDepartment(t,e)}case-number`);let s=new be;return n&&(s=s.append("year",String(n))),this._httpClient.get(r,{params:s}).pipe(z(Ni.fromObjArr)).toPromise()}saveCaseNumber(t){let e=this._api.caseNumbers(t.virtualClinicId);return this._httpClient.post(e,t).pipe(z(Ni.fromObj)).toPromise()}deleteCaseNumber(t,e){let n=this._api.caseNumbers(t),r=new be;return e&&(r=r.append("year",String(e))),this._httpClient.delete(n,{params:r}).toPromise()}getStaffing(t,e,n){let r=this._api.staffing(t);e&&(r=`${this._api.specialtyDepartment(t,e)}staffing`);let s=new be;return n&&(s=s.append("year",String(n))),this._httpClient.get(r,{params:s}).pipe(z(ki.fromObjArr)).toPromise()}saveStaffing(t){let e=this._api.staffing(t.virtualClinicId);return this._httpClient.post(e,t).pipe(z(ki.fromObj)).toPromise()}deleteStaffing(t,e){let n=this._api.staffing(t),r=new be;return e&&(r=r.append("year",String(e))),this._httpClient.delete(n,{params:r}).toPromise()}saveSpecialtyDepartment(t){let e=this._api.specialtyDepartments(t.virtualClinicId);return this._httpClient.post(e,t).pipe(z(n=>Qt.fromObj(n))).toPromise()}deleteSpecialtyDepartment(t,e){let n=this._api.specialtyDepartment(t,e);return this._httpClient.delete(n).toPromise()}getFullyInpatientCases(t,e,n=new Ne){let r=this._api.fullyInpatientCases(t),s={condition:n.toJSON()};return this._httpClient.post(r,s,{params:vl.toHttpParams(e)}).pipe(z(o=>yl.responseToPage(o,a=>Li.fromObjArr(a))))}getFullyInpatientCase(t,e){let n=this._api.fullyInpatientCase(t,e);return this._httpClient.get(n).pipe(z(r=>Li.fromObj(r)))}getAnnualAccounts(t,e){let n=this._api.annualAccount(t),r=new be;return e&&(r=r.append("year",String(e))),this._httpClient.get(n,{params:r}).pipe(z(_r.fromObjArr)).toPromise()}saveAnnualAccount(t){let e=this._api.annualAccount(t.virtualClinicId);return this._httpClient.post(e,t).toPromise()}deleteAnnualAccounts(t,e){let n=this._api.annualAccount(t),r=new be;return e&&(r=r.append("year",String(e))),this._httpClient.delete(n,{params:r}).toPromise()}getAdditionalInfo(t,e){let n=this._api.additionalInfo(t),r=new be;return e&&(r=r.append("year",String(e))),this._httpClient.get(n,{params:r}).pipe(z(gr.fromObjArr)).toPromise()}saveAdditionalInfo(t){let e=this._api.additionalInfo(t.virtualClinicId);return this._httpClient.post(e,t).toPromise()}deleteAdditionalInfo(t,e){let n=this._api.additionalInfo(t),r=new be;return e&&(r=r.append("year",String(e))),this._httpClient.delete(n,{params:r}).toPromise()}getRelatedVirtualClinics(t){let e=this._api.relatedVirtualClinics(t);return this._httpClient.get(e)}getKoStImports(t){let e=this._api.kostImports(t);return this._httpClient.get(e).pipe(z(n=>n.map(r=>yr.fromObj(r))))}patientsByAdministrativeDistricts(t,e){let n={type:"VirtualClinicOperatingNumberSingle",virtualClinicId:t,groupBy:[{fieldName:"administrativeDistrict",aggregation:{name:"SUM"},sort:{sortBy:"LABEL",direction:"DESC"}},{fieldName:"postalCode",aggregation:{name:"SUM"},sort:{sortBy:"LABEL",direction:"DESC"}}],term:{type:"fullyInpatientCaseOperatingNumber",operatingNumberId:"counts",condition:e.toJSON()}};return this._virtualClinicAnalysisService.resolve({REQ:n}).pipe(z(r=>{if(r.requests.REQ.statusType==="error")throw new Error(r.requests.REQ.errors[0].text.de);if(r.requests.REQ.statusType==="warning")throw new Error(r.requests.REQ.warning[0].text.de);return r}),nl(r=>{let s=[],o=[];return r.requests.REQ.groupedValues.forEach(a=>{s.push(a.label.key),a.groupedValues.forEach(l=>{o.push(l.label.key)})}),rl([this._postalCodeService.findAll(o,"FIRST"),this._districtService.findAll(s.map(a=>j.createFromString(a)))]).pipe(z(a=>({virtualClinicAnalysisResponse:r,postalCodesMapping:a[0],administrativeDistrictMapping:a[1]})))}),z(r=>kr.of(r.virtualClinicAnalysisResponse.requests.REQ,r.administrativeDistrictMapping,r.postalCodesMapping)))}};var Lr=class{constructor(t){this._environmentService=t}index(){return`${this._environmentService.load("BD_DISTRICT_URL")}/administrative_districts/`}casesAll(t){return`${this.index()}cases/${t}/all`}byAdministrativeDistrictId(t){return`${this.index()}${t}`}postalCodes(){return`${this.index()}postal-codes`}centerPoints(){return`${this.index()}center-points`}};var L_=20,Kd=(()=>{class i{constructor(){this.cache=new xl(L_)}set(e){this.cache.set(e.id.toString(),e)}get(e){let n=this.cache.get(e.value);if(n)return _t.fromObject(n)}static{this.\u0275fac=function(n){return new(n||i)}}static{this.\u0275prov=je({token:i,factory:i.\u0275fac,providedIn:"root"})}}return i})();var _n=class{constructor(t=""){this.q=t}toHttpParams(){let t=new be;return t=t.append("q",this.q),t}};var wa=(()=>{class i{constructor(e,n,r){this._httpClient=e,this._districtCache=n,this._environmentService=r,this._store=new Lr(this._environmentService)}find(e=new _n){let n=this._store.index();return this._httpClient.get(n,{params:e.toHttpParams()}).pipe(z(r=>_t.fromObjectArray(r)))}findAll(e){let n=this._store.index();return this._httpClient.post(n,{administrativeDistrictIds:e.map(r=>r.getNumericValue())}).pipe(z(r=>{let s={};return Object.keys(r).forEach(o=>s[o]=_t.fromObject(r[o])),s}))}byAdministrativeDistrictId(e){let n=this._districtCache.get(e),r;if(n)r=Ze(n);else{let s=this._store.byAdministrativeDistrictId(e.value);r=this._httpClient.get(s).pipe(z(o=>_t.fromObject(o)),z(o=>(this._districtCache.set(o),o)))}return r}findPostalCodes(e){let n=this._store.postalCodes(),r={administrativeDistrictIds:e.map(s=>s.getNumericValue())};return this._httpClient.post(n,r)}findCenterPoint(e){let n=this._store.centerPoints(),r={administrativeDistrictIds:e.map(s=>s.getNumericValue())};return this._httpClient.post(n,r).pipe(z(s=>{let o=new Map;return Object.entries(s).forEach(a=>{o.set(j.createFromString(a[0]),a[1])}),o}))}cases(e,n,r,s){if(!r.every(l=>l.codingSystem===n))return console.error(`type of some codes did not match ${n}, returning empty array !`),Ze([]);let o=this._store.casesAll(n),a={administrativeDistrictIds:e.map(l=>l.getNumericValue()),codes:r,years:s};return this._httpClient.post(o,a).pipe(z(l=>l.map(c=>({code:ne.fromObject(c.code),administrativeDistrictId:j.createFromNumber(c.administrativeDistrictId),year:parseInt(c.year,10),count:c.count,agmId:c.agmId}))))}static{this.\u0275fac=function(n){return new(n||i)(Ee(Et),Ee(Kd),Ee(xe))}}static{this.\u0275prov=je({token:i,factory:i.\u0275fac,providedIn:"root"})}}return i})();var Rr=class{constructor(t){this._environmentService=t}index(){return`${this._environmentService.load("BD_DISTRICT_URL")}/postal-codes/`}findOne(t){return`${this.index()}${t}`}postalCodes(){return`${this._environmentService.load("BD_DISTRICT_URL")}/postal-codes/center-points`}};var Oa=(()=>{class i{constructor(e,n,r){this._httpClient=e,this._environmentService=n,this._pluralPipe=r,this._cache={},this._store=new Rr(this._environmentService)}findOne(e,n){let r=this._store.findOne(e);return this._cache[e]?this._cache[e].pipe(z(s=>this._resolve(s,n))):(this._cache[e]=this._httpClient.get(r).pipe(z(s=>s[e]),z(s=>Ct.fromObjectArray(s)),al(1)),this._cache[e].pipe(z(s=>this._resolve(s,n))))}find(e=null){let n=this._store.index(),r=new be;return e&&(r=r.append("q",e)),this._httpClient.get(n,{params:r}).pipe(z(s=>Ct.fromObjectArray(s)))}findAll(e,n,r=!0){if(!e||e.length===0)return Ze({});let s=this._store.index(),o={postalCodes:e};return this._httpClient.post(s,o).pipe(z(a=>{let l={};return Object.keys(a).map(c=>{let u=Ct.fromObjectArray(a[c]);r&&(this._cache[c]=Ze(u)),l[c]=this._resolve(u,n)}),l}))}findCenterPoint(e){let n=this._store.postalCodes();return this._httpClient.post(n,{postalCodes:e}).pipe(z(r=>{let s=new Map;return Object.entries(r).forEach(o=>s.set(o[0],o[1])),s}))}administrativeDistrictMapping(){let e=`${this._store.index()}administrative-districts/mappings/`;return this._httpClient.get(e)}_resolve(e,n){switch(n){case"DETAIL":return Ct.fromObject(V(L({},e[0]),{name:e.sort(r=>r.name===r.otlName?-1:1).map(r=>r.otlName.length>0?r.otlName:r.name).join(", ")}));case"SUMMARY":{let r=e[0],s={"=0":"","=1":"(oder ein weiterer Ortsteil)",other:"(oder einer von weiteren # Ortsteilen)"};return Ct.fromObject(V(L({},r),{name:`${r.name} ${this._pluralPipe.transform(e.length-1,s)}`}))}case"RAW":return e;default:return e[e.length-1]}}static{this.\u0275fac=function(n){return new(n||i)(Ee(Et),Ee(xe),Ee(gl))}}static{this.\u0275prov=je({token:i,factory:i.\u0275fac,providedIn:"root"})}}return i})();var eh=li(Al()),th=li(jd());var Cn=class{constructor(t){this._environmentService=t}token(){return this._environmentService.load("BD_MAP_ACCESS_TOKEN_MAPBOX")}};function Z_(i,t){i&1&&(Sn(0,"div",1),jr(1,"mat-progress-bar",3),In())}function j_(i,t){if(i&1&&(Sn(0,"div",0),Xr(1,Z_,2,0,"div",1),jr(2,"div",2),In()),i&2){let e=pl();Wr(),Zr(e.isLoading?1:-1),Wr(),hl("id",e.mapOptions.container)}}function eC(i,t){i&1&&(Sn(0,"div")(1,"div",4)(2,"div",5)(3,"div",6)(4,"span",7),ml(5,"Die Karten Funktionen werden von Ihrem Browser nicht unters\xFCtzt."),In()()()()())}var tC="mapboxEvent_IsIdle",Vr=(()=>{class i{constructor(e,n,r){this._environmentService=e,this._cdr=n,this._zone=r,this.mapOptions=di,this.mapLoaded=new $r,this.mapClick=new $r,this.isLoading=!1,this.mapSupported=!0,this._loading$=new il(!0),this.mapSupported=(0,th.supported)(),this._loading$.pipe(ol()).subscribe(s=>{this.isLoading=s,this._cdr.markForCheck()})}ngOnInit(){let e=new Cn(this._environmentService);this.mapOptions=V(L({},this.mapOptions),{container:this._randomizeContainerId(this.mapOptions.container),accessToken:e.token()})}ngAfterViewInit(){this.mapSupported&&this._zone.runOutsideAngular(()=>{this.map=new eh.Map(this.mapOptions),this.map.once("load",()=>{this._onLoad()}),this.map.on("styledataloading",()=>{this._loading$.next(!0)}),this.map.once("idle",()=>{this.mapLoaded.emit(this.map)}),this.map.on("idle",()=>{document.dispatchEvent(new CustomEvent(tC,null)),this._loading$.next(!1)})})}ngOnChanges(e){e.mapOptions&&(this.mapOptions.style&&this.map&&this.map.setStyle(this.mapOptions.style),this.mapOptions.zoom&&this.map&&this.map.setZoom(this.mapOptions.zoom),this.mapOptions.center&&this.map&&this.map.setCenter(this.mapOptions.center))}ngOnDestroy(){this.map&&(this.map.remove(),this.map=null)}_onLoad(){this.map.getLayer("country-label")&&this.map.setLayoutProperty("country-label","text-field",["get","name_de"]),this.mapOptions&&this.mapOptions.zoom&&this.map.setZoom(this.mapOptions.zoom),this.mapOptions&&this.mapOptions.center&&this.map.setCenter(this.mapOptions.center),this.controls={idle$:new tl,clickHandlers:[]},this._initClickHandler()}_initClickHandler(){this.map.on("click",e=>this._onClick(e)),this.map.on("touchstart",e=>this._onClick(e)),this.map.on("touchend",e=>this._onClick(e))}_onClick(e){let n=new wl(e,this.map,this.controls),r=!0;this.controls.clickHandlers.every(s=>{let o=s.onClick(n);return r=o.propagate,o.propagate}),r&&this.mapClick.emit(n)}_randomizeContainerId(e){let n=Math.round(Math.random()*1e4);return e+"-"+n.toString()}static{this.\u0275fac=function(n){return new(n||i)(bn(xe),bn(fl),bn(dl))}}static{this.\u0275cmp=ul({type:i,selectors:[["bd-map"]],inputs:{mapOptions:"mapOptions"},outputs:{mapLoaded:"mapLoaded",mapClick:"mapClick"},features:[cl],decls:2,vars:1,consts:[[1,"bd-map-container"],[1,"idle-overlay"],[1,"map",3,"id"],["mode","query"],[1,"flex","flex-row","items-center","justify-center"],[1,"basis-full"],[1,"bd-container"],[1,"mat-caption"]],template:function(n,r){n&1&&Xr(0,j_,3,2,"div",0)(1,eC,6,0,"div"),n&2&&Zr(r.mapSupported?0:1)},dependencies:[Cl,_l],styles:[".bd-map-container[_ngcontent-%COMP%], .idle-overlay[_ngcontent-%COMP%]{height:100%;width:100%}.bd-map-container[_ngcontent-%COMP%]{position:relative}.bd-map-container[_ngcontent-%COMP%] .idle-overlay[_ngcontent-%COMP%]{position:absolute;z-index:3}.map[_ngcontent-%COMP%]{position:absolute;top:0;bottom:0;width:100%}"],changeDetection:0})}}return i})();var mC=li(dh(),1);var G=11102230246251565e-32;var Ur=(3+8*G)*G;function w(i){return new Float64Array(i)}var p3=(3+16*G)*G,m3=(2+12*G)*G,f3=(9+64*G)*G*G,g3=w(4),_3=w(8),C3=w(12),y3=w(16),v3=w(4);var S3=(7+56*G)*G,I3=(3+28*G)*G,A3=(26+288*G)*G*G,w3=w(4),D3=w(4),O3=w(4),E3=w(4),P3=w(4),T3=w(4),M3=w(4),k3=w(4),N3=w(4),B3=w(8),L3=w(8),R3=w(8),F3=w(4),V3=w(8),z3=w(8),U3=w(8),G3=w(12),H3=w(192),Y3=w(192);var Q3=(10+96*G)*G,J3=(4+48*G)*G,W3=(44+576*G)*G*G,$3=w(4),X3=w(4),Z3=w(4),j3=w(4),ez=w(4),tz=w(4),iz=w(4),nz=w(4),rz=w(8),sz=w(8),oz=w(8),az=w(8),lz=w(8),cz=w(8),uz=w(8),dz=w(8),hz=w(8),pz=w(4),mz=w(4),fz=w(4),gz=w(8),_z=w(16),Cz=w(16),yz=w(16),vz=w(32),xz=w(32),bz=w(48),Sz=w(64),Iz=w(1152),Az=w(1152);var Ez=(16+224*G)*G,Pz=(5+72*G)*G,Tz=(71+1408*G)*G*G,Mz=w(4),kz=w(4),Nz=w(4),Bz=w(4),Lz=w(4),Rz=w(4),Fz=w(4),Vz=w(4),zz=w(4),Uz=w(4),Gz=w(24),Hz=w(24),Yz=w(24),qz=w(24),Kz=w(24),Qz=w(24),Jz=w(24),Wz=w(24),$z=w(24),Xz=w(24),Zz=w(1152),jz=w(1152),e4=w(1152),t4=w(1152),i4=w(1152),n4=w(2304),r4=w(2304),s4=w(3456),o4=w(5760),a4=w(8),l4=w(8),c4=w(8),u4=w(16),d4=w(24),h4=w(48),p4=w(48),m4=w(96),f4=w(192),g4=w(384),_4=w(384),C4=w(384),y4=w(768);var v4=w(96),x4=w(96),b4=w(96),S4=w(1152);var _y=li(Hh(),1);var Sy=li(Al());export{I as a,Fi as b,ko as c,Kt as d,Mi as e,Fo as f,Uo as g,Ho as h,qo as i,Qo as j,Yi as k,Xt as l,J as m,F as n,ee as o,B as p,Q as q,Nt as r,Rt as s,Ke as t,H as u,W as v,vp as w,ie as x,yt as y,$l as z,bt as A,Te as B,Hn as C,Ss as D,zn as E,$ as F,yi as G,vi as H,Ut as I,at as J,me as K,oe as L,ar as M,Ao as N,Le as O,Ge as P,dt as Q,p0 as R,Ly as S,Ji as T,Zi as U,ta as V,na as W,en as X,tn as Y,la as Z,fe as _,ti as $,cb as aa,gn as ba,wa as ca,Cn as da,Vr as ea,Oa as fa};