"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-7f4f2b0","node_modules_pnpm_react-chartjs-2_5_3_1_chart_js_4_5_1_react_19_2_7_node_modules_react-chartj-7f4f2b1","node_modules_pnpm_react_19_2_7_node_modules_react_jsx-runtime_js"],{36492(A,d){/**
 * @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 l=Symbol.for("react.transitional.element"),C=Symbol.for("react.fragment");function n(o,u,c){var p=null;if(c!==void 0&&(p=""+c),u.key!==void 0&&(p=""+u.key),"key"in u){c={};for(var E in u)E!=="key"&&(c[E]=u[E])}else c=u;return u=c.ref,{$$typeof:l,type:o,key:p,ref:u!==void 0?u:null,props:c}}d.Fragment=C,d.jsx=n,d.jsxs=n},34158(A,d,l){A.exports=l(36492)},97808(A,d,l){l.r(d),l.d(d,{getDatasetAtEvent:()=>M,getElementAtEvent:()=>B,getElementsAtEvent:()=>L});var C=l(34158),n=l(82920),o=l(30467);const u="label";function c(t,e){typeof t=="function"?t(e):t&&(t.current=e)}function p(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 f=t.datasets.find(m=>m[s]===a[s]);return!f||!a.data||h.includes(f)?{...a}:(h.push(f),Object.assign(f,a),f)})}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 L(t,e){return t.getElementsAtEventForMode(e.nativeEvent,"index",{intersect:!0},!1)}function O(t,e){const{height:s=150,width:h=300,redraw:a=!1,datasetIdKey:f,type:m,data:_,options:v,plugins:W=[],fallbackContent:J,updateMode:T,...Y}=t,b=(0,n.useRef)(null),r=(0,n.useRef)(null),g=()=>{b.current&&(r.current=new o.Chart(b.current,{type:m,data:D(_,f),options:v&&{...v},plugins:W}),c(e,r.current))},R=()=>{c(e,null),r.current&&(r.current.destroy(),r.current=null)};return(0,n.useEffect)(()=>{!a&&r.current&&v&&p(r.current,v)},[a,v]),(0,n.useEffect)(()=>{!a&&r.current&&E(r.current.config.data,_.labels)},[a,_.labels]),(0,n.useEffect)(()=>{!a&&r.current&&_.datasets&&j(r.current.config.data,_.datasets,f)},[a,_.datasets]),(0,n.useEffect)(()=>{r.current&&(a?(R(),setTimeout(g)):r.current.update(T))},[a,v,_.labels,_.datasets,T]),(0,n.useEffect)(()=>{r.current&&(R(),setTimeout(g))},[m]),(0,n.useEffect)(()=>(g(),()=>R()),[]),(0,C.jsx)("canvas",{ref:b,role:"img",height:s,width:h,...Y,children:J})}const P=(0,n.forwardRef)(O);function i(t,e){return o.Chart.register(e),(0,n.forwardRef)((s,h)=>(0,C.jsx)(P,{...s,ref:h,type:t}))}const w=i("line",o.LineController),y=i("bar",o.BarController),F=i("radar",o.RadarController),S=i("doughnut",o.DoughnutController),k=i("polarArea",o.PolarAreaController),I=i("bubble",o.BubbleController),x=i("pie",o.PieController),U=i("scatter",o.ScatterController);l.d(d,["Bar",0,y,"Bubble",0,I,"Chart",0,P,"Doughnut",0,S,"Line",0,w,"Pie",0,x,"PolarArea",0,k,"Radar",0,F,"Scatter",0,U])}}]);
