"use strict";var x=Object.create;var g=Object.defineProperty;var y=Object.getOwnPropertyDescriptor;var C=Object.getOwnPropertyNames;var k=Object.getPrototypeOf,S=Object.prototype.hasOwnProperty;var b=(e,n,t,r)=>{if(n&&typeof n=="object"||typeof n=="function")for(let o of C(n))!S.call(e,o)&&o!==t&&g(e,o,{get:()=>n[o],enumerable:!(r=y(n,o))||r.enumerable});return e};var N=(e,n,t)=>(t=e!=null?x(k(e)):{},b(n||!e||!e.__esModule?g(t,"default",{value:e,enumerable:!0}):t,e));Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const h=require("lodash-unified");function R(...e){return e.reduce((n,t)=>({...n,...t}),{})}function D(e,n=0){if(!e)return n;if(typeof e=="number")return e;const t=e.match(/^(-?\d+(?:\.\d+)?)px$/);if(!t)return n;const r=parseFloat(t[1]);return r>0?r:n}function E(e){return h.isNumber(e)?String(e):e}let T=0;function P(e){return`_${h.isArray(e)?e.join("_"):String(e)}_${T++}`}async function j(e,n,...t){for(const r of e){const o=n(r);o&&await o(...t)}}async function H(e,n,t,...r){let o=n;for(const c of e){const i=t(c);if(i)try{const s=await i(o,...r);s!==void 0&&(o=s)}catch{}}return o}function p(e,n,t){let r={};if(!e.length)return r;for(const o of e)if(o.children?.length)r={...r,...p(o.children,n)};else{const c=o.key;c&&(r[c]=o[n]??t)}return r}function w(e){const n=[];for(const t of e)t.children?.length?n.push(...w(t.children)):n.push(t);return n}const M={rowDragEntireRow:!1,suppressMoveWhenRowDragging:!1};function B(e){return e?{...M,...e}:{}}async function K(e){return typeof e=="string"?await(await fetch(e)).arrayBuffer():await e.arrayBuffer()}async function _(e,n){const t=await K(e),r=await import("exceljs").catch(()=>{throw new Error(`[AgGrid] exportToExcel requires exceljs.
Run: npm install exceljs`)}),o=new r.Workbook;await o.xlsx.load(t);const c=o.worksheets[0];if(!c)return[];const i=new Map;c.getRow(1).eachCell((u,f)=>{const a=u.address.replace(/\d+/g,""),l=n[a];l&&i.set(f,l)});const s=[];for(let u=2;u<=c.rowCount;u++){const f=c.getRow(u);if(f.cellCount===0)continue;const a={};i.forEach((l,d)=>{const m=f.getCell(d);a[l]=m.value}),s.push(a)}return s}exports.excelToDataSource=_;exports.flatColumnConfig=w;exports.getRowDragConfig=B;exports.getShadowName=P;exports.getStringKey=E;exports.mergeProps=R;exports.pickColumnConfig=p;exports.pxToNumber=D;exports.runEffectHooks=j;exports.runPipelineHooks=H;
