1import{DatasetController as S,Element as E}from"chart.js";import{isObject as k,toTRBLCorners as B,addRoundedRectPath as p}from"chart.js/helpers";var M="0.0.0-development",l=class extends S{initialize(){this.enableOptionSharing=!0,super.initialize()}update(t){let e=this._cachedMeta;this.updateElements(e.data,0,e.data.length,t)}updateElements(t,e,n,i){let o=i==="reset",{xScale:s,yScale:a}=this._cachedMeta,f=this.resolveDataElementOptions(e,i),x=this.getSharedOptions(f);for(let h=e;h<e+n;h++){let g=!o&&this.getParsed(h),v=o?s.getBasePixel():s.getPixelForValue(g.x),P=o?a.getBasePixel():a.getPixelForValue(g.y),b=this.resolveDataElementOptions(h,i),{width:y,height:m,anchorX:R,anchorY:C}=b,O={x:D(R,v,y),y:j(C,P,m),width:y,height:m,options:b};this.updateElement(t[h],h,O,i)}this.updateSharedOptions(x,i,f)}draw(){let t=this.chart.ctx,e=this.getMeta().data||[],n,i;for(n=0,i=e.length;n<i;++n)e[n].draw(t)}};l.id="matrix";l.version=M;l.defaults={dataElementType:"matrix",animations:{numbers:{type:"number",properties:["x","y","width","height"]}}};l.overrides={interaction:{mode:"nearest",intersect:!0},scales:{x:{type:"linear",offset:!0},y:{type:"linear",reverse:!0}}};function D(r,t,e){return r==="left"||r==="start"?t:r==="right"||r==="end"?t-e:t-e/2}function j(r,t,e){return r==="top"||r==="start"?t:r==="bottom"||r==="end"?t-e:t-e/2}function w(r,t){let{x:e,y:n,width:i,height:o}=r.getProps(["x","y","width","height"],t);return{left:e,top:n,right:e+i,bottom:n+o}}function u(r,t,e){return Math.max(Math.min(r,e),t)}function z(r,t,e){let n=r.borderWidth,i,o,s,a;return k(n)?(i=+n.top||0,o=+n.right||0,s=+n.bottom||0,a=+n.left||0):i=o=s=a=+n||0,{t:u(i,0,e),r:u(o,0,t),b:u(s,0,e),l:u(a,0,t)}}function F(r){let t=w(r,!1),e=t.right-t.left,n=t.bottom-t.top,i=z(r.options,e/2,n/2);return{outer:{x:t.left,y:t.top,w:e,h:n},inner:{x:t.left+i.l,y:t.top+i.t,w:e-i.l-i.r,h:n-i.t-i.b}}}function c(r,t,e,n){let i=t===null,o=e===null,s=!r||i&&o?!1:w(r,n);return s&&(i||t>=s.left&&t<=s.right)&&(o||e>=s.top&&e<=s.bottom)}var d=class extends E{draw(t){let e=this.options,{inner:n,outer:i}=F(this),o=B(e.borderRadius);t.save(),i.w!==n.w||i.h!==n.h?(t.beginPath(),p(t,{x:i.x,y:i.y,w:i.w,h:i.h,radius:o}),p(t,{x:n.x,y:n.y,w:n.w,h:n.h,radius:o}),t.fillStyle=e.backgroundColor,t.fill(),t.fillStyle=e.borderColor,t.fill("evenodd")):(t.beginPath(),p(t,{x:n.x,y:n.y,w:n.w,h:n.h,radius:o}),t.fillStyle=e.backgroundColor,t.fill()),t.restore()}inRange(t,e,n){return c(this,t,e,n)}inXRange(t,e){return c(this,t,null,e)}inYRange(t,e){return c(this,null,t,e)}getCenterPoint(t){let{x:e,y:n,width:i,height:o}=this.getProps(["x","y","width","height"],t);return{x:e+i/2,y:n+o/2}}tooltipPosition(){return this.getCenterPoint()}getRange(t){return t==="x"?this.width/2:this.height/2}constructor(t){super(),t&&Object.assign(this,t)}};d.id="matrix";d.defaults={backgroundColor:void 0,borderColor:void 0,borderWidth:void 0,borderRadius:0,anchorX:"center",anchorY:"center",width:20,height:20};export{l as MatrixController,d as MatrixElement}; 2/*! Bundled license information: 3
4chartjs-chart-matrix/dist/chartjs-chart-matrix.esm.js: 5 (*! 6 * chartjs-chart-matrix v0.0.0-development 7 * https://chartjs-chart-matrix.pages.dev/ 8 * (c) 2025 Jukka Kurkela 9 * Released under the MIT license 10 *) 11*/
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.