(function(d,c){typeof exports=="object"&&typeof module<"u"?c(exports,require("vue"),require("@revolist/revogrid/loader"),require("@revolist/revogrid")):typeof define=="function"&&define.amd?define(["exports","vue","@revolist/revogrid/loader","@revolist/revogrid"],c):(d=typeof globalThis<"u"?globalThis:d||self,c(d.Vue3Datagrid={},d.Vue,d.RevogridLoader,d.Revogrid))})(this,function(d,c,y,R){"use strict";var k;const v="routerLink",V="navManager",L="router",z="aria",h=Symbol(),w={default:h},P=e=>(e==null?void 0:e.split(" "))||[],D=(e,t,i=[])=>{var s;return[...Array.from(((s=e.value)==null?void 0:s.classList)||[]),...i].filter((n,o,r)=>!t.has(n)&&r.indexOf(n)===o)},G=((e,t,i=[],s,n)=>{const o=c.defineComponent((r,{attrs:u,slots:f,emit:q})=>{var S;r[s];const A=c.ref(),_=new Set(P(u.class)),p=c.getCurrentInstance(),I=((S=p==null?void 0:p.appContext)==null?void 0:S.provides[V])?c.inject(V):void 0,F=m=>{const{routerLink:b}=r;if(b!==h)if(I!==void 0){m.preventDefault();let l={event:m};for(const g in r){const a=r[g];r.hasOwnProperty(g)&&g.startsWith(L)&&a!==h&&(l[g]=a)}I.navigate(l)}else console.warn("Tried to navigate, but no router was found. Make sure you have mounted Vue Router.")};return()=>{r[s],P(u.class).forEach(a=>{_.add(a)});const m=r.onClick,b=a=>{m!==void 0&&m(a),a.defaultPrevented||F(a)};let l={ref:A,class:D(A,_),onClick:b};for(const a in r){const M=r[a];(r.hasOwnProperty(a)&&M!==h||a.startsWith(z))&&(l[a]=M)}return r[v]!==h&&(l={...l,href:r[v]}),c.h(e,l,f.default&&f.default())}});return typeof o!="function"&&(o.name=e,o.props={[v]:w},i.forEach(r=>{o.props[r]=w})),o})("revo-grid",void 0,["rowHeaders","frameSize","rowSize","colSize","range","readonly","resize","canFocus","useClipboard","columns","source","pinnedTopSource","pinnedBottomSource","rowDefinitions","editors","applyOnClose","plugins","columnTypes","theme","rowClass","autoSizeColumn","filter","focusTemplate","canMoveColumns","trimmedRows","exporting","grouping","stretch","additionalData","disableVirtualX","disableVirtualY","hideAttribution","jobsBeforeRender","registerVNode","accessible","contentsizechanged","beforeedit","beforerangeedit","afteredit","beforeautofill","beforerange","afterfocus","roworderchanged","beforesortingapply","beforesorting","rowdragstart","headerclick","beforecellfocus","beforefocuslost","beforesourceset","beforeanysource","aftersourceset","afteranysource","beforecolumnsset","beforecolumnapplied","aftercolumnsset","beforefilterapply","beforefiltertrimmed","beforetrimmed","aftertrimmed","viewportscroll","beforeexport","beforeeditstart","aftercolumnresize","beforerowdefinition","filterconfigchanged","rowheaderschanged","beforegridrender","aftergridrender","aftergridinit","additionaldatachanged","afterthemechanged","created"]);function E(e,t){t!=null&&t.appContext&&(e.appContext=t.appContext)}const C=(e,t,i,s,n=null)=>{var u;if(!t)return(u=n==null?void 0:n.destroy)==null||u.call(n),{vueInstance:null,destroy:()=>null,el:null};let o=t._vnode;if(o){E(o,s);for(const f in i)o.component.props[f]=i[f]}else o=c.createVNode(e,i),E(o,s),c.render(o,t);return{vueInstance:o,destroy:()=>c.render(null,t),el:t}},x=(e,t)=>{const i=c.getCurrentInstance();return(s,n,o)=>{const r=t?{...t,...n}:n;r.addition=o;let u=null;return s("span",{key:`${n.prop}-${n.rowIndex||0}`,ref:f=>{u=C(e,f,r,i,u)}})}};class N{constructor(t,i,s,n,o){this.VueEditorConstructor=t,this.column=i,this.save=s,this.close=n,this.vInstance=o,this.element=null}componentDidRender(){}disconnectedCallback(){var t;(t=this.vueEl)==null||t.destroy(),this.vueEl=void 0}render(t){var i;return t("span",{key:`${this.column.prop}-${((i=this.editCell)==null?void 0:i.rowIndex)||0}`,ref:s=>{const n={...this.editCell,column:this.column,save:this.save,close:this.close};this.vueEl=C(this.VueEditorConstructor,s,n,this.vInstance)}})}}const j=e=>{const t=c.getCurrentInstance();return function(i,s,n){return new N(e,i,s,n,t)}};function U(e){return!!e&&(typeof e=="object"||typeof e=="function")&&typeof e.then=="function"}const T=(k=y.defineCustomElements)==null?void 0:k.call(y),O=c.defineAsyncComponent(async()=>(U(T)&&await T,G));d.VGrid=O,d.VGridVueEditor=j,d.VGridVueTemplate=x,d.VGridVueTemplateConstructor=C,d.default=O,Object.keys(R).forEach(e=>{e!=="default"&&!Object.prototype.hasOwnProperty.call(d,e)&&Object.defineProperty(d,e,{enumerable:!0,get:()=>R[e]})}),Object.defineProperties(d,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});