PageSourceSearch

https://starfinancial.ai/assets/admin.seo-cdh7OAax.js

js starfinancial.ai collected 2026-10-05 13:49:00 UTC 534,974 bytes, 63 lines download raw bytes

1import{aH as Cs,b5 as Pe,b6 as Te,bF as Ne,d5 as so,d6 as Ce,r as P,d7 as pe,d8 as C,d9 as Rm,da as Dm,db as ge,aR as we,j as u,aa as vn,aT as Ft,aU as zt,aV as Ut,aW as Wt,aX as De,B as te,U as on,bm as be,aw as Ms,c9 as Is,bY as rn,bW as Sa,bV as Oa,bU as G_,dc as Yr,dd as K_,de as V_,cu as X_,bG as Jh,ap as re,as as It,bI as Qh,bJ as ep,a2 as Po,df as To,$ as Y_,be as Z_,bL as Yt,bK as tp,cK as Zn,am as Tr,bn as J_,H as gn,I as yn,J as bn,K as xn,N as wn,bH as nn,Q as ks,cn as Q_,y as Eo,aO as $w,a0 as No,ai as ej,X as tj,al as Pt,aM as rj,V as nj,z as aj,bq as ij,s as $m,ak as oj}from"./index-DpejfmNx.js";import{W as Ir,A as sj}from"./AdminSidebar-BleJxr8_.js";import{B as Le}from"./badge-BH3iMrln.js";import{S as Lw}from"./search-CPwyNhjm.js";import{T as Rs}from"./triangle-alert-CgdIe6mG.js";import{E as Bw}from"./eye-DL8ooYvs.js";import{P as lj,F as cj}from"./percent-ZVxOSTdZ.js";import{B as qw}from"./brain-BajcUlbg.js";import{C as sn}from"./copy-BchupOWX.js";import{C as Fw}from"./clipboard-check-kENQGFSv.js";import{C as zw}from"./circle-x-CWuqE-0-.js";import{P as Uw}from"./plus-D6nNBzGh.js";import{C as uj}from"./settings-CbVgSh30.js";import{P as fj}from"./pencil-DK3IX-cV.js";import{T as dj}from"./trash-2-BmuxVbqF.js";import"./layout-dashboard-CkbBB7YI.js";import"./clipboard-list-qE1i4RvM.js";import"./log-out-BedyD7BK.js";const hj=[["path",{d:"m7 7 10 10",key:"1fmybs"}],["path",{d:"M17 7v10H7",key:"6fjiku"}]],pj=Cs("arrow-down-right",hj);const mj=[["path",{d:"M7 7h10v10",key:"1tivn9"}],["path",{d:"M7 17 17 7",key:"1vkiza"}]],vj=Cs("arrow-up-right",mj);const gj=[["path",{d:"M14 4.1 12 6",key:"ita8i4"}],["path",{d:"m5.1 8-2.9-.8",key:"1go3kf"}],["path",{d:"m6 12-1.9 2",key:"mnht97"}],["path",{d:"M7.2 2.2 8 5.1",key:"1cfko1"}],["path",{d:"M9.037 9.69a.498.498 0 0 1 .653-.653l11 4.5a.5.5 0 0 1-.074.949l-4.349 1.041a1 1 0 0 0-.74.739l-1.04 4.35a.5.5 0 0 1-.95.074z",key:"s0h3yz"}]],Ww=Cs("mouse-pointer-click",gj);const yj=[["path",{d:"M19.07 4.93A10 10 0 0 0 6.99 3.34",key:"z3du51"}],["path",{d:"M4 6h.01",key:"oypzma"}],["path",{d:"M2.29 9.62A10 10 0 1 0 21.31 8.35",key:"qzzz0"}],["path",{d:"M16.24 7.76A6 6 0 1 0 8.23 16.67",key:"1yjesh"}],["path",{d:"M12 18h.01",key:"mhygvu"}],["path",{d:"M17.99 11.66A6 6 0 0 1 15.77 16.67",key:"1u2y91"}],["circle",{cx:"12",cy:"12",r:"2",key:"1c9p78"}],["path",{d:"m13.41 10.59 5.66-5.66",key:"mhq4k0"}]],bj=Cs("radar",yj),xj=Pe({method:"GET"}).handler(Te("e08cd81957d8cf8e679a2d448fd59d1660bf1daecb21e452d8f9b81b197d1341")),Hw=Pe({method:"POST"}).middleware([Ne]).handler(Te("cf707b56825068df74bfc217577b20743e381da60743b0363028adc31997f922")),wj=Pe({method:"POST"}).middleware([Ne]).handler(Te("704802be5d9f7c15f019565db305e206514d1d1cc0d85faea37c869e44f44c7a")),Sj=Pe({method:"POST"}).middleware([Ne]).handler(Te("f1da3a477e39867702ad99af9570921df77cc20c9de2f5c4aa498e188d0553b7")),Gw=Pe({method:"POST"}).middleware([Ne]).handler(Te("b72e0bd73fbb52f7c0dc13311a502f46e8693f1af03d1a400a3026a4bf4f9204")),Oj=["WebPage","Service","FinancialService","MortgageLender","LocalBusiness","Organization","Article","FAQPage","Person"],Aj=["summary","summary_large_image"],_j=["index, follow","noindex, follow","index, nofollow","noindex, nofollow"];function jj(){return{path:"",label:"",title:"",metaDescription:"",focusKeyword:"",secondaryKeywords:[],canonicalUrl:"",ogTitle:"",ogDescription:"",ogImage:"",twitterCard:"summary_large_image",robots:"index, follow",schemaType:"WebPage",seoScore:null,analysis:null,lastAnalyzedAt:null}}function Lm(e){return!!(e.title&&e.title.length>=20&&e.metaDescription&&e.metaDescription.length>=50&&e.focusKeyword)}function Co(e){return e==null?"text-muted-foreground":e>=80?"text-emerald-600":e>=50?"text-amber-600":"text-red-600"}function rp(e){return e==null?"bg-muted text-muted-foreground":e>=80?"bg-emerald-50 text-emerald-700 border-emerald-200":e>=50?"bg-amber-50 text-amber-700 border-amber-200":"bg-red-50 text-red-700 border-red-200"}const Pj=Pe({method:"POST"}).middleware([Ne]).handler(Te("24e3d65aef5f8618dbb127b8ee7a7240736e4bbdc5361aeb24db586fb6986098"));var _l,Bm;
vendor: 5,688 bytes, line 1
1function mt(){if(Bm)return _l;Bm=1;var e=Array.isArray;return _l=e,_l}var jl,qm;function Kw(){if(qm)return jl;qm=1;var e=typeof so=="object"&&so&&so.Object===Object&&so;return jl=e,jl}var Pl,Fm;function nr(){if(Fm)return Pl;Fm=1;var e=Kw(),t=typeof self=="object"&&self&&self.Object===Object&&self,r=e||t||Function("return this")();return Pl=r,Pl}var Tl,zm;function Bi(){if(zm)return Tl;zm=1;var e=nr(),t=e.Symbol;return Tl=t,Tl}var El,Um;function Tj(){if(Um)return El;Um=1;var e=Bi(),t=Object.prototype,r=t.hasOwnProperty,n=t.toString,a=e?e.toStringTag:void 0;function i(o){var s=r.call(o,a),l=o[a];try{o[a]=void 0;var c=!0}catch{}var f=n.call(o);return c&&(s?o[a]=l:delete o[a]),f}return El=i,El}var Nl,Wm;function Ej(){if(Wm)return Nl;Wm=1;var e=Object.prototype,t=e.toString;function r(n){return t.call(n)}return Nl=r,Nl}var Cl,Hm;function yr(){if(Hm)return Cl;Hm=1;var e=Bi(),t=Tj(),r=Ej(),n="[object Null]",a="[object Undefined]",i=e?e.toStringTag:void 0;function o(s){return s==null?s===void 0?a:n:i&&i in Object(s)?t(s):r(s)}return Cl=o,Cl}var Ml,Gm;function br(){if(Gm)return Ml;Gm=1;function e(t){return t!=null&&typeof t=="object"}return Ml=e,Ml}var Il,Km;function Aa(){if(Km)return Il;Km=1;var e=yr(),t=br(),r="[object Symbol]";function n(a){return typeof a=="symbol"||t(a)&&e(a)==r}return Il=n,Il}var kl,Vm;function np(){if(Vm)return kl;Vm=1;var e=mt(),t=Aa(),r=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,n=/^\w*$/;function a(i,o){if(e(i))return!1;var s=typeof i;return s=="number"||s=="symbol"||s=="boolean"||i==null||t(i)?!0:n.test(i)||!r.test(i)||o!=null&&i in Object(o)}return kl=a,kl}var Rl,Xm;function Rr(){if(Xm)return Rl;Xm=1;function e(t){var r=typeof t;return t!=null&&(r=="object"||r=="function")}return Rl=e,Rl}var Dl,Ym;function ap(){if(Ym)return Dl;Ym=1;var e=yr(),t=Rr(),r="[object AsyncFunction]",n="[object Function]",a="[object GeneratorFunction]",i="[object Proxy]";function o(s){if(!t(s))return!1;var l=e(s);return l==n||l==a||l==r||l==i}return Dl=o,Dl}var $l,Zm;function Nj(){if(Zm)return $l;Zm=1;var e=nr(),t=e["__core-js_shared__"];return $l=t,$l}var Ll,Jm;function Cj(){if(Jm)return Ll;Jm=1;var e=Nj(),t=(function(){var n=/[^.]+$/.exec(e&&e.keys&&e.keys.IE_PROTO||"");return n?"Symbol(src)_1."+n:""})();function r(n){return!!t&&t in n}return Ll=r,Ll}var Bl,Qm;function Vw(){if(Qm)return Bl;Qm=1;var e=Function.prototype,t=e.toString;function r(n){if(n!=null){try{return t.call(n)}catch{}try{return n+""}catch{}}return""}return Bl=r,Bl}var ql,ev;function Mj(){if(ev)return ql;ev=1;var e=ap(),t=Cj(),r=Rr(),n=Vw(),a=/[\\^$.*+?()[\]{}|]/g,i=/^\[object .+?Constructor\]$/,o=Function.prototype,s=Object.prototype,l=o.toString,c=s.hasOwnProperty,f=RegExp("^"+l.call(c).replace(a,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function d(h){if(!r(h)||t(h))return!1;var p=e(h)?f:i;return p.test(n(h))}return ql=d,ql}var Fl,tv;function Ij(){if(tv)return Fl;tv=1;function e(t,r){return t?.[r]}return Fl=e,Fl}var zl,rv;function Sn(){if(rv)return zl;rv=1;var e=Mj(),t=Ij();function r(n,a){var i=t(n,a);return e(i)?i:void 0}return zl=r,zl}var Ul,nv;function Ds(){if(nv)return Ul;nv=1;var e=Sn(),t=e(Object,"create");return Ul=t,Ul}var Wl,av;function kj(){if(av)return Wl;av=1;var e=Ds();function t(){this.__data__=e?e(null):{},this.size=0}return Wl=t,Wl}var Hl,iv;function Rj(){if(iv)return Hl;iv=1;function e(t){var r=this.has(t)&&delete this.__data__[t];return this.size-=r?1:0,r}return Hl=e,Hl}var Gl,ov;function Dj(){if(ov)return Gl;ov=1;var e=Ds(),t="__lodash_hash_undefined__",r=Object.prototype,n=r.hasOwnProperty;function a(i){var o=this.__data__;if(e){var s=o[i];return s===t?void 0:s}return n.call(o,i)?o[i]:void 0}return Gl=a,Gl}var Kl,sv;function $j(){if(sv)return Kl;sv=1;var e=Ds(),t=Object.prototype,r=t.hasOwnProperty;function n(a){var i=this.__data__;return e?i[a]!==void 0:r.call(i,a)}return Kl=n,Kl}var Vl,lv;function Lj(){if(lv)return Vl;lv=1;var e=Ds(),t="__lodash_hash_undefined__";function r(n,a){var i=this.__data__;return this.size+=this.has(n)?0:1,i[n]=e&&a===void 0?t:a,this}return Vl=r,Vl}var Xl,cv;function Bj(){if(cv)return Xl;cv=1;var e=kj(),t=Rj(),r=Dj(),n=$j(),a=Lj();function i(o){var s=-1,l=o==null?0:o.length;for(this.clear();++s<l;){var c=o[s];this.set(c[0],c[1])}}return i.prototype.clear=e,i.prototype.delete=t,i.prototype.get=r,i.prototype.has=n,i.prototype.set=a,Xl=i,Xl}var Yl,uv;function qj(){if(uv)return Yl;uv=1;function e(){this.__data__=[],this.size=0}return Yl=e,Yl}var Zl,fv;function ip(){if(fv)return Zl;fv=1;function e(t,r){return t===r||t!==t&&r!==r}return Zl=e,Zl}var Jl,dv;function $s(){if(dv)return Jl;dv=1;var e=ip();function t(r,n){for(var a=r.length;a--;)if(e(r[a][0],n))return a;return-1}return Jl=t,Jl}var Ql,hv;function Fj(){if(hv)return Ql;hv=1;var e=$s(),t=Array.prototype,r=t.splice;function n(a){var i=this.__data__,o=e(i,a);if(o<0)return!1;var s=i.length-1;return o==s?i.pop():r.call(i,o,1),--this.size,!0}return Ql=n,Ql}var ec,pv;function zj(){if(pv)return ec;pv=1;var e=$s();function t(r){var n=this.__data__,a=e(n,r);return a<0?void 0:n[a][1]}return ec=t,ec}var tc,mv;function Uj(){if(mv)return tc;mv=1;var e=$s();function t(r){return e(this.__data__,r)>-1}return tc=t,tc}var rc,vv;function Wj(){if(vv)return rc;vv=1;var e=$s();function t(r,n){var a=this.__data__,i=e(a,r);return i<0?(++this.size,a.push([r,n])):a[i][1]=n,this}return rc=t,rc}var nc,gv;function Ls(){if(gv)return nc;gv=1;var e=qj(),t=Fj(),r=zj(),n=Uj(),a=Wj();function i(o){var s=-1,l=o==null?0:o.length;for(this.clear();++s<l;){var c=o[s];this.set(c[0],c[1])}}return i.prototype.clear=e,i.prototype.delete=t,i.prototype.get=r,i.prototype.has=n,i.prototype.set=a,nc=i,nc}var ac,yv;
vendor: 9,037 bytes, line 1
1function op(){if(yv)return ac;yv=1;var e=Sn(),t=nr(),r=e(t,"Map");return ac=r,ac}var ic,bv;function Hj(){if(bv)return ic;bv=1;var e=Bj(),t=Ls(),r=op();function n(){this.size=0,this.__data__={hash:new e,map:new(r||t),string:new e}}return ic=n,ic}var oc,xv;function Gj(){if(xv)return oc;xv=1;function e(t){var r=typeof t;return r=="string"||r=="number"||r=="symbol"||r=="boolean"?t!=="__proto__":t===null}return oc=e,oc}var sc,wv;function Bs(){if(wv)return sc;wv=1;var e=Gj();function t(r,n){var a=r.__data__;return e(n)?a[typeof n=="string"?"string":"hash"]:a.map}return sc=t,sc}var lc,Sv;function Kj(){if(Sv)return lc;Sv=1;var e=Bs();function t(r){var n=e(this,r).delete(r);return this.size-=n?1:0,n}return lc=t,lc}var cc,Ov;function Vj(){if(Ov)return cc;Ov=1;var e=Bs();function t(r){return e(this,r).get(r)}return cc=t,cc}var uc,Av;function Xj(){if(Av)return uc;Av=1;var e=Bs();function t(r){return e(this,r).has(r)}return uc=t,uc}var fc,_v;function Yj(){if(_v)return fc;_v=1;var e=Bs();function t(r,n){var a=e(this,r),i=a.size;return a.set(r,n),this.size+=a.size==i?0:1,this}return fc=t,fc}var dc,jv;function sp(){if(jv)return dc;jv=1;var e=Hj(),t=Kj(),r=Vj(),n=Xj(),a=Yj();function i(o){var s=-1,l=o==null?0:o.length;for(this.clear();++s<l;){var c=o[s];this.set(c[0],c[1])}}return i.prototype.clear=e,i.prototype.delete=t,i.prototype.get=r,i.prototype.has=n,i.prototype.set=a,dc=i,dc}var hc,Pv;function Xw(){if(Pv)return hc;Pv=1;var e=sp(),t="Expected a function";function r(n,a){if(typeof n!="function"||a!=null&&typeof a!="function")throw new TypeError(t);var i=function(){var o=arguments,s=a?a.apply(this,o):o[0],l=i.cache;if(l.has(s))return l.get(s);var c=n.apply(this,o);return i.cache=l.set(s,c)||l,c};return i.cache=new(r.Cache||e),i}return r.Cache=e,hc=r,hc}var pc,Tv;function Zj(){if(Tv)return pc;Tv=1;var e=Xw(),t=500;function r(n){var a=e(n,function(o){return i.size===t&&i.clear(),o}),i=a.cache;return a}return pc=r,pc}var mc,Ev;function Jj(){if(Ev)return mc;Ev=1;var e=Zj(),t=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,r=/\\(\\)?/g,n=e(function(a){var i=[];return a.charCodeAt(0)===46&&i.push(""),a.replace(t,function(o,s,l,c){i.push(l?c.replace(r,"$1"):s||o)}),i});return mc=n,mc}var vc,Nv;function lp(){if(Nv)return vc;Nv=1;function e(t,r){for(var n=-1,a=t==null?0:t.length,i=Array(a);++n<a;)i[n]=r(t[n],n,t);return i}return vc=e,vc}var gc,Cv;function Qj(){if(Cv)return gc;Cv=1;var e=Bi(),t=lp(),r=mt(),n=Aa(),a=e?e.prototype:void 0,i=a?a.toString:void 0;function o(s){if(typeof s=="string")return s;if(r(s))return t(s,o)+"";if(n(s))return i?i.call(s):"";var l=s+"";return l=="0"&&1/s==-1/0?"-0":l}return gc=o,gc}var yc,Mv;function Yw(){if(Mv)return yc;Mv=1;var e=Qj();function t(r){return r==null?"":e(r)}return yc=t,yc}var bc,Iv;function Zw(){if(Iv)return bc;Iv=1;var e=mt(),t=np(),r=Jj(),n=Yw();function a(i,o){return e(i)?i:t(i,o)?[i]:r(n(i))}return bc=a,bc}var xc,kv;function qs(){if(kv)return xc;kv=1;var e=Aa();function t(r){if(typeof r=="string"||e(r))return r;var n=r+"";return n=="0"&&1/r==-1/0?"-0":n}return xc=t,xc}var wc,Rv;function cp(){if(Rv)return wc;Rv=1;var e=Zw(),t=qs();function r(n,a){a=e(a,n);for(var i=0,o=a.length;n!=null&&i<o;)n=n[t(a[i++])];return i&&i==o?n:void 0}return wc=r,wc}var Sc,Dv;function Jw(){if(Dv)return Sc;Dv=1;var e=cp();function t(r,n,a){var i=r==null?void 0:e(r,n);return i===void 0?a:i}return Sc=t,Sc}var e1=Jw();const Ct=Ce(e1);var Oc,$v;function t1(){if($v)return Oc;$v=1;function e(t){return t==null}return Oc=e,Oc}var r1=t1();const fe=Ce(r1);var Ac,Lv;function n1(){if(Lv)return Ac;Lv=1;var e=yr(),t=mt(),r=br(),n="[object String]";function a(i){return typeof i=="string"||!t(i)&&r(i)&&e(i)==n}return Ac=a,Ac}var a1=n1();const ln=Ce(a1);var i1=ap();const se=Ce(i1);var o1=Rr();const _a=Ce(o1);var _c={exports:{}},ye={};var Bv;function s1(){if(Bv)return ye;Bv=1;var e=Symbol.for("react.element"),t=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),n=Symbol.for("react.strict_mode"),a=Symbol.for("react.profiler"),i=Symbol.for("react.provider"),o=Symbol.for("react.context"),s=Symbol.for("react.server_context"),l=Symbol.for("react.forward_ref"),c=Symbol.for("react.suspense"),f=Symbol.for("react.suspense_list"),d=Symbol.for("react.memo"),h=Symbol.for("react.lazy"),p=Symbol.for("react.offscreen"),v;v=Symbol.for("react.module.reference");function g(m){if(typeof m=="object"&&m!==null){var y=m.$$typeof;switch(y){case e:switch(m=m.type,m){case r:case a:case n:case c:case f:return m;default:switch(m=m&&m.$$typeof,m){case s:case o:case l:case h:case d:case i:return m;default:return y}}case t:return y}}}return ye.ContextConsumer=o,ye.ContextProvider=i,ye.Element=e,ye.ForwardRef=l,ye.Fragment=r,ye.Lazy=h,ye.Memo=d,ye.Portal=t,ye.Profiler=a,ye.StrictMode=n,ye.Suspense=c,ye.SuspenseList=f,ye.isAsyncMode=function(){return!1},ye.isConcurrentMode=function(){return!1},ye.isContextConsumer=function(m){return g(m)===o},ye.isContextProvider=function(m){return g(m)===i},ye.isElement=function(m){return typeof m=="object"&&m!==null&&m.$$typeof===e},ye.isForwardRef=function(m){return g(m)===l},ye.isFragment=function(m){return g(m)===r},ye.isLazy=function(m){return g(m)===h},ye.isMemo=function(m){return g(m)===d},ye.isPortal=function(m){return g(m)===t},ye.isProfiler=function(m){return g(m)===a},ye.isStrictMode=function(m){return g(m)===n},ye.isSuspense=function(m){return g(m)===c},ye.isSuspenseList=function(m){return g(m)===f},ye.isValidElementType=function(m){return typeof m=="string"||typeof m=="function"||m===r||m===a||m===n||m===c||m===f||m===p||typeof m=="object"&&m!==null&&(m.$$typeof===h||m.$$typeof===d||m.$$typeof===i||m.$$typeof===o||m.$$typeof===l||m.$$typeof===v||m.getModuleId!==void 0)},ye.typeOf=g,ye}var qv;function l1(){return qv||(qv=1,_c.exports=s1()),_c.exports}var c1=l1(),jc,Fv;function Qw(){if(Fv)return jc;Fv=1;var e=yr(),t=br(),r="[object Number]";function n(a){return typeof a=="number"||t(a)&&e(a)==r}return jc=n,jc}var Pc,zv;function u1(){if(zv)return Pc;zv=1;var e=Qw();function t(r){return e(r)&&r!=+r}return Pc=t,Pc}var f1=u1();const ja=Ce(f1);var d1=Qw();const h1=Ce(d1);var qt=function(t){return t===0?0:t>0?1:-1},Zr=function(t){return ln(t)&&t.indexOf("%")===t.length-1},H=function(t){return h1(t)&&!ja(t)},p1=function(t){return fe(t)},He=function(t){return H(t)||ln(t)},m1=0,Pa=function(t){var r=++m1;return"".concat(t||"").concat(r)},cn=function(t,r){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;if(!H(t)&&!ln(t))return n;var i;if(Zr(t)){var o=t.indexOf("%");i=r*parseFloat(t.slice(0,o))/100}else i=+t;return ja(i)&&(i=n),a&&i>r&&(i=r),i},Pr=function(t){if(!t)return null;var r=Object.keys(t);return r&&r.length?t[r[0]]:null},v1=function(t){if(!Array.isArray(t))return!1;for(var r=t.length,n={},a=0;a<r;a++)if(!n[t[a]])n[t[a]]=!0;else return!0;return!1},Qe=function(t,r){return H(t)&&H(r)?function(n){return t+n*(r-t)}:function(){return r}};function Mo(e,t,r){return!e||!e.length?null:e.find(function(n){return n&&(typeof t=="function"?t(n):Ct(n,t))===r})}var g1=function(t,r){return H(t)&&H(r)?t-r:ln(t)&&ln(r)?t.localeCompare(r):t instanceof Date&&r instanceof Date?t.getTime()-r.getTime():String(t).localeCompare(String(r))};function Gn(e,t){for(var r in e)if({}.hasOwnProperty.call(e,r)&&(!{}.hasOwnProperty.call(t,r)||e[r]!==t[r]))return!1;for(var n in t)if({}.hasOwnProperty.call(t,n)&&!{}.hasOwnProperty.call(e,n))return!1;return!0}function Ed(e){"@babel/helpers - typeof";return Ed=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ed(e)}var y1=["viewBox","children"],b1=["aria-activedescendant","aria-atomic","aria-autocomplete","aria-busy","aria-checked","aria-colcount","aria-colindex","aria-colspan","aria-controls","aria-current","aria-describedby","aria-details","aria-disabled","aria-errormessage","aria-expanded","aria-flowto","aria-haspopup","aria-hidden","aria-invalid","aria-keyshortcuts","aria-label","aria-labelledby","aria-level","aria-live","aria-modal","aria-multiline","aria-multiselectable","aria-orientation","aria-owns","aria-placeholder","aria-posinset","aria-pressed","aria-readonly","aria-relevant","aria-required","aria-roledescription","aria-rowcount","aria-rowindex","aria-rowspan","aria-selected","aria-setsize","aria-sort","aria-valuemax","aria-valuemin","aria-valuenow","aria-valuetext","className","color","height","id","lang","max","media","method","min","name","style","target","width","role","tabIndex","accentHeight","accumulate","additive","alignmentBaseline","allowReorder","alphabetic","amplitude","arabicForm","ascent","attributeName","attributeType","autoReverse","azimuth","baseFrequency","baselineShift","baseProfile","bbox","begin","bias","by","calcMode","capHeight","clip","clipPath","clipPathUnits","clipRule","colorInterpolation","colorInterpolationFilters","colorProfile","colorRen
1dering","contentScriptType","contentStyleType","cursor","cx","cy","d","decelerate","descent","diffuseConstant","direction","display","divisor","dominantBaseline","dur","dx","dy","edgeMode","elevation","enableBackground","end","exponent","externalResourcesRequired","fill","fillOpacity","fillRule","filter","filterRes","filterUnits","floodColor","floodOpacity","focusable","fontFamily","fontSize","fontSizeAdjust","fontStretch","fontStyle","fontVariant","fontWeight","format","from","fx","fy","g1","g2","glyphName","glyphOrientationHorizontal","glyphOrientationVertical","glyphRef","gradientTransform","gradientUnits","hanging","horizAdvX","horizOriginX","href","ideographic","imageRendering","in2","in","intercept","k1","k2","k3","k4","k","kernelMatrix","kernelUnitLength","kerning","keyPoints","keySplines","keyTimes","lengthAdjust","letterSpacing","lightingColor","limitingConeAngle","local","markerEnd","markerHeight","markerMid","markerStart","markerUnits","markerWidth","mask","maskContentUnits","maskUnits","mathematical","mode","numOctaves","offset","opacity","operator","order","orient","orientation","origin","overflow","overlinePosition","overlineThickness","paintOrder","panose1","pathLength","patternContentUnits","patternTransform","patternUnits","pointerEvents","pointsAtX","pointsAtY","pointsAtZ","preserveAlpha","preserveAspectRatio","primitiveUnits","r","radius","refX","refY","renderingIntent","repeatCount","repeatDur","requiredExtensions","requiredFeatures","restart","result","rotate","rx","ry","seed","shapeRendering","slope","spacing","specularConstant","specularExponent","speed","spreadMethod","startOffset","stdDeviation","stemh","stemv","stitchTiles","stopColor","stopOpacity","strikethroughPosition","strikethroughThickness","string","stroke","strokeDasharray","strokeDashoffset","strokeLinecap","strokeLinejoin","strokeMiterlimit","strokeOpacity","strokeWidth","surfaceScale","systemLanguage","tableValues","targetX","targetY","textAnchor","textDecoration","textLength","textRendering","to","transform","u1","u2","underlinePosition","underlineThickness","unicode","unicodeBidi","unicodeRange","unitsPerEm","vAlphabetic","values","vectorEffect","version","vertAdvY","vertOriginX","vertOriginY","vHanging","vIdeographic","viewTarget","visibility","vMathematical","widths","wordSpacing","writingMode","x1","x2","x","xChannelSelector","xHeight","xlinkActuate","xlinkArcrole","xlinkHref","xlinkRole","xlinkShow","xlinkTitle","xlinkType","xmlBase","xmlLang","xmlns","xmlnsXlink","xmlSpace","y1","y2","y","yChannelSelector","z","zoomAndPan","ref","key","angle"],Uv=["points","pathLength"],Tc={svg:y1,polygon:Uv,polyline:Uv},up=["dangerouslySetInnerHTML","onCopy","onCopyCapture","onCut","onCutCapture","onPaste","onPasteCapture","onCompositionEnd","onCompositionEndCapture","onCompositionStart","onCompositionStartCapture","onCompositionUpdate","onCompositionUpdateCapture","onFocus","onFocusCapture","onBlur","onBlurCapture","onChange","onChangeCapture","onBeforeInput","onBeforeInputCapture","onInput","onInputCapture","onReset","onResetCapture","onSubmit","onSubmitCapture","onInvalid","onInvalidCapture","onLoad","onLoadCapture","onError","onErrorCapture","onKeyDown","onKeyDownCapture","onKeyPress","onKeyPressCapture","onKeyUp","onKeyUpCapture","onAbort","onAbortCapture","onCanPlay","onCanPlayCapture","onCanPlayThrough","onCanPlayThroughCapture","onDurationChange","onDurationChangeCapture","onEmptied","onEmptiedCapture","onEncrypted","onEncryptedCapture","onEnded","onEndedCapture","onLoadedData","onLoadedDataCapture","onLoadedMetadata","onLoadedMetadataCapture","onLoadStart","onLoadStartCapture","onPause","onPauseCapture","onPlay","onPlayCapture","onPlaying","onPlayingCapture","onProgress","onProgressCapture","onRateChange","onRateChangeCapture","onSeeked","onSeekedCapture","onSeeking","onSeekingCapture","onStalled","onStalledCapture","onSuspend","onSuspendCapture","onTimeUpdate","onTimeUpdateCapture","onVolumeChange","onVolumeChangeCapture","onWaiting","onWaitingCapture","onAuxClick","onAuxClickCapture","onClick","onClickCapture","onContextMenu","onContextMenuCapture","onDoubleClick","onDoubleClickCapture","onDrag","onDrag
1Capture","onDragEnd","onDragEndCapture","onDragEnter","onDragEnterCapture","onDragExit","onDragExitCapture","onDragLeave","onDragLeaveCapture","onDragOver","onDragOverCapture","onDragStart","onDragStartCapture","onDrop","onDropCapture","onMouseDown","onMouseDownCapture","onMouseEnter","onMouseLeave","onMouseMove","onMouseMoveCapture","onMouseOut","onMouseOutCapture","onMouseOver","onMouseOverCapture","onMouseUp","onMouseUpCapture","onSelect","onSelectCapture","onTouchCancel","onTouchCancelCapture","onTouchEnd","onTouchEndCapture","onTouchMove","onTouchMoveCapture","onTouchStart","onTouchStartCapture","onPointerDown","onPointerDownCapture","onPointerMove","onPointerMoveCapture","onPointerUp","onPointerUpCapture","onPointerCancel","onPointerCancelCapture","onPointerEnter","onPointerEnterCapture","onPointerLeave","onPointerLeaveCapture","onPointerOver","onPointerOverCapture","onPointerOut","onPointerOutCapture","onGotPointerCapture","onGotPointerCaptureCapture","onLostPointerCapture","onLostPointerCaptureCapture","onScroll","onScrollCapture","onWheel","onWheelCapture","onAnimationStart","onAnimationStartCapture","onAnimationEnd","onAnimationEndCapture","onAnimationIteration","onAnimationIterationCapture","onTransitionEnd","onTransitionEndCapture"],Io=function(t,r){if(!t||typeof t=="function"||typeof t=="boolean")return null;var n=t;if(P.isValidElement(t)&&(n=t.props),!_a(n))return null;var a={};return Object.keys(n).forEach(function(i){up.includes(i)&&(a[i]=r||function(o){return n[i](n,o)})}),a},x1=function(t,r,n){return function(a){return t(r,n,a),null}},ko=function(t,r,n){if(!_a(t)||Ed(t)!=="object")return null;var a=null;return Object.keys(t).forEach(function(i){var o=t[i];up.includes(i)&&typeof o=="function"&&(a||(a={}),a[i]=x1(o,r,n))}),a},w1=["children"],S1=["children"];function Wv(e,t){if(e==null)return{};var r=O1(e,t),n,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)n=i[a],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function O1(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function Nd(e){"@babel/helpers - typeof";return Nd=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Nd(e)}var Hv={click:"onClick",mousedown:"onMouseDown",mouseup:"onMouseUp",mouseover:"onMouseOver",mousemove:"onMouseMove",mouseout:"onMouseOut",mouseenter:"onMouseEnter",mouseleave:"onMouseLeave",touchcancel:"onTouchCancel",touchend:"onTouchEnd",touchmove:"onTouchMove",touchstart:"onTouchStart",contextmenu:"onContextMenu",dblclick:"onDoubleClick"},fr=function(t){return typeof t=="string"?t:t?t.displayName||t.name||"Component":""},Gv=null,Ec=null,fp=function e(t){if(t===Gv&&Array.isArray(Ec))return Ec;var r=[];return P.Children.forEach(t,function(n){fe(n)||(c1.isFragment(n)?r=r.concat(e(n.props.children)):r.push(n))}),Ec=r,Gv=t,r};function Mt(e,t){var r=[],n=[];return Array.isArray(t)?n=t.map(function(a){return fr(a)}):n=[fr(t)],fp(e).forEach(function(a){var i=Ct(a,"type.displayName")||Ct(a,"type.name");n.indexOf(i)!==-1&&r.push(a)}),r}function xt(e,t){var r=Mt(e,t);return r&&r[0]}var Kv=function(t){if(!t||!t.props)return!1;var r=t.props,n=r.width,a=r.height;return!(!H(n)||n<=0||!H(a)||a<=0)},A1=["a","altGlyph","altGlyphDef","altGlyphItem","animate","animateColor","animateMotion","animateTransform","circle","clipPath","color-profile","cursor","defs","desc","ellipse","feBlend","feColormatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","filter","font","font-face","font-face-format","font-face-name","font-face-url","foreignObject","g","glyph","glyphRef","hkern","image","line","lineGradient","marker","mask","metadata","missing-glyph","mpath","path","pattern","polygon","polyline","radialGradient","rect","script","set","stop","style","svg","switch","symbol","text","textPath","title","tref","tspan","use","view","vkern"],_1=function(t){return t&&t.type&&ln(t.type)&&A1.indexOf(t.type)>=0},eS=function(t){return t&&Nd(t)==="object"&&"clipDot"in t},j1=function(t,r,n,a){var i,o=(i=Tc?.[a])!==null&&i!==void 0?i:[];return r.startsWith("data-")||!se(t)&&(a&&o.includes(r)||b1.includes(r))||n&&up.includes(r)},ce=function(t,r,n){if(!t||typeof t=="function"||typeof t=="boolean")return null;var a=t;if(P.isValidElement(t)&&(a=t.props),!_a(a))return null;var i={};
1return Object.keys(a).forEach(function(o){var s;j1((s=a)===null||s===void 0?void 0:s[o],o,r,n)&&(i[o]=a[o])}),i},Cd=function e(t,r){if(t===r)return!0;var n=P.Children.count(t);if(n!==P.Children.count(r))return!1;if(n===0)return!0;if(n===1)return Vv(Array.isArray(t)?t[0]:t,Array.isArray(r)?r[0]:r);for(var a=0;a<n;a++){var i=t[a],o=r[a];if(Array.isArray(i)||Array.isArray(o)){if(!e(i,o))return!1}else if(!Vv(i,o))return!1}return!0},Vv=function(t,r){if(fe(t)&&fe(r))return!0;if(!fe(t)&&!fe(r)){var n=t.props||{},a=n.children,i=Wv(n,w1),o=r.props||{},s=o.children,l=Wv(o,S1);return a&&s?Gn(i,l)&&Cd(a,s):!a&&!s?Gn(i,l):!1}return!1},Xv=function(t,r){var n=[],a={};return fp(t).forEach(function(i,o){if(_1(i))n.push(i);else if(i){var s=fr(i.type),l=r[s]||{},c=l.handler,f=l.once;if(c&&(!f||!a[s])){var d=c(i,s,o);n.push(d),a[s]=!0}}}),n},P1=function(t){var r=t&&t.type;return r&&Hv[r]?Hv[r]:null},T1=function(t,r){return fp(r).indexOf(t)},E1=["children","width","height","viewBox","className","style","title","desc"];function Md(){return Md=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Md.apply(this,arguments)}function N1(e,t){if(e==null)return{};var r=C1(e,t),n,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)n=i[a],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function C1(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function Id(e){var t=e.children,r=e.width,n=e.height,a=e.viewBox,i=e.className,o=e.style,s=e.title,l=e.desc,c=N1(e,E1),f=a||{width:r,height:n,x:0,y:0},d=pe("recharts-surface",i);return C.createElement("svg",Md({},ce(c,!0,"svg"),{className:d,width:r,height:n,style:o,viewBox:"".concat(f.x," ").concat(f.y," ").concat(f.width," ").concat(f.height)}),C.createElement("title",null,s),C.createElement("desc",null,l),t)}var M1=["children","className"];function kd(){return kd=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},kd.apply(this,arguments)}function I1(e,t){if(e==null)return{};var r=k1(e,t),n,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)n=i[a],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function k1(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}var je=C.forwardRef(function(e,t){var r=e.children,n=e.className,a=I1(e,M1),i=pe("recharts-layer",n);return C.createElement("g",kd({className:i},ce(a,!0),{ref:t}),r)}),dr=function(t,r){for(var n=arguments.length,a=new Array(n>2?n-2:0),i=2;i<n;i++)a[i-2]=arguments[i]},Nc,Yv;function R1(){if(Yv)return Nc;Yv=1;function e(t,r,n){var a=-1,i=t.length;r<0&&(r=-r>i?0:i+r),n=n>i?i:n,n<0&&(n+=i),i=r>n?0:n-r>>>0,r>>>=0;for(var o=Array(i);++a<i;)o[a]=t[a+r];return o}return Nc=e,Nc}var Cc,Zv;function D1(){if(Zv)return Cc;Zv=1;var e=R1();function t(r,n,a){var i=r.length;return a=a===void 0?i:a,!n&&a>=i?r:e(r,n,a)}return Cc=t,Cc}var Mc,Jv;function tS(){if(Jv)return Mc;Jv=1;var e="\\ud800-\\udfff",t="\\u0300-\\u036f",r="\\ufe20-\\ufe2f",n="\\u20d0-\\u20ff",a=t+r+n,i="\\ufe0e\\ufe0f",o="\\u200d",s=RegExp("["+o+e+a+i+"]");function l(c){return s.test(c)}return Mc=l,Mc}var Ic,Qv;function $1(){if(Qv)return Ic;Qv=1;function e(t){return t.split("")}return Ic=e,Ic}var kc,eg;function L1(){if(eg)return kc;eg=1;var e="\\ud800-\\udfff",t="\\u0300-\\u036f",r="\\ufe20-\\ufe2f",n="\\u20d0-\\u20ff",a=t+r+n,i="\\ufe0e\\ufe0f",o="["+e+"]",s="["+a+"]",l="\\ud83c[\\udffb-\\udfff]",c="(?:"+s+"|"+l+")",f="[^"+e+"]",d="(?:\\ud83c[\\udde6-\\uddff]){2}",h="[\\ud800-\\udbff][\\udc00-\\udfff]",p="\\u200d",v=c+"?",g="["+i+"]?",m="(?:"+p+"(?:"+[f,d,h].join("|")+")"+g+v+")*",y=g+v+m,w="(?:"+[f+s+"?",s,d,h,o].join("|")+")",S=RegExp(l+"(?="+l+")|"+w+y,"g");function O(b){return b.match(S)||[]}return kc=O,kc}var Rc,tg;function B1(){if(tg)return Rc;tg=1;var e=$1(),t=tS(),r=L1();function n(a){return t(a)?r(a):e(a)}return Rc=n,Rc}var Dc,rg;function q1(){if(rg)return Dc;rg=1;var e=D1(),t=tS(),r=B1(),n=Yw();function a(i){return function(o){o=n(o);var s=t(o)?r(o):void 0,l=s?s[0]:o.charAt(0),c=s?e(s,1).join(""):o.slice(1);return l[i]()+c}}return Dc=a,Dc}var $c,ng;function F1(){if(ng)return $c;ng=1;var e=q1(),t=e("toUpperCase");return $c=t,$c}var z1=F1();const Fs=Ce(z1);function _e(e){return function(){return e}}const rS=Math.cos,Ro=Math.sin,Ht=Math.sqrt,Do=Math.PI,zs=2*Do,Rd=Math.PI,Dd=2*Rd,Kr=1e-6,U1=Dd-Kr;function nS(e){this._+=e[0];for(let t=1,r=e.length;t<r;++t)this._+=arguments[t]+e[t]}function W1(e){let t=Math.floor(e);if(!(t>=0))throw new Error(`invalid digits: ${e}`);if(t>15)return nS;const r=10**t;return function(n){this._+=n[0];for(let a=1,i=n.length;a<i;++a)this._+=Math.round(arguments[a]*r)/r+n[a]}}class H1{constructor(t){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=t==null?nS:W1(t)}moveTo(t,r){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+r}`}closePath(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._append`Z`)}lineTo(t,r){this._append`L${this._x1=+t},${this._y1=+r}`}quadraticCurveTo(t,r,n,a){this._append`Q${+t},${+r},${this._x1=+n},${this._y1=+a}`}bezierCurveTo(t,r,n,a,i,o){this._append`C${+t},${+r},${+n}
1,${+a},${this._x1=+i},${this._y1=+o}`}arcTo(t,r,n,a,i){if(t=+t,r=+r,n=+n,a=+a,i=+i,i<0)throw new Error(`negative radius: ${i}`);let o=this._x1,s=this._y1,l=n-t,c=a-r,f=o-t,d=s-r,h=f*f+d*d;if(this._x1===null)this._append`M${this._x1=t},${this._y1=r}`;else if(h>Kr)if(!(Math.abs(d*l-c*f)>Kr)||!i)this._append`L${this._x1=t},${this._y1=r}`;else{let p=n-o,v=a-s,g=l*l+c*c,m=p*p+v*v,y=Math.sqrt(g),w=Math.sqrt(h),S=i*Math.tan((Rd-Math.acos((g+h-m)/(2*y*w)))/2),O=S/w,b=S/y;Math.abs(O-1)>Kr&&this._append`L${t+O*f},${r+O*d}`,this._append`A${i},${i},0,0,${+(d*p>f*v)},${this._x1=t+b*l},${this._y1=r+b*c}`}}arc(t,r,n,a,i,o){if(t=+t,r=+r,n=+n,o=!!o,n<0)throw new Error(`negative radius: ${n}`);let s=n*Math.cos(a),l=n*Math.sin(a),c=t+s,f=r+l,d=1^o,h=o?a-i:i-a;this._x1===null?this._append`M${c},${f}`:(Math.abs(this._x1-c)>Kr||Math.abs(this._y1-f)>Kr)&&this._append`L${c},${f}`,n&&(h<0&&(h=h%Dd+Dd),h>U1?this._append`A${n},${n},0,1,${d},${t-s},${r-l}A${n},${n},0,1,${d},${this._x1=c},${this._y1=f}`:h>Kr&&this._append`A${n},${n},0,${+(h>=Rd)},${d},${this._x1=t+n*Math.cos(i)},${this._y1=r+n*Math.sin(i)}`)}rect(t,r,n,a){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+r}h${n=+n}v${+a}h${-n}Z`}toString(){return this._}}function dp(e){let t=3;return e.digits=function(r){if(!arguments.length)return t;if(r==null)t=null;else{const n=Math.floor(r);if(!(n>=0))throw new RangeError(`invalid digits: ${r}`);t=n}return e},()=>new H1(t)}function hp(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function aS(e){this._context=e}aS.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:this._context.lineTo(e,t);break}}};function Us(e){return new aS(e)}function iS(e){return e[0]}function oS(e){return e[1]}function sS(e,t){var r=_e(!0),n=null,a=Us,i=null,o=dp(s);e=typeof e=="function"?e:e===void 0?iS:_e(e),t=typeof t=="function"?t:t===void 0?oS:_e(t);function s(l){var c,f=(l=hp(l)).length,d,h=!1,p;for(n==null&&(i=a(p=o())),c=0;c<=f;++c)!(c<f&&r(d=l[c],c,l))===h&&((h=!h)?i.lineStart():i.lineEnd()),h&&i.point(+e(d,c,l),+t(d,c,l));if(p)return i=null,p+""||null}return s.x=function(l){return arguments.length?(e=typeof l=="function"?l:_e(+l),s):e},s.y=function(l){return arguments.length?(t=typeof l=="function"?l:_e(+l),s):t},s.defined=function(l){return arguments.length?(r=typeof l=="function"?l:_e(!!l),s):r},s.curve=function(l){return arguments.length?(a=l,n!=null&&(i=a(n)),s):a},s.context=function(l){return arguments.length?(l==null?n=i=null:i=a(n=l),s):n},s}function lo(e,t,r){var n=null,a=_e(!0),i=null,o=Us,s=null,l=dp(c);e=typeof e=="function"?e:e===void 0?iS:_e(+e),t=typeof t=="function"?t:_e(t===void 0?0:+t),r=typeof r=="function"?r:r===void 0?oS:_e(+r);function c(d){var h,p,v,g=(d=hp(d)).length,m,y=!1,w,S=new Array(g),O=new Array(g);for(i==null&&(s=o(w=l())),h=0;h<=g;++h){if(!(h<g&&a(m=d[h],h,d))===y)if(y=!y)p=h,s.areaStart(),s.lineStart();else{for(s.lineEnd(),s.lineStart(),v=h-1;v>=p;--v)s.point(S[v],O[v]);s.lineEnd(),s.areaEnd()}y&&(S[h]=+e(m,h,d),O[h]=+t(m,h,d),s.point(n?+n(m,h,d):S[h],r?+r(m,h,d):O[h]))}if(w)return s=null,w+""||null}function f(){return sS().defined(a).curve(o).context(i)}return c.x=function(d){return arguments.length?(e=typeof d=="function"?d:_e(+d),n=null,c):e},c.x0=function(d){return arguments.length?(e=typeof d=="function"?d:_e(+d),c):e},c.x1=function(d){return arguments.length?(n=d==null?null:typeof d=="function"?d:_e(+d),c):n},c.y=function(d){return arguments.length?(t=typeof d=="function"?d:_e(+d),r=null,c):t},c.y0=function(d){return arguments.length?(t=typeof d=="function"?d:_e(+d),c):t},c.y1=function(d){return arguments.length?(r=d==null?null:typeof d=="function"?d:_e(+d),c):r},c.lineX0=c.lineY0=function(){return f().x(e).y(t)},c.lineY1=function(){return f().x(e).y(r)},c.lineX1=function(){return f().x(n).y(t)},c.defined=function(d){return arguments.length?(a=typeof d=="function"?d:_e(!!d),c):a},c.curve=function(d){return arguments.length?(o=d,i!=null&&(s=o(i)),c):o},c.context=function(d){return arguments.length?(d==null?i=s=null:s=o(i=d),c):i},c}class lS{constructor(t,r){this._context=t,this._x=r}areaStart(){this._line=0}areaEnd(){this._line=NaN}lineStart(){this._point=0}lineEnd(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line}point(t,r){switch(t=+t,r=+r,this._point){case 0:{this._point=1,this._line?this._context.lineTo(t,r):this._context.moveTo(t,r);break}case 1:this._point=2;default:{this._x?this._context.bezierCurveTo(this._x0=(this._x0+t)/2,this._y0,this._x0,r,t,r):this._context.bezierCurveTo(this._x0,this._y0=(this._y0+r)/2,t,this._y0,t,r);break}}this._x0=t,this._y0=r}}function G1(e){return new lS(e,!0)}function K1(e){return new lS(e,!1)}const pp={draw(e,t){const r=Ht(t/Do);e.moveTo(r,0),e.arc(0,0,r,0,zs)}},V1={draw(e,t){const r=Ht(t/5)/2;e.moveTo(-3*r,-r),e.lineTo(-r,-r),e.lineTo(-r,-3*r),e.lineTo(r,-3*r),e.lineTo(r,-r),e.lineTo(3*r,-r),e.lineTo(3*r,r),e.lineTo(r,r),e.lineTo(r,3*r),e.lineTo(-r,3*r),e.lineTo(-r,r),e.lineTo(-3*r,r),e.closePath()}},cS=Ht(1/3),X1=cS*2,Y1={draw(e,t){const r=Ht(t/X1),n=r*cS;e.moveTo(0,-r),e.lineTo(n,0),e.lineTo(0,r),e.lineTo(-n,0),e.closePath()}},Z1={draw(e,t){const r=Ht(t),n=-r/2;e.rect(n,n,r,r)}},J1=.8908130915292852,uS=Ro(Do/10)/Ro(7*Do/10),Q1=Ro(zs/10)*uS,eP=-rS(zs/10)*uS,tP
1={draw(e,t){const r=Ht(t*J1),n=Q1*r,a=eP*r;e.moveTo(0,-r),e.lineTo(n,a);for(let i=1;i<5;++i){const o=zs*i/5,s=rS(o),l=Ro(o);e.lineTo(l*r,-s*r),e.lineTo(s*n-l*a,l*n+s*a)}e.closePath()}},Lc=Ht(3),rP={draw(e,t){const r=-Ht(t/(Lc*3));e.moveTo(0,r*2),e.lineTo(-Lc*r,-r),e.lineTo(Lc*r,-r),e.closePath()}},Ot=-.5,At=Ht(3)/2,$d=1/Ht(12),nP=($d/2+1)*3,aP={draw(e,t){const r=Ht(t/nP),n=r/2,a=r*$d,i=n,o=r*$d+r,s=-i,l=o;e.moveTo(n,a),e.lineTo(i,o),e.lineTo(s,l),e.lineTo(Ot*n-At*a,At*n+Ot*a),e.lineTo(Ot*i-At*o,At*i+Ot*o),e.lineTo(Ot*s-At*l,At*s+Ot*l),e.lineTo(Ot*n+At*a,Ot*a-At*n),e.lineTo(Ot*i+At*o,Ot*o-At*i),e.lineTo(Ot*s+At*l,Ot*l-At*s),e.closePath()}};function iP(e,t){let r=null,n=dp(a);e=typeof e=="function"?e:_e(e||pp),t=typeof t=="function"?t:_e(t===void 0?64:+t);function a(){let i;if(r||(r=i=n()),e.apply(this,arguments).draw(r,+t.apply(this,arguments)),i)return r=null,i+""||null}return a.type=function(i){return arguments.length?(e=typeof i=="function"?i:_e(i),a):e},a.size=function(i){return arguments.length?(t=typeof i=="function"?i:_e(+i),a):t},a.context=function(i){return arguments.length?(r=i??null,a):r},a}function $o(){}function Lo(e,t,r){e._context.bezierCurveTo((2*e._x0+e._x1)/3,(2*e._y0+e._y1)/3,(e._x0+2*e._x1)/3,(e._y0+2*e._y1)/3,(e._x0+4*e._x1+t)/6,(e._y0+4*e._y1+r)/6)}function fS(e){this._context=e}fS.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){switch(this._point){case 3:Lo(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:Lo(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function oP(e){return new fS(e)}function dS(e){this._context=e}dS.prototype={areaStart:$o,areaEnd:$o,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._y0=this._y1=this._y2=this._y3=this._y4=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x2,this._y2),this._context.closePath();break}case 2:{this._context.moveTo((this._x2+2*this._x3)/3,(this._y2+2*this._y3)/3),this._context.lineTo((this._x3+2*this._x2)/3,(this._y3+2*this._y2)/3),this._context.closePath();break}case 3:{this.point(this._x2,this._y2),this.point(this._x3,this._y3),this.point(this._x4,this._y4);break}}},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._x2=e,this._y2=t;break;case 1:this._point=2,this._x3=e,this._y3=t;break;case 2:this._point=3,this._x4=e,this._y4=t,this._context.moveTo((this._x0+4*this._x1+e)/6,(this._y0+4*this._y1+t)/6);break;default:Lo(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function sP(e){return new dS(e)}function hS(e){this._context=e}hS.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var r=(this._x0+4*this._x1+e)/6,n=(this._y0+4*this._y1+t)/6;this._line?this._context.lineTo(r,n):this._context.moveTo(r,n);break;case 3:this._point=4;default:Lo(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function lP(e){return new hS(e)}function pS(e){this._context=e}pS.prototype={areaStart:$o,areaEnd:$o,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(e,t){e=+e,t=+t,this._point?this._context.lineTo(e,t):(this._point=1,this._context.moveTo(e,t))}};function cP(e){return new pS(e)}function ag(e){return e<0?-1:1}function ig(e,t,r){var n=e._x1-e._x0,a=t-e._x1,i=(e._y1-e._y0)/(n||a<0&&-0),o=(r-e._y1)/(a||n<0&&-0),s=(i*a+o*n)/(n+a);return(ag(i)+ag(o))*Math.min(Math.abs(i),Math.abs(o),.5*Math.abs(s))||0}function og(e,t){var r=e._x1-e._x0;return r?(3*(e._y1-e._y0)/r-t)/2:t}function Bc(e,t,r){var n=e._x0,a=e._y0,i=e._x1,o=e._y1,s=(i-n)/3;e._context.bezierCurveTo(n+s,a+s*t,i-s,o-s*r,i,o)}function Bo(e){this._context=e}Bo.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=this._t0=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x1,this._y1);break;case 3:Bc(this,this._t0,og(this,this._t0));break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){var r=NaN;if(e=+e,t=+t,!(e===this._x1&&t===this._y1)){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,Bc(this,og(this,r=ig(this,e,t)),r);break;default:Bc(this,this._t0,r=ig(this,e,t));break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t,this._t0=r}}};function mS(e){this._context=new vS(e)}(mS.prototype=Object.create(Bo.prototype)).point=function(e,t){Bo.prototype.point.call(this,t,e)};function vS(e){this._context=e}vS.prototype={moveTo:function(e,t){this._context.moveTo(t,e)},closePath:function(){this._context.closePath()},lineTo:function(e,t){this._context.lineTo(t,e)},bezierCurveTo:function(e,t,r,n,a,i){this._context.bezierCurveTo(t,e,n,r,i,a)}};function uP(e){return new Bo(e)}function fP(e){return new mS(e)}function gS(e){this._context=e}gS.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var e=this._x,t=this._y,r=e.length;if(r)if(this._line?this._context.lineTo(e[0],t[0]):this._context.moveTo(e[0],t[0]),r===2)this._context.lineTo(e[1],t[1]);else for(var n=sg(e),a=sg(t),i=0,o=1;o<r;++i,++o)this._context.bezierCurveTo(n[0][i],a[0][i],n[1][i],a[1][i],e[o],t[o]);(this._line||this._line!==0&&r===1)&&this._context.closePath(),this._line=1-this._line,this._x=this._y=null},point:function(e,t){this._x.push(+e),this._y.push(+t)}};function sg(e){var t,r=e.length-1,n,a=new Array(r),i=new Array(r),o=new Array(r);for(a[0]=0,i[0]=2,o[0]=e[0]+2*e[1],t=1;t<r-1;++t)a[t]=1,i[t]=4,o[t]=4*e[t]+2*e[t+1];for(a[r-1]=2,i[r-1]=7,o[r-1]=8*e[r-1]+e[r],t=1;t<r;++t)n=a[t]/i[t-1],i[t]-=n,o[t]-=n*o[t-1];for(a[r-1]=o[r-1]/i[r-1],t=r-2;t>=0;--t)a[t]=(o[t]-a[t+1])/i[t];for(i[r-1]=(e[r]+a[r-1])/2,t=0;t<r-1;++t)i[t]=2*e[t+1]-a[t+1];return[a,i]}function dP(e){return new gS(e)}function Ws(e,t){this._context=e,this._t=t}Ws.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=this._y=NaN,this._point=0},lineEnd:function(){0<this._t&&this._t<1&&this._point===2&&this._context.lineTo(this._x,this._y),(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line>=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;
vendor: 16,276 bytes, lines 1-4
1default:{if(this._t<=0)this._context.lineTo(this._x,t),this._context.lineTo(e,t);else{var r=this._x*(1-this._t)+e*this._t;this._context.lineTo(r,this._y),this._context.lineTo(r,t)}break}}this._x=e,this._y=t}};function hP(e){return new Ws(e,.5)}function pP(e){return new Ws(e,0)}function mP(e){return new Ws(e,1)}function Jn(e,t){if((o=e.length)>1)for(var r=1,n,a,i=e[t[0]],o,s=i.length;r<o;++r)for(a=i,i=e[t[r]],n=0;n<s;++n)i[n][1]+=i[n][0]=isNaN(a[n][1])?a[n][0]:a[n][1]}function Ld(e){for(var t=e.length,r=new Array(t);--t>=0;)r[t]=t;return r}function vP(e,t){return e[t]}function gP(e){const t=[];return t.key=e,t}function yP(){var e=_e([]),t=Ld,r=Jn,n=vP;function a(i){var o=Array.from(e.apply(this,arguments),gP),s,l=o.length,c=-1,f;for(const d of i)for(s=0,++c;s<l;++s)(o[s][c]=[0,+n(d,o[s].key,c,i)]).data=d;for(s=0,f=hp(t(o));s<l;++s)o[f[s]].index=s;return r(o,f),o}return a.keys=function(i){return arguments.length?(e=typeof i=="function"?i:_e(Array.from(i)),a):e},a.value=function(i){return arguments.length?(n=typeof i=="function"?i:_e(+i),a):n},a.order=function(i){return arguments.length?(t=i==null?Ld:typeof i=="function"?i:_e(Array.from(i)),a):t},a.offset=function(i){return arguments.length?(r=i??Jn,a):r},a}function bP(e,t){if((n=e.length)>0){for(var r,n,a=0,i=e[0].length,o;a<i;++a){for(o=r=0;r<n;++r)o+=e[r][a][1]||0;if(o)for(r=0;r<n;++r)e[r][a][1]/=o}Jn(e,t)}}function xP(e,t){if((a=e.length)>0){for(var r=0,n=e[t[0]],a,i=n.length;r<i;++r){for(var o=0,s=0;o<a;++o)s+=e[o][r][1]||0;n[r][1]+=n[r][0]=-s/2}Jn(e,t)}}function wP(e,t){if(!(!((o=e.length)>0)||!((i=(a=e[t[0]]).length)>0))){for(var r=0,n=1,a,i,o;n<i;++n){for(var s=0,l=0,c=0;s<o;++s){for(var f=e[t[s]],d=f[n][1]||0,h=f[n-1][1]||0,p=(d-h)/2,v=0;v<s;++v){var g=e[t[v]],m=g[n][1]||0,y=g[n-1][1]||0;p+=m-y}l+=d,c+=p*d}a[n-1][1]+=a[n-1][0]=r,l&&(r-=c/l)}a[n-1][1]+=a[n-1][0]=r,Jn(e,t)}}function ii(e){"@babel/helpers - typeof";return ii=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ii(e)}var SP=["type","size","sizeType"];function Bd(){return Bd=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Bd.apply(this,arguments)}function lg(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function cg(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?lg(Object(r),!0).forEach(function(n){OP(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):lg(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function OP(e,t,r){return t=AP(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function AP(e){var t=_P(e,"string");return ii(t)=="symbol"?t:t+""}function _P(e,t){if(ii(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(ii(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function jP(e,t){if(e==null)return{};var r=PP(e,t),n,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)n=i[a],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function PP(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}var yS={symbolCircle:pp,symbolCross:V1,symbolDiamond:Y1,symbolSquare:Z1,symbolStar:tP,symbolTriangle:rP,symbolWye:aP},TP=Math.PI/180,EP=function(t){var r="symbol".concat(Fs(t));return yS[r]||pp},NP=function(t,r,n){if(r==="area")return t;switch(n){case"cross":return 5*t*t/9;case"diamond":return .5*t*t/Math.sqrt(3);case"square":return t*t;case"star":{var a=18*TP;return 1.25*t*t*(Math.tan(a)-Math.tan(a*2)*Math.pow(Math.tan(a),2))}case"triangle":return Math.sqrt(3)*t*t/4;case"wye":return(21-10*Math.sqrt(3))*t*t/8;default:return Math.PI*t*t/4}},CP=function(t,r){yS["symbol".concat(Fs(t))]=r},mp=function(t){var r=t.type,n=r===void 0?"circle":r,a=t.size,i=a===void 0?64:a,o=t.sizeType,s=o===void 0?"area":o,l=jP(t,SP),c=cg(cg({},l),{},{type:n,size:i,sizeType:s}),f=function(){var m=EP(n),y=iP().type(m).size(NP(i,s,n));return y()},d=c.className,h=c.cx,p=c.cy,v=ce(c,!0);return h===+h&&p===+p&&i===+i?C.createElement("path",Bd({},v,{className:pe("recharts-symbols",d),transform:"translate(".concat(h,", ").concat(p,")"),d:f()})):null};mp.registerSymbol=CP;function Qn(e){"@babel/helpers - typeof";return Qn=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Qn(e)}function qd(){return qd=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},qd.apply(this,arguments)}function ug(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function MP(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?ug(Object(r),!0).forEach(function(n){oi(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ug(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function IP(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function kP(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,xS(n.key),n)}}function RP(e,t,r){return t&&kP(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function DP(e,t,r){return t=qo(t),$P(e,bS()?Reflect.construct(t,r||[],qo(e).constructor):t.apply(e,r))}function $P(e,t){if(t&&(Qn(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return LP(e)}function LP(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function bS(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(bS=function(){return!!e})()}function qo(e){return qo=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},qo(e)}function BP(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Fd(e,t)}function Fd(e,t){return Fd=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,a){return n.__proto__=a,n},Fd(e,t)}function oi(e,t,r){return t=xS(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function xS(e){var t=qP(e,"string");return Qn(t)=="symbol"?t:t+""}function qP(e,t){if(Qn(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Qn(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var _t=32,vp=(function(e){function t(){return IP(this,t),DP(this,t,arguments)}return BP(t,e),RP(t,[{key:"renderIcon",value:function(n){var a=this.props.inactiveColor,i=_t/2,o=_t/6,s=_t/3,l=n.inactive?a:n.color;if(n.type==="plainline")return C.createElement("line",{strokeWidth:4,fill:"none",stroke:l,strokeDasharray:n.payload.strokeDasharray,x1:0,y1:i,x2:_t,y2:i,className:"recharts-legend-icon"});if(n.type==="line")return C.createElement("path",{strokeWidth:4,fill:"none",stroke:l,d:"M0,".concat(i,"h").concat(s,`
2            A`).concat(o,",").concat(o,",0,1,1,").concat(2*s,",").concat(i,`
3            H`).concat(_t,"M").concat(2*s,",").concat(i,`
4            A`).concat(o,",").concat(o,",0,1,1,").concat(s,",").concat(i),className:"recharts-legend-icon"});if(n.type==="rect")return C.createElement("path",{stroke:"none",fill:l,d:"M0,".concat(_t/8,"h").concat(_t,"v").concat(_t*3/4,"h").concat(-_t,"z"),className:"recharts-legend-icon"});if(C.isValidElement(n.legendIcon)){var c=MP({},n);return delete c.legendIcon,C.cloneElement(n.legendIcon,c)}return C.createElement(mp,{fill:l,cx:i,cy:i,size:_t,sizeType:"diameter",type:n.type})}},{key:"renderItems",value:function(){var n=this,a=this.props,i=a.payload,o=a.iconSize,s=a.layout,l=a.formatter,c=a.inactiveColor,f={x:0,y:0,width:_t,height:_t},d={display:s==="horizontal"?"inline-block":"block",marginRight:10},h={display:"inline-block",verticalAlign:"middle",marginRight:4};return i.map(function(p,v){var g=p.formatter||l,m=pe(oi(oi({"recharts-legend-item":!0},"legend-item-".concat(v),!0),"inactive",p.inactive));if(p.type==="none")return null;var y=se(p.value)?null:p.value;dr(!se(p.value),`The name property is also required when using a function for the dataKey of a chart's cartesian components. Ex: <Bar name="Name of my Data"/>`);var w=p.inactive?c:p.color;return C.createElement("li",qd({className:m,style:d,key:"legend-item-".concat(v)},ko(n.props,p,v)),C.createElement(Id,{width:o,height:o,viewBox:f,style:h},n.renderIcon(p)),C.createElement("span",{className:"recharts-legend-item-text",style:{color:w}},g?g(y,p,v):y))})}},{key:"render",value:function(){var n=this.props,a=n.payload,i=n.layout,o=n.align;if(!a||!a.length)return null;var s={padding:0,margin:0,textAlign:i==="horizontal"?o:"left"};return C.createElement("ul",{className:"recharts-default-legend",style:s},this.renderItems())}}])})(P.PureComponent);oi(vp,"displayName","Legend");oi(vp,"defaultProps",{iconSize:14,layout:"horizontal",align:"center",verticalAlign:"middle",inactiveColor:"#ccc"});var qc,fg;function FP(){if(fg)return qc;fg=1;var e=Ls();function t(){this.__data__=new e,this.size=0}return qc=t,qc}var Fc,dg;function zP(){if(dg)return Fc;dg=1;function e(t){var r=this.__data__,n=r.delete(t);return this.size=r.size,n}return Fc=e,Fc}var zc,hg;function UP(){if(hg)return zc;hg=1;function e(t){return this.__data__.get(t)}return zc=e,zc}var Uc,pg;function WP(){if(pg)return Uc;pg=1;function e(t){return this.__data__.has(t)}return Uc=e,Uc}var Wc,mg;function HP(){if(mg)return Wc;mg=1;var e=Ls(),t=op(),r=sp(),n=200;function a(i,o){var s=this.__data__;if(s instanceof e){var l=s.__data__;if(!t||l.length<n-1)return l.push([i,o]),this.size=++s.size,this;s=this.__data__=new r(l)}return s.set(i,o),this.size=s.size,this}return Wc=a,Wc}var Hc,vg;function wS(){if(vg)return Hc;vg=1;var e=Ls(),t=FP(),r=zP(),n=UP(),a=WP(),i=HP();function o(s){var l=this.__data__=new e(s);this.size=l.size}return o.prototype.clear=t,o.prototype.delete=r,o.prototype.get=n,o.prototype.has=a,o.prototype.set=i,Hc=o,Hc}var Gc,gg;function GP(){if(gg)return Gc;gg=1;var e="__lodash_hash_undefined__";function t(r){return this.__data__.set(r,e),this}return Gc=t,Gc}var Kc,yg;function KP(){if(yg)return Kc;yg=1;function e(t){return this.__data__.has(t)}return Kc=e,Kc}var Vc,bg;function SS(){if(bg)return Vc;bg=1;var e=sp(),t=GP(),r=KP();function n(a){var i=-1,o=a==null?0:a.length;for(this.__data__=new e;++i<o;)this.add(a[i])}return n.prototype.add=n.prototype.push=t,n.prototype.has=r,Vc=n,Vc}var Xc,xg;function OS(){if(xg)return Xc;xg=1;function e(t,r){for(var n=-1,a=t==null?0:t.length;++n<a;)if(r(t[n],n,t))return!0;return!1}return Xc=e,Xc}var Yc,wg;function AS(){if(wg)return Yc;wg=1;function e(t,r){return t.has(r)}return Yc=e,Yc}var Zc,Sg;function _S(){if(Sg)return Zc;Sg=1;var e=SS(),t=OS(),r=AS(),n=1,a=2;function i(o,s,l,c,f,d){var h=l&n,p=o.length,v=s.length;if(p!=v&&!(h&&v>p))return!1;var g=d.get(o),m=d.get(s);if(g&&m)return g==s&&m==o;var y=-1,w=!0,S=l&a?new e:void 0;for(d.set(o,s),d.set(s,o);++y<p;){var O=o[y],b=s[y];if(c)var x=h?c(b,O,y,s,o,d):c(O,b,y,o,s,d);if(x!==void 0){if(x)continue;w=!1;break}if(S){if(!t(s,function(A,j){if(!r(S,j)&&(O===A||f(O,A,l,c,d)))return S.push(j)})){w=!1;break}}else if(!(O===b||f(O,b,l,c,d))){w=!1;break}}return d.delete(o),d.delete(s),w}return Zc=i,Zc}var Jc,Og;function VP(){if(Og)return Jc;Og=1;var e=nr(),t=e.Uint8Array;return Jc=t,Jc}var Qc,Ag;function XP(){if(Ag)return Qc;Ag=1;function e(t){var r=-1,n=Array(t.size);return t.forEach(function(a,i){n[++r]=[i,a]}),n}return Qc=e,Qc}var eu,_g;function gp(){if(_g)return eu;_g=1;function e(t){var r=-1,n=Array(t.size);return t.forEach(function(a){n[++r]=a}),n}return eu=e,eu}var tu,jg;function YP(){if(jg)return tu;jg=1;var e=Bi(),t=VP(),r=ip(),n=_S(),a=XP(),i=gp(),o=1,s=2,l="[object Boolean]",c="[object Date]",f="[object Error]",d="[object Map]",h="[object Number]",p="[object RegExp]",v="[object Set]",g="[object String]",m="[object Symbol]",y="[object ArrayBuffer]",w="[object DataView]",S=e?e.prototype:void 0,O=S?S.valueOf:void 0;function b(x,A,j,E,I,N,T){switch(j){case w:if(x.byteLength!=A.byteLength||x.byteOffset!=A.byteOffset)return!1;x=x.buffer,A=A.buffer;case y:return!(x.byteLength!=A.byteLength||!N(new t(x),new t(A)));case l:case c:case h:return r(+x,+A);case f:return x.name==A.name&&x.message==A.message;case p:case g:return x==A+"";case d:var M=a;case v:var R=E&o;if(M||(M=i),x.size!=A.size&&!R)return!1;var D=T.get(x);if(D)return D==A;E|=s,T.set(x,A);var L=n(M(x),M(A),E,I,N,T);return T.delete(x),L;case m:if(O)return O.call(x)==O.call(A)}return!1}return tu=b,tu}var ru,Pg;function jS(){if(Pg)return ru;Pg=1;function e(t,r){for(var n=-1,a=r.length,i=t.length;++n<a;)t[i+n]=r[n];return t}return ru=e,ru}var nu,Tg;function ZP(){if(Tg)return nu;Tg=1;var e=jS(),t=mt();function r(n,a,i){var o=a(n);return t(n)?o:e(o,i(n))}return nu=r,nu}var au,Eg;function JP(){if(Eg)return au;Eg=1;function e(t,r){for(var n=-1,a=t==null?0:t.length,i=0,o=[];++n<a;){var s=t[n];r(s,n,t)&&(o[i++]=s)}return o}return au=e,au}var iu,Ng;function QP(){if(Ng)return iu;Ng=1;function e(){return[]}return iu=e,iu}var ou,Cg;function eT(){if(Cg)return ou;Cg=1;var e=JP(),t=QP(),r=Object.prototype,n=r.propertyIsEnumerable,a=Object.getOwnPropertySymbols,i=a?function(o){return o==null?[]:(o=Object(o),e(a(o),function(s){return n.call(o,s)}))}:t;return ou=i,ou}var su,Mg;function tT(){if(Mg)return su;Mg=1;function e(t,r){for(var n=-1,a=Array(t);++n<t;)a[n]=r(n);return a}return su=e,su}var lu,Ig;function rT(){if(Ig)return lu;Ig=1;var e=yr(),t=br(),r="[object Arguments]";function n(a){return t(a)&&e(a)==r}return lu=n,lu}var cu,kg;function yp(){if(kg)return cu;kg=1;var e=rT(),t=br(),r=Object.prototype,n=r.hasOwnProperty,a=r.propertyIsEnumerable,i=e((function(){return arguments})())?e:function(o){return t(o)&&n.call(o,"callee")&&!a.call(o,"callee")};return cu=i,cu}var Xa={exports:{}},uu,Rg;function nT(){if(Rg)return uu;Rg=1;function e(){return!1}return uu=e,uu}Xa.exports;var Dg;function PS(){return Dg||(Dg=1,(function(e,t){var r=nr(),n=nT(),a=t&&!t.nodeType&&t,i=a&&!0&&e&&!e.nodeType&&e,o=i&&i.exports===a,s=o?r.Buffer:void 0,l=s?s.isBuffer:void 0,c=l||n;e.exports=c})(Xa,Xa.exports)),Xa.exports}var fu,$g;function bp(){if($g)return fu;$g=1;var e=9007199254740991,t=/^(?:0|[1-9]\d*)$/;function r(n,a){var i=typeof n;return a=a??e,!!a&&(i=="number"||i!="symbol"&&t.test(n))&&n>-1&&n%1==0&&n<a}return fu=r,fu}var du,Lg;function xp(){if(Lg)return du;Lg=1;var e=9007199254740991;function t(r){return typeof r=="number"&&r>-1&&r%1==0&&r<=e}return du=t,du}var hu,Bg;function aT(){if(Bg)return hu;Bg=1;var e=yr(),t=xp(),r=br(),n="[object Arguments]",a="[object Array]",i="[object Boolean]",o="[object Date]",s="[object Error]",l="[object Function]",c="[object Map]",f="[object Number]",d="[object Object]",h="[object RegExp]",p="[object Set]",v="[object String]",g="[object WeakMap]",m="[object ArrayBuffer]",y="[object DataView]",w="[object Float32Array]",S="[object Float64Array
4]",O="[object Int8Array]",b="[object Int16Array]",x="[object Int32Array]",A="[object Uint8Array]",j="[object Uint8ClampedArray]",E="[object Uint16Array]",I="[object Uint32Array]",N={};N[w]=N[S]=N[O]=N[b]=N[x]=N[A]=N[j]=N[E]=N[I]=!0,N[n]=N[a]=N[m]=N[i]=N[y]=N[o]=N[s]=N[l]=N[c]=N[f]=N[d]=N[h]=N[p]=N[v]=N[g]=!1;function T(M){return r(M)&&t(M.length)&&!!N[e(M)]}return hu=T,hu}var pu,qg;function TS(){if(qg)return pu;qg=1;function e(t){return function(r){return t(r)}}return pu=e,pu}var Ya={exports:{}};Ya.exports;var Fg;function iT(){return Fg||(Fg=1,(function(e,t){var r=Kw(),n=t&&!t.nodeType&&t,a=n&&!0&&e&&!e.nodeType&&e,i=a&&a.exports===n,o=i&&r.process,s=(function(){try{var l=a&&a.require&&a.require("util").types;return l||o&&o.binding&&o.binding("util")}catch{}})();e.exports=s})(Ya,Ya.exports)),Ya.exports}var mu,zg;function ES(){if(zg)return mu;zg=1;var e=aT(),t=TS(),r=iT(),n=r&&r.isTypedArray,a=n?t(n):e;return mu=a,mu}var vu,Ug;function oT(){if(Ug)return vu;Ug=1;var e=tT(),t=yp(),r=mt(),n=PS(),a=bp(),i=ES(),o=Object.prototype,s=o.hasOwnProperty;function l(c,f){var d=r(c),h=!d&&t(c),p=!d&&!h&&n(c),v=!d&&!h&&!p&&i(c),g=d||h||p||v,m=g?e(c.length,String):[],y=m.length;for(var w in c)(f||s.call(c,w))&&!(g&&(w=="length"||p&&(w=="offset"||w=="parent")||v&&(w=="buffer"||w=="byteLength"||w=="byteOffset")||a(w,y)))&&m.push(w);return m}return vu=l,vu}var gu,Wg;function sT(){if(Wg)return gu;Wg=1;var e=Object.prototype;function t(r){var n=r&&r.constructor,a=typeof n=="function"&&n.prototype||e;return r===a}return gu=t,gu}var yu,Hg;function NS(){if(Hg)return yu;Hg=1;function e(t,r){return function(n){return t(r(n))}}return yu=e,yu}var bu,Gg;function lT(){if(Gg)return bu;Gg=1;var e=NS(),t=e(Object.keys,Object);return bu=t,bu}var xu,Kg;function cT(){if(Kg)return xu;Kg=1;var e=sT(),t=lT(),r=Object.prototype,n=r.hasOwnProperty;function a(i){if(!e(i))return t(i);var o=[];for(var s in Object(i))n.call(i,s)&&s!="constructor"&&o.push(s);return o}return xu=a,xu}var wu,Vg;function qi(){if(Vg)return wu;Vg=1;var e=ap(),t=xp();function r(n){return n!=null&&t(n.length)&&!e(n)}return wu=r,wu}var Su,Xg;function Hs(){if(Xg)return Su;Xg=1;var e=oT(),t=cT(),r=qi();function n(a){return r(a)?e(a):t(a)}return Su=n,Su}var Ou,Yg;function uT(){if(Yg)return Ou;Yg=1;var e=ZP(),t=eT(),r=Hs();function n(a){return e(a,r,t)}return Ou=n,Ou}var Au,Zg;function fT(){if(Zg)return Au;Zg=1;var e=uT(),t=1,r=Object.prototype,n=r.hasOwnProperty;function a(i,o,s,l,c,f){var d=s&t,h=e(i),p=h.length,v=e(o),g=v.length;if(p!=g&&!d)return!1;for(var m=p;m--;){var y=h[m];if(!(d?y in o:n.call(o,y)))return!1}var w=f.get(i),S=f.get(o);if(w&&S)return w==o&&S==i;var O=!0;f.set(i,o),f.set(o,i);for(var b=d;++m<p;){y=h[m];var x=i[y],A=o[y];if(l)var j=d?l(A,x,y,o,i,f):l(x,A,y,i,o,f);if(!(j===void 0?x===A||c(x,A,s,l,f):j)){O=!1;break}b||(b=y=="constructor")}
vendor: 1,652 bytes, line 4
4if(O&&!b){var E=i.constructor,I=o.constructor;E!=I&&"constructor"in i&&"constructor"in o&&!(typeof E=="function"&&E instanceof E&&typeof I=="function"&&I instanceof I)&&(O=!1)}return f.delete(i),f.delete(o),O}return Au=a,Au}var _u,Jg;function dT(){if(Jg)return _u;Jg=1;var e=Sn(),t=nr(),r=e(t,"DataView");return _u=r,_u}var ju,Qg;function hT(){if(Qg)return ju;Qg=1;var e=Sn(),t=nr(),r=e(t,"Promise");return ju=r,ju}var Pu,ey;function CS(){if(ey)return Pu;ey=1;var e=Sn(),t=nr(),r=e(t,"Set");return Pu=r,Pu}var Tu,ty;function pT(){if(ty)return Tu;ty=1;var e=Sn(),t=nr(),r=e(t,"WeakMap");return Tu=r,Tu}var Eu,ry;function mT(){if(ry)return Eu;ry=1;var e=dT(),t=op(),r=hT(),n=CS(),a=pT(),i=yr(),o=Vw(),s="[object Map]",l="[object Object]",c="[object Promise]",f="[object Set]",d="[object WeakMap]",h="[object DataView]",p=o(e),v=o(t),g=o(r),m=o(n),y=o(a),w=i;return(e&&w(new e(new ArrayBuffer(1)))!=h||t&&w(new t)!=s||r&&w(r.resolve())!=c||n&&w(new n)!=f||a&&w(new a)!=d)&&(w=function(S){var O=i(S),b=O==l?S.constructor:void 0,x=b?o(b):"";if(x)switch(x){case p:return h;case v:return s;case g:return c;case m:return f;case y:return d}return O}),Eu=w,Eu}var Nu,ny;function vT(){if(ny)return Nu;ny=1;var e=wS(),t=_S(),r=YP(),n=fT(),a=mT(),i=mt(),o=PS(),s=ES(),l=1,c="[object Arguments]",f="[object Array]",d="[object Object]",h=Object.prototype,p=h.hasOwnProperty;function v(g,m,y,w,S,O){var b=i(g),x=i(m),A=b?f:a(g),j=x?f:a(m);A=A==c?d:A,j=j==c?d:j;var E=A==d,I=j==d,N=A==j;if(N&&o(g)){if(!o(m))return!1;b=!0,E=!1}if(N&&!E)return O||(O=new e),b||s(g)?t(g,m,y,w,S,O):r(g,m,A,y,w,S,O);if(!(y&l)){var T=E&&p.call(g,"__wrapped__"),M=I&&p.call(m,"__wrapped__");
vendor: 43,964 bytes, lines 4-11
4if(T||M){var R=T?g.value():g,D=M?m.value():m;return O||(O=new e),S(R,D,y,w,O)}}return N?(O||(O=new e),n(g,m,y,w,S,O)):!1}return Nu=v,Nu}var Cu,ay;function wp(){if(ay)return Cu;ay=1;var e=vT(),t=br();function r(n,a,i,o,s){return n===a?!0:n==null||a==null||!t(n)&&!t(a)?n!==n&&a!==a:e(n,a,i,o,r,s)}return Cu=r,Cu}var Mu,iy;function gT(){if(iy)return Mu;iy=1;var e=wS(),t=wp(),r=1,n=2;function a(i,o,s,l){var c=s.length,f=c,d=!l;if(i==null)return!f;for(i=Object(i);c--;){var h=s[c];if(d&&h[2]?h[1]!==i[h[0]]:!(h[0]in i))return!1}for(;++c<f;){h=s[c];var p=h[0],v=i[p],g=h[1];if(d&&h[2]){if(v===void 0&&!(p in i))return!1}else{var m=new e;if(l)var y=l(v,g,p,i,o,m);if(!(y===void 0?t(g,v,r|n,l,m):y))return!1}}return!0}return Mu=a,Mu}var Iu,oy;function MS(){if(oy)return Iu;oy=1;var e=Rr();function t(r){return r===r&&!e(r)}return Iu=t,Iu}var ku,sy;function yT(){if(sy)return ku;sy=1;var e=MS(),t=Hs();function r(n){for(var a=t(n),i=a.length;i--;){var o=a[i],s=n[o];a[i]=[o,s,e(s)]}return a}return ku=r,ku}var Ru,ly;function IS(){if(ly)return Ru;ly=1;function e(t,r){return function(n){return n==null?!1:n[t]===r&&(r!==void 0||t in Object(n))}}return Ru=e,Ru}var Du,cy;function bT(){if(cy)return Du;cy=1;var e=gT(),t=yT(),r=IS();function n(a){var i=t(a);return i.length==1&&i[0][2]?r(i[0][0],i[0][1]):function(o){return o===a||e(o,a,i)}}return Du=n,Du}var $u,uy;function xT(){if(uy)return $u;uy=1;function e(t,r){return t!=null&&r in Object(t)}return $u=e,$u}var Lu,fy;function wT(){if(fy)return Lu;fy=1;var e=Zw(),t=yp(),r=mt(),n=bp(),a=xp(),i=qs();function o(s,l,c){l=e(l,s);for(var f=-1,d=l.length,h=!1;++f<d;){var p=i(l[f]);if(!(h=s!=null&&c(s,p)))break;s=s[p]}return h||++f!=d?h:(d=s==null?0:s.length,!!d&&a(d)&&n(p,d)&&(r(s)||t(s)))}return Lu=o,Lu}var Bu,dy;function ST(){if(dy)return Bu;dy=1;var e=xT(),t=wT();function r(n,a){return n!=null&&t(n,a,e)}return Bu=r,Bu}var qu,hy;function OT(){if(hy)return qu;hy=1;var e=wp(),t=Jw(),r=ST(),n=np(),a=MS(),i=IS(),o=qs(),s=1,l=2;function c(f,d){return n(f)&&a(d)?i(o(f),d):function(h){var p=t(h,f);return p===void 0&&p===d?r(h,f):e(d,p,s|l)}}return qu=c,qu}var Fu,py;function Ta(){if(py)return Fu;py=1;function e(t){return t}return Fu=e,Fu}var zu,my;function AT(){if(my)return zu;my=1;function e(t){return function(r){return r?.[t]}}return zu=e,zu}var Uu,vy;function _T(){if(vy)return Uu;vy=1;var e=cp();function t(r){return function(n){return e(n,r)}}return Uu=t,Uu}var Wu,gy;function jT(){if(gy)return Wu;gy=1;var e=AT(),t=_T(),r=np(),n=qs();function a(i){return r(i)?e(n(i)):t(i)}return Wu=a,Wu}var Hu,yy;function Dr(){if(yy)return Hu;yy=1;var e=bT(),t=OT(),r=Ta(),n=mt(),a=jT();function i(o){return typeof o=="function"?o:o==null?r:typeof o=="object"?n(o)?t(o[0],o[1]):e(o):a(o)}return Hu=i,Hu}var Gu,by;function kS(){if(by)return Gu;by=1;function e(t,r,n,a){for(var i=t.length,o=n+(a?1:-1);a?o--:++o<i;)if(r(t[o],o,t))return o;return-1}return Gu=e,Gu}var Ku,xy;function PT(){if(xy)return Ku;xy=1;function e(t){return t!==t}return Ku=e,Ku}var Vu,wy;function TT(){if(wy)return Vu;wy=1;function e(t,r,n){for(var a=n-1,i=t.length;++a<i;)if(t[a]===r)return a;return-1}return Vu=e,Vu}var Xu,Sy;function ET(){if(Sy)return Xu;Sy=1;var e=kS(),t=PT(),r=TT();function n(a,i,o){return i===i?r(a,i,o):e(a,t,o)}return Xu=n,Xu}var Yu,Oy;function NT(){if(Oy)return Yu;Oy=1;var e=ET();function t(r,n){var a=r==null?0:r.length;return!!a&&e(r,n,0)>-1}return Yu=t,Yu}var Zu,Ay;function CT(){if(Ay)return Zu;Ay=1;function e(t,r,n){for(var a=-1,i=t==null?0:t.length;++a<i;)if(n(r,t[a]))return!0;return!1}return Zu=e,Zu}var Ju,_y;function MT(){if(_y)return Ju;_y=1;function e(){}return Ju=e,Ju}var Qu,jy;function IT(){if(jy)return Qu;jy=1;var e=CS(),t=MT(),r=gp(),n=1/0,a=e&&1/r(new e([,-0]))[1]==n?function(i){return new e(i)}:t;return Qu=a,Qu}var ef,Py;function kT(){if(Py)return ef;Py=1;var e=SS(),t=NT(),r=CT(),n=AS(),a=IT(),i=gp(),o=200;function s(l,c,f){var d=-1,h=t,p=l.length,v=!0,g=[],m=g;if(f)v=!1,h=r;else if(p>=o){var y=c?null:a(l);if(y)return i(y);v=!1,h=n,m=new e}else m=c?[]:g;e:for(;++d<p;){var w=l[d],S=c?c(w):w;if(w=f||w!==0?w:0,v&&S===S){for(var O=m.length;O--;)if(m[O]===S)continue e;c&&m.push(S),g.push(w)}else h(m,S,f)||(m!==g&&m.push(S),g.push(w))}return g}return ef=s,ef}var tf,Ty;function RT(){if(Ty)return tf;Ty=1;var e=Dr(),t=kT();function r(n,a){return n&&n.length?t(n,e(a,2)):[]}return tf=r,tf}var DT=RT();const Ey=Ce(DT);function RS(e,t,r){return t===!0?Ey(e,r):se(t)?Ey(e,t):e}function ea(e){"@babel/helpers - typeof";return ea=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ea(e)}var $T=["ref"];function Ny(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function ir(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Ny(Object(r),!0).forEach(function(n){Gs(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Ny(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function LT(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Cy(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,$S(n.key),n)}}function BT(e,t,r){return t&&Cy(e.prototype,t),r&&Cy(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function qT(e,t,r){return t=Fo(t),FT(e,DS()?Reflect.construct(t,r||[],Fo(e).constructor):t.apply(e,r))}function FT(e,t){if(t&&(ea(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return zT(e)}function zT(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function DS(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(DS=function(){return!!e})()}function Fo(e){return Fo=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Fo(e)}function UT(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&zd(e,t)}function zd(e,t){return zd=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,a){return n.__proto__=a,n},zd(e,t)}function Gs(e,t,r){return t=$S(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function $S(e){var t=WT(e,"string");return ea(t)=="symbol"?t:t+""}function WT(e,t){if(ea(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(ea(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}function HT(e,t){if(e==null)return{};var r=GT(e,t),n,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)n=i[a],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function GT(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function KT(e){return e.value}function VT(e,t){if(C.isValidElement(e))return C.cloneElement(e,t);if(typeof e=="function")return C.createElement(e,t);t.ref;var r=HT(t,$T);return C.createElement(vp,r)}var My=1,Kn=(function(e){function t(){var r;LT(this,t);for(var n=arguments.length,a=new Array(n),i=0;i<n;i++)a[i]=arguments[i];return r=qT(this,t,[].concat(a)),Gs(r,"lastBoundingBox",{width:-1,height:-1}),r}return UT(t,e),BT(t,[{key:"componentDidMount",value:function(){this.updateBBox()}},{key:"componentDidUpdate",value:function(){this.updateBBox()}},{key:"getBBox",value:function(){if(this.wrapperNode&&this.wrapperNode.getBoundingClientRect){var n=this.wrapperNode.getBoundingClientRect();return n.height=this.wrapperNode.offsetHeight,n.width=this.wrapperNode.offsetWidth,n}return null}},{key:"updateBBox",value:function(){var n=this.props.onBBoxUpdate,a=this.getBBox();a?(Math.abs(a.width-this.lastBoundingBox.width)>My||Math.abs(a.height-this.lastBoundingBox.height)>My)&&(this.lastBoundingBox.width=a.width,this.lastBoundingBox.height=a.height,n&&n(a)):(this.lastBoundingBox.width!==-1||this.lastBoundingBox.height!==-1)&&(this.lastBoundingBox.width=-1,this.lastBoundingBox.height=-1,n&&n(null))}},{key:"getBBoxSnapshot",value:function(){return this.lastBoundingBox.width>=0&&this.lastBoundingBox.height>=0?ir({},this.lastBoundingBox):{width:0,height:0}}},{key:"getDefaultPosition",value:function(n){var a=this.props,i=a.layout,o=a.align,s=a.verticalAlign,l=a.margin,c=a.chartWidth,f=a.chartHeight,d,h;if(!n||(n.left===void 0||n.left===null)&&(n.right===void 0||n.right===null))if(o==="center"&&i==="vertical"){var p=this.getBBoxSnapshot();d={left:((c||0)-p.width)/2}}else d=o==="right"?{right:l&&l.right||0}:{left:l&&l.left||0};if(!n||(n.top===void 0||n.top===null)&&(n.bottom===void 0||n.bottom===null))if(s==="middle"){var v=this.getBBoxSnapshot();h={top:((f||0)-v.height)/2}}else h=s==="bottom"?{bottom:l&&l.bottom||0}:{top:l&&l.top||0};return ir(ir({},d),h)}},{key:"render",value:function(){var n=this,a=this.props,i=a.content,o=a.width,s=a.height,l=a.wrapperStyle,c=a.payloadUniqBy,f=a.payload,d=ir(ir({position:"absolute",width:o||"auto",height:s||"auto"},this.getDefaultPosition(l)),l);return C.createElement("div",{className:"recharts-legend-wrapper",style:d,ref:function(p){n.wrapperNode=p}},VT(i,ir(ir({},this.props),{},{payload:RS(f,c,KT)})))}}],[{key:"getWithHeight",value:function(n,a){var i=ir(ir({},this.defaultProps),n.props),o=i.layout;return o==="vertical"&&H(n.props.height)?{height:n.props.height}:o==="horizontal"?{width:n.props.width||a}:null}}])})(P.PureComponent);Gs(Kn,"displayName","Legend");Gs(Kn,"defaultProps",{iconSize:14,layout:"horizontal",align:"center",verticalAlign:"bottom"});var rf,Iy;function XT(){if(Iy)return rf;Iy=1;var e=Bi(),t=yp(),r=mt(),n=e?e.isConcatSpreadable:void 0;function a(i){return r(i)||t(i)||!!(n&&i&&i[n])}return rf=a,rf}var nf,ky;function LS(){if(ky)return nf;ky=1;var e=jS(),t=XT();function r(n,a,i,o,s){var l=-1,c=n.length;for(i||(i=t),s||(s=[]);++l<c;){var f=n[l];a>0&&i(f)?a>1?r(f,a-1,i,o,s):e(s,f):o||(s[s.length]=f)}return s}return nf=r,nf}var af,Ry;function YT(){if(Ry)return af;Ry=1;function e(t){return function(r,n,a){for(var i=-1,o=Object(r),s=a(r),l=s.length;l--;){var c=s[t?l:++i];if(n(o[c],c,o)===!1)break}return r}}return af=e,af}var of,Dy;function ZT(){if(Dy)return of;Dy=1;var e=YT(),t=e();return of=t,of}var sf,$y;function BS(){if($y)return sf;$y=1;var e=ZT(),t=Hs();function r(n,a){return n&&e(n,a,t)}return sf=r,sf}var lf,Ly;function JT(){if(Ly)return lf;Ly=1;var e=qi();function t(r,n){return function(a,i){if(a==null)return a;if(!e(a))return r(a,i);for(var o=a.length,s=n?o:-1,l=Object(a);(n?s--:++s<o)&&i(l[s],s,l)!==!1;);return a}}return lf=t,lf}var cf,By;function Sp(){if(By)return cf;By=1;var e=BS(),t=JT(),r=t(e);return cf=r,cf}var uf,qy;function qS(){if(qy)return uf;qy=1;var e=Sp(),t=qi();function r(n,a){var i=-1,o=t(n)?Array(n.length):[];return e(n,function(s,l,c){o[++i]=a(s,l,c)}),o}return uf=r,uf}var ff,Fy;function QT(){if(Fy)return ff;Fy=1;function e(t,r){var n=t.length;for(t.sort(r);n--;)t[n]=t[n].value;return t}return ff=e,ff}var df,zy;function eE(){if(zy)return df;zy=1;var e=Aa();function t(r,n){if(r!==n){var a=r!==void 0,i=r===null,o=r===r,s=e(r),l=n!==void 0,c=n===null,f=n===n,d=e(n);if(!c&&!d&&!s&&r>n||s&&l&&f&&!c&&!d||i&&l&&f||!a&&f||!o)return 1;if(!i&&!s&&!d&&r<n||d&&a&&o&&!i&&!s||c&&a&&o||!l&&o||!f)return-1}return 0}return df=t,df}var hf,Uy;function tE(){if(Uy)return hf;Uy=1;var e=eE();function t(r,n,a){for(var i=-1,o=r.criteria,s=n.criteria,l=o.length,c=a.length;++i<l;){var f=e(o[i],s[i]);if(f){if(i>=c)return f;var d=a[i];return f*(d=="desc"?-1:1)}}return r.index-n.index}return hf=t,hf}var pf,Wy;function rE(){if(Wy)return pf;Wy=1;var e=lp(),t=cp(),r=Dr(),n=qS(),a=QT(),i=TS(),o=tE(),s=Ta(),l=mt();function c(f,d,h){d.length?d=e(d,function(g){return l(g)?function(m){return t(m,g.length===1?g[0]:g)}:g}):d=[s];var p=-1;d=e(d,i(r));var v=n(f,function(g,m,y){var w=e(d,function(S){return S(g)});return{criteria:w,index:++p,value:g}});return a(v,function(g,m){return o(g,m,h)})}return pf=c,pf}var mf,Hy;function nE(){if(Hy)return mf;Hy=1;function e(t,r,n){switch(n.length){case 0:return t.call(r);case 1:return t.call(r,n[0]);case 2:return t.call(r,n[0],n[1]);case 3:return t.call(r,n[0],n[1],n[2])}return t.apply(r,n)}return mf=e,mf}var vf,Gy;function aE(){if(Gy)return vf;Gy=1;var e=nE(),t=Math.max;function r(n,a,i){return a=t(a===void 0?n.length-1:a,0),function(){for(var o=arguments,s=-1,l=t(o.length-a,0),c=Array(l);++s<l;)c[s]=o[a+s];s=-1;for(var f=Array(a+1);++s<a;)f[s]=o[s];return f[a]=i(c),e(n,this,f)}}return vf=r,vf}var gf,Ky;function iE(){if(Ky)return gf;Ky=1;function e(t){return function(){return t}}return gf=e,gf}var yf,Vy;function FS(){if(Vy)return yf;Vy=1;var e=Sn(),t=(function(){try{var r=e(Object,"defineProperty");return r({},"",{}),r}catch{}})();return yf=t,yf}var bf,Xy;function oE(){if(Xy)return bf;Xy=1;var e=iE(),t=FS(),r=Ta(),n=t?function(a,i){return t(a,"toString",{configurable:!0,enumerable:!1,value:e(i),writable:!0})}:r;return bf=n,bf}var xf,Yy;function sE(){if(Yy)return xf;Yy=1;var e=800,t=16,r=Date.now;function n(a){var i=0,o=0;return function(){var s=r(),l=t-(s-o);if(o=s,l>0){if(++i>=e)return arguments[0]}else i=0;return a.apply(void 0,arguments)}}return xf=n,xf}var wf,Zy;function lE(){if(Zy)return wf;Zy=1;var e=oE(),t=sE(),r=t(e);return wf=r,wf}var Sf,Jy;function cE(){if(Jy)return Sf;Jy=1;var e=Ta(),t=aE(),r=lE();function n(a,i){return r(t(a,i,e),a+"")}return Sf=n,Sf}var Of,Qy;function Ks(){if(Qy)return Of;Qy=1;var e=ip(),t=qi(),r=bp(),n=Rr();function a(i,o,s){if(!n(s))return!1;var l=typeof o;return(l=="number"?t(s)&&r(o,s.length):l=="string"&&o in s)?e(s[o],i):!1}return Of=a,Of}var Af,eb;function uE(){if(eb)return Af;eb=1;var e=LS(),t=rE(),r=cE(),n=Ks(),a=r(function(i,o){if(i==null)return[];var s=o.length;return s>1&&n(i,o[0],o[1])?o=[]:s>2&&n(o[0],o[1],o[2])&&(o=[o[0]]),t(i,e(o,1),[])});return Af=a,Af}var fE=uE();const Op=Ce(fE);function si(e){"@babel/helpers - typeof";return si=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},si(e)}function Ud(){return Ud=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Ud.apply(this,arguments)}function dE(e,t){return vE(e)||mE(e,t)||pE(e,t)||hE()}function hE(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
5In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function pE(e,t){if(e){if(typeof e=="string")return tb(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return tb(e,t)}}function tb(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function mE(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,a,i,o,s=[],l=!0,c=!1;try{if(i=(r=r.call(e)).next,t!==0)for(;!(l=(n=i.call(r)).done)&&(s.push(n.value),s.length!==t);l=!0);}catch(f){c=!0,a=f}finally{try{if(!l&&r.return!=null&&(o=r.return(),Object(o)!==o))return}finally{if(c)throw a}}return s}}function vE(e){if(Array.isArray(e))return e}function rb(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function _f(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?rb(Object(r),!0).forEach(function(n){gE(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):rb(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function gE(e,t,r){return t=yE(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function yE(e){var t=bE(e,"string");return si(t)=="symbol"?t:t+""}function bE(e,t){if(si(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(si(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function xE(e){return Array.isArray(e)&&He(e[0])&&He(e[1])?e.join(" ~ "):e}var wE=function(t){var r=t.separator,n=r===void 0?" : ":r,a=t.contentStyle,i=a===void 0?{}:a,o=t.itemStyle,s=o===void 0?{}:o,l=t.labelStyle,c=l===void 0?{}:l,f=t.payload,d=t.formatter,h=t.itemSorter,p=t.wrapperClassName,v=t.labelClassName,g=t.label,m=t.labelFormatter,y=t.accessibilityLayer,w=y===void 0?!1:y,S=function(){if(f&&f.length){var T={padding:0,margin:0},M=(h?Op(f,h):f).map(function(R,D){if(R.type==="none")return null;var L=_f({display:"block",paddingTop:4,paddingBottom:4,color:R.color||"#000"},s),z=R.formatter||d||xE,$=R.value,F=R.name,K=$,V=F;if(z&&K!=null&&V!=null){var G=z($,F,R,D,f);if(Array.isArray(G)){var Q=dE(G,2);K=Q[0],V=Q[1]}else K=G}return C.createElement("li",{className:"recharts-tooltip-item",key:"tooltip-item-".concat(D),style:L},He(V)?C.createElement("span",{className:"recharts-tooltip-item-name"},V):null,He(V)?C.createElement("span",{className:"recharts-tooltip-item-separator"},n):null,C.createElement("span",{className:"recharts-tooltip-item-value"},K),C.createElement("span",{className:"recharts-tooltip-item-unit"},R.unit||""))});return C.createElement("ul",{className:"recharts-tooltip-item-list",style:T},M)}return null},O=_f({margin:0,padding:10,backgroundColor:"#fff",border:"1px solid #ccc",whiteSpace:"nowrap"},i),b=_f({margin:0},c),x=!fe(g),A=x?g:"",j=pe("recharts-default-tooltip",p),E=pe("recharts-tooltip-label",v);x&&m&&f!==void 0&&f!==null&&(A=m(g,f));var I=w?{role:"status","aria-live":"assertive"}:{};return C.createElement("div",Ud({className:j,style:O},I),C.createElement("p",{className:E,style:b},C.isValidElement(A)?A:"".concat(A)),S())};function li(e){"@babel/helpers - typeof";return li=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},li(e)}function co(e,t,r){return t=SE(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function SE(e){var t=OE(e,"string");return li(t)=="symbol"?t:t+""}function OE(e,t){if(li(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(li(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Da="recharts-tooltip-wrapper",AE={visibility:"hidden"};function _E(e){var t=e.coordinate,r=e.translateX,n=e.translateY;return pe(Da,co(co(co(co({},"".concat(Da,"-right"),H(r)&&t&&H(t.x)&&r>=t.x),"".concat(Da,"-left"),H(r)&&t&&H(t.x)&&r<t.x),"".concat(Da,"-bottom"),H(n)&&t&&H(t.y)&&n>=t.y),"".concat(Da,"-top"),H(n)&&t&&H(t.y)&&n<t.y))}function nb(e){var t=e.allowEscapeViewBox,r=e.coordinate,n=e.key,a=e.offsetTopLeft,i=e.position,o=e.reverseDirection,s=e.tooltipDimension,l=e.viewBox,c=e.viewBoxDimension;if(i&&H(i[n]))return i[n];var f=r[n]-s-a,d=r[n]+a;if(t[n])return o[n]?f:d;if(o[n]){var h=f,p=l[n];return h<p?Math.max(d,l[n]):Math.max(f,l[n])}var v=d+s,g=l[n]+c;return v>g?Math.max(f,l[n]):Math.max(d,l[n])}function jE(e){var t=e.translateX,r=e.translateY,n=e.useTranslate3d;return{transform:n?"translate3d(".concat(t,"px, ").concat(r,"px, 0)"):"translate(".concat(t,"px, ").concat(r,"px)")}}function PE(e){var t=e.allowEscapeViewBox,r=e.coordinate,n=e.offsetTopLeft,a=e.position,i=e.reverseDirection,o=e.tooltipBox,s=e.useTranslate3d,l=e.viewBox,c,f,d;return o.height>0&&o.width>0&&r?(f=nb({allowEscapeViewBox:t,coordinate:r,key:"x",offsetTopLeft:n,position:a,reverseDirection:i,tooltipDimension:o.width,viewBox:l,viewBoxDimension:l.width}),d=nb({allowEscapeViewBox:t,coordinate:r,key:"y",offsetTopLeft:n,position:a,reverseDirection:i,tooltipDimension:o.height,viewBox:l,viewBoxDimension:l.height}),c=jE({translateX:f,translateY:d,useTranslate3d:s})):c=AE,{cssProperties:c,cssClasses:_E({translateX:f,translateY:d,coordinate:r})}}function ta(e){"@babel/helpers - typeof";return ta=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ta(e)}function ab(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function ib(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?ab(Object(r),!0).forEach(function(n){Hd(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ab(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function TE(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function EE(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,US(n.key),n)}}function NE(e,t,r){return t&&EE(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function CE(e,t,r){return t=zo(t),ME(e,zS()?Reflect.construct(t,r||[],zo(e).constructor):t.apply(e,r))}function ME(e,t){if(t&&(ta(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return IE(e)}function IE(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function zS(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(zS=function(){return!!e})()}function zo(e){return zo=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},zo(e)}function kE(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Wd(e,t)}function Wd(e,t){return Wd=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,a){return n.__proto__=a,n},Wd(e,t)}function Hd(e,t,r){return t=US(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function US(e){var t=RE(e,"string");return ta(t)=="symbol"?t:t+""}function RE(e,t){if(ta(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(ta(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var ob=1,DE=(function(e){function t(){var r;TE(this,t);for(var n=arguments.length,a=new Array(n),i=0;i<n;i++)a[i]=arguments[i];return r=CE(this,t,[].concat(a)),Hd(r,"state",{dismissed:!1,dismissedAtCoordinate:{x:0,y:0},lastBoundingBox:{width:-1,height:-1}}),Hd(r,"handleKeyDown",function(o){if(o.key==="Escape"){var s,l,c,f;r.setState({dismissed:!0,dismissedAtCoordinate:{x:(s=(l=r.props.coordinate)===null||l===void 0?void 0:l.x)!==null&&s!==void 0?s:0,y:(c=(f=r.props.coordinate)===null||f===void 0?void 0:f.y)!==null&&c!==void 0?c:0}})}}),r}return kE(t,e),NE(t,[{key:"updateBBox",value:function(){if(this.wrapperNode&&this.wrapperNode.getBoundingClientRect){var n=this.wrapperNode.getBoundingClientRect();(Math.abs(n.width-this.state.lastBoundingBox.width)>ob||Math.abs(n.height-this.state.lastBoundingBox.height)>ob)&&this.setState({lastBoundingBox:{width:n.width,height:n.height}})}else(this.state.lastBoundingBox.width!==-1||this.state.lastBoundingBox.height!==-1)&&this.setState({lastBoundingBox:{width:-1,height:-1}})}},{key:"componentDidMount",value:function(){document.addEventListener("keydown",this.handleKeyDown),this.updateBBox()}},{key:"componentWillUnmount",value:function(){document.removeEventListener("keydown",this.handleKeyDown)}},{key:"componentDidUpdate",value:function(){var n,a;this.props.active&&this.updateBBox(),this.state.dismissed&&(((n=this.props.coordinate)===null||n===void 0?void 0:n.x)!==this.state.dismissedAtCoordinate.x||((a=this.props.coordinate)===null||a===void 0?void 0:a.y)!==this.state.dismissedAtCoordinate.y)&&(this.state.dismissed=!1)}},{key:"render",value:function(){var n=this,a=this.props,i=a.active,o=a.allowEscapeViewBox,s=a.animationDuration,l=a.animationEasing,c=a.children,f=a.coordinate,d=a.hasPayload,h=a.isAnimationActive,p=a.offset,v=a.position,g=a.reverseDirection,m=a.useTranslate3d,y=a.viewBox,w=a.wrapperStyle,S=PE({allowEscapeViewBox:o,coordinate:f,offsetTopLeft:p,position:v,reverseDirection:g,tooltipBox:this.state.lastBoundingBox,useTranslate3d:m,viewBox:y}),O=S.cssClasses,b=S.cssProperties,x=ib(ib({transition:h&&i?"transform ".concat(s,"ms ").concat(l):void 0},b),{},{pointerEvents:"none",visibility:!this.state.dismissed&&i&&d?"visible":"hidden",position:"absolute",top:0,left:0},w);return C.createElement("div",{tabIndex:-1,className:O,style:x,ref:function(j){n.wrapperNode=j}},c)}}])})(P.PureComponent),$E=function(){return!(typeof window<"u"&&window.document&&window.document.createElement&&window.setTimeout)},On={isSsr:$E()};function ra(e){"@babel/helpers - typeof";return ra=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ra(e)}function sb(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function lb(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?sb(Object(r),!0).forEach(function(n){Ap(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):sb(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function LE(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function BE(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,HS(n.key),n)}}function qE(e,t,r){return t&&BE(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function FE(e,t,r){return t=Uo(t),zE(e,WS()?Reflect.construct(t,r||[],Uo(e).constructor):t.apply(e,r))}function zE(e,t){if(t&&(ra(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return UE(e)}function UE(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function WS(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(WS=function(){return!!e})()}function Uo(e){return Uo=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Uo(e)}function WE(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Gd(e,t)}function Gd(e,t){return Gd=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,a){return n.__proto__=a,n},Gd(e,t)}function Ap(e,t,r){return t=HS(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function HS(e){var t=HE(e,"string");return ra(t)=="symbol"?t:t+""}function HE(e,t){if(ra(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(ra(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}function GE(e){return e.dataKey}function KE(e,t){return C.isValidElement(e)?C.cloneElement(e,t):typeof e=="function"?C.createElement(e,t):C.createElement(wE,t)}var Et=(function(e){function t(){return LE(this,t),FE(this,t,arguments)}return WE(t,e),qE(t,[{key:"render",value:function(){var n=this,a=this.props,i=a.active,o=a.allowEscapeViewBox,s=a.animationDuration,l=a.animationEasing,c=a.content,f=a.coordinate,d=a.filterNull,h=a.isAnimationActive,p=a.offset,v=a.payload,g=a.payloadUniqBy,m=a.position,y=a.reverseDirection,w=a.useTranslate3d,S=a.viewBox,O=a.wrapperStyle,b=v??[];d&&b.length&&(b=RS(v.filter(function(A){return A.value!=null&&(A.hide!==!0||n.props.includeHidden)}),g,GE));var x=b.length>0;return C.createElement(DE,{allowEscapeViewBox:o,animationDuration:s,animationEasing:l,isAnimationActive:h,active:i,coordinate:f,hasPayload:x,offset:p,position:m,reverseDirection:y,useTranslate3d:w,viewBox:S,wrapperStyle:O},KE(c,lb(lb({},this.props),{},{payload:b})))}}])})(P.PureComponent);Ap(Et,"displayName","Tooltip");Ap(Et,"defaultProps",{accessibilityLayer:!1,allowEscapeViewBox:{x:!1,y:!1},animationDuration:400,animationEasing:"ease",contentStyle:{},coordinate:{x:0,y:0},cursor:!0,cursorStyle:{},filterNull:!0,isAnimationActive:!On.isSsr,itemStyle:{},labelStyle:{},offset:10,reverseDirection:{x:!1,y:!1},separator:" : ",trigger:"hover",useTranslate3d:!1,viewBox:{x:0,y:0,height:0,width:0},wrapperStyle:{}});var jf,cb;function VE(){if(cb)return jf;cb=1;var e=nr(),t=function(){return e.Date.now()};return jf=t,jf}var Pf,ub;function XE(){if(ub)return Pf;ub=1;var e=/\s/;function t(r){for(var n=r.length;n--&&e.test(r.charAt(n)););return n}return Pf=t,Pf}var Tf,fb;function YE(){if(fb)return Tf;fb=1;var e=XE(),t=/^\s+/;function r(n){return n&&n.slice(0,e(n)+1).replace(t,"")}return Tf=r,Tf}var Ef,db;function GS(){if(db)return Ef;db=1;var e=YE(),t=Rr(),r=Aa(),n=NaN,a=/^[-+]0x[0-9a-f]+$/i,i=/^0b[01]+$/i,o=/^0o[0-7]+$/i,s=parseInt;function l(c){if(typeof c=="number")return c;if(r(c))return n;if(t(c)){var f=typeof c.valueOf=="function"?c.valueOf():c;c=t(f)?f+"":f}if(typeof c!="string")return c===0?c:+c;c=e(c);var d=i.test(c);return d||o.test(c)?s(c.slice(2),d?2:8):a.test(c)?n:+c}return Ef=l,Ef}var Nf,hb;function ZE(){if(hb)return Nf;hb=1;var e=Rr(),t=VE(),r=GS(),n="Expected a function",a=Math.max,i=Math.min;function o(s,l,c){var f,d,h,p,v,g,m=0,y=!1,w=!1,S=!0;if(typeof s!="function")throw new TypeError(n);l=r(l)||0,e(c)&&(y=!!c.leading,w="maxWait"in c,h=w?a(r(c.maxWait)||0,l):h,S="trailing"in c?!!c.trailing:S);function O(M){var R=f,D=d;return f=d=void 0,m=M,p=s.apply(D,R),p}function b(M){return m=M,v=setTimeout(j,l),y?O(M):p}function x(M){var R=M-g,D=M-m,L=l-R;return w?i(L,h-D):L}function A(M){var R=M-g,D=M-m;return g===void 0||R>=l||R<0||w&&D>=h}function j(){var M=t();if(A(M))return E(M);v=setTimeout(j,x(M))}function E(M){return v=void 0,S&&f?O(M):(f=d=void 0,p)}function I(){v!==void 0&&clearTimeout(v),m=0,f=g=d=v=void 0}function N(){return v===void 0?p:E(t())}function T(){var M=t(),R=A(M);if(f=arguments,d=this,g=M,R){if(v===void 0)return b(g);if(w)return clearTimeout(v),v=setTimeout(j,l),O(g)}return v===void 0&&(v=setTimeout(j,l)),p}return T.cancel=I,T.flush=N,T}return Nf=o,Nf}var Cf,pb;function JE(){if(pb)return Cf;pb=1;var e=ZE(),t=Rr(),r="Expected a function";function n(a,i,o){var s=!0,l=!0;if(typeof a!="function")throw new TypeError(r);return t(o)&&(s="leading"in o?!!o.leading:s,l="trailing"in o?!!o.trailing:l),e(a,i,{leading:s,maxWait:i,trailing:l})}return Cf=n,Cf}var QE=JE();const KS=Ce(QE);function ci(e){"@babel/helpers - typeof";return ci=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ci(e)}function mb(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function uo(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?mb(Object(r),!0).forEach(function(n){eN(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):mb(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function eN(e,t,r){return t=tN(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function tN(e){var t=rN(e,"string");return ci(t)=="symbol"?t:t+""}function rN(e,t){if(ci(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(ci(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function nN(e,t){return sN(e)||oN(e,t)||iN(e,t)||aN()}function aN(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
6In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function iN(e,t){if(e){if(typeof e=="string")return vb(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return vb(e,t)}}function vb(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function oN(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,a,i,o,s=[],l=!0,c=!1;try{if(i=(r=r.call(e)).next,t!==0)for(;!(l=(n=i.call(r)).done)&&(s.push(n.value),s.length!==t);l=!0);}catch(f){c=!0,a=f}finally{try{if(!l&&r.return!=null&&(o=r.return(),Object(o)!==o))return}finally{if(c)throw a}}return s}}function sN(e){if(Array.isArray(e))return e}var Kd=P.forwardRef(function(e,t){var r=e.aspect,n=e.initialDimension,a=n===void 0?{width:-1,height:-1}:n,i=e.width,o=i===void 0?"100%":i,s=e.height,l=s===void 0?"100%":s,c=e.minWidth,f=c===void 0?0:c,d=e.minHeight,h=e.maxHeight,p=e.children,v=e.debounce,g=v===void 0?0:v,m=e.id,y=e.className,w=e.onResize,S=e.style,O=S===void 0?{}:S,b=P.useRef(null),x=P.useRef();x.current=w,P.useImperativeHandle(t,function(){return Object.defineProperty(b.current,"current",{get:function(){return console.warn("The usage of ref.current.current is deprecated and will no longer be supported."),b.current},configurable:!0})});var A=P.useState({containerWidth:a.width,containerHeight:a.height}),j=nN(A,2),E=j[0],I=j[1],N=P.useCallback(function(M,R){I(function(D){var L=Math.round(M),z=Math.round(R);return D.containerWidth===L&&D.containerHeight===z?D:{containerWidth:L,containerHeight:z}})},[]);P.useEffect(function(){var M=function(F){var K,V=F[0].contentRect,G=V.width,Q=V.height;N(G,Q),(K=x.current)===null||K===void 0||K.call(x,G,Q)};g>0&&(M=KS(M,g,{trailing:!0,leading:!1}));var R=new ResizeObserver(M),D=b.current.getBoundingClientRect(),L=D.width,z=D.height;return N(L,z),R.observe(b.current),function(){R.disconnect()}},[N,g]);var T=P.useMemo(function(){var M=E.containerWidth,R=E.containerHeight;if(M<0||R<0)return null;dr(Zr(o)||Zr(l),`The width(%s) and height(%s) are both fixed numbers,
7       maybe you don't need to use a ResponsiveContainer.`,o,l),dr(!r||r>0,"The aspect(%s) must be greater than zero.",r);var D=Zr(o)?M:o,L=Zr(l)?R:l;r&&r>0&&(D?L=D/r:L&&(D=L*r),h&&L>h&&(L=h)),dr(D>0||L>0,`The width(%s) and height(%s) of chart should be greater than 0,
8       please check the style of container, or the props width(%s) and height(%s),
9       or add a minWidth(%s) or minHeight(%s) or use aspect(%s) to control the
10       height and width.`,D,L,o,l,f,d,r);var z=!Array.isArray(p)&&fr(p.type).endsWith("Chart");return C.Children.map(p,function($){return C.isValidElement($)?P.cloneElement($,uo({width:D,height:L},z?{style:uo({height:"100%",width:"100%",maxHeight:L,maxWidth:D},$.props.style)}:{})):$})},[r,p,l,h,d,f,E,o]);return C.createElement("div",{id:m?"".concat(m):void 0,className:pe("recharts-responsive-container",y),style:uo(uo({},O),{},{width:o,height:l,minWidth:f,minHeight:d,maxHeight:h}),ref:b},T)}),VS=function(t){return null};VS.displayName="Cell";function ui(e){"@babel/helpers - typeof";return ui=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ui(e)}function gb(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function Vd(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?gb(Object(r),!0).forEach(function(n){lN(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):gb(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function lN(e,t,r){return t=cN(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function cN(e){var t=uN(e,"string");return ui(t)=="symbol"?t:t+""}function uN(e,t){if(ui(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(ui(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Rn={widthCache:{},cacheCount:0},fN=2e3,dN={position:"absolute",top:"-20000px",left:0,padding:0,margin:0,border:"none",whiteSpace:"pre"},yb="recharts_measurement_span";function hN(e){var t=Vd({},e);return Object.keys(t).forEach(function(r){t[r]||delete t[r]}),t}var Qa=function(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(t==null||On.isSsr)return{width:0,height:0};var n=hN(r),a=JSON.stringify({text:t,copyStyle:n});if(Rn.widthCache[a])return Rn.widthCache[a];try{var i=document.getElementById(yb);i||(i=document.createElement("span"),i.setAttribute("id",yb),i.setAttribute("aria-hidden","true"),document.body.appendChild(i));var o=Vd(Vd({},dN),n);Object.assign(i.style,o),i.textContent="".concat(t);var s=i.getBoundingClientRect(),l={width:s.width,height:s.height};return Rn.widthCache[a]=l,++Rn.cacheCount>fN&&(Rn.cacheCount=0,Rn.widthCache={}),l}catch{return{width:0,height:0}}},pN=function(t){return{top:t.top+window.scrollY-document.documentElement.clientTop,left:t.left+window.scrollX-document.documentElement.clientLeft}};function fi(e){"@babel/helpers - typeof";return fi=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},fi(e)}function Wo(e,t){return yN(e)||gN(e,t)||vN(e,t)||mN()}function mN(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
11In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function vN(e,t){if(e){if(typeof e=="string")return bb(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return bb(e,t)}}function bb(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function gN(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,a,i,o,s=[],l=!0,c=!1;try{if(i=(r=r.call(e)).next,t===0){if(Object(r)!==r)return;l=!1}else for(;!(l=(n=i.call(r)).done)&&(s.push(n.value),s.length!==t);l=!0);}catch(f){c=!0,a=f}finally{try{if(!l&&r.return!=null&&(o=r.return(),Object(o)!==o))return}finally{if(c)throw a}}return s}}function yN(e){if(Array.isArray(e))return e}function bN(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function xb(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,wN(n.key),n)}}function xN(e,t,r){return t&&xb(e.prototype,t),r&&xb(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function wN(e){var t=SN(e,"string");return fi(t)=="symbol"?t:t+""}function SN(e,t){if(fi(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(fi(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var wb=/(-?\d+(?:\.\d+)?[a-zA-Z%]*)([*/])(-?\d+(?:\.\d+)?[a-zA-Z%]*)/,Sb=/(-?\d+(?:\.\d+)?[a-zA-Z%]*)([+-])(-?\d+(?:\.\d+)?[a-zA-Z%]*)/,ON=/^px|cm|vh|vw|em|rem|%|mm|in|pt|pc|ex|ch|vmin|vmax|Q$/,AN=/(-?\d+(?:\.\d+)?)([a-zA-Z%]+)?/,XS={cm:96/2.54,mm:96/25.4,pt:96/72,pc:96/6,in:96,Q:96/(2.54*40),px:1},_N=Object.keys(XS),Un="NaN";function jN(e,t){return e*XS[t]}var fo=(function(){function e(t,r){bN(this,e),this.num=t,this.unit=r,this.num=t,this.unit=r,Number.isNaN(t)&&(this.unit=""),r!==""&&!ON.test(r)&&(this.num=NaN,this.unit=""),_N.includes(r)&&(this.num=jN(t,r),this.unit="px")}return xN(e,[{key:"add",value:function(r){return this.unit!==r.unit?new e(NaN,""):new e(this.num+r.num,this.unit)}},{key:"subtract",value:function(r){return this.unit!==r.unit?new e(NaN,""):new e(this.num-r.num,this.unit)}},{key:"multiply",value:function(r){return this.unit!==""&&r.unit!==""&&this.unit!==r.unit?new e(NaN,""):new e(this.num*r.num,this.unit||r.unit)}},{key:"divide",value:function(r){return this.unit!==""&&r.unit!==""&&this.unit!==r.unit?new e(NaN,""):new e(this.num/r.num,this.unit||r.unit)}},{key:"toString",value:function(){return"".concat(this.num).concat(this.unit)}},{key:"isNaN",value:function(){return Number.isNaN(this.num)}}],[{key:"parse",value:function(r){var n,a=(n=AN.exec(r))!==null&&n!==void 0?n:[],i=Wo(a,3),o=i[1],s=i[2];return new e(parseFloat(o),s??"")}}])})();function YS(e){if(e.includes(Un))return Un;for(var t=e;t.includes("*")||t.includes("/");){var r,n=(r=wb.exec(t))!==null&&r!==void 0?r:[],a=Wo(n,4),i=a[1],o=a[2],s=a[3],l=fo.parse(i??""),c=fo.parse(s??""),f=o==="*"?l.multiply(c):l.divide(c);if(f.isNaN())return Un;t=t.replace(wb,f.toString())}for(;t.includes("+")||/.-\d+(?:\.\d+)?/.test(t);){var d,h=(d=Sb.exec(t))!==null&&d!==void 0?d:[],p=Wo(h,4),v=p[1],g=p[2],m=p[3],y=fo.parse(v??""),w=fo.parse(m??""),S=g==="+"?y.add(w):y.subtract(w);if(S.isNaN())return Un;t=t.replace(Sb,S.toString())}return t}var Ob=/\(([^()]*)\)/;function PN(e){for(var t=e;t.includes("(");){var r=Ob.exec(t),n=Wo(r,2),a=n[1];t=t.replace(Ob,YS(a))}return t}function TN(e){var t=e.replace(/\s+/g,"");return t=PN(t),t=YS(t),t}function EN(e){try{return TN(e)}catch{return Un}}function Mf(e){var t=EN(e.slice(5,-1));return t===Un?"":t}var NN=["x","y","lineHeight","capHeight","scaleToFit","textAnchor","verticalAnchor","fill"],CN=["dx","dy","angle","className","breakAll"];function Xd(){return Xd=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];
11for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Xd.apply(this,arguments)}function Ab(e,t){if(e==null)return{};var r=MN(e,t),n,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)n=i[a],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function MN(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function _b(e,t){return DN(e)||RN(e,t)||kN(e,t)||IN()}function IN(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
12In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function kN(e,t){if(e){if(typeof e=="string")return jb(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return jb(e,t)}}function jb(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function RN(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,a,i,o,s=[],l=!0,c=!1;try{if(i=(r=r.call(e)).next,t===0){if(Object(r)!==r)return;l=!1}else for(;!(l=(n=i.call(r)).done)&&(s.push(n.value),s.length!==t);l=!0);}catch(f){c=!0,a=f}finally{try{if(!l&&r.return!=null&&(o=r.return(),Object(o)!==o))return}finally{if(c)throw a}}return s}}function DN(e){if(Array.isArray(e))return e}var ZS=/[ \f\n\r\t\v\u2028\u2029]+/,JS=function(t){var r=t.children,n=t.breakAll,a=t.style;try{var i=[];fe(r)||(n?i=r.toString().split(""):i=r.toString().split(ZS));var o=i.map(function(l){return{word:l,width:Qa(l,a).width}}),s=n?0:Qa(" ",a).width;return{wordsWithComputedWidth:o,spaceWidth:s}}catch{return null}},$N=function(t,r,n,a,i){var o=t.maxLines,s=t.children,l=t.style,c=t.breakAll,f=H(o),d=s,h=function(){var D=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];return D.reduce(function(L,z){var $=z.word,F=z.width,K=L[L.length-1];if(K&&(a==null||i||K.width+F+n<Number(a)))K.words.push($),K.width+=F+n;else{var V={words:[$],width:F};L.push(V)}return L},[])},p=h(r),v=function(D){return D.reduce(function(L,z){return L.width>z.width?L:z})};if(!f)return p;for(var g="…",m=function(D){var L=d.slice(0,D),z=JS({breakAll:c,style:l,children:L+g}).wordsWithComputedWidth,$=h(z),F=$.length>o||v($).width>Number(a);return[F,$]},y=0,w=d.length-1,S=0,O;y<=w&&S<=d.length-1;){var b=Math.floor((y+w)/2),x=b-1,A=m(x),j=_b(A,2),E=j[0],I=j[1],N=m(b),T=_b(N,1),M=T[0];if(!E&&!M&&(y=b+1),E&&M&&(w=b-1),!E&&M){O=I;break}S++}return O||p},Pb=function(t){var r=fe(t)?[]:t.toString().split(ZS);return[{words:r}]},LN=function(t){var r=t.width,n=t.scaleToFit,a=t.children,i=t.style,o=t.breakAll,s=t.maxLines;if((r||n)&&!On.isSsr){var l,c,f=JS({breakAll:o,children:a,style:i});if(f){var d=f.wordsWithComputedWidth,h=f.spaceWidth;l=d,c=h}else return Pb(a);return $N({breakAll:o,children:a,maxLines:s,style:i},l,c,r,n)}return Pb(a)},Tb="#808080",Ho=function(t){var r=t.x,n=r===void 0?0:r,a=t.y,i=a===void 0?0:a,o=t.lineHeight,s=o===void 0?"1em":o,l=t.capHeight,c=l===void 0?"0.71em":l,f=t.scaleToFit,d=f===void 0?!1:f,h=t.textAnchor,p=h===void 0?"start":h,v=t.verticalAnchor,g=v===void 0?"end":v,m=t.fill,y=m===void 0?Tb:m,w=Ab(t,NN),S=P.useMemo(function(){return LN({breakAll:w.breakAll,children:w.children,maxLines:w.maxLines,scaleToFit:d,style:w.style,width:w.width})},[w.breakAll,w.children,w.maxLines,d,w.style,w.width]),O=w.dx,b=w.dy,x=w.angle,A=w.className,j=w.breakAll,E=Ab(w,CN);if(!He(n)||!He(i))return null;var I=n+(H(O)?O:0),N=i+(H(b)?b:0),T;switch(g){case"start":T=Mf("calc(".concat(c,")"));break;case"middle":T=Mf("calc(".concat((S.length-1)/2," * -").concat(s," + (").concat(c," / 2))"));break;default:T=Mf("calc(".concat(S.length-1," * -").concat(s,")"));break}var M=[];if(d){var R=S[0].width,D=w.width;M.push("scale(".concat((H(D)?D/R:1)/R,")"))}return x&&M.push("rotate(".concat(x,", ").concat(I,", ").concat(N,")")),M.length&&(E.transform=M.join(" ")),C.createElement("text",Xd({},ce(E,!0),{x:I,y:N,className:pe("recharts-text",A),textAnchor:p,fill:y.includes("url")?Tb:y}),S.map(function(L,z){var $=L.words.join(j?"":" ");return C.createElement("tspan",{x:I,dy:z===0?T:s,key:"".concat($,"-").concat(z)},$)}))};function Cr(e,t){return e==null||t==null?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function BN(e,t){return e==null||t==null?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function _p(e){let t,r,n;e.length!==2?(t=Cr,r=(s,l)=>Cr(e(s),l),n=(s,l)=>e(s)-l):(t=e===Cr||e===BN?e:qN,r=e,n=e);function a(s,l,c=0,f=s.length){if(c<f){if(t(l,l)!==0)return f;do{const d=c+f>>>1;r(s[d],l)<0?c=d+1:f=d}while(c<f)}return c}function i(s,l,c=0,f=s.length){if(c<f){if(t(l,l)!==0)return f;do{const d=c+f>>>1;r(s[d],l)<=0?c=d+1:f=d}while(c<f)}return c}function o(s,l,c=0,f=s.length){const d=a(s,l,c,f-1);return d>c&&n(s[d-1],l)>-n(s[d],l)?d-1:d}return{left:a,center:o,right:i}}function qN(){return 0}function QS(e){return e===null?NaN:+e}function*FN(e,t){for(let r of e)r!=null&&(r=+r)>=r&&(yield r)}const zN=_p(Cr),Fi=zN.right;_p(QS).center;class Eb extends Map{constructor(t,r=HN){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:r}}),t!=null)for(const[n,a]of t)this.set(n,a)}get(t){return super.get(Nb(this,t))}has(t){return super.has(Nb(this,t))}set(t,r){return super.set(UN(this,t),r)}delete(t){return super.delete(WN(this,t))}}function Nb({_intern:e,_key:t},r){const n=t(r);return e.has(n)?e.get(n):r}function UN({_intern:e,_key:t},r){const n=t(r);return e.has(n)?e.get(n):(e.set(n,r),r)}function WN({_intern:e,_key:t},r){const n=t(r);return e.has(n)&&(r=e.get(n),e.delete(n)),r}function HN(e){return e!==null&&typeof e=="object"?e.valueOf():e}function GN(e=Cr){if(e===Cr)return eO;if(typeof e!="function")throw new TypeError("compare is not a function");return(t,r)=>{const n=e(t,r);return n||n===0?n:(e(r,r)===0)-(e(t,t)===0)}}function eO(e,t){return(e==null||!(e>=e))-(t==null||!(t>=t))||(e<t?-1:e>t?1:0)}const KN=Math.sqrt(50),VN=Math.sqrt(10),XN=Math.sqrt(2);function Go(e,t,r){const n=(t-e)/Math.max(0,r),a=Math.floor(Math.log10(n)),i=n/Math.pow(10,a),o=i>=KN?10:i>=VN?5:i>=XN?2:1;let s,l,c;return a<0?(c=Math.pow(10,-a)/o,s=Math.round(e*c),l=Math.round(t*c),s/c<e&&
12++s,l/c>t&&--l,c=-c):(c=Math.pow(10,a)*o,s=Math.round(e/c),l=Math.round(t/c),s*c<e&&++s,l*c>t&&--l),l<s&&.5<=r&&r<2?Go(e,t,r*2):[s,l,c]}function Yd(e,t,r){if(t=+t,e=+e,r=+r,!(r>0))return[];if(e===t)return[e];const n=t<e,[a,i,o]=n?Go(t,e,r):Go(e,t,r);if(!(i>=a))return[];const s=i-a+1,l=new Array(s);if(n)if(o<0)for(let c=0;c<s;++c)l[c]=(i-c)/-o;else for(let c=0;c<s;++c)l[c]=(i-c)*o;else if(o<0)for(let c=0;c<s;++c)l[c]=(a+c)/-o;else for(let c=0;c<s;++c)l[c]=(a+c)*o;return l}function Zd(e,t,r){return t=+t,e=+e,r=+r,Go(e,t,r)[2]}function Jd(e,t,r){t=+t,e=+e,r=+r;const n=t<e,a=n?Zd(t,e,r):Zd(e,t,r);return(n?-1:1)*(a<0?1/-a:a)}function Cb(e,t){let r;for(const n of e)n!=null&&(r<n||r===void 0&&n>=n)&&(r=n);return r}function Mb(e,t){let r;for(const n of e)n!=null&&(r>n||r===void 0&&n>=n)&&(r=n);return r}function tO(e,t,r=0,n=1/0,a){if(t=Math.floor(t),r=Math.floor(Math.max(0,r)),n=Math.floor(Math.min(e.length-1,n)),!(r<=t&&t<=n))return e;for(a=a===void 0?eO:GN(a);n>r;){if(n-r>600){const l=n-r+1,c=t-r+1,f=Math.log(l),d=.5*Math.exp(2*f/3),h=.5*Math.sqrt(f*d*(l-d)/l)*(c-l/2<0?-1:1),p=Math.max(r,Math.floor(t-c*d/l+h)),v=Math.min(n,Math.floor(t+(l-c)*d/l+h));tO(e,t,p,v,a)}const i=e[t];let o=r,s=n;for($a(e,r,t),a(e[n],i)>0&&$a(e,r,n);o<s;){for($a(e,o,s),++o,--s;a(e[o],i)<0;)++o;for(;a(e[s],i)>0;)--s}a(e[r],i)===0?$a(e,r,s):(++s,$a(e,s,n)),s<=t&&(r=s+1),t<=s&&(n=s-1)}return e}function $a(e,t,r){const n=e[t];e[t]=e[r],e[r]=n}function YN(e,t,r){if(e=Float64Array.from(FN(e)),!(!(n=e.length)||isNaN(t=+t))){if(t<=0||n<2)return Mb(e);if(t>=1)return Cb(e);var n,a=(n-1)*t,i=Math.floor(a),o=Cb(tO(e,i).subarray(0,i+1)),s=Mb(e.subarray(i+1));return o+(s-o)*(a-i)}}function ZN(e,t,r=QS){if(!(!(n=e.length)||isNaN(t=+t))){if(t<=0||n<2)return+r(e[0],0,e);if(t>=1)return+r(e[n-1],n-1,e);var n,a=(n-1)*t,i=Math.floor(a),o=+r(e[i],i,e),s=+r(e[i+1],i+1,e);return o+(s-o)*(a-i)}}function JN(e,t,r){e=+e,t=+t,r=(a=arguments.length)<2?(t=e,e=0,1):a<3?1:+r;for(var n=-1,a=Math.max(0,Math.ceil((t-e)/r))|0,i=new Array(a);++n<a;)i[n]=e+n*r;return i}function Rt(e,t){switch(arguments.length){case 0:break;case 1:this.range(e);break;default:this.range(t).domain(e);break}return this}function xr(e,t){switch(arguments.length){case 0:break;case 1:{typeof e=="function"?this.interpolator(e):this.range(e);break}default:{this.domain(e),typeof t=="function"?this.interpolator(t):this.range(t);break}}return this}const Qd=Symbol("implicit");function jp(){var e=new Eb,t=[],r=[],n=Qd;function a(i){let o=e.get(i);if(o===void 0){if(n!==Qd)return n;e.set(i,o=t.push(i)-1)}return r[o%r.length]}return a.domain=function(i){if(!arguments.length)return t.slice();t=[],e=new Eb;for(const o of i)e.has(o)||e.set(o,t.push(o)-1);return a},a.range=function(i){return arguments.length?(r=Array.from(i),a):r.slice()},a.unknown=function(i){return arguments.length?(n=i,a):n},a.copy=function(){return jp(t,r).unknown(n)},Rt.apply(a,arguments),a}function di(){var e=jp().unknown(void 0),t=e.domain,r=e.range,n=0,a=1,i,o,s=!1,l=0,c=0,f=.5;delete e.unknown;function d(){var h=t().length,p=a<n,v=p?a:n,g=p?n:a;i=(g-v)/Math.max(1,h-l+c*2),s&&(i=Math.floor(i)),v+=(g-v-i*(h-l))*f,o=i*(1-l),s&&(v=Math.round(v),o=Math.round(o));var m=JN(h).map(function(y){return v+i*y});return r(p?m.reverse():m)}return e.domain=function(h){return arguments.length?(t(h),d()):t()},e.range=function(h){return arguments.length?([n,a]=h,n=+n,a=+a,d()):[n,a]},e.rangeRound=function(h){return[n,a]=h,n=+n,a=+a,s=!0,d()},e.bandwidth=function(){return o},e.step=function(){return i},e.round=function(h){return arguments.length?(s=!!h,d()):s},e.padding=function(h){return arguments.length?(l=Math.min(1,c=+h),d()):l},e.paddingInner=function(h){return arguments.length?(l=Math.min(1,h),d()):l},e.paddingOuter=function(h){return arguments.length?(c=+h,d()):c},e.align=function(h){return arguments.length?(f=Math.max(0,Math.min(1,h)),d()):f},e.copy=function(){return di(t(),[n,a]).round(s).paddingInner(l).paddingOuter(c).align(f)},Rt.apply(d(),arguments)}function rO(e){var t=e.copy;return e.padding=e.paddingOuter,delete e.paddingInner,delete e.paddingOuter,e.copy=function(){return rO(t())},e}function ei(){return rO(di.apply(null,arguments).paddingInner(1))}const Pp=e=>()=>e;function QN(e,t){return function(r){return e+r*t}}function eC(e,t,r){return e=Math.pow(e,r),t=Math.pow(t,r)-e,r=1/r,function(n){return Math.pow(e+n*t,r)}}function tC(e){return(e=+e)==1?nO:function(t,r){return r-t?eC(t,r,e):Pp(isNaN(t)?r:t)}}function nO(e,t){var r=t-e;return r?QN(e,r):Pp(isNaN(e)?t:e)}const Ib=(function e(t){var r=tC(t);function n(a,i){var o=r((a=Rm(a)).r,(i=Rm(i)).r),s=r(a.g,i.g),l=r(a.b,i.b),c=nO(a.opacity,i.opacity);return function(f){return a.r=o(f),a.g=s(f),a.b=l(f),a.opacity=c(f),a+""}}return n.gamma=e,n})(1);function rC(e,t){t||(t=[]);var r=e?Math.min(t.length,e.length):0,n=t.slice(),a;return function(i){for(a=0;a<r;++a)n[a]=e[a]*(1-i)+t[a]*i;return n}}function nC(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function aC(e,t){var r=t?t.length:0,n=e?Math.min(r,e.length):0,a=new Array(n),i=new Array(r),o;for(o=0;o<n;++o)a[o]=Ea(e[o],t[o]);for(;o<r;
vendor: 5,223 bytes, line 12
12++o)i[o]=t[o];return function(s){for(o=0;o<n;++o)i[o]=a[o](s);return i}}function iC(e,t){var r=new Date;return e=+e,t=+t,function(n){return r.setTime(e*(1-n)+t*n),r}}function Ko(e,t){return e=+e,t=+t,function(r){return e*(1-r)+t*r}}function oC(e,t){var r={},n={},a;(e===null||typeof e!="object")&&(e={}),(t===null||typeof t!="object")&&(t={});for(a in t)a in e?r[a]=Ea(e[a],t[a]):n[a]=t[a];return function(i){for(a in r)n[a]=r[a](i);return n}}var eh=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,If=new RegExp(eh.source,"g");function sC(e){return function(){return e}}function lC(e){return function(t){return e(t)+""}}function cC(e,t){var r=eh.lastIndex=If.lastIndex=0,n,a,i,o=-1,s=[],l=[];for(e=e+"",t=t+"";(n=eh.exec(e))&&(a=If.exec(t));)(i=a.index)>r&&(i=t.slice(r,i),s[o]?s[o]+=i:s[++o]=i),(n=n[0])===(a=a[0])?s[o]?s[o]+=a:s[++o]=a:(s[++o]=null,l.push({i:o,x:Ko(n,a)})),r=If.lastIndex;return r<t.length&&(i=t.slice(r),s[o]?s[o]+=i:s[++o]=i),s.length<2?l[0]?lC(l[0].x):sC(t):(t=l.length,function(c){for(var f=0,d;f<t;++f)s[(d=l[f]).i]=d.x(c);return s.join("")})}function Ea(e,t){var r=typeof t,n;return t==null||r==="boolean"?Pp(t):(r==="number"?Ko:r==="string"?(n=Dm(t))?(t=n,Ib):cC:t instanceof Dm?Ib:t instanceof Date?iC:nC(t)?rC:Array.isArray(t)?aC:typeof t.valueOf!="function"&&typeof t.toString!="function"||isNaN(t)?oC:Ko)(e,t)}function Tp(e,t){return e=+e,t=+t,function(r){return Math.round(e*(1-r)+t*r)}}function uC(e,t){t===void 0&&(t=e,e=Ea);for(var r=0,n=t.length-1,a=t[0],i=new Array(n<0?0:n);r<n;)i[r]=e(a,a=t[++r]);return function(o){var s=Math.max(0,Math.min(n-1,Math.floor(o*=n)));return i[s](o-s)}}function fC(e){return function(){return e}}function Vo(e){return+e}var kb=[0,1];function ut(e){return e}function th(e,t){return(t-=e=+e)?function(r){return(r-e)/t}:fC(isNaN(t)?NaN:.5)}function dC(e,t){var r;return e>t&&(r=e,e=t,t=r),function(n){return Math.max(e,Math.min(t,n))}}function hC(e,t,r){var n=e[0],a=e[1],i=t[0],o=t[1];return a<n?(n=th(a,n),i=r(o,i)):(n=th(n,a),i=r(i,o)),function(s){return i(n(s))}}function pC(e,t,r){var n=Math.min(e.length,t.length)-1,a=new Array(n),i=new Array(n),o=-1;for(e[n]<e[0]&&(e=e.slice().reverse(),t=t.slice().reverse());++o<n;)a[o]=th(e[o],e[o+1]),i[o]=r(t[o],t[o+1]);return function(s){var l=Fi(e,s,1,n)-1;return i[l](a[l](s))}}function zi(e,t){return t.domain(e.domain()).range(e.range()).interpolate(e.interpolate()).clamp(e.clamp()).unknown(e.unknown())}function Vs(){var e=kb,t=kb,r=Ea,n,a,i,o=ut,s,l,c;function f(){var h=Math.min(e.length,t.length);return o!==ut&&(o=dC(e[0],e[h-1])),s=h>2?pC:hC,l=c=null,d}function d(h){return h==null||isNaN(h=+h)?i:(l||(l=s(e.map(n),t,r)))(n(o(h)))}return d.invert=function(h){return o(a((c||(c=s(t,e.map(n),Ko)))(h)))},d.domain=function(h){return arguments.length?(e=Array.from(h,Vo),f()):e.slice()},d.range=function(h){return arguments.length?(t=Array.from(h),f()):t.slice()},d.rangeRound=function(h){return t=Array.from(h),r=Tp,f()},d.clamp=function(h){return arguments.length?(o=h?!0:ut,f()):o!==ut},d.interpolate=function(h){return arguments.length?(r=h,f()):r},d.unknown=function(h){return arguments.length?(i=h,d):i},function(h,p){return n=h,a=p,f()}}function Ep(){return Vs()(ut,ut)}function mC(e){return Math.abs(e=Math.round(e))>=1e21?e.toLocaleString("en").replace(/,/g,""):e.toString(10)}function Xo(e,t){if(!isFinite(e)||e===0)return null;var r=(e=t?e.toExponential(t-1):e.toExponential()).indexOf("e"),n=e.slice(0,r);return[n.length>1?n[0]+n.slice(2):n,+e.slice(r+1)]}function na(e){return e=Xo(Math.abs(e)),e?e[1]:NaN}function vC(e,t){return function(r,n){for(var a=r.length,i=[],o=0,s=e[0],l=0;a>0&&s>0&&(l+s+1>n&&(s=Math.max(1,n-l)),i.push(r.substring(a-=s,a+s)),!((l+=s+1)>n));)s=e[o=(o+1)%e.length];return i.reverse().join(t)}}function gC(e){return function(t){return t.replace(/[0-9]/g,function(r){return e[+r]})}}var yC=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function hi(e){if(!(t=yC.exec(e)))throw new Error("invalid format: "+e);var t;return new Np({fill:t[1],align:t[2],sign:t[3],symbol:t[4],zero:t[5],width:t[6],comma:t[7],precision:t[8]&&t[8].slice(1),trim:t[9],type:t[10]})}hi.prototype=Np.prototype;function Np(e){this.fill=e.fill===void 0?" ":e.fill+"",this.align=e.align===void 0?">":e.align+"",this.sign=e.sign===void 0?"-":e.sign+"",this.symbol=e.symbol===void 0?"":e.symbol+"",this.zero=!!e.zero,this.width=e.width===void 0?void 0:+e.width,this.comma=!!e.comma,this.precision=e.precision===void 0?void 0:+e.precision,this.trim=!!e.trim,this.type=e.type===void 0?"":e.type+""}Np.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(this.width===void 0?"":Math.max(1,this.width|0))+(this.comma?",":"")+(this.precision===void 0?"":"."+Math.max(0,this.precision|0))+(this.trim?"~":"")+this.type};function bC(e){e:for(var t=e.length,r=1,n=-1,a;r<t;++r)switch(e[r]){case".":n=a=r;break;case"0":n===0&&(n=r),a=r;break;default:if(!+e[r])break e;n>0&&(n=0);break}return n>0?e.slice(0,n)+e.slice(a+1):e}var Yo;function xC(e,t){var r=Xo(e,t);if(!r)return Yo=void 0,e.toPrecision(t);var n=r[0],a=r[1],i=a-(Yo=Math.max(-8,Math.min(8,Math.floor(a/3)))*3)+1,o=n.length;return i===o?n:i>o?n+new Array(i-o+1).join("0"):i>
vendor: 5,248 bytes, line 12
120?n.slice(0,i)+"."+n.slice(i):"0."+new Array(1-i).join("0")+Xo(e,Math.max(0,t+i-1))[0]}function Rb(e,t){var r=Xo(e,t);if(!r)return e+"";var n=r[0],a=r[1];return a<0?"0."+new Array(-a).join("0")+n:n.length>a+1?n.slice(0,a+1)+"."+n.slice(a+1):n+new Array(a-n.length+2).join("0")}const Db={"%":(e,t)=>(e*100).toFixed(t),b:e=>Math.round(e).toString(2),c:e=>e+"",d:mC,e:(e,t)=>e.toExponential(t),f:(e,t)=>e.toFixed(t),g:(e,t)=>e.toPrecision(t),o:e=>Math.round(e).toString(8),p:(e,t)=>Rb(e*100,t),r:Rb,s:xC,X:e=>Math.round(e).toString(16).toUpperCase(),x:e=>Math.round(e).toString(16)};function $b(e){return e}var Lb=Array.prototype.map,Bb=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function wC(e){var t=e.grouping===void 0||e.thousands===void 0?$b:vC(Lb.call(e.grouping,Number),e.thousands+""),r=e.currency===void 0?"":e.currency[0]+"",n=e.currency===void 0?"":e.currency[1]+"",a=e.decimal===void 0?".":e.decimal+"",i=e.numerals===void 0?$b:gC(Lb.call(e.numerals,String)),o=e.percent===void 0?"%":e.percent+"",s=e.minus===void 0?"−":e.minus+"",l=e.nan===void 0?"NaN":e.nan+"";function c(d,h){d=hi(d);var p=d.fill,v=d.align,g=d.sign,m=d.symbol,y=d.zero,w=d.width,S=d.comma,O=d.precision,b=d.trim,x=d.type;x==="n"?(S=!0,x="g"):Db[x]||(O===void 0&&(O=12),b=!0,x="g"),(y||p==="0"&&v==="=")&&(y=!0,p="0",v="=");var A=(h&&h.prefix!==void 0?h.prefix:"")+(m==="$"?r:m==="#"&&/[boxX]/.test(x)?"0"+x.toLowerCase():""),j=(m==="$"?n:/[%p]/.test(x)?o:"")+(h&&h.suffix!==void 0?h.suffix:""),E=Db[x],I=/[defgprs%]/.test(x);O=O===void 0?6:/[gprs]/.test(x)?Math.max(1,Math.min(21,O)):Math.max(0,Math.min(20,O));function N(T){var M=A,R=j,D,L,z;if(x==="c")R=E(T)+R,T="";else{T=+T;var $=T<0||1/T<0;if(T=isNaN(T)?l:E(Math.abs(T),O),b&&(T=bC(T)),$&&+T==0&&g!=="+"&&($=!1),M=($?g==="("?g:s:g==="-"||g==="("?"":g)+M,R=(x==="s"&&!isNaN(T)&&Yo!==void 0?Bb[8+Yo/3]:"")+R+($&&g==="("?")":""),I){for(D=-1,L=T.length;++D<L;)if(z=T.charCodeAt(D),48>z||z>57){R=(z===46?a+T.slice(D+1):T.slice(D))+R,T=T.slice(0,D);break}}}S&&!y&&(T=t(T,1/0));var F=M.length+T.length+R.length,K=F<w?new Array(w-F+1).join(p):"";switch(S&&y&&(T=t(K+T,K.length?w-R.length:1/0),K=""),v){case"<":T=M+T+R+K;break;case"=":T=M+K+T+R;break;case"^":T=K.slice(0,F=K.length>>1)+M+T+R+K.slice(F);break;default:T=K+M+T+R;break}return i(T)}return N.toString=function(){return d+""},N}function f(d,h){var p=Math.max(-8,Math.min(8,Math.floor(na(h)/3)))*3,v=Math.pow(10,-p),g=c((d=hi(d),d.type="f",d),{suffix:Bb[8+p/3]});return function(m){return g(v*m)}}return{format:c,formatPrefix:f}}var ho,Cp,aO;SC({thousands:",",grouping:[3],currency:["$",""]});function SC(e){return ho=wC(e),Cp=ho.format,aO=ho.formatPrefix,ho}function OC(e){return Math.max(0,-na(Math.abs(e)))}function AC(e,t){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(na(t)/3)))*3-na(Math.abs(e)))}function _C(e,t){return e=Math.abs(e),t=Math.abs(t)-e,Math.max(0,na(t)-na(e))+1}function iO(e,t,r,n){var a=Jd(e,t,r),i;switch(n=hi(n??",f"),n.type){case"s":{var o=Math.max(Math.abs(e),Math.abs(t));return n.precision==null&&!isNaN(i=AC(a,o))&&(n.precision=i),aO(n,o)}case"":case"e":case"g":case"p":case"r":{n.precision==null&&!isNaN(i=_C(a,Math.max(Math.abs(e),Math.abs(t))))&&(n.precision=i-(n.type==="e"));break}case"f":case"%":{n.precision==null&&!isNaN(i=OC(a))&&(n.precision=i-(n.type==="%")*2);break}}return Cp(n)}function $r(e){var t=e.domain;return e.ticks=function(r){var n=t();return Yd(n[0],n[n.length-1],r??10)},e.tickFormat=function(r,n){var a=t();return iO(a[0],a[a.length-1],r??10,n)},e.nice=function(r){r==null&&(r=10);var n=t(),a=0,i=n.length-1,o=n[a],s=n[i],l,c,f=10;for(s<o&&(c=o,o=s,s=c,c=a,a=i,i=c);f-- >0;){if(c=Zd(o,s,r),c===l)return n[a]=o,n[i]=s,t(n);if(c>0)o=Math.floor(o/c)*c,s=Math.ceil(s/c)*c;else if(c<0)o=Math.ceil(o*c)/c,s=Math.floor(s*c)/c;else break;l=c}return e},e}function Zo(){var e=Ep();return e.copy=function(){return zi(e,Zo())},Rt.apply(e,arguments),$r(e)}function oO(e){var t;function r(n){return n==null||isNaN(n=+n)?t:n}return r.invert=r,r.domain=r.range=function(n){return arguments.length?(e=Array.from(n,Vo),r):e.slice()},r.unknown=function(n){return arguments.length?(t=n,r):t},r.copy=function(){return oO(e).unknown(t)},e=arguments.length?Array.from(e,Vo):[0,1],$r(r)}function sO(e,t){e=e.slice();var r=0,n=e.length-1,a=e[r],i=e[n],o;return i<a&&(o=r,r=n,n=o,o=a,a=i,i=o),e[r]=t.floor(a),e[n]=t.ceil(i),e}function qb(e){return Math.log(e)}function Fb(e){return Math.exp(e)}function jC(e){return-Math.log(-e)}function PC(e){return-Math.exp(-e)}function TC(e){return isFinite(e)?+("1e"+e):e<0?0:e}function EC(e){return e===10?TC:e===Math.E?Math.exp:t=>Math.pow(e,t)}function NC(e){return e===Math.E?Math.log:e===10&&Math.log10||e===2&&Math.log2||(e=Math.log(e),t=>Math.log(t)/e)}function zb(e){return(t,r)=>-e(-t,r)}function Mp(e){const t=e(qb,Fb),r=t.domain;let n=10,a,i;function o(){return a=NC(n),i=EC(n),r()[0]<0?(a=zb(a),i=zb(i),e(jC,PC)):e(qb,Fb),t}return t.base=function(s){return arguments.length?(n=+s,o()):n},t.domain=function(s){return arguments.length?(r(s),o()):r()},t.ticks=s=>{const l=r();let c=l[0],f=l[l.length-1];const d=f<c;d&&([c,f]=[f,c]);let h=a(c),p=a(f),v,g;const m=s==null?10:+s;let y=[];if(!(n%1)&&p-h<m){if(h=Math.floor(h),p=Math.ceil(p),c>0){for(;h<=p;
vendor: 4,666 bytes, line 12
12++h)for(v=1;v<n;++v)if(g=h<0?v/i(-h):v*i(h),!(g<c)){if(g>f)break;y.push(g)}}else for(;h<=p;++h)for(v=n-1;v>=1;--v)if(g=h>0?v/i(-h):v*i(h),!(g<c)){if(g>f)break;y.push(g)}y.length*2<m&&(y=Yd(c,f,m))}else y=Yd(h,p,Math.min(p-h,m)).map(i);return d?y.reverse():y},t.tickFormat=(s,l)=>{if(s==null&&(s=10),l==null&&(l=n===10?"s":","),typeof l!="function"&&(!(n%1)&&(l=hi(l)).precision==null&&(l.trim=!0),l=Cp(l)),s===1/0)return l;const c=Math.max(1,n*s/t.ticks().length);return f=>{let d=f/i(Math.round(a(f)));return d*n<n-.5&&(d*=n),d<=c?l(f):""}},t.nice=()=>r(sO(r(),{floor:s=>i(Math.floor(a(s))),ceil:s=>i(Math.ceil(a(s)))})),t}function lO(){const e=Mp(Vs()).domain([1,10]);return e.copy=()=>zi(e,lO()).base(e.base()),Rt.apply(e,arguments),e}function Ub(e){return function(t){return Math.sign(t)*Math.log1p(Math.abs(t/e))}}function Wb(e){return function(t){return Math.sign(t)*Math.expm1(Math.abs(t))*e}}function Ip(e){var t=1,r=e(Ub(t),Wb(t));return r.constant=function(n){return arguments.length?e(Ub(t=+n),Wb(t)):t},$r(r)}function cO(){var e=Ip(Vs());return e.copy=function(){return zi(e,cO()).constant(e.constant())},Rt.apply(e,arguments)}function Hb(e){return function(t){return t<0?-Math.pow(-t,e):Math.pow(t,e)}}function CC(e){return e<0?-Math.sqrt(-e):Math.sqrt(e)}function MC(e){return e<0?-e*e:e*e}function kp(e){var t=e(ut,ut),r=1;function n(){return r===1?e(ut,ut):r===.5?e(CC,MC):e(Hb(r),Hb(1/r))}return t.exponent=function(a){return arguments.length?(r=+a,n()):r},$r(t)}function Rp(){var e=kp(Vs());return e.copy=function(){return zi(e,Rp()).exponent(e.exponent())},Rt.apply(e,arguments),e}function IC(){return Rp.apply(null,arguments).exponent(.5)}function Gb(e){return Math.sign(e)*e*e}function kC(e){return Math.sign(e)*Math.sqrt(Math.abs(e))}function uO(){var e=Ep(),t=[0,1],r=!1,n;function a(i){var o=kC(e(i));return isNaN(o)?n:r?Math.round(o):o}return a.invert=function(i){return e.invert(Gb(i))},a.domain=function(i){return arguments.length?(e.domain(i),a):e.domain()},a.range=function(i){return arguments.length?(e.range((t=Array.from(i,Vo)).map(Gb)),a):t.slice()},a.rangeRound=function(i){return a.range(i).round(!0)},a.round=function(i){return arguments.length?(r=!!i,a):r},a.clamp=function(i){return arguments.length?(e.clamp(i),a):e.clamp()},a.unknown=function(i){return arguments.length?(n=i,a):n},a.copy=function(){return uO(e.domain(),t).round(r).clamp(e.clamp()).unknown(n)},Rt.apply(a,arguments),$r(a)}function fO(){var e=[],t=[],r=[],n;function a(){var o=0,s=Math.max(1,t.length);for(r=new Array(s-1);++o<s;)r[o-1]=ZN(e,o/s);return i}function i(o){return o==null||isNaN(o=+o)?n:t[Fi(r,o)]}return i.invertExtent=function(o){var s=t.indexOf(o);return s<0?[NaN,NaN]:[s>0?r[s-1]:e[0],s<r.length?r[s]:e[e.length-1]]},i.domain=function(o){if(!arguments.length)return e.slice();e=[];for(let s of o)s!=null&&!isNaN(s=+s)&&e.push(s);return e.sort(Cr),a()},i.range=function(o){return arguments.length?(t=Array.from(o),a()):t.slice()},i.unknown=function(o){return arguments.length?(n=o,i):n},i.quantiles=function(){return r.slice()},i.copy=function(){return fO().domain(e).range(t).unknown(n)},Rt.apply(i,arguments)}function dO(){var e=0,t=1,r=1,n=[.5],a=[0,1],i;function o(l){return l!=null&&l<=l?a[Fi(n,l,0,r)]:i}function s(){var l=-1;for(n=new Array(r);++l<r;)n[l]=((l+1)*t-(l-r)*e)/(r+1);return o}return o.domain=function(l){return arguments.length?([e,t]=l,e=+e,t=+t,s()):[e,t]},o.range=function(l){return arguments.length?(r=(a=Array.from(l)).length-1,s()):a.slice()},o.invertExtent=function(l){var c=a.indexOf(l);return c<0?[NaN,NaN]:c<1?[e,n[0]]:c>=r?[n[r-1],t]:[n[c-1],n[c]]},o.unknown=function(l){return arguments.length&&(i=l),o},o.thresholds=function(){return n.slice()},o.copy=function(){return dO().domain([e,t]).range(a).unknown(i)},Rt.apply($r(o),arguments)}function hO(){var e=[.5],t=[0,1],r,n=1;function a(i){return i!=null&&i<=i?t[Fi(e,i,0,n)]:r}return a.domain=function(i){return arguments.length?(e=Array.from(i),n=Math.min(e.length,t.length-1),a):e.slice()},a.range=function(i){return arguments.length?(t=Array.from(i),n=Math.min(e.length,t.length-1),a):t.slice()},a.invertExtent=function(i){var o=t.indexOf(i);return[e[o-1],e[o]]},a.unknown=function(i){return arguments.length?(r=i,a):r},a.copy=function(){return hO().domain(e).range(t).unknown(r)},Rt.apply(a,arguments)}const kf=new Date,Rf=new Date;function Ke(e,t,r,n){function a(i){return e(i=arguments.length===0?new Date:new Date(+i)),i}return a.floor=i=>(e(i=new Date(+i)),i),a.ceil=i=>(e(i=new Date(i-1)),t(i,1),e(i),i),a.round=i=>{const o=a(i),s=a.ceil(i);return i-o<s-i?o:s},a.offset=(i,o)=>(t(i=new Date(+i),o==null?1:Math.floor(o)),i),a.range=(i,o,s)=>{const l=[];
vendor: 5,833 bytes, line 12
12if(i=a.ceil(i),s=s==null?1:Math.floor(s),!(i<o)||!(s>0))return l;let c;do l.push(c=new Date(+i)),t(i,s),e(i);while(c<i&&i<o);return l},a.filter=i=>Ke(o=>{if(o>=o)for(;e(o),!i(o);)o.setTime(o-1)},(o,s)=>{if(o>=o)if(s<0)for(;++s<=0;)for(;t(o,-1),!i(o););else for(;--s>=0;)for(;t(o,1),!i(o););}),r&&(a.count=(i,o)=>(kf.setTime(+i),Rf.setTime(+o),e(kf),e(Rf),Math.floor(r(kf,Rf))),a.every=i=>(i=Math.floor(i),!isFinite(i)||!(i>0)?null:i>1?a.filter(n?o=>n(o)%i===0:o=>a.count(0,o)%i===0):a)),a}const Jo=Ke(()=>{},(e,t)=>{e.setTime(+e+t)},(e,t)=>t-e);Jo.every=e=>(e=Math.floor(e),!isFinite(e)||!(e>0)?null:e>1?Ke(t=>{t.setTime(Math.floor(t/e)*e)},(t,r)=>{t.setTime(+t+r*e)},(t,r)=>(r-t)/e):Jo);Jo.range;const lr=1e3,Nt=lr*60,cr=Nt*60,mr=cr*24,Dp=mr*7,Kb=mr*30,Df=mr*365,Jr=Ke(e=>{e.setTime(e-e.getMilliseconds())},(e,t)=>{e.setTime(+e+t*lr)},(e,t)=>(t-e)/lr,e=>e.getUTCSeconds());Jr.range;const $p=Ke(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*lr)},(e,t)=>{e.setTime(+e+t*Nt)},(e,t)=>(t-e)/Nt,e=>e.getMinutes());$p.range;const Lp=Ke(e=>{e.setUTCSeconds(0,0)},(e,t)=>{e.setTime(+e+t*Nt)},(e,t)=>(t-e)/Nt,e=>e.getUTCMinutes());Lp.range;const Bp=Ke(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*lr-e.getMinutes()*Nt)},(e,t)=>{e.setTime(+e+t*cr)},(e,t)=>(t-e)/cr,e=>e.getHours());Bp.range;const qp=Ke(e=>{e.setUTCMinutes(0,0,0)},(e,t)=>{e.setTime(+e+t*cr)},(e,t)=>(t-e)/cr,e=>e.getUTCHours());qp.range;const Ui=Ke(e=>e.setHours(0,0,0,0),(e,t)=>e.setDate(e.getDate()+t),(e,t)=>(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*Nt)/mr,e=>e.getDate()-1);Ui.range;const Xs=Ke(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/mr,e=>e.getUTCDate()-1);Xs.range;const pO=Ke(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/mr,e=>Math.floor(e/mr));pO.range;function An(e){return Ke(t=>{t.setDate(t.getDate()-(t.getDay()+7-e)%7),t.setHours(0,0,0,0)},(t,r)=>{t.setDate(t.getDate()+r*7)},(t,r)=>(r-t-(r.getTimezoneOffset()-t.getTimezoneOffset())*Nt)/Dp)}const Ys=An(0),Qo=An(1),RC=An(2),DC=An(3),aa=An(4),$C=An(5),LC=An(6);Ys.range;Qo.range;RC.range;DC.range;aa.range;$C.range;LC.range;function _n(e){return Ke(t=>{t.setUTCDate(t.getUTCDate()-(t.getUTCDay()+7-e)%7),t.setUTCHours(0,0,0,0)},(t,r)=>{t.setUTCDate(t.getUTCDate()+r*7)},(t,r)=>(r-t)/Dp)}const Zs=_n(0),es=_n(1),BC=_n(2),qC=_n(3),ia=_n(4),FC=_n(5),zC=_n(6);Zs.range;es.range;BC.range;qC.range;ia.range;FC.range;zC.range;const Fp=Ke(e=>{e.setDate(1),e.setHours(0,0,0,0)},(e,t)=>{e.setMonth(e.getMonth()+t)},(e,t)=>t.getMonth()-e.getMonth()+(t.getFullYear()-e.getFullYear())*12,e=>e.getMonth());Fp.range;const zp=Ke(e=>{e.setUTCDate(1),e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCMonth(e.getUTCMonth()+t)},(e,t)=>t.getUTCMonth()-e.getUTCMonth()+(t.getUTCFullYear()-e.getUTCFullYear())*12,e=>e.getUTCMonth());zp.range;const vr=Ke(e=>{e.setMonth(0,1),e.setHours(0,0,0,0)},(e,t)=>{e.setFullYear(e.getFullYear()+t)},(e,t)=>t.getFullYear()-e.getFullYear(),e=>e.getFullYear());vr.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:Ke(t=>{t.setFullYear(Math.floor(t.getFullYear()/e)*e),t.setMonth(0,1),t.setHours(0,0,0,0)},(t,r)=>{t.setFullYear(t.getFullYear()+r*e)});vr.range;const gr=Ke(e=>{e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCFullYear(e.getUTCFullYear()+t)},(e,t)=>t.getUTCFullYear()-e.getUTCFullYear(),e=>e.getUTCFullYear());gr.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:Ke(t=>{t.setUTCFullYear(Math.floor(t.getUTCFullYear()/e)*e),t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},(t,r)=>{t.setUTCFullYear(t.getUTCFullYear()+r*e)});gr.range;function mO(e,t,r,n,a,i){const o=[[Jr,1,lr],[Jr,5,5*lr],[Jr,15,15*lr],[Jr,30,30*lr],[i,1,Nt],[i,5,5*Nt],[i,15,15*Nt],[i,30,30*Nt],[a,1,cr],[a,3,3*cr],[a,6,6*cr],[a,12,12*cr],[n,1,mr],[n,2,2*mr],[r,1,Dp],[t,1,Kb],[t,3,3*Kb],[e,1,Df]];function s(c,f,d){const h=f<c;h&&([c,f]=[f,c]);const p=d&&typeof d.range=="function"?d:l(c,f,d),v=p?p.range(c,+f+1):[];return h?v.reverse():v}function l(c,f,d){const h=Math.abs(f-c)/d,p=_p(([,,m])=>m).right(o,h);if(p===o.length)return e.every(Jd(c/Df,f/Df,d));if(p===0)return Jo.every(Math.max(Jd(c,f,d),1));const[v,g]=o[h/o[p-1][2]<o[p][2]/h?p-1:p];return v.every(g)}return[s,l]}const[UC,WC]=mO(gr,zp,Zs,pO,qp,Lp),[HC,GC]=mO(vr,Fp,Ys,Ui,Bp,$p);function $f(e){if(0<=e.y&&e.y<100){var t=new Date(-1,e.m,e.d,e.H,e.M,e.S,e.L);return t.setFullYear(e.y),t}return new Date(e.y,e.m,e.d,e.H,e.M,e.S,e.L)}function Lf(e){if(0<=e.y&&e.y<100){var t=new Date(Date.UTC(-1,e.m,e.d,e.H,e.M,e.S,e.L));return t.setUTCFullYear(e.y),t}return new Date(Date.UTC(e.y,e.m,e.d,e.H,e.M,e.S,e.L))}function La(e,t,r){return{y:e,m:t,d:r,H:0,M:0,S:0,L:0}}function KC(e){var t=e.dateTime,r=e.date,n=e.time,a=e.periods,i=e.days,o=e.shortDays,s=e.months,l=e.shortMonths,c=Ba(a),f=qa(a),d=Ba(i),h=qa(i),p=Ba(o),v=qa(o),g=Ba(s),m=qa(s),y=Ba(l),w=qa(l),S={a:z,A:$,b:F,B:K,c:null,d:Qb,e:Qb,f:vM,g:jM,G:TM,H:hM,I:pM,j:mM,L:vO,m:gM,M:yM,p:V,q:G,Q:rx,s:nx,S:bM,u:xM,U:wM,V:SM,w:OM,W:AM,x:null,X:null,y:_M,Y:PM,Z:EM,"%":tx},O={a:Q,A:Se,b:ae,B:lt,c:null,d:ex,e:ex,f:IM,g:UM,G:HM,H:NM,I:CM,j:MM,L:yO,m:kM,M:RM,p:ar,q:tt,Q:rx,s:nx,S:DM,u:$M,U:LM,V:BM,w:qM,W:FM,x:null,X:null,y:zM,Y:WM,Z:GM,"%":tx},b={a:I,A:N,b:T,B:M,c:R,d:Zb,e:Zb,f:cM,g:Yb,G:Xb,H:Jb,I:Jb,j:iM,L:lM,m:aM,M:oM,p:E,q:nM,Q:fM,s:dM,S:sM,u:JC,U:QC,V:eM,w:ZC,W:tM,x:D,X:L,y:Yb,Y:Xb,Z:rM,"%":uM};S.x=x(r,S),S.X=x(n,S),S.c=x(t,S),O.x=x(r,O),O.X=x(n,O),O.c=x(t,O);function x(X,oe){return function(le){var U=[],Me=-1,he=0,ie=X.length,ke,ue,St;for(le instanceof Date||(le=new Date(+le));++Me<ie;)X.charCodeAt(Me)===37&&(U.push(X.slice(he,Me)),(ue=Vb[ke=X.charAt(++Me)])!=null?ke=X.charAt(++Me):ue=ke==="e"?" ":"0",(St=oe[ke])&&(ke=St(le,ue)),U.push(ke),he=Me+1);return U.push(X.slice(he,Me)),U.join("")}}function A(X,oe){return function(le){var U=La(1900,void 0,1),Me=j(U,X,le+="",0),he,ie;if(Me!=le.length)return null;
vendor: 7,198 bytes, line 12
12if("Q"in U)return new Date(U.Q);if("s"in U)return new Date(U.s*1e3+("L"in U?U.L:0));if(oe&&!("Z"in U)&&(U.Z=0),"p"in U&&(U.H=U.H%12+U.p*12),U.m===void 0&&(U.m="q"in U?U.q:0),"V"in U){if(U.V<1||U.V>53)return null;"w"in U||(U.w=1),"Z"in U?(he=Lf(La(U.y,0,1)),ie=he.getUTCDay(),he=ie>4||ie===0?es.ceil(he):es(he),he=Xs.offset(he,(U.V-1)*7),U.y=he.getUTCFullYear(),U.m=he.getUTCMonth(),U.d=he.getUTCDate()+(U.w+6)%7):(he=$f(La(U.y,0,1)),ie=he.getDay(),he=ie>4||ie===0?Qo.ceil(he):Qo(he),he=Ui.offset(he,(U.V-1)*7),U.y=he.getFullYear(),U.m=he.getMonth(),U.d=he.getDate()+(U.w+6)%7)}else("W"in U||"U"in U)&&("w"in U||(U.w="u"in U?U.u%7:"W"in U?1:0),ie="Z"in U?Lf(La(U.y,0,1)).getUTCDay():$f(La(U.y,0,1)).getDay(),U.m=0,U.d="W"in U?(U.w+6)%7+U.W*7-(ie+5)%7:U.w+U.U*7-(ie+6)%7);return"Z"in U?(U.H+=U.Z/100|0,U.M+=U.Z%100,Lf(U)):$f(U)}}function j(X,oe,le,U){for(var Me=0,he=oe.length,ie=le.length,ke,ue;Me<he;){if(U>=ie)return-1;if(ke=oe.charCodeAt(Me++),ke===37){if(ke=oe.charAt(Me++),ue=b[ke in Vb?oe.charAt(Me++):ke],!ue||(U=ue(X,le,U))<0)return-1}else if(ke!=le.charCodeAt(U++))return-1}return U}function E(X,oe,le){var U=c.exec(oe.slice(le));return U?(X.p=f.get(U[0].toLowerCase()),le+U[0].length):-1}function I(X,oe,le){var U=p.exec(oe.slice(le));return U?(X.w=v.get(U[0].toLowerCase()),le+U[0].length):-1}function N(X,oe,le){var U=d.exec(oe.slice(le));return U?(X.w=h.get(U[0].toLowerCase()),le+U[0].length):-1}function T(X,oe,le){var U=y.exec(oe.slice(le));return U?(X.m=w.get(U[0].toLowerCase()),le+U[0].length):-1}function M(X,oe,le){var U=g.exec(oe.slice(le));return U?(X.m=m.get(U[0].toLowerCase()),le+U[0].length):-1}function R(X,oe,le){return j(X,t,oe,le)}function D(X,oe,le){return j(X,r,oe,le)}function L(X,oe,le){return j(X,n,oe,le)}function z(X){return o[X.getDay()]}function $(X){return i[X.getDay()]}function F(X){return l[X.getMonth()]}function K(X){return s[X.getMonth()]}function V(X){return a[+(X.getHours()>=12)]}function G(X){return 1+~~(X.getMonth()/3)}function Q(X){return o[X.getUTCDay()]}function Se(X){return i[X.getUTCDay()]}function ae(X){return l[X.getUTCMonth()]}function lt(X){return s[X.getUTCMonth()]}function ar(X){return a[+(X.getUTCHours()>=12)]}function tt(X){return 1+~~(X.getUTCMonth()/3)}return{format:function(X){var oe=x(X+="",S);return oe.toString=function(){return X},oe},parse:function(X){var oe=A(X+="",!1);return oe.toString=function(){return X},oe},utcFormat:function(X){var oe=x(X+="",O);return oe.toString=function(){return X},oe},utcParse:function(X){var oe=A(X+="",!0);return oe.toString=function(){return X},oe}}}var Vb={"-":"",_:" ",0:"0"},Ye=/^\s*\d+/,VC=/^%/,XC=/[\\^$*+?|[\]().{}]/g;function ve(e,t,r){var n=e<0?"-":"",a=(n?-e:e)+"",i=a.length;return n+(i<r?new Array(r-i+1).join(t)+a:a)}function YC(e){return e.replace(XC,"\\$&")}function Ba(e){return new RegExp("^(?:"+e.map(YC).join("|")+")","i")}function qa(e){return new Map(e.map((t,r)=>[t.toLowerCase(),r]))}function ZC(e,t,r){var n=Ye.exec(t.slice(r,r+1));return n?(e.w=+n[0],r+n[0].length):-1}function JC(e,t,r){var n=Ye.exec(t.slice(r,r+1));return n?(e.u=+n[0],r+n[0].length):-1}function QC(e,t,r){var n=Ye.exec(t.slice(r,r+2));return n?(e.U=+n[0],r+n[0].length):-1}function eM(e,t,r){var n=Ye.exec(t.slice(r,r+2));return n?(e.V=+n[0],r+n[0].length):-1}function tM(e,t,r){var n=Ye.exec(t.slice(r,r+2));return n?(e.W=+n[0],r+n[0].length):-1}function Xb(e,t,r){var n=Ye.exec(t.slice(r,r+4));return n?(e.y=+n[0],r+n[0].length):-1}function Yb(e,t,r){var n=Ye.exec(t.slice(r,r+2));return n?(e.y=+n[0]+(+n[0]>68?1900:2e3),r+n[0].length):-1}function rM(e,t,r){var n=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(t.slice(r,r+6));return n?(e.Z=n[1]?0:-(n[2]+(n[3]||"00")),r+n[0].length):-1}function nM(e,t,r){var n=Ye.exec(t.slice(r,r+1));return n?(e.q=n[0]*3-3,r+n[0].length):-1}function aM(e,t,r){var n=Ye.exec(t.slice(r,r+2));return n?(e.m=n[0]-1,r+n[0].length):-1}function Zb(e,t,r){var n=Ye.exec(t.slice(r,r+2));return n?(e.d=+n[0],r+n[0].length):-1}function iM(e,t,r){var n=Ye.exec(t.slice(r,r+3));return n?(e.m=0,e.d=+n[0],r+n[0].length):-1}function Jb(e,t,r){var n=Ye.exec(t.slice(r,r+2));return n?(e.H=+n[0],r+n[0].length):-1}function oM(e,t,r){var n=Ye.exec(t.slice(r,r+2));return n?(e.M=+n[0],r+n[0].length):-1}function sM(e,t,r){var n=Ye.exec(t.slice(r,r+2));return n?(e.S=+n[0],r+n[0].length):-1}function lM(e,t,r){var n=Ye.exec(t.slice(r,r+3));return n?(e.L=+n[0],r+n[0].length):-1}function cM(e,t,r){var n=Ye.exec(t.slice(r,r+6));return n?(e.L=Math.floor(n[0]/1e3),r+n[0].length):-1}function uM(e,t,r){var n=VC.exec(t.slice(r,r+1));return n?r+n[0].length:-1}function fM(e,t,r){var n=Ye.exec(t.slice(r));return n?(e.Q=+n[0],r+n[0].length):-1}function dM(e,t,r){var n=Ye.exec(t.slice(r));return n?(e.s=+n[0],r+n[0].length):-1}function Qb(e,t){return ve(e.getDate(),t,2)}function hM(e,t){return ve(e.getHours(),t,2)}function pM(e,t){return ve(e.getHours()%12||12,t,2)}function mM(e,t){return ve(1+Ui.count(vr(e),e),t,3)}function vO(e,t){return ve(e.getMilliseconds(),t,3)}function vM(e,t){return vO(e,t)+"000"}function gM(e,t){return ve(e.getMonth()+1,t,2)}function yM(e,t){return ve(e.getMinutes(),t,2)}function bM(e,t){return ve(e.getSeconds(),t,2)}function xM(e){var t=e.getDay();return t===0?7:t}function wM(e,t){return ve(Ys.count(vr(e)-1,e),t,2)}function gO(e){var t=e.getDay();return t>=4||t===0?aa(e):aa.ceil(e)}function SM(e,t){return e=gO(e),ve(aa.count(vr(e),e)+(vr(e).getDay()===4),t,2)}function OM(e){return e.getDay()}function AM(e,t){return ve(Qo.count(vr(e)-1,e),t,2)}function _M(e,t){return ve(e.getFullYear()%100,t,2)}function jM(e,t){return e=gO(e),ve(e.getFullYear()%100,t,2)}function PM(e,t){return ve(e.getFullYear()%1e4,t,4)}function TM(e,t){var r=e.getDay();return e=r>=4||r===0?aa(e):aa.ceil(e),ve(e.getFullYear()%1e4,t,4)}function EM(e){var t=e.getTimezoneOffset();return(t>0?"-":(t*=-1,"+"))+ve(t/60|0,"0",2)+ve(t%60,"0",2)}function ex(e,t){return ve(e.getUTCDate(),t,2)}function NM(e,t){return ve(e.getUTCHours(),t,2)}function CM(e,t){return ve(e.getUTCHours()%12||12,t,2)}function MM(e,t){return ve(1+Xs.count(gr(e),e),t,3)}function yO(e,t){return ve(e.getUTCMilliseconds(),t,3)}function IM(e,t){return yO(e,t)+"000"}function kM(e,t){return ve(e.getUTCMonth()+1,t,2)}function RM(e,t){return ve(e.getUTCMinutes(),t,2)}function DM(e,t){return ve(e.getUTCSeconds(),t,2)}function $M(e){var t=e.getUTCDay();return t===0?7:t}function LM(e,t){return ve(Zs.count(gr(e)-1,e),t,2)}function bO(e){var t=e.getUTCDay();return t>=4||t===0?ia(e):ia.ceil(e)}function BM(e,t){return e=bO(e),ve(ia.count(gr(e),e)+(gr(e).getUTCDay()===4),t,2)}function qM(e){return e.getUTCDay()}function FM(e,t){return ve(es.count(gr(e)-1,e),t,2)}function zM(e,t){return ve(e.getUTCFullYear()%100,t,2)}function UM(e,t){return e=bO(e),ve(e.getUTCFullYear()%100,t,2)}function WM(e,t){return ve(e.getUTCFullYear()%1e4,t,4)}function HM(e,t){var r=e.getUTCDay();return e=r>=4||r===0?ia(e):ia.ceil(e),ve(e.getUTCFullYear()%1e4,t,4)}function GM(){return"+0000"}function tx(){return"%"}function rx(e){return+e}function nx(e){return Math.floor(+e/1e3)}var Dn,xO,wO;KM({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Frid
12ay","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]});function KM(e){return Dn=KC(e),xO=Dn.format,Dn.parse,wO=Dn.utcFormat,Dn.utcParse,Dn}function VM(e){return new Date(e)}function XM(e){return e instanceof Date?+e:+new Date(+e)}function Up(e,t,r,n,a,i,o,s,l,c){var f=Ep(),d=f.invert,h=f.domain,p=c(".%L"),v=c(":%S"),g=c("%I:%M"),m=c("%I %p"),y=c("%a %d"),w=c("%b %d"),S=c("%B"),O=c("%Y");function b(x){return(l(x)<x?p:s(x)<x?v:o(x)<x?g:i(x)<x?m:n(x)<x?a(x)<x?y:w:r(x)<x?S:O)(x)}return f.invert=function(x){return new Date(d(x))},f.domain=function(x){return arguments.length?h(Array.from(x,XM)):h().map(VM)},f.ticks=function(x){var A=h();return e(A[0],A[A.length-1],x??10)},f.tickFormat=function(x,A){return A==null?b:c(A)},f.nice=function(x){var A=h();return(!x||typeof x.range!="function")&&(x=t(A[0],A[A.length-1],x??10)),x?h(sO(A,x)):f},f.copy=function(){return zi(f,Up(e,t,r,n,a,i,o,s,l,c))},f}function YM(){return Rt.apply(Up(HC,GC,vr,Fp,Ys,Ui,Bp,$p,Jr,xO).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)}function ZM(){return Rt.apply(Up(UC,WC,gr,zp,Zs,Xs,qp,Lp,Jr,wO).domain([Date.UTC(2e3,0,1),Date.UTC(2e3,0,2)]),arguments)}function Js(){var e=0,t=1,r,n,a,i,o=ut,s=!1,l;function c(d){return d==null||isNaN(d=+d)?l:o(a===0?.5:(d=(i(d)-r)*a,s?Math.max(0,Math.min(1,d)):d))}c.domain=function(d){return arguments.length?([e,t]=d,r=i(e=+e),n=i(t=+t),a=r===n?0:1/(n-r),c):[e,t]},c.clamp=function(d){return arguments.length?(s=!!d,c):s},c.interpolator=function(d){return arguments.length?(o=d,c):o};function f(d){return function(h){var p,v;return arguments.length?([p,v]=h,o=d(p,v),c):[o(0),o(1)]}}return c.range=f(Ea),c.rangeRound=f(Tp),c.unknown=function(d){return arguments.length?(l=d,c):l},function(d){return i=d,r=d(e),n=d(t),a=r===n?0:1/(n-r),c}}function Lr(e,t){return t.domain(e.domain()).interpolator(e.interpolator()).clamp(e.clamp()).unknown(e.unknown())}function SO(){var e=$r(Js()(ut));return e.copy=function(){return Lr(e,SO())},xr.apply(e,arguments)}function OO(){var e=Mp(Js()).domain([1,10]);return e.copy=function(){return Lr(e,OO()).base(e.base())},xr.apply(e,arguments)}function AO(){var e=Ip(Js());return e.copy=function(){return Lr(e,AO()).constant(e.constant())},xr.apply(e,arguments)}function Wp(){var e=kp(Js());return e.copy=function(){return Lr(e,Wp()).exponent(e.exponent())},xr.apply(e,arguments)}function JM(){return Wp.apply(null,arguments).exponent(.5)}function _O(){var e=[],t=ut;function r(n){if(n!=null&&!isNaN(n=+n))return t((Fi(e,n,1)-1)/(e.length-1))}return r.domain=function(n){if(!arguments.length)return e.slice();e=[];for(let a of n)a!=null&&!isNaN(a=+a)&&e.push(a);return e.sort(Cr),r},r.interpolator=function(n){return arguments.length?(t=n,r):t},r.range=function(){return e.map((n,a)=>t(a/(e.length-1)))},r.quantiles=function(n){return Array.from({length:n+1},(a,i)=>YN(e,i/n))},r.copy=function(){return _O(t).domain(e)},xr.apply(r,arguments)}function Qs(){var e=0,t=.5,r=1,n=1,a,i,o,s,l,c=ut,f,d=!1,h;function p(g){return isNaN(g=+g)?h:(g=.5+((g=+f(g))-i)*(n*g<n*i?s:l),c(d?Math.max(0,Math.min(1,g)):g))}p.domain=function(g){return arguments.length?([e,t,r]=g,a=f(e=+e),i=f(t=+t),o=f(r=+r),s=a===i?0:.5/(i-a),l=i===o?0:.5/(o-i),n=i<a?-1:1,p):[e,t,r]},p.clamp=function(g){return arguments.length?(d=!!g,p):d},p.interpolator=function(g){return arguments.length?(c=g,p):c};function v(g){return function(m){var y,w,S;return arguments.length?([y,w,S]=m,c=uC(g,[y,w,S]),p):[c(0),c(.5),c(1)]}}return p.range=v(Ea),p.rangeRound=v(Tp),p.unknown=function(g){return arguments.length?(h=g,p):h},function(g){return f=g,a=g(e),i=g(t),o=g(r),s=a===i?0:.5/(i-a),l=i===o?0:.5/(o-i),n=i<a?-1:1,p}}function jO(){var e=$r(Qs()(ut));return e.copy=function(){return Lr(e,jO())},xr.apply(e,arguments)}function PO(){var e=Mp(Qs()).domain([.1,1,10]);return e.copy=function(){return Lr(e,PO()).base(e.base())},xr.apply(e,arguments)}function TO(){var e=Ip(Qs());return e.copy=function(){return Lr(e,TO()).constant(e.constant())},xr.apply(e,arguments)}function Hp(){var e=kp(Qs());return e.copy=function(){return Lr(e,Hp()).exponent(e.exponent())},xr.apply(e,arguments)}function QM(){return Hp.apply(null,arguments).exponent(.5)}const ax=Object.freeze(Object.defineProperty({__proto__:null,scaleBand:di,scaleDiverging:jO,scaleDivergingLog:PO,scaleDivergingPow:Hp,scaleDivergingSqrt:QM,scaleDivergingSymlog:TO,scaleIdentity:oO,scaleImplicit:Qd,scaleLinear:Zo,scaleLog:lO,scaleOrdinal:jp,scalePoint:ei,scalePow:Rp,scaleQuantile:fO,scaleQuantize:dO,scaleRadial:uO,scaleSequential:SO,scaleSequentialLog:OO,scaleSequentialPow:Wp,scaleSequentialQuantile:_O,scaleSequentialSqrt:JM,scaleSequentialSymlog:AO,scaleSqrt:IC,scaleSymlog:cO,scaleThreshold:hO,scaleTime:YM,scaleUtc:ZM,tickFormat:iO},Symbol.toStringTag,{value:"Module"}));var Bf,ix;function EO(){if(ix)return Bf;ix=1;var e=Aa();function t(r,n,a){for(var i=-1,o=r.length;++i<o;){var s=r[i],l=n(s);if(l!=null&&(c===void 0?l===l&&!e(l):a(l,c)))var c=l,f=s}return f}return Bf=t,Bf}var qf,ox;function eI(){if(ox)return qf;ox=1;function e(t,r){return t>r}return qf=e,qf}var Ff,sx;function tI(){if(sx)return Ff;sx=1;var e=EO(),t=eI(),r=Ta();function n(a){return a&&a.length?e(a,r,t):void 0}return Ff=n,Ff}var rI=tI();const Er=Ce(rI);var zf,lx;function nI(){if(lx)return zf;lx=1;function e(t,r){return t<r}return zf=e,zf}var Uf,cx;function aI(){if(cx)return Uf;cx=1;var e=EO(),t=nI(),r=Ta();function n(a){return a&&a.length?e(a,r,t):void 0}return Uf=n,Uf}var iI=aI();const el=Ce(iI);var Wf,ux;function oI(){if(ux)return Wf;ux=1;var e=lp(),t=Dr(),r=qS(),n=mt();function a(i,o){var s=n(i)?e:r;return s(i,t(o,3))}return Wf=a,Wf}var Hf,fx;function sI(){if(fx)return Hf;fx=1;var e=LS(),t=oI();function r(n,a){return e(t(n,a),1)}return Hf=r,Hf}var lI=sI();const cI=Ce(lI);var Gf,dx;function uI(){if(dx)return Gf;dx=1;var e=wp();function t(r,n){return e(r,n)}
vendor: 240,221 bytes, lines 12-61
12return Gf=t,Gf}var fI=uI();const oa=Ce(fI);var Na=1e9,dI={precision:20,rounding:4,toExpNeg:-7,toExpPos:21,LN10:"2.302585092994045684017991454684364207601101488628772976033327900967572609677352480235997205089598298341967784042286"},Kp,Ie=!0,kt="[DecimalError] ",an=kt+"Invalid argument: ",Gp=kt+"Exponent out of range: ",Ca=Math.floor,Vr=Math.pow,hI=/^(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,wt,Ve=1e7,Ee=7,NO=9007199254740991,ts=Ca(NO/Ee),Z={};Z.absoluteValue=Z.abs=function(){var e=new this.constructor(this);return e.s&&(e.s=1),e};Z.comparedTo=Z.cmp=function(e){var t,r,n,a,i=this;if(e=new i.constructor(e),i.s!==e.s)return i.s||-e.s;if(i.e!==e.e)return i.e>e.e^i.s<0?1:-1;for(n=i.d.length,a=e.d.length,t=0,r=n<a?n:a;t<r;++t)if(i.d[t]!==e.d[t])return i.d[t]>e.d[t]^i.s<0?1:-1;return n===a?0:n>a^i.s<0?1:-1};Z.decimalPlaces=Z.dp=function(){var e=this,t=e.d.length-1,r=(t-e.e)*Ee;if(t=e.d[t],t)for(;t%10==0;t/=10)r--;return r<0?0:r};Z.dividedBy=Z.div=function(e){return hr(this,new this.constructor(e))};Z.dividedToIntegerBy=Z.idiv=function(e){var t=this,r=t.constructor;return Oe(hr(t,new r(e),0,1),r.precision)};Z.equals=Z.eq=function(e){return!this.cmp(e)};Z.exponent=function(){return Fe(this)};Z.greaterThan=Z.gt=function(e){return this.cmp(e)>0};Z.greaterThanOrEqualTo=Z.gte=function(e){return this.cmp(e)>=0};Z.isInteger=Z.isint=function(){return this.e>this.d.length-2};Z.isNegative=Z.isneg=function(){return this.s<0};Z.isPositive=Z.ispos=function(){return this.s>0};Z.isZero=function(){return this.s===0};Z.lessThan=Z.lt=function(e){return this.cmp(e)<0};Z.lessThanOrEqualTo=Z.lte=function(e){return this.cmp(e)<1};Z.logarithm=Z.log=function(e){var t,r=this,n=r.constructor,a=n.precision,i=a+5;if(e===void 0)e=new n(10);else if(e=new n(e),e.s<1||e.eq(wt))throw Error(kt+"NaN");if(r.s<1)throw Error(kt+(r.s?"NaN":"-Infinity"));return r.eq(wt)?new n(0):(Ie=!1,t=hr(pi(r,i),pi(e,i),i),Ie=!0,Oe(t,a))};Z.minus=Z.sub=function(e){var t=this;return e=new t.constructor(e),t.s==e.s?IO(t,e):CO(t,(e.s=-e.s,e))};Z.modulo=Z.mod=function(e){var t,r=this,n=r.constructor,a=n.precision;if(e=new n(e),!e.s)throw Error(kt+"NaN");return r.s?(Ie=!1,t=hr(r,e,0,1).times(e),Ie=!0,r.minus(t)):Oe(new n(r),a)};Z.naturalExponential=Z.exp=function(){return MO(this)};Z.naturalLogarithm=Z.ln=function(){return pi(this)};Z.negated=Z.neg=function(){var e=new this.constructor(this);return e.s=-e.s||0,e};Z.plus=Z.add=function(e){var t=this;return e=new t.constructor(e),t.s==e.s?CO(t,e):IO(t,(e.s=-e.s,e))};Z.precision=Z.sd=function(e){var t,r,n,a=this;if(e!==void 0&&e!==!!e&&e!==1&&e!==0)throw Error(an+e);if(t=Fe(a)+1,n=a.d.length-1,r=n*Ee+1,n=a.d[n],n){for(;n%10==0;n/=10)r--;for(n=a.d[0];n>=10;n/=10)r++}return e&&t>r?t:r};Z.squareRoot=Z.sqrt=function(){var e,t,r,n,a,i,o,s=this,l=s.constructor;if(s.s<1){if(!s.s)return new l(0);throw Error(kt+"NaN")}for(e=Fe(s),Ie=!1,a=Math.sqrt(+s),a==0||a==1/0?(t=Zt(s.d),(t.length+e)%2==0&&(t+="0"),a=Math.sqrt(t),e=Ca((e+1)/2)-(e<0||e%2),a==1/0?t="5e"+e:(t=a.toExponential(),t=t.slice(0,t.indexOf("e")+1)+e),n=new l(t)):n=new l(a.toString()),r=l.precision,a=o=r+3;;)if(i=n,n=i.plus(hr(s,i,o+2)).times(.5),Zt(i.d).slice(0,o)===(t=Zt(n.d)).slice(0,o)){if(t=t.slice(o-3,o+1),a==o&&t=="4999"){if(Oe(i,r+1,0),i.times(i).eq(s)){n=i;break}}else if(t!="9999")break;o+=4}return Ie=!0,Oe(n,r)};Z.times=Z.mul=function(e){var t,r,n,a,i,o,s,l,c,f=this,d=f.constructor,h=f.d,p=(e=new d(e)).d;if(!f.s||!e.s)return new d(0);for(e.s*=f.s,r=f.e+e.e,l=h.length,c=p.length,l<c&&(i=h,h=p,p=i,o=l,l=c,c=o),i=[],o=l+c,n=o;n--;)i.push(0);for(n=c;--n>=0;){for(t=0,a=l+n;a>n;)s=i[a]+p[n]*h[a-n-1]+t,i[a--]=s%Ve|0,t=s/Ve|0;i[a]=(i[a]+t)%Ve|0}for(;!i[--o];)i.pop();return t?++r:i.shift(),e.d=i,e.e=r,Ie?Oe(e,d.precision):e};Z.toDecimalPlaces=Z.todp=function(e,t){var r=this,n=r.constructor;return r=new n(r),e===void 0?r:(er(e,0,Na),t===void 0?t=n.rounding:er(t,0,8),Oe(r,e+Fe(r)+1,t))};Z.toExponential=function(e,t){var r,n=this,a=n.constructor;return e===void 0?r=un(n,!0):(er(e,0,Na),t===void 0?t=a.rounding:er(t,0,8),n=Oe(new a(n),e+1,t),r=un(n,!0,e+1)),r};Z.toFixed=function(e,t){var r,n,a=this,i=a.constructor;return e===void 0?un(a):(er(e,0,Na),t===void 0?t=i.rounding:er(t,0,8),n=Oe(new i(a),e+Fe(a)+1,t),r=un(n.abs(),!1,e+Fe(n)+1),a.isneg()&&!a.isZero()?"-"+r:r)};Z.toInteger=Z.toint=function(){var e=this,t=e.constructor;return Oe(new t(e),Fe(e)+1,t.rounding)};Z.toNumber=function(){return+this};Z.toPower=Z.pow=function(e){var t,r,n,a,i,o,s=this,l=s.constructor,c=12,f=+(e=new l(e));if(!e.s)return new l(wt);if(s=new l(s),!s.s){if(e.s<1)throw Error(kt+"Infinity");return s}if(s.eq(wt))return s;if(n=l.precision,e.eq(wt))return Oe(s,n);if(t=e.e,r=e.d.length-1,o=t>=r,i=s.s,o){if((r=f<0?-f:f)<=NO){for(a=new l(wt),t=Math.ceil(n/Ee+4),Ie=!1;r%2&&(a=a.times(s),px(a.d,t)),r=Ca(r/2),r!==0;)s=s.times(s),px(s.d,t);return Ie=!0,e.s<0?new l(wt).div(a):Oe(a,n)}}else if(i<0)throw Error(kt+"NaN");return i=i<0&&e.d[Math.max(t,r)]&1?-1:1,s.s=1,Ie=!1,a=e.times(pi(s,n+c)),Ie=!0,a=MO(a),a.s=i,a};Z.toPrecision=function(e,t){var r,n,a=this,i=a.constructor;return e===void 0?(r=Fe(a),n=un(a,r<=i.toExpNeg||r>=i.toExpPos)):(er(e,1,Na),t===void 0?t=i.rounding:er(t,0,8),a=Oe(new i(a),e,t),r=Fe(a),n=un(a,e<=r||r<=i.toExpNeg,e)),n};Z.toSignificantDigits=Z.tosd=function(e,t){var r=this,n=r.constructor;return e===void 0?(e=n.precision,t=n.rounding):(er(e,1,Na),t===void 0?t=n.rounding:er(t,0,8)),Oe(new n(r),e,t)};Z.toString=Z.valueOf=Z.val=Z.toJSON=Z[Symbol.for("nodejs.util.inspect.custom")]=function(){var e=this,t=Fe(e),r=e.constructor;return un(e,t<=r.toExpNeg||t>=r.toExpPos)};function CO(e,t){var r,n,a,i,o,s,l,c,f=e.constructor,d=f.precision;if(!e.s||!t.s)return t.s||(t=new f(e)),Ie?Oe(t,d):t;if(l=e.d,c=t.d,o=e.e,a=t.e,l=l.slice(),i=o-a,i){for(i<0?(n=l,i=-i,s=c.length):(n=c,a=o,s=l.length),o=Math.ceil(d/Ee),s=o>s?o+1:s+1,i>s&&(i=s,n.length=1),n.reverse();i--;)n.push(0);n.reverse()}for(s=l.length,i=c.length,s-i<0&&(i=s,n=c,c=l,l=n),r=0;i;)r=(l[--i]=l[i]+c[i]+r)/Ve|0,l[i]%=Ve;for(r&&(l.unshift(r),++a),s=l.length;l[--s]==0;)l.pop();return t.d=l,t.e=a,Ie?Oe(t,d):t}function er(e,t,r){if(e!==~~e||e<t||e>r)throw Error(an+e)}function Zt(e){var t,r,n,a=e.length-1,i="",o=e[0];if(a>0){for(i+=o,t=1;t<a;t++)n=e[t]+"",r=Ee-n.length,r&&(i+=jr(r)),i+=n;o=e[t],n=o+"",r=Ee-n.length,r&&(i+=jr(r))}else if(o===0)return"0";for(;o%10===0;)o/=10;return i+o}var hr=(function(){function e(n,a){var i,o=0,s=n.length;for(n=n.slice();s--;)i=n[s]*a+o,n[s]=i%Ve|0,o=i/Ve|0;return o&&n.unshift(o),n}function t(n,a,i,o){var s,l;if(i!=o)l=i>o?1:-1;else for(s=l=0;s<i;s++)if(n[s]!=a[s]){l=n[s]>a[s]?1:-1;break}return l}function r(n,a,i){for(var o=0;i--;)n[i]-=o,o=n[i]<a[i]?1:0,n[i]=o*Ve+n[i]-a[i];for(;!n[0]&&n.length>1;)n.shift()}return function(n,a,i,o){var s,l,c,f,d,h,p,v,g,m,y,w,S,O,b,x,A,j,E=n.constructor,I=n.s==a.s?1:-1,N=n.d,T=a.d;if(!n.s)return new E(n);if(!a.s)throw Error(kt+"Division by zero");for(l=n.e-a.e,A=T.length,b=N.length,p=new E(I),v=p.d=[],c=0;T[c]==(N[c]||0);)++c;if(T[c]>(N[c]||0)&&--l,i==null?w=i=E.precision:o?w=i+(Fe(n)-Fe(a))+1:w=i,w<0)return new E(0);if(w=w/Ee+2|0,c=0,A==1)for(f=0,T=T[0],w++;(c<b||f)&&w--;c++)S=f*Ve+(N[c]||0),v[c]=S/T|0,f=S%T|0;else{for(f=Ve/(T[0]+1)|0,f>1&&(T=e(T,f),N=e(N,f),A=T.length,b=N.length),O=A,g=N.slice(0,A),m=g.length;m<A;)g[m++]=0;j=T.slice(),j.unshift(0),x=T[0],T[1]>=Ve/2&&++x;do f=0,s=t(T,g,A,m),s<0?(y=g[0],A!=m&&(y=y*Ve+(g[1]||0)),f=y/x|0,f>1?(f>=Ve&&(f=Ve-1),d=e(T,f),h=d.length,m=g.length,s=t(d,g,h,m),s==1&&(f--,r(d,A<h?j:T,h))):(f==0&&(s=f=1),d=T.slice()),h=d.length,h<m&&d.unshift(0),r(g,d,m),s==-1&&(m=g.length,s=t(T,g,A,m),s<1&&(f++,r(g,A<m?j:T,m))),m=g.length):s===0&&(f++,g=[0]),v[c++]=f,s&&g[0]?g[m++]=N[O]||0:(g=[N[O]],m=1);while((O++<b||g[0]!==void 0)&&w--)}return v[0]||v.shift(),p.e=l,Oe(p,o?i+Fe(p)+1:i)}})();function MO(e,t){var r,n,a,i,o,s,l=0,c=0,f=e.constructor,d=f.precision;if(Fe(e)>16)throw Error(Gp+Fe(e));if(!e.s)return new f(wt);for(Ie=!1,s=d,o=new f(.03125);e.abs().gte(.1);)e=e.times(o),c+=5;for(n=Math.log(Vr(2,c))/Math.LN10*2+5|0,s+=n,r=a=i=new f(wt),f.precision=s;;){if(a=Oe(a.times(e),s),r=r.times(++l),o=i.plus(hr(a,r,s)),Zt(o.d).slice(0,s)===Zt(i.d).slice(0,s)){for(;c--;)i=Oe(i.times(i),s);return f.precision=d,t==null?(Ie=!0,Oe(i,d)):i}i=o}}function Fe(e){for(var t=e.e*Ee,r=e.d[0];r>=10;r/=10)t++;return t}function Kf(e,t,r){if(t>e.LN10.sd())throw Ie=!0,r&&(e.precision=r),Error(kt+"LN10 precision limit exceeded");return Oe(new e(e.LN10),t)}function jr(e){for(var t="";e--;)t+="0";return t}function pi(e,t){var r,n,a,i,o,s,l,c,f,d=1,h=10,p=e,v=p.d,g=p.constructor,m=g.precision;if(p.s<1)throw Error(kt+(p.s?"NaN":"-Infinity"));if(p.eq(wt))return new g(0);if(t==null?(Ie=!1,c=m):c=t,p.eq(10))return t==null&&(Ie=!0),Kf(g,c);if(c+=h,g.precision=c,r=Zt(v),n=r.charAt(0),i=Fe(p),Math.abs(i)<15e14){for(;n<7&&n!=1||n==1&&r.charAt(1)>3;)p=p.times(e),r=Zt(p.d),n=r.charAt(0),d++;i=Fe(p),n>1?(p=new g("0."+r),i++):p=new g(n+"."+r.slice(1))}else return l=Kf(g,c+2,m).times(i+""),p=pi(new g(n+"."+r.slice(1)),c-h).plus(l),g.precision=m,t==null?(Ie=!0,Oe(p,m)):p;for(s=o=p=hr(p.minus(wt),p.plus(wt),c),f=Oe(p.times(p),c),a=3;;){if(o=Oe(o.times(f),c),l=s.plus(hr(o,new g(a),c)),Zt(l.d).slice(0,c)===Zt(s.d).slice(0,c))return s=s.times(2),i!==0&&(s=s.plus(Kf(g,c+2,m).times(i+""))),s=hr(s,new g(d),c),g.precision=m,t==null?(Ie=!0,Oe(s,m)):s;s=l,a+=2}}function hx(e,t){var r,n,a;for((r=t.indexOf("."))>-1&&(t=t.replace(".","")),(n=t.search(/e/i))>0?(r<0&&(r=n),r+=+t.slice(n+1),t=t.substring(0,n)):r<0&&(r=t.length),n=0;t.charCodeAt(n)===48;)++n;for(a=t.length;t.charCodeAt(a-1)===48;)--a;if(t=t.slice(n,a),t){if(a-=n,r=r-n-1,e.e=Ca(r/Ee),e.d=[],n=(r+1)%Ee,r<0&&(n+=Ee),n<a){for(n&&e.d.push(+t.slice(0,n)),a-=Ee;n<a;)e.d.push(+t.slice(n,n+=Ee));t=t.slice(n),n=Ee-t.length}else n-=a;for(;n--;)t+="0";if(e.d.push(+t),Ie&&(e.e>ts||e.e<-ts))throw Error(Gp+r)}else e.s=0,e.e=0,e.d=[0];return e}function Oe(e,t,r){var n,a,i,o,s,l,c,f,d=e.d;for(o=1,i=d[0];i>=10;i/=10)o++;if(n=t-o,n<0)n+=Ee,a=t,c=d[f=0];else{if(f=Math.ceil((n+1)/Ee),i=d.length,f>=i)return e;for(c=i=d[f],o=1;i>=10;i/=10)o++;n%=Ee,a=n-Ee+o}if(r!==void 0&&(i=Vr(10,o-a-1),s=c/i%10|0,l=t<0||d[f+1]!==void 0||c%i,l=r<4?(s||l)&&(r==0||r==(e.s<0?3:2)):s>5||s==5&&(r==4||l||r==6&&(n>0?a>0?c/Vr(10,o-a):0:d[f-1])%10&1||r==(e.s<0?8:7))),t<1||!d[0])return l?(i=Fe(e),d.length=1,t=t-i-1,d[0]=Vr(10,(Ee-t%Ee)%Ee),e.e=Ca(-t/Ee)||0):(d.length=1,d[0]=e.e=e.s=0),e;if(n==0?(d.length=f,i=1,f--):(d.length=f+1,i=Vr(10,Ee-n),d[f]=a>0?(c/Vr(10,o-a)%Vr(10,a)|0)*i:0),l)for(;;)if(f==0){(d[0]+=i)==Ve&&(d[0]=1,++e.e);break}else{if(d[f]+=i,d[f]!=Ve)break;d[f--]=0,i=1}for(n=d.length;d[--n]===0;)d.pop();if(Ie&&(e.e>ts||e.e<-ts))throw Error(Gp+Fe(e));return e}function IO(e,t){var r,n,a,i,o,s,l,c,f,d,h=e.constructor,p=h.precision;if(!e.s||!t.s)return t.s?t.s=-t.s:t=new h(e),Ie?Oe(t,p):t;if(l=e.d,d=t.d,n=t.e,c=e.e,l=l.slice(),o=c-n,o){for(f=o<0,f?(r=l,o=-o,s=d.length):(r=d,n=c,s=l.length),a=Math.max(Math.ceil(p/Ee),s)+2,o>a&&(o=a,r.length=1),r.reverse(),a=o;a--;)r.push(0);r.reverse()}else{for(a=l.length,s=d.length,f=a<s,f&&(s=a),a=0;a<s;a++)if(l[a]!=d[a]){f=l[a]<d[a];break}o=0}for(f&&(r=l,l=d,d=r,t.s=-t.s),s=l.length,a=d.length-s;a>0;--a)l[s++]=0;for(a=d.length;a>o;){if(l[--a]<d[a]){for(i=a;i&&l[--i]===0;)l[i]=Ve-1;--l[i],l[a]+=Ve}l[a]-=d[a]}for(;l[--s]===0;)l.pop();for(;l[0]===0;l.shift())--n;return l[0]?(t.d=l,t.e=n,Ie?Oe(t,p):t):new h(0)}function un(e,t,r){var n,a=Fe(e),i=Zt(e.d),o=i.length;return t?(r&&(n=r-o)>0?i=i.charAt(0)+"."+i.slice(1)+jr(n):o>1&&(i=i.charAt(0)+"."+i.slice(1)),i=i+(a<0?"e":"e+")+a):a<0?(i="0."+jr(-a-1)+i,r&&(n=r-o)>0&&(i+=jr(n))):a>=o?(i+=jr(a+1-o),r&&(n=r-a-1)>0&&(i=i+"."+jr(n))):((n=a+1)<o&&(i=i.slice(0,n)+"."+i.slice(n)),r&&(n=r-o)>0&&(a+1===o&&(i+="."),i+=jr(n))),e.s<0?"-"+i:i}function px(e,t){if(e.length>t)return e.length=t,!0}function kO(e){var t,r,n;function a(i){var o=this;if(!(o instanceof a))return new a(i);if(o.constructor=a,i instanceof a){o.s=i.s,o.e=i.e,o.d=(i=i.d)?i.slice():i;return}if(typeof i=="number"){if(i*0!==0)throw Error(an+i);if(i>0)o.s=1;else if(i<0)i=-i,o.s=-1;else{o.s=0,o.e=0,o.d=[0];return}if(i===~~i&&i<1e7){o.e=0,o.d=[i];return}return hx(o,i.toString())}else if(typeof i!="string")throw Error(an+i);if(i.charCodeAt(0)===45?(i=i.slice(1),o.s=-1):o.s=1,hI.test(i))hx(o,i);else throw Error(an+i)}if(a.prototype=Z,a.ROUND_UP=0,a.ROUND_DOWN=1,a.ROUND_CEIL=2,a.ROUND_FLOOR=3,a.ROUND_HALF_UP=4,a.ROUND_HALF_DOWN=5,a.ROUND_HALF_EVEN=6,a.ROUND_HALF_CEIL=7,a.ROUND_HALF_FLOOR=8,a.clone=kO,a.config=a.set=pI,e===void 0&&(e={}),e)for(n=["precision","rounding","toExpNeg","toExpPos","LN10"],t=0;t<n.length;)e.hasOwnProperty(r=n[t++])||(e[r]=this[r]);return a.config(e),a}function pI(e){if(!e||typeof e!="object")throw Error(kt+"Object expected");var t,r,n,a=["precision",1,Na,"rounding",0,8,"toExpNeg",-1/0,0,"toExpPos",0,1/0];for(t=0;t<a.length;t+=3)if((n=e[r=a[t]])!==void 0)if(Ca(n)===n&&n>=a[t+1]&&n<=a[t+2])this[r]=n;else throw Error(an+r+": "+n);if((n=e[r="LN10"])!==void 0)if(n==Math.LN10)this[r]=new this(n);else throw Error(an+r+": "+n);return this}var Kp=kO(dI);wt=new Kp(1);const xe=Kp;function mI(e){return bI(e)||yI(e)||gI(e)||vI()}function vI(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
13In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function gI(e,t){if(e){if(typeof e=="string")return rh(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return rh(e,t)}}function yI(e){if(typeof Symbol<"u"&&Symbol.iterator in Object(e))return Array.from(e)}function bI(e){if(Array.isArray(e))return rh(e)}function rh(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}var xI=function(t){return t},RO={},DO=function(t){return t===RO},mx=function(t){return function r(){return arguments.length===0||arguments.length===1&&DO(arguments.length<=0?void 0:arguments[0])?r:t.apply(void 0,arguments)}},wI=function e(t,r){return t===1?r:mx(function(){for(var n=arguments.length,a=new Array(n),i=0;i<n;i++)a[i]=arguments[i];var o=a.filter(function(s){return s!==RO}).length;return o>=t?r.apply(void 0,a):e(t-o,mx(function(){for(var s=arguments.length,l=new Array(s),c=0;c<s;c++)l[c]=arguments[c];var f=a.map(function(d){return DO(d)?l.shift():d});return r.apply(void 0,mI(f).concat(l))}))})},tl=function(t){return wI(t.length,t)},nh=function(t,r){for(var n=[],a=t;a<r;++a)n[a-t]=a;return n},SI=tl(function(e,t){return Array.isArray(t)?t.map(e):Object.keys(t).map(function(r){return t[r]}).map(e)}),OI=function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];if(!r.length)return xI;var a=r.reverse(),i=a[0],o=a.slice(1);return function(){return o.reduce(function(s,l){return l(s)},i.apply(void 0,arguments))}},ah=function(t){return Array.isArray(t)?t.reverse():t.split("").reverse.join("")},$O=function(t){var r=null,n=null;return function(){for(var a=arguments.length,i=new Array(a),o=0;o<a;o++)i[o]=arguments[o];return r&&i.every(function(s,l){return s===r[l]})||(r=i,n=t.apply(void 0,i)),n}};function AI(e){var t;return e===0?t=1:t=Math.floor(new xe(e).abs().log(10).toNumber())+1,t}function _I(e,t,r){for(var n=new xe(e),a=0,i=[];n.lt(t)&&a<1e5;)i.push(n.toNumber()),n=n.add(r),a++;return i}var jI=tl(function(e,t,r){var n=+e,a=+t;return n+r*(a-n)}),PI=tl(function(e,t,r){var n=t-+e;return n=n||1/0,(r-e)/n}),TI=tl(function(e,t,r){var n=t-+e;return n=n||1/0,Math.max(0,Math.min(1,(r-e)/n))});const rl={rangeStep:_I,getDigitCount:AI,interpolateNumber:jI,uninterpolateNumber:PI,uninterpolateTruncation:TI};function ih(e){return CI(e)||NI(e)||LO(e)||EI()}function EI(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
14In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function NI(e){if(typeof Symbol<"u"&&Symbol.iterator in Object(e))return Array.from(e)}function CI(e){if(Array.isArray(e))return oh(e)}function mi(e,t){return kI(e)||II(e,t)||LO(e,t)||MI()}function MI(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
15In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function LO(e,t){if(e){if(typeof e=="string")return oh(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return oh(e,t)}}function oh(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function II(e,t){if(!(typeof Symbol>"u"||!(Symbol.iterator in Object(e)))){var r=[],n=!0,a=!1,i=void 0;try{for(var o=e[Symbol.iterator](),s;!(n=(s=o.next()).done)&&(r.push(s.value),!(t&&r.length===t));n=!0);}catch(l){a=!0,i=l}finally{try{!n&&o.return!=null&&o.return()}finally{if(a)throw i}}return r}}function kI(e){if(Array.isArray(e))return e}function BO(e){var t=mi(e,2),r=t[0],n=t[1],a=r,i=n;return r>n&&(a=n,i=r),[a,i]}function qO(e,t,r){if(e.lte(0))return new xe(0);var n=rl.getDigitCount(e.toNumber()),a=new xe(10).pow(n),i=e.div(a),o=n!==1?.05:.1,s=new xe(Math.ceil(i.div(o).toNumber())).add(r).mul(o),l=s.mul(a);return t?l:new xe(Math.ceil(l))}function RI(e,t,r){var n=1,a=new xe(e);if(!a.isint()&&r){var i=Math.abs(e);i<1?(n=new xe(10).pow(rl.getDigitCount(e)-1),a=new xe(Math.floor(a.div(n).toNumber())).mul(n)):i>1&&(a=new xe(Math.floor(e)))}else e===0?a=new xe(Math.floor((t-1)/2)):r||(a=new xe(Math.floor(e)));var o=Math.floor((t-1)/2),s=OI(SI(function(l){return a.add(new xe(l-o).mul(n)).toNumber()}),nh);return s(0,t)}function FO(e,t,r,n){var a=arguments.length>4&&arguments[4]!==void 0?arguments[4]:0;if(!Number.isFinite((t-e)/(r-1)))return{step:new xe(0),tickMin:new xe(0),tickMax:new xe(0)};var i=qO(new xe(t).sub(e).div(r-1),n,a),o;e<=0&&t>=0?o=new xe(0):(o=new xe(e).add(t).div(2),o=o.sub(new xe(o).mod(i)));var s=Math.ceil(o.sub(e).div(i).toNumber()),l=Math.ceil(new xe(t).sub(o).div(i).toNumber()),c=s+l+1;return c>r?FO(e,t,r,n,a+1):(c<r&&(l=t>0?l+(r-c):l,s=t>0?s:s+(r-c)),{step:i,tickMin:o.sub(new xe(s).mul(i)),tickMax:o.add(new xe(l).mul(i))})}function DI(e){var t=mi(e,2),r=t[0],n=t[1],a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:6,i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,o=Math.max(a,2),s=BO([r,n]),l=mi(s,2),c=l[0],f=l[1];if(c===-1/0||f===1/0){var d=f===1/0?[c].concat(ih(nh(0,a-1).map(function(){return 1/0}))):[].concat(ih(nh(0,a-1).map(function(){return-1/0})),[f]);return r>n?ah(d):d}if(c===f)return RI(c,a,i);var h=FO(c,f,o,i),p=h.step,v=h.tickMin,g=h.tickMax,m=rl.rangeStep(v,g.add(new xe(.1).mul(p)),p);return r>n?ah(m):m}function $I(e,t){var r=mi(e,2),n=r[0],a=r[1],i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,o=BO([n,a]),s=mi(o,2),l=s[0],c=s[1];if(l===-1/0||c===1/0)return[n,a];if(l===c)return[l];var f=Math.max(t,2),d=qO(new xe(c).sub(l).div(f-1),i,0),h=[].concat(ih(rl.rangeStep(new xe(l),new xe(c).sub(new xe(.99).mul(d)),d)),[c]);return n>a?ah(h):h}var LI=$O(DI),BI=$O($I),qI="Invariant failed";function fn(e,t){throw new Error(qI)}var FI=["offset","layout","width","dataKey","data","dataPointFormatter","xAxis","yAxis"];function sa(e){"@babel/helpers - typeof";return sa=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},sa(e)}function rs(){return rs=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},rs.apply(this,arguments)}function zI(e,t){return GI(e)||HI(e,t)||WI(e,t)||UI()}function UI(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
16In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function WI(e,t){if(e){if(typeof e=="string")return vx(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return vx(e,t)}}function vx(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function HI(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,a,i,o,s=[],l=!0,c=!1;try{if(i=(r=r.call(e)).next,t!==0)for(;!(l=(n=i.call(r)).done)&&(s.push(n.value),s.length!==t);l=!0);}catch(f){c=!0,a=f}finally{try{if(!l&&r.return!=null&&(o=r.return(),Object(o)!==o))return}finally{if(c)throw a}}return s}}function GI(e){if(Array.isArray(e))return e}function KI(e,t){if(e==null)return{};var r=VI(e,t),n,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)n=i[a],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function VI(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function XI(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function YI(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,WO(n.key),n)}}function ZI(e,t,r){return t&&YI(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function JI(e,t,r){return t=ns(t),QI(e,zO()?Reflect.construct(t,r||[],ns(e).constructor):t.apply(e,r))}function QI(e,t){if(t&&(sa(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return ek(e)}function ek(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function zO(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(zO=function(){return!!e})()}function ns(e){return ns=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},ns(e)}function tk(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&sh(e,t)}function sh(e,t){return sh=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,a){return n.__proto__=a,n},sh(e,t)}function UO(e,t,r){return t=WO(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function WO(e){var t=rk(e,"string");return sa(t)=="symbol"?t:t+""}function rk(e,t){if(sa(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(sa(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var Wi=(function(e){function t(){return XI(this,t),JI(this,t,arguments)}return tk(t,e),ZI(t,[{key:"render",value:function(){var n=this.props,a=n.offset,i=n.layout,o=n.width,s=n.dataKey,l=n.data,c=n.dataPointFormatter,f=n.xAxis,d=n.yAxis,h=KI(n,FI),p=ce(h,!1);this.props.direction==="x"&&f.type!=="number"&&fn();var v=l.map(function(g){var m=c(g,s),y=m.x,w=m.y,S=m.value,O=m.errorVal;if(!O)return null;var b=[],x,A;if(Array.isArray(O)){var j=zI(O,2);x=j[0],A=j[1]}else x=A=O;if(i==="vertical"){var E=f.scale,I=w+a,N=I+o,T=I-o,M=E(S-x),R=E(S+A);b.push({x1:R,y1:N,x2:R,y2:T}),b.push({x1:M,y1:I,x2:R,y2:I}),b.push({x1:M,y1:N,x2:M,y2:T})}else if(i==="horizontal"){var D=d.scale,L=y+a,z=L-o,$=L+o,F=D(S-x),K=D(S+A);b.push({x1:z,y1:K,x2:$,y2:K}),b.push({x1:L,y1:F,x2:L,y2:K}),b.push({x1:z,y1:F,x2:$,y2:F})}return C.createElement(je,rs({className:"recharts-errorBar",key:"bar-".concat(b.map(function(V){return"".concat(V.x1,"-").concat(V.x2,"-").concat(V.y1,"-").concat(V.y2)}))},p),b.map(function(V){return C.createElement("line",rs({},V,{key:"line-".concat(V.x1,"-").concat(V.x2,"-").concat(V.y1,"-").concat(V.y2)}))}))});return C.createElement(je,{className:"recharts-errorBars"},v)}}])})(C.Component);UO(Wi,"defaultProps",{stroke:"black",strokeWidth:1.5,width:5,offset:0,layout:"horizontal"});UO(Wi,"displayName","ErrorBar");function vi(e){"@babel/helpers - typeof";return vi=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},vi(e)}function gx(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function Ur(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?gx(Object(r),!0).forEach(function(n){nk(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):gx(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function nk(e,t,r){return t=ak(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function ak(e){var t=ik(e,"string");return vi(t)=="symbol"?t:t+""}function ik(e,t){if(vi(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(vi(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var HO=function(t){var r=t.children,n=t.formattedGraphicalItems,a=t.legendWidth,i=t.legendContent,o=xt(r,Kn);if(!o)return null;var s=Kn.defaultProps,l=s!==void 0?Ur(Ur({},s),o.props):{},c;return o.props&&o.props.payload?c=o.props&&o.props.payload:i==="children"?c=(n||[]).reduce(function(f,d){var h=d.item,p=d.props,v=p.sectors||p.data||[];return f.concat(v.map(function(g){return{type:o.props.iconType||h.props.legendType,value:g.name,color:g.fill,payload:g}}))},[]):c=(n||[]).map(function(f){var d=f.item,h=d.type.defaultProps,p=h!==void 0?Ur(Ur({},h),d.props):{},v=p.dataKey,g=p.name,m=p.legendType,y=p.hide;return{inactive:y,dataKey:v,type:l.iconType||m||"square",color:Vp(d),value:g||v,payload:p}}),Ur(Ur(Ur({},l),Kn.getWithHeight(o,a)),{},{payload:c,item:o})};function gi(e){"@babel/helpers - typeof";return gi=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},gi(e)}function yx(e){return ck(e)||lk(e)||sk(e)||ok()}function ok(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
17In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function sk(e,t){if(e){if(typeof e=="string")return lh(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return lh(e,t)}}function lk(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function ck(e){if(Array.isArray(e))return lh(e)}function lh(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function bx(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function $e(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?bx(Object(r),!0).forEach(function(n){Vn(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):bx(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Vn(e,t,r){return t=uk(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function uk(e){var t=fk(e,"string");return gi(t)=="symbol"?t:t+""}function fk(e,t){if(gi(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(gi(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function ft(e,t,r){return fe(e)||fe(t)?r:He(t)?Ct(e,t,r):se(t)?t(e):r}function ti(e,t,r,n){var a=cI(e,function(s){return ft(s,t)});if(r==="number"){var i=a.filter(function(s){return H(s)||parseFloat(s)});return i.length?[el(i),Er(i)]:[1/0,-1/0]}var o=n?a.filter(function(s){return!fe(s)}):a;return o.map(function(s){return He(s)||s instanceof Date?s:""})}var dk=function(t){var r,n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],a=arguments.length>2?arguments[2]:void 0,i=arguments.length>3?arguments[3]:void 0,o=-1,s=(r=n?.length)!==null&&r!==void 0?r:0;if(s<=1)return 0;if(i&&i.axisType==="angleAxis"&&Math.abs(Math.abs(i.range[1]-i.range[0])-360)<=1e-6)for(var l=i.range,c=0;c<s;c++){var f=c>0?a[c-1].coordinate:a[s-1].coordinate,d=a[c].coordinate,h=c>=s-1?a[0].coordinate:a[c+1].coordinate,p=void 0;if(qt(d-f)!==qt(h-d)){var v=[];if(qt(h-d)===qt(l[1]-l[0])){p=h;var g=d+l[1]-l[0];v[0]=Math.min(g,(g+f)/2),v[1]=Math.max(g,(g+f)/2)}else{p=f;var m=h+l[1]-l[0];v[0]=Math.min(d,(m+d)/2),v[1]=Math.max(d,(m+d)/2)}var y=[Math.min(d,(p+d)/2),Math.max(d,(p+d)/2)];if(t>y[0]&&t<=y[1]||t>=v[0]&&t<=v[1]){o=a[c].index;break}}else{var w=Math.min(f,h),S=Math.max(f,h);if(t>(w+d)/2&&t<=(S+d)/2){o=a[c].index;break}}}else for(var O=0;O<s;O++)if(O===0&&t<=(n[O].coordinate+n[O+1].coordinate)/2||O>0&&O<s-1&&t>(n[O].coordinate+n[O-1].coordinate)/2&&t<=(n[O].coordinate+n[O+1].coordinate)/2||O===s-1&&t>(n[O].coordinate+n[O-1].coordinate)/2){o=n[O].index;break}return o},Vp=function(t){var r,n=t,a=n.type.displayName,i=(r=t.type)!==null&&r!==void 0&&r.defaultProps?$e($e({},t.type.defaultProps),t.props):t.props,o=i.stroke,s=i.fill,l;switch(a){case"Line":l=o;break;case"Area":case"Radar":l=o&&o!=="none"?o:s;break;default:l=s;break}return l},hk=function(t){var r=t.barSize,n=t.totalSize,a=t.stackGroups,i=a===void 0?{}:a;if(!i)return{};for(var o={},s=Object.keys(i),l=0,c=s.length;l<c;l++)for(var f=i[s[l]].stackGroups,d=Object.keys(f),h=0,p=d.length;h<p;h++){var v=f[d[h]],g=v.items,m=v.cateAxisId,y=g.filter(function(A){return fr(A.type).indexOf("Bar")>=0});if(y&&y.length){var w=y[0].type.defaultProps,S=w!==void 0?$e($e({},w),y[0].props):y[0].props,O=S.barSize,b=S[m];o[b]||(o[b]=[]);var x=fe(O)?r:O;o[b].push({item:y[0],stackList:y.slice(1),barSize:fe(x)?void 0:cn(x,n,0)})}}return o},pk=function(t){var r=t.barGap,n=t.barCategoryGap,a=t.bandSize,i=t.sizeList,o=i===void 0?[]:i,s=t.maxBarSize,l=o.length;if(l<1)return null;var c=cn(r,a,0,!0),f,d=[];if(o[0].barSize===+o[0].barSize){var h=!1,p=a/l,v=o.reduce(function(O,b){return O+b.barSize||0},0);v+=(l-1)*c,v>=a&&(v-=(l-1)*c,c=0),v>=a&&p>0&&(h=!0,p*=.9,v=l*p);var g=(a-v)/2>>0,m={offset:g-c,size:0};f=o.reduce(function(O,b){var x={item:b.item,position:{offset:m.offset+m.size+c,size:h?p:b.barSize}},A=[].concat(yx(O),[x]);return m=A[A.length-1].position,b.stackList&&b.stackList.length&&b.stackList.forEach(function(j){A.push({item:j,position:m})}),A},d)}else{var y=cn(n,a,0,!0);a-2*y-(l-1)*c<=0&&(c=0);var w=(a-2*y-(l-1)*c)/l;w>1&&(w>>=0);var S=s===+s?Math.min(w,s):w;f=o.reduce(function(O,b,x){var A=[].concat(yx(O),[{item:b.item,position:{offset:y+(w+c)*x+(w-S)/2,size:S}}]);return b.stackList&&b.stackList.length&&b.stackList.forEach(function(j){A.push({item:j,position:A[A.length-1].position})}),A},d)}return f},mk=function(t,r,n,a){var i=n.children,o=n.width,s=n.margin,l=o-(s.left||0)-(s.right||0),c=HO({children:i,legendWidth:l});if(c){var f=a||{},d=f.width,h=f.height,p=c.align,v=c.verticalAlign,g=c.layout;if((g==="vertical"||g==="horizontal"&&v==="middle")&&p!=="center"&&H(t[p]))return $e($e({},t),{},Vn({},p,t[p]+(d||0)));if((g==="horizontal"||g==="vertical"&&p==="center")&&v!=="middle"&&H(t[v]))return $e($e({},t),{},Vn({},v,t[v]+(h||0)))}return t},vk=function(t,r,n){return fe(r)?!0:t==="horizontal"?r==="yAxis":t==="vertical"||n==="x"?r==="xAxis":n==="y"?r==="yAxis":!0},GO=function(t,r,n,a,i){var o=r.props.children,s=Mt(o,Wi).filter(function(c){return vk(a,i,c.props.direction)});if(s&&s.length){var l=s.map(function(c){return c.props.dataKey});return t.reduce(function(c,f){var d=ft(f,n);if(fe(d))return c;var h=Array.isArray(d)?[el(d),Er(d)]:[d,d],p=l.reduce(function(v,g){var m=ft(f,g,0),y=h[0]-Math.abs(Array.isArray(m)?m[0]:m),w=h[1]+Math.abs(Array.isArray(m)?m[1]:m);return[Math.min(y,v[0]),Math.max(w,v[1])]},[1/0,-1/0]);return[Math.min(p[0],c[0]),Math.max(p[1],c[1])]},[1/0,-1/0])}return null},gk=function(t,r,n,a,i){var o=r.map(function(s){return GO(t,s,n,i,a)}).filter(function(s){return!fe(s)});return o&&o.length?o.reduce(function(s,l){return[Math.min(s[0],l[0]),Math.max(s[1],l[1])]},[1/0,-1/0]):null},KO=function(t,r,n,a,i){var o=r.map(function(l){var c=l.props.dataKey;return n==="number"&&c&&GO(t,l,c,a)||ti(t,c,n,i)});if(n==="number")return o.reduce(function(l,c){return[Math.min(l[0],c[0]),Math.max(l[1],c[1])]},[1/0,-1/0]);var s={};return o.reduce(function(l,c){for(var f=0,d=c.length;f<d;f++)s[c[f]]||(s[c[f]]=!0,l.push(c[f]));return l},[])},VO=function(t,r){return t==="horizontal"&&r==="xAxis"||t==="vertical"&&r==="yAxis"||t==="centric"&&r==="angleAxis"||t==="radial"&&r==="radiusAxis"},XO=function(t,r,n,a){if(a)return t.map(function(l){return l.coordinate});var i,o,s=t.map(function(l){return l.coordinate===r&&(i=!0),l.coordinate===n&&(o=!0),l.coordinate});return i||s.push(r),o||s.push(n),s},ur=function(t,r,n){if(!t)return null;var a=t.scale,i=t.duplicateDomain,o=t.type,s=t.range,l=t.realScaleType==="scaleBand"?a.bandwidth()/2:2,c=(r||n)&&o==="category"&&a.bandwidth?a.bandwidth()/l:0;if(c=t.axisType==="angleAxis"&&s?.length>=2?qt(s[0]-s[1])*2*c:c,r&&(t.ticks||t.niceTicks)){var f=(t.ticks||t.niceTicks).map(function(d){var h=i?i.indexOf(d):d;return{coordinate:a(h)+c,value:d,offset:c}});return f.filter(function(d){return!ja(d.coordinate)})}return t.isCategorical&&t.categoricalDomain?t.categoricalDomain.map(function(d,h){return{coordinate:a(d)+c,value:d,index:h,offset:c}}):a.ticks&&!n?a.ticks(t.tickCount).map(function(d){return{coordinate:a(d)+c,value:d,offset:c}}):a.domain().map(function(d,h){return{coordinate:a(d)+c,value:i?i[d]:d,index:h,offset:c}})},Vf=new WeakMap,po=function(t,r){if(typeof r!="function")return t;Vf.has(t)||Vf.set(t,new WeakMap);var n=Vf.get(t);if(n.has(r))return n.get(r);var a=function(){t.apply(void 0,arguments),r.apply(void 0,arguments)};return n.set(r,a),a},yk=function(t,r,n){var a=t.scale,i=t.type,o=t.layout,s=t.axisType;if(a==="auto")return o==="radial"&&s==="radiusAxis"?{scale:di(),realScaleType:"band"}:o==="radial"&&s==="angleAxis"?{scale:Zo(),realScaleType:"linear"}:i==="category"&&r&&(r.indexOf("LineChart")>=0||r.indexOf("AreaChart")>=0||r.indexOf("ComposedChart")>=0&&!n)?{scale:ei(),realScaleType:"point"}:i==="category"?{scale:di(),realScaleType:"band"}:{scale:Zo(),realScaleType:"linear"};if(ln(a)){var l="scale".concat(Fs(a));return{scale:(ax[l]||ei)(),realScaleType:ax[l]?l:"point"}}return se(a)?{scale:a}:{scale:ei(),realScaleType:"point"}},xx=1e-4,bk=function(t){var r=t.domain();if(!(!r||r.length<=2)){var n=r.length,a=t.range(),i=Math.min(a[0],a[1])-xx,o=Math.max(a[0],a[1])+xx,s=t(r[0]),l=t(r[n-1]);(s<i||s>o||l<i||l>o)&&t.domain([r[0],r[n-1]])}},xk=function(t,r){if(!t)return null;for(var n=0,a=t.length;n<a;n++)if(t[n].item===r)return t[n].position;return null},wk=function(t,r){if(!r||r.length!==2||!H(r[0])||!H(r[1]))return t;var n=Math.min(r[0],r[1]),a=Math.max(r[0],r[1]),i=[t[0],t[1]];return(!H(t[0])||t[0]<n)&&(i[0]=n),(!H(t[1])||t[1]>a)&&(i[1]=a),i[0]>a&&(i[0]=a),i[1]<n&&(i[1]=n),i},Sk=function(t){var r=t.length;if(!(r<=0))for(var n=0,a=t[0].length;n<a;++n)for(var i=0,o=0,s=0;s<r;++s){var l=ja(t[s][n][1])?t[s][n][0]:t[s][n][1];l>=0?(t[s][n][0]=i,t[s][n][1]=i+l,i=t[s][n][1]):(t[s][n][0]=o,t[s][n][1]=o+l,o=t[s][n][1])}},Ok=function(t){var r=t.length;if(!(r<=0))for(var n=0,a=t[0].length;n<a;++n)for(var i=0,o=0;o<r;++o){var s=ja(t[o][n][1])?t[o][n][0]:t[o][n][1];s>=0?(t[o][n][0]=i,t[o][n][1]=i+s,i=t[o][n][1]):(t[o][n][0]=0,t[o][n][1]=0)}},Ak={sign:Sk,expand:bP,none:Jn,silhouette:xP,wiggle:wP,positive:Ok},_k=function(t,r,n){var a=r.map(function(s){return s.props.dataKey}),i=Ak[n],o=yP().keys(a).value(function(s,l){return+ft(s,l,0)}).order(Ld).offset(i);return o(t)},jk=function(t,r,n,a,i,o){if(!t)return null;var s=o?r.reverse():r,l={},c=s.reduce(function(d,h){var p,v=(p=h.type)!==null&&p!==void 0&&p.defaultProps?$e($e({},h.type.defaultProps),h.props):h.props,g=v.stackId,m=v.hide;if(m)return d;var y=v[n],w=d[y]||{hasStack:!1,stackGroups:{}};if(He(g)){var S=w.stackGroups[g]||{numericAxisId:n,cateAxisId:a,items:[]};S.items.push(h),w.hasStack=!0,w.stackGroups[g]=S}else w.stackGroups[Pa("_stackId_")]={numericAxisId:n,cateAxisId:a,items:[h]};return $e($e({},d),{},Vn({},y,w))},l),f={};return Object.keys(c).reduce(function(d,h){var p=c[h];if(p.hasStack){var v={};p.stackGroups=Object.keys(p.stackGroups).reduce(function(g,m){var y=p.stackGroups[m];return $e($e({},g),{},Vn({},m,{numericAxisId:n,cateAxisId:a,items:y.items,stackedData:_k(t,y.items,i)}))},v)}return $e($e({},d),{},Vn({},h,p))},f)},Pk=function(t,r){var n=r.realScaleType,a=r.type,i=r.tickCount,o=r.originalDomain,s=r.allowDecimals,l=n||r.scale;if(l!=="auto"&&l!=="linear")return null;if(i&&a==="number"&&o&&(o[0]==="auto"||o[1]==="auto")){var c=t.domain();if(!c.length)return null;var f=LI(c,i,s);return t.domain([el(f),Er(f)]),{niceTicks:f}}if(i&&a==="number"){var d=t.domain(),h=BI(d,i,s);return{niceTicks:h}}return null};function as(e){var t=e.axis,r=e.ticks,n=e.bandSize,a=e.entry,i=e.index,o=e.dataKey;if(t.type==="category"){if(!t.allowDuplicatedCategory&&t.dataKey&&!fe(a[t.dataKey])){var s=Mo(r,"value",a[t.dataKey]);if(s)return s.coordinate+n/2}return r[i]?r[i].coordinate+n/2:null}var l=ft(a,fe(o)?t.dataKey:o);return fe(l)?null:t.scale(l)}var wx=function(t){var r=t.axis,n=t.ticks,a=t.offset,i=t.bandSize,o=t.entry,s=t.index;if(r.type==="category")return n[s]?n[s].coordinate+a:null;var l=ft(o,r.dataKey,r.domain[s]);return fe(l)?null:r.scale(l)-i/2+a},Tk=function(t){var r=t.numericAxis,n=r.scale.domain();if(r.type==="number"){var a=Math.min(n[0],n[1]),i=Math.max(n[0],n[1]);return a<=0&&i>=0?0:i<0?i:a}return n[0]},Ek=function(t,r){var n,a=(n=t.type)!==null&&n!==void 0&&n.defaultProps?$e($e({},t.type.defaultProps),t.props):t.props,i=a.stackId;if(He(i)){var o=r[i];if(o){var s=o.items.indexOf(t);return s>=0?o.stackedData[s]:null}}return null},Nk=function(t){return t.reduce(function(r,n){return[el(n.concat([r[0]]).filter(H)),Er(n.concat([r[1]]).filter(H))]},[1/0,-1/0])},YO=function(t,r,n){return Object.keys(t).reduce(function(a,i){var o=t[i],s=o.stackedData,l=s.reduce(function(c,f){var d=Nk(f.slice(r,n+1));return[Math.min(c[0],d[0]),Math.max(c[1],d[1])]},[1/0,-1/0]);return[Math.min(l[0],a[0]),Math.max(l[1],a[1])]},[1/0,-1/0]).map(function(a){return a===1/0||a===-1/0?0:a})},Sx=/^dataMin[\s]*-[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,Ox=/^dataMax[\s]*\+[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,ch=function(t,r,n){if(se(t))return t(r,n);if(!Array.isArray(t))return r;var a=[];if(H(t[0]))a[0]=n?t[0]:Math.min(t[0],r[0]);else if(Sx.test(t[0])){var i=+Sx.exec(t[0])[1];a[0]=r[0]-i}else se(t[0])?a[0]=t[0](r[0]):a[0]=r[0];if(H(t[1]))a[1]=n?t[1]:Math.max(t[1],r[1]);else if(Ox.test(t[1])){var o=+Ox.exec(t[1])[1];a[1]=r[1]+o}else se(t[1])?a[1]=t[1](r[1]):a[1]=r[1];return a},is=function(t,r,n){if(t&&t.scale&&t.scale.bandwidth){var a=t.scale.bandwidth();if(!n||a>0)return a}if(t&&r&&r.length>=2){for(var i=Op(r,function(d){return d.coordinate}),o=1/0,s=1,l=i.length;s<l;s++){var c=i[s],f=i[s-1];o=Math.min((c.coordinate||0)-(f.coordinate||0),o)}return o===1/0?0:o}return n?void 0:0},Ax=function(t,r,n){return!t||!t.length||oa(t,Ct(n,"type.defaultProps.domain"))?r:t},ZO=function(t,r){var n=t.type.defaultProps?$e($e({},t.type.defaultProps),t.props):t.props,a=n.dataKey,i=n.name,o=n.unit,s=n.formatter,l=n.tooltipType,c=n.chartType,f=n.hide;return $e($e({},ce(t,!1)),{},{dataKey:a,unit:o,formatter:s,name:i||a,color:Vp(t),value:ft(r,a),type:l,payload:r,chartType:c,hide:f})};function yi(e){"@babel/helpers - typeof";return yi=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},yi(e)}function _x(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function jx(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?_x(Object(r),!0).forEach(function(n){Ck(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):_x(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Ck(e,t,r){return t=Mk(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Mk(e){var t=Ik(e,"string");return yi(t)=="symbol"?t:t+""}function Ik(e,t){if(yi(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(yi(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var os=Math.PI/180,kk=function(t){return t*180/Math.PI},et=function(t,r,n,a){return{x:t+Math.cos(-os*a)*n,y:r+Math.sin(-os*a)*n}},Rk=function(t,r){var n=t.x,a=t.y,i=r.x,o=r.y;return Math.sqrt(Math.pow(n-i,2)+Math.pow(a-o,2))},Dk=function(t,r){var n=t.x,a=t.y,i=r.cx,o=r.cy,s=Rk({x:n,y:a},{x:i,y:o});if(s<=0)return{radius:s};var l=(n-i)/s,c=Math.acos(l);return a>o&&(c=2*Math.PI-c),{radius:s,angle:kk(c),angleInRadian:c}},$k=function(t){var r=t.startAngle,n=t.endAngle,a=Math.floor(r/360),i=Math.floor(n/360),o=Math.min(a,i);return{startAngle:r-o*360,endAngle:n-o*360}},Lk=function(t,r){var n=r.startAngle,a=r.endAngle,i=Math.floor(n/360),o=Math.floor(a/360),s=Math.min(i,o);return t+s*360},Px=function(t,r){var n=t.x,a=t.y,i=Dk({x:n,y:a},r),o=i.radius,s=i.angle,l=r.innerRadius,c=r.outerRadius;if(o<l||o>c)return!1;if(o===0)return!0;var f=$k(r),d=f.startAngle,h=f.endAngle,p=s,v;if(d<=h){for(;p>h;)p-=360;for(;p<d;)p+=360;v=p>=d&&p<=h}else{for(;p>d;)p-=360;for(;p<h;)p+=360;v=p>=h&&p<=d}return v?jx(jx({},r),{},{radius:o,angle:Lk(p,r)}):null};function bi(e){"@babel/helpers - typeof";return bi=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},bi(e)}var Bk=["offset"];function qk(e){return Wk(e)||Uk(e)||zk(e)||Fk()}function Fk(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
18In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function zk(e,t){if(e){if(typeof e=="string")return uh(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return uh(e,t)}}function Uk(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function Wk(e){if(Array.isArray(e))return uh(e)}function uh(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function Hk(e,t){if(e==null)return{};var r=Gk(e,t),n,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)n=i[a],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function Gk(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function Tx(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function We(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Tx(Object(r),!0).forEach(function(n){Kk(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Tx(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Kk(e,t,r){return t=Vk(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Vk(e){var t=Xk(e,"string");return bi(t)=="symbol"?t:t+""}function Xk(e,t){if(bi(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(bi(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function xi(){return xi=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},xi.apply(this,arguments)}var Yk=function(t){var r=t.value,n=t.formatter,a=fe(t.children)?r:t.children;return se(n)?n(a):a},Zk=function(t,r){var n=qt(r-t),a=Math.min(Math.abs(r-t),360);return n*a},Jk=function(t,r,n){var a=t.position,i=t.viewBox,o=t.offset,s=t.className,l=i,c=l.cx,f=l.cy,d=l.innerRadius,h=l.outerRadius,p=l.startAngle,v=l.endAngle,g=l.clockWise,m=(d+h)/2,y=Zk(p,v),w=y>=0?1:-1,S,O;a==="insideStart"?(S=p+w*o,O=g):a==="insideEnd"?(S=v-w*o,O=!g):a==="end"&&(S=v+w*o,O=g),O=y<=0?O:!O;var b=et(c,f,m,S),x=et(c,f,m,S+(O?1:-1)*359),A="M".concat(b.x,",").concat(b.y,`
19    A`).concat(m,",").concat(m,",0,1,").concat(O?0:1,`,
20    `).concat(x.x,",").concat(x.y),j=fe(t.id)?Pa("recharts-radial-line-"):t.id;return C.createElement("text",xi({},n,{dominantBaseline:"central",className:pe("recharts-radial-bar-label",s)}),C.createElement("defs",null,C.createElement("path",{id:j,d:A})),C.createElement("textPath",{xlinkHref:"#".concat(j)},r))},Qk=function(t){var r=t.viewBox,n=t.offset,a=t.position,i=r,o=i.cx,s=i.cy,l=i.innerRadius,c=i.outerRadius,f=i.startAngle,d=i.endAngle,h=(f+d)/2;if(a==="outside"){var p=et(o,s,c+n,h),v=p.x,g=p.y;return{x:v,y:g,textAnchor:v>=o?"start":"end",verticalAnchor:"middle"}}if(a==="center")return{x:o,y:s,textAnchor:"middle",verticalAnchor:"middle"};if(a==="centerTop")return{x:o,y:s,textAnchor:"middle",verticalAnchor:"start"};if(a==="centerBottom")return{x:o,y:s,textAnchor:"middle",verticalAnchor:"end"};var m=(l+c)/2,y=et(o,s,m,h),w=y.x,S=y.y;return{x:w,y:S,textAnchor:"middle",verticalAnchor:"middle"}},eR=function(t){var r=t.viewBox,n=t.parentViewBox,a=t.offset,i=t.position,o=r,s=o.x,l=o.y,c=o.width,f=o.height,d=f>=0?1:-1,h=d*a,p=d>0?"end":"start",v=d>0?"start":"end",g=c>=0?1:-1,m=g*a,y=g>0?"end":"start",w=g>0?"start":"end";if(i==="top"){var S={x:s+c/2,y:l-d*a,textAnchor:"middle",verticalAnchor:p};return We(We({},S),n?{height:Math.max(l-n.y,0),width:c}:{})}if(i==="bottom"){var O={x:s+c/2,y:l+f+h,textAnchor:"middle",verticalAnchor:v};return We(We({},O),n?{height:Math.max(n.y+n.height-(l+f),0),width:c}:{})}if(i==="left"){var b={x:s-m,y:l+f/2,textAnchor:y,verticalAnchor:"middle"};return We(We({},b),n?{width:Math.max(b.x-n.x,0),height:f}:{})}if(i==="right"){var x={x:s+c+m,y:l+f/2,textAnchor:w,verticalAnchor:"middle"};return We(We({},x),n?{width:Math.max(n.x+n.width-x.x,0),height:f}:{})}var A=n?{width:c,height:f}:{};return i==="insideLeft"?We({x:s+m,y:l+f/2,textAnchor:w,verticalAnchor:"middle"},A):i==="insideRight"?We({x:s+c-m,y:l+f/2,textAnchor:y,verticalAnchor:"middle"},A):i==="insideTop"?We({x:s+c/2,y:l+h,textAnchor:"middle",verticalAnchor:v},A):i==="insideBottom"?We({x:s+c/2,y:l+f-h,textAnchor:"middle",verticalAnchor:p},A):i==="insideTopLeft"?We({x:s+m,y:l+h,textAnchor:w,verticalAnchor:v},A):i==="insideTopRight"?We({x:s+c-m,y:l+h,textAnchor:y,verticalAnchor:v},A):i==="insideBottomLeft"?We({x:s+m,y:l+f-h,textAnchor:w,verticalAnchor:p},A):i==="insideBottomRight"?We({x:s+c-m,y:l+f-h,textAnchor:y,verticalAnchor:p},A):_a(i)&&(H(i.x)||Zr(i.x))&&(H(i.y)||Zr(i.y))?We({x:s+cn(i.x,c),y:l+cn(i.y,f),textAnchor:"end",verticalAnchor:"end"},A):We({x:s+c/2,y:l+f/2,textAnchor:"middle",verticalAnchor:"middle"},A)},tR=function(t){return"cx"in t&&H(t.cx)};function ot(e){var t=e.offset,r=t===void 0?5:t,n=Hk(e,Bk),a=We({offset:r},n),i=a.viewBox,o=a.position,s=a.value,l=a.children,c=a.content,f=a.className,d=f===void 0?"":f,h=a.textBreakAll;if(!i||fe(s)&&fe(l)&&!P.isValidElement(c)&&!se(c))return null;if(P.isValidElement(c))return P.cloneElement(c,a);var p;if(se(c)){if(p=P.createElement(c,a),P.isValidElement(p))return p}else p=Yk(a);var v=tR(i),g=ce(a,!0);if(v&&(o==="insideStart"||o==="insideEnd"||o==="end"))return Jk(a,p,g);var m=v?Qk(a):eR(a);return C.createElement(Ho,xi({className:pe("recharts-label",d)},g,m,{breakAll:h}),p)}ot.displayName="Label";var JO=function(t){var r=t.cx,n=t.cy,a=t.angle,i=t.startAngle,o=t.endAngle,s=t.r,l=t.radius,c=t.innerRadius,f=t.outerRadius,d=t.x,h=t.y,p=t.top,v=t.left,g=t.width,m=t.height,y=t.clockWise,w=t.labelViewBox;if(w)return w;if(H(g)&&H(m)){if(H(d)&&H(h))return{x:d,y:h,width:g,height:m};if(H(p)&&H(v))return{x:p,y:v,width:g,height:m}}return H(d)&&H(h)?{x:d,y:h,width:0,height:0}:H(r)&&H(n)?{cx:r,cy:n,startAngle:i||a||0,endAngle:o||a||0,innerRadius:c||0,outerRadius:f||l||s||0,clockWise:y}:t.viewBox?t.viewBox:{}},rR=function(t,r){return t?t===!0?C.createElement(ot,{key:"label-implicit",viewBox:r}):He(t)?C.createElement(ot,{key:"label-implicit",viewBox:r,value:t}):P.isValidElement(t)?t.type===ot?P.cloneElement(t,{key:"label-implicit",viewBox:r}):C.createElement(ot,{key:"label-implicit",content:t,viewBox:r}):se(t)?C.createElement(ot,{key:"label-implicit",content:t,viewBox:r}):_a(t)?C.createElement(ot,xi({viewBox:r},t,{key:"label-implicit"})):null:null},nR=function(t,r){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;if(!t||!t.children&&n&&!t.label)return null;var a=t.children,i=JO(t),o=Mt(a,ot).map(function(l,c){return P.cloneElement(l,{viewBox:r||i,key:"label-".concat(c)})});if(!n)return o;var s=rR(t.label,r||i);return[s].concat(qk(o))};ot.parseViewBox=JO;ot.renderCallByParent=nR;var Xf,Ex;function aR(){if(Ex)return Xf;Ex=1;function e(t){var r=t==null?0:t.length;return r?t[r-1]:void 0}return Xf=e,Xf}var iR=aR();const oR=Ce(iR);function wi(e){"@babel/helpers - typeof";return wi=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},wi(e)}var sR=["valueAccessor"],lR=["data","dataKey","clockWise","id","textBreakAll"];function cR(e){return hR(e)||dR(e)||fR(e)||uR()}function uR(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
21In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function fR(e,t){if(e){if(typeof e=="string")return fh(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return fh(e,t)}}function dR(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function hR(e){if(Array.isArray(e))return fh(e)}function fh(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function ss(){return ss=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},ss.apply(this,arguments)}function Nx(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function Cx(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Nx(Object(r),!0).forEach(function(n){pR(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Nx(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function pR(e,t,r){return t=mR(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function mR(e){var t=vR(e,"string");return wi(t)=="symbol"?t:t+""}function vR(e,t){if(wi(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(wi(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Mx(e,t){if(e==null)return{};var r=gR(e,t),n,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)n=i[a],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function gR(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}var yR=function(t){return Array.isArray(t.value)?oR(t.value):t.value};function pr(e){var t=e.valueAccessor,r=t===void 0?yR:t,n=Mx(e,sR),a=n.data,i=n.dataKey,o=n.clockWise,s=n.id,l=n.textBreakAll,c=Mx(n,lR);return!a||!a.length?null:C.createElement(je,{className:"recharts-label-list"},a.map(function(f,d){var h=fe(i)?r(f,d):ft(f&&f.payload,i),p=fe(s)?{}:{id:"".concat(s,"-").concat(d)};return C.createElement(ot,ss({},ce(f,!0),c,p,{parentViewBox:f.parentViewBox,value:h,textBreakAll:l,viewBox:ot.parseViewBox(fe(o)?f:Cx(Cx({},f),{},{clockWise:o})),key:"label-".concat(d),index:d}))}))}pr.displayName="LabelList";function bR(e,t){return e?e===!0?C.createElement(pr,{key:"labelList-implicit",data:t}):C.isValidElement(e)||se(e)?C.createElement(pr,{key:"labelList-implicit",data:t,content:e}):_a(e)?C.createElement(pr,ss({data:t},e,{key:"labelList-implicit"})):null:null}function xR(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;if(!e||!e.children&&r&&!e.label)return null;var n=e.children,a=Mt(n,pr).map(function(o,s){return P.cloneElement(o,{data:t,key:"labelList-".concat(s)})});if(!r)return a;var i=bR(e.label,t);return[i].concat(cR(a))}pr.renderCallByParent=xR;function Si(e){"@babel/helpers - typeof";return Si=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Si(e)}function dh(){return dh=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},dh.apply(this,arguments)}function Ix(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function kx(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Ix(Object(r),!0).forEach(function(n){wR(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Ix(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function wR(e,t,r){return t=SR(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function SR(e){var t=OR(e,"string");return Si(t)=="symbol"?t:t+""}function OR(e,t){if(Si(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Si(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var AR=function(t,r){var n=qt(r-t),a=Math.min(Math.abs(r-t),359.999);return n*a},mo=function(t){var r=t.cx,n=t.cy,a=t.radius,i=t.angle,o=t.sign,s=t.isExternal,l=t.cornerRadius,c=t.cornerIsExternal,f=l*(s?1:-1)+a,d=Math.asin(l/f)/os,h=c?i:i+o*d,p=et(r,n,f,h),v=et(r,n,a,h),g=c?i-o*d:i,m=et(r,n,f*Math.cos(d*os),g);return{center:p,circleTangency:v,lineTangency:m,theta:d}},QO=function(t){var r=t.cx,n=t.cy,a=t.innerRadius,i=t.outerRadius,o=t.startAngle,s=t.endAngle,l=AR(o,s),c=o+l,f=et(r,n,i,o),d=et(r,n,i,c),h="M ".concat(f.x,",").concat(f.y,`
22    A `).concat(i,",").concat(i,`,0,
23    `).concat(+(Math.abs(l)>180),",").concat(+(o>c),`,
24    `).concat(d.x,",").concat(d.y,`
25  `);if(a>0){var p=et(r,n,a,o),v=et(r,n,a,c);h+="L ".concat(v.x,",").concat(v.y,`
26            A `).concat(a,",").concat(a,`,0,
27            `).concat(+(Math.abs(l)>180),",").concat(+(o<=c),`,
28            `).concat(p.x,",").concat(p.y," Z")}else h+="L ".concat(r,",").concat(n," Z");return h},_R=function(t){var r=t.cx,n=t.cy,a=t.innerRadius,i=t.outerRadius,o=t.cornerRadius,s=t.forceCornerRadius,l=t.cornerIsExternal,c=t.startAngle,f=t.endAngle,d=qt(f-c),h=mo({cx:r,cy:n,radius:i,angle:c,sign:d,cornerRadius:o,cornerIsExternal:l}),p=h.circleTangency,v=h.lineTangency,g=h.theta,m=mo({cx:r,cy:n,radius:i,angle:f,sign:-d,cornerRadius:o,cornerIsExternal:l}),y=m.circleTangency,w=m.lineTangency,S=m.theta,O=l?Math.abs(c-f):Math.abs(c-f)-g-S;if(O<0)return s?"M ".concat(v.x,",").concat(v.y,`
29        a`).concat(o,",").concat(o,",0,0,1,").concat(o*2,`,0
30        a`).concat(o,",").concat(o,",0,0,1,").concat(-o*2,`,0
31      `):QO({cx:r,cy:n,innerRadius:a,outerRadius:i,startAngle:c,endAngle:f});var b="M ".concat(v.x,",").concat(v.y,`
32    A`).concat(o,",").concat(o,",0,0,").concat(+(d<0),",").concat(p.x,",").concat(p.y,`
33    A`).concat(i,",").concat(i,",0,").concat(+(O>180),",").concat(+(d<0),",").concat(y.x,",").concat(y.y,`
34    A`).concat(o,",").concat(o,",0,0,").concat(+(d<0),",").concat(w.x,",").concat(w.y,`
35  `);if(a>0){var x=mo({cx:r,cy:n,radius:a,angle:c,sign:d,isExternal:!0,cornerRadius:o,cornerIsExternal:l}),A=x.circleTangency,j=x.lineTangency,E=x.theta,I=mo({cx:r,cy:n,radius:a,angle:f,sign:-d,isExternal:!0,cornerRadius:o,cornerIsExternal:l}),N=I.circleTangency,T=I.lineTangency,M=I.theta,R=l?Math.abs(c-f):Math.abs(c-f)-E-M;if(R<0&&o===0)return"".concat(b,"L").concat(r,",").concat(n,"Z");b+="L".concat(T.x,",").concat(T.y,`
36      A`).concat(o,",").concat(o,",0,0,").concat(+(d<0),",").concat(N.x,",").concat(N.y,`
37      A`).concat(a,",").concat(a,",0,").concat(+(R>180),",").concat(+(d>0),",").concat(A.x,",").concat(A.y,`
38      A`).concat(o,",").concat(o,",0,0,").concat(+(d<0),",").concat(j.x,",").concat(j.y,"Z")}else b+="L".concat(r,",").concat(n,"Z");return b},jR={cx:0,cy:0,innerRadius:0,outerRadius:0,startAngle:0,endAngle:0,cornerRadius:0,forceCornerRadius:!1,cornerIsExternal:!1},eA=function(t){var r=kx(kx({},jR),t),n=r.cx,a=r.cy,i=r.innerRadius,o=r.outerRadius,s=r.cornerRadius,l=r.forceCornerRadius,c=r.cornerIsExternal,f=r.startAngle,d=r.endAngle,h=r.className;if(o<i||f===d)return null;var p=pe("recharts-sector",h),v=o-i,g=cn(s,v,0,!0),m;return g>0&&Math.abs(f-d)<360?m=_R({cx:n,cy:a,innerRadius:i,outerRadius:o,cornerRadius:Math.min(g,v/2),forceCornerRadius:l,cornerIsExternal:c,startAngle:f,endAngle:d}):m=QO({cx:n,cy:a,innerRadius:i,outerRadius:o,startAngle:f,endAngle:d}),C.createElement("path",dh({},ce(r,!0),{className:p,d:m,role:"img"}))};function Oi(e){"@babel/helpers - typeof";return Oi=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Oi(e)}function hh(){return hh=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},hh.apply(this,arguments)}function Rx(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function Dx(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Rx(Object(r),!0).forEach(function(n){PR(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Rx(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function PR(e,t,r){return t=TR(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function TR(e){var t=ER(e,"string");return Oi(t)=="symbol"?t:t+""}function ER(e,t){if(Oi(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Oi(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var $x={curveBasisClosed:sP,curveBasisOpen:lP,curveBasis:oP,curveBumpX:G1,curveBumpY:K1,curveLinearClosed:cP,curveLinear:Us,curveMonotoneX:uP,curveMonotoneY:fP,curveNatural:dP,curveStep:hP,curveStepAfter:mP,curveStepBefore:pP},vo=function(t){return t.x===+t.x&&t.y===+t.y},Fa=function(t){return t.x},za=function(t){return t.y},NR=function(t,r){if(se(t))return t;var n="curve".concat(Fs(t));return(n==="curveMonotone"||n==="curveBump")&&r?$x["".concat(n).concat(r==="vertical"?"Y":"X")]:$x[n]||Us},CR=function(t){var r=t.type,n=r===void 0?"linear":r,a=t.points,i=a===void 0?[]:a,o=t.baseLine,s=t.layout,l=t.connectNulls,c=l===void 0?!1:l,f=NR(n,s),d=c?i.filter(function(g){return vo(g)}):i,h;if(Array.isArray(o)){var p=c?o.filter(function(g){return vo(g)}):o,v=d.map(function(g,m){return Dx(Dx({},g),{},{base:p[m]})});return s==="vertical"?h=lo().y(za).x1(Fa).x0(function(g){return g.base.x}):h=lo().x(Fa).y1(za).y0(function(g){return g.base.y}),h.defined(vo).curve(f),h(v)}return s==="vertical"&&H(o)?h=lo().y(za).x1(Fa).x0(o):H(o)?h=lo().x(Fa).y1(za).y0(o):h=sS().x(Fa).y(za),h.defined(vo).curve(f),h(d)},Xn=function(t){var r=t.className,n=t.points,a=t.path,i=t.pathRef;if((!n||!n.length)&&!a)return null;var o=n&&n.length?CR(t):a;return P.createElement("path",hh({},ce(t,!1),Io(t),{className:pe("recharts-curve",r),d:o,ref:i}))};const{getOwnPropertyNames:MR,getOwnPropertySymbols:IR}=Object,{hasOwnProperty:kR}=Object.prototype;function Yf(e,t){return function(n,a,i){return e(n,a,i)&&t(n,a,i)}}function go(e){return function(r,n,a){if(!r||!n||typeof r!="object"||typeof n!="object")return e(r,n,a);const{cache:i}=a,o=i.get(r),s=i.get(n);if(o&&s)return o===n&&s===r;i.set(r,n),i.set(n,r);const l=e(r,n,a);return i.delete(r),i.delete(n),l}}function RR(e){return e?.[Symbol.toStringTag]}function Lx(e){return MR(e).concat(IR(e))}const DR=Object.hasOwn||((e,t)=>kR.call(e,t));function jn(e,t){return e===t||!e&&!t&&e!==e&&t!==t}const $R="__v",LR="__o",BR="_owner",{getOwnPropertyDescriptor:Bx,keys:qx}=Object;function qR(e,t){return e.byteLength===t.byteLength&&ls(new Uint8Array(e),new Uint8Array(t))}function FR(e,t,r){let n=e.length;if(t.length!==n)return!1;for(;n-- >0;)if(!r.equals(e[n],t[n],n,n,e,t,r))return!1;return!0}function zR(e,t){return e.byteLength===t.byteLength&&ls(new Uint8Array(e.buffer,e.byteOffset,e.byteLength),new Uint8Array(t.buffer,t.byteOffset,t.byteLength))}function UR(e,t){return jn(e.getTime(),t.getTime())}function WR(e,t){return e.name===t.name&&e.message===t.message&&e.cause===t.cause&&e.stack===t.stack}function HR(e,t){return e===t}function Fx(e,t,r){const n=e.size;if(n!==t.size)return!1;if(!n)return!0;const a=new Array(n),i=e.entries();let o,s,l=0;for(;(o=i.next())&&!o.done;){const c=t.entries();let f=!1,d=0;for(;(s=c.next())&&!s.done;){if(a[d]){d++;continue}const h=o.value,p=s.value;if(r.equals(h[0],p[0],l,d,e,t,r)&&r.equals(h[1],p[1],h[0],p[0],e,t,r)){f=a[d]=!0;break}d++}if(!f)return!1;l++}return!0}const GR=jn;function KR(e,t,r){const n=qx(e);let a=n.length;if(qx(t).length!==a)return!1;for(;a-- >0;)if(!tA(e,t,r,n[a]))return!1;return!0}function Ua(e,t,r){const n=Lx(e);let a=n.length;if(Lx(t).length!==a)return!1;let i,o,s;for(;a-- >0;)if(i=n[a],!tA(e,t,r,i)||(o=Bx(e,i),s=Bx(t,i),(o||s)&&(!o||!s||o.configurable!==s.configurable||o.enumerable!==s.enumerable||o.writable!==s.writable)))return!1;return!0}function VR(e,t){return jn(e.valueOf(),t.valueOf())}function XR(e,t){return e.source===t.source&&e.flags===t.flags}function zx(e,t,r){const n=e.size;if(n!==t.size)return!1;if(!n)return!0;const a=new Array(n),i=e.values();let o,s;for(;(o=i.next())&&!o.done;){const l=t.values();let c=!1,f=0;for(;(s=l.next())&&!s.done;){if(!a[f]&&r.equals(o.value,s.value,o.value,s.value,e,t,r)){c=a[f]=!0;break}f++}if(!c)return!1}return!0}function ls(e,t){let r=e.byteLength;if(t.byteLength!==r||e.byteOffset!==t.byteOffset)return!1;for(;r-- >0;)if(e[r]!==t[r])return!1;return!0}function YR(e,t){return e.hostname===t.hostname&&e.pathname===t.pathname&&e.protocol===t.protocol&&e.port===t.port&&e.hash===t.hash&&e.username===t.username&&e.password===t.password}function tA(e,t,r,n){return(n===BR||n===LR||n===$R)&&(e.$$typeof||t.$$typeof)?!0:DR(t,n)&&r.equals(e[n],t[n],n,n,e,t,r)}const ZR="[object ArrayBuffer]",JR="[object Arguments]",QR="[object Boolean]",eD="[object DataView]",tD="[object Date]",rD="[object Error]",nD="[object Map]",aD="[object Number]",iD="[object Object]",oD="[object RegExp]",sD="[object Set]",lD="[object String]",cD={"[object Int8Array]":!0,"[object Uint8Array]":!0,"[object Uint8ClampedArray]":!0,"[object Int16Array]":!0,"[object Uint16Array]":!0,"[object Int32Array]":!0,"[object Uint32Array]":!0,"[object Float16Array]":!0,"[object Float32Array]":!0,"[object Float64Array]":!0,"[object BigInt64Array]":!0,"[object BigUint64Array]":!0},uD="[object URL]",fD=Object.prototype.toString;function dD({areArrayBuffersEqual:e,areArraysEqual:t,areDataViewsEqual:r,areDatesEqual:n,areErrorsEqual:a,areFunctionsEqual:i,areMapsEqual:o,areNumbersEqual:s,areObjectsEqual:l,arePrimitiveWrappersEqual:c,areRegExpsEqual:f,areSetsEqual:d,areTypedArraysEqual:h,areUrlsEqual:p,unknownTagComparators:v}){return function(m,y,w){if(m===y)return!0;if(m==null||y==null)return!1;const S=typeof m;if(S!==typeof y)return!1;if(S!=="object")return S==="number"?s(m,y,w):S==="function"?i(m,y,w):!1;const O=m.constructor;if(O!==y.constructor)return!1;if(O===Object)return l(m,y,w);if(Array.isArray(m))return t(m,y,w);if(O===Date)return n(m,y,w);if(O===RegExp)return f(m,y,w);if(O===Map)return o(m,y,w);if(O===Set)return d(m,y,w);const b=fD.call(m);if(b===tD)return n(m,y,w);if(b===oD)return f(m,y,w);if(b===nD)return o(m,y,w);if(b===sD)return d(m,y,w);if(b===iD)return typeof m.then!="function"&&typeof y.then!="function"&&l(m,y,w);if(b===uD)return p(m,y,w);if(b===rD)return a(m,y,w);if(b===JR)return l(m,y,w);if(cD[b])return h(m,y,w);if(b===ZR)return e(m,y,w);if(b===eD)return r(m,y,w);if(b===QR||b===aD||b===lD)return c(m,y,w);if(v){let x=v[b];if(!x){const A=RR(m);A&&(x=v[A])}if(x)return x(m,y,w)}return!1}}function hD({circular:e,createCustomConfig:t,strict:r}){let n={areArrayBuffersEqual:qR,areArraysEqual:r?Ua:FR,areDataViewsEqual:zR,areDatesEqual:UR,areErrorsEqual:WR,areFunctionsEqual:HR,areMapsEqual:r?Yf(Fx,Ua):Fx,areNumbersEqual:GR,areObjectsEqual:r?Ua:KR,arePrimitiveWrappersEqual:VR,areRegExpsEqual:XR,areSetsEqual:r?Yf(zx,Ua):zx,areTypedArraysEqual:r?Yf(ls,Ua):ls,areUrlsEqual:YR,unknownTagComparators:void 0};if(t&&(n=Object.assign({},n,t(n))),e){const a=go(n.areArraysEqual),i=go(n.areMapsEqual),o=go(n.areObjectsEqual),s=go(n.areSetsEqual);n=Object.assign({},n,{areArraysEqual:a,areMapsEqual:i,areObjectsEqual:o,areSetsEqual:s})}return n}function pD(e){return function(t,r,n,a,i,o,s){return e(t,r,s)}}function mD({circular:e,comparator:t,createState:r,equals:n,strict:a}){if(r)return function(s,l){const{cache:c=e?new WeakMap:void 0,meta:f}=r();return t(s,l,{cache:c,equals:n,meta:f,strict:a})};if(e)return function(s,l){return t(s,l,{cache:new WeakMap,equals:n,meta:void 0,strict:a})};const i={cache:void 0,equals:n,meta:void 0,strict:a};return function(s,l){return t(s,l,i)}}const vD=Br();Br({strict:!0});Br({circular:!0});Br({circular:!0,strict:!0});Br({createInternalComparator:()=>jn});Br({strict:!0,createInternalComparator:()=>jn});Br({circular:!0,createInternalComparator:()=>jn});Br({circular:!0,createInternalComparator:()=>jn,strict:!0});function Br(e={}){const{circular:t=!1,createInternalComparator:r,createState:n,strict:a=!1}=e,i=hD(e),o=dD(i),s=r?r(o):pD(o);return mD({circular:t,comparator:o,createState:n,equals:s,strict:a})}function gD(e){typeof requestAnimationFrame<"u"&&requestAnimationFrame(e)}function Ux(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,r=-1,n=function a(i){r<0&&(r=i),i-r>t?(e(i),r=-1):gD(a)};requestAnimationFrame(n)}function ph(e){"@babel/helpers - typeof";return ph=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ph(e)}function yD(e){return SD(e)||wD(e)||xD(e)||bD()}function bD(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
39In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function xD(e,t){if(e){if(typeof e=="string")return Wx(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Wx(e,t)}}function Wx(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function wD(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function SD(e){if(Array.isArray(e))return e}function OD(){var e={},t=function(){return null},r=!1,n=function a(i){if(!r){if(Array.isArray(i)){if(!i.length)return;var o=i,s=yD(o),l=s[0],c=s.slice(1);if(typeof l=="number"){Ux(a.bind(null,c),l);return}a(l),Ux(a.bind(null,c));return}ph(i)==="object"&&(e=i,t(e)),typeof i=="function"&&i()}};return{stop:function(){r=!0},start:function(i){r=!1,n(i)},subscribe:function(i){return t=i,function(){t=function(){return null}}}}}function Ai(e){"@babel/helpers - typeof";return Ai=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ai(e)}function Hx(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function Gx(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Hx(Object(r),!0).forEach(function(n){rA(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Hx(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function rA(e,t,r){return t=AD(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function AD(e){var t=_D(e,"string");return Ai(t)==="symbol"?t:String(t)}function _D(e,t){if(Ai(e)!=="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Ai(n)!=="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var jD=function(t,r){return[Object.keys(t),Object.keys(r)].reduce(function(n,a){return n.filter(function(i){return a.includes(i)})})},PD=function(t){return t},TD=function(t){return t.replace(/([A-Z])/g,function(r){return"-".concat(r.toLowerCase())})},ri=function(t,r){return Object.keys(r).reduce(function(n,a){return Gx(Gx({},n),{},rA({},a,t(a,r[a])))},{})},Kx=function(t,r,n){return t.map(function(a){return"".concat(TD(a)," ").concat(r,"ms ").concat(n)}).join(",")};function ED(e,t){return MD(e)||CD(e,t)||nA(e,t)||ND()}function ND(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
40In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function CD(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,a,i,o,s=[],l=!0,c=!1;try{if(i=(r=r.call(e)).next,t!==0)for(;!(l=(n=i.call(r)).done)&&(s.push(n.value),s.length!==t);l=!0);}catch(f){c=!0,a=f}finally{try{if(!l&&r.return!=null&&(o=r.return(),Object(o)!==o))return}finally{if(c)throw a}}return s}}function MD(e){if(Array.isArray(e))return e}function ID(e){return DD(e)||RD(e)||nA(e)||kD()}function kD(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
41In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function nA(e,t){if(e){if(typeof e=="string")return mh(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return mh(e,t)}}function RD(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function DD(e){if(Array.isArray(e))return mh(e)}function mh(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}var cs=1e-4,aA=function(t,r){return[0,3*t,3*r-6*t,3*t-3*r+1]},iA=function(t,r){return t.map(function(n,a){return n*Math.pow(r,a)}).reduce(function(n,a){return n+a})},Vx=function(t,r){return function(n){var a=aA(t,r);return iA(a,n)}},$D=function(t,r){return function(n){var a=aA(t,r),i=[].concat(ID(a.map(function(o,s){return o*s}).slice(1)),[0]);return iA(i,n)}},Xx=function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];var a=r[0],i=r[1],o=r[2],s=r[3];if(r.length===1)switch(r[0]){case"linear":a=0,i=0,o=1,s=1;break;case"ease":a=.25,i=.1,o=.25,s=1;break;case"ease-in":a=.42,i=0,o=1,s=1;break;case"ease-out":a=.42,i=0,o=.58,s=1;break;case"ease-in-out":a=0,i=0,o=.58,s=1;break;default:{var l=r[0].split("(");if(l[0]==="cubic-bezier"&&l[1].split(")")[0].split(",").length===4){var c=l[1].split(")")[0].split(",").map(function(m){return parseFloat(m)}),f=ED(c,4);a=f[0],i=f[1],o=f[2],s=f[3]}}}var d=Vx(a,o),h=Vx(i,s),p=$D(a,o),v=function(y){return y>1?1:y<0?0:y},g=function(y){for(var w=y>1?1:y,S=w,O=0;O<8;++O){var b=d(S)-w,x=p(S);if(Math.abs(b-w)<cs||x<cs)return h(S);S=v(S-b/x)}return h(S)};return g.isStepper=!1,g},LD=function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},r=t.stiff,n=r===void 0?100:r,a=t.damping,i=a===void 0?8:a,o=t.dt,s=o===void 0?17:o,l=function(f,d,h){var p=-(f-d)*n,v=h*i,g=h+(p-v)*s/1e3,m=h*s/1e3+f;return Math.abs(m-d)<cs&&Math.abs(g)<cs?[d,0]:[m,g]};return l.isStepper=!0,l.dt=s,l},BD=function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];var a=r[0];if(typeof a=="string")switch(a){case"ease":case"ease-in-out":case"ease-out":case"ease-in":case"linear":return Xx(a);case"spring":return LD();default:if(a.split("(")[0]==="cubic-bezier")return Xx(a)}return typeof a=="function"?a:null};function _i(e){"@babel/helpers - typeof";return _i=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},_i(e)}function Yx(e){return zD(e)||FD(e)||oA(e)||qD()}function qD(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
42In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function FD(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function zD(e){if(Array.isArray(e))return gh(e)}function Zx(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function Je(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Zx(Object(r),!0).forEach(function(n){vh(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Zx(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function vh(e,t,r){return t=UD(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function UD(e){var t=WD(e,"string");return _i(t)==="symbol"?t:String(t)}function WD(e,t){if(_i(e)!=="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(_i(n)!=="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function HD(e,t){return VD(e)||KD(e,t)||oA(e,t)||GD()}function GD(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
43In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function oA(e,t){if(e){if(typeof e=="string")return gh(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return gh(e,t)}}function gh(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function KD(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,a,i,o,s=[],l=!0,c=!1;try{if(i=(r=r.call(e)).next,t!==0)for(;!(l=(n=i.call(r)).done)&&(s.push(n.value),s.length!==t);l=!0);}catch(f){c=!0,a=f}finally{try{if(!l&&r.return!=null&&(o=r.return(),Object(o)!==o))return}finally{if(c)throw a}}return s}}function VD(e){if(Array.isArray(e))return e}var us=function(t,r,n){return t+(r-t)*n},yh=function(t){var r=t.from,n=t.to;return r!==n},XD=function e(t,r,n){var a=ri(function(i,o){if(yh(o)){var s=t(o.from,o.to,o.velocity),l=HD(s,2),c=l[0],f=l[1];return Je(Je({},o),{},{from:c,velocity:f})}return o},r);return n<1?ri(function(i,o){return yh(o)?Je(Je({},o),{},{velocity:us(o.velocity,a[i].velocity,n),from:us(o.from,a[i].from,n)}):o},r):e(t,a,n-1)};const YD=(function(e,t,r,n,a){var i=jD(e,t),o=i.reduce(function(m,y){return Je(Je({},m),{},vh({},y,[e[y],t[y]]))},{}),s=i.reduce(function(m,y){return Je(Je({},m),{},vh({},y,{from:e[y],velocity:0,to:t[y]}))},{}),l=-1,c,f,d=function(){return null},h=function(){return ri(function(y,w){return w.from},s)},p=function(){return!Object.values(s).filter(yh).length},v=function(y){c||(c=y);var w=y-c,S=w/r.dt;s=XD(r,s,S),a(Je(Je(Je({},e),t),h())),c=y,p()||(l=requestAnimationFrame(d))},g=function(y){f||(f=y);var w=(y-f)/n,S=ri(function(b,x){return us.apply(void 0,Yx(x).concat([r(w)]))},o);if(a(Je(Je(Je({},e),t),S)),w<1)l=requestAnimationFrame(d);else{var O=ri(function(b,x){return us.apply(void 0,Yx(x).concat([r(1)]))},o);a(Je(Je(Je({},e),t),O))}};return d=r.isStepper?v:g,function(){return requestAnimationFrame(d),function(){cancelAnimationFrame(l)}}});function la(e){"@babel/helpers - typeof";return la=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},la(e)}var ZD=["children","begin","duration","attributeName","easing","isActive","steps","from","to","canBegin","onAnimationEnd","shouldReAnimate","onAnimationReStart"];function JD(e,t){if(e==null)return{};var r=QD(e,t),n,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)n=i[a],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function QD(e,t){if(e==null)return{};var r={},n=Object.keys(e),a,i;for(i=0;i<n.length;i++)a=n[i],!(t.indexOf(a)>=0)&&(r[a]=e[a]);return r}function Zf(e){return n2(e)||r2(e)||t2(e)||e2()}function e2(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
44In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function t2(e,t){if(e){if(typeof e=="string")return bh(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return bh(e,t)}}function r2(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function n2(e){if(Array.isArray(e))return bh(e)}function bh(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function Jx(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function $t(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Jx(Object(r),!0).forEach(function(n){Za(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Jx(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Za(e,t,r){return t=sA(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function a2(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i2(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,sA(n.key),n)}}function o2(e,t,r){return t&&i2(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function sA(e){var t=s2(e,"string");return la(t)==="symbol"?t:String(t)}function s2(e,t){if(la(e)!=="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(la(n)!=="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function l2(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&xh(e,t)}function xh(e,t){return xh=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,a){return n.__proto__=a,n},xh(e,t)}function c2(e){var t=u2();return function(){var n=fs(e),a;if(t){var i=fs(this).constructor;a=Reflect.construct(n,arguments,i)}else a=n.apply(this,arguments);return wh(this,a)}}function wh(e,t){if(t&&(la(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Sh(e)}function Sh(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function u2(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function fs(e){return fs=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},fs(e)}var tr=(function(e){l2(r,e);var t=c2(r);function r(n,a){var i;a2(this,r),i=t.call(this,n,a);var o=i.props,s=o.isActive,l=o.attributeName,c=o.from,f=o.to,d=o.steps,h=o.children,p=o.duration;if(i.handleStyleChange=i.handleStyleChange.bind(Sh(i)),i.changeStyle=i.changeStyle.bind(Sh(i)),!s||p<=0)return i.state={style:{}},typeof h=="function"&&(i.state={style:f}),wh(i);if(d&&d.length)i.state={style:d[0].style};else if(c){if(typeof h=="function")return i.state={style:c},wh(i);i.state={style:l?Za({},l,c):c}}else i.state={style:{}};return i}return o2(r,[{key:"componentDidMount",value:function(){var a=this.props,i=a.isActive,o=a.canBegin;this.mounted=!0,!(!i||!o)&&this.runAnimation(this.props)}},{key:"componentDidUpdate",value:function(a){var i=this.props,o=i.isActive,s=i.canBegin,l=i.attributeName,c=i.shouldReAnimate,f=i.to,d=i.from,h=this.state.style;if(s){if(!o){var p={style:l?Za({},l,f):f};this.state&&h&&(l&&h[l]!==f||!l&&h!==f)&&this.setState(p);return}if(!(vD(a.to,f)&&a.canBegin&&a.isActive)){var v=!a.canBegin||!a.isActive;this.manager&&this.manager.stop(),this.stopJSAnimation&&this.stopJSAnimation();var g=v||c?d:a.to;if(this.state&&h){var m={style:l?Za({},l,g):g};(l&&h[l]!==g||!l&&h!==g)&&this.setState(m)}this.runAnimation($t($t({},this.props),{},{from:g,begin:0}))}}}},{key:"componentWillUnmount",value:function(){this.mounted=!1;var a=this.props.onAnimationEnd;this.unSubscribe&&this.unSubscribe(),this.manager&&(this.manager.stop(),this.manager=null),this.stopJSAnimation&&this.stopJSAnimation(),a&&a()}},{key:"handleStyleChange",value:function(a){this.changeStyle(a)}},{key:"changeStyle",value:function(a){this.mounted&&this.setState({style:a})}},{key:"runJSAnimation",value:function(a){var i=this,o=a.from,s=a.to,l=a.duration,c=a.easing,f=a.begin,d=a.onAnimationEnd,h=a.onAnimationStart,p=YD(o,s,BD(c),l,this.changeStyle),v=function(){i.stopJSAnimation=p()};this.manager.start([h,f,v,l,d])}},{key:"runStepAnimation",value:function(a){var i=this,o=a.steps,s=a.begin,l=a.onAnimationStart,c=o[0],f=c.style,d=c.duration,h=d===void 0?0:d,p=function(g,m,y){if(y===0)return g;var w=m.duration,S=m.easing,O=S===void 0?"ease":S,b=m.style,x=m.properties,A=m.onAnimationEnd,j=y>0?o[y-1]:m,E=x||Object.keys(b);if(typeof O=="function"||O==="spring")return[].concat(Zf(g),[i.runJSAnimation.bind(i,{from:j.style,to:b,duration:w,easing:O}),w]);var I=Kx(E,w,O),N=$t($t($t({},j.style),b),{},{transition:I});return[].concat(Zf(g),[N,w,A]).filter(PD)};return this.manager.start([l].concat(Zf(o.reduce(p,[f,Math.max(h,s)])),[a.onAnimationEnd]))}},{key:"runAnimation",value:function(a){this.manager||(this.manager=OD());var i=a.begin,o=a.duration,s=a.attributeName,l=a.to,c=a.easing,f=a.onAnimationStart,d=a.onAnimationEnd,h=a.steps,p=a.children,v=this.manager;if(this.unSubscribe=v.subscribe(this.handleStyleChange),typeof c=="function"||typeof p=="function"||c==="spring"){this.runJSAnimation(a);return}if(h.length>1){this.runStepAnimation(a);return}var g=s?Za({},s,l):l,m=Kx(Object.keys(g),o,c);v.start([f,i,$t($t({},g),{},{transition:m}),o,d])}},{key:"render",value:function(){var a=this.props,i=a.children;a.begin;var o=a.duration;a.attributeName,a.easing;var s=a.isActive;a.steps,a.from,a.to,a.canBegin,a.onAnimationEnd,a.shouldReAnimate,a.onAnimationReStart;var l=JD(a,ZD),c=P.Children.count(i),f=this.state.style;if(typeof i=="function")return i(f);if(!s||c===0||o<=0)return i;var d=function(p){var v=p.props,g=v.style,m=g===void 0?{}:g,y=v.className,w=P.cloneElement(p,$t($t({},l),{},{style:$t($t({},m),f),className:y}));return w};return c===1?d(P.Children.only(i)):C.createElement("div",null,P.Children.map(i,function(h){return d(h)}))}}]),r})(P.PureComponent);tr.displayName="Animate";tr.defaultProps={begin:0,duration:1e3,from:"",to:"",attributeName:"",easing:"ease",isActive:!0,canBegin:!0,steps:[],onAnimationEnd:function(){},onAnimationStart:function(){}};tr.propTypes={from:ge.oneOfType([ge.object,ge.string]),to:ge.oneOfType([ge.object,ge.string]),attributeName:ge.string,duration:ge.number,begin:ge.number,easing:ge.oneOfType([ge.string,ge.func]),steps:ge.arrayOf(ge.shape({duration:ge.number.isRequired,style:ge.object.isRequired,easing:ge.oneOfType([ge.oneOf(["ease","ease-in","ease-out","ease-in-out","linear"]),ge.func]),properties:ge.arrayOf("string"),onAnimationEnd:ge.func})),children:ge.oneOfType([ge.node,ge.func]),isActive:ge.bool,canBegin:ge.bool,onAnimationEnd:ge.func,shouldReAnimate:ge.bool,onAnimationStart:ge.func,onAnimationReStart:ge.func};function ji(e){"@babel/helpers - typeof";return ji=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ji(e)}function ds(){return ds=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},ds.apply(this,arguments)}function f2(e,t){return m2(e)||p2(e,t)||h2(e,t)||d2()}function d2(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
45In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function h2(e,t){if(e){if(typeof e=="string")return Qx(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Qx(e,t)}}function Qx(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function p2(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,a,i,o,s=[],l=!0,c=!1;try{if(i=(r=r.call(e)).next,t!==0)for(;!(l=(n=i.call(r)).done)&&(s.push(n.value),s.length!==t);l=!0);}catch(f){c=!0,a=f}finally{try{if(!l&&r.return!=null&&(o=r.return(),Object(o)!==o))return}finally{if(c)throw a}}return s}}function m2(e){if(Array.isArray(e))return e}function e0(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function t0(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?e0(Object(r),!0).forEach(function(n){v2(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):e0(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function v2(e,t,r){return t=g2(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function g2(e){var t=y2(e,"string");return ji(t)=="symbol"?t:t+""}function y2(e,t){if(ji(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(ji(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var r0=function(t,r,n,a,i){var o=Math.min(Math.abs(n)/2,Math.abs(a)/2),s=a>=0?1:-1,l=n>=0?1:-1,c=a>=0&&n>=0||a<0&&n<0?1:0,f;if(o>0&&i instanceof Array){for(var d=[0,0,0,0],h=0,p=4;h<p;h++)d[h]=i[h]>o?o:i[h];f="M".concat(t,",").concat(r+s*d[0]),d[0]>0&&(f+="A ".concat(d[0],",").concat(d[0],",0,0,").concat(c,",").concat(t+l*d[0],",").concat(r)),f+="L ".concat(t+n-l*d[1],",").concat(r),d[1]>0&&(f+="A ".concat(d[1],",").concat(d[1],",0,0,").concat(c,`,
46        `).concat(t+n,",").concat(r+s*d[1])),f+="L ".concat(t+n,",").concat(r+a-s*d[2]),d[2]>0&&(f+="A ".concat(d[2],",").concat(d[2],",0,0,").concat(c,`,
47        `).concat(t+n-l*d[2],",").concat(r+a)),f+="L ".concat(t+l*d[3],",").concat(r+a),d[3]>0&&(f+="A ".concat(d[3],",").concat(d[3],",0,0,").concat(c,`,
48        `).concat(t,",").concat(r+a-s*d[3])),f+="Z"}else if(o>0&&i===+i&&i>0){var v=Math.min(o,i);f="M ".concat(t,",").concat(r+s*v,`
49            A `).concat(v,",").concat(v,",0,0,").concat(c,",").concat(t+l*v,",").concat(r,`
50            L `).concat(t+n-l*v,",").concat(r,`
51            A `).concat(v,",").concat(v,",0,0,").concat(c,",").concat(t+n,",").concat(r+s*v,`
52            L `).concat(t+n,",").concat(r+a-s*v,`
53            A `).concat(v,",").concat(v,",0,0,").concat(c,",").concat(t+n-l*v,",").concat(r+a,`
54            L `).concat(t+l*v,",").concat(r+a,`
55            A `).concat(v,",").concat(v,",0,0,").concat(c,",").concat(t,",").concat(r+a-s*v," Z")}else f="M ".concat(t,",").concat(r," h ").concat(n," v ").concat(a," h ").concat(-n," Z");return f},b2=function(t,r){if(!t||!r)return!1;var n=t.x,a=t.y,i=r.x,o=r.y,s=r.width,l=r.height;if(Math.abs(s)>0&&Math.abs(l)>0){var c=Math.min(i,i+s),f=Math.max(i,i+s),d=Math.min(o,o+l),h=Math.max(o,o+l);return n>=c&&n<=f&&a>=d&&a<=h}return!1},x2={x:0,y:0,width:0,height:0,radius:0,isAnimationActive:!1,isUpdateAnimationActive:!1,animationBegin:0,animationDuration:1500,animationEasing:"ease"},Xp=function(t){var r=t0(t0({},x2),t),n=P.useRef(),a=P.useState(-1),i=f2(a,2),o=i[0],s=i[1];P.useEffect(function(){if(n.current&&n.current.getTotalLength)try{var O=n.current.getTotalLength();O&&s(O)}catch{}},[]);var l=r.x,c=r.y,f=r.width,d=r.height,h=r.radius,p=r.className,v=r.animationEasing,g=r.animationDuration,m=r.animationBegin,y=r.isAnimationActive,w=r.isUpdateAnimationActive;if(l!==+l||c!==+c||f!==+f||d!==+d||f===0||d===0)return null;var S=pe("recharts-rectangle",p);return w?C.createElement(tr,{canBegin:o>0,from:{width:f,height:d,x:l,y:c},to:{width:f,height:d,x:l,y:c},duration:g,animationEasing:v,isActive:w},function(O){var b=O.width,x=O.height,A=O.x,j=O.y;return C.createElement(tr,{canBegin:o>0,from:"0px ".concat(o===-1?1:o,"px"),to:"".concat(o,"px 0px"),attributeName:"strokeDasharray",begin:m,duration:g,isActive:y,easing:v},C.createElement("path",ds({},ce(r,!0),{className:S,d:r0(A,j,b,x,h),ref:n})))}):C.createElement("path",ds({},ce(r,!0),{className:S,d:r0(l,c,f,d,h)}))};function Oh(){return Oh=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Oh.apply(this,arguments)}var nl=function(t){var r=t.cx,n=t.cy,a=t.r,i=t.className,o=pe("recharts-dot",i);return r===+r&&n===+n&&a===+a?P.createElement("circle",Oh({},ce(t,!1),Io(t),{className:o,cx:r,cy:n,r:a})):null};function Pi(e){"@babel/helpers - typeof";return Pi=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Pi(e)}var w2=["x","y","top","left","width","height","className"];function Ah(){return Ah=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Ah.apply(this,arguments)}function n0(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function S2(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?n0(Object(r),!0).forEach(function(n){O2(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):n0(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function O2(e,t,r){return t=A2(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function A2(e){var t=_2(e,"string");return Pi(t)=="symbol"?t:t+""}function _2(e,t){if(Pi(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Pi(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function j2(e,t){if(e==null)return{};var r=P2(e,t),n,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)n=i[a],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function P2(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}var T2=function(t,r,n,a,i,o){return"M".concat(t,",").concat(i,"v").concat(a,"M").concat(o,",").concat(r,"h").concat(n)},E2=function(t){var r=t.x,n=r===void 0?0:r,a=t.y,i=a===void 0?0:a,o=t.top,s=o===void 0?0:o,l=t.left,c=l===void 0?0:l,f=t.width,d=f===void 0?0:f,h=t.height,p=h===void 0?0:h,v=t.className,g=j2(t,w2),m=S2({x:n,y:i,top:s,left:c,width:d,height:p},g);return!H(n)||!H(i)||!H(d)||!H(p)||!H(s)||!H(c)?null:C.createElement("path",Ah({},ce(m,!0),{className:pe("recharts-cross",v),d:T2(n,i,d,p,s,c)}))},Jf,a0;function N2(){if(a0)return Jf;a0=1;var e=NS(),t=e(Object.getPrototypeOf,Object);return Jf=t,Jf}var Qf,i0;function C2(){if(i0)return Qf;i0=1;var e=yr(),t=N2(),r=br(),n="[object Object]",a=Function.prototype,i=Object.prototype,o=a.toString,s=i.hasOwnProperty,l=o.call(Object);function c(f){if(!r(f)||e(f)!=n)return!1;var d=t(f);if(d===null)return!0;var h=s.call(d,"constructor")&&d.constructor;return typeof h=="function"&&h instanceof h&&o.call(h)==l}return Qf=c,Qf}var M2=C2();const I2=Ce(M2);var ed,o0;function k2(){if(o0)return ed;o0=1;var e=yr(),t=br(),r="[object Boolean]";function n(a){return a===!0||a===!1||t(a)&&e(a)==r}return ed=n,ed}var R2=k2();const D2=Ce(R2);function Ti(e){"@babel/helpers - typeof";return Ti=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ti(e)}function hs(){return hs=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},hs.apply(this,arguments)}function $2(e,t){return F2(e)||q2(e,t)||B2(e,t)||L2()}function L2(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
56In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function B2(e,t){if(e){if(typeof e=="string")return s0(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return s0(e,t)}}function s0(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function q2(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,a,i,o,s=[],l=!0,c=!1;try{if(i=(r=r.call(e)).next,t!==0)for(;!(l=(n=i.call(r)).done)&&(s.push(n.value),s.length!==t);l=!0);}catch(f){c=!0,a=f}finally{try{if(!l&&r.return!=null&&(o=r.return(),Object(o)!==o))return}finally{if(c)throw a}}return s}}function F2(e){if(Array.isArray(e))return e}function l0(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function c0(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?l0(Object(r),!0).forEach(function(n){z2(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):l0(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function z2(e,t,r){return t=U2(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function U2(e){var t=W2(e,"string");return Ti(t)=="symbol"?t:t+""}function W2(e,t){if(Ti(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Ti(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var u0=function(t,r,n,a,i){var o=n-a,s;return s="M ".concat(t,",").concat(r),s+="L ".concat(t+n,",").concat(r),s+="L ".concat(t+n-o/2,",").concat(r+i),s+="L ".concat(t+n-o/2-a,",").concat(r+i),s+="L ".concat(t,",").concat(r," Z"),s},H2={x:0,y:0,upperWidth:0,lowerWidth:0,height:0,isUpdateAnimationActive:!1,animationBegin:0,animationDuration:1500,animationEasing:"ease"},G2=function(t){var r=c0(c0({},H2),t),n=P.useRef(),a=P.useState(-1),i=$2(a,2),o=i[0],s=i[1];P.useEffect(function(){if(n.current&&n.current.getTotalLength)try{var S=n.current.getTotalLength();S&&s(S)}catch{}},[]);var l=r.x,c=r.y,f=r.upperWidth,d=r.lowerWidth,h=r.height,p=r.className,v=r.animationEasing,g=r.animationDuration,m=r.animationBegin,y=r.isUpdateAnimationActive;if(l!==+l||c!==+c||f!==+f||d!==+d||h!==+h||f===0&&d===0||h===0)return null;var w=pe("recharts-trapezoid",p);return y?C.createElement(tr,{canBegin:o>0,from:{upperWidth:0,lowerWidth:0,height:h,x:l,y:c},to:{upperWidth:f,lowerWidth:d,height:h,x:l,y:c},duration:g,animationEasing:v,isActive:y},function(S){var O=S.upperWidth,b=S.lowerWidth,x=S.height,A=S.x,j=S.y;return C.createElement(tr,{canBegin:o>0,from:"0px ".concat(o===-1?1:o,"px"),to:"".concat(o,"px 0px"),attributeName:"strokeDasharray",begin:m,duration:g,easing:v},C.createElement("path",hs({},ce(r,!0),{className:w,d:u0(A,j,O,b,x),ref:n})))}):C.createElement("g",null,C.createElement("path",hs({},ce(r,!0),{className:w,d:u0(l,c,f,d,h)})))},K2=["option","shapeType","propTransformer","activeClassName","isActive"];function Ei(e){"@babel/helpers - typeof";return Ei=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ei(e)}function V2(e,t){if(e==null)return{};var r=X2(e,t),n,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)n=i[a],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function X2(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function f0(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function ps(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?f0(Object(r),!0).forEach(function(n){Y2(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):f0(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Y2(e,t,r){return t=Z2(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Z2(e){var t=J2(e,"string");return Ei(t)=="symbol"?t:t+""}function J2(e,t){if(Ei(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Ei(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Q2(e,t){return ps(ps({},t),e)}function e$(e,t){return e==="symbols"}function d0(e){var t=e.shapeType,r=e.elementProps;switch(t){case"rectangle":return C.createElement(Xp,r);case"trapezoid":return C.createElement(G2,r);case"sector":return C.createElement(eA,r);case"symbols":if(e$(t))return C.createElement(mp,r);break;default:return null}}function t$(e){return P.isValidElement(e)?e.props:e}function r$(e){var t=e.option,r=e.shapeType,n=e.propTransformer,a=n===void 0?Q2:n,i=e.activeClassName,o=i===void 0?"recharts-active-shape":i,s=e.isActive,l=V2(e,K2),c;if(P.isValidElement(t))c=P.cloneElement(t,ps(ps({},l),t$(t)));else if(se(t))c=t(l);else if(I2(t)&&!D2(t)){var f=a(t,l);c=C.createElement(d0,{shapeType:r,elementProps:f})}else{var d=l;c=C.createElement(d0,{shapeType:r,elementProps:d})}return s?C.createElement(je,{className:o},c):c}function al(e,t){return t!=null&&"trapezoids"in e.props}function il(e,t){return t!=null&&"sectors"in e.props}function Ni(e,t){return t!=null&&"points"in e.props}function n$(e,t){var r,n,a=e.x===(t==null||(r=t.labelViewBox)===null||r===void 0?void 0:r.x)||e.x===t.x,i=e.y===(t==null||(n=t.labelViewBox)===null||n===void 0?void 0:n.y)||e.y===t.y;return a&&i}function a$(e,t){var r=e.endAngle===t.endAngle,n=e.startAngle===t.startAngle;return r&&n}function i$(e,t){var r=e.x===t.x,n=e.y===t.y,a=e.z===t.z;return r&&n&&a}function o$(e,t){var r;return al(e,t)?r=n$:il(e,t)?r=a$:Ni(e,t)&&(r=i$),r}function s$(e,t){var r;return al(e,t)?r="trapezoids":il(e,t)?r="sectors":Ni(e,t)&&(r="points"),r}function l$(e,t){if(al(e,t)){var r;return(r=t.tooltipPayload)===null||r===void 0||(r=r[0])===null||r===void 0||(r=r.payload)===null||r===void 0?void 0:r.payload}if(il(e,t)){var n;return(n=t.tooltipPayload)===null||n===void 0||(n=n[0])===null||n===void 0||(n=n.payload)===null||n===void 0?void 0:n.payload}return Ni(e,t)?t.payload:{}}function c$(e){var t=e.activeTooltipItem,r=e.graphicalItem,n=e.itemData,a=s$(r,t),i=l$(r,t),o=n.filter(function(l,c){var f=oa(i,l),d=r.props[a].filter(function(v){var g=o$(r,t);return g(v,t)}),h=r.props[a].indexOf(d[d.length-1]),p=c===h;return f&&p}),s=n.indexOf(o[o.length-1]);return s}var td,h0;function u$(){if(h0)return td;h0=1;var e=Math.ceil,t=Math.max;function r(n,a,i,o){for(var s=-1,l=t(e((a-n)/(i||1)),0),c=Array(l);l--;)c[o?l:++s]=n,n+=i;return c}return td=r,td}var rd,p0;function lA(){if(p0)return rd;p0=1;var e=GS(),t=1/0,r=17976931348623157e292;function n(a){if(!a)return a===0?a:0;if(a=e(a),a===t||a===-t){var i=a<0?-1:1;return i*r}return a===a?a:0}return rd=n,rd}var nd,m0;function f$(){if(m0)return nd;m0=1;var e=u$(),t=Ks(),r=lA();function n(a){return function(i,o,s){return s&&typeof s!="number"&&t(i,o,s)&&(o=s=void 0),i=r(i),o===void 0?(o=i,i=0):o=r(o),s=s===void 0?i<o?1:-1:r(s),e(i,o,s,a)}}return nd=n,nd}var ad,v0;function d$(){if(v0)return ad;v0=1;var e=f$(),t=e();return ad=t,ad}var h$=d$();const ms=Ce(h$);function Ci(e){"@babel/helpers - typeof";return Ci=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ci(e)}function g0(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function y0(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?g0(Object(r),!0).forEach(function(n){cA(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):g0(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function cA(e,t,r){return t=p$(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function p$(e){var t=m$(e,"string");return Ci(t)=="symbol"?t:t+""}function m$(e,t){if(Ci(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Ci(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var v$=["Webkit","Moz","O","ms"],g$=function(t,r){var n=t.replace(/(\w)/,function(i){return i.toUpperCase()}),a=v$.reduce(function(i,o){return y0(y0({},i),{},cA({},o+n,r))},{});return a[t]=r,a};function ca(e){"@babel/helpers - typeof";return ca=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ca(e)}function vs(){return vs=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},vs.apply(this,arguments)}function b0(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function id(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?b0(Object(r),!0).forEach(function(n){yt(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):b0(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function y$(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function x0(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,fA(n.key),n)}}function b$(e,t,r){return t&&x0(e.prototype,t),r&&x0(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function x$(e,t,r){return t=gs(t),w$(e,uA()?Reflect.construct(t,r||[],gs(e).constructor):t.apply(e,r))}function w$(e,t){if(t&&(ca(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return S$(e)}function S$(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function uA(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(uA=function(){return!!e})()}function gs(e){return gs=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},gs(e)}function O$(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&_h(e,t)}function _h(e,t){return _h=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,a){return n.__proto__=a,n},_h(e,t)}function yt(e,t,r){return t=fA(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function fA(e){var t=A$(e,"string");return ca(t)=="symbol"?t:t+""}function A$(e,t){if(ca(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(ca(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var _$=function(t){var r=t.data,n=t.startIndex,a=t.endIndex,i=t.x,o=t.width,s=t.travellerWidth;if(!r||!r.length)return{};var l=r.length,c=ei().domain(ms(0,l)).range([i,i+o-s]),f=c.domain().map(function(d){return c(d)});return{isTextActive:!1,isSlideMoving:!1,isTravellerMoving:!1,isTravellerFocused:!1,startX:c(n),endX:c(a),scale:c,scaleValues:f}},w0=function(t){return t.changedTouches&&!!t.changedTouches.length},ua=(function(e){function t(r){var n;return y$(this,t),n=x$(this,t,[r]),yt(n,"handleDrag",function(a){n.leaveTimer&&(clearTimeout(n.leaveTimer),n.leaveTimer=null),n.state.isTravellerMoving?n.handleTravellerMove(a):n.state.isSlideMoving&&n.handleSlideDrag(a)}),yt(n,"handleTouchMove",function(a){a.changedTouches!=null&&a.changedTouches.length>0&&n.handleDrag(a.changedTouches[0])}),yt(n,"handleDragEnd",function(){n.setState({isTravellerMoving:!1,isSlideMoving:!1},function(){var a=n.props,i=a.endIndex,o=a.onDragEnd,s=a.startIndex;o?.({endIndex:i,startIndex:s})}),n.detachDragEndListener()}),yt(n,"handleLeaveWrapper",function(){(n.state.isTravellerMoving||n.state.isSlideMoving)&&(n.leaveTimer=window.setTimeout(n.handleDragEnd,n.props.leaveTimeOut))}),yt(n,"handleEnterSlideOrTraveller",function(){n.setState({isTextActive:!0})}),yt(n,"handleLeaveSlideOrTraveller",function(){n.setState({isTextActive:!1})}),yt(n,"handleSlideDragStart",function(a){var i=w0(a)?a.changedTouches[0]:a;n.setState({isTravellerMoving:!1,isSlideMoving:!0,slideMoveStartX:i.pageX}),n.attachDragEndListener()}),n.travellerDragStartHandlers={startX:n.handleTravellerDragStart.bind(n,"startX"),endX:n.handleTravellerDragStart.bind(n,"endX")},n.state={},n}return O$(t,e),b$(t,[{key:"componentWillUnmount",value:function(){this.leaveTimer&&(clearTimeout(this.leaveTimer),this.leaveTimer=null),this.detachDragEndListener()}},{key:"getIndex",value:function(n){var a=n.startX,i=n.endX,o=this.state.scaleValues,s=this.props,l=s.gap,c=s.data,f=c.length-1,d=Math.min(a,i),h=Math.max(a,i),p=t.getIndexInRange(o,d),v=t.getIndexInRange(o,h);return{startIndex:p-p%l,endIndex:v===f?f:v-v%l}}},{key:"getTextOfTick",value:function(n){var a=this.props,i=a.data,o=a.tickFormatter,s=a.dataKey,l=ft(i[n],s,n);return se(o)?o(l,n):l}},{key:"attachDragEndListener",value:function(){window.addEventListener("mouseup",this.handleDragEnd,!0),window.addEventListener("touchend",this.handleDragEnd,!0),window.addEventListener("mousemove",this.handleDrag,!0)}},{key:"detachDragEndListener",value:function(){window.removeEventListener("mouseup",this.handleDragEnd,!0),window.removeEventListener("touchend",this.handleDragEnd,!0),window.removeEventListener("mousemove",this.handleDrag,!0)}},{key:"handleSlideDrag",value:function(n){var a=this.state,i=a.slideMoveStartX,o=a.startX,s=a.endX,l=this.props,c=l.x,f=l.width,d=l.travellerWidth,h=l.startIndex,p=l.endIndex,v=l.onChange,g=n.pageX-i;g>0?g=Math.min(g,c+f-d-s,c+f-d-o):g<0&&(g=Math.max(g,c-o,c-s));var m=this.getIndex({startX:o+g,endX:s+g});(m.startIndex!==h||m.endIndex!==p)&&v&&v(m),this.setState({startX:o+g,endX:s+g,slideMoveStartX:n.pageX})}},{key:"handleTravellerDragStart",value:function(n,a){var i=w0(a)?a.changedTouches[0]:a;this.setState({isSlideMoving:!1,isTravellerMoving:!0,movingTravellerId:n,brushMoveStartX:i.pageX}),this.attachDragEndListener()}},{key:"handleTravellerMove",value:function(n){var a=this.state,i=a.brushMoveStartX,o=a.movingTravellerId,s=a.endX,l=a.startX,c=this.state[o],f=this.props,d=f.x,h=f.width,p=f.travellerWidth,v=f.onChange,g=f.gap,m=f.data,y={startX:this.state.startX,endX:this.state.endX},w=n.pageX-i;w>0?w=Math.min(w,d+h-p-c):w<0&&(w=Math.max(w,d-c)),y[o]=c+w;var S=this.getIndex(y),O=S.startIndex,b=S.endIndex,x=function(){var j=m.length-1;return o==="startX"&&(s>l?O%g===0:b%g===0)||s<l&&b===j||o==="endX"&&(s>l?b%g===0:O%g===0)||s>l&&b===j};this.setState(yt(yt({},o,c+w),"brushMoveStartX",n.pageX),function(){v&&x()&&v(S)})}},{key:"handleTravellerMoveKeyboard",value:function(n,a){var i=this,o=this.state,s=o.scaleValues,l=o.startX,c=o.endX,f=this.state[a],d=s.indexOf(f);if(d!==-1){var h=d+n;if(!(h===-1||h>=s.length)){var p=s[h];a==="startX"&&p>=c||a==="endX"&&p<=l||this.setState(yt({},a,p),function(){i.props.onChange(i.getIndex({startX:i.state.startX,endX:i.state.endX}))})}}}},{key:"renderBackground",value:function(){var n=this.props,a=n.x,i=n.y,o=n.width,s=n.height,l=n.fill,c=n.stroke;return C.createElement("rect",{stroke:c,fill:l,x:a,y:i,width:o,height:s})}},{key:"renderPanorama",value:function(){var n=this.props,a=n.x,i=n.y,o=n.width,s=n.height,l=n.data,c=n.children,f=n.padding,d=P.Children.only(c);return d?C.cloneElement(d,{x:a,y:i,width:o,height:s,margin:f,compact:!0,data:l}):null}},{key:"renderTravellerLayer",value:function(n,a){var i,o,s=this,l=this.props,c=l.y,f=l.travellerWidth,d=l.height,h=l.traveller,p=l.ariaLabel,v=l.data,g=l.startIndex,m=l.endIndex,y=Math.max(n,this.props.x),w=id(id({},ce(this.props,!1)),{},{x:y,y:c,width:f,height:d}),S=p||"Min value: ".concat((i=v[g])===null||i===void 0?void 0:i.name,", Max value: ").concat((o=v[m])===null||o===void 0?void 0:o.name);return C.createElement(je,{tabIndex:0,role:"slider","aria-label":S,"aria-valuenow":n,className:"recharts-brush-traveller",onMouseEnter:this.handleEnterSlideOrTraveller,onMouseLeave:this.handleLeaveSlideOrTraveller,onMouseDown:this.travellerDragStartHandlers[a],onTouchStart:this.travellerDragStartHandlers[a],onKeyDown:function(b){["ArrowLeft","ArrowRight"].includes(b.key)&&(b.preventDefault(),b.stopPropagation(),s.handleTravellerMoveKeyboard(b.key==="ArrowRight"?1:-1,a))},onFocus:function(){s.setState({isTravellerFocused:!0})},onBlur:function(){s.setState({isTravellerFocused:!1})},style:{cursor:"col-resize"}},t.renderTraveller(h,w))}},{key:"renderSlide",value:function(n,a){var i=this.props,o=i.y,s=i.height,l=i.stroke,c=i.travellerWidth,f=Math.min(n,a)+c,d=Math.max(Math.abs(a-n)-c,0);return C.createElement("rect",{className:"recharts-brush-slide",onMouseEnter:this.handleEnterSlideOrTraveller,onMouseLeave:this.handleLeaveSlideOrTraveller,onMouseDown:this.handleSlideDragStart,onTouchStart:this.handleSlideDragStart,style:{cursor:"move"},stroke:"none",fill:l,fillOpacity:.2,x:f,y:o,width:d,height:s})}},{key:"renderText",value:function(){var n=this.props,a=n.startIndex,i=n.endIndex,o=n.y,s=n.height,l=n.travellerWidth,c=n.stroke,f=this.state,d=f.startX,h=f.endX,p=5,v={pointerEvents:"none",fill:c};return C.createElement(je,{className:"recharts-brush-texts"},C.createElement(Ho,vs({textAnchor:"end",verticalAnchor:"middle",x:Math.min(d,h)-p,y:o+s/2},v),this.getTextOfTick(a)),C.createElement(Ho,vs({textAnchor:"start",verticalAnchor:"middle",x:Math.max(d,h)+l+p,y:o+s/2},v),this.getTextOfTick(i)))}},{key:"render",value:function(){var n=this.props,a=n.data,i=n.className,o=n.children,s=n.x,l=n.y,c=n.width,f=n.height,d=n.alwaysShowText,h=this.state,p=h.startX,v=h.endX,g=h.isTextActive,m=h.isSlideMoving,y=h.isTravellerMoving,w=h.isTravellerFocused;if(!a||!a.length||!H(s)||!H(l)||!H(c)||!H(f)||c<=0||f<=0)return null;var S=pe("recharts-brush",i),O=C.Children.count(o)===1,b=g$("userSelect","none");return C.createElement(je,{className:S,onMouseLeave:this.handleLeaveWrapper,onTouchMove:this.handleTouchMove,style:b},this.renderBackground(),O&&this.renderPanorama(),this.renderSlide(p,v),this.renderTravellerLayer(p,"startX"),this.renderTravellerLayer(v,"endX"),(g||m||y||w||d)&&this.renderText())}}],[{key:"renderDefaultTraveller",value:function(n){var a=n.x,i=n.y,o=n.width,s=n.height,l=n.stroke,c=Math.floor(i+s/2)-1;return C.createElement(C.Fragment,null,C.createElement("rect",{x:a,y:i,width:o,height:s,fill:l,stroke:"none"}),C.createElement("line",{x1:a+1,y1:c,x2:a+o-1,y2:c,fill:"none",stroke:"#fff"}),C.createElement("line",{x1:a+1,y1:c+2,x2:a+o-1,y2:c+2,fill:"none",stroke:"#fff"}))}},{key:"renderTraveller",value:function(n,a){var i;return C.isValidElement(n)?i=C.cloneElement(n,a):se(n)?i=n(a):i=t.renderDefaultTraveller(a),i}},{key:"getDerivedStateFromProps",value:function(n,a){var i=n.data,o=n.width,s=n.x,l=n.travellerWidth,c=n.updateId,f=n.startIndex,d=n.endIndex;if(i!==a.prevData||c!==a.prevUpdateId)return id({prevData:i,prevTravellerWidth:l,prevUpdateId:c,prevX:s,prevWidth:o},i&&i.length?_$({data:i,width:o,x:s,travellerWidth:l,startIndex:f,endIndex:d}):{scale:null,scaleValues:null});if(a.scale&&(o!==a.prevWidth||s!==a.prevX||l!==a.prevTravellerWidth)){a.scale.range([s,s+o-l]);var h=a.scale.domain().map(function(p){return a.scale(p)});return{prevData:i,prevTravellerWidth:l,prevUpdateId:c,prevX:s,prevWidth:o,startX:a.scale(n.startIndex),endX:a.scale(n.endIndex),scaleValues:h}}return null}},{key:"getIndexInRange",value:function(n,a){for(var i=n.length,o=0,s=i-1;s-o>1;){var l=Math.floor((o+s)/2);n[l]>a?s=l:o=l}return a>=n[s]?s:o}}])})(P.PureComponent);yt(ua,"displayName","Brush");yt(ua,"defaultProps",{height:40,travellerWidth:5,gap:1,fill:"#fff",stroke:"#666",padding:{top:1,right:1,bottom:1,left:1},leaveTimeOut:1e3,alwaysShowText:!1});var od,S0;function j$(){if(S0)return od;S0=1;var e=Sp();function t(r,n){var a;return e(r,function(i,o,s){return a=n(i,o,s),!a}),!!a}return od=t,od}var sd,O0;function P$(){if(O0)return sd;O0=1;var e=OS(),t=Dr(),r=j$(),n=mt(),a=Ks();function i(o,s,l){var c=n(o)?e:r;return l&&a(o,s,l)&&(s=void 0),c(o,t(s,3))}return sd=i,sd}var T$=P$();const E$=Ce(T$);var Qt=function(t,r){var n=t.alwaysShow,a=t.ifOverflow;return n&&(a="extendDomain"),a===r},ld,A0;function N$(){if(A0)return ld;A0=1;var e=FS();function t(r,n,a){n=="__proto__"&&e?e(r,n,{configurable:!0,enumerable:!0,value:a,writable:!0}):r[n]=a}return ld=t,ld}var cd,_0;function C$(){if(_0)return cd;_0=1;var e=N$(),t=BS(),r=Dr();function n(a,i){var o={};return i=r(i,3),t(a,function(s,l,c){e(o,l,i(s,l,c))}),o}return cd=n,cd}var M$=C$();const I$=Ce(M$);var ud,j0;function k$(){if(j0)return ud;j0=1;function e(t,r){for(var n=-1,a=t==null?0:t.length;++n<a;)if(!r(t[n],n,t))return!1;return!0}return ud=e,ud}var fd,P0;function R$(){if(P0)return fd;P0=1;var e=Sp();function t(r,n){var a=!0;return e(r,function(i,o,s){return a=!!n(i,o,s),a}),a}return fd=t,fd}var dd,T0;function D$(){if(T0)return dd;T0=1;var e=k$(),t=R$(),r=Dr(),n=mt(),a=Ks();function i(o,s,l){var c=n(o)?e:t;return l&&a(o,s,l)&&(s=void 0),c(o,r(s,3))}return dd=i,dd}var $$=D$();const dA=Ce($$);var L$=["x","y"];function Mi(e){"@babel/helpers - typeof";return Mi=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Mi(e)}function jh(){return jh=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},jh.apply(this,arguments)}function E0(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function Wa(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?E0(Object(r),!0).forEach(function(n){B$(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):E0(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function B$(e,t,r){return t=q$(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function q$(e){var t=F$(e,"string");return Mi(t)=="symbol"?t:t+""}function F$(e,t){if(Mi(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Mi(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function z$(e,t){if(e==null)return{};var r=U$(e,t),n,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)n=i[a],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function U$(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function W$(e,t){var r=e.x,n=e.y,a=z$(e,L$),i="".concat(r),o=parseInt(i,10),s="".concat(n),l=parseInt(s,10),c="".concat(t.height||a.height),f=parseInt(c,10),d="".concat(t.width||a.width),h=parseInt(d,10);return Wa(Wa(Wa(Wa(Wa({},t),a),o?{x:o}:{}),l?{y:l}:{}),{},{height:f,width:h,name:t.name,radius:t.radius})}function N0(e){return C.createElement(r$,jh({shapeType:"rectangle",propTransformer:W$,activeClassName:"recharts-active-bar"},e))}var H$=function(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return function(n,a){if(typeof t=="number")return t;var i=H(n)||p1(n);return i?t(n,a):(i||fn(),r)}},G$=["value","background"],hA;function fa(e){"@babel/helpers - typeof";return fa=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},fa(e)}function K$(e,t){if(e==null)return{};var r=V$(e,t),n,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)n=i[a],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function V$(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function ys(){return ys=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},ys.apply(this,arguments)}function C0(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function qe(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?C0(Object(r),!0).forEach(function(n){Nr(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):C0(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function X$(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function M0(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,mA(n.key),n)}}function Y$(e,t,r){return t&&M0(e.prototype,t),r&&M0(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function Z$(e,t,r){return t=bs(t),J$(e,pA()?Reflect.construct(t,r||[],bs(e).constructor):t.apply(e,r))}function J$(e,t){if(t&&(fa(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Q$(e)}function Q$(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function pA(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(pA=function(){return!!e})()}function bs(e){return bs=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},bs(e)}function eL(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Ph(e,t)}function Ph(e,t){return Ph=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,a){return n.__proto__=a,n},Ph(e,t)}function Nr(e,t,r){return t=mA(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function mA(e){var t=tL(e,"string");return fa(t)=="symbol"?t:t+""}function tL(e,t){if(fa(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(fa(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var Hi=(function(e){function t(){var r;X$(this,t);for(var n=arguments.length,a=new Array(n),i=0;i<n;i++)a[i]=arguments[i];return r=Z$(this,t,[].concat(a)),Nr(r,"state",{isAnimationFinished:!1}),Nr(r,"id",Pa("recharts-bar-")),Nr(r,"handleAnimationEnd",function(){var o=r.props.onAnimationEnd;r.setState({isAnimationFinished:!0}),o&&o()}),Nr(r,"handleAnimationStart",function(){var o=r.props.onAnimationStart;r.setState({isAnimationFinished:!1}),o&&o()}),r}return eL(t,e),Y$(t,[{key:"renderRectanglesStatically",value:function(n){var a=this,i=this.props,o=i.shape,s=i.dataKey,l=i.activeIndex,c=i.activeBar,f=ce(this.props,!1);return n&&n.map(function(d,h){var p=h===l,v=p?c:o,g=qe(qe(qe({},f),d),{},{isActive:p,option:v,index:h,dataKey:s,onAnimationStart:a.handleAnimationStart,onAnimationEnd:a.handleAnimationEnd});return C.createElement(je,ys({className:"recharts-bar-rectangle"},ko(a.props,d,h),{key:"rectangle-".concat(d?.x,"-").concat(d?.y,"-").concat(d?.value,"-").concat(h)}),C.createElement(N0,g))})}},{key:"renderRectanglesWithAnimation",value:function(){var n=this,a=this.props,i=a.data,o=a.layout,s=a.isAnimationActive,l=a.animationBegin,c=a.animationDuration,f=a.animationEasing,d=a.animationId,h=this.state.prevData;return C.createElement(tr,{begin:l,duration:c,isActive:s,easing:f,from:{t:0},to:{t:1},key:"bar-".concat(d),onAnimationEnd:this.handleAnimationEnd,onAnimationStart:this.handleAnimationStart},function(p){var v=p.t,g=i.map(function(m,y){var w=h&&h[y];if(w){var S=Qe(w.x,m.x),O=Qe(w.y,m.y),b=Qe(w.width,m.width),x=Qe(w.height,m.height);return qe(qe({},m),{},{x:S(v),y:O(v),width:b(v),height:x(v)})}if(o==="horizontal"){var A=Qe(0,m.height),j=A(v);return qe(qe({},m),{},{y:m.y+m.height-j,height:j})}var E=Qe(0,m.width),I=E(v);return qe(qe({},m),{},{width:I})});return C.createElement(je,null,n.renderRectanglesStatically(g))})}},{key:"renderRectangles",value:function(){var n=this.props,a=n.data,i=n.isAnimationActive,o=this.state.prevData;return i&&a&&a.length&&(!o||!oa(o,a))?this.renderRectanglesWithAnimation():this.renderRectanglesStatically(a)}},{key:"renderBackground",value:function(){var n=this,a=this.props,i=a.data,o=a.dataKey,s=a.activeIndex,l=ce(this.props.background,!1);return i.map(function(c,f){c.value;var d=c.background,h=K$(c,G$);if(!d)return null;var p=qe(qe(qe(qe(qe({},h),{},{fill:"#eee"},d),l),ko(n.props,c,f)),{},{onAnimationStart:n.handleAnimationStart,onAnimationEnd:n.handleAnimationEnd,dataKey:o,index:f,className:"recharts-bar-background-rectangle"});return C.createElement(N0,ys({key:"background-bar-".concat(f),option:n.props.background,isActive:f===s},p))})}},{key:"renderErrorBar",value:function(n,a){if(this.props.isAnimationActive&&!this.state.isAnimationFinished)return null;var i=this.props,o=i.data,s=i.xAxis,l=i.yAxis,c=i.layout,f=i.children,d=Mt(f,Wi);if(!d)return null;var h=c==="vertical"?o[0].height/2:o[0].width/2,p=function(m,y){var w=Array.isArray(m.value)?m.value[1]:m.value;return{x:m.x,y:m.y,value:w,errorVal:ft(m,y)}},v={clipPath:n?"url(#clipPath-".concat(a,")"):null};return C.createElement(je,v,d.map(function(g){return C.cloneElement(g,{key:"error-bar-".concat(a,"-").concat(g.props.dataKey),data:o,xAxis:s,yAxis:l,layout:c,offset:h,dataPointFormatter:p})}))}},{key:"render",value:function(){var n=this.props,a=n.hide,i=n.data,o=n.className,s=n.xAxis,l=n.yAxis,c=n.left,f=n.top,d=n.width,h=n.height,p=n.isAnimationActive,v=n.background,g=n.id;if(a||!i||!i.length)return null;var m=this.state.isAnimationFinished,y=pe("recharts-bar",o),w=s&&s.allowDataOverflow,S=l&&l.allowDataOverflow,O=w||S,b=fe(g)?this.id:g;return C.createElement(je,{className:y},w||S?C.createElement("defs",null,C.createElement("clipPath",{id:"clipPath-".concat(b)},C.createElement("rect",{x:w?c:c-d/2,y:S?f:f-h/2,width:w?d:d*2,height:S?h:h*2}))):null,C.createElement(je,{className:"recharts-bar-rectangles",clipPath:O?"url(#clipPath-".concat(b,")"):null},v?this.renderBackground():null,this.renderRectangles()),this.renderErrorBar(O,b),(!p||m)&&pr.renderCallByParent(this.props,i))}}],[{key:"getDerivedStateFromProps",value:function(n,a){return n.animationId!==a.prevAnimationId?{prevAnimationId:n.animationId,curData:n.data,prevData:a.curData}:n.data!==a.curData?{curData:n.data}:null}}])})(P.PureComponent);hA=Hi;Nr(Hi,"displayName","Bar");Nr(Hi,"defaultProps",{xAxisId:0,yAxisId:0,legendType:"rect",minPointSize:0,hide:!1,data:[],layout:"vertical",activeBar:!1,isAnimationActive:!On.isSsr,animationBegin:0,animationDuration:400,animationEasing:"ease"});Nr(Hi,"getComposedData",function(e){var t=e.props,r=e.item,n=e.barPosition,a=e.bandSize,i=e.xAxis,o=e.yAxis,s=e.xAxisTicks,l=e.yAxisTicks,c=e.stackedData,f=e.dataStartIndex,d=e.displayedData,h=e.offset,p=xk(n,r);if(!p)return null;var v=t.layout,g=r.type.defaultProps,m=g!==void 0?qe(qe({},g),r.props):r.props,y=m.dataKey,w=m.children,S=m.minPointSize,O=v==="horizontal"?o:i,b=c?O.scale.domain():null,x=Tk({numericAxis:O}),A=Mt(w,VS),j=d.map(function(E,I){var N,T,M,R,D,L;c?N=wk(c[f+I],b):(N=ft(E,y),Array.isArray(N)||(N=[x,N]));var z=H$(S,hA.defaultProps.minPointSize)(N[1],I);if(v==="horizontal"){var $,F=[o.scale(N[0]),o.scale(N[1])],K=F[0],V=F[1];T=wx({axis:i,ticks:s,bandSize:a,offset:p.offset,entry:E,index:I}),M=($=V??K)!==null&&$!==void 0?$:void 0,R=p.size;var G=K-V;if(D=Number.isNaN(G)?0:G,L={x:T,y:o.y,width:R,height:o.height},Math.abs(z)>0&&Math.abs(D)<Math.abs(z)){var Q=qt(D||z)*(Math.abs(z)-Math.abs(D));M-=Q,D+=Q}}else{var Se=[i.scale(N[0]),i.scale(N[1])],ae=Se[0],lt=Se[1];if(T=ae,M=wx({axis:o,ticks:l,bandSize:a,offset:p.offset,entry:E,index:I}),R=lt-ae,D=p.size,L={x:i.x,y:M,width:i.width,height:D},Math.abs(z)>0&&Math.abs(R)<Math.abs(z)){var ar=qt(R||z)*(Math.abs(z)-Math.abs(R));R+=ar}}return qe(qe(qe({},E),{},{x:T,y:M,width:R,height:D,value:c?N:N[1],payload:E,background:L},A&&A[I]&&A[I].props),{},{tooltipPayload:[ZO(r,E)],tooltipPosition:{x:T+R/2,y:M+D/2}})});return qe({data:j,layout:v},h)});function Ii(e){"@babel/helpers - typeof";return Ii=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ii(e)}function rL(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function I0(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,vA(n.key),n)}}function nL(e,t,r){return t&&I0(e.prototype,t),r&&I0(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function k0(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function Lt(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?k0(Object(r),!0).forEach(function(n){ol(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):k0(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function ol(e,t,r){return t=vA(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function vA(e){var t=aL(e,"string");return Ii(t)=="symbol"?t:t+""}function aL(e,t){if(Ii(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Ii(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var gA=function(t,r,n,a,i){var o=t.width,s=t.height,l=t.layout,c=t.children,f=Object.keys(r),d={left:n.left,leftMirror:n.left,right:o-n.right,rightMirror:o-n.right,top:n.top,topMirror:n.top,bottom:s-n.bottom,bottomMirror:s-n.bottom},h=!!xt(c,Hi);return f.reduce(function(p,v){var g=r[v],m=g.orientation,y=g.domain,w=g.padding,S=w===void 0?{}:w,O=g.mirror,b=g.reversed,x="".concat(m).concat(O?"Mirror":""),A,j,E,I,N;if(g.type==="number"&&(g.padding==="gap"||g.padding==="no-gap")){var T=y[1]-y[0],M=1/0,R=g.categoricalDomain.sort(g1);if(R.forEach(function(Se,ae){ae>0&&(M=Math.min((Se||0)-(R[ae-1]||0),M))}),Number.isFinite(M)){var D=M/T,L=g.layout==="vertical"?n.height:n.width;if(g.padding==="gap"&&(A=D*L/2),g.padding==="no-gap"){var z=cn(t.barCategoryGap,D*L),$=D*L/2;A=$-z-($-z)/L*z}}}a==="xAxis"?j=[n.left+(S.left||0)+(A||0),n.left+n.width-(S.right||0)-(A||0)]:a==="yAxis"?j=l==="horizontal"?[n.top+n.height-(S.bottom||0),n.top+(S.top||0)]:[n.top+(S.top||0)+(A||0),n.top+n.height-(S.bottom||0)-(A||0)]:j=g.range,b&&(j=[j[1],j[0]]);var F=yk(g,i,h),K=F.scale,V=F.realScaleType;K.domain(y).range(j),bk(K);var G=Pk(K,Lt(Lt({},g),{},{realScaleType:V}));a==="xAxis"?(N=m==="top"&&!O||m==="bottom"&&O,E=n.left,I=d[x]-N*g.height):a==="yAxis"&&(N=m==="left"&&!O||m==="right"&&O,E=d[x]-N*g.width,I=n.top);var Q=Lt(Lt(Lt({},g),G),{},{realScaleType:V,x:E,y:I,scale:K,width:a==="xAxis"?n.width:g.width,height:a==="yAxis"?n.height:g.height});return Q.bandSize=is(Q,G),!g.hide&&a==="xAxis"?d[x]+=(N?-1:1)*Q.height:g.hide||(d[x]+=(N?-1:1)*Q.width),Lt(Lt({},p),{},ol({},v,Q))},{})},yA=function(t,r){var n=t.x,a=t.y,i=r.x,o=r.y;return{x:Math.min(n,i),y:Math.min(a,o),width:Math.abs(i-n),height:Math.abs(o-a)}},iL=function(t){var r=t.x1,n=t.y1,a=t.x2,i=t.y2;return yA({x:r,y:n},{x:a,y:i})},bA=(function(){function e(t){rL(this,e),this.scale=t}return nL(e,[{key:"domain",get:function(){return this.scale.domain}},{key:"range",get:function(){return this.scale.range}},{key:"rangeMin",get:function(){return this.range()[0]}},{key:"rangeMax",get:function(){return this.range()[1]}},{key:"bandwidth",get:function(){return this.scale.bandwidth}},{key:"apply",value:function(r){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},a=n.bandAware,i=n.position;if(r!==void 0){if(i)switch(i){case"start":return this.scale(r);case"middle":{var o=this.bandwidth?this.bandwidth()/2:0;return this.scale(r)+o}case"end":{var s=this.bandwidth?this.bandwidth():0;return this.scale(r)+s}default:return this.scale(r)}if(a){var l=this.bandwidth?this.bandwidth()/2:0;return this.scale(r)+l}return this.scale(r)}}},{key:"isInRange",value:function(r){var n=this.range(),a=n[0],i=n[n.length-1];return a<=i?r>=a&&r<=i:r>=i&&r<=a}}],[{key:"create",value:function(r){return new e(r)}}])})();ol(bA,"EPS",1e-4);var Yp=function(t){var r=Object.keys(t).reduce(function(n,a){return Lt(Lt({},n),{},ol({},a,bA.create(t[a])))},{});return Lt(Lt({},r),{},{apply:function(a){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},o=i.bandAware,s=i.position;return I$(a,function(l,c){return r[c].apply(l,{bandAware:o,position:s})})},isInRange:function(a){return dA(a,function(i,o){return r[o].isInRange(i)})}})};function oL(e){return(e%180+180)%180}var sL=function(t){var r=t.width,n=t.height,a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,i=oL(a),o=i*Math.PI/180,s=Math.atan(n/r),l=o>s&&o<Math.PI-s?n/Math.sin(o):r/Math.cos(o);return Math.abs(l)},hd,R0;function lL(){if(R0)return hd;R0=1;var e=Dr(),t=qi(),r=Hs();function n(a){return function(i,o,s){var l=Object(i);if(!t(i)){var c=e(o,3);i=r(i),o=function(d){return c(l[d],d,l)}}var f=a(i,o,s);return f>-1?l[c?i[f]:f]:void 0}}return hd=n,hd}var pd,D0;function cL(){if(D0)return pd;D0=1;var e=lA();function t(r){var n=e(r),a=n%1;return n===n?a?n-a:n:0}return pd=t,pd}var md,$0;function uL(){if($0)return md;$0=1;var e=kS(),t=Dr(),r=cL(),n=Math.max;function a(i,o,s){var l=i==null?0:i.length;if(!l)return-1;var c=s==null?0:r(s);return c<0&&(c=n(l+c,0)),e(i,t(o,3),c)}return md=a,md}var vd,L0;function fL(){if(L0)return vd;L0=1;var e=lL(),t=uL(),r=e(t);return vd=r,vd}var dL=fL();const hL=Ce(dL);var pL=Xw();const mL=Ce(pL);var vL=mL(function(e){return{x:e.left,y:e.top,width:e.width,height:e.height}},function(e){return["l",e.left,"t",e.top,"w",e.width,"h",e.height].join("")}),Zp=P.createContext(void 0),Jp=P.createContext(void 0),xA=P.createContext(void 0),wA=P.createContext({}),SA=P.createContext(void 0),OA=P.createContext(0),AA=P.createContext(0),B0=function(t){var r=t.state,n=r.xAxisMap,a=r.yAxisMap,i=r.offset,o=t.clipPathId,s=t.children,l=t.width,c=t.height,f=vL(i);return C.createElement(Zp.Provider,{value:n},C.createElement(Jp.Provider,{value:a},C.createElement(wA.Provider,{value:i},C.createElement(xA.Provider,{value:f},C.createElement(SA.Provider,{value:o},C.createElement(OA.Provider,{value:c},C.createElement(AA.Provider,{value:l},s)))))))},gL=function(){return P.useContext(SA)},_A=function(t){var r=P.useContext(Zp);r==null&&fn();var n=r[t];return n==null&&fn(),n},yL=function(){var t=P.useContext(Zp);return Pr(t)},bL=function(){var t=P.useContext(Jp),r=hL(t,function(n){return dA(n.domain,Number.isFinite)});return r||Pr(t)},jA=function(t){var r=P.useContext(Jp);r==null&&fn();var n=r[t];return n==null&&fn(),n},xL=function(){var t=P.useContext(xA);return t},wL=function(){return P.useContext(wA)},Qp=function(){return P.useContext(AA)},em=function(){return P.useContext(OA)};function da(e){"@babel/helpers - typeof";return da=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},da(e)}function SL(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function OL(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,TA(n.key),n)}}function AL(e,t,r){return t&&OL(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function _L(e,t,r){return t=xs(t),jL(e,PA()?Reflect.construct(t,r||[],xs(e).constructor):t.apply(e,r))}function jL(e,t){if(t&&(da(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return PL(e)}function PL(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function PA(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(PA=function(){return!!e})()}function xs(e){return xs=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},xs(e)}function TL(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Th(e,t)}function Th(e,t){return Th=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,a){return n.__proto__=a,n},Th(e,t)}function q0(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function F0(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?q0(Object(r),!0).forEach(function(n){tm(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):q0(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function tm(e,t,r){return t=TA(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function TA(e){var t=EL(e,"string");return da(t)=="symbol"?t:t+""}function EL(e,t){if(da(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(da(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}function NL(e,t){return kL(e)||IL(e,t)||ML(e,t)||CL()}function CL(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
57In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function ML(e,t){if(e){if(typeof e=="string")return z0(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return z0(e,t)}}function z0(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function IL(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,a,i,o,s=[],l=!0,c=!1;try{if(i=(r=r.call(e)).next,t!==0)for(;!(l=(n=i.call(r)).done)&&(s.push(n.value),s.length!==t);l=!0);}catch(f){c=!0,a=f}finally{try{if(!l&&r.return!=null&&(o=r.return(),Object(o)!==o))return}finally{if(c)throw a}}return s}}function kL(e){if(Array.isArray(e))return e}function Eh(){return Eh=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Eh.apply(this,arguments)}var RL=function(t,r){var n;return C.isValidElement(t)?n=C.cloneElement(t,r):se(t)?n=t(r):n=C.createElement("line",Eh({},r,{className:"recharts-reference-line-line"})),n},DL=function(t,r,n,a,i,o,s,l,c){var f=i.x,d=i.y,h=i.width,p=i.height;if(n){var v=c.y,g=t.y.apply(v,{position:o});if(Qt(c,"discard")&&!t.y.isInRange(g))return null;var m=[{x:f+h,y:g},{x:f,y:g}];return l==="left"?m.reverse():m}if(r){var y=c.x,w=t.x.apply(y,{position:o});if(Qt(c,"discard")&&!t.x.isInRange(w))return null;var S=[{x:w,y:d+p},{x:w,y:d}];return s==="top"?S.reverse():S}if(a){var O=c.segment,b=O.map(function(x){return t.apply(x,{position:o})});return Qt(c,"discard")&&E$(b,function(x){return!t.isInRange(x)})?null:b}return null};function $L(e){var t=e.x,r=e.y,n=e.segment,a=e.xAxisId,i=e.yAxisId,o=e.shape,s=e.className,l=e.alwaysShow,c=gL(),f=_A(a),d=jA(i),h=xL();if(!c||!h)return null;dr(l===void 0,'The alwaysShow prop is deprecated. Please use ifOverflow="extendDomain" instead.');var p=Yp({x:f.scale,y:d.scale}),v=He(t),g=He(r),m=n&&n.length===2,y=DL(p,v,g,m,h,e.position,f.orientation,d.orientation,e);if(!y)return null;var w=NL(y,2),S=w[0],O=S.x,b=S.y,x=w[1],A=x.x,j=x.y,E=Qt(e,"hidden")?"url(#".concat(c,")"):void 0,I=F0(F0({clipPath:E},ce(e,!0)),{},{x1:O,y1:b,x2:A,y2:j});return C.createElement(je,{className:pe("recharts-reference-line",s)},RL(o,I),ot.renderCallByParent(e,iL({x1:O,y1:b,x2:A,y2:j})))}var rm=(function(e){function t(){return SL(this,t),_L(this,t,arguments)}return TL(t,e),AL(t,[{key:"render",value:function(){return C.createElement($L,this.props)}}])})(C.Component);tm(rm,"displayName","ReferenceLine");tm(rm,"defaultProps",{isFront:!1,ifOverflow:"discard",xAxisId:0,yAxisId:0,fill:"none",stroke:"#ccc",fillOpacity:1,strokeWidth:1,position:"middle"});function Nh(){return Nh=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Nh.apply(this,arguments)}function ha(e){"@babel/helpers - typeof";return ha=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ha(e)}function U0(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function W0(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?U0(Object(r),!0).forEach(function(n){sl(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):U0(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function LL(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function BL(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,NA(n.key),n)}}function qL(e,t,r){return t&&BL(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function FL(e,t,r){return t=ws(t),zL(e,EA()?Reflect.construct(t,r||[],ws(e).constructor):t.apply(e,r))}function zL(e,t){if(t&&(ha(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return UL(e)}function UL(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function EA(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(EA=function(){return!!e})()}function ws(e){return ws=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},ws(e)}function WL(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Ch(e,t)}function Ch(e,t){return Ch=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,a){return n.__proto__=a,n},Ch(e,t)}function sl(e,t,r){return t=NA(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function NA(e){var t=HL(e,"string");return ha(t)=="symbol"?t:t+""}function HL(e,t){if(ha(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(ha(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var GL=function(t){var r=t.x,n=t.y,a=t.xAxis,i=t.yAxis,o=Yp({x:a.scale,y:i.scale}),s=o.apply({x:r,y:n},{bandAware:!0});return Qt(t,"discard")&&!o.isInRange(s)?null:s},ll=(function(e){function t(){return LL(this,t),FL(this,t,arguments)}return WL(t,e),qL(t,[{key:"render",value:function(){var n=this.props,a=n.x,i=n.y,o=n.r,s=n.alwaysShow,l=n.clipPathId,c=He(a),f=He(i);if(dr(s===void 0,'The alwaysShow prop is deprecated. Please use ifOverflow="extendDomain" instead.'),!c||!f)return null;var d=GL(this.props);if(!d)return null;var h=d.x,p=d.y,v=this.props,g=v.shape,m=v.className,y=Qt(this.props,"hidden")?"url(#".concat(l,")"):void 0,w=W0(W0({clipPath:y},ce(this.props,!0)),{},{cx:h,cy:p});return C.createElement(je,{className:pe("recharts-reference-dot",m)},t.renderDot(g,w),ot.renderCallByParent(this.props,{x:h-o,y:p-o,width:2*o,height:2*o}))}}])})(C.Component);sl(ll,"displayName","ReferenceDot");sl(ll,"defaultProps",{isFront:!1,ifOverflow:"discard",xAxisId:0,yAxisId:0,r:10,fill:"#fff",stroke:"#ccc",fillOpacity:1,strokeWidth:1});sl(ll,"renderDot",function(e,t){var r;return C.isValidElement(e)?r=C.cloneElement(e,t):se(e)?r=e(t):r=C.createElement(nl,Nh({},t,{cx:t.cx,cy:t.cy,className:"recharts-reference-dot-dot"})),r});function Mh(){return Mh=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Mh.apply(this,arguments)}function pa(e){"@babel/helpers - typeof";return pa=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},pa(e)}function H0(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function G0(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?H0(Object(r),!0).forEach(function(n){cl(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):H0(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function KL(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function VL(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,MA(n.key),n)}}function XL(e,t,r){return t&&VL(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function YL(e,t,r){return t=Ss(t),ZL(e,CA()?Reflect.construct(t,r||[],Ss(e).constructor):t.apply(e,r))}function ZL(e,t){if(t&&(pa(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return JL(e)}function JL(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function CA(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(CA=function(){return!!e})()}function Ss(e){return Ss=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Ss(e)}function QL(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Ih(e,t)}function Ih(e,t){return Ih=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,a){return n.__proto__=a,n},Ih(e,t)}function cl(e,t,r){return t=MA(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function MA(e){var t=eB(e,"string");return pa(t)=="symbol"?t:t+""}function eB(e,t){if(pa(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(pa(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var tB=function(t,r,n,a,i){var o=i.x1,s=i.x2,l=i.y1,c=i.y2,f=i.xAxis,d=i.yAxis;if(!f||!d)return null;var h=Yp({x:f.scale,y:d.scale}),p={x:t?h.x.apply(o,{position:"start"}):h.x.rangeMin,y:n?h.y.apply(l,{position:"start"}):h.y.rangeMin},v={x:r?h.x.apply(s,{position:"end"}):h.x.rangeMax,y:a?h.y.apply(c,{position:"end"}):h.y.rangeMax};return Qt(i,"discard")&&(!h.isInRange(p)||!h.isInRange(v))?null:yA(p,v)},ul=(function(e){function t(){return KL(this,t),YL(this,t,arguments)}return QL(t,e),XL(t,[{key:"render",value:function(){var n=this.props,a=n.x1,i=n.x2,o=n.y1,s=n.y2,l=n.className,c=n.alwaysShow,f=n.clipPathId;dr(c===void 0,'The alwaysShow prop is deprecated. Please use ifOverflow="extendDomain" instead.');var d=He(a),h=He(i),p=He(o),v=He(s),g=this.props.shape;if(!d&&!h&&!p&&!v&&!g)return null;var m=tB(d,h,p,v,this.props);if(!m&&!g)return null;var y=Qt(this.props,"hidden")?"url(#".concat(f,")"):void 0;return C.createElement(je,{className:pe("recharts-reference-area",l)},t.renderRect(g,G0(G0({clipPath:y},ce(this.props,!0)),m)),ot.renderCallByParent(this.props,m))}}])})(C.Component);cl(ul,"displayName","ReferenceArea");cl(ul,"defaultProps",{isFront:!1,ifOverflow:"discard",xAxisId:0,yAxisId:0,r:10,fill:"#ccc",fillOpacity:.5,stroke:"none",strokeWidth:1});cl(ul,"renderRect",function(e,t){var r;return C.isValidElement(e)?r=C.cloneElement(e,t):se(e)?r=e(t):r=C.createElement(Xp,Mh({},t,{className:"recharts-reference-area-rect"})),r});function IA(e,t,r){if(t<1)return[];if(t===1&&r===void 0)return e;for(var n=[],a=0;a<e.length;a+=t)n.push(e[a]);return n}function rB(e,t,r){var n={width:e.width+t.width,height:e.height+t.height};return sL(n,r)}function nB(e,t,r){var n=r==="width",a=e.x,i=e.y,o=e.width,s=e.height;return t===1?{start:n?a:i,end:n?a+o:i+s}:{start:n?a+o:i+s,end:n?a:i}}function Os(e,t,r,n,a){if(e*t<e*n||e*t>e*a)return!1;var i=r();return e*(t-e*i/2-n)>=0&&e*(t+e*i/2-a)<=0}function aB(e,t){return IA(e,t+1)}function iB(e,t,r,n,a){for(var i=(n||[]).slice(),o=t.start,s=t.end,l=0,c=1,f=o,d=function(){var v=n?.[l];if(v===void 0)return{v:IA(n,c)};var g=l,m,y=function(){return m===void 0&&(m=r(v,g)),m},w=v.coordinate,S=l===0||Os(e,w,y,f,s);S||(l=0,f=o,c+=1),S&&(f=w+e*(y()/2+a),l+=c)},h;c<=i.length;)if(h=d(),h)return h.v;return[]}function ki(e){"@babel/helpers - typeof";return ki=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ki(e)}function K0(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function it(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?K0(Object(r),!0).forEach(function(n){oB(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):K0(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function oB(e,t,r){return t=sB(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function sB(e){var t=lB(e,"string");return ki(t)=="symbol"?t:t+""}function lB(e,t){if(ki(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(ki(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function cB(e,t,r,n,a){for(var i=(n||[]).slice(),o=i.length,s=t.start,l=t.end,c=function(h){var p=i[h],v,g=function(){return v===void 0&&(v=r(p,h)),v};if(h===o-1){var m=e*(p.coordinate+e*g()/2-l);i[h]=p=it(it({},p),{},{tickCoord:m>0?p.coordinate-m*e:p.coordinate})}else i[h]=p=it(it({},p),{},{tickCoord:p.coordinate});var y=Os(e,p.tickCoord,g,s,l);y&&(l=p.tickCoord-e*(g()/2+a),i[h]=it(it({},p),{},{isShow:!0}))},f=o-1;f>=0;f--)c(f);return i}function uB(e,t,r,n,a,i){var o=(n||[]).slice(),s=o.length,l=t.start,c=t.end;if(i){var f=n[s-1],d=r(f,s-1),h=e*(f.coordinate+e*d/2-c);o[s-1]=f=it(it({},f),{},{tickCoord:h>0?f.coordinate-h*e:f.coordinate});var p=Os(e,f.tickCoord,function(){return d},l,c);p&&(c=f.tickCoord-e*(d/2+a),o[s-1]=it(it({},f),{},{isShow:!0}))}for(var v=i?s-1:s,g=function(w){var S=o[w],O,b=function(){return O===void 0&&(O=r(S,w)),O};if(w===0){var x=e*(S.coordinate-e*b()/2-l);o[w]=S=it(it({},S),{},{tickCoord:x<0?S.coordinate-x*e:S.coordinate})}else o[w]=S=it(it({},S),{},{tickCoord:S.coordinate});var A=Os(e,S.tickCoord,b,l,c);A&&(l=S.tickCoord+e*(b()/2+a),o[w]=it(it({},S),{},{isShow:!0}))},m=0;m<v;m++)g(m);return o}function nm(e,t,r){var n=e.tick,a=e.ticks,i=e.viewBox,o=e.minTickGap,s=e.orientation,l=e.interval,c=e.tickFormatter,f=e.unit,d=e.angle;if(!a||!a.length||!n)return[];if(H(l)||On.isSsr)return aB(a,typeof l=="number"&&H(l)?l:0);var h=[],p=s==="top"||s==="bottom"?"width":"height",v=f&&p==="width"?Qa(f,{fontSize:t,letterSpacing:r}):{width:0,height:0},g=function(S,O){var b=se(c)?c(S.value,O):S.value;return p==="width"?rB(Qa(b,{fontSize:t,letterSpacing:r}),v,d):Qa(b,{fontSize:t,letterSpacing:r})[p]},m=a.length>=2?qt(a[1].coordinate-a[0].coordinate):1,y=nB(i,m,p);return l==="equidistantPreserveStart"?iB(m,y,g,a,o):(l==="preserveStart"||l==="preserveStartEnd"?h=uB(m,y,g,a,o,l==="preserveStartEnd"):h=cB(m,y,g,a,o),h.filter(function(w){return w.isShow}))}var fB=["viewBox"],dB=["viewBox"],hB=["ticks"];function ma(e){"@babel/helpers - typeof";return ma=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ma(e)}function Wn(){return Wn=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Wn.apply(this,arguments)}function V0(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function Ue(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?V0(Object(r),!0).forEach(function(n){am(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):V0(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function gd(e,t){if(e==null)return{};var r=pB(e,t),n,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)n=i[a],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function pB(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function mB(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function X0(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,RA(n.key),n)}}function vB(e,t,r){return t&&X0(e.prototype,t),r&&X0(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function gB(e,t,r){return t=As(t),yB(e,kA()?Reflect.construct(t,r||[],As(e).constructor):t.apply(e,r))}function yB(e,t){if(t&&(ma(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return bB(e)}function bB(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function kA(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(kA=function(){return!!e})()}function As(e){return As=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},As(e)}function xB(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&kh(e,t)}function kh(e,t){return kh=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,a){return n.__proto__=a,n},kh(e,t)}function am(e,t,r){return t=RA(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function RA(e){var t=wB(e,"string");return ma(t)=="symbol"?t:t+""}function wB(e,t){if(ma(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(ma(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var Ma=(function(e){function t(r){var n;return mB(this,t),n=gB(this,t,[r]),n.state={fontSize:"",letterSpacing:""},n}return xB(t,e),vB(t,[{key:"shouldComponentUpdate",value:function(n,a){var i=n.viewBox,o=gd(n,fB),s=this.props,l=s.viewBox,c=gd(s,dB);return!Gn(i,l)||!Gn(o,c)||!Gn(a,this.state)}},{key:"componentDidMount",value:function(){var n=this.layerReference;if(n){var a=n.getElementsByClassName("recharts-cartesian-axis-tick-value")[0];a&&this.setState({fontSize:window.getComputedStyle(a).fontSize,letterSpacing:window.getComputedStyle(a).letterSpacing})}}},{key:"getTickLineCoord",value:function(n){var a=this.props,i=a.x,o=a.y,s=a.width,l=a.height,c=a.orientation,f=a.tickSize,d=a.mirror,h=a.tickMargin,p,v,g,m,y,w,S=d?-1:1,O=n.tickSize||f,b=H(n.tickCoord)?n.tickCoord:n.coordinate;switch(c){case"top":p=v=n.coordinate,m=o+ +!d*l,g=m-S*O,w=g-S*h,y=b;break;case"left":g=m=n.coordinate,v=i+ +!d*s,p=v-S*O,y=p-S*h,w=b;break;case"right":g=m=n.coordinate,v=i+ +d*s,p=v+S*O,y=p+S*h,w=b;break;default:p=v=n.coordinate,m=o+ +d*l,g=m+S*O,w=g+S*h,y=b;break}return{line:{x1:p,y1:g,x2:v,y2:m},tick:{x:y,y:w}}}},{key:"getTickTextAnchor",value:function(){var n=this.props,a=n.orientation,i=n.mirror,o;switch(a){case"left":o=i?"start":"end";break;case"right":o=i?"end":"start";break;default:o="middle";break}return o}},{key:"getTickVerticalAnchor",value:function(){var n=this.props,a=n.orientation,i=n.mirror,o="end";switch(a){case"left":case"right":o="middle";break;case"top":o=i?"start":"end";break;default:o=i?"end":"start";break}return o}},{key:"renderAxisLine",value:function(){var n=this.props,a=n.x,i=n.y,o=n.width,s=n.height,l=n.orientation,c=n.mirror,f=n.axisLine,d=Ue(Ue(Ue({},ce(this.props,!1)),ce(f,!1)),{},{fill:"none"});if(l==="top"||l==="bottom"){var h=+(l==="top"&&!c||l==="bottom"&&c);d=Ue(Ue({},d),{},{x1:a,y1:i+h*s,x2:a+o,y2:i+h*s})}else{var p=+(l==="left"&&!c||l==="right"&&c);d=Ue(Ue({},d),{},{x1:a+p*o,y1:i,x2:a+p*o,y2:i+s})}return C.createElement("line",Wn({},d,{className:pe("recharts-cartesian-axis-line",Ct(f,"className"))}))}},{key:"renderTicks",value:function(n,a,i){var o=this,s=this.props,l=s.tickLine,c=s.stroke,f=s.tick,d=s.tickFormatter,h=s.unit,p=nm(Ue(Ue({},this.props),{},{ticks:n}),a,i),v=this.getTickTextAnchor(),g=this.getTickVerticalAnchor(),m=ce(this.props,!1),y=ce(f,!1),w=Ue(Ue({},m),{},{fill:"none"},ce(l,!1)),S=p.map(function(O,b){var x=o.getTickLineCoord(O),A=x.line,j=x.tick,E=Ue(Ue(Ue(Ue({textAnchor:v,verticalAnchor:g},m),{},{stroke:"none",fill:c},y),j),{},{index:b,payload:O,visibleTicksCount:p.length,tickFormatter:d});return C.createElement(je,Wn({className:"recharts-cartesian-axis-tick",key:"tick-".concat(O.value,"-").concat(O.coordinate,"-").concat(O.tickCoord)},ko(o.props,O,b)),l&&C.createElement("line",Wn({},w,A,{className:pe("recharts-cartesian-axis-tick-line",Ct(l,"className"))})),f&&t.renderTickItem(f,E,"".concat(se(d)?d(O.value,b):O.value).concat(h||"")))});return C.createElement("g",{className:"recharts-cartesian-axis-ticks"},S)}},{key:"render",value:function(){var n=this,a=this.props,i=a.axisLine,o=a.width,s=a.height,l=a.ticksGenerator,c=a.className,f=a.hide;if(f)return null;var d=this.props,h=d.ticks,p=gd(d,hB),v=h;return se(l)&&(v=h&&h.length>0?l(this.props):l(p)),o<=0||s<=0||!v||!v.length?null:C.createElement(je,{className:pe("recharts-cartesian-axis",c),ref:function(m){n.layerReference=m}},i&&this.renderAxisLine(),this.renderTicks(v,this.state.fontSize,this.state.letterSpacing),ot.renderCallByParent(this.props))}}],[{key:"renderTickItem",value:function(n,a,i){var o,s=pe(a.className,"recharts-cartesian-axis-tick-value");return C.isValidElement(n)?o=C.cloneElement(n,Ue(Ue({},a),{},{className:s})):se(n)?o=n(Ue(Ue({},a),{},{className:s})):o=C.createElement(Ho,Wn({},a,{className:"recharts-cartesian-axis-tick-value"}),i),o}}])})(P.Component);am(Ma,"displayName","CartesianAxis");am(Ma,"defaultProps",{x:0,y:0,width:0,height:0,viewBox:{x:0,y:0,width:0,height:0},orientation:"bottom",ticks:[],stroke:"#666",tickLine:!0,axisLine:!0,tick:!0,mirror:!1,minTickGap:5,tickSize:6,tickMargin:2,interval:"preserveEnd"});var SB=["x1","y1","x2","y2","key"],OB=["offset"];function dn(e){"@babel/helpers - typeof";return dn=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},dn(e)}function Y0(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function st(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Y0(Object(r),!0).forEach(function(n){AB(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Y0(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function AB(e,t,r){return t=_B(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function _B(e){var t=jB(e,"string");return dn(t)=="symbol"?t:t+""}function jB(e,t){if(dn(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(dn(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Qr(){return Qr=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Qr.apply(this,arguments)}function Z0(e,t){if(e==null)return{};var r=PB(e,t),n,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)n=i[a],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function PB(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}var TB=function(t){var r=t.fill;if(!r||r==="none")return null;var n=t.fillOpacity,a=t.x,i=t.y,o=t.width,s=t.height,l=t.ry;return C.createElement("rect",{x:a,y:i,ry:l,width:o,height:s,stroke:"none",fill:r,fillOpacity:n,className:"recharts-cartesian-grid-bg"})};function DA(e,t){var r;if(C.isValidElement(e))r=C.cloneElement(e,t);else if(se(e))r=e(t);else{var n=t.x1,a=t.y1,i=t.x2,o=t.y2,s=t.key,l=Z0(t,SB),c=ce(l,!1);c.offset;var f=Z0(c,OB);r=C.createElement("line",Qr({},f,{x1:n,y1:a,x2:i,y2:o,fill:"none",key:s}))}return r}function EB(e){var t=e.x,r=e.width,n=e.horizontal,a=n===void 0?!0:n,i=e.horizontalPoints;if(!a||!i||!i.length)return null;var o=i.map(function(s,l){var c=st(st({},e),{},{x1:t,y1:s,x2:t+r,y2:s,key:"line-".concat(l),index:l});return DA(a,c)});return C.createElement("g",{className:"recharts-cartesian-grid-horizontal"},o)}function NB(e){var t=e.y,r=e.height,n=e.vertical,a=n===void 0?!0:n,i=e.verticalPoints;if(!a||!i||!i.length)return null;var o=i.map(function(s,l){var c=st(st({},e),{},{x1:s,y1:t,x2:s,y2:t+r,key:"line-".concat(l),index:l});return DA(a,c)});return C.createElement("g",{className:"recharts-cartesian-grid-vertical"},o)}function CB(e){var t=e.horizontalFill,r=e.fillOpacity,n=e.x,a=e.y,i=e.width,o=e.height,s=e.horizontalPoints,l=e.horizontal,c=l===void 0?!0:l;if(!c||!t||!t.length)return null;var f=s.map(function(h){return Math.round(h+a-a)}).sort(function(h,p){return h-p});a!==f[0]&&f.unshift(0);var d=f.map(function(h,p){var v=!f[p+1],g=v?a+o-h:f[p+1]-h;if(g<=0)return null;var m=p%t.length;return C.createElement("rect",{key:"react-".concat(p),y:h,x:n,height:g,width:i,stroke:"none",fill:t[m],fillOpacity:r,className:"recharts-cartesian-grid-bg"})});return C.createElement("g",{className:"recharts-cartesian-gridstripes-horizontal"},d)}function MB(e){var t=e.vertical,r=t===void 0?!0:t,n=e.verticalFill,a=e.fillOpacity,i=e.x,o=e.y,s=e.width,l=e.height,c=e.verticalPoints;if(!r||!n||!n.length)return null;var f=c.map(function(h){return Math.round(h+i-i)}).sort(function(h,p){return h-p});i!==f[0]&&f.unshift(0);var d=f.map(function(h,p){var v=!f[p+1],g=v?i+s-h:f[p+1]-h;if(g<=0)return null;var m=p%n.length;return C.createElement("rect",{key:"react-".concat(p),x:h,y:o,width:g,height:l,stroke:"none",fill:n[m],fillOpacity:a,className:"recharts-cartesian-grid-bg"})});return C.createElement("g",{className:"recharts-cartesian-gridstripes-vertical"},d)}var IB=function(t,r){var n=t.xAxis,a=t.width,i=t.height,o=t.offset;return XO(nm(st(st(st({},Ma.defaultProps),n),{},{ticks:ur(n,!0),viewBox:{x:0,y:0,width:a,height:i}})),o.left,o.left+o.width,r)},kB=function(t,r){var n=t.yAxis,a=t.width,i=t.height,o=t.offset;return XO(nm(st(st(st({},Ma.defaultProps),n),{},{ticks:ur(n,!0),viewBox:{x:0,y:0,width:a,height:i}})),o.top,o.top+o.height,r)},$n={horizontal:!0,vertical:!0,stroke:"#ccc",fill:"none",verticalFill:[],horizontalFill:[]};function _s(e){var t,r,n,a,i,o,s=Qp(),l=em(),c=wL(),f=st(st({},e),{},{stroke:(t=e.stroke)!==null&&t!==void 0?t:$n.stroke,fill:(r=e.fill)!==null&&r!==void 0?r:$n.fill,horizontal:(n=e.horizontal)!==null&&n!==void 0?n:$n.horizontal,horizontalFill:(a=e.horizontalFill)!==null&&a!==void 0?a:$n.horizontalFill,vertical:(i=e.vertical)!==null&&i!==void 0?i:$n.vertical,verticalFill:(o=e.verticalFill)!==null&&o!==void 0?o:$n.verticalFill,x:H(e.x)?e.x:c.left,y:H(e.y)?e.y:c.top,width:H(e.width)?e.width:c.width,height:H(e.height)?e.height:c.height}),d=f.x,h=f.y,p=f.width,v=f.height,g=f.syncWithTicks,m=f.horizontalValues,y=f.verticalValues,w=yL(),S=bL();if(!H(p)||p<=0||!H(v)||v<=0||!H(d)||d!==+d||!H(h)||h!==+h)return null;var O=f.verticalCoordinatesGenerator||IB,b=f.horizontalCoordinatesGenerator||kB,x=f.horizontalPoints,A=f.verticalPoints;if((!x||!x.length)&&se(b)){var j=m&&m.length,E=b({yAxis:S?st(st({},S),{},{ticks:j?m:S.ticks}):void 0,width:s,height:l,offset:c},j?!0:g);dr(Array.isArray(E),"horizontalCoordinatesGenerator should return Array but instead it returned [".concat(dn(E),"]")),Array.isArray(E)&&(x=E)}if((!A||!A.length)&&se(O)){var I=y&&y.length,N=O({xAxis:w?st(st({},w),{},{ticks:I?y:w.ticks}):void 0,width:s,height:l,offset:c},I?!0:g);dr(Array.isArray(N),"verticalCoordinatesGenerator should return Array but instead it returned [".concat(dn(N),"]")),Array.isArray(N)&&(A=N)}return C.createElement("g",{className:"recharts-cartesian-grid"},C.createElement(TB,{fill:f.fill,fillOpacity:f.fillOpacity,x:f.x,y:f.y,width:f.width,height:f.height,ry:f.ry}),C.createElement(EB,Qr({},f,{offset:c,horizontalPoints:x,xAxis:w,yAxis:S})),C.createElement(NB,Qr({},f,{offset:c,verticalPoints:A,xAxis:w,yAxis:S})),C.createElement(CB,Qr({},f,{horizontalPoints:x})),C.createElement(MB,Qr({},f,{verticalPoints:A})))}_s.displayName="CartesianGrid";var RB=["type","layout","connectNulls","ref"],DB=["key"];function va(e){"@babel/helpers - typeof";return va=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},va(e)}function J0(e,t){if(e==null)return{};var r=$B(e,t),n,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)n=i[a],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function $B(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function ni(){return ni=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},ni.apply(this,arguments)}function Q0(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function gt(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Q0(Object(r),!0).forEach(function(n){Bt(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Q0(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Ln(e){return FB(e)||qB(e)||BB(e)||LB()}function LB(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
58In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function BB(e,t){if(e){if(typeof e=="string")return Rh(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Rh(e,t)}}function qB(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function FB(e){if(Array.isArray(e))return Rh(e)}function Rh(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function zB(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function ew(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,LA(n.key),n)}}function UB(e,t,r){return t&&ew(e.prototype,t),r&&ew(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function WB(e,t,r){return t=js(t),HB(e,$A()?Reflect.construct(t,r||[],js(e).constructor):t.apply(e,r))}function HB(e,t){if(t&&(va(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return GB(e)}function GB(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function $A(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return($A=function(){return!!e})()}function js(e){return js=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},js(e)}function KB(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Dh(e,t)}function Dh(e,t){return Dh=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,a){return n.__proto__=a,n},Dh(e,t)}function Bt(e,t,r){return t=LA(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function LA(e){var t=VB(e,"string");return va(t)=="symbol"?t:t+""}function VB(e,t){if(va(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(va(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var Gi=(function(e){function t(){var r;zB(this,t);for(var n=arguments.length,a=new Array(n),i=0;i<n;i++)a[i]=arguments[i];return r=WB(this,t,[].concat(a)),Bt(r,"state",{isAnimationFinished:!0,totalLength:0}),Bt(r,"generateSimpleStrokeDasharray",function(o,s){return"".concat(s,"px ").concat(o-s,"px")}),Bt(r,"getStrokeDasharray",function(o,s,l){var c=l.reduce(function(y,w){return y+w});if(!c)return r.generateSimpleStrokeDasharray(s,o);for(var f=Math.floor(o/c),d=o%c,h=s-o,p=[],v=0,g=0;v<l.length;g+=l[v],++v)if(g+l[v]>d){p=[].concat(Ln(l.slice(0,v)),[d-g]);break}var m=p.length%2===0?[0,h]:[h];return[].concat(Ln(t.repeat(l,f)),Ln(p),m).map(function(y){return"".concat(y,"px")}).join(", ")}),Bt(r,"id",Pa("recharts-line-")),Bt(r,"pathRef",function(o){r.mainCurve=o}),Bt(r,"handleAnimationEnd",function(){r.setState({isAnimationFinished:!0}),r.props.onAnimationEnd&&r.props.onAnimationEnd()}),Bt(r,"handleAnimationStart",function(){r.setState({isAnimationFinished:!1}),r.props.onAnimationStart&&r.props.onAnimationStart()}),r}return KB(t,e),UB(t,[{key:"componentDidMount",value:function(){if(this.props.isAnimationActive){var n=this.getTotalLength();this.setState({totalLength:n})}}},{key:"componentDidUpdate",value:function(){if(this.props.isAnimationActive){var n=this.getTotalLength();n!==this.state.totalLength&&this.setState({totalLength:n})}}},{key:"getTotalLength",value:function(){var n=this.mainCurve;try{return n&&n.getTotalLength&&n.getTotalLength()||0}catch{return 0}}},{key:"renderErrorBar",value:function(n,a){if(this.props.isAnimationActive&&!this.state.isAnimationFinished)return null;var i=this.props,o=i.points,s=i.xAxis,l=i.yAxis,c=i.layout,f=i.children,d=Mt(f,Wi);if(!d)return null;var h=function(g,m){return{x:g.x,y:g.y,value:g.value,errorVal:ft(g.payload,m)}},p={clipPath:n?"url(#clipPath-".concat(a,")"):null};return C.createElement(je,p,d.map(function(v){return C.cloneElement(v,{key:"bar-".concat(v.props.dataKey),data:o,xAxis:s,yAxis:l,layout:c,dataPointFormatter:h})}))}},{key:"renderDots",value:function(n,a,i){var o=this.props.isAnimationActive;if(o&&!this.state.isAnimationFinished)return null;var s=this.props,l=s.dot,c=s.points,f=s.dataKey,d=ce(this.props,!1),h=ce(l,!0),p=c.map(function(g,m){var y=gt(gt(gt({key:"dot-".concat(m),r:3},d),h),{},{index:m,cx:g.x,cy:g.y,value:g.value,dataKey:f,payload:g.payload,points:c});return t.renderDotItem(l,y)}),v={clipPath:n?"url(#clipPath-".concat(a?"":"dots-").concat(i,")"):null};return C.createElement(je,ni({className:"recharts-line-dots",key:"dots"},v),p)}},{key:"renderCurveStatically",value:function(n,a,i,o){var s=this.props,l=s.type,c=s.layout,f=s.connectNulls;s.ref;var d=J0(s,RB),h=gt(gt(gt({},ce(d,!0)),{},{fill:"none",className:"recharts-line-curve",clipPath:a?"url(#clipPath-".concat(i,")"):null,points:n},o),{},{type:l,layout:c,connectNulls:f});return C.createElement(Xn,ni({},h,{pathRef:this.pathRef}))}},{key:"renderCurveWithAnimation",value:function(n,a){var i=this,o=this.props,s=o.points,l=o.strokeDasharray,c=o.isAnimationActive,f=o.animationBegin,d=o.animationDuration,h=o.animationEasing,p=o.animationId,v=o.animateNewValues,g=o.width,m=o.height,y=this.state,w=y.prevPoints,S=y.totalLength;return C.createElement(tr,{begin:f,duration:d,isActive:c,easing:h,from:{t:0},to:{t:1},key:"line-".concat(p),onAnimationEnd:this.handleAnimationEnd,onAnimationStart:this.handleAnimationStart},function(O){var b=O.t;if(w){var x=w.length/s.length,A=s.map(function(T,M){var R=Math.floor(M*x);if(w[R]){var D=w[R],L=Qe(D.x,T.x),z=Qe(D.y,T.y);return gt(gt({},T),{},{x:L(b),y:z(b)})}if(v){var $=Qe(g*2,T.x),F=Qe(m/2,T.y);return gt(gt({},T),{},{x:$(b),y:F(b)})}return gt(gt({},T),{},{x:T.x,y:T.y})});return i.renderCurveStatically(A,n,a)}var j=Qe(0,S),E=j(b),I;if(l){var N="".concat(l).split(/[,\s]+/gim).map(function(T){return parseFloat(T)});I=i.getStrokeDasharray(E,S,N)}else I=i.generateSimpleStrokeDasharray(S,E);return i.renderCurveStatically(s,n,a,{strokeDasharray:I})})}},{key:"renderCurve",value:function(n,a){var i=this.props,o=i.points,s=i.isAnimationActive,l=this.state,c=l.prevPoints,f=l.totalLength;return s&&o&&o.length&&(!c&&f>0||!oa(c,o))?this.renderCurveWithAnimation(n,a):this.renderCurveStatically(o,n,a)}},{key:"render",value:function(){var n,a=this.props,i=a.hide,o=a.dot,s=a.points,l=a.className,c=a.xAxis,f=a.yAxis,d=a.top,h=a.left,p=a.width,v=a.height,g=a.isAnimationActive,m=a.id;if(i||!s||!s.length)return null;var y=this.state.isAnimationFinished,w=s.length===1,S=pe("recharts-line",l),O=c&&c.allowDataOverflow,b=f&&f.allowDataOverflow,x=O||b,A=fe(m)?this.id:m,j=(n=ce(o,!1))!==null&&n!==void 0?n:{r:3,strokeWidth:2},E=j.r,I=E===void 0?3:E,N=j.strokeWidth,T=N===void 0?2:N,M=eS(o)?o:{},R=M.clipDot,D=R===void 0?!0:R,L=I*2+T;return C.createElement(je,{className:S},O||b?C.createElement("defs",null,C.createElement("clipPath",{id:"clipPath-".concat(A)},C.createElement("rect",{x:O?h:h-p/2,y:b?d:d-v/2,width:O?p:p*2,height:b?v:v*2})),!D&&C.createElement("clipPath",{id:"clipPath-dots-".concat(A)},C.createElement("rect",{x:h-L/2,y:d-L/2,width:p+L,height:v+L}))):null,!w&&this.renderCurve(x,A),this.renderErrorBar(x,A),(w||o)&&this.renderDots(x,D,A),(!g||y)&&pr.renderCallByParent(this.props,s))}}],[{key:"getDerivedStateFromProps",value:function(n,a){return n.animationId!==a.prevAnimationId?{prevAnimationId:n.animationId,curPoints:n.points,prevPoints:a.curPoints}:n.points!==a.curPoints?{curPoints:n.points}:null}},{key:"repeat",value:function(n,a){for(var i=n.length%2!==0?[].concat(Ln(n),[0]):n,o=[],s=0;s<a;++s)o=[].concat(Ln(o),Ln(i));return o}},{key:"renderDotItem",value:function(n,a){var i;if(C.isValidElement(n))i=C.cloneElement(n,a);else if(se(n))i=n(a);else{var o=a.key,s=J0(a,DB),l=pe("recharts-line-dot",typeof n!="boolean"?n.className:"");i=C.createElement(nl,ni({key:o},s,{className:l}))}return i}}])})(P.PureComponent);Bt(Gi,"displayName","Line");Bt(Gi,"defaultProps",{xAxisId:0,yAxisId:0,connectNulls:!1,activeDot:!0,dot:!0,legendType:"line",stroke:"#3182bd",strokeWidth:1,fill:"#fff",points:[],isAnimationActive:!On.isSsr,animateNewValues:!0,animationBegin:0,animationDuration:1500,animationEasing:"ease",hide:!1,label:!1});Bt(Gi,"getComposedData",function(e){var t=e.props,r=e.xAxis,n=e.yAxis,a=e.xAxisTicks,i=e.yAxisTicks,o=e.dataKey,s=e.bandSize,l=e.displayedData,c=e.offset,f=t.layout,d=l.map(function(h,p){var v=ft(h,o);return f==="horizontal"?{x:as({axis:r,ticks:a,bandSize:s,entry:h,index:p}),y:fe(v)?null:n.scale(v),value:v,payload:h}:{x:fe(v)?null:r.scale(v),y:as({axis:n,ticks:i,bandSize:s,entry:h,index:p}),value:v,payload:h}});return gt({points:d,layout:f},c)});var XB=["layout","type","stroke","connectNulls","isRange","ref"],YB=["key"],BA;function ga(e){"@babel/helpers - typeof";return ga=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ga(e)}function qA(e,t){if(e==null)return{};var r=ZB(e,t),n,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)n=i[a],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function ZB(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function en(){return en=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},en.apply(this,arguments)}function tw(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function _r(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?tw(Object(r),!0).forEach(function(n){Jt(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):tw(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function JB(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function rw(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,zA(n.key),n)}}function QB(e,t,r){return t&&rw(e.prototype,t),r&&rw(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function eq(e,t,r){return t=Ps(t),tq(e,FA()?Reflect.construct(t,r||[],Ps(e).constructor):t.apply(e,r))}function tq(e,t){if(t&&(ga(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return rq(e)}function rq(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function FA(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(FA=function(){return!!e})()}function Ps(e){return Ps=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Ps(e)}function nq(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&$h(e,t)}function $h(e,t){return $h=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,a){return n.__proto__=a,n},$h(e,t)}function Jt(e,t,r){return t=zA(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function zA(e){var t=aq(e,"string");return ga(t)=="symbol"?t:t+""}function aq(e,t){if(ga(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(ga(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var rr=(function(e){function t(){var r;JB(this,t);for(var n=arguments.length,a=new Array(n),i=0;i<n;i++)a[i]=arguments[i];return r=eq(this,t,[].concat(a)),Jt(r,"state",{isAnimationFinished:!0}),Jt(r,"id",Pa("recharts-area-")),Jt(r,"handleAnimationEnd",function(){var o=r.props.onAnimationEnd;r.setState({isAnimationFinished:!0}),se(o)&&o()}),Jt(r,"handleAnimationStart",function(){var o=r.props.onAnimationStart;r.setState({isAnimationFinished:!1}),se(o)&&o()}),r}return nq(t,e),QB(t,[{key:"renderDots",value:function(n,a,i){var o=this.props.isAnimationActive,s=this.state.isAnimationFinished;if(o&&!s)return null;var l=this.props,c=l.dot,f=l.points,d=l.dataKey,h=ce(this.props,!1),p=ce(c,!0),v=f.map(function(m,y){var w=_r(_r(_r({key:"dot-".concat(y),r:3},h),p),{},{index:y,cx:m.x,cy:m.y,dataKey:d,value:m.value,payload:m.payload,points:f});return t.renderDotItem(c,w)}),g={clipPath:n?"url(#clipPath-".concat(a?"":"dots-").concat(i,")"):null};return C.createElement(je,en({className:"recharts-area-dots"},g),v)}},{key:"renderHorizontalRect",value:function(n){var a=this.props,i=a.baseLine,o=a.points,s=a.strokeWidth,l=o[0].x,c=o[o.length-1].x,f=n*Math.abs(l-c),d=Er(o.map(function(h){return h.y||0}));return H(i)&&typeof i=="number"?d=Math.max(i,d):i&&Array.isArray(i)&&i.length&&(d=Math.max(Er(i.map(function(h){return h.y||0})),d)),H(d)?C.createElement("rect",{x:l<c?l:l-f,y:0,width:f,height:Math.floor(d+(s?parseInt("".concat(s),10):1))}):null}},{key:"renderVerticalRect",value:function(n){var a=this.props,i=a.baseLine,o=a.points,s=a.strokeWidth,l=o[0].y,c=o[o.length-1].y,f=n*Math.abs(l-c),d=Er(o.map(function(h){return h.x||0}));return H(i)&&typeof i=="number"?d=Math.max(i,d):i&&Array.isArray(i)&&i.length&&(d=Math.max(Er(i.map(function(h){return h.x||0})),d)),H(d)?C.createElement("rect",{x:0,y:l<c?l:l-f,width:d+(s?parseInt("".concat(s),10):1),height:Math.floor(f)}):null}},{key:"renderClipRect",value:function(n){var a=this.props.layout;return a==="vertical"?this.renderVerticalRect(n):this.renderHorizontalRect(n)}},{key:"renderAreaStatically",value:function(n,a,i,o){var s=this.props,l=s.layout,c=s.type,f=s.stroke,d=s.connectNulls,h=s.isRange;s.ref;var p=qA(s,XB);return C.createElement(je,{clipPath:i?"url(#clipPath-".concat(o,")"):null},C.createElement(Xn,en({},ce(p,!0),{points:n,connectNulls:d,type:c,baseLine:a,layout:l,stroke:"none",className:"recharts-area-area"})),f!=="none"&&C.createElement(Xn,en({},ce(this.props,!1),{className:"recharts-area-curve",layout:l,type:c,connectNulls:d,fill:"none",points:n})),f!=="none"&&h&&C.createElement(Xn,en({},ce(this.props,!1),{className:"recharts-area-curve",layout:l,type:c,connectNulls:d,fill:"none",points:a})))}},{key:"renderAreaWithAnimation",value:function(n,a){var i=this,o=this.props,s=o.points,l=o.baseLine,c=o.isAnimationActive,f=o.animationBegin,d=o.animationDuration,h=o.animationEasing,p=o.animationId,v=this.state,g=v.prevPoints,m=v.prevBaseLine;return C.createElement(tr,{begin:f,duration:d,isActive:c,easing:h,from:{t:0},to:{t:1},key:"area-".concat(p),onAnimationEnd:this.handleAnimationEnd,onAnimationStart:this.handleAnimationStart},function(y){var w=y.t;if(g){var S=g.length/s.length,O=s.map(function(j,E){var I=Math.floor(E*S);if(g[I]){var N=g[I],T=Qe(N.x,j.x),M=Qe(N.y,j.y);return _r(_r({},j),{},{x:T(w),y:M(w)})}return j}),b;if(H(l)&&typeof l=="number"){var x=Qe(m,l);b=x(w)}else if(fe(l)||ja(l)){var A=Qe(m,0);b=A(w)}else b=l.map(function(j,E){var I=Math.floor(E*S);if(m[I]){var N=m[I],T=Qe(N.x,j.x),M=Qe(N.y,j.y);return _r(_r({},j),{},{x:T(w),y:M(w)})}return j});return i.renderAreaStatically(O,b,n,a)}return C.createElement(je,null,C.createElement("defs",null,C.createElement("clipPath",{id:"animationClipPath-".concat(a)},i.renderClipRect(w))),C.createElement(je,{clipPath:"url(#animationClipPath-".concat(a,")")},i.renderAreaStatically(s,l,n,a)))})}},{key:"renderArea",value:function(n,a){var i=this.props,o=i.points,s=i.baseLine,l=i.isAnimationActive,c=this.state,f=c.prevPoints,d=c.prevBaseLine,h=c.totalLength;return l&&o&&o.length&&(!f&&h>0||!oa(f,o)||!oa(d,s))?this.renderAreaWithAnimation(n,a):this.renderAreaStatically(o,s,n,a)}},{key:"render",value:function(){var n,a=this.props,i=a.hide,o=a.dot,s=a.points,l=a.className,c=a.top,f=a.left,d=a.xAxis,h=a.yAxis,p=a.width,v=a.height,g=a.isAnimationActive,m=a.id;if(i||!s||!s.length)return null;var y=this.state.isAnimationFinished,w=s.length===1,S=pe("recharts-area",l),O=d&&d.allowDataOverflow,b=h&&h.allowDataOverflow,x=O||b,A=fe(m)?this.id:m,j=(n=ce(o,!1))!==null&&n!==void 0?n:{r:3,strokeWidth:2},E=j.r,I=E===void 0?3:E,N=j.strokeWidth,T=N===void 0?2:N,M=eS(o)?o:{},R=M.clipDot,D=R===void 0?!0:R,L=I*2+T;return C.createElement(je,{className:S},O||b?C.createElement("defs",null,C.createElement("clipPath",{id:"clipPath-".concat(A)},C.createElement("rect",{x:O?f:f-p/2,y:b?c:c-v/2,width:O?p:p*2,height:b?v:v*2})),!D&&C.createElement("clipPath",{id:"clipPath-dots-".concat(A)},C.createElement("rect",{x:f-L/2,y:c-L/2,width:p+L,height:v+L}))):null,w?null:this.renderArea(x,A),(o||w)&&this.renderDots(x,D,A),(!g||y)&&pr.renderCallByParent(this.props,s))}}],[{key:"getDerivedStateFromProps",value:function(n,a){return n.animationId!==a.prevAnimationId?{prevAnimationId:n.animationId,curPoints:n.points,curBaseLine:n.baseLine,prevPoints:a.curPoints,prevBaseLine:a.curBaseLine}:n.points!==a.curPoints||n.baseLine!==a.curBaseLine?{curPoints:n.points,curBaseLine:n.baseLine}:null}}])})(P.PureComponent);BA=rr;Jt(rr,"displayName","Area");Jt(rr,"defaultProps",{stroke:"#3182bd",fill:"#3182bd",fillOpacity:.6,xAxisId:0,yAxisId:0,legendType:"line",connectNulls:!1,points:[],dot:!1,activeDot:!0,hide:!1,isAnimationActive:!On.isSsr,animationBegin:0,animationDuration:1500,animationEasing:"ease"});Jt(rr,"getBaseValue",function(e,t,r,n){var a=e.layout,i=e.baseValue,o=t.props.baseValue,s=o??i;if(H(s)&&typeof s=="number")return s;var l=a==="horizontal"?n:r,c=l.scale.domain();if(l.type==="number"){var f=Math.max(c[0],c[1]),d=Math.min(c[0],c[1]);return s==="dataMin"?d:s==="dataMax"||f<0?f:Math.max(Math.min(c[0],c[1]),0)}return s==="dataMin"?c[0]:s==="dataMax"?c[1]:c[0]});Jt(rr,"getComposedData",function(e){var t=e.props,r=e.item,n=e.xAxis,a=e.yAxis,i=e.xAxisTicks,o=e.yAxisTicks,s=e.bandSize,l=e.dataKey,c=e.stackedData,f=e.dataStartIndex,d=e.displayedData,h=e.offset,p=t.layout,v=c&&c.length,g=BA.getBaseValue(t,r,n,a),m=p==="horizontal",y=!1,w=d.map(function(O,b){var x;v?x=c[f+b]:(x=ft(O,l),Array.isArray(x)?y=!0:x=[g,x]);var A=x[1]==null||v&&ft(O,l)==null;return m?{x:as({axis:n,ticks:i,bandSize:s,entry:O,index:b}),y:A?null:a.scale(x[1]),value:x,payload:O}:{x:A?null:n.scale(x[1]),y:as({axis:a,ticks:o,bandSize:s,entry:O,index:b}),value:x,payload:O}}),S;return v||y?S=w.map(function(O){var b=Array.isArray(O.value)?O.value[0]:null;return m?{x:O.x,y:b!=null&&O.y!=null?a.scale(b):null}:{x:b!=null?n.scale(b):null,y:O.y}}):S=m?a.scale(g):n.scale(g),_r({points:w,baseLine:S,layout:p,isRange:y},h)});Jt(rr,"renderDotItem",function(e,t){var r;if(C.isValidElement(e))r=C.cloneElement(e,t);else if(se(e))r=e(t);else{var n=pe("recharts-area-dot",typeof e!="boolean"?e.className:""),a=t.key,i=qA(t,YB);r=C.createElement(nl,en({},i,{key:a,className:n}))}return r});function ya(e){"@babel/helpers - typeof";return ya=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ya(e)}function iq(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function oq(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,HA(n.key),n)}}function sq(e,t,r){return t&&oq(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function lq(e,t,r){return t=Ts(t),cq(e,UA()?Reflect.construct(t,r||[],Ts(e).constructor):t.apply(e,r))}function cq(e,t){if(t&&(ya(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return uq(e)}function uq(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function UA(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(UA=function(){return!!e})()}function Ts(e){return Ts=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Ts(e)}function fq(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Lh(e,t)}function Lh(e,t){return Lh=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,a){return n.__proto__=a,n},Lh(e,t)}function WA(e,t,r){return t=HA(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function HA(e){var t=dq(e,"string");return ya(t)=="symbol"?t:t+""}function dq(e,t){if(ya(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(ya(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}function Bh(){return Bh=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Bh.apply(this,arguments)}function hq(e){var t=e.xAxisId,r=Qp(),n=em(),a=_A(t);return a==null?null:P.createElement(Ma,Bh({},a,{className:pe("recharts-".concat(a.axisType," ").concat(a.axisType),a.className),viewBox:{x:0,y:0,width:r,height:n},ticksGenerator:function(o){return ur(o,!0)}}))}var hn=(function(e){function t(){return iq(this,t),lq(this,t,arguments)}return fq(t,e),sq(t,[{key:"render",value:function(){return P.createElement(hq,this.props)}}])})(P.Component);WA(hn,"displayName","XAxis");WA(hn,"defaultProps",{allowDecimals:!0,hide:!1,orientation:"bottom",width:0,height:30,mirror:!1,xAxisId:0,tickCount:5,type:"category",padding:{left:0,right:0},allowDataOverflow:!1,scale:"auto",reversed:!1,allowDuplicatedCategory:!0});function ba(e){"@babel/helpers - typeof";return ba=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ba(e)}function pq(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function mq(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,VA(n.key),n)}}function vq(e,t,r){return t&&mq(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function gq(e,t,r){return t=Es(t),yq(e,GA()?Reflect.construct(t,r||[],Es(e).constructor):t.apply(e,r))}function yq(e,t){if(t&&(ba(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return bq(e)}function bq(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function GA(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(GA=function(){return!!e})()}function Es(e){return Es=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Es(e)}function xq(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&qh(e,t)}function qh(e,t){return qh=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,a){return n.__proto__=a,n},qh(e,t)}function KA(e,t,r){return t=VA(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function VA(e){var t=wq(e,"string");return ba(t)=="symbol"?t:t+""}function wq(e,t){if(ba(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(ba(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}function Fh(){return Fh=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Fh.apply(this,arguments)}var Sq=function(t){var r=t.yAxisId,n=Qp(),a=em(),i=jA(r);return i==null?null:P.createElement(Ma,Fh({},i,{className:pe("recharts-".concat(i.axisType," ").concat(i.axisType),i.className),viewBox:{x:0,y:0,width:n,height:a},ticksGenerator:function(s){return ur(s,!0)}}))},kr=(function(e){function t(){return pq(this,t),gq(this,t,arguments)}return xq(t,e),vq(t,[{key:"render",value:function(){return P.createElement(Sq,this.props)}}])})(P.Component);KA(kr,"displayName","YAxis");KA(kr,"defaultProps",{allowDuplicatedCategory:!0,allowDecimals:!0,hide:!1,orientation:"left",width:60,height:0,mirror:!1,yAxisId:0,tickCount:5,type:"number",padding:{top:0,bottom:0},allowDataOverflow:!1,scale:"auto",reversed:!1});function nw(e){return jq(e)||_q(e)||Aq(e)||Oq()}function Oq(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
59In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Aq(e,t){if(e){if(typeof e=="string")return zh(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return zh(e,t)}}function _q(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function jq(e){if(Array.isArray(e))return zh(e)}function zh(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}var Uh=function(t,r,n,a,i){var o=Mt(t,rm),s=Mt(t,ll),l=[].concat(nw(o),nw(s)),c=Mt(t,ul),f="".concat(a,"Id"),d=a[0],h=r;if(l.length&&(h=l.reduce(function(g,m){if(m.props[f]===n&&Qt(m.props,"extendDomain")&&H(m.props[d])){var y=m.props[d];return[Math.min(g[0],y),Math.max(g[1],y)]}return g},h)),c.length){var p="".concat(d,"1"),v="".concat(d,"2");h=c.reduce(function(g,m){if(m.props[f]===n&&Qt(m.props,"extendDomain")&&H(m.props[p])&&H(m.props[v])){var y=m.props[p],w=m.props[v];return[Math.min(g[0],y,w),Math.max(g[1],y,w)]}return g},h)}return i&&i.length&&(h=i.reduce(function(g,m){return H(m)?[Math.min(g[0],m),Math.max(g[1],m)]:g},h)),h},yd={exports:{}},aw;function Pq(){return aw||(aw=1,(function(e){var t=Object.prototype.hasOwnProperty,r="~";function n(){}Object.create&&(n.prototype=Object.create(null),new n().__proto__||(r=!1));function a(l,c,f){this.fn=l,this.context=c,this.once=f||!1}function i(l,c,f,d,h){if(typeof f!="function")throw new TypeError("The listener must be a function");var p=new a(f,d||l,h),v=r?r+c:c;return l._events[v]?l._events[v].fn?l._events[v]=[l._events[v],p]:l._events[v].push(p):(l._events[v]=p,l._eventsCount++),l}function o(l,c){--l._eventsCount===0?l._events=new n:delete l._events[c]}function s(){this._events=new n,this._eventsCount=0}s.prototype.eventNames=function(){var c=[],f,d;if(this._eventsCount===0)return c;for(d in f=this._events)t.call(f,d)&&c.push(r?d.slice(1):d);return Object.getOwnPropertySymbols?c.concat(Object.getOwnPropertySymbols(f)):c},s.prototype.listeners=function(c){var f=r?r+c:c,d=this._events[f];if(!d)return[];if(d.fn)return[d.fn];for(var h=0,p=d.length,v=new Array(p);h<p;h++)v[h]=d[h].fn;return v},s.prototype.listenerCount=function(c){var f=r?r+c:c,d=this._events[f];return d?d.fn?1:d.length:0},s.prototype.emit=function(c,f,d,h,p,v){var g=r?r+c:c;if(!this._events[g])return!1;var m=this._events[g],y=arguments.length,w,S;if(m.fn){switch(m.once&&this.removeListener(c,m.fn,void 0,!0),y){case 1:return m.fn.call(m.context),!0;case 2:return m.fn.call(m.context,f),!0;case 3:return m.fn.call(m.context,f,d),!0;case 4:return m.fn.call(m.context,f,d,h),!0;case 5:return m.fn.call(m.context,f,d,h,p),!0;case 6:return m.fn.call(m.context,f,d,h,p,v),!0}for(S=1,w=new Array(y-1);S<y;S++)w[S-1]=arguments[S];m.fn.apply(m.context,w)}else{var O=m.length,b;for(S=0;S<O;S++)switch(m[S].once&&this.removeListener(c,m[S].fn,void 0,!0),y){case 1:m[S].fn.call(m[S].context);break;case 2:m[S].fn.call(m[S].context,f);break;case 3:m[S].fn.call(m[S].context,f,d);break;case 4:m[S].fn.call(m[S].context,f,d,h);break;default:if(!w)for(b=1,w=new Array(y-1);b<y;b++)w[b-1]=arguments[b];m[S].fn.apply(m[S].context,w)}}return!0},s.prototype.on=function(c,f,d){return i(this,c,f,d,!1)},s.prototype.once=function(c,f,d){return i(this,c,f,d,!0)},s.prototype.removeListener=function(c,f,d,h){var p=r?r+c:c;if(!this._events[p])return this;if(!f)return o(this,p),this;var v=this._events[p];if(v.fn)v.fn===f&&(!h||v.once)&&(!d||v.context===d)&&o(this,p);else{for(var g=0,m=[],y=v.length;g<y;g++)(v[g].fn!==f||h&&!v[g].once||d&&v[g].context!==d)&&m.push(v[g]);m.length?this._events[p]=m.length===1?m[0]:m:o(this,p)}return this},s.prototype.removeAllListeners=function(c){var f;return c?(f=r?r+c:c,this._events[f]&&o(this,f)):(this._events=new n,this._eventsCount=0),this},s.prototype.off=s.prototype.removeListener,s.prototype.addListener=s.prototype.on,s.prefixed=r,s.EventEmitter=s,e.exports=s})(yd)),yd.exports}var Tq=Pq();const Eq=Ce(Tq);var bd=new Eq,xd="recharts.syncMouseEvents";function Ri(e){"@babel/helpers - typeof";return Ri=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ri(e)}function Nq(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Cq(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,XA(n.key),n)}}function Mq(e,t,r){return t&&Cq(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function wd(e,t,r){return t=XA(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function XA(e){var t=Iq(e,"string");return Ri(t)=="symbol"?t:t+""}function Iq(e,t){if(Ri(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Ri(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var kq=(function(){function e(){Nq(this,e),wd(this,"activeIndex",0),wd(this,"coordinateList",[]),wd(this,"layout","horizontal")}return Mq(e,[{key:"setDetails",value:function(r){var n,a=r.coordinateList,i=a===void 0?null:a,o=r.container,s=o===void 0?null:o,l=r.layout,c=l===void 0?null:l,f=r.offset,d=f===void 0?null:f,h=r.mouseHandlerCallback,p=h===void 0?null:h;this.coordinateList=(n=i??this.coordinateList)!==null&&n!==void 0?n:[],this.container=s??this.container,this.layout=c??this.layout,this.offset=d??this.offset,this.mouseHandlerCallback=p??this.mouseHandlerCallback,this.activeIndex=Math.min(Math.max(this.activeIndex,0),this.coordinateList.length-1)}},{key:"focus",value:function(){this.spoofMouse()}},{key:"keyboardEvent",value:function(r){if(this.coordinateList.length!==0)switch(r.key){case"ArrowRight":{if(this.layout!=="horizontal")return;this.activeIndex=Math.min(this.activeIndex+1,this.coordinateList.length-1),this.spoofMouse();break}case"ArrowLeft":{if(this.layout!=="horizontal")return;this.activeIndex=Math.max(this.activeIndex-1,0),this.spoofMouse();break}}}},{key:"setIndex",value:function(r){this.activeIndex=r}},{key:"spoofMouse",value:function(){var r,n;if(this.layout==="horizontal"&&this.coordinateList.length!==0){var a=this.container.getBoundingClientRect(),i=a.x,o=a.y,s=a.height,l=this.coordinateList[this.activeIndex].coordinate,c=((r=window)===null||r===void 0?void 0:r.scrollX)||0,f=((n=window)===null||n===void 0?void 0:n.scrollY)||0,d=i+l+c,h=o+this.offset.top+s/2+f;this.mouseHandlerCallback({pageX:d,pageY:h})}}}])})();function Rq(e,t,r){if(r==="number"&&t===!0&&Array.isArray(e)){var n=e?.[0],a=e?.[1];if(n&&a&&H(n)&&H(a))return!0}return!1}function Dq(e,t,r,n){var a=n/2;return{stroke:"none",fill:"#ccc",x:e==="horizontal"?t.x-a:r.left+.5,y:e==="horizontal"?r.top+.5:t.y-a,width:e==="horizontal"?n:r.width-1,height:e==="horizontal"?r.height-1:n}}function YA(e){var t=e.cx,r=e.cy,n=e.radius,a=e.startAngle,i=e.endAngle,o=et(t,r,n,a),s=et(t,r,n,i);return{points:[o,s],cx:t,cy:r,radius:n,startAngle:a,endAngle:i}}function $q(e,t,r){var n,a,i,o;if(e==="horizontal")n=t.x,i=n,a=r.top,o=r.top+r.height;else if(e==="vertical")a=t.y,o=a,n=r.left,i=r.left+r.width;else if(t.cx!=null&&t.cy!=null)if(e==="centric"){var s=t.cx,l=t.cy,c=t.innerRadius,f=t.outerRadius,d=t.angle,h=et(s,l,c,d),p=et(s,l,f,d);n=h.x,a=h.y,i=p.x,o=p.y}else return YA(t);return[{x:n,y:a},{x:i,y:o}]}function Di(e){"@babel/helpers - typeof";return Di=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Di(e)}function iw(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function yo(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?iw(Object(r),!0).forEach(function(n){Lq(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):iw(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Lq(e,t,r){return t=Bq(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Bq(e){var t=qq(e,"string");return Di(t)=="symbol"?t:t+""}function qq(e,t){if(Di(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Di(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Fq(e){var t,r,n=e.element,a=e.tooltipEventType,i=e.isActive,o=e.activeCoordinate,s=e.activePayload,l=e.offset,c=e.activeTooltipIndex,f=e.tooltipAxisBandSize,d=e.layout,h=e.chartName,p=(t=n.props.cursor)!==null&&t!==void 0?t:(r=n.type.defaultProps)===null||r===void 0?void 0:r.cursor;if(!n||!p||!i||!o||h!=="ScatterChart"&&a!=="axis")return null;var v,g=Xn;if(h==="ScatterChart")v=o,g=E2;else if(h==="BarChart")v=Dq(d,o,l,f),g=Xp;else if(d==="radial"){var m=YA(o),y=m.cx,w=m.cy,S=m.radius,O=m.startAngle,b=m.endAngle;v={cx:y,cy:w,startAngle:O,endAngle:b,innerRadius:S,outerRadius:S},g=eA}else v={points:$q(d,o,l)},g=Xn;var x=yo(yo(yo(yo({stroke:"#ccc",pointerEvents:"none"},l),v),ce(p,!1)),{},{payload:s,payloadIndex:c,className:pe("recharts-tooltip-cursor",p.className)});return P.isValidElement(p)?P.cloneElement(p,x):P.createElement(g,x)}var zq=["item"],Uq=["children","className","width","height","style","compact","title","desc"];function xa(e){"@babel/helpers - typeof";return xa=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},xa(e)}function Hn(){return Hn=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Hn.apply(this,arguments)}function ow(e,t){return Gq(e)||Hq(e,t)||JA(e,t)||Wq()}function Wq(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
60In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Hq(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,a,i,o,s=[],l=!0,c=!1;try{if(i=(r=r.call(e)).next,t!==0)for(;!(l=(n=i.call(r)).done)&&(s.push(n.value),s.length!==t);l=!0);}catch(f){c=!0,a=f}finally{try{if(!l&&r.return!=null&&(o=r.return(),Object(o)!==o))return}finally{if(c)throw a}}return s}}function Gq(e){if(Array.isArray(e))return e}function sw(e,t){if(e==null)return{};var r=Kq(e,t),n,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)n=i[a],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function Kq(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function Vq(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Xq(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,QA(n.key),n)}}function Yq(e,t,r){return t&&Xq(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function Zq(e,t,r){return t=Ns(t),Jq(e,ZA()?Reflect.construct(t,r||[],Ns(e).constructor):t.apply(e,r))}function Jq(e,t){if(t&&(xa(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Qq(e)}function Qq(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function ZA(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(ZA=function(){return!!e})()}function Ns(e){return Ns=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Ns(e)}function eF(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Wh(e,t)}function Wh(e,t){return Wh=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,a){return n.__proto__=a,n},Wh(e,t)}function wa(e){return nF(e)||rF(e)||JA(e)||tF()}function tF(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
61In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function JA(e,t){if(e){if(typeof e=="string")return Hh(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Hh(e,t)}}function rF(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function nF(e){if(Array.isArray(e))return Hh(e)}function Hh(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function lw(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function B(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?lw(Object(r),!0).forEach(function(n){ee(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):lw(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function ee(e,t,r){return t=QA(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function QA(e){var t=aF(e,"string");return xa(t)=="symbol"?t:t+""}function aF(e,t){if(xa(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(xa(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var iF={xAxis:["bottom","top"],yAxis:["left","right"]},oF={width:"100%",height:"100%"},e_={x:0,y:0};function bo(e){return e}var sF=function(t,r){return r==="horizontal"?t.x:r==="vertical"?t.y:r==="centric"?t.angle:t.radius},lF=function(t,r,n,a){var i=r.find(function(f){return f&&f.index===n});if(i){if(t==="horizontal")return{x:i.coordinate,y:a.y};if(t==="vertical")return{x:a.x,y:i.coordinate};if(t==="centric"){var o=i.coordinate,s=a.radius;return B(B(B({},a),et(a.cx,a.cy,s,o)),{},{angle:o,radius:s})}var l=i.coordinate,c=a.angle;return B(B(B({},a),et(a.cx,a.cy,l,c)),{},{angle:c,radius:l})}return e_},fl=function(t,r){var n=r.graphicalItems,a=r.dataStartIndex,i=r.dataEndIndex,o=(n??[]).reduce(function(s,l){var c=l.props.data;return c&&c.length?[].concat(wa(s),wa(c)):s},[]);return o.length>0?o:t&&t.length&&H(a)&&H(i)?t.slice(a,i+1):[]};function t_(e){return e==="number"?[0,"auto"]:void 0}var Gh=function(t,r,n,a){var i=t.graphicalItems,o=t.tooltipAxis,s=fl(r,t);return n<0||!i||!i.length||n>=s.length?null:i.reduce(function(l,c){var f,d=(f=c.props.data)!==null&&f!==void 0?f:r;d&&t.dataStartIndex+t.dataEndIndex!==0&&t.dataEndIndex-t.dataStartIndex>=n&&(d=d.slice(t.dataStartIndex,t.dataEndIndex+1));var h;if(o.dataKey&&!o.allowDuplicatedCategory){var p=d===void 0?s:d;h=Mo(p,o.dataKey,a)}else h=d&&d[n]||s[n];return h?[].concat(wa(l),[ZO(c,h)]):l},[])},cw=function(t,r,n,a){var i=a||{x:t.chartX,y:t.chartY},o=sF(i,n),s=t.orderedTooltipTicks,l=t.tooltipAxis,c=t.tooltipTicks,f=dk(o,s,c,l);if(f>=0&&c){var d=c[f]&&c[f].value,h=Gh(t,r,f,d),p=lF(n,s,f,i);return{activeTooltipIndex:f,activeLabel:d,activePayload:h,activeCoordinate:p}}return null},cF=function(t,r){var n=r.axes,a=r.graphicalItems,i=r.axisType,o=r.axisIdKey,s=r.stackGroups,l=r.dataStartIndex,c=r.dataEndIndex,f=t.layout,d=t.children,h=t.stackOffset,p=VO(f,i);return n.reduce(function(v,g){var m,y=g.type.defaultProps!==void 0?B(B({},g.type.defaultProps),g.props):g.props,w=y.type,S=y.dataKey,O=y.allowDataOverflow,b=y.allowDuplicatedCategory,x=y.scale,A=y.ticks,j=y.includeHidden,E=y[o];if(v[E])return v;var I=fl(t.data,{graphicalItems:a.filter(function(G){var Q,Se=o in G.props?G.props[o]:(Q=G.type.defaultProps)===null||Q===void 0?void 0:Q[o];return Se===E}),dataStartIndex:l,dataEndIndex:c}),N=I.length,T,M,R;Rq(y.domain,O,w)&&(T=ch(y.domain,null,O),p&&(w==="number"||x!=="auto")&&(R=ti(I,S,"category")));var D=t_(w);if(!T||T.length===0){var L,z=(L=y.domain)!==null&&L!==void 0?L:D;if(S){if(T=ti(I,S,w),w==="category"&&p){var $=v1(T);b&&$?(M=T,T=ms(0,N)):b||(T=Ax(z,T,g).reduce(function(G,Q){return G.indexOf(Q)>=0?G:[].concat(wa(G),[Q])},[]))}else if(w==="category")b?T=T.filter(function(G){return G!==""&&!fe(G)}):T=Ax(z,T,g).reduce(function(G,Q){return G.indexOf(Q)>=0||Q===""||fe(Q)?G:[].concat(wa(G),[Q])},[]);else if(w==="number"){var F=gk(I,a.filter(function(G){var Q,Se,ae=o in G.props?G.props[o]:(Q=G.type.defaultProps)===null||Q===void 0?void 0:Q[o],lt="hide"in G.props?G.props.hide:(Se=G.type.defaultProps)===null||Se===void 0?void 0:Se.hide;return ae===E&&(j||!lt)}),S,i,f);F&&(T=F)}p&&(w==="number"||x!=="auto")&&(R=ti(I,S,"category"))}else p?T=ms(0,N):s&&s[E]&&s[E].hasStack&&w==="number"?T=h==="expand"?[0,1]:YO(s[E].stackGroups,l,c):T=KO(I,a.filter(function(G){var Q=o in G.props?G.props[o]:G.type.defaultProps[o],Se="hide"in G.props?G.props.hide:G.type.defaultProps.hide;return Q===E&&(j||!Se)}),w,f,!0);if(w==="number")T=Uh(d,T,E,i,A),z&&(T=ch(z,T,O));else if(w==="category"&&z){var K=z,V=T.every(function(G){return K.indexOf(G)>=0});V&&(T=K)}}return B(B({},v),{},ee({},E,B(B({},y),{},{axisType:i,domain:T,categoricalDomain:R,duplicateDomain:M,originalDomain:(m=y.domain)!==null&&m!==void 0?m:D,isCategorical:p,layout:f})))},{})},uF=function(t,r){var n=r.graphicalItems,a=r.Axis,i=r.axisType,o=r.axisIdKey,s=r.stackGroups,l=r.dataStartIndex,c=r.dataEndIndex,f=t.layout,d=t.children,h=fl(t.data,{graphicalItems:n,dataStartIndex:l,dataEndIndex:c}),p=h.length,v=VO(f,i),g=-1;return n.reduce(function(m,y){var w=y.type.defaultProps!==void 0?B(B({},y.type.defaultProps),y.props):y.props,S=w[o],O=t_("number");if(!m[S]){g++;var b;return v?b=ms(0,p):s&&s[S]&&s[S].hasStack?(b=YO(s[S].stackGroups,l,c),b=Uh(d,b,S,i)):(b=ch(O,KO(h,n.filter(function(x){var A,j,E=o in x.props?x.props[o]:(A=x.type.defaultProps)===null||A===void 0?void 0:A[o],I="hide"in x.props?x.props.hide:(j=x.type.defaultProps)===null||j===void 0?void 0:j.hide;return E===S&&!I}),"number",f),a.defaultProps.allowDataOverflow),b=Uh(d,b,S,i)),B(B({},m),{},ee({},S,B(B({axisType:i},a.defaultProps),{},{hide:!0,orientation:Ct(iF,"".concat(i,".").concat(g%2),null),domain:b,originalDomain:O,isCategorical:v,layout:f})))}return m},{})},fF=function(t,r){var n=r.axisType,a=n===void 0?"xAxis":n,i=r.AxisComp,o=r.graphicalItems,s=r.stackGroups,l=r.dataStartIndex,c=r.dataEndIndex,f=t.children,d="".concat(a,"Id"),h=Mt(f,i),p={};return h&&h.length?p=cF(t,{axes:h,graphicalItems:o,axisType:a,axisIdKey:d,stackGroups:s,dataStartIndex:l,dataEndIndex:c}):o&&o.length&&(p=uF(t,{Axis:i,graphicalItems:o,axisType:a,axisIdKey:d,stackGroups:s,dataStartIndex:l,dataEndIndex:c})),p},dF=function(t){var r=Pr(t),n=ur(r,!1,!0);return{tooltipTicks:n,orderedTooltipTicks:Op(n,function(a){return a.coordinate}),tooltipAxis:r,tooltipAxisBandSize:is(r,n)}},uw=function(t){var r=t.children,n=t.defaultShowTooltip,a=xt(r,ua),i=0,o=0;return t.data&&t.data.length!==0&&(o=t.data.length-1),a&&a.props&&(a.props.startIndex>=0&&(i=a.props.startIndex),a.props.endIndex>=0&&(o=a.props.endIndex)),{chartX:0,chartY:0,dataStartIndex:i,dataEndIndex:o,activeTooltipIndex:-1,isTooltipActive:!!n}},hF=function(t){return!t||!t.length?!1:t.some(function(r){var n=fr(r&&r.type);return n&&n.indexOf("Bar")>=0})},fw=function(t){return t==="horizontal"?{numericAxisName:"yAxis",cateAxisName:"xAxis"}:t==="vertical"?{numericAxisName:"xAxis",cateAxisName:"yAxis"}:t==="centric"?{numericAxisName:"radiusAxis",cateAxisName:"angleAxis"}:{numericAxisName:"angleAxis",cateAxisName:"radiusAxis"}},pF=function(t,r){var n=t.props,a=t.graphicalItems,i=t.xAxisMap,o=i===void 0?{}:i,s=t.yAxisMap,l=s===void 0?{}:s,c=n.width,f=n.height,d=n.children,h=n.margin||{},p=xt(d,ua),v=xt(d,Kn),g=Object.keys(l).reduce(function(b,x){var A=l[x],j=A.orientation;return!A.mirror&&!A.hide?B(B({},b),{},ee({},j,b[j]+A.width)):b},{left:h.left||0,right:h.right||0}),m=Object.keys(o).reduce(function(b,x){var A=o[x],j=A.orientation;return!A.mirror&&!A.hide?B(B({},b),{},ee({},j,Ct(b,"".concat(j))+A.height)):b},{top:h.top||0,bottom:h.bottom||0}),y=B(B({},m),g),w=y.bottom;p&&(y.bottom+=p.props.height||ua.defaultProps.height),v&&r&&(y=mk(y,a,n,r));var S=c-y.left-y.right,O=f-y.top-y.bottom;return B(B({brushBottom:w},y),{},{width:Math.max(S,0),height:Math.max(O,0)})},mF=function(t,r){if(r==="xAxis")return t[r].width;if(r==="yAxis")return t[r].height},r_=function(t){var r=t.chartName,n=t.GraphicalChild,a=t.defaultTooltipEventType,i=a===void 0?"axis":a,o=t.validateTooltipEventTypes,s=o===void 0?["axis"]:o,l=t.axisComponents,c=t.legendContent,f=t.formatAxisMap,d=t.defaultProps,h=function(y,w){var S=w.graphicalItems,O=w.stackGroups,b=w.offset,x=w.updateId,A=w.dataStartIndex,j=w.dataEndIndex,E=y.barSize,I=y.layout,N=y.barGap,T=y.barCategoryGap,M=y.maxBarSize,R=fw(I),D=R.numericAxisName,L=R.cateAxisName,z=hF(S),$=[];return S.forEach(function(F,K){var V=fl(y.data,{graphicalItems:[F],dataStartIndex:A,dataEndIndex:j}),G=F.type.defaultProps!==void 0?B(B({},F.type.defaultProps),F.props):F.props,Q=G.dataKey,Se=G.maxBarSize,ae=G["".concat(D,"Id")],lt=G["".concat(L,"Id")],ar={},tt=l.reduce(function(Kt,rt){var Pn=w["".concat(rt.axisType,"Map")],Tn=G["".concat(rt.axisType,"Id")];Pn&&Pn[Tn]||rt.axisType==="zAxis"||fn();var Ia=Pn[Tn];return B(B({},Kt),{},ee(ee({},rt.axisType,Ia),"".concat(rt.axisType,"Ticks"),ur(Ia)))},ar),X=tt[L],oe=tt["".concat(L,"Ticks")],le=O&&O[ae]&&O[ae].hasStack&&Ek(F,O[ae].stackGroups),U=fr(F.type).indexOf("Bar")>=0,Me=is(X,oe),he=[],ie=z&&hk({barSize:E,stackGroups:O,totalSize:mF(tt,L)});if(U){var ke,ue,St=fe(Se)?M:Se,Ze=(ke=(ue=is(X,oe,!0))!==null&&ue!==void 0?ue:St)!==null&&ke!==void 0?ke:0;he=pk({barGap:N,barCategoryGap:T,bandSize:Ze!==Me?Ze:Me,sizeList:ie[lt],maxBarSize:St}),Ze!==Me&&(he=he.map(function(Kt){return B(B({},Kt),{},{position:B(B({},Kt.position),{},{offset:Kt.position.offset-Ze/2})})}))}var Gt=F&&F.type&&F.type.getComposedData;Gt&&$.push({props:B(B({},Gt(B(B({},tt),{},{displayedData:V,props:y,dataKey:Q,item:F,bandSize:Me,barPosition:he,offset:b,stackedData:le,layout:I,dataStartIndex:A,dataEndIndex:j}))),{},ee(ee(ee({key:F.key||"item-".concat(K)},D,tt[D]),L,tt[L]),"animationId",x)),childIndex:T1(F,y.children),item:F})}),$},p=function(y,w){var S=y.props,O=y.dataStartIndex,b=y.dataEndIndex,x=y.updateId;if(!Kv({props:S}))return null;var A=S.children,j=S.layout,E=S.stackOffset,I=S.data,N=S.reverseStackOrder,T=fw(j),M=T.numericAxisName,R=T.cateAxisName,D=Mt(A,n),L=jk(I,D,"".concat(M,"Id"),"".concat(R,"Id"),E,N),z=l.reduce(function(G,Q){var Se="".concat(Q.axisType,"Map");return B(B({},G),{},ee({},Se,fF(S,B(B({},Q),{},{graphicalItems:D,stackGroups:Q.axisType===M&&L,dataStartIndex:O,dataEndIndex:b}))))},{}),$=pF(B(B({},z),{},{props:S,graphicalItems:D}),w?.legendBBox);Object.keys(z).forEach(function(G){z[G]=f(S,z[G],$,G.replace("Map",""),r)});var F=z["".concat(R,"Map")],K=dF(F),V=h(S,B(B({},z),{},{dataStartIndex:O,dataEndIndex:b,updateId:x,graphicalItems:D,stackGroups:L,offset:$}));return B(B({formattedGraphicalItems:V,graphicalItems:D,offset:$,stackGroups:L},K),z)},v=(function(m){function y(w){var S,O,b;return Vq(this,y),b=Zq(this,y,[w]),ee(b,"eventEmitterSymbol",Symbol("rechartsEventEmitter")),ee(b,"accessibilityManager",new kq),ee(b,"handleLegendBBoxUpdate",function(x){if(x){var A=b.state,j=A.dataStartIndex,E=A.dataEndIndex,I=A.updateId;b.setState(B({legendBBox:x},p({props:b.props,dataStartIndex:j,dataEndIndex:E,updateId:I},B(B({},b.state),{},{legendBBox:x}))))}}),ee(b,"handleReceiveSyncEvent",function(x,A,j){if(b.props.syncId===x){if(j===b.eventEmitterSymbol&&typeof b.props.syncMethod!="function")return;b.applySyncEvent(A)}}),ee(b,"handleBrushChange",function(x){var A=x.startIndex,j=x.endIndex;if(A!==b.state.dataStartIndex||j!==b.state.dataEndIndex){var E=b.state.updateId;b.setState(function(){return B({dataStartIndex:A,dataEndIndex:j},p({props:b.props,dataStartIndex:A,dataEndIndex:j,updateId:E},b.state))}),b.triggerSyncEvent({dataStartIndex:A,dataEndIndex:j})}}),ee(b,"handleMouseEnter",function(x){var A=b.getMouseInfo(x);if(A){var j=B(B({},A),{},{isTooltipActive:!0});b.setState(j),b.triggerSyncEvent(j);var E=b.props.onMouseEnter;se(E)&&E(j,x)}}),ee(b,"triggeredAfterMouseMove",function(x){var A=b.getMouseInfo(x),j=A?B(B({},A),{},{isTooltipActive:!0}):{isTooltipActive:!1};b.setState(j),b.triggerSyncEvent(j);var E=b.props.onMouseMove;se(E)&&E(j,x)}),ee(b,"handleItemMouseEnter",function(x){b.setState(function(){return{isTooltipActive:!0,activeItem:x,activePayload:x.tooltipPayload,activeCoordinate:x.tooltipPosition||{x:x.cx,y:x.cy}}})}),ee(b,"handleItemMouseLeave",function(){b.setState(function(){return{isTooltipActive:!1}})}),ee(b,"handleMouseMove",function(x){x.persist(),b.throttleTriggeredAfterMouseMove(x)}),ee(b,"handleMouseLeave",function(x){b.throttleTriggeredAfterMouseMove.cancel();var A={isTooltipActive:!1};b.setState(A),b.triggerSyncEvent(A);var j=b.props.onMouseLeave;se(j)&&j(A,x)}),ee(b,"handleOuterEvent",function(x){var A=P1(x),j=Ct(b.props,"".concat(A));if(A&&se(j)){var E,I;/.*touch.*/i.test(A)?I=b.getMouseInfo(x.changedTouches[0]):I=b.getMouseInfo(x),j((E=I)!==null&&E!==void 0?E:{},x)}}),ee(b,"handleClick",function(x){var A=b.getMouseInfo(x);if(A){var j=B(B({},A),{},{isTooltipActive:!0});b.setState(j),b.triggerSyncEvent(j);var E=b.props.onClick;se(E)&&E(j,x)}}),ee(b,"handleMouseDown",function(x){var A=b.props.onMouseDown;if(se(A)){var j=b.getMouseInfo(x);A(j,x)}}),ee(b,"handleMouseUp",function(x){var A=b.props.onMouseUp;if(se(A)){var j=b.getMouseInfo(x);A(j,x)}}),ee(b,"handleTouchMove",function(x){x.changedTouches!=null&&x.changedTouches.length>0&&b.throttleTriggeredAfterMouseMove(x.changedTouches[0])}),ee(b,"handleTouchStart",function(x){x.changedTouches!=null&&x.changedTouches.length>0&&b.handleMouseDown(x.changedTouches[0])}),ee(b,"handleTouchEnd",function(x){x.changedTouches!=null&&x.changedTouches.length>0&&b.handleMouseUp(x.changedTouches[0])}),ee(b,"handleDoubleClick",function(x){var A=b.props.onDoubleClick;if(se(A)){var j=b.getMouseInfo(x);A(j,x)}}),ee(b,"handleContextMenu",function(x){var A=b.props.onContextMenu;if(se(A)){var j=b.getMouseInfo(x);A(j,x)}}),ee(b,"triggerSyncEvent",function(x){b.props.syncId!==void 0&&bd.emit(xd,b.props.syncId,x,b.eventEmitterSymbol)}),ee(b,"applySyncEvent",function(x){var A=b.props,j=A.layout,E=A.syncMethod,I=b.state.updateId,N=x.dataStartIndex,T=x.dataEndIndex;if(x.dataStartIndex!==void 0||x.dataEndIndex!==void 0)b.setState(B({dataStartIndex:N,dataEndIndex:T},p({props:b.props,dataStartIndex:N,dataEndIndex:T,updateId:I},b.state)));else if(x.activeTooltipIndex!==void 0){var M=x.chartX,R=x.chartY,D=x.activeTooltipIndex,L=b.state,z=L.offset,$=L.tooltipTicks;if(!z)return;if(typeof E=="function")D=E($,x);else if(E==="value"){D=-1;for(var F=0;F<$.length;F++)if($[F].value===x.activeLabel){D=F;break}}var K=B(B({},z),{},{x:z.left,y:z.top}),V=Math.min(M,K.x+K.width),G=Math.min(R,K.y+K.height),Q=$[D]&&$[D].value,Se=Gh(b.state,b.props.data,D),ae=$[D]?{x:j==="horizontal"?$[D].coordinate:V,y:j==="horizontal"?G:$[D].coordinate}:e_;b.setState(B(B({},x),{},{activeLabel:Q,activeCoordinate:ae,activePayload:Se,activeTooltipIndex:D}))}else b.setState(x)}),ee(b,"renderCursor",function(x){var A,j=b.state,E=j.isTooltipActive,I=j.activeCoordinate,N=j.activePayload,T=j.offset,M=j.activeTooltipIndex,R=j.tooltipAxisBandSize,D=b.getTooltipEventType(),L=(A=x.props.active)!==null&&A!==void 0?A:E,z=b.props.layout,$=x.key||"_recharts-cursor";return C.createElement(Fq,{key:$,activeCoordinate:I,activePayload:N,activeTooltipIndex:M,chartName:r,element:x,isActive:L,layout:z,offset:T,tooltipAxisBandSize:R,tooltipEventType:D})}),ee(b,"renderPolarAxis",function(x,A,j){var E=Ct(x,"type.axisType"),I=Ct(b.state,"".concat(E,"Map")),N=x.type.defaultProps,T=N!==void 0?B(B({},N),x.props):x.props,M=I&&I[T["".concat(E,"Id")]];return P.cloneElement(x,B(B({},M),{},{className:pe(E,M.className),key:x.key||"".concat(A,"-").concat(j),ticks:ur(M,!0)}))}),ee(b,"renderPolarGrid",function(x){var A=x.props,j=A.radialLines,E=A.polarAngles,I=A.polarRadius,N=b.state,T=N.radiusAxisMap,M=N.angleAxisMap,R=Pr(T),D=Pr(M),L=D.cx,z=D.cy,$=D.innerRadius,F=D.outerRadius;return P.cloneElement(x,{polarAngles:Array.isArray(E)?E:ur(D,!0).map(function(K){return K.coordinate}),polarRadius:Array.isArray(I)?I:ur(R,!0).map(function(K){return K.coordinate}),cx:L,cy:z,innerRadius:$,outerRadius:F,key:x.key||"polar-grid",radialLines:j})}),ee(b,"renderLegend",function(){var x=b.state.formattedGraphicalItems,A=b.props,j=A.children,E=A.width,I=A.height,N=b.props.margin||{},T=E-(N.left||0)-(N.right||0),M=HO({children:j,formattedGraphicalItems:x,legendWidth:T,legendContent:c});if(!M)return null;var R=M.item,D=sw(M,zq);return P.cloneElement(R,B(B({},D),{},{chartWidth:E,chartHeight:I,margin:N,onBBoxUpdate:b.handleLegendBBoxUpdate}))}),ee(b,"renderTooltip",function(){var x,A=b.props,j=A.children,E=A.accessibilityLayer,I=xt(j,Et);if(!I)return null;var N=b.state,T=N.isTooltipActive,M=N.activeCoordinate,R=N.activePayload,D=N.activeLabel,L=N.offset,z=(x=I.props.active)!==null&&x!==void 0?x:T;return P.cloneElement(I,{viewBox:B(B({},L),{},{x:L.left,y:L.top}),active:z,label:D,payload:z?R:[],coordinate:M,accessibilityLayer:E})}),ee(b,"renderBrush",function(x){var A=b.props,j=A.margin,E=A.data,I=b.state,N=I.offset,T=I.dataStartIndex,M=I.dataEndIndex,R=I.updateId;return P.cloneElement(x,{key:x.key||"_recharts-brush",onChange:po(b.handleBrushChange,x.props.onChange),data:E,x:H(x.props.x)?x.props.x:N.left,y:H(x.props.y)?x.props.y:N.top+N.height+N.brushBottom-(j.bottom||0),width:H(x.props.width)?x.props.width:N.width,startIndex:T,endIndex:M,updateId:"brush-".concat(R)})}),ee(b,"renderReferenceElement",function(x,A,j){if(!x)return null;var E=b,I=E.clipPathId,N=b.state,T=N.xAxisMap,M=N.yAxisMap,R=N.offset,D=x.type.defaultProps||{},L=x.props,z=L.xAxisId,$=z===void 0?D.xAxisId:z,F=L.yAxisId,K=F===void 0?D.yAxisId:F;return P.cloneElement(x,{key:x.key||"".concat(A,"-").concat(j),xAxis:T[$],yAxis:M[K],viewBox:{x:R.left,y:R.top,width:R.width,height:R.height},clipPathId:I})}),ee(b,"renderActivePoints",function(x){var A=x.item,j=x.activePoint,E=x.basePoint,I=x.childIndex,N=x.isRange,T=[],M=A.props.key,R=A.item.type.defaultProps!==void 0?B(B({},A.item.type.defaultProps),A.item.props):A.item.props,D=R.activeDot,L=R.dataKey,z=B(B({index:I,dataKey:L,cx:j.x,cy:j.y,r:4,fill:Vp(A.item),strokeWidth:2,stroke:"#fff",payload:j.payload,value:j.value},ce(D,!1)),Io(D));return T.push(y.renderActiveDot(D,z,"".concat(M,"-activePoint-").concat(I))),E?T.push(y.renderActiveDot(D,B(B({},z),{},{cx:E.x,cy:E.y}),"".concat(M,"-basePoint-").concat(I))):N&&T.push(null),T}),ee(b,"renderGraphicChild",function(x,A,j){var E=b.filterFormatItem(x,A,j);if(!E)return null;var I=b.getTooltipEventType(),N=b.state,T=N.isTooltipActive,M=N.tooltipAxis,R=N.activeTooltipIndex,D=N.activeLabel,L=b.props.children,z=xt(L,Et),$=E.props,F=$.points,K=$.isRange,V=$.baseLine,G=E.item.type.defaultProps!==void 0?B(B({},E.item.type.defaultProps),E.item.props):E.item.props,Q=G.activeDot,Se=G.hide,ae=G.activeBar,lt=G.activeShape,ar=!!(!Se&&T&&z&&(Q||ae||lt)),tt={};I!=="axis"&&z&&z.props.trigger==="click"?tt={onClick:po(b.handleItemMouseEnter,x.props.onClick)}:I!=="axis"&&(tt={onMouseLeave:po(b.handleItemMouseLeave,x.props.onMouseLeave),onMouseEnter:po(b.handleItemMouseEnter,x.props.onMouseEnter)});var X=P.cloneElement(x,B(B({},E.props),tt));function oe(rt){return typeof M.dataKey=="function"?M.dataKey(rt.payload):null}if(ar)if(R>=0){var le,U;if(M.dataKey&&!M.allowDuplicatedCategory){var Me=typeof M.dataKey=="function"?oe:"payload.".concat(M.dataKey.toString());le=Mo(F,Me,D),U=K&&V&&Mo(V,Me,D)}else le=F?.[R],U=K&&V&&V[R];if(lt||ae){var he=x.props.activeIndex!==void 0?x.props.activeIndex:R;return[P.cloneElement(x,B(B(B({},E.props),tt),{},{activeIndex:he})),null,null]}if(!fe(le))return[X].concat(wa(b.renderActivePoints({item:E,activePoint:le,basePoint:U,childIndex:R,isRange:K})))}else{var ie,ke=(ie=b.getItemByXY(b.state.activeCoordinate))!==null&&ie!==void 0?ie:{graphicalItem:X},ue=ke.graphicalItem,St=ue.item,Ze=St===void 0?x:St,Gt=ue.childIndex,Kt=B(B(B({},E.props),tt),{},{activeIndex:Gt});return[P.cloneElement(Ze,Kt),null,null]}return K?[X,null,null]:[X,null]}),ee(b,"renderCustomized",function(x,A,j){return P.cloneElement(x,B(B({key:"recharts-customized-".concat(j)},b.props),b.state))}),ee(b,"renderMap",{CartesianGrid:{handler:bo,once:!0},ReferenceArea:{handler:b.renderReferenceElement},ReferenceLine:{handler:bo},ReferenceDot:{handler:b.renderReferenceElement},XAxis:{handler:bo},YAxis:{handler:bo},Brush:{handler:b.renderBrush,once:!0},Bar:{handler:b.renderGraphicChild},Line:{handler:b.renderGraphicChild},Area:{handler:b.renderGraphicChild},Radar:{handler:b.renderGraphicChild},RadialBar:{handler:b.renderGraphicChild},Scatter:{handler:b.renderGraphicChild},Pie:{handler:b.renderGraphicChild},Funnel:{handler:b.renderGraphicChild},Tooltip:{handler:b.renderCursor,once:!0},PolarGrid:{handler:b.renderPolarGrid,once:!0},PolarAngleAxis:{handler:b.renderPolarAxis},PolarRadiusAxis:{handler:b.renderPolarAxis},Customized:{handler:b.renderCustomized}}),b.clipPathId="".concat((S=w.id)!==null&&S!==void 0?S:Pa("recharts"),"-clip"),b.throttleTriggeredAfterMouseMove=KS(b.triggeredAfterMouseMove,(O=w.throttleDelay)!==null&&O!==void 0?O:1e3/60),b.state={},b}return eF(y,m),Yq(y,[{key:"componentDidMount",value:function(){var S,O;this.addListener(),this.accessibilityManager.setDetails({container:this.container,offset:{left:(S=this.props.margin.left)!==null&&S!==void 0?S:0,top:(O=this.props.margin.top)!==null&&O!==void 0?O:0},coordinateList:this.state.tooltipTicks,mouseHandlerCallback:this.triggeredAfterMouseMove,layout:this.props.layout}),this.displayDefaultTooltip()}},{key:"displayDefaultTooltip",value:function(){var S=this.props,O=S.children,b=S.data,x=S.height,A=S.layout,j=xt(O,Et);if(j){var E=j.props.defaultIndex;if(!(typeof E!="number"||E<0||E>this.state.tooltipTicks.length-1)){var I=this.state.tooltipTicks[E]&&this.state.tooltipTicks[E].value,N=Gh(this.state,b,E,I),T=this.state.tooltipTicks[E].coordinate,M=(this.state.offset.top+x)/2,R=A==="horizontal",D=R?{x:T,y:M}:{y:T,x:M},L=this.state.formattedGraphicalItems.find(function($){var F=$.item;return F.type.name==="Scatter"});L&&(D=B(B({},D),L.props.points[E].tooltipPosition),N=L.props.points[E].tooltipPayload);var z={activeTooltipIndex:E,isTooltipActive:!0,activeLabel:I,activePayload:N,activeCoordinate:D};this.setState(z),this.renderCursor(j),this.accessibilityManager.setIndex(E)}}}},{key:"getSnapshotBeforeUpdate",value:function(S,O){if(!this.props.accessibilityLayer)return null;if(this.state.tooltipTicks!==O.tooltipTicks&&this.accessibilityManager.setDetails({coordinateList:this.state.tooltipTicks}),this.props.layout!==S.layout&&this.accessibilityManager.setDetails({layout:this.props.layout}),this.props.margin!==S.margin){var b,x;this.accessibilityManager.setDetails({offset:{left:(b=this.props.margin.left)!==null&&b!==void 0?b:0,top:(x=this.props.margin.top)!==null&&x!==void 0?x:0}})}return null}},{key:"componentDidUpdate",value:function(S){Cd([xt(S.children,Et)],[xt(this.props.children,Et)])||this.displayDefaultTooltip()}},{key:"componentWillUnmount",value:function(){this.removeListener(),this.throttleTriggeredAfterMouseMove.cancel()}},{key:"getTooltipEventType",value:function(){var S=xt(this.props.children,Et);if(S&&typeof S.props.shared=="boolean"){var O=S.props.shared?"axis":"item";return s.indexOf(O)>=0?O:i}return i}},{key:"getMouseInfo",value:function(S){if(!this.container)return null;var O=this.container,b=O.getBoundingClientRect(),x=pN(b),A={chartX:Math.round(S.pageX-x.left),chartY:Math.round(S.pageY-x.top)},j=b.width/O.offsetWidth||1,E=this.inRange(A.chartX,A.chartY,j);if(!E)return null;var I=this.state,N=I.xAxisMap,T=I.yAxisMap,M=this.getTooltipEventType(),R=cw(this.state,this.props.data,this.props.layout,E);if(M!=="axis"&&N&&T){var D=Pr(N).scale,L=Pr(T).scale,z=D&&D.invert?D.invert(A.chartX):null,$=L&&L.invert?L.invert(A.chartY):null;return B(B({},A),{},{xValue:z,yValue:$},R)}return R?B(B({},A),R):null}},{key:"inRange",value:function(S,O){var b=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,x=this.props.layout,A=S/b,j=O/b;if(x==="horizontal"||x==="vertical"){var E=this.state.offset,I=A>=E.left&&A<=E.left+E.width&&j>=E.top&&j<=E.top+E.height;return I?{x:A,y:j}:null}var N=this.state,T=N.angleAxisMap,M=N.radiusAxisMap;if(T&&M){var R=Pr(T);return Px({x:A,y:j},R)}return null}},{key:"parseEventsOfWrapper",value:function(){var S=this.props.children,O=this.getTooltipEventType(),b=xt(S,Et),x={};b&&O==="axis"&&(b.props.trigger==="click"?x={onClick:this.handleClick}:x={onMouseEnter:this.handleMouseEnter,onDoubleClick:this.handleDoubleClick,onMouseMove:this.handleMouseMove,onMouseLeave:this.handleMouseLeave,onTouchMove:this.handleTouchMove,onTouchStart:this.handleTouchStart,onTouchEnd:this.handleTouchEnd,onContextMenu:this.handleContextMenu});var A=Io(this.props,this.handleOuterEvent);return B(B({},A),x)}},{key:"addListener",value:function(){bd.on(xd,this.handleReceiveSyncEvent)}},{key:"removeListener",value:function(){bd.removeListener(xd,this.handleReceiveSyncEvent)}},{key:"filterFormatItem",value:function(S,O,b){for(var x=this.state.formattedGraphicalItems,A=0,j=x.length;A<j;A++){var E=x[A];if(E.item===S||E.props.key===S.key||O===fr(E.item.type)&&b===E.childIndex)return E}return null}},{key:"renderClipPath",value:function(){var S=this.clipPathId,O=this.state.offset,b=O.left,x=O.top,A=O.height,j=O.width;return C.createElement("defs",null,C.createElement("clipPath",{id:S},C.createElement("rect",{x:b,y:x,height:A,width:j})))}},{key:"getXScales",value:function(){var S=this.state.xAxisMap;return S?Object.entries(S).reduce(function(O,b){var x=ow(b,2),A=x[0],j=x[1];return B(B({},O),{},ee({},A,j.scale))},{}):null}},{key:"getYScales",value:function(){var S=this.state.yAxisMap;return S?Object.entries(S).reduce(function(O,b){var x=ow(b,2),A=x[0],j=x[1];return B(B({},O),{},ee({},A,j.scale))},{}):null}},{key:"getXScaleByAxisId",value:function(S){var O;return(O=this.state.xAxisMap)===null||O===void 0||(O=O[S])===null||O===void 0?void 0:O.scale}},{key:"getYScaleByAxisId",value:function(S){var O;return(O=this.state.yAxisMap)===null||O===void 0||(O=O[S])===null||O===void 0?void 0:O.scale}},{key:"getItemByXY",value:function(S){var O=this.state,b=O.formattedGraphicalItems,x=O.activeItem;if(b&&b.length)for(var A=0,j=b.length;A<j;A++){var E=b[A],I=E.props,N=E.item,T=N.type.defaultProps!==void 0?B(B({},N.type.defaultProps),N.props):N.props,M=fr(N.type);if(M==="Bar"){var R=(I.data||[]).find(function($){return b2(S,$)});if(R)return{graphicalItem:E,payload:R}}else if(M==="RadialBar"){var D=(I.data||[]).find(function($){return Px(S,$)});if(D)return{graphicalItem:E,payload:D}}else if(al(E,x)||il(E,x)||Ni(E,x)){var L=c$({graphicalItem:E,activeTooltipItem:x,itemData:T.data}),z=T.activeIndex===void 0?L:T.activeIndex;return{graphicalItem:B(B({},E),{},{childIndex:z}),payload:Ni(E,x)?T.data[L]:E.props.data[L]}}}return null}},{key:"render",value:function(){var S=this;if(!Kv(this))return null;var O=this.props,b=O.children,x=O.className,A=O.width,j=O.height,E=O.style,I=O.compact,N=O.title,T=O.desc,M=sw(O,Uq),R=ce(M,!1);if(I)return C.createElement(B0,{state:this.state,width:this.props.width,height:this.props.height,clipPathId:this.clipPathId},C.createElement(Id,Hn({},R,{width:A,height:j,title:N,desc:T}),this.renderClipPath(),Xv(b,this.renderMap)));if(this.props.accessibilityLayer){var D,L;R.tabIndex=(D=this.props.tabIndex)!==null&&D!==void 0?D:0,R.role=(L=this.props.role)!==null&&L!==void 0?L:"application",R.onKeyDown=function($){S.accessibilityManager.keyboardEvent($)},R.onFocus=function(){S.accessibilityManager.focus()}}var z=this.parseEventsOfWrapper();return C.createElement(B0,{state:this.state,width:this.props.width,height:this.props.height,clipPathId:this.clipPathId},C.createElement("div",Hn({className:pe("recharts-wrapper",x),style:B({position:"relative",curs
61or:"default",width:A,height:j},E)},z,{ref:function(F){S.container=F}}),C.createElement(Id,Hn({},R,{width:A,height:j,title:N,desc:T,style:oF}),this.renderClipPath(),Xv(b,this.renderMap)),this.renderLegend(),this.renderTooltip()))}}])})(P.Component);ee(v,"displayName",r),ee(v,"defaultProps",B({layout:"horizontal",stackOffset:"none",barCategoryGap:"10%",barGap:4,margin:{top:5,right:5,bottom:5,left:5},reverseStackOrder:!1,syncMethod:"index"},d)),ee(v,"getDerivedStateFromProps",function(m,y){var w=m.dataKey,S=m.data,O=m.children,b=m.width,x=m.height,A=m.layout,j=m.stackOffset,E=m.margin,I=y.dataStartIndex,N=y.dataEndIndex;if(y.updateId===void 0){var T=uw(m);return B(B(B({},T),{},{updateId:0},p(B(B({props:m},T),{},{updateId:0}),y)),{},{prevDataKey:w,prevData:S,prevWidth:b,prevHeight:x,prevLayout:A,prevStackOffset:j,prevMargin:E,prevChildren:O})}if(w!==y.prevDataKey||S!==y.prevData||b!==y.prevWidth||x!==y.prevHeight||A!==y.prevLayout||j!==y.prevStackOffset||!Gn(E,y.prevMargin)){var M=uw(m),R={chartX:y.chartX,chartY:y.chartY,isTooltipActive:y.isTooltipActive},D=B(B({},cw(y,S,A)),{},{updateId:y.updateId+1}),L=B(B(B({},M),R),D);return B(B(B({},L),p(B({props:m},L),y)),{},{prevDataKey:w,prevData:S,prevWidth:b,prevHeight:x,prevLayout:A,prevStackOffset:j,prevMargin:E,prevChildren:O})}if(!Cd(O,y.prevChildren)){var z,$,F,K,V=xt(O,ua),G=V&&(z=($=V.props)===null||$===void 0?void 0:$.startIndex)!==null&&z!==void 0?z:I,Q=V&&(F=(K=V.props)===null||K===void 0?void 0:K.endIndex)!==null&&F!==void 0?F:N,Se=G!==I||Q!==N,ae=!fe(S),lt=ae&&!Se?y.updateId:y.updateId+1;return B(B({updateId:lt},p(B(B({props:m},y),{},{updateId:lt,dataStartIndex:G,dataEndIndex:Q}),y)),{},{prevChildren:O,dataStartIndex:G,dataEndIndex:Q})}return null}),ee(v,"renderActiveDot",function(m,y,w){var S;return P.isValidElement(m)?S=P.cloneElement(m,y):se(m)?S=m(y):S=C.createElement(nl,y),C.createElement(je,{className:"recharts-active-dot",key:w},S)});var g=P.forwardRef(function(y,w){return C.createElement(v,Hn({},y,{ref:w}))});return g.displayName=v.displayName,g},vF=r_({chartName:"LineChart",GraphicalChild:Gi,axisComponents:[{axisType:"xAxis",AxisComp:hn},{axisType:"yAxis",AxisComp:kr}],formatAxisMap:gA}),n_=r_({chartName:"AreaChart",GraphicalChild:rr,axisComponents:[{axisType:"xAxis",AxisComp:hn},{axisType:"yAxis",AxisComp:kr}],formatAxisMap:gA});const gF=new Intl.NumberFormat("en-US"),ai=e=>gF.format(Math.round(e)),a_=e=>`${(e*100).toFixed(1)}%`,i_=e=>e.toFixed(1),xo=e=>new Date(e+"T00:00:00Z").toLocaleDateString("en-US",{month:"short",day:"numeric",timeZone:"UTC"}),yF=[{label:"Last 7 days",value:7},{label:"Last 28 days",value:28},{label:"Last 3 months",value:90},{label:"Last 6 months",value:180}];function bF(){const e=we(Pj),[t,r]=P.useState(28),[n,a]=P.useState(null),[i,o]=P.useState(!0),[s,l]=P.useState(null),c=P.useCallback(async f=>{o(!0),l(null);try{const d=await e({data:{days:f}});a(d)}catch(d){l(d instanceof Error?d.message:"Failed to load Search Console data")}finally{o(!1)}},[e]);return P.useEffect(()=>{c(t)},[t,c]),u.jsxs(vn,{className:"overflow-hidden",children:[u.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-3 border-b border-border bg-muted/40 px-5 py-4",children:[u.jsxs("div",{className:"flex items-center gap-2",children:[u.jsx(Lw,{className:"h-4 w-4 text-muted-foreground"}),u.jsxs("div",{children:[u.jsx("h2",{className:"text-sm font-semibold text-foreground",children:"Google Search Console"}),u.jsx("p",{className:"text-xs text-muted-foreground",children:n?`${xo(n.startDate)} – ${xo(n.endDate)} · ${n.siteUrl}`:"Live search performance from Google"})]})]}),u.jsxs("div",{className:"flex items-center gap-2",children:[u.jsxs(Ft,{value:String(t),onValueChange:f=>r(Number(f)),children:[u.jsx(zt,{className:"h-9 w-[150px]",children:u.jsx(Ut,{})}),u.jsx(Wt,{children:yF.map(f=>u.jsx(De,{value:String(f.value),children:f.label},f.value))})]}),u.jsx(te,{variant:"outline",size:"icon",className:"h-9 w-9",onClick:()=>c(t),disabled:i,"aria-label":"Refresh Search Console data",children:u.jsx(on,{className:`h-4 w-4 ${i?"animate-spin":""}`})})]})]}
61),i?u.jsxs("div",{className:"flex items-center justify-center py-16 text-muted-foreground",children:[u.jsx(be,{className:"mr-2 h-5 w-5 animate-spin"})," Loading search performance…"]}):s?u.jsxs("div",{className:"flex items-start gap-3 px-5 py-10 text-sm text-muted-foreground",children:[u.jsx(Rs,{className:"mt-0.5 h-5 w-5 shrink-0 text-amber-600"}),u.jsxs("div",{children:[u.jsx("p",{className:"font-medium text-foreground",children:"Couldn't load Search Console"}),u.jsx("p",{className:"mt-1",children:s})]})]}):n?u.jsxs("div",{className:"space-y-6 p-5",children:[u.jsxs("div",{className:"grid grid-cols-2 gap-3 lg:grid-cols-4",children:[u.jsx(wo,{label:"Total Clicks",value:ai(n.totals.clicks),icon:u.jsx(Ww,{className:"h-4 w-4"})}),u.jsx(wo,{label:"Impressions",value:ai(n.totals.impressions),icon:u.jsx(Bw,{className:"h-4 w-4"})}),u.jsx(wo,{label:"Average CTR",value:a_(n.totals.ctr),icon:u.jsx(lj,{className:"h-4 w-4"})}),u.jsx(wo,{label:"Avg Position",value:i_(n.totals.position),icon:u.jsx(Ms,{className:"h-4 w-4"})})]}),n.trend.length>0&&u.jsxs("div",{className:"rounded-lg border border-border p-4",children:[u.jsx("p",{className:"mb-3 text-xs font-medium uppercase tracking-wide text-muted-foreground",children:"Clicks & Impressions"}),u.jsx(Kd,{width:"100%",height:240,children:u.jsxs(n_,{data:n.trend,margin:{top:5,right:8,left:0,bottom:0},children:[u.jsxs("defs",{children:[u.jsxs("linearGradient",{id:"gscClicks",x1:"0",y1:"0",x2:"0",y2:"1",children:[u.jsx("stop",{offset:"5%",stopColor:"hsl(var(--primary))",stopOpacity:.35}),u.jsx("stop",{offset:"95%",stopColor:"hsl(var(--primary))",stopOpacity:0})]}),u.jsxs("linearGradient",{id:"gscImpr",x1:"0",y1:"0",x2:"0",y2:"1",children:[u.jsx("stop",{offset:"5%",stopColor:"hsl(var(--muted-foreground))",stopOpacity:.2}),u.jsx("stop",{offset:"95%",stopColor:"hsl(var(--muted-foreground))",stopOpacity:0})]})]}),u.jsx(_s,{strokeDasharray:"3 3",className:"stroke-border",vertical:!1}),u.jsx(hn,{dataKey:"date",tickFormatter:xo,tick:{fontSize:11},minTickGap:24,stroke:"hsl(var(--muted-foreground))"}),u.jsx(kr,{yAxisId:"left",tick:{fontSize:11},stroke:"hsl(var(--muted-foreground))",width:40}),u.jsx(kr,{yAxisId:"right",orientation:"right",tick:{fontSize:11},stroke:"hsl(var(--muted-foreground))",width:48}),u.jsx(Et,{labelFormatter:f=>xo(String(f)),formatter:(f,d)=>[ai(f),d],contentStyle:{fontSize:12,borderRadius:8,border:"1px solid hsl(var(--border))",background:"hsl(var(--background))"}}),u.jsx(rr,{yAxisId:"right",type:"monotone",dataKey:"impressions",name:"Impressions",stroke:"hsl(var(--muted-foreground))",fill:"url(#gscImpr)",strokeWidth:1.5}),u.jsx(rr,{yAxisId:"left",type:"monotone",dataKey:"clicks",name:"Clicks",stroke:"hsl(var(--primary))",fill:"url(#gscClicks)",strokeWidth:2})]})})]}),u.jsxs("div",{className:"grid gap-4 lg:grid-cols-2",children:[u.jsx(dw,{title:"Top Keywords",firstCol:"Query",rows:n.topQueries}),u.jsx(dw,{title:"Top Pages",firstCol:"Page",rows:n.topPages,isPath:!0})]})]}):null]})}function wo({label:e,value:t,icon:r}){return u.jsxs("div",{className:"rounded-lg border border-border bg-background p-4",children:[u.jsxs("div",{className:"flex items-center gap-2 text-muted-foreground",children:[r,u.jsx("span",{className:"text-xs font-medium uppercase tracking-wide",children:e})]}),u.jsx("p",{className:"mt-2 text-2xl font-semibold text-foreground",children:t})]})}function dw({title:e,firstCol:t,rows:r,isPath:n=!1}){const a=i=>{if(!n)return i;try{const o=new URL(i);return o.pathname===""?"/":o.pathname}catch{return i}};return u.jsxs("div",{className:"rounded-lg border border-border",children:[u.jsx("div",{className:"border-b border-border bg-muted/40 px-4 py-2.5",children:u.jsx("h3",{className:"text-xs font-semibold uppercase tracking-wide text-muted-foreground",children:e})}),r.length===0?u.jsx("div",{className:"px-4 py-8 text-center text-sm text-muted-foreground",children:"No data for this period."}):u.jsx("div",{className:"max-h-[360px] overflow-y-auto",children:u.jsxs("table",{className:"w-full text-sm",children:[u.jsx("thead",{className:"sticky top-0 bg-background text-left text-[11px] uppercase text-muted-foreground",children:u.jsxs("tr",{className:"border-b border-border",children:[u.jsx("th",{className:"px-4 py-2 font-medium",children:t}),u.jsx("th",{className:"px-2 py-2 text-right font-medium",children:"Clicks"}),u.jsx("th",{className:"px-2 py-2 text-right font-medium",children:"Impr."}),u.jsx("th",{className:"px-2 py-2 text-right font-medium",children:"CTR"}),u.jsx("th",{className:"px-4 py-2 text-right font-medium",children:"Pos."})]})}),u.jsx("tbody",{children:r.map((i,o)=>u.jsxs("tr",{className:"border-b border-border/60 last:border-0",children:[u.jsx("td",{className:"max-w-[220px] truncate px-4 py-2 text-foreground",title:i.key,children:a(i.key)}),u.jsx("td",{className:"px-2 py-2 text-right tabular-nums",children:ai(i.clicks)}),u.jsx("td",{className:"px-2 py-2 text-right tabular-nums text-muted-foreground",children:ai(i.impressions)}),u.jsx("td",{className:"px-2 py-2 text-right tabular-nums text-muted-foreground",children:a_(i.ctr)}),u.jsx("td",{className:"px-4 py-2 text-right",children:u.jsx(Le,{variant:"secondary",className:"tabular-nums font-normal",children:i_(i.position)})})]},o))})]})})]})}const xF=Pe({method:"POST"}).middleware([Ne]).handler(Te("2bc200059cb23c0f0b4dd745bdcade8acac4667cfd3a6d9d30be21ce16a64a3f")),wF=Pe({method:"POST"}).middleware([Ne]).handler(Te("3302a925781780ea8965c6d65ee4933971196dfeabd9e746fe837a0cdda56a30")),SF=Pe({method:"POST"}).middleware([Ne]).handler(Te("5f7f45cf98557cca656b327ed3d563677eac9ef0d4d89bc98e817e927ea07b26")),OF=Pe({method:"POST"}).middleware([Ne]).handler(Te("f5ec2ba6bad1f5474db85afea653a146a602cd9fc6a9bbe2fe419ee15a360abe"));var AF=Object.defineProperty,de=(e,t)=>AF(e,"name",{value:t,configurable:!0});function o_(e,t){return P.useReducer((r,n)=>t[r][n]??r,e)}de(o_,"useStateMachine");var s_="ScrollArea",[l_,G4]=G_(s_),[_F,Dt]=l_(s_),jF=P.forwardRef(de(function(t,r){const{__scopeScrollArea:n,type:a="hover",dir:i,scrollHideDelay:o=600,...s}=t,[l,c]=P.useState(null),[f,d]=P.useState(null),[h,p]=P.useState(null),[v,g]=P.useState(null),[m,y]=P.useState(null),[w,S]=P.useState(0),[O,b]=P.useState(0),[x,A]=P.useState(!1),[j,E]=P.useState(!1),I=Sa(r,c),N=X_(i);return u.jsx(_F,{scope:n,type:a,dir:N,scrollHideDelay:o,scrollArea:l,viewport:f,onViewportChange:d,content:h,onContentChange:p,scrollbarX:v,onScrollbarXChange:g,scrollbarXEnabled:x,onScrollbarXEnabledChange:A,scrollbarY:m,onScrollbarYChange:y,scrollbarYEnabled:j,onScrollbarYEnabledChange:E,onCornerWidthChange:S,onCornerHeight
61Change:b,children:u.jsx(Oa.div,{dir:N,...s,ref:I,style:{position:"relative","--radix-scroll-area-corner-width":w+"px","--radix-scroll-area-corner-height":O+"px",...t.style}})})},"ScrollArea")),PF="ScrollAreaViewport",TF=P.forwardRef(de(function(t,r){const{__scopeScrollArea:n,children:a,nonce:i,...o}=t,s=Dt(PF,n),l=P.useRef(null),c=Sa(r,l,s.onViewportChange);return u.jsxs(u.Fragment,{children:[u.jsx(EF,{nonce:i}),u.jsx(Oa.div,{"data-radix-scroll-area-viewport":"",...o,ref:c,style:{overflowX:s.scrollbarXEnabled?"scroll":"hidden",overflowY:s.scrollbarYEnabled?"scroll":"hidden",...t.style},children:u.jsx("div",{ref:s.onContentChange,style:{minWidth:"100%",display:"table"},children:a})})]})},"ScrollAreaViewport")),EF=P.memo(de(function({nonce:t}){return u.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-scroll-area-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-scroll-area-viewport]::-webkit-scrollbar{display:none}"},nonce:t})},"ScrollAreaViewportStyle"),(e,t)=>e.nonce===t.nonce),wr="ScrollAreaScrollbar",c_=P.forwardRef(de(function(t,r){const{forceMount:n,...a}=t,i=Dt(wr,t.__scopeScrollArea),{onScrollbarXEnabledChange:o,onScrollbarYEnabledChange:s}=i,l=t.orientation==="horizontal";return P.useEffect(()=>(l?o(!0):s(!0),()=>{l?o(!1):s(!1)}),[l,o,s]),i.type==="hover"?u.jsx(NF,{...a,ref:r,forceMount:n}):i.type==="scroll"?u.jsx(CF,{...a,ref:r,forceMount:n}):i.type==="auto"?u.jsx(u_,{...a,ref:r,forceMount:n}):i.type==="always"?u.jsx(im,{...a,ref:r,"data-state":"visible"}):null},"ScrollAreaScrollbar")),NF=P.forwardRef(de(function(t,r){const{forceMount:n,...a}=t,i=Dt(wr,t.__scopeScrollArea),[o,s]=P.useState(!1);return P.useEffect(()=>{const l=i.scrollArea;let c=0;if(l){const f=de(()=>{window.clearTimeout(c),s(!0)},"handlePointerEnter"),d=de(()=>{c=window.setTimeout(()=>s(!1),i.scrollHideDelay)},"handlePointerLeave");return l.addEventListener("pointerenter",f),l.addEventListener("pointerleave",d),()=>{window.clearTimeout(c),l.removeEventListener("pointerenter",f),l.removeEventListener("pointerleave",d)}}},[i.scrollArea,i.scrollHideDelay]),u.jsx(Is,{present:n||o,children:u.jsx(u_,{"data-state":o?"visible":"hidden",...a,ref:r})})},"ScrollAreaScrollbarHover")),CF=P.forwardRef(de(function(t,r){const{forceMount:n,...a}=t,i=Dt(wr,t.__scopeScrollArea),o=t.orientation==="horizontal",s=Vi(()=>c("SCROLL_END"),100),[l,c]=o_("hidden",{hidden:{SCROLL:"scrolling"},scrolling:{SCROLL_END:"idle",POINTER_ENTER:"interacting"},interacting:{SCROLL:"interacting",POINTER_LEAVE:"idle"},idle:{HIDE:"hidden",SCROLL:"scrolling",POINTER_ENTER:"interacting"}});return P.useEffect(()=>{if(l==="idle"){const f=window.setTimeout(()=>c("HIDE"),i.scrollHideDelay);return()=>window.clearTimeout(f)}},[l,i.scrollHideDelay,c]),P.useEffect(()=>{const f=i.viewport,d=o?"scrollLeft":"scrollTop";if(f){let h=f[d];const p=de(()=>{const v=f[d];h!==v&&(c("SCROLL"),s()),h=v},"handleScroll");return f.addEventListener("scroll",p),()=>f.removeEventListener("scroll",p)}},[i.viewport,o,c,s]),u.jsx(Is,{present:n||l!=="hidden",children:u.jsx(im,{"data-state":l==="hidden"?"hidden":"visible",...a,ref:r,onPointerEnter:rn(t.onPointerEnter,()=>c("POINTER_ENTER")),onPointerLeave:rn(t.onPointerLeave,()=>c("POINTER_LEAVE"))})})},"ScrollAreaScrollbarScroll")),u_=P.forwardRef(de(function(t,r){const n=Dt(wr,t.__scopeScrollArea),{forceMount:a,...i}=t,[o,s]=P.useState(!1),l=t.orientation==="horizontal",c=Vi(()=>{if(n.viewport){const f=n.viewport.offsetWidth<n.viewport.scrollWidth,d=n.viewport.offsetHeight<n.viewport.scrollHeight;s(l?f:d)}},10);return pn(n.viewport,c),pn(n.content,c),u.jsx(Is,{present:a||o,children:u.jsx(im,{"data-state":o?"visible":"hidden",...i,ref:r})})},"ScrollAreaScrollbarAuto")),im=P.forwardRef(de(function(t,r){const{orientation:n="vertical",...a}=t,i=Dt(wr,t.__scopeScrollArea),o=P.useRef(null),s=P.useRef(0),[l,c]=P.useState({content:0,viewport:0,scrollbar:{size:0,paddingStart:0,paddingEnd:0}}),f=om(l.viewport,l.content),d={...a,sizes:l,onSizesChange:c,hasThumb:f>0&&f<1,onThumbChange:de(p=>o.current=p,"onThumbChange"),onThumbPointerUp:de(()=>s.current=0,"onThumbPointerUp"),onThumbPointerDown:de(p=>s.current=p,"onThumbPointerDown")};function h(p,v){return p_(p,s.current,l,v)}return de(h,"getScrollPosition"),n==="horizontal"?u.jsx(MF,{...d,ref:r,onThumbPositionChange:()=>{if(i.viewport&&o.current){const p=i.viewport.scrollLeft,v=Vh(p,l,i.dir);o.current.style.transform=`translate3d(${v}px, 0, 0)`}}
61,onWheelScroll:p=>{i.viewport&&(i.viewport.scrollLeft=p)},onDragScroll:p=>{i.viewport&&(i.viewport.scrollLeft=h(p,i.dir))}}):n==="vertical"?u.jsx(IF,{...d,ref:r,onThumbPositionChange:()=>{if(i.viewport&&o.current){const p=i.viewport.scrollTop,v=Vh(p,l);o.current.style.transform=`translate3d(0, ${v}px, 0)`}},onWheelScroll:p=>{i.viewport&&(i.viewport.scrollTop=p)},onDragScroll:p=>{i.viewport&&(i.viewport.scrollTop=h(p))}}):null},"ScrollAreaScrollbarVisible")),MF=P.forwardRef(de(function(t,r){const{sizes:n,onSizesChange:a,...i}=t,o=Dt(wr,t.__scopeScrollArea),[s,l]=P.useState(),c=P.useRef(null),f=Sa(r,c,o.onScrollbarXChange);return P.useEffect(()=>{c.current&&l(getComputedStyle(c.current))},[c]),u.jsx(d_,{"data-orientation":"horizontal",...i,ref:f,sizes:n,style:{bottom:0,left:o.dir==="rtl"?"var(--radix-scroll-area-corner-width)":0,right:o.dir==="ltr"?"var(--radix-scroll-area-corner-width)":0,"--radix-scroll-area-thumb-width":Ki(n)+"px",...t.style},onThumbPointerDown:d=>t.onThumbPointerDown(d.x),onDragScroll:d=>t.onDragScroll(d.x),onWheelScroll:(d,h)=>{if(o.viewport){const p=o.viewport.scrollLeft+d.deltaX;t.onWheelScroll(p),lm(p,h)&&d.preventDefault()}},onResize:()=>{c.current&&o.viewport&&s&&a({content:o.viewport.scrollWidth,viewport:o.viewport.offsetWidth,scrollbar:{size:c.current.clientWidth,paddingStart:$i(s.paddingLeft),paddingEnd:$i(s.paddingRight)}})}})},"ScrollAreaScrollbarX")),IF=P.forwardRef(de(function(t,r){const{sizes:n,onSizesChange:a,...i}=t,o=Dt(wr,t.__scopeScrollArea),[s,l]=P.useState(),c=P.useRef(null),f=Sa(r,c,o.onScrollbarYChange);return P.useEffect(()=>{c.current&&l(getComputedStyle(c.current))},[c]),u.jsx(d_,{"data-orientation":"vertical",...i,ref:f,sizes:n,style:{top:0,right:o.dir==="ltr"?0:void 0,left:o.dir==="rtl"?0:void 0,bottom:"var(--radix-scroll-area-corner-height)","--radix-scroll-area-thumb-height":Ki(n)+"px",...t.style},onThumbPointerDown:d=>t.onThumbPointerDown(d.y),onDragScroll:d=>t.onDragScroll(d.y),onWheelScroll:(d,h)=>{if(o.viewport){const p=o.viewport.scrollTop+d.deltaY;t.onWheelScroll(p),lm(p,h)&&d.preventDefault()}},onResize:()=>{c.current&&o.viewport&&s&&a({content:o.viewport.scrollHeight,viewport:o.viewport.offsetHeight,scrollbar:{size:c.current.clientHeight,paddingStart:$i(s.paddingTop),paddingEnd:$i(s.paddingBottom)}})}})},"ScrollAreaScrollbarY")),[kF,f_]=l_(wr),d_=P.forwardRef(de(function(t,r){const{__scopeScrollArea:n,sizes:a,hasThumb:i,onThumbChange:o,onThumbPointerUp:s,onThumbPointerDown:l,onThumbPositionChange:c,onDragScroll:f,onWheelScroll:d,onResize:h,...p}=t,v=Dt(wr,n),[g,m]=P.useState(null),y=Sa(r,m),w=P.useRef(null),S=P.useRef(""),O=v.viewport,b=a.content-a.viewport,x=Yr(d),A=Yr(c),j=Vi(h,10);function E(I){if(w.current){const N=I.clientX-w.current.left,T=I.clientY-w.current.top;f({x:N,y:T})}}return de(E,"handleDragScroll"),P.useEffect(()=>{const I=de(N=>{const T=N.target;g?.contains(T)&&x(N,b)},"handleWheel");return document.addEventListener("wheel",I,{passive:!1}),()=>document.removeEventListener("wheel",I,{passive:!1})},[O,g,b,x]),P.useEffect(A,[a,A]),pn(g,j),pn(v.content,j),u.jsx(kF,{scope:n,scrollbar:g,hasThumb:i,onThumbChange:Yr(o),onThumbPointerUp:Yr(s),onThumbPositionChange:A,onThumbPointerDown:Yr(l),children:u.jsx(Oa.div,{...p,ref:y,style:{position:"absolute",...p.style},onPointerDown:rn(t.onPointerDown,I=>{I.button===0&&(I.target.setPointerCapture(I.pointerId),w.current=g.getBoundingClientRect(),S.current=document.body.style.webkitUserSelect,document.body.style.webkitUserSelect="none",v.viewport&&(v.viewport.style.scrollBehavior="auto"),E(I))}),onPointerMove:rn(t.onPointerMove,E),onPointerUp:rn(t.onPointerUp,I=>{const N=I.target;N.hasPointerCapture(I.pointerId)&&N.releasePointerCapture(I.pointerId),document.body.style.webkitUserSelect=S.current,v.viewport&&(v.viewport.style.scrollBehavior=""),w.current=null})})})},"ScrollAreaScrollbarImpl")),Kh="ScrollAreaThumb",RF=P.forwardRef(de(function(t,r){const{forceMount:n,...a}=t,i=f_(Kh,t.__scopeScrollArea);return u.jsx(Is,{present:n||i.hasThumb,children:u.jsx(DF,{ref:r,...a})})},"ScrollAreaThumb")),DF=P.forwardRef(de(function(t,r){const{__scopeScrollArea:n,style:a,...i}=t,o=Dt(Kh,n),s=f_(Kh,n),{onThumbPositionChange:l}=s,c=Sa(r,s.onThumbChange),f=P.useRef(void 0),d=Vi(()=>{f.current&&(f.current(),f.current=void 0)},100);return P.useEffect(()=>{const h=o.viewport;if(h){const p=de(()=>{if(d(),!f.current){const v=BF(h,l);f.current=v,l()}},"handleScroll");return l(),h.addEventListener("scroll",p),()=>h.removeEventListener("scroll",p)}},[o.viewport,d,l]),u.jsx(Oa.div,{"data-state":s.hasThumb?"visible":"hidden",...i,ref:c,style:{width:"var(--radix-scroll-area-thumb-width)",height:"var(--radix-scroll-area-thumb-height)",...a},onPointerDownCapture:rn(t.onPointerDownCapture,h=>{const v=h.target.getBoundingClientRect(),g=h.clientX-v.left,m=h.clientY-v.top;s.onThumbPointerDown({x:g,y:m})}),onPointerUp:rn(t.onPointerUp,s.onThumbPointerUp)})},"ScrollAreaThumbImpl")),h_="ScrollAreaCorner",$F=P.forwardRef(de(function(t,r){const n=Dt(h_,t.__scopeScrollArea),a=!!(n.scrollbarX&&n.scrollbarY);return n.type!=="scroll"&&a?u.jsx(LF,{...t,ref:r}):null},"ScrollAreaCorner")),LF=P.forwardRef(de(function(t,r){const{__scopeScrollArea:n,...a}=t,i=Dt(h_,n),[o,s]=P.useState(0),[l,c]=P.useState(0),f=!!(o&&l),{onCornerWidthChange:d,onCornerHeight
61Change:h}=i;return pn(i.scrollbarX,()=>{const p=i.scrollbarX?.offsetHeight||0;i.onCornerHeightChange(p),c(p)}),pn(i.scrollbarY,()=>{const p=i.scrollbarY?.offsetWidth||0;i.onCornerWidthChange(p),s(p)}),P.useEffect(()=>()=>{d(0),h(0)},[d,h]),f?u.jsx(Oa.div,{...a,ref:r,style:{width:o,height:l,position:"absolute",right:i.dir==="ltr"?0:void 0,left:i.dir==="rtl"?0:void 0,bottom:0,...t.style}}):null},"ScrollAreaCornerImpl"));function $i(e){return e?parseInt(e,10):0}de($i,"toInt");function om(e,t){const r=e/t;return isNaN(r)?0:r}de(om,"getThumbRatio");function Ki(e){const t=om(e.viewport,e.content),r=e.scrollbar.paddingStart+e.scrollbar.paddingEnd,n=(e.scrollbar.size-r)*t;return Math.max(n,18)}de(Ki,"getThumbSize");function p_(e,t,r,n="ltr"){const a=Ki(r),i=a/2,o=t||i,s=a-o,l=r.scrollbar.paddingStart+o,c=r.scrollbar.size-r.scrollbar.paddingEnd-s,f=r.content-r.viewport,d=n==="ltr"?[0,f]:[f*-1,0];return sm([l,c],d)(e)}de(p_,"getScrollPositionFromPointer");function Vh(e,t,r="ltr"){const n=Ki(t),a=t.scrollbar.paddingStart+t.scrollbar.paddingEnd,i=t.scrollbar.size-a,o=t.content-t.viewport,s=i-n,l=r==="ltr"?[0,o]:[o*-1,0],c=V_(e,l);return sm([0,o],[0,s])(c)}de(Vh,"getThumbOffsetFromScroll");function sm(e,t){return r=>{if(e[0]===e[1]||t[0]===t[1])return t[0];const n=(t[1]-t[0])/(e[1]-e[0]);return t[0]+n*(r-e[0])}}de(sm,"linearScale");function lm(e,t){return e>0&&e<t}de(lm,"isScrollingWithinScrollbarBounds");var BF=de((e,t=()=>{})=>{let r={left:e.scrollLeft,top:e.scrollTop},n=0;return de((function a(){const i={left:e.scrollLeft,top:e.scrollTop},o=r.left!==i.left,s=r.top!==i.top;(o||s)&&t(),r=i,n=window.requestAnimationFrame(a)}),"loop")(),()=>window.cancelAnimationFrame(n)},"addUnlinkedScrollListener");function Vi(e,t){const r=Yr(e),n=P.useRef(0);return P.useEffect(()=>()=>window.clearTimeout(n.current),[]),P.useCallback(()=>{window.clearTimeout(n.current),n.current=window.setTimeout(r,t)},[r,t])}de(Vi,"useDebounceCallback");function pn(e,t){const r=Yr(t);K_(()=>{let n=0;if(e){const a=new ResizeObserver(()=>{cancelAnimationFrame(n),n=window.requestAnimationFrame(r)});return a.observe(e),()=>{window.cancelAnimationFrame(n),a.unobserve(e)}}},[e,r])}de(pn,"useResizeObserver");var m_=jF,qF=TF,FF=$F;const v_=P.forwardRef(({className:e,children:t,...r},n)=>u.jsxs(m_,{ref:n,className:Jh("relative overflow-hidden",e),...r,children:[u.jsx(qF,{className:"h-full w-full rounded-[inherit]",children:t}),u.jsx(g_,{}),u.jsx(FF,{})]}));v_.displayName=m_.displayName;const g_=P.forwardRef(({className:e,orientation:t="vertical",...r},n)=>u.jsx(c_,{ref:n,orientation:t,className:Jh("flex touch-none select-none transition-colors",t==="vertical"&&"h-full w-2.5 border-l border-l-transparent p-[1px]",t==="horizontal"&&"h-2.5 flex-col border-t border-t-transparent p-[1px]",e),...r,children:u.jsx(RF,{className:"relative flex-1 rounded-full bg-border"})}));g_.displayName=c_.displayName;var zF=Object.defineProperty,y_=(e,t)=>zF(e,"name",{value:t,configurable:!0}),hw="horizontal",UF=["horizontal","vertical"],WF=P.forwardRef(y_(function(t,r){const{decorative:n,orientation:a=hw,...i}=t,o=b_(a)?a:hw,l=n?{role:"none"}:{"aria-orientation":o==="vertical"?o:void 0,role:"separator"};return u.jsx(Oa.div,{"data-orientation":o,...l,...i,ref:r})},"Separator"));function b_(e){return UF.includes(e)}y_(b_,"isValidOrientation");var x_=WF;const w_=P.forwardRef(({className:e,orientation:t="horizontal",decorative:r=!0,...n},a)=>u.jsx(x_,{ref:a,decorative:r,orientation:t,className:Jh("shrink-0 bg-border",t==="horizontal"?"h-[1px] w-full":"h-full w-[1px]",e),...n}));w_.displayName=x_.displayName;const S_=[{kind:"improvements",label:"Generate SEO Improvements"},{kind:"rewrite-title",label:"Rewrite Meta Title"},{kind:"rewrite-description",label:"Rewrite Meta Description"},{kind:"faq-schema",label:"Generate FAQ Schema"},{kind:"internal-links",label:"Suggest Internal Links"},{kind:"related-pages",label:"Suggest Related Pages"},{kind:"seo-content",label:"Generate SEO Content"},{kind:"fix-issues",label:"Fix SEO Issues"}],HF=["Which pages need the most SEO work?","What should I optimize this week?","Which keywords should I target next?","Which pages are losing rankings?","Generate a content strategy for this month."];function GF({pages:e}){const t=we(xF),[r,n]=P.useState(28),[a,i]=P.useState(null),[o,s]=P.useState(!1),l=P.useCallback(async()=>{s(!0);try{const c=await t({data:{days:r}});i(c)}catch(c){re.error(c instanceof Error?c.message:"Failed to load SEO summary")}
61finally{s(!1)}},[t,r]);return P.useEffect(()=>{l()},[l]),u.jsxs(vn,{className:"overflow-hidden border-accent-gold/30",children:[u.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-3 border-b border-border bg-gradient-to-r from-accent-gold/10 via-background to-background px-5 py-4",children:[u.jsxs("div",{className:"flex items-center gap-3",children:[u.jsx("div",{className:"flex h-10 w-10 items-center justify-center rounded-lg bg-accent-gold/20 text-accent-gold",children:u.jsx(qw,{className:"h-5 w-5"})}),u.jsxs("div",{children:[u.jsx("h2",{className:"text-base font-semibold text-foreground",children:"AI SEO Assistant"}),u.jsx("p",{className:"text-xs text-muted-foreground",children:"Your executive SEO consultant — analysis, recommendations & strategy."})]})]}),u.jsxs("div",{className:"flex items-center gap-2",children:[u.jsxs(Ft,{value:String(r),onValueChange:c=>n(Number(c)),children:[u.jsx(zt,{className:"h-9 w-[130px]",children:u.jsx(Ut,{})}),u.jsxs(Wt,{children:[u.jsx(De,{value:"7",children:"Last 7 days"}),u.jsx(De,{value:"28",children:"Last 28 days"}),u.jsx(De,{value:"90",children:"Last 90 days"}),u.jsx(De,{value:"180",children:"Last 180 days"})]})]}),u.jsx(te,{variant:"outline",size:"sm",onClick:l,disabled:o,children:o?u.jsx(be,{className:"h-4 w-4 animate-spin"}):u.jsx(It,{className:"h-4 w-4"})})]})]}),u.jsxs(Qh,{defaultValue:"overview",className:"w-full",children:[u.jsx("div",{className:"border-b border-border px-3 pt-3",children:u.jsxs(ep,{className:"flex w-full flex-wrap justify-start gap-1 bg-transparent p-0",children:[u.jsx(Ha,{value:"overview",icon:u.jsx(Po,{className:"h-4 w-4"}),label:"Overview"}),u.jsx(Ha,{value:"priorities",icon:u.jsx(To,{className:"h-4 w-4"}),label:"Priority Tasks"}),u.jsx(Ha,{value:"audit",icon:u.jsx(cj,{className:"h-4 w-4"}),label:"Page Audit"}),u.jsx(Ha,{value:"assistant",icon:u.jsx(Y_,{className:"h-4 w-4"}),label:"Chat"}),u.jsx(Ha,{value:"progress",icon:u.jsx(Z_,{className:"h-4 w-4"}),label:"Progress"})]})}),u.jsx(Yt,{value:"overview",className:"p-5",children:u.jsx(KF,{summary:a,loading:o})}),u.jsx(Yt,{value:"priorities",className:"p-5",children:u.jsx(VF,{summary:a,loading:o})}),u.jsx(Yt,{value:"audit",className:"p-5",children:u.jsx(XF,{pages:e,onSaved:l})}),u.jsx(Yt,{value:"assistant",className:"p-5",children:u.jsx(QF,{days:r})}),u.jsx(Yt,{value:"progress",className:"p-5",children:u.jsx(e3,{summary:a,loading:o})})]})]})}function Ha({value:e,icon:t,label:r}){return u.jsxs(tp,{value:e,className:"gap-1.5 rounded-md data-[state=active]:bg-accent-gold/15 data-[state=active]:text-accent-gold data-[state=active]:shadow-none",children:[t,u.jsx("span",{className:"text-sm",children:r})]})}function KF({summary:e,loading:t}){if(t&&!e)return u.jsx(dl,{});if(!e)return u.jsx(mn,{text:"No summary yet."});const r=e.clickTrendPct;return u.jsxs("div",{className:"space-y-5",children:[u.jsxs("div",{className:"rounded-lg border border-accent-gold/30 bg-accent-gold/5 p-4",children:[u.jsxs("div",{className:"mb-1 flex items-center gap-2 text-xs font-medium uppercase tracking-wide text-accent-gold",children:[u.jsx(It,{className:"h-3.5 w-3.5"})," Executive Summary"]}),u.jsx("p",{className:"text-sm leading-relaxed text-foreground",children:e.aiExecutiveSummary})]}),u.jsxs("div",{className:"grid grid-cols-2 gap-3 md:grid-cols-3 lg:grid-cols-5",children:[u.jsx(Tt,{label:"SEO Health Score",value:e.overallScore==null?"—":`${e.overallScore}`,accent:Co(e.overallScore)}),u.jsx(Tt,{label:"Pages Optimized",value:`${e.pagesOptimized}`,accent:"text-emerald-600"}),u.jsx(Tt,{label:"Needing Attention",value:`${e.pagesNeedingAttention}`,accent:e.pagesNeedingAttention?"text-amber-600":"text-emerald-600"}),u.jsx(Tt,{label:"Missing Content",value:`${e.pagesMissingContent}`,accent:e.pagesMissingContent?"text-red-600":"text-emerald-600"}),u.jsx(Tt,{label:"Avg Google Position",value:e.avgPosition==null?"—":e.avgPosition.toFixed(1)}),u.jsx(Tt,{label:"Keywords Improving",value:`${e.keywordsImproving}`,accent:"text-emerald-600",icon:u.jsx(Ms,{className:"h-3.5 w-3.5"})}),u.jsx(Tt,{label:"Keywords Losing",value:`${e.keywordsLosing}`,accent:e.keywordsLosing?"text-red-600":"text-muted-foreground",icon:u.jsx(Zn,{className:"h-3.5 w-3.5"})}),u.jsx(Tt,{label:"Organic Click Trend",value:r==null?"—":`${r>0?"+":""}${r}%`,accent:r==null?"text-muted-foreground":r>=0?"text-emerald-600":"text-red-600"})]}),!e.gscConnected&&u.jsx("p",{className:"rounded-md border border-border bg-muted/30 px-3 py-2 text-xs text-muted-foreground",children:"Search Console metrics unavailable — showing on-page intelligence only."}),e.gscConnected&&u.jsxs("div",{className:"grid gap-4 md:grid-cols-2",children:[u.jsx(pw,{title:"Top Performing Pages",icon:u.jsx(vj,{className:"h-4 w-4 text-emerald-500"}),rows:e.topPages.map(n=>({label:n.path,value:`${n.clicks} clicks`}))}),u.jsx(pw,{title:"Lowest Performing Pages",icon:u.jsx(pj,{className:"h-4 w-4 text-red-500"}),rows:e.lowestPages.map(n=>({label:n.path,value:`${(n.ctr*100).toFixed(1)}% CTR`}))})]}),e.gscConnected&&(e.improvingKeywords.length>0||e.losingKeywords.length>0)&&u.jsxs("div",{className:"grid gap-4 md:grid-cols-2",children:[u.jsx(mw,{title:"Keywords Improving",positive:!0,rows:e.improvingKeywords}),u.jsx(mw,{title:"Keywords Losing Position",positive:!1,rows:e.losingKeywords})]})]})}function Tt({label:e,value:t,accent:r,icon:n}){return u.jsxs("div",{className:"rounded-lg border border-border bg-background p-3",children:[u.jsxs("div",{className:"flex items-center gap-1 text-[11px] text-muted-foreground",children:[n,e]}),u.jsx("div",{className:`mt-1 text-xl font-semibold ${r??"text-foreground"}`,children:t})]})}function pw({title:e,icon:t,rows:r}){return u.jsxs("div",{className:"rounded-lg border border-border p-4",children:[u.jsxs("div",{className:"mb-2 flex items-center gap-2 text-sm font-semibold",children:[t,e]}),r.length===0?u.jsx("p",{className:"text-xs text-muted-foreground",children:"No data."}):u.jsx("ul",{className:"space-y-1.5",children:r.map((n,a)=>u.jsxs("li",{className:"flex items-center justify-between gap-2 text-sm",children:[u.jsx("span",{className:"truncate text-muted-foreground",children:n.label}),u.jsx("span",{className:"shrink-0 font-medium text-foreground",children:n.value})]},a))})]})}function mw({title:e,positive:t,rows:r}){return u.jsxs("div",{className:"rounded-lg border border-border p-4",children:[u.jsxs("div",{className:"mb-2 flex items-center gap-2 text-sm font-semibold",children:[t?u.jsx(Ms,{className:"h-4 w-4 text-emerald-500"}):u.jsx(Zn,{className:"h-4 w-4 text-red-500"}),e]}),r.length===0?u.jsx("p",{className:"text-xs text-muted-foreground",children:"No movement detected."}):u.jsx("ul",{className:"space-y-1.5",children:r.slice(0,8).map(n=>u.jsxs("li",{className:"flex items-center justify-between gap-2 text-sm",children:[u.jsx("span",{className:"truncate text-muted-foreground",children:n.keyword}),u.jsxs("span",{className:`shrink-0 font-medium ${t?"text-emerald-600":"text-red-600"}`,children:[t?"↑":"↓"," ",Math.abs(n.delta).toFixed(1)," → #",n.position.toFixed(0)]})]},n.keyword))})]})}function VF({summary:e,loading:t}){if(t&&!e)return u.jsx(dl,{});if(!e)return u.jsx(mn,{text:"No priorities yet."});if(e.priorities.length===0)return u.jsx(mn,{text:"🎉 No outstanding SEO tasks — everything looks healthy."});const r=[{key:"high",label:"High Priority",color:"text-red-600"},{key:"medium",label:"Medium Priority",color:"text-amber-600"},{key:"low",label:"Low Priority",color:"text-muted-foreground"}];return u.jsxs("div",{className:"space-y-5",children:[u.jsx("p",{className:"text-sm text-muted-foreground",children:"Automatically ranked by impact. Use the Page Audit tab to generate and apply fixes."}),r.map(n=>{const a=e.priorities.filter(i=>i.priority===n.key);return a.length===0?null:u.jsxs("div",{children:[u.jsxs("h4",{className:`mb-2 text-sm font-semibold ${n.color}
61`,children:[n.label," ",u.jsxs("span",{className:"text-muted-foreground",children:["(",a.length,")"]})]}),u.jsx("ul",{className:"space-y-2",children:a.map((i,o)=>u.jsxs("li",{className:"flex items-start gap-3 rounded-lg border border-border p-3",children:[u.jsx("span",{className:`mt-1.5 h-2 w-2 shrink-0 rounded-full ${n.key==="high"?"bg-red-500":n.key==="medium"?"bg-amber-500":"bg-muted-foreground"}`}),u.jsxs("div",{className:"min-w-0",children:[u.jsx("div",{className:"text-sm font-medium text-foreground",children:i.title}),u.jsx("div",{className:"text-xs text-muted-foreground",children:i.detail})]})]},o))})]},n.key)})]})}function XF({pages:e,onSaved:t}){const r=we(wF),n=we(SF),[a,i]=P.useState(e[0]?.id??""),[o,s]=P.useState(null),[l,c]=P.useState(!1),[f,d]=P.useState(null),[h,p]=P.useState(null),v=P.useMemo(()=>e.find(y=>y.id===a)??null,[e,a]);P.useEffect(()=>{!a&&e[0]&&i(e[0].id)},[e,a]);const g=async()=>{if(a){c(!0),s(null);try{const y=await r({data:{id:a}});s(y)}catch(y){re.error(y instanceof Error?y.message:"Report failed")}finally{c(!1)}}},m=async y=>{if(a){d(y);try{const w=await n({data:{action:y,id:a}});p(w)}catch(w){re.error(w instanceof Error?w.message:"Action failed")}finally{d(null)}}};return e.length===0?u.jsx(mn,{text:"Add pages in the SEO table above to audit them."}):u.jsxs("div",{className:"space-y-4",children:[u.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[u.jsxs(Ft,{value:a,onValueChange:i,children:[u.jsx(zt,{className:"h-9 w-full max-w-sm",children:u.jsx(Ut,{placeholder:"Select a page"})}),u.jsx(Wt,{children:e.map(y=>u.jsx(De,{value:y.id,children:y.label||y.path},y.id))})]}),u.jsxs(te,{onClick:g,disabled:l||!a,className:"bg-accent-gold text-accent-gold-foreground hover:bg-accent-gold/90",children:[l?u.jsx(be,{className:"mr-2 h-4 w-4 animate-spin"}):u.jsx(It,{className:"mr-2 h-4 w-4"}),"Analyze Page"]})]}),u.jsx("div",{className:"flex flex-wrap gap-2",children:S_.map(y=>u.jsxs(te,{variant:"outline",size:"sm",onClick:()=>m(y.kind),disabled:f!==null||!a,children:[f===y.kind?u.jsx(be,{className:"mr-1.5 h-3.5 w-3.5 animate-spin"}):u.jsx(It,{className:"mr-1.5 h-3.5 w-3.5"}),y.label]},y.kind))}),l&&u.jsx(dl,{}),o&&v&&u.jsx(YF,{report:o,page:v}),!o&&!l&&u.jsx(mn,{text:"Select a page and run Analyze Page for a full AI report, or use an action above."}),h&&v&&u.jsx(JF,{result:h,page:v,onClose:()=>p(null),onSaved:()=>{p(null),t()}})]})}function YF({report:e,page:t}){return u.jsxs("div",{className:"space-y-4 rounded-lg border border-border p-4",children:[u.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-2",children:[u.jsxs("h3",{className:"text-sm font-semibold text-foreground",children:["AI Report — ",t.label||t.path]}),u.jsxs(Le,{className:rp(e.score),children:[e.score,"/100"]})]}),u.jsx("p",{className:"text-sm text-muted-foreground",children:e.assessment}),u.jsxs("div",{className:"grid gap-4 md:grid-cols-2",children:[u.jsx(Bn,{title:"Strengths",tone:"good",items:e.strengths}),u.jsx(Bn,{title:"Weaknesses",tone:"bad",items:e.weaknesses})]}),u.jsxs("div",{className:"grid gap-3 md:grid-cols-2",children:[u.jsx(vw,{label:"Suggested Meta Title",value:e.metaTitleSuggestion}),u.jsx(vw,{label:"Suggested Meta Description",value:e.metaDescriptionSuggestion})]}),e.missingKeywords.length>0&&u.jsx(ZF,{title:"Missing Keywords",items:e.missingKeywords}),u.jsxs("div",{className:"grid gap-3 md:grid-cols-2",children:[u.jsx(So,{label:"Keyword Stuffing",value:e.keywordStuffing}),u.jsx(So,{label:"Thin Content",value:e.thinContent}),u.jsx(So,{label:"Missing H1/H2",value:e.missingHeadings}),u.jsx(So,{label:"Missing ALT Text",value:e.missingAltText})]}),e.internalLinkOpportunities.length>0&&u.jsx(Bn,{title:"Internal Linking Opportunities",tone:"neutral",items:e.internalLinkOpportunities}),e.externalAuthorityLinks.length>0&&u.jsx(Bn,{title:"External Authority Links",tone:"neutral",items:e.externalAuthorityLinks}),e.faqOpportunities.length>0&&u.jsx(Bn,{title:"FAQ Opportunities",tone:"neutral",items:e.faqOpportunities}),e.localSeoOpportunities.length>0&&u.jsx(Bn,{title:"Local SEO Opportunities",tone:"neutral",items:e.localSeoOpportunities}),u.jsxs("div",{className:"grid gap-3 md:grid-cols-2",children:[u.jsxs("div",{className:"rounded-md border border-border bg-muted/30 p-3",children:[u.jsx("div",{className:"text-xs font-medium text-muted-foreground",children:"Schema Recommendation"}),u.jsx("div",{className:"mt-1 text-sm text-foreground",children:e.schemaRecommendation})]}),u.jsxs("div",{className:"rounded-md border border-border bg-muted/30 p-3",children:[u.jsx("div",{className:"text-xs font-medium text-muted-foreground",children:"Readability"}),u.jsx("div",{className:"mt-1 text-sm text-foreground",children:e.readabilityScore})]})]})]})}function Bn({title:e,tone:t,items:r}){if(r.length===0)return null;const n=t==="good"?"bg-emerald-500":t==="bad"?"bg-red-500":"bg-accent-gold";return u.jsxs("div",{children:[u.jsx("h4",{className:"mb-1.5 text-sm font-semibold",children:e}),u.jsx("ul",{className:"space-y-1",children:r.map((a,i)=>u.jsxs("li",{className:"flex items-start gap-2 text-sm text-muted-foreground",children:[u.jsx("span",{className:`mt-1.5 h-1.5 w-1.5 shrink-0 rounded-full ${n}`}),a]},i))})]})}function vw({label:e,value:t}){return u.jsxs("div",{className:"rounded-md border border-border p-3",children:[u.jsxs("div",{className:"mb-1 flex items-center justify-between",children:[u.jsxs("span",{className:"text-xs font-medium text-muted-foreground",children:[e," (",t.length," chars)"]}),u.jsx(te,{size:"sm",variant:"ghost",className:"h-6 px-1.5",onClick:()=>{navigator.clipboard.writeText(t),re.success("Copied")},children:u.jsx(sn,{className:"h-3.5 w-3.5"})})]}),u.jsx("p",{className:"text-sm text-foreground",children:t})]})}function So({label:e,value:t}){return u.jsxs("div",{className:"rounded-md border border-border p-3",children:[u.jsxs("div",{className:"flex items-center gap-2",children:[t?u.jsx("span",{className:"h-2 w-2 rounded-full bg-amber-500"}):u.jsx(ks,{className:"h-4 w-4 text-emerald-500"}),u.jsx("span",{className:"text-xs font-medium text-muted-foreground",children:e})]}),u.jsx("p",{className:"mt-1 text-sm text-foreground",children:t??"No issues detected."})]})}function ZF({title:e,items:t}){return u.jsxs("div",{children:[u.jsx("h4",{className:"mb-1.5 text-sm font-semibold",children:e}),u.jsx("div",{className:"flex flex-wrap gap-1.5",children:t.map(r=>u.jsx(Le,{variant:"outline",children:r},r))})]})}function JF({result:e,page:t,onClose:r,onSaved:n}){const a=we(Hw),[i,o]=P.useState(!1),[s,l]=P.useState(e.title??""),[c,f]=P.useState(e.metaDescription??""),d=S_.find(v=>v.kind===e.action)?.label??"AI Suggestion",h=async v=>{o(!0);try{await a({data:{id:t.id,path:t.path,label:t.label,title:v.title??t.title,metaDescription:v.metaDescription??t.metaDescription,focusKeyword:t.focusKeyword,secondaryKeywords:t.secondaryKeywords,canonicalUrl:t.canonicalUrl,ogTitle:t.ogTitle,ogDescription:t.ogDescription,ogImage:t.ogImage,twitterCard:t.t
61witterCard,robots:t.robots,schemaType:t.schemaType}}),re.success("Applied and saved"),n()}catch(g){re.error(g instanceof Error?g.message:"Save failed")}finally{o(!1)}},p=v=>{navigator.clipboard.writeText(v),re.success("Copied")};return u.jsx(gn,{open:!0,onOpenChange:v=>!v&&r(),children:u.jsxs(yn,{className:"max-h-[90vh] max-w-2xl overflow-y-auto",children:[u.jsxs(bn,{children:[u.jsxs(xn,{className:"flex items-center gap-2",children:[u.jsx(Ir,{className:"h-4 w-4 text-accent-gold"}),d]}),u.jsxs(wn,{children:["Review the AI suggestion for ",t.label||t.path,". Nothing is saved until you approve it."]})]}),u.jsxs("div",{className:"space-y-4",children:[e.action==="rewrite-title"&&u.jsxs("div",{className:"space-y-2",children:[u.jsxs("div",{className:"text-xs text-muted-foreground",children:["Current: ",t.title||"(none)"]}),u.jsx(Tr,{value:s,onChange:v=>l(v.target.value),rows:2}),u.jsxs("div",{className:"text-right text-xs text-muted-foreground",children:[s.length," chars"]}),u.jsxs(nn,{children:[u.jsx(te,{variant:"outline",onClick:r,children:"Discard"}),u.jsxs(te,{onClick:()=>h({title:s}),disabled:i,className:"bg-accent-gold text-accent-gold-foreground hover:bg-accent-gold/90",children:[i&&u.jsx(be,{className:"mr-2 h-4 w-4 animate-spin"}),"Approve & Save Title"]})]})]}),e.action==="rewrite-description"&&u.jsxs("div",{className:"space-y-2",children:[u.jsxs("div",{className:"text-xs text-muted-foreground",children:["Current: ",t.metaDescription||"(none)"]}),u.jsx(Tr,{value:c,onChange:v=>f(v.target.value),rows:3}),u.jsxs("div",{className:"text-right text-xs text-muted-foreground",children:[c.length," chars"]}),u.jsxs(nn,{children:[u.jsx(te,{variant:"outline",onClick:r,children:"Discard"}),u.jsxs(te,{onClick:()=>h({metaDescription:c}),disabled:i,className:"bg-accent-gold text-accent-gold-foreground hover:bg-accent-gold/90",children:[i&&u.jsx(be,{className:"mr-2 h-4 w-4 animate-spin"}),"Approve & Save Description"]})]})]}),e.items&&e.items.length>0&&u.jsx("ul",{className:"space-y-2",children:e.items.map((v,g)=>u.jsxs("li",{className:"rounded-md border border-border p-3",children:[u.jsx("div",{className:"text-sm font-medium text-foreground",children:v.label}),v.detail&&u.jsx("div",{className:"mt-0.5 text-xs text-muted-foreground",children:v.detail})]},g))}),e.faqSchema&&u.jsxs("div",{className:"space-y-2",children:[u.jsxs("div",{className:"flex items-center justify-between",children:[u.jsx("span",{className:"text-xs font-medium text-muted-foreground",children:"FAQ JSON-LD Schema"}),u.jsxs(te,{size:"sm",variant:"outline",onClick:()=>p(e.faqSchema),children:[u.jsx(sn,{className:"mr-1.5 h-3.5 w-3.5"})," Copy Schema"]})]}),u.jsx(Tr,{readOnly:!0,value:e.faqSchema,rows:12,className:"font-mono text-xs"})]}),e.text&&u.jsxs("div",{className:"space-y-2",children:[u.jsx("div",{className:"flex items-center justify-end",children:u.jsxs(te,{size:"sm",variant:"outline",onClick:()=>p(e.text),children:[u.jsx(sn,{className:"mr-1.5 h-3.5 w-3.5"})," Copy Content"]})}),u.jsx(Tr,{value:e.text,readOnly:!0,rows:16,className:"font-mono text-xs"})]}),e.action!=="rewrite-title"&&e.action!=="rewrite-description"&&u.jsx(nn,{children:u.jsx(te,{variant:"outline",onClick:r,children:"Close"})})]})]})})}function QF({days:e}){const t=we(OF),[r,n]=P.useState([]),[a,i]=P.useState(""),[o,s]=P.useState(!1),l=P.useRef(null),c=P.useRef(null);P.useEffect(()=>{c.current?.focus()},[]),P.useEffect(()=>{l.current?.scrollTo({top:l.current.scrollHeight})},[r,o]);const f=async d=>{const h=d.trim();if(!h||o)return;const p=[...r,{role:"user",content:h}];n(p),i(""),s(!0);try{const{reply:v}=await t({data:{messages:p,days:e}});n([...p,{role:"assistant",content:v}])}catch(v){re.error(v instanceof Error?v.message:"Chat failed"),n([...p,{role:"assistant",content:"Sorry — I hit an error answering that. Please try again."}])}finally{s(!1),c.current?.focus()}};return u.jsxs("div",{className:"flex flex-col gap-3",children:[u.jsx(v_,{className:"h-[380px] rounded-lg border border-border",children:u.jsxs("div",{ref:l,className:"space-y-3 p-4",children:[r.length===0?u.jsxs("div",{className:"space-y-4 py-6 text-center",children:[u.jsx("div",{className:"mx-auto flex h-12 w-12 items-center justify-center rounded-full bg-accent-gold/15 text-accent-gold",children:u.jsx(qw,{className:"h-6 w-6"})}),u.jsx("p",{className:"text-sm text-muted-foreground",children:"Ask me anything about your SEO — I know every managed page and your Search Console data."}),u.jsx("div",{className:"flex flex-wrap justify-center gap-2",children:HF.map(d=>u.jsx("button",{onClick:()=>f(d),className:"rounded-full border border-border px-3 py-1.5 text-xs text-muted-foreground transition hover:border-accent-gold/50 hover:text-foreground",children:d},d))})]}):r.map((d,h)=>u.jsx("div",{className:`flex ${d.role==="user"?"justify-end":"justify-start"}`,children:u.jsx("div",{className:`max-w-[85%] whitespace-pre-wrap rounded-lg px-3 py-2 text-sm ${d.role==="user"?"bg-primary text-primary-foreground":"border border-border bg-muted/40 text-foreground"}`,children:d.content})},h)),o&&u.jsx("div",{className:"flex justify-start",children:u.jsxs("div",{className:"flex items-center gap-2 rounded-lg border border-border bg-muted/40 px-3 py-2 text-sm text-muted-foreground",children:[u.jsx(be,{className:"h-4 w-4 animate-spin"})," Thinking…"]})})]})}),u.jsxs("div",{className:"flex items-end gap-2",children:[u.jsx(Tr,{ref:c,value:a,onChange:d=>i(d.target.value),onKeyDown:d=>
61{d.key==="Enter"&&!d.shiftKey&&(d.preventDefault(),f(a))},placeholder:"Ask about your SEO strategy…",rows:2,className:"resize-none"}),u.jsx(te,{onClick:()=>f(a),disabled:o||!a.trim(),className:"h-auto bg-accent-gold text-accent-gold-foreground hover:bg-accent-gold/90",children:u.jsx(J_,{className:"h-4 w-4"})})]})]})}function e3({summary:e,loading:t}){if(t&&!e)return u.jsx(dl,{});if(!e)return u.jsx(mn,{text:"No progress data yet."});const r=e.progress,n=t3(r,e.pagesOptimized);return r.length===0?u.jsx(mn,{text:"Progress tracking starts now — a snapshot is recorded each time you refresh the assistant. Check back over the coming days to see trends."}):u.jsxs("div",{className:"space-y-5",children:[u.jsxs("div",{className:"grid grid-cols-2 gap-3 md:grid-cols-4",children:[u.jsx(Tt,{label:"Snapshots Recorded",value:`${r.length}`}),u.jsx(Tt,{label:"Pages Optimized (30d)",value:`${n>=0?"+":""}${n}`,accent:n>=0?"text-emerald-600":"text-red-600"}),u.jsx(Tt,{label:"Current Avg Score",value:e.overallScore==null?"—":`${e.overallScore}`,accent:Co(e.overallScore)}),u.jsx(Tt,{label:"Click Trend",value:e.clickTrendPct==null?"—":`${e.clickTrendPct>0?"+":""}${e.clickTrendPct}%`,accent:e.clickTrendPct==null?"text-muted-foreground":e.clickTrendPct>=0?"text-emerald-600":"text-red-600"})]}),u.jsxs("div",{className:"rounded-lg border border-border p-4",children:[u.jsx("h4",{className:"mb-3 text-sm font-semibold",children:"SEO Score History"}),u.jsx(Kd,{width:"100%",height:220,children:u.jsxs(vF,{data:r,margin:{left:-20,right:8,top:4},children:[u.jsx(_s,{strokeDasharray:"3 3",className:"stroke-border"}),u.jsx(hn,{dataKey:"date",tick:{fontSize:11},tickFormatter:gw}),u.jsx(kr,{domain:[0,100],tick:{fontSize:11}}),u.jsx(Et,{}),u.jsx(Gi,{type:"monotone",dataKey:"avgScore",name:"Avg Score",stroke:"hsl(var(--accent-gold, 43 74% 49%))",strokeWidth:2,dot:!1,connectNulls:!0})]})})]}),r.some(a=>a.clicks!=null)&&u.jsxs("div",{className:"rounded-lg border border-border p-4",children:[u.jsx("h4",{className:"mb-3 text-sm font-semibold",children:"Organic Traffic & Clicks Growth"}),u.jsx(Kd,{width:"100%",height:220,children:u.jsxs(n_,{data:r,margin:{left:-10,right:8,top:4},children:[u.jsx("defs",{children:u.jsxs("linearGradient",{id:"clicksGrad",x1:"0",y1:"0",x2:"0",y2:"1",children:[u.jsx("stop",{offset:"5%",stopColor:"#3b82f6",stopOpacity:.4}),u.jsx("stop",{offset:"95%",stopColor:"#3b82f6",stopOpacity:0})]})}),u.jsx(_s,{strokeDasharray:"3 3",className:"stroke-border"}),u.jsx(hn,{dataKey:"date",tick:{fontSize:11},tickFormatter:gw}),u.jsx(kr,{tick:{fontSize:11}}),u.jsx(Et,{}),u.jsx(rr,{type:"monotone",dataKey:"clicks",name:"Clicks",stroke:"#3b82f6",fill:"url(#clicksGrad)",strokeWidth:2,connectNulls:!0})]})})]})]})}function gw(e){return new Date(e).toLocaleDateString(void 0,{month:"short",day:"numeric"})}function t3(e,t){if(e.length<2)return t;const r=new Date;r.setDate(r.getDate()-30);const n=[...e].reverse().find(a=>new Date(a.date)<=r);return n?t-n.pagesOptimized:t-e[0].pagesOptimized}function dl(){return u.jsxs("div",{className:"flex items-center justify-center py-16 text-muted-foreground",children:[u.jsx(be,{className:"mr-2 h-5 w-5 animate-spin"})," Working…"]})}function mn({text:e}){return u.jsxs("div",{className:"flex flex-col items-center justify-center gap-2 py-12 text-center text-sm text-muted-foreground",children:[u.jsx(w_,{className:"mb-2 w-16"}),e]})}const r3=Pe({method:"POST"}).middleware([Ne]).handler(Te("8abf552e827b4a5d5514eddf1b7d9031cccfe539da23a3906ba5b20de17b68e1")),n3=Pe({method:"POST"}).middleware([Ne]).handler(Te("5b04daa4129d98a605f552245415d427f512abc41c1e75d6a3e3b479d048f0f9")),a3=Pe({method:"POST"}).middleware([Ne]).handler(Te("fcb351a51d9463c4e2a376419b5ee4a65d217db7bfb8756c1a8862f8ccd06176")),i3=Pe({method:"POST"}).middleware([Ne]).handler(Te("86ab939915df3e5bb7edc8c0a2ded0d420b3b5d3b32bfd3ba2cce2f75068760f")),o3=Pe({method:"POST"}).middleware([Ne]).handler(Te("fdb230539d1db19f64dd49ca1f7c261e0edb0c4340e46da9a5b76a6c83000386")),s3=Pe({method:"POST"}).middleware([Ne]).handler(Te("a6db64abf9f22152868fc6066edef36f22a4c78ab0043f9315d2c508caf5a559")),l3=Pe({method:"POST"}).middleware([Ne]).handler(Te("76380be56b21a9b5729d7d75f886e059f31053ac8c1a648e4db95cf0ae020c76")),c3=Pe({method:"POST"}).middleware([Ne]).handler(Te("d7673c0685d850d717a29eac2c86df60bd5b65c6328c97eb5e7405c6d13e825f")),u3=Pe({method:"POST"}).middleware([Ne]).handler(Te("fcb7990c36ec4c54d75c8086219c6d33110c751107f28b9fac02de454431910d")),f3=Pe({method:"POST"}).middleware([Ne]).handler(Te("5d491441df5cf90f113b01cb564fd68a5ddec281eef6eb792da1c893ac9437e5")),d3=Pe({method:"POST"}).middleware([Ne]).handler(Te("7e8c468fef0bab91df18418700ce9603d7a19ae40d7f8f7acdef05cf5345b199")),O_={new:"New",in_progress:"In Progress",completed:"Completed",ignored:"Ignored"},h3={high:"High Priority",medium:"Medium Priority",low:"Low Priority"};function p3(e){return e==="high"?"bg-red-50 text-red-700 border-red-200":e==="medium"?"bg-amber-50 text-amber-700 border-amber-200":"bg-sky-50 text-sky-700 border-sky-200"}function m3(e){switch(e){case"new":return"bg-blue-50 text-blue-700 border-blue-200";case"in_progress":return"bg-amber-50 text-amber-700 border-amber-200";case"completed":return"bg-emerald-50 text-emerald-700 border-emerald-200";case"ignored":return"bg-muted text-muted-foreground"}}function v3(e){return e==="rewrite-title"||e==="rewrite-description"||e==="faq-schema"}const g3=["open","new","in_progress","completed","ignored","all"];function y3(){const[e,t]=P.useState(null),[r,n]=P.useState([]),[a,i]=P.useState(!0),[o,s]=P.useState(!1),[l,c]=P.useState("open"),[f,d]=P.useState("all"),[h,p]=P.useState(null),[v,g]=P.useState(null),[m,y]=P.useState(!1),w=we(r3),S=we(n3),O=we(l3),b=we(u3),x=we(c3),A=we(a3),j=P.useCallback(async()=>{i(!0);try{const[M,R,D]=await Promise.all([O(),S(),b()]);t(M),n(R),g(D)}catch(M){re.error(M instanceof Error?M.message:"Failed to load Autopilot")}finally{i(!1)}},[O,S,b]);P.useEffect(()=>{j()},[j]);const E=async()=>{s(!0);try{const M=await w();re.success(`Scan complete — ${M.pagesScanned} pages, ${M.tasksOpen} open tasks${M.tasksResolved?`, ${M.tasksResolved} auto-resolved`:""}`),await j()}catch(M){re.error(M instanceof Error?M.message:"Scan failed")}finally{s(!1)}},I=async()=>{y(!0);try{const M=await x();g(M);const R=M.emailedTo??[];R.length>0?re.success(`Weekly SEO report generated & emailed to ${R.length} recipient${R.length===1?"":"s"}`):re.success("Weekly SEO report generated",{description:"Add report recipients below to email it automatically."})}catch(M){re.error(M instanceof Error?M.message:"Report failed")}finally{y(!1)}},N=P.useMemo(()=>r.filter(M=>{const R=l==="all"?!0:l==="open"?M.status==="new"||M.status==="in_progress":M.status===l,D=f==="all"?!0:M.priority===f;return R&&D}),[r,l,f]),T=e?.cards;return u.jsxs(vn,{className:"overflow-hidden",children:[u.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-3 border-b border-border bg-gradient-to-r from-accent-gold/10 to-transparent px-5 py-4",children:[u.jsxs("div",{className:"flex items-center gap-2.5",children:[u.jsx("div",{className:"flex h-9 w-9 items-center justify-center rounded-lg bg-accent-gold/20 text-accent-gold",children:u.jsx(Q_,{className:"h-5 w-5"})}),u.jsxs("div",{children:[u.jsx("h2",{className:"text-base font-semibold text-foreground",children:"SEO Autopilot"}),u.jsx("p",{className:"text-xs text-muted-foreground",children:"Automated monitoring, prioritized tasks & AI fixes — reviewed before apply."})]})]}),u.jsxs("div",{className:"flex items-center gap-2",children:[u.jsxs("span",{className:"hidden items-center gap-1 text-xs text-muted-foreground sm:flex",children:[u.jsx(Eo,{className:"h-3.5 w-3.5"}
61),e?.lastScanAt?`Last scan ${new Date(e.lastScanAt).toLocaleString()}`:"Never scanned"]}),u.jsxs(te,{variant:"outline",size:"sm",onClick:j,disabled:a,children:[u.jsx(on,{className:`mr-1.5 h-4 w-4 ${a?"animate-spin":""}`}),"Refresh"]}),u.jsx(te,{size:"sm",onClick:E,disabled:o,className:"bg-accent-gold text-accent-gold-foreground hover:bg-accent-gold/90",children:o?u.jsxs(u.Fragment,{children:[u.jsx(be,{className:"mr-1.5 h-4 w-4 animate-spin"})," Scanning…"]}):u.jsxs(u.Fragment,{children:[u.jsx(bj,{className:"mr-1.5 h-4 w-4"})," Run Scan Now"]})})]})]}),!e?.gscConnected&&u.jsx("div",{className:"border-b border-amber-200 bg-amber-50 px-5 py-2 text-xs text-amber-800",children:"Search Console data isn't available right now — traffic & keyword monitoring will populate once it's connected. On-page scanning still works."}),u.jsxs("div",{className:"grid grid-cols-2 gap-3 p-5 md:grid-cols-3 lg:grid-cols-6",children:[u.jsx(qn,{label:"Open SEO Tasks",value:T?.openTasks??0,icon:u.jsx(To,{className:"h-4 w-4"})}),u.jsx(qn,{label:"High Priority",value:T?.highPriority??0,icon:u.jsx(Rs,{className:"h-4 w-4"}),accent:T?.highPriority?"text-red-600":"text-emerald-600"}),u.jsx(qn,{label:"Pages Losing Traffic",value:T?.pagesLosingTraffic??0,icon:u.jsx(Zn,{className:"h-4 w-4"}),accent:T?.pagesLosingTraffic?"text-amber-600":void 0}),u.jsx(qn,{label:"Keywords Near Page 1",value:T?.keywordsNearPage1??0,icon:u.jsx($w,{className:"h-4 w-4"})}),u.jsx(qn,{label:"Pages Missing Content",value:T?.pagesMissingContent??0,icon:u.jsx(No,{className:"h-4 w-4"}),accent:T?.pagesMissingContent?"text-amber-600":void 0}),u.jsx(qn,{label:"AI Fixes Pending",value:T?.aiFixesPending??0,icon:u.jsx(Fw,{className:"h-4 w-4"}),accent:T?.aiFixesPending?"text-accent-gold":void 0})]}),u.jsxs(Qh,{defaultValue:"tasks",className:"w-full",children:[u.jsx("div",{className:"border-y border-border bg-muted/30 px-5",children:u.jsxs(ep,{className:"flex w-full flex-wrap justify-start gap-1 bg-transparent p-0",children:[u.jsx(Sd,{value:"tasks",icon:u.jsx(To,{className:"h-4 w-4"}),label:"Priority Tasks"}),u.jsx(Sd,{value:"monitoring",icon:u.jsx(Zn,{className:"h-4 w-4"}),label:"Monitoring"}),u.jsx(Sd,{value:"report",icon:u.jsx(No,{className:"h-4 w-4"}),label:"Weekly Report"})]})}),u.jsxs(Yt,{value:"tasks",className:"p-5",children:[u.jsxs("div",{className:"mb-4 flex flex-wrap items-center gap-2",children:[u.jsxs(Ft,{value:l,onValueChange:M=>c(M),children:[u.jsx(zt,{className:"h-9 w-40",children:u.jsx(Ut,{})}),u.jsx(Wt,{children:g3.map(M=>u.jsx(De,{value:M,children:M==="all"?"All statuses":M==="open"?"Open (active)":O_[M]},M))})]}),u.jsxs(Ft,{value:f,onValueChange:M=>d(M),children:[u.jsx(zt,{className:"h-9 w-40",children:u.jsx(Ut,{})}),u.jsxs(Wt,{children:[u.jsx(De,{value:"all",children:"All priorities"}),u.jsx(De,{value:"high",children:"High Priority"}),u.jsx(De,{value:"medium",children:"Medium Priority"}),u.jsx(De,{value:"low",children:"Low Priority"})]})]}),u.jsxs("span",{className:"ml-auto text-xs text-muted-foreground",children:[N.length," task",N.length===1?"":"s"]})]}),a?u.jsxs(Li,{children:[u.jsx(be,{className:"mr-2 h-5 w-5 animate-spin"})," Loading tasks…"]}):N.length===0?u.jsx(Li,{children:r.length===0?"No tasks yet — run a scan to generate your prioritized SEO action list.":"No tasks match these filters."}):u.jsx("div",{className:"space-y-3",children:N.map(M=>u.jsx(b3,{task:M,onReview:()=>p(M),onStatus:async R=>{n(D=>D.map(L=>L.id===M.id?{...L,status:R}:L));try{await A({data:{id:M.id,status:R}}),j()}catch(D){re.error(D instanceof Error?D.message:"Update failed")}}},M.id))})]}),u.jsx(Yt,{value:"monitoring",className:"p-5",children:u.jsx(w3,{overview:e,loading:a})}),u.jsx(Yt,{value:"report",className:"p-5",children:u.jsx(O3,{report:v,loading:m,onGenerate:I})})]}),h&&u.jsx(x3,{task:h,onClose:()=>p(null),onChanged:j})]})}function b3({task:e,onReview:t,onStatus:r}){return u.jsx("div",{className:"rounded-lg border border-border bg-background p-4",children:u.jsxs("div",{className:"flex flex-wrap items-start justify-between gap-3",children:[u.jsxs("div",{className:"min-w-0 flex-1",children:[u.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[u.jsx(Le,{variant:"outline",className:p3(e.priority),children:h3[e.priority]}),u.jsx(Le,{variant:"outline",className:m3(e.status),children:O_[e.status]}),u.jsx(Le,{variant:"outline",children:e.category}),e.recommendationStatus==="pending"&&u.jsx(Le,{variant:"outline",className:"bg-accent-gold/15 text-accent-gold border-accent-gold/30",children:"AI fix pending review"}),e.recommendationStatus==="applied"&&u.jsx(Le,{variant:"outline",className:"bg-emerald-50 text-emerald-700 border-emerald-200",children:"Applied"})]}),u.jsx("h4",{className:"mt-2 font-medium text-foreground",children:e.title}),u.jsxs("p",{className:"text-xs text-muted-foreground",children:[e.pageLabel," · ",e.path]}),u.jsxs("div",{className:"mt-2 grid gap-1.5 text-sm sm:grid-cols-2",children:[u.jsx(tn,{label:"Issue",value:e.issue}),u.jsx(tn,{label:"Why it matters",value:e.reason}),u.jsx(tn,{label:"Suggested fix",value:e.suggestedFix}),u.jsx(tn,{label:"Estimated impact",value:e.estimatedImpact})]})]}),u.jsxs("div",{className:"flex shrink-0 flex-col items-end gap-2",children:[u.jsxs(te,{size:"sm",variant:"outline",onClick:t,children:[u.jsx(It,{className:"mr-1.5 h-4 w-4"}),e.recommendation?"Review AI Fix":"Get AI Fix"]}),u.jsxs(Ft,{value:e.status,onValueChange:n=>r(n),children:[u.jsx(zt,{className:"h-8 w-36 text-xs",children:u.jsx(Ut,{})}),u.jsxs(Wt,{children:[u.jsx(De,{value:"new",children:"New"}),u.jsx(De,{value:"in_progress",children:"In Progress"}),u.jsx(De,{value:"completed",children:"Completed"}),u.jsx(De,{value:"ignored",children:"Ignored"})]})]})]})]})})}function tn({label:e,value:t}){return t?u.jsxs("div",{children:[u.jsxs("span",{className:"text-xs font-medium text-muted-foreground",children:[e,": "]}),u.jsx("span",{className:"text-foreground",children:t})]}):null}function x3({task:e,onClose:t,onChanged:r}){const[n,a]=P.useState(e.recommendation),[i,o]=P.useState(e.recommendationStatus),[s,l]=P.useState(null),c=we(i3),f=we(o3),d=we(s3),h=async()=>
61{l("gen");try{const y=await c({data:{id:e.id}});a(y),o("pending"),r()}catch(y){re.error(y instanceof Error?y.message:"Generation failed")}finally{l(null)}},p=async y=>{l(y);try{await f({data:{id:e.id,decision:y}}),o(y),re.success(y==="approved"?"Recommendation approved":"Recommendation ignored"),r()}catch(w){re.error(w instanceof Error?w.message:"Failed")}finally{l(null)}},v=async()=>{l("apply");try{const y=await d({data:{id:e.id}});o("applied"),re.success(y.applied==="manual"?"Marked applied — finish the change manually":y.applied),r(),t()}catch(y){re.error(y instanceof Error?y.message:"Apply failed")}finally{l(null)}},g=y=>{navigator.clipboard.writeText(y),re.success("Copied")},m=v3(n?.action);return u.jsx(gn,{open:!0,onOpenChange:t,children:u.jsxs(yn,{className:"max-h-[85vh] overflow-y-auto sm:max-w-2xl",children:[u.jsxs(bn,{children:[u.jsx(xn,{children:e.title}),u.jsxs(wn,{children:[e.pageLabel," · ",e.path," — review the AI recommendation before applying. No public page changes automatically."]})]}),u.jsxs("div",{className:"space-y-4",children:[u.jsxs("div",{className:"rounded-lg border border-border bg-muted/30 p-3 text-sm",children:[u.jsx(tn,{label:"Issue",value:e.issue}),u.jsx(tn,{label:"Suggested fix",value:e.suggestedFix}),u.jsx(tn,{label:"Estimated impact",value:e.estimatedImpact})]}),n?u.jsxs("div",{className:"space-y-3",children:[u.jsxs("div",{className:"flex items-center justify-between",children:[u.jsx("span",{className:"text-sm font-medium text-foreground",children:"AI Recommendation"}),u.jsx(Le,{variant:"outline",className:"capitalize",children:i})]}),n.title&&u.jsx(Oo,{label:"New meta title",value:n.title,onCopy:()=>g(n.title)}),n.metaDescription&&u.jsx(Oo,{label:"New meta description",value:n.metaDescription,onCopy:()=>g(n.metaDescription)}),n.text&&u.jsx(Oo,{label:"Suggested content",value:n.text,onCopy:()=>g(n.text),pre:!0}),n.items&&n.items.length>0&&u.jsx("div",{className:"rounded-lg border border-border p-3",children:u.jsx("ul",{className:"space-y-2 text-sm",children:n.items.map((y,w)=>u.jsxs("li",{children:[u.jsx("span",{className:"font-medium text-foreground",children:y.label}),y.detail&&u.jsxs("span",{className:"text-muted-foreground",children:[" — ",y.detail]})]},w))})}),n.faqSchema&&u.jsx(Oo,{label:"FAQ schema (JSON-LD)",value:n.faqSchema,onCopy:()=>g(n.faqSchema),pre:!0}),n.note&&u.jsx("p",{className:"rounded-md bg-muted/40 p-2 text-xs text-muted-foreground",children:n.note}),u.jsxs("div",{className:"flex flex-wrap justify-end gap-2 pt-1",children:[u.jsxs(te,{variant:"ghost",size:"sm",onClick:h,disabled:s==="gen",children:[s==="gen"?u.jsx(be,{className:"mr-1.5 h-4 w-4 animate-spin"}):u.jsx(on,{className:"mr-1.5 h-4 w-4"}),"Regenerate"]}),u.jsxs(te,{variant:"outline",size:"sm",onClick:()=>p("ignored"),disabled:s!==null,children:[u.jsx(zw,{className:"mr-1.5 h-4 w-4"})," Ignore"]}),u.jsxs(te,{variant:"outline",size:"sm",onClick:()=>p("approved"),disabled:s!==null||i==="approved"||i==="applied",children:[u.jsx(ks,{className:"mr-1.5 h-4 w-4"})," Approve"]}),u.jsxs(te,{size:"sm",onClick:v,disabled:s!==null||i!=="approved",className:"bg-accent-gold text-accent-gold-foreground hover:bg-accent-gold/90",children:[s==="apply"?u.jsx(be,{className:"mr-1.5 h-4 w-4 animate-spin"}):u.jsx(Fw,{className:"mr-1.5 h-4 w-4"}),m?"Apply":"Mark Applied"]})]}),!m&&u.jsx("p",{className:"text-right text-[11px] text-muted-foreground",children:"This change type is applied manually — “Mark Applied” records it as done."})]}):u.jsxs("div",{className:"rounded-lg border border-dashed border-border p-6 text-center",children:[u.jsx("p",{className:"mb-3 text-sm text-muted-foreground",children:"Generate an AI recommendation for this issue."}),u.jsx(te,{onClick:h,disabled:s==="gen",children:s==="gen"?u.jsxs(u.Fragment,{children:[u.jsx(be,{className:"mr-2 h-4 w-4 animate-spin"})," Generating…"]}):u.jsxs(u.Fragment,{children:[u.jsx(Ir,{className:"mr-2 h-4 w-4"})," Generate AI Recommendation"]})})]})]}),u.jsx(nn,{children:u.jsx(te,{variant:"ghost",onClick:t,children:"Close"})})]})})}function Oo({label:e,value:t,onCopy:r,pre:n}){return u.jsxs("div",{className:"rounded-lg border border-border p-3",children:[u.jsxs("div",{className:"mb-1 flex items-center justify-between",children:[u.jsx("span",{className:"text-xs font-medium text-muted-foreground",children:e}),u.jsx(te,{variant:"ghost",size:"sm",className:"h-6 px-2",onClick:r,children:u.jsx(sn,{className:"h-3.5 w-3.5"})})]}),n?u.jsx("pre",{className:"max-h-64 overflow-auto whitespace-pre-wrap text-xs text-foreground",children:t}):u.jsx("p",{className:"text-sm text-foreground",children:t})]})}function w3({overview:e,loading:t}){return t?u.jsxs(Li,{children:[u.jsx(be,{className:"mr-2 h-5 w-5 animate-spin"})," Loading Search Console data…"]}):e?.gscConnected?u.jsxs("div",{className:"grid gap-5 lg:grid-cols-2",children:[u.jsxs("div",{children:[u.jsxs("h4",{className:"mb-2 flex items-center gap-1.5 text-sm font-semibold text-foreground",children:[u.jsx(Zn,{className:"h-4 w-4 text-amber-600"}
61)," Pages Losing Traffic"]}),e.pagesLosingTraffic.length===0?u.jsx(yw,{text:"No significant traffic drops detected."}):u.jsx("div",{className:"overflow-hidden rounded-lg border border-border",children:u.jsxs("table",{className:"w-full text-sm",children:[u.jsx("thead",{className:"bg-muted/40 text-left text-xs text-muted-foreground",children:u.jsxs("tr",{children:[u.jsx("th",{className:"px-3 py-2",children:"Page"}),u.jsx("th",{className:"px-3 py-2 text-right",children:"Clicks"}),u.jsx("th",{className:"px-3 py-2 text-right",children:"Change"})]})}),u.jsx("tbody",{className:"divide-y divide-border",children:e.pagesLosingTraffic.map(r=>u.jsxs("tr",{children:[u.jsx("td",{className:"max-w-[180px] truncate px-3 py-2 text-foreground",children:r.path}),u.jsxs("td",{className:"px-3 py-2 text-right text-muted-foreground",children:[r.prevClicks,"→",r.clicks]}),u.jsxs("td",{className:"px-3 py-2 text-right font-medium text-red-600",children:[r.deltaPct,"%"]})]},r.path))})]})})]}),u.jsxs("div",{children:[u.jsxs("h4",{className:"mb-2 flex items-center gap-1.5 text-sm font-semibold text-foreground",children:[u.jsx($w,{className:"h-4 w-4 text-sky-600"})," Keywords Near Page 1 (positions 11–30)"]}),e.keywordsNearPage1.length===0?u.jsx(yw,{text:"No page-2 keywords with meaningful volume yet."}):u.jsx("div",{className:"overflow-hidden rounded-lg border border-border",children:u.jsxs("table",{className:"w-full text-sm",children:[u.jsx("thead",{className:"bg-muted/40 text-left text-xs text-muted-foreground",children:u.jsxs("tr",{children:[u.jsx("th",{className:"px-3 py-2",children:"Keyword"}),u.jsx("th",{className:"px-3 py-2 text-right",children:"Pos"}),u.jsx("th",{className:"px-3 py-2 text-right",children:"Impr."})]})}),u.jsx("tbody",{className:"divide-y divide-border",children:e.keywordsNearPage1.map(r=>u.jsxs("tr",{children:[u.jsx("td",{className:"max-w-[180px] truncate px-3 py-2 text-foreground",children:r.keyword}),u.jsx("td",{className:"px-3 py-2 text-right text-muted-foreground",children:r.position.toFixed(1)}),u.jsx("td",{className:"px-3 py-2 text-right text-muted-foreground",children:r.impressions})]},r.keyword))})]})})]})]}):u.jsx(Li,{children:"Search Console isn't available — traffic & keyword monitoring will appear once connected."})}function S3(){const e=we(f3),t=we(d3),[r,n]=P.useState(null),[a,i]=P.useState(""),[o,s]=P.useState(!1);P.useEffect(()=>{let h=!0;return e().then(p=>h&&n(p)).catch(()=>h&&n({recipients:[],lastEmailedAt:null})),()=>{h=!1}},[e]);const l=P.useCallback(async h=>{s(!0);try{const p=await t({data:{recipients:h}});n(p),re.success("Report recipients updated")}catch(p){re.error(p instanceof Error?p.message:"Could not save recipients")}finally{s(!1)}},[t]),c=()=>{const h=a.trim().toLowerCase();if(!h)return;const p=r?.recipients??[];if(p.includes(h)){i("");return}i(""),l([...p,h])},f=h=>{const p=r?.recipients??[];l(p.filter(v=>v!==h))},d=r?.recipients??[];return u.jsxs("div",{className:"mb-4 rounded-lg border border-border bg-muted/20 p-4",children:[u.jsxs("div",{className:"mb-2 flex items-center gap-2",children:[u.jsx(ej,{className:"h-4 w-4 text-muted-foreground"}),u.jsx("span",{className:"text-sm font-medium text-foreground",children:"Email report recipients"}),o&&u.jsx(be,{className:"h-3.5 w-3.5 animate-spin text-muted-foreground"})]}),u.jsxs("p",{className:"mb-3 text-xs text-muted-foreground",children:["Every time a weekly report is generated, it's automatically emailed to these addresses.",r?.lastEmailedAt&&u.jsxs(u.Fragment,{children:[" ","Last sent ",new Date(r.lastEmailedAt).toLocaleString(),"."]})]}),d.length>0?u.jsx("div",{className:"mb-3 flex flex-wrap gap-2",children:d.map(h=>u.jsxs(Le,{variant:"outline",className:"flex items-center gap-1.5 py-1 pl-2.5 pr-1",children:[h,u.jsx("button",{type:"button",onClick:()=>f(h),disabled:o,className:"rounded-full p-0.5 text-muted-foreground transition-colors hover:bg-muted hover:text-foreground","aria-label":`Remove ${h}`,children:u.jsx(tj,{className:"h-3 w-3"})})]},h))}):u.jsxs("p",{className:"mb-3 flex items-center gap-1.5 text-xs text-amber-600",children:[u.jsx(Rs,{className:"h-3.5 w-3.5"}),"No recipients yet — reports won't be emailed until you add one."]}),u.jsxs("div",{className:"flex gap-2",children:[u.jsx(Pt,{type:"email",value:a,onChange:h=>i(h.target.value),onKeyDown:h=>{h.key==="Enter"&&(h.preventDefault(),c())},placeholder:"[email protected]",className:"h-9 max-w-xs",disabled:o}),u.jsxs(te,{size:"sm",variant:"outline",onClick:c,disabled:o||!a.trim(),children:[u.jsx(Uw,{className:"mr-1.5 h-4 w-4"})," Add"]})]})]})}function O3({report:e,loading:t,onGenerate:r}){return u.jsxs("div",{children:[u.jsxs("div",{className:"mb-4 flex items-center justify-between",children:[u.jsxs("div",{children:[u.jsx("h4",{className:"text-sm font-semibold text-foreground",children:"Weekly Executive SEO Report"}),e&&u.jsxs("p",{className:"text-xs text-muted-foreground",children:["Week of ",e.weekStart," · generated ",new Date(e.generatedAt).toLocaleStr
61ing()]})]}),u.jsx(te,{size:"sm",onClick:r,disabled:t,children:t?u.jsxs(u.Fragment,{children:[u.jsx(be,{className:"mr-1.5 h-4 w-4 animate-spin"})," Generating…"]}):u.jsxs(u.Fragment,{children:[u.jsx(No,{className:"mr-1.5 h-4 w-4"})," ",e?"Regenerate":"Generate Report"]})})]}),u.jsx(S3,{}),e?u.jsxs("div",{className:"space-y-4",children:[u.jsx("p",{className:"rounded-lg border border-border bg-muted/30 p-3 text-sm text-foreground",children:e.narrative}),u.jsxs("div",{className:"grid grid-cols-2 gap-3 md:grid-cols-4",children:[u.jsx(_o,{label:"Overall Score",value:e.overallScore==null?"—":`${e.overallScore}`,sub:e.scoreDelta==null?void 0:`${e.scoreDelta>=0?"+":""}${e.scoreDelta} vs last week`}),u.jsx(_o,{label:"Pages Improved",value:`${e.pagesImproved}`}),u.jsx(_o,{label:"Need Attention",value:`${e.pagesNeedingAttention}`}),u.jsx(_o,{label:"Tasks Completed",value:`${e.completedTasks}`})]}),u.jsxs("div",{className:"grid gap-4 lg:grid-cols-2",children:[u.jsx(Ao,{title:"Top Keywords",items:e.topKeywords.map(n=>`${n.keyword} — ${n.clicks} clicks, pos ${n.position.toFixed(1)}`),empty:"No keyword data."}),u.jsx(Ao,{title:"Pages Losing Rankings",items:e.losingKeywords.map(n=>`${n.keyword} — dropped ${n.delta} to pos ${n.position}`),empty:"No ranking losses this week."}),u.jsx(Ao,{title:"New Content Opportunities",items:e.contentOpportunities,empty:"No new opportunities detected."}),u.jsx(Ao,{title:"Recommended Next Steps",items:e.nextSteps,empty:"No open priorities — great work."})]})]}):u.jsx(Li,{children:"Generate a report to see this week's executive SEO summary."})]})}function Ao({title:e,items:t,empty:r}){return u.jsxs("div",{className:"rounded-lg border border-border p-3",children:[u.jsx("h5",{className:"mb-2 text-xs font-semibold uppercase text-muted-foreground",children:e}),t.length===0?u.jsx("p",{className:"text-xs text-muted-foreground",children:r}):u.jsx("ul",{className:"space-y-1.5 text-sm text-foreground",children:t.map((n,a)=>u.jsxs("li",{className:"flex gap-2",children:[u.jsx("span",{className:"text-accent-gold",children:"•"}),u.jsx("span",{children:n})]},a))})]})}function qn({label:e,value:t,icon:r,accent:n}){return u.jsxs(vn,{className:"p-3",children:[u.jsxs("div",{className:"flex items-center gap-1.5 text-xs text-muted-foreground",children:[r,u.jsx("span",{className:"truncate",children:e})]}),u.jsx("div",{className:`mt-1 text-2xl font-semibold ${n??"text-foreground"}`,children:t})]})}function _o({label:e,value:t,sub:r}){return u.jsxs("div",{className:"rounded-lg border border-border p-3",children:[u.jsx("div",{className:"text-xs text-muted-foreground",children:e}),u.jsx("div",{className:"mt-0.5 text-xl font-semibold text-foreground",children:t}),r&&u.jsx("div",{className:"text-[11px] text-muted-foreground",children:r})]})}function Sd({value:e,icon:t,label:r}){return u.jsxs(tp,{value:e,className:"gap-1.5 rounded-none border-b-2 border-transparent bg-transparent px-3 py-2.5 text-sm data-[state=active]:border-accent-gold data-[state=active]:bg-transparent data-[state=active]:text-foreground data-[state=active]:shadow-none",children:[t,r]})}function Li({children:e}){return u.jsx("div",{className:"flex items-center justify-center py-12 text-center text-sm text-muted-foreground",children:e})}function yw({text:e}){return u.jsx("div",{className:"rounded-lg border border-dashed border-border p-4 text-center text-xs text-muted-foreground",children:e})}const A3=Pe({method:"POST"}).middleware([Ne]).handler(Te("28fb91ec54c379f906362accace4d5a1f608c7c1a70d3d3589e6bc55e5a38a8a")),_3=Pe({method:"POST"}).middleware([Ne]).handler(Te("5239d5a9d32ae6fc33f7e41ae5b99cb6905f30f2796cf6fda1ed950e6b999a43")),j3=Pe({method:"POST"}).middleware([Ne]).handler(Te("36afb06842eb998a4a43e993b2b908d64e0a1c7e2d6ce370aaf6db3941992a42")),P3=Pe({method:"POST"}).middleware([Ne]).handler(Te("0c71b8411f050c4583a979f88f82c69145c1279a869b5cafe3c1e9fe45a37637")),T3=Pe({method:"POST"}).middleware([Ne]).handler(Te("d717134f84be712ef102509529f15c3087e2846d51cf03520d9305dda9cb935a")),Xh=90,E3={growing:"Growing",needs_refresh:"Needs Refresh",losing:"Losing Rankings"},N3={growing:"🟢",needs_refresh:"🟡",losing:"🔴"};function C3(e){switch(e){case"growing":return"bg-emerald-50 text-emerald-700 border-emerald-200";case"needs_refresh":return"bg-amber-50 text-amber-700 border-amber-200";case"losing":return"bg-red-50 text-red-700 border-red-200"}}function A_(e){if(!e)return null;const t=new Date(e).getTime();return Number.isNaN(t)?null:Math.max(0,Math.floor((Date.now()-t)/864e5))}function __(e){const t=e.lastRefreshedAt??e.publishedAt,r=A_(t);return r!=null&&r>=Xh}function M3(e){return e==null?"text-muted-foreground":e>=80?"text-emerald-600":e>=60?"text-amber-600":"text-red-600"}function Mr(e){return new Intl.NumberFormat("en-US").format(Math.round(e))}function I3(e){return`${(e*100).toFixed(1)}%`}function cm(e){return e>0?e.toFixed(1):"—"}function bw(e){if(!e)return"—";const t=new Date(e);return Number.isNaN(t.getTime())?"—":t.toLocaleDateString("en-US",{year:"numeric",month:"short",day:"numeric"})}function xw(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function k3(e){if(Array.isArray(e))return e}function R3(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,a,i,o,s=[],l=!0,c=!1;try{if(i=(r=r.call(e)).next,t!==0)for(;!(l=(n=i.call(r)).done)&&(s.push(n.value),s.length!==t);l=!0);}catch(f){c=!0,a=f}
vendor: 6,671 bytes, lines 61-62
61finally{try{if(!l&&r.return!=null&&(o=r.return(),Object(o)!==o))return}finally{if(c)throw a}}return s}}function D3(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
62In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function $3(e,t){return k3(e)||R3(e,t)||L3(e,t)||D3()}function L3(e,t){if(e){if(typeof e=="string")return xw(e,t);var r={}.toString.call(e).slice(8,-1);return r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set"?Array.from(e):r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?xw(e,t):void 0}}const j_=Object.entries,ww=Object.setPrototypeOf,B3=Object.isFrozen,q3=Object.getPrototypeOf,F3=Object.getOwnPropertyDescriptor;let Ge=Object.freeze,Xe=Object.seal,zn=Object.create,P_=typeof Reflect<"u"&&Reflect,Yh=P_.apply,Zh=P_.construct;Ge||(Ge=function(t){return t});Xe||(Xe=function(t){return t});Yh||(Yh=function(t,r){for(var n=arguments.length,a=new Array(n>2?n-2:0),i=2;i<n;i++)a[i-2]=arguments[i];return t.apply(r,a)});Zh||(Zh=function(t){for(var r=arguments.length,n=new Array(r>1?r-1:0),a=1;a<r;a++)n[a-1]=arguments[a];return new t(...n)});const Xr=ze(Array.prototype.forEach),z3=ze(Array.prototype.lastIndexOf),Sw=ze(Array.prototype.pop),Ga=ze(Array.prototype.push),U3=ze(Array.prototype.splice),Yn=Array.isArray,Ja=ze(String.prototype.toLowerCase),Od=ze(String.prototype.toString),Ow=ze(String.prototype.match),Ka=ze(String.prototype.replace),Aw=ze(String.prototype.indexOf),W3=ze(String.prototype.trim),H3=ze(Number.prototype.toString),G3=ze(Boolean.prototype.toString),_w=typeof BigInt>"u"?null:ze(BigInt.prototype.toString),jw=typeof Symbol>"u"?null:ze(Symbol.prototype.toString),pt=ze(Object.prototype.hasOwnProperty),Va=ze(Object.prototype.toString),nt=ze(RegExp.prototype.test),Wr=K3(TypeError);function ze(e){return function(t){t instanceof RegExp&&(t.lastIndex=0);for(var r=arguments.length,n=new Array(r>1?r-1:0),a=1;a<r;a++)n[a-1]=arguments[a];return Yh(e,t,n)}}function K3(e){return function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return Zh(e,r)}}function me(e,t){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:Ja;if(ww&&ww(e,null),!Yn(t))return e;let n=t.length;for(;n--;){let a=t[n];if(typeof a=="string"){const i=r(a);i!==a&&(B3(t)||(t[n]=i),a=i)}e[a]=!0}return e}function V3(e){for(let t=0;t<e.length;t++)pt(e,t)||(e[t]=null);return e}function bt(e){const t=zn(null);for(const n of j_(e)){var r=$3(n,2);const a=r[0],i=r[1];pt(e,a)&&(Yn(i)?t[a]=V3(i):i&&typeof i=="object"&&i.constructor===Object?t[a]=bt(i):t[a]=i)}return t}function X3(e){switch(typeof e){case"string":return e;case"number":return H3(e);case"boolean":return G3(e);case"bigint":return _w?_w(e):"0";case"symbol":return jw?jw(e):"Symbol()";case"undefined":return Va(e);case"function":case"object":{if(e===null)return Va(e);const t=e,r=jt(t,"toString");if(typeof r=="function"){const n=r(t);return typeof n=="string"?n:Va(n)}return Va(e)}default:return Va(e)}}function jt(e,t){for(;e!==null;){const n=F3(e,t);if(n){if(n.get)return ze(n.get);if(typeof n.value=="function")return ze(n.value)}e=q3(e)}function r(){return null}return r}function Y3(e){try{return nt(e,""),!0}catch{return!1}}const Pw=Ge(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","search","section","select","shadow","slot","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),Ad=Ge(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","enterkeyhint","exportparts","filter","font","g","glyph","glyphref","hkern","image","inputmode","line","lineargradient","marker","mask","metadata","mpath","part","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),_d=Ge(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),Z3=Ge(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),jd=Ge(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),J3=Ge(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),Tw=Ge(["#text"]),Ew=Ge(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","command","commandfor","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","exportparts","face","for","headers","height","hidden","high","href","hreflang","id","inert","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","part","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","
62spellcheck","scope","selected","shape","size","sizes","slot","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns"]),Pd=Ge(["accent-height","accumulate","additive","alignment-baseline","amplitude","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dominant-baseline","dur","edgemode","elevation","end","exponent","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","intercept","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","mask-type","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","pointer-events","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","slope","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","tablevalues","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-orientation","text-rendering","textlength","type","u1","u2","unicode","values","vector-effect","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),Nw=Ge(["accent","accentunder","align","bevelled","close","columnalign","columnlines","columnspacing","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lquote","lspace","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),jo=Ge(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),Q3=Xe(/{{[\w\W]*|^[\w\W]*}}/g),e4=Xe(/<%[\w\W]*|^[\w\W]*%>/g),t4=Xe(/\${[\w\W]*/g),r4=Xe(/^data-[\-\w.\u00B7-\uFFFF]+$/),n4=Xe(/^aria-[\-\w]+$/),Cw=Xe(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),a4=Xe(/^(?:\w+script|data):/i),i4=Xe(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),o4=Xe(/^html$/i),s4=Xe(/^[a-z][.\w]*(-[.\w]+)+$/i),Mw=Xe(/<[/\w!]/g),Iw=Xe(/<[/\w]/g),l4=Xe(/<\/no(script|embed|frames)/i),c4=Xe(/\/>/i),vt={element:1,attribute:2,text:3,cdataSection:4,entityReference:5,entityNode:6,processingInstruction:7,comment:8,document:9,documentType:10,documentFragment:11,notation:12},T_=["style","script","xmp","iframe","noembed","noframes","plaintext","noscript"],u4=Ge(me({},T_)),f4=(function(){const e={};return Xr(T_,t=>{e[t]=Xe(new RegExp("</"+t+"(?=[\\t\\n\\f\\r />])","i"))}),Ge(e)})(),d4=function(){return typeof window>"u"?null:window},h4=function(t,r){if(typeof t!="object"||typeof t.createPolicy!="function")return null;let n=null;
vendor: 4,117 bytes, line 62
62const a="data-tt-policy-suffix";r&&r.hasAttribute(a)&&(n=r.getAttribute(a));const i="dompurify"+(n?"#"+n:"");try{return t.createPolicy(i,{createHTML(o){return o},createScriptURL(o){return o}})}catch{return console.warn("TrustedTypes policy "+i+" could not be created."),null}},kw=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}},Ar=function(t,r,n,a){return pt(t,r)&&Yn(t[r])?me(a.base?bt(a.base):{},t[r],a.transform):n},Td=function(t,r,n){const a=pt(t,r)?t[r]:void 0;return a&&typeof a=="object"?bt(a):n()};function E_(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:d4();const t=W=>E_(W);if(t.version="3.4.15",t.removed=[],!e||!e.document||e.document.nodeType!==vt.document||!e.Element)return t.isSupported=!1,t;let r=e.document;const n=r,a=n.currentScript;e.DocumentFragment;const i=e.HTMLTemplateElement,o=e.Node,s=e.Element,l=e.NodeFilter,c=e.NamedNodeMap;c===void 0&&(e.NamedNodeMap||e.MozNamedAttrMap),e.HTMLFormElement;const f=e.DOMParser,d=e.trustedTypes,h=s.prototype,p=jt(h,"cloneNode"),v=jt(h,"remove"),g=jt(h,"removeAttributeNode"),m=jt(h,"nextSibling"),y=jt(h,"childNodes"),w=jt(h,"parentNode"),S=jt(h,"shadowRoot"),O=jt(h,"attributes"),b=o&&o.prototype?jt(o.prototype,"nodeType"):null,x=o&&o.prototype?jt(o.prototype,"nodeName"):null,A=o&&o.prototype?jt(o.prototype,"ownerDocument"):null,j=function(_){return b?b(_):_.nodeType},E=function(_){return x?x(_):_.nodeName};if(typeof i=="function"){const W=r.createElement("template");W.content&&W.content.ownerDocument&&(r=W.content.ownerDocument)}let I,N="",T,M=!1,R=0;const D=function(){if(R>0)throw Wr('A configured TRUSTED_TYPES_POLICY callback (createHTML or createScriptURL) must not call DOMPurify.sanitize, as that causes infinite recursion. Do not pass a policy whose callbacks wrap DOMPurify as TRUSTED_TYPES_POLICY; see the "DOMPurify and Trusted Types" section of the README.')},L=function(_){D(),R++;try{return I.createHTML(_)}finally{R--}},z=function(_){D(),R++;try{return I.createScriptURL(_)}finally{R--}},$=function(){return M||(T=h4(d,a),M=!0),T},F=r,K=F.implementation,V=F.createNodeIterator,G=F.createDocumentFragment,Q=F.getElementsByTagName,Se=n.importNode;let ae=kw();t.isSupported=typeof j_=="function"&&typeof w=="function"&&K&&K.createHTMLDocument!==void 0;const lt=Q3,ar=e4,tt=t4,X=r4,oe=n4,le=a4,U=i4,Me=s4;let he=Cw,ie=null;const ke=me({},[...Pw,...Ad,..._d,...jd,...Tw]);let ue=null;const St=me({},[...Ew,...Pd,...Nw,...jo]);let Ze=Object.seal(zn(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),Gt=null,Kt=null;const rt=Object.seal(zn(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}}));let Pn=!0,Tn=!0,Ia=!1,um=!0,Sr=!1,qr=!0,Fr=!1,hl=!1,Xi=null,Yi=null,pl=!1,En=!1,Zi=!1,Ji=!1,fm=!0,dm=!1;const hm="user-content-";let ml=!0,vl=!1,Nn={},Cn=null;const pm=me({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","selectedcontent","style","svg","template","thead","title","video","xmp"]);let mm=null;const vm=me({},["audio","video","img","source","image","track"]);let gm=null;const ym=me({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),Qi="http://www.w3.org/1998/Math/MathML",eo="http://www.w3.org/2000/svg",Vt="http://www.w3.org/1999/xhtml";let Mn=Vt,gl=!1,yl=null;const N_=me({},[Qi,eo,Vt],Od),bm=Ge(["mi","mo","mn","ms","mtext"]);let bl=me({},bm);const xm=Ge(["annotation-xml"]);let xl=me({},xm);const C_=me({},["title","style","font","a","script"]);let ka=null;const M_=["application/xhtml+xml","text/html"],I_="text/html";let Be=null,In=null;
vendor: 12,450 bytes, line 62
62const k_=r.createElement("form"),wm=function(_){return _ instanceof RegExp||_ instanceof Function},wl=function(){let _=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(In&&In===_)return;(!_||typeof _!="object")&&(_={}),_=bt(_),ka=M_.indexOf(_.PARSER_MEDIA_TYPE)===-1?I_:_.PARSER_MEDIA_TYPE,Be=ka==="application/xhtml+xml"?Od:Ja,ie=Ar(_,"ALLOWED_TAGS",ke,{transform:Be}),ue=Ar(_,"ALLOWED_ATTR",St,{transform:Be}),yl=Ar(_,"ALLOWED_NAMESPACES",N_,{transform:Od}),gm=Ar(_,"ADD_URI_SAFE_ATTR",ym,{transform:Be,base:ym}),mm=Ar(_,"ADD_DATA_URI_TAGS",vm,{transform:Be,base:vm}),Cn=Ar(_,"FORBID_CONTENTS",pm,{transform:Be}),Gt=Ar(_,"FORBID_TAGS",bt({}),{transform:Be}),Kt=Ar(_,"FORBID_ATTR",bt({}),{transform:Be}),Nn=pt(_,"USE_PROFILES")?_.USE_PROFILES&&typeof _.USE_PROFILES=="object"?bt(_.USE_PROFILES):_.USE_PROFILES:!1,Pn=_.ALLOW_ARIA_ATTR!==!1,Tn=_.ALLOW_DATA_ATTR!==!1,Ia=_.ALLOW_UNKNOWN_PROTOCOLS||!1,um=_.ALLOW_SELF_CLOSE_IN_ATTR!==!1,Sr=_.SAFE_FOR_TEMPLATES||!1,qr=_.SAFE_FOR_XML!==!1,Fr=_.WHOLE_DOCUMENT||!1,En=_.RETURN_DOM||!1,Zi=_.RETURN_DOM_FRAGMENT||!1,Ji=_.RETURN_TRUSTED_TYPE||!1,pl=_.FORCE_BODY||!1,fm=_.SANITIZE_DOM!==!1,dm=_.SANITIZE_NAMED_PROPS||!1,ml=_.KEEP_CONTENT!==!1,vl=_.IN_PLACE||!1,he=Y3(_.ALLOWED_URI_REGEXP)?_.ALLOWED_URI_REGEXP:Cw,Mn=typeof _.NAMESPACE=="string"?_.NAMESPACE:Vt,bl=Td(_,"MATHML_TEXT_INTEGRATION_POINTS",()=>me({},bm)),xl=Td(_,"HTML_INTEGRATION_POINTS",()=>me({},xm));const k=Td(_,"CUSTOM_ELEMENT_HANDLING",()=>zn(null));if(Ze=zn(null),pt(k,"tagNameCheck")&&wm(k.tagNameCheck)&&(Ze.tagNameCheck=k.tagNameCheck),pt(k,"attributeNameCheck")&&wm(k.attributeNameCheck)&&(Ze.attributeNameCheck=k.attributeNameCheck),pt(k,"allowCustomizedBuiltInElements")&&typeof k.allowCustomizedBuiltInElements=="boolean"&&(Ze.allowCustomizedBuiltInElements=k.allowCustomizedBuiltInElements),Xe(Ze),Sr&&(Tn=!1),Zi&&(En=!0),Nn&&(ie=me({},Tw),ue=zn(null),Nn.html===!0&&(me(ie,Pw),me(ue,Ew)),Nn.svg===!0&&(me(ie,Ad),me(ue,Pd),me(ue,jo)),Nn.svgFilters===!0&&(me(ie,_d),me(ue,Pd),me(ue,jo)),Nn.mathMl===!0&&(me(ie,jd),me(ue,Nw),me(ue,jo))),rt.tagCheck=null,rt.attributeCheck=null,pt(_,"ADD_TAGS")&&(typeof _.ADD_TAGS=="function"?rt.tagCheck=_.ADD_TAGS:Yn(_.ADD_TAGS)&&(ie===ke&&(ie=bt(ie)),me(ie,_.ADD_TAGS,Be))),pt(_,"ADD_ATTR")&&(typeof _.ADD_ATTR=="function"?rt.attributeCheck=_.ADD_ATTR:Yn(_.ADD_ATTR)&&(ue===St&&(ue=bt(ue)),me(ue,_.ADD_ATTR,Be))),pt(_,"ADD_FORBID_CONTENTS")&&Yn(_.ADD_FORBID_CONTENTS)&&(Cn===pm&&(Cn=bt(Cn)),me(Cn,_.ADD_FORBID_CONTENTS,Be)),ml&&(ie["#text"]=!0),Fr&&me(ie,["html","head","body"]),ie.table&&(me(ie,["tbody"]),delete Gt.tbody),_.TRUSTED_TYPES_POLICY){if(typeof _.TRUSTED_TYPES_POLICY.createHTML!="function")throw Wr('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof _.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw Wr('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');const q=I;I=_.TRUSTED_TYPES_POLICY;try{N=L("")}catch(Y){throw I=q,Y}}else _.TRUSTED_TYPES_POLICY===null?(I=void 0,N=""):(I===void 0&&(I=$()),I&&typeof N=="string"&&(N=L("")));Ge&&Ge(_),In=_},Sm=me({},[...Ad,..._d,...Z3]),Om=me({},[...jd,...J3]),R_=function(_,k,q){return k.namespaceURI===Vt?_==="svg":k.namespaceURI===Qi?_==="svg"&&(q==="annotation-xml"||bl[q]):!!Sm[_]},D_=function(_,k,q){return k.namespaceURI===Vt?_==="math":k.namespaceURI===eo?_==="math"&&xl[q]:!!Om[_]},$_=function(_,k,q){return k.namespaceURI===eo&&!xl[q]||k.namespaceURI===Qi&&!bl[q]?!1:!Om[_]&&(C_[_]||!Sm[_])},L_=function(_){let k=w(_);(!k||!k.tagName)&&(k={namespaceURI:Mn,tagName:"template"});const q=Ja(_.tagName),Y=Ja(k.tagName);return yl[_.namespaceURI]?_.namespaceURI===eo?R_(q,k,Y):_.namespaceURI===Qi?D_(q,k,Y):_.namespaceURI===Vt?$_(q,k,Y):!!(ka==="application/xhtml+xml"&&yl[_.namespaceURI]):!1},Or=function(_){Ga(t.removed,{element:_});try{w(_).removeChild(_)}catch{if(v(_),!w(_))throw Wr("a node selected for removal could not be detached from its tree and cannot be safely returned; refusing to sanitize in place")}},Am=function(_,k,q){try{g(_,k)}catch{try{_.removeAttribute(q)}catch{}}},to=function(_){ro(_);const k=y(_);if(k){const Y=[];Xr(k,J=>{Ga(Y,J)}),Xr(Y,J=>{try{v(J)}catch{}})}const q=O(_);if(q)for(let Y=q.length-1;Y>=0;--Y){const J=q[Y],ne=J&&J.name;typeof ne=="string"&&Am(_,J,ne)}},zr=function(_,k,q){if(!q)try{q=k.getAttributeNode(_)}catch{q=null}Ga(t.removed,{attribute:q||null,from:k});try{q?g(k,q):k.removeAttribute(_)}catch{try{k.removeAttribute(_)}catch{}}if(_==="is")if(En||Zi)try{Or(k)}catch{}else try{k.setAttribute(_,"")}catch{}},B_=function(_){const k=O(_);if(k)for(let q=k.length-1;q>=0;--q){const Y=k[q],J=Y&&Y.name;typeof J!="string"||ue[Be(J)]||Am(_,Y,J)}},ro=function(_){const k=[_];for(;k.length>0;){const q=k.pop();j(q)===vt.element&&B_(q);const J=y(q);if(J)for(let ne=J.length-1;ne>=0;--ne)k.push(J[ne])}},_m=function(_,k){return qr?_==="patchsrc"?!0:_==="for"&&k!=="label"&&k!=="output":!1},q_=function(_){if(!qr)return;const k=[_];for(;k.length>0;){const q=k.pop(),Y=j(q);if(Y===vt.processingInstruction||Y===vt.comment&&nt(Iw,q.data)){try{v(q)}catch{}continue}if(Y===vt.element){const ne=q,Ae=Be(E(q));try{ne.hasAttribute&&ne.hasAttribute("patchsrc")&&ne.removeAttribute("patchsrc"),ne.hasAttribute&&ne.hasAttribute("for")&&_m("for",Ae)&&ne.removeAttribute("for")}catch{}}const J=y(q);if(J)for(let ne=J.length-1;ne>=0;--ne)k.push(J[ne])}},jm=function(_){let k=null,q=null;if(pl)_="<remove></remove>"+_;else{const ne=Ow(_,/^[\r\n\t ]+/);q=ne&&ne[0]}ka==="application/xhtml+xml"&&Mn===Vt&&(_='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+_+"</body></html>");const Y=I?L(_):_;if(Mn===Vt)try{k=new f().parseFromString(Y,ka)}catch{}if(!k||!k.documentElement){k=K.createDocument(Mn,"template",null);try{k.documentElement.innerHTML=gl?N:Y}catch{}}const J=k.body||k.documentElement;return _&&q&&J.insertBefore(r.createTextNode(q),J.childNodes[0]||null),Mn===Vt?Q.call(k,Fr?"html":"body")[0]:Fr?k.documentElement:J},Pm=function(_){const k=A?A(_):_.ownerDocument;return V.call(k||_,_,l.SHOW_ELEMENT|l.SHOW_COMMENT|l.SHOW_TEXT|l.SHOW_PROCESSING_INSTRUCTION|l.SHOW_CDATA_SECTION,null)},no=function(_){return _=Ka(_,lt," "),_=Ka(_,ar," "),_=Ka(_,tt," "),_},Sl=function(_){var k;_.normalize();const q=A?A(_):_.ownerDocument,Y=V.call(q||_,_,l.SHOW_TEXT|l.SHOW_COMMENT|l.SHOW_CDATA_SECTION|l.SHOW_PROCESSING_INSTRUCTION,null);let J=Y.nextNode();for(;J;)J.data=no(J.data),J=Y.nextNode();const ne=(k=_.querySelectorAll)===null||k===void 0?void 0:k.call(_,"template");ne&&Xr(ne,Ae=>{kn(Ae.content)&&Sl(Ae.content)})},ao=function(_){const k=x?x(_):null;return typeof k!="string"||Be(k)!=="form"?!1:typeof _.nodeName!="string"||typeof _.textContent!="string"||typeof _.removeChild!="function"||_.attributes!==O(_)||typeof _.removeAttribute!="function"||typeof _.removeAttributeNode!="function"||typeof _.getAttributeNode!="function"||typeof _.setAttribute!="function"||typeof _.namespaceURI!="string"||typeof _.insertBefore!="function"||typeof _.hasChildNodes!="function"||_.nodeType!==b(_)||_.childNodes!==y(_)},kn=function(_){if(!b||typeof _!="object"||_===null)return!1;try{return b(_)===vt.documentFragment}catch{return!1}},Ra=function(_){if(!b||typeof _!="object"||_===null)return!1;try{return typeof b(_)=="number"}catch{return!1}};function Xt(W,_,k){W.length!==0&&Xr(W,q=>{q.call(t,_,k,In)})}const F_=function(_,k){return!!(qr&&_.hasChildNodes()&&!Ra(_.firstElementChild)&&nt(Mw,_.textContent)&&nt(Mw,_.innerHTML)||qr&&_.namespaceURI===Vt&&u4[k]&&(Ra(_.firstElementChild)||typeof _.textContent=="string"&&nt(f4[k],_.textContent))||_.nodeType===vt.processingInstruction||qr&&_.nodeType===vt.comment&&nt(Iw,_.data))},io=function(_,k){if(_ instanceof RegExp)return nt(_,k);if(_ instanceof Function){for(var q=arguments.length,Y=new Array(q>2?q-2:0),J=2;J<q;J++)Y[J-2]=arguments[J];return!!_(k,...Y)}return!1},z_=function(_,k,q){if(!Gt[k]&&Mm(k)&&io(Ze.tagNameCheck,k))return!1;if(ml&&!Cn[k]){const Y=w(_),J=y(_);if(J&&Y){const ne=J.length;for(let Ae=ne-1;Ae>=0;--Ae){const Re=_===q?p(J[Ae],!0):J[Ae];Y.insertBefore(Re,m(_))}}}return Or(_),!0},Tm=function(_,k,q,Y){return _.length===0?k:k===q||k===Y?bt(k):k},Em=function(_,k){return _===k||w(_)!==null?!1:(vl&&ro(_),!0)},Nm=function(_,k){if(Xt(ae.beforeSanitizeElements,_,null),Em(_,k))return!0;if(ao(_))return Or(_),!0;const q=Be(E(_));if(ie=Tm(ae.uponSanitizeElement,ie,ke,Xi),Xt(ae.uponSanitizeElement,_,{tagName:q,allowedTags:ie}),Em(_,k))return!0;if(F_(_,q))return Or(_),!0;if(Gt[q]||!(rt.tagCheck instanceof Function&&rt.tagCheck(q))&&!ie[q]){const J=z_(_,q,k);return J===!1&&Xt(ae.afterSanitizeElements,_,null),J}if(j(_)===vt.element&&!L_(_)||(q==="noscript"||q==="noembed"||q==="noframes")&&nt(l4,_.innerHTML))return Or(_),!0;if(Sr&&_.nodeType===vt.text){const J=no(_.textContent);_.textContent!==J&&(Ga(t.removed,{element:_.cloneNode()}),_.textContent=J)}return Xt(ae.afterSanitizeElements,_,null),!1},Cm=function(_,k,q){if(Kt[k]||_m(k,_)||fm&&(k==="id"||k==="name")&&(q in r||q in k_))return!1;const Y=ue[k]||rt.attributeCheck instanceof Function&&rt.attributeCheck(k,_);return Tn&&nt(X,k)||Pn&&nt(oe,k)?!0:Y?gm[k]||nt(he,Ka(q,U,""))||(k==="src"||k==="xlink:href"||k==="href")&&_!=="script"&&Aw(q,"data:")===0&&mm[_]||Ia&&!nt(le,Ka(q,U,""))?!0:!q:Mm(_)&&io(Ze.tagNameCheck,_)&&io(Ze.attributeNameCheck,k,_)||k==="is"&&Ze.allowCustomizedBuiltInElements&&io(Ze.tagNameCheck,q)},U_=me({},["annotation-xml","color-profile","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","missing-glyph"]),Mm=function(_){return!U_[Ja(_)]&&nt(Me,_)},W_=function(_,k,q,Y){if(I&&typeof d=="object"&&typeof d.getAttributeType=="function"&&!q)switch(d.getAttributeType(_,k)){case"TrustedHTML":return L(Y);case"TrustedScriptURL":return z(Y)}return Y},H_=function(_,k,q,Y){try{return q?_.setAttributeNS(q,k,Y):_.setAttribute(k,Y),ao(_)?(Or(_),!1):!0}catch{return zr(k,_),!1}},Im=function(_){Xt(ae.beforeSanitizeAttributes,_,null);const k=_.attributes;if(!k||ao(_))return;ue=Tm(ae.uponSanitizeAttribute,ue,St,Yi);const q={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:ue,forceKeepAttr:void 0};let Y=k.length;const J=Be(_.nodeName);for(;Y--;){const ne=k[Y],Ae=ne.name,Re=ne.namespaceURI,dt=ne.value,ht=Be(Ae),Al=dt;let ct=Ae==="value"?Al:W3(Al),km=!1;if(q.attrName=ht,q.attrValue=ct,q.keepAttr=!0,q.forceKeepAttr=void 0,Xt(ae.uponSanitizeAttribute,_,q),ct=q.attrValue,dm&&(ht==="id"||ht==="name")&&Aw(ct,hm)!==0&&(zr(Ae,_,ne),ct=hm+ct,km=!0),qr&&nt(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i,ct)){zr(Ae,_,ne);continue}if(ht==="attributename"&&Ow(ct,"href")){zr(Ae,_,ne);continue}if(!q.forceKeepAttr){if(!q.keepAttr){zr(Ae,_,ne);continue}if(!um&&nt(c4,ct)){zr(Ae,_,ne);continue}if(Sr&&(ct=no(ct)),!Cm(J,ht,ct)){zr(Ae,_,ne);continue}ct=W_(J,ht,Re,ct),ct!==Al&&H_(_,Ae,Re,ct)&&km&&Sw(t.removed)}}Xt(ae.afterSanitizeAttributes,_,null)},oo=function(_){let k=null;const q=Pm(_);for(Xt(ae.beforeSanitizeShadowDOM,_,null);k=q.nextNode();)if(Xt(ae.uponSanitizeShadowNode,k,null),Nm(k,_),Im(k),kn(k.content)&&oo(k.content),j(k)===vt.element){const Y=S(k);kn(Y)&&(Ol(Y),oo(Y))}Xt(ae.afterSanitizeShadowDOM,_,null)},Ol=function(_){const k=[{node:_,shadow:null}];for(;k.length>0;){const q=k.pop();if(q.shadow){oo(q.shadow);continue}const Y=q.node,ne=j(Y)===vt.element,Ae=y(Y);if(Ae)for(let Re=Ae.length-1;Re>=0;--Re)k.push({node:Ae[Re],shadow:null});if(ne){const Re=x?x(Y):null;if(typeof Re=="string"&&Be(Re)==="template"){const dt=Y.content;kn(dt)&&k.push({node:dt,shadow:null})}}if(ne){const Re=S(Y);kn(Re)&&k.push({node:null,shadow:Re},{node:Re,shadow:null})}}};return t.sanitize=function(W){let _=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},k=null,q=null,Y=null,J=null;if(gl=!W,gl&&(W="<!-->"),typeof W!="string"&&!Ra(W)&&(W=X3(W),typeof W!="string"))throw Wr("dirty is not a string, aborting");if(!t.isSupported)return W;hl?(ie=Xi,ue=Yi):wl(_),(ae.uponSanitizeElement.length>0||ae.uponSanitizeAttribute.length>0)&&(ie=bt(ie)),ae.uponSanitizeAttribute.length>0&&(ue=bt(ue)),t.removed=[];const ne=vl&&typeof W!="string"&&Ra(W);if(ne){q_(W);const dt=E(W);if(typeof dt=="string"){const ht=Be(dt);if(!ie[ht]||Gt[ht])throw to(W),Wr("root node is forbidden and cannot be sanitized in-place")}if(ao(W))throw to(W),Wr("root node is clobbered and cannot be sanitized in-place");try{Ol(W)}catch(ht){throw to(W),ht}}else if(Ra(W))k=jm("<!---->"),q=k.ownerDocument.importNode(W,!0),q.nodeType===vt.element&&q.no
62deName==="BODY"||q.nodeName==="HTML"?k=q:k.appendChild(q),Ol(k);else{if(!En&&!Sr&&!Fr&&W.indexOf("<")===-1)return I&&Ji?L(W):W;if(k=jm(W),!k)return En?null:Ji?N:""}k&&pl&&Or(k.firstChild);const Ae=ne?W:k;try{const dt=Pm(Ae);for(;Y=dt.nextNode();)Nm(Y,Ae),Im(Y),kn(Y.content)&&oo(Y.content)}catch(dt){throw ne&&(to(W),Xr(t.removed,ht=>{ht.element&&ro(ht.element)})),dt}if(ne)return Xr(t.removed,dt=>{dt.element&&ro(dt.element)}),Sr&&Sl(W),W;if(En){if(Sr&&Sl(k),Zi)for(J=G.call(k.ownerDocument);k.firstChild;)J.appendChild(k.firstChild);else J=k;return(ue.shadowroot||ue.shadowrootmode)&&(J=Se.call(n,J,!0)),J}let Re=Fr?k.outerHTML:k.innerHTML;return Fr&&ie["!doctype"]&&k.ownerDocument&&k.ownerDocument.doctype&&k.ownerDocument.doctype.name&&nt(o4,k.ownerDocument.doctype.name)&&(Re="<!DOCTYPE "+k.ownerDocument.doctype.name+`>
63`+Re),Sr&&(Re=no(Re)),I&&Ji?L(Re):Re},t.setConfig=function(){let W=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};wl(W),hl=!0,Xi=ie,Yi=ue},t.clearConfig=function(){In=null,hl=!1,Xi=null,Yi=null,I=T,N=""},t.isValidAttribute=function(W,_,k){In||wl({});const q=Be(W),Y=Be(_);return Cm(q,Y,k)},t.addHook=function(W,_){typeof _=="function"&&pt(ae,W)&&Ga(ae[W],_)},t.removeHook=function(W,_){if(pt(ae,W)){if(_!==void 0){const k=z3(ae[W],_);return k===-1?void 0:U3(ae[W],k,1)[0]}return Sw(ae[W])}},t.removeHooks=function(W){pt(ae,W)&&(ae[W]=[])},t.removeAllHooks=function(){ae=kw()},t}var p4=E_();function m4(e){return p4.sanitize(e??"",{ALLOWED_TAGS:["h2","h3","h4","p","ul","ol","li","a","strong","em","br","blockquote"],ALLOWED_ATTR:["href","title","rel","target"],ALLOW_DATA_ATTR:!1})}function Hr({label:e,value:t,icon:r,accent:n,hint:a}){return u.jsxs("div",{className:"rounded-lg border border-border bg-background p-3",children:[u.jsxs("div",{className:"flex items-center justify-between text-muted-foreground",children:[u.jsx("span",{className:"text-xs font-medium",children:e}),r]}),u.jsx("div",{className:`mt-1 text-2xl font-semibold ${n??"text-foreground"}`,children:t}),a&&u.jsx("p",{className:"mt-0.5 text-[11px] text-muted-foreground",children:a})]})}function Rw({value:e,icon:t,label:r}){return u.jsxs(tp,{value:e,className:"gap-1.5 rounded-none border-b-2 border-transparent bg-transparent px-3 py-2.5 text-sm data-[state=active]:border-accent-gold data-[state=active]:bg-transparent data-[state=active]:text-foreground data-[state=active]:shadow-none",children:[t,r]})}function v4({c:e}){return u.jsxs(Le,{variant:"outline",className:C3(e),children:[N3[e]," ",E3[e]]})}function g4({indexed:e}){return e===!0?u.jsx(Le,{variant:"outline",className:"bg-emerald-50 text-emerald-700 border-emerald-200",children:"Indexed"}):e===!1?u.jsx(Le,{variant:"outline",className:"bg-amber-50 text-amber-700 border-amber-200",children:"Not indexed"}):u.jsx(Le,{variant:"outline",children:"Pending"})}function y4(){const[e,t]=P.useState([]),[r,n]=P.useState(null),[a,i]=P.useState(!1),[o,s]=P.useState(!1),[l,c]=P.useState("all"),[f,d]=P.useState(null),[h,p]=P.useState(null),v=we(_3),g=we(j3),m=we(A3),y=P.useCallback(async()=>{i(!0);try{const[x,A]=await Promise.all([v(),g()]);t(x),n(A)}catch(x){re.error(x instanceof Error?x.message:"Failed to load blog data")}finally{i(!1)}},[v,g]);P.useEffect(()=>{y()},[y]);const w=async()=>{s(!0);try{const x=await m(),A=await g();t(x.articles),n(A),re.success(`Synced ${x.synced} blog article${x.synced===1?"":"s"} from Soro`)}catch(x){re.error(x instanceof Error?x.message:"Sync failed")}finally{s(!1)}},S=P.useMemo(()=>l==="all"?e:e.filter(x=>x.classification===l),[e,l]),O=P.useMemo(()=>e.filter(x=>__(x)),[e]),b=r!=null&&r.impressions===0&&r.clicks===0;return u.jsxs(vn,{className:"overflow-hidden",children:[u.jsxs("div",{className:"flex flex-col gap-3 border-b border-border bg-muted/30 p-5 sm:flex-row sm:items-center sm:justify-between",children:[u.jsxs("div",{className:"flex items-center gap-3",children:[u.jsx("div",{className:"flex h-10 w-10 items-center justify-center rounded-lg bg-accent-gold/15 text-accent-gold",children:u.jsx(rj,{className:"h-5 w-5"})}),u.jsxs("div",{children:[u.jsx("h3",{className:"text-base font-semibold text-foreground",children:"Blog Performance"}),u.jsxs("p",{className:"text-xs text-muted-foreground",children:["Auto-discovers & monitors every article under ",u.jsx("code",{children:"/blog"})," with Search Console + AI optimization."]})]})]}),u.jsxs("div",{className:"flex items-center gap-2",children:[u.jsxs(te,{variant:"outline",size:"sm",onClick:y,disabled:a,children:[u.jsx(on,{className:`mr-1.5 h-4 w-4 ${a?"animate-spin":""}`}),"Refresh"]}),u.jsx(te,{size:"sm",onClick:w,disabled:o,className:"bg-accent-gold text-accent-gold-foreground hover:bg-accent-gold/90",children:o?u.jsxs(u.Fragment,{children:[u.jsx(be,{className:"mr-1.5 h-4 w-4 animate-spin"})," Syncing…"]}):u.jsxs(u.Fragment,{children:[u.jsx(on,{className:"mr-1.5 h-4 w-4"})," Sync Articles"]})})]})]}),b&&u.jsx("div",{className:"border-b border-amber-200 bg-amber-50 px-5 py-2 text-xs text-amber-800",children:"No Search Console traffic recorded yet for blog URLs — clicks, impressions & rankings will populate as the articles get indexed and earn impressions. Discovery, scoring & AI still work."}),u.jsxs("div",{className:"grid grid-cols-2 gap-3 p-5 md:grid-cols-4 lg:grid-cols-7",children:[u.jsx(Hr,{label:"Total Blog Articles",value:r?.totalArticles??
630,icon:u.jsx(No,{className:"h-4 w-4"})}),u.jsx(Hr,{label:"Indexed Articles",value:r?.indexedArticles??0,icon:u.jsx(ks,{className:"h-4 w-4"}),accent:r&&r.indexedArticles<r.totalArticles?"text-amber-600":"text-emerald-600"}),u.jsx(Hr,{label:"Organic Clicks",value:Mr(r?.clicks??0),icon:u.jsx(Ww,{className:"h-4 w-4"})}),u.jsx(Hr,{label:"Organic Impressions",value:Mr(r?.impressions??0),icon:u.jsx(Bw,{className:"h-4 w-4"})}),u.jsx(Hr,{label:"Average Position",value:cm(r?.avgPosition??0),icon:u.jsx(Po,{className:"h-4 w-4"})}),u.jsx(Hr,{label:"Needs Refresh",value:O.length,icon:u.jsx(Eo,{className:"h-4 w-4"}),accent:O.length?"text-amber-600":"text-emerald-600",hint:`${Xh}-day reminder`}),u.jsx(Hr,{label:"Blog Leads",value:Mr(r?.blogLeads??0),icon:u.jsx(nj,{className:"h-4 w-4"})})]}),u.jsxs(Qh,{defaultValue:"articles",className:"w-full",children:[u.jsx("div",{className:"border-y border-border bg-muted/30 px-5",children:u.jsxs(ep,{className:"flex w-full flex-wrap justify-start gap-1 bg-transparent p-0",children:[u.jsx(Rw,{value:"articles",icon:u.jsx(To,{className:"h-4 w-4"}),label:"All Articles"}),u.jsx(Rw,{value:"insights",icon:u.jsx(uj,{className:"h-4 w-4"}),label:"Top & Lowest"})]})}),u.jsxs(Yt,{value:"articles",className:"p-5",children:[u.jsxs("div",{className:"mb-4 flex flex-wrap items-center gap-2",children:[u.jsxs(Ft,{value:l,onValueChange:x=>c(x),children:[u.jsx(zt,{className:"h-9 w-48",children:u.jsx(Ut,{})}),u.jsxs(Wt,{children:[u.jsx(De,{value:"all",children:"All classifications"}),u.jsx(De,{value:"growing",children:"🟢 Growing"}),u.jsx(De,{value:"needs_refresh",children:"🟡 Needs Refresh"}),u.jsx(De,{value:"losing",children:"🔴 Losing Rankings"})]})]}),u.jsxs("span",{className:"text-xs text-muted-foreground",children:[S.length," article",S.length===1?"":"s"]})]}),a&&e.length===0?u.jsxs("div",{className:"flex items-center justify-center py-16 text-muted-foreground",children:[u.jsx(be,{className:"mr-2 h-5 w-5 animate-spin"})," Loading blog articles…"]}):S.length===0?u.jsxs("div",{className:"rounded-lg border border-dashed border-border py-16 text-center text-sm text-muted-foreground",children:["No articles yet. Click ",u.jsx("strong",{children:"Sync Articles"})," to discover everything published under /blog."]}):u.jsx("div",{className:"space-y-3",children:S.map(x=>u.jsx(b4,{article:x,onReview:()=>d(x),onRefresh:()=>p(x)},x.id))})]}),u.jsxs(Yt,{value:"insights",className:"p-5",children:[u.jsxs("div",{className:"grid gap-6 lg:grid-cols-2",children:[u.jsx(Dw,{title:"Top Performing Articles",icon:u.jsx(Ms,{className:"h-4 w-4 text-emerald-600"}),articles:r?.topPerforming??[]}),u.jsx(Dw,{title:"Lowest Performing Articles",icon:u.jsx(Zn,{className:"h-4 w-4 text-amber-600"}),articles:r?.lowestPerforming??[]})]}),O.length>0&&u.jsxs("div",{className:"mt-6 rounded-lg border border-amber-200 bg-amber-50 p-4",children:[u.jsxs("div",{className:"flex items-center gap-2 text-sm font-medium text-amber-800",children:[u.jsx(Eo,{className:"h-4 w-4"})," ",O.length," article",O.length===1?"":"s"," overdue for a ",Xh,"-day refresh"]}),u.jsx("ul",{className:"mt-2 space-y-1 text-xs text-amber-800",children:O.map(x=>u.jsxs("li",{className:"flex items-center justify-between gap-2",children:[u.jsx("span",{className:"truncate",children:x.title}),u.jsxs(te,{size:"sm",variant:"ghost",className:"h-6 px-2 text-xs",onClick:()=>p(x),children:[u.jsx(Ir,{className:"mr-1 h-3 w-3"})," Refresh"]})]},x.id))})]})]})]}),f&&u.jsx(x4,{article:f,onClose:()=>d(null),onSaved:x=>{t(A=>A.map(j=>j.id===f.id?{...j,recommendation:x}:j)),d(A=>A&&{...A,recommendation:x})}}),h&&u.jsx(w4,{article:h,onClose:()=>p(null),onDone:()=>{y()}})]})}function b4({article:e,onReview:t,onRefresh:r}){const n=A_(e.publishedAt),a=__(e);return u.jsx("div",{className:"rounded-lg border border-border bg-background p-4",children:u.jsxs("div",{className:"flex flex-wrap items-start justify-between gap-3",children:[u.jsxs("div",{className:"min-w-0 flex-1",children:[u.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[u.jsx(v4,{c:e.classification}),u.jsx(g4,{indexed:e.indexed}),a&&u.jsxs(Le,{variant:"outline",className:"bg-amber-50 text-amber-700 border-amber-200",children:[u.jsx(Eo,{className:"mr-1 h-3 w-3"})," Refresh due"]}),e.recommendation&&u.jsxs(Le,{variant:"outline",className:"bg-accent-gold/15 text-accent-gold border-accent-gold/30",children:[u.jsx(It,{className:"mr-1 h-3 w-3"})," AI recommendation ready"]})]}),u.jsxs("a",{href:e.url,target:"_blank",rel:"noreferrer",className:"mt-2 inline-flex items-center gap-1 font-medium text-foreground hover:text-accent-gold",children:[e.title,u.jsx(aj,{className:"h-3.5 w-3.5 opacity-60"})]}),u.jsxs("p",{className:"text-xs text-muted-foreground",children:["By ",e.author," · Published ",bw(e.publishedAt),n!=null&&` · ${n} day${n===1?"":"s"} ago`,e.wordCount>0&&` · ${Mr(e.wordCount)} words`]}),u.jsxs("div",{className:"mt-3 grid grid-cols-3 gap-x-6 gap-y-1 text-xs sm:grid-cols-6",children:[u.jsx(Fn,{label:"Clicks",value:Mr(e.clicks)}),u.jsx(Fn,{label:"Impressions",value:Mr(e.impressions)}),u.jsx(Fn,{label:"CTR",value:e.impressions>0?I3(e.ctr):"—"}),u.jsx(Fn,{label:"Avg Position",value:cm(e.position)}),u.jsx(Fn,{label:"SEO Score",value:e.seoScore==null?"—":String(e.seoScore),accent:M3(e.seoScore)}),u.jsx(Fn,{label:"Last Updated",value:bw(e.lastRefreshedAt??e.metricsUpdatedAt)})]})]}),u.jsxs("div",{className:"flex shrink-0 flex-col gap-2",children:[u.jsxs(te,{size:"sm",variant:"outline",onClick:t,children:[u.jsx(It,{className:"mr-1.5 h-4 w-4"})," AI Recommendation"]}),u.jsxs(te,{size:"sm",onClick:r,className:"bg-accent-gold text-accent-gold-foreground hover:bg-accent-gold/90",children:[u.jsx(Ir,{className:"mr-1.5 h-4 w-4"})," Refresh with AI"]})]})]})})}function Fn({label:e,value:t,accent:r}){return u.jsxs("div",{children:[u.jsx("div",{className:"text-[11px] uppercase tracking-wide text-muted-foreground",children:e}),u.jsx("div",{className:`font-medium ${r??"text-foreground"}`,children:t})]})}function Dw({title:e,icon:t,articles:r}){return u.jsxs("div",{className:"rounded-lg border border-border bg-background p-4",children:[u.jsxs("div",{className:"mb-3 flex items-center gap-2 text-sm font-medium text-foreground",children:[t," ",e]}),r.length===0?u.jsx("p",{className:"text-xs text-muted-foreground",children:"No data yet."}):u.jsx("ul",{className:"space-y-2",children:r.map(n=>u.jsxs("li",{className:"flex items-center justify-between gap-3 text-sm",children:[u.jsx("span",{className:"min-w-0 flex-1 truncate",children:n.title}),u.jsxs("span",{className:"shrink-0 text-xs text-muted-foreground",children:[Mr(n.clicks)," clk · ",Mr(n.impressions)," imp · pos ",cm(n.position)]})]},n.id))})]})}function x4({article:e,onClose:t,onSaved:r}){const[n,a]=P.useState(!1),i=we(P3),o=e.recommendation,s=async()=>{a(!0);try{const l=await i({data:{id:e.id}});r(l),re.success("AI recommendation generated")}catch(l){re.error(l instanceof Error?l.message:"Failed to generate recommendation")}finally{a(!1)}};return u.jsx(gn,{open:!0,onOpenChange:l=>!l&&t(),children:u.jsxs(yn,{className:"max-h-[85vh] overflow-y-auto sm:max-w-2xl",children:[u.jsxs(bn,{children:[u.jsxs(xn,{className:"flex items-center gap-2",children:[u.jsx(It,{className:"h-4 w-4 text-accent-gold"})," AI SEO Recommendation"]}),u.jsx(wn,{className:"truncate",children:e.title})]}),o?u.jsxs("div",{className:"space-y-4 text-sm",children:[u.jsx(sr,{label:"Better Title",copy:o.betterTitle,children:u.jsx("p",{children:o.betterTitle})}),u.jsx(sr,{label:"Better Meta Description",copy:o.betterMetaDescription,children:u.jsx("p",{children:o.betterMetaDescription})}),o.faqs.length>0&&u.jsx(sr,{label:"FAQ Additions",children:u.jsx("ul",{className:"space-y-2",children:o.faqs.map((l,c)=>u.jsxs("li",{children:[u.jsxs("p",{className:"font-medium text-foreground",children:["Q: ",l.question]}),u.jsxs("p",{className:"text-muted-foreground",children:["A: ",l.answer]})]},c))})}),o.internalLinks.length>0&&u.jsx(sr,{label:"Internal Links",children:u.jsx("ul",{className:"list-disc space-y-1 pl-5",children:o.internalLinks.map((l,c)=>u.jsxs("li",{children:[u.jsx("span",{className:"text-foreground",children:l.anchor}
63)," →"," ",u.jsx("code",{className:"text-xs",children:l.url})]},c))})}),o.relatedPages.length>0&&u.jsx(sr,{label:"Related Mortgage Pages",children:u.jsx("div",{className:"flex flex-wrap gap-2",children:o.relatedPages.map((l,c)=>u.jsxs(Le,{variant:"outline",children:[l.label," ",u.jsx("code",{className:"ml-1 text-[10px]",children:l.url})]},c))})}),o.contentExpansion.length>0&&u.jsx(sr,{label:"Content Expansion",children:u.jsx("ul",{className:"list-disc space-y-1 pl-5",children:o.contentExpansion.map((l,c)=>u.jsx("li",{children:l},c))})}),o.schemaImprovements.length>0&&u.jsx(sr,{label:"Schema Improvements",children:u.jsx("ul",{className:"list-disc space-y-1 pl-5",children:o.schemaImprovements.map((l,c)=>u.jsx("li",{children:l},c))})})]}):u.jsxs("div",{className:"py-8 text-center",children:[u.jsx("p",{className:"mb-4 text-sm text-muted-foreground",children:"Generate mortgage-compliant SEO recommendations for this article."}),u.jsx(te,{onClick:s,disabled:n,className:"bg-accent-gold text-accent-gold-foreground hover:bg-accent-gold/90",children:n?u.jsxs(u.Fragment,{children:[u.jsx(be,{className:"mr-2 h-4 w-4 animate-spin"})," Analyzing…"]}):u.jsxs(u.Fragment,{children:[u.jsx(Ir,{className:"mr-2 h-4 w-4"})," Generate Recommendation"]})})]}),u.jsxs(nn,{children:[o&&u.jsxs(te,{variant:"outline",onClick:s,disabled:n,children:[n?u.jsx(be,{className:"mr-2 h-4 w-4 animate-spin"}):u.jsx(on,{className:"mr-2 h-4 w-4"}),"Regenerate"]}),u.jsx(te,{variant:"ghost",onClick:t,children:"Close"})]})]})})}function sr({label:e,copy:t,children:r}){return u.jsxs("div",{className:"rounded-lg border border-border p-3",children:[u.jsxs("div",{className:"mb-1 flex items-center justify-between",children:[u.jsx("span",{className:"text-xs font-semibold uppercase tracking-wide text-muted-foreground",children:e}),t&&u.jsxs(te,{size:"sm",variant:"ghost",className:"h-6 px-2 text-xs",onClick:()=>{navigator.clipboard.writeText(t),re.success("Copied")},children:[u.jsx(sn,{className:"mr-1 h-3 w-3"})," Copy"]})]}),r]})}function w4({article:e,onClose:t,onDone:r}){const[n,a]=P.useState(!1),[i,o]=P.useState(e.refreshDraft),s=we(T3),l=async()=>{a(!0);try{const f=await s({data:{id:e.id}});o(f),r(),re.success("Refreshed draft ready — review & publish in Soro")}catch(f){re.error(f instanceof Error?f.message:"Refresh failed")}finally{a(!1)}},c=f=>{navigator.clipboard.writeText(f),re.success("Copied")};return u.jsx(gn,{open:!0,onOpenChange:f=>!f&&t(),children:u.jsxs(yn,{className:"max-h-[85vh] overflow-y-auto sm:max-w-3xl",children:[u.jsxs(bn,{children:[u.jsxs(xn,{className:"flex items-center gap-2",children:[u.jsx(Ir,{className:"h-4 w-4 text-accent-gold"})," Refresh with AI"]}),u.jsx(wn,{className:"truncate",children:e.title})]}),u.jsxs("div",{className:"rounded-md border border-amber-200 bg-amber-50 px-3 py-2 text-xs text-amber-800",children:["This creates an improved, mortgage-compliant draft that preserves the original topic. It does ",u.jsx("strong",{children:"not"})," publish to Soro automatically — copy the result into Soro to go live."]}),i?u.jsxs("div",{className:"space-y-4 text-sm",children:[i.summary&&u.jsxs("div",{className:"rounded-lg border border-border p-3",children:[u.jsx("span",{className:"text-xs font-semibold uppercase tracking-wide text-muted-foreground",children:"What changed"}),u.jsx("p",{className:"mt-1 text-muted-foreground",children:i.summary})]}),u.jsx(sr,{label:"Refreshed Title",copy:i.title,children:u.jsx("p",{children:i.title})}),u.jsx(sr,{label:"Refreshed Meta Description",copy:i.metaDescription,children:u.jsx("p",{children:i.metaDescription})}),u.jsxs("div",{className:"rounded-lg border border-border p-3",children:[u.jsxs("div",{className:"mb-2 flex items-center justify-between",children:[u.jsx("span",{className:"text-xs font-semibold uppercase tracking-wide text-muted-foreground",children:"Refreshed Body (HTML)"}),u.jsxs(te,{size:"sm",variant:"ghost",className:"h-6 px-2 text-xs",onClick:()=>c(i.bodyHtml),children:[u.jsx(sn,{className:"mr-1 h-3 w-3"})," Copy HTML"]})]}),u.jsx("div",{className:"prose prose-sm max-w-none rounded-md bg-muted/40 p-3 text-foreground",dangerouslySetInnerHTML:{__html:m4(i.bodyHtml)}})]})]}):u.jsxs("div",{className:"py-8 text-center",children:[u.jsx("p",{className:"mb-4 text-sm text-muted-foreground",children:"Generate a refreshed version of this article with improved structure, FAQs, internal links, and freshness."}),u.jsx(te,{onClick:l,disabled:n,className:"bg-accent-gold text-accent-gold-foreground hover:bg-accent-gold/90",children:n?u.jsxs(u.Fragment,{children:[u.jsx(be,{className:"mr-2 h-4 w-4 animate-spin"})," Refreshing…"]}):u.jsxs(u.Fragment,{children:[u.jsx(Ir,{className:"mr-2 h-4 w-4"})," Generate Refreshed Draft"]})})]}),u.jsxs(nn,{children:[i&&u.jsxs(te,{variant:"outline",onClick:l,disabled:n,children:[n?u.
63jsx(be,{className:"mr-2 h-4 w-4 animate-spin"}):u.jsx(on,{className:"mr-2 h-4 w-4"}),"Regenerate"]}),u.jsx(te,{variant:"ghost",onClick:t,children:"Close"})]})]})})}const S4=new Set(["admin","super_admin","staff"]);function K4(){const e=ij(),[t,r]=P.useState(!1),[n,a]=P.useState(!1),[i,o]=P.useState([]),[s,l]=P.useState(!0),[c,f]=P.useState(""),[d,h]=P.useState(null),[p,v]=P.useState(!1),[g,m]=P.useState(null),[y,w]=P.useState(null),[S,O]=P.useState(null),[b,x]=P.useState(!1),A=we(xj),j=we(Hw),E=we(wj),I=we(Sj);P.useEffect(()=>{(async()=>{const{data:{session:F}}=await $m.auth.getSession();if(!F){e({to:"/admin/login"});return}const{data:K}=await $m.from("user_roles").select("role").eq("user_id",F.user.id),V=!!K?.some(G=>S4.has(String(G.role)));a(V),r(!0),V||e({to:"/lo/dashboard"})})()},[e]);const N=P.useCallback(async()=>{l(!0);try{const $=await A();o($)}catch($){re.error($ instanceof Error?$.message:"Failed to load SEO pages")}finally{l(!1)}},[A]);P.useEffect(()=>{n&&N()},[n,N]);const T=P.useMemo(()=>{const $=c.trim().toLowerCase();return $?i.filter(F=>F.path.toLowerCase().includes($)||F.label.toLowerCase().includes($)||(F.focusKeyword??"").toLowerCase().includes($)):i},[i,c]),M=P.useMemo(()=>{const $=i.length||1,F=i.filter(V=>V.seoScore!=null),K=F.length?Math.round(F.reduce((V,G)=>V+(G.seoScore??0),0)/F.length):null;return{total:i.length,avgScore:K,missingSeo:i.filter(V=>!Lm(V)).length,missingSchema:i.filter(V=>!V.schemaType||V.schemaType==="WebPage").length,missingAlt:i.filter(V=>(V.analysis?.metrics.imagesMissingAlt??0)>0).length,thin:i.filter(V=>V.analysis?.metrics.thinContent).length,noindex:i.filter(V=>V.robots.includes("noindex")).length,pct:Math.round(i.filter(Lm).length/$*100)}},[i]),R=async()=>{if(d){if(!d.path.startsWith("/")){re.error("Path must start with /");return}v(!0);try{await j({data:{id:d.id,path:d.path.trim(),label:d.label,title:d.title,metaDescription:d.metaDescription,focusKeyword:d.focusKeyword,secondaryKeywords:d.secondaryKeywords,canonicalUrl:d.canonicalUrl,ogTitle:d.ogTitle,ogDescription:d.ogDescription,ogImage:d.ogImage,twitterCard:d.twitterCard,robots:d.robots,schemaType:d.schemaType}}),re.success("SEO settings saved"),h(null),N()}catch($){re.error($ instanceof Error?$.message:"Save failed")}finally{v(!1)}}},D=async $=>{if(confirm(`Delete SEO settings for ${$.path}?`))try{await E({data:{id:$.id}}),re.success("Deleted"),N()}catch(F){re.error(F instanceof Error?F.message:"Delete failed")}},L=async $=>{m($.id);try{const F=await I({data:{id:$.id,path:$.path}});re.success(`Analyzed — score ${F.score}/100`),O({page:$,a:F}),N()}catch(F){re.error(F instanceof Error?F.message:"Analysis failed")}finally{m(null)}},z=async()=>{const $=T.length?T:i;if($.length===0){re.error("No pages to analyze");return}w({done:0,total:$.length});let F=0,K=0;for(let V=0;V<$.length;V++){const G=$[V];try{await I({data:{id:G.id,path:G.path}}),F++}catch{K++}w({done:V+1,total:$.length})}w(null),await N(),K===0?re.success(`Analyzed ${F} page${F===1?"":"s"}`):re.warning(`Analyzed ${F} page${F===1?"":"s"}, ${K} failed`)};return t?n?u.jsxs("div",{className:"flex min-h-screen bg-muted/20",children:[u.jsx(sj,{}),u.jsxs("main",{className:"flex-1 overflow-x-hidden",children:[u.jsxs("header",{className:"flex flex-wrap items-center justify-between gap-3 border-b border-border bg-background px-6 py-4",children:[u.jsxs("div",{children:[u.jsx("h1",{className:"text-lg font-semibold text-foreground",children:"SEO Management"}),u.jsx("p",{className:"text-sm text-muted-foreground",children:"Per-page metadata, schema, AI analysis and content generation."})]}),u.jsxs("div",{className:"flex items-center gap-2",children:[u.jsx(te,{variant:"outline",onClick:z,disabled:y!==null||g!==null,children:y?u.jsxs(u.Fragment,{children:[u.jsx(be,{className:"mr-2 h-4 w-4 animate-spin"}),"Analyzing ",y.done,"/",y.total]}):u.jsxs(u.Fragment,{children:[u.jsx(It,{className:"mr-2 h-4 w-4"})," Analyze All"]})}),u.jsxs(te,{variant:"outline",onClick:()=>x(!0),children:[u.jsx(Ir,{className:"mr-2 h-4 w-4"})," Content Generator"]}),u.jsxs(te,{onClick:()=>h({...jj(),robots:"index, follow"}),className:"bg-accent-gold text-accent-gold-foreground hover:bg-accent-gold/90",children:[u.jsx(Uw,{className:"mr-2 h-4 w-4"})," Add Page"]})]})]}),u.jsxs("div",{className:"space-y-6 p-6",children:[u.jsxs("div",{className:"grid grid-cols-2 gap-3 md:grid-cols-4 lg:grid-cols-7",children:[u.jsx(Gr,{label:"Avg SEO Score",value:M.avgScore==null?"—":`${M.avgScore}`,accent:Co(M.avgScore),icon:u.jsx(Po,{className:"h-4 w-4"})}),u.jsx(Gr,{label:"Managed Pages",value:`${M.total}`}),u.jsx(Gr,{label:"Complete SEO",value:`${M.pct}%`,accent:Co(M.pct)}),u.jsx(Gr,{label:"Missing Core SEO",value:`${M.missingSeo}`,accent:M.missingSeo?"text-amber-600":"text-emerald-600"}),u.jsx(Gr,{label:"Generic Schema",value:`${M.missingSchema}`,accent:M.missingSchema?"text-amber-600":"text-emerald-600"}),u.jsx(Gr,{label:"Missing ALT",value:`${M.missingAlt}`,accent:M.missingAlt?"text-amber-600":"text-emerald-600"}),u.jsx(Gr,{label:"No-Index",value:`${M.noindex}`})]}),u.jsx(bF,{}),u.jsx(GF,{pages:i}),u.jsx(y3,{}),u.jsx(y4,{}),u.jsxs("div",{className:"relative max-w-md",children:[u.jsx(Lw,{className:"absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2 text-muted-foreground"}),u.jsx(Pt,{value:c,onChange:$=>f($.target.value),placeholder:"Search by path, name, or keyword…",className:"pl-9"})]}),u.jsx(vn,{className:"overflow-hidden",children:s?u.jsxs("div",{className:"flex items-center justify-center py-16 text-muted-foreground",children:[u.jsx(be,{className:"mr-2 h-5 w-5 animate-spin"})," Loading…"]}):T.length===0?u.jsx("div",{className:"py-16 text-center text-muted-foreground",children:"No pages found."}):u.jsx("div",{className:"overflow-x-auto",children:u.jsxs("table",{className:"w-full text-sm",children:[u.jsx("thead",{className:"border-b border-border bg-muted/40 text-left text-xs uppercase text-muted-foreground",children:u.jsxs("tr",{children:[u.jsx("th",{className:"px-4 py-3 font-medium",children:"Page"}),u.jsx("th",{className:"px-4 py-3 font-medium",children:"Focus Keyword"}),u.jsx("th",{className:"px-4 py-3 font-medium",children:"Schema"}),u.jsx("th",{className:"px-4 py-3 font-medium",children:"Robots"}),u.jsx("th",{className:"px-4 py-3 font-medium",children:"Score"}),u.jsx("th",{className:"px-4 py-3 text-right font-medium",children:"Actions"})]})}),u.jsx("tbody",{className:"divide-y divide-border",children:T.map($=>u.jsxs("tr",{className:"hover:bg-muted/30",children:[u.jsxs("td",{className:"px-4 py-3",children:[u.jsx("div",{className:"font-medium text-foreground",children:$.label||$.path}),u.jsx("div",{className:"text-xs text-muted-foreground",children:$.path})]}),u.jsx("td",{className:"px-4 py-3 text-muted-foreground",children:$.focusKeyword||u.jsx("span",{className:"text-red-500",children:"—"})}),u.jsx("td",{className:"px-4 py-3",children:u.jsx(Le,{variant:"outline",children:$.schemaType})}),u.jsx("td",{className:"px-4 py-3",children:$.robots.includes("noindex")?u.jsx(Le,{className:"bg-red-50 text-red-700 border-red-200",children:"noindex"}):u.jsx("span",{className:"text-xs text-muted-foreground",children:"index"})}),u.jsx("td",{className:"px-4 py-3",children:$.seoScore==null?u.jsx("span",{className:"text-xs text-muted-foreground",children:"not analyzed"}):u.jsxs(Le,{className:rp($.seoScore),children:[$.seoScore,"/100"]})}),u.jsx("td",{className:"px-4 py-3",children:u.jsxs("div",{className:"flex items-center justify-end gap-1",children:[u.jsx(te,{size:"sm",variant:"ghost",onClick:()=>L($),disabled:g===$.id,title:"AI SEO analysis",children:g===$.id?u.jsx(be,{className:"h-4 w-4 animate-spin"}):u.jsx(It,{className:"h-4 w-4"})}),$.analysis&&u.jsx(te,{size:"sm",variant:"ghost",onClick:()=>O({page:$,a:$.analysis}),title:"View last analysis",children:u.jsx(Po,{className:"h-4 w-4"})}),u.jsx(te,{size:"sm",variant:"ghost",onClick:()=>h({...$}),title:"Edit",children:u.jsx(fj,{className:"h-4 w-4"})}),u.jsx(te,{size:"sm",variant:"ghost",onClick:()=>D($),title:"Delete",children:u.jsx(dj,{className:"h-4 w-4 text-red-500"})})]})})]},$.id))})]})})})]})]}),d&&u.jsx(O4,{draft:d,setDraft:h,onSave:R,saving:p,onClose:()=>h(null)}),S&&u.jsx(A4,{page:S.page,analysis:S.a,onClose:()=>O(null)}),b&&u.jsx(j4,{onClose:()=>x(!1)})]}):null:u.jsxs("div",{className:"flex min-h-screen items-center justify-center bg-muted/30 text-muted-foreground",children:[u.jsx(be,{className:"mr-2 h-5 w-5 animate-spin"})," Checking access…"]})}function Gr({label:e,value:t,accent:r,icon:n}){return u.jsxs(vn,{className:"p-4",children:[u.jsxs("div",{className:"flex items-center gap-1.5 text-xs text-muted-foreground",children:[n,e]}),u.jsx("div",{className:`mt-1 text-2xl font-semibold ${r??"text-foreground"}`,children:t})]})}function O4({draft:e,setDraft:t,onSave:r,saving:n,onClose:a}){const[i,o]=P.useState(!1),s=we(Gw),l=(f,d)=>t({...e,[f]:d}),c=async()=>{const f=e.label||e.path;if(!f){re.error("Add a page name or path first");return}o(!0);try{const h=(await s({data:{kind:"meta",topic:f,focusKeyword:e.focusKeyword??"",secondaryKeywords:e.secondaryKeywords}})).json;t({...e,title:h.title??e.title,metaDescription:h.metaDescription??e.metaDescription,focusKeyword:h.focusKeyword??e.focusKeyword,secondaryKeywords:h.secondaryKeywords??e.secondaryKeywords,ogTitle:h.ogTitle??e.ogTitle,ogDescription:h.ogDescription??e.ogDescription}),re.success("AI metadata applied — review and save")}catch(d){re.error(d instanceof Error?d.message:"Generation failed")}finally{o(!1)}};return u.jsx(gn,{open:!0,onOpenChange:f=>!f&&a(),children:u.jsxs(yn,{className:"max-h-[90vh] max-w-2xl overflow-y-auto",children:[u.jsxs(bn,{children:[u.jsx(xn,{children:e.id?"Edit SEO Settings":"Add Page"}),u.jsx(wn,{children:"Configure metadata and schema for a specific page path."})]}),u.jsxs("div",{className:"space-y-4",children:[u.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[u.jsx(at,{label:"Path (e.g. /fha-loans)",children:u.jsx(Pt,{value:e.path,onChange:f=>l("path",f.target.value),placeholder:"/fha-loans"})}),u.jsx(at,{label:"Page name",children:u.jsx(Pt,{value:e.label,onChange:f=>l("label",f.target.value),placeholder:"FHA Loans"})})]}),u.jsx("div",{className:"flex justify-end",children:u.jsxs(te,{size:"sm",variant:"outline",onClick:c,disabled:i,children:[i?u.jsx(be,{className:"mr-2 h-4 w-4 animate-spin"}):u.jsx(It,{className:"mr-2 h-4 w-4"}),"Generate metadata with AI"]})}),u.jsx(at,{label:`Page Title (${(e.title??"").length} chars)`,children:u.jsx(Pt,{value:e.title??"",onChange:f=>l("title",f.target.value)})}),u.jsx(at,{label:`Meta Description (${(e.metaDescription??"").length} chars)`,children:u.jsx(Tr,{rows:2,value:e.metaDescription??"",onChange:f=>l("metaDescription",f.target.value)})}),u.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[u.jsx(at,{label:"Focus Keyword",children:u.jsx(Pt,{value:e.focu
63sKeyword??"",onChange:f=>l("focusKeyword",f.target.value)})}),u.jsx(at,{label:"Secondary Keywords (comma separated)",children:u.jsx(Pt,{value:e.secondaryKeywords.join(", "),onChange:f=>l("secondaryKeywords",f.target.value.split(",").map(d=>d.trim()).filter(Boolean))})})]}),u.jsx(at,{label:"Canonical URL",children:u.jsx(Pt,{value:e.canonicalUrl??"",onChange:f=>l("canonicalUrl",f.target.value),placeholder:"https://starfinancial.ai/fha-loans"})}),u.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[u.jsx(at,{label:"Open Graph Title",children:u.jsx(Pt,{value:e.ogTitle??"",onChange:f=>l("ogTitle",f.target.value)})}),u.jsx(at,{label:"Open Graph Image URL",children:u.jsx(Pt,{value:e.ogImage??"",onChange:f=>l("ogImage",f.target.value)})})]}),u.jsx(at,{label:"Open Graph Description",children:u.jsx(Tr,{rows:2,value:e.ogDescription??"",onChange:f=>l("ogDescription",f.target.value)})}),u.jsxs("div",{className:"grid grid-cols-3 gap-3",children:[u.jsx(at,{label:"Twitter Card",children:u.jsxs(Ft,{value:e.twitterCard,onValueChange:f=>l("twitterCard",f),children:[u.jsx(zt,{children:u.jsx(Ut,{})}),u.jsx(Wt,{children:Aj.map(f=>u.jsx(De,{value:f,children:f},f))})]})}),u.jsx(at,{label:"Robots",children:u.jsxs(Ft,{value:e.robots,onValueChange:f=>l("robots",f),children:[u.jsx(zt,{children:u.jsx(Ut,{})}),u.jsx(Wt,{children:_j.map(f=>u.jsx(De,{value:f,children:f},f))})]})}),u.jsx(at,{label:"Schema Type",children:u.jsxs(Ft,{value:e.schemaType,onValueChange:f=>l("schemaType",f),children:[u.jsx(zt,{children:u.jsx(Ut,{})}),u.jsx(Wt,{children:Oj.map(f=>u.jsx(De,{value:f,children:f},f))})]})})]})]}),u.jsxs(nn,{children:[u.jsx(te,{variant:"outline",onClick:a,children:"Cancel"}),u.jsxs(te,{onClick:r,disabled:n,className:"bg-accent-gold text-accent-gold-foreground hover:bg-accent-gold/90",children:[n&&u.jsx(be,{className:"mr-2 h-4 w-4 animate-spin"}),"Save"]})]})]})})}function at({label:e,children:t}){return u.jsxs("div",{className:"space-y-1.5",children:[u.jsx(oj,{className:"text-xs text-muted-foreground",children:e}),t]})}function A4({page:e,analysis:t,onClose:r}){const n=t.metrics;return u.jsx(gn,{open:!0,onOpenChange:a=>!a&&r(),children:u.jsxs(yn,{className:"max-h-[90vh] max-w-2xl overflow-y-auto",children:[u.jsxs(bn,{children:[u.jsxs(xn,{className:"flex items-center gap-2",children:["SEO Analysis — ",e.label||e.path,u.jsxs(Le,{className:rp(t.score),children:[t.score,"/100"]})]}),u.jsx(wn,{children:t.summary})]}),u.jsxs("div",{className:"space-y-5",children:[u.jsxs("div",{className:"grid grid-cols-3 gap-2 text-center text-xs",children:[u.jsx(or,{label:"Words",value:n.wordCount,bad:n.thinContent}),u.jsx(or,{label:"Title len",value:n.titleLength}),u.jsx(or,{label:"Desc len",value:n.descriptionLength}),u.jsx(or,{label:"H1",value:n.h1Count,bad:n.h1Count!==1}),u.jsx(or,{label:"H2",value:n.h2Count}),u.jsx(or,{label:"Internal links",value:n.internalLinks,bad:n.internalLinks<3}),u.jsx(or,{label:"Images",value:n.imagesTotal}),u.jsx(or,{label:"Missing ALT",value:n.imagesMissingAlt,bad:n.imagesMissingAlt>0}),u.jsx(or,{label:"Canonical",value:n.hasCanonical?"yes":"no",bad:!n.hasCanonical})]}),u.jsxs("div",{children:[u.jsx("h4",{className:"mb-2 text-sm font-semibold",children:"Checks"}),u.jsx("ul",{className:"space-y-1.5",children:t.issues.map((a,i)=>u.jsxs("li",{className:"flex items-start gap-2 text-sm",children:[a.severity==="good"?u.jsx(ks,{className:"mt-0.5 h-4 w-4 shrink-0 text-emerald-500"}):a.severity==="warning"?u.jsx(Rs,{className:"mt-0.5 h-4 w-4 shrink-0 text-amber-500"}):u.jsx(zw,{className:"mt-0.5 h-4 w-4 shrink-0 text-red-500"}),u.jsxs("span",{className:"text-muted-foreground",children:[u.jsxs("span",{className:"font-medium text-foreground",children:[a.category,":"]})," ",a.message]})]},i))})]}),t.missingKeywords.length>0&&u.jsxs("div",{children:[u.jsx("h4",{className:"mb-2 text-sm font-semibold",children:"Missing / Recommended Keywords"}),u.jsx("div",{className:"flex flex-wrap gap-1.5",children:t.missingKeywords.map(a=>u.jsx(Le,{variant:"outline",children:a},a))})]}),t.recommendations.length>0&&u.jsxs("div",{children:[u.jsx("h4",{className:"mb-2 text-sm font-semibold",children:"AI Recommendations"}),u.jsx("ol",{className:"list-decimal space-y-1 pl-5 text-sm text-muted-foreground",children:t.recommendations.map((a,i)=>u.jsx("li",{children:a},i))})]})]})]})})}function or({label:e,value:t,bad:r}){return u.jsxs("div",{className:`rounded-md border p-2 ${r?"border-amber-200 bg-amber-50":"border-border bg-muted/30"}`,children:[u.jsx("div",{className:`text-base font-semibold ${r?"text-amber-700":"text-foreground"}`,children:t}),u.jsx("div",{className:"text-muted-foreground",children:e})]})}const _4=[{value:"meta",label:"Meta Title & Description"},{value:"blog",label:"Blog Post"},{value:"faq",label:"FAQ Set"},{value:"program-page",label:"Loan Program Page"},{value:"city-page",label:"City Landing Page"}];function j4({onClose:e}){const t=we(Gw),[r,n]=P.useState("blog"),[a,i]=P.useState(""),[o,s]=P.useState(""),[l,c]=P.useState(!1),[f,d]=P.useState(""),h=async()=>
63{if(!a.trim()){re.error("Enter a topic");return}c(!0),d("");try{const p=await t({data:{kind:r,topic:a.trim(),focusKeyword:o.trim(),secondaryKeywords:[]}}),v="text"in p&&p.text?p.text:JSON.stringify(p.json,null,2);d(v)}catch(p){re.error(p instanceof Error?p.message:"Generation failed")}finally{c(!1)}};return u.jsx(gn,{open:!0,onOpenChange:p=>!p&&e(),children:u.jsxs(yn,{className:"max-h-[90vh] max-w-2xl overflow-y-auto",children:[u.jsxs(bn,{children:[u.jsx(xn,{children:"AI Content Generator"}),u.jsx(wn,{children:"Generate SEO-optimized, compliance-aware mortgage content."})]}),u.jsxs("div",{className:"space-y-3",children:[u.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[u.jsx(at,{label:"Content type",children:u.jsxs(Ft,{value:r,onValueChange:p=>n(p),children:[u.jsx(zt,{children:u.jsx(Ut,{})}),u.jsx(Wt,{children:_4.map(p=>u.jsx(De,{value:p.value,children:p.label},p.value))})]})}),u.jsx(at,{label:"Focus keyword (optional)",children:u.jsx(Pt,{value:o,onChange:p=>s(p.target.value),placeholder:"DSCR loans"})})]}),u.jsx(at,{label:"Topic / title",children:u.jsx(Pt,{value:a,onChange:p=>i(p.target.value),placeholder:"How DSCR loans work for investors"})}),u.jsxs(te,{onClick:h,disabled:l,className:"w-full",children:[l?u.jsx(be,{className:"mr-2 h-4 w-4 animate-spin"}):u.jsx(It,{className:"mr-2 h-4 w-4"}),"Generate"]}),f&&u.jsxs("div",{className:"space-y-2",children:[u.jsx("div",{className:"flex justify-end",children:u.jsxs(te,{size:"sm",variant:"outline",onClick:()=>{navigator.clipboard.writeText(f),re.success("Copied")},children:[u.jsx(sn,{className:"mr-2 h-4 w-4"})," Copy"]})}),u.jsx(Tr,{value:f,onChange:p=>d(p.target.value),rows:16,className:"font-mono text-xs"})]})]})]})})}export{K4 as component};

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.