UNPKG

n8n-editor-ui

Version:

Workflow Editor UI for n8n

1 lines 169 kB
!function(){try{("undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{}).SENTRY_RELEASE={id:"n8n@2.13.4"}}catch(t){}}(),System.register([],(function(t,e){var i,s,n,o,r,a,h,l,c,d,u,f,g,p,m,x,b,_,y,v,w,k,M,S,P,D,O,T,C,A,I,L,E,z,R,F,B,H,V,W,j,N,$,Y,U,X,q,K,G,Z,Q,J,tt,et,it,st,nt,ot,rt,at,ht,lt,ct,dt,ut,ft,gt,pt,mt,xt,bt,_t,yt,vt,wt,kt,Mt,St,Pt,Dt,Ot,Tt,Ct,At,It,Lt,Et,zt,Rt,Ft,Bt,Ht,Vt,Wt,jt,Nt,$t,Yt,Ut,Xt,qt,Kt,Gt,Zt,Qt,Jt,te,ee,ie,se,ne,oe,re,ae,he,le,ce,de,ue,fe,ge,pe;function me(t){return t+.5|0}function xe(t){return i(me(2.55*t),0,255)}function be(t){return i(me(255*t),0,255)}function _e(t){return i(me(t/2.55)/100,0,1)}function ye(t){return i(me(100*t),0,100)}function ve(t,e,i){const s=e*Math.min(i,1-i),n=(e,n=(e+t/30)%12)=>i-s*Math.max(Math.min(n-3,9-n,1),-1);return[n(0),n(8),n(4)]}function we(t,e,i){const s=(s,n=(s+t/60)%6)=>i-i*e*Math.max(Math.min(n,4-n,1),0);return[s(5),s(3),s(1)]}function ke(t,e,i){const s=ve(t,1,.5);let n;for(e+i>1&&(n=1/(e+i),e*=n,i*=n),n=0;n<3;n++)s[n]*=1-e-i,s[n]+=e;return s}function Me(t){const e=t.r/255,i=t.g/255,s=t.b/255,n=Math.max(e,i,s),o=Math.min(e,i,s),r=(n+o)/2;let a,h,l;return n!==o&&(l=n-o,h=r>.5?l/(2-n-o):l/(n+o),a=function(t,e,i,s,n){return t===n?(e-i)/s+(e<i?6:0):e===n?(i-t)/s+2:(t-e)/s+4}(e,i,s,l,n),a=60*a+.5),[0|a,h||0,r]}function Se(t,e,i,s){return(Array.isArray(e)?t(e[0],e[1],e[2]):t(e,i,s)).map(be)}function Pe(t,e,i){return Se(ve,t,e,i)}function De(t){return(t%360+360)%360}function Oe(t){const e=c.exec(t);let i,s=255;if(!e)return;e[5]!==i&&(s=e[6]?xe(+e[5]):be(+e[5]));const n=De(+e[2]),o=+e[3]/100,r=+e[4]/100;return i="hwb"===e[1]?function(t,e,i){return Se(ke,t,e,i)}(n,o,r):"hsv"===e[1]?function(t,e,i){return Se(we,t,e,i)}(n,o,r):Pe(n,o,r),{r:i[0],g:i[1],b:i[2],a:s}}function Te(t){f||((f=function(){const t={},e=Object.keys(u),i=Object.keys(d);let s,n,o,r,a;for(s=0;s<e.length;s++){for(r=a=e[s],n=0;n<i.length;n++)o=i[n],a=a.replace(o,d[o]);o=parseInt(u[r],16),t[a]=[o>>16&255,o>>8&255,255&o]}return t}()).transparent=[0,0,0,0]);const e=f[t.toLowerCase()];return e&&{r:e[0],g:e[1],b:e[2],a:4===e.length?e[3]:255}}function Ce(t,e,i){if(t){let s=Me(t);s[e]=Math.max(0,Math.min(s[e]+s[e]*i,0===e?360:1)),s=Pe(s),t.r=s[0],t.g=s[1],t.b=s[2]}}function Ae(t,e){return t?Object.assign(e||{},t):t}function Ie(t){var e={r:0,g:0,b:0,a:255};return Array.isArray(t)?t.length>=3&&(e={r:t[0],g:t[1],b:t[2],a:255},t.length>3&&(e.a=be(t[3]))):(e=Ae(t,{r:0,g:0,b:0,a:1})).a=be(e.a),e}function Le(t){return"r"===t.charAt(0)?function(t){const e=g.exec(t);let s,n,o,r=255;if(e){if(e[7]!==s){const t=+e[7];r=e[8]?xe(t):i(255*t,0,255)}return s=+e[1],n=+e[3],o=+e[5],s=255&(e[2]?xe(s):i(s,0,255)),n=255&(e[4]?xe(n):i(n,0,255)),o=255&(e[6]?xe(o):i(o,0,255)),{r:s,g:n,b:o,a:r}}}(t):Oe(t)}function Ee(){}function ze(t){return null==t}function Re(t){if(Array.isArray&&Array.isArray(t))return!0;const e=Object.prototype.toString.call(t);return"[object"===e.slice(0,7)&&"Array]"===e.slice(-6)}function Fe(t){return null!==t&&"[object Object]"===Object.prototype.toString.call(t)}function Be(t){return("number"==typeof t||t instanceof Number)&&isFinite(+t)}function He(t,e){return Be(t)?t:e}function Ve(t,e){return void 0===t?e:t}function We(t,e,i){if(t&&"function"==typeof t.call)return t.apply(i,e)}function je(t,e,i,s){let n,o,r;if(Re(t))if(o=t.length,s)for(n=o-1;n>=0;n--)e.call(i,t[n],n);else for(n=0;n<o;n++)e.call(i,t[n],n);else if(Fe(t))for(r=Object.keys(t),o=r.length,n=0;n<o;n++)e.call(i,t[r[n]],r[n])}function Ne(t,e){let i,s,n,o;if(!t||!e||t.length!==e.length)return!1;for(i=0,s=t.length;i<s;++i)if(n=t[i],o=e[i],n.datasetIndex!==o.datasetIndex||n.index!==o.index)return!1;return!0}function $e(t){if(Re(t))return t.map($e);if(Fe(t)){const e=Object.create(null),i=Object.keys(t),s=i.length;let n=0;for(;n<s;++n)e[i[n]]=$e(t[i[n]]);return e}return t}function Ye(t){return-1===["__proto__","prototype","constructor"].indexOf(t)}function Ue(t,e,i,s){if(!Ye(t))return;const n=e[t],o=i[t];Fe(n)&&Fe(o)?Xe(n,o,s):e[t]=$e(o)}function Xe(t,e,i){const s=Re(e)?e:[e],n=s.length;if(!Fe(t))return t;const o=(i=i||{}).merger||Ue;let r;for(let a=0;a<n;++a){if(r=s[a],!Fe(r))continue;const e=Object.keys(r);for(let s=0,n=e.length;s<n;++s)o(e[s],t,r,i)}return t}function qe(t,e){return Xe(t,e,{merger:Ke})}function Ke(t,e,i){if(!Ye(t))return;const s=e[t],n=i[t];Fe(s)&&Fe(n)?qe(s,n):Object.prototype.hasOwnProperty.call(e,t)||(e[t]=$e(n))}function Ge(t,e){return(y[e]||(y[e]=function(t){const e=function(t){const e=t.split("."),i=[];let s="";for(const n of e)s+=n,s.endsWith("\\")?s=s.slice(0,-1)+".":(i.push(s),s="");return i}(t);return t=>{for(const i of e){if(""===i)break;t=t&&t[i]}return t}}(e)))(t)}function Ze(t){return t.charAt(0).toUpperCase()+t.slice(1)}function Qe(t,e,i){return Math.abs(t-e)<i}function Je(t){const e=Math.round(t);t=Qe(t,e,t/1e3)?e:t;const i=Math.pow(10,Math.floor(I(t))),s=t/i;return(s<=1?1:s<=2?2:s<=5?5:10)*i}function ti(t){return!isNaN(parseFloat(t))&&isFinite(t)}function ei(t,e,i){let s,n,o;for(s=0,n=t.length;s<n;s++)o=t[s][i],isNaN(o)||(e.min=Math.min(e.min,o),e.max=Math.max(e.max,o))}function ii(t){return t*(M/180)}function si(t){return t*(180/M)}function ni(t){if(!Be(t))return;let e=1,i=0;for(;Math.round(t*e)/e!==t;)e*=10,i++;return i}function oi(t,e){return Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2))}function ri(t,e){return(t-e+P)%S-M}function ai(t){return(t%S+S)%S}function hi(t,e,i,s){const n=ai(t),o=ai(e),r=ai(i),a=ai(o-n),h=ai(r-n),l=ai(n-o),c=ai(n-r);return n===o||n===r||s&&o===r||a>h&&l<c}function li(t,e,i){return Math.max(e,Math.min(i,t))}function ci(t,e,i,s=1e-6){return t>=Math.min(e,i)-s&&t<=Math.max(e,i)+s}function di(t,e,i){i=i||(i=>t[i]<e);let s,n=t.length-1,o=0;for(;n-o>1;)s=o+n>>1,i(s)?o=s:n=s;return{lo:o,hi:n}}function ui(t,e){const i=t._chartjs;if(!i)return;const s=i.listeners,n=s.indexOf(e);-1!==n&&s.splice(n,1),s.length>0||(R.forEach((e=>{delete t[e]})),delete t._chartjs)}function fi(t){const e=new Set(t);return e.size===t.length?t:Array.from(e)}function gi(t,e){let i=[],s=!1;return function(...n){i=n,s||(s=!0,F.call(window,(()=>{s=!1,t.apply(e,i)})))}}function pi(t){if(t&&"object"==typeof t){const e=t.toString();return"[object CanvasPattern]"===e||"[object CanvasGradient]"===e}return!1}function mi(t){return pi(t)?t:new x(t)}function xi(t){return pi(t)?t:new x(t).saturate(.5).darken(.1).hexString()}function bi(t){t.set("animation",{delay:void 0,duration:1e3,easing:"easeOutQuart",fn:void 0,from:void 0,loop:void 0,to:void 0,type:void 0}),t.describe("animation",{_fallback:!1,_indexable:!1,_scriptable:t=>"onProgress"!==t&&"onComplete"!==t&&"fn"!==t}),t.set("animations",{colors:{type:"color",properties:U},numbers:{type:"number",properties:Y}}),t.describe("animations",{_fallback:"animation"}),t.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=>0|t}}}})}function _i(t){t.set("layout",{autoPadding:!0,padding:{top:0,right:0,bottom:0,left:0}})}function yi(t,e,i){return function(t,e){e=e||{};const i=t+JSON.stringify(e);let s=X.get(i);return s||(s=new Intl.NumberFormat(t,e),X.set(i,s)),s}(e,i).format(t)}function vi(t){t.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:K.formatters.values,minor:{},major:{},align:"center",crossAlign:"near",showLabelBackdrop:!1,backdropColor:"rgba(255, 255, 255, 0.75)",backdropPadding:2}}),t.route("scale.ticks","color","","color"),t.route("scale.grid","color","","borderColor"),t.route("scale.border","color","","borderColor"),t.route("scale.title","color","","color"),t.describe("scale",{_fallback:!1,_scriptable:t=>!t.startsWith("before")&&!t.startsWith("after")&&"callback"!==t&&"parser"!==t,_indexable:t=>"borderDash"!==t&&"tickBorderDash"!==t&&"dash"!==t}),t.describe("scales",{_fallback:"scale"}),t.describe("scale.ticks",{_scriptable:t=>"backdropPadding"!==t&&"callback"!==t,_indexable:t=>"backdropPadding"!==t})}function wi(t,e){if(!e)return t;const i=e.split(".");for(let s=0,n=i.length;s<n;++s){const e=i[s];t=t[e]||(t[e]=Object.create(null))}return t}function ki(t,e,i){return"string"==typeof e?Xe(wi(t,e),i):Xe(wi(t,""),e)}function Mi(t,e,i,s,n){let o=e[n];return o||(o=e[n]=t.measureText(n).width,i.push(n)),o>s&&(s=o),s}function Si(t,e,i){const s=t.currentDevicePixelRatio,n=0!==i?Math.max(i/2,.5):0;return Math.round((e-n)*s)/s+n}function Pi(t,e){(e=e||t.getContext("2d")).save(),e.resetTransform(),e.clearRect(0,0,t.width,t.height),e.restore()}function Di(t,e,i,s){Oi(t,e,i,s,null)}function Oi(t,e,i,s,n){let o,r,a,h,l,c,d,u;const f=e.pointStyle,g=e.rotation,p=e.radius;let m=(g||0)*O;if(f&&"object"==typeof f&&(o=f.toString(),"[object HTMLImageElement]"===o||"[object HTMLCanvasElement]"===o))return t.save(),t.translate(i,s),t.rotate(m),t.drawImage(f,-f.width/2,-f.height/2,f.width,f.height),void t.restore();if(!(isNaN(p)||p<=0)){switch(t.beginPath(),f){default:n?t.ellipse(i,s,n/2,p,0,0,S):t.arc(i,s,p,0,S),t.closePath();break;case"triangle":c=n?n/2:p,t.moveTo(i+Math.sin(m)*c,s-Math.cos(m)*p),m+=A,t.lineTo(i+Math.sin(m)*c,s-Math.cos(m)*p),m+=A,t.lineTo(i+Math.sin(m)*c,s-Math.cos(m)*p),t.closePath();break;case"rectRounded":l=.516*p,h=p-l,r=Math.cos(m+C)*h,d=Math.cos(m+C)*(n?n/2-l:h),a=Math.sin(m+C)*h,u=Math.sin(m+C)*(n?n/2-l:h),t.arc(i-d,s-a,l,m-M,m-T),t.arc(i+u,s-r,l,m-T,m),t.arc(i+d,s+a,l,m,m+T),t.arc(i-u,s+r,l,m+T,m+M),t.closePath();break;case"rect":if(!g){h=Math.SQRT1_2*p,c=n?n/2:h,t.rect(i-c,s-h,2*c,2*h);break}m+=C;case"rectRot":d=Math.cos(m)*(n?n/2:p),r=Math.cos(m)*p,a=Math.sin(m)*p,u=Math.sin(m)*(n?n/2:p),t.moveTo(i-d,s-a),t.lineTo(i+u,s-r),t.lineTo(i+d,s+a),t.lineTo(i-u,s+r),t.closePath();break;case"crossRot":m+=C;case"cross":d=Math.cos(m)*(n?n/2:p),r=Math.cos(m)*p,a=Math.sin(m)*p,u=Math.sin(m)*(n?n/2:p),t.moveTo(i-d,s-a),t.lineTo(i+d,s+a),t.moveTo(i+u,s-r),t.lineTo(i-u,s+r);break;case"star":d=Math.cos(m)*(n?n/2:p),r=Math.cos(m)*p,a=Math.sin(m)*p,u=Math.sin(m)*(n?n/2:p),t.moveTo(i-d,s-a),t.lineTo(i+d,s+a),t.moveTo(i+u,s-r),t.lineTo(i-u,s+r),m+=C,d=Math.cos(m)*(n?n/2:p),r=Math.cos(m)*p,a=Math.sin(m)*p,u=Math.sin(m)*(n?n/2:p),t.moveTo(i-d,s-a),t.lineTo(i+d,s+a),t.moveTo(i+u,s-r),t.lineTo(i-u,s+r);break;case"line":r=n?n/2:Math.cos(m)*p,a=Math.sin(m)*p,t.moveTo(i-r,s-a),t.lineTo(i+r,s+a);break;case"dash":t.moveTo(i,s),t.lineTo(i+Math.cos(m)*(n?n/2:p),s+Math.sin(m)*p);break;case!1:t.closePath()}t.fill(),e.borderWidth>0&&t.stroke()}}function Ti(t,e,i){return i=i||.5,!e||t&&t.x>e.left-i&&t.x<e.right+i&&t.y>e.top-i&&t.y<e.bottom+i}function Ci(t,e){t.save(),t.beginPath(),t.rect(e.left,e.top,e.right-e.left,e.bottom-e.top),t.clip()}function Ai(t){t.restore()}function Ii(t,e,i,s,n){if(!e)return t.lineTo(i.x,i.y);if("middle"===n){const s=(e.x+i.x)/2;t.lineTo(s,e.y),t.lineTo(s,i.y)}else"after"===n!=!!s?t.lineTo(e.x,i.y):t.lineTo(i.x,e.y);t.lineTo(i.x,i.y)}function Li(t,e,i,s){if(!e)return t.lineTo(i.x,i.y);t.bezierCurveTo(s?e.cp1x:e.cp2x,s?e.cp1y:e.cp2y,s?i.cp2x:i.cp1x,s?i.cp2y:i.cp1y,i.x,i.y)}function Ei(t,e,i,s,n){if(n.strikethrough||n.underline){const o=t.measureText(s),r=e-o.actualBoundingBoxLeft,a=e+o.actualBoundingBoxRight,h=i-o.actualBoundingBoxAscent,l=i+o.actualBoundingBoxDescent,c=n.strikethrough?(h+l)/2:l;t.strokeStyle=t.fillStyle,t.beginPath(),t.lineWidth=n.decorationWidth||2,t.moveTo(r,c),t.lineTo(a,c),t.stroke()}}function zi(t,e){const i=t.fillStyle;t.fillStyle=e.color,t.fillRect(e.left,e.top,e.width,e.height),t.fillStyle=i}function Ri(t,e,i,s,n,o={}){const r=Re(e)?e:[e],a=o.strokeWidth>0&&""!==o.strokeColor;let h,l;for(t.save(),t.font=n.string,function(t,e){e.translation&&t.translate(e.translation[0],e.translation[1]),ze(e.rotation)||t.rotate(e.rotation),e.color&&(t.fillStyle=e.color),e.textAlign&&(t.textAlign=e.textAlign),e.textBaseline&&(t.textBaseline=e.textBaseline)}(t,o),h=0;h<r.length;++h)l=r[h],o.backdrop&&zi(t,o.backdrop),a&&(o.strokeColor&&(t.strokeStyle=o.strokeColor),ze(o.strokeWidth)||(t.lineWidth=o.strokeWidth),t.strokeText(l,i,s,o.maxWidth)),t.fillText(l,i,s,o.maxWidth),Ei(t,i,s,l,o),s+=Number(n.lineHeight);t.restore()}function Fi(t,e){const{x:i,y:s,w:n,h:o,radius:r}=e;t.arc(i+r.topLeft,s+r.topLeft,r.topLeft,1.5*M,M,!0),t.lineTo(i,s+o-r.bottomLeft),t.arc(i+r.bottomLeft,s+o-r.bottomLeft,r.bottomLeft,M,T,!0),t.lineTo(i+n-r.bottomRight,s+o),t.arc(i+n-r.bottomRight,s+o-r.bottomRight,r.bottomRight,T,0,!0),t.lineTo(i+n,s+r.topRight),t.arc(i+n-r.topRight,s+r.topRight,r.topRight,0,-T,!0),t.lineTo(i+r.topLeft,s)}function Bi(t,e){const i=(""+t).match(J);if(!i||"normal"===i[1])return 1.2*e;switch(t=+i[2],i[3]){case"px":return t;case"%":t/=100}return e*t}function Hi(t,e){const i={},s=Fe(e),n=s?Object.keys(e):e,o=Fe(t)?s?i=>Ve(t[i],t[e[i]]):e=>t[e]:()=>t;for(const r of n)i[r]=et(o(r));return i}function Vi(t){return Hi(t,{top:"y",right:"x",bottom:"y",left:"x"})}function Wi(t){return Hi(t,["topLeft","topRight","bottomLeft","bottomRight"])}function ji(t){const e=Vi(t);return e.width=e.left+e.right,e.height=e.top+e.bottom,e}function Ni(t,e){t=t||{},e=e||Q.font;let i=Ve(t.size,e.size);"string"==typeof i&&(i=parseInt(i,10));let s=Ve(t.style,e.style);s&&!(""+s).match(tt)&&(console.warn('Invalid font style specified: "'+s+'"'),s=void 0);const n={family:Ve(t.family,e.family),lineHeight:Bi(Ve(t.lineHeight,e.lineHeight),i),size:i,style:s,weight:Ve(t.weight,e.weight),string:""};return n.string=function(t){return!t||ze(t.size)||ze(t.family)?null:(t.style?t.style+" ":"")+(t.weight?t.weight+" ":"")+t.size+"px "+t.family}(n),n}function $i(t,e,i,s){let n,o,r,a=!0;for(n=0,o=t.length;n<o;++n)if(r=t[n],void 0!==r&&(void 0!==e&&"function"==typeof r&&(r=r(e),a=!1),void 0!==i&&Re(r)&&(r=r[i%r.length],a=!1),void 0!==r))return s&&!a&&(s.cacheable=!1),r}function Yi(t,e){return Object.assign(Object.create(t),e)}function Ui(t,e=[""],i,s,n=(()=>t[0])){const o=i||t;void 0===s&&(s=ts("_fallback",t));const r={[Symbol.toStringTag]:"Object",_cacheable:!0,_scopes:t,_rootScopes:o,_fallback:s,_getTarget:n,override:i=>Ui([i,...t],e,o,s)};return new Proxy(r,{deleteProperty:(e,i)=>(delete e[i],delete e._keys,delete t[0][i],!0),get:(i,s)=>Ki(i,s,(()=>function(t,e,i,s){let n;for(const o of e)if(n=ts(it(o,t),i),void 0!==n)return st(t,n)?Qi(i,s,t,n):n}(s,e,t,i))),getOwnPropertyDescriptor:(t,e)=>Reflect.getOwnPropertyDescriptor(t._scopes[0],e),getPrototypeOf:()=>Reflect.getPrototypeOf(t[0]),has:(t,e)=>es(t).includes(e),ownKeys:t=>es(t),set(t,e,i){const s=t._storage||(t._storage=n());return t[e]=s[e]=i,delete t._keys,!0}})}function Xi(t,e,i,s){const n={_cacheable:!1,_proxy:t,_context:e,_subProxy:i,_stack:new Set,_descriptors:qi(t,s),setContext:e=>Xi(t,e,i,s),override:n=>Xi(t.override(n),e,i,s)};return new Proxy(n,{deleteProperty:(e,i)=>(delete e[i],delete t[i],!0),get:(t,e,i)=>Ki(t,e,(()=>function(t,e,i){const{_proxy:s,_context:n,_subProxy:o,_descriptors:r}=t;let a=s[e];return w(a)&&r.isScriptable(e)&&(a=function(t,e,i,s){const{_proxy:n,_context:o,_subProxy:r,_stack:a}=i;if(a.has(t))throw new Error("Recursion detected: "+Array.from(a).join("->")+"->"+t);a.add(t);let h=e(o,r||s);return a.delete(t),st(t,h)&&(h=Qi(n._scopes,n,t,h)),h}(e,a,t,i)),Re(a)&&a.length&&(a=function(t,e,i,s){const{_proxy:n,_context:o,_subProxy:r,_descriptors:a}=i;if(void 0!==o.index&&s(t))return e[o.index%e.length];if(Fe(e[0])){const i=e,s=n._scopes.filter((t=>t!==i));e=[];for(const h of i){const i=Qi(s,n,t,h);e.push(Xi(i,o,r&&r[t],a))}}return e}(e,a,t,r.isIndexable)),st(e,a)&&(a=Xi(a,n,o&&o[e],r)),a}(t,e,i))),getOwnPropertyDescriptor:(e,i)=>e._descriptors.allKeys?Reflect.has(t,i)?{enumerable:!0,configurable:!0}:void 0:Reflect.getOwnPropertyDescriptor(t,i),getPrototypeOf:()=>Reflect.getPrototypeOf(t),has:(e,i)=>Reflect.has(t,i),ownKeys:()=>Reflect.ownKeys(t),set:(e,i,s)=>(t[i]=s,delete e[i],!0)})}function qi(t,e={scriptable:!0,indexable:!0}){const{_scriptable:i=e.scriptable,_indexable:s=e.indexable,_allKeys:n=e.allKeys}=t;return{allKeys:n,scriptable:i,indexable:s,isScriptable:w(i)?i:()=>i,isIndexable:w(s)?s:()=>s}}function Ki(t,e,i){if(Object.prototype.hasOwnProperty.call(t,e))return t[e];const s=i();return t[e]=s,s}function Gi(t,e,i){return w(t)?t(e,i):t}function Zi(t,e,i,s,n){for(const o of e){const e=nt(i,o);if(e){t.add(e);const o=Gi(e._fallback,i,n);if(void 0!==o&&o!==i&&o!==s)return o}else if(!1===e&&void 0!==s&&i!==s)return null}return!1}function Qi(t,e,i,s){const n=e._rootScopes,o=Gi(e._fallback,i,s),r=[...t,...n],a=new Set;a.add(s);let h=Ji(a,r,i,o||i,s);return null!==h&&(void 0===o||o===i||(h=Ji(a,r,o,h,s),null!==h))&&Ui(Array.from(a),[""],n,o,(()=>function(t,e,i){const s=t._getTarget();e in s||(s[e]={});const n=s[e];return Re(n)&&Fe(i)?i:n||{}}(e,i,s)))}function Ji(t,e,i,s,n){for(;i;)i=Zi(t,e,i,s,n);return i}function ts(t,e){for(const i of e){if(!i)continue;const e=i[t];if(void 0!==e)return e}}function es(t){let e=t._keys;return e||(e=t._keys=function(t){const e=new Set;for(const i of t)for(const t of Object.keys(i).filter((t=>!t.startsWith("_"))))e.add(t);return Array.from(e)}(t._scopes)),e}function is(t,e,i,s){const n=t.skip?e:t,o=e,r=i.skip?e:i,a=oi(o,n),h=oi(r,o);let l=a/(a+h),c=h/(a+h);l=isNaN(l)?0:l,c=isNaN(c)?0:c;const d=s*l,u=s*c;return{previous:{x:o.x-d*(r.x-n.x),y:o.y-d*(r.y-n.y)},next:{x:o.x+u*(r.x-n.x),y:o.y+u*(r.y-n.y)}}}function ss(t,e="x"){const i=at(e),s=t.length,n=Array(s).fill(0),o=Array(s);let r,a,h,l=rt(t,0);for(r=0;r<s;++r)if(a=h,h=l,l=rt(t,r+1),h){if(l){const t=l[e]-h[e];n[r]=0!==t?(l[i]-h[i])/t:0}o[r]=a?l?L(n[r-1])!==L(n[r])?0:(n[r-1]+n[r])/2:n[r-1]:n[r]}!function(t,e,i){const s=t.length;let n,o,r,a,h,l=rt(t,0);for(let c=0;c<s-1;++c)h=l,l=rt(t,c+1),h&&l&&(Qe(e[c],0,ot)?i[c]=i[c+1]=0:(n=i[c]/e[c],o=i[c+1]/e[c],a=Math.pow(n,2)+Math.pow(o,2),a<=9||(r=3/Math.sqrt(a),i[c]=n*r*e[c],i[c+1]=o*r*e[c])))}(t,n,o),function(t,e,i="x"){const s=at(i),n=t.length;let o,r,a,h=rt(t,0);for(let l=0;l<n;++l){if(r=a,a=h,h=rt(t,l+1),!a)continue;const n=a[i],c=a[s];r&&(o=(n-r[i])/3,a[`cp1${i}`]=n-o,a[`cp1${s}`]=c-o*e[l]),h&&(o=(h[i]-n)/3,a[`cp2${i}`]=n+o,a[`cp2${s}`]=c+o*e[l])}}(t,o,e)}function ns(t,e,i){return Math.max(Math.min(t,i),e)}function os(t,e,i,s,n){let o,r,a,h;if(e.spanGaps&&(t=t.filter((t=>!t.skip))),"monotone"===e.cubicInterpolationMode)ss(t,n);else{let i=s?t[t.length-1]:t[0];for(o=0,r=t.length;o<r;++o)a=t[o],h=is(i,a,t[Math.min(o+1,r-(s?0:1))%r],e.tension),a.cp1x=h.previous.x,a.cp1y=h.previous.y,a.cp2x=h.next.x,a.cp2y=h.next.y,i=a}e.capBezierPoints&&function(t,e){let i,s,n,o,r,a=Ti(t[0],e);for(i=0,s=t.length;i<s;++i)r=o,o=a,a=i<s-1&&Ti(t[i+1],e),o&&(n=t[i],r&&(n.cp1x=ns(n.cp1x,e.left,e.right),n.cp1y=ns(n.cp1y,e.top,e.bottom)),a&&(n.cp2x=ns(n.cp2x,e.left,e.right),n.cp2y=ns(n.cp2y,e.top,e.bottom)))}(t,i)}function rs(){return"undefined"!=typeof window&&"undefined"!=typeof document}function as(t){let e=t.parentNode;return e&&"[object ShadowRoot]"===e.toString()&&(e=e.host),e}function hs(t,e,i){let s;return"string"==typeof t?(s=parseInt(t,10),-1!==t.indexOf("%")&&(s=s/100*e.parentNode[i])):s=t,s}function ls(t,e,i){const s={};i=i?"-"+i:"";for(let n=0;n<4;n++){const o=lt[n];s[o]=parseFloat(t[e+"-"+o+i])||0}return s.width=s.left+s.right,s.height=s.top+s.bottom,s}function cs(t,e){if("native"in t)return t;const{canvas:i,currentDevicePixelRatio:s}=e,n=ht(i),o="border-box"===n.boxSizing,r=ls(n,"padding"),a=ls(n,"border","width"),{x:h,y:l,box:c}=function(t,e){const i=t.touches,s=i&&i.length?i[0]:t,{offsetX:n,offsetY:o}=s;let r,a,h=!1;if(ct(n,o,t.target))r=n,a=o;else{const t=e.getBoundingClientRect();r=s.clientX-t.left,a=s.clientY-t.top,h=!0}return{x:r,y:a,box:h}}(t,i),d=r.left+(c&&a.left),u=r.top+(c&&a.top);let{width:f,height:g}=e;return o&&(f-=r.width+a.width,g-=r.height+a.height),{x:Math.round((h-d)/f*i.width/s),y:Math.round((l-u)/g*i.height/s)}}function ds(t,e,i,s){const n=ht(t),o=ls(n,"margin"),r=hs(n.maxWidth,t,"clientWidth")||D,a=hs(n.maxHeight,t,"clientHeight")||D,h=function(t,e,i){let s,n;if(void 0===e||void 0===i){const o=as(t);if(o){const t=o.getBoundingClientRect(),r=ht(o),a=ls(r,"border","width"),h=ls(r,"padding");e=t.width-h.width-a.width,i=t.height-h.height-a.height,s=hs(r.maxWidth,o,"clientWidth"),n=hs(r.maxHeight,o,"clientHeight")}else e=t.clientWidth,i=t.clientHeight}return{width:e,height:i,maxWidth:s||D,maxHeight:n||D}}(t,e,i);let{width:l,height:c}=h;if("content-box"===n.boxSizing){const t=ls(n,"border","width"),e=ls(n,"padding");l-=e.width+t.width,c-=e.height+t.height}return l=Math.max(0,l-o.width),c=Math.max(0,s?l/s:c-o.height),l=dt(Math.min(l,r,h.maxWidth)),c=dt(Math.min(c,a,h.maxHeight)),l&&!c&&(c=dt(l/2)),(void 0!==e||void 0!==i)&&s&&h.height&&c>h.height&&(c=h.height,l=dt(Math.floor(c*s))),{width:l,height:c}}function us(t,e,i){const s=e||1,n=Math.floor(t.height*s),o=Math.floor(t.width*s);t.height=Math.floor(t.height),t.width=Math.floor(t.width);const r=t.canvas;return r.style&&(i||!r.style.height&&!r.style.width)&&(r.style.height=`${t.height}px`,r.style.width=`${t.width}px`),(t.currentDevicePixelRatio!==s||r.height!==n||r.width!==o)&&(t.currentDevicePixelRatio=s,r.height=n,r.width=o,t.ctx.setTransform(s,0,0,s,0,0),!0)}function fs(t,e){const i=function(t,e){return ht(t).getPropertyValue(e)}(t,e),s=i&&i.match(/^(\d+)(\.\d+)?px$/);return s?+s[1]:void 0}function gs(t,e,i,s){return{x:t.x+i*(e.x-t.x),y:t.y+i*(e.y-t.y)}}function ps(t,e,i,s){return{x:t.x+i*(e.x-t.x),y:"middle"===s?i<.5?t.y:e.y:"after"===s?i<1?t.y:e.y:i>0?e.y:t.y}}function ms(t,e,i,s){const n={x:t.cp2x,y:t.cp2y},o={x:e.cp1x,y:e.cp1y},r=gs(t,n,i),a=gs(n,o,i),h=gs(o,e,i);return gs(gs(r,a,i),gs(a,h,i),i)}function xs(t,e,i){return t?ft(e,i):gt()}function bs(t,e){let i,s;"ltr"!==e&&"rtl"!==e||(i=t.canvas.style,s=[i.getPropertyValue("direction"),i.getPropertyPriority("direction")],i.setProperty("direction",e,"important"),t.prevTextDirection=s)}function _s(t,e){void 0!==e&&(delete t.prevTextDirection,t.canvas.style.setProperty("direction",e[0],e[1]))}function ys(t){return"angle"===t?{between:hi,compare:ri,normalize:ai}:{between:ci,compare:(t,e)=>t-e,normalize:t=>t}}function vs({start:t,end:e,count:i,loop:s,style:n}){return{start:t%i,end:e%i,loop:s&&(e-t+1)%i==0,style:n}}function ws(t,e,i){if(!i)return[t];const{property:s,start:n,end:o}=i,r=e.length,{compare:a,between:h,normalize:l}=ys(s),{start:c,end:d,loop:u,style:f}=function(t,e,i){const{property:s,start:n,end:o}=i,{between:r,normalize:a}=ys(s),h=e.length;let l,c,{start:d,end:u,loop:f}=t;if(f){for(d+=h,u+=h,l=0,c=h;l<c&&r(a(e[d%h][s]),n,o);++l)d--,u--;d%=h,u%=h}return u<d&&(u+=h),{start:d,end:u,loop:f,style:t.style}}(t,e,i),g=[];let p,m,x,b=!1,_=null;const y=()=>b||h(n,x,p)&&0!==a(n,x),v=()=>!b||0===a(o,p)||h(o,x,p);for(let w=c,k=c;w<=d;++w)m=e[w%r],m.skip||(p=l(m[s]),p!==x&&(b=h(p,n,o),null===_&&y()&&(_=0===a(p,n)?w:k),null!==_&&v()&&(g.push(vs({start:_,end:w,loop:u,count:r,style:f})),_=null),k=w,x=p));return null!==_&&g.push(vs({start:_,end:d,loop:u,count:r,style:f})),g}function ks(t,e){const i=[],s=t.segments;for(let n=0;n<s.length;n++){const o=ws(s[n],t.points,e);o.length&&i.push(...o)}return i}function Ms(t,e,i,s){return s&&s.setContext&&i?function(t,e,i,s){const n=t._chart.getContext(),o=Ss(t.options),{_datasetIndex:r,options:{spanGaps:a}}=t,h=i.length,l=[];let c=o,d=e[0].start,u=d;function f(t,e,s,n){const o=a?-1:1;if(t!==e){for(t+=h;i[t%h].skip;)t-=o;for(;i[e%h].skip;)e+=o;t%h!=e%h&&(l.push({start:t%h,end:e%h,loop:s,style:n}),c=n,d=e%h)}}for(const g of e){d=a?d:g.start;let t,e=i[d%h];for(u=d+1;u<=g.end;u++){const o=i[u%h];t=Ss(s.setContext(Yi(n,{type:"segment",p0:e,p1:o,p0DataIndex:(u-1)%h,p1DataIndex:u%h,datasetIndex:r}))),Ps(t,c)&&f(d,u-1,g.loop,c),e=o,c=t}d<u-1&&f(d,u-1,g.loop,c)}return l}(t,e,i,s):e}function Ss(t){return{backgroundColor:t.backgroundColor,borderCapStyle:t.borderCapStyle,borderDash:t.borderDash,borderDashOffset:t.borderDashOffset,borderJoinStyle:t.borderJoinStyle,borderWidth:t.borderWidth,borderColor:t.borderColor}}function Ps(t,e){if(!e)return!1;const i=[],s=function(t,e){return pi(e)?(i.includes(e)||i.push(e),i.indexOf(e)):e};return JSON.stringify(t,s)!==JSON.stringify(e,s)}function Ds(t,e){const i=t&&t.options||{},s=i.reverse,n=void 0===i.min?e:0,o=void 0===i.max?e:0;return{start:s?o:n,end:s?n:o}}function Os(t,e){const i=[],s=t._getSortedDatasetMetas(e);let n,o;for(n=0,o=s.length;n<o;++n)i.push(s[n].index);return i}function Ts(t,e,i,s={}){const n=t.keys,o="single"===s.mode;let r,a,h,l;if(null!==e){for(r=0,a=n.length;r<a;++r){if(h=+n[r],h===i){if(s.all)continue;break}l=t.values[h],Be(l)&&(o||0===e||L(e)===L(l))&&(e+=l)}return e}}function Cs(t,e){const i=t&&t.options.stacked;return i||void 0===i&&void 0!==e.stack}function As(t,e,i){const s=t[e]||(t[e]={});return s[i]||(s[i]={})}function Is(t,e,i,s){for(const n of e.getMatchingVisibleMetas(s).reverse()){const e=t[n.index];if(i&&e>0||!i&&e<0)return n.index}return null}function Ls(t,e){const{chart:i,_cachedMeta:s}=t,n=i._stacks||(i._stacks={}),{iScale:o,vScale:r,index:a}=s,h=o.axis,l=r.axis,c=function(t,e,i){return`${t.id}.${e.id}.${i.stack||i.type}`}(o,r,s),d=e.length;let u;for(let f=0;f<d;++f){const t=e[f],{[h]:i,[l]:o}=t;u=(t._stacks||(t._stacks={}))[l]=As(n,c,i),u[a]=o,u._top=Is(u,r,!0,s.type),u._bottom=Is(u,r,!1,s.type),(u._visualValues||(u._visualValues={}))[a]=o}}function Es(t,e){const i=t.scales;return Object.keys(i).filter((t=>i[t].axis===e)).shift()}function zs(t,e){const i=t.controller.index,s=t.vScale&&t.vScale.axis;if(s){e=e||t._parsed;for(const t of e){const e=t._stacks;if(!e||void 0===e[s]||void 0===e[s][i])return;delete e[s][i],void 0!==e[s]._visualValues&&void 0!==e[s]._visualValues[i]&&delete e[s]._visualValues[i]}}}function Rs(t){const e=t.iScale,i=function(t,e){if(!t._cache.$bar){const i=t.getMatchingVisibleMetas(e);let s=[];for(let e=0,n=i.length;e<n;e++)s=s.concat(i[e].controller.getAllParsedValues(t));t._cache.$bar=fi(s.sort(((t,e)=>t-e)))}return t._cache.$bar}(e,t.type);let s,n,o,r,a=e._length;const h=()=>{32767!==o&&-32768!==o&&(v(r)&&(a=Math.min(a,Math.abs(o-r)||a)),r=o)};for(s=0,n=i.length;s<n;++s)o=e.getPixelForValue(i[s]),h();for(r=void 0,s=0,n=e.ticks.length;s<n;++s)o=e.getPixelForTick(s),h();return a}function Fs(t,e,i,s){return Re(t)?function(t,e,i,s){const n=i.parse(t[0],s),o=i.parse(t[1],s),r=Math.min(n,o),a=Math.max(n,o);let h=r,l=a;Math.abs(r)>Math.abs(a)&&(h=a,l=r),e[i.axis]=l,e._custom={barStart:h,barEnd:l,start:n,end:o,min:r,max:a}}(t,e,i,s):e[i.axis]=i.parse(t,s),e}function Bs(t,e,i,s){const n=t.iScale,o=t.vScale,r=n.getLabels(),a=n===o,h=[];let l,c,d,u;for(l=i,c=i+s;l<c;++l)u=e[l],d={},d[n.axis]=a||n.parse(r[l],l),h.push(Fs(u,d,o,l));return h}function Hs(t){return t&&void 0!==t.barStart&&void 0!==t.barEnd}function Vs(t,e,i,s){let n=e.borderSkipped;const o={};if(!n)return void(t.borderSkipped=o);if(!0===n)return void(t.borderSkipped={top:!0,right:!0,bottom:!0,left:!0});const{start:r,end:a,reverse:h,top:l,bottom:c}=function(t){let e,i,s,n,o;return t.horizontal?(e=t.base>t.x,i="left",s="right"):(e=t.base<t.y,i="bottom",s="top"),e?(n="end",o="start"):(n="start",o="end"),{start:i,end:s,reverse:e,top:n,bottom:o}}(t);"middle"===n&&i&&(t.enableBorderRadius=!0,(i._top||0)===s?n=l:(i._bottom||0)===s?n=c:(o[Ws(c,r,a,h)]=!0,n=l)),o[Ws(n,r,a,h)]=!0,t.borderSkipped=o}function Ws(t,e,i,s){var n,o,r;return s?(r=i,t=js(t=(n=t)===(o=e)?r:n===r?o:n,i,e)):t=js(t,e,i),t}function js(t,e,i){return"start"===t?e:"end"===t?i:t}function Ns(t,{inflateAmount:e},i){t.inflateAmount="auto"===e?1===i?.33:0:e}function $s(){throw new Error("This method is not implemented: Check that a complete date adapter is provided.")}function Ys(t,e,i,s){const{controller:n,data:o,_sorted:r}=t,a=n._cachedMeta.iScale;if(a&&e===a.axis&&"r"!==e&&r&&o.length){const t=a._reversePixels?z:E;if(!s)return t(o,e,i);if(n._sharedOptions){const s=o[0],n="function"==typeof s.getRange&&s.getRange(e);if(n){const s=t(o,e,i-n),r=t(o,e,i+n);return{lo:s.lo,hi:r.hi}}}}return{lo:0,hi:o.length-1}}function Us(t,e,i,s,n){const o=t.getSortedVisibleDatasetMetas(),r=i[e];for(let a=0,h=o.length;a<h;++a){const{index:t,data:i}=o[a],{lo:h,hi:l}=Ys(o[a],e,r,n);for(let e=h;e<=l;++e){const n=i[e];n.skip||s(n,t,e)}}}function Xs(t,e,i,s,n){const o=[];return n||t.isPointInArea(e)?(Us(t,i,e,(function(i,r,a){(n||Ti(i,t.chartArea,0))&&i.inRange(e.x,e.y,s)&&o.push({element:i,datasetIndex:r,index:a})}),!0),o):o}function qs(t,e,i,s){let n=[];return Us(t,i,e,(function(t,i,o){const{startAngle:r,endAngle:a}=t.getProps(["startAngle","endAngle"],s),{angle:h}=function(t,e){const i=e.x-t.x,s=e.y-t.y,n=Math.sqrt(i*i+s*s);let o=Math.atan2(s,i);return o<-.5*M&&(o+=S),{angle:o,distance:n}}(t,{x:e.x,y:e.y});hi(h,r,a)&&n.push({element:t,datasetIndex:i,index:o})})),n}function Ks(t,e,i,s,n,o){let r=[];const a=function(t){const e=-1!==t.indexOf("x"),i=-1!==t.indexOf("y");return function(t,s){const n=e?Math.abs(t.x-s.x):0,o=i?Math.abs(t.y-s.y):0;return Math.sqrt(Math.pow(n,2)+Math.pow(o,2))}}(i);let h=Number.POSITIVE_INFINITY;return Us(t,i,e,(function(i,l,c){const d=i.inRange(e.x,e.y,n);if(s&&!d)return;const u=i.getCenterPoint(n);if(!o&&!t.isPointInArea(u)&&!d)return;const f=a(e,u);f<h?(r=[{element:i,datasetIndex:l,index:c}],h=f):f===h&&r.push({element:i,datasetIndex:l,index:c})})),r}function Gs(t,e,i,s,n,o){return o||t.isPointInArea(e)?"r"!==i||s?Ks(t,e,i,s,n,o):qs(t,e,i,n):[]}function Zs(t,e,i,s,n){const o=[],r="x"===i?"inXRange":"inYRange";let a=!1;return Us(t,i,e,((t,s,h)=>{t[r](e[i],n)&&(o.push({element:t,datasetIndex:s,index:h}),a=a||t.inRange(e.x,e.y,n))})),s&&!a?[]:o}function Qs(t,e){return t.filter((t=>t.pos===e))}function Js(t,e){return t.filter((t=>-1===Pt.indexOf(t.pos)&&t.box.axis===e))}function tn(t,e){return t.sort(((t,i)=>{const s=e?i:t,n=e?t:i;return s.weight===n.weight?s.index-n.index:s.weight-n.weight}))}function en(t,e){const i=function(t){const e={};for(const i of t){const{stack:t,pos:s,stackWeight:n}=i;if(!t||!Pt.includes(s))continue;const o=e[t]||(e[t]={count:0,placed:0,weight:0,size:0});o.count++,o.weight+=n}return e}(t),{vBoxMaxWidth:s,hBoxMaxHeight:n}=e;let o,r,a;for(o=0,r=t.length;o<r;++o){a=t[o];const{fullSize:r}=a.box,h=i[a.stack],l=h&&a.stackWeight/h.weight;a.horizontal?(a.width=l?l*s:r&&e.availableWidth,a.height=n):(a.width=s,a.height=l?l*n:r&&e.availableHeight)}return i}function sn(t,e,i,s){return Math.max(t[i],e[i])+Math.max(t[s],e[s])}function nn(t,e){t.top=Math.max(t.top,e.top),t.left=Math.max(t.left,e.left),t.bottom=Math.max(t.bottom,e.bottom),t.right=Math.max(t.right,e.right)}function on(t,e,i,s){const{pos:n,box:o}=i,r=t.maxPadding;if(!Fe(n)){i.size&&(t[n]-=i.size);const e=s[i.stack]||{size:0,count:1};e.size=Math.max(e.size,i.horizontal?o.height:o.width),i.size=e.size/e.count,t[n]+=i.size}o.getPadding&&nn(r,o.getPadding());const a=Math.max(0,e.outerWidth-sn(r,t,"left","right")),h=Math.max(0,e.outerHeight-sn(r,t,"top","bottom")),l=a!==t.w,c=h!==t.h;return t.w=a,t.h=h,i.horizontal?{same:l,other:c}:{same:c,other:l}}function rn(t,e){const i=e.maxPadding;function s(t){const s={left:0,top:0,right:0,bottom:0};return t.forEach((t=>{s[t]=Math.max(e[t],i[t])})),s}return s(t?["left","right"]:["top","bottom"])}function an(t,e,i,s){const n=[];let o,r,a,h,l,c;for(o=0,r=t.length,l=0;o<r;++o){a=t[o],h=a.box,h.update(a.width||e.w,a.height||e.h,rn(a.horizontal,e));const{same:r,other:d}=on(e,i,a,s);l|=r&&n.length,c=c||d,h.fullSize||n.push(a)}return l&&an(n,e,i,s)||c}function hn(t,e,i,s,n){t.top=i,t.left=e,t.right=e+s,t.bottom=i+n,t.width=s,t.height=n}function ln(t,e,i,s){const n=i.padding;let{x:o,y:r}=e;for(const a of t){const t=a.box,h=s[a.stack]||{count:1,placed:0,weight:1},l=a.stackWeight/h.weight||1;if(a.horizontal){const s=e.w*l,o=h.size||t.height;v(h.start)&&(r=h.start),t.fullSize?hn(t,n.left,r,i.outerWidth-n.right-n.left,o):hn(t,e.left+h.placed,r,s,o),h.start=r,h.placed+=s,r=t.bottom}else{const s=e.h*l,r=h.size||t.width;v(h.start)&&(o=h.start),t.fullSize?hn(t,o,n.top,r,i.outerHeight-n.bottom-n.top):hn(t,o,e.top+h.placed,r,s),h.start=o,h.placed+=s,o=t.right}}e.x=o,e.y=r}function cn(t,e,i){t.canvas.removeEventListener(e,i,Lt)}function dn(t,e){for(const i of t)if(i===e||i.contains(e))return!0}function un(t,e,i){const s=t.canvas,n=new MutationObserver((t=>{let e=!1;for(const i of t)e=e||dn(i.addedNodes,s),e=e&&!dn(i.removedNodes,s);e&&i()}));return n.observe(document,{childList:!0,subtree:!0}),n}function fn(t,e,i){const s=t.canvas,n=new MutationObserver((t=>{let e=!1;for(const i of t)e=e||dn(i.removedNodes,s),e=e&&!dn(i.addedNodes,s);e&&i()}));return n.observe(document,{childList:!0,subtree:!0}),n}function gn(){const t=window.devicePixelRatio;t!==zt&&(zt=t,Et.forEach(((e,i)=>{i.currentDevicePixelRatio!==t&&e()})))}function pn(t,e,i){const s=t.canvas,n=s&&as(s);if(!n)return;const o=gi(((t,e)=>{const s=n.clientWidth;i(t,e),s<n.clientWidth&&i()}),window),r=new ResizeObserver((t=>{const e=t[0],i=e.contentRect.width,s=e.contentRect.height;0===i&&0===s||o(i,s)}));return r.observe(n),function(t,e){Et.size||window.addEventListener("resize",gn),Et.set(t,e)}(t,o),r}function mn(t,e,i){i&&i.disconnect(),"resize"===e&&function(t){Et.delete(t),Et.size||window.removeEventListener("resize",gn)}(t)}function xn(t,e,i){const s=t.canvas,n=gi((e=>{null!==t.ctx&&i(function(t,e){const i=At[t.type]||t.type,{x:s,y:n}=cs(t,e);return{type:i,chart:e,native:t,x:void 0!==s?s:null,y:void 0!==n?n:null}}(e,t))}),t);return function(t,e,i){t.addEventListener(e,i,Lt)}(s,e,n),n}function bn(t,e){const i=t.options.ticks,s=function(t){const e=t.options.offset,i=t._tickSize(),s=t._length/i+(e?0:1),n=t._maxLength/i;return Math.floor(Math.min(s,n))}(t),n=Math.min(i.maxTicksLimit||s,s),o=i.major.enabled?function(t){const e=[];let i,s;for(i=0,s=t.length;i<s;i++)t[i].major&&e.push(i);return e}(e):[],r=o.length,a=o[0],h=o[r-1],l=[];if(r>n)return function(t,e,i,s){let n,o=0,r=i[0];for(s=Math.ceil(s),n=0;n<t.length;n++)n===r&&(e.push(t[n]),o++,r=i[o*s])}(e,l,o,r/n),l;const c=function(t,e,i){const s=function(t){const e=t.length;let i,s;if(e<2)return!1;for(s=t[0],i=1;i<e;++i)if(t[i]-t[i-1]!==s)return!1;return s}(t),n=e.length/i;if(!s)return Math.max(n,1);const o=function(t){const e=[],i=Math.sqrt(t);let s;for(s=1;s<i;s++)t%s==0&&(e.push(s),e.push(t/s));return i===(0|i)&&e.push(i),e.sort(((t,e)=>t-e)).pop(),e}(s);for(let r=0,a=o.length-1;r<a;r++){const t=o[r];if(t>n)return t}return Math.max(n,1)}(o,e,n);if(r>0){let t,i;const s=r>1?Math.round((h-a)/(r-1)):null;for(_n(e,l,c,ze(s)?0:a-s,a),t=0,i=r-1;t<i;t++)_n(e,l,c,o[t],o[t+1]);return _n(e,l,c,h,ze(s)?e.length:h+s),l}return _n(e,l,c),l}function _n(t,e,i,s,n){const o=Ve(s,0),r=Math.min(Ve(n,t.length),t.length);let a,h,l,c=0;for(i=Math.ceil(i),n&&(a=n-s,i=a/Math.floor(a/i)),l=o;l<0;)c++,l=Math.round(o+c*i);for(h=Math.max(o,0);h<r;h++)h===l&&(e.push(t[h]),c++,l=Math.round(o+c*i))}function yn(t,e){const i=[],s=t.length/e,n=t.length;let o=0;for(;o<n;o+=s)i.push(t[Math.floor(o)]);return i}function vn(t,e,i){const s=t.ticks.length,n=Math.min(e,s-1),o=t._startPixel,r=t._endPixel,a=1e-6;let h,l=t.getPixelForTick(n);if(!(i&&(h=1===s?Math.max(l-o,r-l):0===e?(t.getPixelForTick(1)-l)/2:(l-t.getPixelForTick(n-1))/2,l+=n<e?h:-h,l<o-a||l>r+a)))return l}function wn(t){return t.drawTicks?t.tickLength:0}function kn(t,e){if(!t.display)return 0;const i=Ni(t.font,e),s=ji(t.padding);return(Re(t.text)?t.text.length:1)*i.lineHeight+s.height}function Mn(t,e,i){let s=B(t);return(i&&"right"!==e||!i&&"right"===e)&&(s=Bt(s)),s}function Sn(t,e,i){const s=Xe(Object.create(null),[i?Q.get(i):{},Q.get(e),t.defaults]);Q.set(e,s),t.defaultRoutes&&function(t,e){Object.keys(e).forEach((i=>{const s=i.split("."),n=s.pop(),o=[t].concat(s).join("."),r=e[i].split("."),a=r.pop(),h=r.join(".");Q.route(o,n,h,a)}))}(e,t.defaultRoutes),t.descriptors&&Q.describe(e,t.descriptors)}function Pn(t,e){return e||!1!==t?!0===t?{}:t:null}function Dn(t,{plugin:e,local:i},s,n){const o=t.pluginScopeKeys(e),r=t.getOptionScopes(s,o);return i&&e.defaults&&r.push(e.defaults),t.createResolver(r,n,[""],{scriptable:!1,indexable:!1,allKeys:!0})}function On(t,e){const i=Q.datasets[t]||{};return((e.datasets||{})[t]||{}).indexAxis||e.indexAxis||i.indexAxis||"x"}function Tn(t){if("x"===t||"y"===t||"r"===t)return t}function Cn(t,...e){if(Tn(t))return t;for(const s of e){const e=s.axis||("top"===(i=s.position)||"bottom"===i?"x":"left"===i||"right"===i?"y":void 0)||t.length>1&&Tn(t[0].toLowerCase());if(e)return e}var i;throw new Error(`Cannot determine type of '${t}' axis. Please provide 'axis' or 'position' option.`)}function An(t,e,i){if(i[e+"AxisID"]===t)return{axis:e}}function In(t,e){const i=G[t.type]||{scales:{}},s=e.scales||{},n=On(t.type,e),o=Object.create(null);return Object.keys(s).forEach((e=>{const r=s[e];if(!Fe(r))return console.error(`Invalid scale configuration for scale: ${e}`);if(r._proxy)return console.warn(`Ignoring resolver passed as options for scale: ${e}`);const a=Cn(e,r,function(t,e){if(e.data&&e.data.datasets){const i=e.data.datasets.filter((e=>e.xAxisID===t||e.yAxisID===t));if(i.length)return An(t,"x",i[0])||An(t,"y",i[0])}return{}}(e,t),Q.scales[r.type]),h=function(t,e){return t===e?"_index_":"_value_"}(a,n),l=i.scales||{};o[e]=qe(Object.create(null),[{axis:a},r,l[a],l[h]])})),t.data.datasets.forEach((i=>{const n=i.type||t.type,r=i.indexAxis||On(n,e),a=(G[n]||{}).scales||{};Object.keys(a).forEach((t=>{const e=function(t,e){let i=t;return"_index_"===t?i=e:"_value_"===t&&(i="x"===e?"y":"x"),i}(t,r),n=i[e+"AxisID"]||e;o[n]=o[n]||Object.create(null),qe(o[n],[{axis:e},s[n],a[t]])}))})),Object.keys(o).forEach((t=>{const e=o[t];qe(e,[Q.scales[e.type],Q.scale])})),o}function Ln(t){const e=t.options||(t.options={});e.plugins=Ve(e.plugins,{}),e.scales=In(t,e)}function En(t){return(t=t||{}).datasets=t.datasets||[],t.labels=t.labels||[],t}function zn(t,e){let i=Yt.get(t);return i||(i=e(),Yt.set(t,i),Ut.add(i)),i}function Rn(t,e,i){let s=t.get(e);s||(s=new Map,t.set(e,s));const n=i.join();let o=s.get(n);return o||(o={resolver:Ui(e,i),subPrefixes:i.filter((t=>!t.toLowerCase().includes("hover")))},s.set(n,o)),o}function Fn(t,e){return"top"===t||"bottom"===t||-1===Gt.indexOf(t)&&"x"===e}function Bn(t,e){return function(i,s){return i[t]===s[t]?i[e]-s[e]:i[t]-s[t]}}function Hn(t){const e=t.chart,i=e.options.animation;e.notifyPlugins("afterRender"),We(i&&i.onComplete,[t],e)}function Vn(t){const e=t.chart,i=e.options.animation;We(i&&i.onProgress,[t],e)}function Wn(t){return rs()&&"string"==typeof t?t=document.getElementById(t):t&&t.length&&(t=t[0]),t&&t.canvas&&(t=t.canvas),t}function jn(t,e,i){const s=Object.keys(t);for(const n of s){const s=+n;if(s>=e){const o=t[n];delete t[n],(i>0||s>e)&&(t[s+i]=o)}}}function Nn(t,e,i){return t.options.clip?t[i]:e[i]}function $n(){return je(Jt.instances,(t=>t._plugins.invalidate()))}function Yn(t,e,i=e){t.lineCap=Ve(i.borderCapStyle,e.borderCapStyle),t.setLineDash(Ve(i.borderDash,e.borderDash)),t.lineDashOffset=Ve(i.borderDashOffset,e.borderDashOffset),t.lineJoin=Ve(i.borderJoinStyle,e.borderJoinStyle),t.lineWidth=Ve(i.borderWidth,e.borderWidth),t.strokeStyle=Ve(i.borderColor,e.borderColor)}function Un(t,e,i){t.lineTo(i.x,i.y)}function Xn(t,e,i={}){const s=t.length,{start:n=0,end:o=s-1}=i,{start:r,end:a}=e,h=Math.max(n,r),l=Math.min(o,a),c=n<r&&o<r||n>a&&o>a;return{count:s,start:h,loop:e.loop,ilen:l<h&&!c?s+l-h:l-h}}function qn(t,e,i,s){const{points:n,options:o}=e,{count:r,start:a,loop:h,ilen:l}=Xn(n,i,s),c=function(t){return t.stepped?Ii:t.tension||"monotone"===t.cubicInterpolationMode?Li:Un}(o);let d,u,f,{move:g=!0,reverse:p}=s||{};for(d=0;d<=l;++d)u=n[(a+(p?l-d:d))%r],u.skip||(g?(t.moveTo(u.x,u.y),g=!1):c(t,f,u,p,o.stepped),f=u);return h&&(u=n[(a+(p?l:0))%r],c(t,f,u,p,o.stepped)),!!h}function Kn(t,e,i,s){const n=e.points,{count:o,start:r,ilen:a}=Xn(n,i,s),{move:h=!0,reverse:l}=s||{};let c,d,u,f,g,p,m=0,x=0;const b=t=>(r+(l?a-t:t))%o,_=()=>{f!==g&&(t.lineTo(m,g),t.lineTo(m,f),t.lineTo(m,p))};for(h&&(d=n[b(0)],t.moveTo(d.x,d.y)),c=0;c<=a;++c){if(d=n[b(c)],d.skip)continue;const e=d.x,i=d.y,s=0|e;s===u?(i<f?f=i:i>g&&(g=i),m=(x*m+e)/++x):(_(),t.lineTo(e,i),u=s,x=0,f=g=i),p=i}_()}function Gn(t){const e=t.options,i=e.borderDash&&e.borderDash.length;return t._decimated||t._loop||e.tension||"monotone"===e.cubicInterpolationMode||e.stepped||i?qn:Kn}function Zn(t,e,i,s){te&&!e.options.segment?function(t,e,i,s){let n=e._path;n||(n=e._path=new Path2D,e.path(n,i,s)&&n.closePath()),Yn(t,e.options),t.stroke(n)}(t,e,i,s):function(t,e,i,s){const{segments:n,options:o}=e,r=Gn(e);for(const a of n)Yn(t,o,a.style),t.beginPath(),r(t,e,a,{start:i,end:i+s-1})&&t.closePath(),t.stroke()}(t,e,i,s)}function Qn(t,e,i,s){const n=t.options,{[i]:o}=t.getProps([i],s);return Math.abs(e-o)<n.radius+n.hitRadius}function Jn(t,e){const{x:i,y:s,base:n,width:o,height:r}=t.getProps(["x","y","base","width","height"],e);let a,h,l,c,d;return t.horizontal?(d=r/2,a=Math.min(i,n),h=Math.max(i,n),l=s-d,c=s+d):(d=o/2,a=i-d,h=i+d,l=Math.min(s,n),c=Math.max(s,n)),{left:a,top:l,right:h,bottom:c}}function to(t,e,i,s){return t?0:li(e,i,s)}function eo(t){const e=Jn(t),i=e.right-e.left,s=e.bottom-e.top,n=function(t,e,i){const s=t.options.borderWidth,n=t.borderSkipped,o=Vi(s);return{t:to(n.top,o.top,0,i),r:to(n.right,o.right,0,e),b:to(n.bottom,o.bottom,0,i),l:to(n.left,o.left,0,e)}}(t,i/2,s/2),o=function(t,e,i){const{enableBorderRadius:s}=t.getProps(["enableBorderRadius"]),n=t.options.borderRadius,o=Wi(n),r=Math.min(e,i),a=t.borderSkipped,h=s||Fe(n);return{topLeft:to(!h||a.top||a.left,o.topLeft,0,r),topRight:to(!h||a.top||a.right,o.topRight,0,r),bottomLeft:to(!h||a.bottom||a.left,o.bottomLeft,0,r),bottomRight:to(!h||a.bottom||a.right,o.bottomRight,0,r)}}(t,i/2,s/2);return{outer:{x:e.left,y:e.top,w:i,h:s,radius:o},inner:{x:e.left+n.l,y:e.top+n.t,w:i-n.l-n.r,h:s-n.t-n.b,radius:{topLeft:Math.max(0,o.topLeft-Math.max(n.t,n.l)),topRight:Math.max(0,o.topRight-Math.max(n.t,n.r)),bottomLeft:Math.max(0,o.bottomLeft-Math.max(n.b,n.l)),bottomRight:Math.max(0,o.bottomRight-Math.max(n.b,n.r))}}}}function io(t,e,i,s){const n=null===e,o=null===i,r=t&&!(n&&o)&&Jn(t,s);return r&&(n||ci(e,r.left,r.right))&&(o||ci(i,r.top,r.bottom))}function so(t,e){t.rect(e.x,e.y,e.w,e.h)}function no(t,e,i={}){const s=t.x!==i.x?-e:0,n=t.y!==i.y?-e:0,o=(t.x+t.w!==i.x+i.w?e:0)-s,r=(t.y+t.h!==i.y+i.h?e:0)-n;return{x:t.x+s,y:t.y+n,w:t.w+o,h:t.h+r,radius:t.radius}}function oo(t,e,i,s){if(s)return;let n=e[t],o=i[t];return"angle"===t&&(n=ai(n),o=ai(o)),{property:t,start:n,end:o}}function ro(t,e,i){for(;e>t;e--){const t=i[e];if(!isNaN(t.x)&&!isNaN(t.y))break}return e}function ao(t,e,i,s){return t&&e?s(t[i],e[i]):t?t[i]:e?e[i]:0}function ho(t,e){let i=[],s=!1;return Re(t)?(s=!0,i=t):i=function(t,e){const{x:i=null,y:s=null}=t||{},n=e.points,o=[];return e.segments.forEach((({start:t,end:e})=>{e=ro(t,e,n);const r=n[t],a=n[e];null!==s?(o.push({x:r.x,y:s}),o.push({x:a.x,y:s})):null!==i&&(o.push({x:i,y:r.y}),o.push({x:i,y:a.y}))})),o}(t,e),i.length?new ee({points:i,options:{tension:0},_loop:s,_fullLoop:s}):null}function lo(t){return t&&!1!==t.fill}function co(t,e,i){let s=t[e].fill;const n=[e];let o;if(!i)return s;for(;!1!==s&&-1===n.indexOf(s);){if(!Be(s))return s;if(o=t[s],!o)return!1;if(o.visible)return s;n.push(s),s=o.fill}return!1}function uo(t,e,i){const s=function(t){const e=t.options,i=e.fill;let s=Ve(i&&i.target,i);return void 0===s&&(s=!!e.backgroundColor),!1!==s&&null!==s&&(!0===s?"origin":s)}(t);if(Fe(s))return!isNaN(s.value)&&s;let n=parseFloat(s);return Be(n)&&Math.floor(n)===n?function(t,e,i,s){return"-"!==t&&"+"!==t||(i=e+i),!(i===e||i<0||i>=s)&&i}(s[0],e,n,i):["origin","start","end","stack","shape"].indexOf(s)>=0&&s}function fo(t,e,i){const s=[];for(let n=0;n<i.length;n++){const o=i[n],{first:r,last:a,point:h}=go(o,e,"x");if(!(!h||r&&a))if(r)s.unshift(h);else if(t.push(h),!a)break}t.push(...s)}function go(t,e,i){const s=t.interpolate(e,i);if(!s)return{};const n=s[i],o=t.segments,r=t.points;let a=!1,h=!1;for(let l=0;l<o.length;l++){const t=o[l],e=r[t.start][i],s=r[t.end][i];if(ci(n,e,s)){a=n===e,h=n===s;break}}return{first:a,last:h,point:s}}function po(t){const{chart:e,fill:i,line:s}=t;if(Be(i))return function(t,e){const i=t.getDatasetMeta(e);return i&&t.isDatasetVisible(e)?i.dataset:null}(e,i);if("stack"===i)return function(t){const{scale:e,index:i,line:s}=t,n=[],o=s.segments,r=s.points,a=function(t,e){const i=[],s=t.getMatchingVisibleMetas("line");for(let n=0;n<s.length;n++){const t=s[n];if(t.index===e)break;t.hidden||i.unshift(t.dataset)}return i}(e,i);a.push(ho({x:null,y:e.bottom},s));for(let h=0;h<o.length;h++){const t=o[h];for(let e=t.start;e<=t.end;e++)fo(n,r[e],a)}return new ee({points:n,options:{}})}(t);if("shape"===i)return!0;const n=function(t){return(t.scale||{}).getPointPositionForValue?function(t){const{scale:e,fill:i}=t,s=e.options,n=e.getLabels().length,o=s.reverse?e.max:e.min,r=function(t,e,i){let s;return s="start"===t?i:"end"===t?e.options.reverse?e.min:e.max:Fe(t)?t.value:e.getBaseValue(),s}(i,e,o),a=[];if(s.grid.circular){const t=e.getPointPositionForValue(0,o);return new ie({x:t.x,y:t.y,radius:e.getDistanceFromCenterForValue(r)})}for(let h=0;h<n;++h)a.push(e.getPointPositionForValue(h,r));return a}(t):function(t){const{scale:e={},fill:i}=t,s=function(t,e){let i=null;return"start"===t?i=e.bottom:"end"===t?i=e.top:Fe(t)?i=e.getPixelForValue(t.value):e.getBasePixel&&(i=e.getBasePixel()),i}(i,e);if(Be(s)){const t=e.isHorizontal();return{x:t?s:null,y:t?null:s}}return null}(t)}(t);return n instanceof ie?n:ho(n,s)}function mo(t,e,i){const s=po(e),{line:n,scale:o,axis:r}=e,a=n.options,h=a.fill,l=a.backgroundColor,{above:c=l,below:d=l}=h||{};s&&n.points.length&&(Ci(t,i),function(t,e){const{line:i,target:s,above:n,below:o,area:r,scale:a}=e,h=i._loop?"angle":e.axis;t.save(),"x"===h&&o!==n&&(xo(t,s,r.top),bo(t,{line:i,target:s,color:n,scale:a,property:h}),t.restore(),t.save(),xo(t,s,r.bottom)),bo(t,{line:i,target:s,color:o,scale:a,property:h}),t.restore()}(t,{line:n,target:s,above:c,below:d,area:i,scale:o,axis:r}),Ai(t))}function xo(t,e,i){const{segments:s,points:n}=e;let o=!0,r=!1;t.beginPath();for(const a of s){const{start:s,end:h}=a,l=n[s],c=n[ro(s,h,n)];o?(t.moveTo(l.x,l.y),o=!1):(t.lineTo(l.x,i),t.lineTo(l.x,l.y)),r=!!e.pathSegment(t,a,{move:r}),r?t.closePath():t.lineTo(c.x,i)}t.lineTo(e.first().x,i),t.closePath(),t.clip()}function bo(t,e){const{line:i,target:s,property:n,color:o,scale:r}=e,a=function(t,e,i){const s=t.segments,n=t.points,o=e.points,r=[];for(const a of s){let{start:t,end:s}=a;s=ro(t,s,n);const h=oo(i,n[t],n[s],a.loop);if(!e.segments){r.push({source:a,target:h,start:n[t],end:n[s]});continue}const l=ks(e,h);for(const e of l){const t=oo(i,o[e.start],o[e.end],e.loop),s=ws(a,n,t);for(const n of s)r.push({source:n,target:e,start:{[i]:ao(h,t,"start",Math.max)},end:{[i]:ao(h,t,"end",Math.min)}})}}return r}(i,s,n);for(const{source:h,target:l,start:c,end:d}of a){const{style:{backgroundColor:e=o}={}}=h,a=!0!==s;t.save(),t.fillStyle=e,_o(t,r,a&&oo(n,c,d)),t.beginPath();const u=!!i.pathSegment(t,h);let f;if(a){u?t.closePath():yo(t,s,d,n);const e=!!s.pathSegment(t,l,{move:u,reverse:!0});f=u&&e,f||yo(t,s,c,n)}t.closePath(),t.fill(f?"evenodd":"nonzero"),t.restore()}}function _o(t,e,i){const{top:s,bottom:n}=e.chart.chartArea,{property:o,start:r,end:a}=i||{};"x"===o&&(t.beginPath(),t.rect(r,s,a-r,n-s),t.clip())}function yo(t,e,i,s){const n=e.interpolate(i,s);n&&t.lineTo(n.x,n.y)}function vo(t,e,i,s){let n=t.text;return n&&"string"!=typeof n&&(n=n.reduce(((t,e)=>t.length>e.length?t:e))),e+i.size/2+s.measureText(n).width}function wo(t,e,i){let s=t;return"string"!=typeof e.text&&(s=ko(e,i)),s}function ko(t,e){return e*(t.text?t.text.length:0)}function Mo(t,e){return e&&(Re(e)?Array.prototype.push.apply(t,e):t.push(e)),t}function So(t){return("string"==typeof t||t instanceof String)&&t.indexOf("\n")>-1?t.split("\n"):t}function Po(t,e){const{element:i,datasetIndex:s,index:n}=e,o=t.getDatasetMeta(s).controller,{label:r,value:a}=o.getLabelAndValue(n);return{chart:t,label:r,parsed:o.getParsed(n),raw:t.data.datasets[s].data[n],formattedValue:a,dataset:o.getDataset(),dataIndex:n,datasetIndex:s,element:i}}function Do(t,e){const i=t.chart.ctx,{body:s,footer:n,title:o}=t,{boxWidth:r,boxHeight:a}=e,h=Ni(e.bodyFont),l=Ni(e.titleFont),c=Ni(e.footerFont),d=o.length,u=n.length,f=s.length,g=ji(e.padding);let p=g.height,m=0,x=s.reduce(((t,e)=>t+e.before.length+e.lines.length+e.after.length),0);x+=t.beforeBody.length+t.afterBody.length,d&&(p+=d*l.lineHeight+(d-1)*e.titleSpacing+e.titleMarginBottom),x&&(p+=f*(e.displayColors?Math.max(a,h.lineHeight):h.lineHeight)+(x-f)*h.lineHeight+(x-1)*e.bodySpacing),u&&(p+=e.footerMarginTop+u*c.lineHeight+(u-1)*e.footerSpacing);let b=0;const _=function(t){m=Math.max(m,i.measureText(t).width+b)};return i.save(),i.font=l.string,je(t.title,_),i.font=h.string,je(t.beforeBody.concat(t.afterBody),_),b=e.displayColors?r+2+e.boxPadding:0,je(s,(t=>{je(t.before,_),je(t.lines,_),je(t.after,_)})),b=0,i.font=c.string,je(t.footer,_),i.restore(),m+=g.width,{width:m,height:p}}function Oo(t,e,i,s){const{x:n,width:o}=i,{width:r,chartArea:{left:a,right:h}}=t;let l="center";return"center"===s?l=n<=(a+h)/2?"left":"right":n<=o/2?l="left":n>=r-o/2&&(l="right"),function(t,e,i,s){const{x:n,width:o}=s,r=i.caretSize+i.caretPadding;return"left"===t&&n+o+r>e.width||"right"===t&&n-o-r<0||void 0}(l,t,e,i)&&(l="center"),l}function To(t,e,i){const s=i.yAlign||e.yAlign||function(t,e){const{y:i,height:s}=e;return i<s/2?"top":i>t.height-s/2?"bottom":"center"}(t,i);return{xAlign:i.xAlign||e.xAlign||Oo(t,e,i,s),yAlign:s}}function Co(t,e,i,s){const{caretSize:n,caretPadding:o,cornerRadius:r}=t,{xAlign:a,yAlign:h}=i,l=n+o,{topLeft:c,topRight:d,bottomLeft:u,bottomRight:f}=Wi(r);let g=function(t,e){let{x:i,width:s}=t;return"right