"use strict";(globalThis.wpRiseJsonp=globalThis.wpRiseJsonp||[]).push([["node_modules_pnpm_react-chartjs-2_5_3_1_chart_js_4_5_1_react_19_2_7_node_modules_react-chartj-fc957b0","node_modules_pnpm_react-chartjs-2_5_3_1_chart_js_4_5_1_react_19_2_7_node_modules_react-chartj-fc957b1","node_modules_pnpm_react_19_2_7_node_modules_react_jsx-runtime_js"],{51820(b,f){/**
 * @license React
 * react-jsx-runtime.production.js
 *
 * Copyright (c) Meta Platforms, Inc. and affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */var c=Symbol.for("react.transitional.element"),C=Symbol.for("react.fragment");function n(o,u,l){var v=null;if(l!==void 0&&(v=""+l),u.key!==void 0&&(v=""+u.key),"key"in u){l={};for(var E in u)E!=="key"&&(l[E]=u[E])}else l=u;return u=l.ref,{$$typeof:c,type:o,key:v,ref:u!==void 0?u:null,props:l}}f.Fragment=C,f.jsx=n,f.jsxs=n},69838(b,f,c){b.exports=c(51820)},58459(b,f,c){c.r(f),c.d(f,{Bar:()=>k,Bubble:()=>x,Chart:()=>P,Doughnut:()=>F,Line:()=>O,Pie:()=>I,PolarArea:()=>S,Radar:()=>y,Scatter:()=>U,getDatasetAtEvent:()=>M,getElementAtEvent:()=>B,getElementsAtEvent:()=>w});var C=c(69838),n=c(82920),o=c(30467);const u="label";function l(t,e){typeof t=="function"?t(e):t&&(t.current=e)}function v(t,e){const s=t.options;s&&e&&Object.assign(s,e)}function E(t,e){t.labels=e}function j(t,e,s=u){const h=[];t.datasets=e.map(a=>{const d=t.datasets.find(m=>m[s]===a[s]);return!d||!a.data||h.includes(d)?{...a}:(h.push(d),Object.assign(d,a),d)})}function D(t,e=u){const s={labels:[],datasets:[]};return E(s,t.labels),j(s,t.datasets,e),s}function M(t,e){return t.getElementsAtEventForMode(e.nativeEvent,"dataset",{intersect:!0},!1)}function B(t,e){return t.getElementsAtEventForMode(e.nativeEvent,"nearest",{intersect:!0},!1)}function w(t,e){return t.getElementsAtEventForMode(e.nativeEvent,"index",{intersect:!0},!1)}function L(t,e){const{height:s=150,width:h=300,redraw:a=!1,datasetIdKey:d,type:m,data:i,options:p,plugins:W=[],fallbackContent:J,updateMode:T,...Y}=t,A=(0,n.useRef)(null),r=(0,n.useRef)(null),g=()=>{A.current&&(r.current=new o.Chart(A.current,{type:m,data:D(i,d),options:p&&{...p},plugins:W}),l(e,r.current))},R=()=>{l(e,null),r.current&&(r.current.destroy(),r.current=null)};return(0,n.useEffect)(()=>{!a&&r.current&&p&&v(r.current,p)},[a,p]),(0,n.useEffect)(()=>{!a&&r.current&&E(r.current.config.data,i.labels)},[a,i.labels]),(0,n.useEffect)(()=>{!a&&r.current&&i.datasets&&j(r.current.config.data,i.datasets,d)},[a,i.datasets]),(0,n.useEffect)(()=>{r.current&&(a?(R(),setTimeout(g)):r.current.update(T))},[a,p,i.labels,i.datasets,T]),(0,n.useEffect)(()=>{r.current&&(R(),setTimeout(g))},[m]),(0,n.useEffect)(()=>(g(),()=>R()),[]),(0,C.jsx)("canvas",{ref:A,role:"img",height:s,width:h,...Y,children:J})}const P=(0,n.forwardRef)(L);function _(t,e){return o.Chart.register(e),(0,n.forwardRef)((s,h)=>(0,C.jsx)(P,{...s,ref:h,type:t}))}const O=_("line",o.LineController),k=_("bar",o.BarController),y=_("radar",o.RadarController),F=_("doughnut",o.DoughnutController),S=_("polarArea",o.PolarAreaController),x=_("bubble",o.BubbleController),I=_("pie",o.PieController),U=_("scatter",o.ScatterController)}}]);
