diff --git a/agave b/agave index d79d8828d7a..054b2273ac7 160000 --- a/agave +++ b/agave @@ -1 +1 @@ -Subproject commit d79d8828d7ac7e37b0e39c63af377840f218c962 +Subproject commit 054b2273ac7ae23760dbe814815735dc7f2e81d7 diff --git a/src/app/fdctl/commands/run_agave.c b/src/app/fdctl/commands/run_agave.c index 625079f5d1a..04b31e5edbc 100644 --- a/src/app/fdctl/commands/run_agave.c +++ b/src/app/fdctl/commands/run_agave.c @@ -166,6 +166,7 @@ agave_boot( config_t const * config ) { if( strcmp( "", config->snapshots.incremental_path ) ) ADD( "--incremental-snapshot-archive-path", config->snapshots.incremental_path ); ADDU( "--maximum-snapshots-to-retain", config->snapshots.maximum_full_snapshots_to_retain ); ADDU( "--maximum-incremental-snapshots-to-retain", config->snapshots.maximum_incremental_snapshots_to_retain ); + ADDU( "--maximum-snapshot-download-abort", config->snapshots.maximum_snapshot_download_abort ); ADDU( "--minimal-snapshot-download-speed", config->snapshots.minimum_snapshot_download_speed ); if( config->layout.agave_unified_scheduler_handler_threads ) { diff --git a/src/app/fdctl/config/default.toml b/src/app/fdctl/config/default.toml index a357eae6e50..2c1b6ec8377 100644 --- a/src/app/fdctl/config/default.toml +++ b/src/app/fdctl/config/default.toml @@ -398,6 +398,14 @@ dynamic_port_range = "8900-9000" # client with the `--minimum-snapshot-download-speed` argument. minimum_snapshot_download_speed = 10485760 + # The maximum number of times to abort and retry when encountering a + # slow snapshot download. + # + # The default value is 5 retries. This option is passed to the + # Agave client with the `--maximum-snapshot-download-abort` + # argument. + maximum_snapshot_download_abort = 5 + # Absolute directory path for storing snapshots. If no path is # provided, it defaults to the [ledger.path] option from above. # diff --git a/src/app/shared/fd_config.h b/src/app/shared/fd_config.h index 9e59e44f05b..14691762964 100644 --- a/src/app/shared/fd_config.h +++ b/src/app/shared/fd_config.h @@ -237,6 +237,7 @@ struct fd_config { int incremental_snapshots; uint full_snapshot_interval_slots; uint incremental_snapshot_interval_slots; + uint maximum_snapshot_download_abort; uint minimum_snapshot_download_speed; uint maximum_full_snapshots_to_retain; uint maximum_incremental_snapshots_to_retain; diff --git a/src/app/shared/fd_config_parse.c b/src/app/shared/fd_config_parse.c index ef481cfe1d1..5bc22a1515b 100644 --- a/src/app/shared/fd_config_parse.c +++ b/src/app/shared/fd_config_parse.c @@ -263,6 +263,7 @@ fdctl_pod_to_cfg( config_t * config, CFG_POP ( bool, snapshots.incremental_snapshots ); CFG_POP ( uint, snapshots.full_snapshot_interval_slots ); CFG_POP ( uint, snapshots.incremental_snapshot_interval_slots ); + CFG_POP ( uint, snapshots.maximum_snapshot_download_abort ); CFG_POP ( uint, snapshots.minimum_snapshot_download_speed ); CFG_POP ( uint, snapshots.maximum_full_snapshots_to_retain ); CFG_POP ( uint, snapshots.maximum_incremental_snapshots_to_retain); @@ -501,6 +502,7 @@ fdctl_cfg_validate( config_t * cfg ) { CFG_HAS_NON_ZERO( snapshots.full_snapshot_interval_slots ); CFG_HAS_NON_ZERO( snapshots.incremental_snapshot_interval_slots ); + CFG_HAS_NON_ZERO( snapshots.maximum_snapshot_download_abort ); CFG_HAS_NON_ZERO( snapshots.minimum_snapshot_download_speed ); CFG_HAS_NON_EMPTY( layout.affinity ); diff --git a/src/disco/gui/dist/assets/index-Dm_aFr8M.js b/src/disco/gui/dist/assets/index-BFJcgdxv.js similarity index 98% rename from src/disco/gui/dist/assets/index-Dm_aFr8M.js rename to src/disco/gui/dist/assets/index-BFJcgdxv.js index 694229b5ccf..39c26b853a8 100644 --- a/src/disco/gui/dist/assets/index-Dm_aFr8M.js +++ b/src/disco/gui/dist/assets/index-BFJcgdxv.js @@ -1,4 +1,4 @@ -const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/index-Bwdiu9KE.js","assets/index-Dobne4Xk.css"])))=>i.map(i=>d[i]); +const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/index-DjLLGYQR.js","assets/index-Dobne4Xk.css"])))=>i.map(i=>d[i]); function qie(e,t){for(var n=0;nr[i]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))r(i);new MutationObserver(i=>{for(const o of i)if(o.type==="childList")for(const a of o.addedNodes)a.tagName==="LINK"&&a.rel==="modulepreload"&&r(a)}).observe(document,{childList:!0,subtree:!0});function n(i){const o={};return i.integrity&&(o.integrity=i.integrity),i.referrerPolicy&&(o.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?o.credentials="include":i.crossOrigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function r(i){if(i.ep)return;i.ep=!0;const o=n(i);fetch(i.href,o)}})();var ws=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Et(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var cD={exports:{}},T_={},fD={exports:{}},Tt={};/** * @license React * react.production.min.js @@ -152,13 +152,13 @@ and limitations under the License. m 0,-`+r+` a `+r+","+r+" "+i+" 1 1 0,"+2*r+` a `+r+","+r+" "+i+" 1 1 0,-"+2*r+` - `}function t2e(e){var t=e.counterClockwise,n=e.dashRatio,r=e.pathRadius,i=Math.PI*2*r,o=(1-n)*i;return{strokeDasharray:i+"px "+i+"px",strokeDashoffset:(t?-o:o)+"px"}}var n2e=function(e){X_e(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.getBackgroundPadding=function(){return this.props.background?this.props.backgroundPadding:0},t.prototype.getPathRadius=function(){return gI-this.props.strokeWidth/2-this.getBackgroundPadding()},t.prototype.getPathRatio=function(){var n=this.props,r=n.value,i=n.minValue,o=n.maxValue,a=Math.min(Math.max(r,i),o);return(a-i)/(o-i)},t.prototype.render=function(){var n=this.props,r=n.circleRatio,i=n.className,o=n.classes,a=n.counterClockwise,s=n.styles,u=n.strokeWidth,l=n.text,f=this.getPathRadius(),d=this.getPathRatio();return S.createElement("svg",{className:o.root+" "+i,style:s.root,viewBox:"0 0 "+Q_e+" "+J_e,"data-test-id":"CircularProgressbar"},this.props.background?S.createElement("circle",{className:o.background,style:s.background,cx:T3,cy:P3,r:gI}):null,S.createElement(yI,{className:o.trail,counterClockwise:a,dashRatio:r,pathRadius:f,strokeWidth:u,style:s.trail}),S.createElement(yI,{className:o.path,counterClockwise:a,dashRatio:d*r,pathRadius:f,strokeWidth:u,style:s.path}),l?S.createElement("text",{className:o.text,style:s.text,x:T3,y:P3},l):null)},t.defaultProps={background:!1,backgroundPadding:0,circleRatio:1,classes:{root:"CircularProgressbar",trail:"CircularProgressbar-trail",path:"CircularProgressbar-path",text:"CircularProgressbar-text",background:"CircularProgressbar-background"},counterClockwise:!1,className:"",maxValue:100,minValue:0,strokeWidth:8,styles:{root:{},trail:{},path:{},text:{},background:{}},text:""},t}(S.Component);function r2e(e){var t=e.rotation,n=e.strokeLinecap,r=e.textColor,i=e.textSize,o=e.pathColor,a=e.pathTransition,s=e.pathTransitionDuration,u=e.trailColor,l=e.backgroundColor,f=t==null?void 0:"rotate("+t+"turn)",d=t==null?void 0:"center center";return{root:{},path:c1({stroke:o,strokeLinecap:n,transform:f,transformOrigin:d,transition:a,transitionDuration:s==null?void 0:s+"s"}),trail:c1({stroke:u,strokeLinecap:n,transform:f,transformOrigin:d}),text:c1({fill:r,fontSize:i}),background:c1({fill:l})}}function c1(e){return Object.keys(e).forEach(function(t){e[t]==null&&delete e[t]}),e}function Xv(e,t=3,n){if(!e)return"0";const r=Number(e)/ia;return r<1?r.toFixed(t):Fd(r,n??{useSuffix:!0,significantDigits:4,trailingZeroes:!1,decimalsOnZero:!1})}const[i2e,o2e,a2e,s2e]=function(){const e=Zs({}),t=Ee(0);return[Ee(null,(n,r,i,o)=>{const a=n(t);a&&o(a),r(e,s=>{s[i]=o})}),Ee(null,(n,r,i)=>{r(e,o=>{delete o[i]})}),Ee(null,(n,r,i,o)=>{for(const[a,s]of Object.entries(n(e)))Number(a)!==i&&s(o);r(t,o)}),Ee(null,(n,r)=>{r(e,{}),r(t,0)})]}();function px({slot:e,currentSlot:t}){const n=S.useRef(null),r=Je(i2e),i=Je(o2e),o=Je(a2e);return S.useEffect(()=>(r(e,a=>{var s;(s=n.current)==null||s.scrollTo(a,0)}),()=>i(e)),[i,r,e]),g.jsxs(Oe,{minWidth:"0",children:[g.jsx(u2e,{slot:e,currentSlot:t}),g.jsxs("div",{className:Rt.grid,ref:n,onScroll:a=>{o(e,a.currentTarget.scrollLeft)},children:[g.jsx(he,{className:Rt.headerText,align:"right",children:"Votes"}),g.jsx(he,{className:Rt.headerText,align:"right",children:"Non-votes"}),g.jsx(he,{className:Rt.headerText,align:"right",children:"Fees"}),g.jsx(he,{className:Rt.headerText,align:"right",children:"Tips"}),g.jsx(he,{className:Rt.headerText,align:"right",children:"Duration"}),g.jsx(he,{className:Rt.headerText,align:"right",style:{gridColumnStart:"span 2"},children:"Compute Units"}),new Array(4).fill(0).map((a,s)=>{const u=e+s;return g.jsx(c2e,{slot:u,active:u===t},u)})]})]})}function u2e({slot:e,currentSlot:t}){const n=wi("(min-width: 700px)");return g.jsxs(Oe,{direction:"column",gap:"1px",children:[g.jsx(he,{className:Rt.headerText,children:n?"Slot":" "}),new Array(4).fill(0).map((r,i)=>{const o=e+i,a=o===t;return g.jsx(l2e,{slot:o,isCurrent:a,isWideScreen:n},o)})]})}function l2e({slot:e,isCurrent:t,isWideScreen:n}){var i;const r=Iu(e);return g.jsxs(Oe,{className:at(Rt.rowText,{[Rt.active]:t,[Rt.narrowScreen]:!n}),align:"center",gap:n?"2":"0",children:[n?g.jsx(he,{className:Rt.slotText,children:e}):g.jsx(he,{children:" "}),g.jsx(f2e,{slot:e,isCurrent:t}),(i=r.publish)!=null&&i.skipped?g.jsx(Cn,{content:"Slot was skipped",children:g.jsx("img",{src:IG,alt:"skipped",className:Rt.icon})}):g.jsx("div",{className:Rt.icon})]})}function bI(e){const t=Dd(e.vote_transactions??0),r=Dd(e.transactions??0)-t,i=Xv((e.transaction_fee??0n)+(e.priority_fee??0n),3,{decimals:3,trailingZeroes:!0}),o=e.transaction_fee!=null?(Number(e.transaction_fee)/ia).toString():"0",a=e.priority_fee!=null?(Number(e.priority_fee)/ia).toString():"0",s=Xv(e.tips??0n,3,{decimals:3,trailingZeroes:!0}),u=e.tips!=null?(Number(e.tips)/ia).toString():"0",l=e.duration_nanos!==null?`${Math.trunc(e.duration_nanos/1e6)} ms`:"-",f=Dd((e==null?void 0:e.compute_units)??0),d=e.compute_units!=null?e.compute_units/(e.max_compute_units??48e6)*100:0;return{voteTxns:t.toLocaleString(),nonVoteTxns:r.toLocaleString(),totalFees:i,transactionFeeFull:o,priorityFeeFull:a,tips:s,tipsFull:u,durationText:l,computeUnits:f,computeUnitsPct:d}}function c2e({slot:e,active:t}){const n=ve(oH),r=ve(Nr),i=Iu(e),[o,a]=S.useState(()=>{if(i.publish)return bI(i.publish)});S.useEffect(()=>{i.publish&&a(bI(i.publish))},[i.publish,e]);const s=e>(r??1/0),u=e===r,l=S.useRef(),[f,d]=S.useState(!1);mH(u)&&!u&&!f&&(clearTimeout(l.current),l.current=setTimeout(()=>{d(!1)},50),d(!0)),E2(()=>{clearTimeout(l.current)});const m=e<(n??0),v=(y,_)=>s||u||m?"-":!o&&!i.hasWaitedForData&&!f?"Loading...":o?(typeof y=="number"&&(y=Math.round(y)),`${y}`):"-";return g.jsxs(g.Fragment,{children:[g.jsx(he,{className:`${Rt.rowText} ${t?Rt.active:""}`,align:"right",children:v(o==null?void 0:o.voteTxns)}),g.jsx(he,{className:`${Rt.rowText} ${t?Rt.active:""}`,align:"right",children:v(o==null?void 0:o.nonVoteTxns)}),g.jsx(Cn,{content:g.jsxs(s5,{columns:"auto auto",rows:"2",gapX:"3",children:[g.jsx(he,{children:"Transaction"}),g.jsx(he,{children:"Priority"}),g.jsxs(he,{children:[o==null?void 0:o.transactionFeeFull," SOL"]}),g.jsxs(he,{children:[o==null?void 0:o.priorityFeeFull," SOL"]})]}),children:g.jsx(he,{className:`${Rt.rowText} ${t?Rt.active:""}`,align:"right",children:v(o==null?void 0:o.totalFees)})}),g.jsx(Cn,{content:`${o==null?void 0:o.tipsFull} SOL`,children:g.jsx(he,{className:`${Rt.rowText} ${t?Rt.active:""}`,align:"right",children:v(o==null?void 0:o.tips)})}),g.jsx(he,{className:`${Rt.rowText} ${t?Rt.active:""}`,align:"right",children:v(o==null?void 0:o.durationText)}),(o==null?void 0:o.computeUnits)!==void 0?g.jsxs(g.Fragment,{children:[g.jsx(he,{className:`${Rt.rowText} ${t?Rt.active:""}`,align:"right",style:{padding:0},children:v(o==null?void 0:o.computeUnits.toLocaleString())}),g.jsx(he,{className:`${Rt.rowText} ${t?Rt.active:""}`,align:"right",style:{padding:0},children:(o==null?void 0:o.computeUnitsPct)!==void 0?` (${v(o==null?void 0:o.computeUnitsPct)}%)`:null})]}):g.jsx(he,{className:`${Rt.rowText} ${t?Rt.active:""}`,style:{gridColumnStart:"span 2"},align:"right",children:v()})]})}function f2e({slot:e,isCurrent:t}){const n=ve(S.useMemo(()=>j0e(e),[e]));return t?g.jsx(d2e,{}):n==="incomplete"?g.jsx("div",{className:Rt.icon}):n==="optimistically_confirmed"?g.jsx(Cn,{content:"Slot was optimistically confirmed",children:g.jsx("img",{src:Z_e,alt:"optimistically_confirmed",className:Rt.icon})}):n==="rooted"||n==="finalized"?g.jsx(Cn,{content:"Slot was rooted",children:g.jsx("img",{src:Y_e,alt:"rooted",className:Rt.icon})}):g.jsx(Cn,{content:"Slot was processed",children:g.jsx("img",{src:K_e,alt:"processed",className:Rt.icon})})}function d2e(){const e=S.useRef(performance.now()),t=ve(C2),[n,r]=S.useState(0);return nye(()=>{if(n>=100)return;const o=performance.now()-e.current,a=Math.max(o/t*100,100);r(a)}),g.jsx("div",{style:{width:"14px"},children:g.jsx(n2e,{value:n,styles:r2e({trailColor:"#666666",pathColor:"#0051DF"}),strokeWidth:25})})}const h2e="_name_6igzs_8",p2e="_mobile_6igzs_18",m2e="_text_6igzs_23",v2e="_primary-text_6igzs_28",g2e="_secondary-text_6igzs_38",y2e="_divider_6igzs_47",b2e="_fd-text_6igzs_51",x2e="_agave-text_6igzs_55",_2e="_container-mobile_6igzs_59",Vr={name:h2e,mobile:p2e,text:m2e,primaryText:v2e,secondaryText:g2e,divider:y2e,fdText:b2e,agaveText:x2e,containerMobile:_2e};function w2e({children:e}){const[t,n]=S.useState(!1);return g.jsx(OH,{content:e,isOpen:t,onOpenChange:n,children:g.jsx(Jr,{variant:"ghost",size:"1",children:t?g.jsx(obe,{}):g.jsx(rbe,{})})})}function NG({slot:e,showTime:t}){var s,u;const n=dp(e),r=ve(ns),i=m0(n??""),o=r===n,a=((s=i==null?void 0:i.info)==null?void 0:s.name)??(o?"You":"Private");return g.jsxs(Oe,{gap:"1",children:[g.jsx(Nc,{url:(u=i==null?void 0:i.info)==null?void 0:u.icon_url,size:40,isYou:o}),g.jsxs(Oe,{direction:"column",gap:"1",align:"start",style:{marginLeft:"6px"},children:[g.jsx(he,{className:Vr.name,children:a}),g.jsx(he,{className:Vr.primaryText,children:n}),g.jsx(A3,{peer:i}),g.jsx(k3,{slot:e,showTime:t})]})]})}function LG({slot:e,showTime:t}){var u,l,f;const n=dp(e),r=ve(ns),i=m0(n??""),o=r===n,a=wi("(min-width: 700px)");let s=((u=i==null?void 0:i.info)==null?void 0:u.name)??(o?"You":"");return s||(a?s="Private":s=n?`${n.substring(0,8)}...`:"Private"),g.jsxs(Oe,{direction:"column",className:Vr.containerMobile,gap:"1",children:[g.jsx(Oe,{gap:"1",children:a?g.jsxs(g.Fragment,{children:[g.jsx(Nc,{url:(l=i==null?void 0:i.info)==null?void 0:l.icon_url,size:16,isYou:o}),g.jsx(he,{className:at(Vr.name,Vr.mobile),children:s}),g.jsx(Mn,{flexGrow:"1"}),g.jsx(he,{className:Vr.primaryText,children:n})]}):g.jsxs(g.Fragment,{children:[g.jsx(he,{className:Vr.text,children:e}),g.jsx(Mn,{flexGrow:"1"}),g.jsx(Nc,{url:(f=i==null?void 0:i.info)==null?void 0:f.icon_url,size:16,isYou:o}),g.jsx(he,{className:Vr.text,children:s}),g.jsx(w2e,{children:g.jsxs(Oe,{gap:"1",direction:"column",children:[g.jsx(he,{className:Vr.secondaryText,children:n}),g.jsx(A3,{peer:i}),g.jsx(k3,{slot:e,showTime:t})]})})]})}),a&&g.jsxs(Oe,{gap:"1",children:[g.jsx(A3,{peer:i}),g.jsx(Mn,{flexGrow:"1"}),g.jsx(k3,{slot:e,showTime:t})]})]})}function xI(e,t,n){if(!e)return;const r=tH(e),i=t!==void 0||n!==void 0?Number(r)/Number((t??0n)+(n??0n))*100:void 0;return`${ph(r)} ${i!==void 0?`(${Fd(i,{significantDigits:4,trailingZeroes:!1})}%)`:""}`}function A3({peer:e}){var p,m,v,y,_,x;const t=ve(S2),n=(p=e==null?void 0:e.gossip)!=null&&p.version?`${e.gossip.version[0]==="0"?"Frankendancer":"Agave"} v${e.gossip.version}`:void 0;if(![(m=e==null?void 0:e.gossip)!=null&&m.version?`${e.gossip.version[0]==="0"?"Frankendancer":"Agave"} v${e.gossip.version}`:void 0,xI(e,t==null?void 0:t.activeStake,t==null?void 0:t.delinquentStake),(y=(v=e==null?void 0:e.gossip)==null?void 0:v.sockets.tvu)==null?void 0:y.split(":")[0]].filter(sp).join(" - "))return null;const i=n==null?void 0:n.startsWith("Frankendancer"),o=n&&!i,a=n||"Unknown",s=xI(e,t==null?void 0:t.activeStake,t==null?void 0:t.delinquentStake)??"",u=((x=(_=e==null?void 0:e.gossip)==null?void 0:_.sockets.tvu)==null?void 0:x.split(":")[0])||"Offline",d=(a+s+u).length>54?{style:{flexBasis:0}}:{wrap:"nowrap"};return g.jsxs(Oe,{gap:"1",className:Vr.secondaryText,children:[g.jsx(he,{className:at({[Vr.fdText]:i,[Vr.agaveText]:o}),...d,children:a}),g.jsx(he,{className:Vr.divider,children:"•"}),g.jsx(he,{...d,children:s}),g.jsx(he,{className:Vr.divider,children:"•"}),g.jsx(he,{children:u})]})}function k3({slot:e,showTime:t}){const n=Iu(e),r=dH();pH(r,1e3);const i=S.useMemo(()=>{var s,u;if((s=n.publish)!=null&&s.completed_time_nanos)return tt.fromMillis(Math.trunc(Number((u=n.publish)==null?void 0:u.completed_time_nanos)/1e6))},[n.publish]),o=()=>{if(!(!t||!i))return hh.diff(i).rescale()};if(!t)return;const a=o();return g.jsxs(he,{className:Vr.secondaryText,children:[i==null?void 0:i.toLocaleString(tt.DATETIME_MED_WITH_SECONDS),a&&` (${nf(a)} ago)`]})}function S2e({slot:e}){var f,d,p,m;const t=ve(ns),n=dp(e),r=t===n,i=Iu(e),o=Iu(e+1),a=Iu(e+2),s=Iu(e+3),u=((f=i.publish)==null?void 0:f.skipped)||((d=o.publish)==null?void 0:d.skipped)||((p=a.publish)==null?void 0:p.skipped)||((m=s.publish)==null?void 0:m.skipped),l=wi("(min-width: 900px)");return g.jsx("div",{className:at(pI.card,{[D2.mySlots]:r,[pI.skipped]:u}),children:l?g.jsxs(Oe,{gap:"1",align:"start",justify:"between",children:[g.jsx(NG,{slot:e,showTime:!0}),g.jsx(px,{slot:e})]}):g.jsxs(Oe,{direction:"column",gap:"1",children:[g.jsx(LG,{slot:e,showTime:!0}),g.jsx(px,{slot:e})]})})}const C2e="_card_wweyx_1",O2e={card:C2e};function E2e({slot:e}){const t=ve(Nr),n=ve(ns),r=dp(e),i=n===r,o=wi("(min-width: 900px)");return g.jsx("div",{className:at(O2e.card,{[D2.mySlots]:i}),children:o?g.jsxs(Oe,{gap:"1",align:"start",justify:"between",children:[g.jsx(NG,{slot:e}),g.jsx(px,{slot:e,currentSlot:t})]}):g.jsxs(Oe,{direction:"column",gap:"1",children:[g.jsx(LG,{slot:e}),g.jsx(px,{slot:e,currentSlot:t})]})})}var T2e=Object.defineProperty,P2e=(e,t,n)=>t in e?T2e(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,f1=(e,t,n)=>P2e(e,typeof t!="symbol"?t+"":t,n),M3=new Map,d1=new WeakMap,_I=0,A2e=void 0;function k2e(e){return e?(d1.has(e)||(_I+=1,d1.set(e,_I.toString())),d1.get(e)):"0"}function M2e(e){return Object.keys(e).sort().filter(t=>e[t]!==void 0).map(t=>`${t}_${t==="root"?k2e(e.root):e[t]}`).toString()}function $2e(e){const t=M2e(e);let n=M3.get(t);if(!n){const r=new Map;let i;const o=new IntersectionObserver(a=>{a.forEach(s=>{var u;const l=s.isIntersecting&&i.some(f=>s.intersectionRatio>=f);e.trackVisibility&&typeof s.isVisible>"u"&&(s.isVisible=l),(u=r.get(s.target))==null||u.forEach(f=>{f(l,s)})})},e);i=o.thresholds||(Array.isArray(e.threshold)?e.threshold:[e.threshold||0]),n={id:t,observer:o,elements:r},M3.set(t,n)}return n}function R2e(e,t,n={},r=A2e){if(typeof window.IntersectionObserver>"u"&&r!==void 0){const u=e.getBoundingClientRect();return t(r,{isIntersecting:r,target:e,intersectionRatio:typeof n.threshold=="number"?n.threshold:0,time:0,boundingClientRect:u,intersectionRect:u,rootBounds:u}),()=>{}}const{id:i,observer:o,elements:a}=$2e(n),s=a.get(e)||[];return a.has(e)||a.set(e,s),s.push(t),o.observe(e),function(){s.splice(s.indexOf(t),1),s.length===0&&(a.delete(e),o.unobserve(e)),a.size===0&&(o.disconnect(),M3.delete(i))}}function j2e(e){return typeof e.children!="function"}var wI=class extends S.Component{constructor(e){super(e),f1(this,"node",null),f1(this,"_unobserveCb",null),f1(this,"handleNode",t=>{this.node&&(this.unobserve(),!t&&!this.props.triggerOnce&&!this.props.skip&&this.setState({inView:!!this.props.initialInView,entry:void 0})),this.node=t||null,this.observeNode()}),f1(this,"handleChange",(t,n)=>{t&&this.props.triggerOnce&&this.unobserve(),j2e(this.props)||this.setState({inView:t,entry:n}),this.props.onChange&&this.props.onChange(t,n)}),this.state={inView:!!e.initialInView,entry:void 0}}componentDidMount(){this.unobserve(),this.observeNode()}componentDidUpdate(e){(e.rootMargin!==this.props.rootMargin||e.root!==this.props.root||e.threshold!==this.props.threshold||e.skip!==this.props.skip||e.trackVisibility!==this.props.trackVisibility||e.delay!==this.props.delay)&&(this.unobserve(),this.observeNode())}componentWillUnmount(){this.unobserve()}observeNode(){if(!this.node||this.props.skip)return;const{threshold:e,root:t,rootMargin:n,trackVisibility:r,delay:i,fallbackInView:o}=this.props;this._unobserveCb=R2e(this.node,this.handleChange,{threshold:e,root:t,rootMargin:n,trackVisibility:r,delay:i},o)}unobserve(){this._unobserveCb&&(this._unobserveCb(),this._unobserveCb=null)}render(){const{children:e}=this.props;if(typeof e=="function"){const{inView:m,entry:v}=this.state;return e({inView:m,entry:v,ref:this.handleNode})}const{as:t,triggerOnce:n,threshold:r,root:i,rootMargin:o,onChange:a,skip:s,trackVisibility:u,delay:l,initialInView:f,fallbackInView:d,...p}=this.props;return S.createElement(t||"div",{ref:this.handleNode,...p},e)}};function HO({slot:e,lastCardSlot:t,setCardCount:n,children:r}){return e!==t?r:g.jsxs(g.Fragment,{children:[g.jsx(wI,{onChange:i=>{i||n("decrease")},children:r}),g.jsx(wI,{onChange:i=>{i&&n("increase")}})]})}const I2e="_preload_1uziq_1",N2e={preload:I2e};function L2e({slot:e}){var a,s;Iu(e);const t=dp(e),n=m0(t),[r,i]=Hi(JU((a=n==null?void 0:n.info)==null?void 0:a.icon_url)),o=!r&&((s=n==null?void 0:n.info)!=null&&s.icon_url)?n.info.icon_url:void 0;return g.jsx("div",{className:N2e.preload,children:g.jsx("img",{src:o,onError:()=>i()})})}const h1=Yr*5;function D2e({topCardSlotLeader:e,bottomCardSlotLeader:t,searchLeaderSlots:n}){if(n){const r=[],i=n.indexOf(t),o=n.indexOf(e);if(i>0)for(let a=1;a<=h1;a++){const s=n[i-a];for(let u=0;u0)for(let a=1;a<=h1;a++){const s=n[o+a];for(let u=0;u0)for(let a=r;a>r-h1;a--)o.push(a);if(i>0)for(let a=i;ag.jsx(L2e,{slot:i},i))})}var _c=(e=>(e.Past="Past",e.Now="Now",e.Upcoming="Upcoming",e))(_c||{});function B2e(e,t){return et?_c.Upcoming:_c.Now}function z2e({currentLeaderSlot:e,searchLeaderSlots:t,slotOverride:n,curCardCount:r=0,cardCount:i=1}){const o=t.toReversed();if(n===void 0){if(o.length<=i)return o[r];{const a=o.findIndex(l=>lMath.abs(l-n)),s=Math.min(...a),u=Math.max(a.indexOf(s)-3,0);return o[r+u]}}function W2e({cardCount:e,currentLeaderSlot:t,epoch:n,searchLeaderSlots:r,slotOverride:i,topSlot:o}){const a=[],s=[],u=[];if(t===void 0)return{upcoming:a,now:s,past:u};for(let l=0;ln.end_slot))continue;const d=B2e(f,t);d===_c.Upcoming&&a.push(f),d===_c.Now&&s.push(f),d===_c.Past&&u.push(f)}return{upcoming:a,now:s,past:u}}const DG=3,U2e=10,V2e=2,H2e=1;function G2e(e,t){switch(t){case"increase":return e+V2e;case"decrease":return Math.max(1,e-H2e)}}function q2e(){const e=ve(Ys),t=ve(Gt),n=ve(Di),r=ve(ii),[i,o]=S.useReducer(G2e,U2e),a=t??(e??0)+DG*Yr,{upcoming:s,now:u,past:l}=S.useMemo(()=>W2e({cardCount:i,currentLeaderSlot:e,epoch:r,searchLeaderSlots:n,slotOverride:t,topSlot:a}),[i,e,r,n,t,a]);if(e===void 0)return;if((n==null?void 0:n.length)===0)return g.jsx(Oe,{justify:"center",align:"center",style:{color:"#B2BCC9",fontSize:"24px",letterSpacing:"-0.96px",minHeight:"300px"},children:g.jsx(he,{children:"No slots found."})});const f=s[0]??u[0]??l[0]??-1,d=l[l.length-1]??u[u.length-1]??s[s.length-1]??-1;return g.jsxs(g.Fragment,{children:[!!s.length&&g.jsx(GO,{sectionName:"Upcoming",children:s.map(p=>g.jsx(HO,{slot:p,lastCardSlot:d,setCardCount:o,children:g.jsx(C_e,{slot:p},p)},p))}),!!u.length&&g.jsx(GO,{sectionName:"Now",children:u.map(p=>g.jsx(HO,{slot:p,lastCardSlot:d,setCardCount:o,children:g.jsx(E2e,{slot:p},p)},p))}),!!l.length&&g.jsx(GO,{sectionName:"Past",children:l.map(p=>g.jsx(HO,{slot:p,lastCardSlot:d,setCardCount:o,children:g.jsx(S2e,{slot:p})},p))}),g.jsx(F2e,{topCardSlotLeader:f,bottomCardSlotLeader:d})]})}function GO({children:e,sectionName:t}){const n=wi("(min-width: 700px)");return g.jsxs(Oe,{gap:"2",align:"stretch",children:[n&&g.jsxs(Oe,{direction:"column",gap:"2",align:"center",children:[g.jsx("div",{style:{width:"1px",flex:1,background:"#676767",height:"10px"}}),g.jsx(he,{style:{transform:"rotate(180deg)",writingMode:"vertical-rl",color:"#8A8A8A"},size:"2",children:t}),g.jsx("div",{style:{width:"1px",flex:1,background:"#676767",height:"10px"}})]}),g.jsx(Oe,{direction:"column",flexGrow:"1",gap:"2",minWidth:"0",children:e})]})}const K2e="_container_zd7m4_1",Z2e="_button_zd7m4_6",SI={container:K2e,button:Z2e},Y2e="data:image/svg+xml,%3csvg%20width='10'%20height='10'%20viewBox='0%200%2010%2010'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M9.67578%205L5%209.67578L0.324219%205L1.17188%204.17969L4.42578%207.43359V0.324219H5.57422V7.43359L8.85547%204.17969L9.67578%205Z'%20fill='white'/%3e%3c/svg%3e",X2e="data:image/svg+xml,%3csvg%20width='10'%20height='10'%20viewBox='0%200%2010%2010'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M0.324219%205L5%200.324219L9.67578%205L8.82812%205.82031L5.57422%202.56641V9.67578H4.42578V2.56641L1.14453%205.82031L0.324219%205Z'%20fill='white'/%3e%3c/svg%3e";function Q2e(){const[e,t]=Hi(Gt),n=ve(Ys);if(e===void 0||n===void 0)return null;const r=e<=n+DG*Yr;return g.jsx("div",{className:SI.container,children:g.jsxs(Jr,{className:SI.button,style:{bottom:r?void 0:"8px"},onClick:()=>t(void 0),children:["Skip to Now",r?g.jsx("img",{src:X2e}):g.jsx("img",{src:Y2e})]})})}function u4(e,t,n){var r=this,i=S.useRef(null),o=S.useRef(0),a=S.useRef(null),s=S.useRef([]),u=S.useRef(),l=S.useRef(),f=S.useRef(e),d=S.useRef(!0);f.current=e;var p=typeof window<"u",m=!t&&t!==0&&p;if(typeof e!="function")throw new TypeError("Expected a function");t=+t||0;var v=!!(n=n||{}).leading,y=!("trailing"in n)||!!n.trailing,_="maxWait"in n,x="debounceOnServer"in n&&!!n.debounceOnServer,w=_?Math.max(+n.maxWait||0,t):null;S.useEffect(function(){return d.current=!0,function(){d.current=!1}},[]);var C=S.useMemo(function(){var E=function($){var j=s.current,N=u.current;return s.current=u.current=null,o.current=$,l.current=f.current.apply(N,j)},O=function($,j){m&&cancelAnimationFrame(a.current),a.current=m?requestAnimationFrame($):setTimeout($,j)},T=function($){if(!d.current)return!1;var j=$-i.current;return!i.current||j>=t||j<0||_&&$-o.current>=w},A=function($){return a.current=null,y&&s.current?E($):(s.current=u.current=null,l.current)},k=function $(){var j=Date.now();if(T(j))return A(j);if(d.current){var N=t-(j-i.current),U=_?Math.min(N,w-(j-o.current)):N;O($,U)}},M=function(){if(p||x){var $=Date.now(),j=T($);if(s.current=[].slice.call(arguments),u.current=r,i.current=$,j){if(!a.current&&d.current)return o.current=i.current,O(k,t),v?E(i.current):l.current;if(_)return O(k,t),E(i.current)}return a.current||O(k,t),l.current}};return M.cancel=function(){a.current&&(m?cancelAnimationFrame(a.current):clearTimeout(a.current)),o.current=0,s.current=i.current=u.current=a.current=null},M.isPending=function(){return!!a.current},M.flush=function(){return a.current?A(Date.now()):l.current},M},[v,_,t,w,y,m,p,x]);return C}function oc(e,t,n){var r={},i=r.leading,o=r.trailing;return u4(e,t,{maxWait:t,leading:i===void 0||i,trailing:o===void 0||o})}const J2e="_label_12pep_1",ewe="_progress_12pep_5",twe="_value_12pep_15",qO={label:J2e,progress:ewe,value:twe};function l4(){const e=ve(uH),t=ve(lx),n=ve(sH),r=t??n,i=ve(Nr),o=ve(lH),a=ve(C2),[s,u]=S.useState(i);rf(()=>{u(d=>{if(!i)return d;if(!d)return i;const p=d-i;return p>10?d-Math.trunc(p/2):p>4?d:p<-4?d-Math.trunc(p/2):d+1})},a);const l=S.useMemo(()=>{if(!(r==null||s==null))return Ct.fromMillis(a*(r-s)).rescale()},[s,r,a]),f=S.useMemo(()=>{if(e==null||r==null||s==null)return;const d=r-e,m=(s-e)/d*100;return m<0||m>100?0:m},[s,r,e]);return{progressSinceLastLeader:o?100:f??0,nextSlotText:o?"Now":nf(l),nextLeaderSlot:o?i:r}}function nwe(){const{progressSinceLastLeader:e,nextSlotText:t,nextLeaderSlot:n}=l4(),r=n!==void 0?` (${n})`:"";return g.jsxs(Oe,{align:"center",gap:"2",children:[g.jsxs(he,{className:qO.label,children:["Next leader slot",r]}),g.jsx(a0,{value:e,className:qO.progress}),g.jsx(he,{className:qO.value,children:t})]})}const rwe="_container_2po9i_1",iwe="_search-box_2po9i_18",owe="_label_2po9i_29",awe="_my-slots_2po9i_33",swe="_skipped-slots_2po9i_63",uwe="_disabled_2po9i_93",lwe="_skip-rate-label_2po9i_103",cwe="_skip-rate-value_2po9i_108",Ua={container:rwe,searchBox:iwe,label:owe,mySlots:awe,skippedSlots:swe,disabled:uwe,skipRateLabel:lwe,skipRateValue:cwe};function c4(){const{searchType:e}=fg.useSearch(),t=s0({from:fg.fullPath}),n=S.useCallback(r=>{t({search:{searchType:r},replace:!0})},[t]);return{searchType:e,setSearchType:n}}function fwe(){const{searchText:e}=fg.useSearch(),t=s0({from:fg.fullPath}),n=S.useCallback(r=>{t({search:{searchText:r,searchType:Hr.text},replace:!0})},[t]);return{searchText:e,setSearchText:n}}const dwe=Ee(e=>!!e(Ys));function hwe(){const e=ve(dwe),t=Je(T0e),n=Je(Gt),{searchType:r}=c4(),{searchText:i,setSearchText:o}=fwe(),[a,s]=S.useState(i),u=u4(f=>{t(f),o(f)},1e3);S.useEffect(()=>{!u.isPending()&&a!==i&&s(i)},[u,a,i]);const l=()=>{o(""),n(void 0),t("")};if(O2(()=>{r===Hr.text&&t(i)}),!!e)return g.jsxs(Oe,{className:Ua.container,gap:"2",wrap:"wrap",children:[g.jsx(Mn,{className:Ua.searchBox,children:g.jsxs(aU,{placeholder:"Name, pubkey, or slot (separate with , or ; for multiple values)",variant:"soft",color:"gray",onChange:f=>{s(f.currentTarget.value),u(f.currentTarget.value)},value:a,children:[g.jsx(HT,{children:g.jsx(hbe,{height:"16",width:"16",style:{color:"#AFB2C2"}})}),a&&g.jsx(HT,{children:g.jsx(Ub,{size:"1",variant:"ghost",children:g.jsx(sbe,{height:"14",width:"14",style:{color:"#AFB2C2"},onClick:l})})})]})}),g.jsx(mwe,{resetSearchText:l}),g.jsx(vwe,{resetSearchText:l}),g.jsx(pwe,{}),g.jsx(Mn,{flexGrow:"1"}),g.jsx(nwe,{})]})}function pwe(){const e=ve(fH);let t="-";return e!==void 0&&(t=(e.skip_rate*100).toLocaleString(void 0,{minimumFractionDigits:0,maximumFractionDigits:2}),t+="%"),g.jsxs(Oe,{justify:"center",align:"center",gap:"1",children:[g.jsx(he,{className:Ua.skipRateLabel,children:"Skip Rate"}),g.jsx(he,{className:e?Ua.skipRateValue:Ua.skipRateLabel,children:t})]})}function mwe({resetSearchText:e}){const t=ve(Lc),n=Je(Di),r=Je(Gt),{searchType:i,setSearchType:o}=c4(),a=((t==null?void 0:t.length)??0)*4,s=S.useCallback(()=>{n(t)},[n,t]);S.useEffect(()=>{i===Hr.mySlots&&n(t)},[t,n]);const u=()=>{e(),r(void 0),i===Hr.mySlots?o(Hr.text):(o(Hr.mySlots),s())},l=i===Hr.mySlots,f=!(t!=null&&t.length);return g.jsx(Cn,{content:"Number of slots this validator is leader in the current epoch. Toggle to filter",children:g.jsx("div",{children:g.jsx(np,{children:g.jsxs(Yk,{className:`${Ua.mySlots}`,onClick:u,"aria-label":"Toggle my slots",pressed:l,disabled:f,children:[g.jsx(he,{className:Ua.label,children:"My Slots"}),g.jsx(he,{children:a})]})})})})}function vwe({resetSearchText:e}){const t=ve(v2),n=Je(Di),r=Je(Gt),{searchType:i,setSearchType:o}=c4(),a=(t==null?void 0:t.length)??0,s=S.useCallback(()=>{const d=t==null?void 0:t.map(p=>p-p%4);n([...new Set(d)])},[n,t]);S.useEffect(()=>{i===Hr.skippedSlots&&s()},[s]);const u=()=>{e(),r(void 0),i===Hr.skippedSlots?o(Hr.text):t!=null&&t.length&&(o(Hr.skippedSlots),s())},l=i===Hr.skippedSlots,f=!(t!=null&&t.length);return g.jsx(Cn,{content:"Number of slots this validator has skipped in the current epoch since it was last restarted. Toggle to filter",children:g.jsx("div",{children:g.jsx(np,{children:g.jsxs(Yk,{className:`${Ua.skippedSlots} ${f?Ua.disabled:""}`,onClick:u,"aria-label":"Toggle skipped slots",pressed:l,disabled:!l&&f,children:[g.jsx(he,{className:Ua.label,children:"My Skipped Slots"}),g.jsx(he,{children:a})]})})})})}var FG={exports:{}};/*! Hammer.JS - v2.0.7 - 2016-04-22 + `}function t2e(e){var t=e.counterClockwise,n=e.dashRatio,r=e.pathRadius,i=Math.PI*2*r,o=(1-n)*i;return{strokeDasharray:i+"px "+i+"px",strokeDashoffset:(t?-o:o)+"px"}}var n2e=function(e){X_e(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.getBackgroundPadding=function(){return this.props.background?this.props.backgroundPadding:0},t.prototype.getPathRadius=function(){return gI-this.props.strokeWidth/2-this.getBackgroundPadding()},t.prototype.getPathRatio=function(){var n=this.props,r=n.value,i=n.minValue,o=n.maxValue,a=Math.min(Math.max(r,i),o);return(a-i)/(o-i)},t.prototype.render=function(){var n=this.props,r=n.circleRatio,i=n.className,o=n.classes,a=n.counterClockwise,s=n.styles,u=n.strokeWidth,l=n.text,f=this.getPathRadius(),d=this.getPathRatio();return S.createElement("svg",{className:o.root+" "+i,style:s.root,viewBox:"0 0 "+Q_e+" "+J_e,"data-test-id":"CircularProgressbar"},this.props.background?S.createElement("circle",{className:o.background,style:s.background,cx:T3,cy:P3,r:gI}):null,S.createElement(yI,{className:o.trail,counterClockwise:a,dashRatio:r,pathRadius:f,strokeWidth:u,style:s.trail}),S.createElement(yI,{className:o.path,counterClockwise:a,dashRatio:d*r,pathRadius:f,strokeWidth:u,style:s.path}),l?S.createElement("text",{className:o.text,style:s.text,x:T3,y:P3},l):null)},t.defaultProps={background:!1,backgroundPadding:0,circleRatio:1,classes:{root:"CircularProgressbar",trail:"CircularProgressbar-trail",path:"CircularProgressbar-path",text:"CircularProgressbar-text",background:"CircularProgressbar-background"},counterClockwise:!1,className:"",maxValue:100,minValue:0,strokeWidth:8,styles:{root:{},trail:{},path:{},text:{},background:{}},text:""},t}(S.Component);function r2e(e){var t=e.rotation,n=e.strokeLinecap,r=e.textColor,i=e.textSize,o=e.pathColor,a=e.pathTransition,s=e.pathTransitionDuration,u=e.trailColor,l=e.backgroundColor,f=t==null?void 0:"rotate("+t+"turn)",d=t==null?void 0:"center center";return{root:{},path:c1({stroke:o,strokeLinecap:n,transform:f,transformOrigin:d,transition:a,transitionDuration:s==null?void 0:s+"s"}),trail:c1({stroke:u,strokeLinecap:n,transform:f,transformOrigin:d}),text:c1({fill:r,fontSize:i}),background:c1({fill:l})}}function c1(e){return Object.keys(e).forEach(function(t){e[t]==null&&delete e[t]}),e}function Xv(e,t=3,n){if(!e)return"0";const r=Number(e)/ia;return r<1?r.toFixed(t):Fd(r,n??{useSuffix:!0,significantDigits:4,trailingZeroes:!1,decimalsOnZero:!1})}const[i2e,o2e,a2e,s2e]=function(){const e=Zs({}),t=Ee(0);return[Ee(null,(n,r,i,o)=>{const a=n(t);a&&o(a),r(e,s=>{s[i]=o})}),Ee(null,(n,r,i)=>{r(e,o=>{delete o[i]})}),Ee(null,(n,r,i,o)=>{for(const[a,s]of Object.entries(n(e)))Number(a)!==i&&s(o);r(t,o)}),Ee(null,(n,r)=>{r(e,{}),r(t,0)})]}();function px({slot:e,currentSlot:t}){const n=S.useRef(null),r=Je(i2e),i=Je(o2e),o=Je(a2e);return S.useEffect(()=>(r(e,a=>{var s;(s=n.current)==null||s.scrollTo(a,0)}),()=>i(e)),[i,r,e]),g.jsxs(Oe,{minWidth:"0",children:[g.jsx(u2e,{slot:e,currentSlot:t}),g.jsxs("div",{className:Rt.grid,ref:n,onScroll:a=>{o(e,a.currentTarget.scrollLeft)},children:[g.jsx(he,{className:Rt.headerText,align:"right",children:"Votes"}),g.jsx(he,{className:Rt.headerText,align:"right",children:"Non-votes"}),g.jsx(he,{className:Rt.headerText,align:"right",children:"Fees"}),g.jsx(he,{className:Rt.headerText,align:"right",children:"Tips"}),g.jsx(he,{className:Rt.headerText,align:"right",children:"Duration"}),g.jsx(he,{className:Rt.headerText,align:"right",style:{gridColumnStart:"span 2"},children:"Compute Units"}),new Array(4).fill(0).map((a,s)=>{const u=e+3-s;return g.jsx(c2e,{slot:u,active:u===t},u)})]})]})}function u2e({slot:e,currentSlot:t}){const n=wi("(min-width: 700px)");return g.jsxs(Oe,{direction:"column",gap:"1px",children:[g.jsx(he,{className:Rt.headerText,children:n?"Slot":" "}),new Array(4).fill(0).map((r,i)=>{const o=e+3-i,a=o===t;return g.jsx(l2e,{slot:o,isCurrent:a,isWideScreen:n},o)})]})}function l2e({slot:e,isCurrent:t,isWideScreen:n}){var i;const r=Iu(e);return g.jsxs(Oe,{className:at(Rt.rowText,{[Rt.active]:t,[Rt.narrowScreen]:!n}),align:"center",gap:n?"2":"0",children:[n?g.jsx(he,{className:Rt.slotText,children:e}):g.jsx(he,{children:" "}),g.jsx(f2e,{slot:e,isCurrent:t}),(i=r.publish)!=null&&i.skipped?g.jsx(Cn,{content:"Slot was skipped",children:g.jsx("img",{src:IG,alt:"skipped",className:Rt.icon})}):g.jsx("div",{className:Rt.icon})]})}function bI(e){const t=Dd(e.vote_transactions??0),r=Dd(e.transactions??0)-t,i=Xv((e.transaction_fee??0n)+(e.priority_fee??0n),3,{decimals:3,trailingZeroes:!0}),o=e.transaction_fee!=null?(Number(e.transaction_fee)/ia).toString():"0",a=e.priority_fee!=null?(Number(e.priority_fee)/ia).toString():"0",s=Xv(e.tips??0n,3,{decimals:3,trailingZeroes:!0}),u=e.tips!=null?(Number(e.tips)/ia).toString():"0",l=e.duration_nanos!==null?`${Math.trunc(e.duration_nanos/1e6)} ms`:"-",f=Dd((e==null?void 0:e.compute_units)??0),d=e.compute_units!=null?e.compute_units/(e.max_compute_units??48e6)*100:0;return{voteTxns:t.toLocaleString(),nonVoteTxns:r.toLocaleString(),totalFees:i,transactionFeeFull:o,priorityFeeFull:a,tips:s,tipsFull:u,durationText:l,computeUnits:f,computeUnitsPct:d}}function c2e({slot:e,active:t}){const n=ve(oH),r=ve(Nr),i=Iu(e),[o,a]=S.useState(()=>{if(i.publish)return bI(i.publish)});S.useEffect(()=>{i.publish&&a(bI(i.publish))},[i.publish,e]);const s=e>(r??1/0),u=e===r,l=S.useRef(),[f,d]=S.useState(!1);mH(u)&&!u&&!f&&(clearTimeout(l.current),l.current=setTimeout(()=>{d(!1)},50),d(!0)),E2(()=>{clearTimeout(l.current)});const m=e<(n??0),v=(y,_)=>s||u||m?"-":!o&&!i.hasWaitedForData&&!f?"Loading...":o?(typeof y=="number"&&(y=Math.round(y)),`${y}`):"-";return g.jsxs(g.Fragment,{children:[g.jsx(he,{className:`${Rt.rowText} ${t?Rt.active:""}`,align:"right",children:v(o==null?void 0:o.voteTxns)}),g.jsx(he,{className:`${Rt.rowText} ${t?Rt.active:""}`,align:"right",children:v(o==null?void 0:o.nonVoteTxns)}),g.jsx(Cn,{content:g.jsxs(s5,{columns:"auto auto",rows:"2",gapX:"3",children:[g.jsx(he,{children:"Transaction"}),g.jsx(he,{children:"Priority"}),g.jsxs(he,{children:[o==null?void 0:o.transactionFeeFull," SOL"]}),g.jsxs(he,{children:[o==null?void 0:o.priorityFeeFull," SOL"]})]}),children:g.jsx(he,{className:`${Rt.rowText} ${t?Rt.active:""}`,align:"right",children:v(o==null?void 0:o.totalFees)})}),g.jsx(Cn,{content:`${o==null?void 0:o.tipsFull} SOL`,children:g.jsx(he,{className:`${Rt.rowText} ${t?Rt.active:""}`,align:"right",children:v(o==null?void 0:o.tips)})}),g.jsx(he,{className:`${Rt.rowText} ${t?Rt.active:""}`,align:"right",children:v(o==null?void 0:o.durationText)}),(o==null?void 0:o.computeUnits)!==void 0?g.jsxs(g.Fragment,{children:[g.jsx(he,{className:`${Rt.rowText} ${t?Rt.active:""}`,align:"right",style:{padding:0},children:v(o==null?void 0:o.computeUnits.toLocaleString())}),g.jsx(he,{className:`${Rt.rowText} ${t?Rt.active:""}`,align:"right",style:{padding:0},children:(o==null?void 0:o.computeUnitsPct)!==void 0?` (${v(o==null?void 0:o.computeUnitsPct)}%)`:null})]}):g.jsx(he,{className:`${Rt.rowText} ${t?Rt.active:""}`,style:{gridColumnStart:"span 2"},align:"right",children:v()})]})}function f2e({slot:e,isCurrent:t}){const n=ve(S.useMemo(()=>j0e(e),[e]));return t?g.jsx(d2e,{}):n==="incomplete"?g.jsx("div",{className:Rt.icon}):n==="optimistically_confirmed"?g.jsx(Cn,{content:"Slot was optimistically confirmed",children:g.jsx("img",{src:Z_e,alt:"optimistically_confirmed",className:Rt.icon})}):n==="rooted"||n==="finalized"?g.jsx(Cn,{content:"Slot was rooted",children:g.jsx("img",{src:Y_e,alt:"rooted",className:Rt.icon})}):g.jsx(Cn,{content:"Slot was processed",children:g.jsx("img",{src:K_e,alt:"processed",className:Rt.icon})})}function d2e(){const e=S.useRef(performance.now()),t=ve(C2),[n,r]=S.useState(0);return nye(()=>{if(n>=100)return;const o=performance.now()-e.current,a=Math.max(o/t*100,100);r(a)}),g.jsx("div",{style:{width:"14px"},children:g.jsx(n2e,{value:n,styles:r2e({trailColor:"#666666",pathColor:"#0051DF"}),strokeWidth:25})})}const h2e="_name_6igzs_8",p2e="_mobile_6igzs_18",m2e="_text_6igzs_23",v2e="_primary-text_6igzs_28",g2e="_secondary-text_6igzs_38",y2e="_divider_6igzs_47",b2e="_fd-text_6igzs_51",x2e="_agave-text_6igzs_55",_2e="_container-mobile_6igzs_59",Vr={name:h2e,mobile:p2e,text:m2e,primaryText:v2e,secondaryText:g2e,divider:y2e,fdText:b2e,agaveText:x2e,containerMobile:_2e};function w2e({children:e}){const[t,n]=S.useState(!1);return g.jsx(OH,{content:e,isOpen:t,onOpenChange:n,children:g.jsx(Jr,{variant:"ghost",size:"1",children:t?g.jsx(obe,{}):g.jsx(rbe,{})})})}function NG({slot:e,showTime:t}){var s,u;const n=dp(e),r=ve(ns),i=m0(n??""),o=r===n,a=((s=i==null?void 0:i.info)==null?void 0:s.name)??(o?"You":"Private");return g.jsxs(Oe,{gap:"1",children:[g.jsx(Nc,{url:(u=i==null?void 0:i.info)==null?void 0:u.icon_url,size:40,isYou:o}),g.jsxs(Oe,{direction:"column",gap:"1",align:"start",style:{marginLeft:"6px"},children:[g.jsx(he,{className:Vr.name,children:a}),g.jsx(he,{className:Vr.primaryText,children:n}),g.jsx(A3,{peer:i}),g.jsx(k3,{slot:e,showTime:t})]})]})}function LG({slot:e,showTime:t}){var u,l,f;const n=dp(e),r=ve(ns),i=m0(n??""),o=r===n,a=wi("(min-width: 700px)");let s=((u=i==null?void 0:i.info)==null?void 0:u.name)??(o?"You":"");return s||(a?s="Private":s=n?`${n.substring(0,8)}...`:"Private"),g.jsxs(Oe,{direction:"column",className:Vr.containerMobile,gap:"1",children:[g.jsx(Oe,{gap:"1",children:a?g.jsxs(g.Fragment,{children:[g.jsx(Nc,{url:(l=i==null?void 0:i.info)==null?void 0:l.icon_url,size:16,isYou:o}),g.jsx(he,{className:at(Vr.name,Vr.mobile),children:s}),g.jsx(Mn,{flexGrow:"1"}),g.jsx(he,{className:Vr.primaryText,children:n})]}):g.jsxs(g.Fragment,{children:[g.jsx(he,{className:Vr.text,children:e}),g.jsx(Mn,{flexGrow:"1"}),g.jsx(Nc,{url:(f=i==null?void 0:i.info)==null?void 0:f.icon_url,size:16,isYou:o}),g.jsx(he,{className:Vr.text,children:s}),g.jsx(w2e,{children:g.jsxs(Oe,{gap:"1",direction:"column",children:[g.jsx(he,{className:Vr.secondaryText,children:n}),g.jsx(A3,{peer:i}),g.jsx(k3,{slot:e,showTime:t})]})})]})}),a&&g.jsxs(Oe,{gap:"1",children:[g.jsx(A3,{peer:i}),g.jsx(Mn,{flexGrow:"1"}),g.jsx(k3,{slot:e,showTime:t})]})]})}function xI(e,t,n){if(!e)return;const r=tH(e),i=t!==void 0||n!==void 0?Number(r)/Number((t??0n)+(n??0n))*100:void 0;return`${ph(r)} ${i!==void 0?`(${Fd(i,{significantDigits:4,trailingZeroes:!1})}%)`:""}`}function A3({peer:e}){var p,m,v,y,_,x;const t=ve(S2),n=(p=e==null?void 0:e.gossip)!=null&&p.version?`${e.gossip.version[0]==="0"?"Frankendancer":"Agave"} v${e.gossip.version}`:void 0;if(![(m=e==null?void 0:e.gossip)!=null&&m.version?`${e.gossip.version[0]==="0"?"Frankendancer":"Agave"} v${e.gossip.version}`:void 0,xI(e,t==null?void 0:t.activeStake,t==null?void 0:t.delinquentStake),(y=(v=e==null?void 0:e.gossip)==null?void 0:v.sockets.tvu)==null?void 0:y.split(":")[0]].filter(sp).join(" - "))return null;const i=n==null?void 0:n.startsWith("Frankendancer"),o=n&&!i,a=n||"Unknown",s=xI(e,t==null?void 0:t.activeStake,t==null?void 0:t.delinquentStake)??"",u=((x=(_=e==null?void 0:e.gossip)==null?void 0:_.sockets.tvu)==null?void 0:x.split(":")[0])||"Offline",d=(a+s+u).length>54?{style:{flexBasis:0}}:{wrap:"nowrap"};return g.jsxs(Oe,{gap:"1",className:Vr.secondaryText,children:[g.jsx(he,{className:at({[Vr.fdText]:i,[Vr.agaveText]:o}),...d,children:a}),g.jsx(he,{className:Vr.divider,children:"•"}),g.jsx(he,{...d,children:s}),g.jsx(he,{className:Vr.divider,children:"•"}),g.jsx(he,{children:u})]})}function k3({slot:e,showTime:t}){const n=Iu(e),r=dH();pH(r,1e3);const i=S.useMemo(()=>{var s,u;if((s=n.publish)!=null&&s.completed_time_nanos)return tt.fromMillis(Math.trunc(Number((u=n.publish)==null?void 0:u.completed_time_nanos)/1e6))},[n.publish]),o=()=>{if(!(!t||!i))return hh.diff(i).rescale()};if(!t)return;const a=o();return g.jsxs(he,{className:Vr.secondaryText,children:[i==null?void 0:i.toLocaleString(tt.DATETIME_MED_WITH_SECONDS),a&&` (${nf(a)} ago)`]})}function S2e({slot:e}){var f,d,p,m;const t=ve(ns),n=dp(e),r=t===n,i=Iu(e),o=Iu(e+1),a=Iu(e+2),s=Iu(e+3),u=((f=i.publish)==null?void 0:f.skipped)||((d=o.publish)==null?void 0:d.skipped)||((p=a.publish)==null?void 0:p.skipped)||((m=s.publish)==null?void 0:m.skipped),l=wi("(min-width: 900px)");return g.jsx("div",{className:at(pI.card,{[D2.mySlots]:r,[pI.skipped]:u}),children:l?g.jsxs(Oe,{gap:"1",align:"start",justify:"between",children:[g.jsx(NG,{slot:e,showTime:!0}),g.jsx(px,{slot:e})]}):g.jsxs(Oe,{direction:"column",gap:"1",children:[g.jsx(LG,{slot:e,showTime:!0}),g.jsx(px,{slot:e})]})})}const C2e="_card_wweyx_1",O2e={card:C2e};function E2e({slot:e}){const t=ve(Nr),n=ve(ns),r=dp(e),i=n===r,o=wi("(min-width: 900px)");return g.jsx("div",{className:at(O2e.card,{[D2.mySlots]:i}),children:o?g.jsxs(Oe,{gap:"1",align:"start",justify:"between",children:[g.jsx(NG,{slot:e}),g.jsx(px,{slot:e,currentSlot:t})]}):g.jsxs(Oe,{direction:"column",gap:"1",children:[g.jsx(LG,{slot:e}),g.jsx(px,{slot:e,currentSlot:t})]})})}var T2e=Object.defineProperty,P2e=(e,t,n)=>t in e?T2e(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,f1=(e,t,n)=>P2e(e,typeof t!="symbol"?t+"":t,n),M3=new Map,d1=new WeakMap,_I=0,A2e=void 0;function k2e(e){return e?(d1.has(e)||(_I+=1,d1.set(e,_I.toString())),d1.get(e)):"0"}function M2e(e){return Object.keys(e).sort().filter(t=>e[t]!==void 0).map(t=>`${t}_${t==="root"?k2e(e.root):e[t]}`).toString()}function $2e(e){const t=M2e(e);let n=M3.get(t);if(!n){const r=new Map;let i;const o=new IntersectionObserver(a=>{a.forEach(s=>{var u;const l=s.isIntersecting&&i.some(f=>s.intersectionRatio>=f);e.trackVisibility&&typeof s.isVisible>"u"&&(s.isVisible=l),(u=r.get(s.target))==null||u.forEach(f=>{f(l,s)})})},e);i=o.thresholds||(Array.isArray(e.threshold)?e.threshold:[e.threshold||0]),n={id:t,observer:o,elements:r},M3.set(t,n)}return n}function R2e(e,t,n={},r=A2e){if(typeof window.IntersectionObserver>"u"&&r!==void 0){const u=e.getBoundingClientRect();return t(r,{isIntersecting:r,target:e,intersectionRatio:typeof n.threshold=="number"?n.threshold:0,time:0,boundingClientRect:u,intersectionRect:u,rootBounds:u}),()=>{}}const{id:i,observer:o,elements:a}=$2e(n),s=a.get(e)||[];return a.has(e)||a.set(e,s),s.push(t),o.observe(e),function(){s.splice(s.indexOf(t),1),s.length===0&&(a.delete(e),o.unobserve(e)),a.size===0&&(o.disconnect(),M3.delete(i))}}function j2e(e){return typeof e.children!="function"}var wI=class extends S.Component{constructor(e){super(e),f1(this,"node",null),f1(this,"_unobserveCb",null),f1(this,"handleNode",t=>{this.node&&(this.unobserve(),!t&&!this.props.triggerOnce&&!this.props.skip&&this.setState({inView:!!this.props.initialInView,entry:void 0})),this.node=t||null,this.observeNode()}),f1(this,"handleChange",(t,n)=>{t&&this.props.triggerOnce&&this.unobserve(),j2e(this.props)||this.setState({inView:t,entry:n}),this.props.onChange&&this.props.onChange(t,n)}),this.state={inView:!!e.initialInView,entry:void 0}}componentDidMount(){this.unobserve(),this.observeNode()}componentDidUpdate(e){(e.rootMargin!==this.props.rootMargin||e.root!==this.props.root||e.threshold!==this.props.threshold||e.skip!==this.props.skip||e.trackVisibility!==this.props.trackVisibility||e.delay!==this.props.delay)&&(this.unobserve(),this.observeNode())}componentWillUnmount(){this.unobserve()}observeNode(){if(!this.node||this.props.skip)return;const{threshold:e,root:t,rootMargin:n,trackVisibility:r,delay:i,fallbackInView:o}=this.props;this._unobserveCb=R2e(this.node,this.handleChange,{threshold:e,root:t,rootMargin:n,trackVisibility:r,delay:i},o)}unobserve(){this._unobserveCb&&(this._unobserveCb(),this._unobserveCb=null)}render(){const{children:e}=this.props;if(typeof e=="function"){const{inView:m,entry:v}=this.state;return e({inView:m,entry:v,ref:this.handleNode})}const{as:t,triggerOnce:n,threshold:r,root:i,rootMargin:o,onChange:a,skip:s,trackVisibility:u,delay:l,initialInView:f,fallbackInView:d,...p}=this.props;return S.createElement(t||"div",{ref:this.handleNode,...p},e)}};function HO({slot:e,lastCardSlot:t,setCardCount:n,children:r}){return e!==t?r:g.jsxs(g.Fragment,{children:[g.jsx(wI,{onChange:i=>{i||n("decrease")},children:r}),g.jsx(wI,{onChange:i=>{i&&n("increase")}})]})}const I2e="_preload_1uziq_1",N2e={preload:I2e};function L2e({slot:e}){var a,s;Iu(e);const t=dp(e),n=m0(t),[r,i]=Hi(JU((a=n==null?void 0:n.info)==null?void 0:a.icon_url)),o=!r&&((s=n==null?void 0:n.info)!=null&&s.icon_url)?n.info.icon_url:void 0;return g.jsx("div",{className:N2e.preload,children:g.jsx("img",{src:o,onError:()=>i()})})}const h1=Yr*5;function D2e({topCardSlotLeader:e,bottomCardSlotLeader:t,searchLeaderSlots:n}){if(n){const r=[],i=n.indexOf(t),o=n.indexOf(e);if(i>0)for(let a=1;a<=h1;a++){const s=n[i-a];for(let u=0;u0)for(let a=1;a<=h1;a++){const s=n[o+a];for(let u=0;u0)for(let a=r;a>r-h1;a--)o.push(a);if(i>0)for(let a=i;ag.jsx(L2e,{slot:i},i))})}var _c=(e=>(e.Past="Past",e.Now="Now",e.Upcoming="Upcoming",e))(_c||{});function B2e(e,t){return et?_c.Upcoming:_c.Now}function z2e({currentLeaderSlot:e,searchLeaderSlots:t,slotOverride:n,curCardCount:r=0,cardCount:i=1}){const o=t.toReversed();if(n===void 0){if(o.length<=i)return o[r];{const a=o.findIndex(l=>lMath.abs(l-n)),s=Math.min(...a),u=Math.max(a.indexOf(s)-3,0);return o[r+u]}}function W2e({cardCount:e,currentLeaderSlot:t,epoch:n,searchLeaderSlots:r,slotOverride:i,topSlot:o}){const a=[],s=[],u=[];if(t===void 0)return{upcoming:a,now:s,past:u};for(let l=0;ln.end_slot))continue;const d=B2e(f,t);d===_c.Upcoming&&a.push(f),d===_c.Now&&s.push(f),d===_c.Past&&u.push(f)}return{upcoming:a,now:s,past:u}}const DG=3,U2e=10,V2e=2,H2e=1;function G2e(e,t){switch(t){case"increase":return e+V2e;case"decrease":return Math.max(1,e-H2e)}}function q2e(){const e=ve(Ys),t=ve(Gt),n=ve(Di),r=ve(ii),[i,o]=S.useReducer(G2e,U2e),a=t??(e??0)+DG*Yr,{upcoming:s,now:u,past:l}=S.useMemo(()=>W2e({cardCount:i,currentLeaderSlot:e,epoch:r,searchLeaderSlots:n,slotOverride:t,topSlot:a}),[i,e,r,n,t,a]);if(e===void 0)return;if((n==null?void 0:n.length)===0)return g.jsx(Oe,{justify:"center",align:"center",style:{color:"#B2BCC9",fontSize:"24px",letterSpacing:"-0.96px",minHeight:"300px"},children:g.jsx(he,{children:"No slots found."})});const f=s[0]??u[0]??l[0]??-1,d=l[l.length-1]??u[u.length-1]??s[s.length-1]??-1;return g.jsxs(g.Fragment,{children:[!!s.length&&g.jsx(GO,{sectionName:"Upcoming",children:s.map(p=>g.jsx(HO,{slot:p,lastCardSlot:d,setCardCount:o,children:g.jsx(C_e,{slot:p},p)},p))}),!!u.length&&g.jsx(GO,{sectionName:"Now",children:u.map(p=>g.jsx(HO,{slot:p,lastCardSlot:d,setCardCount:o,children:g.jsx(E2e,{slot:p},p)},p))}),!!l.length&&g.jsx(GO,{sectionName:"Past",children:l.map(p=>g.jsx(HO,{slot:p,lastCardSlot:d,setCardCount:o,children:g.jsx(S2e,{slot:p})},p))}),g.jsx(F2e,{topCardSlotLeader:f,bottomCardSlotLeader:d})]})}function GO({children:e,sectionName:t}){const n=wi("(min-width: 700px)");return g.jsxs(Oe,{gap:"2",align:"stretch",children:[n&&g.jsxs(Oe,{direction:"column",gap:"2",align:"center",children:[g.jsx("div",{style:{width:"1px",flex:1,background:"#676767",height:"10px"}}),g.jsx(he,{style:{transform:"rotate(180deg)",writingMode:"vertical-rl",color:"#8A8A8A"},size:"2",children:t}),g.jsx("div",{style:{width:"1px",flex:1,background:"#676767",height:"10px"}})]}),g.jsx(Oe,{direction:"column",flexGrow:"1",gap:"2",minWidth:"0",children:e})]})}const K2e="_container_zd7m4_1",Z2e="_button_zd7m4_6",SI={container:K2e,button:Z2e},Y2e="data:image/svg+xml,%3csvg%20width='10'%20height='10'%20viewBox='0%200%2010%2010'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M9.67578%205L5%209.67578L0.324219%205L1.17188%204.17969L4.42578%207.43359V0.324219H5.57422V7.43359L8.85547%204.17969L9.67578%205Z'%20fill='white'/%3e%3c/svg%3e",X2e="data:image/svg+xml,%3csvg%20width='10'%20height='10'%20viewBox='0%200%2010%2010'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M0.324219%205L5%200.324219L9.67578%205L8.82812%205.82031L5.57422%202.56641V9.67578H4.42578V2.56641L1.14453%205.82031L0.324219%205Z'%20fill='white'/%3e%3c/svg%3e";function Q2e(){const[e,t]=Hi(Gt),n=ve(Ys);if(e===void 0||n===void 0)return null;const r=e<=n+DG*Yr;return g.jsx("div",{className:SI.container,children:g.jsxs(Jr,{className:SI.button,style:{bottom:r?void 0:"8px"},onClick:()=>t(void 0),children:["Skip to Now",r?g.jsx("img",{src:X2e}):g.jsx("img",{src:Y2e})]})})}function u4(e,t,n){var r=this,i=S.useRef(null),o=S.useRef(0),a=S.useRef(null),s=S.useRef([]),u=S.useRef(),l=S.useRef(),f=S.useRef(e),d=S.useRef(!0);f.current=e;var p=typeof window<"u",m=!t&&t!==0&&p;if(typeof e!="function")throw new TypeError("Expected a function");t=+t||0;var v=!!(n=n||{}).leading,y=!("trailing"in n)||!!n.trailing,_="maxWait"in n,x="debounceOnServer"in n&&!!n.debounceOnServer,w=_?Math.max(+n.maxWait||0,t):null;S.useEffect(function(){return d.current=!0,function(){d.current=!1}},[]);var C=S.useMemo(function(){var E=function($){var j=s.current,N=u.current;return s.current=u.current=null,o.current=$,l.current=f.current.apply(N,j)},O=function($,j){m&&cancelAnimationFrame(a.current),a.current=m?requestAnimationFrame($):setTimeout($,j)},T=function($){if(!d.current)return!1;var j=$-i.current;return!i.current||j>=t||j<0||_&&$-o.current>=w},A=function($){return a.current=null,y&&s.current?E($):(s.current=u.current=null,l.current)},k=function $(){var j=Date.now();if(T(j))return A(j);if(d.current){var N=t-(j-i.current),U=_?Math.min(N,w-(j-o.current)):N;O($,U)}},M=function(){if(p||x){var $=Date.now(),j=T($);if(s.current=[].slice.call(arguments),u.current=r,i.current=$,j){if(!a.current&&d.current)return o.current=i.current,O(k,t),v?E(i.current):l.current;if(_)return O(k,t),E(i.current)}return a.current||O(k,t),l.current}};return M.cancel=function(){a.current&&(m?cancelAnimationFrame(a.current):clearTimeout(a.current)),o.current=0,s.current=i.current=u.current=a.current=null},M.isPending=function(){return!!a.current},M.flush=function(){return a.current?A(Date.now()):l.current},M},[v,_,t,w,y,m,p,x]);return C}function oc(e,t,n){var r={},i=r.leading,o=r.trailing;return u4(e,t,{maxWait:t,leading:i===void 0||i,trailing:o===void 0||o})}const J2e="_label_12pep_1",ewe="_progress_12pep_5",twe="_value_12pep_15",qO={label:J2e,progress:ewe,value:twe};function l4(){const e=ve(uH),t=ve(lx),n=ve(sH),r=t??n,i=ve(Nr),o=ve(lH),a=ve(C2),[s,u]=S.useState(i);rf(()=>{u(d=>{if(!i)return d;if(!d)return i;const p=d-i;return p>10?d-Math.trunc(p/2):p>4?d:p<-4?d-Math.trunc(p/2):d+1})},a);const l=S.useMemo(()=>{if(!(r==null||s==null))return Ct.fromMillis(a*(r-s)).rescale()},[s,r,a]),f=S.useMemo(()=>{if(e==null||r==null||s==null)return;const d=r-e,m=(s-e)/d*100;return m<0||m>100?0:m},[s,r,e]);return{progressSinceLastLeader:o?100:f??0,nextSlotText:o?"Now":nf(l),nextLeaderSlot:o?i:r}}function nwe(){const{progressSinceLastLeader:e,nextSlotText:t,nextLeaderSlot:n}=l4(),r=n!==void 0?` (${n})`:"";return g.jsxs(Oe,{align:"center",gap:"2",children:[g.jsxs(he,{className:qO.label,children:["Next leader slot",r]}),g.jsx(a0,{value:e,className:qO.progress}),g.jsx(he,{className:qO.value,children:t})]})}const rwe="_container_2po9i_1",iwe="_search-box_2po9i_18",owe="_label_2po9i_29",awe="_my-slots_2po9i_33",swe="_skipped-slots_2po9i_63",uwe="_disabled_2po9i_93",lwe="_skip-rate-label_2po9i_103",cwe="_skip-rate-value_2po9i_108",Ua={container:rwe,searchBox:iwe,label:owe,mySlots:awe,skippedSlots:swe,disabled:uwe,skipRateLabel:lwe,skipRateValue:cwe};function c4(){const{searchType:e}=fg.useSearch(),t=s0({from:fg.fullPath}),n=S.useCallback(r=>{t({search:{searchType:r},replace:!0})},[t]);return{searchType:e,setSearchType:n}}function fwe(){const{searchText:e}=fg.useSearch(),t=s0({from:fg.fullPath}),n=S.useCallback(r=>{t({search:{searchText:r,searchType:Hr.text},replace:!0})},[t]);return{searchText:e,setSearchText:n}}const dwe=Ee(e=>!!e(Ys));function hwe(){const e=ve(dwe),t=Je(T0e),n=Je(Gt),{searchType:r}=c4(),{searchText:i,setSearchText:o}=fwe(),[a,s]=S.useState(i),u=u4(f=>{t(f),o(f)},1e3);S.useEffect(()=>{!u.isPending()&&a!==i&&s(i)},[u,a,i]);const l=()=>{o(""),n(void 0),t("")};if(O2(()=>{r===Hr.text&&t(i)}),!!e)return g.jsxs(Oe,{className:Ua.container,gap:"2",wrap:"wrap",children:[g.jsx(Mn,{className:Ua.searchBox,children:g.jsxs(aU,{placeholder:"Name, pubkey, or slot (separate with , or ; for multiple values)",variant:"soft",color:"gray",onChange:f=>{s(f.currentTarget.value),u(f.currentTarget.value)},value:a,children:[g.jsx(HT,{children:g.jsx(hbe,{height:"16",width:"16",style:{color:"#AFB2C2"}})}),a&&g.jsx(HT,{children:g.jsx(Ub,{size:"1",variant:"ghost",children:g.jsx(sbe,{height:"14",width:"14",style:{color:"#AFB2C2"},onClick:l})})})]})}),g.jsx(mwe,{resetSearchText:l}),g.jsx(vwe,{resetSearchText:l}),g.jsx(pwe,{}),g.jsx(Mn,{flexGrow:"1"}),g.jsx(nwe,{})]})}function pwe(){const e=ve(fH);let t="-";return e!==void 0&&(t=(e.skip_rate*100).toLocaleString(void 0,{minimumFractionDigits:0,maximumFractionDigits:2}),t+="%"),g.jsxs(Oe,{justify:"center",align:"center",gap:"1",children:[g.jsx(he,{className:Ua.skipRateLabel,children:"Skip Rate"}),g.jsx(he,{className:e?Ua.skipRateValue:Ua.skipRateLabel,children:t})]})}function mwe({resetSearchText:e}){const t=ve(Lc),n=Je(Di),r=Je(Gt),{searchType:i,setSearchType:o}=c4(),a=((t==null?void 0:t.length)??0)*4,s=S.useCallback(()=>{n(t)},[n,t]);S.useEffect(()=>{i===Hr.mySlots&&n(t)},[t,n]);const u=()=>{e(),r(void 0),i===Hr.mySlots?o(Hr.text):(o(Hr.mySlots),s())},l=i===Hr.mySlots,f=!(t!=null&&t.length);return g.jsx(Cn,{content:"Number of slots this validator is leader in the current epoch. Toggle to filter",children:g.jsx("div",{children:g.jsx(np,{children:g.jsxs(Yk,{className:`${Ua.mySlots}`,onClick:u,"aria-label":"Toggle my slots",pressed:l,disabled:f,children:[g.jsx(he,{className:Ua.label,children:"My Slots"}),g.jsx(he,{children:a})]})})})})}function vwe({resetSearchText:e}){const t=ve(v2),n=Je(Di),r=Je(Gt),{searchType:i,setSearchType:o}=c4(),a=(t==null?void 0:t.length)??0,s=S.useCallback(()=>{const d=t==null?void 0:t.map(p=>p-p%4);n([...new Set(d)])},[n,t]);S.useEffect(()=>{i===Hr.skippedSlots&&s()},[s]);const u=()=>{e(),r(void 0),i===Hr.skippedSlots?o(Hr.text):t!=null&&t.length&&(o(Hr.skippedSlots),s())},l=i===Hr.skippedSlots,f=!(t!=null&&t.length);return g.jsx(Cn,{content:"Number of slots this validator has skipped in the current epoch since it was last restarted. Toggle to filter",children:g.jsx("div",{children:g.jsx(np,{children:g.jsxs(Yk,{className:`${Ua.skippedSlots} ${f?Ua.disabled:""}`,onClick:u,"aria-label":"Toggle skipped slots",pressed:l,disabled:!l&&f,children:[g.jsx(he,{className:Ua.label,children:"My Skipped Slots"}),g.jsx(he,{children:a})]})})})})}var FG={exports:{}};/*! Hammer.JS - v2.0.7 - 2016-04-22 * http://hammerjs.github.io/ * * Copyright (c) 2016 Jorik Tangelder; * Licensed under the MIT license */(function(e){(function(t,n,r,i){var o=["","webkit","Moz","MS","ms","o"],a=n.createElement("div"),s="function",u=Math.round,l=Math.abs,f=Date.now;function d(I,V,X){return setTimeout(C(I,X),V)}function p(I,V,X){return Array.isArray(I)?(m(I,X[V],X),!0):!1}function m(I,V,X){var oe;if(I)if(I.forEach)I.forEach(V,X);else if(I.length!==i)for(oe=0;oe\s*\(/gm,"{anonymous}()@"):"Unknown Stack Trace",bt=t.console&&(t.console.warn||t.console.log);return bt&&bt.call(t.console,oe,Be),I.apply(this,arguments)}}var y;typeof Object.assign!="function"?y=function(V){if(V===i||V===null)throw new TypeError("Cannot convert undefined or null to object");for(var X=Object(V),oe=1;oe-1}function $(I){return I.trim().split(/\s+/g)}function j(I,V,X){if(I.indexOf&&!X)return I.indexOf(V);for(var oe=0;oetr[V]}),oe}function B(I,V){for(var X,oe,xe=V[0].toUpperCase()+V.slice(1),Be=0;Be1&&!X.firstMultiple?X.firstMultiple=$n(V):xe===1&&(X.firstMultiple=!1);var Be=X.firstInput,bt=X.firstMultiple,In=bt?bt.center:Be.center,zn=V.center=Gn(oe);V.timeStamp=f(),V.deltaTime=V.timeStamp-Be.timeStamp,V.angle=er(In,zn),V.distance=Yt(In,zn),Fe(X,V),V.offsetDirection=sr(V.deltaX,V.deltaY);var tr=yr(V.deltaTime,V.deltaX,V.deltaY);V.overallVelocityX=tr.x,V.overallVelocityY=tr.y,V.overallVelocity=l(tr.x)>l(tr.y)?tr.x:tr.y,V.scale=bt?Rn(bt.pointers,oe):1,V.rotation=bt?br(bt.pointers,oe):0,V.maxPointers=X.prevInput?V.pointers.length>X.prevInput.maxPointers?V.pointers.length:X.prevInput.maxPointers:V.pointers.length,Ut(X,V);var to=I.element;k(V.srcEvent.target,to)&&(to=V.srcEvent.target),V.target=to}function Fe(I,V){var X=V.center,oe=I.offsetDelta||{},xe=I.prevDelta||{},Be=I.prevInput||{};(V.eventType===_e||Be.eventType===ae)&&(xe=I.prevDelta={x:Be.deltaX||0,y:Be.deltaY||0},oe=I.offsetDelta={x:X.x,y:X.y}),V.deltaX=xe.x+(X.x-oe.x),V.deltaY=xe.y+(X.y-oe.y)}function Ut(I,V){var X=I.lastInterval||V,oe=V.timeStamp-X.timeStamp,xe,Be,bt,In;if(V.eventType!=Te&&(oe>ge||X.velocity===i)){var zn=V.deltaX-X.deltaX,tr=V.deltaY-X.deltaY,to=yr(oe,zn,tr);Be=to.x,bt=to.y,xe=l(to.x)>l(to.y)?to.x:to.y,In=sr(zn,tr),I.lastInterval=V}else xe=X.velocity,Be=X.velocityX,bt=X.velocityY,In=X.direction;V.velocity=xe,V.velocityX=Be,V.velocityY=bt,V.direction=In}function $n(I){for(var V=[],X=0;X=l(V)?I<0?fe:Ze:V<0?De:He}function Yt(I,V,X){X||(X=Lt);var oe=V[X[0]]-I[X[0]],xe=V[X[1]]-I[X[1]];return Math.sqrt(oe*oe+xe*xe)}function er(I,V,X){X||(X=Lt);var oe=V[X[0]]-I[X[0]],xe=V[X[1]]-I[X[1]];return Math.atan2(xe,oe)*180/Math.PI}function br(I,V){return er(V[1],V[0],Mt)+er(I[1],I[0],Mt)}function Rn(I,V){return Yt(V[0],V[1],Mt)/Yt(I[0],I[1],Mt)}var Sl={mousedown:_e,mousemove:ke,mouseup:ae},nu="mousedown",Cl="mousemove mouseup";function ru(){this.evEl=nu,this.evWin=Cl,this.pressed=!1,Pe.apply(this,arguments)}w(ru,Pe,{handler:function(V){var X=Sl[V.type];X&_e&&V.button===0&&(this.pressed=!0),X&ke&&V.which!==1&&(X=ae),this.pressed&&(X&ae&&(this.pressed=!1),this.callback(this.manager,X,{pointers:[V],changedPointers:[V],pointerType:le,srcEvent:V}))}});var kp={pointerdown:_e,pointermove:ke,pointerup:ae,pointercancel:Te,pointerout:Te},Mp={2:K,3:ie,4:le,5:ue},Ol="pointerdown",iu="pointermove pointerup pointercancel";t.MSPointerEvent&&!t.PointerEvent&&(Ol="MSPointerDown",iu="MSPointerMove MSPointerUp MSPointerCancel");function El(){this.evEl=Ol,this.evWin=iu,Pe.apply(this,arguments),this.store=this.manager.session.pointerEvents=[]}w(El,Pe,{handler:function(V){var X=this.store,oe=!1,xe=V.type.toLowerCase().replace("ms",""),Be=kp[xe],bt=Mp[V.pointerType]||V.pointerType,In=bt==K,zn=j(X,V.pointerId,"pointerId");Be&_e&&(V.button===0||In)?zn<0&&(X.push(V),zn=X.length-1):Be&(ae|Te)&&(oe=!0),!(zn<0)&&(X[zn]=V,this.callback(this.manager,Be,{pointers:X,changedPointers:[V],pointerType:bt,srcEvent:V}),oe&&X.splice(zn,1))}});var $p={touchstart:_e,touchmove:ke,touchend:ae,touchcancel:Te},Rp="touchstart",jp="touchstart touchmove touchend touchcancel";function ou(){this.evTarget=Rp,this.evWin=jp,this.started=!1,Pe.apply(this,arguments)}w(ou,Pe,{handler:function(V){var X=$p[V.type];if(X===_e&&(this.started=!0),!!this.started){var oe=df.call(this,V,X);X&(ae|Te)&&oe[0].length-oe[1].length===0&&(this.started=!1),this.callback(this.manager,X,{pointers:oe[0],changedPointers:oe[1],pointerType:K,srcEvent:V})}}});function df(I,V){var X=N(I.touches),oe=N(I.changedTouches);return V&(ae|Te)&&(X=U(X.concat(oe),"identifier")),[X,oe]}var hf={touchstart:_e,touchmove:ke,touchend:ae,touchcancel:Te},pf="touchstart touchmove touchend touchcancel";function Ea(){this.evTarget=pf,this.targetIds={},Pe.apply(this,arguments)}w(Ea,Pe,{handler:function(V){var X=hf[V.type],oe=mf.call(this,V,X);oe&&this.callback(this.manager,X,{pointers:oe[0],changedPointers:oe[1],pointerType:K,srcEvent:V})}});function mf(I,V){var X=N(I.touches),oe=this.targetIds;if(V&(_e|ke)&&X.length===1)return oe[X[0].identifier]=!0,[X,X];var xe,Be,bt=N(I.changedTouches),In=[],zn=this.target;if(Be=X.filter(function(tr){return k(tr.target,zn)}),V===_e)for(xe=0;xe-1&&oe.splice(Be,1)};setTimeout(xe,Tl)}}function gf(I){for(var V=I.srcEvent.clientX,X=I.srcEvent.clientY,oe=0;oe-1&&this.requireFail.splice(V,1),this},hasRequireFailures:function(){return this.requireFail.length>0},canRecognizeWith:function(I){return!!this.simultaneous[I.id]},emit:function(I){var V=this,X=this.state;function oe(xe){V.manager.emit(xe,I)}X=Dr&&oe(V.options.event+B0(X))},tryEmit:function(I){if(this.canEmit())return this.emit(I);this.state=Oi},canEmit:function(){for(var I=0;IV.threshold&&xe&V.direction},attrTest:function(I){return ui.prototype.attrTest.call(this,I)&&(this.state&jn||!(this.state&jn)&&this.directionTest(I))},emit:function(I){this.pX=I.deltaX,this.pY=I.deltaY;var V=z0(I.direction);V&&(I.additionalEvent=this.options.event+V),this._super.emit.call(this,I)}});function xf(){ui.apply(this,arguments)}w(xf,ui,{defaults:{event:"pinch",threshold:0,pointers:2},getTouchAction:function(){return[Qi]},attrTest:function(I){return this._super.attrTest.call(this,I)&&(Math.abs(I.scale-1)>this.options.threshold||this.state&jn)},emit:function(I){if(I.scale!==1){var V=I.scale<1?"in":"out";I.additionalEvent=this.options.event+V}this._super.emit.call(this,I)}});function Rl(){Bo.apply(this,arguments),this._timer=null,this._input=null}w(Rl,Bo,{defaults:{event:"press",pointers:1,time:251,threshold:9},getTouchAction:function(){return[Do]},process:function(I){var V=this.options,X=I.pointers.length===V.pointers,oe=I.distanceV.time;if(this._input=I,!oe||!X||I.eventType&(ae|Te)&&!xe)this.reset();else if(I.eventType&_e)this.reset(),this._timer=d(function(){this.state=si,this.tryEmit()},V.time,this);else if(I.eventType&ae)return si;return Oi},reset:function(){clearTimeout(this._timer)},emit:function(I){this.state===si&&(I&&I.eventType&ae?this.manager.emit(this.options.event+"up",I):(this._input.timeStamp=f(),this.manager.emit(this.options.event,this._input)))}});function Lp(){ui.apply(this,arguments)}w(Lp,ui,{defaults:{event:"rotate",threshold:0,pointers:2},getTouchAction:function(){return[Qi]},attrTest:function(I){return this._super.attrTest.call(this,I)&&(Math.abs(I.rotation)>this.options.threshold||this.state&jn)}});function _f(){ui.apply(this,arguments)}w(_f,ui,{defaults:{event:"swipe",threshold:10,velocity:.3,direction:Qe|Ge,pointers:1},getTouchAction:function(){return $l.prototype.getTouchAction.call(this)},attrTest:function(I){var V=this.options.direction,X;return V&(Qe|Ge)?X=I.overallVelocity:V&Qe?X=I.overallVelocityX:V&Ge&&(X=I.overallVelocityY),this._super.attrTest.call(this,I)&&V&I.offsetDirection&&I.distance>this.options.threshold&&I.maxPointers==this.options.pointers&&l(X)>this.options.velocity&&I.eventType&ae},emit:function(I){var V=z0(I.offsetDirection);V&&this.manager.emit(this.options.event+V,I),this.manager.emit(this.options.event,I)}});function is(){Bo.apply(this,arguments),this.pTime=!1,this.pCenter=!1,this._timer=null,this._input=null,this.count=0}w(is,Bo,{defaults:{event:"tap",pointers:1,taps:1,interval:300,time:250,threshold:9,posThreshold:10},getTouchAction:function(){return[kl]},process:function(I){var V=this.options,X=I.pointers.length===V.pointers,oe=I.distance0?-1:1)}const bwe=function(){let e=0,t=null;return Ee(null,(n,r,i)=>{t&&clearTimeout(t),i*e<0&&(e=0);const o=n(Nr);if(o===void 0)return;const a=n(Gt),s=a&&a=s){const u=e%100;r(A0e,ywe(e/s)),e=u}t=setTimeout(()=>e=0,100)})}();function xwe(){const e=Je(bwe),t=Je(s2e),n=S.useRef(null),r=i=>{i.altKey||i.ctrlKey||i.metaKey||i.shiftKey||!i.deltaY||e(i.deltaY)};return E2(()=>t()),S.useEffect(()=>{if(!n.current)return;const i=new sv(n.current);return i.get("pan").set({direction:sv.DIRECTION_VERTICAL}),i.on("panup pandown",o=>{var a;o.pointerType.includes("touch")&&e(-(((a=o.changedPointers[0])==null?void 0:a.movementY)??0)*5)}),()=>{i.destroy()}},[e]),g.jsxs(u5,{overflow:"hidden",flexShrink:"1",onWheel:r,maxWidth:"1200px",className:D2.scroll,ref:n,children:[g.jsx(hwe,{}),g.jsx(Q2e,{}),g.jsx(Oe,{direction:"column",gap:"4",children:g.jsx(q2e,{})})]})}function _we(){const e=ve(ii),t=Je(Gt);O2(()=>t(void 0));const n=r=>{r.button===1&&t(void 0)};if(e)return g.jsx(Oe,{direction:"column",gap:"4",maxHeight:"calc(100vh - var(--header-height))",onMouseDown:n,style:{padding:"4px 12px"},children:g.jsx(xwe,{})})}var jt;(function(e){e.assertEqual=i=>i;function t(i){}e.assertIs=t;function n(i){throw new Error}e.assertNever=n,e.arrayToEnum=i=>{const o={};for(const a of i)o[a]=a;return o},e.getValidEnumValues=i=>{const o=e.objectKeys(i).filter(s=>typeof i[i[s]]!="number"),a={};for(const s of o)a[s]=i[s];return e.objectValues(a)},e.objectValues=i=>e.objectKeys(i).map(function(o){return i[o]}),e.objectKeys=typeof Object.keys=="function"?i=>Object.keys(i):i=>{const o=[];for(const a in i)Object.prototype.hasOwnProperty.call(i,a)&&o.push(a);return o},e.find=(i,o)=>{for(const a of i)if(o(a))return a},e.isInteger=typeof Number.isInteger=="function"?i=>Number.isInteger(i):i=>typeof i=="number"&&isFinite(i)&&Math.floor(i)===i;function r(i,o=" | "){return i.map(a=>typeof a=="string"?`'${a}'`:a).join(o)}e.joinValues=r,e.jsonStringifyReplacer=(i,o)=>typeof o=="bigint"?o.toString():o})(jt||(jt={}));var $3;(function(e){e.mergeShapes=(t,n)=>({...t,...n})})($3||($3={}));const ze=jt.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),_s=e=>{switch(typeof e){case"undefined":return ze.undefined;case"string":return ze.string;case"number":return isNaN(e)?ze.nan:ze.number;case"boolean":return ze.boolean;case"function":return ze.function;case"bigint":return ze.bigint;case"symbol":return ze.symbol;case"object":return Array.isArray(e)?ze.array:e===null?ze.null:e.then&&typeof e.then=="function"&&e.catch&&typeof e.catch=="function"?ze.promise:typeof Map<"u"&&e instanceof Map?ze.map:typeof Set<"u"&&e instanceof Set?ze.set:typeof Date<"u"&&e instanceof Date?ze.date:ze.object;default:return ze.unknown}},we=jt.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]),wwe=e=>JSON.stringify(e,null,2).replace(/"([^"]+)":/g,"$1:");class Si extends Error{get errors(){return this.issues}constructor(t){super(),this.issues=[],this.addIssue=r=>{this.issues=[...this.issues,r]},this.addIssues=(r=[])=>{this.issues=[...this.issues,...r]};const n=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,n):this.__proto__=n,this.name="ZodError",this.issues=t}format(t){const n=t||function(o){return o.message},r={_errors:[]},i=o=>{for(const a of o.issues)if(a.code==="invalid_union")a.unionErrors.map(i);else if(a.code==="invalid_return_type")i(a.returnTypeError);else if(a.code==="invalid_arguments")i(a.argumentsError);else if(a.path.length===0)r._errors.push(n(a));else{let s=r,u=0;for(;un.message){const n={},r=[];for(const i of this.issues)i.path.length>0?(n[i.path[0]]=n[i.path[0]]||[],n[i.path[0]].push(t(i))):r.push(t(i));return{formErrors:r,fieldErrors:n}}get formErrors(){return this.flatten()}}Si.create=e=>new Si(e);const vh=(e,t)=>{let n;switch(e.code){case we.invalid_type:e.received===ze.undefined?n="Required":n=`Expected ${e.expected}, received ${e.received}`;break;case we.invalid_literal:n=`Invalid literal value, expected ${JSON.stringify(e.expected,jt.jsonStringifyReplacer)}`;break;case we.unrecognized_keys:n=`Unrecognized key(s) in object: ${jt.joinValues(e.keys,", ")}`;break;case we.invalid_union:n="Invalid input";break;case we.invalid_union_discriminator:n=`Invalid discriminator value. Expected ${jt.joinValues(e.options)}`;break;case we.invalid_enum_value:n=`Invalid enum value. Expected ${jt.joinValues(e.options)}, received '${e.received}'`;break;case we.invalid_arguments:n="Invalid function arguments";break;case we.invalid_return_type:n="Invalid function return type";break;case we.invalid_date:n="Invalid date";break;case we.invalid_string:typeof e.validation=="object"?"includes"in e.validation?(n=`Invalid input: must include "${e.validation.includes}"`,typeof e.validation.position=="number"&&(n=`${n} at one or more positions greater than or equal to ${e.validation.position}`)):"startsWith"in e.validation?n=`Invalid input: must start with "${e.validation.startsWith}"`:"endsWith"in e.validation?n=`Invalid input: must end with "${e.validation.endsWith}"`:jt.assertNever(e.validation):e.validation!=="regex"?n=`Invalid ${e.validation}`:n="Invalid";break;case we.too_small:e.type==="array"?n=`Array must contain ${e.exact?"exactly":e.inclusive?"at least":"more than"} ${e.minimum} element(s)`:e.type==="string"?n=`String must contain ${e.exact?"exactly":e.inclusive?"at least":"over"} ${e.minimum} character(s)`:e.type==="number"?n=`Number must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${e.minimum}`:e.type==="date"?n=`Date must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(e.minimum))}`:n="Invalid input";break;case we.too_big:e.type==="array"?n=`Array must contain ${e.exact?"exactly":e.inclusive?"at most":"less than"} ${e.maximum} element(s)`:e.type==="string"?n=`String must contain ${e.exact?"exactly":e.inclusive?"at most":"under"} ${e.maximum} character(s)`:e.type==="number"?n=`Number must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="bigint"?n=`BigInt must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="date"?n=`Date must be ${e.exact?"exactly":e.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(e.maximum))}`:n="Invalid input";break;case we.custom:n="Invalid input";break;case we.invalid_intersection_types:n="Intersection results could not be merged";break;case we.not_multiple_of:n=`Number must be a multiple of ${e.multipleOf}`;break;case we.not_finite:n="Number must be finite";break;default:n=t.defaultError,jt.assertNever(e)}return{message:n}};let BG=vh;function Swe(e){BG=e}function mx(){return BG}const vx=e=>{const{data:t,path:n,errorMaps:r,issueData:i}=e,o=[...n,...i.path||[]],a={...i,path:o};if(i.message!==void 0)return{...i,path:o,message:i.message};let s="";const u=r.filter(l=>!!l).slice().reverse();for(const l of u)s=l(a,{data:t,defaultError:s}).message;return{...i,path:o,message:s}},Cwe=[];function Ie(e,t){const n=mx(),r=vx({issueData:t,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,n,n===vh?void 0:vh].filter(i=>!!i)});e.common.issues.push(r)}class Ir{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(t,n){const r=[];for(const i of n){if(i.status==="aborted")return ut;i.status==="dirty"&&t.dirty(),r.push(i.value)}return{status:t.value,value:r}}static async mergeObjectAsync(t,n){const r=[];for(const i of n){const o=await i.key,a=await i.value;r.push({key:o,value:a})}return Ir.mergeObjectSync(t,r)}static mergeObjectSync(t,n){const r={};for(const i of n){const{key:o,value:a}=i;if(o.status==="aborted"||a.status==="aborted")return ut;o.status==="dirty"&&t.dirty(),a.status==="dirty"&&t.dirty(),o.value!=="__proto__"&&(typeof a.value<"u"||i.alwaysSet)&&(r[o.value]=a.value)}return{status:t.value,value:r}}}const ut=Object.freeze({status:"aborted"}),bd=e=>({status:"dirty",value:e}),ei=e=>({status:"valid",value:e}),R3=e=>e.status==="aborted",j3=e=>e.status==="dirty",Fc=e=>e.status==="valid",Qv=e=>typeof Promise<"u"&&e instanceof Promise;function gx(e,t,n,r){if(typeof t=="function"?e!==t||!0:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return t.get(e)}function zG(e,t,n,r,i){if(typeof t=="function"?e!==t||!0:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return t.set(e,n),n}var Ke;(function(e){e.errToObj=t=>typeof t=="string"?{message:t}:t||{},e.toString=t=>typeof t=="string"?t:t==null?void 0:t.message})(Ke||(Ke={}));var Bm,zm;class Za{constructor(t,n,r,i){this._cachedPath=[],this.parent=t,this.data=n,this._path=r,this._key=i}get path(){return this._cachedPath.length||(this._key instanceof Array?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}}const CI=(e,t)=>{if(Fc(t))return{success:!0,data:t.value};if(!e.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;const n=new Si(e.common.issues);return this._error=n,this._error}}};function pt(e){if(!e)return{};const{errorMap:t,invalid_type_error:n,required_error:r,description:i}=e;if(t&&(n||r))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return t?{errorMap:t,description:i}:{errorMap:(a,s)=>{var u,l;const{message:f}=e;return a.code==="invalid_enum_value"?{message:f??s.defaultError}:typeof s.data>"u"?{message:(u=f??r)!==null&&u!==void 0?u:s.defaultError}:a.code!=="invalid_type"?{message:s.defaultError}:{message:(l=f??n)!==null&&l!==void 0?l:s.defaultError}},description:i}}class _t{get description(){return this._def.description}_getType(t){return _s(t.data)}_getOrReturnCtx(t,n){return n||{common:t.parent.common,data:t.data,parsedType:_s(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}_processInputParams(t){return{status:new Ir,ctx:{common:t.parent.common,data:t.data,parsedType:_s(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}}_parseSync(t){const n=this._parse(t);if(Qv(n))throw new Error("Synchronous parse encountered promise.");return n}_parseAsync(t){const n=this._parse(t);return Promise.resolve(n)}parse(t,n){const r=this.safeParse(t,n);if(r.success)return r.data;throw r.error}safeParse(t,n){var r;const i={common:{issues:[],async:(r=n==null?void 0:n.async)!==null&&r!==void 0?r:!1,contextualErrorMap:n==null?void 0:n.errorMap},path:(n==null?void 0:n.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:_s(t)},o=this._parseSync({data:t,path:i.path,parent:i});return CI(i,o)}"~validate"(t){var n,r;const i={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:_s(t)};if(!this["~standard"].async)try{const o=this._parseSync({data:t,path:[],parent:i});return Fc(o)?{value:o.value}:{issues:i.common.issues}}catch(o){!((r=(n=o==null?void 0:o.message)===null||n===void 0?void 0:n.toLowerCase())===null||r===void 0)&&r.includes("encountered")&&(this["~standard"].async=!0),i.common={issues:[],async:!0}}return this._parseAsync({data:t,path:[],parent:i}).then(o=>Fc(o)?{value:o.value}:{issues:i.common.issues})}async parseAsync(t,n){const r=await this.safeParseAsync(t,n);if(r.success)return r.data;throw r.error}async safeParseAsync(t,n){const r={common:{issues:[],contextualErrorMap:n==null?void 0:n.errorMap,async:!0},path:(n==null?void 0:n.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:_s(t)},i=this._parse({data:t,path:r.path,parent:r}),o=await(Qv(i)?i:Promise.resolve(i));return CI(r,o)}refine(t,n){const r=i=>typeof n=="string"||typeof n>"u"?{message:n}:typeof n=="function"?n(i):n;return this._refinement((i,o)=>{const a=t(i),s=()=>o.addIssue({code:we.custom,...r(i)});return typeof Promise<"u"&&a instanceof Promise?a.then(u=>u?!0:(s(),!1)):a?!0:(s(),!1)})}refinement(t,n){return this._refinement((r,i)=>t(r)?!0:(i.addIssue(typeof n=="function"?n(r,i):n),!1))}_refinement(t){return new Sa({schema:this,typeName:st.ZodEffects,effect:{type:"refinement",refinement:t}})}superRefine(t){return this._refinement(t)}constructor(t){this.spa=this.safeParseAsync,this._def=t,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this),this["~standard"]={version:1,vendor:"zod",validate:n=>this["~validate"](n)}}optional(){return Va.create(this,this._def)}nullable(){return cl.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return ma.create(this)}promise(){return yh.create(this,this._def)}or(t){return ng.create([this,t],this._def)}and(t){return rg.create(this,t,this._def)}transform(t){return new Sa({...pt(this._def),schema:this,typeName:st.ZodEffects,effect:{type:"transform",transform:t}})}default(t){const n=typeof t=="function"?t:()=>t;return new ug({...pt(this._def),innerType:this,defaultValue:n,typeName:st.ZodDefault})}brand(){return new f4({typeName:st.ZodBranded,type:this,...pt(this._def)})}catch(t){const n=typeof t=="function"?t:()=>t;return new lg({...pt(this._def),innerType:this,catchValue:n,typeName:st.ZodCatch})}describe(t){const n=this.constructor;return new n({...this._def,description:t})}pipe(t){return w0.create(this,t)}readonly(){return cg.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const Owe=/^c[^\s-]{8,}$/i,Ewe=/^[0-9a-z]+$/,Twe=/^[0-9A-HJKMNP-TV-Z]{26}$/i,Pwe=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,Awe=/^[a-z0-9_-]{21}$/i,kwe=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,Mwe=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,$we=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,Rwe="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let KO;const jwe=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,Iwe=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/,Nwe=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/,Lwe=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,Dwe=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,Fwe=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,WG="((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))",Bwe=new RegExp(`^${WG}$`);function UG(e){let t="([01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d";return e.precision?t=`${t}\\.\\d{${e.precision}}`:e.precision==null&&(t=`${t}(\\.\\d+)?`),t}function zwe(e){return new RegExp(`^${UG(e)}$`)}function VG(e){let t=`${WG}T${UG(e)}`;const n=[];return n.push(e.local?"Z?":"Z"),e.offset&&n.push("([+-]\\d{2}:?\\d{2})"),t=`${t}(${n.join("|")})`,new RegExp(`^${t}$`)}function Wwe(e,t){return!!((t==="v4"||!t)&&jwe.test(e)||(t==="v6"||!t)&&Nwe.test(e))}function Uwe(e,t){if(!kwe.test(e))return!1;try{const[n]=e.split("."),r=n.replace(/-/g,"+").replace(/_/g,"/").padEnd(n.length+(4-n.length%4)%4,"="),i=JSON.parse(atob(r));return!(typeof i!="object"||i===null||!i.typ||!i.alg||t&&i.alg!==t)}catch{return!1}}function Vwe(e,t){return!!((t==="v4"||!t)&&Iwe.test(e)||(t==="v6"||!t)&&Lwe.test(e))}class fa extends _t{_parse(t){if(this._def.coerce&&(t.data=String(t.data)),this._getType(t)!==ze.string){const o=this._getOrReturnCtx(t);return Ie(o,{code:we.invalid_type,expected:ze.string,received:o.parsedType}),ut}const r=new Ir;let i;for(const o of this._def.checks)if(o.kind==="min")t.data.lengtho.value&&(i=this._getOrReturnCtx(t,i),Ie(i,{code:we.too_big,maximum:o.value,type:"string",inclusive:!0,exact:!1,message:o.message}),r.dirty());else if(o.kind==="length"){const a=t.data.length>o.value,s=t.data.lengtht.test(i),{validation:n,code:we.invalid_string,...Ke.errToObj(r)})}_addCheck(t){return new fa({...this._def,checks:[...this._def.checks,t]})}email(t){return this._addCheck({kind:"email",...Ke.errToObj(t)})}url(t){return this._addCheck({kind:"url",...Ke.errToObj(t)})}emoji(t){return this._addCheck({kind:"emoji",...Ke.errToObj(t)})}uuid(t){return this._addCheck({kind:"uuid",...Ke.errToObj(t)})}nanoid(t){return this._addCheck({kind:"nanoid",...Ke.errToObj(t)})}cuid(t){return this._addCheck({kind:"cuid",...Ke.errToObj(t)})}cuid2(t){return this._addCheck({kind:"cuid2",...Ke.errToObj(t)})}ulid(t){return this._addCheck({kind:"ulid",...Ke.errToObj(t)})}base64(t){return this._addCheck({kind:"base64",...Ke.errToObj(t)})}base64url(t){return this._addCheck({kind:"base64url",...Ke.errToObj(t)})}jwt(t){return this._addCheck({kind:"jwt",...Ke.errToObj(t)})}ip(t){return this._addCheck({kind:"ip",...Ke.errToObj(t)})}cidr(t){return this._addCheck({kind:"cidr",...Ke.errToObj(t)})}datetime(t){var n,r;return typeof t=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:t}):this._addCheck({kind:"datetime",precision:typeof(t==null?void 0:t.precision)>"u"?null:t==null?void 0:t.precision,offset:(n=t==null?void 0:t.offset)!==null&&n!==void 0?n:!1,local:(r=t==null?void 0:t.local)!==null&&r!==void 0?r:!1,...Ke.errToObj(t==null?void 0:t.message)})}date(t){return this._addCheck({kind:"date",message:t})}time(t){return typeof t=="string"?this._addCheck({kind:"time",precision:null,message:t}):this._addCheck({kind:"time",precision:typeof(t==null?void 0:t.precision)>"u"?null:t==null?void 0:t.precision,...Ke.errToObj(t==null?void 0:t.message)})}duration(t){return this._addCheck({kind:"duration",...Ke.errToObj(t)})}regex(t,n){return this._addCheck({kind:"regex",regex:t,...Ke.errToObj(n)})}includes(t,n){return this._addCheck({kind:"includes",value:t,position:n==null?void 0:n.position,...Ke.errToObj(n==null?void 0:n.message)})}startsWith(t,n){return this._addCheck({kind:"startsWith",value:t,...Ke.errToObj(n)})}endsWith(t,n){return this._addCheck({kind:"endsWith",value:t,...Ke.errToObj(n)})}min(t,n){return this._addCheck({kind:"min",value:t,...Ke.errToObj(n)})}max(t,n){return this._addCheck({kind:"max",value:t,...Ke.errToObj(n)})}length(t,n){return this._addCheck({kind:"length",value:t,...Ke.errToObj(n)})}nonempty(t){return this.min(1,Ke.errToObj(t))}trim(){return new fa({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new fa({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new fa({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(t=>t.kind==="datetime")}get isDate(){return!!this._def.checks.find(t=>t.kind==="date")}get isTime(){return!!this._def.checks.find(t=>t.kind==="time")}get isDuration(){return!!this._def.checks.find(t=>t.kind==="duration")}get isEmail(){return!!this._def.checks.find(t=>t.kind==="email")}get isURL(){return!!this._def.checks.find(t=>t.kind==="url")}get isEmoji(){return!!this._def.checks.find(t=>t.kind==="emoji")}get isUUID(){return!!this._def.checks.find(t=>t.kind==="uuid")}get isNANOID(){return!!this._def.checks.find(t=>t.kind==="nanoid")}get isCUID(){return!!this._def.checks.find(t=>t.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(t=>t.kind==="cuid2")}get isULID(){return!!this._def.checks.find(t=>t.kind==="ulid")}get isIP(){return!!this._def.checks.find(t=>t.kind==="ip")}get isCIDR(){return!!this._def.checks.find(t=>t.kind==="cidr")}get isBase64(){return!!this._def.checks.find(t=>t.kind==="base64")}get isBase64url(){return!!this._def.checks.find(t=>t.kind==="base64url")}get minLength(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxLength(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value{var t;return new fa({checks:[],typeName:st.ZodString,coerce:(t=e==null?void 0:e.coerce)!==null&&t!==void 0?t:!1,...pt(e)})};function Hwe(e,t){const n=(e.toString().split(".")[1]||"").length,r=(t.toString().split(".")[1]||"").length,i=n>r?n:r,o=parseInt(e.toFixed(i).replace(".","")),a=parseInt(t.toFixed(i).replace(".",""));return o%a/Math.pow(10,i)}class sl extends _t{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(t){if(this._def.coerce&&(t.data=Number(t.data)),this._getType(t)!==ze.number){const o=this._getOrReturnCtx(t);return Ie(o,{code:we.invalid_type,expected:ze.number,received:o.parsedType}),ut}let r;const i=new Ir;for(const o of this._def.checks)o.kind==="int"?jt.isInteger(t.data)||(r=this._getOrReturnCtx(t,r),Ie(r,{code:we.invalid_type,expected:"integer",received:"float",message:o.message}),i.dirty()):o.kind==="min"?(o.inclusive?t.datao.value:t.data>=o.value)&&(r=this._getOrReturnCtx(t,r),Ie(r,{code:we.too_big,maximum:o.value,type:"number",inclusive:o.inclusive,exact:!1,message:o.message}),i.dirty()):o.kind==="multipleOf"?Hwe(t.data,o.value)!==0&&(r=this._getOrReturnCtx(t,r),Ie(r,{code:we.not_multiple_of,multipleOf:o.value,message:o.message}),i.dirty()):o.kind==="finite"?Number.isFinite(t.data)||(r=this._getOrReturnCtx(t,r),Ie(r,{code:we.not_finite,message:o.message}),i.dirty()):jt.assertNever(o);return{status:i.value,value:t.data}}gte(t,n){return this.setLimit("min",t,!0,Ke.toString(n))}gt(t,n){return this.setLimit("min",t,!1,Ke.toString(n))}lte(t,n){return this.setLimit("max",t,!0,Ke.toString(n))}lt(t,n){return this.setLimit("max",t,!1,Ke.toString(n))}setLimit(t,n,r,i){return new sl({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:r,message:Ke.toString(i)}]})}_addCheck(t){return new sl({...this._def,checks:[...this._def.checks,t]})}int(t){return this._addCheck({kind:"int",message:Ke.toString(t)})}positive(t){return this._addCheck({kind:"min",value:0,inclusive:!1,message:Ke.toString(t)})}negative(t){return this._addCheck({kind:"max",value:0,inclusive:!1,message:Ke.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:0,inclusive:!0,message:Ke.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:0,inclusive:!0,message:Ke.toString(t)})}multipleOf(t,n){return this._addCheck({kind:"multipleOf",value:t,message:Ke.toString(n)})}finite(t){return this._addCheck({kind:"finite",message:Ke.toString(t)})}safe(t){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:Ke.toString(t)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:Ke.toString(t)})}get minValue(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxValue(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.valuet.kind==="int"||t.kind==="multipleOf"&&jt.isInteger(t.value))}get isFinite(){let t=null,n=null;for(const r of this._def.checks){if(r.kind==="finite"||r.kind==="int"||r.kind==="multipleOf")return!0;r.kind==="min"?(n===null||r.value>n)&&(n=r.value):r.kind==="max"&&(t===null||r.valuenew sl({checks:[],typeName:st.ZodNumber,coerce:(e==null?void 0:e.coerce)||!1,...pt(e)});class ul extends _t{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(t){if(this._def.coerce)try{t.data=BigInt(t.data)}catch{return this._getInvalidInput(t)}if(this._getType(t)!==ze.bigint)return this._getInvalidInput(t);let r;const i=new Ir;for(const o of this._def.checks)o.kind==="min"?(o.inclusive?t.datao.value:t.data>=o.value)&&(r=this._getOrReturnCtx(t,r),Ie(r,{code:we.too_big,type:"bigint",maximum:o.value,inclusive:o.inclusive,message:o.message}),i.dirty()):o.kind==="multipleOf"?t.data%o.value!==BigInt(0)&&(r=this._getOrReturnCtx(t,r),Ie(r,{code:we.not_multiple_of,multipleOf:o.value,message:o.message}),i.dirty()):jt.assertNever(o);return{status:i.value,value:t.data}}_getInvalidInput(t){const n=this._getOrReturnCtx(t);return Ie(n,{code:we.invalid_type,expected:ze.bigint,received:n.parsedType}),ut}gte(t,n){return this.setLimit("min",t,!0,Ke.toString(n))}gt(t,n){return this.setLimit("min",t,!1,Ke.toString(n))}lte(t,n){return this.setLimit("max",t,!0,Ke.toString(n))}lt(t,n){return this.setLimit("max",t,!1,Ke.toString(n))}setLimit(t,n,r,i){return new ul({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:r,message:Ke.toString(i)}]})}_addCheck(t){return new ul({...this._def,checks:[...this._def.checks,t]})}positive(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:Ke.toString(t)})}negative(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:Ke.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:Ke.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:Ke.toString(t)})}multipleOf(t,n){return this._addCheck({kind:"multipleOf",value:t,message:Ke.toString(n)})}get minValue(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxValue(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value{var t;return new ul({checks:[],typeName:st.ZodBigInt,coerce:(t=e==null?void 0:e.coerce)!==null&&t!==void 0?t:!1,...pt(e)})};class Jv extends _t{_parse(t){if(this._def.coerce&&(t.data=!!t.data),this._getType(t)!==ze.boolean){const r=this._getOrReturnCtx(t);return Ie(r,{code:we.invalid_type,expected:ze.boolean,received:r.parsedType}),ut}return ei(t.data)}}Jv.create=e=>new Jv({typeName:st.ZodBoolean,coerce:(e==null?void 0:e.coerce)||!1,...pt(e)});class Bc extends _t{_parse(t){if(this._def.coerce&&(t.data=new Date(t.data)),this._getType(t)!==ze.date){const o=this._getOrReturnCtx(t);return Ie(o,{code:we.invalid_type,expected:ze.date,received:o.parsedType}),ut}if(isNaN(t.data.getTime())){const o=this._getOrReturnCtx(t);return Ie(o,{code:we.invalid_date}),ut}const r=new Ir;let i;for(const o of this._def.checks)o.kind==="min"?t.data.getTime()o.value&&(i=this._getOrReturnCtx(t,i),Ie(i,{code:we.too_big,message:o.message,inclusive:!0,exact:!1,maximum:o.value,type:"date"}),r.dirty()):jt.assertNever(o);return{status:r.value,value:new Date(t.data.getTime())}}_addCheck(t){return new Bc({...this._def,checks:[...this._def.checks,t]})}min(t,n){return this._addCheck({kind:"min",value:t.getTime(),message:Ke.toString(n)})}max(t,n){return this._addCheck({kind:"max",value:t.getTime(),message:Ke.toString(n)})}get minDate(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t!=null?new Date(t):null}get maxDate(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.valuenew Bc({checks:[],coerce:(e==null?void 0:e.coerce)||!1,typeName:st.ZodDate,...pt(e)});class yx extends _t{_parse(t){if(this._getType(t)!==ze.symbol){const r=this._getOrReturnCtx(t);return Ie(r,{code:we.invalid_type,expected:ze.symbol,received:r.parsedType}),ut}return ei(t.data)}}yx.create=e=>new yx({typeName:st.ZodSymbol,...pt(e)});class eg extends _t{_parse(t){if(this._getType(t)!==ze.undefined){const r=this._getOrReturnCtx(t);return Ie(r,{code:we.invalid_type,expected:ze.undefined,received:r.parsedType}),ut}return ei(t.data)}}eg.create=e=>new eg({typeName:st.ZodUndefined,...pt(e)});class tg extends _t{_parse(t){if(this._getType(t)!==ze.null){const r=this._getOrReturnCtx(t);return Ie(r,{code:we.invalid_type,expected:ze.null,received:r.parsedType}),ut}return ei(t.data)}}tg.create=e=>new tg({typeName:st.ZodNull,...pt(e)});class gh extends _t{constructor(){super(...arguments),this._any=!0}_parse(t){return ei(t.data)}}gh.create=e=>new gh({typeName:st.ZodAny,...pt(e)});class wc extends _t{constructor(){super(...arguments),this._unknown=!0}_parse(t){return ei(t.data)}}wc.create=e=>new wc({typeName:st.ZodUnknown,...pt(e)});class Us extends _t{_parse(t){const n=this._getOrReturnCtx(t);return Ie(n,{code:we.invalid_type,expected:ze.never,received:n.parsedType}),ut}}Us.create=e=>new Us({typeName:st.ZodNever,...pt(e)});class bx extends _t{_parse(t){if(this._getType(t)!==ze.undefined){const r=this._getOrReturnCtx(t);return Ie(r,{code:we.invalid_type,expected:ze.void,received:r.parsedType}),ut}return ei(t.data)}}bx.create=e=>new bx({typeName:st.ZodVoid,...pt(e)});class ma extends _t{_parse(t){const{ctx:n,status:r}=this._processInputParams(t),i=this._def;if(n.parsedType!==ze.array)return Ie(n,{code:we.invalid_type,expected:ze.array,received:n.parsedType}),ut;if(i.exactLength!==null){const a=n.data.length>i.exactLength.value,s=n.data.lengthi.maxLength.value&&(Ie(n,{code:we.too_big,maximum:i.maxLength.value,type:"array",inclusive:!0,exact:!1,message:i.maxLength.message}),r.dirty()),n.common.async)return Promise.all([...n.data].map((a,s)=>i.type._parseAsync(new Za(n,a,n.path,s)))).then(a=>Ir.mergeArray(r,a));const o=[...n.data].map((a,s)=>i.type._parseSync(new Za(n,a,n.path,s)));return Ir.mergeArray(r,o)}get element(){return this._def.type}min(t,n){return new ma({...this._def,minLength:{value:t,message:Ke.toString(n)}})}max(t,n){return new ma({...this._def,maxLength:{value:t,message:Ke.toString(n)}})}length(t,n){return new ma({...this._def,exactLength:{value:t,message:Ke.toString(n)}})}nonempty(t){return this.min(1,t)}}ma.create=(e,t)=>new ma({type:e,minLength:null,maxLength:null,exactLength:null,typeName:st.ZodArray,...pt(t)});function nd(e){if(e instanceof _n){const t={};for(const n in e.shape){const r=e.shape[n];t[n]=Va.create(nd(r))}return new _n({...e._def,shape:()=>t})}else return e instanceof ma?new ma({...e._def,type:nd(e.element)}):e instanceof Va?Va.create(nd(e.unwrap())):e instanceof cl?cl.create(nd(e.unwrap())):e instanceof Ya?Ya.create(e.items.map(t=>nd(t))):e}class _n extends _t{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;const t=this._def.shape(),n=jt.objectKeys(t);return this._cached={shape:t,keys:n}}_parse(t){if(this._getType(t)!==ze.object){const l=this._getOrReturnCtx(t);return Ie(l,{code:we.invalid_type,expected:ze.object,received:l.parsedType}),ut}const{status:r,ctx:i}=this._processInputParams(t),{shape:o,keys:a}=this._getCached(),s=[];if(!(this._def.catchall instanceof Us&&this._def.unknownKeys==="strip"))for(const l in i.data)a.includes(l)||s.push(l);const u=[];for(const l of a){const f=o[l],d=i.data[l];u.push({key:{status:"valid",value:l},value:f._parse(new Za(i,d,i.path,l)),alwaysSet:l in i.data})}if(this._def.catchall instanceof Us){const l=this._def.unknownKeys;if(l==="passthrough")for(const f of s)u.push({key:{status:"valid",value:f},value:{status:"valid",value:i.data[f]}});else if(l==="strict")s.length>0&&(Ie(i,{code:we.unrecognized_keys,keys:s}),r.dirty());else if(l!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const l=this._def.catchall;for(const f of s){const d=i.data[f];u.push({key:{status:"valid",value:f},value:l._parse(new Za(i,d,i.path,f)),alwaysSet:f in i.data})}}return i.common.async?Promise.resolve().then(async()=>{const l=[];for(const f of u){const d=await f.key,p=await f.value;l.push({key:d,value:p,alwaysSet:f.alwaysSet})}return l}).then(l=>Ir.mergeObjectSync(r,l)):Ir.mergeObjectSync(r,u)}get shape(){return this._def.shape()}strict(t){return Ke.errToObj,new _n({...this._def,unknownKeys:"strict",...t!==void 0?{errorMap:(n,r)=>{var i,o,a,s;const u=(a=(o=(i=this._def).errorMap)===null||o===void 0?void 0:o.call(i,n,r).message)!==null&&a!==void 0?a:r.defaultError;return n.code==="unrecognized_keys"?{message:(s=Ke.errToObj(t).message)!==null&&s!==void 0?s:u}:{message:u}}}:{}})}strip(){return new _n({...this._def,unknownKeys:"strip"})}passthrough(){return new _n({...this._def,unknownKeys:"passthrough"})}extend(t){return new _n({...this._def,shape:()=>({...this._def.shape(),...t})})}merge(t){return new _n({unknownKeys:t._def.unknownKeys,catchall:t._def.catchall,shape:()=>({...this._def.shape(),...t._def.shape()}),typeName:st.ZodObject})}setKey(t,n){return this.augment({[t]:n})}catchall(t){return new _n({...this._def,catchall:t})}pick(t){const n={};return jt.objectKeys(t).forEach(r=>{t[r]&&this.shape[r]&&(n[r]=this.shape[r])}),new _n({...this._def,shape:()=>n})}omit(t){const n={};return jt.objectKeys(this.shape).forEach(r=>{t[r]||(n[r]=this.shape[r])}),new _n({...this._def,shape:()=>n})}deepPartial(){return nd(this)}partial(t){const n={};return jt.objectKeys(this.shape).forEach(r=>{const i=this.shape[r];t&&!t[r]?n[r]=i:n[r]=i.optional()}),new _n({...this._def,shape:()=>n})}required(t){const n={};return jt.objectKeys(this.shape).forEach(r=>{if(t&&!t[r])n[r]=this.shape[r];else{let o=this.shape[r];for(;o instanceof Va;)o=o._def.innerType;n[r]=o}}),new _n({...this._def,shape:()=>n})}keyof(){return HG(jt.objectKeys(this.shape))}}_n.create=(e,t)=>new _n({shape:()=>e,unknownKeys:"strip",catchall:Us.create(),typeName:st.ZodObject,...pt(t)});_n.strictCreate=(e,t)=>new _n({shape:()=>e,unknownKeys:"strict",catchall:Us.create(),typeName:st.ZodObject,...pt(t)});_n.lazycreate=(e,t)=>new _n({shape:e,unknownKeys:"strip",catchall:Us.create(),typeName:st.ZodObject,...pt(t)});class ng extends _t{_parse(t){const{ctx:n}=this._processInputParams(t),r=this._def.options;function i(o){for(const s of o)if(s.result.status==="valid")return s.result;for(const s of o)if(s.result.status==="dirty")return n.common.issues.push(...s.ctx.common.issues),s.result;const a=o.map(s=>new Si(s.ctx.common.issues));return Ie(n,{code:we.invalid_union,unionErrors:a}),ut}if(n.common.async)return Promise.all(r.map(async o=>{const a={...n,common:{...n.common,issues:[]},parent:null};return{result:await o._parseAsync({data:n.data,path:n.path,parent:a}),ctx:a}})).then(i);{let o;const a=[];for(const u of r){const l={...n,common:{...n.common,issues:[]},parent:null},f=u._parseSync({data:n.data,path:n.path,parent:l});if(f.status==="valid")return f;f.status==="dirty"&&!o&&(o={result:f,ctx:l}),l.common.issues.length&&a.push(l.common.issues)}if(o)return n.common.issues.push(...o.ctx.common.issues),o.result;const s=a.map(u=>new Si(u));return Ie(n,{code:we.invalid_union,unionErrors:s}),ut}}get options(){return this._def.options}}ng.create=(e,t)=>new ng({options:e,typeName:st.ZodUnion,...pt(t)});const ms=e=>e instanceof og?ms(e.schema):e instanceof Sa?ms(e.innerType()):e instanceof ag?[e.value]:e instanceof ll?e.options:e instanceof sg?jt.objectValues(e.enum):e instanceof ug?ms(e._def.innerType):e instanceof eg?[void 0]:e instanceof tg?[null]:e instanceof Va?[void 0,...ms(e.unwrap())]:e instanceof cl?[null,...ms(e.unwrap())]:e instanceof f4||e instanceof cg?ms(e.unwrap()):e instanceof lg?ms(e._def.innerType):[];class z2 extends _t{_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==ze.object)return Ie(n,{code:we.invalid_type,expected:ze.object,received:n.parsedType}),ut;const r=this.discriminator,i=n.data[r],o=this.optionsMap.get(i);return o?n.common.async?o._parseAsync({data:n.data,path:n.path,parent:n}):o._parseSync({data:n.data,path:n.path,parent:n}):(Ie(n,{code:we.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[r]}),ut)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(t,n,r){const i=new Map;for(const o of n){const a=ms(o.shape[t]);if(!a.length)throw new Error(`A discriminator value for key \`${t}\` could not be extracted from all schema options`);for(const s of a){if(i.has(s))throw new Error(`Discriminator property ${String(t)} has duplicate value ${String(s)}`);i.set(s,o)}}return new z2({typeName:st.ZodDiscriminatedUnion,discriminator:t,options:n,optionsMap:i,...pt(r)})}}function I3(e,t){const n=_s(e),r=_s(t);if(e===t)return{valid:!0,data:e};if(n===ze.object&&r===ze.object){const i=jt.objectKeys(t),o=jt.objectKeys(e).filter(s=>i.indexOf(s)!==-1),a={...e,...t};for(const s of o){const u=I3(e[s],t[s]);if(!u.valid)return{valid:!1};a[s]=u.data}return{valid:!0,data:a}}else if(n===ze.array&&r===ze.array){if(e.length!==t.length)return{valid:!1};const i=[];for(let o=0;o{if(R3(o)||R3(a))return ut;const s=I3(o.value,a.value);return s.valid?((j3(o)||j3(a))&&n.dirty(),{status:n.value,value:s.data}):(Ie(r,{code:we.invalid_intersection_types}),ut)};return r.common.async?Promise.all([this._def.left._parseAsync({data:r.data,path:r.path,parent:r}),this._def.right._parseAsync({data:r.data,path:r.path,parent:r})]).then(([o,a])=>i(o,a)):i(this._def.left._parseSync({data:r.data,path:r.path,parent:r}),this._def.right._parseSync({data:r.data,path:r.path,parent:r}))}}rg.create=(e,t,n)=>new rg({left:e,right:t,typeName:st.ZodIntersection,...pt(n)});class Ya extends _t{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==ze.array)return Ie(r,{code:we.invalid_type,expected:ze.array,received:r.parsedType}),ut;if(r.data.lengththis._def.items.length&&(Ie(r,{code:we.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),n.dirty());const o=[...r.data].map((a,s)=>{const u=this._def.items[s]||this._def.rest;return u?u._parse(new Za(r,a,r.path,s)):null}).filter(a=>!!a);return r.common.async?Promise.all(o).then(a=>Ir.mergeArray(n,a)):Ir.mergeArray(n,o)}get items(){return this._def.items}rest(t){return new Ya({...this._def,rest:t})}}Ya.create=(e,t)=>{if(!Array.isArray(e))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new Ya({items:e,typeName:st.ZodTuple,rest:null,...pt(t)})};class ig extends _t{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==ze.object)return Ie(r,{code:we.invalid_type,expected:ze.object,received:r.parsedType}),ut;const i=[],o=this._def.keyType,a=this._def.valueType;for(const s in r.data)i.push({key:o._parse(new Za(r,s,r.path,s)),value:a._parse(new Za(r,r.data[s],r.path,s)),alwaysSet:s in r.data});return r.common.async?Ir.mergeObjectAsync(n,i):Ir.mergeObjectSync(n,i)}get element(){return this._def.valueType}static create(t,n,r){return n instanceof _t?new ig({keyType:t,valueType:n,typeName:st.ZodRecord,...pt(r)}):new ig({keyType:fa.create(),valueType:t,typeName:st.ZodRecord,...pt(n)})}}class xx extends _t{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==ze.map)return Ie(r,{code:we.invalid_type,expected:ze.map,received:r.parsedType}),ut;const i=this._def.keyType,o=this._def.valueType,a=[...r.data.entries()].map(([s,u],l)=>({key:i._parse(new Za(r,s,r.path,[l,"key"])),value:o._parse(new Za(r,u,r.path,[l,"value"]))}));if(r.common.async){const s=new Map;return Promise.resolve().then(async()=>{for(const u of a){const l=await u.key,f=await u.value;if(l.status==="aborted"||f.status==="aborted")return ut;(l.status==="dirty"||f.status==="dirty")&&n.dirty(),s.set(l.value,f.value)}return{status:n.value,value:s}})}else{const s=new Map;for(const u of a){const l=u.key,f=u.value;if(l.status==="aborted"||f.status==="aborted")return ut;(l.status==="dirty"||f.status==="dirty")&&n.dirty(),s.set(l.value,f.value)}return{status:n.value,value:s}}}}xx.create=(e,t,n)=>new xx({valueType:t,keyType:e,typeName:st.ZodMap,...pt(n)});class zc extends _t{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==ze.set)return Ie(r,{code:we.invalid_type,expected:ze.set,received:r.parsedType}),ut;const i=this._def;i.minSize!==null&&r.data.sizei.maxSize.value&&(Ie(r,{code:we.too_big,maximum:i.maxSize.value,type:"set",inclusive:!0,exact:!1,message:i.maxSize.message}),n.dirty());const o=this._def.valueType;function a(u){const l=new Set;for(const f of u){if(f.status==="aborted")return ut;f.status==="dirty"&&n.dirty(),l.add(f.value)}return{status:n.value,value:l}}const s=[...r.data.values()].map((u,l)=>o._parse(new Za(r,u,r.path,l)));return r.common.async?Promise.all(s).then(u=>a(u)):a(s)}min(t,n){return new zc({...this._def,minSize:{value:t,message:Ke.toString(n)}})}max(t,n){return new zc({...this._def,maxSize:{value:t,message:Ke.toString(n)}})}size(t,n){return this.min(t,n).max(t,n)}nonempty(t){return this.min(1,t)}}zc.create=(e,t)=>new zc({valueType:e,minSize:null,maxSize:null,typeName:st.ZodSet,...pt(t)});class Vd extends _t{constructor(){super(...arguments),this.validate=this.implement}_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==ze.function)return Ie(n,{code:we.invalid_type,expected:ze.function,received:n.parsedType}),ut;function r(s,u){return vx({data:s,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,mx(),vh].filter(l=>!!l),issueData:{code:we.invalid_arguments,argumentsError:u}})}function i(s,u){return vx({data:s,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,mx(),vh].filter(l=>!!l),issueData:{code:we.invalid_return_type,returnTypeError:u}})}const o={errorMap:n.common.contextualErrorMap},a=n.data;if(this._def.returns instanceof yh){const s=this;return ei(async function(...u){const l=new Si([]),f=await s._def.args.parseAsync(u,o).catch(m=>{throw l.addIssue(r(u,m)),l}),d=await Reflect.apply(a,this,f);return await s._def.returns._def.type.parseAsync(d,o).catch(m=>{throw l.addIssue(i(d,m)),l})})}else{const s=this;return ei(function(...u){const l=s._def.args.safeParse(u,o);if(!l.success)throw new Si([r(u,l.error)]);const f=Reflect.apply(a,this,l.data),d=s._def.returns.safeParse(f,o);if(!d.success)throw new Si([i(f,d.error)]);return d.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...t){return new Vd({...this._def,args:Ya.create(t).rest(wc.create())})}returns(t){return new Vd({...this._def,returns:t})}implement(t){return this.parse(t)}strictImplement(t){return this.parse(t)}static create(t,n,r){return new Vd({args:t||Ya.create([]).rest(wc.create()),returns:n||wc.create(),typeName:st.ZodFunction,...pt(r)})}}class og extends _t{get schema(){return this._def.getter()}_parse(t){const{ctx:n}=this._processInputParams(t);return this._def.getter()._parse({data:n.data,path:n.path,parent:n})}}og.create=(e,t)=>new og({getter:e,typeName:st.ZodLazy,...pt(t)});class ag extends _t{_parse(t){if(t.data!==this._def.value){const n=this._getOrReturnCtx(t);return Ie(n,{received:n.data,code:we.invalid_literal,expected:this._def.value}),ut}return{status:"valid",value:t.data}}get value(){return this._def.value}}ag.create=(e,t)=>new ag({value:e,typeName:st.ZodLiteral,...pt(t)});function HG(e,t){return new ll({values:e,typeName:st.ZodEnum,...pt(t)})}class ll extends _t{constructor(){super(...arguments),Bm.set(this,void 0)}_parse(t){if(typeof t.data!="string"){const n=this._getOrReturnCtx(t),r=this._def.values;return Ie(n,{expected:jt.joinValues(r),received:n.parsedType,code:we.invalid_type}),ut}if(gx(this,Bm)||zG(this,Bm,new Set(this._def.values)),!gx(this,Bm).has(t.data)){const n=this._getOrReturnCtx(t),r=this._def.values;return Ie(n,{received:n.data,code:we.invalid_enum_value,options:r}),ut}return ei(t.data)}get options(){return this._def.values}get enum(){const t={};for(const n of this._def.values)t[n]=n;return t}get Values(){const t={};for(const n of this._def.values)t[n]=n;return t}get Enum(){const t={};for(const n of this._def.values)t[n]=n;return t}extract(t,n=this._def){return ll.create(t,{...this._def,...n})}exclude(t,n=this._def){return ll.create(this.options.filter(r=>!t.includes(r)),{...this._def,...n})}}Bm=new WeakMap;ll.create=HG;class sg extends _t{constructor(){super(...arguments),zm.set(this,void 0)}_parse(t){const n=jt.getValidEnumValues(this._def.values),r=this._getOrReturnCtx(t);if(r.parsedType!==ze.string&&r.parsedType!==ze.number){const i=jt.objectValues(n);return Ie(r,{expected:jt.joinValues(i),received:r.parsedType,code:we.invalid_type}),ut}if(gx(this,zm)||zG(this,zm,new Set(jt.getValidEnumValues(this._def.values))),!gx(this,zm).has(t.data)){const i=jt.objectValues(n);return Ie(r,{received:r.data,code:we.invalid_enum_value,options:i}),ut}return ei(t.data)}get enum(){return this._def.values}}zm=new WeakMap;sg.create=(e,t)=>new sg({values:e,typeName:st.ZodNativeEnum,...pt(t)});class yh extends _t{unwrap(){return this._def.type}_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==ze.promise&&n.common.async===!1)return Ie(n,{code:we.invalid_type,expected:ze.promise,received:n.parsedType}),ut;const r=n.parsedType===ze.promise?n.data:Promise.resolve(n.data);return ei(r.then(i=>this._def.type.parseAsync(i,{path:n.path,errorMap:n.common.contextualErrorMap})))}}yh.create=(e,t)=>new yh({type:e,typeName:st.ZodPromise,...pt(t)});class Sa extends _t{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===st.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(t){const{status:n,ctx:r}=this._processInputParams(t),i=this._def.effect||null,o={addIssue:a=>{Ie(r,a),a.fatal?n.abort():n.dirty()},get path(){return r.path}};if(o.addIssue=o.addIssue.bind(o),i.type==="preprocess"){const a=i.transform(r.data,o);if(r.common.async)return Promise.resolve(a).then(async s=>{if(n.value==="aborted")return ut;const u=await this._def.schema._parseAsync({data:s,path:r.path,parent:r});return u.status==="aborted"?ut:u.status==="dirty"||n.value==="dirty"?bd(u.value):u});{if(n.value==="aborted")return ut;const s=this._def.schema._parseSync({data:a,path:r.path,parent:r});return s.status==="aborted"?ut:s.status==="dirty"||n.value==="dirty"?bd(s.value):s}}if(i.type==="refinement"){const a=s=>{const u=i.refinement(s,o);if(r.common.async)return Promise.resolve(u);if(u instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return s};if(r.common.async===!1){const s=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});return s.status==="aborted"?ut:(s.status==="dirty"&&n.dirty(),a(s.value),{status:n.value,value:s.value})}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(s=>s.status==="aborted"?ut:(s.status==="dirty"&&n.dirty(),a(s.value).then(()=>({status:n.value,value:s.value}))))}if(i.type==="transform")if(r.common.async===!1){const a=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});if(!Fc(a))return a;const s=i.transform(a.value,o);if(s instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:n.value,value:s}}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(a=>Fc(a)?Promise.resolve(i.transform(a.value,o)).then(s=>({status:n.value,value:s})):a);jt.assertNever(i)}}Sa.create=(e,t,n)=>new Sa({schema:e,typeName:st.ZodEffects,effect:t,...pt(n)});Sa.createWithPreprocess=(e,t,n)=>new Sa({schema:t,effect:{type:"preprocess",transform:e},typeName:st.ZodEffects,...pt(n)});class Va extends _t{_parse(t){return this._getType(t)===ze.undefined?ei(void 0):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}Va.create=(e,t)=>new Va({innerType:e,typeName:st.ZodOptional,...pt(t)});class cl extends _t{_parse(t){return this._getType(t)===ze.null?ei(null):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}cl.create=(e,t)=>new cl({innerType:e,typeName:st.ZodNullable,...pt(t)});class ug extends _t{_parse(t){const{ctx:n}=this._processInputParams(t);let r=n.data;return n.parsedType===ze.undefined&&(r=this._def.defaultValue()),this._def.innerType._parse({data:r,path:n.path,parent:n})}removeDefault(){return this._def.innerType}}ug.create=(e,t)=>new ug({innerType:e,typeName:st.ZodDefault,defaultValue:typeof t.default=="function"?t.default:()=>t.default,...pt(t)});class lg extends _t{_parse(t){const{ctx:n}=this._processInputParams(t),r={...n,common:{...n.common,issues:[]}},i=this._def.innerType._parse({data:r.data,path:r.path,parent:{...r}});return Qv(i)?i.then(o=>({status:"valid",value:o.status==="valid"?o.value:this._def.catchValue({get error(){return new Si(r.common.issues)},input:r.data})})):{status:"valid",value:i.status==="valid"?i.value:this._def.catchValue({get error(){return new Si(r.common.issues)},input:r.data})}}removeCatch(){return this._def.innerType}}lg.create=(e,t)=>new lg({innerType:e,typeName:st.ZodCatch,catchValue:typeof t.catch=="function"?t.catch:()=>t.catch,...pt(t)});class _x extends _t{_parse(t){if(this._getType(t)!==ze.nan){const r=this._getOrReturnCtx(t);return Ie(r,{code:we.invalid_type,expected:ze.nan,received:r.parsedType}),ut}return{status:"valid",value:t.data}}}_x.create=e=>new _x({typeName:st.ZodNaN,...pt(e)});const Gwe=Symbol("zod_brand");class f4 extends _t{_parse(t){const{ctx:n}=this._processInputParams(t),r=n.data;return this._def.type._parse({data:r,path:n.path,parent:n})}unwrap(){return this._def.type}}class w0 extends _t{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.common.async)return(async()=>{const o=await this._def.in._parseAsync({data:r.data,path:r.path,parent:r});return o.status==="aborted"?ut:o.status==="dirty"?(n.dirty(),bd(o.value)):this._def.out._parseAsync({data:o.value,path:r.path,parent:r})})();{const i=this._def.in._parseSync({data:r.data,path:r.path,parent:r});return i.status==="aborted"?ut:i.status==="dirty"?(n.dirty(),{status:"dirty",value:i.value}):this._def.out._parseSync({data:i.value,path:r.path,parent:r})}}static create(t,n){return new w0({in:t,out:n,typeName:st.ZodPipeline})}}class cg extends _t{_parse(t){const n=this._def.innerType._parse(t),r=i=>(Fc(i)&&(i.value=Object.freeze(i.value)),i);return Qv(n)?n.then(i=>r(i)):r(n)}unwrap(){return this._def.innerType}}cg.create=(e,t)=>new cg({innerType:e,typeName:st.ZodReadonly,...pt(t)});function OI(e,t){const n=typeof e=="function"?e(t):typeof e=="string"?{message:e}:e;return typeof n=="string"?{message:n}:n}function GG(e,t={},n){return e?gh.create().superRefine((r,i)=>{var o,a;const s=e(r);if(s instanceof Promise)return s.then(u=>{var l,f;if(!u){const d=OI(t,r),p=(f=(l=d.fatal)!==null&&l!==void 0?l:n)!==null&&f!==void 0?f:!0;i.addIssue({code:"custom",...d,fatal:p})}});if(!s){const u=OI(t,r),l=(a=(o=u.fatal)!==null&&o!==void 0?o:n)!==null&&a!==void 0?a:!0;i.addIssue({code:"custom",...u,fatal:l})}}):gh.create()}const qwe={object:_n.lazycreate};var st;(function(e){e.ZodString="ZodString",e.ZodNumber="ZodNumber",e.ZodNaN="ZodNaN",e.ZodBigInt="ZodBigInt",e.ZodBoolean="ZodBoolean",e.ZodDate="ZodDate",e.ZodSymbol="ZodSymbol",e.ZodUndefined="ZodUndefined",e.ZodNull="ZodNull",e.ZodAny="ZodAny",e.ZodUnknown="ZodUnknown",e.ZodNever="ZodNever",e.ZodVoid="ZodVoid",e.ZodArray="ZodArray",e.ZodObject="ZodObject",e.ZodUnion="ZodUnion",e.ZodDiscriminatedUnion="ZodDiscriminatedUnion",e.ZodIntersection="ZodIntersection",e.ZodTuple="ZodTuple",e.ZodRecord="ZodRecord",e.ZodMap="ZodMap",e.ZodSet="ZodSet",e.ZodFunction="ZodFunction",e.ZodLazy="ZodLazy",e.ZodLiteral="ZodLiteral",e.ZodEnum="ZodEnum",e.ZodEffects="ZodEffects",e.ZodNativeEnum="ZodNativeEnum",e.ZodOptional="ZodOptional",e.ZodNullable="ZodNullable",e.ZodDefault="ZodDefault",e.ZodCatch="ZodCatch",e.ZodPromise="ZodPromise",e.ZodBranded="ZodBranded",e.ZodPipeline="ZodPipeline",e.ZodReadonly="ZodReadonly"})(st||(st={}));const Kwe=(e,t={message:`Input not instance of ${e.name}`})=>GG(n=>n instanceof e,t),qG=fa.create,KG=sl.create,Zwe=_x.create,Ywe=ul.create,ZG=Jv.create,Xwe=Bc.create,Qwe=yx.create,Jwe=eg.create,eSe=tg.create,tSe=gh.create,nSe=wc.create,rSe=Us.create,iSe=bx.create,oSe=ma.create,aSe=_n.create,sSe=_n.strictCreate,uSe=ng.create,lSe=z2.create,cSe=rg.create,fSe=Ya.create,dSe=ig.create,hSe=xx.create,pSe=zc.create,mSe=Vd.create,vSe=og.create,gSe=ag.create,ySe=ll.create,bSe=sg.create,xSe=yh.create,EI=Sa.create,_Se=Va.create,wSe=cl.create,SSe=Sa.createWithPreprocess,CSe=w0.create,OSe=()=>qG().optional(),ESe=()=>KG().optional(),TSe=()=>ZG().optional(),PSe={string:e=>fa.create({...e,coerce:!0}),number:e=>sl.create({...e,coerce:!0}),boolean:e=>Jv.create({...e,coerce:!0}),bigint:e=>ul.create({...e,coerce:!0}),date:e=>Bc.create({...e,coerce:!0})},ASe=ut;var q=Object.freeze({__proto__:null,defaultErrorMap:vh,setErrorMap:Swe,getErrorMap:mx,makeIssue:vx,EMPTY_PATH:Cwe,addIssueToContext:Ie,ParseStatus:Ir,INVALID:ut,DIRTY:bd,OK:ei,isAborted:R3,isDirty:j3,isValid:Fc,isAsync:Qv,get util(){return jt},get objectUtil(){return $3},ZodParsedType:ze,getParsedType:_s,ZodType:_t,datetimeRegex:VG,ZodString:fa,ZodNumber:sl,ZodBigInt:ul,ZodBoolean:Jv,ZodDate:Bc,ZodSymbol:yx,ZodUndefined:eg,ZodNull:tg,ZodAny:gh,ZodUnknown:wc,ZodNever:Us,ZodVoid:bx,ZodArray:ma,ZodObject:_n,ZodUnion:ng,ZodDiscriminatedUnion:z2,ZodIntersection:rg,ZodTuple:Ya,ZodRecord:ig,ZodMap:xx,ZodSet:zc,ZodFunction:Vd,ZodLazy:og,ZodLiteral:ag,ZodEnum:ll,ZodNativeEnum:sg,ZodPromise:yh,ZodEffects:Sa,ZodTransformer:Sa,ZodOptional:Va,ZodNullable:cl,ZodDefault:ug,ZodCatch:lg,ZodNaN:_x,BRAND:Gwe,ZodBranded:f4,ZodPipeline:w0,ZodReadonly:cg,custom:GG,Schema:_t,ZodSchema:_t,late:qwe,get ZodFirstPartyTypeKind(){return st},coerce:PSe,any:tSe,array:oSe,bigint:Ywe,boolean:ZG,date:Xwe,discriminatedUnion:lSe,effect:EI,enum:ySe,function:mSe,instanceof:Kwe,intersection:cSe,lazy:vSe,literal:gSe,map:hSe,nan:Zwe,nativeEnum:bSe,never:rSe,null:eSe,nullable:wSe,number:KG,object:aSe,oboolean:TSe,onumber:ESe,optional:_Se,ostring:OSe,pipeline:CSe,preprocess:SSe,promise:xSe,record:dSe,set:pSe,strictObject:sSe,string:qG,symbol:Qwe,transformer:EI,tuple:fSe,undefined:Jwe,union:uSe,unknown:nSe,void:iSe,NEVER:ASe,ZodIssueCode:we,quotelessJson:wwe,ZodError:Si});const YG=e=>{const t="input"in e?e.input:"input",n="output"in e?e.output:"output",r="schema"in e?e.schema._input:e._input,i="schema"in e?e.schema._output:e._output;return{types:{input:t==="output"?i:r,output:n==="input"?r:i},parse:o=>"schema"in e?e.schema.parse(o):e.parse(o)}},N3=(e,t)=>q.custom().pipe(e.catch(t)),XG=q.enum(["mySlots","skippedSlots","text"]),Hr=XG.enum,kSe={searchType:Hr.text,searchText:""},MSe=q.object({searchType:N3(XG,Hr.text).default(Hr.text),searchText:N3(q.string(),"").default("")}),fg=f2("/leaderSchedule")({component:_we,validateSearch:YG(MSe),search:{middlewares:[Ope(kSe),Cpe(["searchType","searchText"])]}}),$Se="modulepreload",RSe=function(e){return"/"+e},TI={},jSe=function(t,n,r){let i=Promise.resolve();if(n&&n.length>0){document.getElementsByTagName("link");const a=document.querySelector("meta[property=csp-nonce]"),s=(a==null?void 0:a.nonce)||(a==null?void 0:a.getAttribute("nonce"));i=Promise.allSettled(n.map(u=>{if(u=RSe(u),u in TI)return;TI[u]=!0;const l=u.endsWith(".css"),f=l?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${u}"]${f}`))return;const d=document.createElement("link");if(d.rel=l?"stylesheet":$Se,l||(d.as="script"),d.crossOrigin="",d.href=u,s&&d.setAttribute("nonce",s),document.head.appendChild(d),l)return new Promise((p,m)=>{d.addEventListener("load",p),d.addEventListener("error",()=>m(new Error(`Unable to preload CSS for ${u}`)))})}))}function o(a){const s=new Event("vite:preloadError",{cancelable:!0});if(s.payload=a,window.dispatchEvent(s),!s.defaultPrevented)throw a}return i.then(a=>{for(const s of a||[])s.status==="rejected"&&o(s.reason);return t().catch(o)})},ISe=f2("/gossip")({component:LSe}),NSe=S.lazy(()=>jSe(()=>import("./index-Bwdiu9KE.js"),__vite__mapDeps([0,1])));function LSe(){return g.jsx(S.Suspense,{children:g.jsx(NSe,{})})}const DSe=f2("/about")({component:FSe});function FSe(){return g.jsx("div",{className:"p-2",children:g.jsx("h3",{children:"About"})})}const BSe="_text_uypgs_1",zSe={text:BSe};function S0({text:e}){return g.jsx(he,{className:zSe.text,children:e})}let Po;typeof window<"u"?Po=window:typeof self<"u"?Po=self:Po=global;let L3=null,D3=null;const PI=20,ZO=Po.clearTimeout,AI=Po.setTimeout,YO=Po.cancelAnimationFrame||Po.mozCancelAnimationFrame||Po.webkitCancelAnimationFrame,kI=Po.requestAnimationFrame||Po.mozRequestAnimationFrame||Po.webkitRequestAnimationFrame;YO==null||kI==null?(L3=ZO,D3=function(t){return AI(t,PI)}):(L3=function([t,n]){YO(t),ZO(n)},D3=function(t){const n=kI(function(){ZO(r),t()}),r=AI(function(){YO(n),t()},PI);return[n,r]});function WSe(e){let t,n,r,i,o,a,s;const u=typeof document<"u"&&document.attachEvent;if(!u){a=function(x){const w=x.__resizeTriggers__,C=w.firstElementChild,E=w.lastElementChild,O=C.firstElementChild;E.scrollLeft=E.scrollWidth,E.scrollTop=E.scrollHeight,O.style.width=C.offsetWidth+1+"px",O.style.height=C.offsetHeight+1+"px",C.scrollLeft=C.scrollWidth,C.scrollTop=C.scrollHeight},o=function(x){return x.offsetWidth!==x.__resizeLast__.width||x.offsetHeight!==x.__resizeLast__.height},s=function(x){if(x.target.className&&typeof x.target.className.indexOf=="function"&&x.target.className.indexOf("contract-trigger")<0&&x.target.className.indexOf("expand-trigger")<0)return;const w=this;a(this),this.__resizeRAF__&&L3(this.__resizeRAF__),this.__resizeRAF__=D3(function(){o(w)&&(w.__resizeLast__.width=w.offsetWidth,w.__resizeLast__.height=w.offsetHeight,w.__resizeListeners__.forEach(function(O){O.call(w,x)}))})};let p=!1,m="";r="animationstart";const v="Webkit Moz O ms".split(" ");let y="webkitAnimationStart animationstart oAnimationStart MSAnimationStart".split(" "),_="";{const x=document.createElement("fakeelement");if(x.style.animationName!==void 0&&(p=!0),p===!1){for(let w=0;w div, .contract-trigger:before { content: " "; display: block; position: absolute; top: 0; left: 0; height: 100%; width: 100%; overflow: hidden; z-index: -1; } .resize-triggers > div { background: #eee; overflow: auto; } .contract-trigger:before { width: 200%; height: 200%; }',v=p.head||p.getElementsByTagName("head")[0],y=p.createElement("style");y.id="detectElementResize",y.type="text/css",e!=null&&y.setAttribute("nonce",e),y.styleSheet?y.styleSheet.cssText=m:y.appendChild(p.createTextNode(m)),v.appendChild(y)}};return{addResizeListener:function(p,m){if(u)p.attachEvent("onresize",m);else{if(!p.__resizeTriggers__){const v=p.ownerDocument,y=Po.getComputedStyle(p);y&&y.position==="static"&&(p.style.position="relative"),l(v),p.__resizeLast__={},p.__resizeListeners__=[],(p.__resizeTriggers__=v.createElement("div")).className="resize-triggers";const _=v.createElement("div");_.className="expand-trigger",_.appendChild(v.createElement("div"));const x=v.createElement("div");x.className="contract-trigger",p.__resizeTriggers__.appendChild(_),p.__resizeTriggers__.appendChild(x),p.appendChild(p.__resizeTriggers__),a(p),p.addEventListener("scroll",s,!0),r&&(p.__resizeTriggers__.__animationListener__=function(C){C.animationName===n&&a(p)},p.__resizeTriggers__.addEventListener(r,p.__resizeTriggers__.__animationListener__))}p.__resizeListeners__.push(m)}},removeResizeListener:function(p,m){if(u)p.detachEvent("onresize",m);else if(p.__resizeListeners__.splice(p.__resizeListeners__.indexOf(m),1),!p.__resizeListeners__.length){p.removeEventListener("scroll",s,!0),p.__resizeTriggers__.__animationListener__&&(p.__resizeTriggers__.removeEventListener(r,p.__resizeTriggers__.__animationListener__),p.__resizeTriggers__.__animationListener__=null);try{p.__resizeTriggers__=!p.removeChild(p.__resizeTriggers__)}catch{}}}}}class W2 extends S.Component{constructor(...t){super(...t),this.state={height:this.props.defaultHeight||0,scaledHeight:this.props.defaultHeight||0,scaledWidth:this.props.defaultWidth||0,width:this.props.defaultWidth||0},this._autoSizer=null,this._detectElementResize=null,this._parentNode=null,this._resizeObserver=null,this._timeoutId=null,this._onResize=()=>{this._timeoutId=null;const{disableHeight:n,disableWidth:r,onResize:i}=this.props;if(this._parentNode){const o=window.getComputedStyle(this._parentNode)||{},a=parseFloat(o.paddingLeft||"0"),s=parseFloat(o.paddingRight||"0"),u=parseFloat(o.paddingTop||"0"),l=parseFloat(o.paddingBottom||"0"),f=this._parentNode.getBoundingClientRect(),d=f.height-u-l,p=f.width-a-s,m=this._parentNode.offsetHeight-u-l,v=this._parentNode.offsetWidth-a-s;(!n&&(this.state.height!==m||this.state.scaledHeight!==d)||!r&&(this.state.width!==v||this.state.scaledWidth!==p))&&(this.setState({height:m,width:v,scaledHeight:d,scaledWidth:p}),typeof i=="function"&&i({height:m,scaledHeight:d,scaledWidth:p,width:v}))}},this._setRef=n=>{this._autoSizer=n}}componentDidMount(){const{nonce:t}=this.props,n=this._autoSizer?this._autoSizer.parentNode:null;if(n!=null&&n.ownerDocument&&n.ownerDocument.defaultView&&n instanceof n.ownerDocument.defaultView.HTMLElement){this._parentNode=n;const r=n.ownerDocument.defaultView.ResizeObserver;r!=null?(this._resizeObserver=new r(()=>{this._timeoutId=setTimeout(this._onResize,0)}),this._resizeObserver.observe(n)):(this._detectElementResize=WSe(t),this._detectElementResize.addResizeListener(n,this._onResize)),this._onResize()}}componentWillUnmount(){this._parentNode&&(this._detectElementResize&&this._detectElementResize.removeResizeListener(this._parentNode,this._onResize),this._timeoutId!==null&&clearTimeout(this._timeoutId),this._resizeObserver&&this._resizeObserver.disconnect())}render(){const{children:t,defaultHeight:n,defaultWidth:r,disableHeight:i=!1,disableWidth:o=!1,doNotBailOutOnEmptyChildren:a=!1,nonce:s,onResize:u,style:l={},tagName:f="div",...d}=this.props,{height:p,scaledHeight:m,scaledWidth:v,width:y}=this.state,_={overflow:"visible"},x={};let w=!1;return i||(p===0&&(w=!0),_.height=0,x.height=p,x.scaledHeight=m),o||(y===0&&(w=!0),_.width=0,x.width=y,x.scaledWidth=v),a&&(w=!1),S.createElement(f,{ref:this._setRef,style:{..._,...l},...d},!w&&t(x))}}const sb=600,QG=Zs(new Array(sb).fill(void 0)),XO=(e,t)=>e.length?"M"+e.map(({x:r,y:i})=>`L ${r} ${t-i}`).join(" ").slice(1)+`L ${e[e.length-1].x} ${t} L ${e[0].x} ${t}, L ${e[0].x} ${e[0].y}`:"";function USe(){const e=ve(QG),t=S.useRef(),n=Math.max(...e.map(i=>(i==null?void 0:i.total)??0)),r=S.useMemo(()=>{if(!t.current||!e.length)return;const{height:i,width:o}=t.current,a=e.length,s=(o+2)/a,u=(i-10)/(n||1),l=e.map((d,p)=>{if(d!==void 0)return{x:p*s,voteY:d.vote*u,nonvoteFailedY:(d.nonvote_failed+d.vote)*u,nonvoteY:(d.nonvote_success+d.nonvote_failed+d.vote)*u}}).filter(sp),f=i-n*u;return{votePath:XO(l.map(d=>({x:d.x,y:d.voteY})),i),failedPath:XO(l.map(d=>({x:d.x,y:d.nonvoteFailedY})),i),nonvotePath:XO(l.map(d=>({x:d.x,y:d.nonvoteY})),i),totalTpsY:isNaN(f)?void 0:f}},[n,e]);return g.jsx(g.Fragment,{children:g.jsx(W2,{children:({height:i,width:o})=>(t.current={height:i,width:o},r?g.jsx(g.Fragment,{children:g.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:o,height:i,fill:"none",children:[g.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:r.nonvotePath,fill:"#006851"}),g.jsx("path",{d:r.failedPath,fill:"#743F4D"}),g.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",fill:"#19307C",d:r.votePath}),r.totalTpsY&&g.jsxs(g.Fragment,{children:[g.jsx("line",{x1:"0",y1:r.totalTpsY,x2:o,y2:r.totalTpsY,strokeDasharray:"4",stroke:"rgba(255, 255, 255, 0.30)"}),g.jsx("text",{x:"0",y:r.totalTpsY-3,fill:"#8E909D",fontSize:"8",fontFamily:"Inter-Tight",children:n.toLocaleString()})]})]})}):null)})})}const VSe="_card_16ecl_1",HSe={card:VSe};function C0({children:e,hideChildren:t,style:n}){return g.jsx("div",{className:HSe.card,style:n,children:!t&&e})}const GSe="_axis-text_15j9s_1",MI={axisText:GSe},qSe="_label_oium6_1",KSe="_value_oium6_8",ZSe="_append-value_oium6_12",QO={label:qSe,value:KSe,appendValue:ZSe};function Co({label:e,value:t,valueColor:n,appendValue:r,large:i,style:o,valueStyle:a,children:s}){const u=a??(i?{fontSize:"28px",letterSpacing:"-1.12px"}:{fontSize:"18px",fontWeight:500});return g.jsxs(Oe,{direction:"column",align:"start",style:{...o},children:[g.jsx(he,{className:QO.label,children:e}),g.jsxs(Oe,{align:"baseline",gap:"1",children:[g.jsx(he,{className:QO.value,style:{color:n,...u},children:t}),r&&g.jsx(he,{className:QO.appendValue,children:r}),s]})]})}const YSe={};function XSe(){const e=ve(b5);return g.jsxs(Oe,{direction:"column",gap:"2",minWidth:"100px",className:YSe.container,children:[g.jsx(Co,{label:"Total TPS",value:(e==null?void 0:e.total.toLocaleString(void 0,{minimumFractionDigits:2,maximumFractionDigits:2}))??"-",valueColor:"#BDF3FF",large:!0}),g.jsxs(Oe,{gap:"4",wrap:"wrap",children:[g.jsx(Co,{label:"Non-vote TPS Success",value:(e==null?void 0:e.nonvote_success.toLocaleString(void 0,{minimumFractionDigits:2,maximumFractionDigits:2}))??"-",valueColor:"#67B873"}),g.jsx(Co,{label:"Non-vote TPS Fail",value:(e==null?void 0:e.nonvote_failed.toLocaleString(void 0,{minimumFractionDigits:2,maximumFractionDigits:2}))??"-",valueColor:"#E55171"}),g.jsx(Co,{label:"Vote TPS",value:(e==null?void 0:e.vote.toLocaleString(void 0,{minimumFractionDigits:2,maximumFractionDigits:2}))??"-",valueColor:"#557AE0",style:{minWidth:"90px"}})]})]})}function QSe(){return g.jsx(C0,{style:{flex:100},children:g.jsxs(Oe,{direction:"column",height:"100%",gap:"2",children:[g.jsx(S0,{text:"Transactions"}),g.jsxs(Oe,{gap:"4",flexGrow:"1",children:[g.jsx(XSe,{}),g.jsxs(Oe,{direction:"column",flexGrow:"1",children:[g.jsx(Mn,{flexGrow:"1",minWidth:"180px",children:g.jsx(USe,{})}),g.jsxs(Oe,{justify:"between",children:[g.jsx(he,{className:MI.axisText,children:"~ 1min ago"}),g.jsx(he,{className:MI.axisText,children:"Now"})]})]})]})]})})}var JSe=typeof ws=="object"&&ws&&ws.Object===Object&&ws,JG=JSe,eCe=JG,tCe=typeof self=="object"&&self&&self.Object===Object&&self,nCe=eCe||tCe||Function("return this")(),Oa=nCe,rCe=Oa,iCe=rCe.Symbol,hp=iCe,$I=hp,eq=Object.prototype,oCe=eq.hasOwnProperty,aCe=eq.toString,vm=$I?$I.toStringTag:void 0;function sCe(e){var t=oCe.call(e,vm),n=e[vm];try{e[vm]=void 0;var r=!0}catch{}var i=aCe.call(e);return r&&(t?e[vm]=n:delete e[vm]),i}var uCe=sCe,lCe=Object.prototype,cCe=lCe.toString;function fCe(e){return cCe.call(e)}var dCe=fCe,RI=hp,hCe=uCe,pCe=dCe,mCe="[object Null]",vCe="[object Undefined]",jI=RI?RI.toStringTag:void 0;function gCe(e){return e==null?e===void 0?vCe:mCe:jI&&jI in Object(e)?hCe(e):pCe(e)}var Js=gCe;function yCe(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var Ci=yCe;const pp=Et(Ci);var bCe=Js,xCe=Ci,_Ce="[object AsyncFunction]",wCe="[object Function]",SCe="[object GeneratorFunction]",CCe="[object Proxy]";function OCe(e){if(!xCe(e))return!1;var t=bCe(e);return t==wCe||t==SCe||t==_Ce||t==CCe}var U2=OCe;const gt=Et(U2);var ECe=Oa,TCe=ECe["__core-js_shared__"],PCe=TCe,JO=PCe,II=function(){var e=/[^.]+$/.exec(JO&&JO.keys&&JO.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function ACe(e){return!!II&&II in e}var kCe=ACe,MCe=Function.prototype,$Ce=MCe.toString;function RCe(e){if(e!=null){try{return $Ce.call(e)}catch{}try{return e+""}catch{}}return""}var tq=RCe,jCe=U2,ICe=kCe,NCe=Ci,LCe=tq,DCe=/[\\^$.*+?()[\]{}|]/g,FCe=/^\[object .+?Constructor\]$/,BCe=Function.prototype,zCe=Object.prototype,WCe=BCe.toString,UCe=zCe.hasOwnProperty,VCe=RegExp("^"+WCe.call(UCe).replace(DCe,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function HCe(e){if(!NCe(e)||ICe(e))return!1;var t=jCe(e)?VCe:FCe;return t.test(LCe(e))}var GCe=HCe;function qCe(e,t){return e==null?void 0:e[t]}var KCe=qCe,ZCe=GCe,YCe=KCe;function XCe(e,t){var n=YCe(e,t);return ZCe(n)?n:void 0}var of=XCe,QCe=of,JCe=QCe(Object,"create"),V2=JCe,NI=V2;function eOe(){this.__data__=NI?NI(null):{},this.size=0}var tOe=eOe;function nOe(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var rOe=nOe,iOe=V2,oOe="__lodash_hash_undefined__",aOe=Object.prototype,sOe=aOe.hasOwnProperty;function uOe(e){var t=this.__data__;if(iOe){var n=t[e];return n===oOe?void 0:n}return sOe.call(t,e)?t[e]:void 0}var lOe=uOe,cOe=V2,fOe=Object.prototype,dOe=fOe.hasOwnProperty;function hOe(e){var t=this.__data__;return cOe?t[e]!==void 0:dOe.call(t,e)}var pOe=hOe,mOe=V2,vOe="__lodash_hash_undefined__";function gOe(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=mOe&&t===void 0?vOe:t,this}var yOe=gOe,bOe=tOe,xOe=rOe,_Oe=lOe,wOe=pOe,SOe=yOe;function mp(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t-1}var BOe=FOe,zOe=H2;function WOe(e,t){var n=this.__data__,r=zOe(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this}var UOe=WOe,VOe=EOe,HOe=jOe,GOe=LOe,qOe=BOe,KOe=UOe;function vp(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t-1}var rq=WEe;function UEe(e,t,n){for(var r=-1,i=e==null?0:e.length;++r=uTe){var l=t?null:aTe(e);if(l)return sTe(l);a=!1,i=oTe,u=new nTe}else u=t?[]:s;e:for(;++r0&&d.height>0,_=Math.round(n[0]),x=Math.round(n[1]);y&&(r==="top"?(_-=d.width/2,x-=d.height+14):r==="right"?(_+=14,x-=d.height/2):r==="bottom"?(_-=d.width/2,x+=14):r==="left"?(_-=d.width+14,x-=d.height/2):r==="center"&&(_-=d.width/2,x-=d.height/2),m={transform:DI(_,x)},p.current||(v=!0),p.current=[_,x]);var w=Qs({to:m,config:u,immediate:!s||v}),C=Wc({},bTe,o.tooltip.wrapper,{transform:(t=w.transform)!=null?t:DI(_,x),opacity:w.transform?1:0});return g.jsx(Xr.div,{ref:f,style:C,children:i})});cq.displayName="TooltipWrapper";var F3=S.memo(function(e){var t=e.size,n=t===void 0?12:t,r=e.color,i=e.style;return g.jsx("span",{style:Wc({display:"block",width:n,height:n,background:r},i===void 0?{}:i)})}),g4=S.memo(function(e){var t,n=e.id,r=e.value,i=e.format,o=e.enableChip,a=o!==void 0&&o,s=e.color,u=e.renderContent,l=oi(),f=y6(i);if(typeof u=="function")t=u();else{var d=r;f!==void 0&&d!==void 0&&(d=f(d)),t=g.jsxs("div",{style:l.tooltip.basic,children:[a&&g.jsx(F3,{color:s,style:l.tooltip.chip}),d!==void 0?g.jsxs("span",{children:[n,": ",g.jsx("strong",{children:""+d})]}):n]})}return g.jsx("div",{style:l.tooltip.container,children:t})}),xTe={width:"100%",borderCollapse:"collapse"},_Te=S.memo(function(e){var t,n=e.title,r=e.rows,i=r===void 0?[]:r,o=e.renderContent,a=oi();return i.length?(t=typeof o=="function"?o():g.jsxs("div",{children:[n&&n,g.jsx("table",{style:Wc({},xTe,a.tooltip.table),children:g.jsx("tbody",{children:i.map(function(s,u){return g.jsx("tr",{children:s.map(function(l,f){return g.jsx("td",{style:a.tooltip.tableCell,children:l},f)})},u)})})})]}),g.jsx("div",{style:a.tooltip.container,children:t})):null});_Te.displayName="TableTooltip";var B3=S.memo(function(e){var t=e.x0,n=e.x1,r=e.y0,i=e.y1,o=oi(),a=xl(),s=a.animate,u=a.config,l=S.useMemo(function(){return Wc({},o.crosshair.line,{pointerEvents:"none"})},[o.crosshair.line]),f=Qs({x1:t,x2:n,y1:r,y2:i,config:u,immediate:!s});return g.jsx(Xr.line,Wc({},f,{fill:"none",style:l}))});B3.displayName="CrosshairLine";var wTe=S.memo(function(e){var t,n,r=e.width,i=e.height,o=e.type,a=e.x,s=e.y;return o==="cross"?(t={x0:a,x1:a,y0:0,y1:i},n={x0:0,x1:r,y0:s,y1:s}):o==="top-left"?(t={x0:a,x1:a,y0:0,y1:s},n={x0:0,x1:a,y0:s,y1:s}):o==="top"?t={x0:a,x1:a,y0:0,y1:s}:o==="top-right"?(t={x0:a,x1:a,y0:0,y1:s},n={x0:a,x1:r,y0:s,y1:s}):o==="right"?n={x0:a,x1:r,y0:s,y1:s}:o==="bottom-right"?(t={x0:a,x1:a,y0:s,y1:i},n={x0:a,x1:r,y0:s,y1:s}):o==="bottom"?t={x0:a,x1:a,y0:s,y1:i}:o==="bottom-left"?(t={x0:a,x1:a,y0:s,y1:i},n={x0:0,x1:a,y0:s,y1:s}):o==="left"?n={x0:0,x1:a,y0:s,y1:s}:o==="x"?t={x0:a,x1:a,y0:0,y1:i}:o==="y"&&(n={x0:0,x1:r,y0:s,y1:s}),g.jsxs(g.Fragment,{children:[t&&g.jsx(B3,{x0:t.x0,x1:t.x1,y0:t.y0,y1:t.y1}),n&&g.jsx(B3,{x0:n.x0,x1:n.x1,y0:n.y0,y1:n.y1})]})});wTe.displayName="Crosshair";var fq=S.createContext({showTooltipAt:function(){},showTooltipFromEvent:function(){},hideTooltip:function(){}}),z3={isVisible:!1,position:[null,null],content:null,anchor:null},dq=S.createContext(z3),STe=function(e){var t=S.useState(z3),n=t[0],r=t[1],i=S.useCallback(function(s,u,l){var f=u[0],d=u[1];l===void 0&&(l="top"),r({isVisible:!0,position:[f,d],anchor:l,content:s})},[r]),o=S.useCallback(function(s,u,l){l===void 0&&(l="top");var f=e.current.getBoundingClientRect(),d=e.current.offsetWidth,p=d===f.width?1:d/f.width,m="touches"in u?u.touches[0]:u,v=m.clientX,y=m.clientY,_=(v-f.left)*p,x=(y-f.top)*p;l!=="left"&&l!=="right"||(l=_-1&&e%1==0&&e<=j3e}var w4=I3e,N3e=U2,L3e=w4;function D3e(e){return e!=null&&L3e(e.length)&&!N3e(e)}var af=D3e,F3e=af,B3e=Io;function z3e(e){return B3e(e)&&F3e(e)}var Sq=z3e,Cx={exports:{}};function W3e(){return!1}var U3e=W3e;Cx.exports;(function(e,t){var n=Oa,r=U3e,i=t&&!t.nodeType&&t,o=i&&!0&&e&&!e.nodeType&&e,a=o&&o.exports===i,s=a?n.Buffer:void 0,u=s?s.isBuffer:void 0,l=u||r;e.exports=l})(Cx,Cx.exports);var X2=Cx.exports,V3e=Js,H3e=x4,G3e=Io,q3e="[object Object]",K3e=Function.prototype,Z3e=Object.prototype,Cq=K3e.toString,Y3e=Z3e.hasOwnProperty,X3e=Cq.call(Object);function Q3e(e){if(!G3e(e)||V3e(e)!=q3e)return!1;var t=H3e(e);if(t===null)return!0;var n=Y3e.call(t,"constructor")&&t.constructor;return typeof n=="function"&&n instanceof n&&Cq.call(n)==X3e}var Oq=Q3e;const Q2=Et(Oq);var J3e=Js,ePe=w4,tPe=Io,nPe="[object Arguments]",rPe="[object Array]",iPe="[object Boolean]",oPe="[object Date]",aPe="[object Error]",sPe="[object Function]",uPe="[object Map]",lPe="[object Number]",cPe="[object Object]",fPe="[object RegExp]",dPe="[object Set]",hPe="[object String]",pPe="[object WeakMap]",mPe="[object ArrayBuffer]",vPe="[object DataView]",gPe="[object Float32Array]",yPe="[object Float64Array]",bPe="[object Int8Array]",xPe="[object Int16Array]",_Pe="[object Int32Array]",wPe="[object Uint8Array]",SPe="[object Uint8ClampedArray]",CPe="[object Uint16Array]",OPe="[object Uint32Array]",fn={};fn[gPe]=fn[yPe]=fn[bPe]=fn[xPe]=fn[_Pe]=fn[wPe]=fn[SPe]=fn[CPe]=fn[OPe]=!0;fn[nPe]=fn[rPe]=fn[mPe]=fn[iPe]=fn[vPe]=fn[oPe]=fn[aPe]=fn[sPe]=fn[uPe]=fn[lPe]=fn[cPe]=fn[fPe]=fn[dPe]=fn[hPe]=fn[pPe]=!1;function EPe(e){return tPe(e)&&ePe(e.length)&&!!fn[J3e(e)]}var TPe=EPe;function PPe(e){return function(t){return e(t)}}var E0=PPe,Ox={exports:{}};Ox.exports;(function(e,t){var n=JG,r=t&&!t.nodeType&&t,i=r&&!0&&e&&!e.nodeType&&e,o=i&&i.exports===r,a=o&&n.process,s=function(){try{var u=i&&i.require&&i.require("util").types;return u||a&&a.binding&&a.binding("util")}catch{}}();e.exports=s})(Ox,Ox.exports);var S4=Ox.exports,APe=TPe,kPe=E0,UI=S4,VI=UI&&UI.isTypedArray,MPe=VI?kPe(VI):APe,C4=MPe;function $Pe(e,t){if(!(t==="constructor"&&typeof e[t]=="function")&&t!="__proto__")return e[t]}var Eq=$Pe,RPe=Z2,jPe=O0,IPe=Object.prototype,NPe=IPe.hasOwnProperty;function LPe(e,t,n){var r=e[t];(!(NPe.call(e,t)&&jPe(r,n))||n===void 0&&!(t in e))&&RPe(e,t,n)}var O4=LPe,DPe=O4,FPe=Z2;function BPe(e,t,n,r){var i=!n;n||(n={});for(var o=-1,a=t.length;++o-1&&e%1==0&&e0){if(++t>=YAe)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}var eke=JAe,tke=ZAe,nke=eke,rke=nke(tke),kq=rke,ike=bp,oke=Aq,ake=kq;function ske(e,t){return ake(oke(e,t,ike),e+"")}var E4=ske,uke=O0,lke=af,cke=J2,fke=Ci;function dke(e,t,n){if(!fke(n))return!1;var r=typeof t;return(r=="number"?lke(n)&&cke(t,n.length):r=="string"&&t in n)?uke(n[t],e):!1}var A0=dke,hke=E4,pke=A0;function mke(e){return hke(function(t,n){var r=-1,i=n.length,o=i>1?n[i-1]:void 0,a=i>2?n[2]:void 0;for(o=e.length>3&&typeof o=="function"?(i--,o):void 0,a&&pke(n[0],n[1],a)&&(o=i<3?void 0:o,i=1),t=Object(t);++r>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):n===8?p1(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):n===4?p1(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|t&240,((t&15)<<4|t&15)/255):null):(t=v5e.exec(e))?new Rr(t[1],t[2],t[3],1):(t=g5e.exec(e))?new Rr(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=y5e.exec(e))?p1(t[1],t[2],t[3],t[4]):(t=b5e.exec(e))?p1(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=x5e.exec(e))?sN(t[1],t[2]/100,t[3]/100,1):(t=_5e.exec(e))?sN(t[1],t[2]/100,t[3]/100,t[4]):tN.hasOwnProperty(e)?iN(tN[e]):e==="transparent"?new Rr(NaN,NaN,NaN,0):null}function iN(e){return new Rr(e>>16&255,e>>8&255,e&255,1)}function p1(e,t,n,r){return r<=0&&(e=t=n=NaN),new Rr(e,t,n,r)}function Lq(e){return e instanceof _p||(e=hg(e)),e?(e=e.rgb(),new Rr(e.r,e.g,e.b,e.opacity)):new Rr}function xh(e,t,n,r){return arguments.length===1?Lq(e):new Rr(e,t,n,r??1)}function Rr(e,t,n,r){this.r=+e,this.g=+t,this.b=+n,this.opacity=+r}rw(Rr,xh,A4(_p,{brighter(e){return e=e==null?bh:Math.pow(bh,e),new Rr(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?Uc:Math.pow(Uc,e),new Rr(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new Rr(Sc(this.r),Sc(this.g),Sc(this.b),Ex(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:oN,formatHex:oN,formatHex8:C5e,formatRgb:aN,toString:aN}));function oN(){return`#${hc(this.r)}${hc(this.g)}${hc(this.b)}`}function C5e(){return`#${hc(this.r)}${hc(this.g)}${hc(this.b)}${hc((isNaN(this.opacity)?1:this.opacity)*255)}`}function aN(){const e=Ex(this.opacity);return`${e===1?"rgb(":"rgba("}${Sc(this.r)}, ${Sc(this.g)}, ${Sc(this.b)}${e===1?")":`, ${e})`}`}function Ex(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function Sc(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function hc(e){return e=Sc(e),(e<16?"0":"")+e.toString(16)}function sN(e,t,n,r){return r<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new ua(e,t,n,r)}function Dq(e){if(e instanceof ua)return new ua(e.h,e.s,e.l,e.opacity);if(e instanceof _p||(e=hg(e)),!e)return new ua;if(e instanceof ua)return e;e=e.rgb();var t=e.r/255,n=e.g/255,r=e.b/255,i=Math.min(t,n,r),o=Math.max(t,n,r),a=NaN,s=o-i,u=(o+i)/2;return s?(t===o?a=(n-r)/s+(n0&&u<1?0:a,new ua(a,s,u,e.opacity)}function O5e(e,t,n,r){return arguments.length===1?Dq(e):new ua(e,t,n,r??1)}function ua(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}rw(ua,O5e,A4(_p,{brighter(e){return e=e==null?bh:Math.pow(bh,e),new ua(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?Uc:Math.pow(Uc,e),new ua(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+(this.h<0)*360,t=isNaN(e)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*t,i=2*n-r;return new Rr(tE(e>=240?e-240:e+120,i,r),tE(e,i,r),tE(e<120?e+240:e-120,i,r),this.opacity)},clamp(){return new ua(uN(this.h),m1(this.s),m1(this.l),Ex(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const e=Ex(this.opacity);return`${e===1?"hsl(":"hsla("}${uN(this.h)}, ${m1(this.s)*100}%, ${m1(this.l)*100}%${e===1?")":`, ${e})`}`}}));function uN(e){return e=(e||0)%360,e<0?e+360:e}function m1(e){return Math.max(0,Math.min(1,e||0))}function tE(e,t,n){return(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)*255}const E5e=Math.PI/180,T5e=180/Math.PI;var Fq=-.14861,k4=1.78277,M4=-.29227,iw=-.90649,pg=1.97294,lN=pg*iw,cN=pg*k4,fN=k4*M4-iw*Fq;function P5e(e){if(e instanceof Cc)return new Cc(e.h,e.s,e.l,e.opacity);e instanceof Rr||(e=Lq(e));var t=e.r/255,n=e.g/255,r=e.b/255,i=(fN*r+lN*t-cN*n)/(fN+lN-cN),o=r-i,a=(pg*(n-i)-M4*o)/iw,s=Math.sqrt(a*a+o*o)/(pg*i*(1-i)),u=s?Math.atan2(a,o)*T5e-120:NaN;return new Cc(u<0?u+360:u,s,i,e.opacity)}function Xa(e,t,n,r){return arguments.length===1?P5e(e):new Cc(e,t,n,r??1)}function Cc(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}rw(Cc,Xa,A4(_p,{brighter(e){return e=e==null?bh:Math.pow(bh,e),new Cc(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?Uc:Math.pow(Uc,e),new Cc(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=isNaN(this.h)?0:(this.h+120)*E5e,t=+this.l,n=isNaN(this.s)?0:this.s*t*(1-t),r=Math.cos(e),i=Math.sin(e);return new Rr(255*(t+n*(Fq*r+k4*i)),255*(t+n*(M4*r+iw*i)),255*(t+n*(pg*r)),this.opacity)}}));function A5e(e,t,n,r,i){var o=e*e,a=o*e;return((1-3*e+3*o-a)*t+(4-6*o+3*a)*n+(1+3*e+3*o-3*a)*r+a*i)/6}function k5e(e){var t=e.length-1;return function(n){var r=n<=0?n=0:n>=1?(n=1,t-1):Math.floor(n*t),i=e[r],o=e[r+1],a=r>0?e[r-1]:2*i-o,s=r()=>e;function Bq(e,t){return function(n){return e+n*t}}function M5e(e,t,n){return e=Math.pow(e,n),t=Math.pow(t,n)-e,n=1/n,function(r){return Math.pow(e+r*t,n)}}function $5e(e,t){var n=t-e;return n?Bq(e,n>180||n<-180?n-360*Math.round(n/360):n):ow(isNaN(e)?t:e)}function R5e(e){return(e=+e)==1?Gd:function(t,n){return n-t?M5e(t,n,e):ow(isNaN(t)?n:t)}}function Gd(e,t){var n=t-e;return n?Bq(e,n):ow(isNaN(e)?t:e)}const dN=function e(t){var n=R5e(t);function r(i,o){var a=n((i=xh(i)).r,(o=xh(o)).r),s=n(i.g,o.g),u=n(i.b,o.b),l=Gd(i.opacity,o.opacity);return function(f){return i.r=a(f),i.g=s(f),i.b=u(f),i.opacity=l(f),i+""}}return r.gamma=e,r}(1);function j5e(e){return function(t){var n=t.length,r=new Array(n),i=new Array(n),o=new Array(n),a,s;for(a=0;an&&(o=t.slice(n,o),s[a]?s[a]+=o:s[++a]=o),(r=r[0])===(i=i[0])?s[a]?s[a]+=i:s[++a]=i:(s[++a]=null,u.push({i:a,x:Tx(r,i)})),n=nE.lastIndex;return nt?1:e>=t?0:NaN}function Q5e(e,t){return e==null||t==null?NaN:te?1:t>=e?0:NaN}function j4(e){let t,n,r;e.length!==2?(t=Xu,n=(s,u)=>Xu(e(s),u),r=(s,u)=>e(s)-u):(t=e===Xu||e===Q5e?e:J5e,n=e,r=e);function i(s,u,l=0,f=s.length){if(l>>1;n(s[d],u)<0?l=d+1:f=d}while(l>>1;n(s[d],u)<=0?l=d+1:f=d}while(ll&&r(s[d-1],u)>-r(s[d],u)?d-1:d}return{left:i,center:a,right:o}}function J5e(){return 0}function Uq(e){return e===null?NaN:+e}function*e4e(e,t){for(let n of e)n!=null&&(n=+n)>=n&&(yield n)}const t4e=j4(Xu),M0=t4e.right;j4(Uq).center;class hN extends Map{constructor(t,n=i4e){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:n}}),t!=null)for(const[r,i]of t)this.set(r,i)}get(t){return super.get(pN(this,t))}has(t){return super.has(pN(this,t))}set(t,n){return super.set(n4e(this,t),n)}delete(t){return super.delete(r4e(this,t))}}function pN({_intern:e,_key:t},n){const r=t(n);return e.has(r)?e.get(r):n}function n4e({_intern:e,_key:t},n){const r=t(n);return e.has(r)?e.get(r):(e.set(r,n),n)}function r4e({_intern:e,_key:t},n){const r=t(n);return e.has(r)&&(n=e.get(r),e.delete(r)),n}function i4e(e){return e!==null&&typeof e=="object"?e.valueOf():e}function o4e(e=Xu){if(e===Xu)return Vq;if(typeof e!="function")throw new TypeError("compare is not a function");return(t,n)=>{const r=e(t,n);return r||r===0?r:(e(n,n)===0)-(e(t,t)===0)}}function Vq(e,t){return(e==null||!(e>=e))-(t==null||!(t>=t))||(et?1:0)}const a4e=Math.sqrt(50),s4e=Math.sqrt(10),u4e=Math.sqrt(2);function Px(e,t,n){const r=(t-e)/Math.max(0,n),i=Math.floor(Math.log10(r)),o=r/Math.pow(10,i),a=o>=a4e?10:o>=s4e?5:o>=u4e?2:1;let s,u,l;return i<0?(l=Math.pow(10,-i)/a,s=Math.round(e*l),u=Math.round(t*l),s/lt&&--u,l=-l):(l=Math.pow(10,i)*a,s=Math.round(e/l),u=Math.round(t/l),s*lt&&--u),u0))return[];if(e===t)return[e];const r=t=i))return[];const s=o-i+1,u=new Array(s);if(r)if(a<0)for(let l=0;l=r)&&(n=r);else{let r=-1;for(let i of e)(i=t(i,++r,e))!=null&&(n=i)&&(n=i)}return n}function kx(e,t){let n;if(t===void 0)for(const r of e)r!=null&&(n>r||n===void 0&&r>=r)&&(n=r);else{let r=-1;for(let i of e)(i=t(i,++r,e))!=null&&(n>i||n===void 0&&i>=i)&&(n=i)}return n}function Hq(e,t,n=0,r=1/0,i){if(t=Math.floor(t),n=Math.floor(Math.max(0,n)),r=Math.floor(Math.min(e.length-1,r)),!(n<=t&&t<=r))return e;for(i=i===void 0?Vq:o4e(i);r>n;){if(r-n>600){const u=r-n+1,l=t-n+1,f=Math.log(u),d=.5*Math.exp(2*f/3),p=.5*Math.sqrt(f*d*(u-d)/u)*(l-u/2<0?-1:1),m=Math.max(n,Math.floor(t-l*d/u+p)),v=Math.min(r,Math.floor(t+(u-l)*d/u+p));Hq(e,t,m,v,i)}const o=e[t];let a=n,s=r;for(gm(e,n,t),i(e[r],o)>0&&gm(e,n,r);a0;)--s}i(e[n],o)===0?gm(e,n,s):(++s,gm(e,s,r)),s<=t&&(n=s+1),t<=s&&(r=s-1)}return e}function gm(e,t,n){const r=e[t];e[t]=e[n],e[n]=r}function l4e(e,t,n){if(e=Float64Array.from(e4e(e)),!(!(r=e.length)||isNaN(t=+t))){if(t<=0||r<2)return kx(e);if(t>=1)return Ax(e);var r,i=(r-1)*t,o=Math.floor(i),a=Ax(Hq(e,o).subarray(0,o+1)),s=kx(e.subarray(o+1));return a+(s-a)*(i-o)}}function c4e(e,t,n=Uq){if(!(!(r=e.length)||isNaN(t=+t))){if(t<=0||r<2)return+n(e[0],0,e);if(t>=1)return+n(e[r-1],r-1,e);var r,i=(r-1)*t,o=Math.floor(i),a=+n(e[o],o,e),s=+n(e[o+1],o+1,e);return a+(s-a)*(i-o)}}function f4e(e,t,n){e=+e,t=+t,n=(i=arguments.length)<2?(t=e,e=0,1):i<3?1:+n;for(var r=-1,i=Math.max(0,Math.ceil((t-e)/n))|0,o=new Array(i);++rt&&(n=e,e=t,t=n),function(r){return Math.max(e,Math.min(t,r))}}function p4e(e,t,n){var r=e[0],i=e[1],o=t[0],a=t[1];return i2?m4e:p4e,u=l=null,d}function d(p){return p==null||isNaN(p=+p)?o:(u||(u=s(e.map(r),t,n)))(r(a(p)))}return d.invert=function(p){return a(i((l||(l=s(t,e.map(r),Tx)))(p)))},d.domain=function(p){return arguments.length?(e=Array.from(p,Mx),f()):e.slice()},d.range=function(p){return arguments.length?(t=Array.from(p),f()):t.slice()},d.rangeRound=function(p){return t=Array.from(p),n=$4,f()},d.clamp=function(p){return arguments.length?(a=p?!0:Kr,f()):a!==Kr},d.interpolate=function(p){return arguments.length?(n=p,f()):n},d.unknown=function(p){return arguments.length?(o=p,d):o},function(p,m){return r=p,i=m,f()}}function I4(){return aw()(Kr,Kr)}function v4e(e){return Math.abs(e=Math.round(e))>=1e21?e.toLocaleString("en").replace(/,/g,""):e.toString(10)}function $x(e,t){if((n=(e=t?e.toExponential(t-1):e.toExponential()).indexOf("e"))<0)return null;var n,r=e.slice(0,n);return[r.length>1?r[0]+r.slice(2):r,+e.slice(n+1)]}function _h(e){return e=$x(Math.abs(e)),e?e[1]:NaN}function g4e(e,t){return function(n,r){for(var i=n.length,o=[],a=0,s=e[0],u=0;i>0&&s>0&&(u+s+1>r&&(s=Math.max(1,r-u)),o.push(n.substring(i-=s,i+s)),!((u+=s+1)>r));)s=e[a=(a+1)%e.length];return o.reverse().join(t)}}function y4e(e){return function(t){return t.replace(/[0-9]/g,function(n){return e[+n]})}}var b4e=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function vg(e){if(!(t=b4e.exec(e)))throw new Error("invalid format: "+e);var t;return new N4({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]})}vg.prototype=N4.prototype;function N4(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+""}N4.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 x4e(e){e:for(var t=e.length,n=1,r=-1,i;n0&&(r=0);break}return r>0?e.slice(0,r)+e.slice(i+1):e}var qq;function _4e(e,t){var n=$x(e,t);if(!n)return e+"";var r=n[0],i=n[1],o=i-(qq=Math.max(-8,Math.min(8,Math.floor(i/3)))*3)+1,a=r.length;return o===a?r:o>a?r+new Array(o-a+1).join("0"):o>0?r.slice(0,o)+"."+r.slice(o):"0."+new Array(1-o).join("0")+$x(e,Math.max(0,t+o-1))[0]}function vN(e,t){var n=$x(e,t);if(!n)return e+"";var r=n[0],i=n[1];return i<0?"0."+new Array(-i).join("0")+r:r.length>i+1?r.slice(0,i+1)+"."+r.slice(i+1):r+new Array(i-r.length+2).join("0")}const gN={"%":function(e,t){return(e*100).toFixed(t)},b:function(e){return Math.round(e).toString(2)},c:function(e){return e+""},d:v4e,e:function(e,t){return e.toExponential(t)},f:function(e,t){return e.toFixed(t)},g:function(e,t){return e.toPrecision(t)},o:function(e){return Math.round(e).toString(8)},p:function(e,t){return vN(e*100,t)},r:vN,s:_4e,X:function(e){return Math.round(e).toString(16).toUpperCase()},x:function(e){return Math.round(e).toString(16)}};function yN(e){return e}var bN=Array.prototype.map,xN=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function w4e(e){var t=e.grouping===void 0||e.thousands===void 0?yN:g4e(bN.call(e.grouping,Number),e.thousands+""),n=e.currency===void 0?"":e.currency[0]+"",r=e.currency===void 0?"":e.currency[1]+"",i=e.decimal+"",o=e.numerals===void 0?yN:y4e(bN.call(e.numerals,String)),a=e.percent===void 0?"%":e.percent+"",s=e.minus+"",u=e.nan===void 0?"NaN":e.nan+"";function l(d){d=vg(d);var p=d.fill,m=d.align,v=d.sign,y=d.symbol,_=d.zero,x=d.width,w=d.comma,C=d.precision,E=d.trim,O=d.type;O==="n"?(w=!0,O="g"):gN[O]||(C===void 0&&(C=12),E=!0,O="g"),(_||p==="0"&&m==="=")&&(_=!0,p="0",m="=");var T=y==="$"?n:y==="#"&&/[boxX]/.test(O)?"0"+O.toLowerCase():"",A=y==="$"?r:/[%p]/.test(O)?a:"",k=gN[O],M=/[defgprs%]/.test(O);C=C===void 0?6:/[gprs]/.test(O)?Math.max(1,Math.min(21,C)):Math.max(0,Math.min(20,C));function $(j){var N=T,U=A,B,G,D;if(O==="c")U=k(j)+U,j="";else{j=+j;var H=j<0||1/j<0;if(j=isNaN(j)?u:k(Math.abs(j),C),E&&(j=x4e(j)),H&&+j==0&&v!=="+"&&(H=!1),N=(H?v==="("?v:s:v==="-"||v==="("?"":v)+N,U=(O==="s"?xN[8+qq/3]:"")+U+(H&&v==="("?")":""),M){for(B=-1,G=j.length;++BD||D>57){U=(D===46?i+j.slice(B+1):j.slice(B))+U,j=j.slice(0,B);break}}}w&&!_&&(j=t(j,1/0));var F=N.length+j.length+U.length,W=F>1)+N+j+U+W.slice(F);break;default:j=W+N+j+U;break}return o(j)}return $.toString=function(){return d+""},$}function f(d,p){var m=l((d=vg(d),d.type="f",d)),v=Math.max(-8,Math.min(8,Math.floor(_h(p)/3)))*3,y=Math.pow(10,-v),_=xN[8+v/3];return function(x){return m(y*x)+_}}return{format:l,formatPrefix:f}}var v1,sw,Kq;S4e({decimal:".",thousands:",",grouping:[3],currency:["$",""],minus:"-"});function S4e(e){return v1=w4e(e),sw=v1.format,Kq=v1.formatPrefix,v1}function C4e(e){return Math.max(0,-_h(Math.abs(e)))}function O4e(e,t){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(_h(t)/3)))*3-_h(Math.abs(e)))}function E4e(e,t){return e=Math.abs(e),t=Math.abs(t)-e,Math.max(0,_h(t)-_h(e))+1}function Zq(e,t,n,r){var i=H3(e,t,n),o;switch(r=vg(r??",f"),r.type){case"s":{var a=Math.max(Math.abs(e),Math.abs(t));return r.precision==null&&!isNaN(o=O4e(i,a))&&(r.precision=o),Kq(r,a)}case"":case"e":case"g":case"p":case"r":{r.precision==null&&!isNaN(o=E4e(i,Math.max(Math.abs(e),Math.abs(t))))&&(r.precision=o-(r.type==="e"));break}case"f":case"%":{r.precision==null&&!isNaN(o=C4e(i))&&(r.precision=o-(r.type==="%")*2);break}}return sw(r)}function yl(e){var t=e.domain;return e.ticks=function(n){var r=t();return U3(r[0],r[r.length-1],n??10)},e.tickFormat=function(n,r){var i=t();return Zq(i[0],i[i.length-1],n??10,r)},e.nice=function(n){n==null&&(n=10);var r=t(),i=0,o=r.length-1,a=r[i],s=r[o],u,l,f=10;for(s0;){if(l=V3(a,s,n),l===u)return r[i]=a,r[o]=s,t(r);if(l>0)a=Math.floor(a/l)*l,s=Math.ceil(s/l)*l;else if(l<0)a=Math.ceil(a*l)/l,s=Math.floor(s*l)/l;else break;u=l}return e},e}function Rx(){var e=I4();return e.copy=function(){return $0(e,Rx())},No.apply(e,arguments),yl(e)}function Yq(e){var t;function n(r){return r==null||isNaN(r=+r)?t:r}return n.invert=n,n.domain=n.range=function(r){return arguments.length?(e=Array.from(r,Mx),n):e.slice()},n.unknown=function(r){return arguments.length?(t=r,n):t},n.copy=function(){return Yq(e).unknown(t)},e=arguments.length?Array.from(e,Mx):[0,1],yl(n)}function Xq(e,t){e=e.slice();var n=0,r=e.length-1,i=e[n],o=e[r],a;return oMath.pow(e,t)}function M4e(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 SN(e){return(t,n)=>-e(-t,n)}function L4(e){const t=e(_N,wN),n=t.domain;let r=10,i,o;function a(){return i=M4e(r),o=k4e(r),n()[0]<0?(i=SN(i),o=SN(o),e(T4e,P4e)):e(_N,wN),t}return t.base=function(s){return arguments.length?(r=+s,a()):r},t.domain=function(s){return arguments.length?(n(s),a()):n()},t.ticks=s=>{const u=n();let l=u[0],f=u[u.length-1];const d=f0){for(;p<=m;++p)for(v=1;vf)break;x.push(y)}}else for(;p<=m;++p)for(v=r-1;v>=1;--v)if(y=p>0?v/o(-p):v*o(p),!(yf)break;x.push(y)}x.length*2<_&&(x=U3(l,f,_))}else x=U3(p,m,Math.min(m-p,_)).map(o);return d?x.reverse():x},t.tickFormat=(s,u)=>{if(s==null&&(s=10),u==null&&(u=r===10?"s":","),typeof u!="function"&&(!(r%1)&&(u=vg(u)).precision==null&&(u.trim=!0),u=sw(u)),s===1/0)return u;const l=Math.max(1,r*s/t.ticks().length);return f=>{let d=f/o(Math.round(i(f)));return d*rn(Xq(n(),{floor:s=>o(Math.floor(i(s))),ceil:s=>o(Math.ceil(i(s)))})),t}function Qq(){const e=L4(aw()).domain([1,10]);return e.copy=()=>$0(e,Qq()).base(e.base()),No.apply(e,arguments),e}function CN(e){return function(t){return Math.sign(t)*Math.log1p(Math.abs(t/e))}}function ON(e){return function(t){return Math.sign(t)*Math.expm1(Math.abs(t))*e}}function D4(e){var t=1,n=e(CN(t),ON(t));return n.constant=function(r){return arguments.length?e(CN(t=+r),ON(t)):t},yl(n)}function Jq(){var e=D4(aw());return e.copy=function(){return $0(e,Jq()).constant(e.constant())},No.apply(e,arguments)}function EN(e){return function(t){return t<0?-Math.pow(-t,e):Math.pow(t,e)}}function $4e(e){return e<0?-Math.sqrt(-e):Math.sqrt(e)}function R4e(e){return e<0?-e*e:e*e}function F4(e){var t=e(Kr,Kr),n=1;function r(){return n===1?e(Kr,Kr):n===.5?e($4e,R4e):e(EN(n),EN(1/n))}return t.exponent=function(i){return arguments.length?(n=+i,r()):n},yl(t)}function B4(){var e=F4(aw());return e.copy=function(){return $0(e,B4()).exponent(e.exponent())},No.apply(e,arguments),e}function j4e(){return B4.apply(null,arguments).exponent(.5)}function TN(e){return Math.sign(e)*e*e}function I4e(e){return Math.sign(e)*Math.sqrt(Math.abs(e))}function eK(){var e=I4(),t=[0,1],n=!1,r;function i(o){var a=I4e(e(o));return isNaN(a)?r:n?Math.round(a):a}return i.invert=function(o){return e.invert(TN(o))},i.domain=function(o){return arguments.length?(e.domain(o),i):e.domain()},i.range=function(o){return arguments.length?(e.range((t=Array.from(o,Mx)).map(TN)),i):t.slice()},i.rangeRound=function(o){return i.range(o).round(!0)},i.round=function(o){return arguments.length?(n=!!o,i):n},i.clamp=function(o){return arguments.length?(e.clamp(o),i):e.clamp()},i.unknown=function(o){return arguments.length?(r=o,i):r},i.copy=function(){return eK(e.domain(),t).round(n).clamp(e.clamp()).unknown(r)},No.apply(i,arguments),yl(i)}function tK(){var e=[],t=[],n=[],r;function i(){var a=0,s=Math.max(1,t.length);for(n=new Array(s-1);++a0?n[s-1]:e[0],s=n?[r[n-1],t]:[r[l-1],r[l]]},a.unknown=function(u){return arguments.length&&(o=u),a},a.thresholds=function(){return r.slice()},a.copy=function(){return nK().domain([e,t]).range(i).unknown(o)},No.apply(yl(a),arguments)}function rK(){var e=[.5],t=[0,1],n,r=1;function i(o){return o!=null&&o<=o?t[M0(e,o,0,r)]:n}return i.domain=function(o){return arguments.length?(e=Array.from(o),r=Math.min(e.length,t.length-1),i):e.slice()},i.range=function(o){return arguments.length?(t=Array.from(o),r=Math.min(e.length,t.length-1),i):t.slice()},i.invertExtent=function(o){var a=t.indexOf(o);return[e[a-1],e[a]]},i.unknown=function(o){return arguments.length?(n=o,i):n},i.copy=function(){return rK().domain(e).range(t).unknown(n)},No.apply(i,arguments)}const iE=new Date,oE=new Date;function Jn(e,t,n,r){function i(o){return e(o=arguments.length===0?new Date:new Date(+o)),o}return i.floor=o=>(e(o=new Date(+o)),o),i.ceil=o=>(e(o=new Date(o-1)),t(o,1),e(o),o),i.round=o=>{const a=i(o),s=i.ceil(o);return o-a(t(o=new Date(+o),a==null?1:Math.floor(a)),o),i.range=(o,a,s)=>{const u=[];if(o=i.ceil(o),s=s==null?1:Math.floor(s),!(o0))return u;let l;do u.push(l=new Date(+o)),t(o,s),e(o);while(lJn(a=>{if(a>=a)for(;e(a),!o(a);)a.setTime(a-1)},(a,s)=>{if(a>=a)if(s<0)for(;++s<=0;)for(;t(a,-1),!o(a););else for(;--s>=0;)for(;t(a,1),!o(a););}),n&&(i.count=(o,a)=>(iE.setTime(+o),oE.setTime(+a),e(iE),e(oE),Math.floor(n(iE,oE))),i.every=o=>(o=Math.floor(o),!isFinite(o)||!(o>0)?null:o>1?i.filter(r?a=>r(a)%o===0:a=>i.count(0,a)%o===0):i)),i}const jx=Jn(()=>{},(e,t)=>{e.setTime(+e+t)},(e,t)=>t-e);jx.every=e=>(e=Math.floor(e),!isFinite(e)||!(e>0)?null:e>1?Jn(t=>{t.setTime(Math.floor(t/e)*e)},(t,n)=>{t.setTime(+t+n*e)},(t,n)=>(n-t)/e):jx);jx.range;const Os=1e3,Oo=Os*60,Es=Oo*60,Vs=Es*24,z4=Vs*7,PN=Vs*30,aE=Vs*365,pc=Jn(e=>{e.setTime(e-e.getMilliseconds())},(e,t)=>{e.setTime(+e+t*Os)},(e,t)=>(t-e)/Os,e=>e.getUTCSeconds());pc.range;const W4=Jn(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*Os)},(e,t)=>{e.setTime(+e+t*Oo)},(e,t)=>(t-e)/Oo,e=>e.getMinutes());W4.range;const U4=Jn(e=>{e.setUTCSeconds(0,0)},(e,t)=>{e.setTime(+e+t*Oo)},(e,t)=>(t-e)/Oo,e=>e.getUTCMinutes());U4.range;const V4=Jn(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*Os-e.getMinutes()*Oo)},(e,t)=>{e.setTime(+e+t*Es)},(e,t)=>(t-e)/Es,e=>e.getHours());V4.range;const H4=Jn(e=>{e.setUTCMinutes(0,0,0)},(e,t)=>{e.setTime(+e+t*Es)},(e,t)=>(t-e)/Es,e=>e.getUTCHours());H4.range;const G4=Jn(e=>e.setHours(0,0,0,0),(e,t)=>e.setDate(e.getDate()+t),(e,t)=>(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*Oo)/Vs,e=>e.getDate()-1);G4.range;const iK=Jn(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/Vs,e=>e.getUTCDate()-1);iK.range;const oK=Jn(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/Vs,e=>Math.floor(e/Vs));oK.range;function sf(e){return Jn(t=>{t.setDate(t.getDate()-(t.getDay()+7-e)%7),t.setHours(0,0,0,0)},(t,n)=>{t.setDate(t.getDate()+n*7)},(t,n)=>(n-t-(n.getTimezoneOffset()-t.getTimezoneOffset())*Oo)/z4)}const q4=sf(0),N4e=sf(1),L4e=sf(2),D4e=sf(3),F4e=sf(4),B4e=sf(5),z4e=sf(6);q4.range;N4e.range;L4e.range;D4e.range;F4e.range;B4e.range;z4e.range;function uf(e){return Jn(t=>{t.setUTCDate(t.getUTCDate()-(t.getUTCDay()+7-e)%7),t.setUTCHours(0,0,0,0)},(t,n)=>{t.setUTCDate(t.getUTCDate()+n*7)},(t,n)=>(n-t)/z4)}const K4=uf(0),W4e=uf(1),U4e=uf(2),V4e=uf(3),H4e=uf(4),G4e=uf(5),q4e=uf(6);K4.range;W4e.range;U4e.range;V4e.range;H4e.range;G4e.range;q4e.range;const Z4=Jn(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());Z4.range;const Y4=Jn(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());Y4.range;const uw=Jn(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());uw.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:Jn(t=>{t.setFullYear(Math.floor(t.getFullYear()/e)*e),t.setMonth(0,1),t.setHours(0,0,0,0)},(t,n)=>{t.setFullYear(t.getFullYear()+n*e)});uw.range;const lw=Jn(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());lw.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:Jn(t=>{t.setUTCFullYear(Math.floor(t.getUTCFullYear()/e)*e),t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},(t,n)=>{t.setUTCFullYear(t.getUTCFullYear()+n*e)});lw.range;function aK(e,t,n,r,i,o){const a=[[pc,1,Os],[pc,5,5*Os],[pc,15,15*Os],[pc,30,30*Os],[o,1,Oo],[o,5,5*Oo],[o,15,15*Oo],[o,30,30*Oo],[i,1,Es],[i,3,3*Es],[i,6,6*Es],[i,12,12*Es],[r,1,Vs],[r,2,2*Vs],[n,1,z4],[t,1,PN],[t,3,3*PN],[e,1,aE]];function s(l,f,d){const p=f_).right(a,p);if(m===a.length)return e.every(H3(l/aE,f/aE,d));if(m===0)return jx.every(Math.max(H3(l,f,d),1));const[v,y]=a[p/a[m-1][2]0))return u;do u.push(l=new Date(+o)),t(o,s),e(o);while(l=a)for(;e(a),!o(a);)a.setTime(a-1)},function(a,s){if(a>=a)if(s<0)for(;++s<=0;)for(;t(a,-1),!o(a););else for(;--s>=0;)for(;t(a,1),!o(a););})},n&&(i.count=function(o,a){return sE.setTime(+o),uE.setTime(+a),e(sE),e(uE),Math.floor(n(sE,uE))},i.every=function(o){return o=Math.floor(o),!isFinite(o)||!(o>0)?null:o>1?i.filter(r?function(a){return r(a)%o===0}:function(a){return i.count(0,a)%o===0}):i}),i}const Q4e=1e3,X4=Q4e*60,J4e=X4*60,Q4=J4e*24,sK=Q4*7;var J4=tu(e=>e.setHours(0,0,0,0),(e,t)=>e.setDate(e.getDate()+t),(e,t)=>(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*X4)/Q4,e=>e.getDate()-1);J4.range;function lf(e){return tu(function(t){t.setDate(t.getDate()-(t.getDay()+7-e)%7),t.setHours(0,0,0,0)},function(t,n){t.setDate(t.getDate()+n*7)},function(t,n){return(n-t-(n.getTimezoneOffset()-t.getTimezoneOffset())*X4)/sK})}var uK=lf(0),Ix=lf(1),e6e=lf(2),t6e=lf(3),wh=lf(4),n6e=lf(5),r6e=lf(6);uK.range;Ix.range;e6e.range;t6e.range;wh.range;n6e.range;r6e.range;var Vc=tu(function(e){e.setMonth(0,1),e.setHours(0,0,0,0)},function(e,t){e.setFullYear(e.getFullYear()+t)},function(e,t){return t.getFullYear()-e.getFullYear()},function(e){return e.getFullYear()});Vc.every=function(e){return!isFinite(e=Math.floor(e))||!(e>0)?null:tu(function(t){t.setFullYear(Math.floor(t.getFullYear()/e)*e),t.setMonth(0,1),t.setHours(0,0,0,0)},function(t,n){t.setFullYear(t.getFullYear()+n*e)})};Vc.range;var e6=tu(function(e){e.setUTCHours(0,0,0,0)},function(e,t){e.setUTCDate(e.getUTCDate()+t)},function(e,t){return(t-e)/Q4},function(e){return e.getUTCDate()-1});e6.range;function cf(e){return tu(function(t){t.setUTCDate(t.getUTCDate()-(t.getUTCDay()+7-e)%7),t.setUTCHours(0,0,0,0)},function(t,n){t.setUTCDate(t.getUTCDate()+n*7)},function(t,n){return(n-t)/sK})}var lK=cf(0),Nx=cf(1),i6e=cf(2),o6e=cf(3),Sh=cf(4),a6e=cf(5),s6e=cf(6);lK.range;Nx.range;i6e.range;o6e.range;Sh.range;a6e.range;s6e.range;var Hc=tu(function(e){e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)},function(e,t){e.setUTCFullYear(e.getUTCFullYear()+t)},function(e,t){return t.getUTCFullYear()-e.getUTCFullYear()},function(e){return e.getUTCFullYear()});Hc.every=function(e){return!isFinite(e=Math.floor(e))||!(e>0)?null:tu(function(t){t.setUTCFullYear(Math.floor(t.getUTCFullYear()/e)*e),t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},function(t,n){t.setUTCFullYear(t.getUTCFullYear()+n*e)})};Hc.range;function lE(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 cE(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 ym(e,t,n){return{y:e,m:t,d:n,H:0,M:0,S:0,L:0}}function u6e(e){var t=e.dateTime,n=e.date,r=e.time,i=e.periods,o=e.days,a=e.shortDays,s=e.months,u=e.shortMonths,l=bm(i),f=xm(i),d=bm(o),p=xm(o),m=bm(a),v=xm(a),y=bm(s),_=xm(s),x=bm(u),w=xm(u),C={a:H,A:F,b:W,B:Y,c:null,d:jN,e:jN,f:M6e,g:z6e,G:U6e,H:P6e,I:A6e,j:k6e,L:cK,m:$6e,M:R6e,p:te,q:K,Q:LN,s:DN,S:j6e,u:I6e,U:N6e,V:L6e,w:D6e,W:F6e,x:null,X:null,y:B6e,Y:W6e,Z:V6e,"%":NN},E={a:ie,A:le,b:ue,B:ge,c:null,d:IN,e:IN,f:K6e,g:i8e,G:a8e,H:H6e,I:G6e,j:q6e,L:dK,m:Z6e,M:Y6e,p:_e,q:ke,Q:LN,s:DN,S:X6e,u:Q6e,U:J6e,V:e8e,w:t8e,W:n8e,x:null,X:null,y:r8e,Y:o8e,Z:s8e,"%":NN},O={a:$,A:j,b:N,B:U,c:B,d:$N,e:$N,f:C6e,g:MN,G:kN,H:RN,I:RN,j:x6e,L:S6e,m:b6e,M:_6e,p:M,q:y6e,Q:E6e,s:T6e,S:w6e,u:h6e,U:p6e,V:m6e,w:d6e,W:v6e,x:G,X:D,y:MN,Y:kN,Z:g6e,"%":O6e};C.x=T(n,C),C.X=T(r,C),C.c=T(t,C),E.x=T(n,E),E.X=T(r,E),E.c=T(t,E);function T(ae,Te){return function(Le){var fe=[],Ze=-1,De=0,He=ae.length,Qe,Ge,It;for(Le instanceof Date||(Le=new Date(+Le));++Ze53)return null;"w"in fe||(fe.w=1),"Z"in fe?(De=cE(ym(fe.y,0,1)),He=De.getUTCDay(),De=He>4||He===0?Nx.ceil(De):Nx(De),De=e6.offset(De,(fe.V-1)*7),fe.y=De.getUTCFullYear(),fe.m=De.getUTCMonth(),fe.d=De.getUTCDate()+(fe.w+6)%7):(De=lE(ym(fe.y,0,1)),He=De.getDay(),De=He>4||He===0?Ix.ceil(De):Ix(De),De=J4.offset(De,(fe.V-1)*7),fe.y=De.getFullYear(),fe.m=De.getMonth(),fe.d=De.getDate()+(fe.w+6)%7)}else("W"in fe||"U"in fe)&&("w"in fe||(fe.w="u"in fe?fe.u%7:"W"in fe?1:0),He="Z"in fe?cE(ym(fe.y,0,1)).getUTCDay():lE(ym(fe.y,0,1)).getDay(),fe.m=0,fe.d="W"in fe?(fe.w+6)%7+fe.W*7-(He+5)%7:fe.w+fe.U*7-(He+6)%7);return"Z"in fe?(fe.H+=fe.Z/100|0,fe.M+=fe.Z%100,cE(fe)):lE(fe)}}function k(ae,Te,Le,fe){for(var Ze=0,De=Te.length,He=Le.length,Qe,Ge;Ze=He)return-1;if(Qe=Te.charCodeAt(Ze++),Qe===37){if(Qe=Te.charAt(Ze++),Ge=O[Qe in AN?Te.charAt(Ze++):Qe],!Ge||(fe=Ge(ae,Le,fe))<0)return-1}else if(Qe!=Le.charCodeAt(fe++))return-1}return fe}function M(ae,Te,Le){var fe=l.exec(Te.slice(Le));return fe?(ae.p=f.get(fe[0].toLowerCase()),Le+fe[0].length):-1}function $(ae,Te,Le){var fe=m.exec(Te.slice(Le));return fe?(ae.w=v.get(fe[0].toLowerCase()),Le+fe[0].length):-1}function j(ae,Te,Le){var fe=d.exec(Te.slice(Le));return fe?(ae.w=p.get(fe[0].toLowerCase()),Le+fe[0].length):-1}function N(ae,Te,Le){var fe=x.exec(Te.slice(Le));return fe?(ae.m=w.get(fe[0].toLowerCase()),Le+fe[0].length):-1}function U(ae,Te,Le){var fe=y.exec(Te.slice(Le));return fe?(ae.m=_.get(fe[0].toLowerCase()),Le+fe[0].length):-1}function B(ae,Te,Le){return k(ae,t,Te,Le)}function G(ae,Te,Le){return k(ae,n,Te,Le)}function D(ae,Te,Le){return k(ae,r,Te,Le)}function H(ae){return a[ae.getDay()]}function F(ae){return o[ae.getDay()]}function W(ae){return u[ae.getMonth()]}function Y(ae){return s[ae.getMonth()]}function te(ae){return i[+(ae.getHours()>=12)]}function K(ae){return 1+~~(ae.getMonth()/3)}function ie(ae){return a[ae.getUTCDay()]}function le(ae){return o[ae.getUTCDay()]}function ue(ae){return u[ae.getUTCMonth()]}function ge(ae){return s[ae.getUTCMonth()]}function _e(ae){return i[+(ae.getUTCHours()>=12)]}function ke(ae){return 1+~~(ae.getUTCMonth()/3)}return{format:function(ae){var Te=T(ae+="",C);return Te.toString=function(){return ae},Te},parse:function(ae){var Te=A(ae+="",!1);return Te.toString=function(){return ae},Te},utcFormat:function(ae){var Te=T(ae+="",E);return Te.toString=function(){return ae},Te},utcParse:function(ae){var Te=A(ae+="",!0);return Te.toString=function(){return ae},Te}}}var AN={"-":"",_:" ",0:"0"},ar=/^\s*\d+/,l6e=/^%/,c6e=/[\\^$*+?|[\]().{}]/g;function Ft(e,t,n){var r=e<0?"-":"",i=(r?-e:e)+"",o=i.length;return r+(o[t.toLowerCase(),n]))}function d6e(e,t,n){var r=ar.exec(t.slice(n,n+1));return r?(e.w=+r[0],n+r[0].length):-1}function h6e(e,t,n){var r=ar.exec(t.slice(n,n+1));return r?(e.u=+r[0],n+r[0].length):-1}function p6e(e,t,n){var r=ar.exec(t.slice(n,n+2));return r?(e.U=+r[0],n+r[0].length):-1}function m6e(e,t,n){var r=ar.exec(t.slice(n,n+2));return r?(e.V=+r[0],n+r[0].length):-1}function v6e(e,t,n){var r=ar.exec(t.slice(n,n+2));return r?(e.W=+r[0],n+r[0].length):-1}function kN(e,t,n){var r=ar.exec(t.slice(n,n+4));return r?(e.y=+r[0],n+r[0].length):-1}function MN(e,t,n){var r=ar.exec(t.slice(n,n+2));return r?(e.y=+r[0]+(+r[0]>68?1900:2e3),n+r[0].length):-1}function g6e(e,t,n){var r=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(t.slice(n,n+6));return r?(e.Z=r[1]?0:-(r[2]+(r[3]||"00")),n+r[0].length):-1}function y6e(e,t,n){var r=ar.exec(t.slice(n,n+1));return r?(e.q=r[0]*3-3,n+r[0].length):-1}function b6e(e,t,n){var r=ar.exec(t.slice(n,n+2));return r?(e.m=r[0]-1,n+r[0].length):-1}function $N(e,t,n){var r=ar.exec(t.slice(n,n+2));return r?(e.d=+r[0],n+r[0].length):-1}function x6e(e,t,n){var r=ar.exec(t.slice(n,n+3));return r?(e.m=0,e.d=+r[0],n+r[0].length):-1}function RN(e,t,n){var r=ar.exec(t.slice(n,n+2));return r?(e.H=+r[0],n+r[0].length):-1}function _6e(e,t,n){var r=ar.exec(t.slice(n,n+2));return r?(e.M=+r[0],n+r[0].length):-1}function w6e(e,t,n){var r=ar.exec(t.slice(n,n+2));return r?(e.S=+r[0],n+r[0].length):-1}function S6e(e,t,n){var r=ar.exec(t.slice(n,n+3));return r?(e.L=+r[0],n+r[0].length):-1}function C6e(e,t,n){var r=ar.exec(t.slice(n,n+6));return r?(e.L=Math.floor(r[0]/1e3),n+r[0].length):-1}function O6e(e,t,n){var r=l6e.exec(t.slice(n,n+1));return r?n+r[0].length:-1}function E6e(e,t,n){var r=ar.exec(t.slice(n));return r?(e.Q=+r[0],n+r[0].length):-1}function T6e(e,t,n){var r=ar.exec(t.slice(n));return r?(e.s=+r[0],n+r[0].length):-1}function jN(e,t){return Ft(e.getDate(),t,2)}function P6e(e,t){return Ft(e.getHours(),t,2)}function A6e(e,t){return Ft(e.getHours()%12||12,t,2)}function k6e(e,t){return Ft(1+J4.count(Vc(e),e),t,3)}function cK(e,t){return Ft(e.getMilliseconds(),t,3)}function M6e(e,t){return cK(e,t)+"000"}function $6e(e,t){return Ft(e.getMonth()+1,t,2)}function R6e(e,t){return Ft(e.getMinutes(),t,2)}function j6e(e,t){return Ft(e.getSeconds(),t,2)}function I6e(e){var t=e.getDay();return t===0?7:t}function N6e(e,t){return Ft(uK.count(Vc(e)-1,e),t,2)}function fK(e){var t=e.getDay();return t>=4||t===0?wh(e):wh.ceil(e)}function L6e(e,t){return e=fK(e),Ft(wh.count(Vc(e),e)+(Vc(e).getDay()===4),t,2)}function D6e(e){return e.getDay()}function F6e(e,t){return Ft(Ix.count(Vc(e)-1,e),t,2)}function B6e(e,t){return Ft(e.getFullYear()%100,t,2)}function z6e(e,t){return e=fK(e),Ft(e.getFullYear()%100,t,2)}function W6e(e,t){return Ft(e.getFullYear()%1e4,t,4)}function U6e(e,t){var n=e.getDay();return e=n>=4||n===0?wh(e):wh.ceil(e),Ft(e.getFullYear()%1e4,t,4)}function V6e(e){var t=e.getTimezoneOffset();return(t>0?"-":(t*=-1,"+"))+Ft(t/60|0,"0",2)+Ft(t%60,"0",2)}function IN(e,t){return Ft(e.getUTCDate(),t,2)}function H6e(e,t){return Ft(e.getUTCHours(),t,2)}function G6e(e,t){return Ft(e.getUTCHours()%12||12,t,2)}function q6e(e,t){return Ft(1+e6.count(Hc(e),e),t,3)}function dK(e,t){return Ft(e.getUTCMilliseconds(),t,3)}function K6e(e,t){return dK(e,t)+"000"}function Z6e(e,t){return Ft(e.getUTCMonth()+1,t,2)}function Y6e(e,t){return Ft(e.getUTCMinutes(),t,2)}function X6e(e,t){return Ft(e.getUTCSeconds(),t,2)}function Q6e(e){var t=e.getUTCDay();return t===0?7:t}function J6e(e,t){return Ft(lK.count(Hc(e)-1,e),t,2)}function hK(e){var t=e.getUTCDay();return t>=4||t===0?Sh(e):Sh.ceil(e)}function e8e(e,t){return e=hK(e),Ft(Sh.count(Hc(e),e)+(Hc(e).getUTCDay()===4),t,2)}function t8e(e){return e.getUTCDay()}function n8e(e,t){return Ft(Nx.count(Hc(e)-1,e),t,2)}function r8e(e,t){return Ft(e.getUTCFullYear()%100,t,2)}function i8e(e,t){return e=hK(e),Ft(e.getUTCFullYear()%100,t,2)}function o8e(e,t){return Ft(e.getUTCFullYear()%1e4,t,4)}function a8e(e,t){var n=e.getUTCDay();return e=n>=4||n===0?Sh(e):Sh.ceil(e),Ft(e.getUTCFullYear()%1e4,t,4)}function s8e(){return"+0000"}function NN(){return"%"}function LN(e){return+e}function DN(e){return Math.floor(+e/1e3)}var Gf,t6,pK;u8e({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","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 u8e(e){return Gf=u6e(e),t6=Gf.format,Gf.parse,pK=Gf.utcFormat,Gf.utcParse,Gf}function l8e(e){return new Date(e)}function c8e(e){return e instanceof Date?+e:+new Date(+e)}function n6(e,t,n,r,i,o,a,s,u,l){var f=I4(),d=f.invert,p=f.domain,m=l(".%L"),v=l(":%S"),y=l("%I:%M"),_=l("%I %p"),x=l("%a %d"),w=l("%b %d"),C=l("%B"),E=l("%Y");function O(T){return(u(T)t(i/(e.length-1)))},n.quantiles=function(r){return Array.from({length:r+1},(i,o)=>l4e(e,o/r))},n.copy=function(){return yK(t).domain(e)},eu.apply(n,arguments)}function fw(){var e=0,t=.5,n=1,r=1,i,o,a,s,u,l=Kr,f,d=!1,p;function m(y){return isNaN(y=+y)?p:(y=.5+((y=+f(y))-o)*(r*yI5e(e[e.length-1]);var dw=new Array(3).concat("d8b365f5f5f55ab4ac","a6611adfc27d80cdc1018571","a6611adfc27df5f5f580cdc1018571","8c510ad8b365f6e8c3c7eae55ab4ac01665e","8c510ad8b365f6e8c3f5f5f5c7eae55ab4ac01665e","8c510abf812ddfc27df6e8c3c7eae580cdc135978f01665e","8c510abf812ddfc27df6e8c3f5f5f5c7eae580cdc135978f01665e","5430058c510abf812ddfc27df6e8c3c7eae580cdc135978f01665e003c30","5430058c510abf812ddfc27df6e8c3f5f5f5c7eae580cdc135978f01665e003c30").map(yt);const C8e=rn(dw);var hw=new Array(3).concat("af8dc3f7f7f77fbf7b","7b3294c2a5cfa6dba0008837","7b3294c2a5cff7f7f7a6dba0008837","762a83af8dc3e7d4e8d9f0d37fbf7b1b7837","762a83af8dc3e7d4e8f7f7f7d9f0d37fbf7b1b7837","762a839970abc2a5cfe7d4e8d9f0d3a6dba05aae611b7837","762a839970abc2a5cfe7d4e8f7f7f7d9f0d3a6dba05aae611b7837","40004b762a839970abc2a5cfe7d4e8d9f0d3a6dba05aae611b783700441b","40004b762a839970abc2a5cfe7d4e8f7f7f7d9f0d3a6dba05aae611b783700441b").map(yt);const O8e=rn(hw);var pw=new Array(3).concat("e9a3c9f7f7f7a1d76a","d01c8bf1b6dab8e1864dac26","d01c8bf1b6daf7f7f7b8e1864dac26","c51b7de9a3c9fde0efe6f5d0a1d76a4d9221","c51b7de9a3c9fde0eff7f7f7e6f5d0a1d76a4d9221","c51b7dde77aef1b6dafde0efe6f5d0b8e1867fbc414d9221","c51b7dde77aef1b6dafde0eff7f7f7e6f5d0b8e1867fbc414d9221","8e0152c51b7dde77aef1b6dafde0efe6f5d0b8e1867fbc414d9221276419","8e0152c51b7dde77aef1b6dafde0eff7f7f7e6f5d0b8e1867fbc414d9221276419").map(yt);const E8e=rn(pw);var mw=new Array(3).concat("998ec3f7f7f7f1a340","5e3c99b2abd2fdb863e66101","5e3c99b2abd2f7f7f7fdb863e66101","542788998ec3d8daebfee0b6f1a340b35806","542788998ec3d8daebf7f7f7fee0b6f1a340b35806","5427888073acb2abd2d8daebfee0b6fdb863e08214b35806","5427888073acb2abd2d8daebf7f7f7fee0b6fdb863e08214b35806","2d004b5427888073acb2abd2d8daebfee0b6fdb863e08214b358067f3b08","2d004b5427888073acb2abd2d8daebf7f7f7fee0b6fdb863e08214b358067f3b08").map(yt);const T8e=rn(mw);var vw=new Array(3).concat("ef8a62f7f7f767a9cf","ca0020f4a58292c5de0571b0","ca0020f4a582f7f7f792c5de0571b0","b2182bef8a62fddbc7d1e5f067a9cf2166ac","b2182bef8a62fddbc7f7f7f7d1e5f067a9cf2166ac","b2182bd6604df4a582fddbc7d1e5f092c5de4393c32166ac","b2182bd6604df4a582fddbc7f7f7f7d1e5f092c5de4393c32166ac","67001fb2182bd6604df4a582fddbc7d1e5f092c5de4393c32166ac053061","67001fb2182bd6604df4a582fddbc7f7f7f7d1e5f092c5de4393c32166ac053061").map(yt);const P8e=rn(vw);var gw=new Array(3).concat("ef8a62ffffff999999","ca0020f4a582bababa404040","ca0020f4a582ffffffbababa404040","b2182bef8a62fddbc7e0e0e09999994d4d4d","b2182bef8a62fddbc7ffffffe0e0e09999994d4d4d","b2182bd6604df4a582fddbc7e0e0e0bababa8787874d4d4d","b2182bd6604df4a582fddbc7ffffffe0e0e0bababa8787874d4d4d","67001fb2182bd6604df4a582fddbc7e0e0e0bababa8787874d4d4d1a1a1a","67001fb2182bd6604df4a582fddbc7ffffffe0e0e0bababa8787874d4d4d1a1a1a").map(yt);const A8e=rn(gw);var yw=new Array(3).concat("fc8d59ffffbf91bfdb","d7191cfdae61abd9e92c7bb6","d7191cfdae61ffffbfabd9e92c7bb6","d73027fc8d59fee090e0f3f891bfdb4575b4","d73027fc8d59fee090ffffbfe0f3f891bfdb4575b4","d73027f46d43fdae61fee090e0f3f8abd9e974add14575b4","d73027f46d43fdae61fee090ffffbfe0f3f8abd9e974add14575b4","a50026d73027f46d43fdae61fee090e0f3f8abd9e974add14575b4313695","a50026d73027f46d43fdae61fee090ffffbfe0f3f8abd9e974add14575b4313695").map(yt);const k8e=rn(yw);var bw=new Array(3).concat("fc8d59ffffbf91cf60","d7191cfdae61a6d96a1a9641","d7191cfdae61ffffbfa6d96a1a9641","d73027fc8d59fee08bd9ef8b91cf601a9850","d73027fc8d59fee08bffffbfd9ef8b91cf601a9850","d73027f46d43fdae61fee08bd9ef8ba6d96a66bd631a9850","d73027f46d43fdae61fee08bffffbfd9ef8ba6d96a66bd631a9850","a50026d73027f46d43fdae61fee08bd9ef8ba6d96a66bd631a9850006837","a50026d73027f46d43fdae61fee08bffffbfd9ef8ba6d96a66bd631a9850006837").map(yt);const M8e=rn(bw);var xw=new Array(3).concat("fc8d59ffffbf99d594","d7191cfdae61abdda42b83ba","d7191cfdae61ffffbfabdda42b83ba","d53e4ffc8d59fee08be6f59899d5943288bd","d53e4ffc8d59fee08bffffbfe6f59899d5943288bd","d53e4ff46d43fdae61fee08be6f598abdda466c2a53288bd","d53e4ff46d43fdae61fee08bffffbfe6f598abdda466c2a53288bd","9e0142d53e4ff46d43fdae61fee08be6f598abdda466c2a53288bd5e4fa2","9e0142d53e4ff46d43fdae61fee08bffffbfe6f598abdda466c2a53288bd5e4fa2").map(yt);const $8e=rn(xw);var _w=new Array(3).concat("e5f5f999d8c92ca25f","edf8fbb2e2e266c2a4238b45","edf8fbb2e2e266c2a42ca25f006d2c","edf8fbccece699d8c966c2a42ca25f006d2c","edf8fbccece699d8c966c2a441ae76238b45005824","f7fcfde5f5f9ccece699d8c966c2a441ae76238b45005824","f7fcfde5f5f9ccece699d8c966c2a441ae76238b45006d2c00441b").map(yt);const R8e=rn(_w);var ww=new Array(3).concat("e0ecf49ebcda8856a7","edf8fbb3cde38c96c688419d","edf8fbb3cde38c96c68856a7810f7c","edf8fbbfd3e69ebcda8c96c68856a7810f7c","edf8fbbfd3e69ebcda8c96c68c6bb188419d6e016b","f7fcfde0ecf4bfd3e69ebcda8c96c68c6bb188419d6e016b","f7fcfde0ecf4bfd3e69ebcda8c96c68c6bb188419d810f7c4d004b").map(yt);const j8e=rn(ww);var Sw=new Array(3).concat("e0f3dba8ddb543a2ca","f0f9e8bae4bc7bccc42b8cbe","f0f9e8bae4bc7bccc443a2ca0868ac","f0f9e8ccebc5a8ddb57bccc443a2ca0868ac","f0f9e8ccebc5a8ddb57bccc44eb3d32b8cbe08589e","f7fcf0e0f3dbccebc5a8ddb57bccc44eb3d32b8cbe08589e","f7fcf0e0f3dbccebc5a8ddb57bccc44eb3d32b8cbe0868ac084081").map(yt);const I8e=rn(Sw);var Cw=new Array(3).concat("fee8c8fdbb84e34a33","fef0d9fdcc8afc8d59d7301f","fef0d9fdcc8afc8d59e34a33b30000","fef0d9fdd49efdbb84fc8d59e34a33b30000","fef0d9fdd49efdbb84fc8d59ef6548d7301f990000","fff7ecfee8c8fdd49efdbb84fc8d59ef6548d7301f990000","fff7ecfee8c8fdd49efdbb84fc8d59ef6548d7301fb300007f0000").map(yt);const N8e=rn(Cw);var Ow=new Array(3).concat("ece2f0a6bddb1c9099","f6eff7bdc9e167a9cf02818a","f6eff7bdc9e167a9cf1c9099016c59","f6eff7d0d1e6a6bddb67a9cf1c9099016c59","f6eff7d0d1e6a6bddb67a9cf3690c002818a016450","fff7fbece2f0d0d1e6a6bddb67a9cf3690c002818a016450","fff7fbece2f0d0d1e6a6bddb67a9cf3690c002818a016c59014636").map(yt);const L8e=rn(Ow);var Ew=new Array(3).concat("ece7f2a6bddb2b8cbe","f1eef6bdc9e174a9cf0570b0","f1eef6bdc9e174a9cf2b8cbe045a8d","f1eef6d0d1e6a6bddb74a9cf2b8cbe045a8d","f1eef6d0d1e6a6bddb74a9cf3690c00570b0034e7b","fff7fbece7f2d0d1e6a6bddb74a9cf3690c00570b0034e7b","fff7fbece7f2d0d1e6a6bddb74a9cf3690c00570b0045a8d023858").map(yt);const D8e=rn(Ew);var Tw=new Array(3).concat("e7e1efc994c7dd1c77","f1eef6d7b5d8df65b0ce1256","f1eef6d7b5d8df65b0dd1c77980043","f1eef6d4b9dac994c7df65b0dd1c77980043","f1eef6d4b9dac994c7df65b0e7298ace125691003f","f7f4f9e7e1efd4b9dac994c7df65b0e7298ace125691003f","f7f4f9e7e1efd4b9dac994c7df65b0e7298ace125698004367001f").map(yt);const F8e=rn(Tw);var Pw=new Array(3).concat("fde0ddfa9fb5c51b8a","feebe2fbb4b9f768a1ae017e","feebe2fbb4b9f768a1c51b8a7a0177","feebe2fcc5c0fa9fb5f768a1c51b8a7a0177","feebe2fcc5c0fa9fb5f768a1dd3497ae017e7a0177","fff7f3fde0ddfcc5c0fa9fb5f768a1dd3497ae017e7a0177","fff7f3fde0ddfcc5c0fa9fb5f768a1dd3497ae017e7a017749006a").map(yt);const B8e=rn(Pw);var Aw=new Array(3).concat("edf8b17fcdbb2c7fb8","ffffcca1dab441b6c4225ea8","ffffcca1dab441b6c42c7fb8253494","ffffccc7e9b47fcdbb41b6c42c7fb8253494","ffffccc7e9b47fcdbb41b6c41d91c0225ea80c2c84","ffffd9edf8b1c7e9b47fcdbb41b6c41d91c0225ea80c2c84","ffffd9edf8b1c7e9b47fcdbb41b6c41d91c0225ea8253494081d58").map(yt);const z8e=rn(Aw);var kw=new Array(3).concat("f7fcb9addd8e31a354","ffffccc2e69978c679238443","ffffccc2e69978c67931a354006837","ffffccd9f0a3addd8e78c67931a354006837","ffffccd9f0a3addd8e78c67941ab5d238443005a32","ffffe5f7fcb9d9f0a3addd8e78c67941ab5d238443005a32","ffffe5f7fcb9d9f0a3addd8e78c67941ab5d238443006837004529").map(yt);const W8e=rn(kw);var Mw=new Array(3).concat("fff7bcfec44fd95f0e","ffffd4fed98efe9929cc4c02","ffffd4fed98efe9929d95f0e993404","ffffd4fee391fec44ffe9929d95f0e993404","ffffd4fee391fec44ffe9929ec7014cc4c028c2d04","ffffe5fff7bcfee391fec44ffe9929ec7014cc4c028c2d04","ffffe5fff7bcfee391fec44ffe9929ec7014cc4c02993404662506").map(yt);const U8e=rn(Mw);var $w=new Array(3).concat("ffeda0feb24cf03b20","ffffb2fecc5cfd8d3ce31a1c","ffffb2fecc5cfd8d3cf03b20bd0026","ffffb2fed976feb24cfd8d3cf03b20bd0026","ffffb2fed976feb24cfd8d3cfc4e2ae31a1cb10026","ffffccffeda0fed976feb24cfd8d3cfc4e2ae31a1cb10026","ffffccffeda0fed976feb24cfd8d3cfc4e2ae31a1cbd0026800026").map(yt);const V8e=rn($w);var Rw=new Array(3).concat("deebf79ecae13182bd","eff3ffbdd7e76baed62171b5","eff3ffbdd7e76baed63182bd08519c","eff3ffc6dbef9ecae16baed63182bd08519c","eff3ffc6dbef9ecae16baed64292c62171b5084594","f7fbffdeebf7c6dbef9ecae16baed64292c62171b5084594","f7fbffdeebf7c6dbef9ecae16baed64292c62171b508519c08306b").map(yt);const H8e=rn(Rw);var jw=new Array(3).concat("e5f5e0a1d99b31a354","edf8e9bae4b374c476238b45","edf8e9bae4b374c47631a354006d2c","edf8e9c7e9c0a1d99b74c47631a354006d2c","edf8e9c7e9c0a1d99b74c47641ab5d238b45005a32","f7fcf5e5f5e0c7e9c0a1d99b74c47641ab5d238b45005a32","f7fcf5e5f5e0c7e9c0a1d99b74c47641ab5d238b45006d2c00441b").map(yt);const G8e=rn(jw);var Iw=new Array(3).concat("f0f0f0bdbdbd636363","f7f7f7cccccc969696525252","f7f7f7cccccc969696636363252525","f7f7f7d9d9d9bdbdbd969696636363252525","f7f7f7d9d9d9bdbdbd969696737373525252252525","fffffff0f0f0d9d9d9bdbdbd969696737373525252252525","fffffff0f0f0d9d9d9bdbdbd969696737373525252252525000000").map(yt);const q8e=rn(Iw);var Nw=new Array(3).concat("efedf5bcbddc756bb1","f2f0f7cbc9e29e9ac86a51a3","f2f0f7cbc9e29e9ac8756bb154278f","f2f0f7dadaebbcbddc9e9ac8756bb154278f","f2f0f7dadaebbcbddc9e9ac8807dba6a51a34a1486","fcfbfdefedf5dadaebbcbddc9e9ac8807dba6a51a34a1486","fcfbfdefedf5dadaebbcbddc9e9ac8807dba6a51a354278f3f007d").map(yt);const K8e=rn(Nw);var Lw=new Array(3).concat("fee0d2fc9272de2d26","fee5d9fcae91fb6a4acb181d","fee5d9fcae91fb6a4ade2d26a50f15","fee5d9fcbba1fc9272fb6a4ade2d26a50f15","fee5d9fcbba1fc9272fb6a4aef3b2ccb181d99000d","fff5f0fee0d2fcbba1fc9272fb6a4aef3b2ccb181d99000d","fff5f0fee0d2fcbba1fc9272fb6a4aef3b2ccb181da50f1567000d").map(yt);const Z8e=rn(Lw);var Dw=new Array(3).concat("fee6cefdae6be6550d","feeddefdbe85fd8d3cd94701","feeddefdbe85fd8d3ce6550da63603","feeddefdd0a2fdae6bfd8d3ce6550da63603","feeddefdd0a2fdae6bfd8d3cf16913d948018c2d04","fff5ebfee6cefdd0a2fdae6bfd8d3cf16913d948018c2d04","fff5ebfee6cefdd0a2fdae6bfd8d3cf16913d94801a636037f2704").map(yt);const Y8e=rn(Dw);function X8e(e){return e=Math.max(0,Math.min(1,e)),"rgb("+Math.max(0,Math.min(255,Math.round(-4.54-e*(35.34-e*(2381.73-e*(6402.7-e*(7024.72-e*2710.57)))))))+", "+Math.max(0,Math.min(255,Math.round(32.49+e*(170.73+e*(52.82-e*(131.46-e*(176.58-e*67.37)))))))+", "+Math.max(0,Math.min(255,Math.round(81.24+e*(442.36-e*(2482.43-e*(6167.24-e*(6614.94-e*2475.67)))))))+")"}const Q8e=R4(Xa(300,.5,0),Xa(-240,.5,1));var J8e=R4(Xa(-100,.75,.35),Xa(80,1.5,.8)),eMe=R4(Xa(260,.75,.35),Xa(80,1.5,.8)),g1=Xa();function tMe(e){(e<0||e>1)&&(e-=Math.floor(e));var t=Math.abs(e-.5);return g1.h=360*e-100,g1.s=1.5-1.5*t,g1.l=.8-.9*t,g1+""}var y1=xh(),nMe=Math.PI/3,rMe=Math.PI*2/3;function iMe(e){var t;return e=(.5-e)*Math.PI,y1.r=255*(t=Math.sin(e))*t,y1.g=255*(t=Math.sin(e+nMe))*t,y1.b=255*(t=Math.sin(e+rMe))*t,y1+""}function oMe(e){return e=Math.max(0,Math.min(1,e)),"rgb("+Math.max(0,Math.min(255,Math.round(34.61+e*(1172.33-e*(10793.56-e*(33300.12-e*(38394.49-e*14825.05)))))))+", "+Math.max(0,Math.min(255,Math.round(23.31+e*(557.33+e*(1225.33-e*(3574.96-e*(1073.77+e*707.56)))))))+", "+Math.max(0,Math.min(255,Math.round(27.2+e*(3211.1-e*(15327.97-e*(27814-e*(22569.18-e*6838.66)))))))+")"}function Fw(e){var t=e.length;return function(n){return e[Math.max(0,Math.min(t-1,Math.floor(n*t)))]}}const aMe=Fw(yt("44015444025645045745055946075a46085c460a5d460b5e470d60470e6147106347116447136548146748166848176948186a481a6c481b6d481c6e481d6f481f70482071482173482374482475482576482677482878482979472a7a472c7a472d7b472e7c472f7d46307e46327e46337f463480453581453781453882443983443a83443b84433d84433e85423f854240864241864142874144874045884046883f47883f48893e49893e4a893e4c8a3d4d8a3d4e8a3c4f8a3c508b3b518b3b528b3a538b3a548c39558c39568c38588c38598c375a8c375b8d365c8d365d8d355e8d355f8d34608d34618d33628d33638d32648e32658e31668e31678e31688e30698e306a8e2f6b8e2f6c8e2e6d8e2e6e8e2e6f8e2d708e2d718e2c718e2c728e2c738e2b748e2b758e2a768e2a778e2a788e29798e297a8e297b8e287c8e287d8e277e8e277f8e27808e26818e26828e26828e25838e25848e25858e24868e24878e23888e23898e238a8d228b8d228c8d228d8d218e8d218f8d21908d21918c20928c20928c20938c1f948c1f958b1f968b1f978b1f988b1f998a1f9a8a1e9b8a1e9c891e9d891f9e891f9f881fa0881fa1881fa1871fa28720a38620a48621a58521a68522a78522a88423a98324aa8325ab8225ac8226ad8127ad8128ae8029af7f2ab07f2cb17e2db27d2eb37c2fb47c31b57b32b67a34b67935b77937b87838b9773aba763bbb753dbc743fbc7340bd7242be7144bf7046c06f48c16e4ac16d4cc26c4ec36b50c46a52c56954c56856c66758c7655ac8645cc8635ec96260ca6063cb5f65cb5e67cc5c69cd5b6ccd5a6ece5870cf5773d05675d05477d1537ad1517cd2507fd34e81d34d84d44b86d54989d5488bd6468ed64590d74393d74195d84098d83e9bd93c9dd93ba0da39a2da37a5db36a8db34aadc32addc30b0dd2fb2dd2db5de2bb8de29bade28bddf26c0df25c2df23c5e021c8e020cae11fcde11dd0e11cd2e21bd5e21ad8e219dae319dde318dfe318e2e418e5e419e7e419eae51aece51befe51cf1e51df4e61ef6e620f8e621fbe723fde725"));var sMe=Fw(yt("00000401000501010601010802010902020b02020d03030f03031204041405041606051806051a07061c08071e0907200a08220b09240c09260d0a290e0b2b100b2d110c2f120d31130d34140e36150e38160f3b180f3d19103f1a10421c10441d11471e114920114b21114e22115024125325125527125829115a2a115c2c115f2d11612f116331116533106734106936106b38106c390f6e3b0f703d0f713f0f72400f74420f75440f764510774710784910784a10794c117a4e117b4f127b51127c52137c54137d56147d57157e59157e5a167e5c167f5d177f5f187f601880621980641a80651a80671b80681c816a1c816b1d816d1d816e1e81701f81721f817320817521817621817822817922827b23827c23827e24828025828125818326818426818627818827818928818b29818c29818e2a81902a81912b81932b80942c80962c80982d80992d809b2e7f9c2e7f9e2f7fa02f7fa1307ea3307ea5317ea6317da8327daa337dab337cad347cae347bb0357bb2357bb3367ab5367ab73779b83779ba3878bc3978bd3977bf3a77c03a76c23b75c43c75c53c74c73d73c83e73ca3e72cc3f71cd4071cf4070d0416fd2426fd3436ed5446dd6456cd8456cd9466bdb476adc4869de4968df4a68e04c67e24d66e34e65e44f64e55064e75263e85362e95462ea5661eb5760ec5860ed5a5fee5b5eef5d5ef05f5ef1605df2625df2645cf3655cf4675cf4695cf56b5cf66c5cf66e5cf7705cf7725cf8745cf8765cf9785df9795df97b5dfa7d5efa7f5efa815ffb835ffb8560fb8761fc8961fc8a62fc8c63fc8e64fc9065fd9266fd9467fd9668fd9869fd9a6afd9b6bfe9d6cfe9f6dfea16efea36ffea571fea772fea973feaa74feac76feae77feb078feb27afeb47bfeb67cfeb77efeb97ffebb81febd82febf84fec185fec287fec488fec68afec88cfeca8dfecc8ffecd90fecf92fed194fed395fed597fed799fed89afdda9cfddc9efddea0fde0a1fde2a3fde3a5fde5a7fde7a9fde9aafdebacfcecaefceeb0fcf0b2fcf2b4fcf4b6fcf6b8fcf7b9fcf9bbfcfbbdfcfdbf")),uMe=Fw(yt("00000401000501010601010802010a02020c02020e03021004031204031405041706041907051b08051d09061f0a07220b07240c08260d08290e092b10092d110a30120a32140b34150b37160b39180c3c190c3e1b0c411c0c431e0c451f0c48210c4a230c4c240c4f260c51280b53290b552b0b572d0b592f0a5b310a5c320a5e340a5f3609613809623909633b09643d09653e0966400a67420a68440a68450a69470b6a490b6a4a0c6b4c0c6b4d0d6c4f0d6c510e6c520e6d540f6d550f6d57106e59106e5a116e5c126e5d126e5f136e61136e62146e64156e65156e67166e69166e6a176e6c186e6d186e6f196e71196e721a6e741a6e751b6e771c6d781c6d7a1d6d7c1d6d7d1e6d7f1e6c801f6c82206c84206b85216b87216b88226a8a226a8c23698d23698f24699025689225689326679526679727669827669a28659b29649d29649f2a63a02a63a22b62a32c61a52c60a62d60a82e5fa92e5eab2f5ead305dae305cb0315bb1325ab3325ab43359b63458b73557b93556ba3655bc3754bd3853bf3952c03a51c13a50c33b4fc43c4ec63d4dc73e4cc83f4bca404acb4149cc4248ce4347cf4446d04545d24644d34743d44842d54a41d74b3fd84c3ed94d3dda4e3cdb503bdd513ade5238df5337e05536e15635e25734e35933e45a31e55c30e65d2fe75e2ee8602de9612bea632aeb6429eb6628ec6726ed6925ee6a24ef6c23ef6e21f06f20f1711ff1731df2741cf3761bf37819f47918f57b17f57d15f67e14f68013f78212f78410f8850ff8870ef8890cf98b0bf98c0af98e09fa9008fa9207fa9407fb9606fb9706fb9906fb9b06fb9d07fc9f07fca108fca309fca50afca60cfca80dfcaa0ffcac11fcae12fcb014fcb216fcb418fbb61afbb81dfbba1ffbbc21fbbe23fac026fac228fac42afac62df9c72ff9c932f9cb35f8cd37f8cf3af7d13df7d340f6d543f6d746f5d949f5db4cf4dd4ff4df53f4e156f3e35af3e55df2e661f2e865f2ea69f1ec6df1ed71f1ef75f1f179f2f27df2f482f3f586f3f68af4f88ef5f992f6fa96f8fb9af9fc9dfafda1fcffa4")),lMe=Fw(yt("0d088710078813078916078a19068c1b068d1d068e20068f2206902406912605912805922a05932c05942e05952f059631059733059735049837049938049a3a049a3c049b3e049c3f049c41049d43039e44039e46039f48039f4903a04b03a14c02a14e02a25002a25102a35302a35502a45601a45801a45901a55b01a55c01a65e01a66001a66100a76300a76400a76600a76700a86900a86a00a86c00a86e00a86f00a87100a87201a87401a87501a87701a87801a87a02a87b02a87d03a87e03a88004a88104a78305a78405a78606a68707a68808a68a09a58b0aa58d0ba58e0ca48f0da4910ea3920fa39410a29511a19613a19814a099159f9a169f9c179e9d189d9e199da01a9ca11b9ba21d9aa31e9aa51f99a62098a72197a82296aa2395ab2494ac2694ad2793ae2892b02991b12a90b22b8fb32c8eb42e8db52f8cb6308bb7318ab83289ba3388bb3488bc3587bd3786be3885bf3984c03a83c13b82c23c81c33d80c43e7fc5407ec6417dc7427cc8437bc9447aca457acb4679cc4778cc4977cd4a76ce4b75cf4c74d04d73d14e72d24f71d35171d45270d5536fd5546ed6556dd7566cd8576bd9586ada5a6ada5b69db5c68dc5d67dd5e66de5f65de6164df6263e06363e16462e26561e26660e3685fe4695ee56a5de56b5de66c5ce76e5be76f5ae87059e97158e97257ea7457eb7556eb7655ec7754ed7953ed7a52ee7b51ef7c51ef7e50f07f4ff0804ef1814df1834cf2844bf3854bf3874af48849f48948f58b47f58c46f68d45f68f44f79044f79143f79342f89441f89540f9973ff9983ef99a3efa9b3dfa9c3cfa9e3bfb9f3afba139fba238fca338fca537fca636fca835fca934fdab33fdac33fdae32fdaf31fdb130fdb22ffdb42ffdb52efeb72dfeb82cfeba2cfebb2bfebd2afebe2afec029fdc229fdc328fdc527fdc627fdc827fdca26fdcb26fccd25fcce25fcd025fcd225fbd324fbd524fbd724fad824fada24f9dc24f9dd25f8df25f8e125f7e225f7e425f6e626f6e826f5e926f5eb27f4ed27f3ee27f3f027f2f227f1f426f1f525f0f724f0f921")),cMe=p4,fMe=rq,dMe=iq,hMe=ew,pMe=E0,mMe=m4,vMe=200;function gMe(e,t,n,r){var i=-1,o=fMe,a=!0,s=e.length,u=[],l=t.length;if(!s)return u;n&&(t=hMe(t,pMe(n))),r?(o=dMe,a=!1):t.length>=vMe&&(o=mMe,a=!1,t=new cMe(t));e:for(;++i1?0:e<-1?fl:Math.acos(e)}function BN(e){return e>=1?Lx:e<=-1?-Lx:Math.asin(e)}const K3=Math.PI,Z3=2*K3,nc=1e-6,EMe=Z3-nc;function CK(e){this._+=e[0];for(let t=1,n=e.length;t=0))throw new Error(`invalid digits: ${e}`);if(t>15)return CK;const n=10**t;return function(r){this._+=r[0];for(let i=1,o=r.length;inc)if(!(Math.abs(d*u-l*f)>nc)||!o)this._append`L${this._x1=t},${this._y1=n}`;else{let m=r-a,v=i-s,y=u*u+l*l,_=m*m+v*v,x=Math.sqrt(y),w=Math.sqrt(p),C=o*Math.tan((K3-Math.acos((y+p-_)/(2*x*w)))/2),E=C/w,O=C/x;Math.abs(E-1)>nc&&this._append`L${t+E*f},${n+E*d}`,this._append`A${o},${o},0,0,${+(d*m>f*v)},${this._x1=t+O*u},${this._y1=n+O*l}`}}arc(t,n,r,i,o,a){if(t=+t,n=+n,r=+r,a=!!a,r<0)throw new Error(`negative radius: ${r}`);let s=r*Math.cos(i),u=r*Math.sin(i),l=t+s,f=n+u,d=1^a,p=a?i-o:o-i;this._x1===null?this._append`M${l},${f}`:(Math.abs(this._x1-l)>nc||Math.abs(this._y1-f)>nc)&&this._append`L${l},${f}`,r&&(p<0&&(p=p%Z3+Z3),p>EMe?this._append`A${r},${r},0,1,${d},${t-s},${n-u}A${r},${r},0,1,${d},${this._x1=l},${this._y1=f}`:p>nc&&this._append`A${r},${r},0,${+(p>=K3)},${d},${this._x1=t+r*Math.cos(o)},${this._y1=n+r*Math.sin(o)}`)}rect(t,n,r,i){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+n}h${r=+r}v${+i}h${-r}Z`}toString(){return this._}}function Bw(e){let t=3;return e.digits=function(n){if(!arguments.length)return t;if(n==null)t=null;else{const r=Math.floor(n);if(!(r>=0))throw new RangeError(`invalid digits: ${n}`);t=r}return e},()=>new PMe(t)}function AMe(e){return e.innerRadius}function kMe(e){return e.outerRadius}function MMe(e){return e.startAngle}function $Me(e){return e.endAngle}function RMe(e){return e&&e.padAngle}function jMe(e,t,n,r,i,o,a,s){var u=n-e,l=r-t,f=a-i,d=s-o,p=d*u-f*l;if(!(p*pB*B+G*G&&(k=$,M=j),{cx:k,cy:M,x01:-f,y01:-d,x11:k*(i/O-1),y11:M*(i/O-1)}}function IMe(){var e=AMe,t=kMe,n=vt(0),r=null,i=MMe,o=$Me,a=RMe,s=null,u=Bw(l);function l(){var f,d,p=+e.apply(this,arguments),m=+t.apply(this,arguments),v=i.apply(this,arguments)-Lx,y=o.apply(this,arguments)-Lx,_=FN(y-v),x=y>v;if(s||(s=f=u()),mOr))s.moveTo(0,0);else if(_>Qu-Or)s.moveTo(m*ys(v),m*hi(v)),s.arc(0,0,m,v,y,!x),p>Or&&(s.moveTo(p*ys(y),p*hi(y)),s.arc(0,0,p,y,v,x));else{var w=v,C=y,E=v,O=y,T=_,A=_,k=a.apply(this,arguments)/2,M=k>Or&&(r?+r.apply(this,arguments):hr(p*p+m*m)),$=fE(FN(m-p)/2,+n.apply(this,arguments)),j=$,N=$,U,B;if(M>Or){var G=BN(M/p*hi(k)),D=BN(M/m*hi(k));(T-=G*2)>Or?(G*=x?1:-1,E+=G,O-=G):(T=0,E=O=(v+y)/2),(A-=D*2)>Or?(D*=x?1:-1,w+=D,C-=D):(A=0,w=C=(v+y)/2)}var H=m*ys(w),F=m*hi(w),W=p*ys(O),Y=p*hi(O);if($>Or){var te=m*ys(C),K=m*hi(C),ie=p*ys(E),le=p*hi(E),ue;if(_Or?N>Or?(U=b1(ie,le,H,F,m,N,x),B=b1(te,K,W,Y,m,N,x),s.moveTo(U.cx+U.x01,U.cy+U.y01),N<$?s.arc(U.cx,U.cy,N,Cr(U.y01,U.x01),Cr(B.y01,B.x01),!x):(s.arc(U.cx,U.cy,N,Cr(U.y01,U.x01),Cr(U.y11,U.x11),!x),s.arc(0,0,m,Cr(U.cy+U.y11,U.cx+U.x11),Cr(B.cy+B.y11,B.cx+B.x11),!x),s.arc(B.cx,B.cy,N,Cr(B.y11,B.x11),Cr(B.y01,B.x01),!x))):(s.moveTo(H,F),s.arc(0,0,m,w,C,!x)):s.moveTo(H,F),!(p>Or)||!(T>Or)?s.lineTo(W,Y):j>Or?(U=b1(W,Y,te,K,p,-j,x),B=b1(H,F,ie,le,p,-j,x),s.lineTo(U.cx+U.x01,U.cy+U.y01),j<$?s.arc(U.cx,U.cy,j,Cr(U.y01,U.x01),Cr(B.y01,B.x01),!x):(s.arc(U.cx,U.cy,j,Cr(U.y01,U.x01),Cr(U.y11,U.x11),!x),s.arc(0,0,p,Cr(U.cy+U.y11,U.cx+U.x11),Cr(B.cy+B.y11,B.cx+B.x11),x),s.arc(B.cx,B.cy,j,Cr(B.y11,B.x11),Cr(B.y01,B.x01),!x))):s.arc(0,0,p,O,E,x)}if(s.closePath(),f)return s=null,f+""||null}return l.centroid=function(){var f=(+e.apply(this,arguments)+ +t.apply(this,arguments))/2,d=(+i.apply(this,arguments)+ +o.apply(this,arguments))/2-fl/2;return[ys(d)*f,hi(d)*f]},l.innerRadius=function(f){return arguments.length?(e=typeof f=="function"?f:vt(+f),l):e},l.outerRadius=function(f){return arguments.length?(t=typeof f=="function"?f:vt(+f),l):t},l.cornerRadius=function(f){return arguments.length?(n=typeof f=="function"?f:vt(+f),l):n},l.padRadius=function(f){return arguments.length?(r=f==null?null:typeof f=="function"?f:vt(+f),l):r},l.startAngle=function(f){return arguments.length?(i=typeof f=="function"?f:vt(+f),l):i},l.endAngle=function(f){return arguments.length?(o=typeof f=="function"?f:vt(+f),l):o},l.padAngle=function(f){return arguments.length?(a=typeof f=="function"?f:vt(+f),l):a},l.context=function(f){return arguments.length?(s=f??null,l):s},l}function zw(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function OK(e){this._context=e}OK.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 R0(e){return new OK(e)}function EK(e){return e[0]}function TK(e){return e[1]}function j0(e,t){var n=vt(!0),r=null,i=R0,o=null,a=Bw(s);e=typeof e=="function"?e:e===void 0?EK:vt(e),t=typeof t=="function"?t:t===void 0?TK:vt(t);function s(u){var l,f=(u=zw(u)).length,d,p=!1,m;for(r==null&&(o=i(m=a())),l=0;l<=f;++l)!(l=m;--v)s.point(C[v],E[v]);s.lineEnd(),s.areaEnd()}x&&(C[p]=+e(_,p,d),E[p]=+t(_,p,d),s.point(r?+r(_,p,d):C[p],n?+n(_,p,d):E[p]))}if(w)return s=null,w+""||null}function f(){return j0().defined(i).curve(a).context(o)}return l.x=function(d){return arguments.length?(e=typeof d=="function"?d:vt(+d),r=null,l):e},l.x0=function(d){return arguments.length?(e=typeof d=="function"?d:vt(+d),l):e},l.x1=function(d){return arguments.length?(r=d==null?null:typeof d=="function"?d:vt(+d),l):r},l.y=function(d){return arguments.length?(t=typeof d=="function"?d:vt(+d),n=null,l):t},l.y0=function(d){return arguments.length?(t=typeof d=="function"?d:vt(+d),l):t},l.y1=function(d){return arguments.length?(n=d==null?null:typeof d=="function"?d:vt(+d),l):n},l.lineX0=l.lineY0=function(){return f().x(e).y(t)},l.lineY1=function(){return f().x(e).y(n)},l.lineX1=function(){return f().x(r).y(t)},l.defined=function(d){return arguments.length?(i=typeof d=="function"?d:vt(!!d),l):i},l.curve=function(d){return arguments.length?(a=d,o!=null&&(s=a(o)),l):a},l.context=function(d){return arguments.length?(d==null?o=s=null:s=a(o=d),l):o},l}function NMe(e,t){return te?1:t>=e?0:NaN}function LMe(e){return e}function DMe(){var e=LMe,t=NMe,n=null,r=vt(0),i=vt(Qu),o=vt(0);function a(s){var u,l=(s=zw(s)).length,f,d,p=0,m=new Array(l),v=new Array(l),y=+r.apply(this,arguments),_=Math.min(Qu,Math.max(-Qu,i.apply(this,arguments)-y)),x,w=Math.min(Math.abs(_)/l,o.apply(this,arguments)),C=w*(_<0?-1:1),E;for(u=0;u0&&(p+=E);for(t!=null?m.sort(function(O,T){return t(v[O],v[T])}):n!=null&&m.sort(function(O,T){return n(s[O],s[T])}),u=0,d=p?(_-l*C)/p:0;u0?E*d:0)+C,v[f]={data:s[f],index:u,value:E,startAngle:y,endAngle:x,padAngle:w};return v}return a.value=function(s){return arguments.length?(e=typeof s=="function"?s:vt(+s),a):e},a.sortValues=function(s){return arguments.length?(t=s,n=null,a):t},a.sort=function(s){return arguments.length?(n=s,t=null,a):n},a.startAngle=function(s){return arguments.length?(r=typeof s=="function"?s:vt(+s),a):r},a.endAngle=function(s){return arguments.length?(i=typeof s=="function"?s:vt(+s),a):i},a.padAngle=function(s){return arguments.length?(o=typeof s=="function"?s:vt(+s),a):o},a}class PK{constructor(t,n){this._context=t,this._x=n}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,n){switch(t=+t,n=+n,this._point){case 0:{this._point=1,this._line?this._context.lineTo(t,n):this._context.moveTo(t,n);break}case 1:this._point=2;default:{this._x?this._context.bezierCurveTo(this._x0=(this._x0+t)/2,this._y0,this._x0,n,t,n):this._context.bezierCurveTo(this._x0,this._y0=(this._y0+n)/2,t,this._y0,t,n);break}}this._x0=t,this._y0=n}}function FMe(e){return new PK(e,!0)}function BMe(e){return new PK(e,!1)}const o6={draw(e,t){const n=hr(t/fl);e.moveTo(n,0),e.arc(0,0,n,0,Qu)}},zMe={draw(e,t){const n=hr(t/5)/2;e.moveTo(-3*n,-n),e.lineTo(-n,-n),e.lineTo(-n,-3*n),e.lineTo(n,-3*n),e.lineTo(n,-n),e.lineTo(3*n,-n),e.lineTo(3*n,n),e.lineTo(n,n),e.lineTo(n,3*n),e.lineTo(-n,3*n),e.lineTo(-n,n),e.lineTo(-3*n,n),e.closePath()}},AK=hr(1/3),WMe=AK*2,UMe={draw(e,t){const n=hr(t/WMe),r=n*AK;e.moveTo(0,-n),e.lineTo(r,0),e.lineTo(0,n),e.lineTo(-r,0),e.closePath()}},VMe={draw(e,t){const n=hr(t),r=-n/2;e.rect(r,r,n,n)}},HMe=.8908130915292852,kK=hi(fl/10)/hi(7*fl/10),GMe=hi(Qu/10)*kK,qMe=-ys(Qu/10)*kK,KMe={draw(e,t){const n=hr(t*HMe),r=GMe*n,i=qMe*n;e.moveTo(0,-n),e.lineTo(r,i);for(let o=1;o<5;++o){const a=Qu*o/5,s=ys(a),u=hi(a);e.lineTo(u*n,-s*n),e.lineTo(s*r-u*i,u*r+s*i)}e.closePath()}},dE=hr(3),ZMe={draw(e,t){const n=-hr(t/(dE*3));e.moveTo(0,n*2),e.lineTo(-dE*n,-n),e.lineTo(dE*n,-n),e.closePath()}},fo=-.5,ho=hr(3)/2,Y3=1/hr(12),YMe=(Y3/2+1)*3,XMe={draw(e,t){const n=hr(t/YMe),r=n/2,i=n*Y3,o=r,a=n*Y3+n,s=-o,u=a;e.moveTo(r,i),e.lineTo(o,a),e.lineTo(s,u),e.lineTo(fo*r-ho*i,ho*r+fo*i),e.lineTo(fo*o-ho*a,ho*o+fo*a),e.lineTo(fo*s-ho*u,ho*s+fo*u),e.lineTo(fo*r+ho*i,fo*i-ho*r),e.lineTo(fo*o+ho*a,fo*a-ho*o),e.lineTo(fo*s+ho*u,fo*u-ho*s),e.closePath()}};function QMe(e,t){let n=null,r=Bw(i);e=typeof e=="function"?e:vt(e||o6),t=typeof t=="function"?t:vt(t===void 0?64:+t);function i(){let o;if(n||(n=o=r()),e.apply(this,arguments).draw(n,+t.apply(this,arguments)),o)return n=null,o+""||null}return i.type=function(o){return arguments.length?(e=typeof o=="function"?o:vt(o),i):e},i.size=function(o){return arguments.length?(t=typeof o=="function"?o:vt(+o),i):t},i.context=function(o){return arguments.length?(n=o??null,i):n},i}function dl(){}function Dx(e,t,n){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+n)/6)}function Ww(e){this._context=e}Ww.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:Dx(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:Dx(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function MK(e){return new Ww(e)}function $K(e){this._context=e}$K.prototype={areaStart:dl,areaEnd:dl,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:Dx(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function RK(e){return new $K(e)}function jK(e){this._context=e}jK.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 n=(this._x0+4*this._x1+e)/6,r=(this._y0+4*this._y1+t)/6;this._line?this._context.lineTo(n,r):this._context.moveTo(n,r);break;case 3:this._point=4;default:Dx(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function IK(e){return new jK(e)}function NK(e,t){this._basis=new Ww(e),this._beta=t}NK.prototype={lineStart:function(){this._x=[],this._y=[],this._basis.lineStart()},lineEnd:function(){var e=this._x,t=this._y,n=e.length-1;if(n>0)for(var r=e[0],i=t[0],o=e[n]-r,a=t[n]-i,s=-1,u;++s<=n;)u=s/n,this._basis.point(this._beta*e[s]+(1-this._beta)*(r+u*o),this._beta*t[s]+(1-this._beta)*(i+u*a));this._x=this._y=null,this._basis.lineEnd()},point:function(e,t){this._x.push(+e),this._y.push(+t)}};const JMe=function e(t){function n(r){return t===1?new Ww(r):new NK(r,t)}return n.beta=function(r){return e(+r)},n}(.85);function Fx(e,t,n){e._context.bezierCurveTo(e._x1+e._k*(e._x2-e._x0),e._y1+e._k*(e._y2-e._y0),e._x2+e._k*(e._x1-t),e._y2+e._k*(e._y1-n),e._x2,e._y2)}function a6(e,t){this._context=e,this._k=(1-t)/6}a6.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:Fx(this,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,this._x1=e,this._y1=t;break;case 2:this._point=3;default:Fx(this,e,t);break}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const e$e=function e(t){function n(r){return new a6(r,t)}return n.tension=function(r){return e(+r)},n}(0);function s6(e,t){this._context=e,this._k=(1-t)/6}s6.prototype={areaStart:dl,areaEnd:dl,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x3,this._y3),this._context.closePath();break}case 2:{this._context.lineTo(this._x3,this._y3),this._context.closePath();break}case 3:{this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5);break}}},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._x3=e,this._y3=t;break;case 1:this._point=2,this._context.moveTo(this._x4=e,this._y4=t);break;case 2:this._point=3,this._x5=e,this._y5=t;break;default:Fx(this,e,t);break}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const t$e=function e(t){function n(r){return new s6(r,t)}return n.tension=function(r){return e(+r)},n}(0);function u6(e,t){this._context=e,this._k=(1-t)/6}u6.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=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,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:Fx(this,e,t);break}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const n$e=function e(t){function n(r){return new u6(r,t)}return n.tension=function(r){return e(+r)},n}(0);function l6(e,t,n){var r=e._x1,i=e._y1,o=e._x2,a=e._y2;if(e._l01_a>Or){var s=2*e._l01_2a+3*e._l01_a*e._l12_a+e._l12_2a,u=3*e._l01_a*(e._l01_a+e._l12_a);r=(r*s-e._x0*e._l12_2a+e._x2*e._l01_2a)/u,i=(i*s-e._y0*e._l12_2a+e._y2*e._l01_2a)/u}if(e._l23_a>Or){var l=2*e._l23_2a+3*e._l23_a*e._l12_a+e._l12_2a,f=3*e._l23_a*(e._l23_a+e._l12_a);o=(o*l+e._x1*e._l23_2a-t*e._l12_2a)/f,a=(a*l+e._y1*e._l23_2a-n*e._l12_2a)/f}e._context.bezierCurveTo(r,i,o,a,e._x2,e._y2)}function LK(e,t){this._context=e,this._alpha=t}LK.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:this.point(this._x2,this._y2);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){if(e=+e,t=+t,this._point){var n=this._x2-e,r=this._y2-t;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+r*r,this._alpha))}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;default:l6(this,e,t);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const r$e=function e(t){function n(r){return t?new LK(r,t):new a6(r,0)}return n.alpha=function(r){return e(+r)},n}(.5);function DK(e,t){this._context=e,this._alpha=t}DK.prototype={areaStart:dl,areaEnd:dl,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x3,this._y3),this._context.closePath();break}case 2:{this._context.lineTo(this._x3,this._y3),this._context.closePath();break}case 3:{this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5);break}}},point:function(e,t){if(e=+e,t=+t,this._point){var n=this._x2-e,r=this._y2-t;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+r*r,this._alpha))}switch(this._point){case 0:this._point=1,this._x3=e,this._y3=t;break;case 1:this._point=2,this._context.moveTo(this._x4=e,this._y4=t);break;case 2:this._point=3,this._x5=e,this._y5=t;break;default:l6(this,e,t);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const i$e=function e(t){function n(r){return t?new DK(r,t):new s6(r,0)}return n.alpha=function(r){return e(+r)},n}(.5);function FK(e,t){this._context=e,this._alpha=t}FK.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=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){if(e=+e,t=+t,this._point){var n=this._x2-e,r=this._y2-t;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+r*r,this._alpha))}switch(this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:l6(this,e,t);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const o$e=function e(t){function n(r){return t?new FK(r,t):new u6(r,0)}return n.alpha=function(r){return e(+r)},n}(.5);function BK(e){this._context=e}BK.prototype={areaStart:dl,areaEnd:dl,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 zK(e){return new BK(e)}function zN(e){return e<0?-1:1}function WN(e,t,n){var r=e._x1-e._x0,i=t-e._x1,o=(e._y1-e._y0)/(r||i<0&&-0),a=(n-e._y1)/(i||r<0&&-0),s=(o*i+a*r)/(r+i);return(zN(o)+zN(a))*Math.min(Math.abs(o),Math.abs(a),.5*Math.abs(s))||0}function UN(e,t){var n=e._x1-e._x0;return n?(3*(e._y1-e._y0)/n-t)/2:t}function hE(e,t,n){var r=e._x0,i=e._y0,o=e._x1,a=e._y1,s=(o-r)/3;e._context.bezierCurveTo(r+s,i+s*t,o-s,a-s*n,o,a)}function Bx(e){this._context=e}Bx.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:hE(this,this._t0,UN(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 n=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,hE(this,UN(this,n=WN(this,e,t)),n);break;default:hE(this,this._t0,n=WN(this,e,t));break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t,this._t0=n}}};function WK(e){this._context=new UK(e)}(WK.prototype=Object.create(Bx.prototype)).point=function(e,t){Bx.prototype.point.call(this,t,e)};function UK(e){this._context=e}UK.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,n,r,i,o){this._context.bezierCurveTo(t,e,r,n,o,i)}};function c6(e){return new Bx(e)}function f6(e){return new WK(e)}function VK(e){this._context=e}VK.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,n=e.length;if(n)if(this._line?this._context.lineTo(e[0],t[0]):this._context.moveTo(e[0],t[0]),n===2)this._context.lineTo(e[1],t[1]);else for(var r=VN(e),i=VN(t),o=0,a=1;a=0;--t)i[t]=(a[t]-i[t+1])/o[t];for(o[n-1]=(e[n]+i[n-1])/2,t=0;t=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;default:{if(this._t<=0)this._context.lineTo(this._x,t),this._context.lineTo(e,t);else{var n=this._x*(1-this._t)+e*this._t;this._context.lineTo(n,this._y),this._context.lineTo(n,t)}break}}this._x=e,this._y=t}};function GK(e){return new Uw(e,.5)}function qK(e){return new Uw(e,0)}function KK(e){return new Uw(e,1)}function Ch(e,t){if((a=e.length)>1)for(var n=1,r,i,o=e[t[0]],a,s=o.length;n=0;)n[t]=t;return n}function a$e(e,t){return e[t]}function s$e(e){const t=[];return t.key=e,t}function u$e(){var e=vt([]),t=X3,n=Ch,r=a$e;function i(o){var a=Array.from(e.apply(this,arguments),s$e),s,u=a.length,l=-1,f;for(const d of o)for(s=0,++l;s0){for(var n,r,i=0,o=e[0].length,a;i0){for(var n=0,r=e[t[0]],i,o=r.length;n0)||!((o=(i=e[t[0]]).length)>0))){for(var n=0,r=1,i,o,a;r0&&n(s)?t>1?YK(s,t-1,n,r,i):F$e(i,s):r||(i[i.length]=s)}return i}var h6=YK,z$e=h6;function W$e(e){var t=e==null?0:e.length;return t?z$e(e,1):[]}var U$e=W$e,V$e=U$e,H$e=Aq,G$e=kq;function q$e(e){return G$e(H$e(e,void 0,V$e),e+"")}var K$e=q$e,Z$e=R$e,Y$e=K$e,X$e=Y$e(function(e,t){return e==null?{}:Z$e(e,t)}),Q$e=X$e;const J$e=Et(Q$e);function eRe(e,t){for(var n=-1,r=e==null?0:e.length;++ns))return!1;var l=o.get(e),f=o.get(t);if(l&&f)return l==t&&f==e;var d=-1,p=!0,m=n&oRe?new tRe:void 0;for(o.set(e,t),o.set(t,e);++d=0||(i[n]=e[n]);return i}var Dje=["axis.ticks.text","axis.legend.text","legends.title.text","legends.text","legends.ticks.text","legends.title.text","labels.text","dots.text","markers.text","annotations.text"],Fje=function(e,t){return va({},t,e)},Bje=function(e,t){var n=_ke({},e,t);return Dje.forEach(function(r){Wm(n,r,Fje(Bn(n,r),n.text))}),n},iZ=S.createContext(),oZ=function(e){var t=e.children,n=e.animate,r=n===void 0||n,i=e.config,o=i===void 0?"default":i,a=S.useMemo(function(){var s=Sp(o)?t4[o]:o;return{animate:r,config:s}},[r,o]);return g.jsx(iZ.Provider,{value:a,children:t})},zx={animate:re.bool,motionConfig:re.oneOfType([re.oneOf(Object.keys(t4)),re.shape({mass:re.number,tension:re.number,friction:re.number,clamp:re.bool,precision:re.number,velocity:re.number,duration:re.number,easing:re.func})])};oZ.propTypes={children:re.node.isRequired,animate:zx.animate,config:zx.motionConfig};var xl=function(){return S.useContext(iZ)},zje=function(e){var t=xl(),n=t.animate,r=t.config,i=function(s){var u=S.useRef();return S.useEffect(function(){u.current=s},[s]),u.current}(e),o=S.useMemo(function(){return zq(i,e)},[i,e]),a=Qs({from:{value:0},to:{value:1},reset:!0,config:r,immediate:!n}).value;return fp(a,o)},Wje={nivo:["#d76445","#f47560","#e8c1a0","#97e3d5","#61cdbb","#00b0a7"],BrBG:Ye(dw),PRGn:Ye(hw),PiYG:Ye(pw),PuOr:Ye(mw),RdBu:Ye(vw),RdGy:Ye(gw),RdYlBu:Ye(yw),RdYlGn:Ye(bw),spectral:Ye(xw),blues:Ye(Rw),greens:Ye(jw),greys:Ye(Iw),oranges:Ye(Dw),purples:Ye(Nw),reds:Ye(Lw),BuGn:Ye(_w),BuPu:Ye(ww),GnBu:Ye(Sw),OrRd:Ye(Cw),PuBuGn:Ye(Ow),PuBu:Ye(Ew),PuRd:Ye(Tw),RdPu:Ye(Pw),YlGnBu:Ye(Aw),YlGn:Ye(kw),YlOrBr:Ye(Mw),YlOrRd:Ye($w)},Uje=Object.keys(Wje);Ye(dw),Ye(hw),Ye(pw),Ye(mw),Ye(vw),Ye(gw),Ye(yw),Ye(bw),Ye(xw),Ye(Rw),Ye(jw),Ye(Iw),Ye(Dw),Ye(Nw),Ye(Lw),Ye(_w),Ye(ww),Ye(Sw),Ye(Cw),Ye(Ow),Ye(Ew),Ye(Tw),Ye(Pw),Ye(Aw),Ye(kw),Ye(Mw),Ye($w);re.oneOfType([re.oneOf(Uje),re.func,re.arrayOf(re.string)]);var Vje={basis:MK,basisClosed:RK,basisOpen:IK,bundle:JMe,cardinal:e$e,cardinalClosed:t$e,cardinalOpen:n$e,catmullRom:r$e,catmullRomClosed:i$e,catmullRomOpen:o$e,linear:R0,linearClosed:zK,monotoneX:c6,monotoneY:f6,natural:HK,step:GK,stepAfter:KK,stepBefore:qK},g6=Object.keys(Vje);g6.filter(function(e){return e.endsWith("Closed")});SK(g6,"bundle","basisClosed","basisOpen","cardinalClosed","cardinalOpen","catmullRomClosed","catmullRomOpen","linearClosed");SK(g6,"bundle","basisClosed","basisOpen","cardinalClosed","cardinalOpen","catmullRomClosed","catmullRomOpen","linearClosed");re.shape({top:re.number,right:re.number,bottom:re.number,left:re.number}).isRequired;var Hje=["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"];re.oneOf(Hje);Nu(wK);var Gje={top:0,right:0,bottom:0,left:0},aZ=function(e,t,n){return n===void 0&&(n={}),S.useMemo(function(){var r=va({},Gje,n);return{margin:r,innerWidth:e-r.left-r.right,innerHeight:t-r.top-r.bottom,outerWidth:e,outerHeight:t}},[e,t,n.top,n.right,n.bottom,n.left])},qje=function(){var e=S.useRef(null),t=S.useState({left:0,top:0,width:0,height:0}),n=t[0],r=t[1],i=S.useState(function(){return typeof ResizeObserver>"u"?null:new ResizeObserver(function(o){var a=o[0];return r(a.contentRect)})})[0];return S.useEffect(function(){return e.current&&i!==null&&i.observe(e.current),function(){i!==null&&i.disconnect()}},[]),[e,n]},Kje=function(e){return S.useMemo(function(){return Bje(Lje,e)},[e])},Zje=function(e){return typeof e=="function"?e:typeof e=="string"?e.indexOf("time:")===0?t6(e.slice("5")):sw(e):function(t){return""+t}},y6=function(e){return S.useMemo(function(){return Zje(e)},[e])},sZ=S.createContext(),Yje={},uZ=function(e){var t=e.theme,n=t===void 0?Yje:t,r=e.children,i=Kje(n);return g.jsx(sZ.Provider,{value:i,children:r})};uZ.propTypes={children:re.node.isRequired,theme:re.object};var oi=function(){return S.useContext(sZ)},Xje=["outlineWidth","outlineColor","outlineOpacity"],lZ=function(e){return e.outlineWidth,e.outlineColor,e.outlineOpacity,v6(e,Xje)},cZ=function(e){var t=e.children,n=e.condition,r=e.wrapper;return n?S.cloneElement(r,{},t):t};cZ.propTypes={children:re.node.isRequired,condition:re.bool.isRequired,wrapper:re.element.isRequired};var Qje={position:"relative"},b6=function(e){var t=e.children,n=e.theme,r=e.renderWrapper,i=r===void 0||r,o=e.isInteractive,a=o===void 0||o,s=e.animate,u=e.motionConfig,l=S.useRef(null);return g.jsx(uZ,{theme:n,children:g.jsx(oZ,{animate:s,config:u,children:g.jsx(TTe,{container:l,children:g.jsxs(cZ,{condition:i,wrapper:g.jsx("div",{style:Qje,ref:l}),children:[t,a&&g.jsx(ETe,{})]})})})})};b6.propTypes={children:re.element.isRequired,isInteractive:re.bool,renderWrapper:re.bool,theme:re.object,animate:re.bool,motionConfig:re.oneOfType([re.string,zx.motionConfig])};re.func.isRequired,re.bool,re.bool,re.object.isRequired,re.bool.isRequired,re.oneOfType([re.string,zx.motionConfig]);re.func.isRequired;var Jje=["id","colors"],fZ=function(e){var t=e.id,n=e.colors,r=v6(e,Jje);return g.jsx("linearGradient",va({id:t,x1:0,x2:0,y1:0,y2:1},r,{children:n.map(function(i){var o=i.offset,a=i.color,s=i.opacity;return g.jsx("stop",{offset:o+"%",stopColor:a,stopOpacity:s!==void 0?s:1},o)})}))};fZ.propTypes={id:re.string.isRequired,colors:re.arrayOf(re.shape({offset:re.number.isRequired,color:re.string.isRequired,opacity:re.number})).isRequired,gradientTransform:re.string};var dZ={linearGradient:fZ},_m={color:"#000000",background:"#ffffff",size:4,padding:4,stagger:!1},rP=S.memo(function(e){var t=e.id,n=e.background,r=n===void 0?_m.background:n,i=e.color,o=i===void 0?_m.color:i,a=e.size,s=a===void 0?_m.size:a,u=e.padding,l=u===void 0?_m.padding:u,f=e.stagger,d=f===void 0?_m.stagger:f,p=s+l,m=s/2,v=l/2;return d===!0&&(p=2*s+2*l),g.jsxs("pattern",{id:t,width:p,height:p,patternUnits:"userSpaceOnUse",children:[g.jsx("rect",{width:p,height:p,fill:r}),g.jsx("circle",{cx:v+m,cy:v+m,r:m,fill:o}),d&&g.jsx("circle",{cx:1.5*l+s+m,cy:1.5*l+s+m,r:m,fill:o})]})});rP.displayName="PatternDots",rP.propTypes={id:re.string.isRequired,color:re.string.isRequired,background:re.string.isRequired,size:re.number.isRequired,padding:re.number.isRequired,stagger:re.bool.isRequired};var $s=function(e){return e*Math.PI/180},x6=function(e){return 180*e/Math.PI},eIe=function(e){return e.startAngle+(e.endAngle-e.startAngle)/2},qd=function(e,t){return{x:Math.cos(e)*t,y:Math.sin(e)*t}},wm={spacing:5,rotation:0,background:"#000000",color:"#ffffff",lineWidth:2},iP=S.memo(function(e){var t=e.id,n=e.spacing,r=n===void 0?wm.spacing:n,i=e.rotation,o=i===void 0?wm.rotation:i,a=e.background,s=a===void 0?wm.background:a,u=e.color,l=u===void 0?wm.color:u,f=e.lineWidth,d=f===void 0?wm.lineWidth:f,p=Math.round(o)%360,m=Math.abs(r);p>180?p-=360:p>90?p-=180:p<-180?p+=360:p<-90&&(p+=180);var v,y=m,_=m;return p===0?v=` +`;return function(){var xe=new Error("get-stack-trace"),Be=xe&&xe.stack?xe.stack.replace(/^[^\(]+?[\n$]/gm,"").replace(/^\s+at\s+/gm,"").replace(/^Object.\s*\(/gm,"{anonymous}()@"):"Unknown Stack Trace",bt=t.console&&(t.console.warn||t.console.log);return bt&&bt.call(t.console,oe,Be),I.apply(this,arguments)}}var y;typeof Object.assign!="function"?y=function(V){if(V===i||V===null)throw new TypeError("Cannot convert undefined or null to object");for(var X=Object(V),oe=1;oe-1}function $(I){return I.trim().split(/\s+/g)}function j(I,V,X){if(I.indexOf&&!X)return I.indexOf(V);for(var oe=0;oetr[V]}),oe}function B(I,V){for(var X,oe,xe=V[0].toUpperCase()+V.slice(1),Be=0;Be1&&!X.firstMultiple?X.firstMultiple=$n(V):xe===1&&(X.firstMultiple=!1);var Be=X.firstInput,bt=X.firstMultiple,In=bt?bt.center:Be.center,zn=V.center=Gn(oe);V.timeStamp=f(),V.deltaTime=V.timeStamp-Be.timeStamp,V.angle=er(In,zn),V.distance=Yt(In,zn),Fe(X,V),V.offsetDirection=sr(V.deltaX,V.deltaY);var tr=yr(V.deltaTime,V.deltaX,V.deltaY);V.overallVelocityX=tr.x,V.overallVelocityY=tr.y,V.overallVelocity=l(tr.x)>l(tr.y)?tr.x:tr.y,V.scale=bt?Rn(bt.pointers,oe):1,V.rotation=bt?br(bt.pointers,oe):0,V.maxPointers=X.prevInput?V.pointers.length>X.prevInput.maxPointers?V.pointers.length:X.prevInput.maxPointers:V.pointers.length,Ut(X,V);var to=I.element;k(V.srcEvent.target,to)&&(to=V.srcEvent.target),V.target=to}function Fe(I,V){var X=V.center,oe=I.offsetDelta||{},xe=I.prevDelta||{},Be=I.prevInput||{};(V.eventType===_e||Be.eventType===ae)&&(xe=I.prevDelta={x:Be.deltaX||0,y:Be.deltaY||0},oe=I.offsetDelta={x:X.x,y:X.y}),V.deltaX=xe.x+(X.x-oe.x),V.deltaY=xe.y+(X.y-oe.y)}function Ut(I,V){var X=I.lastInterval||V,oe=V.timeStamp-X.timeStamp,xe,Be,bt,In;if(V.eventType!=Te&&(oe>ge||X.velocity===i)){var zn=V.deltaX-X.deltaX,tr=V.deltaY-X.deltaY,to=yr(oe,zn,tr);Be=to.x,bt=to.y,xe=l(to.x)>l(to.y)?to.x:to.y,In=sr(zn,tr),I.lastInterval=V}else xe=X.velocity,Be=X.velocityX,bt=X.velocityY,In=X.direction;V.velocity=xe,V.velocityX=Be,V.velocityY=bt,V.direction=In}function $n(I){for(var V=[],X=0;X=l(V)?I<0?fe:Ze:V<0?De:He}function Yt(I,V,X){X||(X=Lt);var oe=V[X[0]]-I[X[0]],xe=V[X[1]]-I[X[1]];return Math.sqrt(oe*oe+xe*xe)}function er(I,V,X){X||(X=Lt);var oe=V[X[0]]-I[X[0]],xe=V[X[1]]-I[X[1]];return Math.atan2(xe,oe)*180/Math.PI}function br(I,V){return er(V[1],V[0],Mt)+er(I[1],I[0],Mt)}function Rn(I,V){return Yt(V[0],V[1],Mt)/Yt(I[0],I[1],Mt)}var Sl={mousedown:_e,mousemove:ke,mouseup:ae},nu="mousedown",Cl="mousemove mouseup";function ru(){this.evEl=nu,this.evWin=Cl,this.pressed=!1,Pe.apply(this,arguments)}w(ru,Pe,{handler:function(V){var X=Sl[V.type];X&_e&&V.button===0&&(this.pressed=!0),X&ke&&V.which!==1&&(X=ae),this.pressed&&(X&ae&&(this.pressed=!1),this.callback(this.manager,X,{pointers:[V],changedPointers:[V],pointerType:le,srcEvent:V}))}});var kp={pointerdown:_e,pointermove:ke,pointerup:ae,pointercancel:Te,pointerout:Te},Mp={2:K,3:ie,4:le,5:ue},Ol="pointerdown",iu="pointermove pointerup pointercancel";t.MSPointerEvent&&!t.PointerEvent&&(Ol="MSPointerDown",iu="MSPointerMove MSPointerUp MSPointerCancel");function El(){this.evEl=Ol,this.evWin=iu,Pe.apply(this,arguments),this.store=this.manager.session.pointerEvents=[]}w(El,Pe,{handler:function(V){var X=this.store,oe=!1,xe=V.type.toLowerCase().replace("ms",""),Be=kp[xe],bt=Mp[V.pointerType]||V.pointerType,In=bt==K,zn=j(X,V.pointerId,"pointerId");Be&_e&&(V.button===0||In)?zn<0&&(X.push(V),zn=X.length-1):Be&(ae|Te)&&(oe=!0),!(zn<0)&&(X[zn]=V,this.callback(this.manager,Be,{pointers:X,changedPointers:[V],pointerType:bt,srcEvent:V}),oe&&X.splice(zn,1))}});var $p={touchstart:_e,touchmove:ke,touchend:ae,touchcancel:Te},Rp="touchstart",jp="touchstart touchmove touchend touchcancel";function ou(){this.evTarget=Rp,this.evWin=jp,this.started=!1,Pe.apply(this,arguments)}w(ou,Pe,{handler:function(V){var X=$p[V.type];if(X===_e&&(this.started=!0),!!this.started){var oe=df.call(this,V,X);X&(ae|Te)&&oe[0].length-oe[1].length===0&&(this.started=!1),this.callback(this.manager,X,{pointers:oe[0],changedPointers:oe[1],pointerType:K,srcEvent:V})}}});function df(I,V){var X=N(I.touches),oe=N(I.changedTouches);return V&(ae|Te)&&(X=U(X.concat(oe),"identifier")),[X,oe]}var hf={touchstart:_e,touchmove:ke,touchend:ae,touchcancel:Te},pf="touchstart touchmove touchend touchcancel";function Ea(){this.evTarget=pf,this.targetIds={},Pe.apply(this,arguments)}w(Ea,Pe,{handler:function(V){var X=hf[V.type],oe=mf.call(this,V,X);oe&&this.callback(this.manager,X,{pointers:oe[0],changedPointers:oe[1],pointerType:K,srcEvent:V})}});function mf(I,V){var X=N(I.touches),oe=this.targetIds;if(V&(_e|ke)&&X.length===1)return oe[X[0].identifier]=!0,[X,X];var xe,Be,bt=N(I.changedTouches),In=[],zn=this.target;if(Be=X.filter(function(tr){return k(tr.target,zn)}),V===_e)for(xe=0;xe-1&&oe.splice(Be,1)};setTimeout(xe,Tl)}}function gf(I){for(var V=I.srcEvent.clientX,X=I.srcEvent.clientY,oe=0;oe-1&&this.requireFail.splice(V,1),this},hasRequireFailures:function(){return this.requireFail.length>0},canRecognizeWith:function(I){return!!this.simultaneous[I.id]},emit:function(I){var V=this,X=this.state;function oe(xe){V.manager.emit(xe,I)}X=Dr&&oe(V.options.event+B0(X))},tryEmit:function(I){if(this.canEmit())return this.emit(I);this.state=Oi},canEmit:function(){for(var I=0;IV.threshold&&xe&V.direction},attrTest:function(I){return ui.prototype.attrTest.call(this,I)&&(this.state&jn||!(this.state&jn)&&this.directionTest(I))},emit:function(I){this.pX=I.deltaX,this.pY=I.deltaY;var V=z0(I.direction);V&&(I.additionalEvent=this.options.event+V),this._super.emit.call(this,I)}});function xf(){ui.apply(this,arguments)}w(xf,ui,{defaults:{event:"pinch",threshold:0,pointers:2},getTouchAction:function(){return[Qi]},attrTest:function(I){return this._super.attrTest.call(this,I)&&(Math.abs(I.scale-1)>this.options.threshold||this.state&jn)},emit:function(I){if(I.scale!==1){var V=I.scale<1?"in":"out";I.additionalEvent=this.options.event+V}this._super.emit.call(this,I)}});function Rl(){Bo.apply(this,arguments),this._timer=null,this._input=null}w(Rl,Bo,{defaults:{event:"press",pointers:1,time:251,threshold:9},getTouchAction:function(){return[Do]},process:function(I){var V=this.options,X=I.pointers.length===V.pointers,oe=I.distanceV.time;if(this._input=I,!oe||!X||I.eventType&(ae|Te)&&!xe)this.reset();else if(I.eventType&_e)this.reset(),this._timer=d(function(){this.state=si,this.tryEmit()},V.time,this);else if(I.eventType&ae)return si;return Oi},reset:function(){clearTimeout(this._timer)},emit:function(I){this.state===si&&(I&&I.eventType&ae?this.manager.emit(this.options.event+"up",I):(this._input.timeStamp=f(),this.manager.emit(this.options.event,this._input)))}});function Lp(){ui.apply(this,arguments)}w(Lp,ui,{defaults:{event:"rotate",threshold:0,pointers:2},getTouchAction:function(){return[Qi]},attrTest:function(I){return this._super.attrTest.call(this,I)&&(Math.abs(I.rotation)>this.options.threshold||this.state&jn)}});function _f(){ui.apply(this,arguments)}w(_f,ui,{defaults:{event:"swipe",threshold:10,velocity:.3,direction:Qe|Ge,pointers:1},getTouchAction:function(){return $l.prototype.getTouchAction.call(this)},attrTest:function(I){var V=this.options.direction,X;return V&(Qe|Ge)?X=I.overallVelocity:V&Qe?X=I.overallVelocityX:V&Ge&&(X=I.overallVelocityY),this._super.attrTest.call(this,I)&&V&I.offsetDirection&&I.distance>this.options.threshold&&I.maxPointers==this.options.pointers&&l(X)>this.options.velocity&&I.eventType&ae},emit:function(I){var V=z0(I.offsetDirection);V&&this.manager.emit(this.options.event+V,I),this.manager.emit(this.options.event,I)}});function is(){Bo.apply(this,arguments),this.pTime=!1,this.pCenter=!1,this._timer=null,this._input=null,this.count=0}w(is,Bo,{defaults:{event:"tap",pointers:1,taps:1,interval:300,time:250,threshold:9,posThreshold:10},getTouchAction:function(){return[kl]},process:function(I){var V=this.options,X=I.pointers.length===V.pointers,oe=I.distance0?-1:1)}const bwe=function(){let e=0,t=null;return Ee(null,(n,r,i)=>{t&&clearTimeout(t),i*e<0&&(e=0);const o=n(Nr);if(o===void 0)return;const a=n(Gt),s=a&&a=s){const u=e%100;r(A0e,ywe(e/s)),e=u}t=setTimeout(()=>e=0,100)})}();function xwe(){const e=Je(bwe),t=Je(s2e),n=S.useRef(null),r=i=>{i.altKey||i.ctrlKey||i.metaKey||i.shiftKey||!i.deltaY||e(i.deltaY)};return E2(()=>t()),S.useEffect(()=>{if(!n.current)return;const i=new sv(n.current);return i.get("pan").set({direction:sv.DIRECTION_VERTICAL}),i.on("panup pandown",o=>{var a;o.pointerType.includes("touch")&&e(-(((a=o.changedPointers[0])==null?void 0:a.movementY)??0)*5)}),()=>{i.destroy()}},[e]),g.jsxs(u5,{overflow:"hidden",flexShrink:"1",onWheel:r,maxWidth:"1200px",className:D2.scroll,ref:n,children:[g.jsx(hwe,{}),g.jsx(Q2e,{}),g.jsx(Oe,{direction:"column",gap:"4",children:g.jsx(q2e,{})})]})}function _we(){const e=ve(ii),t=Je(Gt);O2(()=>t(void 0));const n=r=>{r.button===1&&t(void 0)};if(e)return g.jsx(Oe,{direction:"column",gap:"4",maxHeight:"calc(100vh - var(--header-height))",onMouseDown:n,style:{padding:"4px 12px"},children:g.jsx(xwe,{})})}var jt;(function(e){e.assertEqual=i=>i;function t(i){}e.assertIs=t;function n(i){throw new Error}e.assertNever=n,e.arrayToEnum=i=>{const o={};for(const a of i)o[a]=a;return o},e.getValidEnumValues=i=>{const o=e.objectKeys(i).filter(s=>typeof i[i[s]]!="number"),a={};for(const s of o)a[s]=i[s];return e.objectValues(a)},e.objectValues=i=>e.objectKeys(i).map(function(o){return i[o]}),e.objectKeys=typeof Object.keys=="function"?i=>Object.keys(i):i=>{const o=[];for(const a in i)Object.prototype.hasOwnProperty.call(i,a)&&o.push(a);return o},e.find=(i,o)=>{for(const a of i)if(o(a))return a},e.isInteger=typeof Number.isInteger=="function"?i=>Number.isInteger(i):i=>typeof i=="number"&&isFinite(i)&&Math.floor(i)===i;function r(i,o=" | "){return i.map(a=>typeof a=="string"?`'${a}'`:a).join(o)}e.joinValues=r,e.jsonStringifyReplacer=(i,o)=>typeof o=="bigint"?o.toString():o})(jt||(jt={}));var $3;(function(e){e.mergeShapes=(t,n)=>({...t,...n})})($3||($3={}));const ze=jt.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),_s=e=>{switch(typeof e){case"undefined":return ze.undefined;case"string":return ze.string;case"number":return isNaN(e)?ze.nan:ze.number;case"boolean":return ze.boolean;case"function":return ze.function;case"bigint":return ze.bigint;case"symbol":return ze.symbol;case"object":return Array.isArray(e)?ze.array:e===null?ze.null:e.then&&typeof e.then=="function"&&e.catch&&typeof e.catch=="function"?ze.promise:typeof Map<"u"&&e instanceof Map?ze.map:typeof Set<"u"&&e instanceof Set?ze.set:typeof Date<"u"&&e instanceof Date?ze.date:ze.object;default:return ze.unknown}},we=jt.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]),wwe=e=>JSON.stringify(e,null,2).replace(/"([^"]+)":/g,"$1:");class Si extends Error{get errors(){return this.issues}constructor(t){super(),this.issues=[],this.addIssue=r=>{this.issues=[...this.issues,r]},this.addIssues=(r=[])=>{this.issues=[...this.issues,...r]};const n=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,n):this.__proto__=n,this.name="ZodError",this.issues=t}format(t){const n=t||function(o){return o.message},r={_errors:[]},i=o=>{for(const a of o.issues)if(a.code==="invalid_union")a.unionErrors.map(i);else if(a.code==="invalid_return_type")i(a.returnTypeError);else if(a.code==="invalid_arguments")i(a.argumentsError);else if(a.path.length===0)r._errors.push(n(a));else{let s=r,u=0;for(;un.message){const n={},r=[];for(const i of this.issues)i.path.length>0?(n[i.path[0]]=n[i.path[0]]||[],n[i.path[0]].push(t(i))):r.push(t(i));return{formErrors:r,fieldErrors:n}}get formErrors(){return this.flatten()}}Si.create=e=>new Si(e);const vh=(e,t)=>{let n;switch(e.code){case we.invalid_type:e.received===ze.undefined?n="Required":n=`Expected ${e.expected}, received ${e.received}`;break;case we.invalid_literal:n=`Invalid literal value, expected ${JSON.stringify(e.expected,jt.jsonStringifyReplacer)}`;break;case we.unrecognized_keys:n=`Unrecognized key(s) in object: ${jt.joinValues(e.keys,", ")}`;break;case we.invalid_union:n="Invalid input";break;case we.invalid_union_discriminator:n=`Invalid discriminator value. Expected ${jt.joinValues(e.options)}`;break;case we.invalid_enum_value:n=`Invalid enum value. Expected ${jt.joinValues(e.options)}, received '${e.received}'`;break;case we.invalid_arguments:n="Invalid function arguments";break;case we.invalid_return_type:n="Invalid function return type";break;case we.invalid_date:n="Invalid date";break;case we.invalid_string:typeof e.validation=="object"?"includes"in e.validation?(n=`Invalid input: must include "${e.validation.includes}"`,typeof e.validation.position=="number"&&(n=`${n} at one or more positions greater than or equal to ${e.validation.position}`)):"startsWith"in e.validation?n=`Invalid input: must start with "${e.validation.startsWith}"`:"endsWith"in e.validation?n=`Invalid input: must end with "${e.validation.endsWith}"`:jt.assertNever(e.validation):e.validation!=="regex"?n=`Invalid ${e.validation}`:n="Invalid";break;case we.too_small:e.type==="array"?n=`Array must contain ${e.exact?"exactly":e.inclusive?"at least":"more than"} ${e.minimum} element(s)`:e.type==="string"?n=`String must contain ${e.exact?"exactly":e.inclusive?"at least":"over"} ${e.minimum} character(s)`:e.type==="number"?n=`Number must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${e.minimum}`:e.type==="date"?n=`Date must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(e.minimum))}`:n="Invalid input";break;case we.too_big:e.type==="array"?n=`Array must contain ${e.exact?"exactly":e.inclusive?"at most":"less than"} ${e.maximum} element(s)`:e.type==="string"?n=`String must contain ${e.exact?"exactly":e.inclusive?"at most":"under"} ${e.maximum} character(s)`:e.type==="number"?n=`Number must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="bigint"?n=`BigInt must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="date"?n=`Date must be ${e.exact?"exactly":e.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(e.maximum))}`:n="Invalid input";break;case we.custom:n="Invalid input";break;case we.invalid_intersection_types:n="Intersection results could not be merged";break;case we.not_multiple_of:n=`Number must be a multiple of ${e.multipleOf}`;break;case we.not_finite:n="Number must be finite";break;default:n=t.defaultError,jt.assertNever(e)}return{message:n}};let BG=vh;function Swe(e){BG=e}function mx(){return BG}const vx=e=>{const{data:t,path:n,errorMaps:r,issueData:i}=e,o=[...n,...i.path||[]],a={...i,path:o};if(i.message!==void 0)return{...i,path:o,message:i.message};let s="";const u=r.filter(l=>!!l).slice().reverse();for(const l of u)s=l(a,{data:t,defaultError:s}).message;return{...i,path:o,message:s}},Cwe=[];function Ie(e,t){const n=mx(),r=vx({issueData:t,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,n,n===vh?void 0:vh].filter(i=>!!i)});e.common.issues.push(r)}class Ir{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(t,n){const r=[];for(const i of n){if(i.status==="aborted")return ut;i.status==="dirty"&&t.dirty(),r.push(i.value)}return{status:t.value,value:r}}static async mergeObjectAsync(t,n){const r=[];for(const i of n){const o=await i.key,a=await i.value;r.push({key:o,value:a})}return Ir.mergeObjectSync(t,r)}static mergeObjectSync(t,n){const r={};for(const i of n){const{key:o,value:a}=i;if(o.status==="aborted"||a.status==="aborted")return ut;o.status==="dirty"&&t.dirty(),a.status==="dirty"&&t.dirty(),o.value!=="__proto__"&&(typeof a.value<"u"||i.alwaysSet)&&(r[o.value]=a.value)}return{status:t.value,value:r}}}const ut=Object.freeze({status:"aborted"}),bd=e=>({status:"dirty",value:e}),ei=e=>({status:"valid",value:e}),R3=e=>e.status==="aborted",j3=e=>e.status==="dirty",Fc=e=>e.status==="valid",Qv=e=>typeof Promise<"u"&&e instanceof Promise;function gx(e,t,n,r){if(typeof t=="function"?e!==t||!0:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return t.get(e)}function zG(e,t,n,r,i){if(typeof t=="function"?e!==t||!0:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return t.set(e,n),n}var Ke;(function(e){e.errToObj=t=>typeof t=="string"?{message:t}:t||{},e.toString=t=>typeof t=="string"?t:t==null?void 0:t.message})(Ke||(Ke={}));var Bm,zm;class Za{constructor(t,n,r,i){this._cachedPath=[],this.parent=t,this.data=n,this._path=r,this._key=i}get path(){return this._cachedPath.length||(this._key instanceof Array?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}}const CI=(e,t)=>{if(Fc(t))return{success:!0,data:t.value};if(!e.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;const n=new Si(e.common.issues);return this._error=n,this._error}}};function pt(e){if(!e)return{};const{errorMap:t,invalid_type_error:n,required_error:r,description:i}=e;if(t&&(n||r))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return t?{errorMap:t,description:i}:{errorMap:(a,s)=>{var u,l;const{message:f}=e;return a.code==="invalid_enum_value"?{message:f??s.defaultError}:typeof s.data>"u"?{message:(u=f??r)!==null&&u!==void 0?u:s.defaultError}:a.code!=="invalid_type"?{message:s.defaultError}:{message:(l=f??n)!==null&&l!==void 0?l:s.defaultError}},description:i}}class _t{get description(){return this._def.description}_getType(t){return _s(t.data)}_getOrReturnCtx(t,n){return n||{common:t.parent.common,data:t.data,parsedType:_s(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}_processInputParams(t){return{status:new Ir,ctx:{common:t.parent.common,data:t.data,parsedType:_s(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}}_parseSync(t){const n=this._parse(t);if(Qv(n))throw new Error("Synchronous parse encountered promise.");return n}_parseAsync(t){const n=this._parse(t);return Promise.resolve(n)}parse(t,n){const r=this.safeParse(t,n);if(r.success)return r.data;throw r.error}safeParse(t,n){var r;const i={common:{issues:[],async:(r=n==null?void 0:n.async)!==null&&r!==void 0?r:!1,contextualErrorMap:n==null?void 0:n.errorMap},path:(n==null?void 0:n.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:_s(t)},o=this._parseSync({data:t,path:i.path,parent:i});return CI(i,o)}"~validate"(t){var n,r;const i={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:_s(t)};if(!this["~standard"].async)try{const o=this._parseSync({data:t,path:[],parent:i});return Fc(o)?{value:o.value}:{issues:i.common.issues}}catch(o){!((r=(n=o==null?void 0:o.message)===null||n===void 0?void 0:n.toLowerCase())===null||r===void 0)&&r.includes("encountered")&&(this["~standard"].async=!0),i.common={issues:[],async:!0}}return this._parseAsync({data:t,path:[],parent:i}).then(o=>Fc(o)?{value:o.value}:{issues:i.common.issues})}async parseAsync(t,n){const r=await this.safeParseAsync(t,n);if(r.success)return r.data;throw r.error}async safeParseAsync(t,n){const r={common:{issues:[],contextualErrorMap:n==null?void 0:n.errorMap,async:!0},path:(n==null?void 0:n.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:_s(t)},i=this._parse({data:t,path:r.path,parent:r}),o=await(Qv(i)?i:Promise.resolve(i));return CI(r,o)}refine(t,n){const r=i=>typeof n=="string"||typeof n>"u"?{message:n}:typeof n=="function"?n(i):n;return this._refinement((i,o)=>{const a=t(i),s=()=>o.addIssue({code:we.custom,...r(i)});return typeof Promise<"u"&&a instanceof Promise?a.then(u=>u?!0:(s(),!1)):a?!0:(s(),!1)})}refinement(t,n){return this._refinement((r,i)=>t(r)?!0:(i.addIssue(typeof n=="function"?n(r,i):n),!1))}_refinement(t){return new Sa({schema:this,typeName:st.ZodEffects,effect:{type:"refinement",refinement:t}})}superRefine(t){return this._refinement(t)}constructor(t){this.spa=this.safeParseAsync,this._def=t,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this),this["~standard"]={version:1,vendor:"zod",validate:n=>this["~validate"](n)}}optional(){return Va.create(this,this._def)}nullable(){return cl.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return ma.create(this)}promise(){return yh.create(this,this._def)}or(t){return ng.create([this,t],this._def)}and(t){return rg.create(this,t,this._def)}transform(t){return new Sa({...pt(this._def),schema:this,typeName:st.ZodEffects,effect:{type:"transform",transform:t}})}default(t){const n=typeof t=="function"?t:()=>t;return new ug({...pt(this._def),innerType:this,defaultValue:n,typeName:st.ZodDefault})}brand(){return new f4({typeName:st.ZodBranded,type:this,...pt(this._def)})}catch(t){const n=typeof t=="function"?t:()=>t;return new lg({...pt(this._def),innerType:this,catchValue:n,typeName:st.ZodCatch})}describe(t){const n=this.constructor;return new n({...this._def,description:t})}pipe(t){return w0.create(this,t)}readonly(){return cg.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const Owe=/^c[^\s-]{8,}$/i,Ewe=/^[0-9a-z]+$/,Twe=/^[0-9A-HJKMNP-TV-Z]{26}$/i,Pwe=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,Awe=/^[a-z0-9_-]{21}$/i,kwe=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,Mwe=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,$we=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,Rwe="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let KO;const jwe=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,Iwe=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/,Nwe=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/,Lwe=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,Dwe=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,Fwe=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,WG="((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))",Bwe=new RegExp(`^${WG}$`);function UG(e){let t="([01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d";return e.precision?t=`${t}\\.\\d{${e.precision}}`:e.precision==null&&(t=`${t}(\\.\\d+)?`),t}function zwe(e){return new RegExp(`^${UG(e)}$`)}function VG(e){let t=`${WG}T${UG(e)}`;const n=[];return n.push(e.local?"Z?":"Z"),e.offset&&n.push("([+-]\\d{2}:?\\d{2})"),t=`${t}(${n.join("|")})`,new RegExp(`^${t}$`)}function Wwe(e,t){return!!((t==="v4"||!t)&&jwe.test(e)||(t==="v6"||!t)&&Nwe.test(e))}function Uwe(e,t){if(!kwe.test(e))return!1;try{const[n]=e.split("."),r=n.replace(/-/g,"+").replace(/_/g,"/").padEnd(n.length+(4-n.length%4)%4,"="),i=JSON.parse(atob(r));return!(typeof i!="object"||i===null||!i.typ||!i.alg||t&&i.alg!==t)}catch{return!1}}function Vwe(e,t){return!!((t==="v4"||!t)&&Iwe.test(e)||(t==="v6"||!t)&&Lwe.test(e))}class fa extends _t{_parse(t){if(this._def.coerce&&(t.data=String(t.data)),this._getType(t)!==ze.string){const o=this._getOrReturnCtx(t);return Ie(o,{code:we.invalid_type,expected:ze.string,received:o.parsedType}),ut}const r=new Ir;let i;for(const o of this._def.checks)if(o.kind==="min")t.data.lengtho.value&&(i=this._getOrReturnCtx(t,i),Ie(i,{code:we.too_big,maximum:o.value,type:"string",inclusive:!0,exact:!1,message:o.message}),r.dirty());else if(o.kind==="length"){const a=t.data.length>o.value,s=t.data.lengtht.test(i),{validation:n,code:we.invalid_string,...Ke.errToObj(r)})}_addCheck(t){return new fa({...this._def,checks:[...this._def.checks,t]})}email(t){return this._addCheck({kind:"email",...Ke.errToObj(t)})}url(t){return this._addCheck({kind:"url",...Ke.errToObj(t)})}emoji(t){return this._addCheck({kind:"emoji",...Ke.errToObj(t)})}uuid(t){return this._addCheck({kind:"uuid",...Ke.errToObj(t)})}nanoid(t){return this._addCheck({kind:"nanoid",...Ke.errToObj(t)})}cuid(t){return this._addCheck({kind:"cuid",...Ke.errToObj(t)})}cuid2(t){return this._addCheck({kind:"cuid2",...Ke.errToObj(t)})}ulid(t){return this._addCheck({kind:"ulid",...Ke.errToObj(t)})}base64(t){return this._addCheck({kind:"base64",...Ke.errToObj(t)})}base64url(t){return this._addCheck({kind:"base64url",...Ke.errToObj(t)})}jwt(t){return this._addCheck({kind:"jwt",...Ke.errToObj(t)})}ip(t){return this._addCheck({kind:"ip",...Ke.errToObj(t)})}cidr(t){return this._addCheck({kind:"cidr",...Ke.errToObj(t)})}datetime(t){var n,r;return typeof t=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:t}):this._addCheck({kind:"datetime",precision:typeof(t==null?void 0:t.precision)>"u"?null:t==null?void 0:t.precision,offset:(n=t==null?void 0:t.offset)!==null&&n!==void 0?n:!1,local:(r=t==null?void 0:t.local)!==null&&r!==void 0?r:!1,...Ke.errToObj(t==null?void 0:t.message)})}date(t){return this._addCheck({kind:"date",message:t})}time(t){return typeof t=="string"?this._addCheck({kind:"time",precision:null,message:t}):this._addCheck({kind:"time",precision:typeof(t==null?void 0:t.precision)>"u"?null:t==null?void 0:t.precision,...Ke.errToObj(t==null?void 0:t.message)})}duration(t){return this._addCheck({kind:"duration",...Ke.errToObj(t)})}regex(t,n){return this._addCheck({kind:"regex",regex:t,...Ke.errToObj(n)})}includes(t,n){return this._addCheck({kind:"includes",value:t,position:n==null?void 0:n.position,...Ke.errToObj(n==null?void 0:n.message)})}startsWith(t,n){return this._addCheck({kind:"startsWith",value:t,...Ke.errToObj(n)})}endsWith(t,n){return this._addCheck({kind:"endsWith",value:t,...Ke.errToObj(n)})}min(t,n){return this._addCheck({kind:"min",value:t,...Ke.errToObj(n)})}max(t,n){return this._addCheck({kind:"max",value:t,...Ke.errToObj(n)})}length(t,n){return this._addCheck({kind:"length",value:t,...Ke.errToObj(n)})}nonempty(t){return this.min(1,Ke.errToObj(t))}trim(){return new fa({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new fa({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new fa({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(t=>t.kind==="datetime")}get isDate(){return!!this._def.checks.find(t=>t.kind==="date")}get isTime(){return!!this._def.checks.find(t=>t.kind==="time")}get isDuration(){return!!this._def.checks.find(t=>t.kind==="duration")}get isEmail(){return!!this._def.checks.find(t=>t.kind==="email")}get isURL(){return!!this._def.checks.find(t=>t.kind==="url")}get isEmoji(){return!!this._def.checks.find(t=>t.kind==="emoji")}get isUUID(){return!!this._def.checks.find(t=>t.kind==="uuid")}get isNANOID(){return!!this._def.checks.find(t=>t.kind==="nanoid")}get isCUID(){return!!this._def.checks.find(t=>t.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(t=>t.kind==="cuid2")}get isULID(){return!!this._def.checks.find(t=>t.kind==="ulid")}get isIP(){return!!this._def.checks.find(t=>t.kind==="ip")}get isCIDR(){return!!this._def.checks.find(t=>t.kind==="cidr")}get isBase64(){return!!this._def.checks.find(t=>t.kind==="base64")}get isBase64url(){return!!this._def.checks.find(t=>t.kind==="base64url")}get minLength(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxLength(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value{var t;return new fa({checks:[],typeName:st.ZodString,coerce:(t=e==null?void 0:e.coerce)!==null&&t!==void 0?t:!1,...pt(e)})};function Hwe(e,t){const n=(e.toString().split(".")[1]||"").length,r=(t.toString().split(".")[1]||"").length,i=n>r?n:r,o=parseInt(e.toFixed(i).replace(".","")),a=parseInt(t.toFixed(i).replace(".",""));return o%a/Math.pow(10,i)}class sl extends _t{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(t){if(this._def.coerce&&(t.data=Number(t.data)),this._getType(t)!==ze.number){const o=this._getOrReturnCtx(t);return Ie(o,{code:we.invalid_type,expected:ze.number,received:o.parsedType}),ut}let r;const i=new Ir;for(const o of this._def.checks)o.kind==="int"?jt.isInteger(t.data)||(r=this._getOrReturnCtx(t,r),Ie(r,{code:we.invalid_type,expected:"integer",received:"float",message:o.message}),i.dirty()):o.kind==="min"?(o.inclusive?t.datao.value:t.data>=o.value)&&(r=this._getOrReturnCtx(t,r),Ie(r,{code:we.too_big,maximum:o.value,type:"number",inclusive:o.inclusive,exact:!1,message:o.message}),i.dirty()):o.kind==="multipleOf"?Hwe(t.data,o.value)!==0&&(r=this._getOrReturnCtx(t,r),Ie(r,{code:we.not_multiple_of,multipleOf:o.value,message:o.message}),i.dirty()):o.kind==="finite"?Number.isFinite(t.data)||(r=this._getOrReturnCtx(t,r),Ie(r,{code:we.not_finite,message:o.message}),i.dirty()):jt.assertNever(o);return{status:i.value,value:t.data}}gte(t,n){return this.setLimit("min",t,!0,Ke.toString(n))}gt(t,n){return this.setLimit("min",t,!1,Ke.toString(n))}lte(t,n){return this.setLimit("max",t,!0,Ke.toString(n))}lt(t,n){return this.setLimit("max",t,!1,Ke.toString(n))}setLimit(t,n,r,i){return new sl({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:r,message:Ke.toString(i)}]})}_addCheck(t){return new sl({...this._def,checks:[...this._def.checks,t]})}int(t){return this._addCheck({kind:"int",message:Ke.toString(t)})}positive(t){return this._addCheck({kind:"min",value:0,inclusive:!1,message:Ke.toString(t)})}negative(t){return this._addCheck({kind:"max",value:0,inclusive:!1,message:Ke.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:0,inclusive:!0,message:Ke.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:0,inclusive:!0,message:Ke.toString(t)})}multipleOf(t,n){return this._addCheck({kind:"multipleOf",value:t,message:Ke.toString(n)})}finite(t){return this._addCheck({kind:"finite",message:Ke.toString(t)})}safe(t){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:Ke.toString(t)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:Ke.toString(t)})}get minValue(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxValue(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.valuet.kind==="int"||t.kind==="multipleOf"&&jt.isInteger(t.value))}get isFinite(){let t=null,n=null;for(const r of this._def.checks){if(r.kind==="finite"||r.kind==="int"||r.kind==="multipleOf")return!0;r.kind==="min"?(n===null||r.value>n)&&(n=r.value):r.kind==="max"&&(t===null||r.valuenew sl({checks:[],typeName:st.ZodNumber,coerce:(e==null?void 0:e.coerce)||!1,...pt(e)});class ul extends _t{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(t){if(this._def.coerce)try{t.data=BigInt(t.data)}catch{return this._getInvalidInput(t)}if(this._getType(t)!==ze.bigint)return this._getInvalidInput(t);let r;const i=new Ir;for(const o of this._def.checks)o.kind==="min"?(o.inclusive?t.datao.value:t.data>=o.value)&&(r=this._getOrReturnCtx(t,r),Ie(r,{code:we.too_big,type:"bigint",maximum:o.value,inclusive:o.inclusive,message:o.message}),i.dirty()):o.kind==="multipleOf"?t.data%o.value!==BigInt(0)&&(r=this._getOrReturnCtx(t,r),Ie(r,{code:we.not_multiple_of,multipleOf:o.value,message:o.message}),i.dirty()):jt.assertNever(o);return{status:i.value,value:t.data}}_getInvalidInput(t){const n=this._getOrReturnCtx(t);return Ie(n,{code:we.invalid_type,expected:ze.bigint,received:n.parsedType}),ut}gte(t,n){return this.setLimit("min",t,!0,Ke.toString(n))}gt(t,n){return this.setLimit("min",t,!1,Ke.toString(n))}lte(t,n){return this.setLimit("max",t,!0,Ke.toString(n))}lt(t,n){return this.setLimit("max",t,!1,Ke.toString(n))}setLimit(t,n,r,i){return new ul({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:r,message:Ke.toString(i)}]})}_addCheck(t){return new ul({...this._def,checks:[...this._def.checks,t]})}positive(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:Ke.toString(t)})}negative(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:Ke.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:Ke.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:Ke.toString(t)})}multipleOf(t,n){return this._addCheck({kind:"multipleOf",value:t,message:Ke.toString(n)})}get minValue(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxValue(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value{var t;return new ul({checks:[],typeName:st.ZodBigInt,coerce:(t=e==null?void 0:e.coerce)!==null&&t!==void 0?t:!1,...pt(e)})};class Jv extends _t{_parse(t){if(this._def.coerce&&(t.data=!!t.data),this._getType(t)!==ze.boolean){const r=this._getOrReturnCtx(t);return Ie(r,{code:we.invalid_type,expected:ze.boolean,received:r.parsedType}),ut}return ei(t.data)}}Jv.create=e=>new Jv({typeName:st.ZodBoolean,coerce:(e==null?void 0:e.coerce)||!1,...pt(e)});class Bc extends _t{_parse(t){if(this._def.coerce&&(t.data=new Date(t.data)),this._getType(t)!==ze.date){const o=this._getOrReturnCtx(t);return Ie(o,{code:we.invalid_type,expected:ze.date,received:o.parsedType}),ut}if(isNaN(t.data.getTime())){const o=this._getOrReturnCtx(t);return Ie(o,{code:we.invalid_date}),ut}const r=new Ir;let i;for(const o of this._def.checks)o.kind==="min"?t.data.getTime()o.value&&(i=this._getOrReturnCtx(t,i),Ie(i,{code:we.too_big,message:o.message,inclusive:!0,exact:!1,maximum:o.value,type:"date"}),r.dirty()):jt.assertNever(o);return{status:r.value,value:new Date(t.data.getTime())}}_addCheck(t){return new Bc({...this._def,checks:[...this._def.checks,t]})}min(t,n){return this._addCheck({kind:"min",value:t.getTime(),message:Ke.toString(n)})}max(t,n){return this._addCheck({kind:"max",value:t.getTime(),message:Ke.toString(n)})}get minDate(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t!=null?new Date(t):null}get maxDate(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.valuenew Bc({checks:[],coerce:(e==null?void 0:e.coerce)||!1,typeName:st.ZodDate,...pt(e)});class yx extends _t{_parse(t){if(this._getType(t)!==ze.symbol){const r=this._getOrReturnCtx(t);return Ie(r,{code:we.invalid_type,expected:ze.symbol,received:r.parsedType}),ut}return ei(t.data)}}yx.create=e=>new yx({typeName:st.ZodSymbol,...pt(e)});class eg extends _t{_parse(t){if(this._getType(t)!==ze.undefined){const r=this._getOrReturnCtx(t);return Ie(r,{code:we.invalid_type,expected:ze.undefined,received:r.parsedType}),ut}return ei(t.data)}}eg.create=e=>new eg({typeName:st.ZodUndefined,...pt(e)});class tg extends _t{_parse(t){if(this._getType(t)!==ze.null){const r=this._getOrReturnCtx(t);return Ie(r,{code:we.invalid_type,expected:ze.null,received:r.parsedType}),ut}return ei(t.data)}}tg.create=e=>new tg({typeName:st.ZodNull,...pt(e)});class gh extends _t{constructor(){super(...arguments),this._any=!0}_parse(t){return ei(t.data)}}gh.create=e=>new gh({typeName:st.ZodAny,...pt(e)});class wc extends _t{constructor(){super(...arguments),this._unknown=!0}_parse(t){return ei(t.data)}}wc.create=e=>new wc({typeName:st.ZodUnknown,...pt(e)});class Us extends _t{_parse(t){const n=this._getOrReturnCtx(t);return Ie(n,{code:we.invalid_type,expected:ze.never,received:n.parsedType}),ut}}Us.create=e=>new Us({typeName:st.ZodNever,...pt(e)});class bx extends _t{_parse(t){if(this._getType(t)!==ze.undefined){const r=this._getOrReturnCtx(t);return Ie(r,{code:we.invalid_type,expected:ze.void,received:r.parsedType}),ut}return ei(t.data)}}bx.create=e=>new bx({typeName:st.ZodVoid,...pt(e)});class ma extends _t{_parse(t){const{ctx:n,status:r}=this._processInputParams(t),i=this._def;if(n.parsedType!==ze.array)return Ie(n,{code:we.invalid_type,expected:ze.array,received:n.parsedType}),ut;if(i.exactLength!==null){const a=n.data.length>i.exactLength.value,s=n.data.lengthi.maxLength.value&&(Ie(n,{code:we.too_big,maximum:i.maxLength.value,type:"array",inclusive:!0,exact:!1,message:i.maxLength.message}),r.dirty()),n.common.async)return Promise.all([...n.data].map((a,s)=>i.type._parseAsync(new Za(n,a,n.path,s)))).then(a=>Ir.mergeArray(r,a));const o=[...n.data].map((a,s)=>i.type._parseSync(new Za(n,a,n.path,s)));return Ir.mergeArray(r,o)}get element(){return this._def.type}min(t,n){return new ma({...this._def,minLength:{value:t,message:Ke.toString(n)}})}max(t,n){return new ma({...this._def,maxLength:{value:t,message:Ke.toString(n)}})}length(t,n){return new ma({...this._def,exactLength:{value:t,message:Ke.toString(n)}})}nonempty(t){return this.min(1,t)}}ma.create=(e,t)=>new ma({type:e,minLength:null,maxLength:null,exactLength:null,typeName:st.ZodArray,...pt(t)});function nd(e){if(e instanceof _n){const t={};for(const n in e.shape){const r=e.shape[n];t[n]=Va.create(nd(r))}return new _n({...e._def,shape:()=>t})}else return e instanceof ma?new ma({...e._def,type:nd(e.element)}):e instanceof Va?Va.create(nd(e.unwrap())):e instanceof cl?cl.create(nd(e.unwrap())):e instanceof Ya?Ya.create(e.items.map(t=>nd(t))):e}class _n extends _t{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;const t=this._def.shape(),n=jt.objectKeys(t);return this._cached={shape:t,keys:n}}_parse(t){if(this._getType(t)!==ze.object){const l=this._getOrReturnCtx(t);return Ie(l,{code:we.invalid_type,expected:ze.object,received:l.parsedType}),ut}const{status:r,ctx:i}=this._processInputParams(t),{shape:o,keys:a}=this._getCached(),s=[];if(!(this._def.catchall instanceof Us&&this._def.unknownKeys==="strip"))for(const l in i.data)a.includes(l)||s.push(l);const u=[];for(const l of a){const f=o[l],d=i.data[l];u.push({key:{status:"valid",value:l},value:f._parse(new Za(i,d,i.path,l)),alwaysSet:l in i.data})}if(this._def.catchall instanceof Us){const l=this._def.unknownKeys;if(l==="passthrough")for(const f of s)u.push({key:{status:"valid",value:f},value:{status:"valid",value:i.data[f]}});else if(l==="strict")s.length>0&&(Ie(i,{code:we.unrecognized_keys,keys:s}),r.dirty());else if(l!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const l=this._def.catchall;for(const f of s){const d=i.data[f];u.push({key:{status:"valid",value:f},value:l._parse(new Za(i,d,i.path,f)),alwaysSet:f in i.data})}}return i.common.async?Promise.resolve().then(async()=>{const l=[];for(const f of u){const d=await f.key,p=await f.value;l.push({key:d,value:p,alwaysSet:f.alwaysSet})}return l}).then(l=>Ir.mergeObjectSync(r,l)):Ir.mergeObjectSync(r,u)}get shape(){return this._def.shape()}strict(t){return Ke.errToObj,new _n({...this._def,unknownKeys:"strict",...t!==void 0?{errorMap:(n,r)=>{var i,o,a,s;const u=(a=(o=(i=this._def).errorMap)===null||o===void 0?void 0:o.call(i,n,r).message)!==null&&a!==void 0?a:r.defaultError;return n.code==="unrecognized_keys"?{message:(s=Ke.errToObj(t).message)!==null&&s!==void 0?s:u}:{message:u}}}:{}})}strip(){return new _n({...this._def,unknownKeys:"strip"})}passthrough(){return new _n({...this._def,unknownKeys:"passthrough"})}extend(t){return new _n({...this._def,shape:()=>({...this._def.shape(),...t})})}merge(t){return new _n({unknownKeys:t._def.unknownKeys,catchall:t._def.catchall,shape:()=>({...this._def.shape(),...t._def.shape()}),typeName:st.ZodObject})}setKey(t,n){return this.augment({[t]:n})}catchall(t){return new _n({...this._def,catchall:t})}pick(t){const n={};return jt.objectKeys(t).forEach(r=>{t[r]&&this.shape[r]&&(n[r]=this.shape[r])}),new _n({...this._def,shape:()=>n})}omit(t){const n={};return jt.objectKeys(this.shape).forEach(r=>{t[r]||(n[r]=this.shape[r])}),new _n({...this._def,shape:()=>n})}deepPartial(){return nd(this)}partial(t){const n={};return jt.objectKeys(this.shape).forEach(r=>{const i=this.shape[r];t&&!t[r]?n[r]=i:n[r]=i.optional()}),new _n({...this._def,shape:()=>n})}required(t){const n={};return jt.objectKeys(this.shape).forEach(r=>{if(t&&!t[r])n[r]=this.shape[r];else{let o=this.shape[r];for(;o instanceof Va;)o=o._def.innerType;n[r]=o}}),new _n({...this._def,shape:()=>n})}keyof(){return HG(jt.objectKeys(this.shape))}}_n.create=(e,t)=>new _n({shape:()=>e,unknownKeys:"strip",catchall:Us.create(),typeName:st.ZodObject,...pt(t)});_n.strictCreate=(e,t)=>new _n({shape:()=>e,unknownKeys:"strict",catchall:Us.create(),typeName:st.ZodObject,...pt(t)});_n.lazycreate=(e,t)=>new _n({shape:e,unknownKeys:"strip",catchall:Us.create(),typeName:st.ZodObject,...pt(t)});class ng extends _t{_parse(t){const{ctx:n}=this._processInputParams(t),r=this._def.options;function i(o){for(const s of o)if(s.result.status==="valid")return s.result;for(const s of o)if(s.result.status==="dirty")return n.common.issues.push(...s.ctx.common.issues),s.result;const a=o.map(s=>new Si(s.ctx.common.issues));return Ie(n,{code:we.invalid_union,unionErrors:a}),ut}if(n.common.async)return Promise.all(r.map(async o=>{const a={...n,common:{...n.common,issues:[]},parent:null};return{result:await o._parseAsync({data:n.data,path:n.path,parent:a}),ctx:a}})).then(i);{let o;const a=[];for(const u of r){const l={...n,common:{...n.common,issues:[]},parent:null},f=u._parseSync({data:n.data,path:n.path,parent:l});if(f.status==="valid")return f;f.status==="dirty"&&!o&&(o={result:f,ctx:l}),l.common.issues.length&&a.push(l.common.issues)}if(o)return n.common.issues.push(...o.ctx.common.issues),o.result;const s=a.map(u=>new Si(u));return Ie(n,{code:we.invalid_union,unionErrors:s}),ut}}get options(){return this._def.options}}ng.create=(e,t)=>new ng({options:e,typeName:st.ZodUnion,...pt(t)});const ms=e=>e instanceof og?ms(e.schema):e instanceof Sa?ms(e.innerType()):e instanceof ag?[e.value]:e instanceof ll?e.options:e instanceof sg?jt.objectValues(e.enum):e instanceof ug?ms(e._def.innerType):e instanceof eg?[void 0]:e instanceof tg?[null]:e instanceof Va?[void 0,...ms(e.unwrap())]:e instanceof cl?[null,...ms(e.unwrap())]:e instanceof f4||e instanceof cg?ms(e.unwrap()):e instanceof lg?ms(e._def.innerType):[];class z2 extends _t{_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==ze.object)return Ie(n,{code:we.invalid_type,expected:ze.object,received:n.parsedType}),ut;const r=this.discriminator,i=n.data[r],o=this.optionsMap.get(i);return o?n.common.async?o._parseAsync({data:n.data,path:n.path,parent:n}):o._parseSync({data:n.data,path:n.path,parent:n}):(Ie(n,{code:we.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[r]}),ut)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(t,n,r){const i=new Map;for(const o of n){const a=ms(o.shape[t]);if(!a.length)throw new Error(`A discriminator value for key \`${t}\` could not be extracted from all schema options`);for(const s of a){if(i.has(s))throw new Error(`Discriminator property ${String(t)} has duplicate value ${String(s)}`);i.set(s,o)}}return new z2({typeName:st.ZodDiscriminatedUnion,discriminator:t,options:n,optionsMap:i,...pt(r)})}}function I3(e,t){const n=_s(e),r=_s(t);if(e===t)return{valid:!0,data:e};if(n===ze.object&&r===ze.object){const i=jt.objectKeys(t),o=jt.objectKeys(e).filter(s=>i.indexOf(s)!==-1),a={...e,...t};for(const s of o){const u=I3(e[s],t[s]);if(!u.valid)return{valid:!1};a[s]=u.data}return{valid:!0,data:a}}else if(n===ze.array&&r===ze.array){if(e.length!==t.length)return{valid:!1};const i=[];for(let o=0;o{if(R3(o)||R3(a))return ut;const s=I3(o.value,a.value);return s.valid?((j3(o)||j3(a))&&n.dirty(),{status:n.value,value:s.data}):(Ie(r,{code:we.invalid_intersection_types}),ut)};return r.common.async?Promise.all([this._def.left._parseAsync({data:r.data,path:r.path,parent:r}),this._def.right._parseAsync({data:r.data,path:r.path,parent:r})]).then(([o,a])=>i(o,a)):i(this._def.left._parseSync({data:r.data,path:r.path,parent:r}),this._def.right._parseSync({data:r.data,path:r.path,parent:r}))}}rg.create=(e,t,n)=>new rg({left:e,right:t,typeName:st.ZodIntersection,...pt(n)});class Ya extends _t{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==ze.array)return Ie(r,{code:we.invalid_type,expected:ze.array,received:r.parsedType}),ut;if(r.data.lengththis._def.items.length&&(Ie(r,{code:we.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),n.dirty());const o=[...r.data].map((a,s)=>{const u=this._def.items[s]||this._def.rest;return u?u._parse(new Za(r,a,r.path,s)):null}).filter(a=>!!a);return r.common.async?Promise.all(o).then(a=>Ir.mergeArray(n,a)):Ir.mergeArray(n,o)}get items(){return this._def.items}rest(t){return new Ya({...this._def,rest:t})}}Ya.create=(e,t)=>{if(!Array.isArray(e))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new Ya({items:e,typeName:st.ZodTuple,rest:null,...pt(t)})};class ig extends _t{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==ze.object)return Ie(r,{code:we.invalid_type,expected:ze.object,received:r.parsedType}),ut;const i=[],o=this._def.keyType,a=this._def.valueType;for(const s in r.data)i.push({key:o._parse(new Za(r,s,r.path,s)),value:a._parse(new Za(r,r.data[s],r.path,s)),alwaysSet:s in r.data});return r.common.async?Ir.mergeObjectAsync(n,i):Ir.mergeObjectSync(n,i)}get element(){return this._def.valueType}static create(t,n,r){return n instanceof _t?new ig({keyType:t,valueType:n,typeName:st.ZodRecord,...pt(r)}):new ig({keyType:fa.create(),valueType:t,typeName:st.ZodRecord,...pt(n)})}}class xx extends _t{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==ze.map)return Ie(r,{code:we.invalid_type,expected:ze.map,received:r.parsedType}),ut;const i=this._def.keyType,o=this._def.valueType,a=[...r.data.entries()].map(([s,u],l)=>({key:i._parse(new Za(r,s,r.path,[l,"key"])),value:o._parse(new Za(r,u,r.path,[l,"value"]))}));if(r.common.async){const s=new Map;return Promise.resolve().then(async()=>{for(const u of a){const l=await u.key,f=await u.value;if(l.status==="aborted"||f.status==="aborted")return ut;(l.status==="dirty"||f.status==="dirty")&&n.dirty(),s.set(l.value,f.value)}return{status:n.value,value:s}})}else{const s=new Map;for(const u of a){const l=u.key,f=u.value;if(l.status==="aborted"||f.status==="aborted")return ut;(l.status==="dirty"||f.status==="dirty")&&n.dirty(),s.set(l.value,f.value)}return{status:n.value,value:s}}}}xx.create=(e,t,n)=>new xx({valueType:t,keyType:e,typeName:st.ZodMap,...pt(n)});class zc extends _t{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==ze.set)return Ie(r,{code:we.invalid_type,expected:ze.set,received:r.parsedType}),ut;const i=this._def;i.minSize!==null&&r.data.sizei.maxSize.value&&(Ie(r,{code:we.too_big,maximum:i.maxSize.value,type:"set",inclusive:!0,exact:!1,message:i.maxSize.message}),n.dirty());const o=this._def.valueType;function a(u){const l=new Set;for(const f of u){if(f.status==="aborted")return ut;f.status==="dirty"&&n.dirty(),l.add(f.value)}return{status:n.value,value:l}}const s=[...r.data.values()].map((u,l)=>o._parse(new Za(r,u,r.path,l)));return r.common.async?Promise.all(s).then(u=>a(u)):a(s)}min(t,n){return new zc({...this._def,minSize:{value:t,message:Ke.toString(n)}})}max(t,n){return new zc({...this._def,maxSize:{value:t,message:Ke.toString(n)}})}size(t,n){return this.min(t,n).max(t,n)}nonempty(t){return this.min(1,t)}}zc.create=(e,t)=>new zc({valueType:e,minSize:null,maxSize:null,typeName:st.ZodSet,...pt(t)});class Vd extends _t{constructor(){super(...arguments),this.validate=this.implement}_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==ze.function)return Ie(n,{code:we.invalid_type,expected:ze.function,received:n.parsedType}),ut;function r(s,u){return vx({data:s,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,mx(),vh].filter(l=>!!l),issueData:{code:we.invalid_arguments,argumentsError:u}})}function i(s,u){return vx({data:s,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,mx(),vh].filter(l=>!!l),issueData:{code:we.invalid_return_type,returnTypeError:u}})}const o={errorMap:n.common.contextualErrorMap},a=n.data;if(this._def.returns instanceof yh){const s=this;return ei(async function(...u){const l=new Si([]),f=await s._def.args.parseAsync(u,o).catch(m=>{throw l.addIssue(r(u,m)),l}),d=await Reflect.apply(a,this,f);return await s._def.returns._def.type.parseAsync(d,o).catch(m=>{throw l.addIssue(i(d,m)),l})})}else{const s=this;return ei(function(...u){const l=s._def.args.safeParse(u,o);if(!l.success)throw new Si([r(u,l.error)]);const f=Reflect.apply(a,this,l.data),d=s._def.returns.safeParse(f,o);if(!d.success)throw new Si([i(f,d.error)]);return d.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...t){return new Vd({...this._def,args:Ya.create(t).rest(wc.create())})}returns(t){return new Vd({...this._def,returns:t})}implement(t){return this.parse(t)}strictImplement(t){return this.parse(t)}static create(t,n,r){return new Vd({args:t||Ya.create([]).rest(wc.create()),returns:n||wc.create(),typeName:st.ZodFunction,...pt(r)})}}class og extends _t{get schema(){return this._def.getter()}_parse(t){const{ctx:n}=this._processInputParams(t);return this._def.getter()._parse({data:n.data,path:n.path,parent:n})}}og.create=(e,t)=>new og({getter:e,typeName:st.ZodLazy,...pt(t)});class ag extends _t{_parse(t){if(t.data!==this._def.value){const n=this._getOrReturnCtx(t);return Ie(n,{received:n.data,code:we.invalid_literal,expected:this._def.value}),ut}return{status:"valid",value:t.data}}get value(){return this._def.value}}ag.create=(e,t)=>new ag({value:e,typeName:st.ZodLiteral,...pt(t)});function HG(e,t){return new ll({values:e,typeName:st.ZodEnum,...pt(t)})}class ll extends _t{constructor(){super(...arguments),Bm.set(this,void 0)}_parse(t){if(typeof t.data!="string"){const n=this._getOrReturnCtx(t),r=this._def.values;return Ie(n,{expected:jt.joinValues(r),received:n.parsedType,code:we.invalid_type}),ut}if(gx(this,Bm)||zG(this,Bm,new Set(this._def.values)),!gx(this,Bm).has(t.data)){const n=this._getOrReturnCtx(t),r=this._def.values;return Ie(n,{received:n.data,code:we.invalid_enum_value,options:r}),ut}return ei(t.data)}get options(){return this._def.values}get enum(){const t={};for(const n of this._def.values)t[n]=n;return t}get Values(){const t={};for(const n of this._def.values)t[n]=n;return t}get Enum(){const t={};for(const n of this._def.values)t[n]=n;return t}extract(t,n=this._def){return ll.create(t,{...this._def,...n})}exclude(t,n=this._def){return ll.create(this.options.filter(r=>!t.includes(r)),{...this._def,...n})}}Bm=new WeakMap;ll.create=HG;class sg extends _t{constructor(){super(...arguments),zm.set(this,void 0)}_parse(t){const n=jt.getValidEnumValues(this._def.values),r=this._getOrReturnCtx(t);if(r.parsedType!==ze.string&&r.parsedType!==ze.number){const i=jt.objectValues(n);return Ie(r,{expected:jt.joinValues(i),received:r.parsedType,code:we.invalid_type}),ut}if(gx(this,zm)||zG(this,zm,new Set(jt.getValidEnumValues(this._def.values))),!gx(this,zm).has(t.data)){const i=jt.objectValues(n);return Ie(r,{received:r.data,code:we.invalid_enum_value,options:i}),ut}return ei(t.data)}get enum(){return this._def.values}}zm=new WeakMap;sg.create=(e,t)=>new sg({values:e,typeName:st.ZodNativeEnum,...pt(t)});class yh extends _t{unwrap(){return this._def.type}_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==ze.promise&&n.common.async===!1)return Ie(n,{code:we.invalid_type,expected:ze.promise,received:n.parsedType}),ut;const r=n.parsedType===ze.promise?n.data:Promise.resolve(n.data);return ei(r.then(i=>this._def.type.parseAsync(i,{path:n.path,errorMap:n.common.contextualErrorMap})))}}yh.create=(e,t)=>new yh({type:e,typeName:st.ZodPromise,...pt(t)});class Sa extends _t{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===st.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(t){const{status:n,ctx:r}=this._processInputParams(t),i=this._def.effect||null,o={addIssue:a=>{Ie(r,a),a.fatal?n.abort():n.dirty()},get path(){return r.path}};if(o.addIssue=o.addIssue.bind(o),i.type==="preprocess"){const a=i.transform(r.data,o);if(r.common.async)return Promise.resolve(a).then(async s=>{if(n.value==="aborted")return ut;const u=await this._def.schema._parseAsync({data:s,path:r.path,parent:r});return u.status==="aborted"?ut:u.status==="dirty"||n.value==="dirty"?bd(u.value):u});{if(n.value==="aborted")return ut;const s=this._def.schema._parseSync({data:a,path:r.path,parent:r});return s.status==="aborted"?ut:s.status==="dirty"||n.value==="dirty"?bd(s.value):s}}if(i.type==="refinement"){const a=s=>{const u=i.refinement(s,o);if(r.common.async)return Promise.resolve(u);if(u instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return s};if(r.common.async===!1){const s=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});return s.status==="aborted"?ut:(s.status==="dirty"&&n.dirty(),a(s.value),{status:n.value,value:s.value})}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(s=>s.status==="aborted"?ut:(s.status==="dirty"&&n.dirty(),a(s.value).then(()=>({status:n.value,value:s.value}))))}if(i.type==="transform")if(r.common.async===!1){const a=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});if(!Fc(a))return a;const s=i.transform(a.value,o);if(s instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:n.value,value:s}}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(a=>Fc(a)?Promise.resolve(i.transform(a.value,o)).then(s=>({status:n.value,value:s})):a);jt.assertNever(i)}}Sa.create=(e,t,n)=>new Sa({schema:e,typeName:st.ZodEffects,effect:t,...pt(n)});Sa.createWithPreprocess=(e,t,n)=>new Sa({schema:t,effect:{type:"preprocess",transform:e},typeName:st.ZodEffects,...pt(n)});class Va extends _t{_parse(t){return this._getType(t)===ze.undefined?ei(void 0):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}Va.create=(e,t)=>new Va({innerType:e,typeName:st.ZodOptional,...pt(t)});class cl extends _t{_parse(t){return this._getType(t)===ze.null?ei(null):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}cl.create=(e,t)=>new cl({innerType:e,typeName:st.ZodNullable,...pt(t)});class ug extends _t{_parse(t){const{ctx:n}=this._processInputParams(t);let r=n.data;return n.parsedType===ze.undefined&&(r=this._def.defaultValue()),this._def.innerType._parse({data:r,path:n.path,parent:n})}removeDefault(){return this._def.innerType}}ug.create=(e,t)=>new ug({innerType:e,typeName:st.ZodDefault,defaultValue:typeof t.default=="function"?t.default:()=>t.default,...pt(t)});class lg extends _t{_parse(t){const{ctx:n}=this._processInputParams(t),r={...n,common:{...n.common,issues:[]}},i=this._def.innerType._parse({data:r.data,path:r.path,parent:{...r}});return Qv(i)?i.then(o=>({status:"valid",value:o.status==="valid"?o.value:this._def.catchValue({get error(){return new Si(r.common.issues)},input:r.data})})):{status:"valid",value:i.status==="valid"?i.value:this._def.catchValue({get error(){return new Si(r.common.issues)},input:r.data})}}removeCatch(){return this._def.innerType}}lg.create=(e,t)=>new lg({innerType:e,typeName:st.ZodCatch,catchValue:typeof t.catch=="function"?t.catch:()=>t.catch,...pt(t)});class _x extends _t{_parse(t){if(this._getType(t)!==ze.nan){const r=this._getOrReturnCtx(t);return Ie(r,{code:we.invalid_type,expected:ze.nan,received:r.parsedType}),ut}return{status:"valid",value:t.data}}}_x.create=e=>new _x({typeName:st.ZodNaN,...pt(e)});const Gwe=Symbol("zod_brand");class f4 extends _t{_parse(t){const{ctx:n}=this._processInputParams(t),r=n.data;return this._def.type._parse({data:r,path:n.path,parent:n})}unwrap(){return this._def.type}}class w0 extends _t{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.common.async)return(async()=>{const o=await this._def.in._parseAsync({data:r.data,path:r.path,parent:r});return o.status==="aborted"?ut:o.status==="dirty"?(n.dirty(),bd(o.value)):this._def.out._parseAsync({data:o.value,path:r.path,parent:r})})();{const i=this._def.in._parseSync({data:r.data,path:r.path,parent:r});return i.status==="aborted"?ut:i.status==="dirty"?(n.dirty(),{status:"dirty",value:i.value}):this._def.out._parseSync({data:i.value,path:r.path,parent:r})}}static create(t,n){return new w0({in:t,out:n,typeName:st.ZodPipeline})}}class cg extends _t{_parse(t){const n=this._def.innerType._parse(t),r=i=>(Fc(i)&&(i.value=Object.freeze(i.value)),i);return Qv(n)?n.then(i=>r(i)):r(n)}unwrap(){return this._def.innerType}}cg.create=(e,t)=>new cg({innerType:e,typeName:st.ZodReadonly,...pt(t)});function OI(e,t){const n=typeof e=="function"?e(t):typeof e=="string"?{message:e}:e;return typeof n=="string"?{message:n}:n}function GG(e,t={},n){return e?gh.create().superRefine((r,i)=>{var o,a;const s=e(r);if(s instanceof Promise)return s.then(u=>{var l,f;if(!u){const d=OI(t,r),p=(f=(l=d.fatal)!==null&&l!==void 0?l:n)!==null&&f!==void 0?f:!0;i.addIssue({code:"custom",...d,fatal:p})}});if(!s){const u=OI(t,r),l=(a=(o=u.fatal)!==null&&o!==void 0?o:n)!==null&&a!==void 0?a:!0;i.addIssue({code:"custom",...u,fatal:l})}}):gh.create()}const qwe={object:_n.lazycreate};var st;(function(e){e.ZodString="ZodString",e.ZodNumber="ZodNumber",e.ZodNaN="ZodNaN",e.ZodBigInt="ZodBigInt",e.ZodBoolean="ZodBoolean",e.ZodDate="ZodDate",e.ZodSymbol="ZodSymbol",e.ZodUndefined="ZodUndefined",e.ZodNull="ZodNull",e.ZodAny="ZodAny",e.ZodUnknown="ZodUnknown",e.ZodNever="ZodNever",e.ZodVoid="ZodVoid",e.ZodArray="ZodArray",e.ZodObject="ZodObject",e.ZodUnion="ZodUnion",e.ZodDiscriminatedUnion="ZodDiscriminatedUnion",e.ZodIntersection="ZodIntersection",e.ZodTuple="ZodTuple",e.ZodRecord="ZodRecord",e.ZodMap="ZodMap",e.ZodSet="ZodSet",e.ZodFunction="ZodFunction",e.ZodLazy="ZodLazy",e.ZodLiteral="ZodLiteral",e.ZodEnum="ZodEnum",e.ZodEffects="ZodEffects",e.ZodNativeEnum="ZodNativeEnum",e.ZodOptional="ZodOptional",e.ZodNullable="ZodNullable",e.ZodDefault="ZodDefault",e.ZodCatch="ZodCatch",e.ZodPromise="ZodPromise",e.ZodBranded="ZodBranded",e.ZodPipeline="ZodPipeline",e.ZodReadonly="ZodReadonly"})(st||(st={}));const Kwe=(e,t={message:`Input not instance of ${e.name}`})=>GG(n=>n instanceof e,t),qG=fa.create,KG=sl.create,Zwe=_x.create,Ywe=ul.create,ZG=Jv.create,Xwe=Bc.create,Qwe=yx.create,Jwe=eg.create,eSe=tg.create,tSe=gh.create,nSe=wc.create,rSe=Us.create,iSe=bx.create,oSe=ma.create,aSe=_n.create,sSe=_n.strictCreate,uSe=ng.create,lSe=z2.create,cSe=rg.create,fSe=Ya.create,dSe=ig.create,hSe=xx.create,pSe=zc.create,mSe=Vd.create,vSe=og.create,gSe=ag.create,ySe=ll.create,bSe=sg.create,xSe=yh.create,EI=Sa.create,_Se=Va.create,wSe=cl.create,SSe=Sa.createWithPreprocess,CSe=w0.create,OSe=()=>qG().optional(),ESe=()=>KG().optional(),TSe=()=>ZG().optional(),PSe={string:e=>fa.create({...e,coerce:!0}),number:e=>sl.create({...e,coerce:!0}),boolean:e=>Jv.create({...e,coerce:!0}),bigint:e=>ul.create({...e,coerce:!0}),date:e=>Bc.create({...e,coerce:!0})},ASe=ut;var q=Object.freeze({__proto__:null,defaultErrorMap:vh,setErrorMap:Swe,getErrorMap:mx,makeIssue:vx,EMPTY_PATH:Cwe,addIssueToContext:Ie,ParseStatus:Ir,INVALID:ut,DIRTY:bd,OK:ei,isAborted:R3,isDirty:j3,isValid:Fc,isAsync:Qv,get util(){return jt},get objectUtil(){return $3},ZodParsedType:ze,getParsedType:_s,ZodType:_t,datetimeRegex:VG,ZodString:fa,ZodNumber:sl,ZodBigInt:ul,ZodBoolean:Jv,ZodDate:Bc,ZodSymbol:yx,ZodUndefined:eg,ZodNull:tg,ZodAny:gh,ZodUnknown:wc,ZodNever:Us,ZodVoid:bx,ZodArray:ma,ZodObject:_n,ZodUnion:ng,ZodDiscriminatedUnion:z2,ZodIntersection:rg,ZodTuple:Ya,ZodRecord:ig,ZodMap:xx,ZodSet:zc,ZodFunction:Vd,ZodLazy:og,ZodLiteral:ag,ZodEnum:ll,ZodNativeEnum:sg,ZodPromise:yh,ZodEffects:Sa,ZodTransformer:Sa,ZodOptional:Va,ZodNullable:cl,ZodDefault:ug,ZodCatch:lg,ZodNaN:_x,BRAND:Gwe,ZodBranded:f4,ZodPipeline:w0,ZodReadonly:cg,custom:GG,Schema:_t,ZodSchema:_t,late:qwe,get ZodFirstPartyTypeKind(){return st},coerce:PSe,any:tSe,array:oSe,bigint:Ywe,boolean:ZG,date:Xwe,discriminatedUnion:lSe,effect:EI,enum:ySe,function:mSe,instanceof:Kwe,intersection:cSe,lazy:vSe,literal:gSe,map:hSe,nan:Zwe,nativeEnum:bSe,never:rSe,null:eSe,nullable:wSe,number:KG,object:aSe,oboolean:TSe,onumber:ESe,optional:_Se,ostring:OSe,pipeline:CSe,preprocess:SSe,promise:xSe,record:dSe,set:pSe,strictObject:sSe,string:qG,symbol:Qwe,transformer:EI,tuple:fSe,undefined:Jwe,union:uSe,unknown:nSe,void:iSe,NEVER:ASe,ZodIssueCode:we,quotelessJson:wwe,ZodError:Si});const YG=e=>{const t="input"in e?e.input:"input",n="output"in e?e.output:"output",r="schema"in e?e.schema._input:e._input,i="schema"in e?e.schema._output:e._output;return{types:{input:t==="output"?i:r,output:n==="input"?r:i},parse:o=>"schema"in e?e.schema.parse(o):e.parse(o)}},N3=(e,t)=>q.custom().pipe(e.catch(t)),XG=q.enum(["mySlots","skippedSlots","text"]),Hr=XG.enum,kSe={searchType:Hr.text,searchText:""},MSe=q.object({searchType:N3(XG,Hr.text).default(Hr.text),searchText:N3(q.string(),"").default("")}),fg=f2("/leaderSchedule")({component:_we,validateSearch:YG(MSe),search:{middlewares:[Ope(kSe),Cpe(["searchType","searchText"])]}}),$Se="modulepreload",RSe=function(e){return"/"+e},TI={},jSe=function(t,n,r){let i=Promise.resolve();if(n&&n.length>0){document.getElementsByTagName("link");const a=document.querySelector("meta[property=csp-nonce]"),s=(a==null?void 0:a.nonce)||(a==null?void 0:a.getAttribute("nonce"));i=Promise.allSettled(n.map(u=>{if(u=RSe(u),u in TI)return;TI[u]=!0;const l=u.endsWith(".css"),f=l?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${u}"]${f}`))return;const d=document.createElement("link");if(d.rel=l?"stylesheet":$Se,l||(d.as="script"),d.crossOrigin="",d.href=u,s&&d.setAttribute("nonce",s),document.head.appendChild(d),l)return new Promise((p,m)=>{d.addEventListener("load",p),d.addEventListener("error",()=>m(new Error(`Unable to preload CSS for ${u}`)))})}))}function o(a){const s=new Event("vite:preloadError",{cancelable:!0});if(s.payload=a,window.dispatchEvent(s),!s.defaultPrevented)throw a}return i.then(a=>{for(const s of a||[])s.status==="rejected"&&o(s.reason);return t().catch(o)})},ISe=f2("/gossip")({component:LSe}),NSe=S.lazy(()=>jSe(()=>import("./index-DjLLGYQR.js"),__vite__mapDeps([0,1])));function LSe(){return g.jsx(S.Suspense,{children:g.jsx(NSe,{})})}const DSe=f2("/about")({component:FSe});function FSe(){return g.jsx("div",{className:"p-2",children:g.jsx("h3",{children:"About"})})}const BSe="_text_uypgs_1",zSe={text:BSe};function S0({text:e}){return g.jsx(he,{className:zSe.text,children:e})}let Po;typeof window<"u"?Po=window:typeof self<"u"?Po=self:Po=global;let L3=null,D3=null;const PI=20,ZO=Po.clearTimeout,AI=Po.setTimeout,YO=Po.cancelAnimationFrame||Po.mozCancelAnimationFrame||Po.webkitCancelAnimationFrame,kI=Po.requestAnimationFrame||Po.mozRequestAnimationFrame||Po.webkitRequestAnimationFrame;YO==null||kI==null?(L3=ZO,D3=function(t){return AI(t,PI)}):(L3=function([t,n]){YO(t),ZO(n)},D3=function(t){const n=kI(function(){ZO(r),t()}),r=AI(function(){YO(n),t()},PI);return[n,r]});function WSe(e){let t,n,r,i,o,a,s;const u=typeof document<"u"&&document.attachEvent;if(!u){a=function(x){const w=x.__resizeTriggers__,C=w.firstElementChild,E=w.lastElementChild,O=C.firstElementChild;E.scrollLeft=E.scrollWidth,E.scrollTop=E.scrollHeight,O.style.width=C.offsetWidth+1+"px",O.style.height=C.offsetHeight+1+"px",C.scrollLeft=C.scrollWidth,C.scrollTop=C.scrollHeight},o=function(x){return x.offsetWidth!==x.__resizeLast__.width||x.offsetHeight!==x.__resizeLast__.height},s=function(x){if(x.target.className&&typeof x.target.className.indexOf=="function"&&x.target.className.indexOf("contract-trigger")<0&&x.target.className.indexOf("expand-trigger")<0)return;const w=this;a(this),this.__resizeRAF__&&L3(this.__resizeRAF__),this.__resizeRAF__=D3(function(){o(w)&&(w.__resizeLast__.width=w.offsetWidth,w.__resizeLast__.height=w.offsetHeight,w.__resizeListeners__.forEach(function(O){O.call(w,x)}))})};let p=!1,m="";r="animationstart";const v="Webkit Moz O ms".split(" ");let y="webkitAnimationStart animationstart oAnimationStart MSAnimationStart".split(" "),_="";{const x=document.createElement("fakeelement");if(x.style.animationName!==void 0&&(p=!0),p===!1){for(let w=0;w div, .contract-trigger:before { content: " "; display: block; position: absolute; top: 0; left: 0; height: 100%; width: 100%; overflow: hidden; z-index: -1; } .resize-triggers > div { background: #eee; overflow: auto; } .contract-trigger:before { width: 200%; height: 200%; }',v=p.head||p.getElementsByTagName("head")[0],y=p.createElement("style");y.id="detectElementResize",y.type="text/css",e!=null&&y.setAttribute("nonce",e),y.styleSheet?y.styleSheet.cssText=m:y.appendChild(p.createTextNode(m)),v.appendChild(y)}};return{addResizeListener:function(p,m){if(u)p.attachEvent("onresize",m);else{if(!p.__resizeTriggers__){const v=p.ownerDocument,y=Po.getComputedStyle(p);y&&y.position==="static"&&(p.style.position="relative"),l(v),p.__resizeLast__={},p.__resizeListeners__=[],(p.__resizeTriggers__=v.createElement("div")).className="resize-triggers";const _=v.createElement("div");_.className="expand-trigger",_.appendChild(v.createElement("div"));const x=v.createElement("div");x.className="contract-trigger",p.__resizeTriggers__.appendChild(_),p.__resizeTriggers__.appendChild(x),p.appendChild(p.__resizeTriggers__),a(p),p.addEventListener("scroll",s,!0),r&&(p.__resizeTriggers__.__animationListener__=function(C){C.animationName===n&&a(p)},p.__resizeTriggers__.addEventListener(r,p.__resizeTriggers__.__animationListener__))}p.__resizeListeners__.push(m)}},removeResizeListener:function(p,m){if(u)p.detachEvent("onresize",m);else if(p.__resizeListeners__.splice(p.__resizeListeners__.indexOf(m),1),!p.__resizeListeners__.length){p.removeEventListener("scroll",s,!0),p.__resizeTriggers__.__animationListener__&&(p.__resizeTriggers__.removeEventListener(r,p.__resizeTriggers__.__animationListener__),p.__resizeTriggers__.__animationListener__=null);try{p.__resizeTriggers__=!p.removeChild(p.__resizeTriggers__)}catch{}}}}}class W2 extends S.Component{constructor(...t){super(...t),this.state={height:this.props.defaultHeight||0,scaledHeight:this.props.defaultHeight||0,scaledWidth:this.props.defaultWidth||0,width:this.props.defaultWidth||0},this._autoSizer=null,this._detectElementResize=null,this._parentNode=null,this._resizeObserver=null,this._timeoutId=null,this._onResize=()=>{this._timeoutId=null;const{disableHeight:n,disableWidth:r,onResize:i}=this.props;if(this._parentNode){const o=window.getComputedStyle(this._parentNode)||{},a=parseFloat(o.paddingLeft||"0"),s=parseFloat(o.paddingRight||"0"),u=parseFloat(o.paddingTop||"0"),l=parseFloat(o.paddingBottom||"0"),f=this._parentNode.getBoundingClientRect(),d=f.height-u-l,p=f.width-a-s,m=this._parentNode.offsetHeight-u-l,v=this._parentNode.offsetWidth-a-s;(!n&&(this.state.height!==m||this.state.scaledHeight!==d)||!r&&(this.state.width!==v||this.state.scaledWidth!==p))&&(this.setState({height:m,width:v,scaledHeight:d,scaledWidth:p}),typeof i=="function"&&i({height:m,scaledHeight:d,scaledWidth:p,width:v}))}},this._setRef=n=>{this._autoSizer=n}}componentDidMount(){const{nonce:t}=this.props,n=this._autoSizer?this._autoSizer.parentNode:null;if(n!=null&&n.ownerDocument&&n.ownerDocument.defaultView&&n instanceof n.ownerDocument.defaultView.HTMLElement){this._parentNode=n;const r=n.ownerDocument.defaultView.ResizeObserver;r!=null?(this._resizeObserver=new r(()=>{this._timeoutId=setTimeout(this._onResize,0)}),this._resizeObserver.observe(n)):(this._detectElementResize=WSe(t),this._detectElementResize.addResizeListener(n,this._onResize)),this._onResize()}}componentWillUnmount(){this._parentNode&&(this._detectElementResize&&this._detectElementResize.removeResizeListener(this._parentNode,this._onResize),this._timeoutId!==null&&clearTimeout(this._timeoutId),this._resizeObserver&&this._resizeObserver.disconnect())}render(){const{children:t,defaultHeight:n,defaultWidth:r,disableHeight:i=!1,disableWidth:o=!1,doNotBailOutOnEmptyChildren:a=!1,nonce:s,onResize:u,style:l={},tagName:f="div",...d}=this.props,{height:p,scaledHeight:m,scaledWidth:v,width:y}=this.state,_={overflow:"visible"},x={};let w=!1;return i||(p===0&&(w=!0),_.height=0,x.height=p,x.scaledHeight=m),o||(y===0&&(w=!0),_.width=0,x.width=y,x.scaledWidth=v),a&&(w=!1),S.createElement(f,{ref:this._setRef,style:{..._,...l},...d},!w&&t(x))}}const sb=600,QG=Zs(new Array(sb).fill(void 0)),XO=(e,t)=>e.length?"M"+e.map(({x:r,y:i})=>`L ${r} ${t-i}`).join(" ").slice(1)+`L ${e[e.length-1].x} ${t} L ${e[0].x} ${t}, L ${e[0].x} ${e[0].y}`:"";function USe(){const e=ve(QG),t=S.useRef(),n=Math.max(...e.map(i=>(i==null?void 0:i.total)??0)),r=S.useMemo(()=>{if(!t.current||!e.length)return;const{height:i,width:o}=t.current,a=e.length,s=(o+2)/a,u=(i-10)/(n||1),l=e.map((d,p)=>{if(d!==void 0)return{x:p*s,voteY:d.vote*u,nonvoteFailedY:(d.nonvote_failed+d.vote)*u,nonvoteY:(d.nonvote_success+d.nonvote_failed+d.vote)*u}}).filter(sp),f=i-n*u;return{votePath:XO(l.map(d=>({x:d.x,y:d.voteY})),i),failedPath:XO(l.map(d=>({x:d.x,y:d.nonvoteFailedY})),i),nonvotePath:XO(l.map(d=>({x:d.x,y:d.nonvoteY})),i),totalTpsY:isNaN(f)?void 0:f}},[n,e]);return g.jsx(g.Fragment,{children:g.jsx(W2,{children:({height:i,width:o})=>(t.current={height:i,width:o},r?g.jsx(g.Fragment,{children:g.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:o,height:i,fill:"none",children:[g.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:r.nonvotePath,fill:"#006851"}),g.jsx("path",{d:r.failedPath,fill:"#743F4D"}),g.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",fill:"#19307C",d:r.votePath}),r.totalTpsY&&g.jsxs(g.Fragment,{children:[g.jsx("line",{x1:"0",y1:r.totalTpsY,x2:o,y2:r.totalTpsY,strokeDasharray:"4",stroke:"rgba(255, 255, 255, 0.30)"}),g.jsx("text",{x:"0",y:r.totalTpsY-3,fill:"#8E909D",fontSize:"8",fontFamily:"Inter-Tight",children:n.toLocaleString()})]})]})}):null)})})}const VSe="_card_16ecl_1",HSe={card:VSe};function C0({children:e,hideChildren:t,style:n}){return g.jsx("div",{className:HSe.card,style:n,children:!t&&e})}const GSe="_axis-text_15j9s_1",MI={axisText:GSe},qSe="_label_oium6_1",KSe="_value_oium6_8",ZSe="_append-value_oium6_12",QO={label:qSe,value:KSe,appendValue:ZSe};function Co({label:e,value:t,valueColor:n,appendValue:r,large:i,style:o,valueStyle:a,children:s}){const u=a??(i?{fontSize:"28px",letterSpacing:"-1.12px"}:{fontSize:"18px",fontWeight:500});return g.jsxs(Oe,{direction:"column",align:"start",style:{...o},children:[g.jsx(he,{className:QO.label,children:e}),g.jsxs(Oe,{align:"baseline",gap:"1",children:[g.jsx(he,{className:QO.value,style:{color:n,...u},children:t}),r&&g.jsx(he,{className:QO.appendValue,children:r}),s]})]})}const YSe={};function XSe(){const e=ve(b5);return g.jsxs(Oe,{direction:"column",gap:"2",minWidth:"100px",className:YSe.container,children:[g.jsx(Co,{label:"Total TPS",value:(e==null?void 0:e.total.toLocaleString(void 0,{minimumFractionDigits:2,maximumFractionDigits:2}))??"-",valueColor:"#BDF3FF",large:!0}),g.jsxs(Oe,{gap:"4",wrap:"wrap",children:[g.jsx(Co,{label:"Non-vote TPS Success",value:(e==null?void 0:e.nonvote_success.toLocaleString(void 0,{minimumFractionDigits:2,maximumFractionDigits:2}))??"-",valueColor:"#67B873"}),g.jsx(Co,{label:"Non-vote TPS Fail",value:(e==null?void 0:e.nonvote_failed.toLocaleString(void 0,{minimumFractionDigits:2,maximumFractionDigits:2}))??"-",valueColor:"#E55171"}),g.jsx(Co,{label:"Vote TPS",value:(e==null?void 0:e.vote.toLocaleString(void 0,{minimumFractionDigits:2,maximumFractionDigits:2}))??"-",valueColor:"#557AE0",style:{minWidth:"90px"}})]})]})}function QSe(){return g.jsx(C0,{style:{flex:100},children:g.jsxs(Oe,{direction:"column",height:"100%",gap:"2",children:[g.jsx(S0,{text:"Transactions"}),g.jsxs(Oe,{gap:"4",flexGrow:"1",children:[g.jsx(XSe,{}),g.jsxs(Oe,{direction:"column",flexGrow:"1",children:[g.jsx(Mn,{flexGrow:"1",minWidth:"180px",children:g.jsx(USe,{})}),g.jsxs(Oe,{justify:"between",children:[g.jsx(he,{className:MI.axisText,children:"~ 1min ago"}),g.jsx(he,{className:MI.axisText,children:"Now"})]})]})]})]})})}var JSe=typeof ws=="object"&&ws&&ws.Object===Object&&ws,JG=JSe,eCe=JG,tCe=typeof self=="object"&&self&&self.Object===Object&&self,nCe=eCe||tCe||Function("return this")(),Oa=nCe,rCe=Oa,iCe=rCe.Symbol,hp=iCe,$I=hp,eq=Object.prototype,oCe=eq.hasOwnProperty,aCe=eq.toString,vm=$I?$I.toStringTag:void 0;function sCe(e){var t=oCe.call(e,vm),n=e[vm];try{e[vm]=void 0;var r=!0}catch{}var i=aCe.call(e);return r&&(t?e[vm]=n:delete e[vm]),i}var uCe=sCe,lCe=Object.prototype,cCe=lCe.toString;function fCe(e){return cCe.call(e)}var dCe=fCe,RI=hp,hCe=uCe,pCe=dCe,mCe="[object Null]",vCe="[object Undefined]",jI=RI?RI.toStringTag:void 0;function gCe(e){return e==null?e===void 0?vCe:mCe:jI&&jI in Object(e)?hCe(e):pCe(e)}var Js=gCe;function yCe(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var Ci=yCe;const pp=Et(Ci);var bCe=Js,xCe=Ci,_Ce="[object AsyncFunction]",wCe="[object Function]",SCe="[object GeneratorFunction]",CCe="[object Proxy]";function OCe(e){if(!xCe(e))return!1;var t=bCe(e);return t==wCe||t==SCe||t==_Ce||t==CCe}var U2=OCe;const gt=Et(U2);var ECe=Oa,TCe=ECe["__core-js_shared__"],PCe=TCe,JO=PCe,II=function(){var e=/[^.]+$/.exec(JO&&JO.keys&&JO.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function ACe(e){return!!II&&II in e}var kCe=ACe,MCe=Function.prototype,$Ce=MCe.toString;function RCe(e){if(e!=null){try{return $Ce.call(e)}catch{}try{return e+""}catch{}}return""}var tq=RCe,jCe=U2,ICe=kCe,NCe=Ci,LCe=tq,DCe=/[\\^$.*+?()[\]{}|]/g,FCe=/^\[object .+?Constructor\]$/,BCe=Function.prototype,zCe=Object.prototype,WCe=BCe.toString,UCe=zCe.hasOwnProperty,VCe=RegExp("^"+WCe.call(UCe).replace(DCe,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function HCe(e){if(!NCe(e)||ICe(e))return!1;var t=jCe(e)?VCe:FCe;return t.test(LCe(e))}var GCe=HCe;function qCe(e,t){return e==null?void 0:e[t]}var KCe=qCe,ZCe=GCe,YCe=KCe;function XCe(e,t){var n=YCe(e,t);return ZCe(n)?n:void 0}var of=XCe,QCe=of,JCe=QCe(Object,"create"),V2=JCe,NI=V2;function eOe(){this.__data__=NI?NI(null):{},this.size=0}var tOe=eOe;function nOe(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var rOe=nOe,iOe=V2,oOe="__lodash_hash_undefined__",aOe=Object.prototype,sOe=aOe.hasOwnProperty;function uOe(e){var t=this.__data__;if(iOe){var n=t[e];return n===oOe?void 0:n}return sOe.call(t,e)?t[e]:void 0}var lOe=uOe,cOe=V2,fOe=Object.prototype,dOe=fOe.hasOwnProperty;function hOe(e){var t=this.__data__;return cOe?t[e]!==void 0:dOe.call(t,e)}var pOe=hOe,mOe=V2,vOe="__lodash_hash_undefined__";function gOe(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=mOe&&t===void 0?vOe:t,this}var yOe=gOe,bOe=tOe,xOe=rOe,_Oe=lOe,wOe=pOe,SOe=yOe;function mp(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t-1}var BOe=FOe,zOe=H2;function WOe(e,t){var n=this.__data__,r=zOe(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this}var UOe=WOe,VOe=EOe,HOe=jOe,GOe=LOe,qOe=BOe,KOe=UOe;function vp(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t-1}var rq=WEe;function UEe(e,t,n){for(var r=-1,i=e==null?0:e.length;++r=uTe){var l=t?null:aTe(e);if(l)return sTe(l);a=!1,i=oTe,u=new nTe}else u=t?[]:s;e:for(;++r0&&d.height>0,_=Math.round(n[0]),x=Math.round(n[1]);y&&(r==="top"?(_-=d.width/2,x-=d.height+14):r==="right"?(_+=14,x-=d.height/2):r==="bottom"?(_-=d.width/2,x+=14):r==="left"?(_-=d.width+14,x-=d.height/2):r==="center"&&(_-=d.width/2,x-=d.height/2),m={transform:DI(_,x)},p.current||(v=!0),p.current=[_,x]);var w=Qs({to:m,config:u,immediate:!s||v}),C=Wc({},bTe,o.tooltip.wrapper,{transform:(t=w.transform)!=null?t:DI(_,x),opacity:w.transform?1:0});return g.jsx(Xr.div,{ref:f,style:C,children:i})});cq.displayName="TooltipWrapper";var F3=S.memo(function(e){var t=e.size,n=t===void 0?12:t,r=e.color,i=e.style;return g.jsx("span",{style:Wc({display:"block",width:n,height:n,background:r},i===void 0?{}:i)})}),g4=S.memo(function(e){var t,n=e.id,r=e.value,i=e.format,o=e.enableChip,a=o!==void 0&&o,s=e.color,u=e.renderContent,l=oi(),f=y6(i);if(typeof u=="function")t=u();else{var d=r;f!==void 0&&d!==void 0&&(d=f(d)),t=g.jsxs("div",{style:l.tooltip.basic,children:[a&&g.jsx(F3,{color:s,style:l.tooltip.chip}),d!==void 0?g.jsxs("span",{children:[n,": ",g.jsx("strong",{children:""+d})]}):n]})}return g.jsx("div",{style:l.tooltip.container,children:t})}),xTe={width:"100%",borderCollapse:"collapse"},_Te=S.memo(function(e){var t,n=e.title,r=e.rows,i=r===void 0?[]:r,o=e.renderContent,a=oi();return i.length?(t=typeof o=="function"?o():g.jsxs("div",{children:[n&&n,g.jsx("table",{style:Wc({},xTe,a.tooltip.table),children:g.jsx("tbody",{children:i.map(function(s,u){return g.jsx("tr",{children:s.map(function(l,f){return g.jsx("td",{style:a.tooltip.tableCell,children:l},f)})},u)})})})]}),g.jsx("div",{style:a.tooltip.container,children:t})):null});_Te.displayName="TableTooltip";var B3=S.memo(function(e){var t=e.x0,n=e.x1,r=e.y0,i=e.y1,o=oi(),a=xl(),s=a.animate,u=a.config,l=S.useMemo(function(){return Wc({},o.crosshair.line,{pointerEvents:"none"})},[o.crosshair.line]),f=Qs({x1:t,x2:n,y1:r,y2:i,config:u,immediate:!s});return g.jsx(Xr.line,Wc({},f,{fill:"none",style:l}))});B3.displayName="CrosshairLine";var wTe=S.memo(function(e){var t,n,r=e.width,i=e.height,o=e.type,a=e.x,s=e.y;return o==="cross"?(t={x0:a,x1:a,y0:0,y1:i},n={x0:0,x1:r,y0:s,y1:s}):o==="top-left"?(t={x0:a,x1:a,y0:0,y1:s},n={x0:0,x1:a,y0:s,y1:s}):o==="top"?t={x0:a,x1:a,y0:0,y1:s}:o==="top-right"?(t={x0:a,x1:a,y0:0,y1:s},n={x0:a,x1:r,y0:s,y1:s}):o==="right"?n={x0:a,x1:r,y0:s,y1:s}:o==="bottom-right"?(t={x0:a,x1:a,y0:s,y1:i},n={x0:a,x1:r,y0:s,y1:s}):o==="bottom"?t={x0:a,x1:a,y0:s,y1:i}:o==="bottom-left"?(t={x0:a,x1:a,y0:s,y1:i},n={x0:0,x1:a,y0:s,y1:s}):o==="left"?n={x0:0,x1:a,y0:s,y1:s}:o==="x"?t={x0:a,x1:a,y0:0,y1:i}:o==="y"&&(n={x0:0,x1:r,y0:s,y1:s}),g.jsxs(g.Fragment,{children:[t&&g.jsx(B3,{x0:t.x0,x1:t.x1,y0:t.y0,y1:t.y1}),n&&g.jsx(B3,{x0:n.x0,x1:n.x1,y0:n.y0,y1:n.y1})]})});wTe.displayName="Crosshair";var fq=S.createContext({showTooltipAt:function(){},showTooltipFromEvent:function(){},hideTooltip:function(){}}),z3={isVisible:!1,position:[null,null],content:null,anchor:null},dq=S.createContext(z3),STe=function(e){var t=S.useState(z3),n=t[0],r=t[1],i=S.useCallback(function(s,u,l){var f=u[0],d=u[1];l===void 0&&(l="top"),r({isVisible:!0,position:[f,d],anchor:l,content:s})},[r]),o=S.useCallback(function(s,u,l){l===void 0&&(l="top");var f=e.current.getBoundingClientRect(),d=e.current.offsetWidth,p=d===f.width?1:d/f.width,m="touches"in u?u.touches[0]:u,v=m.clientX,y=m.clientY,_=(v-f.left)*p,x=(y-f.top)*p;l!=="left"&&l!=="right"||(l=_-1&&e%1==0&&e<=j3e}var w4=I3e,N3e=U2,L3e=w4;function D3e(e){return e!=null&&L3e(e.length)&&!N3e(e)}var af=D3e,F3e=af,B3e=Io;function z3e(e){return B3e(e)&&F3e(e)}var Sq=z3e,Cx={exports:{}};function W3e(){return!1}var U3e=W3e;Cx.exports;(function(e,t){var n=Oa,r=U3e,i=t&&!t.nodeType&&t,o=i&&!0&&e&&!e.nodeType&&e,a=o&&o.exports===i,s=a?n.Buffer:void 0,u=s?s.isBuffer:void 0,l=u||r;e.exports=l})(Cx,Cx.exports);var X2=Cx.exports,V3e=Js,H3e=x4,G3e=Io,q3e="[object Object]",K3e=Function.prototype,Z3e=Object.prototype,Cq=K3e.toString,Y3e=Z3e.hasOwnProperty,X3e=Cq.call(Object);function Q3e(e){if(!G3e(e)||V3e(e)!=q3e)return!1;var t=H3e(e);if(t===null)return!0;var n=Y3e.call(t,"constructor")&&t.constructor;return typeof n=="function"&&n instanceof n&&Cq.call(n)==X3e}var Oq=Q3e;const Q2=Et(Oq);var J3e=Js,ePe=w4,tPe=Io,nPe="[object Arguments]",rPe="[object Array]",iPe="[object Boolean]",oPe="[object Date]",aPe="[object Error]",sPe="[object Function]",uPe="[object Map]",lPe="[object Number]",cPe="[object Object]",fPe="[object RegExp]",dPe="[object Set]",hPe="[object String]",pPe="[object WeakMap]",mPe="[object ArrayBuffer]",vPe="[object DataView]",gPe="[object Float32Array]",yPe="[object Float64Array]",bPe="[object Int8Array]",xPe="[object Int16Array]",_Pe="[object Int32Array]",wPe="[object Uint8Array]",SPe="[object Uint8ClampedArray]",CPe="[object Uint16Array]",OPe="[object Uint32Array]",fn={};fn[gPe]=fn[yPe]=fn[bPe]=fn[xPe]=fn[_Pe]=fn[wPe]=fn[SPe]=fn[CPe]=fn[OPe]=!0;fn[nPe]=fn[rPe]=fn[mPe]=fn[iPe]=fn[vPe]=fn[oPe]=fn[aPe]=fn[sPe]=fn[uPe]=fn[lPe]=fn[cPe]=fn[fPe]=fn[dPe]=fn[hPe]=fn[pPe]=!1;function EPe(e){return tPe(e)&&ePe(e.length)&&!!fn[J3e(e)]}var TPe=EPe;function PPe(e){return function(t){return e(t)}}var E0=PPe,Ox={exports:{}};Ox.exports;(function(e,t){var n=JG,r=t&&!t.nodeType&&t,i=r&&!0&&e&&!e.nodeType&&e,o=i&&i.exports===r,a=o&&n.process,s=function(){try{var u=i&&i.require&&i.require("util").types;return u||a&&a.binding&&a.binding("util")}catch{}}();e.exports=s})(Ox,Ox.exports);var S4=Ox.exports,APe=TPe,kPe=E0,UI=S4,VI=UI&&UI.isTypedArray,MPe=VI?kPe(VI):APe,C4=MPe;function $Pe(e,t){if(!(t==="constructor"&&typeof e[t]=="function")&&t!="__proto__")return e[t]}var Eq=$Pe,RPe=Z2,jPe=O0,IPe=Object.prototype,NPe=IPe.hasOwnProperty;function LPe(e,t,n){var r=e[t];(!(NPe.call(e,t)&&jPe(r,n))||n===void 0&&!(t in e))&&RPe(e,t,n)}var O4=LPe,DPe=O4,FPe=Z2;function BPe(e,t,n,r){var i=!n;n||(n={});for(var o=-1,a=t.length;++o-1&&e%1==0&&e0){if(++t>=YAe)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}var eke=JAe,tke=ZAe,nke=eke,rke=nke(tke),kq=rke,ike=bp,oke=Aq,ake=kq;function ske(e,t){return ake(oke(e,t,ike),e+"")}var E4=ske,uke=O0,lke=af,cke=J2,fke=Ci;function dke(e,t,n){if(!fke(n))return!1;var r=typeof t;return(r=="number"?lke(n)&&cke(t,n.length):r=="string"&&t in n)?uke(n[t],e):!1}var A0=dke,hke=E4,pke=A0;function mke(e){return hke(function(t,n){var r=-1,i=n.length,o=i>1?n[i-1]:void 0,a=i>2?n[2]:void 0;for(o=e.length>3&&typeof o=="function"?(i--,o):void 0,a&&pke(n[0],n[1],a)&&(o=i<3?void 0:o,i=1),t=Object(t);++r>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):n===8?p1(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):n===4?p1(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|t&240,((t&15)<<4|t&15)/255):null):(t=v5e.exec(e))?new Rr(t[1],t[2],t[3],1):(t=g5e.exec(e))?new Rr(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=y5e.exec(e))?p1(t[1],t[2],t[3],t[4]):(t=b5e.exec(e))?p1(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=x5e.exec(e))?sN(t[1],t[2]/100,t[3]/100,1):(t=_5e.exec(e))?sN(t[1],t[2]/100,t[3]/100,t[4]):tN.hasOwnProperty(e)?iN(tN[e]):e==="transparent"?new Rr(NaN,NaN,NaN,0):null}function iN(e){return new Rr(e>>16&255,e>>8&255,e&255,1)}function p1(e,t,n,r){return r<=0&&(e=t=n=NaN),new Rr(e,t,n,r)}function Lq(e){return e instanceof _p||(e=hg(e)),e?(e=e.rgb(),new Rr(e.r,e.g,e.b,e.opacity)):new Rr}function xh(e,t,n,r){return arguments.length===1?Lq(e):new Rr(e,t,n,r??1)}function Rr(e,t,n,r){this.r=+e,this.g=+t,this.b=+n,this.opacity=+r}rw(Rr,xh,A4(_p,{brighter(e){return e=e==null?bh:Math.pow(bh,e),new Rr(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?Uc:Math.pow(Uc,e),new Rr(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new Rr(Sc(this.r),Sc(this.g),Sc(this.b),Ex(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:oN,formatHex:oN,formatHex8:C5e,formatRgb:aN,toString:aN}));function oN(){return`#${hc(this.r)}${hc(this.g)}${hc(this.b)}`}function C5e(){return`#${hc(this.r)}${hc(this.g)}${hc(this.b)}${hc((isNaN(this.opacity)?1:this.opacity)*255)}`}function aN(){const e=Ex(this.opacity);return`${e===1?"rgb(":"rgba("}${Sc(this.r)}, ${Sc(this.g)}, ${Sc(this.b)}${e===1?")":`, ${e})`}`}function Ex(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function Sc(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function hc(e){return e=Sc(e),(e<16?"0":"")+e.toString(16)}function sN(e,t,n,r){return r<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new ua(e,t,n,r)}function Dq(e){if(e instanceof ua)return new ua(e.h,e.s,e.l,e.opacity);if(e instanceof _p||(e=hg(e)),!e)return new ua;if(e instanceof ua)return e;e=e.rgb();var t=e.r/255,n=e.g/255,r=e.b/255,i=Math.min(t,n,r),o=Math.max(t,n,r),a=NaN,s=o-i,u=(o+i)/2;return s?(t===o?a=(n-r)/s+(n0&&u<1?0:a,new ua(a,s,u,e.opacity)}function O5e(e,t,n,r){return arguments.length===1?Dq(e):new ua(e,t,n,r??1)}function ua(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}rw(ua,O5e,A4(_p,{brighter(e){return e=e==null?bh:Math.pow(bh,e),new ua(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?Uc:Math.pow(Uc,e),new ua(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+(this.h<0)*360,t=isNaN(e)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*t,i=2*n-r;return new Rr(tE(e>=240?e-240:e+120,i,r),tE(e,i,r),tE(e<120?e+240:e-120,i,r),this.opacity)},clamp(){return new ua(uN(this.h),m1(this.s),m1(this.l),Ex(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const e=Ex(this.opacity);return`${e===1?"hsl(":"hsla("}${uN(this.h)}, ${m1(this.s)*100}%, ${m1(this.l)*100}%${e===1?")":`, ${e})`}`}}));function uN(e){return e=(e||0)%360,e<0?e+360:e}function m1(e){return Math.max(0,Math.min(1,e||0))}function tE(e,t,n){return(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)*255}const E5e=Math.PI/180,T5e=180/Math.PI;var Fq=-.14861,k4=1.78277,M4=-.29227,iw=-.90649,pg=1.97294,lN=pg*iw,cN=pg*k4,fN=k4*M4-iw*Fq;function P5e(e){if(e instanceof Cc)return new Cc(e.h,e.s,e.l,e.opacity);e instanceof Rr||(e=Lq(e));var t=e.r/255,n=e.g/255,r=e.b/255,i=(fN*r+lN*t-cN*n)/(fN+lN-cN),o=r-i,a=(pg*(n-i)-M4*o)/iw,s=Math.sqrt(a*a+o*o)/(pg*i*(1-i)),u=s?Math.atan2(a,o)*T5e-120:NaN;return new Cc(u<0?u+360:u,s,i,e.opacity)}function Xa(e,t,n,r){return arguments.length===1?P5e(e):new Cc(e,t,n,r??1)}function Cc(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}rw(Cc,Xa,A4(_p,{brighter(e){return e=e==null?bh:Math.pow(bh,e),new Cc(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?Uc:Math.pow(Uc,e),new Cc(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=isNaN(this.h)?0:(this.h+120)*E5e,t=+this.l,n=isNaN(this.s)?0:this.s*t*(1-t),r=Math.cos(e),i=Math.sin(e);return new Rr(255*(t+n*(Fq*r+k4*i)),255*(t+n*(M4*r+iw*i)),255*(t+n*(pg*r)),this.opacity)}}));function A5e(e,t,n,r,i){var o=e*e,a=o*e;return((1-3*e+3*o-a)*t+(4-6*o+3*a)*n+(1+3*e+3*o-3*a)*r+a*i)/6}function k5e(e){var t=e.length-1;return function(n){var r=n<=0?n=0:n>=1?(n=1,t-1):Math.floor(n*t),i=e[r],o=e[r+1],a=r>0?e[r-1]:2*i-o,s=r()=>e;function Bq(e,t){return function(n){return e+n*t}}function M5e(e,t,n){return e=Math.pow(e,n),t=Math.pow(t,n)-e,n=1/n,function(r){return Math.pow(e+r*t,n)}}function $5e(e,t){var n=t-e;return n?Bq(e,n>180||n<-180?n-360*Math.round(n/360):n):ow(isNaN(e)?t:e)}function R5e(e){return(e=+e)==1?Gd:function(t,n){return n-t?M5e(t,n,e):ow(isNaN(t)?n:t)}}function Gd(e,t){var n=t-e;return n?Bq(e,n):ow(isNaN(e)?t:e)}const dN=function e(t){var n=R5e(t);function r(i,o){var a=n((i=xh(i)).r,(o=xh(o)).r),s=n(i.g,o.g),u=n(i.b,o.b),l=Gd(i.opacity,o.opacity);return function(f){return i.r=a(f),i.g=s(f),i.b=u(f),i.opacity=l(f),i+""}}return r.gamma=e,r}(1);function j5e(e){return function(t){var n=t.length,r=new Array(n),i=new Array(n),o=new Array(n),a,s;for(a=0;an&&(o=t.slice(n,o),s[a]?s[a]+=o:s[++a]=o),(r=r[0])===(i=i[0])?s[a]?s[a]+=i:s[++a]=i:(s[++a]=null,u.push({i:a,x:Tx(r,i)})),n=nE.lastIndex;return nt?1:e>=t?0:NaN}function Q5e(e,t){return e==null||t==null?NaN:te?1:t>=e?0:NaN}function j4(e){let t,n,r;e.length!==2?(t=Xu,n=(s,u)=>Xu(e(s),u),r=(s,u)=>e(s)-u):(t=e===Xu||e===Q5e?e:J5e,n=e,r=e);function i(s,u,l=0,f=s.length){if(l>>1;n(s[d],u)<0?l=d+1:f=d}while(l>>1;n(s[d],u)<=0?l=d+1:f=d}while(ll&&r(s[d-1],u)>-r(s[d],u)?d-1:d}return{left:i,center:a,right:o}}function J5e(){return 0}function Uq(e){return e===null?NaN:+e}function*e4e(e,t){for(let n of e)n!=null&&(n=+n)>=n&&(yield n)}const t4e=j4(Xu),M0=t4e.right;j4(Uq).center;class hN extends Map{constructor(t,n=i4e){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:n}}),t!=null)for(const[r,i]of t)this.set(r,i)}get(t){return super.get(pN(this,t))}has(t){return super.has(pN(this,t))}set(t,n){return super.set(n4e(this,t),n)}delete(t){return super.delete(r4e(this,t))}}function pN({_intern:e,_key:t},n){const r=t(n);return e.has(r)?e.get(r):n}function n4e({_intern:e,_key:t},n){const r=t(n);return e.has(r)?e.get(r):(e.set(r,n),n)}function r4e({_intern:e,_key:t},n){const r=t(n);return e.has(r)&&(n=e.get(r),e.delete(r)),n}function i4e(e){return e!==null&&typeof e=="object"?e.valueOf():e}function o4e(e=Xu){if(e===Xu)return Vq;if(typeof e!="function")throw new TypeError("compare is not a function");return(t,n)=>{const r=e(t,n);return r||r===0?r:(e(n,n)===0)-(e(t,t)===0)}}function Vq(e,t){return(e==null||!(e>=e))-(t==null||!(t>=t))||(et?1:0)}const a4e=Math.sqrt(50),s4e=Math.sqrt(10),u4e=Math.sqrt(2);function Px(e,t,n){const r=(t-e)/Math.max(0,n),i=Math.floor(Math.log10(r)),o=r/Math.pow(10,i),a=o>=a4e?10:o>=s4e?5:o>=u4e?2:1;let s,u,l;return i<0?(l=Math.pow(10,-i)/a,s=Math.round(e*l),u=Math.round(t*l),s/lt&&--u,l=-l):(l=Math.pow(10,i)*a,s=Math.round(e/l),u=Math.round(t/l),s*lt&&--u),u0))return[];if(e===t)return[e];const r=t=i))return[];const s=o-i+1,u=new Array(s);if(r)if(a<0)for(let l=0;l=r)&&(n=r);else{let r=-1;for(let i of e)(i=t(i,++r,e))!=null&&(n=i)&&(n=i)}return n}function kx(e,t){let n;if(t===void 0)for(const r of e)r!=null&&(n>r||n===void 0&&r>=r)&&(n=r);else{let r=-1;for(let i of e)(i=t(i,++r,e))!=null&&(n>i||n===void 0&&i>=i)&&(n=i)}return n}function Hq(e,t,n=0,r=1/0,i){if(t=Math.floor(t),n=Math.floor(Math.max(0,n)),r=Math.floor(Math.min(e.length-1,r)),!(n<=t&&t<=r))return e;for(i=i===void 0?Vq:o4e(i);r>n;){if(r-n>600){const u=r-n+1,l=t-n+1,f=Math.log(u),d=.5*Math.exp(2*f/3),p=.5*Math.sqrt(f*d*(u-d)/u)*(l-u/2<0?-1:1),m=Math.max(n,Math.floor(t-l*d/u+p)),v=Math.min(r,Math.floor(t+(u-l)*d/u+p));Hq(e,t,m,v,i)}const o=e[t];let a=n,s=r;for(gm(e,n,t),i(e[r],o)>0&&gm(e,n,r);a0;)--s}i(e[n],o)===0?gm(e,n,s):(++s,gm(e,s,r)),s<=t&&(n=s+1),t<=s&&(r=s-1)}return e}function gm(e,t,n){const r=e[t];e[t]=e[n],e[n]=r}function l4e(e,t,n){if(e=Float64Array.from(e4e(e)),!(!(r=e.length)||isNaN(t=+t))){if(t<=0||r<2)return kx(e);if(t>=1)return Ax(e);var r,i=(r-1)*t,o=Math.floor(i),a=Ax(Hq(e,o).subarray(0,o+1)),s=kx(e.subarray(o+1));return a+(s-a)*(i-o)}}function c4e(e,t,n=Uq){if(!(!(r=e.length)||isNaN(t=+t))){if(t<=0||r<2)return+n(e[0],0,e);if(t>=1)return+n(e[r-1],r-1,e);var r,i=(r-1)*t,o=Math.floor(i),a=+n(e[o],o,e),s=+n(e[o+1],o+1,e);return a+(s-a)*(i-o)}}function f4e(e,t,n){e=+e,t=+t,n=(i=arguments.length)<2?(t=e,e=0,1):i<3?1:+n;for(var r=-1,i=Math.max(0,Math.ceil((t-e)/n))|0,o=new Array(i);++rt&&(n=e,e=t,t=n),function(r){return Math.max(e,Math.min(t,r))}}function p4e(e,t,n){var r=e[0],i=e[1],o=t[0],a=t[1];return i2?m4e:p4e,u=l=null,d}function d(p){return p==null||isNaN(p=+p)?o:(u||(u=s(e.map(r),t,n)))(r(a(p)))}return d.invert=function(p){return a(i((l||(l=s(t,e.map(r),Tx)))(p)))},d.domain=function(p){return arguments.length?(e=Array.from(p,Mx),f()):e.slice()},d.range=function(p){return arguments.length?(t=Array.from(p),f()):t.slice()},d.rangeRound=function(p){return t=Array.from(p),n=$4,f()},d.clamp=function(p){return arguments.length?(a=p?!0:Kr,f()):a!==Kr},d.interpolate=function(p){return arguments.length?(n=p,f()):n},d.unknown=function(p){return arguments.length?(o=p,d):o},function(p,m){return r=p,i=m,f()}}function I4(){return aw()(Kr,Kr)}function v4e(e){return Math.abs(e=Math.round(e))>=1e21?e.toLocaleString("en").replace(/,/g,""):e.toString(10)}function $x(e,t){if((n=(e=t?e.toExponential(t-1):e.toExponential()).indexOf("e"))<0)return null;var n,r=e.slice(0,n);return[r.length>1?r[0]+r.slice(2):r,+e.slice(n+1)]}function _h(e){return e=$x(Math.abs(e)),e?e[1]:NaN}function g4e(e,t){return function(n,r){for(var i=n.length,o=[],a=0,s=e[0],u=0;i>0&&s>0&&(u+s+1>r&&(s=Math.max(1,r-u)),o.push(n.substring(i-=s,i+s)),!((u+=s+1)>r));)s=e[a=(a+1)%e.length];return o.reverse().join(t)}}function y4e(e){return function(t){return t.replace(/[0-9]/g,function(n){return e[+n]})}}var b4e=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function vg(e){if(!(t=b4e.exec(e)))throw new Error("invalid format: "+e);var t;return new N4({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]})}vg.prototype=N4.prototype;function N4(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+""}N4.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 x4e(e){e:for(var t=e.length,n=1,r=-1,i;n0&&(r=0);break}return r>0?e.slice(0,r)+e.slice(i+1):e}var qq;function _4e(e,t){var n=$x(e,t);if(!n)return e+"";var r=n[0],i=n[1],o=i-(qq=Math.max(-8,Math.min(8,Math.floor(i/3)))*3)+1,a=r.length;return o===a?r:o>a?r+new Array(o-a+1).join("0"):o>0?r.slice(0,o)+"."+r.slice(o):"0."+new Array(1-o).join("0")+$x(e,Math.max(0,t+o-1))[0]}function vN(e,t){var n=$x(e,t);if(!n)return e+"";var r=n[0],i=n[1];return i<0?"0."+new Array(-i).join("0")+r:r.length>i+1?r.slice(0,i+1)+"."+r.slice(i+1):r+new Array(i-r.length+2).join("0")}const gN={"%":function(e,t){return(e*100).toFixed(t)},b:function(e){return Math.round(e).toString(2)},c:function(e){return e+""},d:v4e,e:function(e,t){return e.toExponential(t)},f:function(e,t){return e.toFixed(t)},g:function(e,t){return e.toPrecision(t)},o:function(e){return Math.round(e).toString(8)},p:function(e,t){return vN(e*100,t)},r:vN,s:_4e,X:function(e){return Math.round(e).toString(16).toUpperCase()},x:function(e){return Math.round(e).toString(16)}};function yN(e){return e}var bN=Array.prototype.map,xN=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function w4e(e){var t=e.grouping===void 0||e.thousands===void 0?yN:g4e(bN.call(e.grouping,Number),e.thousands+""),n=e.currency===void 0?"":e.currency[0]+"",r=e.currency===void 0?"":e.currency[1]+"",i=e.decimal+"",o=e.numerals===void 0?yN:y4e(bN.call(e.numerals,String)),a=e.percent===void 0?"%":e.percent+"",s=e.minus+"",u=e.nan===void 0?"NaN":e.nan+"";function l(d){d=vg(d);var p=d.fill,m=d.align,v=d.sign,y=d.symbol,_=d.zero,x=d.width,w=d.comma,C=d.precision,E=d.trim,O=d.type;O==="n"?(w=!0,O="g"):gN[O]||(C===void 0&&(C=12),E=!0,O="g"),(_||p==="0"&&m==="=")&&(_=!0,p="0",m="=");var T=y==="$"?n:y==="#"&&/[boxX]/.test(O)?"0"+O.toLowerCase():"",A=y==="$"?r:/[%p]/.test(O)?a:"",k=gN[O],M=/[defgprs%]/.test(O);C=C===void 0?6:/[gprs]/.test(O)?Math.max(1,Math.min(21,C)):Math.max(0,Math.min(20,C));function $(j){var N=T,U=A,B,G,D;if(O==="c")U=k(j)+U,j="";else{j=+j;var H=j<0||1/j<0;if(j=isNaN(j)?u:k(Math.abs(j),C),E&&(j=x4e(j)),H&&+j==0&&v!=="+"&&(H=!1),N=(H?v==="("?v:s:v==="-"||v==="("?"":v)+N,U=(O==="s"?xN[8+qq/3]:"")+U+(H&&v==="("?")":""),M){for(B=-1,G=j.length;++BD||D>57){U=(D===46?i+j.slice(B+1):j.slice(B))+U,j=j.slice(0,B);break}}}w&&!_&&(j=t(j,1/0));var F=N.length+j.length+U.length,W=F>1)+N+j+U+W.slice(F);break;default:j=W+N+j+U;break}return o(j)}return $.toString=function(){return d+""},$}function f(d,p){var m=l((d=vg(d),d.type="f",d)),v=Math.max(-8,Math.min(8,Math.floor(_h(p)/3)))*3,y=Math.pow(10,-v),_=xN[8+v/3];return function(x){return m(y*x)+_}}return{format:l,formatPrefix:f}}var v1,sw,Kq;S4e({decimal:".",thousands:",",grouping:[3],currency:["$",""],minus:"-"});function S4e(e){return v1=w4e(e),sw=v1.format,Kq=v1.formatPrefix,v1}function C4e(e){return Math.max(0,-_h(Math.abs(e)))}function O4e(e,t){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(_h(t)/3)))*3-_h(Math.abs(e)))}function E4e(e,t){return e=Math.abs(e),t=Math.abs(t)-e,Math.max(0,_h(t)-_h(e))+1}function Zq(e,t,n,r){var i=H3(e,t,n),o;switch(r=vg(r??",f"),r.type){case"s":{var a=Math.max(Math.abs(e),Math.abs(t));return r.precision==null&&!isNaN(o=O4e(i,a))&&(r.precision=o),Kq(r,a)}case"":case"e":case"g":case"p":case"r":{r.precision==null&&!isNaN(o=E4e(i,Math.max(Math.abs(e),Math.abs(t))))&&(r.precision=o-(r.type==="e"));break}case"f":case"%":{r.precision==null&&!isNaN(o=C4e(i))&&(r.precision=o-(r.type==="%")*2);break}}return sw(r)}function yl(e){var t=e.domain;return e.ticks=function(n){var r=t();return U3(r[0],r[r.length-1],n??10)},e.tickFormat=function(n,r){var i=t();return Zq(i[0],i[i.length-1],n??10,r)},e.nice=function(n){n==null&&(n=10);var r=t(),i=0,o=r.length-1,a=r[i],s=r[o],u,l,f=10;for(s0;){if(l=V3(a,s,n),l===u)return r[i]=a,r[o]=s,t(r);if(l>0)a=Math.floor(a/l)*l,s=Math.ceil(s/l)*l;else if(l<0)a=Math.ceil(a*l)/l,s=Math.floor(s*l)/l;else break;u=l}return e},e}function Rx(){var e=I4();return e.copy=function(){return $0(e,Rx())},No.apply(e,arguments),yl(e)}function Yq(e){var t;function n(r){return r==null||isNaN(r=+r)?t:r}return n.invert=n,n.domain=n.range=function(r){return arguments.length?(e=Array.from(r,Mx),n):e.slice()},n.unknown=function(r){return arguments.length?(t=r,n):t},n.copy=function(){return Yq(e).unknown(t)},e=arguments.length?Array.from(e,Mx):[0,1],yl(n)}function Xq(e,t){e=e.slice();var n=0,r=e.length-1,i=e[n],o=e[r],a;return oMath.pow(e,t)}function M4e(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 SN(e){return(t,n)=>-e(-t,n)}function L4(e){const t=e(_N,wN),n=t.domain;let r=10,i,o;function a(){return i=M4e(r),o=k4e(r),n()[0]<0?(i=SN(i),o=SN(o),e(T4e,P4e)):e(_N,wN),t}return t.base=function(s){return arguments.length?(r=+s,a()):r},t.domain=function(s){return arguments.length?(n(s),a()):n()},t.ticks=s=>{const u=n();let l=u[0],f=u[u.length-1];const d=f0){for(;p<=m;++p)for(v=1;vf)break;x.push(y)}}else for(;p<=m;++p)for(v=r-1;v>=1;--v)if(y=p>0?v/o(-p):v*o(p),!(yf)break;x.push(y)}x.length*2<_&&(x=U3(l,f,_))}else x=U3(p,m,Math.min(m-p,_)).map(o);return d?x.reverse():x},t.tickFormat=(s,u)=>{if(s==null&&(s=10),u==null&&(u=r===10?"s":","),typeof u!="function"&&(!(r%1)&&(u=vg(u)).precision==null&&(u.trim=!0),u=sw(u)),s===1/0)return u;const l=Math.max(1,r*s/t.ticks().length);return f=>{let d=f/o(Math.round(i(f)));return d*rn(Xq(n(),{floor:s=>o(Math.floor(i(s))),ceil:s=>o(Math.ceil(i(s)))})),t}function Qq(){const e=L4(aw()).domain([1,10]);return e.copy=()=>$0(e,Qq()).base(e.base()),No.apply(e,arguments),e}function CN(e){return function(t){return Math.sign(t)*Math.log1p(Math.abs(t/e))}}function ON(e){return function(t){return Math.sign(t)*Math.expm1(Math.abs(t))*e}}function D4(e){var t=1,n=e(CN(t),ON(t));return n.constant=function(r){return arguments.length?e(CN(t=+r),ON(t)):t},yl(n)}function Jq(){var e=D4(aw());return e.copy=function(){return $0(e,Jq()).constant(e.constant())},No.apply(e,arguments)}function EN(e){return function(t){return t<0?-Math.pow(-t,e):Math.pow(t,e)}}function $4e(e){return e<0?-Math.sqrt(-e):Math.sqrt(e)}function R4e(e){return e<0?-e*e:e*e}function F4(e){var t=e(Kr,Kr),n=1;function r(){return n===1?e(Kr,Kr):n===.5?e($4e,R4e):e(EN(n),EN(1/n))}return t.exponent=function(i){return arguments.length?(n=+i,r()):n},yl(t)}function B4(){var e=F4(aw());return e.copy=function(){return $0(e,B4()).exponent(e.exponent())},No.apply(e,arguments),e}function j4e(){return B4.apply(null,arguments).exponent(.5)}function TN(e){return Math.sign(e)*e*e}function I4e(e){return Math.sign(e)*Math.sqrt(Math.abs(e))}function eK(){var e=I4(),t=[0,1],n=!1,r;function i(o){var a=I4e(e(o));return isNaN(a)?r:n?Math.round(a):a}return i.invert=function(o){return e.invert(TN(o))},i.domain=function(o){return arguments.length?(e.domain(o),i):e.domain()},i.range=function(o){return arguments.length?(e.range((t=Array.from(o,Mx)).map(TN)),i):t.slice()},i.rangeRound=function(o){return i.range(o).round(!0)},i.round=function(o){return arguments.length?(n=!!o,i):n},i.clamp=function(o){return arguments.length?(e.clamp(o),i):e.clamp()},i.unknown=function(o){return arguments.length?(r=o,i):r},i.copy=function(){return eK(e.domain(),t).round(n).clamp(e.clamp()).unknown(r)},No.apply(i,arguments),yl(i)}function tK(){var e=[],t=[],n=[],r;function i(){var a=0,s=Math.max(1,t.length);for(n=new Array(s-1);++a0?n[s-1]:e[0],s=n?[r[n-1],t]:[r[l-1],r[l]]},a.unknown=function(u){return arguments.length&&(o=u),a},a.thresholds=function(){return r.slice()},a.copy=function(){return nK().domain([e,t]).range(i).unknown(o)},No.apply(yl(a),arguments)}function rK(){var e=[.5],t=[0,1],n,r=1;function i(o){return o!=null&&o<=o?t[M0(e,o,0,r)]:n}return i.domain=function(o){return arguments.length?(e=Array.from(o),r=Math.min(e.length,t.length-1),i):e.slice()},i.range=function(o){return arguments.length?(t=Array.from(o),r=Math.min(e.length,t.length-1),i):t.slice()},i.invertExtent=function(o){var a=t.indexOf(o);return[e[a-1],e[a]]},i.unknown=function(o){return arguments.length?(n=o,i):n},i.copy=function(){return rK().domain(e).range(t).unknown(n)},No.apply(i,arguments)}const iE=new Date,oE=new Date;function Jn(e,t,n,r){function i(o){return e(o=arguments.length===0?new Date:new Date(+o)),o}return i.floor=o=>(e(o=new Date(+o)),o),i.ceil=o=>(e(o=new Date(o-1)),t(o,1),e(o),o),i.round=o=>{const a=i(o),s=i.ceil(o);return o-a(t(o=new Date(+o),a==null?1:Math.floor(a)),o),i.range=(o,a,s)=>{const u=[];if(o=i.ceil(o),s=s==null?1:Math.floor(s),!(o0))return u;let l;do u.push(l=new Date(+o)),t(o,s),e(o);while(lJn(a=>{if(a>=a)for(;e(a),!o(a);)a.setTime(a-1)},(a,s)=>{if(a>=a)if(s<0)for(;++s<=0;)for(;t(a,-1),!o(a););else for(;--s>=0;)for(;t(a,1),!o(a););}),n&&(i.count=(o,a)=>(iE.setTime(+o),oE.setTime(+a),e(iE),e(oE),Math.floor(n(iE,oE))),i.every=o=>(o=Math.floor(o),!isFinite(o)||!(o>0)?null:o>1?i.filter(r?a=>r(a)%o===0:a=>i.count(0,a)%o===0):i)),i}const jx=Jn(()=>{},(e,t)=>{e.setTime(+e+t)},(e,t)=>t-e);jx.every=e=>(e=Math.floor(e),!isFinite(e)||!(e>0)?null:e>1?Jn(t=>{t.setTime(Math.floor(t/e)*e)},(t,n)=>{t.setTime(+t+n*e)},(t,n)=>(n-t)/e):jx);jx.range;const Os=1e3,Oo=Os*60,Es=Oo*60,Vs=Es*24,z4=Vs*7,PN=Vs*30,aE=Vs*365,pc=Jn(e=>{e.setTime(e-e.getMilliseconds())},(e,t)=>{e.setTime(+e+t*Os)},(e,t)=>(t-e)/Os,e=>e.getUTCSeconds());pc.range;const W4=Jn(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*Os)},(e,t)=>{e.setTime(+e+t*Oo)},(e,t)=>(t-e)/Oo,e=>e.getMinutes());W4.range;const U4=Jn(e=>{e.setUTCSeconds(0,0)},(e,t)=>{e.setTime(+e+t*Oo)},(e,t)=>(t-e)/Oo,e=>e.getUTCMinutes());U4.range;const V4=Jn(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*Os-e.getMinutes()*Oo)},(e,t)=>{e.setTime(+e+t*Es)},(e,t)=>(t-e)/Es,e=>e.getHours());V4.range;const H4=Jn(e=>{e.setUTCMinutes(0,0,0)},(e,t)=>{e.setTime(+e+t*Es)},(e,t)=>(t-e)/Es,e=>e.getUTCHours());H4.range;const G4=Jn(e=>e.setHours(0,0,0,0),(e,t)=>e.setDate(e.getDate()+t),(e,t)=>(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*Oo)/Vs,e=>e.getDate()-1);G4.range;const iK=Jn(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/Vs,e=>e.getUTCDate()-1);iK.range;const oK=Jn(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/Vs,e=>Math.floor(e/Vs));oK.range;function sf(e){return Jn(t=>{t.setDate(t.getDate()-(t.getDay()+7-e)%7),t.setHours(0,0,0,0)},(t,n)=>{t.setDate(t.getDate()+n*7)},(t,n)=>(n-t-(n.getTimezoneOffset()-t.getTimezoneOffset())*Oo)/z4)}const q4=sf(0),N4e=sf(1),L4e=sf(2),D4e=sf(3),F4e=sf(4),B4e=sf(5),z4e=sf(6);q4.range;N4e.range;L4e.range;D4e.range;F4e.range;B4e.range;z4e.range;function uf(e){return Jn(t=>{t.setUTCDate(t.getUTCDate()-(t.getUTCDay()+7-e)%7),t.setUTCHours(0,0,0,0)},(t,n)=>{t.setUTCDate(t.getUTCDate()+n*7)},(t,n)=>(n-t)/z4)}const K4=uf(0),W4e=uf(1),U4e=uf(2),V4e=uf(3),H4e=uf(4),G4e=uf(5),q4e=uf(6);K4.range;W4e.range;U4e.range;V4e.range;H4e.range;G4e.range;q4e.range;const Z4=Jn(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());Z4.range;const Y4=Jn(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());Y4.range;const uw=Jn(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());uw.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:Jn(t=>{t.setFullYear(Math.floor(t.getFullYear()/e)*e),t.setMonth(0,1),t.setHours(0,0,0,0)},(t,n)=>{t.setFullYear(t.getFullYear()+n*e)});uw.range;const lw=Jn(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());lw.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:Jn(t=>{t.setUTCFullYear(Math.floor(t.getUTCFullYear()/e)*e),t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},(t,n)=>{t.setUTCFullYear(t.getUTCFullYear()+n*e)});lw.range;function aK(e,t,n,r,i,o){const a=[[pc,1,Os],[pc,5,5*Os],[pc,15,15*Os],[pc,30,30*Os],[o,1,Oo],[o,5,5*Oo],[o,15,15*Oo],[o,30,30*Oo],[i,1,Es],[i,3,3*Es],[i,6,6*Es],[i,12,12*Es],[r,1,Vs],[r,2,2*Vs],[n,1,z4],[t,1,PN],[t,3,3*PN],[e,1,aE]];function s(l,f,d){const p=f_).right(a,p);if(m===a.length)return e.every(H3(l/aE,f/aE,d));if(m===0)return jx.every(Math.max(H3(l,f,d),1));const[v,y]=a[p/a[m-1][2]0))return u;do u.push(l=new Date(+o)),t(o,s),e(o);while(l=a)for(;e(a),!o(a);)a.setTime(a-1)},function(a,s){if(a>=a)if(s<0)for(;++s<=0;)for(;t(a,-1),!o(a););else for(;--s>=0;)for(;t(a,1),!o(a););})},n&&(i.count=function(o,a){return sE.setTime(+o),uE.setTime(+a),e(sE),e(uE),Math.floor(n(sE,uE))},i.every=function(o){return o=Math.floor(o),!isFinite(o)||!(o>0)?null:o>1?i.filter(r?function(a){return r(a)%o===0}:function(a){return i.count(0,a)%o===0}):i}),i}const Q4e=1e3,X4=Q4e*60,J4e=X4*60,Q4=J4e*24,sK=Q4*7;var J4=tu(e=>e.setHours(0,0,0,0),(e,t)=>e.setDate(e.getDate()+t),(e,t)=>(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*X4)/Q4,e=>e.getDate()-1);J4.range;function lf(e){return tu(function(t){t.setDate(t.getDate()-(t.getDay()+7-e)%7),t.setHours(0,0,0,0)},function(t,n){t.setDate(t.getDate()+n*7)},function(t,n){return(n-t-(n.getTimezoneOffset()-t.getTimezoneOffset())*X4)/sK})}var uK=lf(0),Ix=lf(1),e6e=lf(2),t6e=lf(3),wh=lf(4),n6e=lf(5),r6e=lf(6);uK.range;Ix.range;e6e.range;t6e.range;wh.range;n6e.range;r6e.range;var Vc=tu(function(e){e.setMonth(0,1),e.setHours(0,0,0,0)},function(e,t){e.setFullYear(e.getFullYear()+t)},function(e,t){return t.getFullYear()-e.getFullYear()},function(e){return e.getFullYear()});Vc.every=function(e){return!isFinite(e=Math.floor(e))||!(e>0)?null:tu(function(t){t.setFullYear(Math.floor(t.getFullYear()/e)*e),t.setMonth(0,1),t.setHours(0,0,0,0)},function(t,n){t.setFullYear(t.getFullYear()+n*e)})};Vc.range;var e6=tu(function(e){e.setUTCHours(0,0,0,0)},function(e,t){e.setUTCDate(e.getUTCDate()+t)},function(e,t){return(t-e)/Q4},function(e){return e.getUTCDate()-1});e6.range;function cf(e){return tu(function(t){t.setUTCDate(t.getUTCDate()-(t.getUTCDay()+7-e)%7),t.setUTCHours(0,0,0,0)},function(t,n){t.setUTCDate(t.getUTCDate()+n*7)},function(t,n){return(n-t)/sK})}var lK=cf(0),Nx=cf(1),i6e=cf(2),o6e=cf(3),Sh=cf(4),a6e=cf(5),s6e=cf(6);lK.range;Nx.range;i6e.range;o6e.range;Sh.range;a6e.range;s6e.range;var Hc=tu(function(e){e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)},function(e,t){e.setUTCFullYear(e.getUTCFullYear()+t)},function(e,t){return t.getUTCFullYear()-e.getUTCFullYear()},function(e){return e.getUTCFullYear()});Hc.every=function(e){return!isFinite(e=Math.floor(e))||!(e>0)?null:tu(function(t){t.setUTCFullYear(Math.floor(t.getUTCFullYear()/e)*e),t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},function(t,n){t.setUTCFullYear(t.getUTCFullYear()+n*e)})};Hc.range;function lE(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 cE(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 ym(e,t,n){return{y:e,m:t,d:n,H:0,M:0,S:0,L:0}}function u6e(e){var t=e.dateTime,n=e.date,r=e.time,i=e.periods,o=e.days,a=e.shortDays,s=e.months,u=e.shortMonths,l=bm(i),f=xm(i),d=bm(o),p=xm(o),m=bm(a),v=xm(a),y=bm(s),_=xm(s),x=bm(u),w=xm(u),C={a:H,A:F,b:W,B:Y,c:null,d:jN,e:jN,f:M6e,g:z6e,G:U6e,H:P6e,I:A6e,j:k6e,L:cK,m:$6e,M:R6e,p:te,q:K,Q:LN,s:DN,S:j6e,u:I6e,U:N6e,V:L6e,w:D6e,W:F6e,x:null,X:null,y:B6e,Y:W6e,Z:V6e,"%":NN},E={a:ie,A:le,b:ue,B:ge,c:null,d:IN,e:IN,f:K6e,g:i8e,G:a8e,H:H6e,I:G6e,j:q6e,L:dK,m:Z6e,M:Y6e,p:_e,q:ke,Q:LN,s:DN,S:X6e,u:Q6e,U:J6e,V:e8e,w:t8e,W:n8e,x:null,X:null,y:r8e,Y:o8e,Z:s8e,"%":NN},O={a:$,A:j,b:N,B:U,c:B,d:$N,e:$N,f:C6e,g:MN,G:kN,H:RN,I:RN,j:x6e,L:S6e,m:b6e,M:_6e,p:M,q:y6e,Q:E6e,s:T6e,S:w6e,u:h6e,U:p6e,V:m6e,w:d6e,W:v6e,x:G,X:D,y:MN,Y:kN,Z:g6e,"%":O6e};C.x=T(n,C),C.X=T(r,C),C.c=T(t,C),E.x=T(n,E),E.X=T(r,E),E.c=T(t,E);function T(ae,Te){return function(Le){var fe=[],Ze=-1,De=0,He=ae.length,Qe,Ge,It;for(Le instanceof Date||(Le=new Date(+Le));++Ze53)return null;"w"in fe||(fe.w=1),"Z"in fe?(De=cE(ym(fe.y,0,1)),He=De.getUTCDay(),De=He>4||He===0?Nx.ceil(De):Nx(De),De=e6.offset(De,(fe.V-1)*7),fe.y=De.getUTCFullYear(),fe.m=De.getUTCMonth(),fe.d=De.getUTCDate()+(fe.w+6)%7):(De=lE(ym(fe.y,0,1)),He=De.getDay(),De=He>4||He===0?Ix.ceil(De):Ix(De),De=J4.offset(De,(fe.V-1)*7),fe.y=De.getFullYear(),fe.m=De.getMonth(),fe.d=De.getDate()+(fe.w+6)%7)}else("W"in fe||"U"in fe)&&("w"in fe||(fe.w="u"in fe?fe.u%7:"W"in fe?1:0),He="Z"in fe?cE(ym(fe.y,0,1)).getUTCDay():lE(ym(fe.y,0,1)).getDay(),fe.m=0,fe.d="W"in fe?(fe.w+6)%7+fe.W*7-(He+5)%7:fe.w+fe.U*7-(He+6)%7);return"Z"in fe?(fe.H+=fe.Z/100|0,fe.M+=fe.Z%100,cE(fe)):lE(fe)}}function k(ae,Te,Le,fe){for(var Ze=0,De=Te.length,He=Le.length,Qe,Ge;Ze=He)return-1;if(Qe=Te.charCodeAt(Ze++),Qe===37){if(Qe=Te.charAt(Ze++),Ge=O[Qe in AN?Te.charAt(Ze++):Qe],!Ge||(fe=Ge(ae,Le,fe))<0)return-1}else if(Qe!=Le.charCodeAt(fe++))return-1}return fe}function M(ae,Te,Le){var fe=l.exec(Te.slice(Le));return fe?(ae.p=f.get(fe[0].toLowerCase()),Le+fe[0].length):-1}function $(ae,Te,Le){var fe=m.exec(Te.slice(Le));return fe?(ae.w=v.get(fe[0].toLowerCase()),Le+fe[0].length):-1}function j(ae,Te,Le){var fe=d.exec(Te.slice(Le));return fe?(ae.w=p.get(fe[0].toLowerCase()),Le+fe[0].length):-1}function N(ae,Te,Le){var fe=x.exec(Te.slice(Le));return fe?(ae.m=w.get(fe[0].toLowerCase()),Le+fe[0].length):-1}function U(ae,Te,Le){var fe=y.exec(Te.slice(Le));return fe?(ae.m=_.get(fe[0].toLowerCase()),Le+fe[0].length):-1}function B(ae,Te,Le){return k(ae,t,Te,Le)}function G(ae,Te,Le){return k(ae,n,Te,Le)}function D(ae,Te,Le){return k(ae,r,Te,Le)}function H(ae){return a[ae.getDay()]}function F(ae){return o[ae.getDay()]}function W(ae){return u[ae.getMonth()]}function Y(ae){return s[ae.getMonth()]}function te(ae){return i[+(ae.getHours()>=12)]}function K(ae){return 1+~~(ae.getMonth()/3)}function ie(ae){return a[ae.getUTCDay()]}function le(ae){return o[ae.getUTCDay()]}function ue(ae){return u[ae.getUTCMonth()]}function ge(ae){return s[ae.getUTCMonth()]}function _e(ae){return i[+(ae.getUTCHours()>=12)]}function ke(ae){return 1+~~(ae.getUTCMonth()/3)}return{format:function(ae){var Te=T(ae+="",C);return Te.toString=function(){return ae},Te},parse:function(ae){var Te=A(ae+="",!1);return Te.toString=function(){return ae},Te},utcFormat:function(ae){var Te=T(ae+="",E);return Te.toString=function(){return ae},Te},utcParse:function(ae){var Te=A(ae+="",!0);return Te.toString=function(){return ae},Te}}}var AN={"-":"",_:" ",0:"0"},ar=/^\s*\d+/,l6e=/^%/,c6e=/[\\^$*+?|[\]().{}]/g;function Ft(e,t,n){var r=e<0?"-":"",i=(r?-e:e)+"",o=i.length;return r+(o[t.toLowerCase(),n]))}function d6e(e,t,n){var r=ar.exec(t.slice(n,n+1));return r?(e.w=+r[0],n+r[0].length):-1}function h6e(e,t,n){var r=ar.exec(t.slice(n,n+1));return r?(e.u=+r[0],n+r[0].length):-1}function p6e(e,t,n){var r=ar.exec(t.slice(n,n+2));return r?(e.U=+r[0],n+r[0].length):-1}function m6e(e,t,n){var r=ar.exec(t.slice(n,n+2));return r?(e.V=+r[0],n+r[0].length):-1}function v6e(e,t,n){var r=ar.exec(t.slice(n,n+2));return r?(e.W=+r[0],n+r[0].length):-1}function kN(e,t,n){var r=ar.exec(t.slice(n,n+4));return r?(e.y=+r[0],n+r[0].length):-1}function MN(e,t,n){var r=ar.exec(t.slice(n,n+2));return r?(e.y=+r[0]+(+r[0]>68?1900:2e3),n+r[0].length):-1}function g6e(e,t,n){var r=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(t.slice(n,n+6));return r?(e.Z=r[1]?0:-(r[2]+(r[3]||"00")),n+r[0].length):-1}function y6e(e,t,n){var r=ar.exec(t.slice(n,n+1));return r?(e.q=r[0]*3-3,n+r[0].length):-1}function b6e(e,t,n){var r=ar.exec(t.slice(n,n+2));return r?(e.m=r[0]-1,n+r[0].length):-1}function $N(e,t,n){var r=ar.exec(t.slice(n,n+2));return r?(e.d=+r[0],n+r[0].length):-1}function x6e(e,t,n){var r=ar.exec(t.slice(n,n+3));return r?(e.m=0,e.d=+r[0],n+r[0].length):-1}function RN(e,t,n){var r=ar.exec(t.slice(n,n+2));return r?(e.H=+r[0],n+r[0].length):-1}function _6e(e,t,n){var r=ar.exec(t.slice(n,n+2));return r?(e.M=+r[0],n+r[0].length):-1}function w6e(e,t,n){var r=ar.exec(t.slice(n,n+2));return r?(e.S=+r[0],n+r[0].length):-1}function S6e(e,t,n){var r=ar.exec(t.slice(n,n+3));return r?(e.L=+r[0],n+r[0].length):-1}function C6e(e,t,n){var r=ar.exec(t.slice(n,n+6));return r?(e.L=Math.floor(r[0]/1e3),n+r[0].length):-1}function O6e(e,t,n){var r=l6e.exec(t.slice(n,n+1));return r?n+r[0].length:-1}function E6e(e,t,n){var r=ar.exec(t.slice(n));return r?(e.Q=+r[0],n+r[0].length):-1}function T6e(e,t,n){var r=ar.exec(t.slice(n));return r?(e.s=+r[0],n+r[0].length):-1}function jN(e,t){return Ft(e.getDate(),t,2)}function P6e(e,t){return Ft(e.getHours(),t,2)}function A6e(e,t){return Ft(e.getHours()%12||12,t,2)}function k6e(e,t){return Ft(1+J4.count(Vc(e),e),t,3)}function cK(e,t){return Ft(e.getMilliseconds(),t,3)}function M6e(e,t){return cK(e,t)+"000"}function $6e(e,t){return Ft(e.getMonth()+1,t,2)}function R6e(e,t){return Ft(e.getMinutes(),t,2)}function j6e(e,t){return Ft(e.getSeconds(),t,2)}function I6e(e){var t=e.getDay();return t===0?7:t}function N6e(e,t){return Ft(uK.count(Vc(e)-1,e),t,2)}function fK(e){var t=e.getDay();return t>=4||t===0?wh(e):wh.ceil(e)}function L6e(e,t){return e=fK(e),Ft(wh.count(Vc(e),e)+(Vc(e).getDay()===4),t,2)}function D6e(e){return e.getDay()}function F6e(e,t){return Ft(Ix.count(Vc(e)-1,e),t,2)}function B6e(e,t){return Ft(e.getFullYear()%100,t,2)}function z6e(e,t){return e=fK(e),Ft(e.getFullYear()%100,t,2)}function W6e(e,t){return Ft(e.getFullYear()%1e4,t,4)}function U6e(e,t){var n=e.getDay();return e=n>=4||n===0?wh(e):wh.ceil(e),Ft(e.getFullYear()%1e4,t,4)}function V6e(e){var t=e.getTimezoneOffset();return(t>0?"-":(t*=-1,"+"))+Ft(t/60|0,"0",2)+Ft(t%60,"0",2)}function IN(e,t){return Ft(e.getUTCDate(),t,2)}function H6e(e,t){return Ft(e.getUTCHours(),t,2)}function G6e(e,t){return Ft(e.getUTCHours()%12||12,t,2)}function q6e(e,t){return Ft(1+e6.count(Hc(e),e),t,3)}function dK(e,t){return Ft(e.getUTCMilliseconds(),t,3)}function K6e(e,t){return dK(e,t)+"000"}function Z6e(e,t){return Ft(e.getUTCMonth()+1,t,2)}function Y6e(e,t){return Ft(e.getUTCMinutes(),t,2)}function X6e(e,t){return Ft(e.getUTCSeconds(),t,2)}function Q6e(e){var t=e.getUTCDay();return t===0?7:t}function J6e(e,t){return Ft(lK.count(Hc(e)-1,e),t,2)}function hK(e){var t=e.getUTCDay();return t>=4||t===0?Sh(e):Sh.ceil(e)}function e8e(e,t){return e=hK(e),Ft(Sh.count(Hc(e),e)+(Hc(e).getUTCDay()===4),t,2)}function t8e(e){return e.getUTCDay()}function n8e(e,t){return Ft(Nx.count(Hc(e)-1,e),t,2)}function r8e(e,t){return Ft(e.getUTCFullYear()%100,t,2)}function i8e(e,t){return e=hK(e),Ft(e.getUTCFullYear()%100,t,2)}function o8e(e,t){return Ft(e.getUTCFullYear()%1e4,t,4)}function a8e(e,t){var n=e.getUTCDay();return e=n>=4||n===0?Sh(e):Sh.ceil(e),Ft(e.getUTCFullYear()%1e4,t,4)}function s8e(){return"+0000"}function NN(){return"%"}function LN(e){return+e}function DN(e){return Math.floor(+e/1e3)}var Gf,t6,pK;u8e({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","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 u8e(e){return Gf=u6e(e),t6=Gf.format,Gf.parse,pK=Gf.utcFormat,Gf.utcParse,Gf}function l8e(e){return new Date(e)}function c8e(e){return e instanceof Date?+e:+new Date(+e)}function n6(e,t,n,r,i,o,a,s,u,l){var f=I4(),d=f.invert,p=f.domain,m=l(".%L"),v=l(":%S"),y=l("%I:%M"),_=l("%I %p"),x=l("%a %d"),w=l("%b %d"),C=l("%B"),E=l("%Y");function O(T){return(u(T)t(i/(e.length-1)))},n.quantiles=function(r){return Array.from({length:r+1},(i,o)=>l4e(e,o/r))},n.copy=function(){return yK(t).domain(e)},eu.apply(n,arguments)}function fw(){var e=0,t=.5,n=1,r=1,i,o,a,s,u,l=Kr,f,d=!1,p;function m(y){return isNaN(y=+y)?p:(y=.5+((y=+f(y))-o)*(r*yI5e(e[e.length-1]);var dw=new Array(3).concat("d8b365f5f5f55ab4ac","a6611adfc27d80cdc1018571","a6611adfc27df5f5f580cdc1018571","8c510ad8b365f6e8c3c7eae55ab4ac01665e","8c510ad8b365f6e8c3f5f5f5c7eae55ab4ac01665e","8c510abf812ddfc27df6e8c3c7eae580cdc135978f01665e","8c510abf812ddfc27df6e8c3f5f5f5c7eae580cdc135978f01665e","5430058c510abf812ddfc27df6e8c3c7eae580cdc135978f01665e003c30","5430058c510abf812ddfc27df6e8c3f5f5f5c7eae580cdc135978f01665e003c30").map(yt);const C8e=rn(dw);var hw=new Array(3).concat("af8dc3f7f7f77fbf7b","7b3294c2a5cfa6dba0008837","7b3294c2a5cff7f7f7a6dba0008837","762a83af8dc3e7d4e8d9f0d37fbf7b1b7837","762a83af8dc3e7d4e8f7f7f7d9f0d37fbf7b1b7837","762a839970abc2a5cfe7d4e8d9f0d3a6dba05aae611b7837","762a839970abc2a5cfe7d4e8f7f7f7d9f0d3a6dba05aae611b7837","40004b762a839970abc2a5cfe7d4e8d9f0d3a6dba05aae611b783700441b","40004b762a839970abc2a5cfe7d4e8f7f7f7d9f0d3a6dba05aae611b783700441b").map(yt);const O8e=rn(hw);var pw=new Array(3).concat("e9a3c9f7f7f7a1d76a","d01c8bf1b6dab8e1864dac26","d01c8bf1b6daf7f7f7b8e1864dac26","c51b7de9a3c9fde0efe6f5d0a1d76a4d9221","c51b7de9a3c9fde0eff7f7f7e6f5d0a1d76a4d9221","c51b7dde77aef1b6dafde0efe6f5d0b8e1867fbc414d9221","c51b7dde77aef1b6dafde0eff7f7f7e6f5d0b8e1867fbc414d9221","8e0152c51b7dde77aef1b6dafde0efe6f5d0b8e1867fbc414d9221276419","8e0152c51b7dde77aef1b6dafde0eff7f7f7e6f5d0b8e1867fbc414d9221276419").map(yt);const E8e=rn(pw);var mw=new Array(3).concat("998ec3f7f7f7f1a340","5e3c99b2abd2fdb863e66101","5e3c99b2abd2f7f7f7fdb863e66101","542788998ec3d8daebfee0b6f1a340b35806","542788998ec3d8daebf7f7f7fee0b6f1a340b35806","5427888073acb2abd2d8daebfee0b6fdb863e08214b35806","5427888073acb2abd2d8daebf7f7f7fee0b6fdb863e08214b35806","2d004b5427888073acb2abd2d8daebfee0b6fdb863e08214b358067f3b08","2d004b5427888073acb2abd2d8daebf7f7f7fee0b6fdb863e08214b358067f3b08").map(yt);const T8e=rn(mw);var vw=new Array(3).concat("ef8a62f7f7f767a9cf","ca0020f4a58292c5de0571b0","ca0020f4a582f7f7f792c5de0571b0","b2182bef8a62fddbc7d1e5f067a9cf2166ac","b2182bef8a62fddbc7f7f7f7d1e5f067a9cf2166ac","b2182bd6604df4a582fddbc7d1e5f092c5de4393c32166ac","b2182bd6604df4a582fddbc7f7f7f7d1e5f092c5de4393c32166ac","67001fb2182bd6604df4a582fddbc7d1e5f092c5de4393c32166ac053061","67001fb2182bd6604df4a582fddbc7f7f7f7d1e5f092c5de4393c32166ac053061").map(yt);const P8e=rn(vw);var gw=new Array(3).concat("ef8a62ffffff999999","ca0020f4a582bababa404040","ca0020f4a582ffffffbababa404040","b2182bef8a62fddbc7e0e0e09999994d4d4d","b2182bef8a62fddbc7ffffffe0e0e09999994d4d4d","b2182bd6604df4a582fddbc7e0e0e0bababa8787874d4d4d","b2182bd6604df4a582fddbc7ffffffe0e0e0bababa8787874d4d4d","67001fb2182bd6604df4a582fddbc7e0e0e0bababa8787874d4d4d1a1a1a","67001fb2182bd6604df4a582fddbc7ffffffe0e0e0bababa8787874d4d4d1a1a1a").map(yt);const A8e=rn(gw);var yw=new Array(3).concat("fc8d59ffffbf91bfdb","d7191cfdae61abd9e92c7bb6","d7191cfdae61ffffbfabd9e92c7bb6","d73027fc8d59fee090e0f3f891bfdb4575b4","d73027fc8d59fee090ffffbfe0f3f891bfdb4575b4","d73027f46d43fdae61fee090e0f3f8abd9e974add14575b4","d73027f46d43fdae61fee090ffffbfe0f3f8abd9e974add14575b4","a50026d73027f46d43fdae61fee090e0f3f8abd9e974add14575b4313695","a50026d73027f46d43fdae61fee090ffffbfe0f3f8abd9e974add14575b4313695").map(yt);const k8e=rn(yw);var bw=new Array(3).concat("fc8d59ffffbf91cf60","d7191cfdae61a6d96a1a9641","d7191cfdae61ffffbfa6d96a1a9641","d73027fc8d59fee08bd9ef8b91cf601a9850","d73027fc8d59fee08bffffbfd9ef8b91cf601a9850","d73027f46d43fdae61fee08bd9ef8ba6d96a66bd631a9850","d73027f46d43fdae61fee08bffffbfd9ef8ba6d96a66bd631a9850","a50026d73027f46d43fdae61fee08bd9ef8ba6d96a66bd631a9850006837","a50026d73027f46d43fdae61fee08bffffbfd9ef8ba6d96a66bd631a9850006837").map(yt);const M8e=rn(bw);var xw=new Array(3).concat("fc8d59ffffbf99d594","d7191cfdae61abdda42b83ba","d7191cfdae61ffffbfabdda42b83ba","d53e4ffc8d59fee08be6f59899d5943288bd","d53e4ffc8d59fee08bffffbfe6f59899d5943288bd","d53e4ff46d43fdae61fee08be6f598abdda466c2a53288bd","d53e4ff46d43fdae61fee08bffffbfe6f598abdda466c2a53288bd","9e0142d53e4ff46d43fdae61fee08be6f598abdda466c2a53288bd5e4fa2","9e0142d53e4ff46d43fdae61fee08bffffbfe6f598abdda466c2a53288bd5e4fa2").map(yt);const $8e=rn(xw);var _w=new Array(3).concat("e5f5f999d8c92ca25f","edf8fbb2e2e266c2a4238b45","edf8fbb2e2e266c2a42ca25f006d2c","edf8fbccece699d8c966c2a42ca25f006d2c","edf8fbccece699d8c966c2a441ae76238b45005824","f7fcfde5f5f9ccece699d8c966c2a441ae76238b45005824","f7fcfde5f5f9ccece699d8c966c2a441ae76238b45006d2c00441b").map(yt);const R8e=rn(_w);var ww=new Array(3).concat("e0ecf49ebcda8856a7","edf8fbb3cde38c96c688419d","edf8fbb3cde38c96c68856a7810f7c","edf8fbbfd3e69ebcda8c96c68856a7810f7c","edf8fbbfd3e69ebcda8c96c68c6bb188419d6e016b","f7fcfde0ecf4bfd3e69ebcda8c96c68c6bb188419d6e016b","f7fcfde0ecf4bfd3e69ebcda8c96c68c6bb188419d810f7c4d004b").map(yt);const j8e=rn(ww);var Sw=new Array(3).concat("e0f3dba8ddb543a2ca","f0f9e8bae4bc7bccc42b8cbe","f0f9e8bae4bc7bccc443a2ca0868ac","f0f9e8ccebc5a8ddb57bccc443a2ca0868ac","f0f9e8ccebc5a8ddb57bccc44eb3d32b8cbe08589e","f7fcf0e0f3dbccebc5a8ddb57bccc44eb3d32b8cbe08589e","f7fcf0e0f3dbccebc5a8ddb57bccc44eb3d32b8cbe0868ac084081").map(yt);const I8e=rn(Sw);var Cw=new Array(3).concat("fee8c8fdbb84e34a33","fef0d9fdcc8afc8d59d7301f","fef0d9fdcc8afc8d59e34a33b30000","fef0d9fdd49efdbb84fc8d59e34a33b30000","fef0d9fdd49efdbb84fc8d59ef6548d7301f990000","fff7ecfee8c8fdd49efdbb84fc8d59ef6548d7301f990000","fff7ecfee8c8fdd49efdbb84fc8d59ef6548d7301fb300007f0000").map(yt);const N8e=rn(Cw);var Ow=new Array(3).concat("ece2f0a6bddb1c9099","f6eff7bdc9e167a9cf02818a","f6eff7bdc9e167a9cf1c9099016c59","f6eff7d0d1e6a6bddb67a9cf1c9099016c59","f6eff7d0d1e6a6bddb67a9cf3690c002818a016450","fff7fbece2f0d0d1e6a6bddb67a9cf3690c002818a016450","fff7fbece2f0d0d1e6a6bddb67a9cf3690c002818a016c59014636").map(yt);const L8e=rn(Ow);var Ew=new Array(3).concat("ece7f2a6bddb2b8cbe","f1eef6bdc9e174a9cf0570b0","f1eef6bdc9e174a9cf2b8cbe045a8d","f1eef6d0d1e6a6bddb74a9cf2b8cbe045a8d","f1eef6d0d1e6a6bddb74a9cf3690c00570b0034e7b","fff7fbece7f2d0d1e6a6bddb74a9cf3690c00570b0034e7b","fff7fbece7f2d0d1e6a6bddb74a9cf3690c00570b0045a8d023858").map(yt);const D8e=rn(Ew);var Tw=new Array(3).concat("e7e1efc994c7dd1c77","f1eef6d7b5d8df65b0ce1256","f1eef6d7b5d8df65b0dd1c77980043","f1eef6d4b9dac994c7df65b0dd1c77980043","f1eef6d4b9dac994c7df65b0e7298ace125691003f","f7f4f9e7e1efd4b9dac994c7df65b0e7298ace125691003f","f7f4f9e7e1efd4b9dac994c7df65b0e7298ace125698004367001f").map(yt);const F8e=rn(Tw);var Pw=new Array(3).concat("fde0ddfa9fb5c51b8a","feebe2fbb4b9f768a1ae017e","feebe2fbb4b9f768a1c51b8a7a0177","feebe2fcc5c0fa9fb5f768a1c51b8a7a0177","feebe2fcc5c0fa9fb5f768a1dd3497ae017e7a0177","fff7f3fde0ddfcc5c0fa9fb5f768a1dd3497ae017e7a0177","fff7f3fde0ddfcc5c0fa9fb5f768a1dd3497ae017e7a017749006a").map(yt);const B8e=rn(Pw);var Aw=new Array(3).concat("edf8b17fcdbb2c7fb8","ffffcca1dab441b6c4225ea8","ffffcca1dab441b6c42c7fb8253494","ffffccc7e9b47fcdbb41b6c42c7fb8253494","ffffccc7e9b47fcdbb41b6c41d91c0225ea80c2c84","ffffd9edf8b1c7e9b47fcdbb41b6c41d91c0225ea80c2c84","ffffd9edf8b1c7e9b47fcdbb41b6c41d91c0225ea8253494081d58").map(yt);const z8e=rn(Aw);var kw=new Array(3).concat("f7fcb9addd8e31a354","ffffccc2e69978c679238443","ffffccc2e69978c67931a354006837","ffffccd9f0a3addd8e78c67931a354006837","ffffccd9f0a3addd8e78c67941ab5d238443005a32","ffffe5f7fcb9d9f0a3addd8e78c67941ab5d238443005a32","ffffe5f7fcb9d9f0a3addd8e78c67941ab5d238443006837004529").map(yt);const W8e=rn(kw);var Mw=new Array(3).concat("fff7bcfec44fd95f0e","ffffd4fed98efe9929cc4c02","ffffd4fed98efe9929d95f0e993404","ffffd4fee391fec44ffe9929d95f0e993404","ffffd4fee391fec44ffe9929ec7014cc4c028c2d04","ffffe5fff7bcfee391fec44ffe9929ec7014cc4c028c2d04","ffffe5fff7bcfee391fec44ffe9929ec7014cc4c02993404662506").map(yt);const U8e=rn(Mw);var $w=new Array(3).concat("ffeda0feb24cf03b20","ffffb2fecc5cfd8d3ce31a1c","ffffb2fecc5cfd8d3cf03b20bd0026","ffffb2fed976feb24cfd8d3cf03b20bd0026","ffffb2fed976feb24cfd8d3cfc4e2ae31a1cb10026","ffffccffeda0fed976feb24cfd8d3cfc4e2ae31a1cb10026","ffffccffeda0fed976feb24cfd8d3cfc4e2ae31a1cbd0026800026").map(yt);const V8e=rn($w);var Rw=new Array(3).concat("deebf79ecae13182bd","eff3ffbdd7e76baed62171b5","eff3ffbdd7e76baed63182bd08519c","eff3ffc6dbef9ecae16baed63182bd08519c","eff3ffc6dbef9ecae16baed64292c62171b5084594","f7fbffdeebf7c6dbef9ecae16baed64292c62171b5084594","f7fbffdeebf7c6dbef9ecae16baed64292c62171b508519c08306b").map(yt);const H8e=rn(Rw);var jw=new Array(3).concat("e5f5e0a1d99b31a354","edf8e9bae4b374c476238b45","edf8e9bae4b374c47631a354006d2c","edf8e9c7e9c0a1d99b74c47631a354006d2c","edf8e9c7e9c0a1d99b74c47641ab5d238b45005a32","f7fcf5e5f5e0c7e9c0a1d99b74c47641ab5d238b45005a32","f7fcf5e5f5e0c7e9c0a1d99b74c47641ab5d238b45006d2c00441b").map(yt);const G8e=rn(jw);var Iw=new Array(3).concat("f0f0f0bdbdbd636363","f7f7f7cccccc969696525252","f7f7f7cccccc969696636363252525","f7f7f7d9d9d9bdbdbd969696636363252525","f7f7f7d9d9d9bdbdbd969696737373525252252525","fffffff0f0f0d9d9d9bdbdbd969696737373525252252525","fffffff0f0f0d9d9d9bdbdbd969696737373525252252525000000").map(yt);const q8e=rn(Iw);var Nw=new Array(3).concat("efedf5bcbddc756bb1","f2f0f7cbc9e29e9ac86a51a3","f2f0f7cbc9e29e9ac8756bb154278f","f2f0f7dadaebbcbddc9e9ac8756bb154278f","f2f0f7dadaebbcbddc9e9ac8807dba6a51a34a1486","fcfbfdefedf5dadaebbcbddc9e9ac8807dba6a51a34a1486","fcfbfdefedf5dadaebbcbddc9e9ac8807dba6a51a354278f3f007d").map(yt);const K8e=rn(Nw);var Lw=new Array(3).concat("fee0d2fc9272de2d26","fee5d9fcae91fb6a4acb181d","fee5d9fcae91fb6a4ade2d26a50f15","fee5d9fcbba1fc9272fb6a4ade2d26a50f15","fee5d9fcbba1fc9272fb6a4aef3b2ccb181d99000d","fff5f0fee0d2fcbba1fc9272fb6a4aef3b2ccb181d99000d","fff5f0fee0d2fcbba1fc9272fb6a4aef3b2ccb181da50f1567000d").map(yt);const Z8e=rn(Lw);var Dw=new Array(3).concat("fee6cefdae6be6550d","feeddefdbe85fd8d3cd94701","feeddefdbe85fd8d3ce6550da63603","feeddefdd0a2fdae6bfd8d3ce6550da63603","feeddefdd0a2fdae6bfd8d3cf16913d948018c2d04","fff5ebfee6cefdd0a2fdae6bfd8d3cf16913d948018c2d04","fff5ebfee6cefdd0a2fdae6bfd8d3cf16913d94801a636037f2704").map(yt);const Y8e=rn(Dw);function X8e(e){return e=Math.max(0,Math.min(1,e)),"rgb("+Math.max(0,Math.min(255,Math.round(-4.54-e*(35.34-e*(2381.73-e*(6402.7-e*(7024.72-e*2710.57)))))))+", "+Math.max(0,Math.min(255,Math.round(32.49+e*(170.73+e*(52.82-e*(131.46-e*(176.58-e*67.37)))))))+", "+Math.max(0,Math.min(255,Math.round(81.24+e*(442.36-e*(2482.43-e*(6167.24-e*(6614.94-e*2475.67)))))))+")"}const Q8e=R4(Xa(300,.5,0),Xa(-240,.5,1));var J8e=R4(Xa(-100,.75,.35),Xa(80,1.5,.8)),eMe=R4(Xa(260,.75,.35),Xa(80,1.5,.8)),g1=Xa();function tMe(e){(e<0||e>1)&&(e-=Math.floor(e));var t=Math.abs(e-.5);return g1.h=360*e-100,g1.s=1.5-1.5*t,g1.l=.8-.9*t,g1+""}var y1=xh(),nMe=Math.PI/3,rMe=Math.PI*2/3;function iMe(e){var t;return e=(.5-e)*Math.PI,y1.r=255*(t=Math.sin(e))*t,y1.g=255*(t=Math.sin(e+nMe))*t,y1.b=255*(t=Math.sin(e+rMe))*t,y1+""}function oMe(e){return e=Math.max(0,Math.min(1,e)),"rgb("+Math.max(0,Math.min(255,Math.round(34.61+e*(1172.33-e*(10793.56-e*(33300.12-e*(38394.49-e*14825.05)))))))+", "+Math.max(0,Math.min(255,Math.round(23.31+e*(557.33+e*(1225.33-e*(3574.96-e*(1073.77+e*707.56)))))))+", "+Math.max(0,Math.min(255,Math.round(27.2+e*(3211.1-e*(15327.97-e*(27814-e*(22569.18-e*6838.66)))))))+")"}function Fw(e){var t=e.length;return function(n){return e[Math.max(0,Math.min(t-1,Math.floor(n*t)))]}}const aMe=Fw(yt("44015444025645045745055946075a46085c460a5d460b5e470d60470e6147106347116447136548146748166848176948186a481a6c481b6d481c6e481d6f481f70482071482173482374482475482576482677482878482979472a7a472c7a472d7b472e7c472f7d46307e46327e46337f463480453581453781453882443983443a83443b84433d84433e85423f854240864241864142874144874045884046883f47883f48893e49893e4a893e4c8a3d4d8a3d4e8a3c4f8a3c508b3b518b3b528b3a538b3a548c39558c39568c38588c38598c375a8c375b8d365c8d365d8d355e8d355f8d34608d34618d33628d33638d32648e32658e31668e31678e31688e30698e306a8e2f6b8e2f6c8e2e6d8e2e6e8e2e6f8e2d708e2d718e2c718e2c728e2c738e2b748e2b758e2a768e2a778e2a788e29798e297a8e297b8e287c8e287d8e277e8e277f8e27808e26818e26828e26828e25838e25848e25858e24868e24878e23888e23898e238a8d228b8d228c8d228d8d218e8d218f8d21908d21918c20928c20928c20938c1f948c1f958b1f968b1f978b1f988b1f998a1f9a8a1e9b8a1e9c891e9d891f9e891f9f881fa0881fa1881fa1871fa28720a38620a48621a58521a68522a78522a88423a98324aa8325ab8225ac8226ad8127ad8128ae8029af7f2ab07f2cb17e2db27d2eb37c2fb47c31b57b32b67a34b67935b77937b87838b9773aba763bbb753dbc743fbc7340bd7242be7144bf7046c06f48c16e4ac16d4cc26c4ec36b50c46a52c56954c56856c66758c7655ac8645cc8635ec96260ca6063cb5f65cb5e67cc5c69cd5b6ccd5a6ece5870cf5773d05675d05477d1537ad1517cd2507fd34e81d34d84d44b86d54989d5488bd6468ed64590d74393d74195d84098d83e9bd93c9dd93ba0da39a2da37a5db36a8db34aadc32addc30b0dd2fb2dd2db5de2bb8de29bade28bddf26c0df25c2df23c5e021c8e020cae11fcde11dd0e11cd2e21bd5e21ad8e219dae319dde318dfe318e2e418e5e419e7e419eae51aece51befe51cf1e51df4e61ef6e620f8e621fbe723fde725"));var sMe=Fw(yt("00000401000501010601010802010902020b02020d03030f03031204041405041606051806051a07061c08071e0907200a08220b09240c09260d0a290e0b2b100b2d110c2f120d31130d34140e36150e38160f3b180f3d19103f1a10421c10441d11471e114920114b21114e22115024125325125527125829115a2a115c2c115f2d11612f116331116533106734106936106b38106c390f6e3b0f703d0f713f0f72400f74420f75440f764510774710784910784a10794c117a4e117b4f127b51127c52137c54137d56147d57157e59157e5a167e5c167f5d177f5f187f601880621980641a80651a80671b80681c816a1c816b1d816d1d816e1e81701f81721f817320817521817621817822817922827b23827c23827e24828025828125818326818426818627818827818928818b29818c29818e2a81902a81912b81932b80942c80962c80982d80992d809b2e7f9c2e7f9e2f7fa02f7fa1307ea3307ea5317ea6317da8327daa337dab337cad347cae347bb0357bb2357bb3367ab5367ab73779b83779ba3878bc3978bd3977bf3a77c03a76c23b75c43c75c53c74c73d73c83e73ca3e72cc3f71cd4071cf4070d0416fd2426fd3436ed5446dd6456cd8456cd9466bdb476adc4869de4968df4a68e04c67e24d66e34e65e44f64e55064e75263e85362e95462ea5661eb5760ec5860ed5a5fee5b5eef5d5ef05f5ef1605df2625df2645cf3655cf4675cf4695cf56b5cf66c5cf66e5cf7705cf7725cf8745cf8765cf9785df9795df97b5dfa7d5efa7f5efa815ffb835ffb8560fb8761fc8961fc8a62fc8c63fc8e64fc9065fd9266fd9467fd9668fd9869fd9a6afd9b6bfe9d6cfe9f6dfea16efea36ffea571fea772fea973feaa74feac76feae77feb078feb27afeb47bfeb67cfeb77efeb97ffebb81febd82febf84fec185fec287fec488fec68afec88cfeca8dfecc8ffecd90fecf92fed194fed395fed597fed799fed89afdda9cfddc9efddea0fde0a1fde2a3fde3a5fde5a7fde7a9fde9aafdebacfcecaefceeb0fcf0b2fcf2b4fcf4b6fcf6b8fcf7b9fcf9bbfcfbbdfcfdbf")),uMe=Fw(yt("00000401000501010601010802010a02020c02020e03021004031204031405041706041907051b08051d09061f0a07220b07240c08260d08290e092b10092d110a30120a32140b34150b37160b39180c3c190c3e1b0c411c0c431e0c451f0c48210c4a230c4c240c4f260c51280b53290b552b0b572d0b592f0a5b310a5c320a5e340a5f3609613809623909633b09643d09653e0966400a67420a68440a68450a69470b6a490b6a4a0c6b4c0c6b4d0d6c4f0d6c510e6c520e6d540f6d550f6d57106e59106e5a116e5c126e5d126e5f136e61136e62146e64156e65156e67166e69166e6a176e6c186e6d186e6f196e71196e721a6e741a6e751b6e771c6d781c6d7a1d6d7c1d6d7d1e6d7f1e6c801f6c82206c84206b85216b87216b88226a8a226a8c23698d23698f24699025689225689326679526679727669827669a28659b29649d29649f2a63a02a63a22b62a32c61a52c60a62d60a82e5fa92e5eab2f5ead305dae305cb0315bb1325ab3325ab43359b63458b73557b93556ba3655bc3754bd3853bf3952c03a51c13a50c33b4fc43c4ec63d4dc73e4cc83f4bca404acb4149cc4248ce4347cf4446d04545d24644d34743d44842d54a41d74b3fd84c3ed94d3dda4e3cdb503bdd513ade5238df5337e05536e15635e25734e35933e45a31e55c30e65d2fe75e2ee8602de9612bea632aeb6429eb6628ec6726ed6925ee6a24ef6c23ef6e21f06f20f1711ff1731df2741cf3761bf37819f47918f57b17f57d15f67e14f68013f78212f78410f8850ff8870ef8890cf98b0bf98c0af98e09fa9008fa9207fa9407fb9606fb9706fb9906fb9b06fb9d07fc9f07fca108fca309fca50afca60cfca80dfcaa0ffcac11fcae12fcb014fcb216fcb418fbb61afbb81dfbba1ffbbc21fbbe23fac026fac228fac42afac62df9c72ff9c932f9cb35f8cd37f8cf3af7d13df7d340f6d543f6d746f5d949f5db4cf4dd4ff4df53f4e156f3e35af3e55df2e661f2e865f2ea69f1ec6df1ed71f1ef75f1f179f2f27df2f482f3f586f3f68af4f88ef5f992f6fa96f8fb9af9fc9dfafda1fcffa4")),lMe=Fw(yt("0d088710078813078916078a19068c1b068d1d068e20068f2206902406912605912805922a05932c05942e05952f059631059733059735049837049938049a3a049a3c049b3e049c3f049c41049d43039e44039e46039f48039f4903a04b03a14c02a14e02a25002a25102a35302a35502a45601a45801a45901a55b01a55c01a65e01a66001a66100a76300a76400a76600a76700a86900a86a00a86c00a86e00a86f00a87100a87201a87401a87501a87701a87801a87a02a87b02a87d03a87e03a88004a88104a78305a78405a78606a68707a68808a68a09a58b0aa58d0ba58e0ca48f0da4910ea3920fa39410a29511a19613a19814a099159f9a169f9c179e9d189d9e199da01a9ca11b9ba21d9aa31e9aa51f99a62098a72197a82296aa2395ab2494ac2694ad2793ae2892b02991b12a90b22b8fb32c8eb42e8db52f8cb6308bb7318ab83289ba3388bb3488bc3587bd3786be3885bf3984c03a83c13b82c23c81c33d80c43e7fc5407ec6417dc7427cc8437bc9447aca457acb4679cc4778cc4977cd4a76ce4b75cf4c74d04d73d14e72d24f71d35171d45270d5536fd5546ed6556dd7566cd8576bd9586ada5a6ada5b69db5c68dc5d67dd5e66de5f65de6164df6263e06363e16462e26561e26660e3685fe4695ee56a5de56b5de66c5ce76e5be76f5ae87059e97158e97257ea7457eb7556eb7655ec7754ed7953ed7a52ee7b51ef7c51ef7e50f07f4ff0804ef1814df1834cf2844bf3854bf3874af48849f48948f58b47f58c46f68d45f68f44f79044f79143f79342f89441f89540f9973ff9983ef99a3efa9b3dfa9c3cfa9e3bfb9f3afba139fba238fca338fca537fca636fca835fca934fdab33fdac33fdae32fdaf31fdb130fdb22ffdb42ffdb52efeb72dfeb82cfeba2cfebb2bfebd2afebe2afec029fdc229fdc328fdc527fdc627fdc827fdca26fdcb26fccd25fcce25fcd025fcd225fbd324fbd524fbd724fad824fada24f9dc24f9dd25f8df25f8e125f7e225f7e425f6e626f6e826f5e926f5eb27f4ed27f3ee27f3f027f2f227f1f426f1f525f0f724f0f921")),cMe=p4,fMe=rq,dMe=iq,hMe=ew,pMe=E0,mMe=m4,vMe=200;function gMe(e,t,n,r){var i=-1,o=fMe,a=!0,s=e.length,u=[],l=t.length;if(!s)return u;n&&(t=hMe(t,pMe(n))),r?(o=dMe,a=!1):t.length>=vMe&&(o=mMe,a=!1,t=new cMe(t));e:for(;++i1?0:e<-1?fl:Math.acos(e)}function BN(e){return e>=1?Lx:e<=-1?-Lx:Math.asin(e)}const K3=Math.PI,Z3=2*K3,nc=1e-6,EMe=Z3-nc;function CK(e){this._+=e[0];for(let t=1,n=e.length;t=0))throw new Error(`invalid digits: ${e}`);if(t>15)return CK;const n=10**t;return function(r){this._+=r[0];for(let i=1,o=r.length;inc)if(!(Math.abs(d*u-l*f)>nc)||!o)this._append`L${this._x1=t},${this._y1=n}`;else{let m=r-a,v=i-s,y=u*u+l*l,_=m*m+v*v,x=Math.sqrt(y),w=Math.sqrt(p),C=o*Math.tan((K3-Math.acos((y+p-_)/(2*x*w)))/2),E=C/w,O=C/x;Math.abs(E-1)>nc&&this._append`L${t+E*f},${n+E*d}`,this._append`A${o},${o},0,0,${+(d*m>f*v)},${this._x1=t+O*u},${this._y1=n+O*l}`}}arc(t,n,r,i,o,a){if(t=+t,n=+n,r=+r,a=!!a,r<0)throw new Error(`negative radius: ${r}`);let s=r*Math.cos(i),u=r*Math.sin(i),l=t+s,f=n+u,d=1^a,p=a?i-o:o-i;this._x1===null?this._append`M${l},${f}`:(Math.abs(this._x1-l)>nc||Math.abs(this._y1-f)>nc)&&this._append`L${l},${f}`,r&&(p<0&&(p=p%Z3+Z3),p>EMe?this._append`A${r},${r},0,1,${d},${t-s},${n-u}A${r},${r},0,1,${d},${this._x1=l},${this._y1=f}`:p>nc&&this._append`A${r},${r},0,${+(p>=K3)},${d},${this._x1=t+r*Math.cos(o)},${this._y1=n+r*Math.sin(o)}`)}rect(t,n,r,i){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+n}h${r=+r}v${+i}h${-r}Z`}toString(){return this._}}function Bw(e){let t=3;return e.digits=function(n){if(!arguments.length)return t;if(n==null)t=null;else{const r=Math.floor(n);if(!(r>=0))throw new RangeError(`invalid digits: ${n}`);t=r}return e},()=>new PMe(t)}function AMe(e){return e.innerRadius}function kMe(e){return e.outerRadius}function MMe(e){return e.startAngle}function $Me(e){return e.endAngle}function RMe(e){return e&&e.padAngle}function jMe(e,t,n,r,i,o,a,s){var u=n-e,l=r-t,f=a-i,d=s-o,p=d*u-f*l;if(!(p*pB*B+G*G&&(k=$,M=j),{cx:k,cy:M,x01:-f,y01:-d,x11:k*(i/O-1),y11:M*(i/O-1)}}function IMe(){var e=AMe,t=kMe,n=vt(0),r=null,i=MMe,o=$Me,a=RMe,s=null,u=Bw(l);function l(){var f,d,p=+e.apply(this,arguments),m=+t.apply(this,arguments),v=i.apply(this,arguments)-Lx,y=o.apply(this,arguments)-Lx,_=FN(y-v),x=y>v;if(s||(s=f=u()),mOr))s.moveTo(0,0);else if(_>Qu-Or)s.moveTo(m*ys(v),m*hi(v)),s.arc(0,0,m,v,y,!x),p>Or&&(s.moveTo(p*ys(y),p*hi(y)),s.arc(0,0,p,y,v,x));else{var w=v,C=y,E=v,O=y,T=_,A=_,k=a.apply(this,arguments)/2,M=k>Or&&(r?+r.apply(this,arguments):hr(p*p+m*m)),$=fE(FN(m-p)/2,+n.apply(this,arguments)),j=$,N=$,U,B;if(M>Or){var G=BN(M/p*hi(k)),D=BN(M/m*hi(k));(T-=G*2)>Or?(G*=x?1:-1,E+=G,O-=G):(T=0,E=O=(v+y)/2),(A-=D*2)>Or?(D*=x?1:-1,w+=D,C-=D):(A=0,w=C=(v+y)/2)}var H=m*ys(w),F=m*hi(w),W=p*ys(O),Y=p*hi(O);if($>Or){var te=m*ys(C),K=m*hi(C),ie=p*ys(E),le=p*hi(E),ue;if(_Or?N>Or?(U=b1(ie,le,H,F,m,N,x),B=b1(te,K,W,Y,m,N,x),s.moveTo(U.cx+U.x01,U.cy+U.y01),N<$?s.arc(U.cx,U.cy,N,Cr(U.y01,U.x01),Cr(B.y01,B.x01),!x):(s.arc(U.cx,U.cy,N,Cr(U.y01,U.x01),Cr(U.y11,U.x11),!x),s.arc(0,0,m,Cr(U.cy+U.y11,U.cx+U.x11),Cr(B.cy+B.y11,B.cx+B.x11),!x),s.arc(B.cx,B.cy,N,Cr(B.y11,B.x11),Cr(B.y01,B.x01),!x))):(s.moveTo(H,F),s.arc(0,0,m,w,C,!x)):s.moveTo(H,F),!(p>Or)||!(T>Or)?s.lineTo(W,Y):j>Or?(U=b1(W,Y,te,K,p,-j,x),B=b1(H,F,ie,le,p,-j,x),s.lineTo(U.cx+U.x01,U.cy+U.y01),j<$?s.arc(U.cx,U.cy,j,Cr(U.y01,U.x01),Cr(B.y01,B.x01),!x):(s.arc(U.cx,U.cy,j,Cr(U.y01,U.x01),Cr(U.y11,U.x11),!x),s.arc(0,0,p,Cr(U.cy+U.y11,U.cx+U.x11),Cr(B.cy+B.y11,B.cx+B.x11),x),s.arc(B.cx,B.cy,j,Cr(B.y11,B.x11),Cr(B.y01,B.x01),!x))):s.arc(0,0,p,O,E,x)}if(s.closePath(),f)return s=null,f+""||null}return l.centroid=function(){var f=(+e.apply(this,arguments)+ +t.apply(this,arguments))/2,d=(+i.apply(this,arguments)+ +o.apply(this,arguments))/2-fl/2;return[ys(d)*f,hi(d)*f]},l.innerRadius=function(f){return arguments.length?(e=typeof f=="function"?f:vt(+f),l):e},l.outerRadius=function(f){return arguments.length?(t=typeof f=="function"?f:vt(+f),l):t},l.cornerRadius=function(f){return arguments.length?(n=typeof f=="function"?f:vt(+f),l):n},l.padRadius=function(f){return arguments.length?(r=f==null?null:typeof f=="function"?f:vt(+f),l):r},l.startAngle=function(f){return arguments.length?(i=typeof f=="function"?f:vt(+f),l):i},l.endAngle=function(f){return arguments.length?(o=typeof f=="function"?f:vt(+f),l):o},l.padAngle=function(f){return arguments.length?(a=typeof f=="function"?f:vt(+f),l):a},l.context=function(f){return arguments.length?(s=f??null,l):s},l}function zw(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function OK(e){this._context=e}OK.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 R0(e){return new OK(e)}function EK(e){return e[0]}function TK(e){return e[1]}function j0(e,t){var n=vt(!0),r=null,i=R0,o=null,a=Bw(s);e=typeof e=="function"?e:e===void 0?EK:vt(e),t=typeof t=="function"?t:t===void 0?TK:vt(t);function s(u){var l,f=(u=zw(u)).length,d,p=!1,m;for(r==null&&(o=i(m=a())),l=0;l<=f;++l)!(l=m;--v)s.point(C[v],E[v]);s.lineEnd(),s.areaEnd()}x&&(C[p]=+e(_,p,d),E[p]=+t(_,p,d),s.point(r?+r(_,p,d):C[p],n?+n(_,p,d):E[p]))}if(w)return s=null,w+""||null}function f(){return j0().defined(i).curve(a).context(o)}return l.x=function(d){return arguments.length?(e=typeof d=="function"?d:vt(+d),r=null,l):e},l.x0=function(d){return arguments.length?(e=typeof d=="function"?d:vt(+d),l):e},l.x1=function(d){return arguments.length?(r=d==null?null:typeof d=="function"?d:vt(+d),l):r},l.y=function(d){return arguments.length?(t=typeof d=="function"?d:vt(+d),n=null,l):t},l.y0=function(d){return arguments.length?(t=typeof d=="function"?d:vt(+d),l):t},l.y1=function(d){return arguments.length?(n=d==null?null:typeof d=="function"?d:vt(+d),l):n},l.lineX0=l.lineY0=function(){return f().x(e).y(t)},l.lineY1=function(){return f().x(e).y(n)},l.lineX1=function(){return f().x(r).y(t)},l.defined=function(d){return arguments.length?(i=typeof d=="function"?d:vt(!!d),l):i},l.curve=function(d){return arguments.length?(a=d,o!=null&&(s=a(o)),l):a},l.context=function(d){return arguments.length?(d==null?o=s=null:s=a(o=d),l):o},l}function NMe(e,t){return te?1:t>=e?0:NaN}function LMe(e){return e}function DMe(){var e=LMe,t=NMe,n=null,r=vt(0),i=vt(Qu),o=vt(0);function a(s){var u,l=(s=zw(s)).length,f,d,p=0,m=new Array(l),v=new Array(l),y=+r.apply(this,arguments),_=Math.min(Qu,Math.max(-Qu,i.apply(this,arguments)-y)),x,w=Math.min(Math.abs(_)/l,o.apply(this,arguments)),C=w*(_<0?-1:1),E;for(u=0;u0&&(p+=E);for(t!=null?m.sort(function(O,T){return t(v[O],v[T])}):n!=null&&m.sort(function(O,T){return n(s[O],s[T])}),u=0,d=p?(_-l*C)/p:0;u0?E*d:0)+C,v[f]={data:s[f],index:u,value:E,startAngle:y,endAngle:x,padAngle:w};return v}return a.value=function(s){return arguments.length?(e=typeof s=="function"?s:vt(+s),a):e},a.sortValues=function(s){return arguments.length?(t=s,n=null,a):t},a.sort=function(s){return arguments.length?(n=s,t=null,a):n},a.startAngle=function(s){return arguments.length?(r=typeof s=="function"?s:vt(+s),a):r},a.endAngle=function(s){return arguments.length?(i=typeof s=="function"?s:vt(+s),a):i},a.padAngle=function(s){return arguments.length?(o=typeof s=="function"?s:vt(+s),a):o},a}class PK{constructor(t,n){this._context=t,this._x=n}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,n){switch(t=+t,n=+n,this._point){case 0:{this._point=1,this._line?this._context.lineTo(t,n):this._context.moveTo(t,n);break}case 1:this._point=2;default:{this._x?this._context.bezierCurveTo(this._x0=(this._x0+t)/2,this._y0,this._x0,n,t,n):this._context.bezierCurveTo(this._x0,this._y0=(this._y0+n)/2,t,this._y0,t,n);break}}this._x0=t,this._y0=n}}function FMe(e){return new PK(e,!0)}function BMe(e){return new PK(e,!1)}const o6={draw(e,t){const n=hr(t/fl);e.moveTo(n,0),e.arc(0,0,n,0,Qu)}},zMe={draw(e,t){const n=hr(t/5)/2;e.moveTo(-3*n,-n),e.lineTo(-n,-n),e.lineTo(-n,-3*n),e.lineTo(n,-3*n),e.lineTo(n,-n),e.lineTo(3*n,-n),e.lineTo(3*n,n),e.lineTo(n,n),e.lineTo(n,3*n),e.lineTo(-n,3*n),e.lineTo(-n,n),e.lineTo(-3*n,n),e.closePath()}},AK=hr(1/3),WMe=AK*2,UMe={draw(e,t){const n=hr(t/WMe),r=n*AK;e.moveTo(0,-n),e.lineTo(r,0),e.lineTo(0,n),e.lineTo(-r,0),e.closePath()}},VMe={draw(e,t){const n=hr(t),r=-n/2;e.rect(r,r,n,n)}},HMe=.8908130915292852,kK=hi(fl/10)/hi(7*fl/10),GMe=hi(Qu/10)*kK,qMe=-ys(Qu/10)*kK,KMe={draw(e,t){const n=hr(t*HMe),r=GMe*n,i=qMe*n;e.moveTo(0,-n),e.lineTo(r,i);for(let o=1;o<5;++o){const a=Qu*o/5,s=ys(a),u=hi(a);e.lineTo(u*n,-s*n),e.lineTo(s*r-u*i,u*r+s*i)}e.closePath()}},dE=hr(3),ZMe={draw(e,t){const n=-hr(t/(dE*3));e.moveTo(0,n*2),e.lineTo(-dE*n,-n),e.lineTo(dE*n,-n),e.closePath()}},fo=-.5,ho=hr(3)/2,Y3=1/hr(12),YMe=(Y3/2+1)*3,XMe={draw(e,t){const n=hr(t/YMe),r=n/2,i=n*Y3,o=r,a=n*Y3+n,s=-o,u=a;e.moveTo(r,i),e.lineTo(o,a),e.lineTo(s,u),e.lineTo(fo*r-ho*i,ho*r+fo*i),e.lineTo(fo*o-ho*a,ho*o+fo*a),e.lineTo(fo*s-ho*u,ho*s+fo*u),e.lineTo(fo*r+ho*i,fo*i-ho*r),e.lineTo(fo*o+ho*a,fo*a-ho*o),e.lineTo(fo*s+ho*u,fo*u-ho*s),e.closePath()}};function QMe(e,t){let n=null,r=Bw(i);e=typeof e=="function"?e:vt(e||o6),t=typeof t=="function"?t:vt(t===void 0?64:+t);function i(){let o;if(n||(n=o=r()),e.apply(this,arguments).draw(n,+t.apply(this,arguments)),o)return n=null,o+""||null}return i.type=function(o){return arguments.length?(e=typeof o=="function"?o:vt(o),i):e},i.size=function(o){return arguments.length?(t=typeof o=="function"?o:vt(+o),i):t},i.context=function(o){return arguments.length?(n=o??null,i):n},i}function dl(){}function Dx(e,t,n){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+n)/6)}function Ww(e){this._context=e}Ww.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:Dx(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:Dx(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function MK(e){return new Ww(e)}function $K(e){this._context=e}$K.prototype={areaStart:dl,areaEnd:dl,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:Dx(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function RK(e){return new $K(e)}function jK(e){this._context=e}jK.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 n=(this._x0+4*this._x1+e)/6,r=(this._y0+4*this._y1+t)/6;this._line?this._context.lineTo(n,r):this._context.moveTo(n,r);break;case 3:this._point=4;default:Dx(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function IK(e){return new jK(e)}function NK(e,t){this._basis=new Ww(e),this._beta=t}NK.prototype={lineStart:function(){this._x=[],this._y=[],this._basis.lineStart()},lineEnd:function(){var e=this._x,t=this._y,n=e.length-1;if(n>0)for(var r=e[0],i=t[0],o=e[n]-r,a=t[n]-i,s=-1,u;++s<=n;)u=s/n,this._basis.point(this._beta*e[s]+(1-this._beta)*(r+u*o),this._beta*t[s]+(1-this._beta)*(i+u*a));this._x=this._y=null,this._basis.lineEnd()},point:function(e,t){this._x.push(+e),this._y.push(+t)}};const JMe=function e(t){function n(r){return t===1?new Ww(r):new NK(r,t)}return n.beta=function(r){return e(+r)},n}(.85);function Fx(e,t,n){e._context.bezierCurveTo(e._x1+e._k*(e._x2-e._x0),e._y1+e._k*(e._y2-e._y0),e._x2+e._k*(e._x1-t),e._y2+e._k*(e._y1-n),e._x2,e._y2)}function a6(e,t){this._context=e,this._k=(1-t)/6}a6.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:Fx(this,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,this._x1=e,this._y1=t;break;case 2:this._point=3;default:Fx(this,e,t);break}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const e$e=function e(t){function n(r){return new a6(r,t)}return n.tension=function(r){return e(+r)},n}(0);function s6(e,t){this._context=e,this._k=(1-t)/6}s6.prototype={areaStart:dl,areaEnd:dl,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x3,this._y3),this._context.closePath();break}case 2:{this._context.lineTo(this._x3,this._y3),this._context.closePath();break}case 3:{this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5);break}}},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._x3=e,this._y3=t;break;case 1:this._point=2,this._context.moveTo(this._x4=e,this._y4=t);break;case 2:this._point=3,this._x5=e,this._y5=t;break;default:Fx(this,e,t);break}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const t$e=function e(t){function n(r){return new s6(r,t)}return n.tension=function(r){return e(+r)},n}(0);function u6(e,t){this._context=e,this._k=(1-t)/6}u6.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=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,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:Fx(this,e,t);break}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const n$e=function e(t){function n(r){return new u6(r,t)}return n.tension=function(r){return e(+r)},n}(0);function l6(e,t,n){var r=e._x1,i=e._y1,o=e._x2,a=e._y2;if(e._l01_a>Or){var s=2*e._l01_2a+3*e._l01_a*e._l12_a+e._l12_2a,u=3*e._l01_a*(e._l01_a+e._l12_a);r=(r*s-e._x0*e._l12_2a+e._x2*e._l01_2a)/u,i=(i*s-e._y0*e._l12_2a+e._y2*e._l01_2a)/u}if(e._l23_a>Or){var l=2*e._l23_2a+3*e._l23_a*e._l12_a+e._l12_2a,f=3*e._l23_a*(e._l23_a+e._l12_a);o=(o*l+e._x1*e._l23_2a-t*e._l12_2a)/f,a=(a*l+e._y1*e._l23_2a-n*e._l12_2a)/f}e._context.bezierCurveTo(r,i,o,a,e._x2,e._y2)}function LK(e,t){this._context=e,this._alpha=t}LK.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:this.point(this._x2,this._y2);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){if(e=+e,t=+t,this._point){var n=this._x2-e,r=this._y2-t;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+r*r,this._alpha))}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;default:l6(this,e,t);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const r$e=function e(t){function n(r){return t?new LK(r,t):new a6(r,0)}return n.alpha=function(r){return e(+r)},n}(.5);function DK(e,t){this._context=e,this._alpha=t}DK.prototype={areaStart:dl,areaEnd:dl,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x3,this._y3),this._context.closePath();break}case 2:{this._context.lineTo(this._x3,this._y3),this._context.closePath();break}case 3:{this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5);break}}},point:function(e,t){if(e=+e,t=+t,this._point){var n=this._x2-e,r=this._y2-t;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+r*r,this._alpha))}switch(this._point){case 0:this._point=1,this._x3=e,this._y3=t;break;case 1:this._point=2,this._context.moveTo(this._x4=e,this._y4=t);break;case 2:this._point=3,this._x5=e,this._y5=t;break;default:l6(this,e,t);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const i$e=function e(t){function n(r){return t?new DK(r,t):new s6(r,0)}return n.alpha=function(r){return e(+r)},n}(.5);function FK(e,t){this._context=e,this._alpha=t}FK.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=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){if(e=+e,t=+t,this._point){var n=this._x2-e,r=this._y2-t;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+r*r,this._alpha))}switch(this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:l6(this,e,t);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const o$e=function e(t){function n(r){return t?new FK(r,t):new u6(r,0)}return n.alpha=function(r){return e(+r)},n}(.5);function BK(e){this._context=e}BK.prototype={areaStart:dl,areaEnd:dl,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 zK(e){return new BK(e)}function zN(e){return e<0?-1:1}function WN(e,t,n){var r=e._x1-e._x0,i=t-e._x1,o=(e._y1-e._y0)/(r||i<0&&-0),a=(n-e._y1)/(i||r<0&&-0),s=(o*i+a*r)/(r+i);return(zN(o)+zN(a))*Math.min(Math.abs(o),Math.abs(a),.5*Math.abs(s))||0}function UN(e,t){var n=e._x1-e._x0;return n?(3*(e._y1-e._y0)/n-t)/2:t}function hE(e,t,n){var r=e._x0,i=e._y0,o=e._x1,a=e._y1,s=(o-r)/3;e._context.bezierCurveTo(r+s,i+s*t,o-s,a-s*n,o,a)}function Bx(e){this._context=e}Bx.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:hE(this,this._t0,UN(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 n=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,hE(this,UN(this,n=WN(this,e,t)),n);break;default:hE(this,this._t0,n=WN(this,e,t));break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t,this._t0=n}}};function WK(e){this._context=new UK(e)}(WK.prototype=Object.create(Bx.prototype)).point=function(e,t){Bx.prototype.point.call(this,t,e)};function UK(e){this._context=e}UK.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,n,r,i,o){this._context.bezierCurveTo(t,e,r,n,o,i)}};function c6(e){return new Bx(e)}function f6(e){return new WK(e)}function VK(e){this._context=e}VK.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,n=e.length;if(n)if(this._line?this._context.lineTo(e[0],t[0]):this._context.moveTo(e[0],t[0]),n===2)this._context.lineTo(e[1],t[1]);else for(var r=VN(e),i=VN(t),o=0,a=1;a=0;--t)i[t]=(a[t]-i[t+1])/o[t];for(o[n-1]=(e[n]+i[n-1])/2,t=0;t=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;default:{if(this._t<=0)this._context.lineTo(this._x,t),this._context.lineTo(e,t);else{var n=this._x*(1-this._t)+e*this._t;this._context.lineTo(n,this._y),this._context.lineTo(n,t)}break}}this._x=e,this._y=t}};function GK(e){return new Uw(e,.5)}function qK(e){return new Uw(e,0)}function KK(e){return new Uw(e,1)}function Ch(e,t){if((a=e.length)>1)for(var n=1,r,i,o=e[t[0]],a,s=o.length;n=0;)n[t]=t;return n}function a$e(e,t){return e[t]}function s$e(e){const t=[];return t.key=e,t}function u$e(){var e=vt([]),t=X3,n=Ch,r=a$e;function i(o){var a=Array.from(e.apply(this,arguments),s$e),s,u=a.length,l=-1,f;for(const d of o)for(s=0,++l;s0){for(var n,r,i=0,o=e[0].length,a;i0){for(var n=0,r=e[t[0]],i,o=r.length;n0)||!((o=(i=e[t[0]]).length)>0))){for(var n=0,r=1,i,o,a;r0&&n(s)?t>1?YK(s,t-1,n,r,i):F$e(i,s):r||(i[i.length]=s)}return i}var h6=YK,z$e=h6;function W$e(e){var t=e==null?0:e.length;return t?z$e(e,1):[]}var U$e=W$e,V$e=U$e,H$e=Aq,G$e=kq;function q$e(e){return G$e(H$e(e,void 0,V$e),e+"")}var K$e=q$e,Z$e=R$e,Y$e=K$e,X$e=Y$e(function(e,t){return e==null?{}:Z$e(e,t)}),Q$e=X$e;const J$e=Et(Q$e);function eRe(e,t){for(var n=-1,r=e==null?0:e.length;++ns))return!1;var l=o.get(e),f=o.get(t);if(l&&f)return l==t&&f==e;var d=-1,p=!0,m=n&oRe?new tRe:void 0;for(o.set(e,t),o.set(t,e);++d=0||(i[n]=e[n]);return i}var Dje=["axis.ticks.text","axis.legend.text","legends.title.text","legends.text","legends.ticks.text","legends.title.text","labels.text","dots.text","markers.text","annotations.text"],Fje=function(e,t){return va({},t,e)},Bje=function(e,t){var n=_ke({},e,t);return Dje.forEach(function(r){Wm(n,r,Fje(Bn(n,r),n.text))}),n},iZ=S.createContext(),oZ=function(e){var t=e.children,n=e.animate,r=n===void 0||n,i=e.config,o=i===void 0?"default":i,a=S.useMemo(function(){var s=Sp(o)?t4[o]:o;return{animate:r,config:s}},[r,o]);return g.jsx(iZ.Provider,{value:a,children:t})},zx={animate:re.bool,motionConfig:re.oneOfType([re.oneOf(Object.keys(t4)),re.shape({mass:re.number,tension:re.number,friction:re.number,clamp:re.bool,precision:re.number,velocity:re.number,duration:re.number,easing:re.func})])};oZ.propTypes={children:re.node.isRequired,animate:zx.animate,config:zx.motionConfig};var xl=function(){return S.useContext(iZ)},zje=function(e){var t=xl(),n=t.animate,r=t.config,i=function(s){var u=S.useRef();return S.useEffect(function(){u.current=s},[s]),u.current}(e),o=S.useMemo(function(){return zq(i,e)},[i,e]),a=Qs({from:{value:0},to:{value:1},reset:!0,config:r,immediate:!n}).value;return fp(a,o)},Wje={nivo:["#d76445","#f47560","#e8c1a0","#97e3d5","#61cdbb","#00b0a7"],BrBG:Ye(dw),PRGn:Ye(hw),PiYG:Ye(pw),PuOr:Ye(mw),RdBu:Ye(vw),RdGy:Ye(gw),RdYlBu:Ye(yw),RdYlGn:Ye(bw),spectral:Ye(xw),blues:Ye(Rw),greens:Ye(jw),greys:Ye(Iw),oranges:Ye(Dw),purples:Ye(Nw),reds:Ye(Lw),BuGn:Ye(_w),BuPu:Ye(ww),GnBu:Ye(Sw),OrRd:Ye(Cw),PuBuGn:Ye(Ow),PuBu:Ye(Ew),PuRd:Ye(Tw),RdPu:Ye(Pw),YlGnBu:Ye(Aw),YlGn:Ye(kw),YlOrBr:Ye(Mw),YlOrRd:Ye($w)},Uje=Object.keys(Wje);Ye(dw),Ye(hw),Ye(pw),Ye(mw),Ye(vw),Ye(gw),Ye(yw),Ye(bw),Ye(xw),Ye(Rw),Ye(jw),Ye(Iw),Ye(Dw),Ye(Nw),Ye(Lw),Ye(_w),Ye(ww),Ye(Sw),Ye(Cw),Ye(Ow),Ye(Ew),Ye(Tw),Ye(Pw),Ye(Aw),Ye(kw),Ye(Mw),Ye($w);re.oneOfType([re.oneOf(Uje),re.func,re.arrayOf(re.string)]);var Vje={basis:MK,basisClosed:RK,basisOpen:IK,bundle:JMe,cardinal:e$e,cardinalClosed:t$e,cardinalOpen:n$e,catmullRom:r$e,catmullRomClosed:i$e,catmullRomOpen:o$e,linear:R0,linearClosed:zK,monotoneX:c6,monotoneY:f6,natural:HK,step:GK,stepAfter:KK,stepBefore:qK},g6=Object.keys(Vje);g6.filter(function(e){return e.endsWith("Closed")});SK(g6,"bundle","basisClosed","basisOpen","cardinalClosed","cardinalOpen","catmullRomClosed","catmullRomOpen","linearClosed");SK(g6,"bundle","basisClosed","basisOpen","cardinalClosed","cardinalOpen","catmullRomClosed","catmullRomOpen","linearClosed");re.shape({top:re.number,right:re.number,bottom:re.number,left:re.number}).isRequired;var Hje=["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"];re.oneOf(Hje);Nu(wK);var Gje={top:0,right:0,bottom:0,left:0},aZ=function(e,t,n){return n===void 0&&(n={}),S.useMemo(function(){var r=va({},Gje,n);return{margin:r,innerWidth:e-r.left-r.right,innerHeight:t-r.top-r.bottom,outerWidth:e,outerHeight:t}},[e,t,n.top,n.right,n.bottom,n.left])},qje=function(){var e=S.useRef(null),t=S.useState({left:0,top:0,width:0,height:0}),n=t[0],r=t[1],i=S.useState(function(){return typeof ResizeObserver>"u"?null:new ResizeObserver(function(o){var a=o[0];return r(a.contentRect)})})[0];return S.useEffect(function(){return e.current&&i!==null&&i.observe(e.current),function(){i!==null&&i.disconnect()}},[]),[e,n]},Kje=function(e){return S.useMemo(function(){return Bje(Lje,e)},[e])},Zje=function(e){return typeof e=="function"?e:typeof e=="string"?e.indexOf("time:")===0?t6(e.slice("5")):sw(e):function(t){return""+t}},y6=function(e){return S.useMemo(function(){return Zje(e)},[e])},sZ=S.createContext(),Yje={},uZ=function(e){var t=e.theme,n=t===void 0?Yje:t,r=e.children,i=Kje(n);return g.jsx(sZ.Provider,{value:i,children:r})};uZ.propTypes={children:re.node.isRequired,theme:re.object};var oi=function(){return S.useContext(sZ)},Xje=["outlineWidth","outlineColor","outlineOpacity"],lZ=function(e){return e.outlineWidth,e.outlineColor,e.outlineOpacity,v6(e,Xje)},cZ=function(e){var t=e.children,n=e.condition,r=e.wrapper;return n?S.cloneElement(r,{},t):t};cZ.propTypes={children:re.node.isRequired,condition:re.bool.isRequired,wrapper:re.element.isRequired};var Qje={position:"relative"},b6=function(e){var t=e.children,n=e.theme,r=e.renderWrapper,i=r===void 0||r,o=e.isInteractive,a=o===void 0||o,s=e.animate,u=e.motionConfig,l=S.useRef(null);return g.jsx(uZ,{theme:n,children:g.jsx(oZ,{animate:s,config:u,children:g.jsx(TTe,{container:l,children:g.jsxs(cZ,{condition:i,wrapper:g.jsx("div",{style:Qje,ref:l}),children:[t,a&&g.jsx(ETe,{})]})})})})};b6.propTypes={children:re.element.isRequired,isInteractive:re.bool,renderWrapper:re.bool,theme:re.object,animate:re.bool,motionConfig:re.oneOfType([re.string,zx.motionConfig])};re.func.isRequired,re.bool,re.bool,re.object.isRequired,re.bool.isRequired,re.oneOfType([re.string,zx.motionConfig]);re.func.isRequired;var Jje=["id","colors"],fZ=function(e){var t=e.id,n=e.colors,r=v6(e,Jje);return g.jsx("linearGradient",va({id:t,x1:0,x2:0,y1:0,y2:1},r,{children:n.map(function(i){var o=i.offset,a=i.color,s=i.opacity;return g.jsx("stop",{offset:o+"%",stopColor:a,stopOpacity:s!==void 0?s:1},o)})}))};fZ.propTypes={id:re.string.isRequired,colors:re.arrayOf(re.shape({offset:re.number.isRequired,color:re.string.isRequired,opacity:re.number})).isRequired,gradientTransform:re.string};var dZ={linearGradient:fZ},_m={color:"#000000",background:"#ffffff",size:4,padding:4,stagger:!1},rP=S.memo(function(e){var t=e.id,n=e.background,r=n===void 0?_m.background:n,i=e.color,o=i===void 0?_m.color:i,a=e.size,s=a===void 0?_m.size:a,u=e.padding,l=u===void 0?_m.padding:u,f=e.stagger,d=f===void 0?_m.stagger:f,p=s+l,m=s/2,v=l/2;return d===!0&&(p=2*s+2*l),g.jsxs("pattern",{id:t,width:p,height:p,patternUnits:"userSpaceOnUse",children:[g.jsx("rect",{width:p,height:p,fill:r}),g.jsx("circle",{cx:v+m,cy:v+m,r:m,fill:o}),d&&g.jsx("circle",{cx:1.5*l+s+m,cy:1.5*l+s+m,r:m,fill:o})]})});rP.displayName="PatternDots",rP.propTypes={id:re.string.isRequired,color:re.string.isRequired,background:re.string.isRequired,size:re.number.isRequired,padding:re.number.isRequired,stagger:re.bool.isRequired};var $s=function(e){return e*Math.PI/180},x6=function(e){return 180*e/Math.PI},eIe=function(e){return e.startAngle+(e.endAngle-e.startAngle)/2},qd=function(e,t){return{x:Math.cos(e)*t,y:Math.sin(e)*t}},wm={spacing:5,rotation:0,background:"#000000",color:"#ffffff",lineWidth:2},iP=S.memo(function(e){var t=e.id,n=e.spacing,r=n===void 0?wm.spacing:n,i=e.rotation,o=i===void 0?wm.rotation:i,a=e.background,s=a===void 0?wm.background:a,u=e.color,l=u===void 0?wm.color:u,f=e.lineWidth,d=f===void 0?wm.lineWidth:f,p=Math.round(o)%360,m=Math.abs(r);p>180?p-=360:p>90?p-=180:p<-180?p+=360:p<-90&&(p+=180);var v,y=m,_=m;return p===0?v=` M 0 0 L `+y+` 0 M 0 `+_+" L "+y+" "+_+` `:p===90?v=` diff --git a/src/disco/gui/dist/assets/index-Bwdiu9KE.js b/src/disco/gui/dist/assets/index-DjLLGYQR.js similarity index 99% rename from src/disco/gui/dist/assets/index-Bwdiu9KE.js rename to src/disco/gui/dist/assets/index-DjLLGYQR.js index 1adf23e711d..778eec997f9 100644 --- a/src/disco/gui/dist/assets/index-Bwdiu9KE.js +++ b/src/disco/gui/dist/assets/index-DjLLGYQR.js @@ -1,4 +1,4 @@ -import{r as p,R as x,a as Rr,b as Pl,u as El,p as Dl,j as Vi,c as Ml}from"./index-Dm_aFr8M.js";var Ut=class{constructor(){this.allSyncListeners=new Map,this.allAsyncListeners=new Map,this.globalSyncListeners=new Set,this.globalAsyncListeners=new Set,this.asyncFunctionsQueue=[],this.scheduled=!1,this.firedEvents={}}setFrameworkOverrides(e){this.frameworkOverrides=e}getListeners(e,t,i){const s=t?this.allAsyncListeners:this.allSyncListeners;let o=s.get(e);return!o&&i&&(o=new Set,s.set(e,o)),o}noRegisteredListenersExist(){return this.allSyncListeners.size===0&&this.allAsyncListeners.size===0&&this.globalSyncListeners.size===0&&this.globalAsyncListeners.size===0}addEventListener(e,t,i=!1){this.getListeners(e,i,!0).add(t)}removeEventListener(e,t,i=!1){const s=this.getListeners(e,i,!1);s&&(s.delete(t),s.size===0&&(i?this.allAsyncListeners:this.allSyncListeners).delete(e))}addGlobalListener(e,t=!1){(t?this.globalAsyncListeners:this.globalSyncListeners).add(e)}removeGlobalListener(e,t=!1){(t?this.globalAsyncListeners:this.globalSyncListeners).delete(e)}dispatchEvent(e){const t=e;this.dispatchToListeners(t,!0),this.dispatchToListeners(t,!1),this.firedEvents[t.type]=!0}dispatchEventOnce(e){this.firedEvents[e.type]||this.dispatchEvent(e)}dispatchToListeners(e,t){const i=e.type;if(t&&"event"in e){const l=e.event;l instanceof Event&&(e.eventPath=l.composedPath())}const s=(l,a)=>l.forEach(c=>{if(!a.has(c))return;const u=this.frameworkOverrides?()=>this.frameworkOverrides.wrapIncoming(()=>c(e)):()=>c(e);t?this.dispatchAsync(u):u()}),o=this.getListeners(i,t,!1)??new Set,r=new Set(o);r.size>0&&s(r,o),new Set(t?this.globalAsyncListeners:this.globalSyncListeners).forEach(l=>{const a=this.frameworkOverrides?()=>this.frameworkOverrides.wrapIncoming(()=>l(i,e)):()=>l(i,e);t?this.dispatchAsync(a):a()})}dispatchAsync(e){if(this.asyncFunctionsQueue.push(e),!this.scheduled){const t=()=>{window.setTimeout(this.flushAsyncQueue.bind(this),0)};this.frameworkOverrides?this.frameworkOverrides.wrapIncoming(t):t(),this.scheduled=!0}}flushAsyncQueue(){this.scheduled=!1;const e=this.asyncFunctionsQueue.slice();this.asyncFunctionsQueue=[],e.forEach(t=>t())}},gt=(e=>(e.CommunityCoreModule="@ag-grid-community/core",e.InfiniteRowModelModule="@ag-grid-community/infinite-row-model",e.ClientSideRowModelModule="@ag-grid-community/client-side-row-model",e.CsvExportModule="@ag-grid-community/csv-export",e.EnterpriseCoreModule="@ag-grid-enterprise/core",e.RowGroupingModule="@ag-grid-enterprise/row-grouping",e.ColumnsToolPanelModule="@ag-grid-enterprise/column-tool-panel",e.FiltersToolPanelModule="@ag-grid-enterprise/filter-tool-panel",e.MenuModule="@ag-grid-enterprise/menu",e.SetFilterModule="@ag-grid-enterprise/set-filter",e.MultiFilterModule="@ag-grid-enterprise/multi-filter",e.StatusBarModule="@ag-grid-enterprise/status-bar",e.SideBarModule="@ag-grid-enterprise/side-bar",e.RangeSelectionModule="@ag-grid-enterprise/range-selection",e.MasterDetailModule="@ag-grid-enterprise/master-detail",e.RichSelectModule="@ag-grid-enterprise/rich-select",e.GridChartsModule="@ag-grid-enterprise/charts",e.ViewportRowModelModule="@ag-grid-enterprise/viewport-row-model",e.ServerSideRowModelModule="@ag-grid-enterprise/server-side-row-model",e.ExcelExportModule="@ag-grid-enterprise/excel-export",e.ClipboardModule="@ag-grid-enterprise/clipboard",e.SparklinesModule="@ag-grid-enterprise/sparklines",e.AdvancedFilterModule="@ag-grid-enterprise/advanced-filter",e.AngularModule="@ag-grid-community/angular",e.ReactModule="@ag-grid-community/react",e.VueModule="@ag-grid-community/vue",e))(gt||{}),Vo={};function Xs(e,t){Vo[t]||(e(),Vo[t]=!0)}function ct(e,...t){console.log("AG Grid: "+e,...t)}function b(e,...t){Xs(()=>console.warn("AG Grid: "+e,...t),e+(t==null?void 0:t.join("")))}function U(e,...t){Xs(()=>console.error("AG Grid: "+e,...t),e+(t==null?void 0:t.join("")))}function Js(e){return!!(e&&e.constructor&&e.call&&e.apply)}function xl(e){Al(e,400)}var hs=[],gs=!1;function Bo(e){hs.push(e),!gs&&(gs=!0,window.setTimeout(()=>{const t=hs.slice();hs.length=0,gs=!1,t.forEach(i=>i())},0))}function Al(e,t=0){e.length>0&&window.setTimeout(()=>e.forEach(i=>i()),t)}function Pe(e,t){let i;return function(...s){const o=this;window.clearTimeout(i),i=window.setTimeout(function(){e.apply(o,s)},t)}}function Wo(e,t){let i=0;return function(...s){const o=this,r=new Date().getTime();r-i{const a=new Date().getTime()-o>i;(e()||a)&&(t(),n=!0,r!=null&&(window.clearInterval(r),r=null))};l(),n||(r=window.setInterval(l,10))}function Il(...e){return t=>e.reduce((i,s)=>s(i),t)}function Je(e){return e==null||e===""?null:e}function M(e,t=!1){return e!=null&&(e!==""||t)}function B(e){return!M(e)}function Ae(e){return e==null||e.length===0}function xs(e){return e!=null&&typeof e.toString=="function"?e.toString():null}function Rt(e){if(e===void 0)return;if(e===null||e==="")return null;if(typeof e=="number")return isNaN(e)?void 0:e;const t=parseInt(e,10);return isNaN(t)?void 0:t}function As(e){if(e!==void 0)return e===null||e===""?!1:Ts(e)}function Ts(e){return typeof e=="boolean"?e:typeof e=="string"?e.toUpperCase()==="TRUE"||e=="":!1}function Bi(e,t){const i=e?JSON.stringify(e):null,s=t?JSON.stringify(t):null;return i===s}function Ll(e,t,i=!1){const s=e==null,o=t==null;if(e&&e.toNumber&&(e=e.toNumber()),t&&t.toNumber&&(t=t.toNumber()),s&&o)return 0;if(s)return-1;if(o)return 1;function r(n,l){return n>l?1:nt.push(i)),t}return Object.values(e)}function Fr(e,t){return e.get("rowModelType")===t}function ee(e){return Fr(e,"clientSide")}function it(e){return Fr(e,"serverSide")}function pe(e,t){return e.get("domLayout")===t}function Wi(e){return Ui(e)!==void 0}function zi(e){return!e.get("suppressAsyncEvents")}function br(e){return typeof e.get("getRowHeight")=="function"}function Ol(e,t){return t?!e.get("enableStrictPivotColumnOrder"):e.get("maintainColumnOrder")}function dt(e,t,i=!1,s){if(s==null&&(s=e.environment.getDefaultRowHeight()),br(e)){if(i)return{height:s,estimated:!0};const n={node:t,data:t.data},l=e.getCallback("getRowHeight")(n);if(Is(l))return l===0&&b("The return of `getRowHeight` cannot be zero. If the intention is to hide rows, use a filter instead."),{height:Math.max(1,l),estimated:!1}}if(t.detail&&e.get("masterDetail"))return Gl(e);const o=e.get("rowHeight");return{height:o&&Is(o)?o:s,estimated:!1}}function Gl(e){if(e.get("detailRowAutoHeight"))return{height:1,estimated:!1};const t=e.get("detailRowHeight");return Is(t)?{height:t,estimated:!1}:{height:300,estimated:!1}}function ts(e){const{environment:t}=e,i=e.get("rowHeight");if(!i||B(i))return t.getDefaultRowHeight();const s=t.refreshRowHeightVariable();return s!==-1?s:(b("row height must be a number if not using standard row model"),t.getDefaultRowHeight())}function Is(e){return!isNaN(e)&&typeof e=="number"&&isFinite(e)}function ui(e,t,i){const s=t[e.getDomDataKey()];return s?s[i]:void 0}function Dt(e,t,i,s){const o=e.getDomDataKey();let r=t[o];B(r)&&(r={},t[o]=r),r[i]=s}function ce(e){let t=null;const i=e.get("getDocument");return i&&M(i)?t=i():e.eGridDiv&&(t=e.eGridDiv.ownerDocument),t&&M(t)?t:document}function Pr(e){return ce(e).defaultView||window}function di(e){return e.eGridDiv.getRootNode()}function ne(e){return di(e).activeElement}function Er(e){const t=ce(e),i=ne(e);return i===null||i===t.body}function Nt(e){return e.get("ensureDomOrder")?!1:e.get("animateRows")}function is(e){return!(e.get("paginateChildRows")||e.get("groupHideOpenParents")||pe(e,"print"))}function Ue(e){const t=e.get("autoGroupColumnDef");return!(t!=null&&t.comparator)&&!e.get("treeData")}function Ls(e){const t=e.get("groupAggFiltering");if(typeof t=="function")return e.getCallback("groupAggFiltering");if(t===!0)return()=>!0}function Dr(e){const t=e.get("grandTotalRow");if(t)return t;if(e.get("groupIncludeTotalFooter"))return"bottom"}function Mr(e){const t=e.get("groupTotalRow");if(typeof t=="function")return e.getCallback("groupTotalRow");if(t)return()=>t;const i=e.get("groupIncludeFooter");if(typeof i=="function"){const s=e.getCallback("groupIncludeFooter");return o=>s(o)?"bottom":void 0}return()=>i?"bottom":void 0}function xr(e){return e.exists("groupDisplayType")?e.get("groupDisplayType")==="multipleColumns":e.get("groupHideOpenParents")}function ss(e,t){return t?!1:e.get("groupDisplayType")==="groupRows"}function Ci(e){const t=e.getCallback("getRowId");return t===void 0?t:i=>{let s=t(i);return typeof s!="string"&&(b("The getRowId callback must return a string. The ID ",s," is being cast to a string."),s=String(s)),s}}function Wt(e){return(e==null?void 0:e.checkboxes)??!0}function _i(e){return(e==null?void 0:e.mode)==="multiRow"&&(e.headerCheckbox??!0)}function kl(e){return(e==null?void 0:e.hideDisabledCheckboxes)??!1}function Hl(e){return typeof e.get("rowSelection")!="string"}function Nl(e){return e.get("cellSelection")!==void 0}function Vl(e){const t=e.get("cellSelection");return t!==void 0?typeof t!="boolean"?(t==null?void 0:t.suppressMultiRanges)??!1:!1:e.get("suppressMultiRangeSelection")}function et(e){const t=e.get("cellSelection");return t!==void 0?!!t:e.get("enableRangeSelection")}function Bl(e){var s;const t=e.get("cellSelection");return t!==void 0?typeof t!="boolean"?((s=t.handle)==null?void 0:s.mode)==="range":!1:e.get("enableRangeHandle")}function zo(e){var s;const t=e.get("cellSelection");return t!==void 0?typeof t!="boolean"?((s=t.handle)==null?void 0:s.mode)==="fill":!1:e.get("enableFillHandle")}function Ar(e){const t=e.get("rowSelection")??"single";if(typeof t=="string"){const i=e.get("suppressRowClickSelection"),s=e.get("suppressRowDeselection");return i&&s?!1:i?"enableDeselection":s?"enableSelection":!0}return t.mode==="singleRow"||t.mode==="multiRow"?t.enableClickSelection??!1:!1}function Wl(e){const t=Ar(e);return t===!0||t==="enableSelection"}function _o(e){const t=Ar(e);return t===!0||t==="enableDeselection"}function Zs(e){const t=e.get("rowSelection");return typeof t=="string"?e.get("isRowSelectable"):t==null?void 0:t.isRowSelectable}function Ui(e){const t=e.get("rowSelection");if(typeof t=="string")switch(t){case"multiple":return"multiRow";case"single":return"singleRow";default:return}return t==null?void 0:t.mode}function Tr(e){return Ui(e)==="multiRow"}function zl(e){const t=e.get("rowSelection");return typeof t=="string"?e.get("rowMultiSelectWithClick"):(t==null?void 0:t.enableSelectionWithoutKeys)??!1}function eo(e){const t=e.get("rowSelection");if(typeof t=="string"){const i=e.get("groupSelectsChildren"),s=e.get("groupSelectsFiltered");return i&&s?"filteredDescendants":i?"descendants":"self"}return(t==null?void 0:t.mode)==="multiRow"?t.groupSelects:void 0}function Mt(e){const t=eo(e);return t==="descendants"||t==="filteredDescendants"}function ps(e){return e.isModuleRegistered("@ag-grid-enterprise/set-filter")&&!e.get("suppressSetFilterByDefault")}function V(e){if(!(!e||!e.length))return e[e.length-1]}function pt(e,t,i){return e==null&&t==null?!0:e!=null&&t!=null&&e.length===t.length&&e.every((s,o)=>i?i(s,t[o]):t[o]===s)}function _l(e){return e.sort((t,i)=>t-i)}function Ir(e,t){const i=e.indexOf(t);i>=0&&(e[i]=e[e.length-1],e.pop())}function Ee(e,t){const i=e.indexOf(t);i>=0&&e.splice(i,1)}function Ul(e,t){for(let i=0;iKi(e,s,i))}function Ft(e,t){return e.indexOf(t)>-1}function $l(e){return(e==null?void 0:e.flatMap(t=>t))??[]}function Uo(e,t){t==null||e==null||t.forEach(i=>e.push(i))}var Or="__ag_Grid_Stop_Propagation",jl=["touchstart","touchend","touchmove","touchcancel","scroll"],fs={};function zt(e){e[Or]=!0}function Ze(e){return e[Or]===!0}var Gr=(()=>{const e={select:"input",change:"input",submit:"form",reset:"form",error:"img",load:"img",abort:"img"};return i=>{if(typeof fs[i]=="boolean")return fs[i];const s=document.createElement(e[i]||"div");return i="on"+i,fs[i]=i in s}})();function Os(e,t,i){let s=t;for(;s;){const o=ui(e,s,i);if(o)return o;s=s.parentElement}return null}function ql(e,t){return!t||!e?!1:Ql(t).indexOf(e)>=0}function Yl(e){const t=[];let i=e.target;for(;i;)t.push(i),i=i.parentElement;return t}function Ql(e){const t=e;return t.path?t.path:t.composedPath?t.composedPath():Yl(t)}function Xl(e,t,i,s){const r=Ft(jl,i)?{passive:!0}:void 0;e&&e.addEventListener&&e.addEventListener(t,i,s,r)}var R=class{constructor(){this.destroyFunctions=[],this.destroyed=!1,this.__v_skip=!0,this.propertyListenerId=0,this.lastChangeSetIdLookup={},this.isAlive=()=>!this.destroyed}preWireBeans(e){this.frameworkOverrides=e.frameworkOverrides,this.stubContext=e.context,this.eventService=e.eventService,this.gos=e.gos,this.localeService=e.localeService}getFrameworkOverrides(){return this.frameworkOverrides}destroy(){for(let e=0;enull;e instanceof HTMLElement?Xl(this.getFrameworkOverrides(),e,t,i):e.addEventListener(t,i);const s=()=>(e.removeEventListener(t,i),null);return this.destroyFunctions.push(s),()=>(s(),this.destroyFunctions=this.destroyFunctions.filter(o=>o!==s),null)}setupGridOptionListener(e,t){this.gos.addPropertyEventListener(e,t);const i=()=>(this.gos.removePropertyEventListener(e,t),null);return this.destroyFunctions.push(i),()=>(i(),this.destroyFunctions=this.destroyFunctions.filter(s=>s!==i),null)}addManagedPropertyListener(e,t){return this.destroyed?()=>null:this.setupGridOptionListener(e,t)}addManagedPropertyListeners(e,t){if(this.destroyed)return;const i=e.join("-")+this.propertyListenerId++,s=o=>{if(o.changeSet){if(o.changeSet&&o.changeSet.id===this.lastChangeSetIdLookup[i])return;this.lastChangeSetIdLookup[i]=o.changeSet.id}const r={type:"gridPropertyChanged",changeSet:o.changeSet,source:o.source};t(r)};e.forEach(o=>this.setupGridOptionListener(o,s))}addDestroyFunc(e){this.isAlive()?this.destroyFunctions.push(e):e()}createManagedBean(e,t){const i=this.createBean(e,t);return this.addDestroyFunc(this.destroyBean.bind(this,e,t)),i}createBean(e,t,i){return(t||this.stubContext).createBean(e,i)}destroyBean(e,t){return(t||this.stubContext).destroyBean(e)}destroyBeans(e,t){return(t||this.stubContext).destroyBeans(e)}};function ye(e){return e instanceof Oi}var Oi=class extends R{constructor(e,t,i,s){super(),this.isColumn=!1,this.expandable=!1,this.instanceId=Nr(),this.expandableListenerRemoveCallback=null,this.colGroupDef=e,this.groupId=t,this.expanded=!!e&&!!e.openByDefault,this.padding=i,this.level=s}destroy(){this.expandableListenerRemoveCallback&&this.reset(null,void 0),super.destroy()}reset(e,t){this.colGroupDef=e,this.level=t,this.originalParent=null,this.expandableListenerRemoveCallback&&this.expandableListenerRemoveCallback(),this.children=void 0,this.expandable=void 0}getInstanceId(){return this.instanceId}setOriginalParent(e){this.originalParent=e}getOriginalParent(){return this.originalParent}getLevel(){return this.level}isVisible(){return this.children?this.children.some(e=>e.isVisible()):!1}isPadding(){return this.padding}setExpanded(e){this.expanded=e===void 0?!1:e,this.dispatchLocalEvent({type:"expandedChanged"})}isExpandable(){return this.expandable}isExpanded(){return this.expanded}getGroupId(){return this.groupId}getId(){return this.getGroupId()}setChildren(e){this.children=e}getChildren(){return this.children}getColGroupDef(){return this.colGroupDef}getLeafColumns(){const e=[];return this.addLeafColumns(e),e}addLeafColumns(e){this.children&&this.children.forEach(t=>{ht(t)?e.push(t):ye(t)&&t.addLeafColumns(e)})}getColumnGroupShow(){const e=this.colGroupDef;if(e)return e.columnGroupShow}setupExpandable(){this.setExpandable(),this.expandableListenerRemoveCallback&&this.expandableListenerRemoveCallback();const e=this.onColumnVisibilityChanged.bind(this);this.getLeafColumns().forEach(t=>t.addEventListener("visibleChanged",e)),this.expandableListenerRemoveCallback=()=>{this.getLeafColumns().forEach(t=>t.removeEventListener("visibleChanged",e)),this.expandableListenerRemoveCallback=null}}setExpandable(){if(this.isPadding())return;let e=!1,t=!1,i=!1;const s=this.findChildrenRemovingPadding();for(let r=0,n=s.length;r{i.forEach(s=>{ye(s)&&s.isPadding()?t(s.children):e.push(s)})};return t(this.children),e}onColumnVisibilityChanged(){this.setExpandable()}},kr="ag-Grid-ControlsColumn",Jl=class extends R{constructor(){super(...arguments),this.beanName="controlsColService"}createControlsCols(){const{gos:e}=this,t=e.get("rowSelection");if(!t||typeof t!="object")return[];const i=Wt(t),s=_i(t);if(i||s){const o=e.get("selectionColumnDef"),n={maxWidth:50,resizable:!1,suppressHeaderMenuButton:!0,sortable:!1,suppressMovable:!0,lockPosition:e.get("enableRtl")?"right":"left",comparator(a,c,u,d){const h=u.isSelected(),g=d.isSelected();return h&&g?0:h?1:-1},editable:!1,suppressFillHandle:!0,...o,colId:`${kr}`},l=new oo(n,null,n.colId,!1);return this.createBean(l),[l]}return[]}},os="ag-Grid-AutoColumn";function to(e){const t=[],i=s=>{for(let o=0;ot+i.getActualWidth(),0)}function at(e,t,i){const s={};if(!t)return;tt(null,t,r=>{s[r.getInstanceId()]=r}),i&&tt(null,i,r=>{s[r.getInstanceId()]=null});const o=Object.values(s).filter(r=>r!=null);e.destroyBeans(o)}function Gs(e){return e.getId().startsWith(os)}function vi(e){return e.getColId().startsWith(kr)}function Gi(e){let t=[];return e instanceof Array?e.some(s=>typeof s!="string")?b("if colDef.type is supplied an array it should be of type 'string[]'"):t=e:typeof e=="string"?t=e.split(","):b("colDef.type should be of type 'string' | 'string[]'"),t}var io=class{constructor(e){this.frameworkOverrides=e,this.wrappedListeners=new Map,this.wrappedGlobalListeners=new Map}wrap(e){let t=e;return this.frameworkOverrides.shouldWrapOutgoing&&(t=i=>{this.frameworkOverrides.wrapOutgoing(()=>e(i))},this.wrappedListeners.set(e,t)),t}wrapGlobal(e){let t=e;return this.frameworkOverrides.shouldWrapOutgoing&&(t=(i,s)=>{this.frameworkOverrides.wrapOutgoing(()=>e(i,s))},this.wrappedGlobalListeners.set(e,t)),t}unwrap(e){return this.wrappedListeners.get(e)??e}unwrapGlobal(e){return this.wrappedGlobalListeners.get(e)??e}},so=new Set(["__proto__","constructor","prototype"]);function Ne(e,t){if(e!=null){if(Array.isArray(e)){for(let i=0;i{if(t&&t.indexOf(o)>=0||so.has(o))return;const r=i[o];Hs(r)&&r.constructor===Object?s[o]=ks(r):s[o]=r}),s}function Ko(e){if(!e)return[];const t=Object;if(typeof t.values=="function")return t.values(e);const i=[];for(const s in e)e.hasOwnProperty(s)&&e.propertyIsEnumerable(s)&&i.push(e[s]);return i}function Re(e,t,i=!0,s=!1){M(t)&&Ne(t,(o,r)=>{if(so.has(o))return;let n=e[o];n!==r&&(s&&n==null&&r!=null&&typeof r=="object"&&r.constructor===Object&&(n={},e[o]=n),Hs(r)&&Hs(n)&&!Array.isArray(n)?Re(n,r,i,s):(i||r!==void 0)&&(e[o]=r))})}function ri(e,t,i){if(!t||!e)return;if(!i)return e[t];const s=t.split(".");let o=e;for(let r=0;r=0&&!e,this.tooltipFieldContainsDots=M(this.colDef.tooltipField)&&this.colDef.tooltipField.indexOf(".")>=0&&!e}initMinAndMaxWidths(){const e=this.colDef;this.minWidth=e.minWidth??this.gos.environment.getDefaultColumnMinWidth(),this.maxWidth=e.maxWidth??Number.MAX_SAFE_INTEGER}initTooltip(){this.tooltipEnabled=M(this.colDef.tooltipField)||M(this.colDef.tooltipValueGetter)||M(this.colDef.tooltipComponent)}resetActualWidth(e){const t=this.calculateColInitialWidth(this.colDef);this.setActualWidth(t,e,!0)}calculateColInitialWidth(e){let t;const i=Rt(e.width),s=Rt(e.initialWidth);return i!=null?t=i:s!=null?t=s:t=200,Math.max(Math.min(t,this.maxWidth),this.minWidth)}isEmptyGroup(){return!1}isRowGroupDisplayed(e){if(B(this.colDef)||B(this.colDef.showRowGroup))return!1;const t=this.colDef.showRowGroup===!0,i=this.colDef.showRowGroup===e;return t||i}isPrimary(){return this.primary}isFilterAllowed(){return!!this.colDef.filter}isFieldContainsDots(){return this.fieldContainsDots}isTooltipEnabled(){return this.tooltipEnabled}isTooltipFieldContainsDots(){return this.tooltipFieldContainsDots}getHighlighted(){return this.highlighted}addEventListener(e,t){var s;this.frameworkOverrides.shouldWrapOutgoing&&!this.frameworkEventListenerService&&(this.columnEventService.setFrameworkOverrides(this.frameworkOverrides),this.frameworkEventListenerService=new io(this.frameworkOverrides));const i=((s=this.frameworkEventListenerService)==null?void 0:s.wrap(t))??t;this.columnEventService.addEventListener(e,i)}removeEventListener(e,t){var s;const i=((s=this.frameworkEventListenerService)==null?void 0:s.unwrap(t))??t;this.columnEventService.removeEventListener(e,i)}createColumnFunctionCallbackParams(e){return this.gos.addGridCommonParams({node:e,data:e.data,column:this,colDef:this.colDef})}isSuppressNavigable(e){if(typeof this.colDef.suppressNavigable=="boolean")return this.colDef.suppressNavigable;if(typeof this.colDef.suppressNavigable=="function"){const t=this.createColumnFunctionCallbackParams(e),i=this.colDef.suppressNavigable;return i(t)}return!1}isCellEditable(e){if(e.group){if(this.gos.get("treeData")){if(!e.data&&!this.gos.get("enableGroupEdit"))return!1}else if(!this.gos.get("enableGroupEdit"))return!1}return this.isColumnFunc(e,this.colDef.editable)}isSuppressFillHandle(){return!!this.colDef.suppressFillHandle}isAutoHeight(){return!!this.colDef.autoHeight}isAutoHeaderHeight(){return!!this.colDef.autoHeaderHeight}isRowDrag(e){return this.isColumnFunc(e,this.colDef.rowDrag)}isDndSource(e){return this.isColumnFunc(e,this.colDef.dndSource)}isCellCheckboxSelection(e){const t=this.gos.get("rowSelection");if(t&&typeof t!="string"){const i=vi(this)&&Wt(t);return this.isColumnFunc(e,i)}else return this.isColumnFunc(e,this.colDef.checkboxSelection)}isSuppressPaste(e){return this.isColumnFunc(e,this.colDef?this.colDef.suppressPaste:null)}isResizable(){return!!this.getColDefValue("resizable")}getColDefValue(e){return this.colDef[e]??Zl[e]}isColumnFunc(e,t){if(typeof t=="boolean")return t;if(typeof t=="function"){const i=this.createColumnFunctionCallbackParams(e);return t(i)}return!1}setHighlighted(e){this.highlighted!==e&&(this.highlighted=e,this.columnEventService.dispatchEvent(this.createColumnEvent("headerHighlightChanged","uiColumnMoved")))}setMoving(e,t){this.moving=e,this.columnEventService.dispatchEvent(this.createColumnEvent("movingChanged",t))}createColumnEvent(e,t){return this.gos.addGridCommonParams({type:e,column:this,columns:[this],source:t})}isMoving(){return this.moving}getSort(){return this.sort}setSort(e,t){this.sort!==e&&(this.sort=e,this.columnEventService.dispatchEvent(this.createColumnEvent("sortChanged",t))),this.dispatchStateUpdatedEvent("sort")}isSortable(){return!!this.getColDefValue("sortable")}isSortAscending(){return this.sort==="asc"}isSortDescending(){return this.sort==="desc"}isSortNone(){return B(this.sort)}isSorting(){return M(this.sort)}getSortIndex(){return this.sortIndex}setSortIndex(e){this.sortIndex=e,this.dispatchStateUpdatedEvent("sortIndex")}setMenuVisible(e,t){this.menuVisible!==e&&(this.menuVisible=e,this.columnEventService.dispatchEvent(this.createColumnEvent("menuVisibleChanged",t)))}isMenuVisible(){return this.menuVisible}setAggFunc(e){this.aggFunc=e,this.dispatchStateUpdatedEvent("aggFunc")}getAggFunc(){return this.aggFunc}getLeft(){return this.left}getOldLeft(){return this.oldLeft}getRight(){return this.left+this.actualWidth}setLeft(e,t){this.oldLeft=this.left,this.left!==e&&(this.left=e,this.columnEventService.dispatchEvent(this.createColumnEvent("leftChanged",t)))}isFilterActive(){return this.filterActive}setFilterActive(e,t,i){this.filterActive!==e&&(this.filterActive=e,this.columnEventService.dispatchEvent(this.createColumnEvent("filterActiveChanged",t)));const s=this.createColumnEvent("filterChanged",t);i&&Re(s,i),this.columnEventService.dispatchEvent(s)}isHovered(){return this.columnHoverService.isHovered(this)}setPinned(e){e===!0||e==="left"?this.pinned="left":e==="right"?this.pinned="right":this.pinned=null,this.dispatchStateUpdatedEvent("pinned")}setFirstRightPinned(e,t){this.firstRightPinned!==e&&(this.firstRightPinned=e,this.columnEventService.dispatchEvent(this.createColumnEvent("firstRightPinnedChanged",t)))}setLastLeftPinned(e,t){this.lastLeftPinned!==e&&(this.lastLeftPinned=e,this.columnEventService.dispatchEvent(this.createColumnEvent("lastLeftPinnedChanged",t)))}isFirstRightPinned(){return this.firstRightPinned}isLastLeftPinned(){return this.lastLeftPinned}isPinned(){return this.pinned==="left"||this.pinned==="right"}isPinnedLeft(){return this.pinned==="left"}isPinnedRight(){return this.pinned==="right"}getPinned(){return this.pinned}setVisible(e,t){const i=e===!0;this.visible!==i&&(this.visible=i,this.columnEventService.dispatchEvent(this.createColumnEvent("visibleChanged",t))),this.dispatchStateUpdatedEvent("hide")}isVisible(){return this.visible}isSpanHeaderHeight(){return!this.getColDef().suppressSpanHeaderHeight}getColumnGroupPaddingInfo(){let e=this.getParent();if(!e||!e.isPadding())return{numberOfParents:0,isSpanningTotal:!1};const t=e.getPaddingLevel()+1;let i=!0;for(;e;){if(!e.isPadding()){i=!1;break}e=e.getParent()}return{numberOfParents:t,isSpanningTotal:i}}getColDef(){return this.colDef}getDefinition(){return this.colDef}getColumnGroupShow(){return this.colDef.columnGroupShow}getColId(){return this.colId}getId(){return this.colId}getUniqueId(){return this.colId}getActualWidth(){return this.actualWidth}getAutoHeaderHeight(){return this.autoHeaderHeight}setAutoHeaderHeight(e){const t=e!==this.autoHeaderHeight;return this.autoHeaderHeight=e,t}createBaseColDefParams(e){return this.gos.addGridCommonParams({node:e,data:e.data,colDef:this.colDef,column:this})}getColSpan(e){if(B(this.colDef.colSpan))return 1;const t=this.createBaseColDefParams(e),i=this.colDef.colSpan(t);return Math.max(i,1)}getRowSpan(e){if(B(this.colDef.rowSpan))return 1;const t=this.createBaseColDefParams(e),i=this.colDef.rowSpan(t);return Math.max(i,1)}setActualWidth(e,t,i=!1){e=Math.max(e,this.minWidth),e=Math.min(e,this.maxWidth),this.actualWidth!==e&&(this.actualWidth=e,this.flex&&t!=="flex"&&t!=="gridInitializing"&&(this.flex=null),i||this.fireColumnWidthChangedEvent(t)),this.dispatchStateUpdatedEvent("width")}fireColumnWidthChangedEvent(e){this.columnEventService.dispatchEvent(this.createColumnEvent("widthChanged",e))}isGreaterThanMax(e){return e>this.maxWidth}getMinWidth(){return this.minWidth}getMaxWidth(){return this.maxWidth}getFlex(){return this.flex||0}setFlex(e){this.flex!==e&&(this.flex=e),this.dispatchStateUpdatedEvent("flex")}setMinimum(e){this.setActualWidth(this.minWidth,e)}setRowGroupActive(e,t){this.rowGroupActive!==e&&(this.rowGroupActive=e,this.columnEventService.dispatchEvent(this.createColumnEvent("columnRowGroupChanged",t))),this.dispatchStateUpdatedEvent("rowGroup")}isRowGroupActive(){return this.rowGroupActive}setPivotActive(e,t){this.pivotActive!==e&&(this.pivotActive=e,this.columnEventService.dispatchEvent(this.createColumnEvent("columnPivotChanged",t))),this.dispatchStateUpdatedEvent("pivot")}isPivotActive(){return this.pivotActive}isAnyFunctionActive(){return this.isPivotActive()||this.isRowGroupActive()||this.isValueActive()}isAnyFunctionAllowed(){return this.isAllowPivot()||this.isAllowRowGroup()||this.isAllowValue()}setValueActive(e,t){this.aggregationActive!==e&&(this.aggregationActive=e,this.columnEventService.dispatchEvent(this.createColumnEvent("columnValueChanged",t)))}isValueActive(){return this.aggregationActive}isAllowPivot(){return this.colDef.enablePivot===!0}isAllowValue(){return this.colDef.enableValue===!0}isAllowRowGroup(){return this.colDef.enableRowGroup===!0}dispatchStateUpdatedEvent(e){this.columnEventService.dispatchEvent({type:"columnStateUpdated",key:e})}},ta={numericColumn:{headerClass:"ag-right-aligned-header",cellClass:"ag-right-aligned-cell"},rightAligned:{headerClass:"ag-right-aligned-header",cellClass:"ag-right-aligned-cell"}},ia=class{constructor(){this.existingKeys={}}addExistingKeys(e){for(let t=0;t{ye(h)&&h.setupExpandable(),h.setOriginalParent(g)}),{columnTree:u,treeDept:c}}extractExistingTreeData(e){const t=[],i=[],s=[];return e&&tt(null,e,o=>{if(ye(o)){const r=o;i.push(r)}else{const r=o;s.push(r.getId()),t.push(r)}}),{existingCols:t,existingGroups:i,existingColKeys:s}}balanceTreeForAutoCols(e,t){const i=[],s=this.findDepth(t);return e.forEach(o=>{let r=o;for(let n=s-1;n>=0;n--){const l=new Oi(null,`FAKE_PATH_${o.getId()}}_${n}`,!0,n);this.createBean(l),l.setChildren([r]),r.setOriginalParent(l),r=l}s===0&&o.setOriginalParent(null),i.push(r)}),[i,s]}findDepth(e){let t=0,i=e;for(;i&&i[0]&&ye(i[0]);)t++,i=i[0].getChildren();return t}balanceColumnTree(e,t,i,s){const o=[];for(let r=0;r=t;c--){const u=s.getUniqueKey(null,null),d=this.createMergedColGroupDef(null),h=new Oi(d,u,!0,t);this.createBean(h),a&&a.setChildren([h]),a=h,l||(l=a)}if(l&&a)if(o.push(l),e.some(u=>ye(u))){a.setChildren([n]);continue}else{a.setChildren(e);break}o.push(n)}}return o}findMaxDept(e,t){let i=t;for(let s=0;s{o in i?b(`the column type '${o}' is a default column type and cannot be overridden.`):(r.type&&b("Column type definitions 'columnTypes' with a 'type' attribute are not supported because a column type cannot refer to another column type. Only column definitions 'columnDefs' can use the 'type' attribute to refer to a column type."),i[o]=r)}),e.forEach(o=>{const r=i[o.trim()];r?Re(t,r,!1,!0):b("colDef.type '"+o+"' does not correspond to defined gridOptions.columnTypes")})}isColumnGroup(e){return e.children!==void 0}};function tt(e,t,i){if(t)for(let s=0;sthis.refreshAll(vt(t.source))),this.addManagedPropertyListener("rowSelection",t=>{this.onSelectionOptionsChanged(t.currentValue,t.previousValue,vt(t.source))}),this.addManagedPropertyListener("autoGroupColumnDef",t=>this.onAutoGroupColumnDefChanged(vt(t.source))),this.addManagedPropertyListeners(["defaultColDef","defaultColGroupDef","columnTypes","suppressFieldDotNotation"],t=>this.recreateColumnDefs(vt(t.source))),this.addManagedPropertyListener("pivotMode",t=>this.setPivotMode(this.gos.get("pivotMode"),vt(t.source))),this.addManagedEventListeners({firstDataRendered:()=>this.onFirstDataRendered()})}createColsFromColDefs(e){var c,u,d;const t=this.colDefs?this.columnApplyStateService.compareColumnStatesAndDispatchEvents(e):void 0;this.valueCache.expire();const i=(c=this.colDefCols)==null?void 0:c.list,s=(u=this.colDefCols)==null?void 0:u.tree,o=this.columnFactory.createColumnTree(this.colDefs,!0,s,e);at(this.context,(d=this.colDefCols)==null?void 0:d.tree,o.columnTree);const r=o.columnTree,n=o.treeDept,l=to(r),a={};l.forEach(h=>a[h.getId()]=h),this.colDefCols={tree:r,treeDepth:n,list:l,map:a},this.funcColsService.extractCols(e,i),this.ready=!0,this.refreshCols(!0),this.visibleColsService.refresh(e),this.columnViewportService.checkViewportColumns(),this.eventDispatcher.everythingChanged(e),t&&(this.changeEventsDispatching=!0,t(),this.changeEventsDispatching=!1),this.eventDispatcher.newColumnsLoaded(e),e==="gridInitializing"&&this.columnSizeService.applyAutosizeStrategy()}refreshCols(e){var o,r,n;if(!this.colDefCols)return;const t=(o=this.cols)==null?void 0:o.tree;this.saveColOrder(),this.selectCols(),this.createAutoCols(),this.addAutoCols(),this.createControlsCols(),this.addControlsCols();const i=Ol(this.gos,this.showingPivotResult);(!e||i)&&this.restoreColOrder(),this.positionLockedCols(),(r=this.showRowGroupColsService)==null||r.refresh(),(n=this.quickFilterService)==null||n.refreshQuickFilterCols(),this.setColSpanActive(),this.setAutoHeightActive(),this.visibleColsService.clear(),this.columnViewportService.clear(),!pt(t,this.cols.tree)&&this.eventDispatcher.gridColumns()}selectCols(){const e=this.pivotResultColsService.getPivotResultCols();if(this.showingPivotResult=e!=null,e){const{map:t,list:i,tree:s,treeDepth:o}=e;this.cols={list:i.slice(),map:{...t},tree:s.slice(),treeDepth:o},e.list.some(n=>{var l;return((l=this.cols)==null?void 0:l.map[n.getColId()])!==void 0})||(this.lastPivotOrder=null)}else{const{map:t,list:i,tree:s,treeDepth:o}=this.colDefCols;this.cols={list:i.slice(),map:{...t},tree:s.slice(),treeDepth:o}}}getColsToShow(){const e=this.isPivotMode()&&!this.isShowingPivotResult(),t=this.funcColsService.getValueColumns();return this.cols.list.filter(s=>{const o=Gs(s);if(e){const r=t&&Ft(t,s);return o||r}else return o||s.isVisible()})}addAutoCols(){this.autoCols!=null&&(this.cols.list=this.autoCols.list.concat(this.cols.list),this.cols.tree=this.autoCols.tree.concat(this.cols.tree),$o(this.cols))}createAutoCols(){var m;const e=ss(this.gos,this.pivotMode),t=this.pivotMode?this.gos.get("pivotSuppressAutoColumn"):this.isSuppressAutoCol(),i=this.funcColsService.getRowGroupColumns(),o=!(i.length>0||this.gos.get("treeData"))||t||e,r=()=>{this.autoCols&&(at(this.context,this.autoCols.tree),this.autoCols=null)};if(o||!this.autoColService){r();return}const n=this.autoColService.createAutoCols(i)??[],l=qo(n,((m=this.autoCols)==null?void 0:m.list)||null),a=this.cols.treeDepth,u=(this.autoCols?this.autoCols.treeDepth:-1)==a;if(l&&u)return;r();const[d,h]=this.columnFactory.balanceTreeForAutoCols(n,this.cols.tree);this.autoCols={list:n,tree:d,treeDepth:h,map:{}};const g=C=>{if(!C)return null;const f=C.filter(v=>!Gs(v));return[...n,...f]};this.lastOrder=g(this.lastOrder),this.lastPivotOrder=g(this.lastPivotOrder)}createControlsCols(){var c,u,d;const e=()=>{var h;at(this.context,(h=this.controlsCols)==null?void 0:h.tree),this.controlsCols=null};this.controlsColService||e();const t=this.cols.treeDepth,s=(((c=this.controlsCols)==null?void 0:c.treeDepth)??-1)==t,o=((u=this.controlsColService)==null?void 0:u.createControlsCols())??[];if(qo(o,((d=this.controlsCols)==null?void 0:d.list)??[])&&s)return;e();const[n,l]=this.columnFactory.balanceTreeForAutoCols(o,this.cols.tree);this.controlsCols={list:o,tree:n,treeDepth:l,map:{}};const a=h=>{if(!h)return null;const g=h.filter(m=>!vi(m));return[...o,...g]};this.lastOrder=a(this.lastOrder),this.lastPivotOrder=a(this.lastPivotOrder)}addControlsCols(){this.controlsCols!=null&&(this.cols.list=this.controlsCols.list.concat(this.cols.list),this.cols.tree=this.controlsCols.tree.concat(this.cols.tree),$o(this.cols))}refreshAll(e){this.isReady()&&(this.refreshCols(!1),this.visibleColsService.refresh(e))}setColsVisible(e,t=!1,i){this.columnApplyStateService.applyColumnState({state:e.map(s=>({colId:typeof s=="string"?s:s.getColId(),hide:!t}))},i)}setColsPinned(e,t,i){if(!this.cols||Ae(e))return;if(pe(this.gos,"print")){b("Changing the column pinning status is not allowed with domLayout='print'");return}this.columnAnimationService.start();let s;t===!0||t==="left"?s="left":t==="right"?s="right":s=null;const o=[];e.forEach(r=>{if(!r)return;const n=this.getCol(r);n&&n.getPinned()!==s&&(n.setPinned(s),o.push(n))}),o.length&&(this.visibleColsService.refresh(i),this.eventDispatcher.columnPinned(o,i)),this.columnAnimationService.finish()}setColumnGroupOpened(e,t,i){let s;ye(e)?s=e.getId():s=e||"",this.columnGroupStateService.setColumnGroupState([{groupId:s,open:t}],i)}getProvidedColGroup(e){var i;let t=null;return tt(null,(i=this.cols)==null?void 0:i.tree,s=>{ye(s)&&s.getId()===e&&(t=s)}),t}isColGroupLocked(e){const t=this.gos.get("groupLockGroupColumns");if(!e.isRowGroupActive()||t===0)return!1;if(t===-1)return!0;const s=this.funcColsService.getRowGroupColumns().findIndex(o=>o.getColId()===e.getColId());return t>s}isSuppressAutoCol(){return this.gos.get("groupDisplayType")==="custom"?!0:this.gos.get("treeDataDisplayType")==="custom"}setAutoHeightActive(){this.autoHeightActive=this.cols.list.some(e=>e.isVisible()&&e.isAutoHeight()),this.autoHeightActive&&(this.autoHeightActiveAtLeastOnce=!0,ee(this.gos)||it(this.gos)||b("autoHeight columns only work with Client Side Row Model and Server Side Row Model."))}restoreColOrder(){const e=this.showingPivotResult?this.lastPivotOrder:this.lastOrder;if(!e)return;const t=new Map(e.map((a,c)=>[a,c]));if(!this.cols.list.some(a=>t.has(a)))return;const s=new Map(this.cols.list.map(a=>[a,!0])),o=e.filter(a=>s.has(a)),r=new Map(o.map(a=>[a,!0])),n=this.cols.list.filter(a=>!r.has(a)),l=o.slice();n.forEach(a=>{let c=a.getOriginalParent();if(!c){l.push(a);return}const u=[];for(;!u.length&&c;)c.getLeafColumns().forEach(m=>{const C=l.indexOf(m)>=0,f=u.indexOf(m)<0;C&&f&&u.push(m)}),c=c.getOriginalParent();if(!u.length){l.push(a);return}const d=u.map(g=>l.indexOf(g)),h=Math.max(...d);Ki(l,a,h+1)}),this.cols.list=l}sortColsLikeKeys(e){if(this.cols==null)return;let t=[];const i={};e.forEach(o=>{if(i[o])return;const r=this.cols.map[o];r&&(t.push(r),i[o]=!0)});let s=0;if(this.cols.list.forEach(o=>{const r=o.getColId();if(i[r]!=null)return;r.startsWith(os)?Ki(t,o,s++):t.push(o)}),t=this.columnMoveService.placeLockedColumns(t),!this.columnMoveService.doesMovePassMarryChildren(t)){b("Applying column order broke a group where columns should be married together. Applying new order has been discarded.");return}this.cols.list=t}sortColsLikeCols(e){!e||e.length<=1||e.filter(i=>this.cols.list.indexOf(i)<0).length>0||e.sort((i,s)=>{const o=this.cols.list.indexOf(i),r=this.cols.list.indexOf(s);return o-r})}resetColDefIntoCol(e,t){const i=e.getUserProvidedColDef();if(!i)return!1;const s=this.columnFactory.addColumnDefaultAndTypes(i,e.getColId());return e.setColDef(s,i,t),!0}queueResizeOperations(){this.shouldQueueResizeOperations=!0}isShouldQueueResizeOperations(){return this.shouldQueueResizeOperations}processResizeOperations(){this.shouldQueueResizeOperations=!1,this.resizeOperationQueue.forEach(e=>e()),this.resizeOperationQueue=[]}pushResizeOperation(e){this.resizeOperationQueue.push(e)}moveInCols(e,t,i){var s;Lr((s=this.cols)==null?void 0:s.list,e,t),this.visibleColsService.refresh(i)}positionLockedCols(){this.cols.list=this.columnMoveService.placeLockedColumns(this.cols.list)}saveColOrder(){var e,t;this.showingPivotResult?this.lastPivotOrder=(e=this.cols)==null?void 0:e.list:this.lastOrder=(t=this.cols)==null?void 0:t.list}getColumnDefs(){if(!this.colDefCols)return;const e=this.colDefCols.list.slice();this.showingPivotResult?e.sort((s,o)=>this.lastOrder.indexOf(s)-this.lastOrder.indexOf(o)):this.lastOrder&&e.sort((s,o)=>this.cols.list.indexOf(s)-this.cols.list.indexOf(o));const t=this.funcColsService.getRowGroupColumns(),i=this.funcColsService.getPivotColumns();return this.columnDefFactory.buildColumnDefs(e,t,i)}isShowingPivotResult(){return this.showingPivotResult}isChangeEventsDispatching(){return this.changeEventsDispatching}isColSpanActive(){return this.colSpanActive}isProvidedColGroupsPresent(){var e;return((e=this.colDefCols)==null?void 0:e.treeDepth)>0}setColSpanActive(){this.colSpanActive=this.cols.list.some(e=>e.getColDef().colSpan!=null)}isAutoRowHeightActive(){return this.autoHeightActive}wasAutoRowHeightEverActive(){return this.autoHeightActiveAtLeastOnce}getHeaderRowCount(){return this.cols?this.cols.treeDepth+1:-1}isReady(){return this.ready}isPivotMode(){return this.pivotMode}setPivotMode(e,t){e===this.pivotMode||!this.isPivotSettingAllowed(this.pivotMode)||(this.pivotMode=e,this.ready&&(this.refreshCols(!1),this.visibleColsService.refresh(t),this.eventDispatcher.pivotModeChanged()))}isPivotSettingAllowed(e){return e&&this.gos.get("treeData")?(b("Pivot mode not available with treeData."),!1):!0}isPivotActive(){const e=this.funcColsService.getPivotColumns();return this.pivotMode&&!Ae(e)}recreateColumnDefs(e){this.cols&&(this.autoCols&&this.autoColService.updateAutoCols(this.autoCols.list,e),this.createColsFromColDefs(e))}setColumnDefs(e,t){this.colDefs=e,this.createColsFromColDefs(t)}destroy(){var e,t,i;at(this.context,(e=this.colDefCols)==null?void 0:e.tree),at(this.context,(t=this.autoCols)==null?void 0:t.tree),at(this.context,(i=this.controlsCols)==null?void 0:i.tree),super.destroy()}getColTree(){return this.cols.tree}getColDefColTree(){return this.colDefCols.tree}getColDefCols(){var e;return(e=this.colDefCols)!=null&&e.list?this.colDefCols.list:null}getCols(){var e;return((e=this.cols)==null?void 0:e.list)??[]}getAllCols(){var i,s,o;const e=this.pivotResultColsService.getPivotResultCols(),t=e==null?void 0:e.list;return[((i=this.colDefCols)==null?void 0:i.list)??[],((s=this.autoCols)==null?void 0:s.list)??[],((o=this.controlsCols)==null?void 0:o.list)??[],t??[]].flat()}getColsForKeys(e){return e?e.map(t=>this.getCol(t)).filter(t=>t!=null):[]}getColDefCol(e){var t;return(t=this.colDefCols)!=null&&t.list?this.getColFromCollection(e,this.colDefCols):null}getCol(e){return e==null?null:this.getColFromCollection(e,this.cols)}getColFromCollection(e,t){if(t==null)return null;const{map:i,list:s}=t;if(typeof e=="string"&&i[e])return i[e];for(let o=0;ojo(i,e)))??null}getAutoCols(){var e;return((e=this.autoCols)==null?void 0:e.list)??null}setColHeaderHeight(e,t){e.setAutoHeaderHeight(t)&&(e.isColumn?this.eventDispatcher.headerHeight(e):this.eventDispatcher.groupHeaderHeight(e))}getGroupRowsHeight(){const e=[],t=this.ctrlsService.getHeaderRowContainerCtrls();for(const i of t){if(!i)continue;const s=i.getGroupRowCount()||0;for(let o=0;on)&&(e[o]=l)}}}return e}getColumnGroupHeaderRowHeight(e){const t=this.isPivotMode()?this.getPivotGroupHeaderHeight():this.getGroupHeaderHeight();let i=0;const s=e.getHeaderCtrls();for(const o of s){const r=o.getColumn();if(r.isAutoHeaderHeight()){const n=r.getAutoHeaderHeight();n!=null&&n>i&&(i=n)}}return Math.max(t,i)}getColumnHeaderRowHeight(){const e=this.isPivotMode()?this.getPivotHeaderHeight():this.getHeaderHeight(),i=this.visibleColsService.getAllCols().filter(s=>s.isAutoHeaderHeight()).map(s=>s.getAutoHeaderHeight()||0);return Math.max(e,...i)}getHeaderHeight(){return this.gos.get("headerHeight")??this.environment.getDefaultHeaderHeight()}getFloatingFiltersHeight(){return this.gos.get("floatingFiltersHeight")??this.getHeaderHeight()}getGroupHeaderHeight(){return this.gos.get("groupHeaderHeight")??this.getHeaderHeight()}getPivotHeaderHeight(){return this.gos.get("pivotHeaderHeight")??this.getHeaderHeight()}getPivotGroupHeaderHeight(){return this.gos.get("pivotGroupHeaderHeight")??this.getGroupHeaderHeight()}onFirstDataRendered(){const e=this.gos.get("autoSizeStrategy");if((e==null?void 0:e.type)!=="fitCellContents")return;const{colIds:t,skipHeader:i}=e;setTimeout(()=>{t?this.columnAutosizeService.autoSizeCols({colKeys:t,skipHeader:i,source:"autosizeColumns"}):this.columnAutosizeService.autoSizeAllColumns("autosizeColumns",i)})}onAutoGroupColumnDefChanged(e){this.autoCols&&this.autoColService.updateAutoCols(this.autoCols.list,e)}onSelectionOptionsChanged(e,t,i){const s=t&&typeof t!="string"?Wt(t):void 0,o=e&&typeof e!="string"?Wt(e):void 0,r=s!==o,n=t&&typeof t!="string"?_i(t):void 0,l=e&&typeof e!="string"?_i(e):void 0;(r||n!==l)&&this.refreshAll(i)}};function vt(e){return e==="gridOptionsUpdated"?"gridOptionsChanged":e}function $o(e){e.map={},e.list.forEach(t=>e.map[t.getId()]=t)}function jo(e,t){const i=e===t,s=e.getColDef()===t,o=e.getColId()==t;return i||s||o}function qo(e,t){return pt(e,t,(i,s)=>i.getColId()===s.getColId())}var ra=class extends R{constructor(){super(...arguments),this.beanName="columnAutosizeService",this.timesDelayed=0}wireBeans(e){this.columnModel=e.columnModel,this.visibleColsService=e.visibleColsService,this.animationFrameService=e.animationFrameService,this.autoWidthCalculator=e.autoWidthCalculator,this.eventDispatcher=e.columnEventDispatcher,this.ctrlsService=e.ctrlsService,this.renderStatusService=e.renderStatusService}autoSizeCols(e){if(this.columnModel.isShouldQueueResizeOperations()){this.columnModel.pushResizeOperation(()=>this.autoSizeCols(e));return}const{colKeys:t,skipHeader:i,skipHeaderGroups:s,stopAtGroup:o,source:r="api"}=e;if(this.animationFrameService.flushAllFrames(),this.timesDelayed<5&&this.renderStatusService&&!this.renderStatusService.areHeaderCellsRendered()){this.timesDelayed++,setTimeout(()=>this.autoSizeCols(e));return}this.timesDelayed=0;const n=[];let l=-1;const a=i??this.gos.get("skipHeaderOnAutoSize"),c=s??a;for(;l!==0;){l=0;const u=[];t.forEach(d=>{if(!d)return;const h=this.columnModel.getCol(d);if(!h||n.indexOf(h)>=0)return;const g=this.autoWidthCalculator.getPreferredWidthForColumn(h,a);if(g>0){const m=this.normaliseColumnWidth(h,g);h.setActualWidth(m,r),n.push(h),l++}u.push(h)}),u.length&&this.visibleColsService.refresh(r)}c||this.autoSizeColumnGroupsByColumns(t,r,o),this.eventDispatcher.columnResized(n,!0,"autosizeColumns")}autoSizeColumn(e,t,i){e&&this.autoSizeCols({colKeys:[e],skipHeader:i,skipHeaderGroups:!0,source:t})}autoSizeColumnGroupsByColumns(e,t,i){const s=new Set;this.columnModel.getColsForKeys(e).forEach(l=>{let a=l.getParent();for(;a&&a!=i;)a.isPadding()||s.add(a),a=a.getParent()});let r;const n=[];for(const l of s){for(const a of this.ctrlsService.getHeaderRowContainerCtrls())if(r=a.getHeaderCtrlForColumn(l),r)break;r&&r.resizeLeafColumnsToFit(t)}return n}autoSizeAllColumns(e,t){if(this.columnModel.isShouldQueueResizeOperations()){this.columnModel.pushResizeOperation(()=>this.autoSizeAllColumns(e,t));return}const i=this.visibleColsService.getAllCols();this.autoSizeCols({colKeys:i,skipHeader:t,source:e})}normaliseColumnWidth(e,t){const i=e.getMinWidth();tthis.rowGroupCols.push(e),removeGroupCol:e=>Ee(this.rowGroupCols,e),addPivotCol:e=>this.pivotCols.push(e),removePivotCol:e=>Ee(this.pivotCols,e),addValueCol:e=>this.valueCols.push(e),removeValueCol:e=>Ee(this.valueCols,e)}}getSourceColumnsForGroupColumn(e){const t=e.getColDef().showRowGroup;if(!t)return null;if(t===!0)return this.rowGroupCols.slice(0);const i=this.columnModel.getColDefCol(t);return i?[i]:null}sortRowGroupColumns(e){this.rowGroupCols.sort(e)}sortPivotColumns(e){this.pivotCols.sort(e)}getValueColumns(){return this.valueCols?this.valueCols:[]}getPivotColumns(){return this.pivotCols?this.pivotCols:[]}getRowGroupColumns(){return this.rowGroupCols?this.rowGroupCols:[]}isRowGroupEmpty(){return Ae(this.rowGroupCols)}setColumnAggFunc(e,t,i){if(!e)return;const s=this.columnModel.getColDefCol(e);s&&(s.setAggFunc(t),this.eventDispatcher.columnChanged("columnValueChanged",[s],i))}setRowGroupColumns(e,t){this.setColList(e,this.rowGroupCols,"columnRowGroupChanged",!0,!0,(i,s)=>this.setRowGroupActive(i,s,t),t)}setRowGroupActive(e,t,i){e!==t.isRowGroupActive()&&(t.setRowGroupActive(e,i),e&&!this.gos.get("suppressRowGroupHidesColumns")&&this.columnModel.setColsVisible([t],!1,i),!e&&!this.gos.get("suppressMakeColumnVisibleAfterUnGroup")&&this.columnModel.setColsVisible([t],!0,i))}addRowGroupColumns(e,t){this.updateColList(e,this.rowGroupCols,!0,!0,i=>this.setRowGroupActive(!0,i,t),"columnRowGroupChanged",t)}removeRowGroupColumns(e,t){this.updateColList(e,this.rowGroupCols,!1,!0,i=>this.setRowGroupActive(!1,i,t),"columnRowGroupChanged",t)}addPivotColumns(e,t){this.updateColList(e,this.pivotCols,!0,!1,i=>i.setPivotActive(!0,t),"columnPivotChanged",t)}setPivotColumns(e,t){this.setColList(e,this.pivotCols,"columnPivotChanged",!0,!1,(i,s)=>{s.setPivotActive(i,t)},t)}removePivotColumns(e,t){this.updateColList(e,this.pivotCols,!1,!1,i=>i.setPivotActive(!1,t),"columnPivotChanged",t)}setValueColumns(e,t){this.setColList(e,this.valueCols,"columnValueChanged",!1,!1,(i,s)=>this.setValueActive(i,s,t),t)}setValueActive(e,t,i){if(e!==t.isValueActive()&&(t.setValueActive(e,i),e&&!t.getAggFunc()&&this.aggFuncService)){const s=this.aggFuncService.getDefaultAggFunc(t);t.setAggFunc(s)}}addValueColumns(e,t){this.updateColList(e,this.valueCols,!0,!1,i=>this.setValueActive(!0,i,t),"columnValueChanged",t)}removeValueColumns(e,t){this.updateColList(e,this.valueCols,!1,!1,i=>this.setValueActive(!1,i,t),"columnValueChanged",t)}moveRowGroupColumn(e,t,i){if(this.isRowGroupEmpty())return;const s=this.rowGroupCols[e],o=this.rowGroupCols.slice(e,t);this.rowGroupCols.splice(e,1),this.rowGroupCols.splice(t,0,s),this.eventDispatcher.rowGroupChanged(o,i)}setColList(e,t,i,s,o,r,n){if(!this.columnModel.getCols())return;const l=new Map;t.forEach((c,u)=>l.set(c,u)),t.length=0,M(e)&&e.forEach(c=>{const u=this.columnModel.getColDefCol(c);u&&t.push(u)}),t.forEach((c,u)=>{const d=l.get(c);if(d===void 0){l.set(c,0);return}s&&d!==u||l.delete(c)}),(this.columnModel.getColDefCols()||[]).forEach(c=>{const u=t.indexOf(c)>=0;r(u,c)}),o&&this.columnModel.refreshCols(!1),this.visibleColsService.refresh(n),this.eventDispatcher.columnChanged(i,[...l.keys()],n)}updateColList(e,t,i,s,o,r,n){if(!e||Ae(e))return;let l=!1;const a=new Set;e.forEach(c=>{if(!c)return;const u=this.columnModel.getColDefCol(c);if(u){if(a.add(u),i){if(t.indexOf(u)>=0)return;t.push(u)}else{const d=t.indexOf(u);if(d<0)return;for(let h=d+1;hi.setValueActive(s,e),()=>{},()=>{},i=>{const s=i.aggFunc;if(s===null||s==="")return null;if(s!==void 0)return!!s},i=>i.initialAggFunc!=null&&i.initialAggFunc!=""),this.valueCols.forEach(i=>{const s=i.getColDef();s.aggFunc!=null&&s.aggFunc!=""?i.setAggFunc(s.aggFunc):i.getAggFunc()||i.setAggFunc(s.initialAggFunc)})}extractRowGroupCols(e,t){this.rowGroupCols=this.extractColsCommon(t,this.rowGroupCols,(i,s)=>i.setRowGroupActive(s,e),i=>i.rowGroupIndex,i=>i.initialRowGroupIndex,i=>i.rowGroup,i=>i.initialRowGroup)}extractPivotCols(e,t){this.pivotCols=this.extractColsCommon(t,this.pivotCols,(i,s)=>i.setPivotActive(s,e),i=>i.pivotIndex,i=>i.initialPivotIndex,i=>i.pivot,i=>i.initialPivot)}extractColsCommon(e=[],t=[],i,s,o,r,n){const l=[],a=[];(this.columnModel.getColDefCols()||[]).forEach(h=>{const g=e.indexOf(h)<0,m=h.getColDef(),C=As(r(m)),f=As(n(m)),v=Rt(s(m)),w=Rt(o(m));let S;C!==void 0?S=C:v!==void 0?v===null?S=!1:S=v>=0:g?f!==void 0?S=f:w!==void 0?S=w!=null&&w>=0:S=!1:S=t.indexOf(h)>=0,S&&((g?v!=null||w!=null:v!=null)?l.push(h):a.push(h))});const u=h=>{const g=s(h.getColDef()),m=o(h.getColDef());return g??m};l.sort((h,g)=>{const m=u(h),C=u(g);return m===C?0:m{a.indexOf(h)>=0&&d.push(h)}),a.forEach(h=>{d.indexOf(h)<0&&d.push(h)}),t.forEach(h=>{d.indexOf(h)<0&&i(h,!1)}),d.forEach(h=>{t.indexOf(h)<0&&i(h,!0)}),d}generateColumnStateForRowGroupAndPivotIndexes(e,t){const i={},s=(o,r,n,l,a,c)=>{const u=this.columnModel.getColDefCols();if(!r.length||!u)return[];const d=Object.keys(o),h=new Set(d),g=new Set(d),m=new Set(r.map(D=>{const P=D.getColId();return g.delete(P),P}).concat(d)),C=[],f={};let v=0;for(let D=0;D{const P=f[D];for(let A=F;A{const P=D.getColId();if(h.has(P))E(P),o[P][a]=w++;else{const A=D.getColDef();(A[a]===null||A[a]===void 0&&A[c]==null)&&(S||(A[n]||A[n]===void 0&&A[l]?E(P):(g.forEach(T=>{o[T][a]=w+f[T]}),w+=C.length,S=!0)),i[P]||(i[P]={colId:P}),i[P][a]=w++)}})};return s(e,this.rowGroupCols,"rowGroup","initialRowGroup","rowGroupIndex","initialRowGroupIndex"),s(t,this.pivotCols,"pivot","initialPivot","pivotIndex","initialPivotIndex"),Object.values(i)}},la=class extends R{constructor(){super(...arguments),this.beanName="columnApplyStateService"}wireBeans(e){this.columnModel=e.columnModel,this.eventDispatcher=e.columnEventDispatcher,this.sortController=e.sortController,this.columnGetStateService=e.columnGetStateService,this.funcColsService=e.funcColsService,this.visibleColsService=e.visibleColsService,this.columnAnimationService=e.columnAnimationService,this.pivotResultColsService=e.pivotResultColsService}applyColumnState(e,t){const i=this.columnModel.getColDefCols()||[];if(Ae(i))return!1;if(e&&e.state&&!e.state.forEach)return b("applyColumnState() - the state attribute should be an array, however an array was not found. Please provide an array of items (one for each col you want to change) for state."),!1;const s=this.funcColsService.getModifyColumnsNoEventsCallbacks(),o=(l,a,c)=>{const u=this.compareColumnStatesAndDispatchEvents(t),d=a.slice(),h={},g={},m=[],C=[];let f=0;const v=this.funcColsService.getRowGroupColumns().slice(),w=this.funcColsService.getPivotColumns().slice();l.forEach(D=>{const P=D.colId||"";if(P.startsWith(os)){m.push(D),C.push(D);return}const I=c(P);I?(this.syncColumnWithStateItem(I,D,e.defaultState,h,g,!1,t,s),Ee(d,I)):(C.push(D),f+=1)});const S=D=>this.syncColumnWithStateItem(D,null,e.defaultState,h,g,!1,t,s);d.forEach(S),this.funcColsService.sortRowGroupColumns(Yo.bind(this,h,v)),this.funcColsService.sortPivotColumns(Yo.bind(this,g,w)),this.columnModel.refreshCols(!1);const E=(this.columnModel.getAutoCols()||[]).slice();return m.forEach(D=>{const P=this.columnModel.getAutoCol(D.colId);Ee(E,P),this.syncColumnWithStateItem(P,D,e.defaultState,null,null,!0,t,s)}),E.forEach(S),this.orderLiveColsLikeState(e),this.visibleColsService.refresh(t),this.eventDispatcher.everythingChanged(t),u(),{unmatchedAndAutoStates:C,unmatchedCount:f}};this.columnAnimationService.start();let{unmatchedAndAutoStates:r,unmatchedCount:n}=o(e.state||[],i,l=>this.columnModel.getColDefCol(l));if(r.length>0||M(e.defaultState)){const l=this.pivotResultColsService.getPivotResultCols(),a=l==null?void 0:l.list;n=o(r,a||[],c=>this.pivotResultColsService.getPivotResultCol(c)).unmatchedCount}return this.columnAnimationService.finish(),n===0}resetColumnState(e){const t=this.columnModel.getColDefCols();if(Ae(t))return;const i=this.columnModel.getColDefColTree(),s=to(i),o=[];let r=1e3,n=1e3,l=[];const a=this.columnModel.getAutoCols();a&&(l=l.concat(a)),s&&(l=l.concat(s)),l.forEach(c=>{const u=this.getColumnStateFromColDef(c);B(u.rowGroupIndex)&&u.rowGroup&&(u.rowGroupIndex=r++),B(u.pivotIndex)&&u.pivot&&(u.pivotIndex=n++),o.push(u)}),this.applyColumnState({state:o,applyOrder:!0},e)}getColumnStateFromColDef(e){const t=(m,C)=>m??C??null,i=e.getColDef(),s=t(i.sort,i.initialSort),o=t(i.sortIndex,i.initialSortIndex),r=t(i.hide,i.initialHide),n=t(i.pinned,i.initialPinned),l=t(i.width,i.initialWidth),a=t(i.flex,i.initialFlex);let c=t(i.rowGroupIndex,i.initialRowGroupIndex),u=t(i.rowGroup,i.initialRowGroup);c==null&&(u==null||u==!1)&&(c=null,u=null);let d=t(i.pivotIndex,i.initialPivotIndex),h=t(i.pivot,i.initialPivot);d==null&&(h==null||h==!1)&&(d=null,h=null);const g=t(i.aggFunc,i.initialAggFunc);return{colId:e.getColId(),sort:s,sortIndex:o,hide:r,pinned:n,width:l,flex:a,rowGroup:u,rowGroupIndex:c,pivot:h,pivotIndex:d,aggFunc:g}}syncColumnWithStateItem(e,t,i,s,o,r,n,l){if(!e)return;const a=(F,E)=>{const D={value1:void 0,value2:void 0};let P=!1;return t&&(t[F]!==void 0&&(D.value1=t[F],P=!0),M(E)&&t[E]!==void 0&&(D.value2=t[E],P=!0)),!P&&i&&(i[F]!==void 0&&(D.value1=i[F]),M(E)&&i[E]!==void 0&&(D.value2=i[E])),D},c=a("hide").value1;c!==void 0&&e.setVisible(!c,n);const u=a("pinned").value1;u!==void 0&&e.setPinned(u);const d=e.getColDef().minWidth??this.gos.environment.getDefaultColumnMinWidth(),h=a("flex").value1;if(h!==void 0&&e.setFlex(h),h==null){const F=a("width").value1;F!=null&&d!=null&&F>=d&&e.setActualWidth(F,n)}const g=a("sort").value1;g!==void 0&&(g==="desc"||g==="asc"?e.setSort(g,n):e.setSort(void 0,n));const m=a("sortIndex").value1;if(m!==void 0&&e.setSortIndex(m),r||!e.isPrimary())return;const C=a("aggFunc").value1;C!==void 0&&(typeof C=="string"?(e.setAggFunc(C),e.isValueActive()||(e.setValueActive(!0,n),l.addValueCol(e))):(M(C)&&b("stateItem.aggFunc must be a string. if using your own aggregation functions, register the functions first before using them in get/set state. This is because it is intended for the column state to be stored and retrieved as simple JSON."),e.isValueActive()&&(e.setValueActive(!1,n),l.removeValueCol(e))));const{value1:f,value2:v}=a("rowGroup","rowGroupIndex");(f!==void 0||v!==void 0)&&(typeof v=="number"||f?(e.isRowGroupActive()||(e.setRowGroupActive(!0,n),l.addGroupCol(e)),s&&typeof v=="number"&&(s[e.getId()]=v)):e.isRowGroupActive()&&(e.setRowGroupActive(!1,n),l.removeGroupCol(e)));const{value1:w,value2:S}=a("pivot","pivotIndex");(w!==void 0||S!==void 0)&&(typeof S=="number"||w?(e.isPivotActive()||(e.setPivotActive(!0,n),l.addPivotCol(e)),o&&typeof S=="number"&&(o[e.getId()]=S)):e.isPivotActive()&&(e.setPivotActive(!1,n),l.removePivotCol(e)))}orderLiveColsLikeState(e){if(!e.applyOrder||!e.state)return;const t=[];e.state.forEach(i=>{i.colId!=null&&t.push(i.colId)}),this.columnModel.sortColsLikeKeys(t)}compareColumnStatesAndDispatchEvents(e){const t={rowGroupColumns:this.funcColsService.getRowGroupColumns().slice(),pivotColumns:this.funcColsService.getPivotColumns().slice(),valueColumns:this.funcColsService.getValueColumns().slice()},i=this.columnGetStateService.getColumnState(),s={};return i.forEach(o=>{s[o.colId]=o}),()=>{const o=this.columnModel.getAllCols(),r=(C,f,v,w)=>{const S=f.map(w),F=v.map(w);if(pt(S,F))return;const D=new Set(f);v.forEach(A=>{D.delete(A)||D.add(A)});const P=[...D];this.eventService.dispatchEvent({type:C,columns:P,column:P.length===1?P[0]:null,source:e})},n=C=>{const f=[];return o.forEach(v=>{const w=s[v.getColId()];w&&C(w,v)&&f.push(v)}),f},l=C=>C.getColId();r("columnRowGroupChanged",t.rowGroupColumns,this.funcColsService.getRowGroupColumns(),l),r("columnPivotChanged",t.pivotColumns,this.funcColsService.getPivotColumns(),l);const c=n((C,f)=>{const v=C.aggFunc!=null,w=v!=f.isValueActive(),S=v&&C.aggFunc!=f.getAggFunc();return w||S});c.length>0&&this.eventDispatcher.columnChanged("columnValueChanged",c,e);const u=(C,f)=>C.width!=f.getActualWidth();this.eventDispatcher.columnResized(n(u),!0,e);const d=(C,f)=>C.pinned!=f.getPinned();this.eventDispatcher.columnPinned(n(d),e);const h=(C,f)=>C.hide==f.isVisible();this.eventDispatcher.columnVisible(n(h),e);const m=n((C,f)=>C.sort!=f.getSort()||C.sortIndex!=f.getSortIndex());m.length>0&&this.sortController.dispatchSortChangedEvents(e,m),this.normaliseColumnMovedEventForColumnState(i,e)}}normaliseColumnMovedEventForColumnState(e,t){const i=this.columnGetStateService.getColumnState(),s={};i.forEach(a=>s[a.colId]=a);const o={};e.forEach(a=>{s[a.colId]&&(o[a.colId]=!0)});const r=e.filter(a=>o[a.colId]),n=i.filter(a=>o[a.colId]),l=[];n.forEach((a,c)=>{const u=r&&r[c];if(u&&u.colId!==a.colId){const d=this.columnModel.getCol(u.colId);d&&l.push(d)}}),l.length&&this.eventDispatcher.columnMoved({movedColumns:l,source:t,finished:!0})}},Yo=(e,t,i,s)=>{const o=e[i.getId()],r=e[s.getId()],n=o!=null,l=r!=null;if(n&&l)return o-r;if(n)return-1;if(l)return 1;const a=t.indexOf(i),c=t.indexOf(s),u=a>=0,d=c>=0;return u&&d?a-c:u?-1:1},aa=class extends R{constructor(){super(...arguments),this.beanName="columnMoveService"}wireBeans(e){this.columnModel=e.columnModel,this.columnAnimationService=e.columnAnimationService,this.eventDispatcher=e.columnEventDispatcher}moveColumnByIndex(e,t,i){const s=this.columnModel.getCols();if(!s)return;const o=s[e];this.moveColumns([o],t,i)}moveColumns(e,t,i,s=!0){const o=this.columnModel.getCols();if(!o)return;if(t>o.length-e.length){b("tried to insert columns in invalid location, toIndex = ",t),b("remember that you should not count the moving columns when calculating the new index");return}this.columnAnimationService.start();const r=this.columnModel.getColsForKeys(e);this.doesMovePassRules(r,t)&&(this.columnModel.moveInCols(r,t,i),this.eventDispatcher.columnMoved({movedColumns:r,source:i,toIndex:t,finished:s})),this.columnAnimationService.finish()}doesMovePassRules(e,t){const i=this.getProposedColumnOrder(e,t);return this.doesOrderPassRules(i)}doesOrderPassRules(e){return!(!this.doesMovePassMarryChildren(e)||!this.doesMovePassLockedPositions(e))}getProposedColumnOrder(e,t){const s=this.columnModel.getCols().slice();return Lr(s,e,t),s}doesMovePassLockedPositions(e){const t=r=>r?r==="left"||r===!0?-1:1:0,i=this.gos.get("enableRtl");let s=i?1:-1,o=!0;return e.forEach(r=>{const n=t(r.getColDef().lockPosition);i?n>s&&(o=!1):n{if(!ye(s))return;const o=s,r=o.getColGroupDef();if(!(r&&r.marryChildren))return;const l=[];o.getLeafColumns().forEach(h=>{const g=e.indexOf(h);l.push(g)});const a=Math.max.apply(Math,l),c=Math.min.apply(Math,l),u=a-c,d=o.getLeafColumns().length-1;u>d&&(t=!1)}),t}placeLockedColumns(e){const t=[],i=[],s=[];return e.forEach(r=>{const n=r.getColDef().lockPosition;n==="right"?s.push(r):n==="left"||n===!0?t.push(r):i.push(r)}),this.gos.get("enableRtl")?[...s,...i,...t]:[...t,...i,...s]}},ca=/[&<>"']/g,ua={"&":"&","<":"<",">":">",'"':""","'":"'"};function $e(e,t){if(e==null)return null;const i=e.toString().toString();return t?i:i.replace(ca,s=>ua[s])}function da(e){if(!e||e==null)return null;const t=/([a-z])([A-Z])/g,i=/([A-Z]+)([A-Z])([a-z])/g;return e.replace(t,"$1 $2").replace(i,"$1 $2$3").replace(/\./g," ").split(" ").map(o=>o.substring(0,1).toUpperCase()+(o.length>1?o.substring(1,o.length):"")).join(" ")}var ha=class extends R{constructor(){super(...arguments),this.beanName="columnNameService"}wireBeans(e){this.expressionService=e.expressionService,this.funcColsService=e.funcColsService,this.columnModel=e.columnModel}getDisplayNameForColumn(e,t,i=!1){if(!e)return null;const s=this.getHeaderName(e.getColDef(),e,null,null,t);return i?this.wrapHeaderNameWithAggFunc(e,s):s}getDisplayNameForProvidedColumnGroup(e,t,i){const s=t?t.getColGroupDef():null;return s?this.getHeaderName(s,null,e,t,i):null}getDisplayNameForColumnGroup(e,t){return this.getDisplayNameForProvidedColumnGroup(e,e.getProvidedColumnGroup(),t)}getHeaderName(e,t,i,s,o){const r=e.headerValueGetter;if(r){const n=this.gos.addGridCommonParams({colDef:e,column:t,columnGroup:i,providedColumnGroup:s,location:o});return typeof r=="function"?r(n):typeof r=="string"?this.expressionService.evaluate(r,n):(b("headerValueGetter must be a function or a string"),"")}else{if(e.headerName!=null)return e.headerName;if(e.field)return da(e.field)}return""}wrapHeaderNameWithAggFunc(e,t){if(this.gos.get("suppressAggFuncInHeader"))return t;const i=e.getColDef().pivotValueColumn,s=M(i);let o=null,r;if(s){const n=this.funcColsService.getValueColumns(),l=this.gos.get("removePivotHeaderRowWhenSingleValueColumn")&&n.length===1,a=e.getColDef().pivotTotalColumnIds!==void 0;if(l&&!a)return t;o=i?i.getAggFunc():null,r=!0}else{const n=e.isValueActive(),l=this.columnModel.isPivotMode()||!this.funcColsService.isRowGroupEmpty();n&&l?(o=e.getAggFunc(),r=!0):r=!1}if(r){const n=typeof o=="string"?o:"func";return`${this.localeService.getLocaleTextFunc()(n,n)}(${t})`}return t}},ga=class extends R{constructor(){super(...arguments),this.beanName="pivotResultColsService"}wireBeans(e){this.context=e.context,this.columnModel=e.columnModel,this.columnFactory=e.columnFactory,this.visibleColsService=e.visibleColsService}destroy(){var e;at(this.context,(e=this.pivotResultCols)==null?void 0:e.tree),super.destroy()}isPivotResultColsPresent(){return this.pivotResultCols!=null}lookupPivotResultCol(e,t){if(this.pivotResultCols==null)return null;const i=this.columnModel.getColDefCol(t);let s=null;return this.pivotResultCols.list.forEach(o=>{const r=o.getColDef().pivotKeys,n=o.getColDef().pivotValueColumn;pt(r,e)&&n===i&&(s=o)}),s}getPivotResultCols(){return this.pivotResultCols}getPivotResultCol(e){return this.pivotResultCols?this.columnModel.getColFromCollection(e,this.pivotResultCols):null}setPivotResultCols(e,t){var i,s;if(this.columnModel.isReady()&&!(e==null&&this.pivotResultCols==null)){if(e){this.processPivotResultColDef(e);const o=this.columnFactory.createColumnTree(e,!1,((i=this.pivotResultCols)==null?void 0:i.tree)||this.previousPivotResultCols||void 0,t);at(this.context,(s=this.pivotResultCols)==null?void 0:s.tree,o.columnTree);const r=o.columnTree,n=o.treeDept,l=to(r),a={};this.pivotResultCols={tree:r,treeDepth:n,list:l,map:a},this.pivotResultCols.list.forEach(u=>this.pivotResultCols.map[u.getId()]=u);const c=!!this.previousPivotResultCols;this.previousPivotResultCols=null,this.columnModel.refreshCols(!c)}else this.previousPivotResultCols=this.pivotResultCols?this.pivotResultCols.tree:null,this.pivotResultCols=null,this.columnModel.refreshCols(!1);this.visibleColsService.refresh(t)}}processPivotResultColDef(e){const t=this.gos.get("processPivotResultColDef"),i=this.gos.get("processPivotResultColGroupDef");if(!t&&!i)return;const s=o=>{o.forEach(r=>{if(M(r.children)){const l=r;i&&i(l),s(l.children)}else t&&t(r)})};e&&s(e)}},pa=class extends R{constructor(){super(...arguments),this.beanName="columnSizeService"}wireBeans(e){this.columnModel=e.columnModel,this.columnViewportService=e.columnViewportService,this.eventDispatcher=e.columnEventDispatcher,this.visibleColsService=e.visibleColsService,this.ctrlsService=e.ctrlsService}setColumnWidths(e,t,i,s){const o=[];e.forEach(r=>{const n=this.columnModel.getColDefCol(r.key)||this.columnModel.getCol(r.key);if(!n)return;if(o.push({width:r.newWidth,ratios:[1],columns:[n]}),this.gos.get("colResizeDefault")==="shift"&&(t=!t),t){const a=this.visibleColsService.getColAfter(n);if(!a)return;const c=n.getActualWidth()-r.newWidth,u=a.getActualWidth()+c;o.push({width:u,ratios:[1],columns:[a]})}}),o.length!==0&&this.resizeColumnSets({resizeSets:o,finished:i,source:s})}resizeColumnSets(e){const{resizeSets:t,finished:i,source:s}=e;if(!(!t||t.every(u=>this.checkMinAndMaxWidthsForSet(u)))){if(i){const u=t&&t.length>0?t[0].columns:null;this.eventDispatcher.columnResized(u,i,s)}return}const r=[],n=[];t.forEach(u=>{const{width:d,columns:h,ratios:g}=u,m={},C={};h.forEach(w=>n.push(w));let f=!0,v=0;for(;f;){if(v++,v>1e3){U("infinite loop in resizeColumnSets");break}f=!1;const w=[];let S=0,F=d;h.forEach((D,P)=>{if(C[D.getId()])F-=m[D.getId()];else{w.push(D);const I=g[P];S+=I}});const E=1/S;w.forEach((D,P)=>{const A=P===w.length-1;let I;A?I=F:(I=Math.round(g[P]*d*E),F-=I);const O=D.getMinWidth(),T=D.getMaxWidth();I0&&I>T&&(I=T,C[D.getId()]=!0,f=!0),m[D.getId()]=I})}h.forEach(w=>{const S=m[w.getId()];w.getActualWidth()!==S&&(w.setActualWidth(S,s),r.push(w))})});const l=r.length>0;let a=[];l&&(a=this.refreshFlexedColumns({resizingCols:n,skipSetLeft:!0}),this.visibleColsService.setLeftValues(s),this.visibleColsService.updateBodyWidths(),this.columnViewportService.checkViewportColumns());const c=n.concat(a);(l||i)&&this.eventDispatcher.columnResized(c,i,s,a)}checkMinAndMaxWidthsForSet(e){const{columns:t,width:i}=e;let s=0,o=0,r=!0;t.forEach(a=>{const c=a.getMinWidth();s+=c||0;const u=a.getMaxWidth();u>0?o+=u:r=!1});const n=i>=s,l=!r||i<=o;return n&&l}refreshFlexedColumns(e={}){const t=e.source?e.source:"flex";if(e.viewportWidth!=null&&(this.flexViewportWidth=e.viewportWidth),!this.flexViewportWidth)return[];const i=this.visibleColsService.getCenterCols();let s=-1;if(e.resizingCols){const h=new Set(e.resizingCols);for(let g=i.length-1;g>=0;g--)if(h.has(i[g])){s=g;break}}let o=0,r=[],n=0,l=0;for(let h=0;hs?(r.push(i[h]),l+=i[h].getFlex(),n+=i[h].getMinWidth()):o+=i[h].getActualWidth();if(!r.length)return[];let a=[];o+n>this.flexViewportWidth&&(r.forEach(h=>h.setActualWidth(h.getMinWidth(),t)),a=r,r=[]);const c=[];let u;e:for(;;){u=this.flexViewportWidth-o;const h=u/l;for(let g=0;gw&&(f=w),f){m.setActualWidth(f,t),Ir(r,m),l-=m.getFlex(),a.push(m),o+=m.getActualWidth();continue e}c[g]=Math.floor(C)}break}let d=u;return r.forEach((h,g)=>{const m=gthis.sizeColumnsToFit(e,t,i,s));return}const o={};s&&((h=s==null?void 0:s.columnLimits)==null||h.forEach(({key:g,...m})=>{o[typeof g=="string"?g:g.getColId()]=m}));const r=this.visibleColsService.getAllCols(),n=e===Xe(r);if(e<=0||!r.length||n)return;const l=[],a=[];r.forEach(g=>{g.getColDef().suppressSizeToFit===!0?a.push(g):l.push(g)});const c=l.slice(0);let u=!1;const d=g=>{Ee(l,g),a.push(g)};for(l.forEach(g=>{g.resetActualWidth(t);const m=o==null?void 0:o[g.getId()],C=(m==null?void 0:m.minWidth)??(s==null?void 0:s.defaultMinWidth),f=(m==null?void 0:m.maxWidth)??(s==null?void 0:s.defaultMaxWidth),v=g.getActualWidth();typeof C=="number"&&vf&&g.setActualWidth(f,t,!0)});!u;){u=!0;const g=e-Xe(a);if(g<=0)l.forEach(m=>{var f;const C=((f=o==null?void 0:o[m.getId()])==null?void 0:f.minWidth)??(s==null?void 0:s.defaultMinWidth);if(typeof C=="number"){m.setActualWidth(C,t,!0);return}m.setMinimum(t)});else{const m=g/Xe(l);let C=g;for(let f=l.length-1;f>=0;f--){const v=l[f],w=o==null?void 0:o[v.getId()],S=(w==null?void 0:w.minWidth)??(s==null?void 0:s.defaultMinWidth),F=(w==null?void 0:w.maxWidth)??(s==null?void 0:s.defaultMaxWidth),E=v.getMinWidth(),D=v.getMaxWidth(),P=typeof S=="number"&&S>E?S:E,A=typeof F=="number"&&FA?(I=A,d(v),u=!1):f===0&&(I=C),v.setActualWidth(I,t,!0),C-=I}}}c.forEach(g=>{g.fireColumnWidthChangedEvent(t)}),this.visibleColsService.setLeftValues(t),this.visibleColsService.updateBodyWidths(),!i&&this.eventDispatcher.columnResized(c,!0,t)}applyAutosizeStrategy(){const e=this.gos.get("autoSizeStrategy");if(!e)return;const{type:t}=e;setTimeout(()=>{if(t==="fitGridWidth"){const{columnLimits:i,defaultMinWidth:s,defaultMaxWidth:o}=e,r=i==null?void 0:i.map(({colId:n,minWidth:l,maxWidth:a})=>({key:n,minWidth:l,maxWidth:a}));this.ctrlsService.getGridBodyCtrl().sizeColumnsToFit({defaultMinWidth:s,defaultMaxWidth:o,columnLimits:r})}else t==="fitProvidedWidth"&&this.sizeColumnsToFit(e.width,"sizeColumnsToFit")})}};function Vr(e,t){return e+"_"+t}function de(e){return e instanceof Br}var Br=class extends R{constructor(e,t,i,s){super(),this.isColumn=!1,this.displayedChildren=[],this.autoHeaderHeight=null,this.parent=null,this.groupId=t,this.partId=i,this.providedColumnGroup=e,this.pinned=s}reset(){this.parent=null,this.children=null,this.displayedChildren=null}getParent(){return this.parent}setParent(e){this.parent=e}getUniqueId(){return Vr(this.groupId,this.partId)}isEmptyGroup(){return this.displayedChildren.length===0}isMoving(){const e=this.getProvidedColumnGroup().getLeafColumns();return!e||e.length===0?!1:e.every(t=>t.isMoving())}checkLeft(){if(this.displayedChildren.forEach(e=>{de(e)&&e.checkLeft()}),this.displayedChildren.length>0)if(this.gos.get("enableRtl")){const t=V(this.displayedChildren).getLeft();this.setLeft(t)}else{const e=this.displayedChildren[0].getLeft();this.setLeft(e)}else this.setLeft(null)}getLeft(){return this.left}getOldLeft(){return this.oldLeft}setLeft(e){this.oldLeft=this.left,this.left!==e&&(this.left=e,this.dispatchLocalEvent({type:"leftChanged"}))}getPinned(){return this.pinned}getGroupId(){return this.groupId}getPartId(){return this.partId}getActualWidth(){let e=0;return this.displayedChildren&&this.displayedChildren.forEach(t=>{e+=t.getActualWidth()}),e}isResizable(){if(!this.displayedChildren)return!1;let e=!1;return this.displayedChildren.forEach(t=>{t.isResizable()&&(e=!0)}),e}getMinWidth(){let e=0;return this.displayedChildren.forEach(t=>{e+=t.getMinWidth()}),e}addChild(e){this.children||(this.children=[]),this.children.push(e)}getDisplayedChildren(){return this.displayedChildren}getLeafColumns(){const e=[];return this.addLeafColumns(e),e}getDisplayedLeafColumns(){const e=[];return this.addDisplayedLeafColumns(e),e}getDefinition(){return this.providedColumnGroup.getColGroupDef()}getColGroupDef(){return this.providedColumnGroup.getColGroupDef()}isPadding(){return this.providedColumnGroup.isPadding()}isExpandable(){return this.providedColumnGroup.isExpandable()}isExpanded(){return this.providedColumnGroup.isExpanded()}setExpanded(e){this.providedColumnGroup.setExpanded(e)}isAutoHeaderHeight(){var e;return!!((e=this.getColGroupDef())!=null&&e.autoHeaderHeight)}getAutoHeaderHeight(){return this.autoHeaderHeight}setAutoHeaderHeight(e){const t=e!==this.autoHeaderHeight;return this.autoHeaderHeight=e,t}addDisplayedLeafColumns(e){this.displayedChildren.forEach(t=>{ht(t)?e.push(t):de(t)&&t.addDisplayedLeafColumns(e)})}addLeafColumns(e){this.children.forEach(t=>{ht(t)?e.push(t):de(t)&&t.addLeafColumns(e)})}getChildren(){return this.children}getColumnGroupShow(){return this.providedColumnGroup.getColumnGroupShow()}getProvidedColumnGroup(){return this.providedColumnGroup}getPaddingLevel(){const e=this.getParent();return!this.isPadding()||!e||!e.isPadding()?0:1+e.getPaddingLevel()}calculateDisplayedColumns(){this.displayedChildren=[];let e=this;for(;e!=null&&e.isPadding();)e=e.getParent();if(!(e?e.getProvidedColumnGroup().isExpandable():!1)){this.displayedChildren=this.children,this.dispatchLocalEvent({type:"displayedChildrenChanged"});return}this.children.forEach(i=>{if(de(i)&&(!i.displayedChildren||!i.displayedChildren.length))return;switch(i.getColumnGroupShow()){case"open":e.getProvidedColumnGroup().isExpanded()&&this.displayedChildren.push(i);break;case"closed":e.getProvidedColumnGroup().isExpanded()||this.displayedChildren.push(i);break;default:this.displayedChildren.push(i);break}}),this.dispatchLocalEvent({type:"displayedChildrenChanged"})}},Wr=class{constructor(){this.existingIds={}}getInstanceIdForKey(e){const t=this.existingIds[e];let i;return typeof t!="number"?i=0:i=t+1,this.existingIds[e]=i,i}},fa=class extends R{constructor(){super(...arguments),this.beanName="visibleColsService",this.colsAndGroupsMap={},this.columnsLeft=[],this.columnsRight=[],this.columnsCenter=[],this.columns=[],this.bodyWidth=0,this.leftWidth=0,this.rightWidth=0,this.bodyWidthDirty=!0}wireBeans(e){this.columnModel=e.columnModel,this.columnSizeService=e.columnSizeService,this.columnViewportService=e.columnViewportService,this.eventDispatcher=e.columnEventDispatcher}refresh(e,t=!1){t||this.buildTrees(),this.updateOpenClosedVisibilityInColumnGroups(),this.columnsLeft=ms(this.treeLeft),this.columnsCenter=ms(this.treeCenter),this.columnsRight=ms(this.treeRight),this.joinColsAriaOrder(),this.joinCols(),this.setLeftValues(e),this.autoHeightCols=this.columns.filter(i=>i.isAutoHeight()),this.columnSizeService.refreshFlexedColumns(),this.updateBodyWidths(),this.columnViewportService.checkViewportColumns(!1),this.setFirstRightAndLastLeftPinned(e),this.eventDispatcher.visibleCols(e)}updateBodyWidths(){const e=Xe(this.columnsCenter),t=Xe(this.columnsLeft),i=Xe(this.columnsRight);this.bodyWidthDirty=this.bodyWidth!==e,(this.bodyWidth!==e||this.leftWidth!==t||this.rightWidth!==i)&&(this.bodyWidth=e,this.leftWidth=t,this.rightWidth=i,this.eventService.dispatchEvent({type:"columnContainerWidthChanged"}),this.eventService.dispatchEvent({type:"displayedColumnsWidthChanged"}))}setLeftValues(e){this.setLeftValuesOfCols(e),this.setLeftValuesOfGroups()}setFirstRightAndLastLeftPinned(e){let t,i;this.gos.get("enableRtl")?(t=this.columnsLeft?this.columnsLeft[0]:null,i=this.columnsRight?V(this.columnsRight):null):(t=this.columnsLeft?V(this.columnsLeft):null,i=this.columnsRight?this.columnsRight[0]:null),this.columnModel.getCols().forEach(s=>{s.setLastLeftPinned(s===t,e),s.setFirstRightPinned(s===i,e)})}buildTrees(){const e=this.columnModel.getColsToShow(),t=e.filter(r=>r.getPinned()=="left"),i=e.filter(r=>r.getPinned()=="right"),s=e.filter(r=>r.getPinned()!="left"&&r.getPinned()!="right"),o=new Wr;this.treeLeft=this.createGroups({columns:t,idCreator:o,pinned:"left",oldDisplayedGroups:this.treeLeft}),this.treeRight=this.createGroups({columns:i,idCreator:o,pinned:"right",oldDisplayedGroups:this.treeRight}),this.treeCenter=this.createGroups({columns:s,idCreator:o,pinned:null,oldDisplayedGroups:this.treeCenter}),this.updateColsAndGroupsMap()}clear(){this.columnsLeft=[],this.columnsRight=[],this.columnsCenter=[],this.columns=[],this.ariaOrderColumns=[]}joinColsAriaOrder(){const e=this.columnModel.getCols(),t=[],i=[],s=[];for(const o of e){const r=o.getPinned();r?r===!0||r==="left"?t.push(o):s.push(o):i.push(o)}this.ariaOrderColumns=t.concat(i).concat(s)}getAriaColIndex(e){let t;return de(e)?t=e.getLeafColumns()[0]:t=e,this.ariaOrderColumns.indexOf(t)+1}getAllAutoHeightCols(){return this.autoHeightCols}setLeftValuesOfGroups(){[this.treeLeft,this.treeRight,this.treeCenter].forEach(e=>{e.forEach(t=>{de(t)&&t.checkLeft()})})}setLeftValuesOfCols(e){if(!this.columnModel.getColDefCols())return;const i=this.columnModel.getCols().slice(0),s=this.gos.get("enableRtl");[this.columnsLeft,this.columnsRight,this.columnsCenter].forEach(o=>{if(s){let r=Xe(o);o.forEach(n=>{r-=n.getActualWidth(),n.setLeft(r,e)})}else{let r=0;o.forEach(n=>{n.setLeft(r,e),r+=n.getActualWidth()})}Ul(i,o)}),i.forEach(o=>{o.setLeft(null,e)})}joinCols(){this.gos.get("enableRtl")?this.columns=this.columnsRight.concat(this.columnsCenter).concat(this.columnsLeft):this.columns=this.columnsLeft.concat(this.columnsCenter).concat(this.columnsRight)}getColsCenter(){return this.columnsCenter}getAllTrees(){return this.treeLeft&&this.treeRight&&this.treeCenter?this.treeLeft.concat(this.treeCenter).concat(this.treeRight):null}getTreeLeft(){return this.treeLeft}getTreeRight(){return this.treeRight}getTreeCenter(){return this.treeCenter}getAllCols(){return this.columns}isColDisplayed(e){return this.getAllCols().indexOf(e)>=0}getLeftColsForRow(e){return this.columnModel.isColSpanActive()?this.getColsForRow(e,this.columnsLeft):this.columnsLeft}getRightColsForRow(e){return this.columnModel.isColSpanActive()?this.getColsForRow(e,this.columnsRight):this.columnsRight}getColsForRow(e,t,i,s){const o=[];let r=null;for(let n=0;n1){const h=c-1;for(let g=1;g<=h;g++)u.push(t[n+g]);n+=h}let d;i?(d=!1,u.forEach(h=>{i(h)&&(d=!0)})):d=!0,d&&(o.length===0&&r&&(s&&s(l))&&o.push(r),o.push(l)),r=l}return o}getBodyContainerWidth(){return this.bodyWidth}getContainerWidth(e){switch(e){case"left":return this.leftWidth;case"right":return this.rightWidth;default:return this.bodyWidth}}getCenterCols(){return this.columnsCenter}getLeftCols(){return this.columnsLeft}getRightCols(){return this.columnsRight}getColBefore(e){const t=this.getAllCols(),i=t.indexOf(e);return i>0?t[i-1]:null}getGroupAtDirection(e,t){const i=e.getProvidedColumnGroup().getLevel()+e.getPaddingLevel(),s=e.getDisplayedLeafColumns(),o=t==="After"?V(s):s[0],r=`getCol${t}`;for(;;){const n=this[r](o);if(!n)return null;const l=this.getColGroupAtLevel(n,i);if(l!==e)return l}}getColGroupAtLevel(e,t){let i=e.getParent(),s,o;for(;s=i.getProvidedColumnGroup().getLevel(),o=i.getPaddingLevel(),!(s+o<=t);)i=i.getParent();return i}isPinningLeft(){return this.columnsLeft.length>0}isPinningRight(){return this.columnsRight.length>0}updateColsAndGroupsMap(){this.colsAndGroupsMap={};const e=t=>{this.colsAndGroupsMap[t.getUniqueId()]=t};St(this.treeCenter,!1,e),St(this.treeLeft,!1,e),St(this.treeRight,!1,e)}isVisible(e){return this.colsAndGroupsMap[e.getUniqueId()]===e}updateOpenClosedVisibilityInColumnGroups(){const e=this.getAllTrees();St(e,!1,t=>{de(t)&&t.calculateDisplayedColumns()})}getFirstColumn(){const e=this.gos.get("enableRtl"),t=["getLeftCols","getCenterCols","getRightCols"];e&&t.reverse();for(let i=0;i{if(de(r)){const n=r;let l;s?l=e===n.getGroupId()&&t===n.getPartId():l=e===n.getGroupId(),l&&(o=n)}}),o}getColAfter(e){const t=this.getAllCols(),i=t.indexOf(e);return i{const g=u;u=h;const m=c[g],f=(de(m)?m.getProvidedColumnGroup():m).getOriginalParent();if(f==null){for(let w=g;w{s.forEach(o=>{if(de(o)){const r=o;t[o.getUniqueId()]=r,i(r.getChildren())}})};return e&&i(e),t}setupParentsIntoCols(e,t){e.forEach(i=>{if(i.setParent(t),de(i)){const s=i;this.setupParentsIntoCols(s.getChildren(),s)}})}};function St(e,t,i){if(e)for(let s=0;s{ht(i)&&t.push(i)}),t}var zr=["columnEverythingChanged","newColumnsLoaded","columnPivotModeChanged","pivotMaxColumnsExceeded","columnRowGroupChanged","expandOrCollapseAll","columnPivotChanged","gridColumnsChanged","columnValueChanged","columnMoved","columnVisible","columnPinned","columnGroupOpened","columnResized","displayedColumnsChanged","virtualColumnsChanged","columnHeaderMouseOver","columnHeaderMouseLeave","columnHeaderClicked","columnHeaderContextMenu","asyncTransactionsFlushed","rowGroupOpened","rowDataUpdated","pinnedRowDataChanged","rangeSelectionChanged","cellSelectionChanged","chartCreated","chartRangeSelectionChanged","chartOptionsChanged","chartDestroyed","toolPanelVisibleChanged","toolPanelSizeChanged","modelUpdated","cutStart","cutEnd","pasteStart","pasteEnd","fillStart","fillEnd","cellSelectionDeleteStart","cellSelectionDeleteEnd","rangeDeleteStart","rangeDeleteEnd","undoStarted","undoEnded","redoStarted","redoEnded","cellClicked","cellDoubleClicked","cellMouseDown","cellContextMenu","cellValueChanged","cellEditRequest","rowValueChanged","headerFocused","cellFocused","rowSelected","selectionChanged","tooltipShow","tooltipHide","cellKeyDown","cellMouseOver","cellMouseOut","filterChanged","filterModified","filterOpened","advancedFilterBuilderVisibleChanged","sortChanged","virtualRowRemoved","rowClicked","rowDoubleClicked","gridReady","gridPreDestroyed","gridSizeChanged","viewportChanged","firstDataRendered","dragStarted","dragStopped","dragCancelled","rowEditingStarted","rowEditingStopped","cellEditingStarted","cellEditingStopped","bodyScroll","bodyScrollEnd","paginationChanged","componentStateChanged","storeRefreshed","stateUpdated","columnMenuVisibleChanged","contextMenuVisibleChanged","rowDragEnter","rowDragMove","rowDragLeave","rowDragEnd","rowDragCancel"],ma=["scrollbarWidthChanged","keyShortcutChangedCellStart","keyShortcutChangedCellEnd","pinnedHeightChanged","cellFocusCleared","fullWidthRowFocused","checkboxChanged","heightScaleChanged","suppressMovableColumns","suppressMenuHide","suppressFieldDotNotation","columnPanelItemDragStart","columnPanelItemDragEnd","bodyHeightChanged","columnContainerWidthChanged","displayedColumnsWidthChanged","scrollVisibilityChanged","scrollGapChanged","columnHoverChanged","flashCells","paginationPixelOffsetChanged","displayedRowsChanged","leftPinnedWidthChanged","rightPinnedWidthChanged","rowContainerHeightChanged","headerHeightChanged","columnGroupHeaderHeightChanged","columnHeaderHeightChanged","gridStylesChanged","storeUpdated","filterDestroyed","rowDataUpdateStarted","rowCountReady","advancedFilterEnabledChanged","dataTypesInferred","fieldValueChanged","fieldPickerValueSelected","richSelectListRowSelected","sideBarUpdated","alignedGridScroll","alignedGridColumn","gridOptionsChanged","chartTitleEdit","recalculateRowBounds","stickyTopOffsetChanged","overlayExclusiveChanged"],Ca=[...zr,...ma],va={enableBrowserTooltips:!0,tooltipTrigger:!0,tooltipMouseTrack:!0,tooltipShowMode:!0,tooltipInteraction:!0,defaultColGroupDef:!0,suppressAutoSize:!0,skipHeaderOnAutoSize:!0,autoSizeStrategy:!0,components:!0,stopEditingWhenCellsLoseFocus:!0,undoRedoCellEditing:!0,undoRedoCellEditingLimit:!0,excelStyles:!0,cacheQuickFilter:!0,advancedFilterModel:!0,customChartThemes:!0,chartThemeOverrides:!0,chartToolPanelsDef:!0,loadingCellRendererSelector:!0,localeText:!0,keepDetailRows:!0,keepDetailRowsCount:!0,detailRowHeight:!0,detailRowAutoHeight:!0,tabIndex:!0,valueCache:!0,valueCacheNeverExpires:!0,enableCellExpressions:!0,suppressTouch:!0,suppressAsyncEvents:!0,suppressBrowserResizeObserver:!0,suppressPropertyNamesCheck:!0,debug:!0,dragAndDropImageComponent:!0,loadingOverlayComponent:!0,suppressLoadingOverlay:!0,noRowsOverlayComponent:!0,paginationPageSizeSelector:!0,paginateChildRows:!0,pivotPanelShow:!0,pivotSuppressAutoColumn:!0,suppressExpandablePivotGroups:!0,aggFuncs:!0,suppressAggFuncInHeader:!0,allowShowChangeAfterFilter:!0,ensureDomOrder:!0,enableRtl:!0,suppressColumnVirtualisation:!0,suppressMaxRenderedRowRestriction:!0,suppressRowVirtualisation:!0,rowDragText:!0,suppressGroupMaintainValueType:!0,groupLockGroupColumns:!0,rowGroupPanelSuppressSort:!0,suppressGroupRowsSticky:!0,rowModelType:!0,cacheOverflowSize:!0,infiniteInitialRowCount:!0,serverSideInitialRowCount:!0,suppressServerSideInfiniteScroll:!0,maxBlocksInCache:!0,maxConcurrentDatasourceRequests:!0,blockLoadDebounceMillis:!0,serverSideOnlyRefreshFilteredGroups:!0,serverSidePivotResultFieldSeparator:!0,viewportRowModelPageSize:!0,viewportRowModelBufferSize:!0,debounceVerticalScrollbar:!0,suppressAnimationFrame:!0,suppressPreventDefaultOnMouseWheel:!0,scrollbarWidth:!0,icons:!0,suppressRowTransform:!0,gridId:!0,enableGroupEdit:!0,initialState:!0,processUnpinnedColumns:!0,createChartContainer:!0,getLocaleText:!0,getRowId:!0,reactiveCustomComponents:!0,columnMenu:!0,suppressSetFilterByDefault:!0},Ce=class{};Ce.STRING_PROPERTIES=["overlayLoadingTemplate","overlayNoRowsTemplate","gridId","quickFilterText","rowModelType","editType","domLayout","clipboardDelimiter","rowGroupPanelShow","multiSortKey","pivotColumnGroupTotals","pivotRowTotals","pivotPanelShow","fillHandleDirection","groupDisplayType","treeDataDisplayType","colResizeDefault","tooltipTrigger","serverSidePivotResultFieldSeparator","columnMenu","tooltipShowMode","grandTotalRow"];Ce.OBJECT_PROPERTIES=["components","rowStyle","context","autoGroupColumnDef","localeText","icons","datasource","dragAndDropImageComponentParams","serverSideDatasource","viewportDatasource","groupRowRendererParams","aggFuncs","fullWidthCellRendererParams","defaultColGroupDef","defaultColDef","defaultCsvExportParams","defaultExcelExportParams","columnTypes","rowClassRules","detailCellRendererParams","loadingCellRendererParams","loadingOverlayComponentParams","noRowsOverlayComponentParams","popupParent","statusBar","sideBar","theme","chartThemeOverrides","customChartThemes","chartToolPanelsDef","dataTypeDefinitions","advancedFilterModel","advancedFilterParent","advancedFilterBuilderParams","initialState","autoSizeStrategy","cellSelection","selectionColumnDef"];Ce.ARRAY_PROPERTIES=["sortingOrder","alignedGrids","rowData","columnDefs","excelStyles","pinnedTopRowData","pinnedBottomRowData","chartThemes","rowClass","paginationPageSizeSelector"];Ce.NUMBER_PROPERTIES=["rowHeight","detailRowHeight","rowBuffer","headerHeight","groupHeaderHeight","groupLockGroupColumns","floatingFiltersHeight","pivotHeaderHeight","pivotGroupHeaderHeight","groupDefaultExpanded","pivotDefaultExpanded","viewportRowModelPageSize","viewportRowModelBufferSize","autoSizePadding","maxBlocksInCache","maxConcurrentDatasourceRequests","tooltipShowDelay","tooltipHideDelay","cacheOverflowSize","paginationPageSize","cacheBlockSize","infiniteInitialRowCount","serverSideInitialRowCount","scrollbarWidth","asyncTransactionWaitMillis","blockLoadDebounceMillis","keepDetailRowsCount","undoRedoCellEditingLimit","cellFlashDelay","cellFadeDelay","cellFlashDuration","cellFadeDuration","tabIndex","pivotMaxGeneratedColumns"];Ce.BOOLEAN_PROPERTIES=["suppressMakeColumnVisibleAfterUnGroup","suppressRowClickSelection","suppressCellFocus","suppressHeaderFocus","suppressHorizontalScroll","groupSelectsChildren","alwaysShowHorizontalScroll","alwaysShowVerticalScroll","debug","enableBrowserTooltips","enableCellExpressions","groupIncludeTotalFooter","groupSuppressBlankHeader","suppressMenuHide","suppressRowDeselection","unSortIcon","suppressMultiSort","alwaysMultiSort","singleClickEdit","suppressLoadingOverlay","suppressNoRowsOverlay","suppressAutoSize","skipHeaderOnAutoSize","suppressColumnMoveAnimation","suppressMoveWhenColumnDragging","suppressMovableColumns","suppressFieldDotNotation","enableRangeSelection","enableRangeHandle","enableFillHandle","suppressClearOnFillReduction","deltaSort","suppressTouch","suppressAsyncEvents","allowContextMenuWithControlKey","suppressContextMenu","enableCellChangeFlash","suppressDragLeaveHidesColumns","suppressRowGroupHidesColumns","suppressMiddleClickScrolls","suppressPreventDefaultOnMouseWheel","suppressCopyRowsToClipboard","copyHeadersToClipboard","copyGroupHeadersToClipboard","pivotMode","suppressAggFuncInHeader","suppressColumnVirtualisation","alwaysAggregateAtRootLevel","suppressFocusAfterRefresh","functionsReadOnly","animateRows","groupSelectsFiltered","groupRemoveSingleChildren","groupRemoveLowestSingleChildren","enableRtl","suppressClickEdit","rowDragEntireRow","rowDragManaged","suppressRowDrag","suppressMoveWhenRowDragging","rowDragMultiRow","enableGroupEdit","embedFullWidthRows","suppressPaginationPanel","groupHideOpenParents","groupAllowUnbalanced","pagination","paginationAutoPageSize","suppressScrollOnNewData","suppressScrollWhenPopupsAreOpen","purgeClosedRowNodes","cacheQuickFilter","includeHiddenColumnsInQuickFilter","ensureDomOrder","accentedSort","suppressChangeDetection","valueCache","valueCacheNeverExpires","aggregateOnlyChangedColumns","suppressAnimationFrame","suppressExcelExport","suppressCsvExport","includeHiddenColumnsInAdvancedFilter","suppressMultiRangeSelection","enterNavigatesVerticallyAfterEdit","enterNavigatesVertically","suppressPropertyNamesCheck","rowMultiSelectWithClick","suppressRowHoverHighlight","suppressRowTransform","suppressClipboardPaste","suppressLastEmptyLineOnPaste","enableCharts","suppressMaintainUnsortedOrder","enableCellTextSelection","suppressBrowserResizeObserver","suppressMaxRenderedRowRestriction","excludeChildrenWhenTreeDataFiltering","tooltipMouseTrack","tooltipInteraction","keepDetailRows","paginateChildRows","preventDefaultOnContextMenu","undoRedoCellEditing","allowDragFromColumnsToolPanel","pivotSuppressAutoColumn","suppressExpandablePivotGroups","debounceVerticalScrollbar","detailRowAutoHeight","serverSideSortAllLevels","serverSideEnableClientSideSort","serverSideOnlyRefreshFilteredGroups","serverSideSortOnServer","serverSideFilterOnServer","suppressAggFilteredOnly","showOpenedGroup","suppressClipboardApi","suppressModelUpdateAfterUpdateTransaction","stopEditingWhenCellsLoseFocus","groupMaintainOrder","columnHoverHighlight","readOnlyEdit","suppressRowVirtualisation","enableCellEditingOnBackspace","resetRowDataOnUpdate","removePivotHeaderRowWhenSingleValueColumn","suppressCopySingleCellRanges","suppressGroupRowsSticky","suppressCutToClipboard","suppressServerSideInfiniteScroll","rowGroupPanelSuppressSort","allowShowChangeAfterFilter","enableAdvancedFilter","masterDetail","treeData","suppressGroupMaintainValueType","reactiveCustomComponents","applyQuickFilterBeforePivotOrAgg","suppressServerSideFullWidthLoadingRow","suppressAdvancedFilterEval","loading","maintainColumnOrder","enableStrictPivotColumnOrder","suppressSetFilterByDefault"];Ce.OTHER_PROPERTIES=["suppressStickyTotalRow","loadThemeGoogleFonts","rowSelection"];Ce.FUNCTION_PROPERTIES=["doesExternalFilterPass","processPivotResultColDef","processPivotResultColGroupDef","getBusinessKeyForNode","isRowSelectable","rowDragText","groupRowRenderer","dragAndDropImageComponent","fullWidthCellRenderer","loadingCellRenderer","loadingOverlayComponent","noRowsOverlayComponent","detailCellRenderer","quickFilterParser","quickFilterMatcher","getLocaleText","isExternalFilterPresent","getRowHeight","getRowClass","getRowStyle","getContextMenuItems","getMainMenuItems","processRowPostCreate","processCellForClipboard","getGroupRowAgg","isFullWidthRow","sendToClipboard","focusGridInnerElement","navigateToNextHeader","tabToNextHeader","navigateToNextCell","tabToNextCell","processCellFromClipboard","getDocument","postProcessPopup","getChildCount","getDataPath","isRowMaster","postSortRows","processHeaderForClipboard","processUnpinnedColumns","processGroupHeaderForClipboard","paginationNumberFormatter","processDataFromClipboard","getServerSideGroupKey","isServerSideGroup","createChartContainer","getChartToolbarItems","fillOperation","isApplyServerSideTransaction","getServerSideGroupLevelParams","isServerSideGroupOpenByDefault","isGroupOpenByDefault","initialGroupOrderComparator","groupIncludeFooter","loadingCellRendererSelector","getRowId","groupAggFiltering","chartMenuItems","groupTotalRow"];Ce.ALL_PROPERTIES=[...Ce.ARRAY_PROPERTIES,...Ce.OBJECT_PROPERTIES,...Ce.STRING_PROPERTIES,...Ce.NUMBER_PROPERTIES,...Ce.FUNCTION_PROPERTIES,...Ce.BOOLEAN_PROPERTIES,...Ce.OTHER_PROPERTIES];var hi=Ce,Oe=class{static getCallbackForEvent(t){return!t||t.length<2?t:"on"+t[0].toUpperCase()+t.substring(1)}};Oe.VUE_OMITTED_PROPERTY="AG-VUE-OMITTED-PROPERTY";Oe.PUBLIC_EVENTS=zr;Oe.EVENT_CALLBACKS=Ca.map(e=>Oe.getCallbackForEvent(e));Oe.BOOLEAN_PROPERTIES=hi.BOOLEAN_PROPERTIES;Oe.ALL_PROPERTIES=hi.ALL_PROPERTIES;Oe.ALL_PROPERTIES_AND_CALLBACKS=[...Oe.ALL_PROPERTIES,...Oe.EVENT_CALLBACKS];Oe.ALL_PROPERTIES_AND_CALLBACKS_SET=new Set(Oe.ALL_PROPERTIES_AND_CALLBACKS);var gi=Oe;function Sa(e,t){typeof e!="object"&&(e={});const i={...e};return gi.ALL_PROPERTIES_AND_CALLBACKS.forEach(o=>{const r=t[o];typeof r<"u"&&r!==gi.VUE_OMITTED_PROPERTY&&(i[o]=r)}),i}function wa(e,t){if(!e)return;const i={};let s=!1;if(Object.keys(e).filter(n=>gi.ALL_PROPERTIES_AND_CALLBACKS_SET.has(n)).forEach(n=>{i[n]=e[n],s=!0}),!s)return;const o={type:"gridOptionsChanged",options:i};t.dispatchEvent(o);const r={type:"componentStateChanged"};Ne(i,(n,l)=>{r[n]=l}),t.dispatchEvent(r)}var Kt=class extends R{};function Si(e,t,i){return i&&e.addDestroyFunc(()=>t.destroyBean(i)),i??e}var wi=class{constructor(e){this.cssClassStates={},this.getGui=e}addCssClass(e){const t=(e||"").split(" ");if(t.length>1){t.forEach(s=>this.addCssClass(s));return}if(this.cssClassStates[e]!==!0&&e.length){const s=this.getGui();s&&s.classList.add(e),this.cssClassStates[e]=!0}}removeCssClass(e){const t=(e||"").split(" ");if(t.length>1){t.forEach(s=>this.removeCssClass(s));return}if(this.cssClassStates[e]!==!1&&e.length){const s=this.getGui();s&&s.classList.remove(e),this.cssClassStates[e]=!1}}containsCssClass(e){const t=this.getGui();return t?t.classList.contains(e):!1}addOrRemoveCssClass(e,t){if(!e)return;if(e.indexOf(" ")>=0){const s=(e||"").split(" ");if(s.length>1){s.forEach(o=>this.addOrRemoveCssClass(o,t));return}}if(this.cssClassStates[e]!==t&&e.length){const s=this.getGui();s&&s.classList.toggle(e,t),this.cssClassStates[e]=t}}};function st(e,t,i){i==null||typeof i=="string"&&i==""?_r(e,t):Ye(e,t,i)}function Ye(e,t,i){e.setAttribute(Ur(t),i.toString())}function _r(e,t){e.removeAttribute(Ur(t))}function Ur(e){return`aria-${e}`}function Be(e,t){t?e.setAttribute("role",t):e.removeAttribute("role")}function ya(e){let t;return e==="asc"?t="ascending":e==="desc"?t="descending":e==="mixed"?t="other":t="none",t}function Ra(e){return e.getAttribute("aria-label")}function _t(e,t){st(e,"label",t)}function pi(e,t){st(e,"labelledby",t)}function Kr(e,t){st(e,"live",t)}function Fa(e,t){st(e,"atomic",t)}function ba(e,t){st(e,"relevant",t)}function Pa(e,t){st(e,"disabled",t)}function $r(e,t){st(e,"hidden",t)}function $i(e,t){Ye(e,"expanded",t)}function Ea(e,t){Ye(e,"setsize",t)}function Da(e,t){Ye(e,"posinset",t)}function Ma(e,t){Ye(e,"rowcount",t)}function xa(e,t){Ye(e,"rowindex",t)}function Aa(e,t){Ye(e,"colcount",t)}function jr(e,t){Ye(e,"colindex",t)}function Ta(e,t){Ye(e,"colspan",t)}function Ia(e,t){Ye(e,"sort",t)}function La(e){_r(e,"sort")}function ji(e,t){st(e,"selected",t)}function Oa(e,t){st(e,"controls",t.id),pi(t,e.id)}function ro(e,t){return t===void 0?e("ariaIndeterminate","indeterminate"):t===!0?e("ariaChecked","checked"):e("ariaUnchecked","unchecked")}var Cs,Pi,vs,Ss,ws,ys,Ns,Vs,Rs;function je(){return Cs===void 0&&(Cs=/^((?!chrome|android).)*safari/i.test(navigator.userAgent)),Cs}function qr(){if(Pi===void 0)if(je()){const e=navigator.userAgent.match(/version\/(\d+)/i);e&&(Pi=e[1]!=null?parseFloat(e[1]):0)}else Pi=0;return Pi}function no(){if(vs===void 0){const e=window;vs=!!e.chrome&&(!!e.chrome.webstore||!!e.chrome.runtime)||/Chrome/.test(navigator.userAgent)&&/Google Inc/.test(navigator.vendor)}return vs}function lo(){return Ss===void 0&&(Ss=/(firefox)/i.test(navigator.userAgent)),Ss}function Yr(){return ws===void 0&&(ws=/(Mac|iPhone|iPod|iPad)/i.test(navigator.platform)),ws}function ft(){return ys===void 0&&(ys=/iPad|iPhone|iPod/.test(navigator.platform)||navigator.platform==="MacIntel"&&navigator.maxTouchPoints>1),ys}function Qo(){return!je()||qr()>=15}function Bs(e){if(!e)return null;const t=e.tabIndex,i=e.getAttribute("tabIndex");return t===-1&&(i===null||i===""&&!lo())?null:t.toString()}function Ga(){if(Rs!==void 0)return Rs;if(!document.body)return-1;let e=1e6;const t=lo()?6e6:1e9,i=document.createElement("div");for(document.body.appendChild(i);;){const s=e*2;if(i.style.height=s+"px",s>t||i.clientHeight!==s)break;e=s}return document.body.removeChild(i),Rs=e,e}function ka(){var e,t;return((e=document.body)==null?void 0:e.clientWidth)??(window.innerHeight||((t=document.documentElement)==null?void 0:t.clientWidth)||-1)}function Ha(){var e,t;return((e=document.body)==null?void 0:e.clientHeight)??(window.innerHeight||((t=document.documentElement)==null?void 0:t.clientHeight)||-1)}function Na(){return Vs==null&&Qr(),Vs}function Qr(){const e=document.body,t=document.createElement("div");t.style.width=t.style.height="100px",t.style.opacity="0",t.style.overflow="scroll",t.style.msOverflowStyle="scrollbar",t.style.position="absolute",e.appendChild(t);let i=t.offsetWidth-t.clientWidth;i===0&&t.clientWidth===0&&(i=null),t.parentNode&&t.parentNode.removeChild(t),i!=null&&(Vs=i,Ns=i===0)}function Xr(){return Ns==null&&Qr(),Ns}var Ei,Va="[tabindex], input, select, button, textarea, [href]",Jr="[disabled], .ag-disabled:not(.ag-button), .ag-disabled *";function ao(e){const t=Element.prototype.matches||Element.prototype.msMatchesSelector,s=t.call(e,"input, select, button, textarea"),o=t.call(e,Jr),r=qe(e);return s&&!o&&r}function re(e,t,i={}){const{skipAriaHidden:s}=i;e.classList.toggle("ag-hidden",!t),s||$r(e,!t)}function Ba(e,t,i={}){const{skipAriaHidden:s}=i;e.classList.toggle("ag-invisible",!t),s||$r(e,!t)}function fi(e,t){const i="disabled",s=t?o=>o.setAttribute(i,""):o=>o.removeAttribute(i);s(e),sn(e.querySelectorAll("input"),o=>s(o))}function Vt(e,t,i){let s=0;for(;e;){if(e.classList.contains(t))return!0;if(e=e.parentElement,typeof i=="number"){if(++s>i)break}else if(e===i)break}return!1}function At(e){const{height:t,width:i,borderTopWidth:s,borderRightWidth:o,borderBottomWidth:r,borderLeftWidth:n,paddingTop:l,paddingRight:a,paddingBottom:c,paddingLeft:u,marginTop:d,marginRight:h,marginBottom:g,marginLeft:m,boxSizing:C}=window.getComputedStyle(e);return{height:parseFloat(t||"0"),width:parseFloat(i||"0"),borderTopWidth:parseFloat(s||"0"),borderRightWidth:parseFloat(o||"0"),borderBottomWidth:parseFloat(r||"0"),borderLeftWidth:parseFloat(n||"0"),paddingTop:parseFloat(l||"0"),paddingRight:parseFloat(a||"0"),paddingBottom:parseFloat(c||"0"),paddingLeft:parseFloat(u||"0"),marginTop:parseFloat(d||"0"),marginRight:parseFloat(h||"0"),marginBottom:parseFloat(g||"0"),marginLeft:parseFloat(m||"0"),boxSizing:C}}function co(e){const t=At(e);return t.boxSizing==="border-box"?t.height-t.paddingTop-t.paddingBottom:t.height}function yi(e){const t=At(e);return t.boxSizing==="border-box"?t.width-t.paddingLeft-t.paddingRight:t.width}function Zr(e){const{height:t,marginBottom:i,marginTop:s}=At(e);return Math.floor(t+i+s)}function qi(e){const{width:t,marginLeft:i,marginRight:s}=At(e);return Math.floor(t+i+s)}function en(e){const t=e.getBoundingClientRect(),{borderTopWidth:i,borderLeftWidth:s,borderRightWidth:o,borderBottomWidth:r}=At(e);return{top:t.top+(i||0),left:t.left+(s||0),right:t.right+(o||0),bottom:t.bottom+(r||0)}}function Yi(){if(typeof Ei=="boolean")return Ei;const e=document.createElement("div");return e.style.direction="rtl",e.style.width="1px",e.style.height="1px",e.style.position="fixed",e.style.top="0px",e.style.overflow="hidden",e.dir="rtl",e.innerHTML=`
+import{r as p,R as x,a as Rr,b as Pl,u as El,p as Dl,j as Vi,c as Ml}from"./index-BFJcgdxv.js";var Ut=class{constructor(){this.allSyncListeners=new Map,this.allAsyncListeners=new Map,this.globalSyncListeners=new Set,this.globalAsyncListeners=new Set,this.asyncFunctionsQueue=[],this.scheduled=!1,this.firedEvents={}}setFrameworkOverrides(e){this.frameworkOverrides=e}getListeners(e,t,i){const s=t?this.allAsyncListeners:this.allSyncListeners;let o=s.get(e);return!o&&i&&(o=new Set,s.set(e,o)),o}noRegisteredListenersExist(){return this.allSyncListeners.size===0&&this.allAsyncListeners.size===0&&this.globalSyncListeners.size===0&&this.globalAsyncListeners.size===0}addEventListener(e,t,i=!1){this.getListeners(e,i,!0).add(t)}removeEventListener(e,t,i=!1){const s=this.getListeners(e,i,!1);s&&(s.delete(t),s.size===0&&(i?this.allAsyncListeners:this.allSyncListeners).delete(e))}addGlobalListener(e,t=!1){(t?this.globalAsyncListeners:this.globalSyncListeners).add(e)}removeGlobalListener(e,t=!1){(t?this.globalAsyncListeners:this.globalSyncListeners).delete(e)}dispatchEvent(e){const t=e;this.dispatchToListeners(t,!0),this.dispatchToListeners(t,!1),this.firedEvents[t.type]=!0}dispatchEventOnce(e){this.firedEvents[e.type]||this.dispatchEvent(e)}dispatchToListeners(e,t){const i=e.type;if(t&&"event"in e){const l=e.event;l instanceof Event&&(e.eventPath=l.composedPath())}const s=(l,a)=>l.forEach(c=>{if(!a.has(c))return;const u=this.frameworkOverrides?()=>this.frameworkOverrides.wrapIncoming(()=>c(e)):()=>c(e);t?this.dispatchAsync(u):u()}),o=this.getListeners(i,t,!1)??new Set,r=new Set(o);r.size>0&&s(r,o),new Set(t?this.globalAsyncListeners:this.globalSyncListeners).forEach(l=>{const a=this.frameworkOverrides?()=>this.frameworkOverrides.wrapIncoming(()=>l(i,e)):()=>l(i,e);t?this.dispatchAsync(a):a()})}dispatchAsync(e){if(this.asyncFunctionsQueue.push(e),!this.scheduled){const t=()=>{window.setTimeout(this.flushAsyncQueue.bind(this),0)};this.frameworkOverrides?this.frameworkOverrides.wrapIncoming(t):t(),this.scheduled=!0}}flushAsyncQueue(){this.scheduled=!1;const e=this.asyncFunctionsQueue.slice();this.asyncFunctionsQueue=[],e.forEach(t=>t())}},gt=(e=>(e.CommunityCoreModule="@ag-grid-community/core",e.InfiniteRowModelModule="@ag-grid-community/infinite-row-model",e.ClientSideRowModelModule="@ag-grid-community/client-side-row-model",e.CsvExportModule="@ag-grid-community/csv-export",e.EnterpriseCoreModule="@ag-grid-enterprise/core",e.RowGroupingModule="@ag-grid-enterprise/row-grouping",e.ColumnsToolPanelModule="@ag-grid-enterprise/column-tool-panel",e.FiltersToolPanelModule="@ag-grid-enterprise/filter-tool-panel",e.MenuModule="@ag-grid-enterprise/menu",e.SetFilterModule="@ag-grid-enterprise/set-filter",e.MultiFilterModule="@ag-grid-enterprise/multi-filter",e.StatusBarModule="@ag-grid-enterprise/status-bar",e.SideBarModule="@ag-grid-enterprise/side-bar",e.RangeSelectionModule="@ag-grid-enterprise/range-selection",e.MasterDetailModule="@ag-grid-enterprise/master-detail",e.RichSelectModule="@ag-grid-enterprise/rich-select",e.GridChartsModule="@ag-grid-enterprise/charts",e.ViewportRowModelModule="@ag-grid-enterprise/viewport-row-model",e.ServerSideRowModelModule="@ag-grid-enterprise/server-side-row-model",e.ExcelExportModule="@ag-grid-enterprise/excel-export",e.ClipboardModule="@ag-grid-enterprise/clipboard",e.SparklinesModule="@ag-grid-enterprise/sparklines",e.AdvancedFilterModule="@ag-grid-enterprise/advanced-filter",e.AngularModule="@ag-grid-community/angular",e.ReactModule="@ag-grid-community/react",e.VueModule="@ag-grid-community/vue",e))(gt||{}),Vo={};function Xs(e,t){Vo[t]||(e(),Vo[t]=!0)}function ct(e,...t){console.log("AG Grid: "+e,...t)}function b(e,...t){Xs(()=>console.warn("AG Grid: "+e,...t),e+(t==null?void 0:t.join("")))}function U(e,...t){Xs(()=>console.error("AG Grid: "+e,...t),e+(t==null?void 0:t.join("")))}function Js(e){return!!(e&&e.constructor&&e.call&&e.apply)}function xl(e){Al(e,400)}var hs=[],gs=!1;function Bo(e){hs.push(e),!gs&&(gs=!0,window.setTimeout(()=>{const t=hs.slice();hs.length=0,gs=!1,t.forEach(i=>i())},0))}function Al(e,t=0){e.length>0&&window.setTimeout(()=>e.forEach(i=>i()),t)}function Pe(e,t){let i;return function(...s){const o=this;window.clearTimeout(i),i=window.setTimeout(function(){e.apply(o,s)},t)}}function Wo(e,t){let i=0;return function(...s){const o=this,r=new Date().getTime();r-i{const a=new Date().getTime()-o>i;(e()||a)&&(t(),n=!0,r!=null&&(window.clearInterval(r),r=null))};l(),n||(r=window.setInterval(l,10))}function Il(...e){return t=>e.reduce((i,s)=>s(i),t)}function Je(e){return e==null||e===""?null:e}function M(e,t=!1){return e!=null&&(e!==""||t)}function B(e){return!M(e)}function Ae(e){return e==null||e.length===0}function xs(e){return e!=null&&typeof e.toString=="function"?e.toString():null}function Rt(e){if(e===void 0)return;if(e===null||e==="")return null;if(typeof e=="number")return isNaN(e)?void 0:e;const t=parseInt(e,10);return isNaN(t)?void 0:t}function As(e){if(e!==void 0)return e===null||e===""?!1:Ts(e)}function Ts(e){return typeof e=="boolean"?e:typeof e=="string"?e.toUpperCase()==="TRUE"||e=="":!1}function Bi(e,t){const i=e?JSON.stringify(e):null,s=t?JSON.stringify(t):null;return i===s}function Ll(e,t,i=!1){const s=e==null,o=t==null;if(e&&e.toNumber&&(e=e.toNumber()),t&&t.toNumber&&(t=t.toNumber()),s&&o)return 0;if(s)return-1;if(o)return 1;function r(n,l){return n>l?1:nt.push(i)),t}return Object.values(e)}function Fr(e,t){return e.get("rowModelType")===t}function ee(e){return Fr(e,"clientSide")}function it(e){return Fr(e,"serverSide")}function pe(e,t){return e.get("domLayout")===t}function Wi(e){return Ui(e)!==void 0}function zi(e){return!e.get("suppressAsyncEvents")}function br(e){return typeof e.get("getRowHeight")=="function"}function Ol(e,t){return t?!e.get("enableStrictPivotColumnOrder"):e.get("maintainColumnOrder")}function dt(e,t,i=!1,s){if(s==null&&(s=e.environment.getDefaultRowHeight()),br(e)){if(i)return{height:s,estimated:!0};const n={node:t,data:t.data},l=e.getCallback("getRowHeight")(n);if(Is(l))return l===0&&b("The return of `getRowHeight` cannot be zero. If the intention is to hide rows, use a filter instead."),{height:Math.max(1,l),estimated:!1}}if(t.detail&&e.get("masterDetail"))return Gl(e);const o=e.get("rowHeight");return{height:o&&Is(o)?o:s,estimated:!1}}function Gl(e){if(e.get("detailRowAutoHeight"))return{height:1,estimated:!1};const t=e.get("detailRowHeight");return Is(t)?{height:t,estimated:!1}:{height:300,estimated:!1}}function ts(e){const{environment:t}=e,i=e.get("rowHeight");if(!i||B(i))return t.getDefaultRowHeight();const s=t.refreshRowHeightVariable();return s!==-1?s:(b("row height must be a number if not using standard row model"),t.getDefaultRowHeight())}function Is(e){return!isNaN(e)&&typeof e=="number"&&isFinite(e)}function ui(e,t,i){const s=t[e.getDomDataKey()];return s?s[i]:void 0}function Dt(e,t,i,s){const o=e.getDomDataKey();let r=t[o];B(r)&&(r={},t[o]=r),r[i]=s}function ce(e){let t=null;const i=e.get("getDocument");return i&&M(i)?t=i():e.eGridDiv&&(t=e.eGridDiv.ownerDocument),t&&M(t)?t:document}function Pr(e){return ce(e).defaultView||window}function di(e){return e.eGridDiv.getRootNode()}function ne(e){return di(e).activeElement}function Er(e){const t=ce(e),i=ne(e);return i===null||i===t.body}function Nt(e){return e.get("ensureDomOrder")?!1:e.get("animateRows")}function is(e){return!(e.get("paginateChildRows")||e.get("groupHideOpenParents")||pe(e,"print"))}function Ue(e){const t=e.get("autoGroupColumnDef");return!(t!=null&&t.comparator)&&!e.get("treeData")}function Ls(e){const t=e.get("groupAggFiltering");if(typeof t=="function")return e.getCallback("groupAggFiltering");if(t===!0)return()=>!0}function Dr(e){const t=e.get("grandTotalRow");if(t)return t;if(e.get("groupIncludeTotalFooter"))return"bottom"}function Mr(e){const t=e.get("groupTotalRow");if(typeof t=="function")return e.getCallback("groupTotalRow");if(t)return()=>t;const i=e.get("groupIncludeFooter");if(typeof i=="function"){const s=e.getCallback("groupIncludeFooter");return o=>s(o)?"bottom":void 0}return()=>i?"bottom":void 0}function xr(e){return e.exists("groupDisplayType")?e.get("groupDisplayType")==="multipleColumns":e.get("groupHideOpenParents")}function ss(e,t){return t?!1:e.get("groupDisplayType")==="groupRows"}function Ci(e){const t=e.getCallback("getRowId");return t===void 0?t:i=>{let s=t(i);return typeof s!="string"&&(b("The getRowId callback must return a string. The ID ",s," is being cast to a string."),s=String(s)),s}}function Wt(e){return(e==null?void 0:e.checkboxes)??!0}function _i(e){return(e==null?void 0:e.mode)==="multiRow"&&(e.headerCheckbox??!0)}function kl(e){return(e==null?void 0:e.hideDisabledCheckboxes)??!1}function Hl(e){return typeof e.get("rowSelection")!="string"}function Nl(e){return e.get("cellSelection")!==void 0}function Vl(e){const t=e.get("cellSelection");return t!==void 0?typeof t!="boolean"?(t==null?void 0:t.suppressMultiRanges)??!1:!1:e.get("suppressMultiRangeSelection")}function et(e){const t=e.get("cellSelection");return t!==void 0?!!t:e.get("enableRangeSelection")}function Bl(e){var s;const t=e.get("cellSelection");return t!==void 0?typeof t!="boolean"?((s=t.handle)==null?void 0:s.mode)==="range":!1:e.get("enableRangeHandle")}function zo(e){var s;const t=e.get("cellSelection");return t!==void 0?typeof t!="boolean"?((s=t.handle)==null?void 0:s.mode)==="fill":!1:e.get("enableFillHandle")}function Ar(e){const t=e.get("rowSelection")??"single";if(typeof t=="string"){const i=e.get("suppressRowClickSelection"),s=e.get("suppressRowDeselection");return i&&s?!1:i?"enableDeselection":s?"enableSelection":!0}return t.mode==="singleRow"||t.mode==="multiRow"?t.enableClickSelection??!1:!1}function Wl(e){const t=Ar(e);return t===!0||t==="enableSelection"}function _o(e){const t=Ar(e);return t===!0||t==="enableDeselection"}function Zs(e){const t=e.get("rowSelection");return typeof t=="string"?e.get("isRowSelectable"):t==null?void 0:t.isRowSelectable}function Ui(e){const t=e.get("rowSelection");if(typeof t=="string")switch(t){case"multiple":return"multiRow";case"single":return"singleRow";default:return}return t==null?void 0:t.mode}function Tr(e){return Ui(e)==="multiRow"}function zl(e){const t=e.get("rowSelection");return typeof t=="string"?e.get("rowMultiSelectWithClick"):(t==null?void 0:t.enableSelectionWithoutKeys)??!1}function eo(e){const t=e.get("rowSelection");if(typeof t=="string"){const i=e.get("groupSelectsChildren"),s=e.get("groupSelectsFiltered");return i&&s?"filteredDescendants":i?"descendants":"self"}return(t==null?void 0:t.mode)==="multiRow"?t.groupSelects:void 0}function Mt(e){const t=eo(e);return t==="descendants"||t==="filteredDescendants"}function ps(e){return e.isModuleRegistered("@ag-grid-enterprise/set-filter")&&!e.get("suppressSetFilterByDefault")}function V(e){if(!(!e||!e.length))return e[e.length-1]}function pt(e,t,i){return e==null&&t==null?!0:e!=null&&t!=null&&e.length===t.length&&e.every((s,o)=>i?i(s,t[o]):t[o]===s)}function _l(e){return e.sort((t,i)=>t-i)}function Ir(e,t){const i=e.indexOf(t);i>=0&&(e[i]=e[e.length-1],e.pop())}function Ee(e,t){const i=e.indexOf(t);i>=0&&e.splice(i,1)}function Ul(e,t){for(let i=0;iKi(e,s,i))}function Ft(e,t){return e.indexOf(t)>-1}function $l(e){return(e==null?void 0:e.flatMap(t=>t))??[]}function Uo(e,t){t==null||e==null||t.forEach(i=>e.push(i))}var Or="__ag_Grid_Stop_Propagation",jl=["touchstart","touchend","touchmove","touchcancel","scroll"],fs={};function zt(e){e[Or]=!0}function Ze(e){return e[Or]===!0}var Gr=(()=>{const e={select:"input",change:"input",submit:"form",reset:"form",error:"img",load:"img",abort:"img"};return i=>{if(typeof fs[i]=="boolean")return fs[i];const s=document.createElement(e[i]||"div");return i="on"+i,fs[i]=i in s}})();function Os(e,t,i){let s=t;for(;s;){const o=ui(e,s,i);if(o)return o;s=s.parentElement}return null}function ql(e,t){return!t||!e?!1:Ql(t).indexOf(e)>=0}function Yl(e){const t=[];let i=e.target;for(;i;)t.push(i),i=i.parentElement;return t}function Ql(e){const t=e;return t.path?t.path:t.composedPath?t.composedPath():Yl(t)}function Xl(e,t,i,s){const r=Ft(jl,i)?{passive:!0}:void 0;e&&e.addEventListener&&e.addEventListener(t,i,s,r)}var R=class{constructor(){this.destroyFunctions=[],this.destroyed=!1,this.__v_skip=!0,this.propertyListenerId=0,this.lastChangeSetIdLookup={},this.isAlive=()=>!this.destroyed}preWireBeans(e){this.frameworkOverrides=e.frameworkOverrides,this.stubContext=e.context,this.eventService=e.eventService,this.gos=e.gos,this.localeService=e.localeService}getFrameworkOverrides(){return this.frameworkOverrides}destroy(){for(let e=0;enull;e instanceof HTMLElement?Xl(this.getFrameworkOverrides(),e,t,i):e.addEventListener(t,i);const s=()=>(e.removeEventListener(t,i),null);return this.destroyFunctions.push(s),()=>(s(),this.destroyFunctions=this.destroyFunctions.filter(o=>o!==s),null)}setupGridOptionListener(e,t){this.gos.addPropertyEventListener(e,t);const i=()=>(this.gos.removePropertyEventListener(e,t),null);return this.destroyFunctions.push(i),()=>(i(),this.destroyFunctions=this.destroyFunctions.filter(s=>s!==i),null)}addManagedPropertyListener(e,t){return this.destroyed?()=>null:this.setupGridOptionListener(e,t)}addManagedPropertyListeners(e,t){if(this.destroyed)return;const i=e.join("-")+this.propertyListenerId++,s=o=>{if(o.changeSet){if(o.changeSet&&o.changeSet.id===this.lastChangeSetIdLookup[i])return;this.lastChangeSetIdLookup[i]=o.changeSet.id}const r={type:"gridPropertyChanged",changeSet:o.changeSet,source:o.source};t(r)};e.forEach(o=>this.setupGridOptionListener(o,s))}addDestroyFunc(e){this.isAlive()?this.destroyFunctions.push(e):e()}createManagedBean(e,t){const i=this.createBean(e,t);return this.addDestroyFunc(this.destroyBean.bind(this,e,t)),i}createBean(e,t,i){return(t||this.stubContext).createBean(e,i)}destroyBean(e,t){return(t||this.stubContext).destroyBean(e)}destroyBeans(e,t){return(t||this.stubContext).destroyBeans(e)}};function ye(e){return e instanceof Oi}var Oi=class extends R{constructor(e,t,i,s){super(),this.isColumn=!1,this.expandable=!1,this.instanceId=Nr(),this.expandableListenerRemoveCallback=null,this.colGroupDef=e,this.groupId=t,this.expanded=!!e&&!!e.openByDefault,this.padding=i,this.level=s}destroy(){this.expandableListenerRemoveCallback&&this.reset(null,void 0),super.destroy()}reset(e,t){this.colGroupDef=e,this.level=t,this.originalParent=null,this.expandableListenerRemoveCallback&&this.expandableListenerRemoveCallback(),this.children=void 0,this.expandable=void 0}getInstanceId(){return this.instanceId}setOriginalParent(e){this.originalParent=e}getOriginalParent(){return this.originalParent}getLevel(){return this.level}isVisible(){return this.children?this.children.some(e=>e.isVisible()):!1}isPadding(){return this.padding}setExpanded(e){this.expanded=e===void 0?!1:e,this.dispatchLocalEvent({type:"expandedChanged"})}isExpandable(){return this.expandable}isExpanded(){return this.expanded}getGroupId(){return this.groupId}getId(){return this.getGroupId()}setChildren(e){this.children=e}getChildren(){return this.children}getColGroupDef(){return this.colGroupDef}getLeafColumns(){const e=[];return this.addLeafColumns(e),e}addLeafColumns(e){this.children&&this.children.forEach(t=>{ht(t)?e.push(t):ye(t)&&t.addLeafColumns(e)})}getColumnGroupShow(){const e=this.colGroupDef;if(e)return e.columnGroupShow}setupExpandable(){this.setExpandable(),this.expandableListenerRemoveCallback&&this.expandableListenerRemoveCallback();const e=this.onColumnVisibilityChanged.bind(this);this.getLeafColumns().forEach(t=>t.addEventListener("visibleChanged",e)),this.expandableListenerRemoveCallback=()=>{this.getLeafColumns().forEach(t=>t.removeEventListener("visibleChanged",e)),this.expandableListenerRemoveCallback=null}}setExpandable(){if(this.isPadding())return;let e=!1,t=!1,i=!1;const s=this.findChildrenRemovingPadding();for(let r=0,n=s.length;r{i.forEach(s=>{ye(s)&&s.isPadding()?t(s.children):e.push(s)})};return t(this.children),e}onColumnVisibilityChanged(){this.setExpandable()}},kr="ag-Grid-ControlsColumn",Jl=class extends R{constructor(){super(...arguments),this.beanName="controlsColService"}createControlsCols(){const{gos:e}=this,t=e.get("rowSelection");if(!t||typeof t!="object")return[];const i=Wt(t),s=_i(t);if(i||s){const o=e.get("selectionColumnDef"),n={maxWidth:50,resizable:!1,suppressHeaderMenuButton:!0,sortable:!1,suppressMovable:!0,lockPosition:e.get("enableRtl")?"right":"left",comparator(a,c,u,d){const h=u.isSelected(),g=d.isSelected();return h&&g?0:h?1:-1},editable:!1,suppressFillHandle:!0,...o,colId:`${kr}`},l=new oo(n,null,n.colId,!1);return this.createBean(l),[l]}return[]}},os="ag-Grid-AutoColumn";function to(e){const t=[],i=s=>{for(let o=0;ot+i.getActualWidth(),0)}function at(e,t,i){const s={};if(!t)return;tt(null,t,r=>{s[r.getInstanceId()]=r}),i&&tt(null,i,r=>{s[r.getInstanceId()]=null});const o=Object.values(s).filter(r=>r!=null);e.destroyBeans(o)}function Gs(e){return e.getId().startsWith(os)}function vi(e){return e.getColId().startsWith(kr)}function Gi(e){let t=[];return e instanceof Array?e.some(s=>typeof s!="string")?b("if colDef.type is supplied an array it should be of type 'string[]'"):t=e:typeof e=="string"?t=e.split(","):b("colDef.type should be of type 'string' | 'string[]'"),t}var io=class{constructor(e){this.frameworkOverrides=e,this.wrappedListeners=new Map,this.wrappedGlobalListeners=new Map}wrap(e){let t=e;return this.frameworkOverrides.shouldWrapOutgoing&&(t=i=>{this.frameworkOverrides.wrapOutgoing(()=>e(i))},this.wrappedListeners.set(e,t)),t}wrapGlobal(e){let t=e;return this.frameworkOverrides.shouldWrapOutgoing&&(t=(i,s)=>{this.frameworkOverrides.wrapOutgoing(()=>e(i,s))},this.wrappedGlobalListeners.set(e,t)),t}unwrap(e){return this.wrappedListeners.get(e)??e}unwrapGlobal(e){return this.wrappedGlobalListeners.get(e)??e}},so=new Set(["__proto__","constructor","prototype"]);function Ne(e,t){if(e!=null){if(Array.isArray(e)){for(let i=0;i{if(t&&t.indexOf(o)>=0||so.has(o))return;const r=i[o];Hs(r)&&r.constructor===Object?s[o]=ks(r):s[o]=r}),s}function Ko(e){if(!e)return[];const t=Object;if(typeof t.values=="function")return t.values(e);const i=[];for(const s in e)e.hasOwnProperty(s)&&e.propertyIsEnumerable(s)&&i.push(e[s]);return i}function Re(e,t,i=!0,s=!1){M(t)&&Ne(t,(o,r)=>{if(so.has(o))return;let n=e[o];n!==r&&(s&&n==null&&r!=null&&typeof r=="object"&&r.constructor===Object&&(n={},e[o]=n),Hs(r)&&Hs(n)&&!Array.isArray(n)?Re(n,r,i,s):(i||r!==void 0)&&(e[o]=r))})}function ri(e,t,i){if(!t||!e)return;if(!i)return e[t];const s=t.split(".");let o=e;for(let r=0;r=0&&!e,this.tooltipFieldContainsDots=M(this.colDef.tooltipField)&&this.colDef.tooltipField.indexOf(".")>=0&&!e}initMinAndMaxWidths(){const e=this.colDef;this.minWidth=e.minWidth??this.gos.environment.getDefaultColumnMinWidth(),this.maxWidth=e.maxWidth??Number.MAX_SAFE_INTEGER}initTooltip(){this.tooltipEnabled=M(this.colDef.tooltipField)||M(this.colDef.tooltipValueGetter)||M(this.colDef.tooltipComponent)}resetActualWidth(e){const t=this.calculateColInitialWidth(this.colDef);this.setActualWidth(t,e,!0)}calculateColInitialWidth(e){let t;const i=Rt(e.width),s=Rt(e.initialWidth);return i!=null?t=i:s!=null?t=s:t=200,Math.max(Math.min(t,this.maxWidth),this.minWidth)}isEmptyGroup(){return!1}isRowGroupDisplayed(e){if(B(this.colDef)||B(this.colDef.showRowGroup))return!1;const t=this.colDef.showRowGroup===!0,i=this.colDef.showRowGroup===e;return t||i}isPrimary(){return this.primary}isFilterAllowed(){return!!this.colDef.filter}isFieldContainsDots(){return this.fieldContainsDots}isTooltipEnabled(){return this.tooltipEnabled}isTooltipFieldContainsDots(){return this.tooltipFieldContainsDots}getHighlighted(){return this.highlighted}addEventListener(e,t){var s;this.frameworkOverrides.shouldWrapOutgoing&&!this.frameworkEventListenerService&&(this.columnEventService.setFrameworkOverrides(this.frameworkOverrides),this.frameworkEventListenerService=new io(this.frameworkOverrides));const i=((s=this.frameworkEventListenerService)==null?void 0:s.wrap(t))??t;this.columnEventService.addEventListener(e,i)}removeEventListener(e,t){var s;const i=((s=this.frameworkEventListenerService)==null?void 0:s.unwrap(t))??t;this.columnEventService.removeEventListener(e,i)}createColumnFunctionCallbackParams(e){return this.gos.addGridCommonParams({node:e,data:e.data,column:this,colDef:this.colDef})}isSuppressNavigable(e){if(typeof this.colDef.suppressNavigable=="boolean")return this.colDef.suppressNavigable;if(typeof this.colDef.suppressNavigable=="function"){const t=this.createColumnFunctionCallbackParams(e),i=this.colDef.suppressNavigable;return i(t)}return!1}isCellEditable(e){if(e.group){if(this.gos.get("treeData")){if(!e.data&&!this.gos.get("enableGroupEdit"))return!1}else if(!this.gos.get("enableGroupEdit"))return!1}return this.isColumnFunc(e,this.colDef.editable)}isSuppressFillHandle(){return!!this.colDef.suppressFillHandle}isAutoHeight(){return!!this.colDef.autoHeight}isAutoHeaderHeight(){return!!this.colDef.autoHeaderHeight}isRowDrag(e){return this.isColumnFunc(e,this.colDef.rowDrag)}isDndSource(e){return this.isColumnFunc(e,this.colDef.dndSource)}isCellCheckboxSelection(e){const t=this.gos.get("rowSelection");if(t&&typeof t!="string"){const i=vi(this)&&Wt(t);return this.isColumnFunc(e,i)}else return this.isColumnFunc(e,this.colDef.checkboxSelection)}isSuppressPaste(e){return this.isColumnFunc(e,this.colDef?this.colDef.suppressPaste:null)}isResizable(){return!!this.getColDefValue("resizable")}getColDefValue(e){return this.colDef[e]??Zl[e]}isColumnFunc(e,t){if(typeof t=="boolean")return t;if(typeof t=="function"){const i=this.createColumnFunctionCallbackParams(e);return t(i)}return!1}setHighlighted(e){this.highlighted!==e&&(this.highlighted=e,this.columnEventService.dispatchEvent(this.createColumnEvent("headerHighlightChanged","uiColumnMoved")))}setMoving(e,t){this.moving=e,this.columnEventService.dispatchEvent(this.createColumnEvent("movingChanged",t))}createColumnEvent(e,t){return this.gos.addGridCommonParams({type:e,column:this,columns:[this],source:t})}isMoving(){return this.moving}getSort(){return this.sort}setSort(e,t){this.sort!==e&&(this.sort=e,this.columnEventService.dispatchEvent(this.createColumnEvent("sortChanged",t))),this.dispatchStateUpdatedEvent("sort")}isSortable(){return!!this.getColDefValue("sortable")}isSortAscending(){return this.sort==="asc"}isSortDescending(){return this.sort==="desc"}isSortNone(){return B(this.sort)}isSorting(){return M(this.sort)}getSortIndex(){return this.sortIndex}setSortIndex(e){this.sortIndex=e,this.dispatchStateUpdatedEvent("sortIndex")}setMenuVisible(e,t){this.menuVisible!==e&&(this.menuVisible=e,this.columnEventService.dispatchEvent(this.createColumnEvent("menuVisibleChanged",t)))}isMenuVisible(){return this.menuVisible}setAggFunc(e){this.aggFunc=e,this.dispatchStateUpdatedEvent("aggFunc")}getAggFunc(){return this.aggFunc}getLeft(){return this.left}getOldLeft(){return this.oldLeft}getRight(){return this.left+this.actualWidth}setLeft(e,t){this.oldLeft=this.left,this.left!==e&&(this.left=e,this.columnEventService.dispatchEvent(this.createColumnEvent("leftChanged",t)))}isFilterActive(){return this.filterActive}setFilterActive(e,t,i){this.filterActive!==e&&(this.filterActive=e,this.columnEventService.dispatchEvent(this.createColumnEvent("filterActiveChanged",t)));const s=this.createColumnEvent("filterChanged",t);i&&Re(s,i),this.columnEventService.dispatchEvent(s)}isHovered(){return this.columnHoverService.isHovered(this)}setPinned(e){e===!0||e==="left"?this.pinned="left":e==="right"?this.pinned="right":this.pinned=null,this.dispatchStateUpdatedEvent("pinned")}setFirstRightPinned(e,t){this.firstRightPinned!==e&&(this.firstRightPinned=e,this.columnEventService.dispatchEvent(this.createColumnEvent("firstRightPinnedChanged",t)))}setLastLeftPinned(e,t){this.lastLeftPinned!==e&&(this.lastLeftPinned=e,this.columnEventService.dispatchEvent(this.createColumnEvent("lastLeftPinnedChanged",t)))}isFirstRightPinned(){return this.firstRightPinned}isLastLeftPinned(){return this.lastLeftPinned}isPinned(){return this.pinned==="left"||this.pinned==="right"}isPinnedLeft(){return this.pinned==="left"}isPinnedRight(){return this.pinned==="right"}getPinned(){return this.pinned}setVisible(e,t){const i=e===!0;this.visible!==i&&(this.visible=i,this.columnEventService.dispatchEvent(this.createColumnEvent("visibleChanged",t))),this.dispatchStateUpdatedEvent("hide")}isVisible(){return this.visible}isSpanHeaderHeight(){return!this.getColDef().suppressSpanHeaderHeight}getColumnGroupPaddingInfo(){let e=this.getParent();if(!e||!e.isPadding())return{numberOfParents:0,isSpanningTotal:!1};const t=e.getPaddingLevel()+1;let i=!0;for(;e;){if(!e.isPadding()){i=!1;break}e=e.getParent()}return{numberOfParents:t,isSpanningTotal:i}}getColDef(){return this.colDef}getDefinition(){return this.colDef}getColumnGroupShow(){return this.colDef.columnGroupShow}getColId(){return this.colId}getId(){return this.colId}getUniqueId(){return this.colId}getActualWidth(){return this.actualWidth}getAutoHeaderHeight(){return this.autoHeaderHeight}setAutoHeaderHeight(e){const t=e!==this.autoHeaderHeight;return this.autoHeaderHeight=e,t}createBaseColDefParams(e){return this.gos.addGridCommonParams({node:e,data:e.data,colDef:this.colDef,column:this})}getColSpan(e){if(B(this.colDef.colSpan))return 1;const t=this.createBaseColDefParams(e),i=this.colDef.colSpan(t);return Math.max(i,1)}getRowSpan(e){if(B(this.colDef.rowSpan))return 1;const t=this.createBaseColDefParams(e),i=this.colDef.rowSpan(t);return Math.max(i,1)}setActualWidth(e,t,i=!1){e=Math.max(e,this.minWidth),e=Math.min(e,this.maxWidth),this.actualWidth!==e&&(this.actualWidth=e,this.flex&&t!=="flex"&&t!=="gridInitializing"&&(this.flex=null),i||this.fireColumnWidthChangedEvent(t)),this.dispatchStateUpdatedEvent("width")}fireColumnWidthChangedEvent(e){this.columnEventService.dispatchEvent(this.createColumnEvent("widthChanged",e))}isGreaterThanMax(e){return e>this.maxWidth}getMinWidth(){return this.minWidth}getMaxWidth(){return this.maxWidth}getFlex(){return this.flex||0}setFlex(e){this.flex!==e&&(this.flex=e),this.dispatchStateUpdatedEvent("flex")}setMinimum(e){this.setActualWidth(this.minWidth,e)}setRowGroupActive(e,t){this.rowGroupActive!==e&&(this.rowGroupActive=e,this.columnEventService.dispatchEvent(this.createColumnEvent("columnRowGroupChanged",t))),this.dispatchStateUpdatedEvent("rowGroup")}isRowGroupActive(){return this.rowGroupActive}setPivotActive(e,t){this.pivotActive!==e&&(this.pivotActive=e,this.columnEventService.dispatchEvent(this.createColumnEvent("columnPivotChanged",t))),this.dispatchStateUpdatedEvent("pivot")}isPivotActive(){return this.pivotActive}isAnyFunctionActive(){return this.isPivotActive()||this.isRowGroupActive()||this.isValueActive()}isAnyFunctionAllowed(){return this.isAllowPivot()||this.isAllowRowGroup()||this.isAllowValue()}setValueActive(e,t){this.aggregationActive!==e&&(this.aggregationActive=e,this.columnEventService.dispatchEvent(this.createColumnEvent("columnValueChanged",t)))}isValueActive(){return this.aggregationActive}isAllowPivot(){return this.colDef.enablePivot===!0}isAllowValue(){return this.colDef.enableValue===!0}isAllowRowGroup(){return this.colDef.enableRowGroup===!0}dispatchStateUpdatedEvent(e){this.columnEventService.dispatchEvent({type:"columnStateUpdated",key:e})}},ta={numericColumn:{headerClass:"ag-right-aligned-header",cellClass:"ag-right-aligned-cell"},rightAligned:{headerClass:"ag-right-aligned-header",cellClass:"ag-right-aligned-cell"}},ia=class{constructor(){this.existingKeys={}}addExistingKeys(e){for(let t=0;t{ye(h)&&h.setupExpandable(),h.setOriginalParent(g)}),{columnTree:u,treeDept:c}}extractExistingTreeData(e){const t=[],i=[],s=[];return e&&tt(null,e,o=>{if(ye(o)){const r=o;i.push(r)}else{const r=o;s.push(r.getId()),t.push(r)}}),{existingCols:t,existingGroups:i,existingColKeys:s}}balanceTreeForAutoCols(e,t){const i=[],s=this.findDepth(t);return e.forEach(o=>{let r=o;for(let n=s-1;n>=0;n--){const l=new Oi(null,`FAKE_PATH_${o.getId()}}_${n}`,!0,n);this.createBean(l),l.setChildren([r]),r.setOriginalParent(l),r=l}s===0&&o.setOriginalParent(null),i.push(r)}),[i,s]}findDepth(e){let t=0,i=e;for(;i&&i[0]&&ye(i[0]);)t++,i=i[0].getChildren();return t}balanceColumnTree(e,t,i,s){const o=[];for(let r=0;r=t;c--){const u=s.getUniqueKey(null,null),d=this.createMergedColGroupDef(null),h=new Oi(d,u,!0,t);this.createBean(h),a&&a.setChildren([h]),a=h,l||(l=a)}if(l&&a)if(o.push(l),e.some(u=>ye(u))){a.setChildren([n]);continue}else{a.setChildren(e);break}o.push(n)}}return o}findMaxDept(e,t){let i=t;for(let s=0;s{o in i?b(`the column type '${o}' is a default column type and cannot be overridden.`):(r.type&&b("Column type definitions 'columnTypes' with a 'type' attribute are not supported because a column type cannot refer to another column type. Only column definitions 'columnDefs' can use the 'type' attribute to refer to a column type."),i[o]=r)}),e.forEach(o=>{const r=i[o.trim()];r?Re(t,r,!1,!0):b("colDef.type '"+o+"' does not correspond to defined gridOptions.columnTypes")})}isColumnGroup(e){return e.children!==void 0}};function tt(e,t,i){if(t)for(let s=0;sthis.refreshAll(vt(t.source))),this.addManagedPropertyListener("rowSelection",t=>{this.onSelectionOptionsChanged(t.currentValue,t.previousValue,vt(t.source))}),this.addManagedPropertyListener("autoGroupColumnDef",t=>this.onAutoGroupColumnDefChanged(vt(t.source))),this.addManagedPropertyListeners(["defaultColDef","defaultColGroupDef","columnTypes","suppressFieldDotNotation"],t=>this.recreateColumnDefs(vt(t.source))),this.addManagedPropertyListener("pivotMode",t=>this.setPivotMode(this.gos.get("pivotMode"),vt(t.source))),this.addManagedEventListeners({firstDataRendered:()=>this.onFirstDataRendered()})}createColsFromColDefs(e){var c,u,d;const t=this.colDefs?this.columnApplyStateService.compareColumnStatesAndDispatchEvents(e):void 0;this.valueCache.expire();const i=(c=this.colDefCols)==null?void 0:c.list,s=(u=this.colDefCols)==null?void 0:u.tree,o=this.columnFactory.createColumnTree(this.colDefs,!0,s,e);at(this.context,(d=this.colDefCols)==null?void 0:d.tree,o.columnTree);const r=o.columnTree,n=o.treeDept,l=to(r),a={};l.forEach(h=>a[h.getId()]=h),this.colDefCols={tree:r,treeDepth:n,list:l,map:a},this.funcColsService.extractCols(e,i),this.ready=!0,this.refreshCols(!0),this.visibleColsService.refresh(e),this.columnViewportService.checkViewportColumns(),this.eventDispatcher.everythingChanged(e),t&&(this.changeEventsDispatching=!0,t(),this.changeEventsDispatching=!1),this.eventDispatcher.newColumnsLoaded(e),e==="gridInitializing"&&this.columnSizeService.applyAutosizeStrategy()}refreshCols(e){var o,r,n;if(!this.colDefCols)return;const t=(o=this.cols)==null?void 0:o.tree;this.saveColOrder(),this.selectCols(),this.createAutoCols(),this.addAutoCols(),this.createControlsCols(),this.addControlsCols();const i=Ol(this.gos,this.showingPivotResult);(!e||i)&&this.restoreColOrder(),this.positionLockedCols(),(r=this.showRowGroupColsService)==null||r.refresh(),(n=this.quickFilterService)==null||n.refreshQuickFilterCols(),this.setColSpanActive(),this.setAutoHeightActive(),this.visibleColsService.clear(),this.columnViewportService.clear(),!pt(t,this.cols.tree)&&this.eventDispatcher.gridColumns()}selectCols(){const e=this.pivotResultColsService.getPivotResultCols();if(this.showingPivotResult=e!=null,e){const{map:t,list:i,tree:s,treeDepth:o}=e;this.cols={list:i.slice(),map:{...t},tree:s.slice(),treeDepth:o},e.list.some(n=>{var l;return((l=this.cols)==null?void 0:l.map[n.getColId()])!==void 0})||(this.lastPivotOrder=null)}else{const{map:t,list:i,tree:s,treeDepth:o}=this.colDefCols;this.cols={list:i.slice(),map:{...t},tree:s.slice(),treeDepth:o}}}getColsToShow(){const e=this.isPivotMode()&&!this.isShowingPivotResult(),t=this.funcColsService.getValueColumns();return this.cols.list.filter(s=>{const o=Gs(s);if(e){const r=t&&Ft(t,s);return o||r}else return o||s.isVisible()})}addAutoCols(){this.autoCols!=null&&(this.cols.list=this.autoCols.list.concat(this.cols.list),this.cols.tree=this.autoCols.tree.concat(this.cols.tree),$o(this.cols))}createAutoCols(){var m;const e=ss(this.gos,this.pivotMode),t=this.pivotMode?this.gos.get("pivotSuppressAutoColumn"):this.isSuppressAutoCol(),i=this.funcColsService.getRowGroupColumns(),o=!(i.length>0||this.gos.get("treeData"))||t||e,r=()=>{this.autoCols&&(at(this.context,this.autoCols.tree),this.autoCols=null)};if(o||!this.autoColService){r();return}const n=this.autoColService.createAutoCols(i)??[],l=qo(n,((m=this.autoCols)==null?void 0:m.list)||null),a=this.cols.treeDepth,u=(this.autoCols?this.autoCols.treeDepth:-1)==a;if(l&&u)return;r();const[d,h]=this.columnFactory.balanceTreeForAutoCols(n,this.cols.tree);this.autoCols={list:n,tree:d,treeDepth:h,map:{}};const g=C=>{if(!C)return null;const f=C.filter(v=>!Gs(v));return[...n,...f]};this.lastOrder=g(this.lastOrder),this.lastPivotOrder=g(this.lastPivotOrder)}createControlsCols(){var c,u,d;const e=()=>{var h;at(this.context,(h=this.controlsCols)==null?void 0:h.tree),this.controlsCols=null};this.controlsColService||e();const t=this.cols.treeDepth,s=(((c=this.controlsCols)==null?void 0:c.treeDepth)??-1)==t,o=((u=this.controlsColService)==null?void 0:u.createControlsCols())??[];if(qo(o,((d=this.controlsCols)==null?void 0:d.list)??[])&&s)return;e();const[n,l]=this.columnFactory.balanceTreeForAutoCols(o,this.cols.tree);this.controlsCols={list:o,tree:n,treeDepth:l,map:{}};const a=h=>{if(!h)return null;const g=h.filter(m=>!vi(m));return[...o,...g]};this.lastOrder=a(this.lastOrder),this.lastPivotOrder=a(this.lastPivotOrder)}addControlsCols(){this.controlsCols!=null&&(this.cols.list=this.controlsCols.list.concat(this.cols.list),this.cols.tree=this.controlsCols.tree.concat(this.cols.tree),$o(this.cols))}refreshAll(e){this.isReady()&&(this.refreshCols(!1),this.visibleColsService.refresh(e))}setColsVisible(e,t=!1,i){this.columnApplyStateService.applyColumnState({state:e.map(s=>({colId:typeof s=="string"?s:s.getColId(),hide:!t}))},i)}setColsPinned(e,t,i){if(!this.cols||Ae(e))return;if(pe(this.gos,"print")){b("Changing the column pinning status is not allowed with domLayout='print'");return}this.columnAnimationService.start();let s;t===!0||t==="left"?s="left":t==="right"?s="right":s=null;const o=[];e.forEach(r=>{if(!r)return;const n=this.getCol(r);n&&n.getPinned()!==s&&(n.setPinned(s),o.push(n))}),o.length&&(this.visibleColsService.refresh(i),this.eventDispatcher.columnPinned(o,i)),this.columnAnimationService.finish()}setColumnGroupOpened(e,t,i){let s;ye(e)?s=e.getId():s=e||"",this.columnGroupStateService.setColumnGroupState([{groupId:s,open:t}],i)}getProvidedColGroup(e){var i;let t=null;return tt(null,(i=this.cols)==null?void 0:i.tree,s=>{ye(s)&&s.getId()===e&&(t=s)}),t}isColGroupLocked(e){const t=this.gos.get("groupLockGroupColumns");if(!e.isRowGroupActive()||t===0)return!1;if(t===-1)return!0;const s=this.funcColsService.getRowGroupColumns().findIndex(o=>o.getColId()===e.getColId());return t>s}isSuppressAutoCol(){return this.gos.get("groupDisplayType")==="custom"?!0:this.gos.get("treeDataDisplayType")==="custom"}setAutoHeightActive(){this.autoHeightActive=this.cols.list.some(e=>e.isVisible()&&e.isAutoHeight()),this.autoHeightActive&&(this.autoHeightActiveAtLeastOnce=!0,ee(this.gos)||it(this.gos)||b("autoHeight columns only work with Client Side Row Model and Server Side Row Model."))}restoreColOrder(){const e=this.showingPivotResult?this.lastPivotOrder:this.lastOrder;if(!e)return;const t=new Map(e.map((a,c)=>[a,c]));if(!this.cols.list.some(a=>t.has(a)))return;const s=new Map(this.cols.list.map(a=>[a,!0])),o=e.filter(a=>s.has(a)),r=new Map(o.map(a=>[a,!0])),n=this.cols.list.filter(a=>!r.has(a)),l=o.slice();n.forEach(a=>{let c=a.getOriginalParent();if(!c){l.push(a);return}const u=[];for(;!u.length&&c;)c.getLeafColumns().forEach(m=>{const C=l.indexOf(m)>=0,f=u.indexOf(m)<0;C&&f&&u.push(m)}),c=c.getOriginalParent();if(!u.length){l.push(a);return}const d=u.map(g=>l.indexOf(g)),h=Math.max(...d);Ki(l,a,h+1)}),this.cols.list=l}sortColsLikeKeys(e){if(this.cols==null)return;let t=[];const i={};e.forEach(o=>{if(i[o])return;const r=this.cols.map[o];r&&(t.push(r),i[o]=!0)});let s=0;if(this.cols.list.forEach(o=>{const r=o.getColId();if(i[r]!=null)return;r.startsWith(os)?Ki(t,o,s++):t.push(o)}),t=this.columnMoveService.placeLockedColumns(t),!this.columnMoveService.doesMovePassMarryChildren(t)){b("Applying column order broke a group where columns should be married together. Applying new order has been discarded.");return}this.cols.list=t}sortColsLikeCols(e){!e||e.length<=1||e.filter(i=>this.cols.list.indexOf(i)<0).length>0||e.sort((i,s)=>{const o=this.cols.list.indexOf(i),r=this.cols.list.indexOf(s);return o-r})}resetColDefIntoCol(e,t){const i=e.getUserProvidedColDef();if(!i)return!1;const s=this.columnFactory.addColumnDefaultAndTypes(i,e.getColId());return e.setColDef(s,i,t),!0}queueResizeOperations(){this.shouldQueueResizeOperations=!0}isShouldQueueResizeOperations(){return this.shouldQueueResizeOperations}processResizeOperations(){this.shouldQueueResizeOperations=!1,this.resizeOperationQueue.forEach(e=>e()),this.resizeOperationQueue=[]}pushResizeOperation(e){this.resizeOperationQueue.push(e)}moveInCols(e,t,i){var s;Lr((s=this.cols)==null?void 0:s.list,e,t),this.visibleColsService.refresh(i)}positionLockedCols(){this.cols.list=this.columnMoveService.placeLockedColumns(this.cols.list)}saveColOrder(){var e,t;this.showingPivotResult?this.lastPivotOrder=(e=this.cols)==null?void 0:e.list:this.lastOrder=(t=this.cols)==null?void 0:t.list}getColumnDefs(){if(!this.colDefCols)return;const e=this.colDefCols.list.slice();this.showingPivotResult?e.sort((s,o)=>this.lastOrder.indexOf(s)-this.lastOrder.indexOf(o)):this.lastOrder&&e.sort((s,o)=>this.cols.list.indexOf(s)-this.cols.list.indexOf(o));const t=this.funcColsService.getRowGroupColumns(),i=this.funcColsService.getPivotColumns();return this.columnDefFactory.buildColumnDefs(e,t,i)}isShowingPivotResult(){return this.showingPivotResult}isChangeEventsDispatching(){return this.changeEventsDispatching}isColSpanActive(){return this.colSpanActive}isProvidedColGroupsPresent(){var e;return((e=this.colDefCols)==null?void 0:e.treeDepth)>0}setColSpanActive(){this.colSpanActive=this.cols.list.some(e=>e.getColDef().colSpan!=null)}isAutoRowHeightActive(){return this.autoHeightActive}wasAutoRowHeightEverActive(){return this.autoHeightActiveAtLeastOnce}getHeaderRowCount(){return this.cols?this.cols.treeDepth+1:-1}isReady(){return this.ready}isPivotMode(){return this.pivotMode}setPivotMode(e,t){e===this.pivotMode||!this.isPivotSettingAllowed(this.pivotMode)||(this.pivotMode=e,this.ready&&(this.refreshCols(!1),this.visibleColsService.refresh(t),this.eventDispatcher.pivotModeChanged()))}isPivotSettingAllowed(e){return e&&this.gos.get("treeData")?(b("Pivot mode not available with treeData."),!1):!0}isPivotActive(){const e=this.funcColsService.getPivotColumns();return this.pivotMode&&!Ae(e)}recreateColumnDefs(e){this.cols&&(this.autoCols&&this.autoColService.updateAutoCols(this.autoCols.list,e),this.createColsFromColDefs(e))}setColumnDefs(e,t){this.colDefs=e,this.createColsFromColDefs(t)}destroy(){var e,t,i;at(this.context,(e=this.colDefCols)==null?void 0:e.tree),at(this.context,(t=this.autoCols)==null?void 0:t.tree),at(this.context,(i=this.controlsCols)==null?void 0:i.tree),super.destroy()}getColTree(){return this.cols.tree}getColDefColTree(){return this.colDefCols.tree}getColDefCols(){var e;return(e=this.colDefCols)!=null&&e.list?this.colDefCols.list:null}getCols(){var e;return((e=this.cols)==null?void 0:e.list)??[]}getAllCols(){var i,s,o;const e=this.pivotResultColsService.getPivotResultCols(),t=e==null?void 0:e.list;return[((i=this.colDefCols)==null?void 0:i.list)??[],((s=this.autoCols)==null?void 0:s.list)??[],((o=this.controlsCols)==null?void 0:o.list)??[],t??[]].flat()}getColsForKeys(e){return e?e.map(t=>this.getCol(t)).filter(t=>t!=null):[]}getColDefCol(e){var t;return(t=this.colDefCols)!=null&&t.list?this.getColFromCollection(e,this.colDefCols):null}getCol(e){return e==null?null:this.getColFromCollection(e,this.cols)}getColFromCollection(e,t){if(t==null)return null;const{map:i,list:s}=t;if(typeof e=="string"&&i[e])return i[e];for(let o=0;ojo(i,e)))??null}getAutoCols(){var e;return((e=this.autoCols)==null?void 0:e.list)??null}setColHeaderHeight(e,t){e.setAutoHeaderHeight(t)&&(e.isColumn?this.eventDispatcher.headerHeight(e):this.eventDispatcher.groupHeaderHeight(e))}getGroupRowsHeight(){const e=[],t=this.ctrlsService.getHeaderRowContainerCtrls();for(const i of t){if(!i)continue;const s=i.getGroupRowCount()||0;for(let o=0;on)&&(e[o]=l)}}}return e}getColumnGroupHeaderRowHeight(e){const t=this.isPivotMode()?this.getPivotGroupHeaderHeight():this.getGroupHeaderHeight();let i=0;const s=e.getHeaderCtrls();for(const o of s){const r=o.getColumn();if(r.isAutoHeaderHeight()){const n=r.getAutoHeaderHeight();n!=null&&n>i&&(i=n)}}return Math.max(t,i)}getColumnHeaderRowHeight(){const e=this.isPivotMode()?this.getPivotHeaderHeight():this.getHeaderHeight(),i=this.visibleColsService.getAllCols().filter(s=>s.isAutoHeaderHeight()).map(s=>s.getAutoHeaderHeight()||0);return Math.max(e,...i)}getHeaderHeight(){return this.gos.get("headerHeight")??this.environment.getDefaultHeaderHeight()}getFloatingFiltersHeight(){return this.gos.get("floatingFiltersHeight")??this.getHeaderHeight()}getGroupHeaderHeight(){return this.gos.get("groupHeaderHeight")??this.getHeaderHeight()}getPivotHeaderHeight(){return this.gos.get("pivotHeaderHeight")??this.getHeaderHeight()}getPivotGroupHeaderHeight(){return this.gos.get("pivotGroupHeaderHeight")??this.getGroupHeaderHeight()}onFirstDataRendered(){const e=this.gos.get("autoSizeStrategy");if((e==null?void 0:e.type)!=="fitCellContents")return;const{colIds:t,skipHeader:i}=e;setTimeout(()=>{t?this.columnAutosizeService.autoSizeCols({colKeys:t,skipHeader:i,source:"autosizeColumns"}):this.columnAutosizeService.autoSizeAllColumns("autosizeColumns",i)})}onAutoGroupColumnDefChanged(e){this.autoCols&&this.autoColService.updateAutoCols(this.autoCols.list,e)}onSelectionOptionsChanged(e,t,i){const s=t&&typeof t!="string"?Wt(t):void 0,o=e&&typeof e!="string"?Wt(e):void 0,r=s!==o,n=t&&typeof t!="string"?_i(t):void 0,l=e&&typeof e!="string"?_i(e):void 0;(r||n!==l)&&this.refreshAll(i)}};function vt(e){return e==="gridOptionsUpdated"?"gridOptionsChanged":e}function $o(e){e.map={},e.list.forEach(t=>e.map[t.getId()]=t)}function jo(e,t){const i=e===t,s=e.getColDef()===t,o=e.getColId()==t;return i||s||o}function qo(e,t){return pt(e,t,(i,s)=>i.getColId()===s.getColId())}var ra=class extends R{constructor(){super(...arguments),this.beanName="columnAutosizeService",this.timesDelayed=0}wireBeans(e){this.columnModel=e.columnModel,this.visibleColsService=e.visibleColsService,this.animationFrameService=e.animationFrameService,this.autoWidthCalculator=e.autoWidthCalculator,this.eventDispatcher=e.columnEventDispatcher,this.ctrlsService=e.ctrlsService,this.renderStatusService=e.renderStatusService}autoSizeCols(e){if(this.columnModel.isShouldQueueResizeOperations()){this.columnModel.pushResizeOperation(()=>this.autoSizeCols(e));return}const{colKeys:t,skipHeader:i,skipHeaderGroups:s,stopAtGroup:o,source:r="api"}=e;if(this.animationFrameService.flushAllFrames(),this.timesDelayed<5&&this.renderStatusService&&!this.renderStatusService.areHeaderCellsRendered()){this.timesDelayed++,setTimeout(()=>this.autoSizeCols(e));return}this.timesDelayed=0;const n=[];let l=-1;const a=i??this.gos.get("skipHeaderOnAutoSize"),c=s??a;for(;l!==0;){l=0;const u=[];t.forEach(d=>{if(!d)return;const h=this.columnModel.getCol(d);if(!h||n.indexOf(h)>=0)return;const g=this.autoWidthCalculator.getPreferredWidthForColumn(h,a);if(g>0){const m=this.normaliseColumnWidth(h,g);h.setActualWidth(m,r),n.push(h),l++}u.push(h)}),u.length&&this.visibleColsService.refresh(r)}c||this.autoSizeColumnGroupsByColumns(t,r,o),this.eventDispatcher.columnResized(n,!0,"autosizeColumns")}autoSizeColumn(e,t,i){e&&this.autoSizeCols({colKeys:[e],skipHeader:i,skipHeaderGroups:!0,source:t})}autoSizeColumnGroupsByColumns(e,t,i){const s=new Set;this.columnModel.getColsForKeys(e).forEach(l=>{let a=l.getParent();for(;a&&a!=i;)a.isPadding()||s.add(a),a=a.getParent()});let r;const n=[];for(const l of s){for(const a of this.ctrlsService.getHeaderRowContainerCtrls())if(r=a.getHeaderCtrlForColumn(l),r)break;r&&r.resizeLeafColumnsToFit(t)}return n}autoSizeAllColumns(e,t){if(this.columnModel.isShouldQueueResizeOperations()){this.columnModel.pushResizeOperation(()=>this.autoSizeAllColumns(e,t));return}const i=this.visibleColsService.getAllCols();this.autoSizeCols({colKeys:i,skipHeader:t,source:e})}normaliseColumnWidth(e,t){const i=e.getMinWidth();tthis.rowGroupCols.push(e),removeGroupCol:e=>Ee(this.rowGroupCols,e),addPivotCol:e=>this.pivotCols.push(e),removePivotCol:e=>Ee(this.pivotCols,e),addValueCol:e=>this.valueCols.push(e),removeValueCol:e=>Ee(this.valueCols,e)}}getSourceColumnsForGroupColumn(e){const t=e.getColDef().showRowGroup;if(!t)return null;if(t===!0)return this.rowGroupCols.slice(0);const i=this.columnModel.getColDefCol(t);return i?[i]:null}sortRowGroupColumns(e){this.rowGroupCols.sort(e)}sortPivotColumns(e){this.pivotCols.sort(e)}getValueColumns(){return this.valueCols?this.valueCols:[]}getPivotColumns(){return this.pivotCols?this.pivotCols:[]}getRowGroupColumns(){return this.rowGroupCols?this.rowGroupCols:[]}isRowGroupEmpty(){return Ae(this.rowGroupCols)}setColumnAggFunc(e,t,i){if(!e)return;const s=this.columnModel.getColDefCol(e);s&&(s.setAggFunc(t),this.eventDispatcher.columnChanged("columnValueChanged",[s],i))}setRowGroupColumns(e,t){this.setColList(e,this.rowGroupCols,"columnRowGroupChanged",!0,!0,(i,s)=>this.setRowGroupActive(i,s,t),t)}setRowGroupActive(e,t,i){e!==t.isRowGroupActive()&&(t.setRowGroupActive(e,i),e&&!this.gos.get("suppressRowGroupHidesColumns")&&this.columnModel.setColsVisible([t],!1,i),!e&&!this.gos.get("suppressMakeColumnVisibleAfterUnGroup")&&this.columnModel.setColsVisible([t],!0,i))}addRowGroupColumns(e,t){this.updateColList(e,this.rowGroupCols,!0,!0,i=>this.setRowGroupActive(!0,i,t),"columnRowGroupChanged",t)}removeRowGroupColumns(e,t){this.updateColList(e,this.rowGroupCols,!1,!0,i=>this.setRowGroupActive(!1,i,t),"columnRowGroupChanged",t)}addPivotColumns(e,t){this.updateColList(e,this.pivotCols,!0,!1,i=>i.setPivotActive(!0,t),"columnPivotChanged",t)}setPivotColumns(e,t){this.setColList(e,this.pivotCols,"columnPivotChanged",!0,!1,(i,s)=>{s.setPivotActive(i,t)},t)}removePivotColumns(e,t){this.updateColList(e,this.pivotCols,!1,!1,i=>i.setPivotActive(!1,t),"columnPivotChanged",t)}setValueColumns(e,t){this.setColList(e,this.valueCols,"columnValueChanged",!1,!1,(i,s)=>this.setValueActive(i,s,t),t)}setValueActive(e,t,i){if(e!==t.isValueActive()&&(t.setValueActive(e,i),e&&!t.getAggFunc()&&this.aggFuncService)){const s=this.aggFuncService.getDefaultAggFunc(t);t.setAggFunc(s)}}addValueColumns(e,t){this.updateColList(e,this.valueCols,!0,!1,i=>this.setValueActive(!0,i,t),"columnValueChanged",t)}removeValueColumns(e,t){this.updateColList(e,this.valueCols,!1,!1,i=>this.setValueActive(!1,i,t),"columnValueChanged",t)}moveRowGroupColumn(e,t,i){if(this.isRowGroupEmpty())return;const s=this.rowGroupCols[e],o=this.rowGroupCols.slice(e,t);this.rowGroupCols.splice(e,1),this.rowGroupCols.splice(t,0,s),this.eventDispatcher.rowGroupChanged(o,i)}setColList(e,t,i,s,o,r,n){if(!this.columnModel.getCols())return;const l=new Map;t.forEach((c,u)=>l.set(c,u)),t.length=0,M(e)&&e.forEach(c=>{const u=this.columnModel.getColDefCol(c);u&&t.push(u)}),t.forEach((c,u)=>{const d=l.get(c);if(d===void 0){l.set(c,0);return}s&&d!==u||l.delete(c)}),(this.columnModel.getColDefCols()||[]).forEach(c=>{const u=t.indexOf(c)>=0;r(u,c)}),o&&this.columnModel.refreshCols(!1),this.visibleColsService.refresh(n),this.eventDispatcher.columnChanged(i,[...l.keys()],n)}updateColList(e,t,i,s,o,r,n){if(!e||Ae(e))return;let l=!1;const a=new Set;e.forEach(c=>{if(!c)return;const u=this.columnModel.getColDefCol(c);if(u){if(a.add(u),i){if(t.indexOf(u)>=0)return;t.push(u)}else{const d=t.indexOf(u);if(d<0)return;for(let h=d+1;hi.setValueActive(s,e),()=>{},()=>{},i=>{const s=i.aggFunc;if(s===null||s==="")return null;if(s!==void 0)return!!s},i=>i.initialAggFunc!=null&&i.initialAggFunc!=""),this.valueCols.forEach(i=>{const s=i.getColDef();s.aggFunc!=null&&s.aggFunc!=""?i.setAggFunc(s.aggFunc):i.getAggFunc()||i.setAggFunc(s.initialAggFunc)})}extractRowGroupCols(e,t){this.rowGroupCols=this.extractColsCommon(t,this.rowGroupCols,(i,s)=>i.setRowGroupActive(s,e),i=>i.rowGroupIndex,i=>i.initialRowGroupIndex,i=>i.rowGroup,i=>i.initialRowGroup)}extractPivotCols(e,t){this.pivotCols=this.extractColsCommon(t,this.pivotCols,(i,s)=>i.setPivotActive(s,e),i=>i.pivotIndex,i=>i.initialPivotIndex,i=>i.pivot,i=>i.initialPivot)}extractColsCommon(e=[],t=[],i,s,o,r,n){const l=[],a=[];(this.columnModel.getColDefCols()||[]).forEach(h=>{const g=e.indexOf(h)<0,m=h.getColDef(),C=As(r(m)),f=As(n(m)),v=Rt(s(m)),w=Rt(o(m));let S;C!==void 0?S=C:v!==void 0?v===null?S=!1:S=v>=0:g?f!==void 0?S=f:w!==void 0?S=w!=null&&w>=0:S=!1:S=t.indexOf(h)>=0,S&&((g?v!=null||w!=null:v!=null)?l.push(h):a.push(h))});const u=h=>{const g=s(h.getColDef()),m=o(h.getColDef());return g??m};l.sort((h,g)=>{const m=u(h),C=u(g);return m===C?0:m{a.indexOf(h)>=0&&d.push(h)}),a.forEach(h=>{d.indexOf(h)<0&&d.push(h)}),t.forEach(h=>{d.indexOf(h)<0&&i(h,!1)}),d.forEach(h=>{t.indexOf(h)<0&&i(h,!0)}),d}generateColumnStateForRowGroupAndPivotIndexes(e,t){const i={},s=(o,r,n,l,a,c)=>{const u=this.columnModel.getColDefCols();if(!r.length||!u)return[];const d=Object.keys(o),h=new Set(d),g=new Set(d),m=new Set(r.map(D=>{const P=D.getColId();return g.delete(P),P}).concat(d)),C=[],f={};let v=0;for(let D=0;D{const P=f[D];for(let A=F;A{const P=D.getColId();if(h.has(P))E(P),o[P][a]=w++;else{const A=D.getColDef();(A[a]===null||A[a]===void 0&&A[c]==null)&&(S||(A[n]||A[n]===void 0&&A[l]?E(P):(g.forEach(T=>{o[T][a]=w+f[T]}),w+=C.length,S=!0)),i[P]||(i[P]={colId:P}),i[P][a]=w++)}})};return s(e,this.rowGroupCols,"rowGroup","initialRowGroup","rowGroupIndex","initialRowGroupIndex"),s(t,this.pivotCols,"pivot","initialPivot","pivotIndex","initialPivotIndex"),Object.values(i)}},la=class extends R{constructor(){super(...arguments),this.beanName="columnApplyStateService"}wireBeans(e){this.columnModel=e.columnModel,this.eventDispatcher=e.columnEventDispatcher,this.sortController=e.sortController,this.columnGetStateService=e.columnGetStateService,this.funcColsService=e.funcColsService,this.visibleColsService=e.visibleColsService,this.columnAnimationService=e.columnAnimationService,this.pivotResultColsService=e.pivotResultColsService}applyColumnState(e,t){const i=this.columnModel.getColDefCols()||[];if(Ae(i))return!1;if(e&&e.state&&!e.state.forEach)return b("applyColumnState() - the state attribute should be an array, however an array was not found. Please provide an array of items (one for each col you want to change) for state."),!1;const s=this.funcColsService.getModifyColumnsNoEventsCallbacks(),o=(l,a,c)=>{const u=this.compareColumnStatesAndDispatchEvents(t),d=a.slice(),h={},g={},m=[],C=[];let f=0;const v=this.funcColsService.getRowGroupColumns().slice(),w=this.funcColsService.getPivotColumns().slice();l.forEach(D=>{const P=D.colId||"";if(P.startsWith(os)){m.push(D),C.push(D);return}const I=c(P);I?(this.syncColumnWithStateItem(I,D,e.defaultState,h,g,!1,t,s),Ee(d,I)):(C.push(D),f+=1)});const S=D=>this.syncColumnWithStateItem(D,null,e.defaultState,h,g,!1,t,s);d.forEach(S),this.funcColsService.sortRowGroupColumns(Yo.bind(this,h,v)),this.funcColsService.sortPivotColumns(Yo.bind(this,g,w)),this.columnModel.refreshCols(!1);const E=(this.columnModel.getAutoCols()||[]).slice();return m.forEach(D=>{const P=this.columnModel.getAutoCol(D.colId);Ee(E,P),this.syncColumnWithStateItem(P,D,e.defaultState,null,null,!0,t,s)}),E.forEach(S),this.orderLiveColsLikeState(e),this.visibleColsService.refresh(t),this.eventDispatcher.everythingChanged(t),u(),{unmatchedAndAutoStates:C,unmatchedCount:f}};this.columnAnimationService.start();let{unmatchedAndAutoStates:r,unmatchedCount:n}=o(e.state||[],i,l=>this.columnModel.getColDefCol(l));if(r.length>0||M(e.defaultState)){const l=this.pivotResultColsService.getPivotResultCols(),a=l==null?void 0:l.list;n=o(r,a||[],c=>this.pivotResultColsService.getPivotResultCol(c)).unmatchedCount}return this.columnAnimationService.finish(),n===0}resetColumnState(e){const t=this.columnModel.getColDefCols();if(Ae(t))return;const i=this.columnModel.getColDefColTree(),s=to(i),o=[];let r=1e3,n=1e3,l=[];const a=this.columnModel.getAutoCols();a&&(l=l.concat(a)),s&&(l=l.concat(s)),l.forEach(c=>{const u=this.getColumnStateFromColDef(c);B(u.rowGroupIndex)&&u.rowGroup&&(u.rowGroupIndex=r++),B(u.pivotIndex)&&u.pivot&&(u.pivotIndex=n++),o.push(u)}),this.applyColumnState({state:o,applyOrder:!0},e)}getColumnStateFromColDef(e){const t=(m,C)=>m??C??null,i=e.getColDef(),s=t(i.sort,i.initialSort),o=t(i.sortIndex,i.initialSortIndex),r=t(i.hide,i.initialHide),n=t(i.pinned,i.initialPinned),l=t(i.width,i.initialWidth),a=t(i.flex,i.initialFlex);let c=t(i.rowGroupIndex,i.initialRowGroupIndex),u=t(i.rowGroup,i.initialRowGroup);c==null&&(u==null||u==!1)&&(c=null,u=null);let d=t(i.pivotIndex,i.initialPivotIndex),h=t(i.pivot,i.initialPivot);d==null&&(h==null||h==!1)&&(d=null,h=null);const g=t(i.aggFunc,i.initialAggFunc);return{colId:e.getColId(),sort:s,sortIndex:o,hide:r,pinned:n,width:l,flex:a,rowGroup:u,rowGroupIndex:c,pivot:h,pivotIndex:d,aggFunc:g}}syncColumnWithStateItem(e,t,i,s,o,r,n,l){if(!e)return;const a=(F,E)=>{const D={value1:void 0,value2:void 0};let P=!1;return t&&(t[F]!==void 0&&(D.value1=t[F],P=!0),M(E)&&t[E]!==void 0&&(D.value2=t[E],P=!0)),!P&&i&&(i[F]!==void 0&&(D.value1=i[F]),M(E)&&i[E]!==void 0&&(D.value2=i[E])),D},c=a("hide").value1;c!==void 0&&e.setVisible(!c,n);const u=a("pinned").value1;u!==void 0&&e.setPinned(u);const d=e.getColDef().minWidth??this.gos.environment.getDefaultColumnMinWidth(),h=a("flex").value1;if(h!==void 0&&e.setFlex(h),h==null){const F=a("width").value1;F!=null&&d!=null&&F>=d&&e.setActualWidth(F,n)}const g=a("sort").value1;g!==void 0&&(g==="desc"||g==="asc"?e.setSort(g,n):e.setSort(void 0,n));const m=a("sortIndex").value1;if(m!==void 0&&e.setSortIndex(m),r||!e.isPrimary())return;const C=a("aggFunc").value1;C!==void 0&&(typeof C=="string"?(e.setAggFunc(C),e.isValueActive()||(e.setValueActive(!0,n),l.addValueCol(e))):(M(C)&&b("stateItem.aggFunc must be a string. if using your own aggregation functions, register the functions first before using them in get/set state. This is because it is intended for the column state to be stored and retrieved as simple JSON."),e.isValueActive()&&(e.setValueActive(!1,n),l.removeValueCol(e))));const{value1:f,value2:v}=a("rowGroup","rowGroupIndex");(f!==void 0||v!==void 0)&&(typeof v=="number"||f?(e.isRowGroupActive()||(e.setRowGroupActive(!0,n),l.addGroupCol(e)),s&&typeof v=="number"&&(s[e.getId()]=v)):e.isRowGroupActive()&&(e.setRowGroupActive(!1,n),l.removeGroupCol(e)));const{value1:w,value2:S}=a("pivot","pivotIndex");(w!==void 0||S!==void 0)&&(typeof S=="number"||w?(e.isPivotActive()||(e.setPivotActive(!0,n),l.addPivotCol(e)),o&&typeof S=="number"&&(o[e.getId()]=S)):e.isPivotActive()&&(e.setPivotActive(!1,n),l.removePivotCol(e)))}orderLiveColsLikeState(e){if(!e.applyOrder||!e.state)return;const t=[];e.state.forEach(i=>{i.colId!=null&&t.push(i.colId)}),this.columnModel.sortColsLikeKeys(t)}compareColumnStatesAndDispatchEvents(e){const t={rowGroupColumns:this.funcColsService.getRowGroupColumns().slice(),pivotColumns:this.funcColsService.getPivotColumns().slice(),valueColumns:this.funcColsService.getValueColumns().slice()},i=this.columnGetStateService.getColumnState(),s={};return i.forEach(o=>{s[o.colId]=o}),()=>{const o=this.columnModel.getAllCols(),r=(C,f,v,w)=>{const S=f.map(w),F=v.map(w);if(pt(S,F))return;const D=new Set(f);v.forEach(A=>{D.delete(A)||D.add(A)});const P=[...D];this.eventService.dispatchEvent({type:C,columns:P,column:P.length===1?P[0]:null,source:e})},n=C=>{const f=[];return o.forEach(v=>{const w=s[v.getColId()];w&&C(w,v)&&f.push(v)}),f},l=C=>C.getColId();r("columnRowGroupChanged",t.rowGroupColumns,this.funcColsService.getRowGroupColumns(),l),r("columnPivotChanged",t.pivotColumns,this.funcColsService.getPivotColumns(),l);const c=n((C,f)=>{const v=C.aggFunc!=null,w=v!=f.isValueActive(),S=v&&C.aggFunc!=f.getAggFunc();return w||S});c.length>0&&this.eventDispatcher.columnChanged("columnValueChanged",c,e);const u=(C,f)=>C.width!=f.getActualWidth();this.eventDispatcher.columnResized(n(u),!0,e);const d=(C,f)=>C.pinned!=f.getPinned();this.eventDispatcher.columnPinned(n(d),e);const h=(C,f)=>C.hide==f.isVisible();this.eventDispatcher.columnVisible(n(h),e);const m=n((C,f)=>C.sort!=f.getSort()||C.sortIndex!=f.getSortIndex());m.length>0&&this.sortController.dispatchSortChangedEvents(e,m),this.normaliseColumnMovedEventForColumnState(i,e)}}normaliseColumnMovedEventForColumnState(e,t){const i=this.columnGetStateService.getColumnState(),s={};i.forEach(a=>s[a.colId]=a);const o={};e.forEach(a=>{s[a.colId]&&(o[a.colId]=!0)});const r=e.filter(a=>o[a.colId]),n=i.filter(a=>o[a.colId]),l=[];n.forEach((a,c)=>{const u=r&&r[c];if(u&&u.colId!==a.colId){const d=this.columnModel.getCol(u.colId);d&&l.push(d)}}),l.length&&this.eventDispatcher.columnMoved({movedColumns:l,source:t,finished:!0})}},Yo=(e,t,i,s)=>{const o=e[i.getId()],r=e[s.getId()],n=o!=null,l=r!=null;if(n&&l)return o-r;if(n)return-1;if(l)return 1;const a=t.indexOf(i),c=t.indexOf(s),u=a>=0,d=c>=0;return u&&d?a-c:u?-1:1},aa=class extends R{constructor(){super(...arguments),this.beanName="columnMoveService"}wireBeans(e){this.columnModel=e.columnModel,this.columnAnimationService=e.columnAnimationService,this.eventDispatcher=e.columnEventDispatcher}moveColumnByIndex(e,t,i){const s=this.columnModel.getCols();if(!s)return;const o=s[e];this.moveColumns([o],t,i)}moveColumns(e,t,i,s=!0){const o=this.columnModel.getCols();if(!o)return;if(t>o.length-e.length){b("tried to insert columns in invalid location, toIndex = ",t),b("remember that you should not count the moving columns when calculating the new index");return}this.columnAnimationService.start();const r=this.columnModel.getColsForKeys(e);this.doesMovePassRules(r,t)&&(this.columnModel.moveInCols(r,t,i),this.eventDispatcher.columnMoved({movedColumns:r,source:i,toIndex:t,finished:s})),this.columnAnimationService.finish()}doesMovePassRules(e,t){const i=this.getProposedColumnOrder(e,t);return this.doesOrderPassRules(i)}doesOrderPassRules(e){return!(!this.doesMovePassMarryChildren(e)||!this.doesMovePassLockedPositions(e))}getProposedColumnOrder(e,t){const s=this.columnModel.getCols().slice();return Lr(s,e,t),s}doesMovePassLockedPositions(e){const t=r=>r?r==="left"||r===!0?-1:1:0,i=this.gos.get("enableRtl");let s=i?1:-1,o=!0;return e.forEach(r=>{const n=t(r.getColDef().lockPosition);i?n>s&&(o=!1):n{if(!ye(s))return;const o=s,r=o.getColGroupDef();if(!(r&&r.marryChildren))return;const l=[];o.getLeafColumns().forEach(h=>{const g=e.indexOf(h);l.push(g)});const a=Math.max.apply(Math,l),c=Math.min.apply(Math,l),u=a-c,d=o.getLeafColumns().length-1;u>d&&(t=!1)}),t}placeLockedColumns(e){const t=[],i=[],s=[];return e.forEach(r=>{const n=r.getColDef().lockPosition;n==="right"?s.push(r):n==="left"||n===!0?t.push(r):i.push(r)}),this.gos.get("enableRtl")?[...s,...i,...t]:[...t,...i,...s]}},ca=/[&<>"']/g,ua={"&":"&","<":"<",">":">",'"':""","'":"'"};function $e(e,t){if(e==null)return null;const i=e.toString().toString();return t?i:i.replace(ca,s=>ua[s])}function da(e){if(!e||e==null)return null;const t=/([a-z])([A-Z])/g,i=/([A-Z]+)([A-Z])([a-z])/g;return e.replace(t,"$1 $2").replace(i,"$1 $2$3").replace(/\./g," ").split(" ").map(o=>o.substring(0,1).toUpperCase()+(o.length>1?o.substring(1,o.length):"")).join(" ")}var ha=class extends R{constructor(){super(...arguments),this.beanName="columnNameService"}wireBeans(e){this.expressionService=e.expressionService,this.funcColsService=e.funcColsService,this.columnModel=e.columnModel}getDisplayNameForColumn(e,t,i=!1){if(!e)return null;const s=this.getHeaderName(e.getColDef(),e,null,null,t);return i?this.wrapHeaderNameWithAggFunc(e,s):s}getDisplayNameForProvidedColumnGroup(e,t,i){const s=t?t.getColGroupDef():null;return s?this.getHeaderName(s,null,e,t,i):null}getDisplayNameForColumnGroup(e,t){return this.getDisplayNameForProvidedColumnGroup(e,e.getProvidedColumnGroup(),t)}getHeaderName(e,t,i,s,o){const r=e.headerValueGetter;if(r){const n=this.gos.addGridCommonParams({colDef:e,column:t,columnGroup:i,providedColumnGroup:s,location:o});return typeof r=="function"?r(n):typeof r=="string"?this.expressionService.evaluate(r,n):(b("headerValueGetter must be a function or a string"),"")}else{if(e.headerName!=null)return e.headerName;if(e.field)return da(e.field)}return""}wrapHeaderNameWithAggFunc(e,t){if(this.gos.get("suppressAggFuncInHeader"))return t;const i=e.getColDef().pivotValueColumn,s=M(i);let o=null,r;if(s){const n=this.funcColsService.getValueColumns(),l=this.gos.get("removePivotHeaderRowWhenSingleValueColumn")&&n.length===1,a=e.getColDef().pivotTotalColumnIds!==void 0;if(l&&!a)return t;o=i?i.getAggFunc():null,r=!0}else{const n=e.isValueActive(),l=this.columnModel.isPivotMode()||!this.funcColsService.isRowGroupEmpty();n&&l?(o=e.getAggFunc(),r=!0):r=!1}if(r){const n=typeof o=="string"?o:"func";return`${this.localeService.getLocaleTextFunc()(n,n)}(${t})`}return t}},ga=class extends R{constructor(){super(...arguments),this.beanName="pivotResultColsService"}wireBeans(e){this.context=e.context,this.columnModel=e.columnModel,this.columnFactory=e.columnFactory,this.visibleColsService=e.visibleColsService}destroy(){var e;at(this.context,(e=this.pivotResultCols)==null?void 0:e.tree),super.destroy()}isPivotResultColsPresent(){return this.pivotResultCols!=null}lookupPivotResultCol(e,t){if(this.pivotResultCols==null)return null;const i=this.columnModel.getColDefCol(t);let s=null;return this.pivotResultCols.list.forEach(o=>{const r=o.getColDef().pivotKeys,n=o.getColDef().pivotValueColumn;pt(r,e)&&n===i&&(s=o)}),s}getPivotResultCols(){return this.pivotResultCols}getPivotResultCol(e){return this.pivotResultCols?this.columnModel.getColFromCollection(e,this.pivotResultCols):null}setPivotResultCols(e,t){var i,s;if(this.columnModel.isReady()&&!(e==null&&this.pivotResultCols==null)){if(e){this.processPivotResultColDef(e);const o=this.columnFactory.createColumnTree(e,!1,((i=this.pivotResultCols)==null?void 0:i.tree)||this.previousPivotResultCols||void 0,t);at(this.context,(s=this.pivotResultCols)==null?void 0:s.tree,o.columnTree);const r=o.columnTree,n=o.treeDept,l=to(r),a={};this.pivotResultCols={tree:r,treeDepth:n,list:l,map:a},this.pivotResultCols.list.forEach(u=>this.pivotResultCols.map[u.getId()]=u);const c=!!this.previousPivotResultCols;this.previousPivotResultCols=null,this.columnModel.refreshCols(!c)}else this.previousPivotResultCols=this.pivotResultCols?this.pivotResultCols.tree:null,this.pivotResultCols=null,this.columnModel.refreshCols(!1);this.visibleColsService.refresh(t)}}processPivotResultColDef(e){const t=this.gos.get("processPivotResultColDef"),i=this.gos.get("processPivotResultColGroupDef");if(!t&&!i)return;const s=o=>{o.forEach(r=>{if(M(r.children)){const l=r;i&&i(l),s(l.children)}else t&&t(r)})};e&&s(e)}},pa=class extends R{constructor(){super(...arguments),this.beanName="columnSizeService"}wireBeans(e){this.columnModel=e.columnModel,this.columnViewportService=e.columnViewportService,this.eventDispatcher=e.columnEventDispatcher,this.visibleColsService=e.visibleColsService,this.ctrlsService=e.ctrlsService}setColumnWidths(e,t,i,s){const o=[];e.forEach(r=>{const n=this.columnModel.getColDefCol(r.key)||this.columnModel.getCol(r.key);if(!n)return;if(o.push({width:r.newWidth,ratios:[1],columns:[n]}),this.gos.get("colResizeDefault")==="shift"&&(t=!t),t){const a=this.visibleColsService.getColAfter(n);if(!a)return;const c=n.getActualWidth()-r.newWidth,u=a.getActualWidth()+c;o.push({width:u,ratios:[1],columns:[a]})}}),o.length!==0&&this.resizeColumnSets({resizeSets:o,finished:i,source:s})}resizeColumnSets(e){const{resizeSets:t,finished:i,source:s}=e;if(!(!t||t.every(u=>this.checkMinAndMaxWidthsForSet(u)))){if(i){const u=t&&t.length>0?t[0].columns:null;this.eventDispatcher.columnResized(u,i,s)}return}const r=[],n=[];t.forEach(u=>{const{width:d,columns:h,ratios:g}=u,m={},C={};h.forEach(w=>n.push(w));let f=!0,v=0;for(;f;){if(v++,v>1e3){U("infinite loop in resizeColumnSets");break}f=!1;const w=[];let S=0,F=d;h.forEach((D,P)=>{if(C[D.getId()])F-=m[D.getId()];else{w.push(D);const I=g[P];S+=I}});const E=1/S;w.forEach((D,P)=>{const A=P===w.length-1;let I;A?I=F:(I=Math.round(g[P]*d*E),F-=I);const O=D.getMinWidth(),T=D.getMaxWidth();I0&&I>T&&(I=T,C[D.getId()]=!0,f=!0),m[D.getId()]=I})}h.forEach(w=>{const S=m[w.getId()];w.getActualWidth()!==S&&(w.setActualWidth(S,s),r.push(w))})});const l=r.length>0;let a=[];l&&(a=this.refreshFlexedColumns({resizingCols:n,skipSetLeft:!0}),this.visibleColsService.setLeftValues(s),this.visibleColsService.updateBodyWidths(),this.columnViewportService.checkViewportColumns());const c=n.concat(a);(l||i)&&this.eventDispatcher.columnResized(c,i,s,a)}checkMinAndMaxWidthsForSet(e){const{columns:t,width:i}=e;let s=0,o=0,r=!0;t.forEach(a=>{const c=a.getMinWidth();s+=c||0;const u=a.getMaxWidth();u>0?o+=u:r=!1});const n=i>=s,l=!r||i<=o;return n&&l}refreshFlexedColumns(e={}){const t=e.source?e.source:"flex";if(e.viewportWidth!=null&&(this.flexViewportWidth=e.viewportWidth),!this.flexViewportWidth)return[];const i=this.visibleColsService.getCenterCols();let s=-1;if(e.resizingCols){const h=new Set(e.resizingCols);for(let g=i.length-1;g>=0;g--)if(h.has(i[g])){s=g;break}}let o=0,r=[],n=0,l=0;for(let h=0;hs?(r.push(i[h]),l+=i[h].getFlex(),n+=i[h].getMinWidth()):o+=i[h].getActualWidth();if(!r.length)return[];let a=[];o+n>this.flexViewportWidth&&(r.forEach(h=>h.setActualWidth(h.getMinWidth(),t)),a=r,r=[]);const c=[];let u;e:for(;;){u=this.flexViewportWidth-o;const h=u/l;for(let g=0;gw&&(f=w),f){m.setActualWidth(f,t),Ir(r,m),l-=m.getFlex(),a.push(m),o+=m.getActualWidth();continue e}c[g]=Math.floor(C)}break}let d=u;return r.forEach((h,g)=>{const m=gthis.sizeColumnsToFit(e,t,i,s));return}const o={};s&&((h=s==null?void 0:s.columnLimits)==null||h.forEach(({key:g,...m})=>{o[typeof g=="string"?g:g.getColId()]=m}));const r=this.visibleColsService.getAllCols(),n=e===Xe(r);if(e<=0||!r.length||n)return;const l=[],a=[];r.forEach(g=>{g.getColDef().suppressSizeToFit===!0?a.push(g):l.push(g)});const c=l.slice(0);let u=!1;const d=g=>{Ee(l,g),a.push(g)};for(l.forEach(g=>{g.resetActualWidth(t);const m=o==null?void 0:o[g.getId()],C=(m==null?void 0:m.minWidth)??(s==null?void 0:s.defaultMinWidth),f=(m==null?void 0:m.maxWidth)??(s==null?void 0:s.defaultMaxWidth),v=g.getActualWidth();typeof C=="number"&&vf&&g.setActualWidth(f,t,!0)});!u;){u=!0;const g=e-Xe(a);if(g<=0)l.forEach(m=>{var f;const C=((f=o==null?void 0:o[m.getId()])==null?void 0:f.minWidth)??(s==null?void 0:s.defaultMinWidth);if(typeof C=="number"){m.setActualWidth(C,t,!0);return}m.setMinimum(t)});else{const m=g/Xe(l);let C=g;for(let f=l.length-1;f>=0;f--){const v=l[f],w=o==null?void 0:o[v.getId()],S=(w==null?void 0:w.minWidth)??(s==null?void 0:s.defaultMinWidth),F=(w==null?void 0:w.maxWidth)??(s==null?void 0:s.defaultMaxWidth),E=v.getMinWidth(),D=v.getMaxWidth(),P=typeof S=="number"&&S>E?S:E,A=typeof F=="number"&&FA?(I=A,d(v),u=!1):f===0&&(I=C),v.setActualWidth(I,t,!0),C-=I}}}c.forEach(g=>{g.fireColumnWidthChangedEvent(t)}),this.visibleColsService.setLeftValues(t),this.visibleColsService.updateBodyWidths(),!i&&this.eventDispatcher.columnResized(c,!0,t)}applyAutosizeStrategy(){const e=this.gos.get("autoSizeStrategy");if(!e)return;const{type:t}=e;setTimeout(()=>{if(t==="fitGridWidth"){const{columnLimits:i,defaultMinWidth:s,defaultMaxWidth:o}=e,r=i==null?void 0:i.map(({colId:n,minWidth:l,maxWidth:a})=>({key:n,minWidth:l,maxWidth:a}));this.ctrlsService.getGridBodyCtrl().sizeColumnsToFit({defaultMinWidth:s,defaultMaxWidth:o,columnLimits:r})}else t==="fitProvidedWidth"&&this.sizeColumnsToFit(e.width,"sizeColumnsToFit")})}};function Vr(e,t){return e+"_"+t}function de(e){return e instanceof Br}var Br=class extends R{constructor(e,t,i,s){super(),this.isColumn=!1,this.displayedChildren=[],this.autoHeaderHeight=null,this.parent=null,this.groupId=t,this.partId=i,this.providedColumnGroup=e,this.pinned=s}reset(){this.parent=null,this.children=null,this.displayedChildren=null}getParent(){return this.parent}setParent(e){this.parent=e}getUniqueId(){return Vr(this.groupId,this.partId)}isEmptyGroup(){return this.displayedChildren.length===0}isMoving(){const e=this.getProvidedColumnGroup().getLeafColumns();return!e||e.length===0?!1:e.every(t=>t.isMoving())}checkLeft(){if(this.displayedChildren.forEach(e=>{de(e)&&e.checkLeft()}),this.displayedChildren.length>0)if(this.gos.get("enableRtl")){const t=V(this.displayedChildren).getLeft();this.setLeft(t)}else{const e=this.displayedChildren[0].getLeft();this.setLeft(e)}else this.setLeft(null)}getLeft(){return this.left}getOldLeft(){return this.oldLeft}setLeft(e){this.oldLeft=this.left,this.left!==e&&(this.left=e,this.dispatchLocalEvent({type:"leftChanged"}))}getPinned(){return this.pinned}getGroupId(){return this.groupId}getPartId(){return this.partId}getActualWidth(){let e=0;return this.displayedChildren&&this.displayedChildren.forEach(t=>{e+=t.getActualWidth()}),e}isResizable(){if(!this.displayedChildren)return!1;let e=!1;return this.displayedChildren.forEach(t=>{t.isResizable()&&(e=!0)}),e}getMinWidth(){let e=0;return this.displayedChildren.forEach(t=>{e+=t.getMinWidth()}),e}addChild(e){this.children||(this.children=[]),this.children.push(e)}getDisplayedChildren(){return this.displayedChildren}getLeafColumns(){const e=[];return this.addLeafColumns(e),e}getDisplayedLeafColumns(){const e=[];return this.addDisplayedLeafColumns(e),e}getDefinition(){return this.providedColumnGroup.getColGroupDef()}getColGroupDef(){return this.providedColumnGroup.getColGroupDef()}isPadding(){return this.providedColumnGroup.isPadding()}isExpandable(){return this.providedColumnGroup.isExpandable()}isExpanded(){return this.providedColumnGroup.isExpanded()}setExpanded(e){this.providedColumnGroup.setExpanded(e)}isAutoHeaderHeight(){var e;return!!((e=this.getColGroupDef())!=null&&e.autoHeaderHeight)}getAutoHeaderHeight(){return this.autoHeaderHeight}setAutoHeaderHeight(e){const t=e!==this.autoHeaderHeight;return this.autoHeaderHeight=e,t}addDisplayedLeafColumns(e){this.displayedChildren.forEach(t=>{ht(t)?e.push(t):de(t)&&t.addDisplayedLeafColumns(e)})}addLeafColumns(e){this.children.forEach(t=>{ht(t)?e.push(t):de(t)&&t.addLeafColumns(e)})}getChildren(){return this.children}getColumnGroupShow(){return this.providedColumnGroup.getColumnGroupShow()}getProvidedColumnGroup(){return this.providedColumnGroup}getPaddingLevel(){const e=this.getParent();return!this.isPadding()||!e||!e.isPadding()?0:1+e.getPaddingLevel()}calculateDisplayedColumns(){this.displayedChildren=[];let e=this;for(;e!=null&&e.isPadding();)e=e.getParent();if(!(e?e.getProvidedColumnGroup().isExpandable():!1)){this.displayedChildren=this.children,this.dispatchLocalEvent({type:"displayedChildrenChanged"});return}this.children.forEach(i=>{if(de(i)&&(!i.displayedChildren||!i.displayedChildren.length))return;switch(i.getColumnGroupShow()){case"open":e.getProvidedColumnGroup().isExpanded()&&this.displayedChildren.push(i);break;case"closed":e.getProvidedColumnGroup().isExpanded()||this.displayedChildren.push(i);break;default:this.displayedChildren.push(i);break}}),this.dispatchLocalEvent({type:"displayedChildrenChanged"})}},Wr=class{constructor(){this.existingIds={}}getInstanceIdForKey(e){const t=this.existingIds[e];let i;return typeof t!="number"?i=0:i=t+1,this.existingIds[e]=i,i}},fa=class extends R{constructor(){super(...arguments),this.beanName="visibleColsService",this.colsAndGroupsMap={},this.columnsLeft=[],this.columnsRight=[],this.columnsCenter=[],this.columns=[],this.bodyWidth=0,this.leftWidth=0,this.rightWidth=0,this.bodyWidthDirty=!0}wireBeans(e){this.columnModel=e.columnModel,this.columnSizeService=e.columnSizeService,this.columnViewportService=e.columnViewportService,this.eventDispatcher=e.columnEventDispatcher}refresh(e,t=!1){t||this.buildTrees(),this.updateOpenClosedVisibilityInColumnGroups(),this.columnsLeft=ms(this.treeLeft),this.columnsCenter=ms(this.treeCenter),this.columnsRight=ms(this.treeRight),this.joinColsAriaOrder(),this.joinCols(),this.setLeftValues(e),this.autoHeightCols=this.columns.filter(i=>i.isAutoHeight()),this.columnSizeService.refreshFlexedColumns(),this.updateBodyWidths(),this.columnViewportService.checkViewportColumns(!1),this.setFirstRightAndLastLeftPinned(e),this.eventDispatcher.visibleCols(e)}updateBodyWidths(){const e=Xe(this.columnsCenter),t=Xe(this.columnsLeft),i=Xe(this.columnsRight);this.bodyWidthDirty=this.bodyWidth!==e,(this.bodyWidth!==e||this.leftWidth!==t||this.rightWidth!==i)&&(this.bodyWidth=e,this.leftWidth=t,this.rightWidth=i,this.eventService.dispatchEvent({type:"columnContainerWidthChanged"}),this.eventService.dispatchEvent({type:"displayedColumnsWidthChanged"}))}setLeftValues(e){this.setLeftValuesOfCols(e),this.setLeftValuesOfGroups()}setFirstRightAndLastLeftPinned(e){let t,i;this.gos.get("enableRtl")?(t=this.columnsLeft?this.columnsLeft[0]:null,i=this.columnsRight?V(this.columnsRight):null):(t=this.columnsLeft?V(this.columnsLeft):null,i=this.columnsRight?this.columnsRight[0]:null),this.columnModel.getCols().forEach(s=>{s.setLastLeftPinned(s===t,e),s.setFirstRightPinned(s===i,e)})}buildTrees(){const e=this.columnModel.getColsToShow(),t=e.filter(r=>r.getPinned()=="left"),i=e.filter(r=>r.getPinned()=="right"),s=e.filter(r=>r.getPinned()!="left"&&r.getPinned()!="right"),o=new Wr;this.treeLeft=this.createGroups({columns:t,idCreator:o,pinned:"left",oldDisplayedGroups:this.treeLeft}),this.treeRight=this.createGroups({columns:i,idCreator:o,pinned:"right",oldDisplayedGroups:this.treeRight}),this.treeCenter=this.createGroups({columns:s,idCreator:o,pinned:null,oldDisplayedGroups:this.treeCenter}),this.updateColsAndGroupsMap()}clear(){this.columnsLeft=[],this.columnsRight=[],this.columnsCenter=[],this.columns=[],this.ariaOrderColumns=[]}joinColsAriaOrder(){const e=this.columnModel.getCols(),t=[],i=[],s=[];for(const o of e){const r=o.getPinned();r?r===!0||r==="left"?t.push(o):s.push(o):i.push(o)}this.ariaOrderColumns=t.concat(i).concat(s)}getAriaColIndex(e){let t;return de(e)?t=e.getLeafColumns()[0]:t=e,this.ariaOrderColumns.indexOf(t)+1}getAllAutoHeightCols(){return this.autoHeightCols}setLeftValuesOfGroups(){[this.treeLeft,this.treeRight,this.treeCenter].forEach(e=>{e.forEach(t=>{de(t)&&t.checkLeft()})})}setLeftValuesOfCols(e){if(!this.columnModel.getColDefCols())return;const i=this.columnModel.getCols().slice(0),s=this.gos.get("enableRtl");[this.columnsLeft,this.columnsRight,this.columnsCenter].forEach(o=>{if(s){let r=Xe(o);o.forEach(n=>{r-=n.getActualWidth(),n.setLeft(r,e)})}else{let r=0;o.forEach(n=>{n.setLeft(r,e),r+=n.getActualWidth()})}Ul(i,o)}),i.forEach(o=>{o.setLeft(null,e)})}joinCols(){this.gos.get("enableRtl")?this.columns=this.columnsRight.concat(this.columnsCenter).concat(this.columnsLeft):this.columns=this.columnsLeft.concat(this.columnsCenter).concat(this.columnsRight)}getColsCenter(){return this.columnsCenter}getAllTrees(){return this.treeLeft&&this.treeRight&&this.treeCenter?this.treeLeft.concat(this.treeCenter).concat(this.treeRight):null}getTreeLeft(){return this.treeLeft}getTreeRight(){return this.treeRight}getTreeCenter(){return this.treeCenter}getAllCols(){return this.columns}isColDisplayed(e){return this.getAllCols().indexOf(e)>=0}getLeftColsForRow(e){return this.columnModel.isColSpanActive()?this.getColsForRow(e,this.columnsLeft):this.columnsLeft}getRightColsForRow(e){return this.columnModel.isColSpanActive()?this.getColsForRow(e,this.columnsRight):this.columnsRight}getColsForRow(e,t,i,s){const o=[];let r=null;for(let n=0;n1){const h=c-1;for(let g=1;g<=h;g++)u.push(t[n+g]);n+=h}let d;i?(d=!1,u.forEach(h=>{i(h)&&(d=!0)})):d=!0,d&&(o.length===0&&r&&(s&&s(l))&&o.push(r),o.push(l)),r=l}return o}getBodyContainerWidth(){return this.bodyWidth}getContainerWidth(e){switch(e){case"left":return this.leftWidth;case"right":return this.rightWidth;default:return this.bodyWidth}}getCenterCols(){return this.columnsCenter}getLeftCols(){return this.columnsLeft}getRightCols(){return this.columnsRight}getColBefore(e){const t=this.getAllCols(),i=t.indexOf(e);return i>0?t[i-1]:null}getGroupAtDirection(e,t){const i=e.getProvidedColumnGroup().getLevel()+e.getPaddingLevel(),s=e.getDisplayedLeafColumns(),o=t==="After"?V(s):s[0],r=`getCol${t}`;for(;;){const n=this[r](o);if(!n)return null;const l=this.getColGroupAtLevel(n,i);if(l!==e)return l}}getColGroupAtLevel(e,t){let i=e.getParent(),s,o;for(;s=i.getProvidedColumnGroup().getLevel(),o=i.getPaddingLevel(),!(s+o<=t);)i=i.getParent();return i}isPinningLeft(){return this.columnsLeft.length>0}isPinningRight(){return this.columnsRight.length>0}updateColsAndGroupsMap(){this.colsAndGroupsMap={};const e=t=>{this.colsAndGroupsMap[t.getUniqueId()]=t};St(this.treeCenter,!1,e),St(this.treeLeft,!1,e),St(this.treeRight,!1,e)}isVisible(e){return this.colsAndGroupsMap[e.getUniqueId()]===e}updateOpenClosedVisibilityInColumnGroups(){const e=this.getAllTrees();St(e,!1,t=>{de(t)&&t.calculateDisplayedColumns()})}getFirstColumn(){const e=this.gos.get("enableRtl"),t=["getLeftCols","getCenterCols","getRightCols"];e&&t.reverse();for(let i=0;i{if(de(r)){const n=r;let l;s?l=e===n.getGroupId()&&t===n.getPartId():l=e===n.getGroupId(),l&&(o=n)}}),o}getColAfter(e){const t=this.getAllCols(),i=t.indexOf(e);return i{const g=u;u=h;const m=c[g],f=(de(m)?m.getProvidedColumnGroup():m).getOriginalParent();if(f==null){for(let w=g;w{s.forEach(o=>{if(de(o)){const r=o;t[o.getUniqueId()]=r,i(r.getChildren())}})};return e&&i(e),t}setupParentsIntoCols(e,t){e.forEach(i=>{if(i.setParent(t),de(i)){const s=i;this.setupParentsIntoCols(s.getChildren(),s)}})}};function St(e,t,i){if(e)for(let s=0;s{ht(i)&&t.push(i)}),t}var zr=["columnEverythingChanged","newColumnsLoaded","columnPivotModeChanged","pivotMaxColumnsExceeded","columnRowGroupChanged","expandOrCollapseAll","columnPivotChanged","gridColumnsChanged","columnValueChanged","columnMoved","columnVisible","columnPinned","columnGroupOpened","columnResized","displayedColumnsChanged","virtualColumnsChanged","columnHeaderMouseOver","columnHeaderMouseLeave","columnHeaderClicked","columnHeaderContextMenu","asyncTransactionsFlushed","rowGroupOpened","rowDataUpdated","pinnedRowDataChanged","rangeSelectionChanged","cellSelectionChanged","chartCreated","chartRangeSelectionChanged","chartOptionsChanged","chartDestroyed","toolPanelVisibleChanged","toolPanelSizeChanged","modelUpdated","cutStart","cutEnd","pasteStart","pasteEnd","fillStart","fillEnd","cellSelectionDeleteStart","cellSelectionDeleteEnd","rangeDeleteStart","rangeDeleteEnd","undoStarted","undoEnded","redoStarted","redoEnded","cellClicked","cellDoubleClicked","cellMouseDown","cellContextMenu","cellValueChanged","cellEditRequest","rowValueChanged","headerFocused","cellFocused","rowSelected","selectionChanged","tooltipShow","tooltipHide","cellKeyDown","cellMouseOver","cellMouseOut","filterChanged","filterModified","filterOpened","advancedFilterBuilderVisibleChanged","sortChanged","virtualRowRemoved","rowClicked","rowDoubleClicked","gridReady","gridPreDestroyed","gridSizeChanged","viewportChanged","firstDataRendered","dragStarted","dragStopped","dragCancelled","rowEditingStarted","rowEditingStopped","cellEditingStarted","cellEditingStopped","bodyScroll","bodyScrollEnd","paginationChanged","componentStateChanged","storeRefreshed","stateUpdated","columnMenuVisibleChanged","contextMenuVisibleChanged","rowDragEnter","rowDragMove","rowDragLeave","rowDragEnd","rowDragCancel"],ma=["scrollbarWidthChanged","keyShortcutChangedCellStart","keyShortcutChangedCellEnd","pinnedHeightChanged","cellFocusCleared","fullWidthRowFocused","checkboxChanged","heightScaleChanged","suppressMovableColumns","suppressMenuHide","suppressFieldDotNotation","columnPanelItemDragStart","columnPanelItemDragEnd","bodyHeightChanged","columnContainerWidthChanged","displayedColumnsWidthChanged","scrollVisibilityChanged","scrollGapChanged","columnHoverChanged","flashCells","paginationPixelOffsetChanged","displayedRowsChanged","leftPinnedWidthChanged","rightPinnedWidthChanged","rowContainerHeightChanged","headerHeightChanged","columnGroupHeaderHeightChanged","columnHeaderHeightChanged","gridStylesChanged","storeUpdated","filterDestroyed","rowDataUpdateStarted","rowCountReady","advancedFilterEnabledChanged","dataTypesInferred","fieldValueChanged","fieldPickerValueSelected","richSelectListRowSelected","sideBarUpdated","alignedGridScroll","alignedGridColumn","gridOptionsChanged","chartTitleEdit","recalculateRowBounds","stickyTopOffsetChanged","overlayExclusiveChanged"],Ca=[...zr,...ma],va={enableBrowserTooltips:!0,tooltipTrigger:!0,tooltipMouseTrack:!0,tooltipShowMode:!0,tooltipInteraction:!0,defaultColGroupDef:!0,suppressAutoSize:!0,skipHeaderOnAutoSize:!0,autoSizeStrategy:!0,components:!0,stopEditingWhenCellsLoseFocus:!0,undoRedoCellEditing:!0,undoRedoCellEditingLimit:!0,excelStyles:!0,cacheQuickFilter:!0,advancedFilterModel:!0,customChartThemes:!0,chartThemeOverrides:!0,chartToolPanelsDef:!0,loadingCellRendererSelector:!0,localeText:!0,keepDetailRows:!0,keepDetailRowsCount:!0,detailRowHeight:!0,detailRowAutoHeight:!0,tabIndex:!0,valueCache:!0,valueCacheNeverExpires:!0,enableCellExpressions:!0,suppressTouch:!0,suppressAsyncEvents:!0,suppressBrowserResizeObserver:!0,suppressPropertyNamesCheck:!0,debug:!0,dragAndDropImageComponent:!0,loadingOverlayComponent:!0,suppressLoadingOverlay:!0,noRowsOverlayComponent:!0,paginationPageSizeSelector:!0,paginateChildRows:!0,pivotPanelShow:!0,pivotSuppressAutoColumn:!0,suppressExpandablePivotGroups:!0,aggFuncs:!0,suppressAggFuncInHeader:!0,allowShowChangeAfterFilter:!0,ensureDomOrder:!0,enableRtl:!0,suppressColumnVirtualisation:!0,suppressMaxRenderedRowRestriction:!0,suppressRowVirtualisation:!0,rowDragText:!0,suppressGroupMaintainValueType:!0,groupLockGroupColumns:!0,rowGroupPanelSuppressSort:!0,suppressGroupRowsSticky:!0,rowModelType:!0,cacheOverflowSize:!0,infiniteInitialRowCount:!0,serverSideInitialRowCount:!0,suppressServerSideInfiniteScroll:!0,maxBlocksInCache:!0,maxConcurrentDatasourceRequests:!0,blockLoadDebounceMillis:!0,serverSideOnlyRefreshFilteredGroups:!0,serverSidePivotResultFieldSeparator:!0,viewportRowModelPageSize:!0,viewportRowModelBufferSize:!0,debounceVerticalScrollbar:!0,suppressAnimationFrame:!0,suppressPreventDefaultOnMouseWheel:!0,scrollbarWidth:!0,icons:!0,suppressRowTransform:!0,gridId:!0,enableGroupEdit:!0,initialState:!0,processUnpinnedColumns:!0,createChartContainer:!0,getLocaleText:!0,getRowId:!0,reactiveCustomComponents:!0,columnMenu:!0,suppressSetFilterByDefault:!0},Ce=class{};Ce.STRING_PROPERTIES=["overlayLoadingTemplate","overlayNoRowsTemplate","gridId","quickFilterText","rowModelType","editType","domLayout","clipboardDelimiter","rowGroupPanelShow","multiSortKey","pivotColumnGroupTotals","pivotRowTotals","pivotPanelShow","fillHandleDirection","groupDisplayType","treeDataDisplayType","colResizeDefault","tooltipTrigger","serverSidePivotResultFieldSeparator","columnMenu","tooltipShowMode","grandTotalRow"];Ce.OBJECT_PROPERTIES=["components","rowStyle","context","autoGroupColumnDef","localeText","icons","datasource","dragAndDropImageComponentParams","serverSideDatasource","viewportDatasource","groupRowRendererParams","aggFuncs","fullWidthCellRendererParams","defaultColGroupDef","defaultColDef","defaultCsvExportParams","defaultExcelExportParams","columnTypes","rowClassRules","detailCellRendererParams","loadingCellRendererParams","loadingOverlayComponentParams","noRowsOverlayComponentParams","popupParent","statusBar","sideBar","theme","chartThemeOverrides","customChartThemes","chartToolPanelsDef","dataTypeDefinitions","advancedFilterModel","advancedFilterParent","advancedFilterBuilderParams","initialState","autoSizeStrategy","cellSelection","selectionColumnDef"];Ce.ARRAY_PROPERTIES=["sortingOrder","alignedGrids","rowData","columnDefs","excelStyles","pinnedTopRowData","pinnedBottomRowData","chartThemes","rowClass","paginationPageSizeSelector"];Ce.NUMBER_PROPERTIES=["rowHeight","detailRowHeight","rowBuffer","headerHeight","groupHeaderHeight","groupLockGroupColumns","floatingFiltersHeight","pivotHeaderHeight","pivotGroupHeaderHeight","groupDefaultExpanded","pivotDefaultExpanded","viewportRowModelPageSize","viewportRowModelBufferSize","autoSizePadding","maxBlocksInCache","maxConcurrentDatasourceRequests","tooltipShowDelay","tooltipHideDelay","cacheOverflowSize","paginationPageSize","cacheBlockSize","infiniteInitialRowCount","serverSideInitialRowCount","scrollbarWidth","asyncTransactionWaitMillis","blockLoadDebounceMillis","keepDetailRowsCount","undoRedoCellEditingLimit","cellFlashDelay","cellFadeDelay","cellFlashDuration","cellFadeDuration","tabIndex","pivotMaxGeneratedColumns"];Ce.BOOLEAN_PROPERTIES=["suppressMakeColumnVisibleAfterUnGroup","suppressRowClickSelection","suppressCellFocus","suppressHeaderFocus","suppressHorizontalScroll","groupSelectsChildren","alwaysShowHorizontalScroll","alwaysShowVerticalScroll","debug","enableBrowserTooltips","enableCellExpressions","groupIncludeTotalFooter","groupSuppressBlankHeader","suppressMenuHide","suppressRowDeselection","unSortIcon","suppressMultiSort","alwaysMultiSort","singleClickEdit","suppressLoadingOverlay","suppressNoRowsOverlay","suppressAutoSize","skipHeaderOnAutoSize","suppressColumnMoveAnimation","suppressMoveWhenColumnDragging","suppressMovableColumns","suppressFieldDotNotation","enableRangeSelection","enableRangeHandle","enableFillHandle","suppressClearOnFillReduction","deltaSort","suppressTouch","suppressAsyncEvents","allowContextMenuWithControlKey","suppressContextMenu","enableCellChangeFlash","suppressDragLeaveHidesColumns","suppressRowGroupHidesColumns","suppressMiddleClickScrolls","suppressPreventDefaultOnMouseWheel","suppressCopyRowsToClipboard","copyHeadersToClipboard","copyGroupHeadersToClipboard","pivotMode","suppressAggFuncInHeader","suppressColumnVirtualisation","alwaysAggregateAtRootLevel","suppressFocusAfterRefresh","functionsReadOnly","animateRows","groupSelectsFiltered","groupRemoveSingleChildren","groupRemoveLowestSingleChildren","enableRtl","suppressClickEdit","rowDragEntireRow","rowDragManaged","suppressRowDrag","suppressMoveWhenRowDragging","rowDragMultiRow","enableGroupEdit","embedFullWidthRows","suppressPaginationPanel","groupHideOpenParents","groupAllowUnbalanced","pagination","paginationAutoPageSize","suppressScrollOnNewData","suppressScrollWhenPopupsAreOpen","purgeClosedRowNodes","cacheQuickFilter","includeHiddenColumnsInQuickFilter","ensureDomOrder","accentedSort","suppressChangeDetection","valueCache","valueCacheNeverExpires","aggregateOnlyChangedColumns","suppressAnimationFrame","suppressExcelExport","suppressCsvExport","includeHiddenColumnsInAdvancedFilter","suppressMultiRangeSelection","enterNavigatesVerticallyAfterEdit","enterNavigatesVertically","suppressPropertyNamesCheck","rowMultiSelectWithClick","suppressRowHoverHighlight","suppressRowTransform","suppressClipboardPaste","suppressLastEmptyLineOnPaste","enableCharts","suppressMaintainUnsortedOrder","enableCellTextSelection","suppressBrowserResizeObserver","suppressMaxRenderedRowRestriction","excludeChildrenWhenTreeDataFiltering","tooltipMouseTrack","tooltipInteraction","keepDetailRows","paginateChildRows","preventDefaultOnContextMenu","undoRedoCellEditing","allowDragFromColumnsToolPanel","pivotSuppressAutoColumn","suppressExpandablePivotGroups","debounceVerticalScrollbar","detailRowAutoHeight","serverSideSortAllLevels","serverSideEnableClientSideSort","serverSideOnlyRefreshFilteredGroups","serverSideSortOnServer","serverSideFilterOnServer","suppressAggFilteredOnly","showOpenedGroup","suppressClipboardApi","suppressModelUpdateAfterUpdateTransaction","stopEditingWhenCellsLoseFocus","groupMaintainOrder","columnHoverHighlight","readOnlyEdit","suppressRowVirtualisation","enableCellEditingOnBackspace","resetRowDataOnUpdate","removePivotHeaderRowWhenSingleValueColumn","suppressCopySingleCellRanges","suppressGroupRowsSticky","suppressCutToClipboard","suppressServerSideInfiniteScroll","rowGroupPanelSuppressSort","allowShowChangeAfterFilter","enableAdvancedFilter","masterDetail","treeData","suppressGroupMaintainValueType","reactiveCustomComponents","applyQuickFilterBeforePivotOrAgg","suppressServerSideFullWidthLoadingRow","suppressAdvancedFilterEval","loading","maintainColumnOrder","enableStrictPivotColumnOrder","suppressSetFilterByDefault"];Ce.OTHER_PROPERTIES=["suppressStickyTotalRow","loadThemeGoogleFonts","rowSelection"];Ce.FUNCTION_PROPERTIES=["doesExternalFilterPass","processPivotResultColDef","processPivotResultColGroupDef","getBusinessKeyForNode","isRowSelectable","rowDragText","groupRowRenderer","dragAndDropImageComponent","fullWidthCellRenderer","loadingCellRenderer","loadingOverlayComponent","noRowsOverlayComponent","detailCellRenderer","quickFilterParser","quickFilterMatcher","getLocaleText","isExternalFilterPresent","getRowHeight","getRowClass","getRowStyle","getContextMenuItems","getMainMenuItems","processRowPostCreate","processCellForClipboard","getGroupRowAgg","isFullWidthRow","sendToClipboard","focusGridInnerElement","navigateToNextHeader","tabToNextHeader","navigateToNextCell","tabToNextCell","processCellFromClipboard","getDocument","postProcessPopup","getChildCount","getDataPath","isRowMaster","postSortRows","processHeaderForClipboard","processUnpinnedColumns","processGroupHeaderForClipboard","paginationNumberFormatter","processDataFromClipboard","getServerSideGroupKey","isServerSideGroup","createChartContainer","getChartToolbarItems","fillOperation","isApplyServerSideTransaction","getServerSideGroupLevelParams","isServerSideGroupOpenByDefault","isGroupOpenByDefault","initialGroupOrderComparator","groupIncludeFooter","loadingCellRendererSelector","getRowId","groupAggFiltering","chartMenuItems","groupTotalRow"];Ce.ALL_PROPERTIES=[...Ce.ARRAY_PROPERTIES,...Ce.OBJECT_PROPERTIES,...Ce.STRING_PROPERTIES,...Ce.NUMBER_PROPERTIES,...Ce.FUNCTION_PROPERTIES,...Ce.BOOLEAN_PROPERTIES,...Ce.OTHER_PROPERTIES];var hi=Ce,Oe=class{static getCallbackForEvent(t){return!t||t.length<2?t:"on"+t[0].toUpperCase()+t.substring(1)}};Oe.VUE_OMITTED_PROPERTY="AG-VUE-OMITTED-PROPERTY";Oe.PUBLIC_EVENTS=zr;Oe.EVENT_CALLBACKS=Ca.map(e=>Oe.getCallbackForEvent(e));Oe.BOOLEAN_PROPERTIES=hi.BOOLEAN_PROPERTIES;Oe.ALL_PROPERTIES=hi.ALL_PROPERTIES;Oe.ALL_PROPERTIES_AND_CALLBACKS=[...Oe.ALL_PROPERTIES,...Oe.EVENT_CALLBACKS];Oe.ALL_PROPERTIES_AND_CALLBACKS_SET=new Set(Oe.ALL_PROPERTIES_AND_CALLBACKS);var gi=Oe;function Sa(e,t){typeof e!="object"&&(e={});const i={...e};return gi.ALL_PROPERTIES_AND_CALLBACKS.forEach(o=>{const r=t[o];typeof r<"u"&&r!==gi.VUE_OMITTED_PROPERTY&&(i[o]=r)}),i}function wa(e,t){if(!e)return;const i={};let s=!1;if(Object.keys(e).filter(n=>gi.ALL_PROPERTIES_AND_CALLBACKS_SET.has(n)).forEach(n=>{i[n]=e[n],s=!0}),!s)return;const o={type:"gridOptionsChanged",options:i};t.dispatchEvent(o);const r={type:"componentStateChanged"};Ne(i,(n,l)=>{r[n]=l}),t.dispatchEvent(r)}var Kt=class extends R{};function Si(e,t,i){return i&&e.addDestroyFunc(()=>t.destroyBean(i)),i??e}var wi=class{constructor(e){this.cssClassStates={},this.getGui=e}addCssClass(e){const t=(e||"").split(" ");if(t.length>1){t.forEach(s=>this.addCssClass(s));return}if(this.cssClassStates[e]!==!0&&e.length){const s=this.getGui();s&&s.classList.add(e),this.cssClassStates[e]=!0}}removeCssClass(e){const t=(e||"").split(" ");if(t.length>1){t.forEach(s=>this.removeCssClass(s));return}if(this.cssClassStates[e]!==!1&&e.length){const s=this.getGui();s&&s.classList.remove(e),this.cssClassStates[e]=!1}}containsCssClass(e){const t=this.getGui();return t?t.classList.contains(e):!1}addOrRemoveCssClass(e,t){if(!e)return;if(e.indexOf(" ")>=0){const s=(e||"").split(" ");if(s.length>1){s.forEach(o=>this.addOrRemoveCssClass(o,t));return}}if(this.cssClassStates[e]!==t&&e.length){const s=this.getGui();s&&s.classList.toggle(e,t),this.cssClassStates[e]=t}}};function st(e,t,i){i==null||typeof i=="string"&&i==""?_r(e,t):Ye(e,t,i)}function Ye(e,t,i){e.setAttribute(Ur(t),i.toString())}function _r(e,t){e.removeAttribute(Ur(t))}function Ur(e){return`aria-${e}`}function Be(e,t){t?e.setAttribute("role",t):e.removeAttribute("role")}function ya(e){let t;return e==="asc"?t="ascending":e==="desc"?t="descending":e==="mixed"?t="other":t="none",t}function Ra(e){return e.getAttribute("aria-label")}function _t(e,t){st(e,"label",t)}function pi(e,t){st(e,"labelledby",t)}function Kr(e,t){st(e,"live",t)}function Fa(e,t){st(e,"atomic",t)}function ba(e,t){st(e,"relevant",t)}function Pa(e,t){st(e,"disabled",t)}function $r(e,t){st(e,"hidden",t)}function $i(e,t){Ye(e,"expanded",t)}function Ea(e,t){Ye(e,"setsize",t)}function Da(e,t){Ye(e,"posinset",t)}function Ma(e,t){Ye(e,"rowcount",t)}function xa(e,t){Ye(e,"rowindex",t)}function Aa(e,t){Ye(e,"colcount",t)}function jr(e,t){Ye(e,"colindex",t)}function Ta(e,t){Ye(e,"colspan",t)}function Ia(e,t){Ye(e,"sort",t)}function La(e){_r(e,"sort")}function ji(e,t){st(e,"selected",t)}function Oa(e,t){st(e,"controls",t.id),pi(t,e.id)}function ro(e,t){return t===void 0?e("ariaIndeterminate","indeterminate"):t===!0?e("ariaChecked","checked"):e("ariaUnchecked","unchecked")}var Cs,Pi,vs,Ss,ws,ys,Ns,Vs,Rs;function je(){return Cs===void 0&&(Cs=/^((?!chrome|android).)*safari/i.test(navigator.userAgent)),Cs}function qr(){if(Pi===void 0)if(je()){const e=navigator.userAgent.match(/version\/(\d+)/i);e&&(Pi=e[1]!=null?parseFloat(e[1]):0)}else Pi=0;return Pi}function no(){if(vs===void 0){const e=window;vs=!!e.chrome&&(!!e.chrome.webstore||!!e.chrome.runtime)||/Chrome/.test(navigator.userAgent)&&/Google Inc/.test(navigator.vendor)}return vs}function lo(){return Ss===void 0&&(Ss=/(firefox)/i.test(navigator.userAgent)),Ss}function Yr(){return ws===void 0&&(ws=/(Mac|iPhone|iPod|iPad)/i.test(navigator.platform)),ws}function ft(){return ys===void 0&&(ys=/iPad|iPhone|iPod/.test(navigator.platform)||navigator.platform==="MacIntel"&&navigator.maxTouchPoints>1),ys}function Qo(){return!je()||qr()>=15}function Bs(e){if(!e)return null;const t=e.tabIndex,i=e.getAttribute("tabIndex");return t===-1&&(i===null||i===""&&!lo())?null:t.toString()}function Ga(){if(Rs!==void 0)return Rs;if(!document.body)return-1;let e=1e6;const t=lo()?6e6:1e9,i=document.createElement("div");for(document.body.appendChild(i);;){const s=e*2;if(i.style.height=s+"px",s>t||i.clientHeight!==s)break;e=s}return document.body.removeChild(i),Rs=e,e}function ka(){var e,t;return((e=document.body)==null?void 0:e.clientWidth)??(window.innerHeight||((t=document.documentElement)==null?void 0:t.clientWidth)||-1)}function Ha(){var e,t;return((e=document.body)==null?void 0:e.clientHeight)??(window.innerHeight||((t=document.documentElement)==null?void 0:t.clientHeight)||-1)}function Na(){return Vs==null&&Qr(),Vs}function Qr(){const e=document.body,t=document.createElement("div");t.style.width=t.style.height="100px",t.style.opacity="0",t.style.overflow="scroll",t.style.msOverflowStyle="scrollbar",t.style.position="absolute",e.appendChild(t);let i=t.offsetWidth-t.clientWidth;i===0&&t.clientWidth===0&&(i=null),t.parentNode&&t.parentNode.removeChild(t),i!=null&&(Vs=i,Ns=i===0)}function Xr(){return Ns==null&&Qr(),Ns}var Ei,Va="[tabindex], input, select, button, textarea, [href]",Jr="[disabled], .ag-disabled:not(.ag-button), .ag-disabled *";function ao(e){const t=Element.prototype.matches||Element.prototype.msMatchesSelector,s=t.call(e,"input, select, button, textarea"),o=t.call(e,Jr),r=qe(e);return s&&!o&&r}function re(e,t,i={}){const{skipAriaHidden:s}=i;e.classList.toggle("ag-hidden",!t),s||$r(e,!t)}function Ba(e,t,i={}){const{skipAriaHidden:s}=i;e.classList.toggle("ag-invisible",!t),s||$r(e,!t)}function fi(e,t){const i="disabled",s=t?o=>o.setAttribute(i,""):o=>o.removeAttribute(i);s(e),sn(e.querySelectorAll("input"),o=>s(o))}function Vt(e,t,i){let s=0;for(;e;){if(e.classList.contains(t))return!0;if(e=e.parentElement,typeof i=="number"){if(++s>i)break}else if(e===i)break}return!1}function At(e){const{height:t,width:i,borderTopWidth:s,borderRightWidth:o,borderBottomWidth:r,borderLeftWidth:n,paddingTop:l,paddingRight:a,paddingBottom:c,paddingLeft:u,marginTop:d,marginRight:h,marginBottom:g,marginLeft:m,boxSizing:C}=window.getComputedStyle(e);return{height:parseFloat(t||"0"),width:parseFloat(i||"0"),borderTopWidth:parseFloat(s||"0"),borderRightWidth:parseFloat(o||"0"),borderBottomWidth:parseFloat(r||"0"),borderLeftWidth:parseFloat(n||"0"),paddingTop:parseFloat(l||"0"),paddingRight:parseFloat(a||"0"),paddingBottom:parseFloat(c||"0"),paddingLeft:parseFloat(u||"0"),marginTop:parseFloat(d||"0"),marginRight:parseFloat(h||"0"),marginBottom:parseFloat(g||"0"),marginLeft:parseFloat(m||"0"),boxSizing:C}}function co(e){const t=At(e);return t.boxSizing==="border-box"?t.height-t.paddingTop-t.paddingBottom:t.height}function yi(e){const t=At(e);return t.boxSizing==="border-box"?t.width-t.paddingLeft-t.paddingRight:t.width}function Zr(e){const{height:t,marginBottom:i,marginTop:s}=At(e);return Math.floor(t+i+s)}function qi(e){const{width:t,marginLeft:i,marginRight:s}=At(e);return Math.floor(t+i+s)}function en(e){const t=e.getBoundingClientRect(),{borderTopWidth:i,borderLeftWidth:s,borderRightWidth:o,borderBottomWidth:r}=At(e);return{top:t.top+(i||0),left:t.left+(s||0),right:t.right+(o||0),bottom:t.bottom+(r||0)}}function Yi(){if(typeof Ei=="boolean")return Ei;const e=document.createElement("div");return e.style.direction="rtl",e.style.width="1px",e.style.height="1px",e.style.position="fixed",e.style.top="0px",e.style.overflow="hidden",e.dir="rtl",e.innerHTML=`
`,document.body.appendChild(e),e.scrollLeft=1,Ei=Math.floor(e.scrollLeft)===0,document.body.removeChild(e),Ei}function Qi(e,t){let i=e.scrollLeft;return t&&(i=Math.abs(i),no()&&!Yi()&&(i=e.scrollWidth-e.getBoundingClientRect().width-i)),i}function Xi(e,t,i){i&&(Yi()?t*=-1:(je()||no())&&(t=e.scrollWidth-e.getBoundingClientRect().width-t)),e.scrollLeft=t}function Te(e){for(;e&&e.firstChild;)e.removeChild(e.firstChild)}function xt(e){e&&e.parentNode&&e.parentNode.removeChild(e)}function tn(e){return!!e.offsetParent}function qe(e){const t=e;return t.checkVisibility?t.checkVisibility({checkVisibilityCSS:!0}):!(!tn(e)||window.getComputedStyle(e).visibility!=="visible")}function mi(e){const t=document.createElement("div");return t.innerHTML=(e||"").trim(),t.firstChild}function Wa(e){return e.clientWidtht.push(i)),t}function Ua(e,t){if(e)for(let i=0;i{this.prepareToShowTooltip(t)},Xo):this.prepareToShowTooltip(t))}onMouseMove(t){this.lastMouseEvent&&(this.lastMouseEvent=t),this.tooltipMouseTrack&&this.state===2&&this.tooltipComp&&this.positionTooltip()}onMouseDown(){this.setToDoNothing()}onMouseLeave(){this.interactionEnabled?this.lockService():this.setToDoNothing()}onFocusIn(){this.prepareToShowTooltip()}onFocusOut(t){var r;const i=t.relatedTarget,s=this.parentComp.getGui(),o=(r=this.tooltipComp)==null?void 0:r.getGui();this.isInteractingWithTooltip||s.contains(i)||this.interactionEnabled&&(o!=null&&o.contains(i))||this.setToDoNothing()}onKeyDown(){this.isInteractingWithTooltip&&(this.isInteractingWithTooltip=!1),this.setToDoNothing()}prepareToShowTooltip(t){if(this.state!=0||mt.isLocked)return;let i=0;t&&(i=this.isLastTooltipHiddenRecently()?200:this.getTooltipDelay("show")),this.lastMouseEvent=t||null,this.showTooltipTimeoutId=window.setTimeout(this.showTooltip.bind(this),i),this.state=1}isLastTooltipHiddenRecently(){const t=new Date().getTime(),i=mt.lastTooltipHideTime;return t-ithis.setToDoNothing();[this.onBodyScrollEventCallback,this.onColumnMovedEventCallback]=this.addManagedEventListeners({bodyScroll:l,columnMoved:l})}this.interactionEnabled&&([this.tooltipMouseEnterListener,this.tooltipMouseLeaveListener]=this.addManagedElementListeners(o,{mouseenter:this.onTooltipMouseEnter.bind(this),mouseleave:this.onTooltipMouseLeave.bind(this)}),[this.onDocumentKeyDownCallback]=this.addManagedElementListeners(ce(this.gos),{keydown:l=>{o.contains(l==null?void 0:l.target)||this.onKeyDown()}}),this.tooltipTrigger===1&&([this.tooltipFocusInListener,this.tooltipFocusOutListener]=this.addManagedElementListeners(o,{focusin:this.onTooltipFocusIn.bind(this),focusout:this.onTooltipFocusOut.bind(this)}))),this.eventService.dispatchEvent({type:"tooltipShow",tooltipGui:o,parentGui:this.parentComp.getGui()}),this.startHideTimeout()}onTooltipMouseEnter(){this.isInteractingWithTooltip=!0,this.unlockService()}onTooltipMouseLeave(){this.isTooltipFocused()||(this.isInteractingWithTooltip=!1,this.lockService())}onTooltipFocusIn(){this.isInteractingWithTooltip=!0}isTooltipFocused(){var s;const t=(s=this.tooltipComp)==null?void 0:s.getGui(),i=ne(this.gos);return!!t&&t.contains(i)}onTooltipFocusOut(t){const i=this.parentComp.getGui();this.isTooltipFocused()||(this.isInteractingWithTooltip=!1,i.contains(t.relatedTarget)?this.startHideTimeout():this.hideTooltip())}positionTooltip(){const t={type:"tooltip",ePopup:this.tooltipComp.getGui(),nudgeY:18,skipObserver:this.tooltipMouseTrack};this.lastMouseEvent?this.popupService.positionPopupUnderMouseEvent({...t,mouseEvent:this.lastMouseEvent}):this.popupService.positionPopupByComponent({...t,eventSource:this.parentComp.getGui(),position:"under",keepWithinBounds:!0,nudgeY:5})}destroyTooltipComp(){this.tooltipComp.getGui().classList.add("ag-tooltip-hiding");const t=this.tooltipPopupDestroyFunc,i=this.tooltipComp,s=this.tooltipTrigger===0?$a:0;window.setTimeout(()=>{t(),this.destroyBean(i)},s),this.clearTooltipListeners(),this.tooltipPopupDestroyFunc=void 0,this.tooltipComp=void 0}clearTooltipListeners(){[this.tooltipMouseEnterListener,this.tooltipMouseLeaveListener,this.tooltipFocusInListener,this.tooltipFocusOutListener].forEach(t=>{t&&t()}),this.tooltipMouseEnterListener=this.tooltipMouseLeaveListener=this.tooltipFocusInListener=this.tooltipFocusOutListener=null}lockService(){mt.isLocked=!0,this.interactiveTooltipTimeoutId=window.setTimeout(()=>{this.unlockService(),this.setToDoNothing()},Xo)}unlockService(){mt.isLocked=!1,this.clearInteractiveTimeout()}startHideTimeout(){this.clearHideTimeout(),this.hideTooltipTimeoutId=window.setTimeout(this.hideTooltip.bind(this),this.getTooltipDelay("hide"))}clearShowTimeout(){this.showTooltipTimeoutId&&(window.clearTimeout(this.showTooltipTimeoutId),this.showTooltipTimeoutId=void 0)}clearHideTimeout(){this.hideTooltipTimeoutId&&(window.clearTimeout(this.hideTooltipTimeoutId),this.hideTooltipTimeoutId=void 0)}clearInteractiveTimeout(){this.interactiveTooltipTimeoutId&&(window.clearTimeout(this.interactiveTooltipTimeoutId),this.interactiveTooltipTimeoutId=void 0)}clearTimeouts(){this.clearShowTimeout(),this.clearHideTimeout(),this.clearInteractiveTimeout()}};on.isLocked=!1;var ja=on,$t=class extends R{constructor(e,t){super(),this.ctrl=e,t&&(this.beans=t)}wireBeans(e){this.beans=e}postConstruct(){this.refreshToolTip()}setBrowserTooltip(e){const t="title",i=this.ctrl.getGui();i&&(e!=null&&e!=""?i.setAttribute(t,e):i.removeAttribute(t))}updateTooltipText(){this.tooltip=this.ctrl.getTooltipValue()}createTooltipFeatureIfNeeded(){var t,i,s,o;if(this.tooltipManager!=null)return;const e={getTooltipParams:()=>this.getTooltipParams(),getGui:()=>this.ctrl.getGui()};this.tooltipManager=this.createBean(new ja(e,(i=(t=this.ctrl).getTooltipShowDelayOverride)==null?void 0:i.call(t),(o=(s=this.ctrl).getTooltipHideDelayOverride)==null?void 0:o.call(s),this.ctrl.shouldDisplayTooltip),this.beans.context)}refreshToolTip(){this.browserTooltips=this.beans.gos.get("enableBrowserTooltips"),this.updateTooltipText(),this.browserTooltips?(this.setBrowserTooltip(this.tooltip),this.tooltipManager&&(this.tooltipManager=this.destroyBean(this.tooltipManager,this.beans.context))):(this.setBrowserTooltip(null),this.createTooltipFeatureIfNeeded())}getTooltipParams(){var o,r,n,l,a;const e=this.ctrl,t=(o=e.getColumn)==null?void 0:o.call(e),i=(r=e.getColDef)==null?void 0:r.call(e),s=(n=e.getRowNode)==null?void 0:n.call(e);return{location:e.getLocation(),colDef:i,column:t,rowIndex:(l=e.getRowIndex)==null?void 0:l.call(e),node:s,data:s==null?void 0:s.data,value:this.getTooltipText(),valueFormatted:(a=e.getValueFormatted)==null?void 0:a.call(e),hideTooltipCallback:()=>{var c;return(c=this.tooltipManager)==null?void 0:c.hideTooltip(!0)}}}getTooltipText(){return this.tooltip}destroy(){this.tooltipManager&&(this.tooltipManager=this.destroyBean(this.tooltipManager,this.beans.context)),super.destroy()}},qa=new go,L=null,X=class rn extends R{constructor(t,i){super(),this.suppressDataRefValidation=!1,this.displayed=!0,this.visible=!0,this.compId=qa.next(),this.cssClassManager=new wi(()=>this.eGui),this.componentSelectors=new Map((i??[]).map(s=>[s.selector,s])),t&&this.setTemplate(t)}preWireBeans(t){super.preWireBeans(t)}preConstruct(){this.usingBrowserTooltips=this.gos.get("enableBrowserTooltips"),this.wireTemplate(this.getGui())}wireTemplate(t,i){t&&this.gos&&(this.applyElementsToComponent(t),this.createChildComponentsFromTags(t,i))}getCompId(){return this.compId}getTooltipParams(){return{value:this.tooltipText,location:"UNKNOWN"}}setTooltip(t){const{newTooltipText:i,showDelayOverride:s,hideDelayOverride:o,location:r,shouldDisplayTooltip:n}=t||{};this.tooltipFeature&&(this.tooltipFeature=this.destroyBean(this.tooltipFeature)),this.tooltipText!==i&&(this.tooltipText=i);const l=()=>this.tooltipText;i!=null&&(this.tooltipFeature=this.createBean(new $t({getTooltipValue:l,getGui:()=>this.getGui(),getLocation:()=>r??"UNKNOWN",getColDef:t==null?void 0:t.getColDef,getColumn:t==null?void 0:t.getColumn,getTooltipShowDelayOverride:s!=null?()=>s:void 0,getTooltipHideDelayOverride:o!=null?()=>o:void 0,shouldDisplayTooltip:n})))}getDataRefAttribute(t){return t.getAttribute?t.getAttribute("data-ref"):null}applyElementsToComponent(t,i,s,o=null){if(i===void 0&&(i=this.getDataRefAttribute(t)),i){const r=this[i];if(r===L)this[i]=o??t;else{const n=s&&s[i];!this.suppressDataRefValidation&&!n&&b(`Issue with data-ref: ${i} on ${this.constructor.name} with ${r}`)}}}createChildComponentsFromTags(t,i){_a(t.childNodes).forEach(o=>{if(!(o instanceof HTMLElement))return;const r=this.createComponentFromElement(o,n=>{n.getGui()&&this.copyAttributesFromNode(o,n.getGui())},i);if(r){if(r.addItems&&o.children.length){this.createChildComponentsFromTags(o,i);const n=Array.prototype.slice.call(o.children);r.addItems(n)}this.swapComponentForNode(r,t,o)}else o.childNodes&&this.createChildComponentsFromTags(o,i)})}createComponentFromElement(t,i,s){const o=t.nodeName,r=this.getDataRefAttribute(t),n=o.indexOf("AG-")===0,l=n?this.componentSelectors.get(o):null;let a=null;if(l){rn.elementGettingCreated=t;const c=s&&r?s[r]:void 0;a=new l.component(c),a.setParentComponent(this),this.createBean(a,null,i)}else n&&b(`Missing selector: ${o}`);return this.applyElementsToComponent(t,r,s,a),a}copyAttributesFromNode(t,i){Ua(t.attributes,(s,o)=>i.setAttribute(s,o))}swapComponentForNode(t,i,s){const o=t.getGui();i.replaceChild(o,s),i.insertBefore(document.createComment(s.nodeName),o),this.addDestroyFunc(this.destroyBean.bind(this,t))}activateTabIndex(t){const i=this.gos.get("tabIndex");t||(t=[]),t.length||t.push(this.getGui()),t.forEach(s=>s.setAttribute("tabindex",i.toString()))}setTemplate(t,i,s){const o=mi(t);this.setTemplateFromElement(o,i,s)}setTemplateFromElement(t,i,s,o=!1){if(this.eGui=t,this.suppressDataRefValidation=o,i)for(let r=0;rthis.eGui.removeEventListener(t,i))}addCssClass(t){this.cssClassManager.addCssClass(t)}removeCssClass(t){this.cssClassManager.removeCssClass(t)}containsCssClass(t){return this.cssClassManager.containsCssClass(t)}addOrRemoveCssClass(t,i){this.cssClassManager.addOrRemoveCssClass(t,i)}},nn={columnGroupOpened:"expanded",columnGroupClosed:"contracted",columnSelectClosed:"tree-closed",columnSelectOpen:"tree-open",columnSelectIndeterminate:"tree-indeterminate",columnMovePin:"pin",columnMoveHide:"eye-slash",columnMoveMove:"arrows",columnMoveLeft:"left",columnMoveRight:"right",columnMoveGroup:"group",columnMoveValue:"aggregation",columnMovePivot:"pivot",dropNotAllowed:"not-allowed",groupContracted:"tree-closed",groupExpanded:"tree-open",setFilterGroupClosed:"tree-closed",setFilterGroupOpen:"tree-open",setFilterGroupIndeterminate:"tree-indeterminate",chart:"chart",close:"cross",cancel:"cancel",check:"tick",first:"first",previous:"previous",next:"next",last:"last",linked:"linked",unlinked:"unlinked",colorPicker:"color-picker",groupLoading:"loading",menu:"menu",menuAlt:"menu-alt",filter:"filter",columns:"columns",maximize:"maximize",minimize:"minimize",menuPin:"pin",menuValue:"aggregation",menuAddRowGroup:"group",menuRemoveRowGroup:"group",clipboardCopy:"copy",clipboardCut:"cut",clipboardPaste:"paste",pivotPanel:"pivot",rowGroupPanel:"group",valuePanel:"aggregation",columnDrag:"grip",rowDrag:"grip",save:"save",csvExport:"csv",excelExport:"excel",smallDown:"small-down",smallLeft:"small-left",smallRight:"small-right",smallUp:"small-up",sortAscending:"asc",sortDescending:"desc",sortUnSort:"none",advancedFilterBuilder:"group",advancedFilterBuilderDrag:"grip",advancedFilterBuilderInvalid:"not-allowed",advancedFilterBuilderMoveUp:"up",advancedFilterBuilderMoveDown:"down",advancedFilterBuilderAdd:"plus",advancedFilterBuilderRemove:"minus",chartsMenuEdit:"chart",chartsMenuAdvancedSettings:"settings",chartsMenuAdd:"plus",checkboxChecked:"checkbox-checked",checkboxIndeterminate:"checkbox-indeterminate",checkboxUnchecked:"checkbox-unchecked",radioButtonOn:"radio-button-on",radioButtonOff:"radio-button-off"},Ya=(()=>{const e=new Set(Object.values(nn));return e.add("eye"),e})();function Qa(e,t,i){const s=xe(e,t,i);if(s){const{className:r}=s;if(typeof r=="string"&&r.indexOf("ag-icon")>-1||typeof r=="object"&&r["ag-icon"])return s}const o=document.createElement("span");return o.appendChild(s),o}function xe(e,t,i,s){let o=null;const r=i&&i.getColDef().icons;if(r&&(o=r[e]),t&&!o){const n=t.get("icons");n&&(o=n[e])}if(o){let n;if(typeof o=="function")n=o();else if(typeof o=="string")n=o;else throw new Error("icon from grid options needs to be a string or a function");if(typeof n=="string")return mi(n);if(ho(n))return n;b("iconRenderer should return back a string or a dom object")}else{const n=document.createElement("span");let l=nn[e]??(Ya.has(e)?e:void 0);return l||(b(`Did not find icon ${e}`),l=""),n.setAttribute("class",`ag-icon ag-icon-${l}`),n.setAttribute("unselectable","on"),Be(n,"presentation"),n}}var Xa=class extends X{constructor(){super(...arguments),this.dragSource=null,this.eIcon=L,this.eLabel=L}postConstruct(){const e=t=>Qa(t,this.gos,null);this.dropIconMap={pinned:e("columnMovePin"),hide:e("columnMoveHide"),move:e("columnMoveMove"),left:e("columnMoveLeft"),right:e("columnMoveRight"),group:e("columnMoveGroup"),aggregate:e("columnMoveValue"),pivot:e("columnMovePivot"),notAllowed:e("dropNotAllowed")}}init(e){this.dragSource=e.dragSource,this.setTemplate(`
diff --git a/src/disco/gui/dist/index.html b/src/disco/gui/dist/index.html index c4850c3b32b..25ab5912c10 100644 --- a/src/disco/gui/dist/index.html +++ b/src/disco/gui/dist/index.html @@ -22,7 +22,7 @@ /> Firedancer - + diff --git a/src/disco/gui/generated/http_import_dist.c b/src/disco/gui/generated/http_import_dist.c index 18ec58405b4..678fd1d91a4 100644 --- a/src/disco/gui/generated/http_import_dist.c +++ b/src/disco/gui/generated/http_import_dist.c @@ -3,9 +3,9 @@ FD_IMPORT_BINARY( file0, "src/disco/gui/dist/assets/firedancer-D_J0EzUc.svg" ); FD_IMPORT_BINARY( file1, "src/disco/gui/dist/assets/firedancer_logo-CrgwxzPk.svg" ); -FD_IMPORT_BINARY( file2, "src/disco/gui/dist/assets/index-Bwdiu9KE.js" ); +FD_IMPORT_BINARY( file2, "src/disco/gui/dist/assets/index-BFJcgdxv.js" ); FD_IMPORT_BINARY( file3, "src/disco/gui/dist/assets/index-CULNhLeN.css" ); -FD_IMPORT_BINARY( file4, "src/disco/gui/dist/assets/index-Dm_aFr8M.js" ); +FD_IMPORT_BINARY( file4, "src/disco/gui/dist/assets/index-DjLLGYQR.js" ); FD_IMPORT_BINARY( file5, "src/disco/gui/dist/assets/index-Dobne4Xk.css" ); FD_IMPORT_BINARY( file6, "src/disco/gui/dist/assets/inter-tight-latin-400-normal-BW_APOAv.woff" ); FD_IMPORT_BINARY( file7, "src/disco/gui/dist/assets/inter-tight-latin-400-normal-CjmW70MP.woff2" ); @@ -25,7 +25,7 @@ fd_http_static_file_t STATIC_FILES[] = { .data_len = &file1_sz, }, { - .name = "/assets/index-Bwdiu9KE.js", + .name = "/assets/index-BFJcgdxv.js", .data = file2, .data_len = &file2_sz, }, @@ -35,7 +35,7 @@ fd_http_static_file_t STATIC_FILES[] = { .data_len = &file3_sz, }, { - .name = "/assets/index-Dm_aFr8M.js", + .name = "/assets/index-DjLLGYQR.js", .data = file4, .data_len = &file4_sz, },