@mongodb-js/compass-web 0.34.0 → 0.35.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (31) hide show
  1. package/dist/128.d74f22fdbc215f781713.mjs +2 -0
  2. package/dist/145.bb3ab3ecc577c03d4719.mjs +1 -0
  3. package/dist/455.00dd3b68f4afab746f19.mjs +1 -0
  4. package/dist/{174.9b919a5407fdc3851924.mjs → 531.763ecadd9feb95d2dac6.mjs} +3 -3
  5. package/dist/583.aa2542a4a9a81cf18049.mjs +378 -0
  6. package/dist/689.fc3ea78ca03540c88c5e.mjs +2 -0
  7. package/dist/755.3d354b04ff596a23fd46.mjs +2 -0
  8. package/dist/755.3d354b04ff596a23fd46.mjs.LICENSE.txt +5 -0
  9. package/dist/{800.dcb5412b380b659e88ac.mjs → 800.6acd53ae9617e3cb63ed.mjs} +2 -2
  10. package/dist/901.2101dc93082369c119a3.mjs +2 -0
  11. package/dist/965.d5a6b7e950f14396c862.mjs +1 -0
  12. package/dist/assets-manifest.json +11 -10
  13. package/dist/compass-web.d.ts +1 -1
  14. package/dist/compass-web.mjs +25 -25
  15. package/dist/{index-bde52cb3.8627a1873c0630586210.mjs → index-bde52cb3.291f8ae4bc856eb51b2e.mjs} +1 -1
  16. package/dist/tsdoc-metadata.json +1 -1
  17. package/package.json +47 -46
  18. package/dist/128.9e3ffe7449cca93fbcb4.mjs +0 -2
  19. package/dist/400.ee421ec0c79f2e659fa8.mjs +0 -378
  20. package/dist/455.e6b707cae57e3018c29e.mjs +0 -1
  21. package/dist/48.9ca2dbc319085729bea6.mjs +0 -1
  22. package/dist/753.c784df67afeae6565839.mjs +0 -2
  23. package/dist/753.c784df67afeae6565839.mjs.LICENSE.txt +0 -16
  24. package/dist/772.2baa874c0109bdb1a2cb.mjs +0 -2
  25. package/dist/915.2a425bc2ab5dfa3e6a60.mjs +0 -2
  26. /package/dist/{128.9e3ffe7449cca93fbcb4.mjs.LICENSE.txt → 128.d74f22fdbc215f781713.mjs.LICENSE.txt} +0 -0
  27. /package/dist/{174.9b919a5407fdc3851924.mjs.LICENSE.txt → 531.763ecadd9feb95d2dac6.mjs.LICENSE.txt} +0 -0
  28. /package/dist/{400.ee421ec0c79f2e659fa8.mjs.LICENSE.txt → 583.aa2542a4a9a81cf18049.mjs.LICENSE.txt} +0 -0
  29. /package/dist/{772.2baa874c0109bdb1a2cb.mjs.LICENSE.txt → 689.fc3ea78ca03540c88c5e.mjs.LICENSE.txt} +0 -0
  30. /package/dist/{800.dcb5412b380b659e88ac.mjs.LICENSE.txt → 800.6acd53ae9617e3cb63ed.mjs.LICENSE.txt} +0 -0
  31. /package/dist/{915.2a425bc2ab5dfa3e6a60.mjs.LICENSE.txt → 901.2101dc93082369c119a3.mjs.LICENSE.txt} +0 -0
@@ -0,0 +1,2 @@
1
+ /*! For license information please see 901.2101dc93082369c119a3.mjs.LICENSE.txt */
2
+ export const __webpack_esm_id__=901;export const __webpack_esm_ids__=[901];export const __webpack_esm_modules__={663:function(e,t,o){var r=this&&this.__decorate||function(e,t,o,r){var n,i=arguments.length,s=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,o):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,o,r);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(s=(i<3?n(s):i>3?n(t,o,s):n(t,o))||s);return i>3&&s&&Object.defineProperty(t,o,s),s},n=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)};Object.defineProperty(t,"__esModule",{value:!0});var i=o(72493),s=o(55e3),a=o(44081),l=function(){function e(){}return e.prototype.postConstruct=function(){this.doingTreeData=this.gridOptionsWrapper.isTreeData()},e.prototype.filter=function(e){var t=this.filterManager.isAnyFilterPresent();this.filterNodes(t,e)},e.prototype.filterNodes=function(e,t){var o=this,r=function(t,r){t.hasChildren()?(t.childrenAfterFilter=e&&!r?t.childrenAfterGroup.filter((function(e){var t=e.childrenAfterFilter&&e.childrenAfterFilter.length>0,r=e.data&&o.filterManager.doesRowPassFilter(e);return t||r})):t.childrenAfterGroup,o.setAllChildrenCount(t)):(t.childrenAfterFilter=t.childrenAfterGroup,t.setAllChildrenCount(null))};if(this.doingTreeDataFiltering()){var n=function(e,t){if(e.childrenAfterGroup)for(var i=0;i<e.childrenAfterGroup.length;i++){var s=e.childrenAfterGroup[i],a=t||o.filterManager.doesRowPassFilter(s);s.childrenAfterGroup?n(e.childrenAfterGroup[i],a):r(s,a)}r(e,t)};t.executeFromRootNode((function(e){return n(e,!1)}))}else t.forEachChangedNodeDepthFirst((function(e){return r(e,!1)}),!0)},e.prototype.setAllChildrenCountTreeData=function(e){var t=0;e.childrenAfterFilter.forEach((function(e){t++,t+=e.allChildrenCount})),e.setAllChildrenCount(t)},e.prototype.setAllChildrenCountGridGrouping=function(e){var t=0;e.childrenAfterFilter.forEach((function(e){e.group?t+=e.allChildrenCount:t++})),e.setAllChildrenCount(t)},e.prototype.setAllChildrenCount=function(e){this.doingTreeData?this.setAllChildrenCountTreeData(e):this.setAllChildrenCountGridGrouping(e)},e.prototype.doingTreeDataFiltering=function(){return this.gridOptionsWrapper.isTreeData()&&!this.gridOptionsWrapper.isExcludeChildrenWhenTreeDataFiltering()},r([i.Autowired("filterManager"),n("design:type",s.FilterManager)],e.prototype,"filterManager",void 0),r([i.Autowired("gridOptionsWrapper"),n("design:type",a.GridOptionsWrapper)],e.prototype,"gridOptionsWrapper",void 0),r([i.PostConstruct,n("design:type",Function),n("design:paramtypes",[]),n("design:returntype",void 0)],e.prototype,"postConstruct",null),r([i.Bean("filterService")],e)}();t.FilterService=l},719:function(e,t,o){var r=this&&this.__decorate||function(e,t,o,r){var n,i=arguments.length,s=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,o):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,o,r);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(s=(i<3?n(s):i>3?n(t,o,s):n(t,o))||s);return i>3&&s&&Object.defineProperty(t,o,s),s},n=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)};Object.defineProperty(t,"__esModule",{value:!0});var i,s=o(45727),a=o(44081),l=o(44871),p=o(98239),u=o(55e3),d=o(15068),c=o(60843),h=o(63405),f=o(72493),g=o(54828),m=o(28771),y=o(68363),v=o(24463),C=o(88842),w=o(40797),E=o(83423);!function(e){e[e.Normal=0]="Normal",e[e.AfterFilter=1]="AfterFilter",e[e.AfterFilterAndSort=2]="AfterFilterAndSort",e[e.PivotNodes=3]="PivotNodes"}(i||(i={}));var _=function(){function e(){}return e.prototype.init=function(){var e=this.refreshModel.bind(this,{step:s.Constants.STEP_EVERYTHING}),t=this.refreshModel.bind(this,{step:s.Constants.STEP_EVERYTHING,afterColumnsChanged:!0});this.eventService.addModalPriorityEventListener(h.Events.EVENT_COLUMN_EVERYTHING_CHANGED,t),this.eventService.addModalPriorityEventListener(h.Events.EVENT_COLUMN_ROW_GROUP_CHANGED,e),this.eventService.addModalPriorityEventListener(h.Events.EVENT_COLUMN_VALUE_CHANGED,this.onValueChanged.bind(this)),this.eventService.addModalPriorityEventListener(h.Events.EVENT_COLUMN_PIVOT_CHANGED,this.refreshModel.bind(this,{step:s.Constants.STEP_PIVOT})),this.eventService.addModalPriorityEventListener(h.Events.EVENT_ROW_GROUP_OPENED,this.onRowGroupOpened.bind(this)),this.eventService.addModalPriorityEventListener(h.Events.EVENT_FILTER_CHANGED,this.onFilterChanged.bind(this)),this.eventService.addModalPriorityEventListener(h.Events.EVENT_SORT_CHANGED,this.onSortChanged.bind(this)),this.eventService.addModalPriorityEventListener(h.Events.EVENT_COLUMN_PIVOT_MODE_CHANGED,e);var o=this.refreshModel.bind(this,{step:s.Constants.STEP_MAP,keepRenderedRows:!0,animate:!0});this.gridOptionsWrapper.addEventListener(a.GridOptionsWrapper.PROP_GROUP_REMOVE_SINGLE_CHILDREN,o),this.gridOptionsWrapper.addEventListener(a.GridOptionsWrapper.PROP_GROUP_REMOVE_LOWEST_SINGLE_CHILDREN,o),this.rootNode=new d.RowNode,this.nodeManager=new m.ClientSideNodeManager(this.rootNode,this.gridOptionsWrapper,this.context,this.eventService,this.columnController,this.gridApi,this.columnApi,this.selectionController),this.context.wireBean(this.rootNode)},e.prototype.ensureRowHeightsValid=function(e,t,o,r){var n,i=!1;do{n=!1;for(var s=this.getRowIndexAtPixel(e),a=this.getRowIndexAtPixel(t),l=Math.max(s,o),p=Math.min(a,r),u=l;u<=p;u++){var d=this.getRow(u);if(d.rowHeightEstimated){var c=this.gridOptionsWrapper.getRowHeightForNode(d);d.setRowHeight(c.height),n=!0,i=!0}}n&&this.setRowTops()}while(n);return i},e.prototype.setRowTops=function(){for(var e=0,t=0;t<this.rowsToDisplay.length;t++){var o=this.gridOptionsWrapper.getDomLayout()===s.Constants.DOM_LAYOUT_NORMAL,r=this.rowsToDisplay[t];if(E._.missing(r.rowHeight)){var n=this.gridOptionsWrapper.getRowHeightForNode(r,o);r.setRowHeight(n.height,n.estimated)}r.setRowTop(e),r.setRowIndex(t),e+=r.rowHeight}},e.prototype.resetRowTops=function(e,t){if(e.clearRowTop(),e.hasChildren()){if(e.childrenAfterGroup&&(!t.isActive()||e.expanded))for(var o=0;o<e.childrenAfterGroup.length;o++)this.resetRowTops(e.childrenAfterGroup[o],t);e.sibling&&e.sibling.clearRowTop()}e.detailNode&&e.detailNode.clearRowTop()},e.prototype.ensureRowAtPixel=function(e,t){var o=this.getRowIndexAtPixel(t);return this.getRow(o)!==e&&(E._.removeFromArray(this.rootNode.allLeafChildren,e),E._.insertIntoArray(this.rootNode.allLeafChildren,e,o),this.refreshModel({step:s.Constants.STEP_EVERYTHING,keepRenderedRows:!0,animate:!0,keepEditingRows:!0}),!0)},e.prototype.isLastRowFound=function(){return!0},e.prototype.getRowCount=function(){return this.rowsToDisplay?this.rowsToDisplay.length:0},e.prototype.getRowBounds=function(e){if(E._.missing(this.rowsToDisplay))return null;var t=this.rowsToDisplay[e];return t?{rowTop:t.rowTop,rowHeight:t.rowHeight}:null},e.prototype.onRowGroupOpened=function(){var e=this.gridOptionsWrapper.isAnimateRows();this.refreshModel({step:s.Constants.STEP_MAP,keepRenderedRows:!0,animate:e})},e.prototype.onFilterChanged=function(){var e=this.gridOptionsWrapper.isAnimateRows();this.refreshModel({step:s.Constants.STEP_FILTER,keepRenderedRows:!0,animate:e})},e.prototype.onSortChanged=function(){var e=this.gridOptionsWrapper.isAnimateRows();this.refreshModel({step:s.Constants.STEP_SORT,keepRenderedRows:!0,animate:e,keepEditingRows:!0})},e.prototype.getType=function(){return s.Constants.ROW_MODEL_TYPE_CLIENT_SIDE},e.prototype.onValueChanged=function(){this.columnController.isPivotActive()?this.refreshModel({step:s.Constants.STEP_PIVOT}):this.refreshModel({step:s.Constants.STEP_AGGREGATE})},e.prototype.createChangePath=function(e){var t=E._.missingOrEmpty(e),o=new y.ChangedPath(!1,this.rootNode);return(t||this.gridOptionsWrapper.isTreeData())&&o.setInactive(),o},e.prototype.refreshModel=function(e){var t=this,o=this.createChangePath(e.rowNodeTransactions);switch(e.step){case s.Constants.STEP_EVERYTHING:this.doRowGrouping(e.groupState,e.rowNodeTransactions,e.rowNodeOrder,o,e.afterColumnsChanged);case s.Constants.STEP_FILTER:this.doFilter(o);case s.Constants.STEP_PIVOT:this.doPivot(o);case s.Constants.STEP_AGGREGATE:this.doAggregate(o);case s.Constants.STEP_SORT:this.doSort(e.rowNodeTransactions,o);case s.Constants.STEP_MAP:this.doRowsToDisplay()}this.resetRowTops(this.rootNode,o),this.setRowTops();var r={type:h.Events.EVENT_MODEL_UPDATED,api:this.gridApi,columnApi:this.columnApi,animate:e.animate,keepRenderedRows:e.keepRenderedRows,newData:e.newData,newPage:!1};this.eventService.dispatchEvent(r),this.$scope&&window.setTimeout((function(){t.$scope.$apply()}),0)},e.prototype.isEmpty=function(){var e;return e=E._.exists(this.gridOptionsWrapper.getNodeChildDetailsFunc())?E._.missing(this.rootNode.childrenAfterGroup)||0===this.rootNode.childrenAfterGroup.length:E._.missing(this.rootNode.allLeafChildren)||0===this.rootNode.allLeafChildren.length,E._.missing(this.rootNode)||e||!this.columnController.isReady()},e.prototype.isRowsToRender=function(){return E._.exists(this.rowsToDisplay)&&this.rowsToDisplay.length>0},e.prototype.getNodesInRangeForSelection=function(e,t){var o,r=!t,n=!1,i=[],s=this.gridOptionsWrapper.isGroupSelectsChildren();return this.forEachNodeAfterFilterAndSort((function(a){var l=r&&!n;if(r||a!==t&&a!==e||(r=!0),!a.group||!s){var p=r&&!n,u=a.isParentOfNode(o);(p||u)&&i.push(a)}l&&(a!==t&&a!==e||(n=!0,o=a===t?t:e))})),i},e.prototype.setDatasource=function(e){console.error("ag-Grid: should never call setDatasource on clientSideRowController")},e.prototype.getTopLevelNodes=function(){return this.rootNode?this.rootNode.childrenAfterGroup:null},e.prototype.getRootNode=function(){return this.rootNode},e.prototype.getRow=function(e){return this.rowsToDisplay[e]},e.prototype.isRowPresent=function(e){return this.rowsToDisplay.indexOf(e)>=0},e.prototype.getVirtualRowCount=function(){return console.warn("ag-Grid: rowModel.getVirtualRowCount() is not longer a function, use rowModel.getRowCount() instead"),this.getPageLastRow()},e.prototype.getPageFirstRow=function(){return 0},e.prototype.getPageLastRow=function(){return this.rowsToDisplay?this.rowsToDisplay.length-1:0},e.prototype.getRowIndexAtPixel=function(e){if(this.isEmpty())return-1;var t=0,o=this.rowsToDisplay.length-1;if(e<=0)return 0;if(this.rowsToDisplay[this.rowsToDisplay.length-1].rowTop<=e)return this.rowsToDisplay.length-1;for(;;){var r=Math.floor((t+o)/2),n=this.rowsToDisplay[r];if(this.isRowInPixel(n,e))return r;n.rowTop<e?t=r+1:n.rowTop>e&&(o=r-1)}},e.prototype.isRowInPixel=function(e,t){var o=e.rowTop,r=e.rowTop+e.rowHeight;return o<=t&&r>t},e.prototype.getCurrentPageHeight=function(){if(this.rowsToDisplay&&this.rowsToDisplay.length>0){var e=this.rowsToDisplay[this.rowsToDisplay.length-1];return e.rowTop+e.rowHeight}return 0},e.prototype.forEachLeafNode=function(e){this.rootNode.allLeafChildren&&this.rootNode.allLeafChildren.forEach((function(t,o){return e(t,o)}))},e.prototype.forEachNode=function(e){this.recursivelyWalkNodesAndCallback(this.rootNode.childrenAfterGroup,e,i.Normal,0)},e.prototype.forEachNodeAfterFilter=function(e){this.recursivelyWalkNodesAndCallback(this.rootNode.childrenAfterFilter,e,i.AfterFilter,0)},e.prototype.forEachNodeAfterFilterAndSort=function(e){this.recursivelyWalkNodesAndCallback(this.rootNode.childrenAfterSort,e,i.AfterFilterAndSort,0)},e.prototype.forEachPivotNode=function(e){this.recursivelyWalkNodesAndCallback([this.rootNode],e,i.PivotNodes,0)},e.prototype.recursivelyWalkNodesAndCallback=function(e,t,o,r){if(e)for(var n=0;n<e.length;n++){var s=e[n];if(t(s,r++),s.hasChildren()){var a=null;switch(o){case i.Normal:a=s.childrenAfterGroup;break;case i.AfterFilter:a=s.childrenAfterFilter;break;case i.AfterFilterAndSort:a=s.childrenAfterSort;break;case i.PivotNodes:a=s.leafGroup?null:s.childrenAfterSort}a&&(r=this.recursivelyWalkNodesAndCallback(a,t,o,r))}}return r},e.prototype.doAggregate=function(e){this.aggregationStage&&this.aggregationStage.execute({rowNode:this.rootNode,changedPath:e})},e.prototype.expandOrCollapseAll=function(e){var t=this.gridOptionsWrapper.isTreeData();this.rootNode&&function o(r){r&&r.forEach((function(r){(t?E._.exists(r.childrenAfterGroup):r.group)&&(r.expanded=e,o(r.childrenAfterGroup))}))}(this.rootNode.childrenAfterGroup),this.refreshModel({step:s.Constants.STEP_MAP});var o=e?"expandAll":"collapseAll",r={api:this.gridApi,columnApi:this.columnApi,type:h.Events.EVENT_EXPAND_COLLAPSE_ALL,source:o};this.eventService.dispatchEvent(r)},e.prototype.doSort=function(e,t){this.sortStage.execute({rowNode:this.rootNode,rowNodeTransactions:e,changedPath:t})},e.prototype.doRowGrouping=function(e,t,o,r,n){var i=this;E._.exists(this.gridOptionsWrapper.getNodeChildDetailsFunc())||(this.groupStage?(t&&E._.exists(t)?t.forEach((function(e){i.groupStage.execute({rowNode:i.rootNode,rowNodeTransaction:e,rowNodeOrder:o,changedPath:r})})):(this.selectionController.removeGroupsFromSelection(),this.groupStage.execute({rowNode:this.rootNode,changedPath:r,afterColumnsChanged:n}),this.restoreGroupState(e)),this.gridOptionsWrapper.isGroupSelectsChildren()&&this.selectionController.updateGroupsFromChildrenSelections(r)):this.rootNode.childrenAfterGroup=this.rootNode.allLeafChildren)},e.prototype.restoreGroupState=function(e){e&&E._.traverseNodesWithKey(this.rootNode.childrenAfterGroup,(function(t,o){"boolean"==typeof e[o]&&(t.expanded=e[o])}))},e.prototype.doFilter=function(e){this.filterStage.execute({rowNode:this.rootNode,changedPath:e})},e.prototype.doPivot=function(e){this.pivotStage&&this.pivotStage.execute({rowNode:this.rootNode,changedPath:e})},e.prototype.getGroupState=function(){if(!this.rootNode.childrenAfterGroup||!this.gridOptionsWrapper.isRememberGroupStateWhenNewData())return null;var e={};return E._.traverseNodesWithKey(this.rootNode.childrenAfterGroup,(function(t,o){return e[o]=t.expanded})),e},e.prototype.getCopyOfNodesMap=function(){return this.nodeManager.getCopyOfNodesMap()},e.prototype.getRowNode=function(e){return this.nodeManager.getRowNode(e)},e.prototype.setRowData=function(e){var t=this.getGroupState();this.nodeManager.setRowData(e);var o={type:h.Events.EVENT_ROW_DATA_CHANGED,api:this.gridApi,columnApi:this.columnApi};this.eventService.dispatchEvent(o),this.refreshModel({step:s.Constants.STEP_EVERYTHING,groupState:t,newData:!0})},e.prototype.batchUpdateRowData=function(e,t){var o=this;if(!this.rowDataTransactionBatch){this.rowDataTransactionBatch=[];var r=this.gridOptionsWrapper.getBatchUpdateWaitMillis();window.setTimeout((function(){o.executeBatchUpdateRowData(),o.rowDataTransactionBatch=null}),r)}this.rowDataTransactionBatch.push({rowDataTransaction:e,callback:t})},e.prototype.executeBatchUpdateRowData=function(){var e=this;this.valueCache.onDataChanged();var t=[],o=[];this.rowDataTransactionBatch&&this.rowDataTransactionBatch.forEach((function(r){var n=e.nodeManager.updateRowData(r.rowDataTransaction,null);o.push(n),r.callback&&t.push(r.callback.bind(n))})),this.commonUpdateRowData(o),t.length>0&&window.setTimeout((function(){t.forEach((function(e){return e()}))}),0)},e.prototype.updateRowData=function(e,t){this.valueCache.onDataChanged();var o=this.nodeManager.updateRowData(e,t);return this.commonUpdateRowData([o],t),o},e.prototype.commonUpdateRowData=function(e,t){this.refreshModel({step:s.Constants.STEP_EVERYTHING,rowNodeTransactions:e,rowNodeOrder:t,keepRenderedRows:!0,animate:!0,keepEditingRows:!0});var o={type:h.Events.EVENT_ROW_DATA_UPDATED,api:this.gridApi,columnApi:this.columnApi};this.eventService.dispatchEvent(o)},e.prototype.doRowsToDisplay=function(){this.rowsToDisplay=this.flattenStage.execute({rowNode:this.rootNode})},e.prototype.onRowHeightChanged=function(){this.refreshModel({step:s.Constants.STEP_MAP,keepRenderedRows:!0,keepEditingRows:!0})},e.prototype.resetRowHeights=function(){this.forEachNode((function(e){return e.setRowHeight(null)})),this.onRowHeightChanged()},r([f.Autowired("gridOptionsWrapper"),n("design:type",a.GridOptionsWrapper)],e.prototype,"gridOptionsWrapper",void 0),r([f.Autowired("columnController"),n("design:type",p.ColumnController)],e.prototype,"columnController",void 0),r([f.Autowired("filterManager"),n("design:type",u.FilterManager)],e.prototype,"filterManager",void 0),r([f.Autowired("$scope"),n("design:type",Object)],e.prototype,"$scope",void 0),r([f.Autowired("selectionController"),n("design:type",g.SelectionController)],e.prototype,"selectionController",void 0),r([f.Autowired("eventService"),n("design:type",c.EventService)],e.prototype,"eventService",void 0),r([f.Autowired("context"),n("design:type",f.Context)],e.prototype,"context",void 0),r([f.Autowired("valueService"),n("design:type",v.ValueService)],e.prototype,"valueService",void 0),r([f.Autowired("valueCache"),n("design:type",C.ValueCache)],e.prototype,"valueCache",void 0),r([f.Autowired("columnApi"),n("design:type",l.ColumnApi)],e.prototype,"columnApi",void 0),r([f.Autowired("gridApi"),n("design:type",w.GridApi)],e.prototype,"gridApi",void 0),r([f.Autowired("filterStage"),n("design:type",Object)],e.prototype,"filterStage",void 0),r([f.Autowired("sortStage"),n("design:type",Object)],e.prototype,"sortStage",void 0),r([f.Autowired("flattenStage"),n("design:type",Object)],e.prototype,"flattenStage",void 0),r([f.Optional("groupStage"),n("design:type",Object)],e.prototype,"groupStage",void 0),r([f.Optional("aggregationStage"),n("design:type",Object)],e.prototype,"aggregationStage",void 0),r([f.Optional("pivotStage"),n("design:type",Object)],e.prototype,"pivotStage",void 0),r([f.PostConstruct,n("design:type",Function),n("design:paramtypes",[]),n("design:returntype",void 0)],e.prototype,"init",null),r([f.Bean("rowModel")],e)}();t.ClientSideRowModel=_},814:function(e,t,o){var r=this&&this.__decorate||function(e,t,o,r){var n,i=arguments.length,s=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,o):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,o,r);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(s=(i<3?n(s):i>3?n(t,o,s):n(t,o))||s);return i>3&&s&&Object.defineProperty(t,o,s),s},n=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)};Object.defineProperty(t,"__esModule",{value:!0});var i=o(44081),s=o(74517),a=o(72948),l=o(72493),p=o(72493),u=function(){function e(){}return e.prototype.calculateColInitialWidth=function(e){return e.width?e.width<this.gridOptionsWrapper.getMinColWidth()?this.gridOptionsWrapper.getMinColWidth():e.width:this.gridOptionsWrapper.getColWidth()},e.prototype.getOriginalPathForColumn=function(e,t){var o=[],r=!1;return function t(n,i){for(var s=0;s<n.length;s++){if(r)return;var l=n[s];l instanceof a.OriginalColumnGroup?(t(l.getChildren(),i+1),o[i]=l):l===e&&(r=!0)}}(t,0),r?o:null},e.prototype.depthFirstOriginalTreeSearch=function(e,t,o){var r=this;t&&t.forEach((function(t){t instanceof a.OriginalColumnGroup&&r.depthFirstOriginalTreeSearch(t,t.getChildren(),o),o(t,e)}))},e.prototype.depthFirstAllColumnTreeSearch=function(e,t){var o=this;e&&e.forEach((function(e){e instanceof s.ColumnGroup&&o.depthFirstAllColumnTreeSearch(e.getChildren(),t),t(e)}))},e.prototype.depthFirstDisplayedColumnTreeSearch=function(e,t){var o=this;e&&e.forEach((function(e){e instanceof s.ColumnGroup&&o.depthFirstDisplayedColumnTreeSearch(e.getDisplayedChildren(),t),t(e)}))},r([p.Autowired("gridOptionsWrapper"),n("design:type",i.GridOptionsWrapper)],e.prototype,"gridOptionsWrapper",void 0),r([l.Bean("columnUtils")],e)}();t.ColumnUtils=u},1571:function(e,t,o){var r=this&&this.__decorate||function(e,t,o,r){var n,i=arguments.length,s=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,o):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,o,r);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(s=(i<3?n(s):i>3?n(t,o,s):n(t,o))||s);return i>3&&s&&Object.defineProperty(t,o,s),s},n=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)};Object.defineProperty(t,"__esModule",{value:!0});var i=o(72493),s=o(72493),a=o(44081),l=o(83423),p=function(){function e(){this.gridInstanceId=t.gridInstanceSequence.next()}var t;return t=e,e.prototype.init=function(){this.stampDomElementWithGridInstance()},e.prototype.stampDomElementWithGridInstance=function(){this.eGridDiv[t.GRID_DOM_KEY]=this.gridInstanceId},e.prototype.getRenderedCellForEvent=function(e){return l._.getCellCompForEvent(this.gridOptionsWrapper,e)},e.prototype.isEventFromThisGrid=function(e){for(var o=l._.getEventPath(e),r=0;r<o.length;r++){var n=o[r][t.GRID_DOM_KEY];if(l._.exists(n))return n===this.gridInstanceId}return!1},e.prototype.getGridCellForEvent=function(e){var t=this.getRenderedCellForEvent(e);return t?t.getGridCell():null},e.gridInstanceSequence=new l.NumberSequence,e.GRID_DOM_KEY="__ag_grid_instance",r([s.Autowired("gridOptionsWrapper"),n("design:type",a.GridOptionsWrapper)],e.prototype,"gridOptionsWrapper",void 0),r([s.Autowired("eGridDiv"),n("design:type",HTMLElement)],e.prototype,"eGridDiv",void 0),r([i.PostConstruct,n("design:type",Function),n("design:paramtypes",[]),n("design:returntype",void 0)],e.prototype,"init",null),t=r([i.Bean("mouseEventService")],e)}();t.MouseEventService=p},2102:function(e,t,o){var r,n=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o])},r(e,t)},function(e,t){function o(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)});Object.defineProperty(t,"__esModule",{value:!0});var i=o(96652),s=o(46410),a=o(47008),l=o(47008),p=function(e){function t(t,o){var r=e.call(this)||this;return r.reactComponent=t,r.parentComponent=o,r}return n(t,e),t.prototype.getFrameworkComponentInstance=function(){return this.componentInstance},t.prototype.getReactComponentName=function(){return this.reactComponent.name},t.prototype.init=function(e){var t=this;return new l.Promise((function(o){t.eParentElement=document.createElement(t.parentComponent.props.componentWrappingElement||"div"),a.Utils.addCssClass(t.eParentElement,"ag-react-container"),e.reactContainer=t.eParentElement,t.createReactComponentLegacy(e,o)}))},t.prototype.getGui=function(){return this.eParentElement},t.prototype.destroy=function(){s.unmountComponentAtNode(this.eParentElement)},t.prototype.createReactComponentLegacy=function(e,t){var o=this,r=i.createElement(this.reactComponent,e);this.parentComponent?s.unstable_renderSubtreeIntoContainer(this.parentComponent,r,this.eParentElement,(function(){o.componentInstance=this,t(null)})):s.render(r,this.eParentElement,(function(){o.componentInstance=this,t(null)}))},t}(o(30844).BaseReactComponent);t.LegacyReactComponent=p},2299:function(e,t,o){var r,n=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o])},r(e,t)},function(e,t){function o(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)}),i=this&&this.__decorate||function(e,t,o,r){var n,i=arguments.length,s=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,o):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,o,r);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(s=(i<3?n(s):i>3?n(t,o,s):n(t,o))||s);return i>3&&s&&Object.defineProperty(t,o,s),s},s=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)};Object.defineProperty(t,"__esModule",{value:!0});var a=o(21951),l=o(8534),p=o(72493),u=o(44871),d=o(40797),c=o(63405),h=o(60843),f=o(45727),g=o(54828),m=o(44081),y=function(e){function t(t,o){var r=e.call(this)||this;r.cbSelectAllVisible=!1,r.processingEventFromCheckbox=!1,r.cbSelectAll=t,r.column=o;var n=o.getColDef();return r.filteredOnly=!!n&&!!n.headerCheckboxSelectionFilteredOnly,r}return n(t,e),t.prototype.postConstruct=function(){this.showOrHideSelectAll(),this.addDestroyableEventListener(this.eventService,c.Events.EVENT_DISPLAYED_COLUMNS_CHANGED,this.showOrHideSelectAll.bind(this)),this.addDestroyableEventListener(this.eventService,c.Events.EVENT_SELECTION_CHANGED,this.onSelectionChanged.bind(this)),this.addDestroyableEventListener(this.eventService,c.Events.EVENT_MODEL_UPDATED,this.onModelChanged.bind(this)),this.addDestroyableEventListener(this.cbSelectAll,a.AgCheckbox.EVENT_CHANGED,this.onCbSelectAll.bind(this))},t.prototype.showOrHideSelectAll=function(){this.cbSelectAllVisible=this.isCheckboxSelection(),this.cbSelectAll.setVisible(this.cbSelectAllVisible),this.cbSelectAllVisible&&(this.checkRightRowModelType(),this.updateStateOfCheckbox())},t.prototype.onModelChanged=function(){this.cbSelectAllVisible&&this.updateStateOfCheckbox()},t.prototype.onSelectionChanged=function(){this.cbSelectAllVisible&&this.updateStateOfCheckbox()},t.prototype.getNextCheckboxState=function(e){return(0!==e.selected||0!==e.notSelected)&&(e.selected>0&&e.notSelected>0?null:e.selected>0)},t.prototype.updateStateOfCheckbox=function(){if(!this.processingEventFromCheckbox){this.processingEventFromCheckbox=!0;var e=this.getSelectionCount(),t=this.getNextCheckboxState(e);this.cbSelectAll.setSelected(t),this.processingEventFromCheckbox=!1}},t.prototype.getSelectionCount=function(){var e=this,t=0,o=0,r=function(r){e.gridOptionsWrapper.isGroupSelectsChildren()&&r.group||(r.isSelected()?t++:r.selectable&&o++)};return this.filteredOnly?this.gridApi.forEachNodeAfterFilter(r):this.gridApi.forEachNode(r),{notSelected:o,selected:t}},t.prototype.checkRightRowModelType=function(){var e=this.rowModel.getType();e===f.Constants.ROW_MODEL_TYPE_CLIENT_SIDE||console.warn("ag-Grid: selectAllCheckbox is only available if using normal row model, you are using "+e)},t.prototype.onCbSelectAll=function(){this.processingEventFromCheckbox||this.cbSelectAllVisible&&(this.cbSelectAll.isSelected()?this.selectionController.selectAllRowNodes(this.filteredOnly):this.selectionController.deselectAllRowNodes(this.filteredOnly))},t.prototype.isCheckboxSelection=function(){var e=this.column.getColDef().headerCheckboxSelection;return"function"==typeof e&&(e=e({column:this.column,colDef:this.column.getColDef(),columnApi:this.columnApi,api:this.gridApi})),!(!e||(this.gridOptionsWrapper.isRowModelServerSide()?(console.warn("headerCheckboxSelection is not supported for Server Side Row Model"),1):this.gridOptionsWrapper.isRowModelInfinite()?(console.warn("headerCheckboxSelection is not supported for Infinite Row Model"),1):this.gridOptionsWrapper.isRowModelViewport()&&(console.warn("headerCheckboxSelection is not supported for Viewport Row Model"),1)))},i([p.Autowired("gridApi"),s("design:type",d.GridApi)],t.prototype,"gridApi",void 0),i([p.Autowired("columnApi"),s("design:type",u.ColumnApi)],t.prototype,"columnApi",void 0),i([p.Autowired("eventService"),s("design:type",h.EventService)],t.prototype,"eventService",void 0),i([p.Autowired("rowModel"),s("design:type",Object)],t.prototype,"rowModel",void 0),i([p.Autowired("selectionController"),s("design:type",g.SelectionController)],t.prototype,"selectionController",void 0),i([p.Autowired("gridOptionsWrapper"),s("design:type",m.GridOptionsWrapper)],t.prototype,"gridOptionsWrapper",void 0),i([p.PostConstruct,s("design:type",Function),s("design:paramtypes",[]),s("design:returntype",void 0)],t.prototype,"postConstruct",null),t}(l.BeanStub);t.SelectAllFeature=y},2461:function(e,t,o){var r=this&&this.__decorate||function(e,t,o,r){var n,i=arguments.length,s=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,o):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,o,r);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(s=(i<3?n(s):i>3?n(t,o,s):n(t,o))||s);return i>3&&s&&Object.defineProperty(t,o,s),s},n=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)};Object.defineProperty(t,"__esModule",{value:!0});var i=o(72493),s=o(86608),a=o(24463),l=o(44081),p=o(98239),u=o(83423),d=function(){function e(){}return e.prototype.init=function(){this.postSortFunc=this.gridOptionsWrapper.getPostSortFunc()},e.prototype.sort=function(e,t,o,r,n,i){var s=this;n.forEachChangedNodeDepthFirst((function(a){if(s.pullDownGroupDataForHideOpenParents(a.childrenAfterFilter,!0),t){var l=o?s.doDeltaSort(a,e,r,n,i):s.doFullSort(a,e);a.childrenAfterSort=l.map((function(e){return e.rowNode}))}else a.childrenAfterSort=a.childrenAfterFilter.slice(0);s.updateChildIndexes(a),s.postSortFunc&&s.postSortFunc(a.childrenAfterSort)})),this.updateGroupDataForHiddenOpenParents(n)},e.prototype.doFullSort=function(e,t){var o=e.childrenAfterFilter.map(this.mapNodeToSortedNode.bind(this));return o.sort(this.compareRowNodes.bind(this,t)),o},e.prototype.mapNodeToSortedNode=function(e,t){return{currentPos:t,rowNode:e}},e.prototype.doDeltaSort=function(e,t,o,r,n){var i=e.childrenAfterSort.filter((function(e){var t=!o[e.id],i=n||r.canSkip(e);return t&&i})).map(this.mapNodeToSortedNode.bind(this)),s={};i.forEach((function(e){return s[e.rowNode.id]=e.rowNode}));var a=e.childrenAfterFilter.filter((function(e){return!s[e.id]})).map(this.mapNodeToSortedNode.bind(this));return a.sort(this.compareRowNodes.bind(this,t)),0===a.length?i:0===i.length?a:this.mergeSortedArrays(t,i,a)},e.prototype.mergeSortedArrays=function(e,t,o){for(var r=[],n=0,i=0;n<t.length&&i<o.length;)this.compareRowNodes(e,t[n],o[i])<0?r.push(t[n++]):r.push(o[i++]);for(;n<t.length;)r.push(t[n++]);for(;i<o.length;)r.push(o[i++]);return r},e.prototype.compareRowNodes=function(e,t,o){for(var r=t.rowNode,n=o.rowNode,i=0,s=e.length;i<s;i++){var a,l=e[i],p=-1===l.inverter,d=this.getValue(r,l.column),c=this.getValue(n,l.column);if(0!==(a=l.column.getColDef().comparator?l.column.getColDef().comparator(d,c,r,n,p):u._.defaultComparator(d,c,this.gridOptionsWrapper.isAccentedSort())))return a*l.inverter}return t.currentPos-o.currentPos},e.prototype.getValue=function(e,t){return this.valueService.getValue(t,e)},e.prototype.updateChildIndexes=function(e){if(!u._.missing(e.childrenAfterSort))for(var t=e.childrenAfterSort,o=0;o<t.length;o++){var r=t[o],n=0===o,i=o===e.childrenAfterSort.length-1;r.setFirstChild(n),r.setLastChild(i),r.setChildIndex(o)}},e.prototype.updateGroupDataForHiddenOpenParents=function(e){var t=this;if(this.gridOptionsWrapper.isGroupHideOpenParents()){var o=function(e){t.pullDownGroupDataForHideOpenParents(e.childrenAfterSort,!1),e.childrenAfterSort.forEach((function(e){e.hasChildren()&&o(e)}))};e.executeFromRootNode((function(e){return o(e)}))}},e.prototype.pullDownGroupDataForHideOpenParents=function(e,t){var o=this;u._.missing(e)||this.gridOptionsWrapper.isGroupHideOpenParents()&&e.forEach((function(e){o.columnController.getGroupDisplayColumns().forEach((function(r){var n=r.getColDef().showRowGroup;if("string"==typeof n){var i=n,s=o.columnController.getPrimaryColumn(i);if(s!==e.rowGroupColumn)if(t)e.setGroupValue(r.getId(),null);else{var a=e.getFirstChildOfFirstChild(s);a&&e.setGroupValue(r.getId(),a.key)}}else console.error("ag-Grid: groupHideOpenParents only works when specifying specific columns for colDef.showRowGroup")}))}))},r([i.Autowired("sortController"),n("design:type",s.SortController)],e.prototype,"sortController",void 0),r([i.Autowired("columnController"),n("design:type",p.ColumnController)],e.prototype,"columnController",void 0),r([i.Autowired("valueService"),n("design:type",a.ValueService)],e.prototype,"valueService",void 0),r([i.Autowired("gridOptionsWrapper"),n("design:type",l.GridOptionsWrapper)],e.prototype,"gridOptionsWrapper",void 0),r([i.PostConstruct,n("design:type",Function),n("design:paramtypes",[]),n("design:returntype",void 0)],e.prototype,"init",null),r([i.Bean("sortService")],e)}();t.SortService=d},3976:(e,t,o)=>{Object.defineProperty(t,"__esModule",{value:!0});var r=o(45727),n=o(34782),i=o(83423),s=function(){function e(e,t){this.rowIndex=e,this.floating=i._.makeNull(t)}return e.prototype.isFloatingTop=function(){return this.floating===r.Constants.PINNED_TOP},e.prototype.isFloatingBottom=function(){return this.floating===r.Constants.PINNED_BOTTOM},e.prototype.isNotFloating=function(){return!this.isFloatingBottom()&&!this.isFloatingTop()},e.prototype.equals=function(e){return this.rowIndex===e.rowIndex&&this.floating===e.floating},e.prototype.toString=function(){return"rowIndex = "+this.rowIndex+", floating = "+this.floating},e.prototype.getGridCell=function(e){var t={rowIndex:this.rowIndex,floating:this.floating,column:e};return new n.GridCell(t)},e.prototype.before=function(e){var t=e.floating;switch(this.floating){case r.Constants.PINNED_TOP:if(t!==r.Constants.PINNED_TOP)return!0;break;case r.Constants.PINNED_BOTTOM:if(t!==r.Constants.PINNED_BOTTOM)return!1;break;default:if(i._.exists(t))return t!==r.Constants.PINNED_TOP}return this.rowIndex<e.rowIndex},e}();t.GridRow=s},4889:function(e,t,o){var r=this&&this.__decorate||function(e,t,o,r){var n,i=arguments.length,s=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,o):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,o,r);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(s=(i<3?n(s):i>3?n(t,o,s):n(t,o))||s);return i>3&&s&&Object.defineProperty(t,o,s),s},n=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)};Object.defineProperty(t,"__esModule",{value:!0});var i=o(72493),s=o(44081),a=o(83423),l=function(){function e(){}return e.prototype.init=function(){this.groupSelectsChildren=this.gridOptionsWrapper.isGroupSelectsChildren(),this.isRowSelectableFunc=this.gridOptionsWrapper.getIsRowSelectableFunc()},e.prototype.updateSelectableAfterGrouping=function(e){this.isRowSelectableFunc&&this.recurseDown(e.childrenAfterGroup,(function(e){return e.childrenAfterGroup}))},e.prototype.updateSelectableAfterFiltering=function(e){this.isRowSelectableFunc&&this.recurseDown(e.childrenAfterGroup,(function(e){return e.childrenAfterFilter}))},e.prototype.recurseDown=function(e,t){var o=this;e.forEach((function(e){if(e.group){var r;if(e.hasChildren()&&o.recurseDown(t(e),t),o.groupSelectsChildren){var n=a._.find(t(e),"selectable",!0);r=a._.exists(n)}else r=!!o.isRowSelectableFunc&&o.isRowSelectableFunc(e);e.setRowSelectable(r)}}))},r([i.Autowired("gridOptionsWrapper"),n("design:type",s.GridOptionsWrapper)],e.prototype,"gridOptionsWrapper",void 0),r([i.PostConstruct,n("design:type",Function),n("design:paramtypes",[]),n("design:returntype",void 0)],e.prototype,"init",null),r([i.Bean("selectableService")],e)}();t.SelectableService=l},5448:function(e,t,o){var r,n=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o])},r(e,t)},function(e,t){function o(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)});Object.defineProperty(t,"__esModule",{value:!0});var i=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),t.prototype.isPopup=function(){return!0},t}(o(71616).TextCellEditor);t.PopupTextCellEditor=i},6065:function(e,t,o){var r,n=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o])},r(e,t)},function(e,t){function o(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)}),i=this&&this.__decorate||function(e,t,o,r){var n,i=arguments.length,s=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,o):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,o,r);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(s=(i<3?n(s):i>3?n(t,o,s):n(t,o))||s);return i>3&&s&&Object.defineProperty(t,o,s),s},s=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)};Object.defineProperty(t,"__esModule",{value:!0});var a=o(72493),l=o(44081),p=o(68363),u=o(10042),d=o(60843),c=o(45727),h=o(8534),f=o(63405),g=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),t.prototype.init=function(){this.rowModel.getType()===c.Constants.ROW_MODEL_TYPE_CLIENT_SIDE&&(this.clientSideRowModel=this.rowModel),this.addDestroyableEventListener(this.eventService,f.Events.EVENT_CELL_VALUE_CHANGED,this.onCellValueChanged.bind(this))},t.prototype.onCellValueChanged=function(e){this.doChangeDetection(e.node,e.column)},t.prototype.doChangeDetection=function(e,t){if(!this.gridOptionsWrapper.isSuppressChangeDetection()){if(this.clientSideRowModel&&!e.isRowPinned()){var o=this.gridOptionsWrapper.isAggregateOnlyChangedColumns(),r=new p.ChangedPath(o,this.clientSideRowModel.getRootNode());r.addParentNode(e.parent,[t]),this.clientSideRowModel.doAggregate(r)}this.rowRenderer.refreshCells()}},i([a.Autowired("gridOptionsWrapper"),s("design:type",l.GridOptionsWrapper)],t.prototype,"gridOptionsWrapper",void 0),i([a.Autowired("rowModel"),s("design:type",Object)],t.prototype,"rowModel",void 0),i([a.Autowired("rowRenderer"),s("design:type",u.RowRenderer)],t.prototype,"rowRenderer",void 0),i([a.Autowired("eventService"),s("design:type",d.EventService)],t.prototype,"eventService",void 0),i([a.PostConstruct,s("design:type",Function),s("design:paramtypes",[]),s("design:returntype",void 0)],t.prototype,"init",null),i([a.Bean("changeDetectionService")],t)}(h.BeanStub);t.ChangeDetectionService=g},6577:(e,t,o)=>{var r,n=o(9606).URL,i=o(65994).process,s=Object.defineProperty,a=Object.getOwnPropertyDescriptor,l=Object.getOwnPropertyNames,p=Object.prototype.hasOwnProperty,u=(e,t)=>{for(var o in t)s(e,o,{get:t[o],enumerable:!0})},d={};u(d,{AISDKError:()=>m.AISDKError,APICallError:()=>m.APICallError,AbstractChat:()=>Fs,DefaultChatTransport:()=>xs,DefaultGeneratedFile:()=>yr,DirectChatTransport:()=>Ms,DownloadError:()=>Ct.DownloadError,EmptyResponseBodyError:()=>m.EmptyResponseBodyError,Experimental_Agent:()=>Dn,HttpChatTransport:()=>Ns,InvalidArgumentError:()=>E,InvalidDataContentError:()=>it,InvalidMessageRoleError:()=>dt,InvalidPromptError:()=>m.InvalidPromptError,InvalidResponseDataError:()=>m.InvalidResponseDataError,InvalidStreamPartError:()=>T,InvalidToolApprovalError:()=>x,InvalidToolInputError:()=>j,JSONParseError:()=>m.JSONParseError,JsonToSseTransformStream:()=>Xr,LoadAPIKeyError:()=>m.LoadAPIKeyError,LoadSettingError:()=>m.LoadSettingError,MessageConversionError:()=>yt,MissingToolResultsError:()=>J,NoContentGeneratedError:()=>m.NoContentGeneratedError,NoImageGeneratedError:()=>re,NoObjectGeneratedError:()=>pe,NoOutputGeneratedError:()=>ge,NoSpeechGeneratedError:()=>Ee,NoSuchModelError:()=>m.NoSuchModelError,NoSuchProviderError:()=>fs,NoSuchToolError:()=>je,NoTranscriptGeneratedError:()=>Te,NoVideoGeneratedError:()=>xe,Output:()=>wr,RetryError:()=>Rt,SerialJobExecutor:()=>Si,TextStreamChatTransport:()=>Gs,TooManyEmbeddingValuesForCallError:()=>m.TooManyEmbeddingValuesForCallError,ToolCallNotFoundForApprovalError:()=>U,ToolCallRepairError:()=>Ue,ToolLoopAgent:()=>Dn,TypeValidationError:()=>m.TypeValidationError,UIMessageStreamError:()=>Xe,UI_MESSAGE_STREAM_HEADERS:()=>en,UnsupportedFunctionalityError:()=>m.UnsupportedFunctionalityError,UnsupportedModelVersionError:()=>$e,addToolInputExamplesMiddleware:()=>Ji,asSchema:()=>f.asSchema,assistantModelMessageSchema:()=>Lo,callCompletionApi:()=>Ts,consumeStream:()=>bn,convertFileListToFileUIParts:()=>As,convertToModelMessages:()=>kn,cosineSimilarity:()=>Ei,createAgentUIStream:()=>Bn,createAgentUIStreamResponse:()=>zn,createDownload:()=>_i,createGateway:()=>h.createGateway,createIdGenerator:()=>f.createIdGenerator,createProviderRegistry:()=>ms,createTextStreamResponse:()=>Zr,createUIMessageStream:()=>xn,createUIMessageStreamResponse:()=>tn,customProvider:()=>as,defaultEmbeddingSettingsMiddleware:()=>Bi,defaultSettingsMiddleware:()=>zi,dynamicTool:()=>f.dynamicTool,embed:()=>qn,embedMany:()=>Jn,experimental_createProviderRegistry:()=>ys,experimental_customProvider:()=>ps,experimental_generateImage:()=>ri,experimental_generateSpeech:()=>xi,experimental_generateVideo:()=>Hi,experimental_transcribe:()=>bs,extractJsonMiddleware:()=>Yi,extractReasoningMiddleware:()=>$i,gateway:()=>h.gateway,generateId:()=>f.generateId,generateImage:()=>ei,generateObject:()=>vi,generateText:()=>Hr,getStaticToolName:()=>gn,getTextFromDataUrl:()=>bi,getToolName:()=>mn,getToolOrDynamicToolName:()=>yn,hasToolCall:()=>Lr,isDataUIPart:()=>an,isDeepEqualData:()=>Ri,isFileUIPart:()=>pn,isReasoningUIPart:()=>un,isStaticToolUIPart:()=>dn,isTextUIPart:()=>ln,isToolOrDynamicToolUIPart:()=>fn,isToolUIPart:()=>hn,jsonSchema:()=>f.jsonSchema,lastAssistantMessageIsCompleteWithApprovalResponses:()=>ks,lastAssistantMessageIsCompleteWithToolCalls:()=>Ls,modelMessageSchema:()=>jo,parseJsonEventStream:()=>f.parseJsonEventStream,parsePartialJson:()=>Sr,pipeAgentUIStreamToResponse:()=>Un,pipeTextStreamToResponse:()=>Qr,pipeUIMessageStreamToResponse:()=>En,pruneMessages:()=>Mi,readUIMessageStream:()=>Fn,rerank:()=>Cs,safeValidateUIMessages:()=>Vn,simulateReadableStream:()=>Ti,simulateStreamingMiddleware:()=>Ki,smoothStream:()=>ji,stepCountIs:()=>kr,streamObject:()=>Ai,streamText:()=>An,systemModelMessageSchema:()=>Mo,tool:()=>f.tool,toolModelMessageSchema:()=>Go,uiMessageChunkSchema:()=>sn,userModelMessageSchema:()=>ko,validateUIMessages:()=>Hn,wrapEmbeddingModel:()=>es,wrapImageModel:()=>os,wrapLanguageModel:()=>Qi,wrapProvider:()=>is,zodSchema:()=>f.zodSchema}),e.exports=(r=d,((e,t,o,r)=>{if(t&&"object"==typeof t||"function"==typeof t)for(let o of l(t))p.call(e,o)||undefined===o||s(e,o,{get:()=>t[o],enumerable:!(r=a(t,o))||r.enumerable});return e})(s({},"__esModule",{value:!0}),r));var c,h=o(10601),f=o(94192),g=o(94192),m=o(10292),y=o(10292),v="AI_InvalidArgumentError",C=`vercel.ai.error.${v}`,w=Symbol.for(C),E=class extends y.AISDKError{constructor({parameter:e,value:t,message:o}){super({name:v,message:`Invalid argument for parameter ${e}: ${o}`}),this[c]=!0,this.parameter=e,this.value=t}static isInstance(e){return y.AISDKError.hasMarker(e,C)}};c=w;var _,b=o(10292),R="AI_InvalidStreamPartError",S=`vercel.ai.error.${R}`,O=Symbol.for(S),T=class extends b.AISDKError{constructor({chunk:e,message:t}){super({name:R,message:t}),this[_]=!0,this.chunk=e}static isInstance(e){return b.AISDKError.hasMarker(e,S)}};_=O;var P,A=o(10292),I="AI_InvalidToolApprovalError",D=`vercel.ai.error.${I}`,N=Symbol.for(D),x=class extends A.AISDKError{constructor({approvalId:e}){super({name:I,message:`Tool approval response references unknown approvalId: "${e}". No matching tool-approval-request found in message history.`}),this[P]=!0,this.approvalId=e}static isInstance(e){return A.AISDKError.hasMarker(e,D)}};P=N;var F,M=o(10292),k="AI_InvalidToolInputError",L=`vercel.ai.error.${k}`,G=Symbol.for(L),j=class extends M.AISDKError{constructor({toolInput:e,toolName:t,cause:o,message:r=`Invalid input for tool ${t}: ${(0,M.getErrorMessage)(o)}`}){super({name:k,message:r,cause:o}),this[F]=!0,this.toolInput=e,this.toolName=t}static isInstance(e){return M.AISDKError.hasMarker(e,L)}};F=G;var W,V=o(10292),H="AI_ToolCallNotFoundForApprovalError",B=`vercel.ai.error.${H}`,z=Symbol.for(B),U=class extends V.AISDKError{constructor({toolCallId:e,approvalId:t}){super({name:H,message:`Tool call "${e}" not found for approval request "${t}".`}),this[W]=!0,this.toolCallId=e,this.approvalId=t}static isInstance(e){return V.AISDKError.hasMarker(e,B)}};W=z;var Y,q=o(10292),$="AI_MissingToolResultsError",K=`vercel.ai.error.${$}`,Z=Symbol.for(K),J=class extends q.AISDKError{constructor({toolCallIds:e}){super({name:$,message:`Tool result${e.length>1?"s are":" is"} missing for tool call${e.length>1?"s":""} ${e.join(", ")}.`}),this[Y]=!0,this.toolCallIds=e}static isInstance(e){return q.AISDKError.hasMarker(e,K)}};Y=Z;var Q,X=o(10292),ee="AI_NoImageGeneratedError",te=`vercel.ai.error.${ee}`,oe=Symbol.for(te),re=class extends X.AISDKError{constructor({message:e="No image generated.",cause:t,responses:o}){super({name:ee,message:e,cause:t}),this[Q]=!0,this.responses=o}static isInstance(e){return X.AISDKError.hasMarker(e,te)}};Q=oe;var ne,ie=o(10292),se="AI_NoObjectGeneratedError",ae=`vercel.ai.error.${se}`,le=Symbol.for(ae),pe=class extends ie.AISDKError{constructor({message:e="No object generated.",cause:t,text:o,response:r,usage:n,finishReason:i}){super({name:se,message:e,cause:t}),this[ne]=!0,this.text=o,this.response=r,this.usage=n,this.finishReason=i}static isInstance(e){return ie.AISDKError.hasMarker(e,ae)}};ne=le;var ue,de=o(10292),ce="AI_NoOutputGeneratedError",he=`vercel.ai.error.${ce}`,fe=Symbol.for(he),ge=class extends de.AISDKError{constructor({message:e="No output generated.",cause:t}={}){super({name:ce,message:e,cause:t}),this[ue]=!0}static isInstance(e){return de.AISDKError.hasMarker(e,he)}};ue=fe;var me,ye=o(10292),ve="AI_NoSpeechGeneratedError",Ce=`vercel.ai.error.${ve}`,we=Symbol.for(Ce),Ee=class extends ye.AISDKError{constructor(e){super({name:ve,message:"No speech audio generated."}),this[me]=!0,this.responses=e.responses}static isInstance(e){return ye.AISDKError.hasMarker(e,Ce)}};me=we;var _e,be=o(10292),Re="AI_NoTranscriptGeneratedError",Se=`vercel.ai.error.${Re}`,Oe=Symbol.for(Se),Te=class extends be.AISDKError{constructor(e){super({name:Re,message:"No transcript generated."}),this[_e]=!0,this.responses=e.responses}static isInstance(e){return be.AISDKError.hasMarker(e,Se)}};_e=Oe;var Pe,Ae=o(10292),Ie="AI_NoVideoGeneratedError",De=`vercel.ai.error.${Ie}`,Ne=Symbol.for(De),xe=class extends Ae.AISDKError{constructor({message:e="No video generated.",cause:t,responses:o}){super({name:Ie,message:e,cause:t}),this[Pe]=!0,this.responses=o}static isInstance(e){return Ae.AISDKError.hasMarker(e,De)}static isNoVideoGeneratedError(e){return e instanceof Error&&e.name===Ie&&void 0!==e.responses}toJSON(){return{name:this.name,message:this.message,stack:this.stack,cause:this.cause,responses:this.responses}}};Pe=Ne;var Fe,Me=o(10292),ke="AI_NoSuchToolError",Le=`vercel.ai.error.${ke}`,Ge=Symbol.for(Le),je=class extends Me.AISDKError{constructor({toolName:e,availableTools:t,message:o=`Model tried to call unavailable tool '${e}'. ${void 0===t?"No tools are available.":`Available tools: ${t.join(", ")}.`}`}){super({name:ke,message:o}),this[Fe]=!0,this.toolName=e,this.availableTools=t}static isInstance(e){return Me.AISDKError.hasMarker(e,Le)}};Fe=Ge;var We,Ve=o(10292),He="AI_ToolCallRepairError",Be=`vercel.ai.error.${He}`,ze=Symbol.for(Be),Ue=class extends Ve.AISDKError{constructor({cause:e,originalError:t,message:o=`Error repairing tool call: ${(0,Ve.getErrorMessage)(e)}`}){super({name:He,message:o,cause:e}),this[We]=!0,this.originalError=t}static isInstance(e){return Ve.AISDKError.hasMarker(e,Be)}};We=ze;var Ye,qe=o(10292),$e=class extends qe.AISDKError{constructor(e){super({name:"AI_UnsupportedModelVersionError",message:`Unsupported model version ${e.version} for provider "${e.provider}" and model "${e.modelId}". AI SDK 5 only supports models that implement specification version "v2".`}),this.version=e.version,this.provider=e.provider,this.modelId=e.modelId}},Ke=o(10292),Ze="AI_UIMessageStreamError",Je=`vercel.ai.error.${Ze}`,Qe=Symbol.for(Je),Xe=class extends Ke.AISDKError{constructor({chunkType:e,chunkId:t,message:o}){super({name:Ze,message:o}),this[Ye]=!0,this.chunkType=e,this.chunkId=t}static isInstance(e){return Ke.AISDKError.hasMarker(e,Je)}};Ye=Qe;var et,tt=o(10292),ot="AI_InvalidDataContentError",rt=`vercel.ai.error.${ot}`,nt=Symbol.for(rt),it=class extends tt.AISDKError{constructor({content:e,cause:t,message:o=`Invalid data content. Expected a base64 string, Uint8Array, ArrayBuffer, or Buffer, but got ${typeof e}.`}){super({name:ot,message:o,cause:t}),this[et]=!0,this.content=e}static isInstance(e){return tt.AISDKError.hasMarker(e,rt)}};et=nt;var st,at=o(10292),lt="AI_InvalidMessageRoleError",pt=`vercel.ai.error.${lt}`,ut=Symbol.for(pt),dt=class extends at.AISDKError{constructor({role:e,message:t=`Invalid message role: '${e}'. Must be one of: "system", "user", "assistant", "tool".`}){super({name:lt,message:t}),this[st]=!0,this.role=e}static isInstance(e){return at.AISDKError.hasMarker(e,pt)}};st=ut;var ct,ht=o(10292),ft="AI_MessageConversionError",gt=`vercel.ai.error.${ft}`,mt=Symbol.for(gt),yt=class extends ht.AISDKError{constructor({originalMessage:e,message:t}){super({name:ft,message:t}),this[ct]=!0,this.originalMessage=e}static isInstance(e){return ht.AISDKError.hasMarker(e,gt)}};ct=mt;var vt,Ct=o(94192),wt=o(10292),Et="AI_RetryError",_t=`vercel.ai.error.${Et}`,bt=Symbol.for(_t),Rt=class extends wt.AISDKError{constructor({message:e,reason:t,errors:o}){super({name:Et,message:e}),this[vt]=!0,this.reason=t,this.errors=o,this.lastError=o[o.length-1]}static isInstance(e){return wt.AISDKError.hasMarker(e,_t)}};function St({warning:e,provider:t,model:o}){const r=`AI SDK Warning (${t} / ${o}):`;switch(e.type){case"unsupported":{let t=`${r} The feature "${e.feature}" is not supported.`;return e.details&&(t+=` ${e.details}`),t}case"compatibility":{let t=`${r} The feature "${e.feature}" is used in a compatibility mode.`;return e.details&&(t+=` ${e.details}`),t}case"other":return`${r} ${e.message}`;default:return`${r} ${JSON.stringify(e,null,2)}`}}vt=bt;var Ot=!1,Tt=e=>{if(0===e.warnings.length)return;const t=globalThis.AI_SDK_LOG_WARNINGS;if(!1!==t)if("function"!=typeof t){Ot||(Ot=!0,console.info("AI SDK Warning System: To turn off warning logging, set the AI_SDK_LOG_WARNINGS global to false."));for(const t of e.warnings)console.warn(St({warning:t,provider:e.provider,model:e.model}))}else t(e)},Pt=o(10601);function At({provider:e,modelId:t}){Tt({warnings:[{type:"compatibility",feature:"specificationVersion",details:"Using v2 specification compatibility mode. Some features may not be available."}],provider:e,model:t})}function It(e){return"v3"===e.specificationVersion?e:(At({provider:e.provider,modelId:e.modelId}),new Proxy(e,{get:(e,t)=>"specificationVersion"===t?"v3":e[t]}))}function Dt(e){return"v3"===e.specificationVersion?e:(At({provider:e.provider,modelId:e.modelId}),new Proxy(e,{get:(e,t)=>"specificationVersion"===t?"v3":e[t]}))}function Nt(e){return"v3"===e.specificationVersion?e:(At({provider:e.provider,modelId:e.modelId}),new Proxy(e,{get(e,t){switch(t){case"specificationVersion":return"v3";case"doGenerate":return async(...t)=>{const o=await e.doGenerate(...t);return{...o,finishReason:xt(o.finishReason),usage:Ft(o.usage)}};case"doStream":return async(...t)=>{const o=await e.doStream(...t);return{...o,stream:(r=o.stream,r.pipeThrough(new TransformStream({transform(e,t){"finish"===e.type?t.enqueue({...e,finishReason:xt(e.finishReason),usage:Ft(e.usage)}):t.enqueue(e)}})))};var r};default:return e[t]}}}))}function xt(e){return{unified:"unknown"===e?"other":e,raw:void 0}}function Ft(e){return{inputTokens:{total:e.inputTokens,noCache:void 0,cacheRead:e.cachedInputTokens,cacheWrite:void 0},outputTokens:{total:e.outputTokens,text:void 0,reasoning:e.reasoningTokens}}}function Mt(e){return"v3"===e.specificationVersion?e:(At({provider:e.provider,modelId:e.modelId}),new Proxy(e,{get:(e,t)=>"specificationVersion"===t?"v3":e[t]}))}function kt(e){return"v3"===e.specificationVersion?e:(At({provider:e.provider,modelId:e.modelId}),new Proxy(e,{get:(e,t)=>"specificationVersion"===t?"v3":e[t]}))}function Lt(e){if("string"!=typeof e){if("v3"!==e.specificationVersion&&"v2"!==e.specificationVersion){const t=e;throw new $e({version:t.specificationVersion,provider:t.provider,modelId:t.modelId})}return Nt(e)}return jt().languageModel(e)}function Gt(e){if("string"!=typeof e){if("v3"!==e.specificationVersion&&"v2"!==e.specificationVersion){const t=e;throw new $e({version:t.specificationVersion,provider:t.provider,modelId:t.modelId})}return It(e)}return jt().embeddingModel(e)}function jt(){var e;return null!=(e=globalThis.AI_SDK_DEFAULT_PROVIDER)?e:Pt.gateway}function Wt(e){if(null!=e)return"number"==typeof e?e:e.totalMs}function Vt(e){if(null!=e&&"number"!=typeof e)return e.stepMs}var Ht=o(94192),Bt=o(94192),zt=[{mediaType:"image/gif",bytesPrefix:[71,73,70]},{mediaType:"image/png",bytesPrefix:[137,80,78,71]},{mediaType:"image/jpeg",bytesPrefix:[255,216]},{mediaType:"image/webp",bytesPrefix:[82,73,70,70,null,null,null,null,87,69,66,80]},{mediaType:"image/bmp",bytesPrefix:[66,77]},{mediaType:"image/tiff",bytesPrefix:[73,73,42,0]},{mediaType:"image/tiff",bytesPrefix:[77,77,0,42]},{mediaType:"image/avif",bytesPrefix:[0,0,0,32,102,116,121,112,97,118,105,102]},{mediaType:"image/heic",bytesPrefix:[0,0,0,32,102,116,121,112,104,101,105,99]}],Ut=[{mediaType:"audio/mpeg",bytesPrefix:[255,251]},{mediaType:"audio/mpeg",bytesPrefix:[255,250]},{mediaType:"audio/mpeg",bytesPrefix:[255,243]},{mediaType:"audio/mpeg",bytesPrefix:[255,242]},{mediaType:"audio/mpeg",bytesPrefix:[255,227]},{mediaType:"audio/mpeg",bytesPrefix:[255,226]},{mediaType:"audio/wav",bytesPrefix:[82,73,70,70,null,null,null,null,87,65,86,69]},{mediaType:"audio/ogg",bytesPrefix:[79,103,103,83]},{mediaType:"audio/flac",bytesPrefix:[102,76,97,67]},{mediaType:"audio/aac",bytesPrefix:[64,21,0,0]},{mediaType:"audio/mp4",bytesPrefix:[102,116,121,112]},{mediaType:"audio/webm",bytesPrefix:[26,69,223,163]}],Yt=[{mediaType:"video/mp4",bytesPrefix:[0,0,0,null,102,116,121,112]},{mediaType:"video/webm",bytesPrefix:[26,69,223,163]},{mediaType:"video/quicktime",bytesPrefix:[0,0,0,20,102,116,121,112,113,116]},{mediaType:"video/x-msvideo",bytesPrefix:[82,73,70,70]}],qt=e=>{const t="string"==typeof e?(0,Bt.convertBase64ToUint8Array)(e):e,o=(127&t[6])<<21|(127&t[7])<<14|(127&t[8])<<7|127&t[9];return t.slice(o+10)};function $t({data:e,signatures:t}){const o=function(e){return"string"==typeof e&&e.startsWith("SUQz")||"string"!=typeof e&&e.length>10&&73===e[0]&&68===e[1]&&51===e[2]?qt(e):e}(e),r="string"==typeof o?(0,Bt.convertBase64ToUint8Array)(o.substring(0,Math.min(o.length,24))):o;for(const e of t)if(r.length>=e.bytesPrefix.length&&e.bytesPrefix.every(((e,t)=>null===e||r[t]===e)))return e.mediaType}var Kt=o(94192),Zt=o(94192),Jt="6.0.86",Qt=async({url:e,maxBytes:t,abortSignal:o})=>{var r;const n=e.toString();try{const e=await fetch(n,{headers:(0,Zt.withUserAgentSuffix)({},`ai-sdk/${Jt}`,(0,Zt.getRuntimeEnvironmentUserAgent)()),signal:o});if(!e.ok)throw new Kt.DownloadError({url:n,statusCode:e.status,statusText:e.statusText});return{data:await(0,Kt.readResponseWithSizeLimit)({response:e,url:n,maxBytes:null!=t?t:Kt.DEFAULT_MAX_DOWNLOAD_SIZE}),mediaType:null!=(r=e.headers.get("content-type"))?r:void 0}}catch(e){if(Kt.DownloadError.isInstance(e))throw e;throw new Kt.DownloadError({url:n,cause:e})}},Xt=(e=Qt)=>t=>Promise.all(t.map((async t=>t.isUrlSupportedByModel?null:e(t)))),eo=o(10292),to=o(94192),oo=o(19844);function ro(e){try{const[t,o]=e.split(",");return{mediaType:t.split(";")[0].split(":")[1],base64Content:o}}catch(e){return{mediaType:void 0,base64Content:void 0}}}var no=oo.z.union([oo.z.string(),oo.z.instanceof(Uint8Array),oo.z.instanceof(ArrayBuffer),oo.z.custom((e=>{var t,o;return null!=(o=null==(t=globalThis.Buffer)?void 0:t.isBuffer(e))&&o}),{message:"Must be a Buffer"})]);function io(e){if(e instanceof Uint8Array)return{data:e,mediaType:void 0};if(e instanceof ArrayBuffer)return{data:new Uint8Array(e),mediaType:void 0};if("string"==typeof e)try{e=new n(e)}catch(e){}if(e instanceof n&&"data:"===e.protocol){const{mediaType:t,base64Content:o}=ro(e.toString());if(null==t||null==o)throw new eo.AISDKError({name:"InvalidDataContentError",message:`Invalid data URL format in content ${e.toString()}`});return{data:o,mediaType:t}}return{data:e,mediaType:void 0}}function so(e){if(e instanceof Uint8Array)return e;if("string"==typeof e)try{return(0,to.convertBase64ToUint8Array)(e)}catch(t){throw new it({message:"Invalid data content. Content string is not a base64-encoded media.",content:e,cause:t})}if(e instanceof ArrayBuffer)return new Uint8Array(e);throw new it({content:e})}function ao(e){return void 0===e?[]:Array.isArray(e)?e:[e]}async function lo({prompt:e,supportedUrls:t,download:o=Xt()}){const r=await async function(e,t,o){const r=e.filter((e=>"user"===e.role)).map((e=>e.content)).filter((e=>Array.isArray(e))).flat().filter((e=>"image"===e.type||"file"===e.type)).map((e=>{var t;const o=null!=(t=e.mediaType)?t:"image"===e.type?"image/*":void 0;let r="image"===e.type?e.image:e.data;if("string"==typeof r)try{r=new n(r)}catch(e){}return{mediaType:o,data:r}})).filter((e=>e.data instanceof n)).map((e=>({url:e.data,isUrlSupportedByModel:null!=e.mediaType&&(0,Ht.isUrlSupported)({url:e.data.toString(),mediaType:e.mediaType,supportedUrls:o})}))),i=await t(r);return Object.fromEntries(i.map(((e,t)=>null==e?null:[r[t].url.toString(),{data:e.data,mediaType:e.mediaType}])).filter((e=>null!=e)))}(e.messages,o,t),i=new Map;for(const t of e.messages)if("assistant"===t.role&&Array.isArray(t.content))for(const e of t.content)"tool-approval-request"===e.type&&"approvalId"in e&&"toolCallId"in e&&i.set(e.approvalId,e.toolCallId);const s=new Set;for(const t of e.messages)if("tool"===t.role)for(const e of t.content)if("tool-approval-response"===e.type){const t=i.get(e.approvalId);t&&s.add(t)}const a=[...null!=e.system?"string"==typeof e.system?[{role:"system",content:e.system}]:ao(e.system).map((e=>({role:"system",content:e.content,providerOptions:e.providerOptions}))):[],...e.messages.map((e=>function({message:e,downloadedAssets:t}){const o=e.role;switch(o){case"system":return{role:"system",content:e.content,providerOptions:e.providerOptions};case"user":return"string"==typeof e.content?{role:"user",content:[{type:"text",text:e.content}],providerOptions:e.providerOptions}:{role:"user",content:e.content.map((e=>function(e,t){var o;if("text"===e.type)return{type:"text",text:e.text,providerOptions:e.providerOptions};let r;const i=e.type;switch(i){case"image":r=e.image;break;case"file":r=e.data;break;default:throw new Error(`Unsupported part type: ${i}`)}const{data:s,mediaType:a}=io(r);let l=null!=a?a:e.mediaType,p=s;if(p instanceof n){const e=t[p.toString()];e&&(p=e.data,null!=l||(l=e.mediaType))}switch(i){case"image":return(p instanceof Uint8Array||"string"==typeof p)&&(l=null!=(o=$t({data:p,signatures:zt}))?o:l),{type:"file",mediaType:null!=l?l:"image/*",filename:void 0,data:p,providerOptions:e.providerOptions};case"file":if(null==l)throw new Error("Media type is missing for file part");return{type:"file",mediaType:l,filename:e.filename,data:p,providerOptions:e.providerOptions}}}(e,t))).filter((e=>"text"!==e.type||""!==e.text)),providerOptions:e.providerOptions};case"assistant":return"string"==typeof e.content?{role:"assistant",content:[{type:"text",text:e.content}],providerOptions:e.providerOptions}:{role:"assistant",content:e.content.filter((e=>"text"!==e.type||""!==e.text||null!=e.providerOptions)).filter((e=>"tool-approval-request"!==e.type)).map((e=>{const t=e.providerOptions;switch(e.type){case"file":{const{data:o,mediaType:r}=io(e.data);return{type:"file",data:o,filename:e.filename,mediaType:null!=r?r:e.mediaType,providerOptions:t}}case"reasoning":return{type:"reasoning",text:e.text,providerOptions:t};case"text":return{type:"text",text:e.text,providerOptions:t};case"tool-call":return{type:"tool-call",toolCallId:e.toolCallId,toolName:e.toolName,input:e.input,providerExecuted:e.providerExecuted,providerOptions:t};case"tool-result":return{type:"tool-result",toolCallId:e.toolCallId,toolName:e.toolName,output:po(e.output),providerOptions:t}}})),providerOptions:e.providerOptions};case"tool":return{role:"tool",content:e.content.filter((e=>"tool-approval-response"!==e.type||e.providerExecuted)).map((e=>{switch(e.type){case"tool-result":return{type:"tool-result",toolCallId:e.toolCallId,toolName:e.toolName,output:po(e.output),providerOptions:e.providerOptions};case"tool-approval-response":return{type:"tool-approval-response",approvalId:e.approvalId,approved:e.approved,reason:e.reason}}})),providerOptions:e.providerOptions};default:throw new dt({role:o})}}({message:e,downloadedAssets:r})))],l=[];for(const e of a){if("tool"!==e.role){l.push(e);continue}const t=l.at(-1);"tool"===(null==t?void 0:t.role)?t.content.push(...e.content):l.push(e)}const p=new Set;for(const e of l)switch(e.role){case"assistant":for(const t of e.content)"tool-call"!==t.type||t.providerExecuted||p.add(t.toolCallId);break;case"tool":for(const t of e.content)"tool-result"===t.type&&p.delete(t.toolCallId);break;case"user":case"system":for(const e of s)p.delete(e);if(p.size>0)throw new J({toolCallIds:Array.from(p)})}for(const e of s)p.delete(e);if(p.size>0)throw new J({toolCallIds:Array.from(p)});return l.filter((e=>"tool"!==e.role||e.content.length>0))}function po(e){return"content"!==e.type?e:{type:"content",value:e.value.map((e=>"media"!==e.type?e:e.mediaType.startsWith("image/")?{type:"image-data",data:e.data,mediaType:e.mediaType}:{type:"file-data",data:e.data,mediaType:e.mediaType}))}}var uo=o(10292);async function co({toolCallId:e,input:t,output:o,tool:r,errorMode:n}){return"text"===n?{type:"error-text",value:(0,uo.getErrorMessage)(o)}:"json"===n?{type:"error-json",value:ho(o)}:(null==r?void 0:r.toModelOutput)?await r.toModelOutput({toolCallId:e,input:t,output:o}):"string"==typeof o?{type:"text",value:o}:{type:"json",value:ho(o)}}function ho(e){return void 0===e?null:e}function fo({maxOutputTokens:e,temperature:t,topP:o,topK:r,presencePenalty:n,frequencyPenalty:i,seed:s,stopSequences:a}){if(null!=e){if(!Number.isInteger(e))throw new E({parameter:"maxOutputTokens",value:e,message:"maxOutputTokens must be an integer"});if(e<1)throw new E({parameter:"maxOutputTokens",value:e,message:"maxOutputTokens must be >= 1"})}if(null!=t&&"number"!=typeof t)throw new E({parameter:"temperature",value:t,message:"temperature must be a number"});if(null!=o&&"number"!=typeof o)throw new E({parameter:"topP",value:o,message:"topP must be a number"});if(null!=r&&"number"!=typeof r)throw new E({parameter:"topK",value:r,message:"topK must be a number"});if(null!=n&&"number"!=typeof n)throw new E({parameter:"presencePenalty",value:n,message:"presencePenalty must be a number"});if(null!=i&&"number"!=typeof i)throw new E({parameter:"frequencyPenalty",value:i,message:"frequencyPenalty must be a number"});if(null!=s&&!Number.isInteger(s))throw new E({parameter:"seed",value:s,message:"seed must be an integer"});return{maxOutputTokens:e,temperature:t,topP:o,topK:r,presencePenalty:n,frequencyPenalty:i,stopSequences:a,seed:s}}var go=o(94192);async function mo({tools:e,toolChoice:t,activeTools:o}){if(!(null!=(r=e)&&Object.keys(r).length>0))return{tools:void 0,toolChoice:void 0};var r;const n=null!=o?Object.entries(e).filter((([e])=>o.includes(e))):Object.entries(e),i=[];for(const[e,t]of n){const o=t.type;switch(o){case void 0:case"dynamic":case"function":i.push({type:"function",name:e,description:t.description,inputSchema:await(0,go.asSchema)(t.inputSchema).jsonSchema,...null!=t.inputExamples?{inputExamples:t.inputExamples}:{},providerOptions:t.providerOptions,...null!=t.strict?{strict:t.strict}:{}});break;case"provider":i.push({type:"provider",name:e,id:t.id,args:t.args});break;default:throw new Error(`Unsupported tool type: ${o}`)}}return{tools:i,toolChoice:null==t?{type:"auto"}:"string"==typeof t?{type:t}:{type:"tool",toolName:t.toolName}}}var yo=o(10292),vo=o(94192),Co=o(19844),wo=o(19844),Eo=o(19844),_o=o(19844),bo=_o.z.lazy((()=>_o.z.union([_o.z.null(),_o.z.string(),_o.z.number(),_o.z.boolean(),_o.z.record(_o.z.string(),bo.optional()),_o.z.array(bo)]))),Ro=Eo.z.record(Eo.z.string(),Eo.z.record(Eo.z.string(),bo.optional())),So=o(19844),Oo=So.z.object({type:So.z.literal("text"),text:So.z.string(),providerOptions:Ro.optional()}),To=So.z.object({type:So.z.literal("image"),image:So.z.union([no,So.z.instanceof(n)]),mediaType:So.z.string().optional(),providerOptions:Ro.optional()}),Po=So.z.object({type:So.z.literal("file"),data:So.z.union([no,So.z.instanceof(n)]),filename:So.z.string().optional(),mediaType:So.z.string(),providerOptions:Ro.optional()}),Ao=So.z.object({type:So.z.literal("reasoning"),text:So.z.string(),providerOptions:Ro.optional()}),Io=So.z.object({type:So.z.literal("tool-call"),toolCallId:So.z.string(),toolName:So.z.string(),input:So.z.unknown(),providerOptions:Ro.optional(),providerExecuted:So.z.boolean().optional()}),Do=So.z.discriminatedUnion("type",[So.z.object({type:So.z.literal("text"),value:So.z.string(),providerOptions:Ro.optional()}),So.z.object({type:So.z.literal("json"),value:bo,providerOptions:Ro.optional()}),So.z.object({type:So.z.literal("execution-denied"),reason:So.z.string().optional(),providerOptions:Ro.optional()}),So.z.object({type:So.z.literal("error-text"),value:So.z.string(),providerOptions:Ro.optional()}),So.z.object({type:So.z.literal("error-json"),value:bo,providerOptions:Ro.optional()}),So.z.object({type:So.z.literal("content"),value:So.z.array(So.z.union([So.z.object({type:So.z.literal("text"),text:So.z.string(),providerOptions:Ro.optional()}),So.z.object({type:So.z.literal("media"),data:So.z.string(),mediaType:So.z.string()}),So.z.object({type:So.z.literal("file-data"),data:So.z.string(),mediaType:So.z.string(),filename:So.z.string().optional(),providerOptions:Ro.optional()}),So.z.object({type:So.z.literal("file-url"),url:So.z.string(),providerOptions:Ro.optional()}),So.z.object({type:So.z.literal("file-id"),fileId:So.z.union([So.z.string(),So.z.record(So.z.string(),So.z.string())]),providerOptions:Ro.optional()}),So.z.object({type:So.z.literal("image-data"),data:So.z.string(),mediaType:So.z.string(),providerOptions:Ro.optional()}),So.z.object({type:So.z.literal("image-url"),url:So.z.string(),providerOptions:Ro.optional()}),So.z.object({type:So.z.literal("image-file-id"),fileId:So.z.union([So.z.string(),So.z.record(So.z.string(),So.z.string())]),providerOptions:Ro.optional()}),So.z.object({type:So.z.literal("custom"),providerOptions:Ro.optional()})]))})]),No=So.z.object({type:So.z.literal("tool-result"),toolCallId:So.z.string(),toolName:So.z.string(),output:Do,providerOptions:Ro.optional()}),xo=So.z.object({type:So.z.literal("tool-approval-request"),approvalId:So.z.string(),toolCallId:So.z.string()}),Fo=So.z.object({type:So.z.literal("tool-approval-response"),approvalId:So.z.string(),approved:So.z.boolean(),reason:So.z.string().optional()}),Mo=wo.z.object({role:wo.z.literal("system"),content:wo.z.string(),providerOptions:Ro.optional()}),ko=wo.z.object({role:wo.z.literal("user"),content:wo.z.union([wo.z.string(),wo.z.array(wo.z.union([Oo,To,Po]))]),providerOptions:Ro.optional()}),Lo=wo.z.object({role:wo.z.literal("assistant"),content:wo.z.union([wo.z.string(),wo.z.array(wo.z.union([Oo,Po,Ao,Io,No,xo]))]),providerOptions:Ro.optional()}),Go=wo.z.object({role:wo.z.literal("tool"),content:wo.z.array(wo.z.union([No,Fo])),providerOptions:Ro.optional()}),jo=wo.z.union([Mo,ko,Lo,Go]);async function Wo(e){if(null==e.prompt&&null==e.messages)throw new yo.InvalidPromptError({prompt:e,message:"prompt or messages must be defined"});if(null!=e.prompt&&null!=e.messages)throw new yo.InvalidPromptError({prompt:e,message:"prompt and messages cannot be defined at the same time"});if(null!=e.system&&"string"!=typeof e.system&&!ao(e.system).every((e=>"object"==typeof e&&null!==e&&"role"in e&&"system"===e.role)))throw new yo.InvalidPromptError({prompt:e,message:"system must be a string, SystemModelMessage, or array of SystemModelMessage"});let t;if(null!=e.prompt&&"string"==typeof e.prompt)t=[{role:"user",content:e.prompt}];else if(null!=e.prompt&&Array.isArray(e.prompt))t=e.prompt;else{if(null==e.messages)throw new yo.InvalidPromptError({prompt:e,message:"prompt or messages must be defined"});t=e.messages}if(0===t.length)throw new yo.InvalidPromptError({prompt:e,message:"messages must not be empty"});const o=await(0,vo.safeValidateTypes)({value:t,schema:Co.z.array(jo)});if(!o.success)throw new yo.InvalidPromptError({prompt:e,message:"The messages do not match the ModelMessage[] schema.",cause:o.error});return{messages:t,system:e.system}}var Vo=o(10601),Ho=o(10292);function Bo(e){if(!Vo.GatewayAuthenticationError.isInstance(e))return e;const t="https://ai-sdk.dev/unauthenticated-ai-gateway";return"production"===(null==i?void 0:"production")?new Ho.AISDKError({name:"GatewayError",message:`Unauthenticated. Configure AI_GATEWAY_API_KEY or use a provider module. Learn more: ${t}`}):Object.assign(new Error(`Unauthenticated request to AI Gateway.\n\nTo authenticate, set the AI_GATEWAY_API_KEY environment variable with your API key.\n\nAlternatively, you can use a provider module instead of the AI Gateway.\n\nLearn more: ${t}\n\n`),{name:"GatewayAuthenticationError"})}function zo({operationId:e,telemetry:t}){return{"operation.name":`${e}${null!=(null==t?void 0:t.functionId)?` ${t.functionId}`:""}`,"resource.name":null==t?void 0:t.functionId,"ai.operationId":e,"ai.telemetry.functionId":null==t?void 0:t.functionId}}function Uo({model:e,settings:t,telemetry:o,headers:r}){var n;return{"ai.model.provider":e.provider,"ai.model.id":e.modelId,...Object.entries(t).reduce(((e,[t,o])=>{if("timeout"===t){const r=Wt(o);null!=r&&(e[`ai.settings.${t}`]=r)}else e[`ai.settings.${t}`]=o;return e}),{}),...Object.entries(null!=(n=null==o?void 0:o.metadata)?n:{}).reduce(((e,[t,o])=>(e[`ai.telemetry.metadata.${t}`]=o,e)),{}),...Object.entries(null!=r?r:{}).reduce(((e,[t,o])=>(void 0!==o&&(e[`ai.request.headers.${t}`]=o),e)),{})}}var Yo=o(42379),qo={startSpan:()=>$o,startActiveSpan:(e,t,o,r)=>"function"==typeof t?t($o):"function"==typeof o?o($o):"function"==typeof r?r($o):void 0},$o={spanContext:()=>Ko,setAttribute(){return this},setAttributes(){return this},addEvent(){return this},addLink(){return this},addLinks(){return this},setStatus(){return this},updateName(){return this},end(){return this},isRecording:()=>!1,recordException(){return this}},Ko={traceId:"",spanId:"",traceFlags:0};function Zo({isEnabled:e=!1,tracer:t}={}){return e?t||Yo.trace.getTracer("ai"):qo}var Jo=o(42379);async function Qo({name:e,tracer:t,attributes:o,fn:r,endWhenDone:n=!0}){return t.startActiveSpan(e,{attributes:await o},(async e=>{const t=Jo.context.active();try{const o=await Jo.context.with(t,(()=>r(e)));return n&&e.end(),o}catch(t){try{Xo(e,t)}finally{e.end()}throw t}}))}function Xo(e,t){t instanceof Error?(e.recordException({name:t.name,message:t.message,stack:t.stack}),e.setStatus({code:Jo.SpanStatusCode.ERROR,message:t.message})):e.setStatus({code:Jo.SpanStatusCode.ERROR})}async function er({telemetry:e,attributes:t}){if(!0!==(null==e?void 0:e.isEnabled))return{};const o={};for(const[r,n]of Object.entries(t))if(null!=n)if("object"==typeof n&&"input"in n&&"function"==typeof n.input){if(!1===(null==e?void 0:e.recordInputs))continue;const t=await n.input();null!=t&&(o[r]=t)}else if("object"==typeof n&&"output"in n&&"function"==typeof n.output){if(!1===(null==e?void 0:e.recordOutputs))continue;const t=await n.output();null!=t&&(o[r]=t)}else o[r]=n;return o}function tr(e){return JSON.stringify(e.map((e=>({...e,content:"string"==typeof e.content?e.content:e.content.map((e=>{return"file"===e.type?{...e,data:e.data instanceof Uint8Array?(t=e.data,"string"==typeof t?t:t instanceof ArrayBuffer?(0,to.convertUint8ArrayToBase64)(new Uint8Array(t)):(0,to.convertUint8ArrayToBase64)(t)):e.data}:e;var t}))}))))}function or(e){return{inputTokens:e.inputTokens.total,inputTokenDetails:{noCacheTokens:e.inputTokens.noCache,cacheReadTokens:e.inputTokens.cacheRead,cacheWriteTokens:e.inputTokens.cacheWrite},outputTokens:e.outputTokens.total,outputTokenDetails:{textTokens:e.outputTokens.text,reasoningTokens:e.outputTokens.reasoning},totalTokens:nr(e.inputTokens.total,e.outputTokens.total),raw:e.raw,reasoningTokens:e.outputTokens.reasoning,cachedInputTokens:e.inputTokens.cacheRead}}function rr(e,t){var o,r,n,i,s,a,l,p,u,d;return{inputTokens:nr(e.inputTokens,t.inputTokens),inputTokenDetails:{noCacheTokens:nr(null==(o=e.inputTokenDetails)?void 0:o.noCacheTokens,null==(r=t.inputTokenDetails)?void 0:r.noCacheTokens),cacheReadTokens:nr(null==(n=e.inputTokenDetails)?void 0:n.cacheReadTokens,null==(i=t.inputTokenDetails)?void 0:i.cacheReadTokens),cacheWriteTokens:nr(null==(s=e.inputTokenDetails)?void 0:s.cacheWriteTokens,null==(a=t.inputTokenDetails)?void 0:a.cacheWriteTokens)},outputTokens:nr(e.outputTokens,t.outputTokens),outputTokenDetails:{textTokens:nr(null==(l=e.outputTokenDetails)?void 0:l.textTokens,null==(p=t.outputTokenDetails)?void 0:p.textTokens),reasoningTokens:nr(null==(u=e.outputTokenDetails)?void 0:u.reasoningTokens,null==(d=t.outputTokenDetails)?void 0:d.reasoningTokens)},totalTokens:nr(e.totalTokens,t.totalTokens),reasoningTokens:nr(e.reasoningTokens,t.reasoningTokens),cachedInputTokens:nr(e.cachedInputTokens,t.cachedInputTokens)}}function nr(e,t){return null==e&&null==t?void 0:(null!=e?e:0)+(null!=t?t:0)}function ir(e,t){if(void 0===e&&void 0===t)return;if(void 0===e)return t;if(void 0===t)return e;const o={...e};for(const r in t)if(Object.prototype.hasOwnProperty.call(t,r)){const n=t[r];if(void 0===n)continue;const i=r in e?e[r]:void 0,s=!(null===n||"object"!=typeof n||Array.isArray(n)||n instanceof Date||n instanceof RegExp),a=!(null==i||"object"!=typeof i||Array.isArray(i)||i instanceof Date||i instanceof RegExp);o[r]=s&&a?ir(i,n):n}return o}var sr=o(10292),ar=o(94192),lr=({maxRetries:e=2,initialDelayInMs:t=2e3,backoffFactor:o=2,abortSignal:r}={})=>async n=>pr(n,{maxRetries:e,delayInMs:t,backoffFactor:o,abortSignal:r});async function pr(e,{maxRetries:t,delayInMs:o,backoffFactor:r,abortSignal:n},i=[]){try{return await e()}catch(s){if((0,ar.isAbortError)(s))throw s;if(0===t)throw s;const a=(0,ar.getErrorMessage)(s),l=[...i,s],p=l.length;if(p>t)throw new Rt({message:`Failed after ${p} attempts. Last error: ${a}`,reason:"maxRetriesExceeded",errors:l});if(s instanceof Error&&sr.APICallError.isInstance(s)&&!0===s.isRetryable&&p<=t)return await(0,ar.delay)(function({error:e,exponentialBackoffDelay:t}){const o=e.responseHeaders;if(!o)return t;let r;const n=o["retry-after-ms"];if(n){const e=parseFloat(n);Number.isNaN(e)||(r=e)}const i=o["retry-after"];if(i&&void 0===r){const e=parseFloat(i);r=Number.isNaN(e)?Date.parse(i)-Date.now():1e3*e}return null!=r&&!Number.isNaN(r)&&0<=r&&(r<6e4||r<t)?r:t}({error:s,exponentialBackoffDelay:o}),{abortSignal:n}),pr(e,{maxRetries:t,delayInMs:r*o,backoffFactor:r,abortSignal:n},l);if(1===p)throw s;throw new Rt({message:`Failed after ${p} attempts with non-retryable error: '${a}'`,reason:"errorNotRetryable",errors:l})}}function ur({maxRetries:e,abortSignal:t}){if(null!=e){if(!Number.isInteger(e))throw new E({parameter:"maxRetries",value:e,message:"maxRetries must be an integer"});if(e<0)throw new E({parameter:"maxRetries",value:e,message:"maxRetries must be >= 0"})}const o=null!=e?e:2;return{maxRetries:o,retry:lr({maxRetries:o,abortSignal:t})}}function dr({messages:e}){const t=e.at(-1);if("tool"!=(null==t?void 0:t.role))return{approvedToolApprovals:[],deniedToolApprovals:[]};const o={};for(const t of e)if("assistant"===t.role&&"string"!=typeof t.content){const e=t.content;for(const t of e)"tool-call"===t.type&&(o[t.toolCallId]=t)}const r={};for(const t of e)if("assistant"===t.role&&"string"!=typeof t.content){const e=t.content;for(const t of e)"tool-approval-request"===t.type&&(r[t.approvalId]=t)}const n={};for(const e of t.content)"tool-result"===e.type&&(n[e.toolCallId]=e);const i=[],s=[],a=t.content.filter((e=>"tool-approval-response"===e.type));for(const e of a){const t=r[e.approvalId];if(null==t)throw new x({approvalId:e.approvalId});if(null!=n[t.toolCallId])continue;const a=o[t.toolCallId];if(null==a)throw new U({toolCallId:t.toolCallId,approvalId:t.approvalId});const l={approvalRequest:t,approvalResponse:e,toolCall:a};e.approved?i.push(l):s.push(l)}return{approvedToolApprovals:i,deniedToolApprovals:s}}var cr=o(94192);async function hr({toolCall:e,tools:t,tracer:o,telemetry:r,messages:n,abortSignal:i,experimental_context:s,onPreliminaryToolResult:a}){const{toolName:l,toolCallId:p,input:u}=e,d=null==t?void 0:t[l];if(null!=(null==d?void 0:d.execute))return Qo({name:"ai.toolCall",attributes:er({telemetry:r,attributes:{...zo({operationId:"ai.toolCall",telemetry:r}),"ai.toolCall.name":l,"ai.toolCall.id":p,"ai.toolCall.args":{output:()=>JSON.stringify(u)}}}),tracer:o,fn:async t=>{let o;try{const t=(0,cr.executeTool)({execute:d.execute.bind(d),input:u,options:{toolCallId:p,messages:n,abortSignal:i,experimental_context:s}});for await(const r of t)"preliminary"===r.type?null==a||a({...e,type:"tool-result",output:r.output,preliminary:!0}):o=r.output}catch(o){return Xo(t,o),{type:"tool-error",toolCallId:p,toolName:l,input:u,error:o,dynamic:"dynamic"===d.type,...null!=e.providerMetadata?{providerMetadata:e.providerMetadata}:{}}}try{t.setAttributes(await er({telemetry:r,attributes:{"ai.toolCall.result":{output:()=>JSON.stringify(o)}}}))}catch(e){}return{type:"tool-result",toolCallId:p,toolName:l,input:u,output:o,dynamic:"dynamic"===d.type,...null!=e.providerMetadata?{providerMetadata:e.providerMetadata}:{}}}})}function fr(e){const t=e.filter((e=>"reasoning"===e.type));return 0===t.length?void 0:t.map((e=>e.text)).join("\n")}function gr(e){const t=e.filter((e=>"text"===e.type));if(0!==t.length)return t.map((e=>e.text)).join("")}var mr=o(94192),yr=class{constructor({data:e,mediaType:t}){const o=e instanceof Uint8Array;this.base64Data=o?void 0:e,this.uint8ArrayData=o?e:void 0,this.mediaType=t}get base64(){return null==this.base64Data&&(this.base64Data=(0,mr.convertUint8ArrayToBase64)(this.uint8ArrayData)),this.base64Data}get uint8Array(){return null==this.uint8ArrayData&&(this.uint8ArrayData=(0,mr.convertBase64ToUint8Array)(this.base64Data)),this.uint8ArrayData}},vr=class extends yr{constructor(e){super(e),this.type="file"}};async function Cr({tool:e,toolCall:t,messages:o,experimental_context:r}){return null!=e.needsApproval&&("boolean"==typeof e.needsApproval?e.needsApproval:await e.needsApproval(t.input,{toolCallId:t.toolCallId,messages:o,experimental_context:r}))}var wr={};u(wr,{array:()=>Pr,choice:()=>Ar,json:()=>Ir,object:()=>Tr,text:()=>Or});var Er=o(10292),_r=o(94192),br=o(94192);function Rr(e){const t=["ROOT"];let o=-1,r=null;function n(e,n,i){switch(e){case'"':o=n,t.pop(),t.push(i),t.push("INSIDE_STRING");break;case"f":case"t":case"n":o=n,r=n,t.pop(),t.push(i),t.push("INSIDE_LITERAL");break;case"-":t.pop(),t.push(i),t.push("INSIDE_NUMBER");break;case"0":case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":o=n,t.pop(),t.push(i),t.push("INSIDE_NUMBER");break;case"{":o=n,t.pop(),t.push(i),t.push("INSIDE_OBJECT_START");break;case"[":o=n,t.pop(),t.push(i),t.push("INSIDE_ARRAY_START")}}function i(e,r){switch(e){case",":t.pop(),t.push("INSIDE_OBJECT_AFTER_COMMA");break;case"}":o=r,t.pop()}}function s(e,r){switch(e){case",":t.pop(),t.push("INSIDE_ARRAY_AFTER_COMMA");break;case"]":o=r,t.pop()}}for(let a=0;a<e.length;a++){const l=e[a];switch(t[t.length-1]){case"ROOT":n(l,a,"FINISH");break;case"INSIDE_OBJECT_START":switch(l){case'"':t.pop(),t.push("INSIDE_OBJECT_KEY");break;case"}":o=a,t.pop()}break;case"INSIDE_OBJECT_AFTER_COMMA":'"'===l&&(t.pop(),t.push("INSIDE_OBJECT_KEY"));break;case"INSIDE_OBJECT_KEY":'"'===l&&(t.pop(),t.push("INSIDE_OBJECT_AFTER_KEY"));break;case"INSIDE_OBJECT_AFTER_KEY":":"===l&&(t.pop(),t.push("INSIDE_OBJECT_BEFORE_VALUE"));break;case"INSIDE_OBJECT_BEFORE_VALUE":n(l,a,"INSIDE_OBJECT_AFTER_VALUE");break;case"INSIDE_OBJECT_AFTER_VALUE":i(l,a);break;case"INSIDE_STRING":switch(l){case'"':t.pop(),o=a;break;case"\\":t.push("INSIDE_STRING_ESCAPE");break;default:o=a}break;case"INSIDE_ARRAY_START":"]"===l?(o=a,t.pop()):(o=a,n(l,a,"INSIDE_ARRAY_AFTER_VALUE"));break;case"INSIDE_ARRAY_AFTER_VALUE":switch(l){case",":t.pop(),t.push("INSIDE_ARRAY_AFTER_COMMA");break;case"]":o=a,t.pop();break;default:o=a}break;case"INSIDE_ARRAY_AFTER_COMMA":n(l,a,"INSIDE_ARRAY_AFTER_VALUE");break;case"INSIDE_STRING_ESCAPE":t.pop(),o=a;break;case"INSIDE_NUMBER":switch(l){case"0":case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":o=a;break;case"e":case"E":case"-":case".":break;case",":t.pop(),"INSIDE_ARRAY_AFTER_VALUE"===t[t.length-1]&&s(l,a),"INSIDE_OBJECT_AFTER_VALUE"===t[t.length-1]&&i(l,a);break;case"}":t.pop(),"INSIDE_OBJECT_AFTER_VALUE"===t[t.length-1]&&i(l,a);break;case"]":t.pop(),"INSIDE_ARRAY_AFTER_VALUE"===t[t.length-1]&&s(l,a);break;default:t.pop()}break;case"INSIDE_LITERAL":{const n=e.substring(r,a+1);"false".startsWith(n)||"true".startsWith(n)||"null".startsWith(n)?o=a:(t.pop(),"INSIDE_OBJECT_AFTER_VALUE"===t[t.length-1]?i(l,a):"INSIDE_ARRAY_AFTER_VALUE"===t[t.length-1]&&s(l,a));break}}}let a=e.slice(0,o+1);for(let o=t.length-1;o>=0;o--)switch(t[o]){case"INSIDE_STRING":a+='"';break;case"INSIDE_OBJECT_KEY":case"INSIDE_OBJECT_AFTER_KEY":case"INSIDE_OBJECT_AFTER_COMMA":case"INSIDE_OBJECT_START":case"INSIDE_OBJECT_BEFORE_VALUE":case"INSIDE_OBJECT_AFTER_VALUE":a+="}";break;case"INSIDE_ARRAY_START":case"INSIDE_ARRAY_AFTER_COMMA":case"INSIDE_ARRAY_AFTER_VALUE":a+="]";break;case"INSIDE_LITERAL":{const t=e.substring(r,e.length);"true".startsWith(t)?a+="true".slice(t.length):"false".startsWith(t)?a+="false".slice(t.length):"null".startsWith(t)&&(a+="null".slice(t.length))}}return a}async function Sr(e){if(void 0===e)return{value:void 0,state:"undefined-input"};let t=await(0,br.safeParseJSON)({text:e});return t.success?{value:t.value,state:"successful-parse"}:(t=await(0,br.safeParseJSON)({text:Rr(e)}),t.success?{value:t.value,state:"repaired-parse"}:{value:void 0,state:"failed-parse"})}var Or=()=>({name:"text",responseFormat:Promise.resolve({type:"text"}),parseCompleteOutput:async({text:e})=>e,parsePartialOutput:async({text:e})=>({partial:e}),createElementStreamTransform(){}}),Tr=({schema:e,name:t,description:o})=>{const r=(0,_r.asSchema)(e);return{name:"object",responseFormat:(0,_r.resolve)(r.jsonSchema).then((e=>({type:"json",schema:e,...null!=t&&{name:t},...null!=o&&{description:o}}))),async parseCompleteOutput({text:e},t){const o=await(0,_r.safeParseJSON)({text:e});if(!o.success)throw new pe({message:"No object generated: could not parse the response.",cause:o.error,text:e,response:t.response,usage:t.usage,finishReason:t.finishReason});const n=await(0,_r.safeValidateTypes)({value:o.value,schema:r});if(!n.success)throw new pe({message:"No object generated: response did not match schema.",cause:n.error,text:e,response:t.response,usage:t.usage,finishReason:t.finishReason});return n.value},async parsePartialOutput({text:e}){const t=await Sr(e);switch(t.state){case"failed-parse":case"undefined-input":return;case"repaired-parse":case"successful-parse":return{partial:t.value}}},createElementStreamTransform(){}}},Pr=({element:e,name:t,description:o})=>{const r=(0,_r.asSchema)(e);return{name:"array",responseFormat:(0,_r.resolve)(r.jsonSchema).then((e=>{const{$schema:r,...n}=e;return{type:"json",schema:{$schema:"http://json-schema.org/draft-07/schema#",type:"object",properties:{elements:{type:"array",items:n}},required:["elements"],additionalProperties:!1},...null!=t&&{name:t},...null!=o&&{description:o}}})),async parseCompleteOutput({text:e},t){const o=await(0,_r.safeParseJSON)({text:e});if(!o.success)throw new pe({message:"No object generated: could not parse the response.",cause:o.error,text:e,response:t.response,usage:t.usage,finishReason:t.finishReason});const n=o.value;if(null==n||"object"!=typeof n||!("elements"in n)||!Array.isArray(n.elements))throw new pe({message:"No object generated: response did not match schema.",cause:new Er.TypeValidationError({value:n,cause:"response must be an object with an elements array"}),text:e,response:t.response,usage:t.usage,finishReason:t.finishReason});for(const o of n.elements){const n=await(0,_r.safeValidateTypes)({value:o,schema:r});if(!n.success)throw new pe({message:"No object generated: response did not match schema.",cause:n.error,text:e,response:t.response,usage:t.usage,finishReason:t.finishReason})}return n.elements},async parsePartialOutput({text:e}){const t=await Sr(e);switch(t.state){case"failed-parse":case"undefined-input":return;case"repaired-parse":case"successful-parse":{const e=t.value;if(null==e||"object"!=typeof e||!("elements"in e)||!Array.isArray(e.elements))return;const o="repaired-parse"===t.state&&e.elements.length>0?e.elements.slice(0,-1):e.elements,n=[];for(const e of o){const t=await(0,_r.safeValidateTypes)({value:e,schema:r});t.success&&n.push(t.value)}return{partial:n}}}},createElementStreamTransform(){let e=0;return new TransformStream({transform({partialOutput:t},o){if(null!=t)for(;e<t.length;e++)o.enqueue(t[e])}})}}},Ar=({options:e,name:t,description:o})=>({name:"choice",responseFormat:Promise.resolve({type:"json",schema:{$schema:"http://json-schema.org/draft-07/schema#",type:"object",properties:{result:{type:"string",enum:e}},required:["result"],additionalProperties:!1},...null!=t&&{name:t},...null!=o&&{description:o}}),async parseCompleteOutput({text:t},o){const r=await(0,_r.safeParseJSON)({text:t});if(!r.success)throw new pe({message:"No object generated: could not parse the response.",cause:r.error,text:t,response:o.response,usage:o.usage,finishReason:o.finishReason});const n=r.value;if(null==n||"object"!=typeof n||!("result"in n)||"string"!=typeof n.result||!e.includes(n.result))throw new pe({message:"No object generated: response did not match schema.",cause:new Er.TypeValidationError({value:n,cause:"response must be an object that contains a choice value."}),text:t,response:o.response,usage:o.usage,finishReason:o.finishReason});return n.result},async parsePartialOutput({text:t}){const o=await Sr(t);switch(o.state){case"failed-parse":case"undefined-input":return;case"repaired-parse":case"successful-parse":{const t=o.value;if(null==t||"object"!=typeof t||!("result"in t)||"string"!=typeof t.result)return;const r=e.filter((e=>e.startsWith(t.result)));return"successful-parse"===o.state?r.includes(t.result)?{partial:t.result}:void 0:1===r.length?{partial:r[0]}:void 0}}},createElementStreamTransform(){}}),Ir=({name:e,description:t}={})=>({name:"json",responseFormat:Promise.resolve({type:"json",...null!=e&&{name:e},...null!=t&&{description:t}}),async parseCompleteOutput({text:e},t){const o=await(0,_r.safeParseJSON)({text:e});if(!o.success)throw new pe({message:"No object generated: could not parse the response.",cause:o.error,text:e,response:t.response,usage:t.usage,finishReason:t.finishReason});return o.value},async parsePartialOutput({text:e}){const t=await Sr(e);switch(t.state){case"failed-parse":case"undefined-input":return;case"repaired-parse":case"successful-parse":return void 0===t.value?void 0:{partial:t.value}}},createElementStreamTransform(){}}),Dr=o(94192);async function Nr({toolCall:e,tools:t,repairToolCall:o,system:r,messages:n}){var i;try{if(null==t){if(e.providerExecuted&&e.dynamic)return await xr(e);throw new je({toolName:e.toolName})}try{return await Fr({toolCall:e,tools:t})}catch(i){if(null==o||!je.isInstance(i)&&!j.isInstance(i))throw i;let s=null;try{s=await o({toolCall:e,tools:t,inputSchema:async({toolName:e})=>{const{inputSchema:o}=t[e];return await(0,Dr.asSchema)(o).jsonSchema},system:r,messages:n,error:i})}catch(e){throw new Ue({cause:e,originalError:i})}if(null==s)throw i;return await Fr({toolCall:s,tools:t})}}catch(o){const r=await(0,Dr.safeParseJSON)({text:e.input}),n=r.success?r.value:e.input;return{type:"tool-call",toolCallId:e.toolCallId,toolName:e.toolName,input:n,dynamic:!0,invalid:!0,error:o,title:null==(i=null==t?void 0:t[e.toolName])?void 0:i.title,providerExecuted:e.providerExecuted,providerMetadata:e.providerMetadata}}}async function xr(e){const t=""===e.input.trim()?{success:!0,value:{}}:await(0,Dr.safeParseJSON)({text:e.input});if(!1===t.success)throw new j({toolName:e.toolName,toolInput:e.input,cause:t.error});return{type:"tool-call",toolCallId:e.toolCallId,toolName:e.toolName,input:t.value,providerExecuted:!0,dynamic:!0,providerMetadata:e.providerMetadata}}async function Fr({toolCall:e,tools:t}){const o=e.toolName,r=t[o];if(null==r){if(e.providerExecuted&&e.dynamic)return await xr(e);throw new je({toolName:e.toolName,availableTools:Object.keys(t)})}const n=(0,Dr.asSchema)(r.inputSchema),i=""===e.input.trim()?await(0,Dr.safeValidateTypes)({value:{},schema:n}):await(0,Dr.safeParseJSON)({text:e.input,schema:n});if(!1===i.success)throw new j({toolName:o,toolInput:e.input,cause:i.error});return"dynamic"===r.type?{type:"tool-call",toolCallId:e.toolCallId,toolName:e.toolName,input:i.value,providerExecuted:e.providerExecuted,providerMetadata:e.providerMetadata,dynamic:!0,title:r.title}:{type:"tool-call",toolCallId:e.toolCallId,toolName:o,input:i.value,providerExecuted:e.providerExecuted,providerMetadata:e.providerMetadata,title:r.title}}var Mr=class{constructor({content:e,finishReason:t,rawFinishReason:o,usage:r,warnings:n,request:i,response:s,providerMetadata:a}){this.content=e,this.finishReason=t,this.rawFinishReason=o,this.usage=r,this.warnings=n,this.request=i,this.response=s,this.providerMetadata=a}get text(){return this.content.filter((e=>"text"===e.type)).map((e=>e.text)).join("")}get reasoning(){return this.content.filter((e=>"reasoning"===e.type))}get reasoningText(){return 0===this.reasoning.length?void 0:this.reasoning.map((e=>e.text)).join("")}get files(){return this.content.filter((e=>"file"===e.type)).map((e=>e.file))}get sources(){return this.content.filter((e=>"source"===e.type))}get toolCalls(){return this.content.filter((e=>"tool-call"===e.type))}get staticToolCalls(){return this.toolCalls.filter((e=>!0!==e.dynamic))}get dynamicToolCalls(){return this.toolCalls.filter((e=>!0===e.dynamic))}get toolResults(){return this.content.filter((e=>"tool-result"===e.type))}get staticToolResults(){return this.toolResults.filter((e=>!0!==e.dynamic))}get dynamicToolResults(){return this.toolResults.filter((e=>!0===e.dynamic))}};function kr(e){return({steps:t})=>t.length===e}function Lr(e){return({steps:t})=>{var o,r,n;return null!=(n=null==(r=null==(o=t[t.length-1])?void 0:o.toolCalls)?void 0:r.some((t=>t.toolName===e)))&&n}}async function Gr({stopConditions:e,steps:t}){return(await Promise.all(e.map((e=>e({steps:t}))))).some((e=>e))}async function jr({content:e,tools:t}){const o=[],r=[];for(const o of e)if("source"!==o.type&&("tool-result"!==o.type&&"tool-error"!==o.type||o.providerExecuted)&&("text"!==o.type||0!==o.text.length))switch(o.type){case"text":r.push({type:"text",text:o.text,providerOptions:o.providerMetadata});break;case"reasoning":r.push({type:"reasoning",text:o.text,providerOptions:o.providerMetadata});break;case"file":r.push({type:"file",data:o.file.base64,mediaType:o.file.mediaType,providerOptions:o.providerMetadata});break;case"tool-call":r.push({type:"tool-call",toolCallId:o.toolCallId,toolName:o.toolName,input:o.input,providerExecuted:o.providerExecuted,providerOptions:o.providerMetadata});break;case"tool-result":{const e=await co({toolCallId:o.toolCallId,input:o.input,tool:null==t?void 0:t[o.toolName],output:o.output,errorMode:"none"});r.push({type:"tool-result",toolCallId:o.toolCallId,toolName:o.toolName,output:e,providerOptions:o.providerMetadata});break}case"tool-error":{const e=await co({toolCallId:o.toolCallId,input:o.input,tool:null==t?void 0:t[o.toolName],output:o.error,errorMode:"json"});r.push({type:"tool-result",toolCallId:o.toolCallId,toolName:o.toolName,output:e,providerOptions:o.providerMetadata});break}case"tool-approval-request":r.push({type:"tool-approval-request",approvalId:o.approvalId,toolCallId:o.toolCall.toolCallId})}r.length>0&&o.push({role:"assistant",content:r});const n=[];for(const o of e){if("tool-result"!==o.type&&"tool-error"!==o.type||o.providerExecuted)continue;const e=await co({toolCallId:o.toolCallId,input:o.input,tool:null==t?void 0:t[o.toolName],output:"tool-result"===o.type?o.output:o.error,errorMode:"tool-error"===o.type?"text":"none"});n.push({type:"tool-result",toolCallId:o.toolCallId,toolName:o.toolName,output:e,...null!=o.providerMetadata?{providerOptions:o.providerMetadata}:{}})}return n.length>0&&o.push({role:"tool",content:n}),o}function Wr(...e){const t=e.filter((e=>null!=e));if(0===t.length)return;if(1===t.length)return t[0];const o=new AbortController;for(const e of t){if(e.aborted)return o.abort(e.reason),o.signal;e.addEventListener("abort",(()=>{o.abort(e.reason)}),{once:!0})}return o.signal}var Vr=(0,g.createIdGenerator)({prefix:"aitxt",size:24});async function Hr({model:e,tools:t,toolChoice:o,system:r,prompt:n,messages:i,maxRetries:s,abortSignal:a,timeout:l,headers:p,stopWhen:u=kr(1),experimental_output:d,output:c=d,experimental_telemetry:h,providerOptions:f,experimental_activeTools:m,activeTools:y=m,experimental_prepareStep:v,prepareStep:C=v,experimental_repairToolCall:w,experimental_download:E,experimental_context:_,experimental_include:b,_internal:{generateId:R=Vr}={},onStepFinish:S,onFinish:O,...T}){const P=Lt(e),A=ao(u),I=Wt(l),D=Vt(l),N=null!=D?new AbortController:void 0,x=Wr(a,null!=I?AbortSignal.timeout(I):void 0,null==N?void 0:N.signal),{maxRetries:F,retry:M}=ur({maxRetries:s,abortSignal:x}),k=fo(T),L=(0,g.withUserAgentSuffix)(null!=p?p:{},`ai/${Jt}`),G=Uo({model:P,telemetry:h,headers:L,settings:{...k,maxRetries:F}}),j=await Wo({system:r,prompt:n,messages:i}),W=Zo(h);try{return await Qo({name:"ai.generateText",attributes:er({telemetry:h,attributes:{...zo({operationId:"ai.generateText",telemetry:h}),...G,"ai.model.provider":P.provider,"ai.model.id":P.modelId,"ai.prompt":{input:()=>JSON.stringify({system:r,prompt:n,messages:i})}}}),tracer:W,fn:async e=>{var n,i,s,a,l,p,u,d,m,v,I;const F=j.messages,k=[],{approvedToolApprovals:V,deniedToolApprovals:H}=dr({messages:F}),B=V.filter((e=>!e.toolCall.providerExecuted));if(H.length>0||B.length>0){const e=await Br({toolCalls:B.map((e=>e.toolCall)),tools:t,tracer:W,telemetry:h,messages:F,abortSignal:x,experimental_context:_}),o=[];for(const r of e){const e=await co({toolCallId:r.toolCallId,input:r.input,tool:null==t?void 0:t[r.toolName],output:"tool-result"===r.type?r.output:r.error,errorMode:"tool-error"===r.type?"json":"none"});o.push({type:"tool-result",toolCallId:r.toolCallId,toolName:r.toolName,output:e})}for(const e of H)o.push({type:"tool-result",toolCallId:e.toolCall.toolCallId,toolName:e.toolCall.toolName,output:{type:"execution-denied",reason:e.approvalResponse.reason,...e.toolCall.providerExecuted&&{providerOptions:{openai:{approvalId:e.approvalResponse.approvalId}}}}});k.push({role:"tool",content:o})}const z=[...V,...H].filter((e=>e.toolCall.providerExecuted));z.length>0&&k.push({role:"tool",content:z.map((e=>({type:"tool-approval-response",approvalId:e.approvalResponse.approvalId,approved:e.approvalResponse.approved,reason:e.approvalResponse.reason,providerExecuted:!0})))});const U=fo(T);let Y,q=[],$=[];const K=[],Z=new Map;do{const e=null!=D?setTimeout((()=>N.abort()),D):void 0;try{const e=[...F,...k],O=await(null==C?void 0:C({model:P,steps:K,stepNumber:K.length,messages:e,experimental_context:_})),A=Lt(null!=(n=null==O?void 0:O.model)?n:P),D=await lo({prompt:{system:null!=(i=null==O?void 0:O.system)?i:j.system,messages:null!=(s=null==O?void 0:O.messages)?s:e},supportedUrls:await A.supportedUrls,download:E});_=null!=(a=null==O?void 0:O.experimental_context)?a:_;const{toolChoice:N,tools:V}=await mo({tools:t,toolChoice:null!=(l=null==O?void 0:O.toolChoice)?l:o,activeTools:null!=(p=null==O?void 0:O.activeTools)?p:y});Y=await M((()=>{var e;return Qo({name:"ai.generateText.doGenerate",attributes:er({telemetry:h,attributes:{...zo({operationId:"ai.generateText.doGenerate",telemetry:h}),...G,"ai.model.provider":A.provider,"ai.model.id":A.modelId,"ai.prompt.messages":{input:()=>tr(D)},"ai.prompt.tools":{input:()=>null==V?void 0:V.map((e=>JSON.stringify(e)))},"ai.prompt.toolChoice":{input:()=>null!=N?JSON.stringify(N):void 0},"gen_ai.system":A.provider,"gen_ai.request.model":A.modelId,"gen_ai.request.frequency_penalty":T.frequencyPenalty,"gen_ai.request.max_tokens":T.maxOutputTokens,"gen_ai.request.presence_penalty":T.presencePenalty,"gen_ai.request.stop_sequences":T.stopSequences,"gen_ai.request.temperature":null!=(e=T.temperature)?e:void 0,"gen_ai.request.top_k":T.topK,"gen_ai.request.top_p":T.topP}}),tracer:W,fn:async e=>{var t,o,r,n,i,s,a,l;const p=ir(f,null==O?void 0:O.providerOptions),u=await A.doGenerate({...U,tools:V,toolChoice:N,responseFormat:await(null==c?void 0:c.responseFormat),prompt:D,providerOptions:p,abortSignal:x,headers:L}),d={id:null!=(o=null==(t=u.response)?void 0:t.id)?o:R(),timestamp:null!=(n=null==(r=u.response)?void 0:r.timestamp)?n:new Date,modelId:null!=(s=null==(i=u.response)?void 0:i.modelId)?s:A.modelId,headers:null==(a=u.response)?void 0:a.headers,body:null==(l=u.response)?void 0:l.body};return e.setAttributes(await er({telemetry:h,attributes:{"ai.response.finishReason":u.finishReason.unified,"ai.response.text":{output:()=>gr(u.content)},"ai.response.reasoning":{output:()=>fr(u.content)},"ai.response.toolCalls":{output:()=>{const e=Ur(u.content);return null==e?void 0:JSON.stringify(e)}},"ai.response.id":d.id,"ai.response.model":d.modelId,"ai.response.timestamp":d.timestamp.toISOString(),"ai.response.providerMetadata":JSON.stringify(u.providerMetadata),"ai.usage.promptTokens":u.usage.inputTokens.total,"ai.usage.completionTokens":u.usage.outputTokens.total,"gen_ai.response.finish_reasons":[u.finishReason.unified],"gen_ai.response.id":d.id,"gen_ai.response.model":d.modelId,"gen_ai.usage.input_tokens":u.usage.inputTokens.total,"gen_ai.usage.output_tokens":u.usage.outputTokens.total}})),{...u,response:d}}})}));const H=await Promise.all(Y.content.filter((e=>"tool-call"===e.type)).map((o=>Nr({toolCall:o,tools:t,repairToolCall:w,system:r,messages:e})))),B={};for(const o of H){if(o.invalid)continue;const r=null==t?void 0:t[o.toolName];null!=r&&(null!=(null==r?void 0:r.onInputAvailable)&&await r.onInputAvailable({input:o.input,toolCallId:o.toolCallId,messages:e,abortSignal:x,experimental_context:_}),await Cr({tool:r,toolCall:o,messages:e,experimental_context:_})&&(B[o.toolCallId]={type:"tool-approval-request",approvalId:R(),toolCall:o}))}const z=H.filter((e=>e.invalid&&e.dynamic));$=[];for(const e of z)$.push({type:"tool-error",toolCallId:e.toolCallId,toolName:e.toolName,input:e.input,error:(0,g.getErrorMessage)(e.error),dynamic:!0});q=H.filter((e=>!e.providerExecuted)),null!=t&&$.push(...await Br({toolCalls:q.filter((e=>!e.invalid&&null==B[e.toolCallId])),tools:t,tracer:W,telemetry:h,messages:e,abortSignal:x,experimental_context:_}));for(const e of H){if(!e.providerExecuted)continue;const o=null==t?void 0:t[e.toolName];"provider"===(null==o?void 0:o.type)&&o.supportsDeferredResults&&(Y.content.some((t=>"tool-result"===t.type&&t.toolCallId===e.toolCallId))||Z.set(e.toolCallId,{toolName:e.toolName}))}for(const e of Y.content)"tool-result"===e.type&&Z.delete(e.toolCallId);const J=Yr({content:Y.content,toolCalls:H,toolOutputs:$,toolApprovalRequests:Object.values(B),tools:t});k.push(...await jr({content:J,tools:t}));const Q=null==(u=null==b?void 0:b.requestBody)||u?null!=(d=Y.request)?d:{}:{...Y.request,body:void 0},X={...Y.response,messages:structuredClone(k),body:null==(m=null==b?void 0:b.responseBody)||m?null==(v=Y.response)?void 0:v.body:void 0},ee=new Mr({content:J,finishReason:Y.finishReason.unified,rawFinishReason:Y.finishReason.raw,usage:or(Y.usage),warnings:Y.warnings,providerMetadata:Y.providerMetadata,request:Q,response:X});Tt({warnings:null!=(I=Y.warnings)?I:[],provider:A.provider,model:A.modelId}),K.push(ee),await(null==S?void 0:S(ee))}finally{null!=e&&clearTimeout(e)}}while((q.length>0&&$.length===q.length||Z.size>0)&&!await Gr({stopConditions:A,steps:K}));e.setAttributes(await er({telemetry:h,attributes:{"ai.response.finishReason":Y.finishReason.unified,"ai.response.text":{output:()=>gr(Y.content)},"ai.response.reasoning":{output:()=>fr(Y.content)},"ai.response.toolCalls":{output:()=>{const e=Ur(Y.content);return null==e?void 0:JSON.stringify(e)}},"ai.response.providerMetadata":JSON.stringify(Y.providerMetadata),"ai.usage.promptTokens":Y.usage.inputTokens.total,"ai.usage.completionTokens":Y.usage.outputTokens.total}}));const J=K[K.length-1],Q=K.reduce(((e,t)=>rr(e,t.usage)),{inputTokens:void 0,outputTokens:void 0,totalTokens:void 0,reasoningTokens:void 0,cachedInputTokens:void 0});let X;if(await(null==O?void 0:O({finishReason:J.finishReason,rawFinishReason:J.rawFinishReason,usage:J.usage,content:J.content,text:J.text,reasoningText:J.reasoningText,reasoning:J.reasoning,files:J.files,sources:J.sources,toolCalls:J.toolCalls,staticToolCalls:J.staticToolCalls,dynamicToolCalls:J.dynamicToolCalls,toolResults:J.toolResults,staticToolResults:J.staticToolResults,dynamicToolResults:J.dynamicToolResults,request:J.request,response:J.response,warnings:J.warnings,providerMetadata:J.providerMetadata,steps:K,totalUsage:Q,experimental_context:_})),"stop"===J.finishReason){const e=null!=c?c:Or();X=await e.parseCompleteOutput({text:J.text},{response:J.response,usage:J.usage,finishReason:J.finishReason})}return new zr({steps:K,totalUsage:Q,output:X})}})}catch(e){throw Bo(e)}}async function Br({toolCalls:e,tools:t,tracer:o,telemetry:r,messages:n,abortSignal:i,experimental_context:s}){return(await Promise.all(e.map((async e=>hr({toolCall:e,tools:t,tracer:o,telemetry:r,messages:n,abortSignal:i,experimental_context:s}))))).filter((e=>null!=e))}var zr=class{constructor(e){this.steps=e.steps,this._output=e.output,this.totalUsage=e.totalUsage}get finalStep(){return this.steps[this.steps.length-1]}get content(){return this.finalStep.content}get text(){return this.finalStep.text}get files(){return this.finalStep.files}get reasoningText(){return this.finalStep.reasoningText}get reasoning(){return this.finalStep.reasoning}get toolCalls(){return this.finalStep.toolCalls}get staticToolCalls(){return this.finalStep.staticToolCalls}get dynamicToolCalls(){return this.finalStep.dynamicToolCalls}get toolResults(){return this.finalStep.toolResults}get staticToolResults(){return this.finalStep.staticToolResults}get dynamicToolResults(){return this.finalStep.dynamicToolResults}get sources(){return this.finalStep.sources}get finishReason(){return this.finalStep.finishReason}get rawFinishReason(){return this.finalStep.rawFinishReason}get warnings(){return this.finalStep.warnings}get providerMetadata(){return this.finalStep.providerMetadata}get response(){return this.finalStep.response}get request(){return this.finalStep.request}get usage(){return this.finalStep.usage}get experimental_output(){return this.output}get output(){if(null==this._output)throw new ge;return this._output}};function Ur(e){const t=e.filter((e=>"tool-call"===e.type));if(0!==t.length)return t.map((e=>({toolCallId:e.toolCallId,toolName:e.toolName,input:e.input})))}function Yr({content:e,toolCalls:t,toolOutputs:o,toolApprovalRequests:r,tools:n}){const i=[];for(const o of e)switch(o.type){case"text":case"reasoning":case"source":i.push(o);break;case"file":i.push({type:"file",file:new yr(o),...null!=o.providerMetadata?{providerMetadata:o.providerMetadata}:{}});break;case"tool-call":i.push(t.find((e=>e.toolCallId===o.toolCallId)));break;case"tool-result":{const e=t.find((e=>e.toolCallId===o.toolCallId));if(null==e){const e=null==n?void 0:n[o.toolName];if("provider"!==(null==e?void 0:e.type)||!e.supportsDeferredResults)throw new Error(`Tool call ${o.toolCallId} not found.`);o.isError?i.push({type:"tool-error",toolCallId:o.toolCallId,toolName:o.toolName,input:void 0,error:o.result,providerExecuted:!0,dynamic:o.dynamic}):i.push({type:"tool-result",toolCallId:o.toolCallId,toolName:o.toolName,input:void 0,output:o.result,providerExecuted:!0,dynamic:o.dynamic});break}o.isError?i.push({type:"tool-error",toolCallId:o.toolCallId,toolName:o.toolName,input:e.input,error:o.result,providerExecuted:!0,dynamic:e.dynamic}):i.push({type:"tool-result",toolCallId:o.toolCallId,toolName:o.toolName,input:e.input,output:o.result,providerExecuted:!0,dynamic:e.dynamic});break}case"tool-approval-request":{const e=t.find((e=>e.toolCallId===o.toolCallId));if(null==e)throw new U({toolCallId:o.toolCallId,approvalId:o.approvalId});i.push({type:"tool-approval-request",approvalId:o.approvalId,toolCall:e});break}}return[...i,...o,...r]}var qr=o(10292),$r=o(94192);function Kr(e,t){const o=new Headers(null!=e?e:{});for(const[e,r]of Object.entries(t))o.has(e)||o.set(e,r);return o}function Zr({status:e,statusText:t,headers:o,textStream:r}){return new Response(r.pipeThrough(new TextEncoderStream),{status:null!=e?e:200,statusText:t,headers:Kr(o,{"content-type":"text/plain; charset=utf-8"})})}function Jr({response:e,status:t,statusText:o,headers:r,stream:n}){const i=null!=t?t:200;void 0!==o?e.writeHead(i,o,r):e.writeHead(i,r);const s=n.getReader();(async()=>{try{for(;;){const{done:t,value:o}=await s.read();if(t)break;e.write(o)||await new Promise((t=>{e.once("drain",t)}))}}catch(e){throw e}finally{e.end()}})()}function Qr({response:e,status:t,statusText:o,headers:r,textStream:n}){Jr({response:e,status:t,statusText:o,headers:Object.fromEntries(Kr(r,{"content-type":"text/plain; charset=utf-8"}).entries()),stream:n.pipeThrough(new TextEncoderStream)})}var Xr=class extends TransformStream{constructor(){super({transform(e,t){t.enqueue(`data: ${JSON.stringify(e)}\n\n`)},flush(e){e.enqueue("data: [DONE]\n\n")}})}},en={"content-type":"text/event-stream","cache-control":"no-cache",connection:"keep-alive","x-vercel-ai-ui-message-stream":"v1","x-accel-buffering":"no"};function tn({status:e,statusText:t,headers:o,stream:r,consumeSseStream:n}){let i=r.pipeThrough(new Xr);if(n){const[e,t]=i.tee();i=e,n({stream:t})}return new Response(i.pipeThrough(new TextEncoderStream),{status:e,statusText:t,headers:Kr(o,en)})}var on=o(94192),rn=o(19844),nn=o(94192),sn=(0,nn.lazySchema)((()=>(0,nn.zodSchema)(rn.z.union([rn.z.strictObject({type:rn.z.literal("text-start"),id:rn.z.string(),providerMetadata:Ro.optional()}),rn.z.strictObject({type:rn.z.literal("text-delta"),id:rn.z.string(),delta:rn.z.string(),providerMetadata:Ro.optional()}),rn.z.strictObject({type:rn.z.literal("text-end"),id:rn.z.string(),providerMetadata:Ro.optional()}),rn.z.strictObject({type:rn.z.literal("error"),errorText:rn.z.string()}),rn.z.strictObject({type:rn.z.literal("tool-input-start"),toolCallId:rn.z.string(),toolName:rn.z.string(),providerExecuted:rn.z.boolean().optional(),providerMetadata:Ro.optional(),dynamic:rn.z.boolean().optional(),title:rn.z.string().optional()}),rn.z.strictObject({type:rn.z.literal("tool-input-delta"),toolCallId:rn.z.string(),inputTextDelta:rn.z.string()}),rn.z.strictObject({type:rn.z.literal("tool-input-available"),toolCallId:rn.z.string(),toolName:rn.z.string(),input:rn.z.unknown(),providerExecuted:rn.z.boolean().optional(),providerMetadata:Ro.optional(),dynamic:rn.z.boolean().optional(),title:rn.z.string().optional()}),rn.z.strictObject({type:rn.z.literal("tool-input-error"),toolCallId:rn.z.string(),toolName:rn.z.string(),input:rn.z.unknown(),providerExecuted:rn.z.boolean().optional(),providerMetadata:Ro.optional(),dynamic:rn.z.boolean().optional(),errorText:rn.z.string(),title:rn.z.string().optional()}),rn.z.strictObject({type:rn.z.literal("tool-approval-request"),approvalId:rn.z.string(),toolCallId:rn.z.string()}),rn.z.strictObject({type:rn.z.literal("tool-output-available"),toolCallId:rn.z.string(),output:rn.z.unknown(),providerExecuted:rn.z.boolean().optional(),dynamic:rn.z.boolean().optional(),preliminary:rn.z.boolean().optional()}),rn.z.strictObject({type:rn.z.literal("tool-output-error"),toolCallId:rn.z.string(),errorText:rn.z.string(),providerExecuted:rn.z.boolean().optional(),dynamic:rn.z.boolean().optional()}),rn.z.strictObject({type:rn.z.literal("tool-output-denied"),toolCallId:rn.z.string()}),rn.z.strictObject({type:rn.z.literal("reasoning-start"),id:rn.z.string(),providerMetadata:Ro.optional()}),rn.z.strictObject({type:rn.z.literal("reasoning-delta"),id:rn.z.string(),delta:rn.z.string(),providerMetadata:Ro.optional()}),rn.z.strictObject({type:rn.z.literal("reasoning-end"),id:rn.z.string(),providerMetadata:Ro.optional()}),rn.z.strictObject({type:rn.z.literal("source-url"),sourceId:rn.z.string(),url:rn.z.string(),title:rn.z.string().optional(),providerMetadata:Ro.optional()}),rn.z.strictObject({type:rn.z.literal("source-document"),sourceId:rn.z.string(),mediaType:rn.z.string(),title:rn.z.string(),filename:rn.z.string().optional(),providerMetadata:Ro.optional()}),rn.z.strictObject({type:rn.z.literal("file"),url:rn.z.string(),mediaType:rn.z.string(),providerMetadata:Ro.optional()}),rn.z.strictObject({type:rn.z.custom((e=>"string"==typeof e&&e.startsWith("data-")),{message:'Type must start with "data-"'}),id:rn.z.string().optional(),data:rn.z.unknown(),transient:rn.z.boolean().optional()}),rn.z.strictObject({type:rn.z.literal("start-step")}),rn.z.strictObject({type:rn.z.literal("finish-step")}),rn.z.strictObject({type:rn.z.literal("start"),messageId:rn.z.string().optional(),messageMetadata:rn.z.unknown().optional()}),rn.z.strictObject({type:rn.z.literal("finish"),finishReason:rn.z.enum(["stop","length","content-filter","tool-calls","error","other"]).optional(),messageMetadata:rn.z.unknown().optional()}),rn.z.strictObject({type:rn.z.literal("abort"),reason:rn.z.string().optional()}),rn.z.strictObject({type:rn.z.literal("message-metadata"),messageMetadata:rn.z.unknown()})]))));function an(e){return e.type.startsWith("data-")}function ln(e){return"text"===e.type}function pn(e){return"file"===e.type}function un(e){return"reasoning"===e.type}function dn(e){return e.type.startsWith("tool-")}function cn(e){return"dynamic-tool"===e.type}function hn(e){return dn(e)||cn(e)}var fn=hn;function gn(e){return e.type.split("-").slice(1).join("-")}function mn(e){return cn(e)?e.toolName:gn(e)}var yn=mn;function vn({lastMessage:e,messageId:t}){return{message:"assistant"===(null==e?void 0:e.role)?e:{id:t,metadata:void 0,role:"assistant",parts:[]},activeTextParts:{},activeReasoningParts:{},partialToolCalls:{}}}function Cn({stream:e,messageMetadataSchema:t,dataPartSchemas:o,runUpdateMessageJob:r,onError:n,onToolCall:i,onData:s}){return e.pipeThrough(new TransformStream({async transform(e,a){await r((async({state:r,write:l})=>{var p,u,d,c;function h(e){const t=r.message.parts.filter(hn).find((t=>t.toolCallId===e));if(null==t)throw new Xe({chunkType:"tool-invocation",chunkId:e,message:`No tool invocation found for tool call ID "${e}".`});return t}function f(e){var t;const o=r.message.parts.find((t=>dn(t)&&t.toolCallId===e.toolCallId)),n=e,i=o;null!=o?(o.state=e.state,i.input=n.input,i.output=n.output,i.errorText=n.errorText,i.rawInput=n.rawInput,i.preliminary=n.preliminary,void 0!==e.title&&(i.title=e.title),i.providerExecuted=null!=(t=n.providerExecuted)?t:o.providerExecuted,null!=n.providerMetadata&&(o.callProviderMetadata=n.providerMetadata)):r.message.parts.push({type:`tool-${e.toolName}`,toolCallId:e.toolCallId,state:e.state,title:e.title,input:n.input,output:n.output,rawInput:n.rawInput,errorText:n.errorText,providerExecuted:n.providerExecuted,preliminary:n.preliminary,...null!=n.providerMetadata?{callProviderMetadata:n.providerMetadata}:{}})}function g(e){var t,o;const n=r.message.parts.find((t=>"dynamic-tool"===t.type&&t.toolCallId===e.toolCallId)),i=e,s=n;null!=n?(n.state=e.state,s.toolName=e.toolName,s.input=i.input,s.output=i.output,s.errorText=i.errorText,s.rawInput=null!=(t=i.rawInput)?t:s.rawInput,s.preliminary=i.preliminary,void 0!==e.title&&(s.title=e.title),s.providerExecuted=null!=(o=i.providerExecuted)?o:n.providerExecuted,null!=i.providerMetadata&&(n.callProviderMetadata=i.providerMetadata)):r.message.parts.push({type:"dynamic-tool",toolName:e.toolName,toolCallId:e.toolCallId,state:e.state,input:i.input,output:i.output,errorText:i.errorText,preliminary:i.preliminary,providerExecuted:i.providerExecuted,title:e.title,...null!=i.providerMetadata?{callProviderMetadata:i.providerMetadata}:{}})}async function m(e){if(null!=e){const o=null!=r.message.metadata?ir(r.message.metadata,e):e;null!=t&&await(0,on.validateTypes)({value:o,schema:t,context:{field:"message.metadata",entityId:r.message.id}}),r.message.metadata=o}}switch(e.type){case"text-start":{const t={type:"text",text:"",providerMetadata:e.providerMetadata,state:"streaming"};r.activeTextParts[e.id]=t,r.message.parts.push(t),l();break}case"text-delta":{const t=r.activeTextParts[e.id];if(null==t)throw new Xe({chunkType:"text-delta",chunkId:e.id,message:`Received text-delta for missing text part with ID "${e.id}". Ensure a "text-start" chunk is sent before any "text-delta" chunks.`});t.text+=e.delta,t.providerMetadata=null!=(p=e.providerMetadata)?p:t.providerMetadata,l();break}case"text-end":{const t=r.activeTextParts[e.id];if(null==t)throw new Xe({chunkType:"text-end",chunkId:e.id,message:`Received text-end for missing text part with ID "${e.id}". Ensure a "text-start" chunk is sent before any "text-end" chunks.`});t.state="done",t.providerMetadata=null!=(u=e.providerMetadata)?u:t.providerMetadata,delete r.activeTextParts[e.id],l();break}case"reasoning-start":{const t={type:"reasoning",text:"",providerMetadata:e.providerMetadata,state:"streaming"};r.activeReasoningParts[e.id]=t,r.message.parts.push(t),l();break}case"reasoning-delta":{const t=r.activeReasoningParts[e.id];if(null==t)throw new Xe({chunkType:"reasoning-delta",chunkId:e.id,message:`Received reasoning-delta for missing reasoning part with ID "${e.id}". Ensure a "reasoning-start" chunk is sent before any "reasoning-delta" chunks.`});t.text+=e.delta,t.providerMetadata=null!=(d=e.providerMetadata)?d:t.providerMetadata,l();break}case"reasoning-end":{const t=r.activeReasoningParts[e.id];if(null==t)throw new Xe({chunkType:"reasoning-end",chunkId:e.id,message:`Received reasoning-end for missing reasoning part with ID "${e.id}". Ensure a "reasoning-start" chunk is sent before any "reasoning-end" chunks.`});t.providerMetadata=null!=(c=e.providerMetadata)?c:t.providerMetadata,t.state="done",delete r.activeReasoningParts[e.id],l();break}case"file":r.message.parts.push({type:"file",mediaType:e.mediaType,url:e.url}),l();break;case"source-url":r.message.parts.push({type:"source-url",sourceId:e.sourceId,url:e.url,title:e.title,providerMetadata:e.providerMetadata}),l();break;case"source-document":r.message.parts.push({type:"source-document",sourceId:e.sourceId,mediaType:e.mediaType,title:e.title,filename:e.filename,providerMetadata:e.providerMetadata}),l();break;case"tool-input-start":{const t=r.message.parts.filter(dn);r.partialToolCalls[e.toolCallId]={text:"",toolName:e.toolName,index:t.length,dynamic:e.dynamic,title:e.title},e.dynamic?g({toolCallId:e.toolCallId,toolName:e.toolName,state:"input-streaming",input:void 0,providerExecuted:e.providerExecuted,title:e.title,providerMetadata:e.providerMetadata}):f({toolCallId:e.toolCallId,toolName:e.toolName,state:"input-streaming",input:void 0,providerExecuted:e.providerExecuted,title:e.title,providerMetadata:e.providerMetadata}),l();break}case"tool-input-delta":{const t=r.partialToolCalls[e.toolCallId];if(null==t)throw new Xe({chunkType:"tool-input-delta",chunkId:e.toolCallId,message:`Received tool-input-delta for missing tool call with ID "${e.toolCallId}". Ensure a "tool-input-start" chunk is sent before any "tool-input-delta" chunks.`});t.text+=e.inputTextDelta;const{value:o}=await Sr(t.text);t.dynamic?g({toolCallId:e.toolCallId,toolName:t.toolName,state:"input-streaming",input:o,title:t.title}):f({toolCallId:e.toolCallId,toolName:t.toolName,state:"input-streaming",input:o,title:t.title}),l();break}case"tool-input-available":e.dynamic?g({toolCallId:e.toolCallId,toolName:e.toolName,state:"input-available",input:e.input,providerExecuted:e.providerExecuted,providerMetadata:e.providerMetadata,title:e.title}):f({toolCallId:e.toolCallId,toolName:e.toolName,state:"input-available",input:e.input,providerExecuted:e.providerExecuted,providerMetadata:e.providerMetadata,title:e.title}),l(),i&&!e.providerExecuted&&await i({toolCall:e});break;case"tool-input-error":e.dynamic?g({toolCallId:e.toolCallId,toolName:e.toolName,state:"output-error",input:e.input,errorText:e.errorText,providerExecuted:e.providerExecuted,providerMetadata:e.providerMetadata}):f({toolCallId:e.toolCallId,toolName:e.toolName,state:"output-error",input:void 0,rawInput:e.input,errorText:e.errorText,providerExecuted:e.providerExecuted,providerMetadata:e.providerMetadata}),l();break;case"tool-approval-request":{const t=h(e.toolCallId);t.state="approval-requested",t.approval={id:e.approvalId},l();break}case"tool-output-denied":h(e.toolCallId).state="output-denied",l();break;case"tool-output-available":{const t=h(e.toolCallId);"dynamic-tool"===t.type?g({toolCallId:e.toolCallId,toolName:t.toolName,state:"output-available",input:t.input,output:e.output,preliminary:e.preliminary,providerExecuted:e.providerExecuted,title:t.title}):f({toolCallId:e.toolCallId,toolName:gn(t),state:"output-available",input:t.input,output:e.output,providerExecuted:e.providerExecuted,preliminary:e.preliminary,title:t.title}),l();break}case"tool-output-error":{const t=h(e.toolCallId);"dynamic-tool"===t.type?g({toolCallId:e.toolCallId,toolName:t.toolName,state:"output-error",input:t.input,errorText:e.errorText,providerExecuted:e.providerExecuted,title:t.title}):f({toolCallId:e.toolCallId,toolName:gn(t),state:"output-error",input:t.input,rawInput:t.rawInput,errorText:e.errorText,providerExecuted:e.providerExecuted,title:t.title}),l();break}case"start-step":r.message.parts.push({type:"step-start"});break;case"finish-step":r.activeTextParts={},r.activeReasoningParts={};break;case"start":null!=e.messageId&&(r.message.id=e.messageId),await m(e.messageMetadata),null==e.messageId&&null==e.messageMetadata||l();break;case"finish":null!=e.finishReason&&(r.finishReason=e.finishReason),await m(e.messageMetadata),null!=e.messageMetadata&&l();break;case"message-metadata":await m(e.messageMetadata),null!=e.messageMetadata&&l();break;case"error":null==n||n(new Error(e.errorText));break;default:if(function(e){return e.type.startsWith("data-")}(e)){if(null!=(null==o?void 0:o[e.type])){const t=r.message.parts.findIndex((t=>"id"in t&&"data"in t&&t.id===e.id&&t.type===e.type)),n=t>=0?t:r.message.parts.length;await(0,on.validateTypes)({value:e.data,schema:o[e.type],context:{field:`message.parts[${n}].data`,entityName:e.type,entityId:e.id}})}const t=e;if(t.transient){null==s||s(t);break}const n=null!=t.id?r.message.parts.find((e=>t.type===e.type&&t.id===e.id)):void 0;null!=n?n.data=t.data:r.message.parts.push(t),null==s||s(t),l()}}a.enqueue(e)}))}}))}function wn({messageId:e,originalMessages:t=[],onStepFinish:o,onFinish:r,onError:n,stream:i}){let s=null==t?void 0:t[t.length-1];"assistant"!==(null==s?void 0:s.role)?s=void 0:e=s.id;let a=!1;const l=i.pipeThrough(new TransformStream({transform(t,o){if("start"===t.type){const o=t;null==o.messageId&&null!=e&&(o.messageId=e)}"abort"===t.type&&(a=!0),o.enqueue(t)}}));if(null==r&&null==o)return l;const p=vn({lastMessage:s?structuredClone(s):void 0,messageId:null!=e?e:""});let u=!1;const d=async()=>{if(u||!r)return;u=!0;const e=p.message.id===(null==s?void 0:s.id);await r({isAborted:a,isContinuation:e,responseMessage:p.message,messages:[...e?t.slice(0,-1):t,p.message],finishReason:p.finishReason})};return Cn({stream:l,runUpdateMessageJob:async e=>{await e({state:p,write:()=>{}})},onError:n}).pipeThrough(new TransformStream({async transform(e,r){"finish-step"===e.type&&await(async()=>{if(!o)return;const e=p.message.id===(null==s?void 0:s.id);try{await o({isContinuation:e,responseMessage:structuredClone(p.message),messages:[...e?t.slice(0,-1):t,structuredClone(p.message)]})}catch(e){n(e)}})(),r.enqueue(e)},async cancel(){await d()},async flush(){await d()}}))}function En({response:e,status:t,statusText:o,headers:r,stream:n,consumeSseStream:i}){let s=n.pipeThrough(new Xr);if(i){const[e,t]=s.tee();s=e,i({stream:t})}Jr({response:e,status:t,statusText:o,headers:Object.fromEntries(Kr(r,en).entries()),stream:s.pipeThrough(new TextEncoderStream)})}function _n(e){const t=e.pipeThrough(new TransformStream);return t[Symbol.asyncIterator]=function(){const e=this.getReader();let t=!1;async function o(o){var r;if(!t){t=!0;try{o&&await(null==(r=e.cancel)?void 0:r.call(e))}finally{try{e.releaseLock()}catch(e){}}}}return{async next(){if(t)return{done:!0,value:void 0};const{done:r,value:n}=await e.read();return r?(await o(!0),{done:!0,value:void 0}):{done:!1,value:n}},return:async()=>(await o(!0),{done:!0,value:void 0}),async throw(e){throw await o(!0),e}}},t}async function bn({stream:e,onError:t}){const o=e.getReader();try{for(;;){const{done:e}=await o.read();if(e)break}}catch(e){null==t||t(e)}finally{o.releaseLock()}}function Rn(){let e,t;return{promise:new Promise(((o,r)=>{e=o,t=r})),resolve:e,reject:t}}function Sn(){let e=[],t=null,o=!1,r=Rn();const n=()=>{o=!0,r.resolve(),e.forEach((e=>e.cancel())),e=[],null==t||t.close()},i=async()=>{if(o&&0===e.length)null==t||t.close();else{if(0===e.length)return r=Rn(),await r.promise,i();try{const{value:r,done:n}=await e[0].read();n?(e.shift(),0===e.length&&o?null==t||t.close():await i()):null==t||t.enqueue(r)}catch(o){null==t||t.error(o),e.shift(),n()}}};return{stream:new ReadableStream({start(e){t=e},pull:i,async cancel(){for(const t of e)await t.cancel();e=[],o=!0}}),addStream:t=>{if(o)throw new Error("Cannot add inner stream: outer stream is closed");e.push(t.getReader()),r.resolve()},close:()=>{o=!0,r.resolve(),0===e.length&&(null==t||t.close())},terminate:n}}function On(){var e,t;return null!=(t=null==(e=null==globalThis?void 0:globalThis.performance)?void 0:e.now())?t:Date.now()}var Tn=o(94192),Pn=(0,$r.createIdGenerator)({prefix:"aitxt",size:24});function An({model:e,tools:t,toolChoice:o,system:r,prompt:n,messages:i,maxRetries:s,abortSignal:a,timeout:l,headers:p,stopWhen:u=kr(1),experimental_output:d,output:c=d,experimental_telemetry:h,prepareStep:f,providerOptions:g,experimental_activeTools:m,activeTools:y=m,experimental_repairToolCall:v,experimental_transform:C,experimental_download:w,includeRawChunks:E=!1,onChunk:_,onError:b=({error:e})=>{console.error(e)},onFinish:R,onAbort:S,onStepFinish:O,experimental_context:T,experimental_include:P,_internal:{now:A=On,generateId:I=Pn}={},...D}){const N=Wt(l),x=Vt(l),F=function(e){if(null!=e&&"number"!=typeof e)return e.chunkMs}(l),M=null!=x?new AbortController:void 0,k=null!=F?new AbortController:void 0;return new In({model:Lt(e),telemetry:h,headers:p,settings:D,maxRetries:s,abortSignal:Wr(a,null!=N?AbortSignal.timeout(N):void 0,null==M?void 0:M.signal,null==k?void 0:k.signal),stepTimeoutMs:x,stepAbortController:M,chunkTimeoutMs:F,chunkAbortController:k,system:r,prompt:n,messages:i,tools:t,toolChoice:o,transforms:ao(C),activeTools:y,repairToolCall:v,stopConditions:ao(u),output:c,providerOptions:g,prepareStep:f,includeRawChunks:E,onChunk:_,onError:b,onFinish:R,onAbort:S,onStepFinish:O,now:A,generateId:I,experimental_context:T,download:w,include:P})}var In=class{constructor({model:e,telemetry:t,headers:o,settings:r,maxRetries:n,abortSignal:i,stepTimeoutMs:s,stepAbortController:a,chunkTimeoutMs:l,chunkAbortController:p,system:u,prompt:d,messages:c,tools:h,toolChoice:f,transforms:g,activeTools:m,repairToolCall:y,stopConditions:v,output:C,providerOptions:w,prepareStep:E,includeRawChunks:_,now:b,generateId:R,onChunk:S,onError:O,onFinish:T,onAbort:P,onStepFinish:A,experimental_context:I,download:D,include:N}){let x;this._totalUsage=new $r.DelayedPromise,this._finishReason=new $r.DelayedPromise,this._rawFinishReason=new $r.DelayedPromise,this._steps=new $r.DelayedPromise,this.outputSpecification=C,this.includeRawChunks=_,this.tools=h;let F=[];const M=[];let k,L,G,j={},W=[];const V=[],H=new Map;let B,z={},Y={};const q=new TransformStream({async transform(t,o){var r,n,i,s;o.enqueue(t);const{part:a}=t;if("text-delta"!==a.type&&"reasoning-delta"!==a.type&&"source"!==a.type&&"tool-call"!==a.type&&"tool-result"!==a.type&&"tool-input-start"!==a.type&&"tool-input-delta"!==a.type&&"raw"!==a.type||await(null==S?void 0:S({chunk:a})),"error"===a.type&&await O({error:Bo(a.error)}),"text-start"===a.type&&(z[a.id]={type:"text",text:"",providerMetadata:a.providerMetadata},F.push(z[a.id])),"text-delta"===a.type){const e=z[a.id];if(null==e)return void o.enqueue({part:{type:"error",error:`text part ${a.id} not found`},partialOutput:void 0});e.text+=a.text,e.providerMetadata=null!=(r=a.providerMetadata)?r:e.providerMetadata}if("text-end"===a.type){const e=z[a.id];if(null==e)return void o.enqueue({part:{type:"error",error:`text part ${a.id} not found`},partialOutput:void 0});e.providerMetadata=null!=(n=a.providerMetadata)?n:e.providerMetadata,delete z[a.id]}if("reasoning-start"===a.type&&(Y[a.id]={type:"reasoning",text:"",providerMetadata:a.providerMetadata},F.push(Y[a.id])),"reasoning-delta"===a.type){const e=Y[a.id];if(null==e)return void o.enqueue({part:{type:"error",error:`reasoning part ${a.id} not found`},partialOutput:void 0});e.text+=a.text,e.providerMetadata=null!=(i=a.providerMetadata)?i:e.providerMetadata}if("reasoning-end"===a.type){const e=Y[a.id];if(null==e)return void o.enqueue({part:{type:"error",error:`reasoning part ${a.id} not found`},partialOutput:void 0});e.providerMetadata=null!=(s=a.providerMetadata)?s:e.providerMetadata,delete Y[a.id]}if("file"===a.type&&F.push({type:"file",file:a.file}),"source"===a.type&&F.push(a),"tool-call"===a.type&&F.push(a),"tool-result"!==a.type||a.preliminary||F.push(a),"tool-approval-request"===a.type&&F.push(a),"tool-error"===a.type&&F.push(a),"start-step"===a.type&&(F=[],Y={},z={},j=a.request,W=a.warnings),"finish-step"===a.type){const t=await jr({content:F,tools:h}),o=new Mr({content:F,finishReason:a.finishReason,rawFinishReason:a.rawFinishReason,usage:a.usage,warnings:W,request:j,response:{...a.response,messages:[...M,...t]},providerMetadata:a.providerMetadata});await(null==A?void 0:A(o)),Tt({warnings:W,provider:e.provider,model:e.modelId}),V.push(o),M.push(...t),x.resolve()}"finish"===a.type&&(G=a.totalUsage,k=a.finishReason,L=a.rawFinishReason)},async flush(e){try{if(0===V.length){const e=(null==i?void 0:i.aborted)?i.reason:new ge({message:"No output generated. Check the stream for errors."});return oe._finishReason.reject(e),oe._rawFinishReason.reject(e),oe._totalUsage.reject(e),void oe._steps.reject(e)}const e=null!=k?k:"other",o=null!=G?G:{inputTokens:void 0,inputTokenDetails:{noCacheTokens:void 0,cacheReadTokens:void 0,cacheWriteTokens:void 0},outputTokens:void 0,outputTokenDetails:{textTokens:void 0,reasoningTokens:void 0},totalTokens:void 0,raw:void 0};oe._finishReason.resolve(e),oe._rawFinishReason.resolve(L),oe._totalUsage.resolve(o),oe._steps.resolve(V);const r=V[V.length-1];await(null==T?void 0:T({finishReason:r.finishReason,rawFinishReason:r.rawFinishReason,totalUsage:o,usage:r.usage,content:r.content,text:r.text,reasoningText:r.reasoningText,reasoning:r.reasoning,files:r.files,sources:r.sources,toolCalls:r.toolCalls,staticToolCalls:r.staticToolCalls,dynamicToolCalls:r.dynamicToolCalls,toolResults:r.toolResults,staticToolResults:r.staticToolResults,dynamicToolResults:r.dynamicToolResults,request:r.request,response:r.response,warnings:r.warnings,providerMetadata:r.providerMetadata,steps:V,experimental_context:I})),B.setAttributes(await er({telemetry:t,attributes:{"ai.response.finishReason":e,"ai.response.text":{output:()=>r.text},"ai.response.reasoning":{output:()=>r.reasoningText},"ai.response.toolCalls":{output:()=>{var e;return(null==(e=r.toolCalls)?void 0:e.length)?JSON.stringify(r.toolCalls):void 0}},"ai.response.providerMetadata":JSON.stringify(r.providerMetadata),"ai.usage.inputTokens":o.inputTokens,"ai.usage.outputTokens":o.outputTokens,"ai.usage.totalTokens":o.totalTokens,"ai.usage.reasoningTokens":o.reasoningTokens,"ai.usage.cachedInputTokens":o.cachedInputTokens}}))}catch(t){e.error(t)}finally{B.end()}}}),$=Sn();this.addStream=$.addStream,this.closeStream=$.close;const K=$.stream.getReader();let Z=new ReadableStream({async start(e){e.enqueue({type:"start"})},async pull(e){function t(){null==P||P({steps:V}),e.enqueue({type:"abort",...void 0!==(null==i?void 0:i.reason)?{reason:(0,qr.getErrorMessage)(i.reason)}:{}}),e.close()}try{const{done:o,value:r}=await K.read();if(o)return void e.close();if(null==i?void 0:i.aborted)return void t();e.enqueue(r)}catch(o){(0,$r.isAbortError)(o)&&(null==i?void 0:i.aborted)?t():e.error(o)}},cancel:e=>$.stream.cancel(e)});for(const e of g)Z=Z.pipeThrough(e({tools:h,stopStream(){$.terminate()}}));this.baseStream=Z.pipeThrough(function(e){let t,o,r="",n="",i="";function s({controller:e,partialOutput:r}){e.enqueue({part:{type:"text-delta",id:t,text:n,providerMetadata:o},partialOutput:r}),n=""}return new TransformStream({async transform(a,l){var p;if("finish-step"===a.type&&n.length>0&&s({controller:l}),"text-delta"!==a.type&&"text-start"!==a.type&&"text-end"!==a.type)return void l.enqueue({part:a,partialOutput:void 0});if(null==t)t=a.id;else if(a.id!==t)return void l.enqueue({part:a,partialOutput:void 0});if("text-start"===a.type)return void l.enqueue({part:a,partialOutput:void 0});if("text-end"===a.type)return n.length>0&&s({controller:l}),void l.enqueue({part:a,partialOutput:void 0});r+=a.text,n+=a.text,o=null!=(p=a.providerMetadata)?p:o;const u=await e.parsePartialOutput({text:r});if(void 0!==u){const e=JSON.stringify(u.partial);e!==i&&(s({controller:l,partialOutput:u.partial}),i=e)}}})}(null!=C?C:Or())).pipeThrough(q);const{maxRetries:J,retry:Q}=ur({maxRetries:n,abortSignal:i}),X=Zo(t),ee=fo(r),te=Uo({model:e,telemetry:t,headers:o,settings:{...ee,maxRetries:J}}),oe=this;Qo({name:"ai.streamText",attributes:er({telemetry:t,attributes:{...zo({operationId:"ai.streamText",telemetry:t}),...te,"ai.prompt":{input:()=>JSON.stringify({system:u,prompt:d,messages:c})}}}),tracer:X,endWhenDone:!1,fn:async r=>{B=r;const n=await Wo({system:u,prompt:d,messages:c}),g=n.messages,_=[],{approvedToolApprovals:S,deniedToolApprovals:O}=dr({messages:g});if(O.length>0||S.length>0){const e=[...S,...O].filter((e=>e.toolCall.providerExecuted)),o=S.filter((e=>!e.toolCall.providerExecuted)),r=O.filter((e=>!e.toolCall.providerExecuted)),n=O.filter((e=>e.toolCall.providerExecuted));let s;const a=new ReadableStream({start(e){s=e}});oe.addStream(a);try{for(const e of[...r,...n])null==s||s.enqueue({type:"tool-output-denied",toolCallId:e.toolCall.toolCallId,toolName:e.toolCall.toolName});const a=[];if(await Promise.all(o.map((async e=>{const o=await hr({toolCall:e.toolCall,tools:h,tracer:X,telemetry:t,messages:g,abortSignal:i,experimental_context:I,onPreliminaryToolResult:e=>{null==s||s.enqueue(e)}});null!=o&&(null==s||s.enqueue(o),a.push(o))}))),e.length>0&&_.push({role:"tool",content:e.map((e=>({type:"tool-approval-response",approvalId:e.approvalResponse.approvalId,approved:e.approvalResponse.approved,reason:e.approvalResponse.reason,providerExecuted:!0})))}),a.length>0||r.length>0){const e=[];for(const t of a)e.push({type:"tool-result",toolCallId:t.toolCallId,toolName:t.toolName,output:await co({toolCallId:t.toolCallId,input:t.input,tool:null==h?void 0:h[t.toolName],output:"tool-result"===t.type?t.output:t.error,errorMode:"tool-error"===t.type?"json":"none"})});for(const t of r)e.push({type:"tool-result",toolCallId:t.toolCall.toolCallId,toolName:t.toolCall.toolName,output:{type:"execution-denied",reason:t.approvalResponse.reason}});_.push({role:"tool",content:e})}}finally{null==s||s.close()}}M.push(..._),await async function r({currentStep:d,responseMessages:c,usage:_}){var S,O,T,P,A,M,k;const L=oe.includeRawChunks,G=null!=s?setTimeout((()=>a.abort()),s):void 0;let j;function W(){null!=j&&(clearTimeout(j),j=void 0)}function B(){null!=G&&clearTimeout(G)}try{x=new $r.DelayedPromise;const s=[...g,...c],a=await(null==E?void 0:E({model:e,steps:V,stepNumber:V.length,messages:s,experimental_context:I})),G=Lt(null!=(S=null==a?void 0:a.model)?S:e),z=await lo({prompt:{system:null!=(O=null==a?void 0:a.system)?O:n.system,messages:null!=(T=null==a?void 0:a.messages)?T:s},supportedUrls:await G.supportedUrls,download:D}),{toolChoice:Y,tools:q}=await mo({tools:h,toolChoice:null!=(P=null==a?void 0:a.toolChoice)?P:f,activeTools:null!=(A=null==a?void 0:a.activeTools)?A:m});I=null!=(M=null==a?void 0:a.experimental_context)?M:I;const $=ir(w,null==a?void 0:a.providerOptions),{result:{stream:K,response:Z,request:J},doStreamSpan:re,startTimestampMs:ne}=await Q((()=>Qo({name:"ai.streamText.doStream",attributes:er({telemetry:t,attributes:{...zo({operationId:"ai.streamText.doStream",telemetry:t}),...te,"ai.model.provider":G.provider,"ai.model.id":G.modelId,"ai.prompt.messages":{input:()=>tr(z)},"ai.prompt.tools":{input:()=>null==q?void 0:q.map((e=>JSON.stringify(e)))},"ai.prompt.toolChoice":{input:()=>null!=Y?JSON.stringify(Y):void 0},"gen_ai.system":G.provider,"gen_ai.request.model":G.modelId,"gen_ai.request.frequency_penalty":ee.frequencyPenalty,"gen_ai.request.max_tokens":ee.maxOutputTokens,"gen_ai.request.presence_penalty":ee.presencePenalty,"gen_ai.request.stop_sequences":ee.stopSequences,"gen_ai.request.temperature":ee.temperature,"gen_ai.request.top_k":ee.topK,"gen_ai.request.top_p":ee.topP}}),tracer:X,endWhenDone:!1,fn:async e=>({startTimestampMs:b(),doStreamSpan:e,result:await G.doStream({...ee,tools:q,toolChoice:Y,responseFormat:await(null==C?void 0:C.responseFormat),prompt:z,providerOptions:$,abortSignal:i,headers:o,includeRawChunks:L})})}))),ie=function({tools:e,generatorStream:t,tracer:o,telemetry:r,system:n,messages:i,abortSignal:s,repairToolCall:a,experimental_context:l,generateId:p}){let u=null;const d=new ReadableStream({start(e){u=e}}),c=new Set,h=new Map,f=new Map;let g,m=!1;function y(){m&&0===c.size&&(null!=g&&u.enqueue(g),u.close())}const v=new TransformStream({async transform(t,d){const m=t.type;switch(m){case"stream-start":case"text-start":case"text-delta":case"text-end":case"reasoning-start":case"reasoning-delta":case"reasoning-end":case"tool-input-start":case"tool-input-delta":case"tool-input-end":case"source":case"response-metadata":case"error":case"raw":d.enqueue(t);break;case"file":d.enqueue({type:"file",file:new vr({data:t.data,mediaType:t.mediaType})});break;case"finish":g={type:"finish",finishReason:t.finishReason.unified,rawFinishReason:t.finishReason.raw,usage:or(t.usage),providerMetadata:t.providerMetadata};break;case"tool-approval-request":{const e=f.get(t.toolCallId);if(null==e){u.enqueue({type:"error",error:new U({toolCallId:t.toolCallId,approvalId:t.approvalId})});break}d.enqueue({type:"tool-approval-request",approvalId:t.approvalId,toolCall:e});break}case"tool-call":try{const g=await Nr({toolCall:t,tools:e,repairToolCall:a,system:n,messages:i});if(f.set(g.toolCallId,g),d.enqueue(g),g.invalid){u.enqueue({type:"tool-error",toolCallId:g.toolCallId,toolName:g.toolName,input:g.input,error:(0,Tn.getErrorMessage)(g.error),dynamic:!0,title:g.title});break}const m=null==e?void 0:e[g.toolName];if(null==m)break;if(null!=m.onInputAvailable&&await m.onInputAvailable({input:g.input,toolCallId:g.toolCallId,messages:i,abortSignal:s,experimental_context:l}),await Cr({tool:m,toolCall:g,messages:i,experimental_context:l})){u.enqueue({type:"tool-approval-request",approvalId:p(),toolCall:g});break}if(h.set(g.toolCallId,g.input),null!=m.execute&&!0!==g.providerExecuted){const t=p();c.add(t),hr({toolCall:g,tools:e,tracer:o,telemetry:r,messages:i,abortSignal:s,experimental_context:l,onPreliminaryToolResult:e=>{u.enqueue(e)}}).then((e=>{u.enqueue(e)})).catch((e=>{u.enqueue({type:"error",error:e})})).finally((()=>{c.delete(t),y()}))}}catch(e){u.enqueue({type:"error",error:e})}break;case"tool-result":{const e=t.toolName;t.isError?u.enqueue({type:"tool-error",toolCallId:t.toolCallId,toolName:e,input:h.get(t.toolCallId),providerExecuted:!0,error:t.result,dynamic:t.dynamic}):d.enqueue({type:"tool-result",toolCallId:t.toolCallId,toolName:e,input:h.get(t.toolCallId),output:t.result,providerExecuted:!0,dynamic:t.dynamic});break}default:throw new Error(`Unhandled chunk type: ${m}`)}},flush(){m=!0,y()}});return new ReadableStream({start:async e=>Promise.all([t.pipeThrough(v).pipeTo(new WritableStream({write(t){e.enqueue(t)},close(){}})),d.pipeTo(new WritableStream({write(t){e.enqueue(t)},close(){e.close()}}))])})}({tools:h,generatorStream:K,tracer:X,telemetry:t,system:u,messages:s,repairToolCall:y,abortSignal:i,experimental_context:I,generateId:R}),se=null==(k=null==N?void 0:N.requestBody)||k?null!=J?J:{}:{...J,body:void 0},ae=[],le=[];let pe;const ue={};let de,ce,he="other",fe={inputTokens:void 0,inputTokenDetails:{noCacheTokens:void 0,cacheReadTokens:void 0,cacheWriteTokens:void 0},outputTokens:void 0,outputTokenDetails:{textTokens:void 0,reasoningTokens:void 0},totalTokens:void 0,raw:void 0},ge=!0,me={id:R(),timestamp:new Date,modelId:e.modelId},ye="";oe.addStream(ie.pipeThrough(new TransformStream({async transform(e,t){var o,r,n,a,u;if(null!=l&&(null!=j&&clearTimeout(j),j=setTimeout((()=>p.abort()),l)),"stream-start"===e.type)return void(pe=e.warnings);if(ge){const e=b()-ne;ge=!1,re.addEvent("ai.stream.firstChunk",{"ai.response.msToFirstChunk":e}),re.setAttributes({"ai.response.msToFirstChunk":e}),t.enqueue({type:"start-step",request:se,warnings:null!=pe?pe:[]})}const d=e.type;switch(d){case"tool-approval-request":case"text-start":case"text-end":case"reasoning-start":case"reasoning-end":case"file":case"source":t.enqueue(e);break;case"text-delta":e.delta.length>0&&(t.enqueue({type:"text-delta",id:e.id,text:e.delta,providerMetadata:e.providerMetadata}),ye+=e.delta);break;case"reasoning-delta":t.enqueue({type:"reasoning-delta",id:e.id,text:e.delta,providerMetadata:e.providerMetadata});break;case"tool-call":t.enqueue(e),ae.push(e);break;case"tool-result":t.enqueue(e),e.preliminary||le.push(e);break;case"tool-error":t.enqueue(e),le.push(e);break;case"response-metadata":me={id:null!=(o=e.id)?o:me.id,timestamp:null!=(r=e.timestamp)?r:me.timestamp,modelId:null!=(n=e.modelId)?n:me.modelId};break;case"finish":{fe=e.usage,he=e.finishReason,de=e.rawFinishReason,ce=e.providerMetadata;const t=b()-ne;re.addEvent("ai.stream.finish"),re.setAttributes({"ai.response.msToFinish":t,"ai.response.avgOutputTokensPerSecond":1e3*(null!=(a=fe.outputTokens)?a:0)/t});break}case"tool-input-start":{ue[e.id]=e.toolName;const o=null==h?void 0:h[e.toolName];null!=(null==o?void 0:o.onInputStart)&&await o.onInputStart({toolCallId:e.id,messages:s,abortSignal:i,experimental_context:I}),t.enqueue({...e,dynamic:null!=(u=e.dynamic)?u:"dynamic"===(null==o?void 0:o.type),title:null==o?void 0:o.title});break}case"tool-input-end":delete ue[e.id],t.enqueue(e);break;case"tool-input-delta":{const o=ue[e.id],r=null==h?void 0:h[o];null!=(null==r?void 0:r.onInputDelta)&&await r.onInputDelta({inputTextDelta:e.delta,toolCallId:e.id,messages:s,abortSignal:i,experimental_context:I}),t.enqueue(e);break}case"error":t.enqueue(e),he="error";break;case"raw":L&&t.enqueue(e);break;default:throw new Error(`Unknown chunk type: ${d}`)}},async flush(e){const o=ae.length>0?JSON.stringify(ae):void 0;try{re.setAttributes(await er({telemetry:t,attributes:{"ai.response.finishReason":he,"ai.response.text":{output:()=>ye},"ai.response.reasoning":{output:()=>{const e=F.filter((e=>"reasoning"===e.type));return e.length>0?e.map((e=>e.text)).join("\n"):void 0}},"ai.response.toolCalls":{output:()=>o},"ai.response.id":me.id,"ai.response.model":me.modelId,"ai.response.timestamp":me.timestamp.toISOString(),"ai.response.providerMetadata":JSON.stringify(ce),"ai.usage.inputTokens":fe.inputTokens,"ai.usage.outputTokens":fe.outputTokens,"ai.usage.totalTokens":fe.totalTokens,"ai.usage.reasoningTokens":fe.reasoningTokens,"ai.usage.cachedInputTokens":fe.cachedInputTokens,"gen_ai.response.finish_reasons":[he],"gen_ai.response.id":me.id,"gen_ai.response.model":me.modelId,"gen_ai.usage.input_tokens":fe.inputTokens,"gen_ai.usage.output_tokens":fe.outputTokens}}))}catch(e){}finally{re.end()}e.enqueue({type:"finish-step",finishReason:he,rawFinishReason:de,usage:fe,providerMetadata:ce,response:{...me,headers:null==Z?void 0:Z.headers}});const n=rr(_,fe);await x.promise;const i=ae.filter((e=>!0!==e.providerExecuted)),s=le.filter((e=>!0!==e.providerExecuted));for(const e of ae){if(!0!==e.providerExecuted)continue;const t=null==h?void 0:h[e.toolName];"provider"===(null==t?void 0:t.type)&&t.supportsDeferredResults&&(le.some((t=>("tool-result"===t.type||"tool-error"===t.type)&&t.toolCallId===e.toolCallId))||H.set(e.toolCallId,{toolName:e.toolName}))}for(const e of le)"tool-result"!==e.type&&"tool-error"!==e.type||H.delete(e.toolCallId);if(B(),W(),(i.length>0&&s.length===i.length||H.size>0)&&!await Gr({stopConditions:v,steps:V})){c.push(...await jr({content:V[V.length-1].content,tools:h}));try{await r({currentStep:d+1,responseMessages:c,usage:n})}catch(t){e.enqueue({type:"error",error:t}),oe.closeStream()}}else e.enqueue({type:"finish",finishReason:he,rawFinishReason:de,totalUsage:n}),oe.closeStream()}})))}finally{B(),W()}}({currentStep:0,responseMessages:_,usage:{inputTokens:void 0,inputTokenDetails:{noCacheTokens:void 0,cacheReadTokens:void 0,cacheWriteTokens:void 0},outputTokens:void 0,outputTokenDetails:{textTokens:void 0,reasoningTokens:void 0},totalTokens:void 0,raw:void 0}})}}).catch((e=>{oe.addStream(new ReadableStream({start(t){t.enqueue({type:"error",error:e}),t.close()}})),oe.closeStream()}))}get steps(){return this.consumeStream(),this._steps.promise}get finalStep(){return this.steps.then((e=>e[e.length-1]))}get content(){return this.finalStep.then((e=>e.content))}get warnings(){return this.finalStep.then((e=>e.warnings))}get providerMetadata(){return this.finalStep.then((e=>e.providerMetadata))}get text(){return this.finalStep.then((e=>e.text))}get reasoningText(){return this.finalStep.then((e=>e.reasoningText))}get reasoning(){return this.finalStep.then((e=>e.reasoning))}get sources(){return this.finalStep.then((e=>e.sources))}get files(){return this.finalStep.then((e=>e.files))}get toolCalls(){return this.finalStep.then((e=>e.toolCalls))}get staticToolCalls(){return this.finalStep.then((e=>e.staticToolCalls))}get dynamicToolCalls(){return this.finalStep.then((e=>e.dynamicToolCalls))}get toolResults(){return this.finalStep.then((e=>e.toolResults))}get staticToolResults(){return this.finalStep.then((e=>e.staticToolResults))}get dynamicToolResults(){return this.finalStep.then((e=>e.dynamicToolResults))}get usage(){return this.finalStep.then((e=>e.usage))}get request(){return this.finalStep.then((e=>e.request))}get response(){return this.finalStep.then((e=>e.response))}get totalUsage(){return this.consumeStream(),this._totalUsage.promise}get finishReason(){return this.consumeStream(),this._finishReason.promise}get rawFinishReason(){return this.consumeStream(),this._rawFinishReason.promise}teeStream(){const[e,t]=this.baseStream.tee();return this.baseStream=t,e}get textStream(){return _n(this.teeStream().pipeThrough(new TransformStream({transform({part:e},t){"text-delta"===e.type&&t.enqueue(e.text)}})))}get fullStream(){return _n(this.teeStream().pipeThrough(new TransformStream({transform({part:e},t){t.enqueue(e)}})))}async consumeStream(e){var t;try{await bn({stream:this.fullStream,onError:null==e?void 0:e.onError})}catch(o){null==(t=null==e?void 0:e.onError)||t.call(e,o)}}get experimental_partialOutputStream(){return this.partialOutputStream}get partialOutputStream(){return _n(this.teeStream().pipeThrough(new TransformStream({transform({partialOutput:e},t){null!=e&&t.enqueue(e)}})))}get elementStream(){var e,t,o;const r=null==(e=this.outputSpecification)?void 0:e.createElementStreamTransform();if(null==r)throw new qr.UnsupportedFunctionalityError({functionality:`element streams in ${null!=(o=null==(t=this.outputSpecification)?void 0:t.name)?o:"text"} mode`});return _n(this.teeStream().pipeThrough(r))}get output(){return this.finalStep.then((e=>{var t;return(null!=(t=this.outputSpecification)?t:Or()).parseCompleteOutput({text:e.text},{response:e.response,usage:e.usage,finishReason:e.finishReason})}))}toUIMessageStream({originalMessages:e,generateMessageId:t,onFinish:o,messageMetadata:r,sendReasoning:n=!0,sendSources:i=!1,sendStart:s=!0,sendFinish:a=!0,onError:l=qr.getErrorMessage}={}){const p=null!=t?function({originalMessages:e,responseMessageId:t}){if(null==e)return;const o=e[e.length-1];return"assistant"===(null==o?void 0:o.role)?o.id:"function"==typeof t?t():t}({originalMessages:e,responseMessageId:t}):void 0,u=e=>{var t;const o=null==(t=this.tools)?void 0:t[e.toolName];return null==o?e.dynamic:"dynamic"===(null==o?void 0:o.type)||void 0};return _n(wn({stream:this.fullStream.pipeThrough(new TransformStream({transform:async(e,t)=>{const o=null==r?void 0:r({part:e}),d=e.type;switch(d){case"text-start":t.enqueue({type:"text-start",id:e.id,...null!=e.providerMetadata?{providerMetadata:e.providerMetadata}:{}});break;case"text-delta":t.enqueue({type:"text-delta",id:e.id,delta:e.text,...null!=e.providerMetadata?{providerMetadata:e.providerMetadata}:{}});break;case"text-end":t.enqueue({type:"text-end",id:e.id,...null!=e.providerMetadata?{providerMetadata:e.providerMetadata}:{}});break;case"reasoning-start":t.enqueue({type:"reasoning-start",id:e.id,...null!=e.providerMetadata?{providerMetadata:e.providerMetadata}:{}});break;case"reasoning-delta":n&&t.enqueue({type:"reasoning-delta",id:e.id,delta:e.text,...null!=e.providerMetadata?{providerMetadata:e.providerMetadata}:{}});break;case"reasoning-end":t.enqueue({type:"reasoning-end",id:e.id,...null!=e.providerMetadata?{providerMetadata:e.providerMetadata}:{}});break;case"file":t.enqueue({type:"file",mediaType:e.file.mediaType,url:`data:${e.file.mediaType};base64,${e.file.base64}`});break;case"source":i&&"url"===e.sourceType&&t.enqueue({type:"source-url",sourceId:e.id,url:e.url,title:e.title,...null!=e.providerMetadata?{providerMetadata:e.providerMetadata}:{}}),i&&"document"===e.sourceType&&t.enqueue({type:"source-document",sourceId:e.id,mediaType:e.mediaType,title:e.title,filename:e.filename,...null!=e.providerMetadata?{providerMetadata:e.providerMetadata}:{}});break;case"tool-input-start":{const o=u(e);t.enqueue({type:"tool-input-start",toolCallId:e.id,toolName:e.toolName,...null!=e.providerExecuted?{providerExecuted:e.providerExecuted}:{},...null!=e.providerMetadata?{providerMetadata:e.providerMetadata}:{},...null!=o?{dynamic:o}:{},...null!=e.title?{title:e.title}:{}});break}case"tool-input-delta":t.enqueue({type:"tool-input-delta",toolCallId:e.id,inputTextDelta:e.delta});break;case"tool-call":{const o=u(e);e.invalid?t.enqueue({type:"tool-input-error",toolCallId:e.toolCallId,toolName:e.toolName,input:e.input,...null!=e.providerExecuted?{providerExecuted:e.providerExecuted}:{},...null!=e.providerMetadata?{providerMetadata:e.providerMetadata}:{},...null!=o?{dynamic:o}:{},errorText:l(e.error),...null!=e.title?{title:e.title}:{}}):t.enqueue({type:"tool-input-available",toolCallId:e.toolCallId,toolName:e.toolName,input:e.input,...null!=e.providerExecuted?{providerExecuted:e.providerExecuted}:{},...null!=e.providerMetadata?{providerMetadata:e.providerMetadata}:{},...null!=o?{dynamic:o}:{},...null!=e.title?{title:e.title}:{}});break}case"tool-approval-request":t.enqueue({type:"tool-approval-request",approvalId:e.approvalId,toolCallId:e.toolCall.toolCallId});break;case"tool-result":{const o=u(e);t.enqueue({type:"tool-output-available",toolCallId:e.toolCallId,output:e.output,...null!=e.providerExecuted?{providerExecuted:e.providerExecuted}:{},...null!=e.preliminary?{preliminary:e.preliminary}:{},...null!=o?{dynamic:o}:{}});break}case"tool-error":{const o=u(e);t.enqueue({type:"tool-output-error",toolCallId:e.toolCallId,errorText:l(e.error),...null!=e.providerExecuted?{providerExecuted:e.providerExecuted}:{},...null!=o?{dynamic:o}:{}});break}case"tool-output-denied":t.enqueue({type:"tool-output-denied",toolCallId:e.toolCallId});break;case"error":t.enqueue({type:"error",errorText:l(e.error)});break;case"start-step":t.enqueue({type:"start-step"});break;case"finish-step":t.enqueue({type:"finish-step"});break;case"start":s&&t.enqueue({type:"start",...null!=o?{messageMetadata:o}:{},...null!=p?{messageId:p}:{}});break;case"finish":a&&t.enqueue({type:"finish",finishReason:e.finishReason,...null!=o?{messageMetadata:o}:{}});break;case"abort":t.enqueue(e);break;case"tool-input-end":case"raw":break;default:throw new Error(`Unknown chunk type: ${d}`)}null!=o&&"start"!==d&&"finish"!==d&&t.enqueue({type:"message-metadata",messageMetadata:o})}})),messageId:null!=p?p:null==t?void 0:t(),originalMessages:e,onFinish:o,onError:l}))}pipeUIMessageStreamToResponse(e,{originalMessages:t,generateMessageId:o,onFinish:r,messageMetadata:n,sendReasoning:i,sendSources:s,sendFinish:a,sendStart:l,onError:p,...u}={}){En({response:e,stream:this.toUIMessageStream({originalMessages:t,generateMessageId:o,onFinish:r,messageMetadata:n,sendReasoning:i,sendSources:s,sendFinish:a,sendStart:l,onError:p}),...u})}pipeTextStreamToResponse(e,t){Qr({response:e,textStream:this.textStream,...t})}toUIMessageStreamResponse({originalMessages:e,generateMessageId:t,onFinish:o,messageMetadata:r,sendReasoning:n,sendSources:i,sendFinish:s,sendStart:a,onError:l,...p}={}){return tn({stream:this.toUIMessageStream({originalMessages:e,generateMessageId:t,onFinish:o,messageMetadata:r,sendReasoning:n,sendSources:i,sendFinish:s,sendStart:a,onError:l}),...p})}toTextStreamResponse(e){return Zr({textStream:this.textStream,...e})}},Dn=class{constructor(e){this.version="agent-v1",this.settings=e}get id(){return this.settings.id}get tools(){return this.settings.tools}async prepareCall(e){var t,o,r,n;const{onStepFinish:i,...s}=this.settings,a={...s,stopWhen:null!=(t=this.settings.stopWhen)?t:kr(20),...e},l=null!=(n=await(null==(r=(o=this.settings).prepareCall)?void 0:r.call(o,a)))?n:a,{instructions:p,messages:u,prompt:d,...c}=l;return{...c,system:p,messages:u,prompt:d}}mergeOnStepFinishCallbacks(e){const t=this.settings.onStepFinish;return e&&t?async o=>{await t(o),await e(o)}:null!=e?e:t}async generate({abortSignal:e,timeout:t,onStepFinish:o,...r}){return Hr({...await this.prepareCall(r),abortSignal:e,timeout:t,onStepFinish:this.mergeOnStepFinishCallbacks(o)})}async stream({abortSignal:e,timeout:t,experimental_transform:o,onStepFinish:r,...n}){return An({...await this.prepareCall(n),abortSignal:e,timeout:t,experimental_transform:o,onStepFinish:this.mergeOnStepFinishCallbacks(r)})}},Nn=o(94192);function xn({execute:e,onError:t=Nn.getErrorMessage,originalMessages:o,onStepFinish:r,onFinish:n,generateId:i=Nn.generateId}){let s;const a=[],l=new ReadableStream({start(e){s=e}});function p(e){try{s.enqueue(e)}catch(e){}}try{const o=e({writer:{write(e){p(e)},merge(e){a.push((async()=>{const t=e.getReader();for(;;){const{done:e,value:o}=await t.read();if(e)break;p(o)}})().catch((e=>{p({type:"error",errorText:t(e)})})))},onError:t}});o&&a.push(o.catch((e=>{p({type:"error",errorText:t(e)})})))}catch(e){p({type:"error",errorText:t(e)})}return new Promise((async e=>{for(;a.length>0;)await a.shift();e()})).finally((()=>{try{s.close()}catch(e){}})),wn({stream:l,messageId:i(),originalMessages:o,onStepFinish:r,onFinish:n,onError:t})}function Fn({message:e,stream:t,onError:o,terminateOnError:r=!1}){var n;let i,s=!1;const a=new ReadableStream({start(e){i=e}}),l=vn({messageId:null!=(n=null==e?void 0:e.id)?n:"",lastMessage:e}),p=e=>{null==o||o(e),!s&&r&&(s=!0,null==i||i.error(e))};return bn({stream:Cn({stream:t,runUpdateMessageJob:e=>e({state:l,write:()=>{null==i||i.enqueue(structuredClone(l.message))}}),onError:p}),onError:p}).finally((()=>{s||null==i||i.close()})),_n(a)}var Mn=o(94192);async function kn(e,t){const o=[];(null==t?void 0:t.ignoreIncompleteToolCalls)&&(e=e.map((e=>({...e,parts:e.parts.filter((e=>!hn(e)||"input-streaming"!==e.state&&"input-available"!==e.state))}))));for(const r of e)switch(r.role){case"system":{const n=r.parts.filter((e=>"text"===e.type)),i=n.reduce(((e,t)=>null!=t.providerMetadata?{...e,...t.providerMetadata}:e),{});o.push({role:"system",content:n.map((e=>e.text)).join(""),...Object.keys(i).length>0?{providerOptions:i}:{}});break}case"user":o.push({role:"user",content:r.parts.map((e=>{var o;return ln(e)?{type:"text",text:e.text,...null!=e.providerMetadata?{providerOptions:e.providerMetadata}:{}}:pn(e)?{type:"file",mediaType:e.mediaType,filename:e.filename,data:e.url,...null!=e.providerMetadata?{providerOptions:e.providerMetadata}:{}}:an(e)?null==(o=null==t?void 0:t.convertDataPart)?void 0:o.call(t,e):void 0})).filter(Mn.isNonNullable)});break;case"assistant":if(null!=r.parts){let s=[];async function a(){var e,r,n,i,a,l;if(0===s.length)return;const p=[];for(const o of s)if(ln(o))p.push({type:"text",text:o.text,...null!=o.providerMetadata?{providerOptions:o.providerMetadata}:{}});else if(pn(o))p.push({type:"file",mediaType:o.mediaType,filename:o.filename,data:o.url});else if(un(o))p.push({type:"reasoning",text:o.text,providerOptions:o.providerMetadata});else if(hn(o)){const n=mn(o);"input-streaming"!==o.state&&(p.push({type:"tool-call",toolCallId:o.toolCallId,toolName:n,input:"output-error"===o.state?null!=(e=o.input)?e:"rawInput"in o?o.rawInput:void 0:o.input,providerExecuted:o.providerExecuted,...null!=o.callProviderMetadata?{providerOptions:o.callProviderMetadata}:{}}),null!=o.approval&&p.push({type:"tool-approval-request",approvalId:o.approval.id,toolCallId:o.toolCallId}),!0!==o.providerExecuted||"approval-responded"===o.state||"output-available"!==o.state&&"output-error"!==o.state||p.push({type:"tool-result",toolCallId:o.toolCallId,toolName:n,output:await co({toolCallId:o.toolCallId,input:o.input,output:"output-error"===o.state?o.errorText:o.output,tool:null==(r=null==t?void 0:t.tools)?void 0:r[n],errorMode:"output-error"===o.state?"json":"none"}),...null!=o.callProviderMetadata?{providerOptions:o.callProviderMetadata}:{}}))}else{if(!an(o))throw new Error(`Unsupported part: ${o}`);{const e=null==(n=null==t?void 0:t.convertDataPart)?void 0:n.call(t,o);null!=e&&p.push(e)}}o.push({role:"assistant",content:p});const u=s.filter((e=>{var t;return hn(e)&&(!0!==e.providerExecuted||null!=(null==(t=e.approval)?void 0:t.approved))}));if(u.length>0){const e=[];for(const o of u)if(null!=(null==(i=o.approval)?void 0:i.approved)&&e.push({type:"tool-approval-response",approvalId:o.approval.id,approved:o.approval.approved,reason:o.approval.reason,providerExecuted:o.providerExecuted}),!0!==o.providerExecuted)switch(o.state){case"output-denied":e.push({type:"tool-result",toolCallId:o.toolCallId,toolName:mn(o),output:{type:"error-text",value:null!=(a=o.approval.reason)?a:"Tool execution denied."},...null!=o.callProviderMetadata?{providerOptions:o.callProviderMetadata}:{}});break;case"output-error":case"output-available":{const r=mn(o);e.push({type:"tool-result",toolCallId:o.toolCallId,toolName:r,output:await co({toolCallId:o.toolCallId,input:o.input,output:"output-error"===o.state?o.errorText:o.output,tool:null==(l=null==t?void 0:t.tools)?void 0:l[r],errorMode:"output-error"===o.state?"text":"none"}),...null!=o.callProviderMetadata?{providerOptions:o.callProviderMetadata}:{}});break}}e.length>0&&o.push({role:"tool",content:e})}s=[]}for(const l of r.parts)ln(l)||un(l)||pn(l)||hn(l)||an(l)?s.push(l):"step-start"===l.type&&await a();await a();break}break;default:{const p=r.role;throw new yt({originalMessage:r,message:`Unsupported role: ${p}`})}}return o}var Ln=o(10292),Gn=o(94192),jn=o(19844),Wn=(0,Gn.lazySchema)((()=>(0,Gn.zodSchema)(jn.z.array(jn.z.object({id:jn.z.string(),role:jn.z.enum(["system","user","assistant"]),metadata:jn.z.unknown().optional(),parts:jn.z.array(jn.z.union([jn.z.object({type:jn.z.literal("text"),text:jn.z.string(),state:jn.z.enum(["streaming","done"]).optional(),providerMetadata:Ro.optional()}),jn.z.object({type:jn.z.literal("reasoning"),text:jn.z.string(),state:jn.z.enum(["streaming","done"]).optional(),providerMetadata:Ro.optional()}),jn.z.object({type:jn.z.literal("source-url"),sourceId:jn.z.string(),url:jn.z.string(),title:jn.z.string().optional(),providerMetadata:Ro.optional()}),jn.z.object({type:jn.z.literal("source-document"),sourceId:jn.z.string(),mediaType:jn.z.string(),title:jn.z.string(),filename:jn.z.string().optional(),providerMetadata:Ro.optional()}),jn.z.object({type:jn.z.literal("file"),mediaType:jn.z.string(),filename:jn.z.string().optional(),url:jn.z.string(),providerMetadata:Ro.optional()}),jn.z.object({type:jn.z.literal("step-start")}),jn.z.object({type:jn.z.string().startsWith("data-"),id:jn.z.string().optional(),data:jn.z.unknown()}),jn.z.object({type:jn.z.literal("dynamic-tool"),toolName:jn.z.string(),toolCallId:jn.z.string(),state:jn.z.literal("input-streaming"),input:jn.z.unknown().optional(),providerExecuted:jn.z.boolean().optional(),callProviderMetadata:Ro.optional(),output:jn.z.never().optional(),errorText:jn.z.never().optional(),approval:jn.z.never().optional()}),jn.z.object({type:jn.z.literal("dynamic-tool"),toolName:jn.z.string(),toolCallId:jn.z.string(),state:jn.z.literal("input-available"),input:jn.z.unknown(),providerExecuted:jn.z.boolean().optional(),output:jn.z.never().optional(),errorText:jn.z.never().optional(),callProviderMetadata:Ro.optional(),approval:jn.z.never().optional()}),jn.z.object({type:jn.z.literal("dynamic-tool"),toolName:jn.z.string(),toolCallId:jn.z.string(),state:jn.z.literal("approval-requested"),input:jn.z.unknown(),providerExecuted:jn.z.boolean().optional(),output:jn.z.never().optional(),errorText:jn.z.never().optional(),callProviderMetadata:Ro.optional(),approval:jn.z.object({id:jn.z.string(),approved:jn.z.never().optional(),reason:jn.z.never().optional()})}),jn.z.object({type:jn.z.literal("dynamic-tool"),toolName:jn.z.string(),toolCallId:jn.z.string(),state:jn.z.literal("approval-responded"),input:jn.z.unknown(),providerExecuted:jn.z.boolean().optional(),output:jn.z.never().optional(),errorText:jn.z.never().optional(),callProviderMetadata:Ro.optional(),approval:jn.z.object({id:jn.z.string(),approved:jn.z.boolean(),reason:jn.z.string().optional()})}),jn.z.object({type:jn.z.literal("dynamic-tool"),toolName:jn.z.string(),toolCallId:jn.z.string(),state:jn.z.literal("output-available"),input:jn.z.unknown(),providerExecuted:jn.z.boolean().optional(),output:jn.z.unknown(),errorText:jn.z.never().optional(),callProviderMetadata:Ro.optional(),preliminary:jn.z.boolean().optional(),approval:jn.z.object({id:jn.z.string(),approved:jn.z.literal(!0),reason:jn.z.string().optional()}).optional()}),jn.z.object({type:jn.z.literal("dynamic-tool"),toolName:jn.z.string(),toolCallId:jn.z.string(),state:jn.z.literal("output-error"),input:jn.z.unknown(),rawInput:jn.z.unknown().optional(),providerExecuted:jn.z.boolean().optional(),output:jn.z.never().optional(),errorText:jn.z.string(),callProviderMetadata:Ro.optional(),approval:jn.z.object({id:jn.z.string(),approved:jn.z.literal(!0),reason:jn.z.string().optional()}).optional()}),jn.z.object({type:jn.z.literal("dynamic-tool"),toolName:jn.z.string(),toolCallId:jn.z.string(),state:jn.z.literal("output-denied"),input:jn.z.unknown(),providerExecuted:jn.z.boolean().optional(),output:jn.z.never().optional(),errorText:jn.z.never().optional(),callProviderMetadata:Ro.optional(),approval:jn.z.object({id:jn.z.string(),approved:jn.z.literal(!1),reason:jn.z.string().optional()})}),jn.z.object({type:jn.z.string().startsWith("tool-"),toolCallId:jn.z.string(),state:jn.z.literal("input-streaming"),providerExecuted:jn.z.boolean().optional(),callProviderMetadata:Ro.optional(),input:jn.z.unknown().optional(),output:jn.z.never().optional(),errorText:jn.z.never().optional(),approval:jn.z.never().optional()}),jn.z.object({type:jn.z.string().startsWith("tool-"),toolCallId:jn.z.string(),state:jn.z.literal("input-available"),providerExecuted:jn.z.boolean().optional(),input:jn.z.unknown(),output:jn.z.never().optional(),errorText:jn.z.never().optional(),callProviderMetadata:Ro.optional(),approval:jn.z.never().optional()}),jn.z.object({type:jn.z.string().startsWith("tool-"),toolCallId:jn.z.string(),state:jn.z.literal("approval-requested"),input:jn.z.unknown(),providerExecuted:jn.z.boolean().optional(),output:jn.z.never().optional(),errorText:jn.z.never().optional(),callProviderMetadata:Ro.optional(),approval:jn.z.object({id:jn.z.string(),approved:jn.z.never().optional(),reason:jn.z.never().optional()})}),jn.z.object({type:jn.z.string().startsWith("tool-"),toolCallId:jn.z.string(),state:jn.z.literal("approval-responded"),input:jn.z.unknown(),providerExecuted:jn.z.boolean().optional(),output:jn.z.never().optional(),errorText:jn.z.never().optional(),callProviderMetadata:Ro.optional(),approval:jn.z.object({id:jn.z.string(),approved:jn.z.boolean(),reason:jn.z.string().optional()})}),jn.z.object({type:jn.z.string().startsWith("tool-"),toolCallId:jn.z.string(),state:jn.z.literal("output-available"),providerExecuted:jn.z.boolean().optional(),input:jn.z.unknown(),output:jn.z.unknown(),errorText:jn.z.never().optional(),callProviderMetadata:Ro.optional(),preliminary:jn.z.boolean().optional(),approval:jn.z.object({id:jn.z.string(),approved:jn.z.literal(!0),reason:jn.z.string().optional()}).optional()}),jn.z.object({type:jn.z.string().startsWith("tool-"),toolCallId:jn.z.string(),state:jn.z.literal("output-error"),providerExecuted:jn.z.boolean().optional(),input:jn.z.unknown(),rawInput:jn.z.unknown().optional(),output:jn.z.never().optional(),errorText:jn.z.string(),callProviderMetadata:Ro.optional(),approval:jn.z.object({id:jn.z.string(),approved:jn.z.literal(!0),reason:jn.z.string().optional()}).optional()}),jn.z.object({type:jn.z.string().startsWith("tool-"),toolCallId:jn.z.string(),state:jn.z.literal("output-denied"),providerExecuted:jn.z.boolean().optional(),input:jn.z.unknown(),output:jn.z.never().optional(),errorText:jn.z.never().optional(),callProviderMetadata:Ro.optional(),approval:jn.z.object({id:jn.z.string(),approved:jn.z.literal(!1),reason:jn.z.string().optional()})})])).nonempty("Message must contain at least one part")})).nonempty("Messages array must not be empty"))));async function Vn({messages:e,metadataSchema:t,dataSchemas:o,tools:r}){try{if(null==e)return{success:!1,error:new E({parameter:"messages",value:e,message:"messages parameter must be provided"})};const n=await(0,Gn.validateTypes)({value:e,schema:Wn});if(t)for(const[e,o]of n.entries())await(0,Gn.validateTypes)({value:o.metadata,schema:t,context:{field:`messages[${e}].metadata`,entityId:o.id}});if(o||r)for(const[e,t]of n.entries())for(const[n,i]of t.parts.entries()){if(o&&i.type.startsWith("data-")){const t=i,r=t.type.slice(5),s=o[r];if(!s)return{success:!1,error:new Ln.TypeValidationError({value:t.data,cause:`No data schema found for data part ${r}`,context:{field:`messages[${e}].parts[${n}].data`,entityName:r,entityId:t.id}})};await(0,Gn.validateTypes)({value:t.data,schema:s,context:{field:`messages[${e}].parts[${n}].data`,entityName:r,entityId:t.id}})}if(r&&i.type.startsWith("tool-")){const t=i,o=t.type.slice(5),s=r[o];if(!s)return{success:!1,error:new Ln.TypeValidationError({value:t.input,cause:`No tool schema found for tool part ${o}`,context:{field:`messages[${e}].parts[${n}].input`,entityName:o,entityId:t.toolCallId}})};("input-available"===t.state||"output-available"===t.state||"output-error"===t.state&&void 0!==t.input)&&await(0,Gn.validateTypes)({value:t.input,schema:s.inputSchema,context:{field:`messages[${e}].parts[${n}].input`,entityName:o,entityId:t.toolCallId}}),"output-available"===t.state&&s.outputSchema&&await(0,Gn.validateTypes)({value:t.output,schema:s.outputSchema,context:{field:`messages[${e}].parts[${n}].output`,entityName:o,entityId:t.toolCallId}})}}return{success:!0,data:n}}catch(e){return{success:!1,error:e}}}async function Hn({messages:e,metadataSchema:t,dataSchemas:o,tools:r}){const n=await Vn({messages:e,metadataSchema:t,dataSchemas:o,tools:r});if(!n.success)throw n.error;return n.data}async function Bn({agent:e,uiMessages:t,options:o,abortSignal:r,timeout:n,experimental_transform:i,onStepFinish:s,...a}){var l;const p=await Hn({messages:t,tools:e.tools}),u=await kn(p,{tools:e.tools});return(await e.stream({prompt:u,options:o,abortSignal:r,timeout:n,experimental_transform:i,onStepFinish:s})).toUIMessageStream({...a,originalMessages:null!=(l=a.originalMessages)?l:p})}async function zn({headers:e,status:t,statusText:o,consumeSseStream:r,...n}){return tn({headers:e,status:t,statusText:o,consumeSseStream:r,stream:await Bn(n)})}async function Un({response:e,headers:t,status:o,statusText:r,consumeSseStream:n,...i}){En({response:e,headers:t,status:o,statusText:r,consumeSseStream:n,stream:await Bn(i)})}var Yn=o(94192);async function qn({model:e,value:t,providerOptions:o,maxRetries:r,abortSignal:n,headers:i,experimental_telemetry:s}){const a=Gt(e),{maxRetries:l,retry:p}=ur({maxRetries:r,abortSignal:n}),u=(0,Yn.withUserAgentSuffix)(null!=i?i:{},`ai/${Jt}`),d=Uo({model:a,telemetry:s,headers:u,settings:{maxRetries:l}}),c=Zo(s);return Qo({name:"ai.embed",attributes:er({telemetry:s,attributes:{...zo({operationId:"ai.embed",telemetry:s}),...d,"ai.value":{input:()=>JSON.stringify(t)}}}),tracer:c,fn:async e=>{const{embedding:r,usage:i,warnings:l,response:h,providerMetadata:f}=await p((()=>Qo({name:"ai.embed.doEmbed",attributes:er({telemetry:s,attributes:{...zo({operationId:"ai.embed.doEmbed",telemetry:s}),...d,"ai.values":{input:()=>[JSON.stringify(t)]}}}),tracer:c,fn:async e=>{var r;const i=await a.doEmbed({values:[t],abortSignal:n,headers:u,providerOptions:o}),l=i.embeddings[0],p=null!=(r=i.usage)?r:{tokens:NaN};return e.setAttributes(await er({telemetry:s,attributes:{"ai.embeddings":{output:()=>i.embeddings.map((e=>JSON.stringify(e)))},"ai.usage.tokens":p.tokens}})),{embedding:l,usage:p,warnings:i.warnings,providerMetadata:i.providerMetadata,response:i.response}}})));return e.setAttributes(await er({telemetry:s,attributes:{"ai.embedding":{output:()=>JSON.stringify(r)},"ai.usage.tokens":i.tokens}})),Tt({warnings:l,provider:a.provider,model:a.modelId}),new $n({value:t,embedding:r,usage:i,warnings:l,providerMetadata:f,response:h})}})}var $n=class{constructor(e){this.value=e.value,this.embedding=e.embedding,this.usage=e.usage,this.warnings=e.warnings,this.providerMetadata=e.providerMetadata,this.response=e.response}},Kn=o(94192);function Zn(e,t){if(t<=0)throw new Error("chunkSize must be greater than 0");const o=[];for(let r=0;r<e.length;r+=t)o.push(e.slice(r,r+t));return o}async function Jn({model:e,values:t,maxParallelCalls:o=1/0,maxRetries:r,abortSignal:n,headers:i,providerOptions:s,experimental_telemetry:a}){const l=Gt(e),{maxRetries:p,retry:u}=ur({maxRetries:r,abortSignal:n}),d=(0,Kn.withUserAgentSuffix)(null!=i?i:{},`ai/${Jt}`),c=Uo({model:l,telemetry:a,headers:d,settings:{maxRetries:p}}),h=Zo(a);return Qo({name:"ai.embedMany",attributes:er({telemetry:a,attributes:{...zo({operationId:"ai.embedMany",telemetry:a}),...c,"ai.values":{input:()=>t.map((e=>JSON.stringify(e)))}}}),tracer:h,fn:async e=>{var r;const[i,p]=await Promise.all([l.maxEmbeddingsPerCall,l.supportsParallelCalls]);if(null==i||i===1/0){const{embeddings:o,usage:r,warnings:i,response:p,providerMetadata:f}=await u((()=>Qo({name:"ai.embedMany.doEmbed",attributes:er({telemetry:a,attributes:{...zo({operationId:"ai.embedMany.doEmbed",telemetry:a}),...c,"ai.values":{input:()=>t.map((e=>JSON.stringify(e)))}}}),tracer:h,fn:async e=>{var o;const r=await l.doEmbed({values:t,abortSignal:n,headers:d,providerOptions:s}),i=r.embeddings,p=null!=(o=r.usage)?o:{tokens:NaN};return e.setAttributes(await er({telemetry:a,attributes:{"ai.embeddings":{output:()=>i.map((e=>JSON.stringify(e)))},"ai.usage.tokens":p.tokens}})),{embeddings:i,usage:p,warnings:r.warnings,providerMetadata:r.providerMetadata,response:r.response}}})));return e.setAttributes(await er({telemetry:a,attributes:{"ai.embeddings":{output:()=>o.map((e=>JSON.stringify(e)))},"ai.usage.tokens":r.tokens}})),Tt({warnings:i,provider:l.provider,model:l.modelId}),new Qn({values:t,embeddings:o,usage:r,warnings:i,providerMetadata:f,responses:[p]})}const f=Zn(t,i),g=[],m=[],y=[];let v,C=0;const w=Zn(f,p?o:1);for(const e of w){const t=await Promise.all(e.map((e=>u((()=>Qo({name:"ai.embedMany.doEmbed",attributes:er({telemetry:a,attributes:{...zo({operationId:"ai.embedMany.doEmbed",telemetry:a}),...c,"ai.values":{input:()=>e.map((e=>JSON.stringify(e)))}}}),tracer:h,fn:async t=>{var o;const r=await l.doEmbed({values:e,abortSignal:n,headers:d,providerOptions:s}),i=r.embeddings,p=null!=(o=r.usage)?o:{tokens:NaN};return t.setAttributes(await er({telemetry:a,attributes:{"ai.embeddings":{output:()=>i.map((e=>JSON.stringify(e)))},"ai.usage.tokens":p.tokens}})),{embeddings:i,usage:p,warnings:r.warnings,providerMetadata:r.providerMetadata,response:r.response}}}))))));for(const e of t)if(g.push(...e.embeddings),m.push(...e.warnings),y.push(e.response),C+=e.usage.tokens,e.providerMetadata)if(v)for(const[t,o]of Object.entries(e.providerMetadata))v[t]={...null!=(r=v[t])?r:{},...o};else v={...e.providerMetadata}}return e.setAttributes(await er({telemetry:a,attributes:{"ai.embeddings":{output:()=>g.map((e=>JSON.stringify(e)))},"ai.usage.tokens":C}})),Tt({warnings:m,provider:l.provider,model:l.modelId}),new Qn({values:t,embeddings:g,usage:{tokens:C},warnings:m,providerMetadata:v,responses:y})}})}var Qn=class{constructor(e){this.values=e.values,this.embeddings=e.embeddings,this.usage=e.usage,this.warnings=e.warnings,this.providerMetadata=e.providerMetadata,this.responses=e.responses}},Xn=o(94192);async function ei({model:e,prompt:t,n:o=1,maxImagesPerCall:r,size:n,aspectRatio:i,seed:s,providerOptions:a,maxRetries:l,abortSignal:p,headers:u}){var d;const c=function(e){if("string"!=typeof e){if("v3"!==e.specificationVersion&&"v2"!==e.specificationVersion){const t=e;throw new $e({version:t.specificationVersion,provider:t.provider,modelId:t.modelId})}return Dt(e)}return jt().imageModel(e)}(e),h=(0,Xn.withUserAgentSuffix)(null!=u?u:{},`ai/${Jt}`),{retry:f}=ur({maxRetries:l,abortSignal:p}),g=null!=(d=null!=r?r:await async function(e){return e.maxImagesPerCall instanceof Function?e.maxImagesPerCall({modelId:e.modelId}):e.maxImagesPerCall}(c))?d:1,m=Math.ceil(o/g),y=Array.from({length:m},((e,t)=>{if(t<m-1)return g;const r=o%g;return 0===r?g:r})),v=await Promise.all(y.map((async e=>f((()=>{const{prompt:o,files:r,mask:l}=function(e){return"string"==typeof e?{prompt:e,files:void 0,mask:void 0}:{prompt:e.text,files:e.images.map(oi),mask:e.mask?oi(e.mask):void 0}}(t);return c.doGenerate({prompt:o,files:r,mask:l,n:e,abortSignal:p,headers:h,size:n,aspectRatio:i,seed:s,providerOptions:null!=a?a:{}})}))))),C=[],w=[],E=[],_={};let b={inputTokens:void 0,outputTokens:void 0,totalTokens:void 0};for(const e of v){if(C.push(...e.images.map((e=>{var t;return new yr({data:e,mediaType:null!=(t=$t({data:e,signatures:zt}))?t:"image/png"})}))),w.push(...e.warnings),null!=e.usage&&(R=b,S=e.usage,b={inputTokens:nr(R.inputTokens,S.inputTokens),outputTokens:nr(R.outputTokens,S.outputTokens),totalTokens:nr(R.totalTokens,S.totalTokens)}),e.providerMetadata)for(const[t,o]of Object.entries(e.providerMetadata))if("gateway"===t){const e=_[t];_[t]=null!=e&&"object"==typeof e?{...e,...o}:o;const r=_[t].images;Array.isArray(r)&&0===r.length&&delete _[t].images}else null!=_[t]||(_[t]={images:[]}),_[t].images.push(...e.providerMetadata[t].images);E.push(e.response)}var R,S;if(Tt({warnings:w,provider:c.provider,model:c.modelId}),!C.length)throw new re({responses:E});return new ti({images:C,warnings:w,responses:E,providerMetadata:_,usage:b})}var ti=class{constructor(e){this.images=e.images,this.warnings=e.warnings,this.responses=e.responses,this.providerMetadata=e.providerMetadata,this.usage=e.usage}get image(){return this.images[0]}};function oi(e){if("string"==typeof e&&e.startsWith("http"))return{type:"url",url:e};if("string"==typeof e&&e.startsWith("data:")){const{mediaType:t,base64Content:o}=ro(e);if(null!=o){const e=(0,Xn.convertBase64ToUint8Array)(o);return{type:"file",data:e,mediaType:t||$t({data:e,signatures:zt})||"image/png"}}}const t=so(e);return{type:"file",data:t,mediaType:$t({data:t,signatures:zt})||"image/png"}}var ri=ei,ni=o(94192),ii=o(10292),si=o(94192),ai={type:"no-schema",jsonSchema:async()=>{},validatePartialResult:async({value:e,textDelta:t})=>({success:!0,value:{partial:e,textDelta:t}}),validateFinalResult:async(e,t)=>void 0===e?{success:!1,error:new pe({message:"No object generated: response did not match schema.",text:t.text,response:t.response,usage:t.usage,finishReason:t.finishReason})}:{success:!0,value:e},createElementStream(){throw new ii.UnsupportedFunctionalityError({functionality:"element streams in no-schema mode"})}},li=e=>({type:"object",jsonSchema:async()=>await e.jsonSchema,validatePartialResult:async({value:e,textDelta:t})=>({success:!0,value:{partial:e,textDelta:t}}),validateFinalResult:async t=>(0,si.safeValidateTypes)({value:t,schema:e}),createElementStream(){throw new ii.UnsupportedFunctionalityError({functionality:"element streams in object mode"})}}),pi=e=>({type:"array",jsonSchema:async()=>{const{$schema:t,...o}=await e.jsonSchema;return{$schema:"http://json-schema.org/draft-07/schema#",type:"object",properties:{elements:{type:"array",items:o}},required:["elements"],additionalProperties:!1}},async validatePartialResult({value:t,latestObject:o,isFirstDelta:r,isFinalDelta:n}){var i;if(!(0,ii.isJSONObject)(t)||!(0,ii.isJSONArray)(t.elements))return{success:!1,error:new ii.TypeValidationError({value:t,cause:"value must be an object that contains an array of elements"})};const s=t.elements,a=[];for(let t=0;t<s.length;t++){const o=s[t],r=await(0,si.safeValidateTypes)({value:o,schema:e});if(t!==s.length-1||n){if(!r.success)return r;a.push(r.value)}}const l=null!=(i=null==o?void 0:o.length)?i:0;let p="";return r&&(p+="["),l>0&&(p+=","),p+=a.slice(l).map((e=>JSON.stringify(e))).join(","),n&&(p+="]"),{success:!0,value:{partial:a,textDelta:p}}},async validateFinalResult(t){if(!(0,ii.isJSONObject)(t)||!(0,ii.isJSONArray)(t.elements))return{success:!1,error:new ii.TypeValidationError({value:t,cause:"value must be an object that contains an array of elements"})};const o=t.elements;for(const t of o){const o=await(0,si.safeValidateTypes)({value:t,schema:e});if(!o.success)return o}return{success:!0,value:o}},createElementStream(e){let t=0;return _n(e.pipeThrough(new TransformStream({transform(e,o){switch(e.type){case"object":{const r=e.object;for(;t<r.length;t++)o.enqueue(r[t]);break}case"text-delta":case"finish":case"error":break;default:throw new Error(`Unsupported chunk type: ${e}`)}}})))}}),ui=e=>({type:"enum",jsonSchema:async()=>({$schema:"http://json-schema.org/draft-07/schema#",type:"object",properties:{result:{type:"string",enum:e}},required:["result"],additionalProperties:!1}),async validateFinalResult(t){if(!(0,ii.isJSONObject)(t)||"string"!=typeof t.result)return{success:!1,error:new ii.TypeValidationError({value:t,cause:'value must be an object that contains a string in the "result" property.'})};const o=t.result;return e.includes(o)?{success:!0,value:o}:{success:!1,error:new ii.TypeValidationError({value:t,cause:"value must be a string in the enum"})}},async validatePartialResult({value:t,textDelta:o}){if(!(0,ii.isJSONObject)(t)||"string"!=typeof t.result)return{success:!1,error:new ii.TypeValidationError({value:t,cause:'value must be an object that contains a string in the "result" property.'})};const r=t.result,n=e.filter((e=>e.startsWith(r)));return 0===t.result.length||0===n.length?{success:!1,error:new ii.TypeValidationError({value:t,cause:"value must be a string in the enum"})}:{success:!0,value:{partial:n.length>1?r:n[0],textDelta:o}}},createElementStream(){throw new ii.UnsupportedFunctionalityError({functionality:"element streams in enum mode"})}});function di({output:e,schema:t,enumValues:o}){switch(e){case"object":return li((0,si.asSchema)(t));case"array":return pi((0,si.asSchema)(t));case"enum":return ui(o);case"no-schema":return ai;default:throw new Error(`Unsupported output: ${e}`)}}var ci=o(10292),hi=o(94192);async function fi(e,t,o){const r=await(0,hi.safeParseJSON)({text:e});if(!r.success)throw new pe({message:"No object generated: could not parse the response.",cause:r.error,text:e,response:o.response,usage:o.usage,finishReason:o.finishReason});const n=await t.validateFinalResult(r.value,{text:e,response:o.response,usage:o.usage});if(!n.success)throw new pe({message:"No object generated: response did not match schema.",cause:n.error,text:e,response:o.response,usage:o.usage,finishReason:o.finishReason});return n.value}async function gi(e,t,o,r){try{return await fi(e,t,r)}catch(n){if(null!=o&&pe.isInstance(n)&&(ci.JSONParseError.isInstance(n.cause)||ci.TypeValidationError.isInstance(n.cause))){const i=await o({text:e,error:n.cause});if(null===i)throw n;return await fi(i,t,r)}throw n}}function mi({output:e,schema:t,schemaName:o,schemaDescription:r,enumValues:n}){if(null!=e&&"object"!==e&&"array"!==e&&"enum"!==e&&"no-schema"!==e)throw new E({parameter:"output",value:e,message:"Invalid output type."});if("no-schema"===e){if(null!=t)throw new E({parameter:"schema",value:t,message:"Schema is not supported for no-schema output."});if(null!=r)throw new E({parameter:"schemaDescription",value:r,message:"Schema description is not supported for no-schema output."});if(null!=o)throw new E({parameter:"schemaName",value:o,message:"Schema name is not supported for no-schema output."});if(null!=n)throw new E({parameter:"enumValues",value:n,message:"Enum values are not supported for no-schema output."})}if("object"===e){if(null==t)throw new E({parameter:"schema",value:t,message:"Schema is required for object output."});if(null!=n)throw new E({parameter:"enumValues",value:n,message:"Enum values are not supported for object output."})}if("array"===e){if(null==t)throw new E({parameter:"schema",value:t,message:"Element schema is required for array output."});if(null!=n)throw new E({parameter:"enumValues",value:n,message:"Enum values are not supported for array output."})}if("enum"===e){if(null!=t)throw new E({parameter:"schema",value:t,message:"Schema is not supported for enum output."});if(null!=r)throw new E({parameter:"schemaDescription",value:r,message:"Schema description is not supported for enum output."});if(null!=o)throw new E({parameter:"schemaName",value:o,message:"Schema name is not supported for enum output."});if(null==n)throw new E({parameter:"enumValues",value:n,message:"Enum values are required for enum output."});for(const e of n)if("string"!=typeof e)throw new E({parameter:"enumValues",value:e,message:"Enum values must be strings."})}}var yi=(0,ni.createIdGenerator)({prefix:"aiobj",size:24});async function vi(e){const{model:t,output:o="object",system:r,prompt:n,messages:i,maxRetries:s,abortSignal:a,headers:l,experimental_repairText:p,experimental_telemetry:u,experimental_download:d,providerOptions:c,_internal:{generateId:h=yi,currentDate:f=()=>new Date}={},...g}=e,m=Lt(t),y="enum"in e?e.enum:void 0,{schema:v,schemaDescription:C,schemaName:w}="schema"in e?e:{};mi({output:o,schema:v,schemaName:w,schemaDescription:C,enumValues:y});const{maxRetries:E,retry:_}=ur({maxRetries:s,abortSignal:a}),b=di({output:o,schema:v,enumValues:y}),R=fo(g),S=(0,ni.withUserAgentSuffix)(null!=l?l:{},`ai/${Jt}`),O=Uo({model:m,telemetry:u,headers:S,settings:{...R,maxRetries:E}}),T=Zo(u),P=await b.jsonSchema();try{return await Qo({name:"ai.generateObject",attributes:er({telemetry:u,attributes:{...zo({operationId:"ai.generateObject",telemetry:u}),...O,"ai.prompt":{input:()=>JSON.stringify({system:r,prompt:n,messages:i})},"ai.schema":null!=P?{input:()=>JSON.stringify(P)}:void 0,"ai.schema.name":w,"ai.schema.description":C,"ai.settings.output":b.type}}),tracer:T,fn:async e=>{var t;let o,s,l,y,v,E,A,I;const D=await Wo({system:r,prompt:n,messages:i}),N=await lo({prompt:D,supportedUrls:await m.supportedUrls,download:d}),x=await _((()=>Qo({name:"ai.generateObject.doGenerate",attributes:er({telemetry:u,attributes:{...zo({operationId:"ai.generateObject.doGenerate",telemetry:u}),...O,"ai.prompt.messages":{input:()=>tr(N)},"gen_ai.system":m.provider,"gen_ai.request.model":m.modelId,"gen_ai.request.frequency_penalty":R.frequencyPenalty,"gen_ai.request.max_tokens":R.maxOutputTokens,"gen_ai.request.presence_penalty":R.presencePenalty,"gen_ai.request.temperature":R.temperature,"gen_ai.request.top_k":R.topK,"gen_ai.request.top_p":R.topP}}),tracer:T,fn:async e=>{var t,o,r,n,i,s,l,p;const d=await m.doGenerate({responseFormat:{type:"json",schema:P,name:w,description:C},...fo(g),prompt:N,providerOptions:c,abortSignal:a,headers:S}),y={id:null!=(o=null==(t=d.response)?void 0:t.id)?o:h(),timestamp:null!=(n=null==(r=d.response)?void 0:r.timestamp)?n:f(),modelId:null!=(s=null==(i=d.response)?void 0:i.modelId)?s:m.modelId,headers:null==(l=d.response)?void 0:l.headers,body:null==(p=d.response)?void 0:p.body},v=gr(d.content),E=fr(d.content);if(void 0===v)throw new pe({message:"No object generated: the model did not return a response.",response:y,usage:or(d.usage),finishReason:d.finishReason.unified});return e.setAttributes(await er({telemetry:u,attributes:{"ai.response.finishReason":d.finishReason.unified,"ai.response.object":{output:()=>v},"ai.response.id":y.id,"ai.response.model":y.modelId,"ai.response.timestamp":y.timestamp.toISOString(),"ai.response.providerMetadata":JSON.stringify(d.providerMetadata),"ai.usage.promptTokens":d.usage.inputTokens.total,"ai.usage.completionTokens":d.usage.outputTokens.total,"gen_ai.response.finish_reasons":[d.finishReason.unified],"gen_ai.response.id":y.id,"gen_ai.response.model":y.modelId,"gen_ai.usage.input_tokens":d.usage.inputTokens.total,"gen_ai.usage.output_tokens":d.usage.outputTokens.total}})),{...d,objectText:v,reasoning:E,responseData:y}}})));o=x.objectText,s=x.finishReason.unified,l=or(x.usage),y=x.warnings,A=x.providerMetadata,E=null!=(t=x.request)?t:{},v=x.responseData,I=x.reasoning,Tt({warnings:y,provider:m.provider,model:m.modelId});const F=await gi(o,b,p,{response:v,usage:l,finishReason:s});return e.setAttributes(await er({telemetry:u,attributes:{"ai.response.finishReason":s,"ai.response.object":{output:()=>JSON.stringify(F)},"ai.response.providerMetadata":JSON.stringify(A),"ai.usage.promptTokens":l.inputTokens,"ai.usage.completionTokens":l.outputTokens}})),new Ci({object:F,reasoning:I,finishReason:s,usage:l,warnings:y,request:E,response:v,providerMetadata:A})}})}catch(e){throw Bo(e)}}var Ci=class{constructor(e){this.object=e.object,this.finishReason=e.finishReason,this.usage=e.usage,this.warnings=e.warnings,this.providerMetadata=e.providerMetadata,this.response=e.response,this.request=e.request,this.reasoning=e.reasoning}toJsonResponse(e){var t;return new Response(JSON.stringify(this.object),{status:null!=(t=null==e?void 0:e.status)?t:200,headers:Kr(null==e?void 0:e.headers,{"content-type":"application/json; charset=utf-8"})})}},wi=o(94192);function Ei(e,t){if(e.length!==t.length)throw new E({parameter:"vector1,vector2",value:{vector1Length:e.length,vector2Length:t.length},message:"Vectors must have the same length"});const o=e.length;if(0===o)return 0;let r=0,n=0,i=0;for(let s=0;s<o;s++){const o=e[s],a=t[s];r+=o*o,n+=a*a,i+=o*a}return 0===r||0===n?0:i/(Math.sqrt(r)*Math.sqrt(n))}function _i(e){return({url:t,abortSignal:o})=>Qt({url:t,maxBytes:null==e?void 0:e.maxBytes,abortSignal:o})}function bi(e){const[t,o]=e.split(",");if(null==t.split(";")[0].split(":")[1]||null==o)throw new Error("Invalid data URL format");try{return window.atob(o)}catch(e){throw new Error("Error decoding data URL")}}function Ri(e,t){if(e===t)return!0;if(null==e||null==t)return!1;if("object"!=typeof e&&"object"!=typeof t)return e===t;if(e.constructor!==t.constructor)return!1;if(e instanceof Date&&t instanceof Date)return e.getTime()===t.getTime();if(Array.isArray(e)){if(e.length!==t.length)return!1;for(let o=0;o<e.length;o++)if(!Ri(e[o],t[o]))return!1;return!0}const o=Object.keys(e),r=Object.keys(t);if(o.length!==r.length)return!1;for(const n of o){if(!r.includes(n))return!1;if(!Ri(e[n],t[n]))return!1}return!0}var Si=class{constructor(){this.queue=[],this.isProcessing=!1}async processQueue(){if(!this.isProcessing){for(this.isProcessing=!0;this.queue.length>0;)await this.queue[0](),this.queue.shift();this.isProcessing=!1}}async run(e){return new Promise(((t,o)=>{this.queue.push((async()=>{try{await e(),t()}catch(e){o(e)}})),this.processQueue()}))}},Oi=o(94192);function Ti({chunks:e,initialDelayInMs:t=0,chunkDelayInMs:o=0,_internal:r}){var n;const i=null!=(n=null==r?void 0:r.delay)?n:Oi.delay;let s=0;return new ReadableStream({async pull(r){s<e.length?(await i(0===s?t:o),r.enqueue(e[s++])):r.close()}})}var Pi=(0,wi.createIdGenerator)({prefix:"aiobj",size:24});function Ai(e){const{model:t,output:o="object",system:r,prompt:n,messages:i,maxRetries:s,abortSignal:a,headers:l,experimental_repairText:p,experimental_telemetry:u,experimental_download:d,providerOptions:c,onError:h=({error:e})=>{console.error(e)},onFinish:f,_internal:{generateId:g=Pi,currentDate:m=()=>new Date,now:y=On}={},...v}=e,C="enum"in e&&e.enum?e.enum:void 0,{schema:w,schemaDescription:E,schemaName:_}="schema"in e?e:{};mi({output:o,schema:w,schemaName:_,schemaDescription:E,enumValues:C});const b=di({output:o,schema:w,enumValues:C});return new Ii({model:t,telemetry:u,headers:l,settings:v,maxRetries:s,abortSignal:a,outputStrategy:b,system:r,prompt:n,messages:i,schemaName:_,schemaDescription:E,providerOptions:c,repairText:p,onError:h,onFinish:f,download:d,generateId:g,currentDate:m,now:y})}var Ii=class{constructor({model:e,headers:t,telemetry:o,settings:r,maxRetries:n,abortSignal:i,outputStrategy:s,system:a,prompt:l,messages:p,schemaName:u,schemaDescription:d,providerOptions:c,repairText:h,onError:f,onFinish:g,download:m,generateId:y,currentDate:v,now:C}){this._object=new wi.DelayedPromise,this._usage=new wi.DelayedPromise,this._providerMetadata=new wi.DelayedPromise,this._warnings=new wi.DelayedPromise,this._request=new wi.DelayedPromise,this._response=new wi.DelayedPromise,this._finishReason=new wi.DelayedPromise;const w=Lt(e),{maxRetries:E,retry:_}=ur({maxRetries:n,abortSignal:i}),b=fo(r),R=Uo({model:w,telemetry:o,headers:t,settings:{...b,maxRetries:E}}),S=Zo(o),O=this,T=Sn(),P=new TransformStream({transform(e,t){t.enqueue(e),"error"===e.type&&f({error:Bo(e.error)})}});this.baseStream=T.stream.pipeThrough(P),Qo({name:"ai.streamObject",attributes:er({telemetry:o,attributes:{...zo({operationId:"ai.streamObject",telemetry:o}),...R,"ai.prompt":{input:()=>JSON.stringify({system:a,prompt:l,messages:p})},"ai.schema":{input:async()=>JSON.stringify(await s.jsonSchema())},"ai.schema.name":u,"ai.schema.description":d,"ai.settings.output":s.type}}),tracer:S,endWhenDone:!1,fn:async e=>{const n=await Wo({system:a,prompt:l,messages:p}),f={responseFormat:{type:"json",schema:await s.jsonSchema(),name:u,description:d},...fo(r),prompt:await lo({prompt:n,supportedUrls:await w.supportedUrls,download:m}),providerOptions:c,abortSignal:i,headers:t,includeRawChunks:!1},{result:{stream:E,response:P,request:A},doStreamSpan:I,startTimestampMs:D}=await _((()=>Qo({name:"ai.streamObject.doStream",attributes:er({telemetry:o,attributes:{...zo({operationId:"ai.streamObject.doStream",telemetry:o}),...R,"ai.prompt.messages":{input:()=>tr(f.prompt)},"gen_ai.system":w.provider,"gen_ai.request.model":w.modelId,"gen_ai.request.frequency_penalty":b.frequencyPenalty,"gen_ai.request.max_tokens":b.maxOutputTokens,"gen_ai.request.presence_penalty":b.presencePenalty,"gen_ai.request.temperature":b.temperature,"gen_ai.request.top_k":b.topK,"gen_ai.request.top_p":b.topP}}),tracer:S,endWhenDone:!1,fn:async e=>({startTimestampMs:C(),doStreamSpan:e,result:await w.doStream(f)})})));let N;O._request.resolve(null!=A?A:{});let x,F,M,k,L,G,j={inputTokens:void 0,inputTokenDetails:{noCacheTokens:void 0,cacheReadTokens:void 0,cacheWriteTokens:void 0},outputTokens:void 0,outputTokenDetails:{textTokens:void 0,reasoningTokens:void 0},totalTokens:void 0,raw:void 0},W="",V="",H={id:y(),timestamp:v(),modelId:w.modelId},B=!0,z=!0;const U=E.pipeThrough(new TransformStream({transform:(e,t)=>{switch(e.type){case"text-delta":t.enqueue(e.delta);break;case"response-metadata":case"finish":case"error":case"stream-start":t.enqueue(e)}}})).pipeThrough(new TransformStream({async transform(e,t){var o,r,n;if("object"!=typeof e||"stream-start"!==e.type){if(B){const e=C()-D;B=!1,I.addEvent("ai.stream.firstChunk",{"ai.stream.msToFirstChunk":e}),I.setAttributes({"ai.stream.msToFirstChunk":e})}if("string"!=typeof e)switch(e.type){case"response-metadata":H={id:null!=(o=e.id)?o:H.id,timestamp:null!=(r=e.timestamp)?r:H.timestamp,modelId:null!=(n=e.modelId)?n:H.modelId};break;case"finish":""!==V&&t.enqueue({type:"text-delta",textDelta:V}),x=e.finishReason.unified,j=or(e.usage),F=e.providerMetadata,t.enqueue({...e,finishReason:e.finishReason.unified,usage:j,response:H}),Tt({warnings:null!=N?N:[],provider:w.provider,model:w.modelId}),O._usage.resolve(j),O._providerMetadata.resolve(F),O._warnings.resolve(N),O._response.resolve({...H,headers:null==P?void 0:P.headers}),O._finishReason.resolve(null!=x?x:"other");try{M=await gi(W,s,h,{response:H,usage:j,finishReason:x}),O._object.resolve(M)}catch(e){k=e,O._object.reject(e)}break;default:t.enqueue(e)}else{W+=e,V+=e;const{value:o,state:r}=await Sr(W);if(void 0!==o&&!Ri(L,o)){const e=await s.validatePartialResult({value:o,textDelta:V,latestObject:G,isFirstDelta:z,isFinalDelta:"successful-parse"===r});e.success&&!Ri(G,e.value.partial)&&(L=o,G=e.value.partial,t.enqueue({type:"object",object:G}),t.enqueue({type:"text-delta",textDelta:e.value.textDelta}),V="",z=!1)}}}else N=e.warnings},async flush(t){try{const t=null!=j?j:{promptTokens:NaN,completionTokens:NaN,totalTokens:NaN};I.setAttributes(await er({telemetry:o,attributes:{"ai.response.finishReason":x,"ai.response.object":{output:()=>JSON.stringify(M)},"ai.response.id":H.id,"ai.response.model":H.modelId,"ai.response.timestamp":H.timestamp.toISOString(),"ai.response.providerMetadata":JSON.stringify(F),"ai.usage.inputTokens":t.inputTokens,"ai.usage.outputTokens":t.outputTokens,"ai.usage.totalTokens":t.totalTokens,"ai.usage.reasoningTokens":t.reasoningTokens,"ai.usage.cachedInputTokens":t.cachedInputTokens,"gen_ai.response.finish_reasons":[x],"gen_ai.response.id":H.id,"gen_ai.response.model":H.modelId,"gen_ai.usage.input_tokens":t.inputTokens,"gen_ai.usage.output_tokens":t.outputTokens}})),I.end(),e.setAttributes(await er({telemetry:o,attributes:{"ai.usage.inputTokens":t.inputTokens,"ai.usage.outputTokens":t.outputTokens,"ai.usage.totalTokens":t.totalTokens,"ai.usage.reasoningTokens":t.reasoningTokens,"ai.usage.cachedInputTokens":t.cachedInputTokens,"ai.response.object":{output:()=>JSON.stringify(M)},"ai.response.providerMetadata":JSON.stringify(F)}})),await(null==g?void 0:g({usage:t,object:M,error:k,response:{...H,headers:null==P?void 0:P.headers},warnings:N,providerMetadata:F}))}catch(e){t.enqueue({type:"error",error:e})}finally{e.end()}}}));T.addStream(U)}}).catch((e=>{T.addStream(new ReadableStream({start(t){t.enqueue({type:"error",error:e}),t.close()}}))})).finally((()=>{T.close()})),this.outputStrategy=s}get object(){return this._object.promise}get usage(){return this._usage.promise}get providerMetadata(){return this._providerMetadata.promise}get warnings(){return this._warnings.promise}get request(){return this._request.promise}get response(){return this._response.promise}get finishReason(){return this._finishReason.promise}get partialObjectStream(){return _n(this.baseStream.pipeThrough(new TransformStream({transform(e,t){switch(e.type){case"object":t.enqueue(e.object);break;case"text-delta":case"finish":case"error":break;default:throw new Error(`Unsupported chunk type: ${e}`)}}})))}get elementStream(){return this.outputStrategy.createElementStream(this.baseStream)}get textStream(){return _n(this.baseStream.pipeThrough(new TransformStream({transform(e,t){switch(e.type){case"text-delta":t.enqueue(e.textDelta);break;case"object":case"finish":case"error":break;default:throw new Error(`Unsupported chunk type: ${e}`)}}})))}get fullStream(){return _n(this.baseStream)}pipeTextStreamToResponse(e,t){Qr({response:e,textStream:this.textStream,...t})}toTextStreamResponse(e){return Zr({textStream:this.textStream,...e})}},Di=o(94192),Ni=class extends yr{constructor({data:e,mediaType:t}){super({data:e,mediaType:t});let o="mp3";if(t){const e=t.split("/");2===e.length&&"audio/mpeg"!==t&&(o=e[1])}if(!o)throw new Error("Audio format must be provided or determinable from media type");this.format=o}};async function xi({model:e,text:t,voice:o,outputFormat:r,instructions:n,speed:i,language:s,providerOptions:a={},maxRetries:l,abortSignal:p,headers:u}){var d;const c=function(e){var t,o;if("string"!=typeof e){if("v3"!==e.specificationVersion&&"v2"!==e.specificationVersion){const t=e;throw new $e({version:t.specificationVersion,provider:t.provider,modelId:t.modelId})}return Mt(e)}return null==(o=(t=jt()).speechModel)?void 0:o.call(t,e)}(e);if(!c)throw new Error("Model could not be resolved");const h=(0,Di.withUserAgentSuffix)(null!=u?u:{},`ai/${Jt}`),{retry:f}=ur({maxRetries:l,abortSignal:p}),g=await f((()=>c.doGenerate({text:t,voice:o,outputFormat:r,instructions:n,speed:i,language:s,abortSignal:p,headers:h,providerOptions:a})));if(!g.audio||0===g.audio.length)throw new Ee({responses:[g.response]});return Tt({warnings:g.warnings,provider:c.provider,model:c.modelId}),new Fi({audio:new Ni({data:g.audio,mediaType:null!=(d=$t({data:g.audio,signatures:Ut}))?d:"audio/mp3"}),warnings:g.warnings,responses:[g.response],providerMetadata:g.providerMetadata})}var Fi=class{constructor(e){var t;this.audio=e.audio,this.warnings=e.warnings,this.responses=e.responses,this.providerMetadata=null!=(t=e.providerMetadata)?t:{}}};function Mi({messages:e,reasoning:t="none",toolCalls:o=[],emptyMessages:r="remove"}){"all"!==t&&"before-last-message"!==t||(e=e.map(((o,r)=>"assistant"!==o.role||"string"==typeof o.content||"before-last-message"===t&&r===e.length-1?o:{...o,content:o.content.filter((e=>"reasoning"!==e.type))}))),"none"===o?o=[]:"all"===o?o=[{type:"all"}]:"before-last-message"===o?o=[{type:"before-last-message"}]:"string"==typeof o&&(o=[{type:o}]);for(const t of o){const o="all"===t.type?void 0:"before-last-message"===t.type?1:Number(t.type.slice(12).slice(0,-9)),r=new Set,n=new Set;if(null!=o)for(const t of e.slice(-o))if(("assistant"===t.role||"tool"===t.role)&&"string"!=typeof t.content)for(const e of t.content)"tool-call"===e.type||"tool-result"===e.type?r.add(e.toolCallId):"tool-approval-request"!==e.type&&"tool-approval-response"!==e.type||n.add(e.approvalId);e=e.map(((i,s)=>{if("assistant"!==i.role&&"tool"!==i.role||"string"==typeof i.content||o&&s>=e.length-o)return i;const a={},l={};return{...i,content:i.content.filter((e=>"tool-call"!==e.type&&"tool-result"!==e.type&&"tool-approval-request"!==e.type&&"tool-approval-response"!==e.type||("tool-call"===e.type?a[e.toolCallId]=e.toolName:"tool-approval-request"===e.type&&(l[e.approvalId]=a[e.toolCallId]),!(("tool-call"!==e.type&&"tool-result"!==e.type||!r.has(e.toolCallId))&&("tool-approval-request"!==e.type&&"tool-approval-response"!==e.type||!n.has(e.approvalId)))||null!=t.tools&&!t.tools.includes("tool-call"===e.type||"tool-result"===e.type?e.toolName:l[e.approvalId]))))}}))}return"remove"===r&&(e=e.filter((e=>e.content.length>0))),e}var ki=o(94192),Li=o(10292),Gi={word:/\S+\s+/m,line:/\n+/m};function ji({delayInMs:e=10,chunking:t="word",_internal:{delay:o=ki.delay}={}}={}){let r;if(null!=t&&"object"==typeof t&&"segment"in t&&"function"==typeof t.segment){const e=t;r=t=>{if(0===t.length)return null;const o=e.segment(t)[Symbol.iterator]().next().value;return(null==o?void 0:o.segment)||null}}else if("function"==typeof t)r=e=>{const o=t(e);if(null==o)return null;if(!o.length)throw new Error("Chunking function must return a non-empty string.");if(!e.startsWith(o))throw new Error(`Chunking function must return a match that is a prefix of the buffer. Received: "${o}" expected to start with "${e}"`);return o};else{const e="string"==typeof t?Gi[t]:t instanceof RegExp?t:void 0;if(null==e)throw new Li.InvalidArgumentError({argument:"chunking",message:`Chunking must be "word", "line", a RegExp, an Intl.Segmenter, or a ChunkDetector function. Received: ${t}`});r=t=>{const o=e.exec(t);return o?t.slice(0,o.index)+(null==o?void 0:o[0]):null}}return()=>{let t,n,i="",s="";function a(e){i.length>0&&void 0!==t&&(e.enqueue({type:t,text:i,id:s,...null!=n?{providerMetadata:n}:{}}),i="",n=void 0)}return new TransformStream({async transform(l,p){if("text-delta"!==l.type&&"reasoning-delta"!==l.type)return a(p),void p.enqueue(l);let u;for((l.type!==t||l.id!==s)&&i.length>0&&a(p),i+=l.text,s=l.id,t=l.type,null!=l.providerMetadata&&(n=l.providerMetadata);null!=(u=r(i));)p.enqueue({type:t,text:u,id:s}),i=i.slice(u.length),await o(e)}})}}var Wi=o(94192),Vi=_i();async function Hi({model:e,prompt:t,n:o=1,maxVideosPerCall:r,aspectRatio:i,resolution:s,duration:a,fps:l,seed:p,providerOptions:u,maxRetries:d,abortSignal:c,headers:h,download:f=Vi}){var g;const m=function(e){if("string"==typeof e){const t=jt().videoModel;if(!t)throw new Error('The default provider does not support video models. Please use a Experimental_VideoModelV3 object from a provider (e.g., vertex.video("model-id")).');return t(e)}if("v3"!==e.specificationVersion){const t=e;throw new $e({version:t.specificationVersion,provider:t.provider,modelId:t.modelId})}return e}(e),y=(0,Wi.withUserAgentSuffix)(null!=h?h:{},`ai/${Jt}`),{retry:v}=ur({maxRetries:d,abortSignal:c}),{prompt:C,image:w}=function(e){var t,o;if("string"==typeof e)return{prompt:e,image:void 0};let r;if(null!=e.image){const n=e.image;if("string"==typeof n)if(n.startsWith("http://")||n.startsWith("https://"))r={type:"url",url:n};else if(n.startsWith("data:")){const{mediaType:e,base64Content:t}=ro(n);r={type:"file",mediaType:null!=e?e:"image/png",data:(0,Wi.convertBase64ToUint8Array)(null!=t?t:"")}}else{const e=(0,Wi.convertBase64ToUint8Array)(n);r={type:"file",mediaType:null!=(t=$t({data:e,signatures:zt}))?t:"image/png",data:e}}else n instanceof Uint8Array&&(r={type:"file",mediaType:null!=(o=$t({data:n,signatures:zt}))?o:"image/png",data:n})}return{prompt:e.text,image:r}}(t),E=null!=(g=null!=r?r:await async function(e){return"function"==typeof e.maxVideosPerCall?await e.maxVideosPerCall({modelId:e.modelId}):e.maxVideosPerCall}(m))?g:1,_=Math.ceil(o/E),b=Array.from({length:_},((e,t)=>{const r=o-t*E;return Math.min(r,E)})),R=await Promise.all(b.map((async e=>v((()=>m.doGenerate({prompt:C,n:e,aspectRatio:i,resolution:s,duration:a,fps:l,seed:p,image:w,providerOptions:null!=u?u:{},headers:y,abortSignal:c})))))),S=[],O=[],T=[],P={};for(const e of R){for(const t of e.videos)switch(t.type){case"url":{const{data:e,mediaType:o}=await f({url:new n(t.url),abortSignal:c}),r=e=>!!e&&"application/octet-stream"!==e,i=r(t.mediaType)&&t.mediaType||r(o)&&o||$t({data:e,signatures:Yt})||"video/mp4";S.push(new yr({data:e,mediaType:i}));break}case"base64":S.push(new yr({data:t.data,mediaType:t.mediaType||"video/mp4"}));break;case"binary":{const e=t.mediaType||$t({data:t.data,signatures:Yt})||"video/mp4";S.push(new yr({data:t.data,mediaType:e}));break}}if(O.push(...e.warnings),T.push({timestamp:e.response.timestamp,modelId:e.response.modelId,headers:e.response.headers,providerMetadata:e.providerMetadata}),null!=e.providerMetadata)for(const[t,o]of Object.entries(e.providerMetadata)){const e=P[t];null!=e&&"object"==typeof e?(P[t]={...e,...o},"videos"in e&&Array.isArray(e.videos)&&"videos"in o&&Array.isArray(o.videos)&&(P[t].videos=[...e.videos,...o.videos])):P[t]=o}}if(0===S.length)throw new xe({responses:T});return O.length>0&&Tt({warnings:O,provider:m.provider,model:m.modelId}),{video:S[0],videos:S,warnings:O,responses:T,providerMetadata:P}}function Bi({settings:e}){return{specificationVersion:"v3",transformParams:async({params:t})=>ir(e,t)}}function zi({settings:e}){return{specificationVersion:"v3",transformParams:async({params:t})=>ir(e,t)}}function Ui(e){return e.replace(/^```(?:json)?\s*\n?/,"").replace(/\n?```\s*$/,"").trim()}function Yi(e){var t;const o=null!=(t=null==e?void 0:e.transform)?t:Ui,r=void 0!==(null==e?void 0:e.transform);return{specificationVersion:"v3",wrapGenerate:async({doGenerate:e})=>{const{content:t,...r}=await e(),n=[];for(const e of t)"text"===e.type?n.push({...e,text:o(e.text)}):n.push(e);return{content:n,...r}},wrapStream:async({doStream:e})=>{const{stream:t,...n}=await e(),i={};return{stream:t.pipeThrough(new TransformStream({transform:(e,t)=>{if("text-start"!==e.type)if("text-delta"!==e.type){if("text-end"===e.type){const r=i[e.id];if(r){"prefix"!==r.phase&&"buffering"!==r.phase||t.enqueue(r.startEvent);let n=r.buffer;return n="buffering"===r.phase?o(n):r.prefixStripped?n.replace(/\n?```\s*$/,"").trimEnd():o(n),n.length>0&&t.enqueue({type:"text-delta",id:e.id,delta:n}),t.enqueue(e),void delete i[e.id]}}t.enqueue(e)}else{const o=i[e.id];if(!o)return void t.enqueue(e);if(o.buffer+=e.delta,"buffering"===o.phase)return;if("prefix"===o.phase)if(o.buffer.length>0&&!o.buffer.startsWith("`"))o.phase="streaming",t.enqueue(o.startEvent);else if(o.buffer.startsWith("```")){if(o.buffer.includes("\n")){const e=o.buffer.match(/^```(?:json)?\s*\n/);e?(o.buffer=o.buffer.slice(e[0].length),o.prefixStripped=!0,o.phase="streaming",t.enqueue(o.startEvent)):(o.phase="streaming",t.enqueue(o.startEvent))}}else o.buffer.length>=3&&!o.buffer.startsWith("```")&&(o.phase="streaming",t.enqueue(o.startEvent));if("streaming"===o.phase&&o.buffer.length>12){const r=o.buffer.slice(0,-12);o.buffer=o.buffer.slice(-12),t.enqueue({type:"text-delta",id:e.id,delta:r})}}else i[e.id]={startEvent:e,phase:r?"buffering":"prefix",buffer:"",prefixStripped:!1}}})),...n}}}}function qi(e,t){if(0===t.length)return null;const o=e.indexOf(t);if(-1!==o)return o;for(let o=e.length-1;o>=0;o--){const r=e.substring(o);if(t.startsWith(r))return o}return null}function $i({tagName:e,separator:t="\n",startWithReasoning:o=!1}){const r=`<${e}>`,n=`</${e}>`;return{specificationVersion:"v3",wrapGenerate:async({doGenerate:e})=>{const{content:i,...s}=await e(),a=[];for(const e of i){if("text"!==e.type){a.push(e);continue}const i=o?r+e.text:e.text,s=new RegExp(`${r}(.*?)${n}`,"gs"),l=Array.from(i.matchAll(s));if(!l.length){a.push(e);continue}const p=l.map((e=>e[1])).join(t);let u=i;for(let e=l.length-1;e>=0;e--){const o=l[e],r=u.slice(0,o.index),n=u.slice(o.index+o[0].length);u=r+(r.length>0&&n.length>0?t:"")+n}a.push({type:"reasoning",text:p}),a.push({type:"text",text:u})}return{content:a,...s}},wrapStream:async({doStream:e})=>{const{stream:i,...s}=await e(),a={};let l;return{stream:i.pipeThrough(new TransformStream({transform:(e,i)=>{if("text-start"===e.type)return void(l=e);if("text-end"===e.type&&l&&(i.enqueue(l),l=void 0),"text-delta"!==e.type)return void i.enqueue(e);null==a[e.id]&&(a[e.id]={isFirstReasoning:!0,isFirstText:!0,afterSwitch:!1,isReasoning:o,buffer:"",idCounter:0,textId:e.id});const s=a[e.id];function p(e){if(e.length>0){const o=!s.afterSwitch||(s.isReasoning?s.isFirstReasoning:s.isFirstText)?"":t;s.isReasoning&&(s.afterSwitch||s.isFirstReasoning)&&i.enqueue({type:"reasoning-start",id:`reasoning-${s.idCounter}`}),s.isReasoning?i.enqueue({type:"reasoning-delta",delta:o+e,id:`reasoning-${s.idCounter}`}):(l&&(i.enqueue(l),l=void 0),i.enqueue({type:"text-delta",delta:o+e,id:s.textId})),s.afterSwitch=!1,s.isReasoning?s.isFirstReasoning=!1:s.isFirstText=!1}}for(s.buffer+=e.delta;;){const e=s.isReasoning?n:r,t=qi(s.buffer,e);if(null==t){p(s.buffer),s.buffer="";break}if(p(s.buffer.slice(0,t)),!(t+e.length<=s.buffer.length)){s.buffer=s.buffer.slice(t);break}s.buffer=s.buffer.slice(t+e.length),s.isReasoning&&(s.isFirstReasoning&&i.enqueue({type:"reasoning-start",id:`reasoning-${s.idCounter}`}),i.enqueue({type:"reasoning-end",id:"reasoning-"+s.idCounter++})),s.isReasoning=!s.isReasoning,s.afterSwitch=!0}}})),...s}}}}function Ki(){return{specificationVersion:"v3",wrapStream:async({doGenerate:e})=>{const t=await e();let o=0;return{stream:new ReadableStream({start(e){e.enqueue({type:"stream-start",warnings:t.warnings}),e.enqueue({type:"response-metadata",...t.response});for(const r of t.content)switch(r.type){case"text":r.text.length>0&&(e.enqueue({type:"text-start",id:String(o)}),e.enqueue({type:"text-delta",id:String(o),delta:r.text}),e.enqueue({type:"text-end",id:String(o)}),o++);break;case"reasoning":e.enqueue({type:"reasoning-start",id:String(o),providerMetadata:r.providerMetadata}),e.enqueue({type:"reasoning-delta",id:String(o),delta:r.text}),e.enqueue({type:"reasoning-end",id:String(o)}),o++;break;default:e.enqueue(r)}e.enqueue({type:"finish",finishReason:t.finishReason,usage:t.usage,providerMetadata:t.providerMetadata}),e.close()}}),request:t.request,response:t.response}}}}function Zi(e){return JSON.stringify(e.input)}function Ji({prefix:e="Input Examples:",format:t=Zi,remove:o=!0}={}){return{specificationVersion:"v3",transformParams:async({params:r})=>{var n;if(!(null==(n=r.tools)?void 0:n.length))return r;const i=r.tools.map((r=>{var n;if("function"!==r.type||!(null==(n=r.inputExamples)?void 0:n.length))return r;const i=r.inputExamples.map(((e,o)=>t(e,o))).join("\n"),s=`${e}\n${i}`,a=r.description?`${r.description}\n\n${s}`:s;return{...r,description:a,inputExamples:o?void 0:r.inputExamples}}));return{...r,tools:i}}}}var Qi=({model:e,middleware:t,modelId:o,providerId:r})=>[...ao(t)].reverse().reduce(((e,t)=>Xi({model:e,middleware:t,modelId:o,providerId:r})),e),Xi=({model:e,middleware:{transformParams:t,wrapGenerate:o,wrapStream:r,overrideProvider:n,overrideModelId:i,overrideSupportedUrls:s},modelId:a,providerId:l})=>{var p,u,d;async function c({params:o,type:r}){return t?await t({params:o,type:r,model:e}):o}return{specificationVersion:"v3",provider:null!=(p=null!=l?l:null==n?void 0:n({model:e}))?p:e.provider,modelId:null!=(u=null!=a?a:null==i?void 0:i({model:e}))?u:e.modelId,supportedUrls:null!=(d=null==s?void 0:s({model:e}))?d:e.supportedUrls,async doGenerate(t){const r=await c({params:t,type:"generate"}),n=async()=>e.doGenerate(r);return o?o({doGenerate:n,doStream:async()=>e.doStream(r),params:r,model:e}):n()},async doStream(t){const o=await c({params:t,type:"stream"}),n=async()=>e.doStream(o);return r?r({doGenerate:async()=>e.doGenerate(o),doStream:n,params:o,model:e}):n()}}},es=({model:e,middleware:t,modelId:o,providerId:r})=>[...ao(t)].reverse().reduce(((e,t)=>ts({model:e,middleware:t,modelId:o,providerId:r})),e),ts=({model:e,middleware:{transformParams:t,wrapEmbed:o,overrideProvider:r,overrideModelId:n,overrideMaxEmbeddingsPerCall:i,overrideSupportsParallelCalls:s},modelId:a,providerId:l})=>{var p,u,d,c;return{specificationVersion:"v3",provider:null!=(p=null!=l?l:null==r?void 0:r({model:e}))?p:e.provider,modelId:null!=(u=null!=a?a:null==n?void 0:n({model:e}))?u:e.modelId,maxEmbeddingsPerCall:null!=(d=null==i?void 0:i({model:e}))?d:e.maxEmbeddingsPerCall,supportsParallelCalls:null!=(c=null==s?void 0:s({model:e}))?c:e.supportsParallelCalls,async doEmbed(r){const n=await async function({params:o}){return t?await t({params:o,model:e}):o}({params:r}),i=async()=>e.doEmbed(n);return o?o({doEmbed:i,params:n,model:e}):i()}}},os=({model:e,middleware:t,modelId:o,providerId:r})=>[...ao(t)].reverse().reduce(((e,t)=>rs({model:e,middleware:t,modelId:o,providerId:r})),e),rs=({model:e,middleware:{transformParams:t,wrapGenerate:o,overrideProvider:r,overrideModelId:n,overrideMaxImagesPerCall:i},modelId:s,providerId:a})=>{var l,p,u;const d=null!=(l=null==i?void 0:i({model:e}))?l:e.maxImagesPerCall,c=d instanceof Function?d.bind(e):d;return{specificationVersion:"v3",provider:null!=(p=null!=a?a:null==r?void 0:r({model:e}))?p:e.provider,modelId:null!=(u=null!=s?s:null==n?void 0:n({model:e}))?u:e.modelId,maxImagesPerCall:c,async doGenerate(r){const n=await async function({params:o}){return t?await t({params:o,model:e}):o}({params:r}),i=async()=>e.doGenerate(n);return o?o({doGenerate:i,params:n,model:e}):i()}}};function ns(e){if("specificationVersion"in e&&"v3"===e.specificationVersion)return e;const t=e;return{specificationVersion:"v3",languageModel:e=>Nt(t.languageModel(e)),embeddingModel:e=>It(t.textEmbeddingModel(e)),imageModel:e=>Dt(t.imageModel(e)),transcriptionModel:t.transcriptionModel?e=>kt(t.transcriptionModel(e)):void 0,speechModel:t.speechModel?e=>Mt(t.speechModel(e)):void 0,rerankingModel:void 0}}function is({provider:e,languageModelMiddleware:t,imageModelMiddleware:o}){const r=ns(e);return{specificationVersion:"v3",languageModel:e=>Qi({model:r.languageModel(e),middleware:t}),embeddingModel:r.embeddingModel,imageModel:e=>{let t=r.imageModel(e);return null!=o&&(t=os({model:t,middleware:o})),t},transcriptionModel:r.transcriptionModel,speechModel:r.speechModel,rerankingModel:r.rerankingModel}}var ss=o(10292);function as({languageModels:e,embeddingModels:t,imageModels:o,transcriptionModels:r,speechModels:n,rerankingModels:i,videoModels:s,fallbackProvider:a}){const l=a?ns(a):void 0;return{specificationVersion:"v3",languageModel(t){if(null!=e&&t in e)return e[t];if(l)return l.languageModel(t);throw new ss.NoSuchModelError({modelId:t,modelType:"languageModel"})},embeddingModel(e){if(null!=t&&e in t)return t[e];if(l)return l.embeddingModel(e);throw new ss.NoSuchModelError({modelId:e,modelType:"embeddingModel"})},imageModel(e){if(null!=o&&e in o)return o[e];if(null==l?void 0:l.imageModel)return l.imageModel(e);throw new ss.NoSuchModelError({modelId:e,modelType:"imageModel"})},transcriptionModel(e){if(null!=r&&e in r)return r[e];if(null==l?void 0:l.transcriptionModel)return l.transcriptionModel(e);throw new ss.NoSuchModelError({modelId:e,modelType:"transcriptionModel"})},speechModel(e){if(null!=n&&e in n)return n[e];if(null==l?void 0:l.speechModel)return l.speechModel(e);throw new ss.NoSuchModelError({modelId:e,modelType:"speechModel"})},rerankingModel(e){if(null!=i&&e in i)return i[e];if(null==l?void 0:l.rerankingModel)return l.rerankingModel(e);throw new ss.NoSuchModelError({modelId:e,modelType:"rerankingModel"})},videoModel(e){if(null!=s&&e in s)return s[e];const t=null==l?void 0:l.videoModel;if(t)return t(e);throw new ss.NoSuchModelError({modelId:e,modelType:"videoModel"})}}}var ls,ps=as,us=o(10292),ds="AI_NoSuchProviderError",cs=`vercel.ai.error.${ds}`,hs=Symbol.for(cs),fs=class extends us.NoSuchModelError{constructor({modelId:e,modelType:t,providerId:o,availableProviders:r,message:n=`No such provider: ${o} (available providers: ${r.join()})`}){super({errorName:ds,modelId:e,modelType:t,message:n}),this[ls]=!0,this.providerId=o,this.availableProviders=r}static isInstance(e){return us.AISDKError.hasMarker(e,cs)}};ls=hs;var gs=o(10292);function ms(e,{separator:t=":",languageModelMiddleware:o,imageModelMiddleware:r}={}){const n=new vs({separator:t,languageModelMiddleware:o,imageModelMiddleware:r});for(const[t,o]of Object.entries(e))n.registerProvider({id:t,provider:o});return n}var ys=ms,vs=class{constructor({separator:e,languageModelMiddleware:t,imageModelMiddleware:o}){this.providers={},this.separator=e,this.languageModelMiddleware=t,this.imageModelMiddleware=o}registerProvider({id:e,provider:t}){this.providers[e]=t}getProvider(e,t){const o=this.providers[e];if(null==o)throw new fs({modelId:e,modelType:t,providerId:e,availableProviders:Object.keys(this.providers)});return o}splitId(e,t){const o=e.indexOf(this.separator);if(-1===o)throw new gs.NoSuchModelError({modelId:e,modelType:t,message:`Invalid ${t} id for registry: ${e} (must be in the format "providerId${this.separator}modelId")`});return[e.slice(0,o),e.slice(o+this.separator.length)]}languageModel(e){var t,o;const[r,n]=this.splitId(e,"languageModel");let i=null==(o=(t=this.getProvider(r,"languageModel")).languageModel)?void 0:o.call(t,n);if(null==i)throw new gs.NoSuchModelError({modelId:e,modelType:"languageModel"});return null!=this.languageModelMiddleware&&(i=Qi({model:i,middleware:this.languageModelMiddleware})),i}embeddingModel(e){var t;const[o,r]=this.splitId(e,"embeddingModel"),n=this.getProvider(o,"embeddingModel"),i=null==(t=n.embeddingModel)?void 0:t.call(n,r);if(null==i)throw new gs.NoSuchModelError({modelId:e,modelType:"embeddingModel"});return i}imageModel(e){var t;const[o,r]=this.splitId(e,"imageModel"),n=this.getProvider(o,"imageModel");let i=null==(t=n.imageModel)?void 0:t.call(n,r);if(null==i)throw new gs.NoSuchModelError({modelId:e,modelType:"imageModel"});return null!=this.imageModelMiddleware&&(i=os({model:i,middleware:this.imageModelMiddleware})),i}transcriptionModel(e){var t;const[o,r]=this.splitId(e,"transcriptionModel"),n=this.getProvider(o,"transcriptionModel"),i=null==(t=n.transcriptionModel)?void 0:t.call(n,r);if(null==i)throw new gs.NoSuchModelError({modelId:e,modelType:"transcriptionModel"});return i}speechModel(e){var t;const[o,r]=this.splitId(e,"speechModel"),n=this.getProvider(o,"speechModel"),i=null==(t=n.speechModel)?void 0:t.call(n,r);if(null==i)throw new gs.NoSuchModelError({modelId:e,modelType:"speechModel"});return i}rerankingModel(e){var t;const[o,r]=this.splitId(e,"rerankingModel"),n=this.getProvider(o,"rerankingModel"),i=null==(t=n.rerankingModel)?void 0:t.call(n,r);if(null==i)throw new gs.NoSuchModelError({modelId:e,modelType:"rerankingModel"});return i}};async function Cs({model:e,documents:t,query:o,topN:r,maxRetries:n,abortSignal:i,headers:s,providerOptions:a,experimental_telemetry:l}){if(0===t.length)return new ws({originalDocuments:[],ranking:[],providerMetadata:void 0,response:{timestamp:new Date,modelId:e.modelId}});const{maxRetries:p,retry:u}=ur({maxRetries:n,abortSignal:i}),d="string"==typeof t[0]?{type:"text",values:t}:{type:"object",values:t},c=Uo({model:e,telemetry:l,headers:s,settings:{maxRetries:p}}),h=Zo(l);return Qo({name:"ai.rerank",attributes:er({telemetry:l,attributes:{...zo({operationId:"ai.rerank",telemetry:l}),...c,"ai.documents":{input:()=>t.map((e=>JSON.stringify(e)))}}}),tracer:h,fn:async()=>{var n,p;const{ranking:f,response:g,providerMetadata:m,warnings:y}=await u((()=>Qo({name:"ai.rerank.doRerank",attributes:er({telemetry:l,attributes:{...zo({operationId:"ai.rerank.doRerank",telemetry:l}),...c,"ai.documents":{input:()=>t.map((e=>JSON.stringify(e)))}}}),tracer:h,fn:async t=>{const n=await e.doRerank({documents:d,query:o,topN:r,providerOptions:a,abortSignal:i,headers:s}),p=n.ranking;return t.setAttributes(await er({telemetry:l,attributes:{"ai.ranking.type":d.type,"ai.ranking":{output:()=>p.map((e=>JSON.stringify(e)))}}})),{ranking:p,providerMetadata:n.providerMetadata,response:n.response,warnings:n.warnings}}})));return Tt({warnings:null!=y?y:[],provider:e.provider,model:e.modelId}),new ws({originalDocuments:t,ranking:f.map((e=>({originalIndex:e.index,score:e.relevanceScore,document:t[e.index]}))),providerMetadata:m,response:{id:null==g?void 0:g.id,timestamp:null!=(n=null==g?void 0:g.timestamp)?n:new Date,modelId:null!=(p=null==g?void 0:g.modelId)?p:e.modelId,headers:null==g?void 0:g.headers,body:null==g?void 0:g.body}})}})}var ws=class{constructor(e){this.originalDocuments=e.originalDocuments,this.ranking=e.ranking,this.response=e.response,this.providerMetadata=e.providerMetadata}get rerankedDocuments(){return this.ranking.map((e=>e.document))}},Es=o(94192),_s=_i();async function bs({model:e,audio:t,providerOptions:o={},maxRetries:r,abortSignal:i,headers:s,download:a=_s}){const l=function(e){var t,o;if("string"!=typeof e){if("v3"!==e.specificationVersion&&"v2"!==e.specificationVersion){const t=e;throw new $e({version:t.specificationVersion,provider:t.provider,modelId:t.modelId})}return kt(e)}return null==(o=(t=jt()).transcriptionModel)?void 0:o.call(t,e)}(e);if(!l)throw new Error("Model could not be resolved");const{retry:p}=ur({maxRetries:r,abortSignal:i}),u=(0,Es.withUserAgentSuffix)(null!=s?s:{},`ai/${Jt}`),d=t instanceof n?(await a({url:t,abortSignal:i})).data:so(t),c=await p((()=>{var e;return l.doGenerate({audio:d,abortSignal:i,headers:u,providerOptions:o,mediaType:null!=(e=$t({data:d,signatures:Ut}))?e:"audio/wav"})}));if(Tt({warnings:c.warnings,provider:l.provider,model:l.modelId}),!c.text)throw new Te({responses:[c.response]});return new Rs({text:c.text,segments:c.segments,language:c.language,durationInSeconds:c.durationInSeconds,warnings:c.warnings,responses:[c.response],providerMetadata:c.providerMetadata})}var Rs=class{constructor(e){var t;this.text=e.text,this.segments=e.segments,this.language=e.language,this.durationInSeconds=e.durationInSeconds,this.warnings=e.warnings,this.responses=e.responses,this.providerMetadata=null!=(t=e.providerMetadata)?t:{}}},Ss=o(94192),Os=()=>fetch;async function Ts({api:e,prompt:t,credentials:o,headers:r,body:n,streamProtocol:i="data",setCompletion:s,setLoading:a,setError:l,setAbortController:p,onFinish:u,onError:d,fetch:c=Os()}){var h;try{a(!0),l(void 0);const d=new AbortController;p(d),s("");const f=await c(e,{method:"POST",body:JSON.stringify({prompt:t,...n}),credentials:o,headers:(0,Ss.withUserAgentSuffix)({"Content-Type":"application/json",...r},`ai-sdk/${Jt}`,(0,Ss.getRuntimeEnvironmentUserAgent)()),signal:d.signal}).catch((e=>{throw e}));if(!f.ok)throw new Error(null!=(h=await f.text())?h:"Failed to fetch the chat response.");if(!f.body)throw new Error("The response body is empty.");let g="";switch(i){case"text":await async function({stream:e,onTextPart:t}){const o=e.pipeThrough(new TextDecoderStream).getReader();for(;;){const{done:e,value:r}=await o.read();if(e)break;await t(r)}}({stream:f.body,onTextPart:e=>{g+=e,s(g)}});break;case"data":await bn({stream:(0,Ss.parseJsonEventStream)({stream:f.body,schema:sn}).pipeThrough(new TransformStream({async transform(e){if(!e.success)throw e.error;const t=e.value;if("text-delta"===t.type)g+=t.delta,s(g);else if("error"===t.type)throw new Error(t.errorText)}})),onError:e=>{throw e}});break;default:throw new Error(`Unknown stream protocol: ${i}`)}return u&&u(t,g),p(null),g}catch(e){if("AbortError"===e.name)return p(null),null;e instanceof Error&&d&&d(e),l(e)}finally{a(!1)}}var Ps=o(94192);async function As(e){if(null==e)return[];if(!(globalThis.FileList&&e instanceof globalThis.FileList))throw new Error("FileList is not supported in the current environment");return Promise.all(Array.from(e).map((async e=>{const{name:t,type:o}=e;return{type:"file",mediaType:o,filename:t,url:await new Promise(((t,o)=>{const r=new FileReader;r.onload=e=>{var o;t(null==(o=e.target)?void 0:o.result)},r.onerror=e=>o(e),r.readAsDataURL(e)}))}})))}var Is=o(94192),Ds=o(94192),Ns=class{constructor({api:e="/api/chat",credentials:t,headers:o,body:r,fetch:n,prepareSendMessagesRequest:i,prepareReconnectToStreamRequest:s}){this.api=e,this.credentials=t,this.headers=o,this.body=r,this.fetch=n,this.prepareSendMessagesRequest=i,this.prepareReconnectToStreamRequest=s}async sendMessages({abortSignal:e,...t}){var o,r,n,i,s;const a=await(0,Ds.resolve)(this.body),l=await(0,Ds.resolve)(this.headers),p=await(0,Ds.resolve)(this.credentials),u={...(0,Ds.normalizeHeaders)(l),...(0,Ds.normalizeHeaders)(t.headers)},d=await(null==(o=this.prepareSendMessagesRequest)?void 0:o.call(this,{api:this.api,id:t.chatId,messages:t.messages,body:{...a,...t.body},headers:u,credentials:p,requestMetadata:t.metadata,trigger:t.trigger,messageId:t.messageId})),c=null!=(r=null==d?void 0:d.api)?r:this.api,h=void 0!==(null==d?void 0:d.headers)?(0,Ds.normalizeHeaders)(d.headers):u,f=void 0!==(null==d?void 0:d.body)?d.body:{...a,...t.body,id:t.chatId,messages:t.messages,trigger:t.trigger,messageId:t.messageId},g=null!=(n=null==d?void 0:d.credentials)?n:p,m=null!=(i=this.fetch)?i:globalThis.fetch,y=await m(c,{method:"POST",headers:(0,Ds.withUserAgentSuffix)({"Content-Type":"application/json",...h},`ai-sdk/${Jt}`,(0,Ds.getRuntimeEnvironmentUserAgent)()),body:JSON.stringify(f),credentials:g,signal:e});if(!y.ok)throw new Error(null!=(s=await y.text())?s:"Failed to fetch the chat response.");if(!y.body)throw new Error("The response body is empty.");return this.processResponseStream(y.body)}async reconnectToStream(e){var t,o,r,n,i;const s=await(0,Ds.resolve)(this.body),a=await(0,Ds.resolve)(this.headers),l=await(0,Ds.resolve)(this.credentials),p={...(0,Ds.normalizeHeaders)(a),...(0,Ds.normalizeHeaders)(e.headers)},u=await(null==(t=this.prepareReconnectToStreamRequest)?void 0:t.call(this,{api:this.api,id:e.chatId,body:{...s,...e.body},headers:p,credentials:l,requestMetadata:e.metadata})),d=null!=(o=null==u?void 0:u.api)?o:`${this.api}/${e.chatId}/stream`,c=void 0!==(null==u?void 0:u.headers)?(0,Ds.normalizeHeaders)(u.headers):p,h=null!=(r=null==u?void 0:u.credentials)?r:l,f=null!=(n=this.fetch)?n:globalThis.fetch,g=await f(d,{method:"GET",headers:(0,Ds.withUserAgentSuffix)(c,`ai-sdk/${Jt}`,(0,Ds.getRuntimeEnvironmentUserAgent)()),credentials:h});if(204===g.status)return null;if(!g.ok)throw new Error(null!=(i=await g.text())?i:"Failed to fetch the chat response.");if(!g.body)throw new Error("The response body is empty.");return this.processResponseStream(g.body)}},xs=class extends Ns{constructor(e={}){super(e)}processResponseStream(e){return(0,Is.parseJsonEventStream)({stream:e,schema:sn}).pipeThrough(new TransformStream({async transform(e,t){if(!e.success)throw e.error;t.enqueue(e.value)}}))}},Fs=class{constructor({generateId:e=Ps.generateId,id:t=e(),transport:o=new xs,messageMetadataSchema:r,dataPartSchemas:n,state:i,onError:s,onToolCall:a,onFinish:l,onData:p,sendAutomaticallyWhen:u}){this.activeResponse=void 0,this.jobExecutor=new Si,this.sendMessage=async(e,t)=>{var o,r,n,i;if(null==e)return void await this.makeRequest({trigger:"submit-message",messageId:null==(o=this.lastMessage)?void 0:o.id,...t});let s;if(s="text"in e||"files"in e?{parts:[...Array.isArray(e.files)?e.files:await As(e.files),..."text"in e&&null!=e.text?[{type:"text",text:e.text}]:[]]}:e,null!=e.messageId){const t=this.state.messages.findIndex((t=>t.id===e.messageId));if(-1===t)throw new Error(`message with id ${e.messageId} not found`);if("user"!==this.state.messages[t].role)throw new Error(`message with id ${e.messageId} is not a user message`);this.state.messages=this.state.messages.slice(0,t+1),this.state.replaceMessage(t,{...s,id:e.messageId,role:null!=(r=s.role)?r:"user",metadata:e.metadata})}else this.state.pushMessage({...s,id:null!=(n=s.id)?n:this.generateId(),role:null!=(i=s.role)?i:"user",metadata:e.metadata});await this.makeRequest({trigger:"submit-message",messageId:e.messageId,...t})},this.regenerate=async({messageId:e,...t}={})=>{const o=null==e?this.state.messages.length-1:this.state.messages.findIndex((t=>t.id===e));if(-1===o)throw new Error(`message ${e} not found`);this.state.messages=this.state.messages.slice(0,"assistant"===this.messages[o].role?o:o+1),await this.makeRequest({trigger:"regenerate-message",messageId:e,...t})},this.resumeStream=async(e={})=>{await this.makeRequest({trigger:"resume-stream",...e})},this.clearError=()=>{"error"===this.status&&(this.state.error=void 0,this.setStatus({status:"ready"}))},this.addToolApprovalResponse=async({id:e,approved:t,reason:o})=>this.jobExecutor.run((async()=>{const r=this.state.messages,n=r[r.length-1],i=r=>hn(r)&&"approval-requested"===r.state&&r.approval.id===e?{...r,state:"approval-responded",approval:{id:e,approved:t,reason:o}}:r;this.state.replaceMessage(r.length-1,{...n,parts:n.parts.map(i)}),this.activeResponse&&(this.activeResponse.state.message.parts=this.activeResponse.state.message.parts.map(i)),"streaming"!==this.status&&"submitted"!==this.status&&this.sendAutomaticallyWhen&&this.shouldSendAutomatically().then((e=>{var t;e&&this.makeRequest({trigger:"submit-message",messageId:null==(t=this.lastMessage)?void 0:t.id})}))})),this.addToolOutput=async({state:e="output-available",tool:t,toolCallId:o,output:r,errorText:n})=>this.jobExecutor.run((async()=>{const t=this.state.messages,i=t[t.length-1],s=t=>hn(t)&&t.toolCallId===o?{...t,state:e,output:r,errorText:n}:t;this.state.replaceMessage(t.length-1,{...i,parts:i.parts.map(s)}),this.activeResponse&&(this.activeResponse.state.message.parts=this.activeResponse.state.message.parts.map(s)),"streaming"!==this.status&&"submitted"!==this.status&&this.sendAutomaticallyWhen&&this.shouldSendAutomatically().then((e=>{var t;e&&this.makeRequest({trigger:"submit-message",messageId:null==(t=this.lastMessage)?void 0:t.id})}))})),this.addToolResult=this.addToolOutput,this.stop=async()=>{var e;"streaming"!==this.status&&"submitted"!==this.status||(null==(e=this.activeResponse)?void 0:e.abortController)&&this.activeResponse.abortController.abort()},this.id=t,this.transport=o,this.generateId=e,this.messageMetadataSchema=r,this.dataPartSchemas=n,this.state=i,this.onError=s,this.onToolCall=a,this.onFinish=l,this.onData=p,this.sendAutomaticallyWhen=u}get status(){return this.state.status}setStatus({status:e,error:t}){this.status!==e&&(this.state.status=e,this.state.error=t)}get error(){return this.state.error}get messages(){return this.state.messages}get lastMessage(){return this.state.messages[this.state.messages.length-1]}set messages(e){this.state.messages=e}async shouldSendAutomatically(){if(!this.sendAutomaticallyWhen)return!1;const e=this.sendAutomaticallyWhen({messages:this.state.messages});return e&&"object"==typeof e&&"then"in e?await e:e}async makeRequest({trigger:e,metadata:t,headers:o,body:r,messageId:n}){var i,s,a;this.setStatus({status:"submitted",error:void 0});const l=this.lastMessage;let p=!1,u=!1,d=!1;try{const i={state:vn({lastMessage:this.state.snapshot(l),messageId:this.generateId()}),abortController:new AbortController};let s;if(i.abortController.signal.addEventListener("abort",(()=>{p=!0})),this.activeResponse=i,"resume-stream"===e){const e=await this.transport.reconnectToStream({chatId:this.id,metadata:t,headers:o,body:r});if(null==e)return void this.setStatus({status:"ready"});s=e}else s=await this.transport.sendMessages({chatId:this.id,messages:this.state.messages,abortSignal:i.abortController.signal,metadata:t,headers:o,body:r,trigger:e,messageId:n});const a=e=>this.jobExecutor.run((()=>e({state:i.state,write:()=>{var e;this.setStatus({status:"streaming"}),i.state.message.id===(null==(e=this.lastMessage)?void 0:e.id)?this.state.replaceMessage(this.state.messages.length-1,i.state.message):this.state.pushMessage(i.state.message)}})));await bn({stream:Cn({stream:s,onToolCall:this.onToolCall,onData:this.onData,messageMetadataSchema:this.messageMetadataSchema,dataPartSchemas:this.dataPartSchemas,runUpdateMessageJob:a,onError:e=>{throw e}}),onError:e=>{throw e}}),this.setStatus({status:"ready"})}catch(e){if(p||"AbortError"===e.name)return p=!0,this.setStatus({status:"ready"}),null;d=!0,e instanceof TypeError&&(e.message.toLowerCase().includes("fetch")||e.message.toLowerCase().includes("network"))&&(u=!0),this.onError&&e instanceof Error&&this.onError(e),this.setStatus({status:"error",error:e})}finally{try{null==(s=this.onFinish)||s.call(this,{message:this.activeResponse.state.message,messages:this.state.messages,isAbort:p,isDisconnect:u,isError:d,finishReason:null==(i=this.activeResponse)?void 0:i.state.finishReason})}catch(e){console.error(e)}this.activeResponse=void 0}!d&&await this.shouldSendAutomatically()&&await this.makeRequest({trigger:"submit-message",messageId:null==(a=this.lastMessage)?void 0:a.id,metadata:t,headers:o,body:r})}},Ms=class{constructor({agent:e,options:t,...o}){this.agent=e,this.agentOptions=t,this.uiMessageStreamOptions=o}async sendMessages({messages:e,abortSignal:t}){const o=await Hn({messages:e,tools:this.agent.tools}),r=await kn(o,{tools:this.agent.tools});return(await this.agent.stream({prompt:r,abortSignal:t,...void 0!==this.agentOptions?{options:this.agentOptions}:{}})).toUIMessageStream(this.uiMessageStreamOptions)}async reconnectToStream(e){return null}};function ks({messages:e}){const t=e[e.length-1];if(!t)return!1;if("assistant"!==t.role)return!1;const o=t.parts.reduce(((e,t,o)=>"step-start"===t.type?o:e),-1),r=t.parts.slice(o+1).filter(hn).filter((e=>!e.providerExecuted));return r.filter((e=>"approval-responded"===e.state)).length>0&&r.every((e=>"output-available"===e.state||"output-error"===e.state||"approval-responded"===e.state))}function Ls({messages:e}){const t=e[e.length-1];if(!t)return!1;if("assistant"!==t.role)return!1;const o=t.parts.reduce(((e,t,o)=>"step-start"===t.type?o:e),-1),r=t.parts.slice(o+1).filter(hn).filter((e=>!e.providerExecuted));return r.length>0&&r.every((e=>"output-available"===e.state||"output-error"===e.state))}var Gs=class extends Ns{constructor(e={}){super(e)}processResponseStream(e){return function({stream:e}){return e.pipeThrough(new TransformStream({start(e){e.enqueue({type:"start"}),e.enqueue({type:"start-step"}),e.enqueue({type:"text-start",id:"text-1"})},async transform(e,t){t.enqueue({type:"text-delta",id:"text-1",delta:e})},async flush(e){e.enqueue({type:"text-end",id:"text-1"}),e.enqueue({type:"finish-step"}),e.enqueue({type:"finish"})}}))}({stream:e.pipeThrough(new TextDecoderStream)})}}},7760:(e,t,o)=>{Object.defineProperty(t,"__esModule",{value:!0});var r=o(83423);t.simpleHttpRequest=function(e){return new r.Promise((function(t){var o=new XMLHttpRequest;o.open("GET",e.url),o.send(),o.onreadystatechange=function(){if(4==o.readyState&&200==o.status){var e=JSON.parse(o.responseText);t(e)}}}))}},7897:function(e,t,o){var r=this&&this.__decorate||function(e,t,o,r){var n,i=arguments.length,s=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,o):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,o,r);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(s=(i<3?n(s):i>3?n(t,o,s):n(t,o))||s);return i>3&&s&&Object.defineProperty(t,o,s),s},n=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},i=this&&this.__param||function(e,t){return function(o,r){t(o,r,e)}};Object.defineProperty(t,"__esModule",{value:!0});var s=o(44081),a=o(37132),l=o(814),p=o(69734),u=o(72948),d=o(26016),c=o(72493),h=o(99770),f=o(83423),g=function(){function e(){}return e.prototype.setBeans=function(e){this.logger=e.create("ColumnFactory")},e.prototype.createColumnTree=function(e,t,o){var r=new p.ColumnKeyCreator;if(o){var n=o.map((function(e){return e.getId()}));r.addExistingKeys(n)}var i=o?o.slice():null,s=this.recursivelyCreateColumns(e,0,t,i,r,null),a=this.findMaxDept(s,0);this.logger.log("Number of levels for grouped columns is "+a);var l=this.balanceColumnTree(s,0,a,r);return this.columnUtils.depthFirstOriginalTreeSearch(null,l,(function(e,t){e instanceof u.OriginalColumnGroup&&e.setupExpandable(),e.setOriginalParent(t)})),{columnTree:l,treeDept:a}},e.prototype.createForAutoGroups=function(e,t){var o=this,r=[];return e.forEach((function(e){var n=o.createAutoGroupTreeItem(t,e);r.push(n)})),r},e.prototype.createAutoGroupTreeItem=function(e,t){for(var o=t,r=this.findDepth(e)-1;r>=0;r--){var n=new u.OriginalColumnGroup(null,"FAKE_PATH_"+t.getId()+"}_"+r,!0,r);this.context.wireBean(n),n.setChildren([o]),o.setOriginalParent(n),o=n}return o},e.prototype.findDepth=function(e){for(var t=0,o=e;o&&o[0]&&o[0]instanceof u.OriginalColumnGroup;)t++,o=o[0].getChildren();return t},e.prototype.balanceColumnTree=function(e,t,o,r){for(var n=[],i=0;i<e.length;i++){var s=e[i];if(s instanceof u.OriginalColumnGroup){var a=s,l=this.balanceColumnTree(a.getChildren(),t+1,o,r);a.setChildren(l),n.push(a)}else{for(var p=void 0,d=void 0,c=o-1;c>=t;c--){var h=r.getUniqueKey(null,null),f=this.createMergedColGroupDef(null),g=new u.OriginalColumnGroup(f,h,!0,t);this.context.wireBean(g),d&&d.setChildren([g]),d=g,p||(p=d)}if(p){n.push(p);var m=e.some((function(e){return e instanceof u.OriginalColumnGroup}));if(m){d.setChildren([s]);continue}d.setChildren(e);break}n.push(s)}}return n},e.prototype.findMaxDept=function(e,t){for(var o=t,r=0;r<e.length;r++){var n=e[r];if(n instanceof u.OriginalColumnGroup){var i=n,s=this.findMaxDept(i.getChildren(),t+1);o<s&&(o=s)}}return o},e.prototype.recursivelyCreateColumns=function(e,t,o,r,n,i){var s=this,a=[];return e?(e.forEach((function(e){var l;l=s.isColumnGroup(e)?s.createColumnGroup(o,e,t,r,n,i):s.createColumn(o,e,r,n,i),a.push(l)})),a):a},e.prototype.createColumnGroup=function(e,t,o,r,n,i){var s=this.createMergedColGroupDef(t),a=n.getUniqueKey(s.groupId,null),l=new u.OriginalColumnGroup(s,a,!1,o);this.context.wireBean(l);var p=this.recursivelyCreateColumns(s.children,o+1,e,r,n,l);return l.setChildren(p),l},e.prototype.createMergedColGroupDef=function(e){var t={};return f._.assign(t,this.gridOptionsWrapper.getDefaultColGroupDef()),f._.assign(t,e),this.checkForDeprecatedItems(t),t},e.prototype.createColumn=function(e,t,o,r,n){var i=this.mergeColDefs(t);this.checkForDeprecatedItems(i);var s=this.findExistingColumn(t,o);if(s)s.setColDef(i,t);else{var a=r.getUniqueKey(i.colId,i.field);s=new d.Column(i,t,a,e),this.context.wireBean(s)}return s},e.prototype.findExistingColumn=function(e,t){var o=f._.find(t,(function(t){var o=t.getUserProvidedColDef();return!(!o||o!==e&&(null===o.colId||void 0===o.colId||o.colId!==e.colId))}));return o&&f._.removeFromArray(t,o),o},e.prototype.mergeColDefs=function(e){var t={};return f._.assign(t,this.gridOptionsWrapper.getDefaultColDef()),e.type&&this.assignColumnTypes(e,t),f._.assign(t,e),t},e.prototype.assignColumnTypes=function(e,t){var o;if(e.type instanceof Array)e.type.some((function(e){return"string"!=typeof e}))?console.warn("ag-grid: if colDef.type is supplied an array it should be of type 'string[]'"):o=e.type;else{if("string"!=typeof e.type)return void console.warn("ag-grid: colDef.type should be of type 'string' | 'string[]'");o=e.type.split(",")}var r=f._.assign({},this.gridOptionsWrapper.getColumnTypes(),h.DefaultColumnTypes);o.forEach((function(e){var o=r[e.trim()];o?f._.assign(t,o):console.warn("ag-grid: colDef.type '"+e+"' does not correspond to defined gridOptions.columnTypes")}))},e.prototype.checkForDeprecatedItems=function(e){if(e){var t=e;void 0!==t.group&&console.warn("ag-grid: colDef.group is invalid, please check documentation on how to do grouping as it changed in version 3"),void 0!==t.headerGroup&&console.warn("ag-grid: colDef.headerGroup is invalid, please check documentation on how to do grouping as it changed in version 3"),void 0!==t.headerGroupShow&&console.warn("ag-grid: colDef.headerGroupShow is invalid, should be columnGroupShow, please check documentation on how to do grouping as it changed in version 3"),void 0!==t.suppressRowGroup&&console.warn("ag-grid: colDef.suppressRowGroup is deprecated, please use colDef.type instead"),void 0!==t.suppressAggregation&&console.warn("ag-grid: colDef.suppressAggregation is deprecated, please use colDef.type instead"),(t.suppressRowGroup||t.suppressAggregation)&&console.warn("ag-grid: colDef.suppressAggregation and colDef.suppressRowGroup are deprecated, use allowRowGroup, allowPivot and allowValue instead"),t.displayName&&(console.warn("ag-grid: Found displayName "+t.displayName+", please use headerName instead, displayName is deprecated."),t.headerName=t.displayName)}},e.prototype.isColumnGroup=function(e){return void 0!==e.children},r([c.Autowired("gridOptionsWrapper"),n("design:type",s.GridOptionsWrapper)],e.prototype,"gridOptionsWrapper",void 0),r([c.Autowired("columnUtils"),n("design:type",l.ColumnUtils)],e.prototype,"columnUtils",void 0),r([c.Autowired("context"),n("design:type",c.Context)],e.prototype,"context",void 0),r([i(0,c.Qualifier("loggerFactory")),n("design:type",Function),n("design:paramtypes",[a.LoggerFactory]),n("design:returntype",void 0)],e.prototype,"setBeans",null),r([c.Bean("columnFactory")],e)}();t.ColumnFactory=g},8534:function(e,t,o){var r=this&&this.__decorate||function(e,t,o,r){var n,i=arguments.length,s=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,o):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,o,r);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(s=(i<3?n(s):i>3?n(t,o,s):n(t,o))||s);return i>3&&s&&Object.defineProperty(t,o,s),s},n=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)};Object.defineProperty(t,"__esModule",{value:!0});var i=o(60843),s=o(44081),a=o(72493),l=o(83423),p=function(){function e(){this.destroyFunctions=[],this.destroyed=!1}return e.prototype.getContext=function(){return this.context},e.prototype.destroy=function(){this.destroyFunctions.forEach((function(e){return e()})),this.destroyFunctions.length=0,this.destroyed=!0,this.dispatchEvent({type:e.EVENT_DESTROYED})},e.prototype.addEventListener=function(e,t){this.localEventService||(this.localEventService=new i.EventService),this.localEventService.addEventListener(e,t)},e.prototype.removeEventListener=function(e,t){this.localEventService&&this.localEventService.removeEventListener(e,t)},e.prototype.dispatchEventAsync=function(e){var t=this;window.setTimeout((function(){return t.dispatchEvent(e)}),0)},e.prototype.dispatchEvent=function(e){this.localEventService&&this.localEventService.dispatchEvent(e)},e.prototype.addDestroyableEventListener=function(e,t,o,r){this.destroyed||(e instanceof HTMLElement?l._.addSafePassiveEventListener(e,t,o,r):(e instanceof Window||s.GridOptionsWrapper,e.addEventListener(t,o)),this.destroyFunctions.push((function(){e instanceof HTMLElement||e instanceof Window||s.GridOptionsWrapper,e.removeEventListener(t,o)})))},e.prototype.isAlive=function(){return!this.destroyed},e.prototype.addDestroyFunc=function(e){this.isAlive()?this.destroyFunctions.push(e):e()},e.EVENT_DESTROYED="destroyed",r([a.Autowired("context"),n("design:type",a.Context)],e.prototype,"context",void 0),r([a.PreDestroy,n("design:type",Function),n("design:paramtypes",[]),n("design:returntype",void 0)],e.prototype,"destroy",null),e}();t.BeanStub=p},8894:function(e,t,o){var r=this&&this.__decorate||function(e,t,o,r){var n,i=arguments.length,s=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,o):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,o,r);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(s=(i<3?n(s):i>3?n(t,o,s):n(t,o))||s);return i>3&&s&&Object.defineProperty(t,o,s),s},n=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)};Object.defineProperty(t,"__esModule",{value:!0});var i=o(72493),s=o(34782),a=o(45727),l=o(1571),p=o(41451),u=o(42195),d=o(69065),c=o(98239),h=o(44081),f=o(83423),g=function(){function e(){this.timeLastPageEventProcessed=0}return e.prototype.init=function(){this.scrollWidth=this.gridOptionsWrapper.getScrollbarWidth()},e.prototype.registerGridComp=function(e){this.gridPanel=e},e.prototype.handlePageScrollingKey=function(e){var t=e.which||e.keyCode,o=e.altKey,r=e.ctrlKey,n=this.mouseEventService.getGridCellForEvent(e).getGridCellDef();if(!n)return!1;var i=!1;switch(t){case a.Constants.KEY_PAGE_HOME:case a.Constants.KEY_PAGE_END:r||o||(this.onHomeOrEndKey(t),i=!0);break;case a.Constants.KEY_LEFT:case a.Constants.KEY_RIGHT:r&&!o&&(this.onCtrlLeftOrRight(t,n),i=!0);break;case a.Constants.KEY_UP:case a.Constants.KEY_DOWN:r&&!o&&(this.onCtrlUpOrDown(t,n),i=!0);break;case a.Constants.KEY_PAGE_DOWN:r||o||(this.onPageDown(n),i=!0);break;case a.Constants.KEY_PAGE_UP:r||o||(this.onPageUp(n),i=!0)}return i&&e.preventDefault(),i},e.prototype.isTimeSinceLastPageEventToRecent=function(){return(new Date).getTime()-this.timeLastPageEventProcessed<100},e.prototype.setTimeLastPageEventProcessed=function(){this.timeLastPageEventProcessed=(new Date).getTime()},e.prototype.onPageDown=function(e){if(!this.isTimeSinceLastPageEventToRecent()){var t=this.gridPanel.getVScrollPosition(),o=t.bottom-t.top;this.gridPanel.isHorizontalScrollShowing()&&(o-=this.scrollWidth);var r=this.paginationProxy.getPixelOffset(),n=t.top+o,i=this.paginationProxy.getRowIndexAtPixel(n+r),s=this.paginationProxy.getRow(e.rowIndex).rowTop+o-r,a=this.paginationProxy.getRowIndexAtPixel(s+r),l=this.paginationProxy.getPageLastRow();a>l&&(a=l),i>l&&(i=l),this.navigateTo(i,"top",null,a,e.column),this.setTimeLastPageEventProcessed()}},e.prototype.onPageUp=function(e){if(!this.isTimeSinceLastPageEventToRecent()){var t=this.gridPanel.getVScrollPosition(),o=t.bottom-t.top;this.gridPanel.isHorizontalScrollShowing()&&(o-=this.scrollWidth);var r=this.paginationProxy.getPixelOffset(),n=t.top,i=this.paginationProxy.getRowIndexAtPixel(n+r),s=this.paginationProxy.getRow(e.rowIndex),a=s.rowTop+s.rowHeight-o-r,l=this.paginationProxy.getRowIndexAtPixel(a+r),p=this.paginationProxy.getPageFirstRow();l<p&&(l=p),i<p&&(i=p),this.navigateTo(i,"bottom",null,l,e.column),this.setTimeLastPageEventProcessed()}},e.prototype.navigateTo=function(e,t,o,r,n){if(f._.exists(o)&&this.gridPanel.ensureColumnVisible(o),f._.exists(e)&&this.gridPanel.ensureIndexVisible(e,t),this.animationFrameService.flushAllFrames(),this.focusedCellController.setFocusedCell(r,n,null,!0),this.rangeController){var i=new s.GridCell({rowIndex:r,floating:null,column:n});this.rangeController.setRangeToCell(i)}},e.prototype.onCtrlUpOrDown=function(e,t){var o=e===a.Constants.KEY_UP?0:this.paginationProxy.getPageLastRow();this.navigateTo(o,null,t.column,o,t.column)},e.prototype.onCtrlLeftOrRight=function(e,t){var o=e===a.Constants.KEY_LEFT,r=this.columnController.getAllDisplayedColumns(),n=o?r[0]:r[r.length-1];this.navigateTo(t.rowIndex,null,n,t.rowIndex,n)},e.prototype.onHomeOrEndKey=function(e){var t=e===a.Constants.KEY_PAGE_HOME,o=this.columnController.getAllDisplayedColumns(),r=t?o[0]:o[o.length-1],n=t?0:this.paginationProxy.getPageLastRow();this.navigateTo(n,null,r,n,r)},r([i.Autowired("mouseEventService"),n("design:type",l.MouseEventService)],e.prototype,"mouseEventService",void 0),r([i.Autowired("paginationProxy"),n("design:type",p.PaginationProxy)],e.prototype,"paginationProxy",void 0),r([i.Autowired("focusedCellController"),n("design:type",u.FocusedCellController)],e.prototype,"focusedCellController",void 0),r([i.Autowired("animationFrameService"),n("design:type",d.AnimationFrameService)],e.prototype,"animationFrameService",void 0),r([i.Optional("rangeController"),n("design:type",Object)],e.prototype,"rangeController",void 0),r([i.Autowired("columnController"),n("design:type",c.ColumnController)],e.prototype,"columnController",void 0),r([i.Autowired("gridOptionsWrapper"),n("design:type",h.GridOptionsWrapper)],e.prototype,"gridOptionsWrapper",void 0),r([i.PostConstruct,n("design:type",Function),n("design:paramtypes",[]),n("design:returntype",void 0)],e.prototype,"init",null),r([i.Bean("navigationService")],e)}();t.NavigationService=g},9018:function(e,t,o){var r=this&&this.__decorate||function(e,t,o,r){var n,i=arguments.length,s=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,o):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,o,r);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(s=(i<3?n(s):i>3?n(t,o,s):n(t,o))||s);return i>3&&s&&Object.defineProperty(t,o,s),s};Object.defineProperty(t,"__esModule",{value:!0});var n=o(72493),i=o(83423),s=[0,1996959894,-301047508,-1727442502,124634137,1886057615,-379345611,-1637575261,249268274,2044508324,-522852066,-1747789432,162941995,2125561021,-407360249,-1866523247,498536548,1789927666,-205950648,-2067906082,450548861,1843258603,-187386543,-2083289657,325883990,1684777152,-43845254,-1973040660,335633487,1661365465,-99664541,-1928851979,997073096,1281953886,-715111964,-1570279054,1006888145,1258607687,-770865667,-1526024853,901097722,1119000684,-608450090,-1396901568,853044451,1172266101,-589951537,-1412350631,651767980,1373503546,-925412992,-1076862698,565507253,1454621731,-809855591,-1195530993,671266974,1594198024,-972236366,-1324619484,795835527,1483230225,-1050600021,-1234817731,1994146192,31158534,-1731059524,-271249366,1907459465,112637215,-1614814043,-390540237,2013776290,251722036,-1777751922,-519137256,2137656763,141376813,-1855689577,-429695999,1802195444,476864866,-2056965928,-228458418,1812370925,453092731,-2113342271,-183516073,1706088902,314042704,-1950435094,-54949764,1658658271,366619977,-1932296973,-69972891,1303535960,984961486,-1547960204,-725929758,1256170817,1037604311,-1529756563,-740887301,1131014506,879679996,-1385723834,-631195440,1141124467,855842277,-1442165665,-586318647,1342533948,654459306,-1106571248,-921952122,1466479909,544179635,-1184443383,-832445281,1591671054,702138776,-1328506846,-942167884,1504918807,783551873,-1212326853,-1061524307,-306674912,-1698712650,62317068,1957810842,-355121351,-1647151185,81470997,1943803523,-480048366,-1805370492,225274430,2053790376,-468791541,-1828061283,167816743,2097651377,-267414716,-2029476910,503444072,1762050814,-144550051,-2140837941,426522225,1852507879,-19653770,-1982649376,282753626,1742555852,-105259153,-1900089351,397917763,1622183637,-690576408,-1580100738,953729732,1340076626,-776247311,-1497606297,1068828381,1219638859,-670225446,-1358292148,906185462,1090812512,-547295293,-1469587627,829329135,1181335161,-882789492,-1134132454,628085408,1382605366,-871598187,-1156888829,570562233,1426400815,-977650754,-1296233688,733239954,1555261956,-1026031705,-1244606671,752459403,1541320221,-1687895376,-328994266,1969922972,40735498,-1677130071,-351390145,1913087877,83908371,-1782625662,-491226604,2075208622,213261112,-1831694693,-438977011,2094854071,198958881,-2032938284,-237706686,1759359992,534414190,-2118248755,-155638181,1873836001,414664567,-2012718362,-15766928,1711684554,285281116,-1889165569,-127750551,1634467795,376229701,-1609899400,-686959890,1308918612,956543938,-1486412191,-799009033,1231636301,1047427035,-1362007478,-640263460,1088359270,936918e3,-1447252397,-558129467,1202900863,817233897,-1111625188,-893730166,1404277552,615818150,-1160759803,-841546093,1423857449,601450431,-1285129682,-1000256840,1567103746,711928724,-1274298825,-1022587231,1510334235,755167117],a=function(){function e(){var e=this;this.folders=[],this.files=[],this.addFolder=function(t){e.folders.push({path:t,created:new Date})}}return e.prototype.addFolders=function(e){e.forEach(this.addFolder)},e.prototype.addFile=function(e,t){this.files.push({path:e,created:new Date,content:t})},e.prototype.clearStream=function(){this.folders=[],this.files=[]},e.prototype.getContent=function(e){void 0===e&&(e="application/zip");var t=this.buildFileStream(),o=this.buildUint8Array(t);return this.clearStream(),new Blob([o],{type:e})},e.prototype.buildFileStream=function(e){void 0===e&&(e="");for(var t=this.folders.concat(this.files),o=t.length,r="",n=0,i=0,s=0,a=t;s<a.length;s++){var l=a[s],p=this.getHeader(l,n),u=p.fileHeader,d=p.folderHeader,c=p.content;n+=u.length+c.length,i+=d.length,e+=u+c,r+=d}return e+r+this.buildFolderEnd(o,i,n)},e.prototype.getHeader=function(e,t){var o=e.content,r=e.path,n=e.created,s=i._.utf8_encode,a=i._.decToHex,l=s(r),p=l!==r,u=this.convertTime(n),d=this.convertDate(n),c="";if(p){var h=a(1,1)+a(this.getFromCrc32Table(l),4)+l;c="up"+a(h.length,2)+h}var f="\n\0"+(p?"\0\b":"\0\0")+"\0\0"+a(u,2)+a(d,2)+a(o?this.getFromCrc32Table(o):0,4)+a(o?o.length:0,4)+a(o?o.length:0,4)+a(l.length,2)+a(c.length,2);return{fileHeader:"PK"+f+l+c,folderHeader:"PK\0"+f+"\0\0\0\0\0\0"+(o?"\0\0\0\0":"\0\0\0")+a(t,4)+l+c,content:o||""}},e.prototype.buildFolderEnd=function(e,t,o){var r=i._.decToHex;return"PK\0\0\0\0"+r(e,2)+r(e,2)+r(t,4)+r(o,4)+"\0\0"},e.prototype.buildUint8Array=function(e){for(var t=new Uint8Array(e.length),o=0;o<t.length;o++)t[o]=e.charCodeAt(o);return t},e.prototype.getFromCrc32Table=function(e,t){if(void 0===t&&(t=0),!e.length)return 0;t^=-1;for(var o=0,r=0;r<e.length;r++)o=e.charCodeAt(r),t=t>>>8^s[255&(t^o)];return~t},e.prototype.convertTime=function(e){var t=e.getHours();return t<<=6,t|=e.getMinutes(),(t<<=5)|e.getSeconds()/2},e.prototype.convertDate=function(e){var t=e.getFullYear()-1980;return t<<=4,t|=e.getMonth()+1,(t<<=5)|e.getDate()},r([n.Bean("zipContainer")],e)}();t.ZipContainer=a},10042:function(e,t,o){var r,n=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o])},r(e,t)},function(e,t){function o(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)}),i=this&&this.__decorate||function(e,t,o,r){var n,i=arguments.length,s=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,o):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,o,r);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(s=(i<3?n(s):i>3?n(t,o,s):n(t,o))||s);return i>3&&s&&Object.defineProperty(t,o,s),s},s=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},a=this&&this.__param||function(e,t){return function(o,r){t(o,r,e)}};Object.defineProperty(t,"__esModule",{value:!0});var l=o(44081),p=o(40634),u=o(92427),d=o(24463),c=o(60843),h=o(19378),f=o(63405),g=o(45727),m=o(23054),y=o(72493),v=o(44871),C=o(98239),w=o(37132),E=o(42195),_=o(38427),b=o(34782),R=o(8534),S=o(41451),O=o(40797),T=o(50580),P=o(55090),A=o(69065),I=o(51755),D=o(83423),N=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.rowCompsByIndex={},t.floatingTopRowComps=[],t.floatingBottomRowComps=[],t.refreshInProgress=!1,t}return n(t,e),t.prototype.registerGridCore=function(e){this.gridCore=e},t.prototype.agWire=function(e){this.logger=e.create("RowRenderer")},t.prototype.registerGridComp=function(e){this.gridPanel=e,this.rowContainers=this.gridPanel.getRowContainers(),this.addDestroyableEventListener(this.eventService,f.Events.EVENT_PAGINATION_CHANGED,this.onPageLoaded.bind(this)),this.addDestroyableEventListener(this.eventService,f.Events.EVENT_PINNED_ROW_DATA_CHANGED,this.onPinnedRowDataChanged.bind(this)),this.addDestroyableEventListener(this.eventService,f.Events.EVENT_DISPLAYED_COLUMNS_CHANGED,this.onDisplayedColumnsChanged.bind(this)),this.addDestroyableEventListener(this.eventService,f.Events.EVENT_BODY_SCROLL,this.redrawAfterScroll.bind(this)),this.addDestroyableEventListener(this.eventService,f.Events.EVENT_BODY_HEIGHT_CHANGED,this.redrawAfterScroll.bind(this)),this.addDestroyableEventListener(this.gridOptionsWrapper,l.GridOptionsWrapper.PROP_DOM_LAYOUT,this.onDomLayoutChanged.bind(this)),this.printLayout=this.gridOptionsWrapper.getDomLayout()===g.Constants.DOM_LAYOUT_PRINT,this.embedFullWidthRows=this.printLayout||this.gridOptionsWrapper.isEmbedFullWidthRows(),this.redrawAfterModelUpdate()},t.prototype.onDomLayoutChanged=function(){var e=this.gridOptionsWrapper.getDomLayout()===g.Constants.DOM_LAYOUT_PRINT,t=e||this.gridOptionsWrapper.isEmbedFullWidthRows(),o=t!==this.embedFullWidthRows||this.printLayout!==e;this.printLayout=e,this.embedFullWidthRows=t,o&&this.redrawAfterModelUpdate()},t.prototype.datasourceChanged=function(){this.firstRenderedRow=0,this.lastRenderedRow=-1;var e=Object.keys(this.rowCompsByIndex);this.removeRowComps(e)},t.prototype.onPageLoaded=function(e){D._.missing(e)&&(e={type:f.Events.EVENT_MODEL_UPDATED,api:this.gridApi,columnApi:this.columnApi,animate:!1,keepRenderedRows:!1,newData:!1,newPage:!1}),this.onModelUpdated(e)},t.prototype.getAllCellsForColumn=function(e){var t=[];function o(o,r){var n=r.getCellForCol(e);n&&t.push(n)}return D._.iterateObject(this.rowCompsByIndex,o),D._.iterateObject(this.floatingBottomRowComps,o),D._.iterateObject(this.floatingTopRowComps,o),t},t.prototype.refreshFloatingRowComps=function(){this.refreshFloatingRows(this.floatingTopRowComps,this.pinnedRowModel.getPinnedTopRowData(),this.rowContainers.floatingTopPinnedLeft,this.rowContainers.floatingTopPinnedRight,this.rowContainers.floatingTop,this.rowContainers.floatingTopFullWidth),this.refreshFloatingRows(this.floatingBottomRowComps,this.pinnedRowModel.getPinnedBottomRowData(),this.rowContainers.floatingBottomPinnedLeft,this.rowContainers.floatingBottomPinnedRight,this.rowContainers.floatingBottom,this.rowContainers.floatingBottomFullWith)},t.prototype.refreshFloatingRows=function(e,t,o,r,n,i){var s=this;e.forEach((function(e){e.destroy()})),e.length=0,t&&t.forEach((function(t){var a=new h.RowComp(s.$scope,n,o,r,i,t,s.beans,!1,!1,s.printLayout,s.embedFullWidthRows);a.init(),e.push(a)})),this.flushContainers(e)},t.prototype.onPinnedRowDataChanged=function(){this.redrawAfterModelUpdate({recycleRows:!0})},t.prototype.onModelUpdated=function(e){var t={recycleRows:e.keepRenderedRows,animate:e.animate,newData:e.newData,newPage:e.newPage,onlyBody:!0};this.redrawAfterModelUpdate(t)},t.prototype.getRenderedIndexesForRowNodes=function(e){var t=[];return D._.missing(e)||D._.iterateObject(this.rowCompsByIndex,(function(o,r){var n=r.getRowNode();e.indexOf(n)>=0&&t.push(o)})),t},t.prototype.redrawRows=function(e){if(e&&0!=e.length){var t=this.getRenderedIndexesForRowNodes(e);this.removeRowComps(t),this.redrawAfterModelUpdate({recycleRows:!0})}},t.prototype.getCellToRestoreFocusToAfterRefresh=function(e){var t=e.suppressKeepFocus?null:this.focusedCellController.getFocusCellToUseAfterRefresh();if(D._.missing(t))return null;var o=document.activeElement,r=this.gridOptionsWrapper.getDomData(o,m.CellComp.DOM_DATA_KEY_CELL_COMP);return D._.missing(r)?null:t},t.prototype.redrawAfterModelUpdate=function(e){void 0===e&&(e={}),this.getLockOnRefresh();var t=this.getCellToRestoreFocusToAfterRefresh(e);this.sizeContainerToPageHeight(),this.scrollToTopIfNewData(e);var o=!this.printLayout&&e.recycleRows,r=e.animate&&this.gridOptionsWrapper.isAnimateRows(),n=this.binRowComps(o);this.redraw(n,r),e.onlyBody||this.refreshFloatingRowComps(),this.restoreFocusedCell(t),this.releaseLockOnRefresh()},t.prototype.scrollToTopIfNewData=function(e){var t=e.newData||e.newPage,o=this.gridOptionsWrapper.isSuppressScrollOnNewData();t&&!o&&this.gridPanel.scrollToTop()},t.prototype.sizeContainerToPageHeight=function(){var e=[this.rowContainers.body,this.rowContainers.fullWidth,this.rowContainers.pinnedLeft,this.rowContainers.pinnedRight];if(this.printLayout)e.forEach((function(e){return e.setHeight(null)}));else{var t=this.paginationProxy.getCurrentPageHeight();0===t&&(t=1),this.maxDivHeightScaler.setModelHeight(t);var o=this.maxDivHeightScaler.getUiContainerHeight();e.forEach((function(e){return e.setHeight(o)}))}},t.prototype.getLockOnRefresh=function(){if(this.refreshInProgress)throw new Error("ag-Grid: cannot get grid to draw rows when it is in the middle of drawing rows. Your code probably called a grid API method while the grid was in the render stage. To overcome this, put the API call into a timeout, eg instead of api.refreshView(), call setTimeout(function(){api.refreshView(),0}). To see what part of your code that caused the refresh check this stacktrace.");this.refreshInProgress=!0},t.prototype.releaseLockOnRefresh=function(){this.refreshInProgress=!1},t.prototype.restoreFocusedCell=function(e){e&&this.focusedCellController.setFocusedCell(e.rowIndex,e.column,e.floating,!0)},t.prototype.stopEditing=function(e){void 0===e&&(e=!1),this.forEachRowComp((function(t,o){o.stopEditing(e)}))},t.prototype.forEachCellComp=function(e){this.forEachRowComp((function(t,o){return o.forEachCellComp(e)}))},t.prototype.forEachRowComp=function(e){D._.iterateObject(this.rowCompsByIndex,e),D._.iterateObject(this.floatingTopRowComps,e),D._.iterateObject(this.floatingBottomRowComps,e)},t.prototype.addRenderedRowListener=function(e,t,o){var r=this.rowCompsByIndex[t];r&&r.addEventListener(e,o)},t.prototype.flashCells=function(e){void 0===e&&(e={}),this.forEachCellCompFiltered(e.rowNodes,e.columns,(function(e){return e.flashCell()}))},t.prototype.refreshCells=function(e){void 0===e&&(e={});var t={forceRefresh:e.force,newData:!1};this.forEachCellCompFiltered(e.rowNodes,e.columns,(function(e){return e.refreshCell(t)}))},t.prototype.getCellRendererInstances=function(e){var t=[];return this.forEachCellCompFiltered(e.rowNodes,e.columns,(function(e){var o=e.getCellRenderer();o&&t.push(o)})),t},t.prototype.getCellEditorInstances=function(e){var t=[];return this.forEachCellCompFiltered(e.rowNodes,e.columns,(function(e){var o=e.getCellEditor();o&&t.push(o)})),t},t.prototype.getEditingCells=function(){var e=[];return this.forEachCellComp((function(t){if(t.isEditing()){var o=t.getGridCell().getGridCellDef();e.push(o)}})),e},t.prototype.forEachCellCompFiltered=function(e,t,o){var r,n,i=this;D._.exists(e)&&(r={top:{},bottom:{},normal:{}},e.forEach((function(e){e.rowPinned===g.Constants.PINNED_TOP?r.top[e.id]=!0:e.rowPinned===g.Constants.PINNED_BOTTOM?r.bottom[e.id]=!0:r.normal[e.id]=!0}))),D._.exists(t)&&(n={},t.forEach((function(e){var t=i.columnController.getGridColumn(e);D._.exists(t)&&(n[t.getId()]=!0)})));var s=function(e){var t=e.getRowNode(),i=t.id,s=t.rowPinned;if(D._.exists(r))if(s===g.Constants.PINNED_BOTTOM){if(!r.bottom[i])return}else if(s===g.Constants.PINNED_TOP){if(!r.top[i])return}else if(!r.normal[i])return;e.forEachCellComp((function(e){var t=e.getColumn().getId();n&&!n[t]||o(e)}))};D._.iterateObject(this.rowCompsByIndex,(function(e,t){s(t)})),this.floatingTopRowComps&&this.floatingTopRowComps.forEach(s),this.floatingBottomRowComps&&this.floatingBottomRowComps.forEach(s)},t.prototype.destroy=function(){e.prototype.destroy.call(this);var t=Object.keys(this.rowCompsByIndex);this.removeRowComps(t)},t.prototype.binRowComps=function(e){var t,o=this,r={};return e?(t=[],D._.iterateObject(this.rowCompsByIndex,(function(e,n){var i=n.getRowNode();D._.exists(i.id)?(r[i.id]=n,delete o.rowCompsByIndex[e]):t.push(e)}))):t=Object.keys(this.rowCompsByIndex),this.removeRowComps(t),r},t.prototype.removeRowComps=function(e){var t=this;e.forEach((function(e){t.rowCompsByIndex[e].destroy(),delete t.rowCompsByIndex[e]}))},t.prototype.redrawAfterScroll=function(){this.getLockOnRefresh(),this.redraw(null,!1,!0),this.releaseLockOnRefresh()},t.prototype.removeRowCompsNotToDraw=function(e){var t={};e.forEach((function(e){return t[e]=!0}));var o=Object.keys(this.rowCompsByIndex),r=D._.filter(o,(function(e){return!t[e]}));this.removeRowComps(r)},t.prototype.calculateIndexesToDraw=function(){var e=this,t=D._.createArrayOfNumbers(this.firstRenderedRow,this.lastRenderedRow);return D._.iterateObject(this.rowCompsByIndex,(function(o,r){var n=Number(o);(n<e.firstRenderedRow||n>e.lastRenderedRow)&&e.keepRowBecauseEditingOrFocused(r)&&t.push(n)})),t.sort((function(e,t){return e-t})),t},t.prototype.redraw=function(e,t,o){var r=this;void 0===t&&(t=!1),void 0===o&&(o=!1),this.maxDivHeightScaler.updateOffset(),this.workOutFirstAndLastRowsToRender();var n=this.calculateIndexesToDraw();this.removeRowCompsNotToDraw(n),this.printLayout&&(t=!1);var i=[],s=[];n.forEach((function(n){var a=r.createOrUpdateRowComp(n,e,t,o);D._.exists(a)&&(s.push(a),D._.pushAll(i,a.getAndClearNextVMTurnFunctions()))})),this.flushContainers(s),D._.executeNextVMTurn(i),!o||this.gridOptionsWrapper.isSuppressAnimationFrame()||this.printLayout?this.destroyRowComps(e,t):this.beans.taskQueue.addP2Task(this.destroyRowComps.bind(this,e,t)),this.checkAngularCompile()},t.prototype.flushContainers=function(e){D._.iterateObject(this.rowContainers,(function(e,t){t&&t.flushRowTemplates()})),e.forEach((function(e){return e.afterFlush()}))},t.prototype.onDisplayedColumnsChanged=function(){var e=this.columnController.isPinningLeft(),t=this.columnController.isPinningRight();(this.pinningLeft!==e||t!==this.pinningRight)&&(this.pinningLeft=e,this.pinningRight=t,this.embedFullWidthRows&&this.redrawFullWidthEmbeddedRows())},t.prototype.redrawFullWidthEmbeddedRows=function(){var e=[];D._.iterateObject(this.rowCompsByIndex,(function(t,o){if(o.isFullWidth()){var r=o.getRowNode().rowIndex;e.push(r.toString())}})),this.refreshFloatingRowComps(),this.removeRowComps(e),this.redrawAfterScroll()},t.prototype.refreshFullWidthRows=function(){var e=[];D._.iterateObject(this.rowCompsByIndex,(function(t,o){if(o.isFullWidth()){var r=o.getRowNode().rowIndex;e.push(r.toString())}})),this.removeRowComps(e),this.redrawAfterScroll()},t.prototype.createOrUpdateRowComp=function(e,t,o,r){var n,i=this.rowCompsByIndex[e];if(i||(n=this.paginationProxy.getRow(e),D._.exists(n)&&D._.exists(t)&&t[n.id]&&n.alreadyRendered&&(i=t[n.id],t[n.id]=null)),i)i.ensureDomOrder();else{if(n||(n=this.paginationProxy.getRow(e)),!D._.exists(n))return;i=this.createRowComp(n,o,r)}return n&&(n.alreadyRendered=!0),this.rowCompsByIndex[e]=i,i},t.prototype.destroyRowComps=function(e,t){var o=[];D._.iterateObject(e,(function(e,r){r&&(r.destroy(t),D._.pushAll(o,r.getAndClearDelayedDestroyFunctions()))})),D._.executeInAWhile(o)},t.prototype.checkAngularCompile=function(){var e=this;this.gridOptionsWrapper.isAngularCompileRows()&&window.setTimeout((function(){e.$scope.$apply()}),0)},t.prototype.workOutFirstAndLastRowsToRender=function(){var e,t;if(this.paginationProxy.isRowsToRender())if(this.printLayout)e=this.paginationProxy.getPageFirstRow(),t=this.paginationProxy.getPageLastRow();else{var o=this.paginationProxy?this.paginationProxy.getPixelOffset():0,r=this.maxDivHeightScaler.getOffset(),n=this.gridPanel.getVScrollPosition(),i=n.top,s=n.bottom,a=this.gridOptionsWrapper.getRowBufferInPixels(),l=i+o+r-a,p=s+o+r+a;this.ensureAllRowsInRangeHaveHeightsCalculated(l,p);var u=this.paginationProxy.getRowIndexAtPixel(l),d=this.paginationProxy.getRowIndexAtPixel(p),c=this.paginationProxy.getPageFirstRow(),h=this.paginationProxy.getPageLastRow();u<c&&(u=c),d>h&&(d=h),e=u,t=d}else e=0,t=-1;var m=this.gridOptionsWrapper.getDomLayout()===g.Constants.DOM_LAYOUT_NORMAL,y=this.gridOptionsWrapper.isSuppressMaxRenderedRowRestriction();m&&!y&&t-e>500&&(t=e+500);var v=e!==this.firstRenderedRow,C=t!==this.lastRenderedRow;if(v||C){this.firstRenderedRow=e,this.lastRenderedRow=t;var w={type:f.Events.EVENT_VIEWPORT_CHANGED,firstRow:e,lastRow:t,api:this.gridApi,columnApi:this.columnApi};this.eventService.dispatchEvent(w)}if(this.paginationProxy.isRowsToRender()){var E={type:f.Events.EVENT_FIRST_DATA_RENDERED,firstRow:e,lastRow:t,api:this.gridApi,columnApi:this.columnApi};this.eventService.dispatchEventOnce(E)}},t.prototype.ensureAllRowsInRangeHaveHeightsCalculated=function(e,t){this.paginationProxy.ensureRowHeightsValid(e,t,-1,-1)&&(this.sizeContainerToPageHeight(),this.maxDivHeightScaler.updateOffset())},t.prototype.getFirstVirtualRenderedRow=function(){return this.firstRenderedRow},t.prototype.getLastVirtualRenderedRow=function(){return this.lastRenderedRow},t.prototype.keepRowBecauseEditingOrFocused=function(e){var t=e.getRowNode(),o=this.focusedCellController.isRowNodeFocused(t),r=e.isEditing();return(o||r)&&!!this.paginationProxy.isRowPresent(t)||!1},t.prototype.createRowComp=function(e,t,o){var r=this.gridOptionsWrapper.isSuppressAnimationFrame(),n=o&&!r&&!this.printLayout,i=new h.RowComp(this.$scope,this.rowContainers.body,this.rowContainers.pinnedLeft,this.rowContainers.pinnedRight,this.rowContainers.fullWidth,e,this.beans,t,n,this.printLayout,this.embedFullWidthRows);return i.init(),i},t.prototype.getRenderedNodes=function(){var e=this.rowCompsByIndex;return Object.keys(e).map((function(t){return e[t].getRowNode()}))},t.prototype.navigateToNextCell=function(e,t,o,r){for(var n;;){var i=this.getComponentForCell(o).getColSpanningList();if(t===g.Constants.KEY_RIGHT&&i.length>1&&(o=new b.GridCell({rowIndex:o.rowIndex,column:i[i.length-1],floating:o.floating})),n=this.cellNavigationService.getNextCellToFocus(t,o),D._.missing(n))break;if(!this.gridOptionsWrapper.isGroupUseEntireRow())break;if(!this.paginationProxy.getRow(n.rowIndex).group)break}if(n&&(n=this.getComponentForCell(n).getGridCell()),r){var s=this.gridOptionsWrapper.getNavigateToNextCellFunc();if(D._.exists(s)){var a=s({key:t,previousCellDef:o.getGridCellDef(),nextCellDef:n?n.getGridCellDef():null,event:e});n=D._.exists(a)?new b.GridCell(a):null}}if(n&&(this.ensureCellVisible(n),this.focusedCellController.setFocusedCell(n.rowIndex,n.column,n.floating,!0),this.rangeController)){var l=new b.GridCell({rowIndex:n.rowIndex,floating:n.floating,column:n.column});this.rangeController.setRangeToCell(l)}},t.prototype.ensureCellVisible=function(e){D._.missing(e.floating)&&this.gridPanel.ensureIndexVisible(e.rowIndex),e.column.isPinned()||this.gridPanel.ensureColumnVisible(e.column),this.gridPanel.horizontallyScrollHeaderCenterAndFloatingCenter(),this.animationFrameService.flushAllFrames()},t.prototype.startEditingCell=function(e,t,o){var r=this.getComponentForCell(e);r&&r.startRowOrCellEdit(t,o)},t.prototype.getComponentForCell=function(e){var t;switch(e.floating){case g.Constants.PINNED_TOP:t=this.floatingTopRowComps[e.rowIndex];break;case g.Constants.PINNED_BOTTOM:t=this.floatingBottomRowComps[e.rowIndex];break;default:t=this.rowCompsByIndex[e.rowIndex]}return t?t.getRenderedCellForColumn(e.column):null},t.prototype.onTabKeyDown=function(e,t){var o=t.shiftKey;this.moveToCellAfter(e,o)&&t.preventDefault()},t.prototype.tabToNextCell=function(e){var t=this.focusedCellController.getFocusedCell();if(D._.missing(t))return!1;var o=this.getComponentForCell(t);return!D._.missing(o)&&this.moveToCellAfter(o,e)},t.prototype.moveToCellAfter=function(e,t){return e.isEditing()?this.gridOptionsWrapper.isFullRowEdit()?this.moveToNextEditingRow(e,t):this.moveToNextEditingCell(e,t):this.moveToNextCellNotEditing(e,t)},t.prototype.moveToNextEditingCell=function(e,t){var o=e.getGridCell();e.stopEditing();var r=this.findNextCellToFocusOn(o,t,!0),n=D._.exists(r);return n&&(r.startEditingIfEnabled(null,null,!0),r.focusCell(!1)),n},t.prototype.moveToNextEditingRow=function(e,t){var o=e.getGridCell(),r=this.findNextCellToFocusOn(o,t,!0),n=D._.exists(r);return n&&this.moveEditToNextCellOrRow(e,r),n},t.prototype.moveToNextCellNotEditing=function(e,t){var o=e.getGridCell(),r=this.findNextCellToFocusOn(o,t,!1),n=D._.exists(r);return n&&r.focusCell(!0),n},t.prototype.moveEditToNextCellOrRow=function(e,t){var o=e.getGridCell(),r=t.getGridCell();if(o.rowIndex===r.rowIndex&&o.floating===r.floating)e.setFocusOutOnEditor(),t.setFocusInOnEditor();else{var n=e.getRenderedRow(),i=t.getRenderedRow();e.setFocusOutOnEditor(),n.stopEditing(),i.startRowEditing(),t.setFocusInOnEditor()}t.focusCell()},t.prototype.findNextCellToFocusOn=function(e,t,o){for(var r=e;;){r=this.cellNavigationService.getNextTabbedCell(r,t);var n=this.gridOptionsWrapper.getTabToNextCellFunc();if(D._.exists(n)){var i=n({backwards:t,editing:o,previousCellDef:e.getGridCellDef(),nextCellDef:r?r.getGridCellDef():null});r=D._.exists(i)?new b.GridCell(i):null}if(!r)return null;if(o){var s=this.lookupRowNodeForCell(r);if(!r.column.isCellEditable(s))continue}D._.missing(r.floating)&&this.gridPanel.ensureIndexVisible(r.rowIndex),r.column.isPinned()||this.gridPanel.ensureColumnVisible(r.column),this.gridPanel.horizontallyScrollHeaderCenterAndFloatingCenter(),this.animationFrameService.flushAllFrames();var a=this.getComponentForCell(r);if(!D._.missing(a)&&!a.isSuppressNavigable())return this.rangeController&&(e=new b.GridCell({rowIndex:r.rowIndex,floating:r.floating,column:r.column}),this.rangeController.setRangeToCell(e)),a}},t.prototype.lookupRowNodeForCell=function(e){return e.floating===g.Constants.PINNED_TOP?this.pinnedRowModel.getPinnedTopRow(e.rowIndex):e.floating===g.Constants.PINNED_BOTTOM?this.pinnedRowModel.getPinnedBottomRow(e.rowIndex):this.paginationProxy.getRow(e.rowIndex)},i([y.Autowired("paginationProxy"),s("design:type",S.PaginationProxy)],t.prototype,"paginationProxy",void 0),i([y.Autowired("columnController"),s("design:type",C.ColumnController)],t.prototype,"columnController",void 0),i([y.Autowired("gridOptionsWrapper"),s("design:type",l.GridOptionsWrapper)],t.prototype,"gridOptionsWrapper",void 0),i([y.Autowired("$scope"),s("design:type",Object)],t.prototype,"$scope",void 0),i([y.Autowired("expressionService"),s("design:type",p.ExpressionService)],t.prototype,"expressionService",void 0),i([y.Autowired("templateService"),s("design:type",u.TemplateService)],t.prototype,"templateService",void 0),i([y.Autowired("valueService"),s("design:type",d.ValueService)],t.prototype,"valueService",void 0),i([y.Autowired("eventService"),s("design:type",c.EventService)],t.prototype,"eventService",void 0),i([y.Autowired("pinnedRowModel"),s("design:type",T.PinnedRowModel)],t.prototype,"pinnedRowModel",void 0),i([y.Autowired("loggerFactory"),s("design:type",w.LoggerFactory)],t.prototype,"loggerFactory",void 0),i([y.Autowired("focusedCellController"),s("design:type",E.FocusedCellController)],t.prototype,"focusedCellController",void 0),i([y.Autowired("cellNavigationService"),s("design:type",_.CellNavigationService)],t.prototype,"cellNavigationService",void 0),i([y.Autowired("columnApi"),s("design:type",v.ColumnApi)],t.prototype,"columnApi",void 0),i([y.Autowired("gridApi"),s("design:type",O.GridApi)],t.prototype,"gridApi",void 0),i([y.Autowired("beans"),s("design:type",P.Beans)],t.prototype,"beans",void 0),i([y.Autowired("maxDivHeightScaler"),s("design:type",I.MaxDivHeightScaler)],t.prototype,"maxDivHeightScaler",void 0),i([y.Autowired("animationFrameService"),s("design:type",A.AnimationFrameService)],t.prototype,"animationFrameService",void 0),i([y.Optional("rangeController"),s("design:type",Object)],t.prototype,"rangeController",void 0),i([a(0,y.Qualifier("loggerFactory")),s("design:type",Function),s("design:paramtypes",[w.LoggerFactory]),s("design:returntype",void 0)],t.prototype,"agWire",null),i([y.Bean("rowRenderer")],t)}(R.BeanStub);t.RowRenderer=N},10190:function(e,t,o){var r=this&&this.__decorate||function(e,t,o,r){var n,i=arguments.length,s=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,o):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,o,r);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(s=(i<3?n(s):i>3?n(t,o,s):n(t,o))||s);return i>3&&s&&Object.defineProperty(t,o,s),s},n=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},i=this&&this.__param||function(e,t){return function(o,r){t(o,r,e)}};Object.defineProperty(t,"__esModule",{value:!0});var s=o(44081),a=o(98239),l=o(60843),p=o(37132),u=o(63405),d=o(72493),c=o(72493),h=o(72493),f=o(72493),g=function(){function e(){this.consuming=!1}return e.prototype.setBeans=function(e){this.logger=e.create("AlignedGridsService")},e.prototype.registerGridComp=function(e){this.gridPanel=e},e.prototype.init=function(){this.eventService.addEventListener(u.Events.EVENT_COLUMN_MOVED,this.fireColumnEvent.bind(this)),this.eventService.addEventListener(u.Events.EVENT_COLUMN_VISIBLE,this.fireColumnEvent.bind(this)),this.eventService.addEventListener(u.Events.EVENT_COLUMN_PINNED,this.fireColumnEvent.bind(this)),this.eventService.addEventListener(u.Events.EVENT_COLUMN_GROUP_OPENED,this.fireColumnEvent.bind(this)),this.eventService.addEventListener(u.Events.EVENT_COLUMN_RESIZED,this.fireColumnEvent.bind(this)),this.eventService.addEventListener(u.Events.EVENT_BODY_SCROLL,this.fireScrollEvent.bind(this))},e.prototype.fireEvent=function(e){if(!this.consuming){var t=this.gridOptionsWrapper.getAlignedGrids();t&&t.forEach((function(t){if(t.api){var o=t.api.__getAlignedGridService();e(o)}}))}},e.prototype.onEvent=function(e){this.consuming=!0,e(),this.consuming=!1},e.prototype.fireColumnEvent=function(e){this.fireEvent((function(t){t.onColumnEvent(e)}))},e.prototype.fireScrollEvent=function(e){"horizontal"===e.direction&&this.fireEvent((function(t){t.onScrollEvent(e)}))},e.prototype.onScrollEvent=function(e){var t=this;this.onEvent((function(){t.gridPanel.setHorizontalScrollPosition(e.left)}))},e.prototype.getMasterColumns=function(e){var t=[];return e.columns?e.columns.forEach((function(e){t.push(e)})):e.column&&t.push(e.column),t},e.prototype.getColumnIds=function(e){var t=[];return e.columns?e.columns.forEach((function(e){t.push(e.getColId())})):e.column&&t.push(e.column.getColId()),t},e.prototype.onColumnEvent=function(e){var t=this;this.onEvent((function(){switch(e.type){case u.Events.EVENT_COLUMN_MOVED:case u.Events.EVENT_COLUMN_VISIBLE:case u.Events.EVENT_COLUMN_PINNED:case u.Events.EVENT_COLUMN_RESIZED:var o=e;t.processColumnEvent(o);break;case u.Events.EVENT_COLUMN_GROUP_OPENED:var r=e;t.processGroupOpenedEvent(r);break;case u.Events.EVENT_COLUMN_PIVOT_CHANGED:console.warn("ag-Grid: pivoting is not supported with aligned grids. You can only use one of these features at a time in a grid.")}}))},e.prototype.processGroupOpenedEvent=function(e){var t,o=e.columnGroup;if(o){var r=o.getGroupId();t=this.columnController.getOriginalColumnGroup(r)}o&&!t||(this.logger.log("onColumnEvent-> processing "+e+" expanded = "+o.isExpanded()),this.columnController.setColumnGroupOpened(t,o.isExpanded(),"alignedGridChanged"))},e.prototype.processColumnEvent=function(e){var t,o=this,r=e.column;if(r&&(t=this.columnController.getPrimaryColumn(r.getColId())),!r||t){var n=this.getColumnIds(e),i=this.getMasterColumns(e);switch(e.type){case u.Events.EVENT_COLUMN_MOVED:var s=e;this.logger.log("onColumnEvent-> processing "+e.type+" toIndex = "+s.toIndex),this.columnController.moveColumns(n,s.toIndex,"alignedGridChanged");break;case u.Events.EVENT_COLUMN_VISIBLE:var a=e;this.logger.log("onColumnEvent-> processing "+e.type+" visible = "+a.visible),this.columnController.setColumnsVisible(n,a.visible,"alignedGridChanged");break;case u.Events.EVENT_COLUMN_PINNED:var l=e;this.logger.log("onColumnEvent-> processing "+e.type+" pinned = "+l.pinned),this.columnController.setColumnsPinned(n,l.pinned,"alignedGridChanged");break;case u.Events.EVENT_COLUMN_RESIZED:var p=e;i.forEach((function(t){o.logger.log("onColumnEvent-> processing "+e.type+" actualWidth = "+t.getActualWidth()),o.columnController.setColumnWidth(t.getColId(),t.getActualWidth(),!1,p.finished,"alignedGridChanged")}))}var d=this.gridPanel.isVerticalScrollShowing();this.gridOptionsWrapper.getAlignedGrids().forEach((function(e){e.api.setAlwaysShowVerticalScroll(d)}))}},r([h.Autowired("gridOptionsWrapper"),n("design:type",s.GridOptionsWrapper)],e.prototype,"gridOptionsWrapper",void 0),r([h.Autowired("columnController"),n("design:type",a.ColumnController)],e.prototype,"columnController",void 0),r([h.Autowired("eventService"),n("design:type",l.EventService)],e.prototype,"eventService",void 0),r([i(0,c.Qualifier("loggerFactory")),n("design:type",Function),n("design:paramtypes",[p.LoggerFactory]),n("design:returntype",void 0)],e.prototype,"setBeans",null),r([f.PostConstruct,n("design:type",Function),n("design:paramtypes",[]),n("design:returntype",void 0)],e.prototype,"init",null),r([d.Bean("alignedGridsService")],e)}();t.AlignedGridsService=g},10292:e=>{var t,o=Object.defineProperty,r=Object.getOwnPropertyDescriptor,n=Object.getOwnPropertyNames,i=Object.prototype.hasOwnProperty,s={};((e,t)=>{for(var r in t)o(e,r,{get:t[r],enumerable:!0})})(s,{AISDKError:()=>g,APICallError:()=>C,EmptyResponseBodyError:()=>b,InvalidArgumentError:()=>Z,InvalidPromptError:()=>ee,InvalidResponseDataError:()=>ne,JSONParseError:()=>le,LoadAPIKeyError:()=>ce,LoadSettingError:()=>me,NoContentGeneratedError:()=>we,NoSuchModelError:()=>Re,TooManyEmbeddingValuesForCallError:()=>Pe,TypeValidationError:()=>Ne,UnsupportedFunctionalityError:()=>ke,getErrorMessage:()=>R,isJSONArray:()=>Ge,isJSONObject:()=>je,isJSONValue:()=>Le}),e.exports=(t=s,((e,t,s,a)=>{if(t&&"object"==typeof t||"function"==typeof t)for(let s of n(t))i.call(e,s)||undefined===s||o(e,s,{get:()=>t[s],enumerable:!(a=r(t,s))||a.enumerable});return e})(o({},"__esModule",{value:!0}),t));var a,l,p,u,d,c,h="vercel.ai.error",f=Symbol.for(h),g=class e extends(l=Error,a=f,l){constructor({name:e,message:t,cause:o}){super(t),this[a]=!0,this.name=e,this.cause=o}static isInstance(t){return e.hasMarker(t,h)}static hasMarker(e,t){const o=Symbol.for(t);return null!=e&&"object"==typeof e&&o in e&&"boolean"==typeof e[o]&&!0===e[o]}},m="AI_APICallError",y=`vercel.ai.error.${m}`,v=Symbol.for(y),C=class extends(u=g,p=v,u){constructor({message:e,url:t,requestBodyValues:o,statusCode:r,responseHeaders:n,responseBody:i,cause:s,isRetryable:a=null!=r&&(408===r||409===r||429===r||r>=500),data:l}){super({name:m,message:e,cause:s}),this[p]=!0,this.url=t,this.requestBodyValues=o,this.statusCode=r,this.responseHeaders=n,this.responseBody=i,this.isRetryable=a,this.data=l}static isInstance(e){return g.hasMarker(e,y)}},w="AI_EmptyResponseBodyError",E=`vercel.ai.error.${w}`,_=Symbol.for(E),b=class extends(c=g,d=_,c){constructor({message:e="Empty response body"}={}){super({name:w,message:e}),this[d]=!0}static isInstance(e){return g.hasMarker(e,E)}};function R(e){return null==e?"unknown error":"string"==typeof e?e:e instanceof Error?e.message:JSON.stringify(e)}var S,O,T,P,A,I,D,N,x,F,M,k,L,G,j,W,V,H,B,z,U,Y,q="AI_InvalidArgumentError",$=`vercel.ai.error.${q}`,K=Symbol.for($),Z=class extends(O=g,S=K,O){constructor({message:e,cause:t,argument:o}){super({name:q,message:e,cause:t}),this[S]=!0,this.argument=o}static isInstance(e){return g.hasMarker(e,$)}},J="AI_InvalidPromptError",Q=`vercel.ai.error.${J}`,X=Symbol.for(Q),ee=class extends(P=g,T=X,P){constructor({prompt:e,message:t,cause:o}){super({name:J,message:`Invalid prompt: ${t}`,cause:o}),this[T]=!0,this.prompt=e}static isInstance(e){return g.hasMarker(e,Q)}},te="AI_InvalidResponseDataError",oe=`vercel.ai.error.${te}`,re=Symbol.for(oe),ne=class extends(I=g,A=re,I){constructor({data:e,message:t=`Invalid response data: ${JSON.stringify(e)}.`}){super({name:te,message:t}),this[A]=!0,this.data=e}static isInstance(e){return g.hasMarker(e,oe)}},ie="AI_JSONParseError",se=`vercel.ai.error.${ie}`,ae=Symbol.for(se),le=class extends(N=g,D=ae,N){constructor({text:e,cause:t}){super({name:ie,message:`JSON parsing failed: Text: ${e}.\nError message: ${R(t)}`,cause:t}),this[D]=!0,this.text=e}static isInstance(e){return g.hasMarker(e,se)}},pe="AI_LoadAPIKeyError",ue=`vercel.ai.error.${pe}`,de=Symbol.for(ue),ce=class extends(F=g,x=de,F){constructor({message:e}){super({name:pe,message:e}),this[x]=!0}static isInstance(e){return g.hasMarker(e,ue)}},he="AI_LoadSettingError",fe=`vercel.ai.error.${he}`,ge=Symbol.for(fe),me=class extends(k=g,M=ge,k){constructor({message:e}){super({name:he,message:e}),this[M]=!0}static isInstance(e){return g.hasMarker(e,fe)}},ye="AI_NoContentGeneratedError",ve=`vercel.ai.error.${ye}`,Ce=Symbol.for(ve),we=class extends(G=g,L=Ce,G){constructor({message:e="No content generated."}={}){super({name:ye,message:e}),this[L]=!0}static isInstance(e){return g.hasMarker(e,ve)}},Ee="AI_NoSuchModelError",_e=`vercel.ai.error.${Ee}`,be=Symbol.for(_e),Re=class extends(W=g,j=be,W){constructor({errorName:e=Ee,modelId:t,modelType:o,message:r=`No such ${o}: ${t}`}){super({name:e,message:r}),this[j]=!0,this.modelId=t,this.modelType=o}static isInstance(e){return g.hasMarker(e,_e)}},Se="AI_TooManyEmbeddingValuesForCallError",Oe=`vercel.ai.error.${Se}`,Te=Symbol.for(Oe),Pe=class extends(H=g,V=Te,H){constructor(e){super({name:Se,message:`Too many values for a single embedding call. The ${e.provider} model "${e.modelId}" can only embed up to ${e.maxEmbeddingsPerCall} values per call, but ${e.values.length} values were provided.`}),this[V]=!0,this.provider=e.provider,this.modelId=e.modelId,this.maxEmbeddingsPerCall=e.maxEmbeddingsPerCall,this.values=e.values}static isInstance(e){return g.hasMarker(e,Oe)}},Ae="AI_TypeValidationError",Ie=`vercel.ai.error.${Ae}`,De=Symbol.for(Ie),Ne=class e extends(z=g,B=De,z){constructor({value:e,cause:t,context:o}){let r="Type validation failed";if((null==o?void 0:o.field)&&(r+=` for ${o.field}`),(null==o?void 0:o.entityName)||(null==o?void 0:o.entityId)){r+=" (";const e=[];o.entityName&&e.push(o.entityName),o.entityId&&e.push(`id: "${o.entityId}"`),r+=e.join(", "),r+=")"}super({name:Ae,message:`${r}: Value: ${JSON.stringify(e)}.\nError message: ${R(t)}`,cause:t}),this[B]=!0,this.value=e,this.context=o}static isInstance(e){return g.hasMarker(e,Ie)}static wrap({value:t,cause:o,context:r}){var n,i,s;return e.isInstance(o)&&o.value===t&&(null==(n=o.context)?void 0:n.field)===(null==r?void 0:r.field)&&(null==(i=o.context)?void 0:i.entityName)===(null==r?void 0:r.entityName)&&(null==(s=o.context)?void 0:s.entityId)===(null==r?void 0:r.entityId)?o:new e({value:t,cause:o,context:r})}},xe="AI_UnsupportedFunctionalityError",Fe=`vercel.ai.error.${xe}`,Me=Symbol.for(Fe),ke=class extends(Y=g,U=Me,Y){constructor({functionality:e,message:t=`'${e}' functionality not supported.`}){super({name:xe,message:t}),this[U]=!0,this.functionality=e}static isInstance(e){return g.hasMarker(e,Fe)}};function Le(e){return null===e||"string"==typeof e||"number"==typeof e||"boolean"==typeof e||(Array.isArray(e)?e.every(Le):"object"==typeof e&&Object.entries(e).every((([e,t])=>"string"==typeof e&&(void 0===t||Le(t)))))}function Ge(e){return Array.isArray(e)&&e.every(Le)}function je(e){return null!=e&&"object"==typeof e&&Object.entries(e).every((([e,t])=>"string"==typeof e&&(void 0===t||Le(t))))}},10601:(e,t,o)=>{var r,n=o(9606).URL,i=o(67787).Buffer,s=Object.defineProperty,a=Object.getOwnPropertyDescriptor,l=Object.getOwnPropertyNames,p=Object.prototype.hasOwnProperty,u={};((e,t)=>{for(var o in t)s(e,o,{get:t[o],enumerable:!0})})(u,{GatewayAuthenticationError:()=>x,GatewayError:()=>A,GatewayInternalServerError:()=>Q,GatewayInvalidRequestError:()=>L,GatewayModelNotFoundError:()=>$,GatewayRateLimitError:()=>V,GatewayResponseError:()=>oe,createGateway:()=>pt,createGatewayProvider:()=>pt,gateway:()=>ut}),e.exports=(r=u,((e,t,o,r)=>{if(t&&"object"==typeof t||"function"==typeof t)for(let o of l(t))p.call(e,o)||undefined===o||s(e,o,{get:()=>t[o],enumerable:!(r=a(t,o))||r.enumerable});return e})(s({},"__esModule",{value:!0}),r));var d,c,h,f,g,m,y,v,C,w,E,_,b,R,S=o(94192),O=o(10292),T=o(19844),P=Symbol.for("vercel.ai.gateway.error"),A=class e extends(c=Error,d=P,c){constructor({message:e,statusCode:t=500,cause:o,generationId:r}){super(r?`${e} [${r}]`:e),this[d]=!0,this.statusCode=t,this.cause=o,this.generationId=r}static isInstance(t){return e.hasMarker(t)}static hasMarker(e){return"object"==typeof e&&null!==e&&P in e&&!0===e[P]}},I="GatewayAuthenticationError",D=`vercel.ai.gateway.error.${I}`,N=Symbol.for(D),x=class e extends(f=A,h=N,f){constructor({message:e="Authentication failed",statusCode:t=401,cause:o,generationId:r}={}){super({message:e,statusCode:t,cause:o,generationId:r}),this[h]=!0,this.name=I,this.type="authentication_error"}static isInstance(e){return A.hasMarker(e)&&N in e}static createContextualError({apiKeyProvided:t,oidcTokenProvided:o,message:r="Authentication failed",statusCode:n=401,cause:i,generationId:s}){let a;return a=t?"AI Gateway authentication failed: Invalid API key.\n\nCreate a new API key: https://vercel.com/d?to=%2F%5Bteam%5D%2F%7E%2Fai%2Fapi-keys\n\nProvide via 'apiKey' option or 'AI_GATEWAY_API_KEY' environment variable.":o?"AI Gateway authentication failed: Invalid OIDC token.\n\nRun 'npx vercel link' to link your project, then 'vc env pull' to fetch the token.\n\nAlternatively, use an API key: https://vercel.com/d?to=%2F%5Bteam%5D%2F%7E%2Fai%2Fapi-keys":"AI Gateway authentication failed: No authentication provided.\n\nOption 1 - API key:\nCreate an API key: https://vercel.com/d?to=%2F%5Bteam%5D%2F%7E%2Fai%2Fapi-keys\nProvide via 'apiKey' option or 'AI_GATEWAY_API_KEY' environment variable.\n\nOption 2 - OIDC token:\nRun 'npx vercel link' to link your project, then 'vc env pull' to fetch the token.",new e({message:a,statusCode:n,cause:i,generationId:s})}},F="GatewayInvalidRequestError",M=`vercel.ai.gateway.error.${F}`,k=Symbol.for(M),L=class extends(m=A,g=k,m){constructor({message:e="Invalid request",statusCode:t=400,cause:o,generationId:r}={}){super({message:e,statusCode:t,cause:o,generationId:r}),this[g]=!0,this.name=F,this.type="invalid_request_error"}static isInstance(e){return A.hasMarker(e)&&k in e}},G="GatewayRateLimitError",j=`vercel.ai.gateway.error.${G}`,W=Symbol.for(j),V=class extends(v=A,y=W,v){constructor({message:e="Rate limit exceeded",statusCode:t=429,cause:o,generationId:r}={}){super({message:e,statusCode:t,cause:o,generationId:r}),this[y]=!0,this.name=G,this.type="rate_limit_exceeded"}static isInstance(e){return A.hasMarker(e)&&W in e}},H=o(19844),B=o(94192),z="GatewayModelNotFoundError",U=`vercel.ai.gateway.error.${z}`,Y=Symbol.for(U),q=(0,B.lazySchema)((()=>(0,B.zodSchema)(H.z.object({modelId:H.z.string()})))),$=class extends(w=A,C=Y,w){constructor({message:e="Model not found",statusCode:t=404,modelId:o,cause:r,generationId:n}={}){super({message:e,statusCode:t,cause:r,generationId:n}),this[C]=!0,this.name=z,this.type="model_not_found",this.modelId=o}static isInstance(e){return A.hasMarker(e)&&Y in e}},K="GatewayInternalServerError",Z=`vercel.ai.gateway.error.${K}`,J=Symbol.for(Z),Q=class extends(_=A,E=J,_){constructor({message:e="Internal server error",statusCode:t=500,cause:o,generationId:r}={}){super({message:e,statusCode:t,cause:o,generationId:r}),this[E]=!0,this.name=K,this.type="internal_server_error"}static isInstance(e){return A.hasMarker(e)&&J in e}},X="GatewayResponseError",ee=`vercel.ai.gateway.error.${X}`,te=Symbol.for(ee),oe=class extends(R=A,b=te,R){constructor({message:e="Invalid response from Gateway",statusCode:t=502,response:o,validationError:r,cause:n,generationId:i}={}){super({message:e,statusCode:t,cause:n,generationId:i}),this[b]=!0,this.name=X,this.type="response_error",this.response=o,this.validationError=r}static isInstance(e){return A.hasMarker(e)&&te in e}},re=o(94192);async function ne({response:e,statusCode:t,defaultMessage:o="Gateway request failed",cause:r,authMethod:n}){var i;const s=await(0,re.safeValidateTypes)({value:e,schema:ae});if(!s.success){const n="object"==typeof e&&null!==e&&"generationId"in e?e.generationId:void 0;return new oe({message:`Invalid error response format: ${o}`,statusCode:t,response:e,validationError:s.error,cause:r,generationId:n})}const a=s.value,l=a.error.type,p=a.error.message,u=null!=(i=a.generationId)?i:void 0;switch(l){case"authentication_error":return x.createContextualError({apiKeyProvided:"api-key"===n,oidcTokenProvided:"oidc"===n,statusCode:t,cause:r,generationId:u});case"invalid_request_error":return new L({message:p,statusCode:t,cause:r,generationId:u});case"rate_limit_exceeded":return new V({message:p,statusCode:t,cause:r,generationId:u});case"model_not_found":{const e=await(0,re.safeValidateTypes)({value:a.error.param,schema:q});return new $({message:p,statusCode:t,modelId:e.success?e.value.modelId:void 0,cause:r,generationId:u})}default:return new Q({message:p,statusCode:t,cause:r,generationId:u})}}var ie,se,ae=(0,re.lazySchema)((()=>(0,re.zodSchema)(T.z.object({error:T.z.object({message:T.z.string(),type:T.z.string().nullish(),param:T.z.unknown().nullish(),code:T.z.union([T.z.string(),T.z.number()]).nullish()}),generationId:T.z.string().nullish()})))),le="GatewayTimeoutError",pe=`vercel.ai.gateway.error.${le}`,ue=Symbol.for(pe),de=class e extends(se=A,ie=ue,se){constructor({message:e="Request timed out",statusCode:t=408,cause:o,generationId:r}={}){super({message:e,statusCode:t,cause:o,generationId:r}),this[ie]=!0,this.name=le,this.type="timeout_error"}static isInstance(e){return A.hasMarker(e)&&ue in e}static createTimeoutError({originalMessage:t,statusCode:o=408,cause:r,generationId:n}){return new e({message:`Gateway request timed out: ${t}\n\n This is a client-side timeout. To resolve this, increase your timeout configuration: https://vercel.com/docs/ai-gateway/capabilities/video-generation#extending-timeouts-for-node.js`,statusCode:o,cause:r,generationId:n})}};function ce(e){if(!(e instanceof Error))return!1;const t=e.code;return"string"==typeof t&&["UND_ERR_HEADERS_TIMEOUT","UND_ERR_BODY_TIMEOUT","UND_ERR_CONNECT_TIMEOUT"].includes(t)}async function he(e,t){var o;return A.isInstance(e)?e:ce(e)?de.createTimeoutError({originalMessage:e instanceof Error?e.message:"Unknown error",cause:e}):O.APICallError.isInstance(e)?e.cause&&ce(e.cause)?de.createTimeoutError({originalMessage:e.message,cause:e}):await ne({response:fe(e),statusCode:null!=(o=e.statusCode)?o:500,defaultMessage:"Gateway request failed",cause:e,authMethod:t}):await ne({response:{},statusCode:500,defaultMessage:e instanceof Error?`Gateway request failed: ${e.message}`:"Unknown Gateway error",cause:e,authMethod:t})}function fe(e){if(void 0!==e.data)return e.data;if(null!=e.responseBody)try{return JSON.parse(e.responseBody)}catch(t){return e.responseBody}return{}}var ge=o(19844),me=o(94192),ye="ai-gateway-auth-method";async function ve(e){const t=await(0,me.safeValidateTypes)({value:e[ye],schema:Ce});return t.success?t.value:void 0}var Ce=(0,me.lazySchema)((()=>(0,me.zodSchema)(ge.z.union([ge.z.literal("api-key"),ge.z.literal("oidc")])))),we=o(94192),Ee=o(19844),_e=class{constructor(e){this.config=e}async getAvailableModels(){try{const{value:e}=await(0,we.getFromApi)({url:`${this.config.baseURL}/config`,headers:await(0,we.resolve)(this.config.headers()),successfulResponseHandler:(0,we.createJsonResponseHandler)(be),failedResponseHandler:(0,we.createJsonErrorResponseHandler)({errorSchema:Ee.z.any(),errorToMessage:e=>e}),fetch:this.config.fetch});return e}catch(e){throw await he(e)}}async getCredits(){try{const e=new n(this.config.baseURL),{value:t}=await(0,we.getFromApi)({url:`${e.origin}/v1/credits`,headers:await(0,we.resolve)(this.config.headers()),successfulResponseHandler:(0,we.createJsonResponseHandler)(Re),failedResponseHandler:(0,we.createJsonErrorResponseHandler)({errorSchema:Ee.z.any(),errorToMessage:e=>e}),fetch:this.config.fetch});return t}catch(e){throw await he(e)}}},be=(0,we.lazySchema)((()=>(0,we.zodSchema)(Ee.z.object({models:Ee.z.array(Ee.z.object({id:Ee.z.string(),name:Ee.z.string(),description:Ee.z.string().nullish(),pricing:Ee.z.object({input:Ee.z.string(),output:Ee.z.string(),input_cache_read:Ee.z.string().nullish(),input_cache_write:Ee.z.string().nullish()}).transform((({input:e,output:t,input_cache_read:o,input_cache_write:r})=>({input:e,output:t,...o?{cachedInputTokens:o}:{},...r?{cacheCreationInputTokens:r}:{}}))).nullish(),specification:Ee.z.object({specificationVersion:Ee.z.literal("v3"),provider:Ee.z.string(),modelId:Ee.z.string()}),modelType:Ee.z.enum(["embedding","image","language","video"]).nullish()}))})))),Re=(0,we.lazySchema)((()=>(0,we.zodSchema)(Ee.z.object({balance:Ee.z.string(),total_used:Ee.z.string()}).transform((({balance:e,total_used:t})=>({balance:e,totalUsed:t})))))),Se=o(94192),Oe=o(19844),Te=class{constructor(e,t){this.modelId=e,this.config=t,this.specificationVersion="v3",this.supportedUrls={"*/*":[/.*/]}}get provider(){return this.config.provider}async getArgs(e){const{abortSignal:t,...o}=e;return{args:this.maybeEncodeFileParts(o),warnings:[]}}async doGenerate(e){const{args:t,warnings:o}=await this.getArgs(e),{abortSignal:r}=e,n=await(0,Se.resolve)(this.config.headers());try{const{responseHeaders:i,value:s,rawValue:a}=await(0,Se.postJsonToApi)({url:this.getUrl(),headers:(0,Se.combineHeaders)(n,e.headers,this.getModelConfigHeaders(this.modelId,!1),await(0,Se.resolve)(this.config.o11yHeaders)),body:t,successfulResponseHandler:(0,Se.createJsonResponseHandler)(Oe.z.any()),failedResponseHandler:(0,Se.createJsonErrorResponseHandler)({errorSchema:Oe.z.any(),errorToMessage:e=>e}),...r&&{abortSignal:r},fetch:this.config.fetch});return{...s,request:{body:t},response:{headers:i,body:a},warnings:o}}catch(e){throw await he(e,await ve(n))}}async doStream(e){const{args:t,warnings:o}=await this.getArgs(e),{abortSignal:r}=e,n=await(0,Se.resolve)(this.config.headers());try{const{value:i,responseHeaders:s}=await(0,Se.postJsonToApi)({url:this.getUrl(),headers:(0,Se.combineHeaders)(n,e.headers,this.getModelConfigHeaders(this.modelId,!0),await(0,Se.resolve)(this.config.o11yHeaders)),body:t,successfulResponseHandler:(0,Se.createEventSourceResponseHandler)(Oe.z.any()),failedResponseHandler:(0,Se.createJsonErrorResponseHandler)({errorSchema:Oe.z.any(),errorToMessage:e=>e}),...r&&{abortSignal:r},fetch:this.config.fetch});return{stream:i.pipeThrough(new TransformStream({start(e){o.length>0&&e.enqueue({type:"stream-start",warnings:o})},transform(t,o){if(t.success){const r=t.value;if("raw"===r.type&&!e.includeRawChunks)return;"response-metadata"===r.type&&r.timestamp&&"string"==typeof r.timestamp&&(r.timestamp=new Date(r.timestamp)),o.enqueue(r)}else o.error(t.error)}})),request:{body:t},response:{headers:s}}}catch(e){throw await he(e,await ve(n))}}isFilePart(e){return e&&"object"==typeof e&&"type"in e&&"file"===e.type}maybeEncodeFileParts(e){for(const t of e.prompt)for(const e of t.content)if(this.isFilePart(e)){const t=e;if(t.data instanceof Uint8Array){const e=Uint8Array.from(t.data),o=i.from(e).toString("base64");t.data=new n(`data:${t.mediaType||"application/octet-stream"};base64,${o}`)}}return e}getUrl(){return`${this.config.baseURL}/language-model`}getModelConfigHeaders(e,t){return{"ai-language-model-specification-version":"3","ai-language-model-id":e,"ai-language-model-streaming":String(t)}}},Pe=o(94192),Ae=o(19844),Ie=class{constructor(e,t){this.modelId=e,this.config=t,this.specificationVersion="v3",this.maxEmbeddingsPerCall=2048,this.supportsParallelCalls=!0}get provider(){return this.config.provider}async doEmbed({values:e,headers:t,abortSignal:o,providerOptions:r}){var n;const i=await(0,Pe.resolve)(this.config.headers());try{const{responseHeaders:s,value:a,rawValue:l}=await(0,Pe.postJsonToApi)({url:this.getUrl(),headers:(0,Pe.combineHeaders)(i,null!=t?t:{},this.getModelConfigHeaders(),await(0,Pe.resolve)(this.config.o11yHeaders)),body:{values:e,...r?{providerOptions:r}:{}},successfulResponseHandler:(0,Pe.createJsonResponseHandler)(De),failedResponseHandler:(0,Pe.createJsonErrorResponseHandler)({errorSchema:Ae.z.any(),errorToMessage:e=>e}),...o&&{abortSignal:o},fetch:this.config.fetch});return{embeddings:a.embeddings,usage:null!=(n=a.usage)?n:void 0,providerMetadata:a.providerMetadata,response:{headers:s,body:l},warnings:[]}}catch(e){throw await he(e,await ve(i))}}getUrl(){return`${this.config.baseURL}/embedding-model`}getModelConfigHeaders(){return{"ai-embedding-model-specification-version":"3","ai-model-id":this.modelId}}},De=(0,Pe.lazySchema)((()=>(0,Pe.zodSchema)(Ae.z.object({embeddings:Ae.z.array(Ae.z.array(Ae.z.number())),usage:Ae.z.object({tokens:Ae.z.number()}).nullish(),providerMetadata:Ae.z.record(Ae.z.string(),Ae.z.record(Ae.z.string(),Ae.z.unknown())).optional()})))),Ne=o(94192),xe=o(19844),Fe=class{constructor(e,t){this.modelId=e,this.config=t,this.specificationVersion="v3",this.maxImagesPerCall=Number.MAX_SAFE_INTEGER}get provider(){return this.config.provider}async doGenerate({prompt:e,n:t,size:o,aspectRatio:r,seed:n,files:i,mask:s,providerOptions:a,headers:l,abortSignal:p}){var u,d,c,h;const f=await(0,Ne.resolve)(this.config.headers());try{const{responseHeaders:g,value:m,rawValue:y}=await(0,Ne.postJsonToApi)({url:this.getUrl(),headers:(0,Ne.combineHeaders)(f,null!=l?l:{},this.getModelConfigHeaders(),await(0,Ne.resolve)(this.config.o11yHeaders)),body:{prompt:e,n:t,...o&&{size:o},...r&&{aspectRatio:r},...n&&{seed:n},...a&&{providerOptions:a},...i&&{files:i.map((e=>Me(e)))},...s&&{mask:Me(s)}},successfulResponseHandler:(0,Ne.createJsonResponseHandler)(je),failedResponseHandler:(0,Ne.createJsonErrorResponseHandler)({errorSchema:xe.z.any(),errorToMessage:e=>e}),...p&&{abortSignal:p},fetch:this.config.fetch});return{images:m.images,warnings:null!=(u=m.warnings)?u:[],providerMetadata:m.providerMetadata,response:{timestamp:new Date,modelId:this.modelId,headers:g},...null!=m.usage&&{usage:{inputTokens:null!=(d=m.usage.inputTokens)?d:void 0,outputTokens:null!=(c=m.usage.outputTokens)?c:void 0,totalTokens:null!=(h=m.usage.totalTokens)?h:void 0}}}}catch(e){throw await he(e,await ve(f))}}getUrl(){return`${this.config.baseURL}/image-model`}getModelConfigHeaders(){return{"ai-image-model-specification-version":"3","ai-model-id":this.modelId}}};function Me(e){return"file"===e.type&&e.data instanceof Uint8Array?{...e,data:(0,Ne.convertUint8ArrayToBase64)(e.data)}:e}var ke=xe.z.object({images:xe.z.array(xe.z.unknown()).optional()}).catchall(xe.z.unknown()),Le=xe.z.discriminatedUnion("type",[xe.z.object({type:xe.z.literal("unsupported"),feature:xe.z.string(),details:xe.z.string().optional()}),xe.z.object({type:xe.z.literal("compatibility"),feature:xe.z.string(),details:xe.z.string().optional()}),xe.z.object({type:xe.z.literal("other"),message:xe.z.string()})]),Ge=xe.z.object({inputTokens:xe.z.number().nullish(),outputTokens:xe.z.number().nullish(),totalTokens:xe.z.number().nullish()}),je=xe.z.object({images:xe.z.array(xe.z.string()),warnings:xe.z.array(Le).optional(),providerMetadata:xe.z.record(xe.z.string(),ke).optional(),usage:Ge.optional()}),We=o(94192),Ve=o(19844),He=class{constructor(e,t){this.modelId=e,this.config=t,this.specificationVersion="v3",this.maxVideosPerCall=Number.MAX_SAFE_INTEGER}get provider(){return this.config.provider}async doGenerate({prompt:e,n:t,aspectRatio:o,resolution:r,duration:n,fps:i,seed:s,image:a,providerOptions:l,headers:p,abortSignal:u}){var d;const c=await(0,We.resolve)(this.config.headers());try{const{responseHeaders:f,value:g,rawValue:m}=await(0,We.postJsonToApi)({url:this.getUrl(),headers:(0,We.combineHeaders)(c,null!=p?p:{},this.getModelConfigHeaders(),await(0,We.resolve)(this.config.o11yHeaders)),body:{prompt:e,n:t,...o&&{aspectRatio:o},...r&&{resolution:r},...n&&{duration:n},...i&&{fps:i},...s&&{seed:s},...l&&{providerOptions:l},...a&&{image:(h=a,"file"===h.type&&h.data instanceof Uint8Array?{...h,data:(0,We.convertUint8ArrayToBase64)(h.data)}:h)}},successfulResponseHandler:(0,We.createJsonResponseHandler)(Ye),failedResponseHandler:(0,We.createJsonErrorResponseHandler)({errorSchema:Ve.z.any(),errorToMessage:e=>e}),...u&&{abortSignal:u},fetch:this.config.fetch});return{videos:g.videos,warnings:null!=(d=g.warnings)?d:[],providerMetadata:g.providerMetadata,response:{timestamp:new Date,modelId:this.modelId,headers:f}}}catch(e){throw await he(e,await ve(c))}var h}getUrl(){return`${this.config.baseURL}/video-model`}getModelConfigHeaders(){return{"ai-video-model-specification-version":"3","ai-model-id":this.modelId}}};var Be=Ve.z.object({videos:Ve.z.array(Ve.z.unknown()).optional()}).catchall(Ve.z.unknown()),ze=Ve.z.union([Ve.z.object({type:Ve.z.literal("url"),url:Ve.z.string(),mediaType:Ve.z.string()}),Ve.z.object({type:Ve.z.literal("base64"),data:Ve.z.string(),mediaType:Ve.z.string()})]),Ue=Ve.z.discriminatedUnion("type",[Ve.z.object({type:Ve.z.literal("unsupported"),feature:Ve.z.string(),details:Ve.z.string().optional()}),Ve.z.object({type:Ve.z.literal("compatibility"),feature:Ve.z.string(),details:Ve.z.string().optional()}),Ve.z.object({type:Ve.z.literal("other"),message:Ve.z.string()})]),Ye=Ve.z.object({videos:Ve.z.array(ze),warnings:Ve.z.array(Ue).optional(),providerMetadata:Ve.z.record(Ve.z.string(),Be).optional()}),qe=o(94192),$e=o(69761),Ke=(0,qe.lazySchema)((()=>(0,qe.zodSchema)($e.z.object({objective:$e.z.string().describe("Natural-language description of the web research goal, including source or freshness guidance and broader context from the task. Maximum 5000 characters."),search_queries:$e.z.array($e.z.string()).optional().describe("Optional search queries to supplement the objective. Maximum 200 characters per query."),mode:$e.z.enum(["one-shot","agentic"]).optional().describe('Mode preset: "one-shot" for comprehensive results with longer excerpts (default), "agentic" for concise, token-efficient results for multi-step workflows.'),max_results:$e.z.number().optional().describe("Maximum number of results to return (1-20). Defaults to 10 if not specified."),source_policy:$e.z.object({include_domains:$e.z.array($e.z.string()).optional().describe("List of domains to include in search results."),exclude_domains:$e.z.array($e.z.string()).optional().describe("List of domains to exclude from search results."),after_date:$e.z.string().optional().describe("Only include results published after this date (ISO 8601 format).")}).optional().describe("Source policy for controlling which domains to include/exclude and freshness."),excerpts:$e.z.object({max_chars_per_result:$e.z.number().optional().describe("Maximum characters per result."),max_chars_total:$e.z.number().optional().describe("Maximum total characters across all results.")}).optional().describe("Excerpt configuration for controlling result length."),fetch_policy:$e.z.object({max_age_seconds:$e.z.number().optional().describe("Maximum age in seconds for cached content. Set to 0 to always fetch fresh content.")}).optional().describe("Fetch policy for controlling content freshness.")})))),Ze=(0,qe.lazySchema)((()=>(0,qe.zodSchema)($e.z.union([$e.z.object({searchId:$e.z.string(),results:$e.z.array($e.z.object({url:$e.z.string(),title:$e.z.string(),excerpt:$e.z.string(),publishDate:$e.z.string().nullable().optional(),relevanceScore:$e.z.number().optional()}))}),$e.z.object({error:$e.z.enum(["api_error","rate_limit","timeout","invalid_input","configuration_error","unknown"]),statusCode:$e.z.number().optional(),message:$e.z.string()})])))),Je=(0,qe.createProviderToolFactoryWithOutputSchema)({id:"gateway.parallel_search",inputSchema:Ke,outputSchema:Ze}),Qe=o(94192),Xe=o(69761),et=(0,Qe.lazySchema)((()=>(0,Qe.zodSchema)(Xe.z.object({query:Xe.z.union([Xe.z.string(),Xe.z.array(Xe.z.string())]).describe("Search query (string) or multiple queries (array of up to 5 strings). Multi-query searches return combined results from all queries."),max_results:Xe.z.number().optional().describe("Maximum number of search results to return (1-20, default: 10)"),max_tokens_per_page:Xe.z.number().optional().describe("Maximum number of tokens to extract per search result page (256-2048, default: 2048)"),max_tokens:Xe.z.number().optional().describe("Maximum total tokens across all search results (default: 25000, max: 1000000)"),country:Xe.z.string().optional().describe("Two-letter ISO 3166-1 alpha-2 country code for regional search results (e.g., 'US', 'GB', 'FR')"),search_domain_filter:Xe.z.array(Xe.z.string()).optional().describe("List of domains to include or exclude from search results (max 20). To include: ['nature.com', 'science.org']. To exclude: ['-example.com', '-spam.net']"),search_language_filter:Xe.z.array(Xe.z.string()).optional().describe("List of ISO 639-1 language codes to filter results (max 10, lowercase). Examples: ['en', 'fr', 'de']"),search_after_date:Xe.z.string().optional().describe("Include only results published after this date. Format: 'MM/DD/YYYY' (e.g., '3/1/2025'). Cannot be used with search_recency_filter."),search_before_date:Xe.z.string().optional().describe("Include only results published before this date. Format: 'MM/DD/YYYY' (e.g., '3/15/2025'). Cannot be used with search_recency_filter."),last_updated_after_filter:Xe.z.string().optional().describe("Include only results last updated after this date. Format: 'MM/DD/YYYY' (e.g., '3/1/2025'). Cannot be used with search_recency_filter."),last_updated_before_filter:Xe.z.string().optional().describe("Include only results last updated before this date. Format: 'MM/DD/YYYY' (e.g., '3/15/2025'). Cannot be used with search_recency_filter."),search_recency_filter:Xe.z.enum(["day","week","month","year"]).optional().describe("Filter results by relative time period. Cannot be used with search_after_date or search_before_date.")})))),tt=(0,Qe.lazySchema)((()=>(0,Qe.zodSchema)(Xe.z.union([Xe.z.object({results:Xe.z.array(Xe.z.object({title:Xe.z.string(),url:Xe.z.string(),snippet:Xe.z.string(),date:Xe.z.string().optional(),lastUpdated:Xe.z.string().optional()})),id:Xe.z.string()}),Xe.z.object({error:Xe.z.enum(["api_error","rate_limit","timeout","invalid_input","unknown"]),statusCode:Xe.z.number().optional(),message:Xe.z.string()})])))),ot=(0,Qe.createProviderToolFactoryWithOutputSchema)({id:"gateway.perplexity_search",inputSchema:et,outputSchema:tt}),rt={parallelSearch:(e={})=>Je(e),perplexitySearch:(e={})=>ot(e)},nt=o(39889),it=o(39889),st=o(94192),at="3.0.46",lt="0.0.1";function pt(e={}){var t,o;let r=null,n=null;const i=null!=(t=e.metadataCacheRefreshMillis)?t:3e5;let s=0;const a=null!=(o=(0,S.withoutTrailingSlash)(e.baseURL))?o:"https://ai-gateway.vercel.sh/v3/ai",l=async()=>{try{const t=await async function(e){const t=(0,S.loadOptionalSetting)({settingValue:e.apiKey,environmentVariableName:"AI_GATEWAY_API_KEY"});return t?{token:t,authMethod:"api-key"}:{token:await(0,it.getVercelOidcToken)(),authMethod:"oidc"}}(e);return(0,st.withUserAgentSuffix)({Authorization:`Bearer ${t.token}`,"ai-gateway-protocol-version":lt,[ye]:t.authMethod,...e.headers},`ai-sdk/gateway/${at}`)}catch(e){throw x.createContextualError({apiKeyProvided:!1,oidcTokenProvided:!1,statusCode:401,cause:e})}},p=()=>{const e=(0,S.loadOptionalSetting)({settingValue:void 0,environmentVariableName:"VERCEL_DEPLOYMENT_ID"}),t=(0,S.loadOptionalSetting)({settingValue:void 0,environmentVariableName:"VERCEL_ENV"}),o=(0,S.loadOptionalSetting)({settingValue:void 0,environmentVariableName:"VERCEL_REGION"});return async()=>{const r=await async function(){var e;return null==(e=(0,nt.getContext)().headers)?void 0:e["x-vercel-id"]}();return{...e&&{"ai-o11y-deployment-id":e},...t&&{"ai-o11y-environment":t},...o&&{"ai-o11y-region":o},...r&&{"ai-o11y-request-id":r}}}},u=t=>new Te(t,{provider:"gateway",baseURL:a,headers:l,fetch:e.fetch,o11yHeaders:p()}),d=function(e){if(new.target)throw new Error("The Gateway Provider model function cannot be called with the new keyword.");return u(e)};d.specificationVersion="v3",d.getAvailableModels=async()=>{var t,o,p;const u=null!=(p=null==(o=null==(t=e._internal)?void 0:t.currentDate)?void 0:o.call(t).getTime())?p:Date.now();return(!r||u-s>i)&&(s=u,r=new _e({baseURL:a,headers:l,fetch:e.fetch}).getAvailableModels().then((e=>(n=e,e))).catch((async e=>{throw await he(e,await ve(await l()))}))),n?Promise.resolve(n):r},d.getCredits=async()=>new _e({baseURL:a,headers:l,fetch:e.fetch}).getCredits().catch((async e=>{throw await he(e,await ve(await l()))})),d.imageModel=t=>new Fe(t,{provider:"gateway",baseURL:a,headers:l,fetch:e.fetch,o11yHeaders:p()}),d.languageModel=u;const c=t=>new Ie(t,{provider:"gateway",baseURL:a,headers:l,fetch:e.fetch,o11yHeaders:p()});return d.embeddingModel=c,d.textEmbeddingModel=c,d.videoModel=t=>new He(t,{provider:"gateway",baseURL:a,headers:l,fetch:e.fetch,o11yHeaders:p()}),d.chat=d.languageModel,d.embedding=d.embeddingModel,d.image=d.imageModel,d.video=d.videoModel,d.tools=rt,d}var ut=pt()},12240:(e,t,o)=>{o.d(t,{Ch:()=>K,Di:()=>A,Kq:()=>W,bD:()=>p,hL:()=>h,iM:()=>X,u6:()=>k});var r,n,i,s,a="vercel.ai.error",l=Symbol.for(a),p=class e extends(n=Error,r=l,n){constructor({name:e,message:t,cause:o}){super(t),this[r]=!0,this.name=e,this.cause=o}static isInstance(t){return e.hasMarker(t,a)}static hasMarker(e,t){const o=Symbol.for(t);return null!=e&&"object"==typeof e&&o in e&&"boolean"==typeof e[o]&&!0===e[o]}},u="AI_APICallError",d=`vercel.ai.error.${u}`,c=Symbol.for(d),h=class extends(s=p,i=c,s){constructor({message:e,url:t,requestBodyValues:o,statusCode:r,responseHeaders:n,responseBody:s,cause:a,isRetryable:l=null!=r&&(408===r||409===r||429===r||r>=500),data:p}){super({name:u,message:e,cause:a}),this[i]=!0,this.url=t,this.requestBodyValues=o,this.statusCode=r,this.responseHeaders=n,this.responseBody=s,this.isRetryable=l,this.data=p}static isInstance(e){return p.hasMarker(e,d)}},f=Symbol.for("vercel.ai.error.AI_EmptyResponseBodyError");function g(e){return null==e?"unknown error":"string"==typeof e?e:e instanceof Error?e.message:JSON.stringify(e)}var m,y,v,C,w,E,_,b,R,S,O="AI_InvalidArgumentError",T=`vercel.ai.error.${O}`,P=Symbol.for(T),A=class extends(y=p,m=P,y){constructor({message:e,cause:t,argument:o}){super({name:O,message:e,cause:t}),this[m]=!0,this.argument=o}static isInstance(e){return p.hasMarker(e,T)}},I=Symbol.for("vercel.ai.error.AI_InvalidPromptError"),D=`vercel.ai.error.${"AI_InvalidResponseDataError"}`,N=Symbol.for(D),x="AI_JSONParseError",F=`vercel.ai.error.${x}`,M=Symbol.for(F),k=class extends(C=p,v=M,C){constructor({text:e,cause:t}){super({name:x,message:`JSON parsing failed: Text: ${e}.\nError message: ${g(t)}`,cause:t}),this[v]=!0,this.text=e}static isInstance(e){return p.hasMarker(e,F)}},L="AI_LoadAPIKeyError",G=`vercel.ai.error.${L}`,j=Symbol.for(G),W=class extends(E=p,w=j,E){constructor({message:e}){super({name:L,message:e}),this[w]=!0}static isInstance(e){return p.hasMarker(e,G)}},V=Symbol.for("vercel.ai.error.AI_LoadSettingError"),H=`vercel.ai.error.${"AI_NoContentGeneratedError"}`,B=Symbol.for(H),z=`vercel.ai.error.${"AI_NoSuchModelError"}`,U=Symbol.for(z),Y="AI_TooManyEmbeddingValuesForCallError",q=`vercel.ai.error.${Y}`,$=Symbol.for(q),K=class extends(b=p,_=$,b){constructor(e){super({name:Y,message:`Too many values for a single embedding call. The ${e.provider} model "${e.modelId}" can only embed up to ${e.maxEmbeddingsPerCall} values per call, but ${e.values.length} values were provided.`}),this[_]=!0,this.provider=e.provider,this.modelId=e.modelId,this.maxEmbeddingsPerCall=e.maxEmbeddingsPerCall,this.values=e.values}static isInstance(e){return p.hasMarker(e,q)}},Z="AI_TypeValidationError",J=`vercel.ai.error.${Z}`,Q=Symbol.for(J),X=class e extends(S=p,R=Q,S){constructor({value:e,cause:t,context:o}){let r="Type validation failed";if((null==o?void 0:o.field)&&(r+=` for ${o.field}`),(null==o?void 0:o.entityName)||(null==o?void 0:o.entityId)){r+=" (";const e=[];o.entityName&&e.push(o.entityName),o.entityId&&e.push(`id: "${o.entityId}"`),r+=e.join(", "),r+=")"}super({name:Z,message:`${r}: Value: ${JSON.stringify(e)}.\nError message: ${g(t)}`,cause:t}),this[R]=!0,this.value=e,this.context=o}static isInstance(e){return p.hasMarker(e,J)}static wrap({value:t,cause:o,context:r}){var n,i,s;return e.isInstance(o)&&o.value===t&&(null==(n=o.context)?void 0:n.field)===(null==r?void 0:r.field)&&(null==(i=o.context)?void 0:i.entityName)===(null==r?void 0:r.entityName)&&(null==(s=o.context)?void 0:s.entityId)===(null==r?void 0:r.entityId)?o:new e({value:t,cause:o,context:r})}},ee=Symbol.for("vercel.ai.error.AI_UnsupportedFunctionalityError")},12598:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0});var o=function(){function e(){this.existingIds={}}return e.prototype.getInstanceIdForKey=function(e){var t,o=this.existingIds[e];return t="number"!=typeof o?0:o+1,this.existingIds[e]=t,t},e}();t.GroupInstanceIdCreator=o},13650:function(e,t,o){var r,n=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o])},r(e,t)},function(e,t){function o(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)}),i=this&&this.__decorate||function(e,t,o,r){var n,i=arguments.length,s=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,o):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,o,r);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(s=(i<3?n(s):i>3?n(t,o,s):n(t,o))||s);return i>3&&s&&Object.defineProperty(t,o,s),s},s=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)};Object.defineProperty(t,"__esModule",{value:!0});var a,l=o(22131),p=o(47721),u=o(72493),d=o(44081),c=o(83423);!function(e){e[e.MAIN=0]="MAIN",e[e.CONDITION=1]="CONDITION"}(a=t.FilterConditionType||(t.FilterConditionType={}));var h={loadingOoo:"Loading...",empty:"Choose One",equals:"Equals",notEqual:"Not equal",lessThan:"Less than",greaterThan:"Greater than",inRange:"In range",lessThanOrEqual:"Less than or equals",greaterThanOrEqual:"Greater than or equals",filterOoo:"Filter...",contains:"Contains",notContains:"Not contains",startsWith:"Starts with",endsWith:"Ends with",searchOoo:"Search...",selectAll:"Select All",applyFilter:"Apply Filter",clearFilter:"Clear Filter",andCondition:"AND",orCondition:"OR"},f=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.customFilterOptions={},t}return n(t,e),t.prototype.init=function(e){var t=this;if(this.filterParams=e,this.defaultFilter=this.filterParams.defaultOption,e.filterOptions&&e.filterOptions.forEach((function(e){"string"!=typeof e&&(e.displayKey?e.displayName?e.test?t.customFilterOptions[e.displayKey]=e:console.warn("ag-Grid: ignoring FilterOptionDef as it doesn't contain a 'test'"):console.warn("ag-Grid: ignoring FilterOptionDef as it doesn't contain a 'displayName'"):console.warn("ag-Grid: ignoring FilterOptionDef as it doesn't contain a 'displayKey'"))})),this.filterParams.filterOptions&&!this.defaultFilter){var o=this.filterParams.filterOptions[0];"string"==typeof o?this.defaultFilter=o:o.displayKey?this.defaultFilter=o.displayKey:console.warn("ag-Grid: invalid FilterOptionDef supplied as it doesn't contain a 'displayKey'")}this.customInit(),this.selectedFilter=this.defaultFilter,this.selectedFilterCondition=this.defaultFilter,this.clearActive=!0===e.clearButton,this.applyActive=!0===e.applyButton||!0===e.apply,this.newRowsActionKeep="keep"===e.newRowsAction,this.setTemplate(this.generateTemplate()),c._.setVisible(this.eApplyButton,this.applyActive),this.applyActive&&this.addDestroyableEventListener(this.eApplyButton,"click",this.filterParams.filterChangedCallback),c._.setVisible(this.eClearButton,this.clearActive),this.clearActive&&this.addDestroyableEventListener(this.eClearButton,"click",this.onClearButton.bind(this));var r=this.applyActive||this.clearActive;c._.setVisible(this.eButtonsPanel,r),this.initialiseFilterBodyUi(a.MAIN),this.refreshFilterBodyUi(a.MAIN)},t.prototype.onClearButton=function(){this.setModel(null),this.onFilterChanged()},t.prototype.floatingFilter=function(e){if(""!==e){var t=this.modelFromFloatingFilter(e);this.setModel(t)}else this.resetState();this.onFilterChanged()},t.prototype.onNewRowsLoaded=function(){this.newRowsActionKeep||this.resetState()},t.prototype.getModel=function(){return this.isFilterActive()?this.isFilterConditionActive(a.CONDITION)?{condition1:this.serialize(a.MAIN),condition2:this.serialize(a.CONDITION),operator:this.conditionValue}:this.serialize(a.MAIN):null},t.prototype.getNullableModel=function(){return this.isFilterConditionActive(a.CONDITION)?{condition1:this.serialize(a.MAIN),condition2:this.serialize(a.CONDITION),operator:this.conditionValue}:this.serialize(a.MAIN)},t.prototype.setModel=function(e){if(e)if(e.operator){var t=e;this.parse(t.condition1,a.MAIN),this.parse(t.condition2,a.CONDITION),this.conditionValue=t.operator}else this.resetState(),this.parse(e,a.MAIN);else this.resetState();this.redrawCondition(),this.refreshFilterBodyUi(a.MAIN),this.refreshFilterBodyUi(a.CONDITION)},t.prototype.doOnFilterChanged=function(e){void 0===e&&(e=!1),this.filterParams.filterModifiedCallback();var t=this.applyActive&&e,o=!this.applyActive||t;return o&&this.filterParams.filterChangedCallback(),this.refreshFilterBodyUi(a.MAIN),this.refreshFilterBodyUi(a.CONDITION),o},t.prototype.onFilterChanged=function(e){void 0===e&&(e=!1),this.doOnFilterChanged(e),this.redrawCondition(),this.refreshFilterBodyUi(a.MAIN),this.refreshFilterBodyUi(a.CONDITION)},t.prototype.redrawCondition=function(){var e=this,t=this.eFilterBodyWrapper.querySelector(".ag-filter-condition");if(!t&&this.isFilterActive()&&this.acceptsBooleanLogic()){this.eConditionWrapper=c._.loadTemplate(this.createConditionTemplate(a.CONDITION)),this.eFilterBodyWrapper.appendChild(this.eConditionWrapper),this.wireQuerySelectors();var o=this.refreshOperatorUi(),r=o.andButton,n=o.orButton;this.addDestroyableEventListener(r,"change",(function(){e.conditionValue="AND",e.onFilterChanged()})),this.addDestroyableEventListener(n,"change",(function(){e.conditionValue="OR",e.onFilterChanged()})),this.initialiseFilterBodyUi(a.CONDITION)}else t&&!this.isFilterActive()?(this.conditionValue="AND",this.resetState(!0),this.eFilterBodyWrapper.removeChild(this.eConditionWrapper),this.eConditionWrapper=null):(this.refreshFilterBodyUi(a.CONDITION),this.eConditionWrapper&&this.refreshOperatorUi())},t.prototype.refreshOperatorUi=function(){var e=this.eConditionWrapper.querySelector(".and"),t=this.eConditionWrapper.querySelector(".or");return this.conditionValue=null==this.conditionValue?"AND":this.conditionValue,e.checked="AND"===this.conditionValue,t.checked="OR"===this.conditionValue,{andButton:e,orButton:t}},t.prototype.onFloatingFilterChanged=function(e){var t=e;if(null==t)this.setModel(null);else if(this.isFilterConditionActive(a.CONDITION)){var o={condition1:t.model,condition2:this.serialize(a.CONDITION),operator:this.conditionValue};this.setModel(o)}else this.setModel(t?t.model:null);return this.doOnFilterChanged(!!t&&t.apply)},t.prototype.generateFilterHeader=function(e){return""},t.prototype.generateTemplate=function(){var e=this.translate.bind(this),t=this.createConditionBody(a.MAIN);return"<div>\n <div class='ag-filter-body-wrapper'>"+(this.acceptsBooleanLogic()?this.wrapCondition(t):t)+'</div>\n <div class="ag-filter-apply-panel" id="applyPanel">\n <button type="button" id="clearButton">'+e("clearFilter")+'</button>\n <button type="button" id="applyButton">'+e("applyFilter")+"</button>\n </div>\n </div>"},t.prototype.acceptsBooleanLogic=function(){return!1},t.prototype.wrapCondition=function(e){return this.isFilterActive()?""+e+this.createConditionTemplate(a.CONDITION):e},t.prototype.createConditionTemplate=function(e){return'<div class="ag-filter-condition">\n <input id="andId" type="radio" class="and" name="booleanLogic" value='+this.translate("AND")+'\n checked="checked" /><label style="display: inline" for="andId">'+this.translate("andCondition")+'</label>\n <input id="orId" type="radio" class="or" name="booleanLogic" value="OR" /><label style="display: inline"\n for="orId">'+this.translate("orCondition")+"</label>\n <div>"+this.createConditionBody(e)+"</div>\n </div>"},t.prototype.createConditionBody=function(e){var t=this.bodyTemplate(e);return this.generateFilterHeader(e)+t},t.prototype.translate=function(e){var t=this.gridOptionsWrapper.getLocaleTextFunc(),o=h[e];return!o&&this.customFilterOptions[e]&&(o=this.customFilterOptions[e].displayName),t(e,o)},t.prototype.getDebounceMs=function(e){return this.applyActive?(null!=e.debounceMs&&console.warn("ag-Grid: debounceMs is ignored when applyButton = true"),0):null!=e.debounceMs?e.debounceMs:500},t.prototype.doesFilterHaveHiddenInput=function(e){var t=this.customFilterOptions[e];return t&&t.hideFilterInput},t.EMPTY="empty",t.EQUALS="equals",t.NOT_EQUAL="notEqual",t.LESS_THAN="lessThan",t.LESS_THAN_OR_EQUAL="lessThanOrEqual",t.GREATER_THAN="greaterThan",t.GREATER_THAN_OR_EQUAL="greaterThanOrEqual",t.IN_RANGE="inRange",t.CONTAINS="contains",t.NOT_CONTAINS="notContains",t.STARTS_WITH="startsWith",t.ENDS_WITH="endsWith",i([p.QuerySelector("#applyPanel"),s("design:type",HTMLElement)],t.prototype,"eButtonsPanel",void 0),i([p.QuerySelector(".ag-filter-body-wrapper"),s("design:type",HTMLElement)],t.prototype,"eFilterBodyWrapper",void 0),i([p.QuerySelector("#applyButton"),s("design:type",HTMLElement)],t.prototype,"eApplyButton",void 0),i([p.QuerySelector("#clearButton"),s("design:type",HTMLElement)],t.prototype,"eClearButton",void 0),i([u.Autowired("gridOptionsWrapper"),s("design:type",d.GridOptionsWrapper)],t.prototype,"gridOptionsWrapper",void 0),t}(l.Component);t.BaseFilter=f;var g=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),t.prototype.doesFilterPass=function(e){var t=this.individualFilterPasses(e,a.MAIN);if(null==this.eTypeConditionSelector)return t;var o=this.individualFilterPasses(e,a.CONDITION);return"AND"===this.conditionValue?t&&o:t||o},t.prototype.init=function(t){e.prototype.init.call(this,t),this.suppressAndOrCondition=t.suppressAndOrCondition},t.prototype.customInit=function(){this.defaultFilter||(this.defaultFilter=this.getDefaultType())},t.prototype.acceptsBooleanLogic=function(){return!0!==this.suppressAndOrCondition},t.prototype.generateFilterHeader=function(e){var t=this,o=this.getApplicableFilterTypes(),r=(this.filterParams.filterOptions||o).map((function(e){var o="string"==typeof e?e:e.displayKey;return'<option value="'+o+'">'+t.translate(o)+"</option>"})),n=1==r.length?"disabled":"",i=e==a.MAIN?"filterType":"filterConditionType";return r.length<=0?"":'<div>\n <select class="ag-filter-select" id="'+i+'" '+n+">\n "+r.join("")+"\n </select>\n </div>"},t.prototype.initialiseFilterBodyUi=function(e){var t=this;e===a.MAIN?(this.setFilterType(this.selectedFilter,e),this.addDestroyableEventListener(this.eTypeSelector,"change",(function(){return t.onFilterTypeChanged(e)}))):(this.setFilterType(this.selectedFilterCondition,e),this.addDestroyableEventListener(this.eTypeConditionSelector,"change",(function(){return t.onFilterTypeChanged(e)})))},t.prototype.onFilterTypeChanged=function(e){var t=this.selectedFilter;e===a.MAIN?this.selectedFilter=this.eTypeSelector.value:this.selectedFilterCondition=this.eTypeConditionSelector.value,this.refreshFilterBodyUi(e);var o=this.doesFilterHaveHiddenInput(t);(this.isFilterActive()||o)&&(this.selectedFilter===f.EMPTY&&this.resetState(),this.onFilterChanged())},t.prototype.isFilterActive=function(){if(this.doesFilterHaveHiddenInput(this.selectedFilter))return!0;var e=this.filterValues(a.MAIN);if(e&&this.selectedFilter===f.IN_RANGE){var t=e;return null!=t[0]&&null!=t[1]}return null!=e},t.prototype.setFilterType=function(e,t){if(t===a.MAIN){if(this.selectedFilter=e,!this.eTypeSelector)return;this.eTypeSelector.value=e}else{if(this.selectedFilterCondition=e,!this.eTypeConditionSelector)return;this.eTypeConditionSelector.value=e}},t.prototype.isFilterConditionActive=function(e){return null!=this.filterValues(e)},i([p.QuerySelector("#filterType"),s("design:type",HTMLSelectElement)],t.prototype,"eTypeSelector",void 0),i([p.QuerySelector("#filterConditionType"),s("design:type",HTMLSelectElement)],t.prototype,"eTypeConditionSelector",void 0),t}(f);t.ComparableBaseFilter=g;var m=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),t.prototype.nullComparator=function(e){var t=this;return function(o,r){if(null==r){var n=t.translateNull(e);if(t.selectedFilter===f.EMPTY)return 0;if(t.selectedFilter===f.EQUALS)return n?0:1;if(t.selectedFilter===f.GREATER_THAN)return n?1:-1;if(t.selectedFilter===f.GREATER_THAN_OR_EQUAL)return n?1:-1;if(t.selectedFilter===f.LESS_THAN_OR_EQUAL)return n?-1:1;if(t.selectedFilter===f.LESS_THAN)return n?-1:1;if(t.selectedFilter===f.NOT_EQUAL)return n?1:0}return t.comparator()(o,r)}},t.prototype.getDefaultType=function(){return f.EQUALS},t.prototype.translateNull=function(e){var o=e.indexOf("greater")>-1?"greaterThan":e.indexOf("lessThan")>-1?"lessThan":"equals";return this.filterParams.nullComparator&&this.filterParams.nullComparator[o]?this.filterParams.nullComparator[o]:t.DEFAULT_NULL_COMPARATOR[o]},t.prototype.individualFilterPasses=function(e,t){return this.doIndividualFilterPasses(e,t,t===a.MAIN?this.selectedFilter:this.selectedFilterCondition)},t.prototype.doIndividualFilterPasses=function(e,t,o){var r=this.filterParams.valueGetter(e.node),n=this.filterValues(t),i=Array.isArray(n)?n[0]:n,s=this.customFilterOptions[o];if(s&&(null!=i||s.hideFilterInput))return s.test(i,r);if(null==i)return t===a.MAIN||"AND"===this.conditionValue;var l=this.nullComparator(o),p=l(i,r);if(o===f.EMPTY)return!1;if(o===f.EQUALS)return 0===p;if(o===f.GREATER_THAN)return p>0;if(o===f.GREATER_THAN_OR_EQUAL)return p>=0;if(o===f.LESS_THAN_OR_EQUAL)return p<=0;if(o===f.LESS_THAN)return p<0;if(o===f.NOT_EQUAL)return 0!=p;var u=l(n[1],r);if(o===f.IN_RANGE)return this.filterParams.inRangeInclusive?p>=0&&u<=0:p>0&&u<0;throw new Error("Unexpected type of filter: "+o)},t.DEFAULT_NULL_COMPARATOR={equals:!1,lessThan:!1,greaterThan:!1},t}(g);t.ScalarBaseFilter=m},13887:function(e,t,o){var r=this&&this.__decorate||function(e,t,o,r){var n,i=arguments.length,s=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,o):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,o,r);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(s=(i<3?n(s):i>3?n(t,o,s):n(t,o))||s);return i>3&&s&&Object.defineProperty(t,o,s),s},n=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)};Object.defineProperty(t,"__esModule",{value:!0});var i=o(72493),s=o(60843),a=o(63405),l=o(98239),p=o(44871),u=o(40797),d=o(44081),c=function(){function e(){}return e.prototype.setScrollsVisible=function(e){if(this.horizontalScrollShowing!==e.horizontalScrollShowing||this.verticalScrollShowing!==e.verticalScrollShowing){this.horizontalScrollShowing=e.horizontalScrollShowing,this.verticalScrollShowing=e.verticalScrollShowing;var t={type:a.Events.EVENT_SCROLL_VISIBILITY_CHANGED,api:this.gridApi,columnApi:this.columnApi};this.eventService.dispatchEvent(t)}},e.prototype.isHorizontalScrollShowing=function(){return this.horizontalScrollShowing},e.prototype.isVerticalScrollShowing=function(){return this.verticalScrollShowing},r([i.Autowired("eventService"),n("design:type",s.EventService)],e.prototype,"eventService",void 0),r([i.Autowired("columnController"),n("design:type",l.ColumnController)],e.prototype,"columnController",void 0),r([i.Autowired("columnApi"),n("design:type",p.ColumnApi)],e.prototype,"columnApi",void 0),r([i.Autowired("gridApi"),n("design:type",u.GridApi)],e.prototype,"gridApi",void 0),r([i.Autowired("gridOptionsWrapper"),n("design:type",d.GridOptionsWrapper)],e.prototype,"gridOptionsWrapper",void 0),r([i.Bean("scrollVisibleService")],e)}();t.ScrollVisibleService=c},15068:function(e,t,o){var r=this&&this.__decorate||function(e,t,o,r){var n,i=arguments.length,s=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,o):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,o,r);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(s=(i<3?n(s):i>3?n(t,o,s):n(t,o))||s);return i>3&&s&&Object.defineProperty(t,o,s),s},n=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)};Object.defineProperty(t,"__esModule",{value:!0});var i=o(60843),s=o(63405),a=o(44081),l=o(54828),p=o(24463),u=o(98239),d=o(44871),c=o(72493),h=o(45727),f=o(88842),g=o(40797),m=o(83423),y=function(){function e(){this.childrenMapped={},this.selectable=!0,this.__objectId=e.OBJECT_ID_SEQUENCE++,this.alreadyRendered=!1,this.selected=!1}return e.prototype.setData=function(e){var t=this.data;this.data=e,this.valueCache.onDataChanged(),this.updateDataOnDetailNode(),this.checkRowSelectable();var o=this.createDataChangedEvent(e,t,!1);this.dispatchLocalEvent(o)},e.prototype.updateDataOnDetailNode=function(){this.detailNode&&(this.detailNode.data=this.data)},e.prototype.createDataChangedEvent=function(t,o,r){return{type:e.EVENT_DATA_CHANGED,node:this,oldData:o,newData:t,update:r}},e.prototype.createLocalRowEvent=function(e){return{type:e,node:this}},e.prototype.updateData=function(e){var t=this.data;this.data=e,this.updateDataOnDetailNode(),this.checkRowSelectable(),this.updateDataOnDetailNode();var o=this.createDataChangedEvent(e,t,!0);this.dispatchLocalEvent(o)},e.prototype.getRowIndexString=function(){return this.rowPinned===h.Constants.PINNED_TOP?"t-"+this.rowIndex:this.rowPinned===h.Constants.PINNED_BOTTOM?"b-"+this.rowIndex:this.rowIndex.toString()},e.prototype.createDaemonNode=function(){var t=new e;return this.context.wireBean(t),t.id=this.id,t.data=this.data,t.daemon=!0,t.selected=this.selected,t.level=this.level,t},e.prototype.setDataAndId=function(e,t){var o=m._.exists(this.id)?this.createDaemonNode():null,r=this.data;this.data=e,this.updateDataOnDetailNode(),this.setId(t),this.selectionController.syncInRowNode(this,o),this.checkRowSelectable();var n=this.createDataChangedEvent(e,r,!1);this.dispatchLocalEvent(n)},e.prototype.checkRowSelectable=function(){var e=this.gridOptionsWrapper.getIsRowSelectableFunc(),t=e&&m._.exists(this);this.setRowSelectable(!t||e(this))},e.prototype.setRowSelectable=function(t){this.selectable!==t&&(this.selectable=t,this.eventService&&this.eventService.dispatchEvent(this.createLocalRowEvent(e.EVENT_SELECTABLE_CHANGED)))},e.prototype.setId=function(e){var t=this.gridOptionsWrapper.getRowNodeIdFunc();t?this.data?this.id=t(this.data):this.id=void 0:this.id=e},e.prototype.isPixelInRange=function(e){return e>=this.rowTop&&e<this.rowTop+this.rowHeight},e.prototype.clearRowTop=function(){this.oldRowTop=this.rowTop,this.setRowTop(null)},e.prototype.setFirstChild=function(t){this.firstChild!==t&&(this.firstChild=t,this.eventService&&this.eventService.dispatchEvent(this.createLocalRowEvent(e.EVENT_FIRST_CHILD_CHANGED)))},e.prototype.setLastChild=function(t){this.lastChild!==t&&(this.lastChild=t,this.eventService&&this.eventService.dispatchEvent(this.createLocalRowEvent(e.EVENT_LAST_CHILD_CHANGED)))},e.prototype.setChildIndex=function(t){this.childIndex!==t&&(this.childIndex=t,this.eventService&&this.eventService.dispatchEvent(this.createLocalRowEvent(e.EVENT_CHILD_INDEX_CHANGED)))},e.prototype.setRowTop=function(t){this.rowTop!==t&&(this.rowTop=t,this.eventService&&this.eventService.dispatchEvent(this.createLocalRowEvent(e.EVENT_TOP_CHANGED)))},e.prototype.setDragging=function(t){this.dragging!==t&&(this.dragging=t,this.eventService&&this.eventService.dispatchEvent(this.createLocalRowEvent(e.EVENT_DRAGGING_CHANGED)))},e.prototype.setAllChildrenCount=function(t){this.allChildrenCount!==t&&(this.allChildrenCount=t,this.eventService&&this.eventService.dispatchEvent(this.createLocalRowEvent(e.EVENT_ALL_CHILDREN_COUNT_CHANGED)))},e.prototype.setRowHeight=function(t,o){void 0===o&&(o=!1),this.rowHeight=t,this.rowHeightEstimated=o,this.eventService&&this.eventService.dispatchEvent(this.createLocalRowEvent(e.EVENT_HEIGHT_CHANGED))},e.prototype.setRowIndex=function(t){this.rowIndex=t,this.eventService&&this.eventService.dispatchEvent(this.createLocalRowEvent(e.EVENT_ROW_INDEX_CHANGED))},e.prototype.setUiLevel=function(t){this.uiLevel!==t&&(this.uiLevel=t,this.eventService&&this.eventService.dispatchEvent(this.createLocalRowEvent(e.EVENT_UI_LEVEL_CHANGED)))},e.prototype.setExpanded=function(t){if(this.expanded!==t){this.expanded=t,this.eventService&&this.eventService.dispatchEvent(this.createLocalRowEvent(e.EVENT_EXPANDED_CHANGED));var o=this.createGlobalRowEvent(s.Events.EVENT_ROW_GROUP_OPENED);this.mainEventService.dispatchEvent(o),this.gridOptionsWrapper.isGroupIncludeFooter()&&this.gridApi.redrawRows({rowNodes:[this]})}},e.prototype.createGlobalRowEvent=function(e){return{type:e,node:this,data:this.data,rowIndex:this.rowIndex,rowPinned:this.rowPinned,context:this.gridOptionsWrapper.getContext(),api:this.gridOptionsWrapper.getApi(),columnApi:this.gridOptionsWrapper.getColumnApi()}},e.prototype.dispatchLocalEvent=function(e){this.eventService&&this.eventService.dispatchEvent(e)},e.prototype.setDataValue=function(e,t){var o=this.columnController.getPrimaryColumn(e);this.valueService.setValue(this,o,t),this.dispatchCellChangedEvent(o,t)},e.prototype.setGroupValue=function(e,t){var o=this.columnController.getGridColumn(e);m._.missing(this.groupData)&&(this.groupData={}),this.groupData[o.getColId()]=t,this.dispatchCellChangedEvent(o,t)},e.prototype.setAggData=function(e){var t=this,o=m._.getAllKeysInObjects([this.aggData,e]);this.aggData=e,this.eventService&&o.forEach((function(e){var o=t.columnController.getGridColumn(e),r=t.aggData?t.aggData[e]:void 0;t.dispatchCellChangedEvent(o,r)}))},e.prototype.hasChildren=function(){return this.group||this.childrenAfterGroup&&this.childrenAfterGroup.length>0},e.prototype.isEmptyFillerNode=function(){return this.group&&m._.missingOrEmpty(this.childrenAfterGroup)},e.prototype.dispatchCellChangedEvent=function(t,o){var r={type:e.EVENT_CELL_CHANGED,node:this,column:t,newValue:o};this.dispatchLocalEvent(r)},e.prototype.resetQuickFilterAggregateText=function(){this.quickFilterAggregateText=null},e.prototype.isExpandable=function(){return this.hasChildren()||this.master},e.prototype.isSelected=function(){return this.footer?this.sibling.isSelected():this.selected},e.prototype.depthFirstSearch=function(e){this.childrenAfterGroup&&this.childrenAfterGroup.forEach((function(t){return t.depthFirstSearch(e)})),e(this)},e.prototype.calculateSelectedFromChildren=function(){var e,t=!1,o=!1,r=!1;if(this.childrenAfterGroup)for(var n=0;n<this.childrenAfterGroup.length;n++){var i=this.childrenAfterGroup[n];if(i.selectable)switch(i.isSelected()){case!0:t=!0;break;case!1:o=!0;break;default:r=!0}}e=r?void 0:!(!t||o)||!(!t&&o)&&void 0,this.selectThisNode(e)},e.prototype.setSelectedInitialValue=function(e){this.selected=e},e.prototype.setSelected=function(e,t,o){void 0===t&&(t=!1),void 0===o&&(o=!1),this.setSelectedParams({newValue:e,clearSelection:t,suppressFinishActions:o,rangeSelect:!1})},e.prototype.isRowPinned=function(){return this.rowPinned===h.Constants.PINNED_TOP||this.rowPinned===h.Constants.PINNED_BOTTOM},e.prototype.setSelectedParams=function(e){var t=this.gridOptionsWrapper.isGroupSelectsChildren(),o=!0===e.newValue,r=!0===e.clearSelection,n=!0===e.suppressFinishActions,i=!0===e.rangeSelect,a=t&&!0===e.groupSelectsFiltered;if(void 0===this.id)return console.warn("ag-Grid: cannot select node until id for node is known"),0;if(this.rowPinned)return console.warn("ag-Grid: cannot select pinned rows"),0;if(this.footer)return this.sibling.setSelectedParams(e);if(i){var l=this.selectionController.getLastSelectedNode()!==this,p=this.gridOptionsWrapper.isRowSelectionMulti();if(l&&p)return this.doRowRangeSelection()}var u=0;if(a&&this.group||this.selectThisNode(o)&&u++,t&&this.group&&(u+=this.selectChildNodes(o,a)),!n){if(o&&(r||!this.gridOptionsWrapper.isRowSelectionMulti())&&(u+=this.selectionController.clearOtherNodes(this)),u>0){this.selectionController.updateGroupsFromChildrenSelections();var d={type:s.Events.EVENT_SELECTION_CHANGED,api:this.gridApi,columnApi:this.columnApi};this.mainEventService.dispatchEvent(d)}o&&this.selectionController.setLastSelectedNode(this)}return u},e.prototype.doRowRangeSelection=function(){var e=0,t=this.gridOptionsWrapper.isGroupSelectsChildren(),o=this.selectionController.getLastSelectedNode();this.rowModel.getNodesInRangeForSelection(this,o).forEach((function(o){o.group&&t||o.selectThisNode(!0)&&e++})),this.selectionController.updateGroupsFromChildrenSelections();var r={type:s.Events.EVENT_SELECTION_CHANGED,api:this.gridApi,columnApi:this.columnApi};return this.mainEventService.dispatchEvent(r),e},e.prototype.isParentOfNode=function(e){for(var t=this.parent;t;){if(t===e)return!0;t=t.parent}return!1},e.prototype.selectThisNode=function(t){if(!this.selectable||this.selected===t)return!1;this.selected=t,this.eventService&&this.dispatchLocalEvent(this.createLocalRowEvent(e.EVENT_ROW_SELECTED));var o=this.createGlobalRowEvent(s.Events.EVENT_ROW_SELECTED);return this.mainEventService.dispatchEvent(o),!0},e.prototype.selectChildNodes=function(e,t){var o=t?this.childrenAfterFilter:this.childrenAfterGroup,r=0;if(!m._.missing(o)){for(var n=0;n<o.length;n++)r+=o[n].setSelectedParams({newValue:e,clearSelection:!1,suppressFinishActions:!0,groupSelectsFiltered:t});return r}},e.prototype.addEventListener=function(e,t){this.eventService||(this.eventService=new i.EventService),this.eventService.addEventListener(e,t)},e.prototype.removeEventListener=function(e,t){this.eventService.removeEventListener(e,t)},e.prototype.onMouseEnter=function(){this.dispatchLocalEvent(this.createLocalRowEvent(e.EVENT_MOUSE_ENTER))},e.prototype.onMouseLeave=function(){this.dispatchLocalEvent(this.createLocalRowEvent(e.EVENT_MOUSE_LEAVE))},e.prototype.getFirstChildOfFirstChild=function(e){for(var t,o=this,r=!0,n=!1;r&&!n;){var i=o.parent;m._.exists(i)&&o.firstChild?i.rowGroupColumn===e&&(n=!0,t=i):r=!1,o=i}return n?t:null},e.OBJECT_ID_SEQUENCE=0,e.EVENT_ROW_SELECTED="rowSelected",e.EVENT_DATA_CHANGED="dataChanged",e.EVENT_CELL_CHANGED="cellChanged",e.EVENT_ALL_CHILDREN_COUNT_CHANGED="allChildrenCountChanged",e.EVENT_MOUSE_ENTER="mouseEnter",e.EVENT_MOUSE_LEAVE="mouseLeave",e.EVENT_HEIGHT_CHANGED="heightChanged",e.EVENT_TOP_CHANGED="topChanged",e.EVENT_FIRST_CHILD_CHANGED="firstChildChanged",e.EVENT_LAST_CHILD_CHANGED="lastChildChanged",e.EVENT_CHILD_INDEX_CHANGED="childIndexChanged",e.EVENT_ROW_INDEX_CHANGED="rowIndexChanged",e.EVENT_EXPANDED_CHANGED="expandedChanged",e.EVENT_SELECTABLE_CHANGED="selectableChanged",e.EVENT_UI_LEVEL_CHANGED="uiLevelChanged",e.EVENT_DRAGGING_CHANGED="draggingChanged",r([c.Autowired("eventService"),n("design:type",i.EventService)],e.prototype,"mainEventService",void 0),r([c.Autowired("gridOptionsWrapper"),n("design:type",a.GridOptionsWrapper)],e.prototype,"gridOptionsWrapper",void 0),r([c.Autowired("selectionController"),n("design:type",l.SelectionController)],e.prototype,"selectionController",void 0),r([c.Autowired("columnController"),n("design:type",u.ColumnController)],e.prototype,"columnController",void 0),r([c.Autowired("valueService"),n("design:type",p.ValueService)],e.prototype,"valueService",void 0),r([c.Autowired("rowModel"),n("design:type",Object)],e.prototype,"rowModel",void 0),r([c.Autowired("context"),n("design:type",c.Context)],e.prototype,"context",void 0),r([c.Autowired("valueCache"),n("design:type",f.ValueCache)],e.prototype,"valueCache",void 0),r([c.Autowired("columnApi"),n("design:type",d.ColumnApi)],e.prototype,"columnApi",void 0),r([c.Autowired("gridApi"),n("design:type",g.GridApi)],e.prototype,"gridApi",void 0),e}();t.RowNode=y},15724:function(e,t,o){var r,n=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o])},r(e,t)},function(e,t){function o(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)}),i=this&&this.__decorate||function(e,t,o,r){var n,i=arguments.length,s=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,o):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,o,r);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(s=(i<3?n(s):i>3?n(t,o,s):n(t,o))||s);return i>3&&s&&Object.defineProperty(t,o,s),s},s=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)};Object.defineProperty(t,"__esModule",{value:!0});var a=o(46379),l=o(72493),p=o(44081),u=o(83423),d=function(e){function t(t){var o=e.call(this,'<div class="ag-popup-editor" tabindex="-1"/>')||this;return o.getGuiCalledOnChild=!1,o.cellEditor=t,o}return n(t,e),t.prototype.onKeyDown=function(e){u._.isUserSuppressingKeyboardEvent(this.gridOptionsWrapper,e,this.params.node,this.params.column,!0)||this.params.onKeyDown(e)},t.prototype.getGui=function(){return this.getGuiCalledOnChild||(this.appendChild(this.cellEditor.getGui()),this.getGuiCalledOnChild=!0),e.prototype.getGui.call(this)},t.prototype.init=function(o){var r=this;this.params=o,this.gridOptionsWrapper.setDomData(this.getGui(),t.DOM_KEY_POPUP_EDITOR_WRAPPER,!0),this.addDestroyFunc((function(){r.cellEditor.destroy&&r.cellEditor.destroy()})),this.addDestroyableEventListener(e.prototype.getGui.call(this),"keydown",this.onKeyDown.bind(this))},t.prototype.afterGuiAttached=function(){this.cellEditor.afterGuiAttached&&this.cellEditor.afterGuiAttached()},t.prototype.getValue=function(){return this.cellEditor.getValue()},t.prototype.isCancelBeforeStart=function(){if(this.cellEditor.isCancelBeforeStart)return this.cellEditor.isCancelBeforeStart()},t.prototype.isCancelAfterEnd=function(){if(this.cellEditor.isCancelAfterEnd)return this.cellEditor.isCancelAfterEnd()},t.prototype.focusIn=function(){this.cellEditor.focusIn&&this.cellEditor.focusIn()},t.prototype.focusOut=function(){this.cellEditor.focusOut&&this.cellEditor.focusOut()},t.DOM_KEY_POPUP_EDITOR_WRAPPER="popupEditorWrapper",i([l.Autowired("gridOptionsWrapper"),s("design:type",p.GridOptionsWrapper)],t.prototype,"gridOptionsWrapper",void 0),t}(a.PopupComponent);t.PopupEditorWrapper=d},15774:function(e,t,o){var r,n=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o])},r(e,t)},function(e,t){function o(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)}),i=this&&this.__decorate||function(e,t,o,r){var n,i=arguments.length,s=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,o):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,o,r);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(s=(i<3?n(s):i>3?n(t,o,s):n(t,o))||s);return i>3&&s&&Object.defineProperty(t,o,s),s},s=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)};Object.defineProperty(t,"__esModule",{value:!0});var a,l=o(22131),p=o(72493),u=o(44081),d=o(98239),c=o(26016),h=o(60843),f=o(63405),g=o(78481),m=o(18985),y=o(55e3),v=o(40797),C=o(45727),w=o(83423),E=o(32590);!function(e){e[e.COLUMN_GROUP=0]="COLUMN_GROUP",e[e.COLUMN=1]="COLUMN",e[e.FLOATING_FILTER=2]="FLOATING_FILTER"}(a=t.HeaderRowType||(t.HeaderRowType={}));var _=function(e){function t(t,o,r,n){var i=e.call(this,'<div class="ag-header-row" role="presentation"/>')||this;return i.headerComps={},i.dept=t,i.type=o,i.pinned=r,i.dropTarget=n,i}return n(t,e),t.prototype.forEachHeaderElement=function(e){var t=this;Object.keys(this.headerComps).forEach((function(o){e(t.headerComps[o])}))},t.prototype.destroy=function(){var t=Object.keys(this.headerComps);this.removeAndDestroyChildComponents(t),e.prototype.destroy.call(this)},t.prototype.removeAndDestroyChildComponents=function(e){var t=this;e.forEach((function(e){var o=t.headerComps[e];t.getGui().removeChild(o.getGui()),o.destroy(),delete t.headerComps[e]}))},t.prototype.onRowHeightChanged=function(){var e,t,o=this.columnController.getHeaderRowCount(),r=[],n=0;this.columnController.isPivotMode()?(n=0,e=this.gridOptionsWrapper.getPivotGroupHeaderHeight(),t=this.gridOptionsWrapper.getPivotHeaderHeight()):(this.gridOptionsWrapper.isFloatingFilter()&&o++,n=this.gridOptionsWrapper.isFloatingFilter()?1:0,e=this.gridOptionsWrapper.getGroupHeaderHeight(),t=this.gridOptionsWrapper.getHeaderHeight());for(var i=o-(1+n),s=0;s<i;s++)r.push(e);for(r.push(t),s=0;s<n;s++)r.push(this.gridOptionsWrapper.getFloatingFiltersHeight());var a=0;for(s=0;s<this.dept;s++)a+=r[s];this.getGui().style.top=a+"px",this.getGui().style.height=r[this.dept]+"px"},t.prototype.init=function(){this.onRowHeightChanged(),this.onVirtualColumnsChanged(),this.setWidth(),this.addDestroyableEventListener(this.gridOptionsWrapper,u.GridOptionsWrapper.PROP_HEADER_HEIGHT,this.onRowHeightChanged.bind(this)),this.addDestroyableEventListener(this.gridOptionsWrapper,u.GridOptionsWrapper.PROP_PIVOT_HEADER_HEIGHT,this.onRowHeightChanged.bind(this)),this.addDestroyableEventListener(this.gridOptionsWrapper,u.GridOptionsWrapper.PROP_GROUP_HEADER_HEIGHT,this.onRowHeightChanged.bind(this)),this.addDestroyableEventListener(this.gridOptionsWrapper,u.GridOptionsWrapper.PROP_PIVOT_GROUP_HEADER_HEIGHT,this.onRowHeightChanged.bind(this)),this.addDestroyableEventListener(this.gridOptionsWrapper,u.GridOptionsWrapper.PROP_FLOATING_FILTERS_HEIGHT,this.onRowHeightChanged.bind(this)),this.addDestroyableEventListener(this.eventService,f.Events.EVENT_VIRTUAL_COLUMNS_CHANGED,this.onVirtualColumnsChanged.bind(this)),this.addDestroyableEventListener(this.eventService,f.Events.EVENT_DISPLAYED_COLUMNS_CHANGED,this.onDisplayedColumnsChanged.bind(this)),this.addDestroyableEventListener(this.eventService,f.Events.EVENT_COLUMN_RESIZED,this.onColumnResized.bind(this)),this.addDestroyableEventListener(this.eventService,f.Events.EVENT_GRID_COLUMNS_CHANGED,this.onGridColumnsChanged.bind(this))},t.prototype.onColumnResized=function(){this.setWidth()},t.prototype.setWidth=function(){var e=this.getWidthForRow();this.getGui().style.width=e+"px"},t.prototype.getWidthForRow=function(){return this.gridOptionsWrapper.getDomLayout()===C.Constants.DOM_LAYOUT_PRINT?w._.missing(this.pinned)?this.columnController.getContainerWidth(c.Column.PINNED_RIGHT)+this.columnController.getContainerWidth(c.Column.PINNED_LEFT)+this.columnController.getContainerWidth(null):0:this.columnController.getContainerWidth(this.pinned)},t.prototype.onGridColumnsChanged=function(){this.removeAndDestroyAllChildComponents()},t.prototype.removeAndDestroyAllChildComponents=function(){var e=Object.keys(this.headerComps);this.removeAndDestroyChildComponents(e)},t.prototype.onDisplayedColumnsChanged=function(){this.onVirtualColumnsChanged(),this.setWidth()},t.prototype.getItemsAtDept=function(){var e=this;if(this.gridOptionsWrapper.getDomLayout()===C.Constants.DOM_LAYOUT_PRINT){if(w._.missing(this.pinned)){var t=[];return[c.Column.PINNED_LEFT,null,c.Column.PINNED_RIGHT].forEach((function(o){var r=e.columnController.getVirtualHeaderGroupRow(o,e.type==a.FLOATING_FILTER?e.dept-1:e.dept);t=t.concat(r)})),t}return[]}return this.columnController.getVirtualHeaderGroupRow(this.pinned,this.type==a.FLOATING_FILTER?this.dept-1:this.dept)},t.prototype.onVirtualColumnsChanged=function(){var e,t=this,o=Object.keys(this.headerComps),r=this.getItemsAtDept(),n=this.gridOptionsWrapper.isEnsureDomOrder();r.forEach((function(r){if(!r.isEmptyGroup()){var i,s,a=r.getUniqueId(),l=t.getGui();o.indexOf(a)>=0?(w._.removeFromArray(o,a),s=(i=t.headerComps[a]).getGui(),n&&w._.ensureDomOrder(l,s,e),e=s):(i=t.createHeaderComp(r),t.headerComps[a]=i,s=i.getGui(),n?w._.insertWithDomOrder(l,s,e):l.appendChild(s),e=s)}})),this.removeAndDestroyChildComponents(o)},t.prototype.createHeaderComp=function(e){var t;switch(this.type){case a.COLUMN:t=new g.HeaderWrapperComp(e,this.dropTarget,this.pinned);break;case a.COLUMN_GROUP:t=new m.HeaderGroupWrapperComp(e,this.dropTarget,this.pinned);break;case a.FLOATING_FILTER:t=new E.FloatingFilterWrapper(e)}return this.getContext().wireBean(t),t},i([p.Autowired("gridOptionsWrapper"),s("design:type",u.GridOptionsWrapper)],t.prototype,"gridOptionsWrapper",void 0),i([p.Autowired("gridApi"),s("design:type",v.GridApi)],t.prototype,"gridApi",void 0),i([p.Autowired("columnController"),s("design:type",d.ColumnController)],t.prototype,"columnController",void 0),i([p.Autowired("eventService"),s("design:type",h.EventService)],t.prototype,"eventService",void 0),i([p.Autowired("filterManager"),s("design:type",y.FilterManager)],t.prototype,"filterManager",void 0),i([p.PostConstruct,s("design:type",Function),s("design:paramtypes",[]),s("design:returntype",void 0)],t.prototype,"init",null),t}(l.Component);t.HeaderRowComp=_},15959:function(e,t,o){var r,n=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o])},r(e,t)},function(e,t){function o(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)});Object.defineProperty(t,"__esModule",{value:!0});var i=o(22131),s=o(83423),a=function(e){function t(){var o=e.call(this,t.TEMPLATE)||this;return o.refreshCount=0,o}return n(t,e),t.prototype.init=function(e){this.eValue=this.queryForHtmlElement(".ag-value-change-value"),this.eDelta=this.queryForHtmlElement(".ag-value-change-delta"),this.refresh(e)},t.prototype.showDelta=function(e,t){var o=Math.abs(t),r=e.formatValue(o),n=s._.exists(r)?r:o,i=t>=0;this.eDelta.innerHTML=i?"↑"+n:"↓"+n,s._.addOrRemoveCssClass(this.eDelta,"ag-value-change-delta-up",i),s._.addOrRemoveCssClass(this.eDelta,"ag-value-change-delta-down",!i)},t.prototype.setTimerToRemoveDelta=function(){var e=this;this.refreshCount++;var t=this.refreshCount;window.setTimeout((function(){t===e.refreshCount&&e.hideDeltaValue()}),2e3)},t.prototype.hideDeltaValue=function(){s._.removeCssClass(this.eValue,"ag-value-change-value-highlight"),s._.clearElement(this.eDelta)},t.prototype.refresh=function(e){var t=e.value;if(t!==this.lastValue){if(s._.exists(e.valueFormatted)?this.eValue.innerHTML=e.valueFormatted:s._.exists(e.value)?this.eValue.innerHTML=t:s._.clearElement(this.eValue),"number"==typeof t&&"number"==typeof this.lastValue){var o=t-this.lastValue;this.showDelta(e,o)}return this.lastValue&&s._.addCssClass(this.eValue,"ag-value-change-value-highlight"),this.setTimerToRemoveDelta(),this.lastValue=t,!0}},t.TEMPLATE='<span><span class="ag-value-change-delta"></span><span class="ag-value-change-value"></span></span>',t}(i.Component);t.AnimateShowChangeCellRenderer=a},18954:function(e,t,o){var r=this&&this.__decorate||function(e,t,o,r){var n,i=arguments.length,s=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,o):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,o,r);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(s=(i<3?n(s):i>3?n(t,o,s):n(t,o))||s);return i>3&&s&&Object.defineProperty(t,o,s),s},n=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)};Object.defineProperty(t,"__esModule",{value:!0});var i=o(72493),s=o(44081),a=o(2461),l=o(86608),p=o(98239),u=o(83423),d=function(){function e(){}return e.prototype.execute=function(e){var t=this.sortController.getSortForRowController(),o=u._.exists(t)&&t.length>0,r=o&&u._.exists(e.rowNodeTransactions)&&this.gridOptionsWrapper.isDeltaSort(),n=r?this.calculateDirtyNodes(e.rowNodeTransactions):null,i=this.columnController.getValueColumns(),s=u._.missingOrEmpty(i);this.sortService.sort(t,o,r,n,e.changedPath,s)},e.prototype.calculateDirtyNodes=function(e){var t={},o=function(e){e&&e.forEach((function(e){return t[e.id]=!0}))};return e.forEach((function(e){o(e.add),o(e.update),o(e.remove)})),t},r([i.Autowired("gridOptionsWrapper"),n("design:type",s.GridOptionsWrapper)],e.prototype,"gridOptionsWrapper",void 0),r([i.Autowired("sortService"),n("design:type",a.SortService)],e.prototype,"sortService",void 0),r([i.Autowired("sortController"),n("design:type",l.SortController)],e.prototype,"sortController",void 0),r([i.Autowired("columnController"),n("design:type",p.ColumnController)],e.prototype,"columnController",void 0),r([i.Bean("sortStage")],e)}();t.SortStage=d},18985:function(e,t,o){var r,n=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o])},r(e,t)},function(e,t){function o(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)}),i=this&&this.__decorate||function(e,t,o,r){var n,i=arguments.length,s=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,o):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,o,r);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(s=(i<3?n(s):i>3?n(t,o,s):n(t,o))||s);return i>3&&s&&Object.defineProperty(t,o,s),s},s=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)};Object.defineProperty(t,"__esModule",{value:!0});var a=o(22131),l=o(26016),p=o(74517),u=o(44871),d=o(98239),c=o(44081),h=o(97177),f=o(72493),g=o(34506),m=o(58342),y=o(38152),v=o(40797),C=o(85910),w=o(55090),E=o(81604),_=o(83423),b=function(e){function t(o,r,n){var i=e.call(this,t.TEMPLATE)||this;return i.childColumnsDestroyFuncs=[],i.columnGroup=o,i.dragSourceDropTarget=r,i.pinned=n,i}return n(t,e),t.prototype.postConstruct=function(){g.CssClassApplier.addHeaderClassesFromColDef(this.getComponentHolder(),this.getGui(),this.gridOptionsWrapper,null,this.columnGroup);var e=this.columnController.getDisplayNameForColumnGroup(this.columnGroup,"header");this.appendHeaderGroupComp(e),this.setupResize(),this.addClasses(),this.setupWidth(),this.addAttributes(),this.setupMovingCss(),this.setupTooltip(),this.addFeature(this.getContext(),new E.HoverFeature(this.columnGroup.getOriginalColumnGroup().getLeafColumns(),this.getGui()));var t=new y.SetLeftFeature(this.columnGroup,this.getGui(),this.beans);t.init(),this.addDestroyFunc(t.destroy.bind(t))},t.prototype.setupMovingCss=function(){var e=this;this.columnGroup.getOriginalColumnGroup().getLeafColumns().forEach((function(t){e.addDestroyableEventListener(t,l.Column.EVENT_MOVING_CHANGED,e.onColumnMovingChanged.bind(e))})),this.onColumnMovingChanged()},t.prototype.getComponentHolder=function(){return this.columnGroup.getColGroupDef()},t.prototype.getTooltipText=function(){var e=this.getComponentHolder();return e&&e.headerTooltip},t.prototype.setupTooltip=function(){var e=this.getTooltipText();null!=e&&(this.gridOptionsWrapper.isEnableBrowserTooltips()?this.getGui().setAttribute("title",e):this.beans.tooltipManager.registerTooltip(this))},t.prototype.onColumnMovingChanged=function(){_._.addOrRemoveCssClass(this.getGui(),"ag-header-cell-moving",this.columnGroup.isMoving())},t.prototype.addAttributes=function(){this.getGui().setAttribute("col-id",this.columnGroup.getUniqueId())},t.prototype.appendHeaderGroupComp=function(e){var t=this,o={displayName:e,columnGroup:this.columnGroup,setExpanded:function(e){t.columnController.setColumnGroupOpened(t.columnGroup.getOriginalColumnGroup(),e,"gridInitializing")},api:this.gridApi,columnApi:this.columnApi,context:this.gridOptionsWrapper.getContext()};if(!e){for(var r=this.columnGroup,n=r.getLeafColumns();r.getParent()&&r.getParent().getLeafColumns().length===n.length;)r=r.getParent();var i=r.getColGroupDef();i&&(e=i.headerName),e||(e=n?this.columnController.getDisplayNameForColumn(n[0],"header",!0):"")}var s=this.afterHeaderCompCreated.bind(this,e);this.userComponentFactory.newHeaderGroupComponent(o).then(s)},t.prototype.afterHeaderCompCreated=function(e,t){this.appendChild(t),this.setupMove(t.getGui(),e)},t.prototype.addClasses=function(){this.columnGroup.isPadding()?this.addCssClass("ag-header-group-cell-no-group"):this.addCssClass("ag-header-group-cell-with-group")},t.prototype.setupMove=function(e,t){var o=this;if(e&&!this.isSuppressMoving()){var r=this.columnGroup.getOriginalColumnGroup().getLeafColumns();if(e){var n={type:m.DragSourceType.HeaderCell,eElement:e,dragItemName:t,dragItemCallback:this.getDragItemForGroup.bind(this),dragSourceDropTarget:this.dragSourceDropTarget,dragStarted:function(){return r.forEach((function(e){return e.setMoving(!0,"uiColumnDragged")}))},dragStopped:function(){return r.forEach((function(e){return e.setMoving(!1,"uiColumnDragged")}))}};this.dragAndDropService.addDragSource(n,!0),this.addDestroyFunc((function(){return o.dragAndDropService.removeDragSource(n)}))}}},t.prototype.getDragItemForGroup=function(){var e=this.columnGroup.getOriginalColumnGroup().getLeafColumns(),t={};e.forEach((function(e){return t[e.getId()]=e.isVisible()}));var o=[];return this.columnController.getAllDisplayedColumns().forEach((function(t){e.indexOf(t)>=0&&(o.push(t),_._.removeFromArray(e,t))})),e.forEach((function(e){return o.push(e)})),{columns:o,visibleState:t}},t.prototype.isSuppressMoving=function(){var e=!1;return this.columnGroup.getLeafColumns().forEach((function(t){(t.getColDef().suppressMovable||t.isLockPosition())&&(e=!0)})),e||this.gridOptionsWrapper.isSuppressMovableColumns()},t.prototype.setupWidth=function(){this.addListenersToChildrenColumns(),this.addDestroyableEventListener(this.columnGroup,p.ColumnGroup.EVENT_DISPLAYED_CHILDREN_CHANGED,this.onDisplayedChildrenChanged.bind(this)),this.onWidthChanged(),this.addDestroyFunc(this.destroyListenersOnChildrenColumns.bind(this))},t.prototype.onDisplayedChildrenChanged=function(){this.addListenersToChildrenColumns(),this.onWidthChanged()},t.prototype.addListenersToChildrenColumns=function(){var e=this;this.destroyListenersOnChildrenColumns();var t=this.onWidthChanged.bind(this);this.columnGroup.getLeafColumns().forEach((function(o){o.addEventListener(l.Column.EVENT_WIDTH_CHANGED,t),o.addEventListener(l.Column.EVENT_VISIBLE_CHANGED,t),e.childColumnsDestroyFuncs.push((function(){o.removeEventListener(l.Column.EVENT_WIDTH_CHANGED,t),o.removeEventListener(l.Column.EVENT_VISIBLE_CHANGED,t)}))}))},t.prototype.destroyListenersOnChildrenColumns=function(){this.childColumnsDestroyFuncs.forEach((function(e){return e()})),this.childColumnsDestroyFuncs=[]},t.prototype.onWidthChanged=function(){this.getGui().style.width=this.columnGroup.getActualWidth()+"px"},t.prototype.setupResize=function(){var e=this;if(this.eHeaderCellResize=this.getRefElement("agResize"),this.columnGroup.isResizable()){var t=this.horizontalResizeService.addResizeBar({eResizeBar:this.eHeaderCellResize,onResizeStart:this.onResizeStart.bind(this),onResizing:this.onResizing.bind(this,!1),onResizeEnd:this.onResizing.bind(this,!0)});this.addDestroyFunc(t),this.gridOptionsWrapper.isSuppressAutoSize()||this.eHeaderCellResize.addEventListener("dblclick",(function(t){var o=[];e.columnGroup.getDisplayedLeafColumns().forEach((function(e){e.getColDef().suppressAutoSize||o.push(e.getColId())})),o.length>0&&e.columnController.autoSizeColumns(o,"uiColumnResized")}))}else _._.removeFromParent(this.eHeaderCellResize)},t.prototype.onResizeStart=function(e){var t=this,o=this.columnGroup.getDisplayedLeafColumns();this.resizeCols=_._.filter(o,(function(e){return e.isResizable()})),this.resizeStartWidth=0,this.resizeCols.forEach((function(e){return t.resizeStartWidth+=e.getActualWidth()})),this.resizeRatios=[],this.resizeCols.forEach((function(e){return t.resizeRatios.push(e.getActualWidth()/t.resizeStartWidth)}));var r=null;if(e&&(r=this.columnController.getDisplayedGroupAfter(this.columnGroup)),r){var n=r.getDisplayedLeafColumns();this.resizeTakeFromCols=_._.filter(n,(function(e){return e.isResizable()})),this.resizeTakeFromStartWidth=0,this.resizeTakeFromCols.forEach((function(e){return t.resizeTakeFromStartWidth+=e.getActualWidth()})),this.resizeTakeFromRatios=[],this.resizeTakeFromCols.forEach((function(e){return t.resizeTakeFromRatios.push(e.getActualWidth()/t.resizeTakeFromStartWidth)}))}else this.resizeTakeFromCols=null,this.resizeTakeFromStartWidth=null,this.resizeTakeFromRatios=null;_._.addCssClass(this.getGui(),"ag-column-resizing")},t.prototype.onResizing=function(e,t){var o=[],r=this.normaliseDragChange(t);o.push({columns:this.resizeCols,ratios:this.resizeRatios,width:this.resizeStartWidth+r}),this.resizeTakeFromCols&&o.push({columns:this.resizeTakeFromCols,ratios:this.resizeTakeFromRatios,width:this.resizeTakeFromStartWidth-r}),this.columnController.resizeColumnSets(o,e,"uiColumnDragged"),e&&_._.removeCssClass(this.getGui(),"ag-column-resizing")},t.prototype.normaliseDragChange=function(e){var t=e;return this.gridOptionsWrapper.isEnableRtl()?this.pinned!==l.Column.PINNED_LEFT&&(t*=-1):this.pinned===l.Column.PINNED_RIGHT&&(t*=-1),t},t.TEMPLATE='<div class="ag-header-group-cell"><div ref="agResize" class="ag-header-cell-resize"></div></div>',i([f.Autowired("gridOptionsWrapper"),s("design:type",c.GridOptionsWrapper)],t.prototype,"gridOptionsWrapper",void 0),i([f.Autowired("columnController"),s("design:type",d.ColumnController)],t.prototype,"columnController",void 0),i([f.Autowired("horizontalResizeService"),s("design:type",h.HorizontalResizeService)],t.prototype,"horizontalResizeService",void 0),i([f.Autowired("dragAndDropService"),s("design:type",m.DragAndDropService)],t.prototype,"dragAndDropService",void 0),i([f.Autowired("userComponentFactory"),s("design:type",C.UserComponentFactory)],t.prototype,"userComponentFactory",void 0),i([f.Autowired("gridApi"),s("design:type",v.GridApi)],t.prototype,"gridApi",void 0),i([f.Autowired("columnApi"),s("design:type",u.ColumnApi)],t.prototype,"columnApi",void 0),i([f.Autowired("beans"),s("design:type",w.Beans)],t.prototype,"beans",void 0),i([f.PostConstruct,s("design:type",Function),s("design:paramtypes",[]),s("design:returntype",void 0)],t.prototype,"postConstruct",null),t}(a.Component);t.HeaderGroupWrapperComp=b},19378:function(e,t,o){var r,n=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o])},r(e,t)},function(e,t){function o(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)}),i=this&&this.__assign||function(){return i=Object.assign||function(e){for(var t,o=1,r=arguments.length;o<r;o++)for(var n in t=arguments[o])Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e},i.apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0});var s=o(23054),a=o(15068),l=o(26016),p=o(63405),u=o(22131),d=o(83423),c=function(e){function t(t,o,r,n,i,s,a,l,p,u,d){var c=e.call(this)||this;return c.eAllRowContainers=[],c.active=!0,c.rowContainerReadyCount=0,c.refreshNeeded=!1,c.columnRefreshPending=!1,c.cellComps={},c.createSecondPassFuncs=[],c.removeFirstPassFuncs=[],c.removeSecondPassFuncs=[],c.initialised=!1,c.parentScope=t,c.beans=a,c.bodyContainerComp=o,c.pinnedLeftContainerComp=r,c.pinnedRightContainerComp=n,c.fullWidthContainerComp=i,c.rowNode=s,c.rowIsEven=c.rowNode.rowIndex%2==0,c.paginationPage=c.beans.paginationProxy.getCurrentPage(),c.useAnimationFrameForCreate=p,c.printLayout=u,c.embedFullWidth=d,c.setAnimateFlags(l),c}return n(t,e),t.prototype.init=function(){var e=this;this.rowFocused=this.beans.focusedCellController.isRowFocused(this.rowNode.rowIndex,this.rowNode.rowPinned),this.scope=this.createChildScopeOrNull(this.rowNode.data),this.setupRowContainers(),this.addListeners(),this.slideRowIn&&this.createSecondPassFuncs.push((function(){e.onTopChanged()})),this.fadeRowIn&&this.createSecondPassFuncs.push((function(){e.eAllRowContainers.forEach((function(e){return d._.removeCssClass(e,"ag-opacity-zero")}))}))},t.prototype.createTemplate=function(e,t){void 0===t&&(t=null);var o=[],r=this.rowNode.rowHeight,n=this.getInitialRowClasses(t).join(" "),i=d._.escape(this.rowNode.id),s=this.preProcessStylesFromGridOptions(),a=this.getRowBusinessKey(),l=d._.escape(a),p=this.getInitialRowTopStyle();return o.push("<div"),o.push(' role="row"'),o.push(' row-index="'+this.rowNode.getRowIndexString()+'"'),o.push(i?' row-id="'+i+'"':""),o.push(a?' row-business-key="'+l+'"':""),o.push(' comp-id="'+this.getCompId()+'"'),o.push(' class="'+n+'"'),o.push(' style="height: '+r+"px; "+p+" "+s+'">'),o.push(e),o.push("</div>"),o.join("")},t.prototype.getCellForCol=function(e){var t=this.cellComps[e.getColId()];return t?t.getGui():null},t.prototype.afterFlush=function(){this.initialised||(this.initialised=!0,this.executeProcessRowPostCreateFunc())},t.prototype.executeProcessRowPostCreateFunc=function(){var e=this.beans.gridOptionsWrapper.getProcessRowPostCreateFunc();e&&e({eRow:this.eBodyRow,ePinnedLeftRow:this.ePinnedLeftRow,ePinnedRightRow:this.ePinnedRightRow,node:this.rowNode,api:this.beans.gridOptionsWrapper.getApi(),rowIndex:this.rowNode.rowIndex,addRenderedRowListener:this.addEventListener.bind(this),columnApi:this.beans.gridOptionsWrapper.getColumnApi(),context:this.beans.gridOptionsWrapper.getContext()})},t.prototype.getInitialRowTopStyle=function(){if(this.printLayout)return"";var e=this.slideRowIn?this.roundRowTopToBounds(this.rowNode.oldRowTop):this.rowNode.rowTop,t=this.applyPaginationOffset(e),o=this.beans.maxDivHeightScaler.getRealPixelPosition(t);return this.beans.gridOptionsWrapper.isSuppressRowTransform()?"top: "+o+"px; ":"transform: translateY("+o+"px);"},t.prototype.getRowBusinessKey=function(){var e=this.beans.gridOptionsWrapper.getBusinessKeyForNodeFunc();if("function"==typeof e)return e(this.rowNode)},t.prototype.areAllContainersReady=function(){return 3===this.rowContainerReadyCount},t.prototype.lazyCreateCells=function(e,t){if(this.active){var o=this.createCells(e);t.innerHTML=o.template,this.callAfterRowAttachedOnCells(o.cellComps,t),this.rowContainerReadyCount++,this.areAllContainersReady()&&this.refreshNeeded&&this.refreshCells()}},t.prototype.createRowContainer=function(e,t,o){var r=this,n=this.useAnimationFrameForCreate,i=n?{cellComps:[],template:""}:this.createCells(t),s=this.createTemplate(i.template);e.appendRowTemplate(s,(function(){var s=e.getRowElement(r.getCompId());r.afterRowAttached(e,s),o(s),n?r.beans.taskQueue.addP1Task(r.lazyCreateCells.bind(r,t,s),r.rowNode.rowIndex):(r.callAfterRowAttachedOnCells(i.cellComps,s),r.rowContainerReadyCount=3)}))},t.prototype.createChildScopeOrNull=function(e){if(!this.beans.gridOptionsWrapper.isAngularCompileRows())return null;var t=this.parentScope.$new();return t.data=i({},e),t.rowNode=this.rowNode,t.context=this.beans.gridOptionsWrapper.getContext(),this.addDestroyFunc((function(){t.$destroy(),t.data=null,t.rowNode=null,t.context=null})),t},t.prototype.setupRowContainers=function(){var e=this.beans.gridOptionsWrapper.getIsFullWidthCellFunc(),o=!!e&&e(this.rowNode),r=this.beans.doingMasterDetail&&this.rowNode.detail,n=this.rowNode.group&&this.beans.gridOptionsWrapper.isGroupUseEntireRow();this.rowNode.stub?this.createFullWidthRows(t.LOADING_CELL_RENDERER,t.LOADING_CELL_RENDERER_COMP_NAME):r?this.createFullWidthRows(t.DETAIL_CELL_RENDERER,t.DETAIL_CELL_RENDERER_COMP_NAME):o?this.createFullWidthRows(t.FULL_WIDTH_CELL_RENDERER,null):n?this.createFullWidthRows(t.GROUP_ROW_RENDERER,t.GROUP_ROW_RENDERER_COMP_NAME):this.setupNormalRowContainers()},t.prototype.setupNormalRowContainers=function(){var e,t,o,r=this;this.printLayout?(e=this.beans.columnController.getAllDisplayedColumns(),t=[],o=[]):(e=this.beans.columnController.getAllDisplayedCenterVirtualColumnsForRow(this.rowNode),t=this.beans.columnController.getDisplayedLeftColumnsForRow(this.rowNode),o=this.beans.columnController.getDisplayedRightColumnsForRow(this.rowNode)),this.createRowContainer(this.bodyContainerComp,e,(function(e){return r.eBodyRow=e})),this.createRowContainer(this.pinnedRightContainerComp,o,(function(e){return r.ePinnedRightRow=e})),this.createRowContainer(this.pinnedLeftContainerComp,t,(function(e){return r.ePinnedLeftRow=e}))},t.prototype.createFullWidthRows=function(e,t){var o=this;this.fullWidthRow=!0,this.embedFullWidth?(this.createFullWidthRowContainer(this.bodyContainerComp,null,null,e,t,(function(e){o.eFullWidthRowBody=e}),(function(e){o.fullWidthRowComponentBody=e})),this.printLayout||(this.createFullWidthRowContainer(this.pinnedLeftContainerComp,l.Column.PINNED_LEFT,"ag-cell-last-left-pinned",e,t,(function(e){o.eFullWidthRowLeft=e}),(function(e){o.fullWidthRowComponentLeft=e})),this.createFullWidthRowContainer(this.pinnedRightContainerComp,l.Column.PINNED_RIGHT,"ag-cell-first-right-pinned",e,t,(function(e){o.eFullWidthRowRight=e}),(function(e){o.fullWidthRowComponentRight=e})))):this.createFullWidthRowContainer(this.fullWidthContainerComp,null,null,e,t,(function(e){o.eFullWidthRow=e}),(function(e){o.fullWidthRowComponent=e}))},t.prototype.setAnimateFlags=function(e){if(e){var t=d._.exists(this.rowNode.oldRowTop);this.slideRowIn=t,this.fadeRowIn=!t}else this.slideRowIn=!1,this.fadeRowIn=!1},t.prototype.isEditing=function(){return this.editingRow},t.prototype.stopRowEditing=function(e){this.stopEditing(e)},t.prototype.isFullWidth=function(){return this.fullWidthRow},t.prototype.addListeners=function(){this.addDestroyableEventListener(this.rowNode,a.RowNode.EVENT_HEIGHT_CHANGED,this.onRowHeightChanged.bind(this)),this.addDestroyableEventListener(this.rowNode,a.RowNode.EVENT_ROW_SELECTED,this.onRowSelected.bind(this)),this.addDestroyableEventListener(this.rowNode,a.RowNode.EVENT_ROW_INDEX_CHANGED,this.onRowIndexChanged.bind(this)),this.addDestroyableEventListener(this.rowNode,a.RowNode.EVENT_TOP_CHANGED,this.onTopChanged.bind(this)),this.addDestroyableEventListener(this.rowNode,a.RowNode.EVENT_EXPANDED_CHANGED,this.onExpandedChanged.bind(this)),this.addDestroyableEventListener(this.rowNode,a.RowNode.EVENT_DATA_CHANGED,this.onRowNodeDataChanged.bind(this)),this.addDestroyableEventListener(this.rowNode,a.RowNode.EVENT_CELL_CHANGED,this.onRowNodeCellChanged.bind(this)),this.addDestroyableEventListener(this.rowNode,a.RowNode.EVENT_DRAGGING_CHANGED,this.onRowNodeDraggingChanged.bind(this));var e=this.beans.eventService;this.addDestroyableEventListener(e,p.Events.EVENT_HEIGHT_SCALE_CHANGED,this.onTopChanged.bind(this)),this.addDestroyableEventListener(e,p.Events.EVENT_DISPLAYED_COLUMNS_CHANGED,this.onDisplayedColumnsChanged.bind(this)),this.addDestroyableEventListener(e,p.Events.EVENT_VIRTUAL_COLUMNS_CHANGED,this.onVirtualColumnsChanged.bind(this)),this.addDestroyableEventListener(e,p.Events.EVENT_COLUMN_RESIZED,this.onColumnResized.bind(this)),this.addDestroyableEventListener(e,p.Events.EVENT_CELL_FOCUSED,this.onCellFocusChanged.bind(this)),this.addDestroyableEventListener(e,p.Events.EVENT_PAGINATION_CHANGED,this.onPaginationChanged.bind(this)),this.addDestroyableEventListener(e,p.Events.EVENT_GRID_COLUMNS_CHANGED,this.onGridColumnsChanged.bind(this)),this.addDestroyableEventListener(e,p.Events.EVENT_MODEL_UPDATED,this.onModelUpdated.bind(this))},t.prototype.onGridColumnsChanged=function(){this.removeRenderedCells(Object.keys(this.cellComps))},t.prototype.onRowNodeDataChanged=function(e){this.forEachCellComp((function(t){return t.refreshCell({suppressFlash:!e.update,newData:!e.update})})),this.onRowSelected(),this.postProcessCss()},t.prototype.onRowNodeCellChanged=function(e){this.postProcessCss()},t.prototype.postProcessCss=function(){this.postProcessStylesFromGridOptions(),this.postProcessClassesFromGridOptions(),this.postProcessRowClassRules(),this.postProcessRowDragging()},t.prototype.onRowNodeDraggingChanged=function(){this.postProcessRowDragging()},t.prototype.postProcessRowDragging=function(){var e=this.rowNode.dragging;this.eAllRowContainers.forEach((function(t){return d._.addOrRemoveCssClass(t,"ag-row-dragging",e)}))},t.prototype.onExpandedChanged=function(){var e=this.rowNode;this.eAllRowContainers.forEach((function(t){return d._.addOrRemoveCssClass(t,"ag-row-group-expanded",e.expanded)})),this.eAllRowContainers.forEach((function(t){return d._.addOrRemoveCssClass(t,"ag-row-group-contracted",!e.expanded)}))},t.prototype.onDisplayedColumnsChanged=function(){this.fullWidthRow||this.refreshCells()},t.prototype.destroyFullWidthComponents=function(){this.fullWidthRowComponent&&(this.fullWidthRowComponent.destroy&&this.fullWidthRowComponent.destroy(),this.fullWidthRowComponent=null),this.fullWidthRowComponentBody&&(this.fullWidthRowComponentBody.destroy&&this.fullWidthRowComponentBody.destroy(),this.fullWidthRowComponent=null),this.fullWidthRowComponentLeft&&(this.fullWidthRowComponentLeft.destroy&&this.fullWidthRowComponentLeft.destroy(),this.fullWidthRowComponentLeft=null),this.fullWidthRowComponentRight&&(this.fullWidthRowComponentRight.destroy&&this.fullWidthRowComponentRight.destroy(),this.fullWidthRowComponent=null)},t.prototype.getContainerForCell=function(e){switch(e){case l.Column.PINNED_LEFT:return this.ePinnedLeftRow;case l.Column.PINNED_RIGHT:return this.ePinnedRightRow;default:return this.eBodyRow}},t.prototype.onVirtualColumnsChanged=function(){this.fullWidthRow||this.refreshCells()},t.prototype.onColumnResized=function(){this.fullWidthRow||this.refreshCells()},t.prototype.refreshCells=function(){if(this.areAllContainersReady())if(this.beans.gridOptionsWrapper.isSuppressAnimationFrame()||this.printLayout)this.refreshCellsInAnimationFrame();else{if(this.columnRefreshPending)return;this.beans.taskQueue.addP1Task(this.refreshCellsInAnimationFrame.bind(this),this.rowNode.rowIndex)}else this.refreshNeeded=!0},t.prototype.refreshCellsInAnimationFrame=function(){if(this.active){var e,t,o;this.columnRefreshPending=!1,this.printLayout?(e=this.beans.columnController.getAllDisplayedColumns(),t=[],o=[]):(e=this.beans.columnController.getAllDisplayedCenterVirtualColumnsForRow(this.rowNode),t=this.beans.columnController.getDisplayedLeftColumnsForRow(this.rowNode),o=this.beans.columnController.getDisplayedRightColumnsForRow(this.rowNode)),this.insertCellsIntoContainer(this.eBodyRow,e),this.insertCellsIntoContainer(this.ePinnedLeftRow,t),this.insertCellsIntoContainer(this.ePinnedRightRow,o);var r=Object.keys(this.cellComps);e.forEach((function(e){return d._.removeFromArray(r,e.getId())})),t.forEach((function(e){return d._.removeFromArray(r,e.getId())})),o.forEach((function(e){return d._.removeFromArray(r,e.getId())}));var n=d._.filter(r,this.isCellEligibleToBeRemoved.bind(this));this.removeRenderedCells(n)}},t.prototype.removeRenderedCells=function(e){var t=this;e.forEach((function(e){var o=t.cellComps[e];d._.missing(o)||(o.detach(),o.destroy(),t.cellComps[e]=null)}))},t.prototype.isCellEligibleToBeRemoved=function(e){var t=this.beans.columnController.getAllDisplayedColumns(),o=!0,r=this.cellComps[e];if(!r)return o;if(this.isCellInWrongRow(r))return o;var n=r.isEditing(),i=this.beans.focusedCellController.isCellFocused(r.getGridCell());if(n||i){var s=r.getColumn();return!(t.indexOf(s)>=0)&&o}return o},t.prototype.ensureCellInCorrectContainer=function(e){if(!this.printLayout){var t=e.getGui(),o=e.getColumn().getPinned(),r=this.getContainerForCell(o),n=e.getParentRow();n!==r&&(n&&n.removeChild(t),r.appendChild(t),e.setParentRow(r))}},t.prototype.isCellInWrongRow=function(e){var t=e.getColumn(),o=this.getContainerForCell(t.getPinned());return e.getParentRow()!==o},t.prototype.insertCellsIntoContainer=function(e,t){var o=this;if(e){var r=[],n=[];t.forEach((function(t){var i=t.getId(),s=o.cellComps[i];s?o.ensureCellInCorrectContainer(s):o.createNewCell(t,e,r,n)})),r.length>0&&(d._.appendHtml(e,r.join("")),this.callAfterRowAttachedOnCells(n,e))}},t.prototype.addDomData=function(e){var o=this.beans.gridOptionsWrapper;o.setDomData(e,t.DOM_DATA_KEY_RENDERED_ROW,this),this.addDestroyFunc((function(){o.setDomData(e,t.DOM_DATA_KEY_RENDERED_ROW,null)}))},t.prototype.createNewCell=function(e,t,o,r){var n=new s.CellComp(this.scope,this.beans,e,this.rowNode,this,!1,this.printLayout),i=n.getCreateTemplate();o.push(i),r.push(n),this.cellComps[e.getId()]=n,n.setParentRow(t)},t.prototype.onMouseEvent=function(e,t){switch(e){case"dblclick":this.onRowDblClick(t);break;case"click":this.onRowClick(t)}},t.prototype.createRowEvent=function(e,t){return{type:e,node:this.rowNode,data:this.rowNode.data,rowIndex:this.rowNode.rowIndex,rowPinned:this.rowNode.rowPinned,context:this.beans.gridOptionsWrapper.getContext(),api:this.beans.gridOptionsWrapper.getApi(),columnApi:this.beans.gridOptionsWrapper.getColumnApi(),event:t}},t.prototype.createRowEventWithSource=function(e,t){var o=this.createRowEvent(e,t);return o.source=this,o},t.prototype.onRowDblClick=function(e){if(!d._.isStopPropagationForAgGrid(e)){var t=this.createRowEventWithSource(p.Events.EVENT_ROW_DOUBLE_CLICKED,e);this.beans.eventService.dispatchEvent(t)}},t.prototype.onRowClick=function(e){if(!d._.isStopPropagationForAgGrid(e)){var t=this.createRowEventWithSource(p.Events.EVENT_ROW_CLICKED,e);this.beans.eventService.dispatchEvent(t);var o=e.ctrlKey||e.metaKey,r=e.shiftKey;if(!this.rowNode.group&&this.rowNode.selectable&&!this.rowNode.rowPinned&&this.beans.gridOptionsWrapper.isRowSelection()&&!this.beans.gridOptionsWrapper.isSuppressRowClickSelection()){var n=this.beans.gridOptionsWrapper.isRowMultiSelectWithClick(),i=this.beans.gridOptionsWrapper.isRowDeselection();if(this.rowNode.isSelected())n?this.rowNode.setSelectedParams({newValue:!1}):o?i&&this.rowNode.setSelectedParams({newValue:!1}):this.rowNode.setSelectedParams({newValue:!0,clearSelection:!0});else{var s=!n&&!o;this.rowNode.setSelectedParams({newValue:!0,clearSelection:s,rangeSelect:r})}}}},t.prototype.createFullWidthRowContainer=function(e,t,o,r,n,i,s){var a=this,l=this.createTemplate("",o);e.appendRowTemplate(l,(function(){var o=e.getRowElement(a.getCompId()),l=a.createFullWidthParams(o,t),p=a.beans.userComponentFactory.newFullWidthCellRenderer(l,r,n);p?(p.then((function(e){if(a.isAlive()){var t=e.getGui();o.appendChild(t),s(e)}else e.destroy&&e.destroy()})),a.afterRowAttached(e,o),i(o),a.beans.doingMasterDetail&&a.rowNode.detail||a.angular1Compile(o)):console.error("ag-Grid: fullWidthCellRenderer not defined")}))},t.prototype.angular1Compile=function(e){this.scope&&this.beans.$compile(e)(this.scope)},t.prototype.createFullWidthParams=function(e,t){return{fullWidth:!0,data:this.rowNode.data,node:this.rowNode,value:this.rowNode.key,$scope:this.scope?this.scope:this.parentScope,$compile:this.beans.$compile,rowIndex:this.rowNode.rowIndex,api:this.beans.gridOptionsWrapper.getApi(),columnApi:this.beans.gridOptionsWrapper.getColumnApi(),context:this.beans.gridOptionsWrapper.getContext(),eGridCell:e,eParentOfValue:e,pinned:t,addRenderedRowListener:this.addEventListener.bind(this)}},t.prototype.getInitialRowClasses=function(e){var t=[],o=this.beans.gridOptionsWrapper.isTreeData(),r=this.rowNode;return d._.exists(e)&&t.push(e),t.push("ag-row"),t.push(this.rowFocused?"ag-row-focus":"ag-row-no-focus"),this.fadeRowIn&&t.push("ag-opacity-zero"),t.push(this.rowIsEven?"ag-row-even":"ag-row-odd"),r.isSelected()&&t.push("ag-row-selected"),r.group?(t.push("ag-row-group"),t.push("ag-row-level-"+r.level),r.footer&&t.push("ag-row-footer")):t.push("ag-row-level-"+(r.parent?r.parent.level+1:"0")),r.stub&&t.push("ag-row-stub"),this.fullWidthRow&&t.push("ag-full-width-row"),(o?r.allChildrenCount:r.group&&!r.footer)&&t.push(r.expanded?"ag-row-group-expanded":"ag-row-group-contracted"),r.dragging&&t.push("ag-row-dragging"),d._.pushAll(t,this.processClassesFromGridOptions()),d._.pushAll(t,this.preProcessRowClassRules()),t.push(this.printLayout?"ag-row-position-relative":"ag-row-position-absolute"),this.firstRowOnPage=this.isFirstRowOnPage(),this.lastRowOnPage=this.isLastRowOnPage(),this.firstRowOnPage&&t.push("ag-row-first"),this.lastRowOnPage&&t.push("ag-row-last"),t},t.prototype.isFirstRowOnPage=function(){return this.rowNode.rowIndex===this.beans.paginationProxy.getPageFirstRow()},t.prototype.isLastRowOnPage=function(){return this.rowNode.rowIndex===this.beans.paginationProxy.getPageLastRow()},t.prototype.onModelUpdated=function(){var e=this.isFirstRowOnPage(),t=this.isLastRowOnPage();this.firstRowOnPage!==e&&(this.firstRowOnPage=e,this.eAllRowContainers.forEach((function(t){return d._.addOrRemoveCssClass(t,"ag-row-first",e)}))),this.lastRowOnPage!==t&&(this.lastRowOnPage=t,this.eAllRowContainers.forEach((function(e){return d._.addOrRemoveCssClass(e,"ag-row-last",t)})))},t.prototype.preProcessRowClassRules=function(){var e=[];return this.processRowClassRules((function(t){e.push(t)}),(function(e){})),e},t.prototype.processRowClassRules=function(e,t){this.beans.stylingService.processClassRules(this.beans.gridOptionsWrapper.rowClassRules(),{value:void 0,colDef:void 0,data:this.rowNode.data,node:this.rowNode,rowIndex:this.rowNode.rowIndex,api:this.beans.gridOptionsWrapper.getApi(),$scope:this.scope,context:this.beans.gridOptionsWrapper.getContext()},e,t)},t.prototype.stopEditing=function(e){if(void 0===e&&(e=!1),this.forEachCellComp((function(t){t.stopEditing(e)})),this.editingRow){if(!e){var t=this.createRowEvent(p.Events.EVENT_ROW_VALUE_CHANGED);this.beans.eventService.dispatchEvent(t)}this.setEditingRow(!1)}},t.prototype.setEditingRow=function(e){this.editingRow=e,this.eAllRowContainers.forEach((function(t){return d._.addOrRemoveCssClass(t,"ag-row-editing",e)}));var t=e?this.createRowEvent(p.Events.EVENT_ROW_EDITING_STARTED):this.createRowEvent(p.Events.EVENT_ROW_EDITING_STOPPED);this.beans.eventService.dispatchEvent(t)},t.prototype.startRowEditing=function(e,t,o){void 0===e&&(e=null),void 0===t&&(t=null),void 0===o&&(o=null),this.editingRow||(this.forEachCellComp((function(r){var n=r===o;n?r.startEditingIfEnabled(e,t,n):r.startEditingIfEnabled(null,null,n)})),this.setEditingRow(!0))},t.prototype.forEachCellComp=function(e){d._.iterateObject(this.cellComps,(function(t,o){o&&e(o)}))},t.prototype.postProcessClassesFromGridOptions=function(){var e=this,t=this.processClassesFromGridOptions();t&&t.length&&t.forEach((function(t){e.eAllRowContainers.forEach((function(e){return d._.addCssClass(e,t)}))}))},t.prototype.postProcessRowClassRules=function(){var e=this;this.processRowClassRules((function(t){e.eAllRowContainers.forEach((function(e){return d._.addCssClass(e,t)}))}),(function(t){e.eAllRowContainers.forEach((function(e){return d._.removeCssClass(e,t)}))}))},t.prototype.processClassesFromGridOptions=function(){var e=[],t=function(t){"string"==typeof t?e.push(t):Array.isArray(t)&&t.forEach((function(t){return e.push(t)}))},o=this.beans.gridOptionsWrapper.getRowClass();if(o){if("function"==typeof o)return void console.warn("ag-Grid: rowClass should not be a function, please use getRowClass instead");t(o)}var r=this.beans.gridOptionsWrapper.getRowClassFunc();return r&&t(r({node:this.rowNode,data:this.rowNode.data,rowIndex:this.rowNode.rowIndex,context:this.beans.gridOptionsWrapper.getContext(),api:this.beans.gridOptionsWrapper.getApi()})),e},t.prototype.preProcessStylesFromGridOptions=function(){var e=this.processStylesFromGridOptions();return d._.cssStyleObjectToMarkup(e)},t.prototype.postProcessStylesFromGridOptions=function(){var e=this.processStylesFromGridOptions();this.eAllRowContainers.forEach((function(t){return d._.addStylesToElement(t,e)}))},t.prototype.processStylesFromGridOptions=function(){var e=this.beans.gridOptionsWrapper.getRowStyle();if(!e||"function"!=typeof e){var t,o=this.beans.gridOptionsWrapper.getRowStyleFunc();return o&&(t=o({data:this.rowNode.data,node:this.rowNode,api:this.beans.gridOptionsWrapper.getApi(),context:this.beans.gridOptionsWrapper.getContext(),$scope:this.scope})),d._.assign({},e,t)}console.warn("ag-Grid: rowStyle should be an object of key/value styles, not be a function, use getRowStyle() instead")},t.prototype.createCells=function(e){var t=this,o=[],r=[];return e.forEach((function(e){var n=new s.CellComp(t.scope,t.beans,e,t.rowNode,t,!1,t.printLayout),i=n.getCreateTemplate();o.push(i),r.push(n),t.cellComps[e.getId()]=n})),{template:o.join(""),cellComps:r}},t.prototype.onRowSelected=function(){var e=this.rowNode.isSelected();this.eAllRowContainers.forEach((function(t){return d._.addOrRemoveCssClass(t,"ag-row-selected",e)}))},t.prototype.callAfterRowAttachedOnCells=function(e,t){var o=this;e.forEach((function(e){e.setParentRow(t),e.afterAttached(),o.editingRow&&e.startEditingIfEnabled()}))},t.prototype.afterRowAttached=function(e,t){var o=this;this.addDomData(t),this.removeSecondPassFuncs.push((function(){e.removeRowElement(t)})),this.removeFirstPassFuncs.push((function(){if(d._.exists(o.rowNode.rowTop)){var e=o.roundRowTopToBounds(o.rowNode.rowTop);o.setRowTop(e)}else d._.addCssClass(t,"ag-opacity-zero")})),this.eAllRowContainers.push(t),this.useAnimationFrameForCreate?this.beans.taskQueue.addP2Task(this.addHoverFunctionality.bind(this,t)):this.addHoverFunctionality(t)},t.prototype.addHoverFunctionality=function(e){var t=this;this.active&&(this.addDestroyableEventListener(e,"mouseenter",(function(){return t.rowNode.onMouseEnter()})),this.addDestroyableEventListener(e,"mouseleave",(function(){return t.rowNode.onMouseLeave()})),this.addDestroyableEventListener(this.rowNode,a.RowNode.EVENT_MOUSE_ENTER,(function(){t.beans.gridOptionsWrapper.isSuppressRowHoverHighlight()||d._.addCssClass(e,"ag-row-hover")})),this.addDestroyableEventListener(this.rowNode,a.RowNode.EVENT_MOUSE_LEAVE,(function(){d._.removeCssClass(e,"ag-row-hover")})))},t.prototype.roundRowTopToBounds=function(e){var t=this.beans.gridPanel.getVScrollPosition(),o=this.applyPaginationOffset(t.top,!0)-100,r=this.applyPaginationOffset(t.bottom,!0)+100;return Math.min(Math.max(o,e),r)},t.prototype.onRowHeightChanged=function(){if(d._.exists(this.rowNode.rowHeight)){var e=this.rowNode.rowHeight+"px";this.eAllRowContainers.forEach((function(t){return t.style.height=e}))}},t.prototype.addEventListener=function(t,o){"renderedRowRemoved"!==t&&"rowRemoved"!==t||(t=p.Events.EVENT_VIRTUAL_ROW_REMOVED,console.warn("ag-Grid: Since version 11, event renderedRowRemoved is now called "+p.Events.EVENT_VIRTUAL_ROW_REMOVED)),e.prototype.addEventListener.call(this,t,o)},t.prototype.removeEventListener=function(t,o){"renderedRowRemoved"!==t&&"rowRemoved"!==t||(t=p.Events.EVENT_VIRTUAL_ROW_REMOVED,console.warn("ag-Grid: Since version 11, event renderedRowRemoved and rowRemoved is now called "+p.Events.EVENT_VIRTUAL_ROW_REMOVED)),e.prototype.removeEventListener.call(this,t,o)},t.prototype.destroy=function(t){void 0===t&&(t=!1),e.prototype.destroy.call(this),this.active=!1,this.destroyFullWidthComponents(),t?(this.removeFirstPassFuncs.forEach((function(e){return e()})),this.removeSecondPassFuncs.push(this.destroyContainingCells.bind(this))):(this.destroyContainingCells(),this.getAndClearDelayedDestroyFunctions().forEach((function(e){return e()})));var o=this.createRowEvent(p.Events.EVENT_VIRTUAL_ROW_REMOVED);this.dispatchEvent(o),this.beans.eventService.dispatchEvent(o)},t.prototype.destroyContainingCells=function(){this.forEachCellComp((function(e){return e.destroy()})),this.destroyFullWidthComponents()},t.prototype.getAndClearDelayedDestroyFunctions=function(){var e=this.removeSecondPassFuncs;return this.removeSecondPassFuncs=[],e},t.prototype.onCellFocusChanged=function(){var e=this.beans.focusedCellController.isRowFocused(this.rowNode.rowIndex,this.rowNode.rowPinned);e!==this.rowFocused&&(this.eAllRowContainers.forEach((function(t){return d._.addOrRemoveCssClass(t,"ag-row-focus",e)})),this.eAllRowContainers.forEach((function(t){return d._.addOrRemoveCssClass(t,"ag-row-no-focus",!e)})),this.rowFocused=e),!e&&this.editingRow&&this.stopEditing(!1)},t.prototype.onPaginationChanged=function(){var e=this.beans.paginationProxy.getCurrentPage();this.paginationPage!==e&&(this.paginationPage=e,this.onTopChanged())},t.prototype.onTopChanged=function(){this.setRowTop(this.rowNode.rowTop)},t.prototype.applyPaginationOffset=function(e,t){return void 0===t&&(t=!1),this.rowNode.isRowPinned()?e:e+this.beans.paginationProxy.getPixelOffset()*(t?1:-1)},t.prototype.setRowTop=function(e){if(!this.printLayout&&d._.exists(e)){var t=this.applyPaginationOffset(e),o=this.beans.maxDivHeightScaler.getRealPixelPosition(t)+"px";this.beans.gridOptionsWrapper.isSuppressRowTransform()?this.eAllRowContainers.forEach((function(e){return e.style.top=o})):this.eAllRowContainers.forEach((function(e){return e.style.transform="translateY("+o+")"}))}},t.prototype.getAndClearNextVMTurnFunctions=function(){var e=this.createSecondPassFuncs;return this.createSecondPassFuncs=[],e},t.prototype.getRowNode=function(){return this.rowNode},t.prototype.getRenderedCellForColumn=function(e){var t=this,o=this.cellComps[e.getColId()];if(o)return o;var r=Object.keys(this.cellComps).map((function(e){return t.cellComps[e]})).filter((function(t){return-1!==t.getColSpanningList().indexOf(e)}));return r.length?r[0]:void 0},t.prototype.onRowIndexChanged=function(){this.onCellFocusChanged(),this.updateRowIndexes()},t.prototype.updateRowIndexes=function(){var e=this.rowNode.getRowIndexString(),t=this.rowNode.rowIndex%2==0,o=this.rowIsEven!==t;o&&(this.rowIsEven=t),this.eAllRowContainers.forEach((function(r){r.setAttribute("row-index",e),o&&(d._.addOrRemoveCssClass(r,"ag-row-even",t),d._.addOrRemoveCssClass(r,"ag-row-odd",!t))}))},t.prototype.ensureDomOrder=function(){[{el:this.getBodyRowElement(),ct:this.bodyContainerComp},{el:this.getPinnedLeftRowElement(),ct:this.pinnedLeftContainerComp},{el:this.getPinnedRightRowElement(),ct:this.pinnedRightContainerComp},{el:this.getFullWidthRowElement(),ct:this.fullWidthContainerComp}].forEach((function(e){e.el&&e.ct.ensureDomOrder(e.el)}))},t.prototype.getPinnedLeftRowElement=function(){return this.ePinnedLeftRow?this.ePinnedLeftRow:this.eFullWidthRowLeft},t.prototype.getPinnedRightRowElement=function(){return this.ePinnedRightRow?this.ePinnedRightRow:this.eFullWidthRowRight},t.prototype.getBodyRowElement=function(){return this.eBodyRow?this.eBodyRow:this.eFullWidthRowBody},t.prototype.getFullWidthRowElement=function(){return this.eFullWidthRow},t.DOM_DATA_KEY_RENDERED_ROW="renderedRow",t.FULL_WIDTH_CELL_RENDERER="fullWidthCellRenderer",t.GROUP_ROW_RENDERER="groupRowRenderer",t.GROUP_ROW_RENDERER_COMP_NAME="agGroupRowRenderer",t.LOADING_CELL_RENDERER="loadingCellRenderer",t.LOADING_CELL_RENDERER_COMP_NAME="agLoadingCellRenderer",t.DETAIL_CELL_RENDERER="detailCellRenderer",t.DETAIL_CELL_RENDERER_COMP_NAME="agDetailCellRenderer",t}(u.Component);t.RowComp=c},20080:function(e,t,o){var r=this&&this.__decorate||function(e,t,o,r){var n,i=arguments.length,s=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,o):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,o,r);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(s=(i<3?n(s):i>3?n(t,o,s):n(t,o))||s);return i>3&&s&&Object.defineProperty(t,o,s),s},n=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)};Object.defineProperty(t,"__esModule",{value:!0});var i=o(58342),s=o(98239),a=o(72493),l=o(44081),p=function(){function e(e){this.columnsToAggregate=[],this.columnsToGroup=[],this.columnsToPivot=[],this.pinned=e}return e.prototype.onDragEnter=function(e){var t=this;this.clearColumnsList(),this.gridOptionsWrapper.isFunctionsReadOnly()||e.dragItem.columns.forEach((function(e){e.isPrimary()&&(e.isAnyFunctionActive()||(e.isAllowValue()?t.columnsToAggregate.push(e):e.isAllowRowGroup()?t.columnsToGroup.push(e):e.isAllowRowGroup()&&t.columnsToPivot.push(e)))}))},e.prototype.getIconName=function(){return this.columnsToAggregate.length+this.columnsToGroup.length+this.columnsToPivot.length>0?this.pinned?i.DragAndDropService.ICON_PINNED:i.DragAndDropService.ICON_MOVE:null},e.prototype.onDragLeave=function(e){this.clearColumnsList()},e.prototype.clearColumnsList=function(){this.columnsToAggregate.length=0,this.columnsToGroup.length=0,this.columnsToPivot.length=0},e.prototype.onDragging=function(e){},e.prototype.onDragStop=function(e){this.columnsToAggregate.length>0&&this.columnController.addValueColumns(this.columnsToAggregate,"toolPanelDragAndDrop"),this.columnsToGroup.length>0&&this.columnController.addRowGroupColumns(this.columnsToGroup,"toolPanelDragAndDrop"),this.columnsToPivot.length>0&&this.columnController.addPivotColumns(this.columnsToPivot,"toolPanelDragAndDrop")},r([a.Autowired("columnController"),n("design:type",s.ColumnController)],e.prototype,"columnController",void 0),r([a.Autowired("gridOptionsWrapper"),n("design:type",l.GridOptionsWrapper)],e.prototype,"gridOptionsWrapper",void 0),e}();t.BodyDropPivotTarget=p},21914:function(e,t,o){var r,n=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o])},r(e,t)},function(e,t){function o(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)}),i=this&&this.__decorate||function(e,t,o,r){var n,i=arguments.length,s=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,o):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,o,r);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(s=(i<3?n(s):i>3?n(t,o,s):n(t,o))||s);return i>3&&s&&Object.defineProperty(t,o,s),s},s=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)};Object.defineProperty(t,"__esModule",{value:!0});var a=o(22131),l=o(72493),p=o(44081),u=o(47721),d=o(60843),c=o(63405),h=o(10042),f=o(41451),g=o(83423),m=function(e){function t(){return e.call(this)||this}return n(t,e),t.prototype.postConstruct=function(){this.setTemplate(this.getTemplate()),this.gridOptionsWrapper.isPagination()&&!this.gridOptionsWrapper.isSuppressPaginationPanel()?(this.addDestroyableEventListener(this.eventService,c.Events.EVENT_PAGINATION_CHANGED,this.onPaginationChanged.bind(this)),this.addDestroyableEventListener(this.btFirst,"click",this.onBtFirst.bind(this)),this.addDestroyableEventListener(this.btLast,"click",this.onBtLast.bind(this)),this.addDestroyableEventListener(this.btNext,"click",this.onBtNext.bind(this)),this.addDestroyableEventListener(this.btPrevious,"click",this.onBtPrevious.bind(this)),this.onPaginationChanged()):this.setVisible(!1)},t.prototype.onPaginationChanged=function(){this.enableOrDisableButtons(),this.updateRowLabels(),this.setCurrentPageLabel(),this.setTotalLabels()},t.prototype.setCurrentPageLabel=function(){var e=this.paginationProxy.getTotalPages()>0,t=this.paginationProxy.getCurrentPage(),o=e?t+1:0;this.lbCurrent.innerHTML=this.formatNumber(o)},t.prototype.formatNumber=function(e){var t=this.gridOptionsWrapper.getPaginationNumberFormatterFunc();return t?t({value:e}):g._.formatNumberCommas(e)},t.prototype.getTemplate=function(){var e=this.gridOptionsWrapper.getLocaleTextFunc(),t=e("page","Page"),o=e("to","to"),r=e("of","of");return'<div class="ag-paging-panel ag-unselectable">\n <span ref="eSummaryPanel" class="ag-paging-row-summary-panel">\n <span ref="lbFirstRowOnPage"></span> '+o+' <span ref="lbLastRowOnPage"></span> '+r+' <span ref="lbRecordCount"></span>\n </span>\n <span class="ag-paging-page-summary-panel">\n <button type="button" class="ag-paging-button" ref="btFirst">'+e("first","First")+'</button>\n <button type="button" class="ag-paging-button" ref="btPrevious">'+e("previous","Previous")+"</button>\n "+t+' <span ref="lbCurrent"></span> '+r+' <span ref="lbTotal"></span>\n <button type="button" class="ag-paging-button" ref="btNext">'+e("next","Next")+'</button>\n <button type="button" class="ag-paging-button" ref="btLast">'+e("last","Last")+"</button>\n </span>\n </div>"},t.prototype.onBtNext=function(){this.paginationProxy.goToNextPage()},t.prototype.onBtPrevious=function(){this.paginationProxy.goToPreviousPage()},t.prototype.onBtFirst=function(){this.paginationProxy.goToFirstPage()},t.prototype.onBtLast=function(){this.paginationProxy.goToLastPage()},t.prototype.enableOrDisableButtons=function(){var e=this.paginationProxy.getCurrentPage(),t=this.paginationProxy.isLastPageFound(),o=this.paginationProxy.getTotalPages(),r=0===e;this.btPrevious.disabled=r,this.btFirst.disabled=r;var n=this.isZeroPagesToDisplay(),i=t&&e===o-1||n;this.btNext.disabled=i;var s=!t||n||e===o-1;this.btLast.disabled=s},t.prototype.updateRowLabels=function(){var e,t,o=this.paginationProxy.getCurrentPage(),r=this.paginationProxy.getPageSize(),n=this.paginationProxy.isLastPageFound(),i=this.paginationProxy.isLastPageFound()?this.paginationProxy.getTotalRowCount():null;this.isZeroPagesToDisplay()?(e=0,t=0):(t=(e=r*o+1)+r-1,n&&t>i&&(t=i)),this.lbFirstRowOnPage.innerHTML=this.formatNumber(e),this.lbLastRowOnPage.innerHTML=this.formatNumber(t)},t.prototype.isZeroPagesToDisplay=function(){var e=this.paginationProxy.isLastPageFound(),t=this.paginationProxy.getTotalPages();return e&&0===t},t.prototype.setTotalLabels=function(){var e=this.paginationProxy.isLastPageFound(),t=this.paginationProxy.getTotalPages(),o=this.paginationProxy.isLastPageFound()?this.paginationProxy.getTotalRowCount():null;if(e)this.lbTotal.innerHTML=this.formatNumber(t),this.lbRecordCount.innerHTML=this.formatNumber(o);else{var r=this.gridOptionsWrapper.getLocaleTextFunc()("more","more");this.lbTotal.innerHTML=r,this.lbRecordCount.innerHTML=r}},i([l.Autowired("gridOptionsWrapper"),s("design:type",p.GridOptionsWrapper)],t.prototype,"gridOptionsWrapper",void 0),i([l.Autowired("eventService"),s("design:type",d.EventService)],t.prototype,"eventService",void 0),i([l.Autowired("paginationProxy"),s("design:type",f.PaginationProxy)],t.prototype,"paginationProxy",void 0),i([l.Autowired("rowRenderer"),s("design:type",h.RowRenderer)],t.prototype,"rowRenderer",void 0),i([u.RefSelector("btFirst"),s("design:type",HTMLButtonElement)],t.prototype,"btFirst",void 0),i([u.RefSelector("btPrevious"),s("design:type",HTMLButtonElement)],t.prototype,"btPrevious",void 0),i([u.RefSelector("btNext"),s("design:type",HTMLButtonElement)],t.prototype,"btNext",void 0),i([u.RefSelector("btLast"),s("design:type",HTMLButtonElement)],t.prototype,"btLast",void 0),i([u.RefSelector("lbRecordCount"),s("design:type",Object)],t.prototype,"lbRecordCount",void 0),i([u.RefSelector("lbFirstRowOnPage"),s("design:type",Object)],t.prototype,"lbFirstRowOnPage",void 0),i([u.RefSelector("lbLastRowOnPage"),s("design:type",Object)],t.prototype,"lbLastRowOnPage",void 0),i([u.RefSelector("eSummaryPanel"),s("design:type",Object)],t.prototype,"eSummaryPanel",void 0),i([u.RefSelector("lbCurrent"),s("design:type",Object)],t.prototype,"lbCurrent",void 0),i([u.RefSelector("lbTotal"),s("design:type",Object)],t.prototype,"lbTotal",void 0),i([l.PostConstruct,s("design:type",Function),s("design:paramtypes",[]),s("design:returntype",void 0)],t.prototype,"postConstruct",null),t}(a.Component);t.PaginationComp=m},21951:function(e,t,o){var r,n=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o])},r(e,t)},function(e,t){function o(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)}),i=this&&this.__decorate||function(e,t,o,r){var n,i=arguments.length,s=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,o):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,o,r);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(s=(i<3?n(s):i>3?n(t,o,s):n(t,o))||s);return i>3&&s&&Object.defineProperty(t,o,s),s},s=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)};Object.defineProperty(t,"__esModule",{value:!0});var a=o(22131),l=o(47721),p=o(72493),u=o(44081),d=o(83423),c=function(e){function t(){var t=e.call(this)||this;return t.selected=!1,t.readOnly=!1,t.passive=!1,t}return n(t,e),t.prototype.preConstruct=function(){this.setTemplate(t.TEMPLATE)},t.prototype.postConstruct=function(){this.loadIcons(),this.updateIcons()},t.prototype.setLabel=function(e){this.eLabel.innerText=e},t.prototype.loadIcons=function(){d._.clearElement(this.eChecked),d._.clearElement(this.eUnchecked),d._.clearElement(this.eIndeterminate),this.readOnly?(this.eChecked.appendChild(d._.createIconNoSpan("checkboxCheckedReadOnly",this.gridOptionsWrapper,null)),this.eUnchecked.appendChild(d._.createIconNoSpan("checkboxUncheckedReadOnly",this.gridOptionsWrapper,null)),this.eIndeterminate.appendChild(d._.createIconNoSpan("checkboxIndeterminateReadOnly",this.gridOptionsWrapper,null))):(this.eChecked.appendChild(d._.createIconNoSpan("checkboxChecked",this.gridOptionsWrapper,null)),this.eUnchecked.appendChild(d._.createIconNoSpan("checkboxUnchecked",this.gridOptionsWrapper,null)),this.eIndeterminate.appendChild(d._.createIconNoSpan("checkboxIndeterminate",this.gridOptionsWrapper,null)))},t.prototype.onClick=function(e){d._.addAgGridEventPath(e),this.readOnly||this.toggle()},t.prototype.getNextValue=function(){return void 0===this.selected||!this.selected},t.prototype.setPassive=function(e){this.passive=e},t.prototype.setReadOnly=function(e){this.readOnly=e,this.loadIcons()},t.prototype.isReadOnly=function(){return this.readOnly},t.prototype.isSelected=function(){return this.selected},t.prototype.toggle=function(){var e=this.getNextValue();if(this.passive){var o={type:t.EVENT_CHANGED,selected:e};this.dispatchEvent(o)}else this.setSelected(e)},t.prototype.setSelected=function(e){if(this.selected!==e){this.selected=!0===e||!1!==e&&void 0,this.updateIcons();var o={type:t.EVENT_CHANGED,selected:this.selected};this.dispatchEvent(o)}},t.prototype.updateIcons=function(){d._.setVisible(this.eChecked,!0===this.selected),d._.setVisible(this.eUnchecked,!1===this.selected),d._.setVisible(this.eIndeterminate,void 0===this.selected)},t.EVENT_CHANGED="change",t.TEMPLATE='<span class="ag-checkbox" role="presentation"> <span class="ag-checkbox-checked" role="presentation"></span> <span class="ag-checkbox-unchecked" role="presentation"></span> <span class="ag-checkbox-indeterminate" role="presentation"></span> <span class="ag-checkbox-label" role="presentation"></span></span>',i([p.Autowired("gridOptionsWrapper"),s("design:type",u.GridOptionsWrapper)],t.prototype,"gridOptionsWrapper",void 0),i([l.QuerySelector(".ag-checkbox-checked"),s("design:type",HTMLElement)],t.prototype,"eChecked",void 0),i([l.QuerySelector(".ag-checkbox-unchecked"),s("design:type",HTMLElement)],t.prototype,"eUnchecked",void 0),i([l.QuerySelector(".ag-checkbox-indeterminate"),s("design:type",HTMLElement)],t.prototype,"eIndeterminate",void 0),i([l.QuerySelector(".ag-checkbox-label"),s("design:type",HTMLElement)],t.prototype,"eLabel",void 0),i([p.PreConstruct,s("design:type",Function),s("design:paramtypes",[]),s("design:returntype",void 0)],t.prototype,"preConstruct",null),i([p.PostConstruct,s("design:type",Function),s("design:paramtypes",[]),s("design:returntype",void 0)],t.prototype,"postConstruct",null),i([l.Listener("click"),s("design:type",Function),s("design:paramtypes",[MouseEvent]),s("design:returntype",void 0)],t.prototype,"onClick",null),t}(a.Component);t.AgCheckbox=c},22131:function(e,t,o){var r,n=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o])},r(e,t)},function(e,t){function o(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)}),i=this&&this.__decorate||function(e,t,o,r){var n,i=arguments.length,s=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,o):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,o,r);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(s=(i<3?n(s):i>3?n(t,o,s):n(t,o))||s);return i>3&&s&&Object.defineProperty(t,o,s),s},s=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)};Object.defineProperty(t,"__esModule",{value:!0});var a=o(72493),l=o(8534),p=o(83423),u=new p.NumberSequence,d=function(e){function t(t){var o=e.call(this)||this;return o.childComponents=[],o.annotatedEventListeners=[],o.visible=!0,o.compId=u.next(),t&&o.setTemplate(t),o}return n(t,e),t.prototype.getCompId=function(){return this.compId},t.prototype.createChildComponentsFromTags=function(e){var t=this;p._.copyNodeList(e.childNodes).forEach((function(o){var r=t.getContext().createComponentFromElement(o,(function(e){t.copyAttributesFromNode(o,e.getGui())}));r?t.swapComponentForNode(r,e,o):o.childNodes&&t.createChildComponentsFromTags(o)}))},t.prototype.copyAttributesFromNode=function(e,t){p._.iterateNamedNodeMap(e.attributes,(function(e,o){t.setAttribute(e,o)}))},t.prototype.swapComponentForNode=function(e,t,o){var r=e.getGui();t.replaceChild(r,o),t.insertBefore(document.createComment(o.nodeName),r),this.childComponents.push(e),this.swapInComponentForQuerySelectors(e,o)},t.prototype.swapInComponentForQuerySelectors=function(e,t){for(var o=Object.getPrototypeOf(this),r=this;null!=o;){var n=o.__agComponentMetaData,i=o.constructor.name;n&&n[i]&&n[i].querySelectors&&n[i].querySelectors.forEach((function(o){r[o.attributeName]===t&&(r[o.attributeName]=e)})),o=Object.getPrototypeOf(o)}},t.prototype.setTemplate=function(e){var t=p._.loadTemplate(e);this.setTemplateFromElement(t)},t.prototype.setTemplateFromElement=function(e){this.eGui=e,this.eGui.__agComponent=this,this.addAnnotatedEventListeners(),this.wireQuerySelectors(),this.getContext()&&this.createChildComponentsFromTags(this.getGui())},t.prototype.createChildComponentsPreConstruct=function(){this.getGui()&&this.createChildComponentsFromTags(this.getGui())},t.prototype.wireQuerySelectors=function(){var e=this;if(this.eGui)for(var t=Object.getPrototypeOf(this),o=function(){var o=t.__agComponentMetaData,n=t.constructor.name;if(o&&o[n]&&o[n].querySelectors){var i=r;o[n].querySelectors.forEach((function(t){var o=e.eGui.querySelector(t.querySelector);if(o){var r=o.__agComponent;i[t.attributeName]=r||o}}))}t=Object.getPrototypeOf(t)},r=this;null!=t;)o()},t.prototype.addAnnotatedEventListeners=function(){var e=this;if(this.removeAnnotatedEventListeners(),this.eGui){var t=this.getAgComponentMetaData("listenerMethods");p._.missingOrEmpty(t)||(this.annotatedEventListeners||(this.annotatedEventListeners=[]),t.forEach((function(t){var o=e[t.methodName].bind(e);e.eGui.addEventListener(t.eventName,o),e.annotatedEventListeners.push({eventName:t.eventName,listener:o})})))}},t.prototype.getAgComponentMetaData=function(e){for(var t=[],o=Object.getPrototypeOf(this);null!=o;){var r=o.__agComponentMetaData,n=o.constructor.name;r&&r[n]&&r[n][e]&&(t=t.concat(r[n][e])),o=Object.getPrototypeOf(o)}return t},t.prototype.removeAnnotatedEventListeners=function(){var e=this;this.annotatedEventListeners&&this.eGui&&(this.annotatedEventListeners.forEach((function(t){e.eGui.removeEventListener(t.eventName,t.listener)})),this.annotatedEventListeners=[])},t.prototype.getGui=function(){return this.eGui},t.prototype.setGui=function(e){this.eGui=e},t.prototype.queryForHtmlElement=function(e){return this.eGui.querySelector(e)},t.prototype.queryForHtmlInputElement=function(e){return this.eGui.querySelector(e)},t.prototype.appendChild=function(e){if(p._.isNodeOrElement(e))this.eGui.appendChild(e);else{var t=e;this.eGui.appendChild(t.getGui()),this.childComponents.push(t)}},t.prototype.addFeature=function(e,t){e.wireBean(t),t.destroy&&this.addDestroyFunc(t.destroy.bind(t))},t.prototype.isVisible=function(){return this.visible},t.prototype.setVisible=function(e,o){var r="visibility"!==o;if(e!==this.visible){this.visible=e,p._.addOrRemoveCssClass(this.eGui,r?"ag-hidden":"ag-invisible",!e);var n={type:t.EVENT_VISIBLE_CHANGED,visible:this.visible};this.dispatchEvent(n)}},t.prototype.addOrRemoveCssClass=function(e,t){p._.addOrRemoveCssClass(this.eGui,e,t)},t.prototype.destroy=function(){e.prototype.destroy.call(this),this.childComponents.forEach((function(e){e&&e.destroy&&e.destroy()})),this.childComponents.length=0,this.removeAnnotatedEventListeners()},t.prototype.addGuiEventListener=function(e,t){var o=this;this.getGui().addEventListener(e,t),this.addDestroyFunc((function(){return o.getGui().removeEventListener(e,t)}))},t.prototype.addCssClass=function(e){p._.addCssClass(this.getGui(),e)},t.prototype.removeCssClass=function(e){p._.removeCssClass(this.getGui(),e)},t.prototype.getAttribute=function(e){var t=this.getGui();return t?t.getAttribute(e):null},t.prototype.getRefElement=function(e){return this.queryForHtmlElement('[ref="'+e+'"]')},t.EVENT_VISIBLE_CHANGED="visibleChanged",i([a.PreConstruct,s("design:type",Function),s("design:paramtypes",[]),s("design:returntype",void 0)],t.prototype,"createChildComponentsPreConstruct",null),t}(l.BeanStub);t.Component=d},22743:function(e,t,o){var r=this&&this.__decorate||function(e,t,o,r){var n,i=arguments.length,s=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,o):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,o,r);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(s=(i<3?n(s):i>3?n(t,o,s):n(t,o))||s);return i>3&&s&&Object.defineProperty(t,o,s),s},n=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)};Object.defineProperty(t,"__esModule",{value:!0});var i=o(72493),s=o(69638),a=function(){function e(){}return e.prototype.postConstruct=function(){this.componentMetaData={dateComponent:{mandatoryMethodList:["getDate","setDate"],optionalMethodList:["afterGuiAttached"]},detailCellRenderer:{mandatoryMethodList:[],optionalMethodList:[]},headerComponent:{mandatoryMethodList:[],optionalMethodList:[]},headerGroupComponent:{mandatoryMethodList:[],optionalMethodList:[]},loadingCellRenderer:{mandatoryMethodList:[],optionalMethodList:[]},loadingOverlayComponent:{mandatoryMethodList:[],optionalMethodList:[]},noRowsOverlayComponent:{mandatoryMethodList:[],optionalMethodList:[]},floatingFilterComponent:{mandatoryMethodList:["onParentModelChanged"],optionalMethodList:["afterGuiAttached"]},floatingFilterWrapperComponent:{mandatoryMethodList:[],optionalMethodList:[]},cellRenderer:{mandatoryMethodList:[],optionalMethodList:["refresh","afterGuiAttached"],functionAdapter:this.agComponentUtils.adaptCellRendererFunction.bind(this.agComponentUtils)},cellEditor:{mandatoryMethodList:["getValue"],optionalMethodList:["isPopup","isCancelBeforeStart","isCancelAfterEnd","focusIn","focusOut","afterGuiAttached"]},innerRenderer:{mandatoryMethodList:[],optionalMethodList:["afterGuiAttached"],functionAdapter:this.agComponentUtils.adaptCellRendererFunction.bind(this.agComponentUtils)},fullWidthCellRenderer:{mandatoryMethodList:[],optionalMethodList:["afterGuiAttached"],functionAdapter:this.agComponentUtils.adaptCellRendererFunction.bind(this.agComponentUtils)},pinnedRowCellRenderer:{mandatoryMethodList:[],optionalMethodList:["refresh","afterGuiAttached"],functionAdapter:this.agComponentUtils.adaptCellRendererFunction.bind(this.agComponentUtils)},groupRowInnerRenderer:{mandatoryMethodList:[],optionalMethodList:["afterGuiAttached"],functionAdapter:this.agComponentUtils.adaptCellRendererFunction.bind(this.agComponentUtils)},groupRowRenderer:{mandatoryMethodList:[],optionalMethodList:["afterGuiAttached"],functionAdapter:this.agComponentUtils.adaptCellRendererFunction.bind(this.agComponentUtils)},filter:{mandatoryMethodList:["isFilterActive","doesFilterPass","getModel","setModel"],optionalMethodList:["afterGuiAttached","onNewRowsLoaded","getModelAsString","onFloatingFilterChanged"]},filterComponent:{mandatoryMethodList:["isFilterActive","doesFilterPass","getModel","setModel"],optionalMethodList:["afterGuiAttached","onNewRowsLoaded","getModelAsString","onFloatingFilterChanged"]},statusPanel:{mandatoryMethodList:[],optionalMethodList:["afterGuiAttached"]},toolPanel:{mandatoryMethodList:[],optionalMethodList:["refresh","afterGuiAttached"]},tooltipComponent:{mandatoryMethodList:[],optionalMethodList:[]}}},e.prototype.retrieve=function(e){return this.componentMetaData[e]},r([i.Autowired("agComponentUtils"),n("design:type",s.AgComponentUtils)],e.prototype,"agComponentUtils",void 0),r([i.PostConstruct,n("design:type",Function),n("design:paramtypes",[]),n("design:returntype",void 0)],e.prototype,"postConstruct",null),r([i.Bean("componentMetadataProvider")],e)}();t.ComponentMetadataProvider=a},23054:function(e,t,o){var r,n=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o])},r(e,t)},function(e,t){function o(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)}),i=this&&this.__assign||function(){return i=Object.assign||function(e){for(var t,o=1,r=arguments.length;o<r;o++)for(var n in t=arguments[o])Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e},i.apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0});var s=o(26016),a=o(15068),l=o(45727),p=o(63405),u=o(34782),d=o(22131),c=o(95125),h=o(87952),f=o(15724),g=o(83423),m=function(e){function t(t,o,r,n,i,s,a){var l=e.call(this)||this;return l.editingCell=!1,l.suppressRefreshCell=!1,l.scope=null,l.cellEditorVersion=0,l.cellRendererVersion=0,l.scope=t,l.beans=o,l.column=r,l.rowNode=n,l.rowComp=i,l.autoHeightCell=s,l.printLayout=a,l.createGridCellVo(),l.rangeSelectionEnabled=o.enterprise&&o.gridOptionsWrapper.isEnableRangeSelection(),l.cellFocused=l.beans.focusedCellController.isCellFocused(l.gridCell),l.firstRightPinned=l.column.isFirstRightPinned(),l.lastLeftPinned=l.column.isLastLeftPinned(),l.rangeSelectionEnabled&&(l.rangeCount=l.beans.rangeController.getCellRangeCount(l.gridCell)),l.getValueAndFormat(),l.setUsingWrapper(),l.chooseCellRenderer(),l.setupColSpan(),l.rowSpan=l.column.getRowSpan(l.rowNode),l}return n(t,e),t.prototype.getCreateTemplate=function(){var e=this.beans.gridOptionsWrapper.isEnableCellTextSelection()?"":'unselectable="on"',t=[],o=this.column,r=this.getCellWidth(),n=this.modifyLeftForPrintLayout(o.getLeft()),i=this.getInitialValueToRender(),s=g._.get(this.column,"colDef.template",null)?i:g._.escape(i);this.tooltip=this.getToolTip();var a=g._.escape(this.tooltip),l=g._.escape(o.getId()),p="",u="",d=this.preProcessStylesFromColDef(),c=this.getInitialCssClasses(),h=this.getStylesForRowSpanning();return this.usingWrapper&&(p='<span ref="eCellWrapper" class="ag-cell-wrapper"><span ref="eCellValue" class="ag-cell-value" '+e+">",u="</span></span>"),t.push("<div"),t.push(' tabindex="-1"'),t.push(" "+e),t.push(' role="gridcell"'),t.push(' comp-id="'+this.getCompId()+'" '),t.push(' col-id="'+l+'"'),t.push(' class="'+c.join(" ")+'"'),this.beans.gridOptionsWrapper.isEnableBrowserTooltips()&&g._.exists(a)&&t.push('title="'+a+'"'),t.push(' style="width: '+r+"px; left: "+n+"px; "+d+" "+h+'" >'),t.push(p),g._.exists(s,!0)&&t.push(s),t.push(u),t.push("</div>"),t.join("")},t.prototype.getStylesForRowSpanning=function(){return 1===this.rowSpan?"":"height: "+this.beans.gridOptionsWrapper.getRowHeightAsNumber()*this.rowSpan+"px; z-index: 1;"},t.prototype.afterAttached=function(){var e='[comp-id="'+this.getCompId()+'"]',t=this.eParentRow.querySelector(e);this.setGui(t),this.addDomData(),this.populateTemplate(),this.attachCellRenderer(),this.angular1Compile(),this.addDestroyableEventListener(this.beans.eventService,p.Events.EVENT_CELL_FOCUSED,this.onCellFocused.bind(this)),this.addDestroyableEventListener(this.beans.eventService,p.Events.EVENT_FLASH_CELLS,this.onFlashCells.bind(this)),this.addDestroyableEventListener(this.beans.eventService,p.Events.EVENT_COLUMN_HOVER_CHANGED,this.onColumnHover.bind(this)),this.addDestroyableEventListener(this.rowNode,a.RowNode.EVENT_ROW_INDEX_CHANGED,this.onRowIndexChanged.bind(this)),this.addDestroyableEventListener(this.rowNode,a.RowNode.EVENT_CELL_CHANGED,this.onCellChanged.bind(this)),this.addDestroyableEventListener(this.column,s.Column.EVENT_LEFT_CHANGED,this.onLeftChanged.bind(this)),this.addDestroyableEventListener(this.column,s.Column.EVENT_WIDTH_CHANGED,this.onWidthChanged.bind(this)),this.addDestroyableEventListener(this.column,s.Column.EVENT_FIRST_RIGHT_PINNED_CHANGED,this.onFirstRightPinnedChanged.bind(this)),this.addDestroyableEventListener(this.column,s.Column.EVENT_LAST_LEFT_PINNED_CHANGED,this.onLastLeftPinnedChanged.bind(this)),this.printLayout&&this.addDestroyableEventListener(this.beans.eventService,p.Events.EVENT_DISPLAYED_COLUMNS_WIDTH_CHANGED,this.onLeftChanged.bind(this)),this.rangeSelectionEnabled&&this.addDestroyableEventListener(this.beans.eventService,p.Events.EVENT_RANGE_SELECTION_CHANGED,this.onRangeSelectionChanged.bind(this)),this.tooltip&&!this.beans.gridOptionsWrapper.isEnableBrowserTooltips()&&this.beans.tooltipManager.registerTooltip(this)},t.prototype.onColumnHover=function(){var e=this.beans.columnHoverService.isHovered(this.column);g._.addOrRemoveCssClass(this.getGui(),"ag-column-hover",e)},t.prototype.onCellChanged=function(e){e.column===this.column&&this.refreshCell({})},t.prototype.getCellLeft=function(){return(this.beans.gridOptionsWrapper.isEnableRtl()&&this.colsSpanning?this.colsSpanning[this.colsSpanning.length-1]:this.column).getLeft()},t.prototype.getCellWidth=function(){if(!this.colsSpanning)return this.column.getActualWidth();var e=0;return this.colsSpanning.forEach((function(t){return e+=t.getActualWidth()})),e},t.prototype.onFlashCells=function(e){var t=this.gridCell.createId();e.cells[t]&&this.animateCell("highlight")},t.prototype.setupColSpan=function(){g._.missing(this.getComponentHolder().colSpan)||(this.addDestroyableEventListener(this.beans.eventService,p.Events.EVENT_DISPLAYED_COLUMNS_CHANGED,this.onDisplayColumnsChanged.bind(this)),this.addDestroyableEventListener(this.beans.eventService,p.Events.EVENT_DISPLAYED_COLUMNS_WIDTH_CHANGED,this.onWidthChanged.bind(this)),this.colsSpanning=this.getColSpanningList())},t.prototype.getColSpanningList=function(){var e=this.column.getColSpan(this.rowNode),t=[];if(1===e)t.push(this.column);else for(var o=this.column,r=this.column.getPinned(),n=0;o&&n<e&&(t.push(o),(o=this.beans.columnController.getDisplayedColAfter(o))&&!g._.missing(o))&&r===o.getPinned();n++);return t},t.prototype.onDisplayColumnsChanged=function(){var e=this.getColSpanningList();g._.compareArrays(this.colsSpanning,e)||(this.colsSpanning=e,this.onWidthChanged(),this.onLeftChanged())},t.prototype.getInitialCssClasses=function(){var e=["ag-cell","ag-cell-not-inline-editing"];return this.autoHeightCell||e.push("ag-cell-with-height"),!this.beans.gridOptionsWrapper.isSuppressCellSelection()&&this.cellFocused&&e.push("ag-cell-focus"),this.firstRightPinned&&e.push("ag-cell-first-right-pinned"),this.lastLeftPinned&&e.push("ag-cell-last-left-pinned"),this.beans.columnHoverService.isHovered(this.column)&&e.push("ag-column-hover"),g._.pushAll(e,this.preProcessClassesFromColDef()),g._.pushAll(e,this.preProcessCellClassRules()),g._.pushAll(e,this.getRangeClasses()),this.usingWrapper||e.push("ag-cell-value"),e},t.prototype.getInitialValueToRender=function(){if(this.usingCellRenderer)return"string"==typeof this.cellRendererGui?this.cellRendererGui:"";var e=this.getComponentHolder();return e.template?e.template:e.templateUrl?this.beans.templateService.getTemplate(e.templateUrl,this.refreshCell.bind(this,!0))||"":this.getValueToUse()},t.prototype.getRenderedRow=function(){return this.rowComp},t.prototype.isSuppressNavigable=function(){return this.column.isSuppressNavigable(this.rowNode)},t.prototype.getCellRenderer=function(){return this.cellRenderer},t.prototype.getCellEditor=function(){return this.cellEditor},t.prototype.refreshCell=function(e){if(!this.editingCell&&!this.suppressRefreshCell){var t=this.getComponentHolder(),o=e&&e.newData,r=e&&e.suppressFlash||t.suppressCellFlash,n=e&&e.forceRefresh,i=this.value;this.getValueAndFormat();var s=!this.valuesAreEqual(i,this.value);(n||s)&&(!o&&this.attemptCellRendererRefresh()||this.replaceContentsAfterRefresh(),!r&&(this.beans.gridOptionsWrapper.isEnableCellChangeFlash()||t.enableCellChangeFlash)&&this.flashCell(),this.postProcessStylesFromColDef(),this.postProcessClassesFromColDef()),this.updateAngular1ScopeAndCompile(),this.refreshToolTip(),this.postProcessCellClassRules()}},t.prototype.flashCell=function(){this.animateCell("data-changed")},t.prototype.animateCell=function(e){var t="ag-cell-"+e,o="ag-cell-"+e+"-animation",r=this.getGui();g._.addCssClass(r,t),g._.removeCssClass(r,o),window.setTimeout((function(){g._.removeCssClass(r,t),g._.addCssClass(r,o),window.setTimeout((function(){g._.removeCssClass(r,o)}),1e3)}),500)},t.prototype.replaceContentsAfterRefresh=function(){g._.clearElement(this.eParentOfValue),this.cellRenderer&&this.cellRenderer.destroy&&this.cellRenderer.destroy(),this.cellRenderer=null,this.cellRendererGui=null,this.putDataIntoCellAfterRefresh(),this.updateAngular1ScopeAndCompile()},t.prototype.updateAngular1ScopeAndCompile=function(){this.beans.gridOptionsWrapper.isAngularCompileRows()&&this.scope&&(this.scope.data=i({},this.rowNode.data),this.angular1Compile())},t.prototype.angular1Compile=function(){if(this.beans.gridOptionsWrapper.isAngularCompileRows()){var e=this.getGui();if(!e.classList.contains("ng-scope")||0===e.childElementCount){var t=this.beans.$compile(e)(this.scope);this.addDestroyFunc((function(){t.remove()}))}}},t.prototype.postProcessStylesFromColDef=function(){var e=this.processStylesFromColDef();e&&g._.addStylesToElement(this.getGui(),e)},t.prototype.preProcessStylesFromColDef=function(){var e=this.processStylesFromColDef();return g._.cssStyleObjectToMarkup(e)},t.prototype.processStylesFromColDef=function(){var e=this.getComponentHolder();if(e.cellStyle){var t=void 0;if("function"==typeof e.cellStyle){var o={value:this.value,data:this.rowNode.data,node:this.rowNode,colDef:e,column:this.column,$scope:this.scope,context:this.beans.gridOptionsWrapper.getContext(),api:this.beans.gridOptionsWrapper.getApi()};t=(0,e.cellStyle)(o)}else t=e.cellStyle;return t}},t.prototype.postProcessClassesFromColDef=function(){var e=this;this.processClassesFromColDef((function(t){return g._.addCssClass(e.getGui(),t)}))},t.prototype.preProcessClassesFromColDef=function(){var e=[];return this.processClassesFromColDef((function(t){return e.push(t)})),e},t.prototype.processClassesFromColDef=function(e){var t=this.getComponentHolder();this.beans.stylingService.processStaticCellClasses(t,{value:this.value,data:this.rowNode.data,node:this.rowNode,colDef:t,rowIndex:this.rowNode.rowIndex,$scope:this.scope,api:this.beans.gridOptionsWrapper.getApi(),context:this.beans.gridOptionsWrapper.getContext()},e)},t.prototype.putDataIntoCellAfterRefresh=function(){var e=this.getComponentHolder();if(e.template)this.eParentOfValue.innerHTML=e.template;else if(e.templateUrl){var t=this.beans.templateService.getTemplate(e.templateUrl,this.refreshCell.bind(this,!0));t&&(this.eParentOfValue.innerHTML=t)}else if(this.usingCellRenderer&&(this.attachCellRenderer()||(this.usingCellRenderer=!1)),!this.usingCellRenderer){var o=this.getValueToUse();null!=o&&(this.eParentOfValue.innerHTML=g._.escape(o))}},t.prototype.attemptCellRendererRefresh=function(){if(g._.missing(this.cellRenderer)||!this.cellRenderer||g._.missing(this.cellRenderer.refresh))return!1;var e=this.createCellRendererParams(),t=this.beans.userComponentFactory.createFinalParams(this.getComponentHolder(),this.cellRendererType,e),o=this.cellRenderer.refresh(t);return!0===o||void 0===o},t.prototype.refreshToolTip=function(){var e=this.getToolTip();if(this.tooltip!==e){if(this.tooltip=e,!this.beans.gridOptionsWrapper.isEnableBrowserTooltips())return;if(g._.exists(e)){var t=g._.escape(this.tooltip);this.eParentOfValue.setAttribute("title",t)}else this.eParentOfValue.removeAttribute("title")}},t.prototype.valuesAreEqual=function(e,t){var o=this.getComponentHolder(),r=o?o.equals:null;return r?r(e,t):e===t},t.prototype.getToolTip=function(){var e=this.getComponentHolder(),t=this.rowNode.data;if(e.tooltipField&&g._.exists(t))return g._.getValueUsingField(t,e.tooltipField,this.column.isTooltipFieldContainsDots());var o=e.tooltipValueGetter||e.tooltip;return o?o({api:this.beans.gridOptionsWrapper.getApi(),columnApi:this.beans.gridOptionsWrapper.getColumnApi(),colDef:e,column:this.getColumn(),context:this.beans.gridOptionsWrapper.getContext(),value:this.value,valueFormatted:this.valueFormatted,rowIndex:this.gridCell.rowIndex,node:this.rowNode,data:this.rowNode.data,$scope:this.scope}):null},t.prototype.getTooltipText=function(e){return void 0===e&&(e=!0),e?g._.escape(this.tooltip):this.tooltip},t.prototype.processCellClassRules=function(e,t){var o=this.getComponentHolder();this.beans.stylingService.processClassRules(o.cellClassRules,{value:this.value,data:this.rowNode.data,node:this.rowNode,colDef:o,rowIndex:this.gridCell.rowIndex,api:this.beans.gridOptionsWrapper.getApi(),$scope:this.scope,context:this.beans.gridOptionsWrapper.getContext()},e,t)},t.prototype.postProcessCellClassRules=function(){var e=this;this.processCellClassRules((function(t){g._.addCssClass(e.getGui(),t)}),(function(t){g._.removeCssClass(e.getGui(),t)}))},t.prototype.preProcessCellClassRules=function(){var e=[];return this.processCellClassRules((function(t){e.push(t)}),(function(e){})),e},t.prototype.setUsingWrapper=function(){var e=this.getComponentHolder();if(this.rowNode.rowPinned)return this.usingWrapper=!1,this.includeSelectionComponent=!1,void(this.includeRowDraggingComponent=!1);var t="function"==typeof e.checkboxSelection,o="function"==typeof e.rowDrag;this.includeSelectionComponent=t||!0===e.checkboxSelection,this.includeRowDraggingComponent=o||!0===e.rowDrag,this.usingWrapper=this.includeRowDraggingComponent||this.includeSelectionComponent},t.prototype.chooseCellRenderer=function(){var e=this.getComponentHolder();if(e.template||e.templateUrl)this.usingCellRenderer=!1;else{var o=this.createCellRendererParams(),r=this.beans.userComponentFactory.lookupComponentClassDef(e,"cellRenderer",o);this.beans.userComponentFactory.lookupComponentClassDef(e,"pinnedRowCellRenderer",o)&&this.rowNode.rowPinned?(this.cellRendererType=t.CELL_RENDERER_TYPE_PINNED,this.usingCellRenderer=!0):r?(this.cellRendererType=t.CELL_RENDERER_TYPE_NORMAL,this.usingCellRenderer=!0):this.usingCellRenderer=!1}},t.prototype.createCellRendererInstance=function(){var e=this.createCellRendererParams();this.cellRendererVersion++;var o,r=this.afterCellRendererCreated.bind(this,this.cellRendererVersion);return!!(o=this.cellRendererType===t.CELL_RENDERER_TYPE_NORMAL?this.beans.userComponentFactory.newCellRenderer(this.getComponentHolder(),e):this.beans.userComponentFactory.newPinnedRowCellRenderer(this.getComponentHolder(),e))&&(o.then(r),!0)},t.prototype.afterCellRendererCreated=function(e,t){this.isAlive()&&e===this.cellRendererVersion?(this.cellRenderer=t,this.cellRendererGui=this.cellRenderer.getGui(),g._.missing(this.cellRendererGui)||this.editingCell||this.eParentOfValue.appendChild(this.cellRendererGui)):t.destroy&&t.destroy()},t.prototype.attachCellRenderer=function(){return!!this.usingCellRenderer&&this.createCellRendererInstance()},t.prototype.createCellRendererParams=function(){var e=this;return{value:this.value,valueFormatted:this.valueFormatted,getValue:this.getValue.bind(this),setValue:function(t){e.beans.valueService.setValue(e.rowNode,e.column,t)},formatValue:this.formatValue.bind(this),data:this.rowNode.data,node:this.rowNode,colDef:this.getComponentHolder(),column:this.column,$scope:this.scope,rowIndex:this.gridCell.rowIndex,api:this.beans.gridOptionsWrapper.getApi(),columnApi:this.beans.gridOptionsWrapper.getColumnApi(),context:this.beans.gridOptionsWrapper.getContext(),refreshCell:this.refreshCell.bind(this),eGridCell:this.getGui(),eParentOfValue:this.eParentOfValue,addRowCompListener:this.rowComp?this.rowComp.addEventListener.bind(this.rowComp):null,addRenderedRowListener:function(t,o){console.warn("ag-Grid: since ag-Grid .v11, params.addRenderedRowListener() is now params.addRowCompListener()"),e.rowComp&&e.rowComp.addEventListener(t,o)}}},t.prototype.formatValue=function(e){var t=this.beans.valueFormatterService.formatValue(this.column,this.rowNode,this.scope,e);return null!=t?t:e},t.prototype.getValueToUse=function(){return null!==this.valueFormatted&&void 0!==this.valueFormatted?this.valueFormatted:this.value},t.prototype.getValueAndFormat=function(){this.value=this.getValue(),this.valueFormatted=this.beans.valueFormatterService.formatValue(this.column,this.rowNode,this.scope,this.value)},t.prototype.getValue=function(){var e=this.rowNode.leafGroup&&this.beans.columnController.isPivotMode(),t=this.rowNode.group&&this.rowNode.expanded&&!this.rowNode.footer&&!e,o=this.beans.gridOptionsWrapper.isGroupIncludeFooter(),r=this.beans.gridOptionsWrapper.isGroupSuppressBlankHeader(),n=t&&o&&!r;return this.beans.valueService.getValue(this.column,this.rowNode,!1,n)},t.prototype.onMouseEvent=function(e,t){if(!g._.isStopPropagationForAgGrid(t))switch(e){case"click":this.onCellClicked(t);break;case"mousedown":this.onMouseDown(t);break;case"dblclick":this.onCellDoubleClicked(t);break;case"mouseout":this.onMouseOut(t);break;case"mouseover":this.onMouseOver(t)}},t.prototype.dispatchCellContextMenuEvent=function(e){var t=this.getComponentHolder(),o=this.createEvent(e,p.Events.EVENT_CELL_CONTEXT_MENU);this.beans.eventService.dispatchEvent(o),t.onCellContextMenu&&window.setTimeout((function(){return t.onCellContextMenu(o)}),0)},t.prototype.createEvent=function(e,t){var o={node:this.rowNode,data:this.rowNode.data,value:this.value,column:this.column,colDef:this.getComponentHolder(),context:this.beans.gridOptionsWrapper.getContext(),api:this.beans.gridApi,columnApi:this.beans.columnApi,rowPinned:this.rowNode.rowPinned,event:e,type:t,rowIndex:this.rowNode.rowIndex};return this.scope&&(o.$scope=this.scope),o},t.prototype.onMouseOut=function(e){var t=this.createEvent(e,p.Events.EVENT_CELL_MOUSE_OUT);this.beans.eventService.dispatchEvent(t),this.beans.columnHoverService.clearMouseOver()},t.prototype.onMouseOver=function(e){var t=this.createEvent(e,p.Events.EVENT_CELL_MOUSE_OVER);this.beans.eventService.dispatchEvent(t),this.beans.columnHoverService.setMouseOver([this.column])},t.prototype.onCellDoubleClicked=function(e){var t=this.getComponentHolder(),o=this.createEvent(e,p.Events.EVENT_CELL_DOUBLE_CLICKED);this.beans.eventService.dispatchEvent(o),"function"==typeof t.onCellDoubleClicked&&window.setTimeout((function(){return t.onCellDoubleClicked(o)}),0),!this.beans.gridOptionsWrapper.isSingleClickEdit()&&!this.beans.gridOptionsWrapper.isSuppressClickEdit()&&this.startRowOrCellEdit()},t.prototype.startRowOrCellEdit=function(e,t){this.beans.gridOptionsWrapper.isFullRowEdit()?this.rowComp.startRowEditing(e,t,this):this.startEditingIfEnabled(e,t,!0)},t.prototype.isCellEditable=function(){return this.column.isCellEditable(this.rowNode)},t.prototype.startEditingIfEnabled=function(e,t,o){if(void 0===e&&(e=null),void 0===t&&(t=null),void 0===o&&(o=!1),this.isCellEditable()&&!this.editingCell){this.editingCell=!0,this.cellEditorVersion++;var r=this.afterCellEditorCreated.bind(this,this.cellEditorVersion),n=this.createCellEditorParams(e,t,o);this.createCellEditor(n).then(r),g._.missing(this.cellEditor)&&o&&this.focusCell(!0)}},t.prototype.createCellEditor=function(e){var t=this;return this.beans.userComponentFactory.newCellEditor(this.column.getColDef(),e).map((function(o){if(!o.isPopup||!o.isPopup())return o;t.beans.gridOptionsWrapper.isFullRowEdit()&&console.warn("ag-Grid: popup cellEditor does not work with fullRowEdit - you cannot use them both - either turn off fullRowEdit, or stop using popup editors.");var r=new f.PopupEditorWrapper(o);return t.beans.context.wireBean(r),r.init(e),r}))},t.prototype.afterCellEditorCreated=function(e,t){if(e===this.cellEditorVersion&&this.editingCell){if(t.isCancelBeforeStart&&t.isCancelBeforeStart())return t.destroy&&t.destroy(),void(this.editingCell=!1);if(!t.getGui)return console.warn("ag-Grid: cellEditor for column "+this.column.getId()+" is missing getGui() method"),t.render&&console.warn("ag-Grid: we found 'render' on the component, are you trying to set a React renderer but added it as colDef.cellEditor instead of colDef.cellEditorFmk?"),t.destroy&&t.destroy(),void(this.editingCell=!1);this.cellEditor=t,this.cellEditorInPopup=void 0!==t.isPopup&&t.isPopup(),this.setInlineEditingClass(),this.cellEditorInPopup?this.addPopupCellEditor():this.addInCellEditor(),t.afterGuiAttached&&t.afterGuiAttached();var o=this.createEvent(null,p.Events.EVENT_CELL_EDITING_STARTED);this.beans.eventService.dispatchEvent(o)}else t.destroy&&t.destroy()},t.prototype.addInCellEditor=function(){g._.clearElement(this.getGui()),this.cellEditor&&this.getGui().appendChild(this.cellEditor.getGui()),this.angular1Compile()},t.prototype.addPopupCellEditor=function(){var e=this,t=this.cellEditor?this.cellEditor.getGui():null;this.hideEditorPopup=this.beans.popupService.addAsModalPopup(t,!0,(function(){e.onPopupEditorClosed()})),this.beans.popupService.positionPopupOverComponent({column:this.column,rowNode:this.rowNode,type:"popupCellEditor",eventSource:this.getGui(),ePopup:t,keepWithinBounds:!0}),this.angular1Compile()},t.prototype.onPopupEditorClosed=function(){this.editingCell&&(this.stopRowOrCellEdit(),this.beans.focusedCellController.isCellFocused(this.gridCell)&&this.focusCell(!0))},t.prototype.setInlineEditingClass=function(){var e=this.editingCell&&!this.cellEditorInPopup,t=this.editingCell&&this.cellEditorInPopup;g._.addOrRemoveCssClass(this.getGui(),"ag-cell-inline-editing",e),g._.addOrRemoveCssClass(this.getGui(),"ag-cell-not-inline-editing",!e),g._.addOrRemoveCssClass(this.getGui(),"ag-cell-popup-editing",t),g._.addOrRemoveCssClass(this.getGui().parentNode,"ag-row-inline-editing",e),g._.addOrRemoveCssClass(this.getGui().parentNode,"ag-row-not-inline-editing",!e)},t.prototype.createCellEditorParams=function(e,t,o){return{value:this.getValue(),keyPress:e,charPress:t,column:this.column,colDef:this.column.getColDef(),rowIndex:this.gridCell.rowIndex,node:this.rowNode,data:this.rowNode.data,api:this.beans.gridOptionsWrapper.getApi(),cellStartedEdit:o,columnApi:this.beans.gridOptionsWrapper.getColumnApi(),context:this.beans.gridOptionsWrapper.getContext(),$scope:this.scope,onKeyDown:this.onKeyDown.bind(this),stopEditing:this.stopEditingAndFocus.bind(this),eGridCell:this.getGui(),parseValue:this.parseValue.bind(this),formatValue:this.formatValue.bind(this)}},t.prototype.stopEditingAndFocus=function(e){void 0===e&&(e=!1),this.stopRowOrCellEdit(),this.focusCell(!0),e||this.navigateAfterEdit()},t.prototype.parseValue=function(e){var t=this.getComponentHolder(),o={node:this.rowNode,data:this.rowNode.data,oldValue:this.value,newValue:e,colDef:t,column:this.column,api:this.beans.gridOptionsWrapper.getApi(),columnApi:this.beans.gridOptionsWrapper.getColumnApi(),context:this.beans.gridOptionsWrapper.getContext()},r=t.valueParser;return g._.exists(r)?this.beans.expressionService.evaluate(r,o):e},t.prototype.focusCell=function(e){void 0===e&&(e=!1),this.beans.focusedCellController.setFocusedCell(this.gridCell.rowIndex,this.column,this.rowNode.rowPinned,e)},t.prototype.setFocusInOnEditor=function(){this.editingCell&&(this.cellEditor&&this.cellEditor.focusIn?this.cellEditor.focusIn():this.focusCell(!0))},t.prototype.isEditing=function(){return this.editingCell},t.prototype.onKeyDown=function(e){var t=e.which||e.keyCode;switch(t){case l.Constants.KEY_ENTER:this.onEnterKeyDown();break;case l.Constants.KEY_F2:this.onF2KeyDown();break;case l.Constants.KEY_ESCAPE:this.onEscapeKeyDown();break;case l.Constants.KEY_TAB:this.onTabKeyDown(e);break;case l.Constants.KEY_BACKSPACE:case l.Constants.KEY_DELETE:this.onBackspaceOrDeleteKeyPressed(t);break;case l.Constants.KEY_DOWN:case l.Constants.KEY_UP:case l.Constants.KEY_RIGHT:case l.Constants.KEY_LEFT:this.onNavigationKeyPressed(e,t)}},t.prototype.setFocusOutOnEditor=function(){this.editingCell&&this.cellEditor&&this.cellEditor.focusOut&&this.cellEditor.focusOut()},t.prototype.onNavigationKeyPressed=function(e,t){this.editingCell||(e.shiftKey&&this.rangeSelectionEnabled?this.onShiftRangeSelect(t):this.beans.rowRenderer.navigateToNextCell(e,t,this.gridCell,!0),e.preventDefault())},t.prototype.onShiftRangeSelect=function(e){if(this.beans.rangeController.extendRangeInDirection(this.gridCell,e)){var t=this.beans.rangeController.getCellRanges();if(!g._.missing(t)&&t&&1===t.length){var o=t[0].end;this.beans.rowRenderer.ensureCellVisible(o)}}},t.prototype.onTabKeyDown=function(e){this.beans.rowRenderer.onTabKeyDown(this,e)},t.prototype.onBackspaceOrDeleteKeyPressed=function(e){this.editingCell||this.startRowOrCellEdit(e)},t.prototype.onEnterKeyDown=function(){this.editingCell||this.rowComp.isEditing()?this.stopEditingAndFocus():this.beans.gridOptionsWrapper.isEnterMovesDown()?this.beans.rowRenderer.navigateToNextCell(null,l.Constants.KEY_DOWN,this.gridCell,!1):this.startRowOrCellEdit(l.Constants.KEY_ENTER)},t.prototype.navigateAfterEdit=function(){this.beans.gridOptionsWrapper.isFullRowEdit()||this.beans.gridOptionsWrapper.isEnterMovesDownAfterEdit()&&this.beans.rowRenderer.navigateToNextCell(null,l.Constants.KEY_DOWN,this.gridCell,!1)},t.prototype.onF2KeyDown=function(){this.editingCell||this.startRowOrCellEdit(l.Constants.KEY_F2)},t.prototype.onEscapeKeyDown=function(){this.editingCell&&(this.stopRowOrCellEdit(!0),this.focusCell(!0))},t.prototype.onKeyPress=function(e){if(g._.getTarget(e)===this.getGui()&&!this.editingCell){var t=String.fromCharCode(e.charCode);" "===t?this.onSpaceKeyPressed(e):g._.isEventFromPrintableCharacter(e)&&(this.startRowOrCellEdit(null,t),e.preventDefault())}},t.prototype.onSpaceKeyPressed=function(e){if(!this.editingCell&&this.beans.gridOptionsWrapper.isRowSelection()){var t=this.rowNode.isSelected();this.rowNode.setSelected(!t)}e.preventDefault()},t.prototype.onMouseDown=function(e){var t=!1;if(!g._.isElementChildOfClass(e.target,"ag-selection-checkbox",3)){if(g._.isBrowserIE()&&e.target.classList.contains("ag-cell")&&(t=!0),this.focusCell(t),g._.isLeftClick(e)&&this.beans.rangeController){var o=this.gridCell;if(e.shiftKey)this.beans.rangeController.extendRangeToCell(o);else{var r=e.ctrlKey||e.metaKey;this.beans.rangeController.setRangeToCell(o,r)}}var n=this.createEvent(e,p.Events.EVENT_CELL_MOUSE_DOWN);this.beans.eventService.dispatchEvent(n)}},t.prototype.isDoubleClickOnIPad=function(){if(!g._.isUserAgentIPad())return!1;var e=(new Date).getTime(),t=e-this.lastIPadMouseClickEvent<200;return this.lastIPadMouseClickEvent=e,t},t.prototype.onCellClicked=function(e){if(this.isDoubleClickOnIPad())return this.onCellDoubleClicked(e),void e.preventDefault();var t=this.createEvent(e,p.Events.EVENT_CELL_CLICKED);this.beans.eventService.dispatchEvent(t);var o=this.getComponentHolder();o.onCellClicked&&window.setTimeout((function(){return o.onCellClicked(t)}),0),(this.beans.gridOptionsWrapper.isSingleClickEdit()||o.singleClickEdit)&&!this.beans.gridOptionsWrapper.isSuppressClickEdit()&&this.startRowOrCellEdit(),g._.doIeFocusHack(this.getGui())},t.prototype.createGridCellVo=function(){var e={rowIndex:this.rowNode.rowIndex,floating:this.rowNode.rowPinned,column:this.column};this.gridCell=new u.GridCell(e)},t.prototype.getGridCell=function(){return this.gridCell},t.prototype.getParentRow=function(){return this.eParentRow},t.prototype.setParentRow=function(e){this.eParentRow=e},t.prototype.getColumn=function(){return this.column},t.prototype.getComponentHolder=function(){return this.column.getColDef()},t.prototype.detach=function(){this.eParentRow.removeChild(this.getGui())},t.prototype.destroy=function(){e.prototype.destroy.call(this),this.cellEditor&&this.cellEditor.destroy&&(this.cellEditor.destroy(),this.cellEditor=null),this.cellRenderer&&this.cellRenderer.destroy&&(this.cellRenderer.destroy(),this.cellRenderer=null)},t.prototype.onLeftChanged=function(){var e=this.modifyLeftForPrintLayout(this.getCellLeft());this.getGui().style.left=e+"px"},t.prototype.modifyLeftForPrintLayout=function(e){return this.printLayout?this.column.getPinned()===s.Column.PINNED_LEFT?e:this.column.getPinned()===s.Column.PINNED_RIGHT?this.beans.columnController.getPinnedLeftContainerWidth()+this.beans.columnController.getBodyContainerWidth()+e:this.beans.columnController.getPinnedLeftContainerWidth()+e:e},t.prototype.onWidthChanged=function(){var e=this.getCellWidth();this.getGui().style.width=e+"px"},t.prototype.getRangeClasses=function(){var e=[];return this.rangeSelectionEnabled?(0!==this.rangeCount&&e.push("ag-cell-range-selected"),1===this.rangeCount&&e.push("ag-cell-range-selected-1"),2===this.rangeCount&&e.push("ag-cell-range-selected-2"),3===this.rangeCount&&e.push("ag-cell-range-selected-3"),this.rangeCount>=4&&e.push("ag-cell-range-selected-4"),e):e},t.prototype.onRowIndexChanged=function(){this.createGridCellVo(),this.onCellFocused(),this.onRangeSelectionChanged()},t.prototype.onRangeSelectionChanged=function(){if(this.beans.enterprise){var e=this.beans.rangeController.getCellRangeCount(this.gridCell),t=this.getGui();this.rangeCount!==e&&(g._.addOrRemoveCssClass(t,"ag-cell-range-selected",0!==e),g._.addOrRemoveCssClass(t,"ag-cell-range-selected-1",1===e),g._.addOrRemoveCssClass(t,"ag-cell-range-selected-2",2===e),g._.addOrRemoveCssClass(t,"ag-cell-range-selected-3",3===e),g._.addOrRemoveCssClass(t,"ag-cell-range-selected-4",e>=4),this.rangeCount=e)}},t.prototype.onFirstRightPinnedChanged=function(){var e=this.column.isFirstRightPinned();this.firstRightPinned!==e&&(this.firstRightPinned=e,g._.addOrRemoveCssClass(this.getGui(),"ag-cell-first-right-pinned",e))},t.prototype.onLastLeftPinnedChanged=function(){var e=this.column.isLastLeftPinned();this.lastLeftPinned!==e&&(this.lastLeftPinned=e,g._.addOrRemoveCssClass(this.getGui(),"ag-cell-last-left-pinned",e))},t.prototype.populateTemplate=function(){this.usingWrapper?(this.eParentOfValue=this.getRefElement("eCellValue"),this.eCellWrapper=this.getRefElement("eCellWrapper"),this.includeRowDraggingComponent&&this.addRowDragging(),this.includeSelectionComponent&&this.addSelectionCheckbox()):this.eParentOfValue=this.getGui()},t.prototype.addRowDragging=function(){if(this.beans.gridOptionsWrapper.isRowModelDefault())if(this.beans.gridOptionsWrapper.isPagination())g._.doOnce((function(){return console.warn("ag-Grid: row dragging is not possible when doing pagination")}),"CellComp.addRowDragging");else{var e=new h.RowDragComp(this.rowNode,this.column,this.getValueToUse(),this.beans);this.addFeature(this.beans.context,e),this.eCellWrapper.insertBefore(e.getGui(),this.eParentOfValue)}else g._.doOnce((function(){return console.warn("ag-Grid: row dragging is only allowed in the In Memory Row Model")}),"CellComp.addRowDragging")},t.prototype.addSelectionCheckbox=function(){var e=new c.CheckboxSelectionComponent;this.beans.context.wireBean(e);var t=this.getComponentHolder().checkboxSelection;t="function"==typeof t?t:null,e.init({rowNode:this.rowNode,column:this.column,visibleFunc:t}),this.addDestroyFunc((function(){return e.destroy()})),this.eCellWrapper.insertBefore(e.getGui(),this.eParentOfValue)},t.prototype.addDomData=function(){var e=this,o=this.getGui();this.beans.gridOptionsWrapper.setDomData(o,t.DOM_DATA_KEY_CELL_COMP,this),this.addDestroyFunc((function(){return e.beans.gridOptionsWrapper.setDomData(o,t.DOM_DATA_KEY_CELL_COMP,null)}))},t.prototype.onCellFocused=function(e){var t=this.beans.focusedCellController.isCellFocused(this.gridCell);if(t!==this.cellFocused&&(!this.beans.gridOptionsWrapper.isSuppressCellSelection()&&g._.addOrRemoveCssClass(this.getGui(),"ag-cell-focus",t),this.cellFocused=t),t&&e&&e.forceBrowserFocus){var o=this.getGui();o.focus(),g._.doIeFocusHack(o)}var r=this.beans.gridOptionsWrapper.isFullRowEdit();t||r||!this.editingCell||this.stopRowOrCellEdit()},t.prototype.stopRowOrCellEdit=function(e){void 0===e&&(e=!1),this.beans.gridOptionsWrapper.isFullRowEdit()?this.rowComp.stopRowEditing(e):this.stopEditing(e)},t.prototype.stopEditing=function(e){if(void 0===e&&(e=!1),this.editingCell)if(this.cellEditor){var t,o=!1;if(e||this.cellEditor.isCancelAfterEnd&&this.cellEditor.isCancelAfterEnd()||(t=this.cellEditor.getValue(),o=!0),this.editingCell=!1,this.cellEditor.destroy&&this.cellEditor.destroy(),this.cellEditor=null,this.cellEditorInPopup&&this.hideEditorPopup)this.hideEditorPopup(),this.hideEditorPopup=null;else if(g._.clearElement(this.getGui()),this.usingWrapper)this.getGui().appendChild(this.eCellWrapper);else if(this.cellRenderer){var r=this.cellRendererGui;r&&this.getGui().appendChild(r)}this.setInlineEditingClass(),o&&(this.suppressRefreshCell=!0,this.rowNode.setDataValue(this.column,t),this.suppressRefreshCell=!1),this.refreshCell({forceRefresh:!0,suppressFlash:!0});var n=this.createEvent(null,p.Events.EVENT_CELL_EDITING_STOPPED);this.beans.eventService.dispatchEvent(n)}else this.editingCell=!1},t.DOM_DATA_KEY_CELL_COMP="cellComp",t.CELL_RENDERER_TYPE_NORMAL="cellRenderer",t.CELL_RENDERER_TYPE_PINNED="pinnedRowCellRenderer",t}(d.Component);t.CellComp=m},23801:function(e,t,o){var r=this&&this.__decorate||function(e,t,o,r){var n,i=arguments.length,s=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,o):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,o,r);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(s=(i<3?n(s):i>3?n(t,o,s):n(t,o))||s);return i>3&&s&&Object.defineProperty(t,o,s),s},n=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)};Object.defineProperty(t,"__esModule",{value:!0});var i=o(72493),s=o(55090),a=o(23054),l=o(98239),p=o(83423),u=function(){function e(){}return e.prototype.registerGridComp=function(e){this.gridPanel=e},e.prototype.getPreferredHeightForRow=function(e){var t=this;this.eDummyContainer||(this.eDummyContainer=document.createElement("div"),p._.addCssClass(this.eDummyContainer,"ag-row ag-row-no-focus"));var o=this.gridPanel.getCenterContainer();o.appendChild(this.eDummyContainer);var r=[];this.columnController.getAllAutoRowHeightCols().filter((function(e){return e.isVisible()})).forEach((function(o){var n=new a.CellComp(t.$scope,t.beans,o,e,null,!0,!1);n.setParentRow(t.eDummyContainer),r.push(n)}));var n=r.map((function(e){return e.getCreateTemplate()})).join(" ");this.eDummyContainer.innerHTML=n,r.forEach((function(e){return e.afterAttached()}));for(var i=0,s=0;s<this.eDummyContainer.children.length;s++){var l=this.eDummyContainer.children[s];l.offsetHeight>i&&(i=l.offsetHeight)}return o.removeChild(this.eDummyContainer),r.forEach((function(e){e.detach(),e.destroy()})),p._.clearElement(this.eDummyContainer),i},r([i.Autowired("beans"),n("design:type",s.Beans)],e.prototype,"beans",void 0),r([i.Autowired("$scope"),n("design:type",Object)],e.prototype,"$scope",void 0),r([i.Autowired("columnController"),n("design:type",l.ColumnController)],e.prototype,"columnController",void 0),r([i.Bean("autoHeightCalculator")],e)}();t.AutoHeightCalculator=u},24048:function(e,t,o){var r=this&&this.__decorate||function(e,t,o,r){var n,i=arguments.length,s=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,o):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,o,r);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(s=(i<3?n(s):i>3?n(t,o,s):n(t,o))||s);return i>3&&s&&Object.defineProperty(t,o,s),s},n=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)};Object.defineProperty(t,"__esModule",{value:!0});var i=o(72493),s=o(44081),a=o(663),l=o(4889),p=function(){function e(){}return e.prototype.execute=function(e){var t=e.rowNode,o=e.changedPath;this.filterService.filter(o),this.selectableService.updateSelectableAfterFiltering(t)},r([i.Autowired("gridOptionsWrapper"),n("design:type",s.GridOptionsWrapper)],e.prototype,"gridOptionsWrapper",void 0),r([i.Autowired("selectableService"),n("design:type",l.SelectableService)],e.prototype,"selectableService",void 0),r([i.Autowired("filterService"),n("design:type",a.FilterService)],e.prototype,"filterService",void 0),r([i.Bean("filterStage")],e)}();t.FilterStage=p},24144:function(e,t,o){var r,n=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o])},r(e,t)},function(e,t){function o(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)}),i=this&&this.__decorate||function(e,t,o,r){var n,i=arguments.length,s=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,o):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,o,r);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(s=(i<3?n(s):i>3?n(t,o,s):n(t,o))||s);return i>3&&s&&Object.defineProperty(t,o,s),s},s=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)};Object.defineProperty(t,"__esModule",{value:!0});var a=o(44081),l=o(72493),p=function(e){function t(){return e.call(this)||this}return n(t,e),t.prototype.init=function(e){var o=this.gridOptionsWrapper.getOverlayLoadingTemplate()?this.gridOptionsWrapper.getOverlayLoadingTemplate():t.DEFAULT_LOADING_OVERLAY_TEMPLATE,r=this.gridOptionsWrapper.getLocaleTextFunc(),n=o.replace("[LOADING...]",r("loadingOoo","Loading..."));this.setTemplate(n)},t.DEFAULT_LOADING_OVERLAY_TEMPLATE='<span class="ag-overlay-loading-center">[LOADING...]</span>',i([l.Autowired("gridOptionsWrapper"),s("design:type",a.GridOptionsWrapper)],t.prototype,"gridOptionsWrapper",void 0),t}(o(22131).Component);t.LoadingOverlayComponent=p},24463:function(e,t,o){var r=this&&this.__decorate||function(e,t,o,r){var n,i=arguments.length,s=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,o):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,o,r);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(s=(i<3?n(s):i>3?n(t,o,s):n(t,o))||s);return i>3&&s&&Object.defineProperty(t,o,s),s},n=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)};Object.defineProperty(t,"__esModule",{value:!0});var i=o(44081),s=o(40634),a=o(98239),l=o(72493),p=o(63405),u=o(60843),d=o(88842),c=o(83423),h=function(){function e(){this.initialised=!1}return e.prototype.init=function(){this.cellExpressions=this.gridOptionsWrapper.isEnableCellExpressions(),this.initialised=!0},e.prototype.getValue=function(e,t,o,r){if(void 0===o&&(o=!1),void 0===r&&(r=!1),this.initialised||this.init(),t){var n,i=e.getColDef(),s=i.field,a=e.getId(),l=t.data,p=t.groupData&&void 0!==t.groupData[a],u=!r&&t.aggData&&void 0!==t.aggData[a];if(o&&i.filterValueGetter?n=this.executeFilterValueGetter(i.filterValueGetter,l,e,t):this.gridOptionsWrapper.isTreeData()&&u?n=t.aggData[a]:this.gridOptionsWrapper.isTreeData()&&i.valueGetter?n=this.executeValueGetter(i.valueGetter,l,e,t):this.gridOptionsWrapper.isTreeData()&&s&&l?n=c._.getValueUsingField(l,s,e.isFieldContainsDots()):p?n=t.groupData[a]:u?n=t.aggData[a]:i.valueGetter?n=this.executeValueGetter(i.valueGetter,l,e,t):s&&l&&(n=c._.getValueUsingField(l,s,e.isFieldContainsDots())),this.cellExpressions&&"string"==typeof n&&0===n.indexOf("=")){var d=n.substring(1);n=this.executeValueGetter(d,l,e,t)}return n}},e.prototype.setValue=function(e,t,o){var r=this.columnController.getPrimaryColumn(t);if(e&&r){var n=e.data;c._.missing(n)&&(e.data={});var i=r.getColDef(),s=i.field,a=i.newValueHandler,l=i.valueSetter;if(c._.missing(s)&&c._.missing(a)&&c._.missing(l))console.warn("ag-Grid: you need either field or valueSetter set on colDef for editing to work");else{var u,d={node:e,data:e.data,oldValue:this.getValue(r,e),newValue:o,colDef:r.getColDef(),column:r,api:this.gridOptionsWrapper.getApi(),columnApi:this.gridOptionsWrapper.getColumnApi(),context:this.gridOptionsWrapper.getContext()};if(d.newValue=o,void 0===(u=a&&c._.exists(a)?a(d):c._.exists(l)?this.expressionService.evaluate(l,d):this.setValueUsingField(n,s,o,r.isFieldContainsDots()))&&(u=!0),u){e.resetQuickFilterAggregateText(),this.valueCache.onDataChanged(),d.newValue=this.getValue(r,e);var h=r.getColDef().onCellValueChanged;"function"==typeof h&&setTimeout((function(){return h(d)}),0);var f={type:p.Events.EVENT_CELL_VALUE_CHANGED,event:null,rowIndex:e.rowIndex,rowPinned:e.rowPinned,column:d.column,api:d.api,colDef:d.colDef,columnApi:d.columnApi,context:d.context,data:e.data,node:e,oldValue:d.oldValue,newValue:d.newValue,value:d.newValue};this.eventService.dispatchEvent(f)}}}},e.prototype.setValueUsingField=function(e,t,o,r){if(!t)return!1;if(r)for(var n=t.split("."),i=e;n.length>0&&i;){var s=n.shift();0===n.length?i[s]=o:i=i[s]}else e[t]=o;return!0},e.prototype.executeFilterValueGetter=function(e,t,o,r){var n={data:t,node:r,column:o,colDef:o.getColDef(),api:this.gridOptionsWrapper.getApi(),columnApi:this.gridOptionsWrapper.getColumnApi(),context:this.gridOptionsWrapper.getContext(),getValue:this.getValueCallback.bind(this,r)};return this.expressionService.evaluate(e,n)},e.prototype.executeValueGetter=function(e,t,o,r){var n=o.getId(),i=this.valueCache.getValue(r,n);if(void 0!==i)return i;var s={data:t,node:r,column:o,colDef:o.getColDef(),api:this.gridOptionsWrapper.getApi(),columnApi:this.gridOptionsWrapper.getColumnApi(),context:this.gridOptionsWrapper.getContext(),getValue:this.getValueCallback.bind(this,r)},a=this.expressionService.evaluate(e,s);return this.valueCache.setValue(r,n,a),a},e.prototype.getValueCallback=function(e,t){var o=this.columnController.getPrimaryColumn(t);return o?this.getValue(o,e):null},e.prototype.getKeyForNode=function(e,t){var o=this.getValue(e,t),r=e.getColDef().keyCreator,n=r?r({value:o}):o;return"string"==typeof n||null==n||"[object Object]"===(n=String(n))&&c._.doOnce((function(){console.warn("ag-Grid: a column you are grouping or pivoting by has objects as values. If you want to group by complex objects then either a) use a colDef.keyCreator (se ag-Grid docs) or b) to toString() on the object to return a key")}),"getKeyForNode - warn about [object,object]"),n},r([l.Autowired("gridOptionsWrapper"),n("design:type",i.GridOptionsWrapper)],e.prototype,"gridOptionsWrapper",void 0),r([l.Autowired("expressionService"),n("design:type",s.ExpressionService)],e.prototype,"expressionService",void 0),r([l.Autowired("columnController"),n("design:type",a.ColumnController)],e.prototype,"columnController",void 0),r([l.Autowired("eventService"),n("design:type",u.EventService)],e.prototype,"eventService",void 0),r([l.Autowired("valueCache"),n("design:type",d.ValueCache)],e.prototype,"valueCache",void 0),r([l.PostConstruct,n("design:type",Function),n("design:paramtypes",[]),n("design:returntype",void 0)],e.prototype,"init",null),r([l.Bean("valueService")],e)}();t.ValueService=h},25230:function(e,t,o){var r=this&&this.__decorate||function(e,t,o,r){var n,i=arguments.length,s=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,o):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,o,r);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(s=(i<3?n(s):i>3?n(t,o,s):n(t,o))||s);return i>3&&s&&Object.defineProperty(t,o,s),s},n=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)};Object.defineProperty(t,"__esModule",{value:!0});var i=o(72493),s=o(37132),a=o(60843),l=o(63405),p=o(44081),u=o(44871),d=o(40797),c=o(83423),h=function(){function e(){this.onMouseUpListener=this.onMouseUp.bind(this),this.onMouseMoveListener=this.onMouseMove.bind(this),this.onTouchEndListener=this.onTouchUp.bind(this),this.onTouchMoveListener=this.onTouchMove.bind(this),this.dragEndFunctions=[],this.dragSources=[]}return e.prototype.init=function(){this.logger=this.loggerFactory.create("DragService")},e.prototype.destroy=function(){this.dragSources.forEach(this.removeListener.bind(this)),this.dragSources.length=0},e.prototype.removeListener=function(e){var t=e.dragSource.eElement,o=e.mouseDownListener;if(t.removeEventListener("mousedown",o),e.touchEnabled){var r=e.touchStartListener;t.removeEventListener("touchstart",r,{passive:!0})}},e.prototype.removeDragSource=function(e){var t=c._.find(this.dragSources,(function(t){return t.dragSource===e}));t&&(this.removeListener(t),c._.removeFromArray(this.dragSources,t))},e.prototype.setNoSelectToBody=function(e){var t=this.gridOptionsWrapper.getDocument().querySelector("body");c._.exists(t)&&c._.addOrRemoveCssClass(t,"ag-unselectable",e)},e.prototype.addDragSource=function(e,t){void 0===t&&(t=!1);var o=this.onMouseDown.bind(this,e);e.eElement.addEventListener("mousedown",o);var r=null,n=this.gridOptionsWrapper.isSuppressTouch();t&&!n&&(r=this.onTouchStart.bind(this,e),e.eElement.addEventListener("touchstart",r,{passive:!1})),this.dragSources.push({dragSource:e,mouseDownListener:o,touchStartListener:r,touchEnabled:t})},e.prototype.onTouchStart=function(e,t){var o=this;this.currentDragParams=e,this.dragging=!1;var r=t.touches[0];this.touchLastTime=r,this.touchStart=r,t.preventDefault(),e.eElement.addEventListener("touchmove",this.onTouchMoveListener,{passive:!0}),e.eElement.addEventListener("touchend",this.onTouchEndListener,{passive:!0}),e.eElement.addEventListener("touchcancel",this.onTouchEndListener,{passive:!0}),this.dragEndFunctions.push((function(){e.eElement.removeEventListener("touchmove",o.onTouchMoveListener,{passive:!0}),e.eElement.removeEventListener("touchend",o.onTouchEndListener,{passive:!0}),e.eElement.removeEventListener("touchcancel",o.onTouchEndListener,{passive:!0})})),0===e.dragStartPixels&&this.onCommonMove(r,this.touchStart)},e.prototype.onMouseDown=function(e,t){var o=this;if(!(e.skipMouseEvent&&e.skipMouseEvent(t)||t._alreadyProcessedByDragService||(t._alreadyProcessedByDragService=!0,0!==t.button))){this.currentDragParams=e,this.dragging=!1,this.mouseEventLastTime=t,this.mouseStartEvent=t;var r=this.gridOptionsWrapper.getDocument();r.addEventListener("mousemove",this.onMouseMoveListener),r.addEventListener("mouseup",this.onMouseUpListener),this.dragEndFunctions.push((function(){r.removeEventListener("mousemove",o.onMouseMoveListener),r.removeEventListener("mouseup",o.onMouseUpListener)})),0===e.dragStartPixels&&this.onMouseMove(t)}},e.prototype.isEventNearStartEvent=function(e,t){var o=this.currentDragParams.dragStartPixels,r=c._.exists(o)?o:4;return c._.areEventsNear(e,t,r)},e.prototype.getFirstActiveTouch=function(e){for(var t=0;t<e.length;t++)if(e[t].identifier===this.touchStart.identifier)return e[t];return null},e.prototype.onCommonMove=function(e,t){if(!this.dragging){if(!this.dragging&&this.isEventNearStartEvent(e,t))return;this.dragging=!0;var o={type:l.Events.EVENT_DRAG_STARTED,api:this.gridApi,columnApi:this.columnApi};this.eventService.dispatchEvent(o),this.currentDragParams.onDragStart(t),this.setNoSelectToBody(!0)}this.currentDragParams.onDragging(e)},e.prototype.onTouchMove=function(e){var t=this.getFirstActiveTouch(e.touches);t&&this.onCommonMove(t,this.touchStart)},e.prototype.onMouseMove=function(e){this.onCommonMove(e,this.mouseStartEvent)},e.prototype.onTouchUp=function(e){var t=this.getFirstActiveTouch(e.changedTouches);t||(t=this.touchLastTime),this.onUpCommon(t)},e.prototype.onMouseUp=function(e){this.onUpCommon(e)},e.prototype.onUpCommon=function(e){if(this.dragging){this.dragging=!1,this.currentDragParams.onDragStop(e);var t={type:l.Events.EVENT_DRAG_STOPPED,api:this.gridApi,columnApi:this.columnApi};this.eventService.dispatchEvent(t)}this.setNoSelectToBody(!1),this.mouseStartEvent=null,this.mouseEventLastTime=null,this.touchStart=null,this.touchLastTime=null,this.currentDragParams=null,this.dragEndFunctions.forEach((function(e){return e()})),this.dragEndFunctions.length=0},r([i.Autowired("loggerFactory"),n("design:type",s.LoggerFactory)],e.prototype,"loggerFactory",void 0),r([i.Autowired("eventService"),n("design:type",a.EventService)],e.prototype,"eventService",void 0),r([i.Autowired("gridOptionsWrapper"),n("design:type",p.GridOptionsWrapper)],e.prototype,"gridOptionsWrapper",void 0),r([i.Autowired("columnApi"),n("design:type",u.ColumnApi)],e.prototype,"columnApi",void 0),r([i.Autowired("gridApi"),n("design:type",d.GridApi)],e.prototype,"gridApi",void 0),r([i.PostConstruct,n("design:type",Function),n("design:paramtypes",[]),n("design:returntype",void 0)],e.prototype,"init",null),r([i.PreDestroy,n("design:type",Function),n("design:paramtypes",[]),n("design:returntype",void 0)],e.prototype,"destroy",null),r([i.Bean("dragService")],e)}();t.DragService=h},25358:function(e,t,o){var r,n=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o])},r(e,t)},function(e,t){function o(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)}),i=this&&this.__decorate||function(e,t,o,r){var n,i=arguments.length,s=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,o):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,o,r);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(s=(i<3?n(s):i>3?n(t,o,s):n(t,o))||s);return i>3&&s&&Object.defineProperty(t,o,s),s},s=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)};Object.defineProperty(t,"__esModule",{value:!0});var a=o(22131),l=o(26016),p=o(72493),u=o(44081),d=o(86608),c=o(66419),h=o(60843),f=o(47721),g=o(63405),m=o(83423),y=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.lastMovingChanged=0,t}return n(t,e),t.prototype.init=function(e){var o=m._.firstExistingValue(e.template,t.TEMPLATE);o=o&&o.trim?o.trim():o,this.setTemplate(o),this.params=e,this.setupTap(),this.setupIcons(e.column),this.setupMenu(),this.setupSort(),this.setupFilterIcon(),this.setupText(e.displayName)},t.prototype.setupText=function(e){var t=m._.escape(e);this.eText&&(this.eText.innerHTML=t)},t.prototype.setupIcons=function(e){this.addInIcon("sortAscending",this.eSortAsc,e),this.addInIcon("sortDescending",this.eSortDesc,e),this.addInIcon("sortUnSort",this.eSortNone,e),this.addInIcon("menu",this.eMenu,e),this.addInIcon("filter",this.eFilter,e)},t.prototype.addInIcon=function(e,t,o){if(null!=t){var r=m._.createIconNoSpan(e,this.gridOptionsWrapper,o);t.appendChild(r)}},t.prototype.setupTap=function(){var e=this,t=this.gridOptionsWrapper;if(!t.isSuppressTouch()){var o=t.isSuppressMenuHide(),r=new c.TouchListener(this.getGui(),!0),n=o?new c.TouchListener(this.eMenu,!0):r;if(this.params.enableMenu){var i=o?"EVENT_TAP":"EVENT_LONG_TAP";this.addDestroyableEventListener(n,c.TouchListener[i],(function(o){t.getApi().showColumnMenuAfterMouseClick(e.params.column,o.touchStart)}))}this.params.enableSorting&&this.addDestroyableEventListener(r,c.TouchListener.EVENT_TAP,(function(t){var r=t.touchStart.target;o&&e.eMenu.contains(r)||e.sortController.progressSort(e.params.column,!1,"uiColumnSorted")})),this.addDestroyFunc((function(){return r.destroy()})),n!==r&&this.addDestroyFunc((function(){return n.destroy()}))}},t.prototype.setupMenu=function(){var e=this;if(this.eMenu){var t=this.gridOptionsWrapper.isSuppressMenuHide();if(!this.params.enableMenu||m._.isUserAgentIPad()&&!t)m._.removeFromParent(this.eMenu);else{this.addDestroyableEventListener(this.eMenu,"click",(function(){return e.showMenu(e.eMenu)})),t||(this.eMenu.style.opacity="0",this.addGuiEventListener("mouseover",(function(){e.eMenu.style.opacity="1"})),this.addGuiEventListener("mouseout",(function(){e.eMenu.style.opacity="0"})));var o=this.eMenu.style;o.transition="opacity 0.2s, border 0.2s",o["-webkit-transition"]="opacity 0.2s, border 0.2s"}}},t.prototype.showMenu=function(e){this.menuFactory.showMenuAfterButtonClick(this.params.column,e)},t.prototype.removeSortIcons=function(){m._.removeFromParent(this.eSortAsc),m._.removeFromParent(this.eSortDesc),m._.removeFromParent(this.eSortNone),m._.removeFromParent(this.eSortOrder)},t.prototype.setupSort=function(){var e=this;if(this.params.enableSorting){var t=this.gridOptionsWrapper.isMultiSortKeyCtrl();this.addDestroyableEventListener(this.params.column,l.Column.EVENT_MOVING_CHANGED,(function(){e.lastMovingChanged=(new Date).getTime()})),this.eLabel&&this.addDestroyableEventListener(this.eLabel,"click",(function(o){var r=e.params.column.isMoving(),n=(new Date).getTime()-e.lastMovingChanged<50;if(!r&&!n){var i=t?o.ctrlKey||o.metaKey:o.shiftKey;e.params.progressSort(i)}})),this.addDestroyableEventListener(this.params.column,l.Column.EVENT_SORT_CHANGED,this.onSortChanged.bind(this)),this.onSortChanged(),this.addDestroyableEventListener(this.eventService,g.Events.EVENT_SORT_CHANGED,this.setMultiSortOrder.bind(this)),this.setMultiSortOrder()}else this.removeSortIcons()},t.prototype.onSortChanged=function(){if(m._.addOrRemoveCssClass(this.getGui(),"ag-header-cell-sorted-asc",this.params.column.isSortAscending()),m._.addOrRemoveCssClass(this.getGui(),"ag-header-cell-sorted-desc",this.params.column.isSortDescending()),m._.addOrRemoveCssClass(this.getGui(),"ag-header-cell-sorted-none",this.params.column.isSortNone()),this.eSortAsc&&m._.addOrRemoveCssClass(this.eSortAsc,"ag-hidden",!this.params.column.isSortAscending()),this.eSortDesc&&m._.addOrRemoveCssClass(this.eSortDesc,"ag-hidden",!this.params.column.isSortDescending()),this.eSortNone){var e=!this.params.column.getColDef().unSortIcon&&!this.gridOptionsWrapper.isUnSortIcon();m._.addOrRemoveCssClass(this.eSortNone,"ag-hidden",e||!this.params.column.isSortNone())}},t.prototype.setMultiSortOrder=function(){if(this.eSortOrder){var e=this.params.column,t=this.sortController.getColumnsWithSortingOrdered(),o=t.indexOf(e),r=t.length>1,n=e.isSorting()&&r;m._.setVisible(this.eSortOrder,n),o>=0?this.eSortOrder.innerHTML=(o+1).toString():m._.clearElement(this.eSortOrder)}},t.prototype.setupFilterIcon=function(){this.eFilter&&(this.addDestroyableEventListener(this.params.column,l.Column.EVENT_FILTER_CHANGED,this.onFilterChanged.bind(this)),this.onFilterChanged())},t.prototype.onFilterChanged=function(){var e=this.params.column.isFilterActive();m._.addOrRemoveCssClass(this.eFilter,"ag-hidden",!e)},t.TEMPLATE='<div class="ag-cell-label-container" role="presentation"> <span ref="eMenu" class="ag-header-icon ag-header-cell-menu-button" aria-hidden="true"></span> <div ref="eLabel" class="ag-header-cell-label" role="presentation" unselectable="on"> <span ref="eText" class="ag-header-cell-text" role="columnheader" unselectable="on"></span> <span ref="eFilter" class="ag-header-icon ag-filter-icon" aria-hidden="true"></span> <span ref="eSortOrder" class="ag-header-icon ag-sort-order" aria-hidden="true"></span> <span ref="eSortAsc" class="ag-header-icon ag-sort-ascending-icon" aria-hidden="true"></span> <span ref="eSortDesc" class="ag-header-icon ag-sort-descending-icon" aria-hidden="true"></span> <span ref="eSortNone" class="ag-header-icon ag-sort-none-icon" aria-hidden="true"></span> </div></div>',i([p.Autowired("gridOptionsWrapper"),s("design:type",u.GridOptionsWrapper)],t.prototype,"gridOptionsWrapper",void 0),i([p.Autowired("sortController"),s("design:type",d.SortController)],t.prototype,"sortController",void 0),i([p.Autowired("menuFactory"),s("design:type",Object)],t.prototype,"menuFactory",void 0),i([p.Autowired("eventService"),s("design:type",h.EventService)],t.prototype,"eventService",void 0),i([f.RefSelector("eFilter"),s("design:type",HTMLElement)],t.prototype,"eFilter",void 0),i([f.RefSelector("eSortAsc"),s("design:type",HTMLElement)],t.prototype,"eSortAsc",void 0),i([f.RefSelector("eSortDesc"),s("design:type",HTMLElement)],t.prototype,"eSortDesc",void 0),i([f.RefSelector("eSortNone"),s("design:type",HTMLElement)],t.prototype,"eSortNone",void 0),i([f.RefSelector("eSortOrder"),s("design:type",HTMLElement)],t.prototype,"eSortOrder",void 0),i([f.RefSelector("eMenu"),s("design:type",HTMLElement)],t.prototype,"eMenu",void 0),i([f.RefSelector("eLabel"),s("design:type",HTMLElement)],t.prototype,"eLabel",void 0),i([f.RefSelector("eText"),s("design:type",HTMLElement)],t.prototype,"eText",void 0),t}(a.Component);t.HeaderComp=y},26016:function(e,t,o){var r=this&&this.__decorate||function(e,t,o,r){var n,i=arguments.length,s=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,o):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,o,r);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(s=(i<3?n(s):i>3?n(t,o,s):n(t,o))||s);return i>3&&s&&Object.defineProperty(t,o,s),s},n=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)};Object.defineProperty(t,"__esModule",{value:!0});var i=o(60843),s=o(83423),a=o(72493),l=o(44081),p=o(814),u=o(44871),d=o(40797),c=function(){function e(e,t,o,r){this.moving=!1,this.menuVisible=!1,this.filterActive=!1,this.eventService=new i.EventService,this.rowGroupActive=!1,this.pivotActive=!1,this.aggregationActive=!1,this.colDef=e,this.userProvidedColDef=t,this.visible=!e.hide,this.sort=e.sort,this.sortedAt=e.sortedAt,this.colId=o,this.primary=r,this.lockPosition=!0===e.lockPosition,this.lockPinned=!0===e.lockPinned,this.lockVisible=!0===e.lockVisible}return e.prototype.setColDef=function(e,t){this.colDef=e,this.userProvidedColDef=t},e.prototype.getUserProvidedColDef=function(){return this.userProvidedColDef},e.prototype.isLockPosition=function(){return this.lockPosition},e.prototype.isLockVisible=function(){return this.lockVisible},e.prototype.isLockPinned=function(){return this.lockPinned},e.prototype.setParent=function(e){this.parent=e},e.prototype.getParent=function(){return this.parent},e.prototype.setOriginalParent=function(e){this.originalParent=e},e.prototype.getOriginalParent=function(){return this.originalParent},e.prototype.initialise=function(){this.setPinned(this.colDef.pinned);var e=this.gridOptionsWrapper.getMinColWidth(),t=this.gridOptionsWrapper.getMaxColWidth();this.colDef.minWidth?this.minWidth=this.colDef.minWidth:this.minWidth=e,this.colDef.maxWidth?this.maxWidth=this.colDef.maxWidth:this.maxWidth=t,this.actualWidth=this.columnUtils.calculateColInitialWidth(this.colDef);var o=this.gridOptionsWrapper.isSuppressFieldDotNotation();this.fieldContainsDots=s._.exists(this.colDef.field)&&this.colDef.field.indexOf(".")>=0&&!o,this.tooltipFieldContainsDots=s._.exists(this.colDef.tooltipField)&&this.colDef.tooltipField.indexOf(".")>=0&&!o,this.validate()},e.prototype.isEmptyGroup=function(){return!1},e.prototype.isRowGroupDisplayed=function(e){if(s._.missing(this.colDef)||s._.missing(this.colDef.showRowGroup))return!1;var t=!0===this.colDef.showRowGroup,o=this.colDef.showRowGroup===e;return t||o},e.prototype.getUniqueId=function(){return this.getId()},e.prototype.isPrimary=function(){return this.primary},e.prototype.isFilterAllowed=function(){var e=!!this.colDef.filter||!!this.colDef.filterFramework;return this.primary&&e},e.prototype.isFieldContainsDots=function(){return this.fieldContainsDots},e.prototype.isTooltipFieldContainsDots=function(){return this.tooltipFieldContainsDots},e.prototype.validate=function(){var e=this.colDef;this.gridOptionsWrapper.isEnterprise()||["enableRowGroup","rowGroup","rowGroupIndex","enablePivot","pivot","pivotIndex","aggFunc"].forEach((function(t){s._.exists(e[t])&&console.warn("ag-Grid: "+t+" is only valid in ag-Grid-Enterprise, your column definition should not have "+t)})),this.gridOptionsWrapper.isTreeData()&&["rowGroup","rowGroupIndex","pivot","pivotIndex"].forEach((function(t){s._.exists(e[t])&&console.warn("ag-Grid: "+t+" is not possible when doing tree data, your column definition should not have "+t)})),s._.exists(this.colDef.width)&&"number"!=typeof this.colDef.width&&console.warn("ag-Grid: colDef.width should be a number, not "+typeof this.colDef.width),s._.get(this,"colDef.cellRendererParams.restrictToOneGroup",null)&&console.warn("ag-Grid: Since ag-grid 11.0.0 cellRendererParams.restrictToOneGroup is deprecated. You should use showRowGroup"),s._.get(this,"colDef.cellRendererParams.keyMap",null)&&console.warn("ag-Grid: Since ag-grid 11.0.0 cellRendererParams.keyMap is deprecated. You should use colDef.keyCreator"),s._.get(this,"colDef.cellRendererParams.keyMap",null)&&console.warn("ag-Grid: Since ag-grid 11.0.0 cellRendererParams.keyMap is deprecated. You should use colDef.keyCreator"),e.floatingCellRenderer&&(console.warn("ag-Grid: since v11, floatingCellRenderer is now pinnedRowCellRenderer"),this.colDef.pinnedRowCellRenderer=e.floatingCellRenderer),e.floatingRendererFramework&&(console.warn("ag-Grid: since v11, floatingRendererFramework is now pinnedRowCellRendererFramework"),this.colDef.pinnedRowCellRendererFramework=e.floatingRendererFramework),e.floatingRendererParams&&(console.warn("ag-Grid: since v11, floatingRendererParams is now pinnedRowCellRendererParams"),this.colDef.pinnedRowCellRendererParams=e.floatingRendererParams),e.floatingValueFormatter&&(console.warn("ag-Grid: since v11, floatingValueFormatter is now pinnedRowValueFormatter"),this.colDef.pinnedRowValueFormatter=e.floatingValueFormatter),e.cellFormatter&&(console.warn("ag-Grid: since v12, cellFormatter is now valueFormatter"),s._.missing(this.colDef.valueFormatter)&&(this.colDef.valueFormatter=e.cellFormatter)),e.headerCellTemplate&&console.warn("ag-Grid: since v15, headerCellTemplate is gone, use header component instead."),e.headerCellRenderer&&console.warn("ag-Grid: since v15, headerCellRenderer is gone, use header component instead."),e.volatile&&console.warn("ag-Grid: since v16, colDef.volatile is gone, please check refresh docs on how to refresh specific cells."),e.suppressSorting&&(console.warn("ag-Grid: since v20, colDef.suppressSorting is gone, instead use colDef.sortable=false.",this.colDef),this.colDef.sortable=!1),e.suppressFilter&&(console.warn("ag-Grid: since v20, colDef.suppressFilter is gone, instead use colDef.filter=false.",this.colDef),this.colDef.filter=!1),e.suppressResize&&(console.warn("ag-Grid: since v20, colDef.suppressResize is gone, instead use colDef.resizable=false.",this.colDef),this.colDef.resizable=!1),e.tooltip&&(console.warn("ag-Grid: since v20.1, colDef.tooltip is gone, instead use colDef.tooltipValueGetter.",this.colDef),this.colDef.tooltipValueGetter=e.tooltip)},e.prototype.addEventListener=function(e,t){this.eventService.addEventListener(e,t)},e.prototype.removeEventListener=function(e,t){this.eventService.removeEventListener(e,t)},e.prototype.createIsColumnFuncParams=function(e){return{node:e,data:e.data,column:this,colDef:this.colDef,context:this.gridOptionsWrapper.getContext(),api:this.gridOptionsWrapper.getApi(),columnApi:this.gridOptionsWrapper.getColumnApi()}},e.prototype.isSuppressNavigable=function(e){if("boolean"==typeof this.colDef.suppressNavigable)return this.colDef.suppressNavigable;if("function"==typeof this.colDef.suppressNavigable){var t=this.createIsColumnFuncParams(e);return(0,this.colDef.suppressNavigable)(t)}return!1},e.prototype.isCellEditable=function(e){return!(e.group&&!this.gridOptionsWrapper.isEnableGroupEdit())&&this.isColumnFunc(e,this.colDef.editable)},e.prototype.isRowDrag=function(e){return this.isColumnFunc(e,this.colDef.rowDrag)},e.prototype.isCellCheckboxSelection=function(e){return this.isColumnFunc(e,this.colDef.checkboxSelection)},e.prototype.isSuppressPaste=function(e){return this.isColumnFunc(e,this.colDef?this.colDef.suppressPaste:null)},e.prototype.isResizable=function(){return!0===this.colDef.resizable},e.prototype.isColumnFunc=function(e,t){return"boolean"==typeof t?t:"function"==typeof t&&t(this.createIsColumnFuncParams(e))},e.prototype.setMoving=function(t,o){void 0===o&&(o="api"),this.moving=t,this.eventService.dispatchEvent(this.createColumnEvent(e.EVENT_MOVING_CHANGED,o))},e.prototype.createColumnEvent=function(e,t){return{api:this.gridApi,columnApi:this.columnApi,type:e,column:this,columns:[this],source:t}},e.prototype.isMoving=function(){return this.moving},e.prototype.getSort=function(){return this.sort},e.prototype.setSort=function(t,o){void 0===o&&(o="api"),this.sort!==t&&(this.sort=t,this.eventService.dispatchEvent(this.createColumnEvent(e.EVENT_SORT_CHANGED,o)))},e.prototype.setMenuVisible=function(t,o){void 0===o&&(o="api"),this.menuVisible!==t&&(this.menuVisible=t,this.eventService.dispatchEvent(this.createColumnEvent(e.EVENT_MENU_VISIBLE_CHANGED,o)))},e.prototype.isMenuVisible=function(){return this.menuVisible},e.prototype.isSortAscending=function(){return this.sort===e.SORT_ASC},e.prototype.isSortDescending=function(){return this.sort===e.SORT_DESC},e.prototype.isSortNone=function(){return s._.missing(this.sort)},e.prototype.isSorting=function(){return s._.exists(this.sort)},e.prototype.getSortedAt=function(){return this.sortedAt},e.prototype.setSortedAt=function(e){this.sortedAt=e},e.prototype.setAggFunc=function(e){this.aggFunc=e},e.prototype.getAggFunc=function(){return this.aggFunc},e.prototype.getLeft=function(){return this.left},e.prototype.getOldLeft=function(){return this.oldLeft},e.prototype.getRight=function(){return this.left+this.actualWidth},e.prototype.setLeft=function(t,o){void 0===o&&(o="api"),this.oldLeft=this.left,this.left!==t&&(this.left=t,this.eventService.dispatchEvent(this.createColumnEvent(e.EVENT_LEFT_CHANGED,o)))},e.prototype.isFilterActive=function(){return this.filterActive},e.prototype.setFilterActive=function(t,o){void 0===o&&(o="api"),this.filterActive!==t&&(this.filterActive=t,this.eventService.dispatchEvent(this.createColumnEvent(e.EVENT_FILTER_ACTIVE_CHANGED,o))),this.eventService.dispatchEvent(this.createColumnEvent(e.EVENT_FILTER_CHANGED,o))},e.prototype.setPinned=function(t){!0===t||t===e.PINNED_LEFT?this.pinned=e.PINNED_LEFT:t===e.PINNED_RIGHT?this.pinned=e.PINNED_RIGHT:this.pinned=null},e.prototype.setFirstRightPinned=function(t,o){void 0===o&&(o="api"),this.firstRightPinned!==t&&(this.firstRightPinned=t,this.eventService.dispatchEvent(this.createColumnEvent(e.EVENT_FIRST_RIGHT_PINNED_CHANGED,o)))},e.prototype.setLastLeftPinned=function(t,o){void 0===o&&(o="api"),this.lastLeftPinned!==t&&(this.lastLeftPinned=t,this.eventService.dispatchEvent(this.createColumnEvent(e.EVENT_LAST_LEFT_PINNED_CHANGED,o)))},e.prototype.isFirstRightPinned=function(){return this.firstRightPinned},e.prototype.isLastLeftPinned=function(){return this.lastLeftPinned},e.prototype.isPinned=function(){return this.pinned===e.PINNED_LEFT||this.pinned===e.PINNED_RIGHT},e.prototype.isPinnedLeft=function(){return this.pinned===e.PINNED_LEFT},e.prototype.isPinnedRight=function(){return this.pinned===e.PINNED_RIGHT},e.prototype.getPinned=function(){return this.pinned},e.prototype.setVisible=function(t,o){void 0===o&&(o="api");var r=!0===t;this.visible!==r&&(this.visible=r,this.eventService.dispatchEvent(this.createColumnEvent(e.EVENT_VISIBLE_CHANGED,o)))},e.prototype.isVisible=function(){return this.visible},e.prototype.getColDef=function(){return this.colDef},e.prototype.getColumnGroupShow=function(){return this.colDef.columnGroupShow},e.prototype.getColId=function(){return this.colId},e.prototype.getId=function(){return this.getColId()},e.prototype.getDefinition=function(){return this.colDef},e.prototype.getActualWidth=function(){return this.actualWidth},e.prototype.createBaseColDefParams=function(e){return{node:e,data:e.data,colDef:this.colDef,column:this,api:this.gridOptionsWrapper.getApi(),columnApi:this.gridOptionsWrapper.getColumnApi(),context:this.gridOptionsWrapper.getContext()}},e.prototype.getColSpan=function(e){if(s._.missing(this.colDef.colSpan))return 1;var t=this.createBaseColDefParams(e),o=this.colDef.colSpan(t);return Math.max(o,1)},e.prototype.getRowSpan=function(e){if(s._.missing(this.colDef.rowSpan))return 1;var t=this.createBaseColDefParams(e),o=this.colDef.rowSpan(t);return Math.max(o,1)},e.prototype.setActualWidth=function(t,o){void 0===o&&(o="api"),this.actualWidth!==t&&(this.actualWidth=t,this.eventService.dispatchEvent(this.createColumnEvent(e.EVENT_WIDTH_CHANGED,o)))},e.prototype.isGreaterThanMax=function(e){return!!this.maxWidth&&e>this.maxWidth},e.prototype.getMinWidth=function(){return this.minWidth},e.prototype.getMaxWidth=function(){return this.maxWidth},e.prototype.setMinimum=function(e){void 0===e&&(e="api"),this.setActualWidth(this.minWidth,e)},e.prototype.setRowGroupActive=function(t,o){void 0===o&&(o="api"),this.rowGroupActive!==t&&(this.rowGroupActive=t,this.eventService.dispatchEvent(this.createColumnEvent(e.EVENT_ROW_GROUP_CHANGED,o)))},e.prototype.isRowGroupActive=function(){return this.rowGroupActive},e.prototype.setPivotActive=function(t,o){void 0===o&&(o="api"),this.pivotActive!==t&&(this.pivotActive=t,this.eventService.dispatchEvent(this.createColumnEvent(e.EVENT_PIVOT_CHANGED,o)))},e.prototype.isPivotActive=function(){return this.pivotActive},e.prototype.isAnyFunctionActive=function(){return this.isPivotActive()||this.isRowGroupActive()||this.isValueActive()},e.prototype.isAnyFunctionAllowed=function(){return this.isAllowPivot()||this.isAllowRowGroup()||this.isAllowValue()},e.prototype.setValueActive=function(t,o){void 0===o&&(o="api"),this.aggregationActive!==t&&(this.aggregationActive=t,this.eventService.dispatchEvent(this.createColumnEvent(e.EVENT_VALUE_CHANGED,o)))},e.prototype.isValueActive=function(){return this.aggregationActive},e.prototype.isAllowPivot=function(){return!0===this.colDef.enablePivot},e.prototype.isAllowValue=function(){return!0===this.colDef.enableValue},e.prototype.isAllowRowGroup=function(){return!0===this.colDef.enableRowGroup},e.prototype.getMenuTabs=function(e){var t=this.getColDef().menuTabs;return null==t&&(t=e),t},e.EVENT_MOVING_CHANGED="movingChanged",e.EVENT_LEFT_CHANGED="leftChanged",e.EVENT_WIDTH_CHANGED="widthChanged",e.EVENT_LAST_LEFT_PINNED_CHANGED="lastLeftPinnedChanged",e.EVENT_FIRST_RIGHT_PINNED_CHANGED="firstRightPinnedChanged",e.EVENT_VISIBLE_CHANGED="visibleChanged",e.EVENT_FILTER_CHANGED="filterChanged",e.EVENT_FILTER_ACTIVE_CHANGED="filterActiveChanged",e.EVENT_SORT_CHANGED="sortChanged",e.EVENT_MENU_VISIBLE_CHANGED="menuVisibleChanged",e.EVENT_ROW_GROUP_CHANGED="columnRowGroupChanged",e.EVENT_PIVOT_CHANGED="columnPivotChanged",e.EVENT_VALUE_CHANGED="columnValueChanged",e.PINNED_RIGHT="right",e.PINNED_LEFT="left",e.SORT_ASC="asc",e.SORT_DESC="desc",r([a.Autowired("gridOptionsWrapper"),n("design:type",l.GridOptionsWrapper)],e.prototype,"gridOptionsWrapper",void 0),r([a.Autowired("columnUtils"),n("design:type",p.ColumnUtils)],e.prototype,"columnUtils",void 0),r([a.Autowired("frameworkFactory"),n("design:type",Object)],e.prototype,"frameworkFactory",void 0),r([a.Autowired("columnApi"),n("design:type",u.ColumnApi)],e.prototype,"columnApi",void 0),r([a.Autowired("gridApi"),n("design:type",d.GridApi)],e.prototype,"gridApi",void 0),r([a.PostConstruct,n("design:type",Function),n("design:paramtypes",[]),n("design:returntype",void 0)],e.prototype,"initialise",null),e}();t.Column=c},27887:function(e,t,o){var r=this&&this.__decorate||function(e,t,o,r){var n,i=arguments.length,s=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,o):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,o,r);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(s=(i<3?n(s):i>3?n(t,o,s):n(t,o))||s);return i>3&&s&&Object.defineProperty(t,o,s),s},n=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)};Object.defineProperty(t,"__esModule",{value:!0});var i=o(72493),s=o(37132),a=o(98239),l=o(26016),p=o(83423),u=o(58342),d=o(44081),c=function(){function e(e,t){this.needToMoveLeft=!1,this.needToMoveRight=!1,this.pinned=e,this.eContainer=t,this.centerContainer=!p._.exists(e)}return e.prototype.registerGridComp=function(e){this.gridPanel=e},e.prototype.init=function(){this.logger=this.loggerFactory.create("MoveColumnController")},e.prototype.getIconName=function(){return this.pinned?u.DragAndDropService.ICON_PINNED:u.DragAndDropService.ICON_MOVE},e.prototype.onDragEnter=function(e){var t=e.dragItem.columns;if(e.dragSource.type===u.DragSourceType.ToolPanel)this.setColumnsVisible(t,!0,"uiColumnDragged");else{var o=e.dragItem.visibleState,r=t.filter((function(e){return o[e.getId()]}));this.setColumnsVisible(r,!0,"uiColumnDragged")}this.setColumnsPinned(t,this.pinned,"uiColumnDragged"),this.onDragging(e,!0)},e.prototype.onDragLeave=function(e){if(!this.gridOptionsWrapper.isSuppressDragLeaveHidesColumns()&&!e.fromNudge){var t=e.dragSource.dragItemCallback().columns;this.setColumnsVisible(t,!1,"uiColumnDragged")}this.ensureIntervalCleared()},e.prototype.setColumnsVisible=function(e,t,o){if(void 0===o&&(o="api"),e){var r=e.filter((function(e){return!e.isLockVisible()}));this.columnController.setColumnsVisible(r,t,o)}},e.prototype.setColumnsPinned=function(e,t,o){if(void 0===o&&(o="api"),e){var r=e.filter((function(e){return!e.isLockPinned()}));this.columnController.setColumnsPinned(r,t,o)}},e.prototype.onDragStop=function(){this.ensureIntervalCleared()},e.prototype.normaliseX=function(e){return this.gridOptionsWrapper.isEnableRtl()&&(e=this.eContainer.clientWidth-e),this.centerContainer&&(e+=this.gridPanel.getCenterViewportScrollLeft()),e},e.prototype.checkCenterForScrolling=function(e){if(this.centerContainer){var t=this.gridPanel.getCenterViewportScrollLeft(),o=t+this.gridPanel.getCenterWidth();this.gridOptionsWrapper.isEnableRtl()?(this.needToMoveRight=e<t+50,this.needToMoveLeft=e>o-50):(this.needToMoveLeft=e<t+50,this.needToMoveRight=e>o-50),this.needToMoveLeft||this.needToMoveRight?this.ensureIntervalStarted():this.ensureIntervalCleared()}},e.prototype.onDragging=function(e,t){var o=this;if(void 0===t&&(t=!1),this.lastDraggingEvent=e,!p._.missing(e.hDirection)){var r=this.normaliseX(e.x);t||this.checkCenterForScrolling(r);var n=this.normaliseDirection(e.hDirection),i=e.dragSource.type,s=e.dragSource.dragItemCallback().columns;s=s.filter((function(e){return!e.isLockPinned()||e.getPinned()==o.pinned})),this.attemptMoveColumns(i,s,n,r,t)}},e.prototype.normaliseDirection=function(e){if(!this.gridOptionsWrapper.isEnableRtl())return e;switch(e){case u.HDirection.Left:return u.HDirection.Right;case u.HDirection.Right:return u.HDirection.Left;default:console.error("ag-Grid: Unknown direction "+e)}},e.prototype.calculateOldIndex=function(e){var t=this.columnController.getAllGridColumns(),o=[];e.forEach((function(e){return o.push(t.indexOf(e))})),p._.sortNumberArray(o);var r=o[0];return o[o.length-1]-r!=o.length-1?null:r},e.prototype.attemptMoveColumns=function(e,t,o,r,n){for(var i=o===u.HDirection.Left,s=o===u.HDirection.Right,a=this.calculateValidMoves(t,s,r),l=this.calculateOldIndex(t),p=0;p<a.length;p++){var d=a[p],c=null!==l&&!n;if(e==u.DragSourceType.HeaderCell&&(c=null!==l),c){if(i&&d>=l)continue;if(s&&d<=l)continue}if(this.columnController.doesMovePassRules(t,d))return void this.columnController.moveColumns(t,d,"uiColumnDragged")}},e.prototype.calculateValidMoves=function(e,t,o){var r,n=this.columnController.getDisplayedColumns(this.pinned),i=this.columnController.getAllGridColumns(),s=function(t){return e.indexOf(t)<0},a=n.filter((function(t){return e.indexOf(t)>=0})),l=n.filter(s),u=i.filter(s),d=0,c=o;if(t){var h=0;a.forEach((function(e){return h+=e.getActualWidth()})),c-=h}if(c>0){for(var f=0;f<l.length&&!((c-=l[f].getActualWidth())<0);f++)d++;t&&d++}if(d>0){var g=l[d-1];r=u.indexOf(g)+1}else r=0;for(var m=[r],y=i[r];p._.exists(y)&&this.isColumnHidden(n,y);)r++,m.push(r),y=i[r];return m},e.prototype.isColumnHidden=function(e,t){return e.indexOf(t)<0},e.prototype.ensureIntervalStarted=function(){this.movingIntervalId||(this.intervalCount=0,this.failedMoveAttempts=0,this.movingIntervalId=window.setInterval(this.moveInterval.bind(this),100),this.needToMoveLeft?this.dragAndDropService.setGhostIcon(u.DragAndDropService.ICON_LEFT,!0):this.dragAndDropService.setGhostIcon(u.DragAndDropService.ICON_RIGHT,!0))},e.prototype.ensureIntervalCleared=function(){this.moveInterval&&(window.clearInterval(this.movingIntervalId),this.movingIntervalId=null,this.dragAndDropService.setGhostIcon(u.DragAndDropService.ICON_MOVE))},e.prototype.moveInterval=function(){var e,t;if(this.intervalCount++,(e=10+5*this.intervalCount)>100&&(e=100),this.needToMoveLeft?t=this.gridPanel.scrollHorizontally(-e):this.needToMoveRight&&(t=this.gridPanel.scrollHorizontally(e)),0!==t)this.onDragging(this.lastDraggingEvent),this.failedMoveAttempts=0;else{this.failedMoveAttempts++;var o=this.lastDraggingEvent.dragItem.columns.filter((function(e){return!e.isLockPinned()}));if(o.length>0&&(this.dragAndDropService.setGhostIcon(u.DragAndDropService.ICON_PINNED),this.failedMoveAttempts>7)){var r=this.needToMoveLeft?l.Column.PINNED_LEFT:l.Column.PINNED_RIGHT;this.setColumnsPinned(o,r,"uiColumnDragged"),this.dragAndDropService.nudge()}}},r([i.Autowired("loggerFactory"),n("design:type",s.LoggerFactory)],e.prototype,"loggerFactory",void 0),r([i.Autowired("columnController"),n("design:type",a.ColumnController)],e.prototype,"columnController",void 0),r([i.Autowired("dragAndDropService"),n("design:type",u.DragAndDropService)],e.prototype,"dragAndDropService",void 0),r([i.Autowired("gridOptionsWrapper"),n("design:type",d.GridOptionsWrapper)],e.prototype,"gridOptionsWrapper",void 0),r([i.PostConstruct,n("design:type",Function),n("design:paramtypes",[]),n("design:returntype",void 0)],e.prototype,"init",null),e}();t.MoveColumnController=c},28771:(e,t,o)=>{Object.defineProperty(t,"__esModule",{value:!0});var r=o(15068),n=o(63405),i=o(83423),s=function(){function e(t,o,r,n,i,s,a,l){this.nextId=0,this.allNodesMap={},this.rootNode=t,this.gridOptionsWrapper=o,this.context=r,this.eventService=n,this.columnController=i,this.gridApi=s,this.columnApi=a,this.selectionController=l,this.rootNode.group=!0,this.rootNode.level=-1,this.rootNode.id=e.ROOT_NODE_ID,this.rootNode.allLeafChildren=[],this.rootNode.childrenAfterGroup=[],this.rootNode.childrenAfterSort=[],this.rootNode.childrenAfterFilter=[],this.postConstruct()}return e.prototype.postConstruct=function(){this.getNodeChildDetails=this.gridOptionsWrapper.getNodeChildDetailsFunc(),this.suppressParentsInRowNodes=this.gridOptionsWrapper.isSuppressParentsInRowNodes(),this.doesDataFlower=this.gridOptionsWrapper.getDoesDataFlowerFunc(),this.isRowMasterFunc=this.gridOptionsWrapper.getIsRowMasterFunc(),this.doingLegacyTreeData=i._.exists(this.getNodeChildDetails),this.doingMasterDetail=this.gridOptionsWrapper.isMasterDetail()},e.prototype.getCopyOfNodesMap=function(){return i._.cloneObject(this.allNodesMap)},e.prototype.getRowNode=function(e){return this.allNodesMap[e]},e.prototype.setRowData=function(t){if(this.rootNode.childrenAfterFilter=null,this.rootNode.childrenAfterGroup=null,this.rootNode.childrenAfterSort=null,this.rootNode.childrenMapped=null,this.nextId=0,this.allNodesMap={},!t)return this.rootNode.allLeafChildren=[],void(this.rootNode.childrenAfterGroup=[]);var o=this.recursiveFunction(t,this.rootNode,e.TOP_LEVEL);this.doingLegacyTreeData?(this.rootNode.childrenAfterGroup=o,this.setLeafChildren(this.rootNode)):this.rootNode.allLeafChildren=o},e.prototype.updateRowData=function(e,t){var o=this;if(this.isLegacyTreeData())return null;var r=e.add,s=e.addIndex,a=e.remove,l=e.update,p={remove:[],update:[],add:[]};if(i._.exists(r)&&("number"==typeof s&&s>=0?r.reverse().forEach((function(e){var t=o.addRowNode(e,s);p.add.push(t)})):r.forEach((function(e){var t=o.addRowNode(e);p.add.push(t)}))),i._.exists(a)){var u=!1;if(a.forEach((function(e){var t=o.lookupRowNode(e);t&&(t.isSelected()&&(u=!0),o.updatedRowNode(t,e,!1),p.remove.push(t))})),u){this.selectionController.updateGroupsFromChildrenSelections();var d={type:n.Events.EVENT_SELECTION_CHANGED,api:this.gridApi,columnApi:this.columnApi};this.eventService.dispatchEvent(d)}}return i._.exists(l)&&l.forEach((function(e){var t=o.lookupRowNode(e);t&&(o.updatedRowNode(t,e,!0),p.update.push(t))})),t&&i._.sortRowNodesByOrder(this.rootNode.allLeafChildren,t),p},e.prototype.addRowNode=function(t,o){var r=this.createNode(t,this.rootNode,e.TOP_LEVEL);return i._.exists(o)?i._.insertIntoArray(this.rootNode.allLeafChildren,r,o):this.rootNode.allLeafChildren.push(r),r},e.prototype.lookupRowNode=function(e){var t,o=this.gridOptionsWrapper.getRowNodeIdFunc();if(i._.exists(o)){var r=o(e);if(!(t=this.allNodesMap[r]))return console.error("ag-Grid: could not find row id="+r+", data item was not found for this id"),null}else if(!(t=i._.find(this.rootNode.allLeafChildren,(function(t){return t.data===e}))))return console.error("ag-Grid: could not find data item as object was not found",e),null;return t},e.prototype.updatedRowNode=function(e,t,o){o?e.updateData(t):(e.setSelected(!1,!1,!0),e.clearRowTop(),i._.removeFromArray(this.rootNode.allLeafChildren,e),delete this.allNodesMap[e.id])},e.prototype.recursiveFunction=function(e,t,o){var r=this;if("string"!=typeof e){var n=[];return e.forEach((function(e){var i=r.createNode(e,t,o);n.push(i)})),n}console.warn("ag-Grid: rowData must be an array, however you passed in a string. If you are loading JSON, make sure you convert the JSON string to JavaScript objects first")},e.prototype.createNode=function(e,t,o){var n=new r.RowNode;this.context.wireBean(n);var s=this.gridOptionsWrapper.isTreeData(),a=!s&&i._.exists(this.getNodeChildDetails)?this.getNodeChildDetails(e):null;if(a&&a.group)n.group=!0,n.childrenAfterGroup=this.recursiveFunction(a.children,n,o+1),n.expanded=!0===a.expanded,n.field=a.field,n.key=a.key,n.canFlower=n.master,this.setLeafChildren(n);else if(n.group=!1,s)n.master=!1,n.expanded=!1;else{this.doesDataFlower?n.master=this.doesDataFlower(e):this.doingMasterDetail?this.isRowMasterFunc?n.master=this.isRowMasterFunc(e):n.master=!0:n.master=!1;var l=this.columnController.getRowGroupColumns(),p=o+(l?l.length:0);n.expanded=!!n.master&&this.isExpanded(p)}return n.canFlower=n.master,t&&!this.suppressParentsInRowNodes&&(n.parent=t),n.level=o,n.setDataAndId(e,this.nextId.toString()),this.allNodesMap[n.id]&&console.warn("ag-grid: duplicate node id '"+n.id+"' detected from getRowNodeId callback, this could cause issues in your grid."),this.allNodesMap[n.id]=n,this.nextId++,n},e.prototype.isExpanded=function(e){var t=this.gridOptionsWrapper.getGroupDefaultExpanded();return-1===t||e<t},e.prototype.setLeafChildren=function(e){e.allLeafChildren=[],e.childrenAfterGroup&&e.childrenAfterGroup.forEach((function(t){t.group?t.allLeafChildren&&t.allLeafChildren.forEach((function(t){return e.allLeafChildren.push(t)})):e.allLeafChildren.push(t)}))},e.prototype.isLegacyTreeData=function(){return!!i._.exists(this.gridOptionsWrapper.getNodeChildDetailsFunc())&&(console.warn("ag-Grid: adding and removing rows is not supported when using nodeChildDetailsFunc, ie it is not supported for legacy tree data. Please see the docs on the new preferred way of providing tree data that works with delta updates."),!0)},e.TOP_LEVEL=0,e.ROOT_NODE_ID="ROOT_NODE_ID",e}();t.ClientSideNodeManager=s},28921:function(e,t,o){var r,n=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o])},r(e,t)},function(e,t){function o(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)}),i=this&&this.__decorate||function(e,t,o,r){var n,i=arguments.length,s=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,o):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,o,r);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(s=(i<3?n(s):i>3?n(t,o,s):n(t,o))||s);return i>3&&s&&Object.defineProperty(t,o,s),s},s=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)};Object.defineProperty(t,"__esModule",{value:!0});var a=o(44081),l=o(72493),p=o(44329),u=o(10042),d=o(83423),c=function(e){function t(t,o){var r=e.call(this,t,o)||this;return r.cacheParams=o,r}return n(t,e),t.prototype.createBlankRowNode=function(t){var o=e.prototype.createBlankRowNode.call(this,t);return o.uiLevel=0,this.setIndexAndTopOnRowNode(o,t),o},t.prototype.setDataAndId=function(e,t,o){d._.exists(t)?e.setDataAndId(t,o.toString()):e.setDataAndId(void 0,void 0)},t.prototype.setRowNode=function(t,o){e.prototype.setRowNode.call(this,t,o),this.setIndexAndTopOnRowNode(o,t)},t.prototype.init=function(){e.prototype.init.call(this,{context:this.getContext(),rowRenderer:this.rowRenderer})},t.prototype.getNodeIdPrefix=function(){return null},t.prototype.getRow=function(e){return this.getRowUsingLocalIndex(e)},t.prototype.setIndexAndTopOnRowNode=function(e,t){e.setRowIndex(t),e.rowTop=this.cacheParams.rowHeight*t},t.prototype.loadFromDatasource=function(){var e=this,t={startRow:this.getStartRow(),endRow:this.getEndRow(),successCallback:this.pageLoaded.bind(this,this.getVersion()),failCallback:this.pageLoadFailed.bind(this),sortModel:this.cacheParams.sortModel,filterModel:this.cacheParams.filterModel,context:this.gridOptionsWrapper.getContext()};d._.missing(this.cacheParams.datasource.getRows)?console.warn("ag-Grid: datasource is missing getRows method"):(d._.getFunctionParameters(this.cacheParams.datasource.getRows).length>1&&(console.warn("ag-grid: It looks like your paging datasource is of the old type, taking more than one parameter."),console.warn("ag-grid: From ag-grid 1.9.0, now the getRows takes one parameter. See the documentation for details.")),window.setTimeout((function(){e.cacheParams.datasource.getRows(t)}),0))},i([l.Autowired("gridOptionsWrapper"),s("design:type",a.GridOptionsWrapper)],t.prototype,"gridOptionsWrapper",void 0),i([l.Autowired("rowRenderer"),s("design:type",u.RowRenderer)],t.prototype,"rowRenderer",void 0),i([l.PostConstruct,s("design:type",Function),s("design:paramtypes",[]),s("design:returntype",void 0)],t.prototype,"init",null),t}(p.RowNodeBlock);t.InfiniteBlock=c},30811:function(e,t,o){var r,n=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o])},r(e,t)},function(e,t){function o(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)});Object.defineProperty(t,"__esModule",{value:!0});var i=o(22131),s=o(83423),a=function(e){function t(){var o=e.call(this,t.TEMPLATE)||this;return o.refreshCount=0,o.eCurrent=o.queryForHtmlElement(".ag-value-slide-current"),o}return n(t,e),t.prototype.init=function(e){this.params=e,this.refresh(e)},t.prototype.addSlideAnimation=function(){var e=this;this.refreshCount++;var t=this.refreshCount;this.ePrevious&&this.getGui().removeChild(this.ePrevious),this.ePrevious=s._.loadTemplate('<span class="ag-value-slide-previous ag-value-slide-out"></span>'),this.ePrevious.innerHTML=this.eCurrent.innerHTML,this.getGui().insertBefore(this.ePrevious,this.eCurrent),window.setTimeout((function(){t===e.refreshCount&&s._.addCssClass(e.ePrevious,"ag-value-slide-out-end")}),50),window.setTimeout((function(){t===e.refreshCount&&(e.getGui().removeChild(e.ePrevious),e.ePrevious=null)}),3e3)},t.prototype.refresh=function(e){var t=e.value;if(s._.missing(t)&&(t=""),t!==this.lastValue)return this.addSlideAnimation(),this.lastValue=t,s._.exists(e.valueFormatted)?this.eCurrent.innerHTML=e.valueFormatted:s._.exists(e.value)?this.eCurrent.innerHTML=t:s._.clearElement(this.eCurrent),!0},t.TEMPLATE='<span><span class="ag-value-slide-current"></span></span>',t}(i.Component);t.AnimateSlideCellRenderer=a},30844:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0});var o=function(){function e(){}return e.prototype.hasMethod=function(e){var t=this.getFrameworkComponentInstance();return null!=t&&null!=t[e]},e.prototype.callMethod=function(e,t){var o=this,r=this.getFrameworkComponentInstance();if(null!=r){var n=this.getFrameworkComponentInstance()[e];if(null==n)return;return n.apply(r,t)}window.setTimeout((function(){return o.callMethod(e,t)}),100)},e.prototype.addMethod=function(e,t){this[e]=t},e}();t.BaseReactComponent=o},30971:function(e,t,o){var r,n=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o])},r(e,t)},function(e,t){function o(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)}),i=this&&this.__decorate||function(e,t,o,r){var n,i=arguments.length,s=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,o):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,o,r);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(s=(i<3?n(s):i>3?n(t,o,s):n(t,o))||s);return i>3&&s&&Object.defineProperty(t,o,s),s},s=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)};Object.defineProperty(t,"__esModule",{value:!0});var a=o(44081),l=o(72493),p=o(60843),u=o(54828),d=o(63405),c=o(86608),h=o(55e3),f=o(45727),g=o(99162),m=o(8534),y=o(65802),v=o(84210),C=o(40797),w=o(44871),E=o(83423),_=o(10042),b=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),t.prototype.getRowBounds=function(e){return{rowHeight:this.rowHeight,rowTop:this.rowHeight*e}},t.prototype.ensureRowHeightsValid=function(e,t,o,r){return!1},t.prototype.init=function(){var e=this;this.gridOptionsWrapper.isRowModelInfinite()&&(this.rowHeight=this.gridOptionsWrapper.getRowHeightAsNumber(),this.addEventListeners(),this.setDatasource(this.gridOptionsWrapper.getDatasource()),this.addDestroyFunc((function(){return e.destroyCache()})))},t.prototype.destroyDatasource=function(){this.datasource&&(this.datasource.destroy&&this.datasource.destroy(),this.rowRenderer.datasourceChanged(),this.datasource=null)},t.prototype.isLastRowFound=function(){return!!this.infiniteCache&&this.infiniteCache.isMaxRowFound()},t.prototype.addEventListeners=function(){this.addDestroyableEventListener(this.eventService,d.Events.EVENT_FILTER_CHANGED,this.onFilterChanged.bind(this)),this.addDestroyableEventListener(this.eventService,d.Events.EVENT_SORT_CHANGED,this.onSortChanged.bind(this)),this.addDestroyableEventListener(this.eventService,d.Events.EVENT_COLUMN_EVERYTHING_CHANGED,this.onColumnEverything.bind(this))},t.prototype.onFilterChanged=function(){this.reset()},t.prototype.onSortChanged=function(){this.reset()},t.prototype.onColumnEverything=function(){(!this.cacheParams||this.isSortModelDifferent())&&this.reset()},t.prototype.isSortModelDifferent=function(){return!E._.jsonEquals(this.cacheParams.sortModel,this.sortController.getSortModel())},t.prototype.getType=function(){return f.Constants.ROW_MODEL_TYPE_INFINITE},t.prototype.setDatasource=function(e){this.destroyDatasource(),this.datasource=e,e&&(this.checkForDeprecated(),this.reset())},t.prototype.checkForDeprecated=function(){var e=this.datasource;E._.exists(e.maxConcurrentRequests)&&console.error("ag-Grid: since version 5.1.x, maxConcurrentRequests is replaced with grid property maxConcurrentDatasourceRequests"),E._.exists(e.maxPagesInCache)&&console.error("ag-Grid: since version 5.1.x, maxPagesInCache is replaced with grid property maxPagesInPaginationCache"),E._.exists(e.overflowSize)&&console.error("ag-Grid: since version 5.1.x, overflowSize is replaced with grid property paginationOverflowSize"),E._.exists(e.blockSize)&&console.error("ag-Grid: since version 5.1.x, pageSize/blockSize is replaced with grid property infinitePageSize")},t.prototype.isEmpty=function(){return E._.missing(this.infiniteCache)},t.prototype.isRowsToRender=function(){return E._.exists(this.infiniteCache)},t.prototype.getNodesInRangeForSelection=function(e,t){return this.infiniteCache?this.infiniteCache.getRowNodesInRange(e,t):[]},t.prototype.reset=function(){if(!E._.missing(this.datasource)){E._.exists(this.gridOptionsWrapper.getRowNodeIdFunc())||this.selectionController.reset(),this.resetCache();var e=this.createModelUpdatedEvent();this.eventService.dispatchEvent(e)}},t.prototype.createModelUpdatedEvent=function(){return{type:d.Events.EVENT_MODEL_UPDATED,api:this.gridApi,columnApi:this.columnApi,newPage:!1,newData:!1,keepRenderedRows:!1,animate:!1}},t.prototype.resetCache=function(){this.destroyCache();var e=this.gridOptionsWrapper.getMaxConcurrentDatasourceRequests(),t=this.gridOptionsWrapper.getBlockLoadDebounceMillis();this.rowNodeBlockLoader=new v.RowNodeBlockLoader(e,t),this.getContext().wireBean(this.rowNodeBlockLoader),this.cacheParams={datasource:this.datasource,filterModel:this.filterManager.getFilterModel(),sortModel:this.sortController.getSortModel(),rowNodeBlockLoader:this.rowNodeBlockLoader,maxConcurrentRequests:e,overflowSize:this.gridOptionsWrapper.getCacheOverflowSize(),initialRowCount:this.gridOptionsWrapper.getInfiniteInitialRowCount(),maxBlocksInCache:this.gridOptionsWrapper.getMaxBlocksInCache(),blockSize:this.gridOptionsWrapper.getCacheBlockSize(),rowHeight:this.gridOptionsWrapper.getRowHeightAsNumber(),lastAccessedSequence:new E.NumberSequence},this.cacheParams.maxConcurrentRequests&&this.cacheParams.maxConcurrentRequests>=1||(this.cacheParams.maxConcurrentRequests=2),this.cacheParams.blockSize&&this.cacheParams.blockSize>=1||(this.cacheParams.blockSize=100),this.cacheParams.initialRowCount>=1||(this.cacheParams.initialRowCount=0),this.cacheParams.overflowSize>=1||(this.cacheParams.overflowSize=1),this.infiniteCache=new g.InfiniteCache(this.cacheParams),this.getContext().wireBean(this.infiniteCache),this.infiniteCache.addEventListener(y.RowNodeCache.EVENT_CACHE_UPDATED,this.onCacheUpdated.bind(this))},t.prototype.destroyCache=function(){this.infiniteCache&&(this.infiniteCache.destroy(),this.infiniteCache=null),this.rowNodeBlockLoader&&(this.rowNodeBlockLoader.destroy(),this.rowNodeBlockLoader=null)},t.prototype.onCacheUpdated=function(){var e=this.createModelUpdatedEvent();this.eventService.dispatchEvent(e)},t.prototype.getRow=function(e){return this.infiniteCache?this.infiniteCache.getRow(e):null},t.prototype.getRowNode=function(e){var t=null;return this.forEachNode((function(o){o.id===e&&(t=o)})),t},t.prototype.forEachNode=function(e){this.infiniteCache&&this.infiniteCache.forEachNodeDeep(e,new E.NumberSequence)},t.prototype.getCurrentPageHeight=function(){return this.getRowCount()*this.rowHeight},t.prototype.getRowIndexAtPixel=function(e){if(0!==this.rowHeight){var t=Math.floor(e/this.rowHeight);return t>this.getPageLastRow()?this.getPageLastRow():t}return 0},t.prototype.getPageFirstRow=function(){return 0},t.prototype.getPageLastRow=function(){return this.infiniteCache?this.infiniteCache.getVirtualRowCount()-1:0},t.prototype.getRowCount=function(){return this.infiniteCache?this.infiniteCache.getVirtualRowCount():0},t.prototype.updateRowData=function(e){E._.exists(e.remove)||E._.exists(e.update)?console.warn("ag-Grid: updateRowData for InfiniteRowModel does not support remove or update, only add"):E._.missing(e.addIndex)?console.warn("ag-Grid: updateRowData for InfiniteRowModel requires add and addIndex to be set"):this.infiniteCache&&this.infiniteCache.insertItemsAtIndex(e.addIndex,e.add)},t.prototype.isRowPresent=function(e){return!1},t.prototype.refreshCache=function(){this.infiniteCache&&this.infiniteCache.refreshCache()},t.prototype.purgeCache=function(){this.infiniteCache&&this.infiniteCache.purgeCache()},t.prototype.getVirtualRowCount=function(){return this.infiniteCache?this.infiniteCache.getVirtualRowCount():null},t.prototype.isMaxRowFound=function(){if(this.infiniteCache)return this.infiniteCache.isMaxRowFound()},t.prototype.setVirtualRowCount=function(e,t){this.infiniteCache&&this.infiniteCache.setVirtualRowCount(e,t)},t.prototype.getBlockState=function(){return this.rowNodeBlockLoader?this.rowNodeBlockLoader.getBlockState():null},i([l.Autowired("gridOptionsWrapper"),s("design:type",a.GridOptionsWrapper)],t.prototype,"gridOptionsWrapper",void 0),i([l.Autowired("filterManager"),s("design:type",h.FilterManager)],t.prototype,"filterManager",void 0),i([l.Autowired("sortController"),s("design:type",c.SortController)],t.prototype,"sortController",void 0),i([l.Autowired("selectionController"),s("design:type",u.SelectionController)],t.prototype,"selectionController",void 0),i([l.Autowired("eventService"),s("design:type",p.EventService)],t.prototype,"eventService",void 0),i([l.Autowired("gridApi"),s("design:type",C.GridApi)],t.prototype,"gridApi",void 0),i([l.Autowired("columnApi"),s("design:type",w.ColumnApi)],t.prototype,"columnApi",void 0),i([l.Autowired("rowRenderer"),s("design:type",_.RowRenderer)],t.prototype,"rowRenderer",void 0),i([l.PostConstruct,s("design:type",Function),s("design:paramtypes",[]),s("design:returntype",void 0)],t.prototype,"init",null),i([l.PreDestroy,s("design:type",Function),s("design:paramtypes",[]),s("design:returntype",void 0)],t.prototype,"destroyDatasource",null),i([l.Bean("rowModel")],t)}(m.BeanStub);t.InfiniteRowModel=b},31887:function(e,t,o){var r=this&&this.__decorate||function(e,t,o,r){var n,i=arguments.length,s=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,o):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,o,r);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(s=(i<3?n(s):i>3?n(t,o,s):n(t,o))||s);return i>3&&s&&Object.defineProperty(t,o,s),s},n=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)};Object.defineProperty(t,"__esModule",{value:!0});var i=o(72493),s=o(814),a=o(74517),l=o(72948),p=o(72493),u=o(83423),d=function(){function e(){}return e.prototype.createDisplayedGroups=function(e,t,o,r,n){var i,s,a=this,l=[],p=this.mapOldGroupsById(n);return e.forEach((function(e){for(var n=a.getOriginalPathForColumn(t,e),u=[],d=!s,c=0;c<n.length;c++)if(d||n[c]!==s[c]){var h=a.createColumnGroup(n[c],o,p,r);u[c]=h,0==c?l.push(h):u[c-1].addChild(h)}else u[c]=i[c];0===u.length?l.push(e):u[u.length-1].addChild(e),i=u,s=n})),this.setupParentsIntoColumns(l,null),l},e.prototype.createColumnGroup=function(e,t,o,r){var n=e.getGroupId(),i=t.getInstanceIdForKey(n),s=o[a.ColumnGroup.createUniqueId(n,i)];return s&&s.getOriginalColumnGroup()!==e&&(s=null),u._.exists(s)?s.reset():(s=new a.ColumnGroup(e,n,i,r),this.context.wireBean(s)),s},e.prototype.mapOldGroupsById=function(e){var t={},o=function(e){e.forEach((function(e){if(e instanceof a.ColumnGroup){var r=e;t[e.getUniqueId()]=r,o(r.getChildren())}}))};return e&&o(e),t},e.prototype.setupParentsIntoColumns=function(e,t){var o=this;e.forEach((function(e){if(e.setParent(t),e instanceof a.ColumnGroup){var r=e;o.setupParentsIntoColumns(r.getChildren(),r)}}))},e.prototype.getOriginalPathForColumn=function(e,t){var o=[],r=!1;return function e(n,i){for(var s=0;s<n.length;s++){if(r)return;var a=n[s];a instanceof l.OriginalColumnGroup?(e(a.getChildren(),i+1),o[i]=a):a===t&&(r=!0)}}(e,0),r?o:(console.warn("could not get path"),null)},r([i.Autowired("columnUtils"),n("design:type",s.ColumnUtils)],e.prototype,"columnUtils",void 0),r([i.Autowired("context"),n("design:type",p.Context)],e.prototype,"context",void 0),r([p.Bean("displayedGroupCreator")],e)}();t.DisplayedGroupCreator=d},31923:function(e,t,o){var r,n=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o])},r(e,t)},function(e,t){function o(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)});Object.defineProperty(t,"__esModule",{value:!0});var i=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),t.prototype.isPopup=function(){return!0},t}(o(84715).SelectCellEditor);t.PopupSelectCellEditor=i},32090:function(e,t,o){var r,n=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o])},r(e,t)},function(e,t){function o(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)}),i=this&&this.__decorate||function(e,t,o,r){var n,i=arguments.length,s=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,o):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,o,r);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(s=(i<3?n(s):i>3?n(t,o,s):n(t,o))||s);return i>3&&s&&Object.defineProperty(t,o,s),s},s=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)};Object.defineProperty(t,"__esModule",{value:!0});var a=o(22131),l=o(47721),p=o(72493),u=o(73575),d=function(e){function t(){return e.call(this,t.TEMPLATE)||this}return n(t,e),t.prototype.postConstruct=function(){this.closePopup=this.popupService.addPopup(!1,this.getGui(),!1,this.destroy.bind(this)),this.addDestroyableEventListener(this.eClose,"click",this.onBtClose.bind(this))},t.prototype.setBody=function(e){this.eContentWrapper.appendChild(e)},t.prototype.setTitle=function(e){this.eTitle.innerText=e},t.prototype.onBtClose=function(){this.closePopup()},t.prototype.destroy=function(){e.prototype.destroy.call(this),this.dispatchEvent({type:t.DESTROY_EVENT})},t.TEMPLATE='<div class="ag-popup-window" style="top: 40px; left: 40px; border: 1px solid black; position: fixed; background-color: white;">\n <div class="ag-popup-window-title-bar" style="background: #00e5ff; border-bottom: 1px solid black;">\n <span ref="eClose" class="ag-popup-window-close" style="margin: 2px; border: 1px solid grey; border-radius: 2px;">X</span>\n <span ref="eTitle" class="ag-popup-window-title" style="padding: 2px;">New Chart</span>\n </div>\n <div ref="eContentWrapper" class="ag-popup-window-content-wrapper"></div>\n </div>',t.DESTROY_EVENT="destroy",i([p.Autowired("popupService"),s("design:type",u.PopupService)],t.prototype,"popupService",void 0),i([l.RefSelector("eContentWrapper"),s("design:type",HTMLElement)],t.prototype,"eContentWrapper",void 0),i([l.RefSelector("eTitle"),s("design:type",HTMLElement)],t.prototype,"eTitle",void 0),i([l.RefSelector("eClose"),s("design:type",HTMLElement)],t.prototype,"eClose",void 0),i([p.PostConstruct,s("design:type",Function),s("design:paramtypes",[]),s("design:returntype",void 0)],t.prototype,"postConstruct",null),t}(a.Component);t.PopupWindow=d},32590:function(e,t,o){var r,n=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o])},r(e,t)},function(e,t){function o(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)}),i=this&&this.__decorate||function(e,t,o,r){var n,i=arguments.length,s=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,o):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,o,r);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(s=(i<3?n(s):i>3?n(t,o,s):n(t,o))||s);return i>3&&s&&Object.defineProperty(t,o,s),s},s=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)};Object.defineProperty(t,"__esModule",{value:!0});var a=o(72493),l=o(26016),p=o(38152),u=o(69397),d=o(22131),c=o(47721),h=o(44081),f=o(55090),g=o(81604),m=o(63405),y=o(60843),v=o(93830),C=o(83423),w=o(85910),E=o(40797),_=o(44871),b=o(55e3),R=function(e){function t(o){var r=e.call(this,t.TEMPLATE)||this;return r.column=o,r}return n(t,e),t.prototype.postConstruct=function(){this.setupFloatingFilter(),this.setupWidth(),this.setupLeftPositioning(),this.setupColumnHover(),this.addFeature(this.getContext(),new g.HoverFeature([this.column],this.getGui())),this.addDestroyableEventListener(this.eButtonShowMainFilter,"click",this.showParentFilter.bind(this))},t.prototype.setupFloatingFilter=function(){var e=this;this.column.getColDef().filter?(this.floatingFilterCompPromise=this.getFloatingFilterInstance(),this.floatingFilterCompPromise?this.floatingFilterCompPromise.then((function(t){t?e.setupWithFloatingFilter(t):e.setupEmpty()})):this.setupEmpty(),this.setupSyncWithFilter()):this.setupEmpty()},t.prototype.setupLeftPositioning=function(){var e=new p.SetLeftFeature(this.column,this.getGui(),this.beans);e.init(),this.addDestroyFunc(e.destroy.bind(e))},t.prototype.setupSyncWithFilter=function(){var e=this,t=function(){var t=e.filterManager.getFilterComponent(e.column,"NO_UI");e.onParentModelChanged(t.resolveNow(null,(function(e){return e.getModel()})))};this.addDestroyableEventListener(this.column,l.Column.EVENT_FILTER_CHANGED,t),this.filterManager.cachedFilter(this.column)&&t()},t.prototype.showParentFilter=function(){this.menuFactory.showMenuAfterButtonClick(this.column,this.eButtonShowMainFilter,"filterMenuTab",["filterMenuTab"])},t.prototype.setupColumnHover=function(){this.addDestroyableEventListener(this.eventService,m.Events.EVENT_COLUMN_HOVER_CHANGED,this.onColumnHover.bind(this)),this.onColumnHover()},t.prototype.onColumnHover=function(){var e=this.columnHoverService.isHovered(this.column);C._.addOrRemoveCssClass(this.getGui(),"ag-column-hover",e)},t.prototype.setupWidth=function(){this.addDestroyableEventListener(this.column,l.Column.EVENT_WIDTH_CHANGED,this.onColumnWidthChanged.bind(this)),this.onColumnWidthChanged()},t.prototype.onColumnWidthChanged=function(){this.getGui().style.width=this.column.getActualWidth()+"px"},t.prototype.setupWithFloatingFilter=function(e){var t=function(){e.destroy&&e.destroy()};if(this.isAlive()){this.addDestroyFunc(t);var o=e.getGui();C._.addOrRemoveCssClass(this.eFloatingFilterBody,"ag-floating-filter-body",!this.suppressFilterButton),C._.addOrRemoveCssClass(this.eFloatingFilterBody,"ag-floating-filter-full-body",this.suppressFilterButton),C._.setVisible(this.eButtonWrapper,!this.suppressFilterButton);var r=C._.createIconNoSpan("filter",this.gridOptionsWrapper,this.column);this.eButtonShowMainFilter.appendChild(r),this.eFloatingFilterBody.appendChild(o),e.afterGuiAttached&&e.afterGuiAttached(),this.wireQuerySelectors()}else t()},t.prototype.getFloatingFilterInstance=function(){var e,o=this,r=this.column.getColDef();"string"==typeof r.filter?e=t.filterToFloatingFilterNames[r.filter]:!0===r.filter&&(e=this.gridOptionsWrapper.isEnterprise()?"agSetColumnFloatingFilter":"agTextColumnFloatingFilter");var n={api:this.gridApi,column:this.column,currentParentModel:this.currentParentModel.bind(this),onFloatingFilterChanged:this.onFloatingFilterChanged.bind(this),suppressFilterButton:!1};this.suppressFilterButton=!!r.floatingFilterComponentParams&&!!r.floatingFilterComponentParams.suppressFilterButton;var i=this.userComponentFactory.newFloatingFilterComponent(r,n,e);if(!i){var s=this.getFilterComponentPrototype(r);if(s&&s.prototype&&s.prototype.getModelAsString){var a=n.currentParentModel;n.currentParentModel=function(){return o.filterManager.getFilterComponent(o.column,"NO_UI").resolveNow(null,(function(e){return e.getModelAsString?e.getModelAsString(a()):null}))};var l=this.userComponentFactory.createUserComponentFromConcreteClass(u.ReadModelAsStringFloatingFilterComp,n);i=C.Promise.resolve(l)}}return i},t.prototype.createDynamicParams=function(){return{column:this.column,colDef:this.column.getColDef(),api:this.gridApi,columnApi:this.columnApi}},t.prototype.getFilterComponentPrototype=function(e){var t=this.userComponentFactory.lookupComponentClassDef(e,"filter",this.createDynamicParams());return t?t.component:null},t.prototype.setupEmpty=function(){C._.setVisible(this.eButtonWrapper,!1)},t.prototype.currentParentModel=function(){var e=this.filterManager.getFilterComponent(this.column,"NO_UI").resolveNow(null,(function(e){return e.getNullableModel?e.getNullableModel():e.getModel()}));return e&&null!=e.operator?e.condition1:e},t.prototype.onFloatingFilterChanged=function(e){var t,o=this,r=new C.Promise((function(e){t=e}));return this.filterManager.getFilterComponent(this.column,"NO_UI").then((function(r){if(r.onFloatingFilterChanged){var n=r.onFloatingFilterChanged(e);t(n)}else r.setModel(e),o.filterManager.onFilterChanged(),t(!0)})),r.resolveNow(!0,(function(e){return e}))},t.prototype.onParentModelChanged=function(e){if(this.floatingFilterCompPromise){var t,o;o=e&&e.operator?(t=e).condition1:e,this.floatingFilterCompPromise.then((function(e){e.onParentModelChanged(o,t)}))}},t.filterToFloatingFilterNames={set:"agSetColumnFloatingFilter",agSetColumnFilter:"agSetColumnFloatingFilter",number:"agNumberColumnFloatingFilter",agNumberColumnFilter:"agNumberColumnFloatingFilter",date:"agDateColumnFloatingFilter",agDateColumnFilter:"agDateColumnFloatingFilter",text:"agTextColumnFloatingFilter",agTextColumnFilter:"agTextColumnFloatingFilter"},t.TEMPLATE='<div class="ag-header-cell" aria-hidden="true">\n <div ref="eFloatingFilterBody" aria-hidden="true"></div>\n <div class="ag-floating-filter-button" ref="eButtonWrapper" aria-hidden="true">\n <button type="button" ref="eButtonShowMainFilter"></button>\n </div>\n </div>',i([a.Autowired("columnHoverService"),s("design:type",v.ColumnHoverService)],t.prototype,"columnHoverService",void 0),i([a.Autowired("eventService"),s("design:type",y.EventService)],t.prototype,"eventService",void 0),i([a.Autowired("beans"),s("design:type",f.Beans)],t.prototype,"beans",void 0),i([a.Autowired("gridOptionsWrapper"),s("design:type",h.GridOptionsWrapper)],t.prototype,"gridOptionsWrapper",void 0),i([a.Autowired("userComponentFactory"),s("design:type",w.UserComponentFactory)],t.prototype,"userComponentFactory",void 0),i([a.Autowired("gridApi"),s("design:type",E.GridApi)],t.prototype,"gridApi",void 0),i([a.Autowired("columnApi"),s("design:type",_.ColumnApi)],t.prototype,"columnApi",void 0),i([a.Autowired("filterManager"),s("design:type",b.FilterManager)],t.prototype,"filterManager",void 0),i([a.Autowired("menuFactory"),s("design:type",Object)],t.prototype,"menuFactory",void 0),i([c.RefSelector("eFloatingFilterBody"),s("design:type",HTMLElement)],t.prototype,"eFloatingFilterBody",void 0),i([c.RefSelector("eButtonWrapper"),s("design:type",HTMLElement)],t.prototype,"eButtonWrapper",void 0),i([c.RefSelector("eButtonShowMainFilter"),s("design:type",HTMLElement)],t.prototype,"eButtonShowMainFilter",void 0),i([a.PostConstruct,s("design:type",Function),s("design:paramtypes",[]),s("design:returntype",void 0)],t.prototype,"postConstruct",null),t}(d.Component);t.FloatingFilterWrapper=R},33467:function(e,t,o){var r=this&&this.__decorate||function(e,t,o,r){var n,i=arguments.length,s=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,o):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,o,r);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(s=(i<3?n(s):i>3?n(t,o,s):n(t,o))||s);return i>3&&s&&Object.defineProperty(t,o,s),s};Object.defineProperty(t,"__esModule",{value:!0});var n=o(72493),i=function(){function e(){}return e.prototype.download=function(e,t){if(window.navigator.msSaveOrOpenBlob)window.navigator.msSaveOrOpenBlob(t,e);else{var o=document.createElement("a"),r=window.URL.createObjectURL(t);o.setAttribute("href",r),o.setAttribute("download",e),o.style.display="none",document.body.appendChild(o),o.click(),window.URL.revokeObjectURL(r),document.body.removeChild(o)}},r([n.Bean("downloader")],e)}();t.Downloader=i},34255:function(e,t,o){var r,n=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o])},r(e,t)},function(e,t){function o(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)}),i=this&&this.__decorate||function(e,t,o,r){var n,i=arguments.length,s=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,o):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,o,r);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(s=(i<3?n(s):i>3?n(t,o,s):n(t,o))||s);return i>3&&s&&Object.defineProperty(t,o,s),s},s=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)};Object.defineProperty(t,"__esModule",{value:!0});var a=o(22131),l=o(47721),p=o(13650),u=o(72493),d=o(85910),c=o(83423),h=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),t.prototype.modelFromFloatingFilter=function(e){return{dateFrom:e,dateTo:this.getDateTo(),type:this.selectedFilter,filterType:"date"}},t.prototype.getApplicableFilterTypes=function(){return[p.BaseFilter.EQUALS,p.BaseFilter.GREATER_THAN,p.BaseFilter.LESS_THAN,p.BaseFilter.NOT_EQUAL,p.BaseFilter.IN_RANGE]},t.prototype.bodyTemplate=function(e){return'<div class="ag-filter-body">\n <div class="ag-filter-date-from" id="'+(e==p.FilterConditionType.MAIN?"filterDateFromPanel":"filterDateFromConditionPanel")+'">\n </div>\n <div class="ag-filter-date-to" id="'+(e==p.FilterConditionType.MAIN?"filterDateToPanel":"filterDateToConditionPanel")+'">\n </div>\n </div>'},t.prototype.initialiseFilterBodyUi=function(t){e.prototype.initialiseFilterBodyUi.call(this,t),this.createComponents(t),t===p.FilterConditionType.MAIN?(this.setDateFrom_date(this.dateFrom,p.FilterConditionType.MAIN),this.setDateTo_date(this.dateTo,p.FilterConditionType.MAIN),this.setFilterType(this.selectedFilter,p.FilterConditionType.MAIN)):(this.setDateFrom_date(this.dateFromCondition,p.FilterConditionType.CONDITION),this.setDateTo_date(this.dateToCondition,p.FilterConditionType.CONDITION),this.setFilterType(this.selectedFilterCondition,p.FilterConditionType.CONDITION))},t.prototype.createComponents=function(e){var t=this,o={onDateChanged:function(){t.onDateChanged(e)},filterParams:this.filterParams};this.userComponentFactory.newDateComponent(o).then((function(o){e===p.FilterConditionType.MAIN?t.dateToComponent=o:t.dateToConditionComponent=o;var r=o.getGui();e===p.FilterConditionType.MAIN?(t.eDateToPanel.appendChild(r),t.dateToComponent.afterGuiAttached&&t.dateToComponent.afterGuiAttached()):(t.eDateToConditionPanel.appendChild(r),t.dateToConditionComponent.afterGuiAttached&&t.dateToConditionComponent.afterGuiAttached())})),this.userComponentFactory.newDateComponent(o).then((function(o){e===p.FilterConditionType.MAIN?t.dateFromComponent=o:t.dateFromConditionComponent=o;var r=o.getGui();e===p.FilterConditionType.MAIN?(t.eDateFromPanel.appendChild(r),t.dateFromComponent.afterGuiAttached&&t.dateFromComponent.afterGuiAttached()):(t.eDateFromConditionPanel.appendChild(r),t.dateFromConditionComponent.afterGuiAttached&&t.dateFromConditionComponent.afterGuiAttached())}))},t.prototype.onDateChanged=function(e){e===p.FilterConditionType.MAIN?(this.dateFrom=t.removeTimezone(this.dateFromComponent.getDate()),this.dateTo=t.removeTimezone(this.dateToComponent.getDate())):(this.dateFromCondition=t.removeTimezone(this.dateFromComponent.getDate()),this.dateToCondition=t.removeTimezone(this.dateToComponent.getDate())),this.onFilterChanged()},t.prototype.refreshFilterBodyUi=function(e){var t,o;if(e===p.FilterConditionType.MAIN?(t=this.eDateToPanel,o=this.selectedFilter):(t=this.eDateToConditionPanel,o=this.selectedFilterCondition),t){var r=o===p.BaseFilter.IN_RANGE;c._.setVisible(t,r)}var n=e===p.FilterConditionType.MAIN?this.eDateFromPanel:this.eDateFromConditionPanel;if(n){var i=!this.doesFilterHaveHiddenInput(o)&&o!==p.BaseFilter.EMPTY;c._.setVisible(n,i)}},t.prototype.comparator=function(){return this.filterParams.comparator?this.filterParams.comparator:this.defaultComparator.bind(this)},t.prototype.defaultComparator=function(e,t){return t<e?-1:t>e?1:null!=t?0:-1},t.prototype.serialize=function(e){var t=e===p.FilterConditionType.MAIN?this.dateToComponent:this.dateToConditionComponent,o=e===p.FilterConditionType.MAIN?this.dateFromComponent:this.dateFromConditionComponent,r=e===p.FilterConditionType.MAIN?this.selectedFilter:this.selectedFilterCondition;return{dateTo:c._.serializeDateToYyyyMmDd(t.getDate(),"-"),dateFrom:c._.serializeDateToYyyyMmDd(o.getDate(),"-"),type:r||this.defaultFilter,filterType:"date"}},t.prototype.filterValues=function(e){return e===p.FilterConditionType.MAIN?this.dateFromComponent?this.selectedFilter!==p.BaseFilter.IN_RANGE?this.dateFromComponent.getDate():[this.dateFromComponent.getDate(),this.dateToComponent.getDate()]:null:this.dateFromConditionComponent?this.selectedFilterCondition!==p.BaseFilter.IN_RANGE?this.dateFromConditionComponent.getDate():[this.dateFromConditionComponent.getDate(),this.dateToConditionComponent.getDate()]:null},t.prototype.getDateFrom=function(){return c._.serializeDateToYyyyMmDd(this.dateFromComponent.getDate(),"-")},t.prototype.getDateTo=function(){return c._.serializeDateToYyyyMmDd(this.dateToComponent.getDate(),"-")},t.prototype.getFilterType=function(){return this.selectedFilter},t.prototype.setDateFrom=function(e,t){var o=c._.parseYyyyMmDdToDate(e,"-");this.setDateFrom_date(o,t)},t.prototype.setDateFrom_date=function(e,t){if(t===p.FilterConditionType.MAIN){if(this.dateFrom=e,!this.dateFromComponent)return;this.dateFromComponent.setDate(this.dateFrom)}else{if(this.dateFromCondition=e,!this.dateFromConditionComponent)return;this.dateFromConditionComponent.setDate(this.dateFromCondition)}},t.prototype.setDateTo=function(e,t){var o=c._.parseYyyyMmDdToDate(e,"-");this.setDateTo_date(o,t)},t.prototype.setDateTo_date=function(e,t){if(t===p.FilterConditionType.MAIN){if(this.dateTo=e,!this.dateToComponent)return;this.dateToComponent.setDate(this.dateTo)}else{if(this.dateToCondition=e,!this.dateToConditionComponent)return;this.dateToConditionComponent.setDate(this.dateToCondition)}},t.prototype.resetState=function(e){void 0===e&&(e=!1),e||(this.setDateFrom(null,p.FilterConditionType.MAIN),this.setDateTo(null,p.FilterConditionType.MAIN),this.setFilterType(this.defaultFilter,p.FilterConditionType.MAIN)),this.setFilterType(this.defaultFilter,p.FilterConditionType.CONDITION),this.setDateFrom(null,p.FilterConditionType.CONDITION),this.setDateTo(null,p.FilterConditionType.CONDITION)},t.prototype.parse=function(e,t){this.setDateFrom(e.dateFrom,t),this.setDateTo(e.dateTo,t),this.setFilterType(e.type,t)},t.prototype.setType=function(e,t){this.setFilterType(e,t)},t.removeTimezone=function(e){return e?new Date(e.getFullYear(),e.getMonth(),e.getDate()):null},i([u.Autowired("userComponentFactory"),s("design:type",d.UserComponentFactory)],t.prototype,"userComponentFactory",void 0),i([l.QuerySelector("#filterDateFromPanel"),s("design:type",HTMLElement)],t.prototype,"eDateFromPanel",void 0),i([l.QuerySelector("#filterDateFromConditionPanel"),s("design:type",HTMLElement)],t.prototype,"eDateFromConditionPanel",void 0),i([l.QuerySelector("#filterDateToPanel"),s("design:type",HTMLElement)],t.prototype,"eDateToPanel",void 0),i([l.QuerySelector("#filterDateToConditionPanel"),s("design:type",HTMLElement)],t.prototype,"eDateToConditionPanel",void 0),t}(p.ScalarBaseFilter);t.DateFilter=h;var f=function(e){function t(){return e.call(this,'<div class="ag-input-text-wrapper"><input class="ag-filter-filter" type="text" placeholder="yyyy-mm-dd"></div>')||this}return n(t,e),t.prototype.init=function(e){this.eDateInput=this.getGui().querySelector("input"),(c._.isBrowserChrome()||e.filterParams.browserDatePicker)&&(c._.isBrowserIE()?console.warn("ag-grid: browserDatePicker is specified to true, but it is not supported in IE 11, reverting to plain text date picker"):this.eDateInput.type="date"),this.listener=e.onDateChanged,this.addGuiEventListener("input",this.listener)},t.prototype.getDate=function(){return c._.parseYyyyMmDdToDate(this.eDateInput.value,"-")},t.prototype.setDate=function(e){this.eDateInput.value=c._.serializeDateToYyyyMmDd(e,"-")},t}(a.Component);t.DefaultDateComponent=f},34470:function(e,t,o){var r=this&&this.__decorate||function(e,t,o,r){var n,i=arguments.length,s=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,o):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,o,r);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(s=(i<3?n(s):i>3?n(t,o,s):n(t,o))||s);return i>3&&s&&Object.defineProperty(t,o,s),s},n=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)};Object.defineProperty(t,"__esModule",{value:!0});var i=o(72493),s=o(44081),a=o(60843),l=o(40634),p=o(30811),u=o(15959),d=o(79886),c=o(83423),h=function(){function e(){this.cellRendererMap={}}var t;return t=e,e.prototype.init=function(){this.cellRendererMap[t.ANIMATE_SLIDE]=p.AnimateSlideCellRenderer,this.cellRendererMap[t.ANIMATE_SHOW_CHANGE]=u.AnimateShowChangeCellRenderer,this.cellRendererMap[t.GROUP]=d.GroupCellRenderer},e.prototype.addCellRenderer=function(e,t){this.cellRendererMap[e]=t},e.prototype.getCellRenderer=function(e){var t=this.cellRendererMap[e];return c._.missing(t)?(console.warn("ag-Grid: unable to find cellRenderer for key "+e),null):t},e.ANIMATE_SLIDE="animateSlide",e.ANIMATE_SHOW_CHANGE="animateShowChange",e.GROUP="group",r([i.Autowired("gridOptionsWrapper"),n("design:type",s.GridOptionsWrapper)],e.prototype,"gridOptionsWrapper",void 0),r([i.Autowired("expressionService"),n("design:type",l.ExpressionService)],e.prototype,"expressionService",void 0),r([i.Autowired("eventService"),n("design:type",a.EventService)],e.prototype,"eventService",void 0),r([i.PostConstruct,n("design:type",Function),n("design:paramtypes",[]),n("design:returntype",void 0)],e.prototype,"init",null),t=r([i.Bean("cellRendererFactory")],e)}();t.CellRendererFactory=h},34506:(e,t,o)=>{Object.defineProperty(t,"__esModule",{value:!0});var r=o(83423),n=function(){function e(){}return e.addHeaderClassesFromColDef=function(e,t,o,n,i){r._.missing(e)||this.addColumnClassesFromCollDef(e.headerClass,e,t,o,n,i)},e.addToolPanelClassesFromColDef=function(e,t,o,n,i){r._.missing(e)||this.addColumnClassesFromCollDef(e.toolPanelClass,e,t,o,n,i)},e.addColumnClassesFromCollDef=function(e,t,o,n,i,s){var a;r._.missing(e)||("string"==typeof(a="function"==typeof e?e({colDef:t,column:i,columnGroup:s,context:n.getContext(),api:n.getApi()}):e)?r._.addCssClass(o,a):Array.isArray(a)&&a.forEach((function(e){r._.addCssClass(o,e)})))},e}();t.CssClassApplier=n},34782:(e,t,o)=>{Object.defineProperty(t,"__esModule",{value:!0});var r=o(3976),n=o(83423),i=function(){function e(e){this.rowIndex=e.rowIndex,this.column=e.column,this.floating=n._.makeNull(e.floating)}return e.prototype.getGridCellDef=function(){return{rowIndex:this.rowIndex,column:this.column,floating:this.floating}},e.prototype.getGridRow=function(){return new r.GridRow(this.rowIndex,this.floating)},e.prototype.toString=function(){return"rowIndex = "+this.rowIndex+", floating = "+this.floating+", column = "+(this.column?this.column.getId():null)},e.prototype.createId=function(){return this.rowIndex+"."+this.floating+"."+this.column.getId()},e.prototype.equals=function(e){var t=this.column===e.column,o=this.floating===e.floating,r=this.rowIndex===e.rowIndex;return t&&o&&r},e}();t.GridCell=i},36777:function(e,t,o){var r=this&&this.__decorate||function(e,t,o,r){var n,i=arguments.length,s=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,o):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,o,r);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(s=(i<3?n(s):i>3?n(t,o,s):n(t,o))||s);return i>3&&s&&Object.defineProperty(t,o,s),s},n=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)};Object.defineProperty(t,"__esModule",{value:!0});var i,s=o(71616),a=o(72493),l=o(34255),p=o(25358),u=o(95574),d=o(69397),c=o(79886),h=o(15959),f=o(30811),g=o(99093),m=o(84715),y=o(5448),v=o(31923),C=o(49281),w=o(99104),E=o(92378),_=o(24144),b=o(50298),R=o(75167),S=o(83423);!function(e){e[e.DEFAULT=0]="DEFAULT",e[e.REGISTERED=1]="REGISTERED"}(i=t.RegisteredComponentSource||(t.RegisteredComponentSource={}));var O=function(){function e(){this.agGridDefaults={agDateInput:l.DefaultDateComponent,agColumnHeader:p.HeaderComp,agColumnGroupHeader:u.HeaderGroupComp,agSetColumnFloatingFilter:d.SetFloatingFilterComp,agTextColumnFloatingFilter:d.TextFloatingFilterComp,agNumberColumnFloatingFilter:d.NumberFloatingFilterComp,agDateColumnFloatingFilter:d.DateFloatingFilterComp,agAnimateShowChangeCellRenderer:h.AnimateShowChangeCellRenderer,agAnimateSlideCellRenderer:f.AnimateSlideCellRenderer,agGroupCellRenderer:c.GroupCellRenderer,agGroupRowRenderer:c.GroupCellRenderer,agLoadingCellRenderer:g.LoadingCellRenderer,agCellEditor:s.TextCellEditor,agTextCellEditor:s.TextCellEditor,agSelectCellEditor:m.SelectCellEditor,agPopupTextCellEditor:y.PopupTextCellEditor,agPopupSelectCellEditor:v.PopupSelectCellEditor,agLargeTextCellEditor:C.LargeTextCellEditor,agTextColumnFilter:w.TextFilter,agNumberColumnFilter:E.NumberFilter,agDateColumnFilter:l.DateFilter,agLoadingOverlay:_.LoadingOverlayComponent,agNoRowsOverlay:b.NoRowsOverlayComponent,agTooltipComponent:R.TooltipComponent},this.agDeprecatedNames={set:{newComponentName:"agSetColumnFilter",propertyHolder:"filter"},text:{newComponentName:"agTextColumnFilter",propertyHolder:"filter"},number:{newComponentName:"agNumberColumnFilter",propertyHolder:"filter"},date:{newComponentName:"agDateColumnFilter",propertyHolder:"filter"},group:{newComponentName:"agGroupCellRenderer",propertyHolder:"cellRenderer"},animateShowChange:{newComponentName:"agAnimateShowChangeCellRenderer",propertyHolder:"cellRenderer"},animateSlide:{newComponentName:"agAnimateSlideCellRenderer",propertyHolder:"cellRenderer"},select:{newComponentName:"agSelectCellEditor",propertyHolder:"cellEditor"},largeText:{newComponentName:"agLargeTextCellEditor",propertyHolder:"cellEditor"},popupSelect:{newComponentName:"agPopupSelectCellEditor",propertyHolder:"cellEditor"},popupText:{newComponentName:"agPopupTextCellEditor",propertyHolder:"cellEditor"},richSelect:{newComponentName:"agRichSelectCellEditor",propertyHolder:"cellEditor"},headerComponent:{newComponentName:"agColumnHeader",propertyHolder:"headerComponent"}},this.jsComponents={},this.frameworkComponents={}}return e.prototype.init=function(){var e=this,t=this.context.getEnterpriseDefaultComponents();t&&S._.forEach(t,(function(t){e.registerDefaultComponent(t.componentName,t.theClass)})),null!=this.gridOptions.components&&Object.keys(this.gridOptions.components).forEach((function(t){e.registerComponent(t,e.gridOptions.components[t])})),null!=this.gridOptions.frameworkComponents&&Object.keys(this.gridOptions.frameworkComponents).forEach((function(t){e.registerFwComponent(t,e.gridOptions.frameworkComponents[t])}))},e.prototype.registerDefaultComponent=function(e,t){var o=this.translateIfDeprecated(e);this.agGridDefaults[o]?console.error("Trying to overwrite a default component. You should call registerComponent"):this.agGridDefaults[o]=t},e.prototype.registerComponent=function(e,t){var o=this.translateIfDeprecated(e);this.frameworkComponents[o]?console.error("Trying to register a component that you have already registered for frameworks: "+o):this.jsComponents[o]=t},e.prototype.registerFwComponent=function(e,t){var o=this.translateIfDeprecated(e);this.jsComponents[o]?console.error("Trying to register a component that you have already registered for plain javascript: "+o):this.frameworkComponents[o]=t},e.prototype.retrieve=function(e){var t=this.translateIfDeprecated(e);return this.frameworkComponents[t]?{componentFromFramework:!0,component:this.frameworkComponents[t],source:i.REGISTERED}:this.jsComponents[t]?{componentFromFramework:!1,component:this.jsComponents[t],source:i.REGISTERED}:this.agGridDefaults[t]?this.agGridDefaults[t]?{componentFromFramework:!1,component:this.agGridDefaults[t],source:i.DEFAULT}:null:(Object.keys(this.agGridDefaults).indexOf(t)<0&&console.warn("ag-grid: Looking for component ["+t+"] but it wasn't found."),null)},e.prototype.translateIfDeprecated=function(e){var t=this.agDeprecatedNames[e];return null!=t?(S._.doOnce((function(){console.warn("ag-grid. Since v15.0 component names have been renamed to be namespaced. You should rename "+t.propertyHolder+":"+e+" to "+t.propertyHolder+":"+t.newComponentName)}),"DEPRECATE_COMPONENT_"+e),t.newComponentName):e},r([a.Autowired("gridOptions"),n("design:type",Object)],e.prototype,"gridOptions",void 0),r([a.Autowired("context"),n("design:type",a.Context)],e.prototype,"context",void 0),r([a.PostConstruct,n("design:type",Function),n("design:paramtypes",[]),n("design:returntype",void 0)],e.prototype,"init",null),r([a.Bean("userComponentRegistry")],e)}();t.UserComponentRegistry=O},36819:function(e,t,o){var r=this&&this.__decorate||function(e,t,o,r){var n,i=arguments.length,s=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,o):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,o,r);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(s=(i<3?n(s):i>3?n(t,o,s):n(t,o))||s);return i>3&&s&&Object.defineProperty(t,o,s),s},n=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)};Object.defineProperty(t,"__esModule",{value:!0});var i=o(58342),s=o(72493),a=o(42195),l=o(44081),p=o(60843),u=o(85222),d=o(45727),c=function(){function e(e,t){this.eContainer=e,this.gridPanel=t}return e.prototype.postConstruct=function(){this.gridOptionsWrapper.isRowModelDefault()&&(this.clientSideRowModel=this.rowModel)},e.prototype.getContainer=function(){return this.eContainer},e.prototype.isInterestedIn=function(e){return e===i.DragSourceType.RowDrag},e.prototype.getIconName=function(){return i.DragAndDropService.ICON_MOVE},e.prototype.onDragEnter=function(e){this.dispatchEvent(u.Events.EVENT_ROW_DRAG_ENTER,e),this.dragAndDropService.setGhostIcon(i.DragAndDropService.ICON_MOVE),e.dragItem.rowNode.setDragging(!0),this.onEnterOrDragging(e)},e.prototype.onDragging=function(e){this.onEnterOrDragging(e)},e.prototype.onEnterOrDragging=function(e){this.dispatchEvent(u.Events.EVENT_ROW_DRAG_MOVE,e),this.lastDraggingEvent=e;var t=this.normaliseForScroll(e.y);this.gridOptionsWrapper.isRowDragManaged()&&this.doManagedDrag(e,t),this.checkCenterForScrolling(t)},e.prototype.doManagedDrag=function(e,t){var o=e.dragItem.rowNode;this.clientSideRowModel.ensureRowAtPixel(o,t)&&(this.focusedCellController.clearFocusedCell(),this.rangeController&&this.rangeController.clearSelection())},e.prototype.normaliseForScroll=function(e){return this.gridOptionsWrapper.getDomLayout()===d.Constants.DOM_LAYOUT_NORMAL?e+this.gridPanel.getVScrollPosition().top:e},e.prototype.checkCenterForScrolling=function(e){var t=this.gridPanel.getVScrollPosition();this.needToMoveUp=e<t.top+50,this.needToMoveDown=e>t.bottom-50,this.needToMoveUp||this.needToMoveDown?this.ensureIntervalStarted():this.ensureIntervalCleared()},e.prototype.ensureIntervalStarted=function(){this.movingIntervalId||(this.intervalCount=0,this.movingIntervalId=window.setInterval(this.moveInterval.bind(this),100))},e.prototype.ensureIntervalCleared=function(){this.moveInterval&&(window.clearInterval(this.movingIntervalId),this.movingIntervalId=null)},e.prototype.moveInterval=function(){var e,t;this.intervalCount++,(e=10+5*this.intervalCount)>100&&(e=100),this.needToMoveDown?t=this.gridPanel.scrollVertically(e):this.needToMoveUp&&(t=this.gridPanel.scrollVertically(-e)),0!==t&&this.onDragging(this.lastDraggingEvent)},e.prototype.dispatchEvent=function(e,t){var o,r=this.normaliseForScroll(t.y),n=-1,s=null;switch(r>this.rowModel.getCurrentPageHeight()||(n=this.rowModel.getRowIndexAtPixel(r),s=this.rowModel.getRow(n)),t.vDirection){case i.VDirection.Down:o="down";break;case i.VDirection.Up:o="up";break;default:o=null}var a={type:e,api:this.gridOptionsWrapper.getApi(),columnApi:this.gridOptionsWrapper.getColumnApi(),event:t.event,node:t.dragItem.rowNode,overIndex:n,overNode:s,y:r,vDirection:o};this.eventService.dispatchEvent(a)},e.prototype.onDragLeave=function(e){this.dispatchEvent(u.Events.EVENT_ROW_DRAG_LEAVE,e),this.stopDragging(e)},e.prototype.onDragStop=function(e){this.dispatchEvent(u.Events.EVENT_ROW_DRAG_END,e),this.stopDragging(e)},e.prototype.stopDragging=function(e){this.ensureIntervalCleared(),e.dragItem.rowNode.setDragging(!1)},r([s.Autowired("dragAndDropService"),n("design:type",i.DragAndDropService)],e.prototype,"dragAndDropService",void 0),r([s.Autowired("rowModel"),n("design:type",Object)],e.prototype,"rowModel",void 0),r([s.Autowired("focusedCellController"),n("design:type",a.FocusedCellController)],e.prototype,"focusedCellController",void 0),r([s.Autowired("gridOptionsWrapper"),n("design:type",l.GridOptionsWrapper)],e.prototype,"gridOptionsWrapper",void 0),r([s.Optional("rangeController"),n("design:type",Object)],e.prototype,"rangeController",void 0),r([s.Autowired("eventService"),n("design:type",p.EventService)],e.prototype,"eventService",void 0),r([s.PostConstruct,n("design:type",Function),n("design:paramtypes",[]),n("design:returntype",void 0)],e.prototype,"postConstruct",null),e}();t.RowDragFeature=c},37132:function(e,t,o){var r=this&&this.__decorate||function(e,t,o,r){var n,i=arguments.length,s=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,o):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,o,r);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(s=(i<3?n(s):i>3?n(t,o,s):n(t,o))||s);return i>3&&s&&Object.defineProperty(t,o,s),s},n=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},i=this&&this.__param||function(e,t){return function(o,r){t(o,r,e)}};Object.defineProperty(t,"__esModule",{value:!0});var s=o(44081),a=o(72493),l=o(72493),p=function(){function e(){}return e.prototype.setBeans=function(e){this.logging=e.isDebug()},e.prototype.create=function(e){return new u(e,this.isLogging.bind(this))},e.prototype.isLogging=function(){return this.logging},r([i(0,l.Qualifier("gridOptionsWrapper")),n("design:type",Function),n("design:paramtypes",[s.GridOptionsWrapper]),n("design:returntype",void 0)],e.prototype,"setBeans",null),r([a.Bean("loggerFactory")],e)}();t.LoggerFactory=p;var u=function(){function e(e,t){this.name=e,this.isLoggingFunc=t}return e.prototype.isLogging=function(){return this.isLoggingFunc()},e.prototype.log=function(e){this.isLoggingFunc()&&console.log("ag-Grid."+this.name+": "+e)},e}();t.Logger=u},37789:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0});var o=function(){function e(){}return e.STRING_PROPERTIES=["sortingOrder","rowClass","rowSelection","overlayLoadingTemplate","overlayNoRowsTemplate","quickFilterText","rowModelType","editType","domLayout","clipboardDeliminator","rowGroupPanelShow","multiSortKey","pivotColumnGroupTotals","pivotRowTotals","pivotPanelShow"],e.OBJECT_PROPERTIES=["components","frameworkComponents","rowStyle","context","autoGroupColumnDef","groupColumnDef","localeText","icons","datasource","serverSideDatasource","viewportDatasource","groupRowRendererParams","aggFuncs","fullWidthCellRendererParams","defaultColGroupDef","defaultColDef","defaultExportParams","columnTypes","rowClassRules","detailGridOptions","detailCellRendererParams","loadingCellRendererParams","loadingOverlayComponentParams","noRowsOverlayComponentParams","popupParent","colResizeDefault","reduxStore","statusBar","sideBar"],e.ARRAY_PROPERTIES=["slaveGrids","alignedGrids","rowData","columnDefs","excelStyles","pinnedTopRowData","pinnedBottomRowData"],e.NUMBER_PROPERTIES=["rowHeight","detailRowHeight","rowBuffer","colWidth","headerHeight","groupHeaderHeight","floatingFiltersHeight","pivotHeaderHeight","pivotGroupHeaderHeight","groupDefaultExpanded","minColWidth","maxColWidth","viewportRowModelPageSize","viewportRowModelBufferSize","autoSizePadding","maxBlocksInCache","maxConcurrentDatasourceRequests","cacheOverflowSize","paginationPageSize","cacheBlockSize","infiniteInitialRowCount","scrollbarWidth","paginationStartPage","infiniteBlockSize","batchUpdateWaitMillis","blockLoadDebounceMillis"],e.BOOLEAN_PROPERTIES=["toolPanelSuppressRowGroups","toolPanelSuppressValues","toolPanelSuppressPivots","toolPanelSuppressPivotMode","toolPanelSuppressSideButtons","toolPanelSuppressColumnFilter","toolPanelSuppressColumnSelectAll","toolPanelSuppressColumnExpandAll","suppressMakeColumnVisibleAfterUnGroup","suppressRowClickSelection","suppressCellSelection","suppressHorizontalScroll","debug","enableBrowserTooltips","enableColResize","enableCellExpressions","enableSorting","enableServerSideSorting","enableFilter","enableServerSideFilter","angularCompileRows","angularCompileFilters","angularCompileHeaders","groupSuppressAutoColumn","groupSelectsChildren","groupIncludeFooter","groupIncludeTotalFooter","groupUseEntireRow","groupSuppressRow","groupSuppressBlankHeader","forPrint","suppressMenuHide","rowDeselection","unSortIcon","suppressMultiSort","singleClickEdit","suppressLoadingOverlay","suppressNoRowsOverlay","suppressAutoSize","suppressParentsInRowNodes","showToolPanel","suppressColumnMoveAnimation","suppressMovableColumns","suppressFieldDotNotation","enableRangeSelection","deltaSort","suppressTouch","suppressAsyncEvents","allowContextMenuWithControlKey","suppressContextMenu","suppressMenuFilterPanel","suppressMenuMainPanel","suppressMenuColumnPanel","rememberGroupStateWhenNewData","enableCellChangeFlash","suppressDragLeaveHidesColumns","suppressMiddleClickScrolls","suppressPreventDefaultOnMouseWheel","suppressUseColIdForGroups","suppressCopyRowsToClipboard","copyHeadersToClipboard","pivotMode","suppressAggFuncInHeader","suppressColumnVirtualisation","suppressAggAtRootLevel","suppressFocusAfterRefresh","functionsPassive","functionsReadOnly","animateRows","groupSelectsFiltered","groupRemoveSingleChildren","groupRemoveLowestSingleChildren","enableRtl","suppressClickEdit","rowDragManaged","suppressRowDrag","enableGroupEdit","embedFullWidthRows","deprecatedEmbedFullWidthRows","suppressTabbing","suppressPaginationPanel","floatingFilter","groupHideOpenParents","groupMultiAutoColumn","pagination","stopEditingWhenGridLosesFocus","paginationAutoPageSize","suppressScrollOnNewData","purgeClosedRowNodes","cacheQuickFilter","deltaRowDataMode","ensureDomOrder","accentedSort","pivotTotals","suppressChangeDetection","valueCache","valueCacheNeverExpires","aggregateOnlyChangedColumns","suppressAnimationFrame","suppressExcelExport","suppressCsvExport","treeData","masterDetail","suppressMultiRangeSelection","enterMovesDownAfterEdit","enterMovesDown","suppressPropertyNamesCheck","rowMultiSelectWithClick","contractColumnSelection","suppressEnterpriseResetOnNewColumns","enableOldSetFilterModel","suppressRowHoverHighlight","gridAutoHeight","suppressRowTransform","suppressClipboardPaste","serverSideSortingAlwaysResets","reactNext","suppressSetColumnStateEvents","enableCharts","deltaColumnMode","suppressMaintainUnsortedOrder","enableCellTextSelection","suppressBrowserResizeObserver","suppressMaxRenderedRowRestriction","excludeChildrenWhenTreeDataFiltering"],e.FUNCTION_PROPERTIES=["localeTextFunc","groupRowInnerRenderer","groupRowInnerRendererFramework","dateComponent","dateComponentFramework","groupRowRenderer","groupRowRendererFramework","isExternalFilterPresent","getRowHeight","doesExternalFilterPass","getRowClass","getRowStyle","getRowClassRules","traverseNode","getContextMenuItems","getMainMenuItems","processRowPostCreate","processCellForClipboard","getNodeChildDetails","groupRowAggNodes","getRowNodeId","isFullWidthCell","fullWidthCellRenderer","fullWidthCellRendererFramework","doesDataFlower","processSecondaryColDef","processSecondaryColGroupDef","getBusinessKeyForNode","sendToClipboard","navigateToNextCell","tabToNextCell","getDetailRowData","processCellFromClipboard","getDocument","postProcessPopup","getChildCount","getDataPath","loadingCellRenderer","loadingCellRendererFramework","loadingOverlayComponent","loadingOverlayComponentFramework","noRowsOverlayComponent","noRowsOverlayComponentFramework","detailCellRenderer","detailCellRendererFramework","onGridReady","defaultGroupSortComparator","isRowMaster","isRowSelectable","postSort","processHeaderForClipboard","paginationNumberFormatter","processDataFromClipboard","getServerSideGroupKey","isServerSideGroup","suppressKeyboardEvent"],e.ALL_PROPERTIES=e.ARRAY_PROPERTIES.concat(e.OBJECT_PROPERTIES).concat(e.STRING_PROPERTIES).concat(e.NUMBER_PROPERTIES).concat(e.FUNCTION_PROPERTIES).concat(e.BOOLEAN_PROPERTIES),e.FRAMEWORK_PROPERTIES=["__ob__","__metadata__","mappedColumnProperties","hasChildColumns","toColDef","createColDefFromGridColumn"],e}();t.PropertyKeys=o},38152:function(e,t,o){var r,n=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o])},r(e,t)},function(e,t){function o(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)});Object.defineProperty(t,"__esModule",{value:!0});var i=o(26016),s=o(8534),a=o(45727),l=o(83423),p=function(e){function t(t,o,r,n){var i=e.call(this)||this;return i.columnOrGroup=t,i.eCell=o,i.colsSpanning=n,i.beans=r,i.printLayout=r.gridOptionsWrapper.getDomLayout()===a.Constants.DOM_LAYOUT_PRINT,i}return n(t,e),t.prototype.setColsSpanning=function(e){this.colsSpanning=e,this.onLeftChanged()},t.prototype.getColumnOrGroup=function(){return this.beans.gridOptionsWrapper.isEnableRtl()&&this.colsSpanning?this.colsSpanning[this.colsSpanning.length-1]:this.columnOrGroup},t.prototype.init=function(){this.addDestroyableEventListener(this.columnOrGroup,i.Column.EVENT_LEFT_CHANGED,this.onLeftChanged.bind(this)),this.setLeftFirstTime()},t.prototype.setLeftFirstTime=function(){var e=this.beans.gridOptionsWrapper.isSuppressColumnMoveAnimation(),t=l._.exists(this.columnOrGroup.getOldLeft());this.beans.columnAnimationService.isActive()&&t&&!e?this.animateInLeft():this.onLeftChanged()},t.prototype.animateInLeft=function(){var e=this,t=this.getColumnOrGroup().getLeft(),o=this.getColumnOrGroup().getOldLeft();this.setLeft(o),this.actualLeft=t,this.beans.columnAnimationService.executeNextVMTurn((function(){e.actualLeft===t&&e.setLeft(t)}))},t.prototype.onLeftChanged=function(){var e=this.getColumnOrGroup(),t=e.getLeft();this.actualLeft=this.modifyLeftForPrintLayout(e,t),this.setLeft(this.actualLeft)},t.prototype.modifyLeftForPrintLayout=function(e,t){return this.printLayout?e.getPinned()===i.Column.PINNED_LEFT?t:e.getPinned()===i.Column.PINNED_RIGHT?this.beans.columnController.getPinnedLeftContainerWidth()+this.beans.columnController.getBodyContainerWidth()+t:this.beans.columnController.getPinnedLeftContainerWidth()+t:t},t.prototype.setLeft=function(e){l._.exists(e)&&(this.eCell.style.left=e+"px")},t}(s.BeanStub);t.SetLeftFeature=p},38427:function(e,t,o){var r=this&&this.__decorate||function(e,t,o,r){var n,i=arguments.length,s=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,o):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,o,r);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(s=(i<3?n(s):i>3?n(t,o,s):n(t,o))||s);return i>3&&s&&Object.defineProperty(t,o,s),s},n=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)};Object.defineProperty(t,"__esModule",{value:!0});var i=o(72493),s=o(45727),a=o(98239),l=o(3976),p=o(34782),u=o(44081),d=o(50580),c=o(83423),h=function(){function e(){}return e.prototype.getNextCellToFocus=function(e,t){for(var o=t,r=!1;!r;){switch(e){case s.Constants.KEY_UP:o=this.getCellAbove(o);break;case s.Constants.KEY_DOWN:o=this.getCellBelow(o);break;case s.Constants.KEY_RIGHT:o=this.gridOptionsWrapper.isEnableRtl()?this.getCellToLeft(o):this.getCellToRight(o);break;case s.Constants.KEY_LEFT:o=this.gridOptionsWrapper.isEnableRtl()?this.getCellToRight(o):this.getCellToLeft(o);break;default:o=null,console.warn("ag-Grid: unknown key for navigation "+e)}r=!o||this.isCellGoodToFocusOn(o)}return o},e.prototype.isCellGoodToFocusOn=function(e){var t,o=e.column;switch(e.floating){case s.Constants.PINNED_TOP:t=this.pinnedRowModel.getPinnedTopRow(e.rowIndex);break;case s.Constants.PINNED_BOTTOM:t=this.pinnedRowModel.getPinnedBottomRow(e.rowIndex);break;default:t=this.rowModel.getRow(e.rowIndex)}return!o.isSuppressNavigable(t)},e.prototype.getCellToLeft=function(e){if(!e)return null;var t=this.columnController.getDisplayedColBefore(e.column);if(t){var o={rowIndex:e.rowIndex,column:t,floating:e.floating};return new p.GridCell(o)}return null},e.prototype.getCellToRight=function(e){if(!e)return null;var t=this.columnController.getDisplayedColAfter(e.column);if(t){var o={rowIndex:e.rowIndex,column:t,floating:e.floating};return new p.GridCell(o)}return null},e.prototype.getRowBelow=function(e){return this.isLastRowInContainer(e)?e.isFloatingBottom()?null:e.isNotFloating()?this.pinnedRowModel.isRowsToRender(s.Constants.PINNED_BOTTOM)?new l.GridRow(0,s.Constants.PINNED_BOTTOM):null:this.rowModel.isRowsToRender()?new l.GridRow(0,null):this.pinnedRowModel.isRowsToRender(s.Constants.PINNED_BOTTOM)?new l.GridRow(0,s.Constants.PINNED_BOTTOM):null:new l.GridRow(e.rowIndex+1,e.floating)},e.prototype.getCellBelow=function(e){if(!e)return null;var t=this.getRowBelow(e.getGridRow());if(t){var o={rowIndex:t.rowIndex,column:e.column,floating:t.floating};return new p.GridCell(o)}return null},e.prototype.isLastRowInContainer=function(e){return e.isFloatingTop()?this.pinnedRowModel.getPinnedTopRowData().length-1<=e.rowIndex:e.isFloatingBottom()?this.pinnedRowModel.getPinnedBottomRowData().length-1<=e.rowIndex:this.rowModel.getPageLastRow()<=e.rowIndex},e.prototype.getRowAbove=function(e){return 0===e.rowIndex?e.isFloatingTop()?null:e.isNotFloating()?this.pinnedRowModel.isRowsToRender(s.Constants.PINNED_TOP)?this.getLastFloatingTopRow():null:this.rowModel.isRowsToRender()?this.getLastBodyCell():this.pinnedRowModel.isRowsToRender(s.Constants.PINNED_TOP)?this.getLastFloatingTopRow():null:new l.GridRow(e.rowIndex-1,e.floating)},e.prototype.getCellAbove=function(e){if(!e)return null;var t=this.getRowAbove(e.getGridRow());if(t){var o={rowIndex:t.rowIndex,column:e.column,floating:t.floating};return new p.GridCell(o)}return null},e.prototype.getLastBodyCell=function(){var e=this.rowModel.getPageLastRow();return new l.GridRow(e,null)},e.prototype.getLastFloatingTopRow=function(){var e=this.pinnedRowModel.getPinnedTopRowData().length-1;return new l.GridRow(e,s.Constants.PINNED_TOP)},e.prototype.getNextTabbedCell=function(e,t){return t?this.getNextTabbedCellBackwards(e):this.getNextTabbedCellForwards(e)},e.prototype.getNextTabbedCellForwards=function(e){var t=this.columnController.getAllDisplayedColumns(),o=e.rowIndex,r=e.floating,n=this.columnController.getDisplayedColAfter(e.column);if(!n){n=t[0];var i=this.getRowBelow(e.getGridRow());if(c._.missing(i))return null;o=i?i.rowIndex:null,r=i?i.floating:null}var s={rowIndex:o,column:n,floating:r};return new p.GridCell(s)},e.prototype.getNextTabbedCellBackwards=function(e){var t=this.columnController.getAllDisplayedColumns(),o=e.rowIndex,r=e.floating,n=this.columnController.getDisplayedColBefore(e.column);if(!n){n=t[t.length-1];var i=this.getRowAbove(e.getGridRow());if(c._.missing(i))return null;o=i?i.rowIndex:null,r=i?i.floating:null}var s={rowIndex:o,column:n,floating:r};return new p.GridCell(s)},r([i.Autowired("columnController"),n("design:type",a.ColumnController)],e.prototype,"columnController",void 0),r([i.Autowired("rowModel"),n("design:type",Object)],e.prototype,"rowModel",void 0),r([i.Autowired("pinnedRowModel"),n("design:type",d.PinnedRowModel)],e.prototype,"pinnedRowModel",void 0),r([i.Autowired("gridOptionsWrapper"),n("design:type",u.GridOptionsWrapper)],e.prototype,"gridOptionsWrapper",void 0),r([i.Bean("cellNavigationService")],e)}();t.CellNavigationService=h},38848:(e,t,o)=>{o.d(t,{GU:()=>ee,ID:()=>$,WL:()=>v,ae:()=>ne,cV:()=>re,jN:()=>Z,m2:()=>l,sl:()=>oe,xI:()=>Q});var r=o(12240),n=o(67299),i=o(21935),s=o(84340),a=o(65994).process;function l(...e){return e.reduce(((e,t)=>({...e,...null!=t?t:{}})),{})}function p(e){return Object.fromEntries([...e.headers])}var{btoa:u,atob:d}=globalThis,c=Symbol.for("vercel.ai.error.AI_DownloadError");function h(e){return(e instanceof Error||e instanceof DOMException)&&("AbortError"===e.name||"ResponseAborted"===e.name||"TimeoutError"===e.name)}r.bD,(({prefix:e,size:t=16,alphabet:o="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz",separator:n="-"}={})=>{if(null==e)return()=>{const e=o.length,r=new Array(t);for(let n=0;n<t;n++)r[n]=o[Math.random()*e|0];return r.join("")};if(o.includes(n))throw new r.Di({argument:"separator",message:`The separator "${n}" must not be part of the alphabet "${o}".`})})();var f=["fetch failed","failed to fetch"],g=["ConnectionRefused","ConnectionClosed","FailedToOpenSocket","ECONNRESET","ECONNREFUSED","ETIMEDOUT","EPIPE"];function m(e=globalThis){var t,o,r;return e.window?"runtime/browser":(null==(t=e.navigator)?void 0:t.userAgent)?`runtime/${e.navigator.userAgent.toLowerCase()}`:(null==(r=null==(o=e.process)?void 0:o.versions)?void 0:r.node)?`runtime/node.js/${e.process.version.substring(0)}`:e.EdgeRuntime?"runtime/vercel-edge":"runtime/unknown"}function y(e,...t){const o=new Headers(function(e){if(null==e)return{};const t={};if(e instanceof Headers)e.forEach(((e,o)=>{t[o.toLowerCase()]=e}));else{Array.isArray(e)||(e=Object.entries(e));for(const[o,r]of e)null!=r&&(t[o.toLowerCase()]=r)}return t}(e)),r=o.get("user-agent")||"";return o.set("user-agent",[r,...t].filter(Boolean).join(" ")),Object.fromEntries(o.entries())}function v({apiKey:e,environmentVariableName:t,apiKeyParameterName:o="apiKey",description:n}){if("string"==typeof e)return e;if(null!=e)throw new r.Kq({message:`${n} API key must be a string.`});if(void 0===a)throw new r.Kq({message:`${n} API key is missing. Pass it using the '${o}' parameter. Environment variables is not supported in this environment.`});if(null==(e=a.env[t]))throw new r.Kq({message:`${n} API key is missing. Pass it using the '${o}' parameter or the ${t} environment variable.`});if("string"!=typeof e)throw new r.Kq({message:`${n} API key must be a string. The value of the ${t} environment variable is not a string.`});return e}var C=/"__proto__"\s*:/,w=/"constructor"\s*:/;function E(e){const t=JSON.parse(e);return null===t||"object"!=typeof t||!1===C.test(e)&&!1===w.test(e)?t:function(e){let t=[e];for(;t.length;){const e=t;t=[];for(const o of e){if(Object.prototype.hasOwnProperty.call(o,"__proto__"))throw new SyntaxError("Object contains forbidden prototype property");if(Object.prototype.hasOwnProperty.call(o,"constructor")&&Object.prototype.hasOwnProperty.call(o.constructor,"prototype"))throw new SyntaxError("Object contains forbidden prototype property");for(const e in o){const r=o[e];r&&"object"==typeof r&&t.push(r)}}}return e}(t)}function _(e){const{stackTraceLimit:t}=Error;try{Error.stackTraceLimit=0}catch(t){return E(e)}try{return E(e)}finally{Error.stackTraceLimit=t}}function b(e){if("object"===e.type||Array.isArray(e.type)&&e.type.includes("object")){e.additionalProperties=!1;const{properties:t}=e;if(null!=t)for(const e of Object.keys(t))t[e]=R(t[e])}null!=e.items&&(e.items=Array.isArray(e.items)?e.items.map(R):R(e.items)),null!=e.anyOf&&(e.anyOf=e.anyOf.map(R)),null!=e.allOf&&(e.allOf=e.allOf.map(R)),null!=e.oneOf&&(e.oneOf=e.oneOf.map(R));const{definitions:t}=e;if(null!=t)for(const e of Object.keys(t))t[e]=R(t[e]);return e}function R(e){return"boolean"==typeof e?e:b(e)}var S=Symbol("Let zodToJsonSchema decide on which parser to use"),O={name:void 0,$refStrategy:"root",basePath:["#"],effectStrategy:"input",pipeStrategy:"all",dateStrategy:"format:date-time",mapStrategy:"entries",removeAdditionalStrategy:"passthrough",allowedAdditionalProperties:!0,rejectedAdditionalProperties:!1,definitionPath:"definitions",strictUnions:!1,definitions:{},errorMessages:!1,patternStrategy:"escape",applyRegexFlags:!1,emailStrategy:"format:email",base64Strategy:"contentEncoding:base64",nameStrategy:"ref"};function T(e,t){return B(e.type._def,t)}function P(e,t,o){const r=null!=o?o:t.dateStrategy;if(Array.isArray(r))return{anyOf:r.map(((o,r)=>P(e,t,o)))};switch(r){case"string":case"format:date-time":return{type:"string",format:"date-time"};case"format:date":return{type:"string",format:"date"};case"integer":return A(e)}}var A=e=>{const t={type:"integer",format:"unix-time"};for(const o of e.checks)switch(o.kind){case"min":t.minimum=o.value;break;case"max":t.maximum=o.value}return t},I=void 0,D={cuid:/^[cC][^\s-]{8,}$/,cuid2:/^[0-9a-z]+$/,ulid:/^[0-9A-HJKMNP-TV-Z]{26}$/,email:/^(?!\.)(?!.*\.\.)([a-zA-Z0-9_'+\-\.]*)[a-zA-Z0-9_+-]@([a-zA-Z0-9][a-zA-Z0-9\-]*\.)+[a-zA-Z]{2,}$/,emoji:()=>(void 0===I&&(I=RegExp("^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$","u")),I),uuid:/^[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}$/,ipv4:/^(?:(?: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])$/,ipv4Cidr:/^(?:(?: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])$/,ipv6:/^(([a-f0-9]{1,4}:){7}|::([a-f0-9]{1,4}:){0,6}|([a-f0-9]{1,4}:){1}:([a-f0-9]{1,4}:){0,5}|([a-f0-9]{1,4}:){2}:([a-f0-9]{1,4}:){0,4}|([a-f0-9]{1,4}:){3}:([a-f0-9]{1,4}:){0,3}|([a-f0-9]{1,4}:){4}:([a-f0-9]{1,4}:){0,2}|([a-f0-9]{1,4}:){5}:([a-f0-9]{1,4}:){0,1})([a-f0-9]{1,4}|(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2})))$/,ipv6Cidr:/^(([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])$/,base64:/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,base64url:/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,nanoid:/^[a-zA-Z0-9_-]{21}$/,jwt:/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/};function N(e,t){const o={type:"string"};if(e.checks)for(const r of e.checks)switch(r.kind){case"min":o.minLength="number"==typeof o.minLength?Math.max(o.minLength,r.value):r.value;break;case"max":o.maxLength="number"==typeof o.maxLength?Math.min(o.maxLength,r.value):r.value;break;case"email":switch(t.emailStrategy){case"format:email":M(o,"email",r.message,t);break;case"format:idn-email":M(o,"idn-email",r.message,t);break;case"pattern:zod":k(o,D.email,r.message,t)}break;case"url":M(o,"uri",r.message,t);break;case"uuid":M(o,"uuid",r.message,t);break;case"regex":k(o,r.regex,r.message,t);break;case"cuid":k(o,D.cuid,r.message,t);break;case"cuid2":k(o,D.cuid2,r.message,t);break;case"startsWith":k(o,RegExp(`^${x(r.value,t)}`),r.message,t);break;case"endsWith":k(o,RegExp(`${x(r.value,t)}$`),r.message,t);break;case"datetime":M(o,"date-time",r.message,t);break;case"date":M(o,"date",r.message,t);break;case"time":M(o,"time",r.message,t);break;case"duration":M(o,"duration",r.message,t);break;case"length":o.minLength="number"==typeof o.minLength?Math.max(o.minLength,r.value):r.value,o.maxLength="number"==typeof o.maxLength?Math.min(o.maxLength,r.value):r.value;break;case"includes":k(o,RegExp(x(r.value,t)),r.message,t);break;case"ip":"v6"!==r.version&&M(o,"ipv4",r.message,t),"v4"!==r.version&&M(o,"ipv6",r.message,t);break;case"base64url":k(o,D.base64url,r.message,t);break;case"jwt":k(o,D.jwt,r.message,t);break;case"cidr":"v6"!==r.version&&k(o,D.ipv4Cidr,r.message,t),"v4"!==r.version&&k(o,D.ipv6Cidr,r.message,t);break;case"emoji":k(o,D.emoji(),r.message,t);break;case"ulid":k(o,D.ulid,r.message,t);break;case"base64":switch(t.base64Strategy){case"format:binary":M(o,"binary",r.message,t);break;case"contentEncoding:base64":o.contentEncoding="base64";break;case"pattern:zod":k(o,D.base64,r.message,t)}break;case"nanoid":k(o,D.nanoid,r.message,t)}return o}function x(e,t){return"escape"===t.patternStrategy?function(e){let t="";for(let o=0;o<e.length;o++)F.has(e[o])||(t+="\\"),t+=e[o];return t}(e):e}var F=new Set("ABCDEFGHIJKLMNOPQRSTUVXYZabcdefghijklmnopqrstuvxyz0123456789");function M(e,t,o,r){var n;e.format||(null==(n=e.anyOf)?void 0:n.some((e=>e.format)))?(e.anyOf||(e.anyOf=[]),e.format&&(e.anyOf.push({format:e.format}),delete e.format),e.anyOf.push({format:t,...o&&r.errorMessages&&{errorMessage:{format:o}}})):e.format=t}function k(e,t,o,r){var n;e.pattern||(null==(n=e.allOf)?void 0:n.some((e=>e.pattern)))?(e.allOf||(e.allOf=[]),e.pattern&&(e.allOf.push({pattern:e.pattern}),delete e.pattern),e.allOf.push({pattern:L(t,r),...o&&r.errorMessages&&{errorMessage:{pattern:o}}})):e.pattern=L(t,r)}function L(e,t){var o;if(!t.applyRegexFlags||!e.flags)return e.source;const r=e.flags.includes("i"),n=e.flags.includes("m"),i=e.flags.includes("s"),s=r?e.source.toLowerCase():e.source;let a="",l=!1,p=!1,u=!1;for(let e=0;e<s.length;e++)if(l)a+=s[e],l=!1;else{if(r)if(p){if(s[e].match(/[a-z]/)){u?(a+=s[e],a+=`${s[e-2]}-${s[e]}`.toUpperCase(),u=!1):"-"===s[e+1]&&(null==(o=s[e+2])?void 0:o.match(/[a-z]/))?(a+=s[e],u=!0):a+=`${s[e]}${s[e].toUpperCase()}`;continue}}else if(s[e].match(/[a-z]/)){a+=`[${s[e]}${s[e].toUpperCase()}]`;continue}if(n){if("^"===s[e]){a+="(^|(?<=[\r\n]))";continue}if("$"===s[e]){a+="($|(?=[\r\n]))";continue}}i&&"."===s[e]?a+=p?`${s[e]}\r\n`:`[${s[e]}\r\n]`:(a+=s[e],"\\"===s[e]?l=!0:p&&"]"===s[e]?p=!1:p||"["!==s[e]||(p=!0))}try{new RegExp(a)}catch(o){return console.warn(`Could not convert regex pattern at ${t.currentPath.join("/")} to a flag-independent form! Falling back to the flag-ignorant source`),e.source}return a}function G(e,t){var o,r,n,i,a,l;const p={type:"object",additionalProperties:null!=(o=B(e.valueType._def,{...t,currentPath:[...t.currentPath,"additionalProperties"]}))?o:t.allowedAdditionalProperties};if((null==(r=e.keyType)?void 0:r._def.typeName)===s.kY.ZodString&&(null==(n=e.keyType._def.checks)?void 0:n.length)){const{type:o,...r}=N(e.keyType._def,t);return{...p,propertyNames:r}}if((null==(i=e.keyType)?void 0:i._def.typeName)===s.kY.ZodEnum)return{...p,propertyNames:{enum:e.keyType._def.values}};if((null==(a=e.keyType)?void 0:a._def.typeName)===s.kY.ZodBranded&&e.keyType._def.type._def.typeName===s.kY.ZodString&&(null==(l=e.keyType._def.type._def.checks)?void 0:l.length)){const{type:o,...r}=T(e.keyType._def,t);return{...p,propertyNames:r}}return p}var j={ZodString:"string",ZodNumber:"number",ZodBigInt:"integer",ZodBoolean:"boolean",ZodNull:"null"};function W(e){try{return e.isOptional()}catch(e){return!0}}var V=(e,t,o)=>{switch(t){case s.kY.ZodString:return N(e,o);case s.kY.ZodNumber:return function(e){const t={type:"number"};if(!e.checks)return t;for(const o of e.checks)switch(o.kind){case"int":t.type="integer";break;case"min":o.inclusive?t.minimum=o.value:t.exclusiveMinimum=o.value;break;case"max":o.inclusive?t.maximum=o.value:t.exclusiveMaximum=o.value;break;case"multipleOf":t.multipleOf=o.value}return t}(e);case s.kY.ZodObject:return function(e,t){const o={type:"object",properties:{}},r=[],n=e.shape();for(const e in n){let i=n[e];if(void 0===i||void 0===i._def)continue;const s=W(i),a=B(i._def,{...t,currentPath:[...t.currentPath,"properties",e],propertyPath:[...t.currentPath,"properties",e]});void 0!==a&&(o.properties[e]=a,s||r.push(e))}r.length&&(o.required=r);const i=function(e,t){if("ZodNever"!==e.catchall._def.typeName)return B(e.catchall._def,{...t,currentPath:[...t.currentPath,"additionalProperties"]});switch(e.unknownKeys){case"passthrough":return t.allowedAdditionalProperties;case"strict":return t.rejectedAdditionalProperties;case"strip":return"strict"===t.removeAdditionalStrategy?t.allowedAdditionalProperties:t.rejectedAdditionalProperties}}(e,t);return void 0!==i&&(o.additionalProperties=i),o}(e,o);case s.kY.ZodBigInt:return function(e){const t={type:"integer",format:"int64"};if(!e.checks)return t;for(const o of e.checks)switch(o.kind){case"min":o.inclusive?t.minimum=o.value:t.exclusiveMinimum=o.value;break;case"max":o.inclusive?t.maximum=o.value:t.exclusiveMaximum=o.value;break;case"multipleOf":t.multipleOf=o.value}return t}(e);case s.kY.ZodBoolean:return{type:"boolean"};case s.kY.ZodDate:return P(e,o);case s.kY.ZodUndefined:return{not:{}};case s.kY.ZodNull:return{type:"null"};case s.kY.ZodArray:return function(e,t){var o,r,n;const i={type:"array"};return(null==(o=e.type)?void 0:o._def)&&(null==(n=null==(r=e.type)?void 0:r._def)?void 0:n.typeName)!==s.kY.ZodAny&&(i.items=B(e.type._def,{...t,currentPath:[...t.currentPath,"items"]})),e.minLength&&(i.minItems=e.minLength.value),e.maxLength&&(i.maxItems=e.maxLength.value),e.exactLength&&(i.minItems=e.exactLength.value,i.maxItems=e.exactLength.value),i}(e,o);case s.kY.ZodUnion:case s.kY.ZodDiscriminatedUnion:return function(e,t){const o=e.options instanceof Map?Array.from(e.options.values()):e.options;if(o.every((e=>e._def.typeName in j&&(!e._def.checks||!e._def.checks.length)))){const e=o.reduce(((e,t)=>{const o=j[t._def.typeName];return o&&!e.includes(o)?[...e,o]:e}),[]);return{type:e.length>1?e:e[0]}}if(o.every((e=>"ZodLiteral"===e._def.typeName&&!e.description))){const e=o.reduce(((e,t)=>{const o=typeof t._def.value;switch(o){case"string":case"number":case"boolean":return[...e,o];case"bigint":return[...e,"integer"];case"object":if(null===t._def.value)return[...e,"null"];default:return e}}),[]);if(e.length===o.length){const t=e.filter(((e,t,o)=>o.indexOf(e)===t));return{type:t.length>1?t:t[0],enum:o.reduce(((e,t)=>e.includes(t._def.value)?e:[...e,t._def.value]),[])}}}else if(o.every((e=>"ZodEnum"===e._def.typeName)))return{type:"string",enum:o.reduce(((e,t)=>[...e,...t._def.values.filter((t=>!e.includes(t)))]),[])};return((e,t)=>{const o=(e.options instanceof Map?Array.from(e.options.values()):e.options).map(((e,o)=>B(e._def,{...t,currentPath:[...t.currentPath,"anyOf",`${o}`]}))).filter((e=>!!e&&(!t.strictUnions||"object"==typeof e&&Object.keys(e).length>0)));return o.length?{anyOf:o}:void 0})(e,t)}(e,o);case s.kY.ZodIntersection:return function(e,t){const o=[B(e.left._def,{...t,currentPath:[...t.currentPath,"allOf","0"]}),B(e.right._def,{...t,currentPath:[...t.currentPath,"allOf","1"]})].filter((e=>!!e)),r=[];return o.forEach((e=>{if("type"in(t=e)&&"string"===t.type||!("allOf"in t)){let t=e;if("additionalProperties"in e&&!1===e.additionalProperties){const{additionalProperties:o,...r}=e;t=r}r.push(t)}else r.push(...e.allOf);var t})),r.length?{allOf:r}:void 0}(e,o);case s.kY.ZodTuple:return function(e,t){return e.rest?{type:"array",minItems:e.items.length,items:e.items.map(((e,o)=>B(e._def,{...t,currentPath:[...t.currentPath,"items",`${o}`]}))).reduce(((e,t)=>void 0===t?e:[...e,t]),[]),additionalItems:B(e.rest._def,{...t,currentPath:[...t.currentPath,"additionalItems"]})}:{type:"array",minItems:e.items.length,maxItems:e.items.length,items:e.items.map(((e,o)=>B(e._def,{...t,currentPath:[...t.currentPath,"items",`${o}`]}))).reduce(((e,t)=>void 0===t?e:[...e,t]),[])}}(e,o);case s.kY.ZodRecord:return G(e,o);case s.kY.ZodLiteral:return function(e){const t=typeof e.value;return"bigint"!==t&&"number"!==t&&"boolean"!==t&&"string"!==t?{type:Array.isArray(e.value)?"array":"object"}:{type:"bigint"===t?"integer":t,const:e.value}}(e);case s.kY.ZodEnum:return function(e){return{type:"string",enum:Array.from(e.values)}}(e);case s.kY.ZodNativeEnum:return function(e){const t=e.values,o=Object.keys(e.values).filter((e=>"number"!=typeof t[t[e]])).map((e=>t[e])),r=Array.from(new Set(o.map((e=>typeof e))));return{type:1===r.length?"string"===r[0]?"string":"number":["string","number"],enum:o}}(e);case s.kY.ZodNullable:return function(e,t){if(["ZodString","ZodNumber","ZodBigInt","ZodBoolean","ZodNull"].includes(e.innerType._def.typeName)&&(!e.innerType._def.checks||!e.innerType._def.checks.length))return{type:[j[e.innerType._def.typeName],"null"]};const o=B(e.innerType._def,{...t,currentPath:[...t.currentPath,"anyOf","0"]});return o&&{anyOf:[o,{type:"null"}]}}(e,o);case s.kY.ZodOptional:return((e,t)=>{var o;if(t.currentPath.toString()===(null==(o=t.propertyPath)?void 0:o.toString()))return B(e.innerType._def,t);const r=B(e.innerType._def,{...t,currentPath:[...t.currentPath,"anyOf","1"]});return r?{anyOf:[{not:{}},r]}:{}})(e,o);case s.kY.ZodMap:return function(e,t){return"record"===t.mapStrategy?G(e,t):{type:"array",maxItems:125,items:{type:"array",items:[B(e.keyType._def,{...t,currentPath:[...t.currentPath,"items","items","0"]})||{},B(e.valueType._def,{...t,currentPath:[...t.currentPath,"items","items","1"]})||{}],minItems:2,maxItems:2}}}(e,o);case s.kY.ZodSet:return function(e,t){const o={type:"array",uniqueItems:!0,items:B(e.valueType._def,{...t,currentPath:[...t.currentPath,"items"]})};return e.minSize&&(o.minItems=e.minSize.value),e.maxSize&&(o.maxItems=e.maxSize.value),o}(e,o);case s.kY.ZodLazy:return()=>e.getter()._def;case s.kY.ZodPromise:return function(e,t){return B(e.type._def,t)}(e,o);case s.kY.ZodNaN:case s.kY.ZodNever:return{not:{}};case s.kY.ZodEffects:return function(e,t){return"input"===t.effectStrategy?B(e.schema._def,t):{}}(e,o);case s.kY.ZodAny:case s.kY.ZodUnknown:return{};case s.kY.ZodDefault:return function(e,t){return{...B(e.innerType._def,t),default:e.defaultValue()}}(e,o);case s.kY.ZodBranded:return T(e,o);case s.kY.ZodReadonly:case s.kY.ZodCatch:return((e,t)=>B(e.innerType._def,t))(e,o);case s.kY.ZodPipeline:return((e,t)=>{if("input"===t.pipeStrategy)return B(e.in._def,t);if("output"===t.pipeStrategy)return B(e.out._def,t);const o=B(e.in._def,{...t,currentPath:[...t.currentPath,"allOf","0"]});return{allOf:[o,B(e.out._def,{...t,currentPath:[...t.currentPath,"allOf",o?"1":"0"]})].filter((e=>void 0!==e))}})(e,o);case s.kY.ZodFunction:case s.kY.ZodVoid:case s.kY.ZodSymbol:default:return}},H=(e,t)=>{let o=0;for(;o<e.length&&o<t.length&&e[o]===t[o];o++);return[(e.length-o).toString(),...t.slice(o)].join("/")};function B(e,t,o=!1){var r;const n=t.seen.get(e);if(t.override){const i=null==(r=t.override)?void 0:r.call(t,e,t,n,o);if(i!==S)return i}if(n&&!o){const e=z(n,t);if(void 0!==e)return e}const i={def:e,path:t.currentPath,jsonSchema:void 0};t.seen.set(e,i);const s=V(e,e.typeName,t),a="function"==typeof s?B(s(),t):s;if(a&&U(e,t,a),t.postProcess){const o=t.postProcess(a,e,t);return i.jsonSchema=a,o}return i.jsonSchema=a,a}var z=(e,t)=>{switch(t.$refStrategy){case"root":return{$ref:e.path.join("/")};case"relative":return{$ref:H(t.currentPath,e.path)};case"none":case"seen":return e.path.length<t.currentPath.length&&e.path.every(((e,o)=>t.currentPath[o]===e))?(console.warn(`Recursive reference detected at ${t.currentPath.join("/")}! Defaulting to any`),{}):"seen"===t.$refStrategy?{}:void 0}},U=(e,t,o)=>(e.description&&(o.description=e.description),o),Y=(e,t)=>{var o;const r=(e=>{const t=(e=>"string"==typeof e?{...O,name:e}:{...O,...e})(e),o=void 0!==t.name?[...t.basePath,t.definitionPath,t.name]:t.basePath;return{...t,currentPath:o,propertyPath:void 0,seen:new Map(Object.entries(t.definitions).map((([e,o])=>[o._def,{def:o._def,path:[...t.basePath,t.definitionPath,e],jsonSchema:void 0}])))}})(t);let n="object"==typeof t&&t.definitions?Object.entries(t.definitions).reduce(((e,[t,o])=>{var n;return{...e,[t]:null!=(n=B(o._def,{...r,currentPath:[...r.basePath,r.definitionPath,t]},!0))?n:{}}}),{}):void 0;const i="string"==typeof t?t:"title"===(null==t?void 0:t.nameStrategy)||null==t?void 0:t.name,s=null!=(o=B(e._def,void 0===i?r:{...r,currentPath:[...r.basePath,r.definitionPath,i]},!1))?o:{},a="object"==typeof t&&void 0!==t.name&&"title"===t.nameStrategy?t.name:void 0;void 0!==a&&(s.title=a);const l=void 0===i?n?{...s,[r.definitionPath]:n}:s:{$ref:[..."relative"===r.$refStrategy?[]:r.basePath,r.definitionPath,i].join("/"),[r.definitionPath]:{...n,[i]:s}};return l.$schema="http://json-schema.org/draft-07/schema#",l},q=Symbol.for("vercel.ai.schema");function $(e){let t;return()=>(null==t&&(t=e()),t)}function K(e,{validate:t}={}){return{[q]:!0,_type:void 0,get jsonSchema(){return"function"==typeof e&&(e=e()),e},validate:t}}function Z(e,t){return function(e){return"_zod"in e}(e)?function(e,t){var o;const r=null!=(o=null==t?void 0:t.useReferences)&&o;return K((()=>b(i.b(e,{target:"draft-7",io:"input",reused:r?"ref":"inline"}))),{validate:async t=>{const o=await n.bp(e,t);return o.success?{success:!0,value:o.data}:{success:!1,error:o.error}}})}(e,t):function(e,t){var o;const r=null!=(o=null==t?void 0:t.useReferences)&&o;return K((()=>Y(e,{$refStrategy:r?"root":"none"})),{validate:async t=>{const o=await e.safeParseAsync(t);return o.success?{success:!0,value:o.data}:{success:!1,error:o.error}}})}(e,t)}async function J({value:e,schema:t,context:o}){const n=function(e){return null==e?K({properties:{},additionalProperties:!1}):"object"==typeof(o=e)&&null!==o&&q in o&&!0===o[q]&&"jsonSchema"in o&&"validate"in o?e:"~standard"in e?"zod"===e["~standard"].vendor?Z(e):(t=e,K((()=>b(t["~standard"].jsonSchema.input({target:"draft-07"}))),{validate:async e=>{const o=await t["~standard"].validate(e);return"value"in o?{success:!0,value:o.value}:{success:!1,error:new r.iM({value:e,cause:o.issues})}}})):e();var t,o}(t);try{if(null==n.validate)return{success:!0,value:e,rawValue:e};const t=await n.validate(e);return t.success?{success:!0,value:t.value,rawValue:e}:{success:!1,error:r.iM.wrap({value:e,cause:t.error,context:o}),rawValue:e}}catch(t){return{success:!1,error:r.iM.wrap({value:e,cause:t,context:o}),rawValue:e}}}async function Q({provider:e,providerOptions:t,schema:o}){if(null==(null==t?void 0:t[e]))return;const n=await J({value:t[e],schema:o});if(!n.success)throw new r.Di({argument:"providerOptions",message:`invalid ${e} provider options`,cause:n.error});return n.value}var X=()=>globalThis.fetch,ee=async({url:e,headers:t,body:o,failedResponseHandler:r,successfulResponseHandler:n,abortSignal:i,fetch:s})=>te({url:e,headers:{"Content-Type":"application/json",...t},body:{content:JSON.stringify(o),values:o},failedResponseHandler:r,successfulResponseHandler:n,abortSignal:i,fetch:s}),te=async({url:e,headers:t={},body:o,successfulResponseHandler:n,failedResponseHandler:i,abortSignal:s,fetch:a=X()})=>{try{const l=await a(e,{method:"POST",headers:y(t,"ai-sdk/provider-utils/4.0.15",m()),body:o.content,signal:s}),u=p(l);if(!l.ok){let t;try{t=await i({response:l,url:e,requestBodyValues:o.values})}catch(t){if(h(t)||r.hL.isInstance(t))throw t;throw new r.hL({message:"Failed to process error response",cause:t,statusCode:l.status,url:e,responseHeaders:u,requestBodyValues:o.values})}throw t.value}try{return await n({response:l,url:e,requestBodyValues:o.values})}catch(t){if(t instanceof Error&&(h(t)||r.hL.isInstance(t)))throw t;throw new r.hL({message:"Failed to process successful response",cause:t,statusCode:l.status,url:e,responseHeaders:u,requestBodyValues:o.values})}}catch(t){throw function({error:e,url:t,requestBodyValues:o}){if(h(e))return e;if(e instanceof TypeError&&f.includes(e.message.toLowerCase())){const n=e.cause;if(null!=n)return new r.hL({message:`Cannot connect to API: ${n.message}`,cause:n,url:t,requestBodyValues:o,isRetryable:!0})}return function(e){if(!(e instanceof Error))return!1;const t=e.code;return!("string"!=typeof t||!g.includes(t))}(e)?new r.hL({message:`Cannot connect to API: ${e.message}`,cause:e,url:t,requestBodyValues:o,isRetryable:!0}):e}({error:t,url:e,requestBodyValues:o.values})}},oe=({errorSchema:e,errorToMessage:t,isRetryable:o})=>async({response:n,url:i,requestBodyValues:s})=>{const a=await n.text(),l=p(n);if(""===a.trim())return{responseHeaders:l,value:new r.hL({message:n.statusText,url:i,requestBodyValues:s,statusCode:n.status,responseHeaders:l,responseBody:a,isRetryable:null==o?void 0:o(n)})};try{const p=await async function({text:e,schema:t}){try{const o=_(e);return null==t?o:async function({value:e,schema:t,context:o}){const n=await J({value:e,schema:t,context:o});if(!n.success)throw r.iM.wrap({value:e,cause:n.error,context:o});return n.value}({value:o,schema:t})}catch(t){if(r.u6.isInstance(t)||r.iM.isInstance(t))throw t;throw new r.u6({text:e,cause:t})}}({text:a,schema:e});return{responseHeaders:l,value:new r.hL({message:t(p),url:i,requestBodyValues:s,statusCode:n.status,responseHeaders:l,responseBody:a,data:p,isRetryable:null==o?void 0:o(n,p)})}}catch(e){return{responseHeaders:l,value:new r.hL({message:n.statusText,url:i,requestBodyValues:s,statusCode:n.status,responseHeaders:l,responseBody:a,isRetryable:null==o?void 0:o(n)})}}},re=e=>async({response:t,url:o,requestBodyValues:n})=>{const i=await t.text(),s=await async function({text:e,schema:t}){try{const o=_(e);return null==t?{success:!0,value:o,rawValue:o}:await J({value:o,schema:t})}catch(t){return{success:!1,error:r.u6.isInstance(t)?t:new r.u6({text:e,cause:t}),rawValue:void 0}}}({text:i,schema:e}),a=p(t);if(!s.success)throw new r.hL({message:"Invalid JSON response",cause:s.error,statusCode:t.status,responseHeaders:a,responseBody:i,url:o,requestBodyValues:n});return{responseHeaders:a,value:s.value,rawValue:s.rawValue}};function ne(e){return null==e?void 0:e.replace(/\/$/,"")}},39984:function(e,t,o){var r=this&&this.__decorate||function(e,t,o,r){var n,i=arguments.length,s=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,o):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,o,r);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(s=(i<3?n(s):i>3?n(t,o,s):n(t,o))||s);return i>3&&s&&Object.defineProperty(t,o,s),s},n=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)};Object.defineProperty(t,"__esModule",{value:!0});var i=o(72493),s=o(73575),a=o(85910),l=o(44081),p=o(44871),u=o(40797),d=o(83423),c=function(){function e(){this.DEFAULT_HIDE_TOOLTIP_TIMEOUT=1e4,this.MOUSEOUT_HIDE_TOOLTIP_TIMEOUT=1e3,this.MOUSEOVER_SHOW_TOOLTIP_TIMEOUT=2e3,this.HIDE_SHOW_ONLY=!0,this.showTimeoutId=0,this.hideTimeoutId=0,this.registeredComponents={}}return e.prototype.registerTooltip=function(e){var t=this,o=e.getGui(),r=e.getCompId();e.addDestroyableEventListener(o,"mouseover",(function(o){return t.processMouseOver(o,e)})),e.addDestroyableEventListener(o,"mousemove",(function(e){return t.processMouseMove(e)})),e.addDestroyableEventListener(o,"mousedown",this.hideTooltip.bind(this)),e.addDestroyableEventListener(o,"mouseout",this.processMouseOut.bind(this)),this.registeredComponents[r]={tooltipComp:void 0,destroyFunc:void 0},e.addDestroyFunc((function(){return t.unregisterTooltip(e)}))},e.prototype.unregisterTooltip=function(e){var t=e.getCompId();this.activeComponent===e&&this.hideTooltip(),delete this.registeredComponents[t]},e.prototype.processMouseOver=function(e,t){var o=this.MOUSEOVER_SHOW_TOOLTIP_TIMEOUT;if(this.activeComponent){if(this.lastHoveredComponent===this.activeComponent)return;o=200}else if(this.showTimeoutId&&this.lastHoveredComponent===t)return;this.clearTimers(this.HIDE_SHOW_ONLY),this.lastHoveredComponent!==t&&(this.lastHoveredComponent=t,this.lastMouseEvent=e,this.showTimeoutId=window.setTimeout(this.showTooltip.bind(this),o,e))},e.prototype.processMouseOut=function(e){var t=this.activeComponent,o=e.relatedTarget;if(t){if(!t.getGui().contains(o)){var r=this.registeredComponents[t.getCompId()];d._.addCssClass(r.tooltipComp.getGui(),"ag-tooltip-hiding"),this.lastHoveredComponent=void 0,this.clearTimers(),this.hideTimeoutId=window.setTimeout(this.hideTooltip.bind(this),this.MOUSEOUT_HIDE_TOOLTIP_TIMEOUT)}}else{if(this.lastHoveredComponent){var n=this.lastHoveredComponent.getGui().contains(o);if(this.showTimeoutId&&n)return;n||(this.lastHoveredComponent=void 0)}this.clearTimers()}},e.prototype.processMouseMove=function(e){this.lastMouseEvent=e},e.prototype.showTooltip=function(e){var t=this.lastHoveredComponent,o=t,r=this.registeredComponents[t.getCompId()];this.hideTooltip();var n={api:this.gridApi,columnApi:this.columnApi,colDef:t.getComponentHolder(),column:o.getColumn&&o.getColumn(),context:this.gridOptionsWrapper.getContext(),rowIndex:o.getGridCell&&o.getGridCell().rowIndex,value:t.getTooltipText()};this.createTooltipComponent(n,r,e)},e.prototype.createTooltipComponent=function(e,t,o){var r=this;this.userComponentFactory.newTooltipComponent(e).then((function(e){if(t){t.tooltipComp=e;var o=e.getGui(),n=r.popupService.addPopup(!1,o,!1);t.destroyFunc=function(){n(),e.destroy&&e.destroy()},r.popupService.positionPopupUnderMouseEvent({type:"tooltip",mouseEvent:r.lastMouseEvent,ePopup:o,nudgeY:18}),r.activeComponent=r.lastHoveredComponent,r.hideTimeoutId=window.setTimeout(r.hideTooltip.bind(r),r.DEFAULT_HIDE_TOOLTIP_TIMEOUT)}}))},e.prototype.hideTooltip=function(){var e=this.activeComponent;if(this.clearTimers(),e){var t=e.getCompId(),o=this.registeredComponents[t];this.activeComponent=void 0,o&&(o.destroyFunc&&o.destroyFunc(),this.clearRegisteredComponent(o))}},e.prototype.clearRegisteredComponent=function(e){delete e.destroyFunc,delete e.tooltipComp},e.prototype.clearTimers=function(e){void 0===e&&(e=!1),this.hideTimeoutId&&!e&&(window.clearTimeout(this.hideTimeoutId),this.hideTimeoutId=0),this.showTimeoutId&&(window.clearTimeout(this.showTimeoutId),this.showTimeoutId=0)},r([i.Autowired("popupService"),n("design:type",s.PopupService)],e.prototype,"popupService",void 0),r([i.Autowired("userComponentFactory"),n("design:type",a.UserComponentFactory)],e.prototype,"userComponentFactory",void 0),r([i.Autowired("columnApi"),n("design:type",p.ColumnApi)],e.prototype,"columnApi",void 0),r([i.Autowired("gridApi"),n("design:type",u.GridApi)],e.prototype,"gridApi",void 0),r([i.Autowired("gridOptionsWrapper"),n("design:type",l.GridOptionsWrapper)],e.prototype,"gridOptionsWrapper",void 0),r([i.Bean("tooltipManager")],e)}();t.TooltipManager=c},40634:function(e,t,o){var r=this&&this.__decorate||function(e,t,o,r){var n,i=arguments.length,s=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,o):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,o,r);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(s=(i<3?n(s):i>3?n(t,o,s):n(t,o))||s);return i>3&&s&&Object.defineProperty(t,o,s),s},n=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},i=this&&this.__param||function(e,t){return function(o,r){t(o,r,e)}};Object.defineProperty(t,"__esModule",{value:!0});var s=o(37132),a=o(72493),l=o(72493),p=function(){function e(){this.expressionToFunctionCache={}}return e.prototype.setBeans=function(e){this.logger=e.create("ExpressionService")},e.prototype.evaluate=function(e,t){if("function"==typeof e)return e(t);if("string"==typeof e){var o=e;return this.evaluateExpression(o,t)}console.error("ag-Grid: value should be either a string or a function",e)},e.prototype.evaluateExpression=function(e,t){try{return this.createExpressionFunction(e)(t.value,t.context,t.oldValue,t.newValue,t.value,t.node,t.data,t.colDef,t.rowIndex,t.api,t.columnApi,t.getValue,t.column,t.columnGroup)}catch(t){return console.log("Processing of the expression failed"),console.log("Expression = "+e),console.log("Exception = "+t),null}},e.prototype.createExpressionFunction=function(e){if(this.expressionToFunctionCache[e])return this.expressionToFunctionCache[e];var t=this.createFunctionBody(e),o=new Function("x, ctx, oldValue, newValue, value, node, data, colDef, rowIndex, api, columnApi, getValue, column, columnGroup",t);return this.expressionToFunctionCache[e]=o,o},e.prototype.createFunctionBody=function(e){return e.indexOf("return")>=0?e:"return "+e+";"},r([i(0,l.Qualifier("loggerFactory")),n("design:type",Function),n("design:paramtypes",[s.LoggerFactory]),n("design:returntype",void 0)],e.prototype,"setBeans",null),r([a.Bean("expressionService")],e)}();t.ExpressionService=p},40706:function(e,t,o){var r=this&&this.__decorate||function(e,t,o,r){var n,i=arguments.length,s=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,o):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,o,r);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(s=(i<3?n(s):i>3?n(t,o,s):n(t,o))||s);return i>3&&s&&Object.defineProperty(t,o,s),s},n=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)};Object.defineProperty(t,"__esModule",{value:!0});var i=o(44081),s=o(72493),a=o(58342),l=o(98239),p=o(60843),u=o(63405),d=o(15774),c=o(69992),h=o(26016),f=o(13887),g=o(83423),m=function(){function e(e,t,o){this.headerRowComps=[],this.eContainer=e,this.pinned=o,this.eViewport=t}return e.prototype.registerGridComp=function(e){this.setupDragAndDrop(e)},e.prototype.forEachHeaderElement=function(e){this.headerRowComps.forEach((function(t){return t.forEachHeaderElement(e)}))},e.prototype.init=function(){this.scrollWidth=this.gridOptionsWrapper.getScrollbarWidth(),this.eventService.addEventListener(u.Events.EVENT_COLUMN_VALUE_CHANGED,this.onColumnValueChanged.bind(this)),this.eventService.addEventListener(u.Events.EVENT_COLUMN_ROW_GROUP_CHANGED,this.onColumnRowGroupChanged.bind(this)),this.eventService.addEventListener(u.Events.EVENT_GRID_COLUMNS_CHANGED,this.onGridColumnsChanged.bind(this)),this.eventService.addEventListener(u.Events.EVENT_SCROLL_VISIBILITY_CHANGED,this.onScrollVisibilityChanged.bind(this)),this.eventService.addEventListener(u.Events.EVENT_COLUMN_RESIZED,this.onColumnResized.bind(this)),this.eventService.addEventListener(u.Events.EVENT_DISPLAYED_COLUMNS_CHANGED,this.onDisplayedColumnsChanged.bind(this))},e.prototype.onColumnRowGroupChanged=function(){this.onGridColumnsChanged()},e.prototype.onColumnValueChanged=function(){this.onGridColumnsChanged()},e.prototype.onColumnResized=function(){this.setWidthOfPinnedContainer()},e.prototype.onDisplayedColumnsChanged=function(){this.setWidthOfPinnedContainer()},e.prototype.onScrollVisibilityChanged=function(){this.setWidthOfPinnedContainer()},e.prototype.setWidthOfPinnedContainer=function(){var e=this.pinned===h.Column.PINNED_LEFT,t=this.pinned===h.Column.PINNED_RIGHT,o=this.columnController,r=this.gridOptionsWrapper.isEnableRtl();if(e||t){var n=o[e?"getPinnedLeftContainerWidth":"getPinnedRightContainerWidth"]();this.scrollVisibleService.isVerticalScrollShowing()&&(r&&e||!r&&t)&&(n+=this.scrollWidth),g._.setFixedWidth(this.eContainer,n)}},e.prototype.destroy=function(){this.removeHeaderRowComps()},e.prototype.onGridColumnsChanged=function(){this.removeAndCreateAllRowComps()},e.prototype.removeAndCreateAllRowComps=function(){this.removeHeaderRowComps(),this.createHeaderRowComps()},e.prototype.refresh=function(){this.removeAndCreateAllRowComps()},e.prototype.setupDragAndDrop=function(e){var t=this.eViewport?this.eViewport:this.eContainer,o=new c.BodyDropTarget(this.pinned,t);this.context.wireBean(o),o.registerGridComp(e)},e.prototype.removeHeaderRowComps=function(){this.headerRowComps.forEach((function(e){e.destroy()})),this.headerRowComps.length=0,g._.clearElement(this.eContainer)},e.prototype.createHeaderRowComps=function(){for(var e=this.columnController.getHeaderRowCount(),t=0;t<e;t++){var o=t!==e-1?d.HeaderRowType.COLUMN_GROUP:d.HeaderRowType.COLUMN,r=new d.HeaderRowComp(t,o,this.pinned,this.dropTarget);this.context.wireBean(r),this.headerRowComps.push(r),this.eContainer.appendChild(r.getGui())}this.gridOptionsWrapper.isFloatingFilter()&&!this.columnController.isPivotMode()&&(r=new d.HeaderRowComp(e,d.HeaderRowType.FLOATING_FILTER,this.pinned,this.dropTarget),this.context.wireBean(r),this.headerRowComps.push(r),this.eContainer.appendChild(r.getGui()))},r([s.Autowired("gridOptionsWrapper"),n("design:type",i.GridOptionsWrapper)],e.prototype,"gridOptionsWrapper",void 0),r([s.Autowired("context"),n("design:type",s.Context)],e.prototype,"context",void 0),r([s.Autowired("$scope"),n("design:type",Object)],e.prototype,"$scope",void 0),r([s.Autowired("dragAndDropService"),n("design:type",a.DragAndDropService)],e.prototype,"dragAndDropService",void 0),r([s.Autowired("columnController"),n("design:type",l.ColumnController)],e.prototype,"columnController",void 0),r([s.Autowired("eventService"),n("design:type",p.EventService)],e.prototype,"eventService",void 0),r([s.Autowired("scrollVisibleService"),n("design:type",f.ScrollVisibleService)],e.prototype,"scrollVisibleService",void 0),r([s.PostConstruct,n("design:type",Function),n("design:paramtypes",[]),n("design:returntype",void 0)],e.prototype,"init",null),e}();t.HeaderContainer=m},40797:function(e,t,o){var r=this&&this.__decorate||function(e,t,o,r){var n,i=arguments.length,s=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,o):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,o,r);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(s=(i<3?n(s):i>3?n(t,o,s):n(t,o))||s);return i>3&&s&&Object.defineProperty(t,o,s),s},n=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)};Object.defineProperty(t,"__esModule",{value:!0});var i=o(43460),s=o(10042),a=o(55e3),l=o(98239),p=o(54828),u=o(44081),d=o(24463),c=o(60843),h=o(45727),f=o(72493),g=o(86608),m=o(42195),y=o(34782),v=o(34470),C=o(41451),w=o(76133),E=o(88842),_=o(10190),b=o(50580),R=o(69065),S=o(83423),O=function(){function e(){this.detailGridInfoMap={}}return e.prototype.registerGridComp=function(e){this.gridPanel=e},e.prototype.registerGridCore=function(e){this.gridCore=e},e.prototype.registerHeaderRootComp=function(e){this.headerRootComp=e},e.prototype.init=function(){switch(this.rowModel.getType()){case h.Constants.ROW_MODEL_TYPE_CLIENT_SIDE:this.clientSideRowModel=this.rowModel;break;case h.Constants.ROW_MODEL_TYPE_INFINITE:this.infinitePageRowModel=this.rowModel;break;case h.Constants.ROW_MODEL_TYPE_SERVER_SIDE:this.serverSideRowModel=this.rowModel}},e.prototype.__getAlignedGridService=function(){return this.alignedGridsService},e.prototype.addDetailGridInfo=function(e,t){this.detailGridInfoMap[e]=t},e.prototype.removeDetailGridInfo=function(e){this.detailGridInfoMap[e]=void 0},e.prototype.getDetailGridInfo=function(e){return this.detailGridInfoMap[e]},e.prototype.forEachDetailGridInfo=function(e){var t=0;S._.iterateObject(this.detailGridInfoMap,(function(o,r){S._.exists(r)&&(e(r,t),t++)}))},e.prototype.getDataAsCsv=function(e){return this.csvCreator.getDataAsCsv(e)},e.prototype.exportDataAsCsv=function(e){this.csvCreator.exportDataAsCsv(e)},e.prototype.getDataAsExcel=function(e){return this.excelCreator||console.warn("ag-Grid: Excel export is only available in ag-Grid Enterprise"),this.excelCreator.getDataAsExcelXml(e)},e.prototype.exportDataAsExcel=function(e){this.excelCreator||console.warn("ag-Grid: Excel export is only available in ag-Grid Enterprise"),this.excelCreator.exportDataAsExcel(e)},e.prototype.setEnterpriseDatasource=function(e){console.warn("ag-grid: since version 18.x, api.setEnterpriseDatasource() should be replaced with api.setServerSideDatasource()"),this.setServerSideDatasource(e)},e.prototype.setServerSideDatasource=function(e){this.gridOptionsWrapper.isRowModelServerSide()?this.rowModel.setDatasource(e):console.warn("ag-Grid: you can only use an enterprise datasource when gridOptions.rowModelType is '"+h.Constants.ROW_MODEL_TYPE_SERVER_SIDE+"'")},e.prototype.setDatasource=function(e){this.gridOptionsWrapper.isRowModelInfinite()?this.rowModel.setDatasource(e):console.warn("ag-Grid: you can only use a datasource when gridOptions.rowModelType is '"+h.Constants.ROW_MODEL_TYPE_INFINITE+"'")},e.prototype.setViewportDatasource=function(e){this.gridOptionsWrapper.isRowModelViewport()?this.rowModel.setViewportDatasource(e):console.warn("ag-Grid: you can only use a viewport datasource when gridOptions.rowModelType is '"+h.Constants.ROW_MODEL_TYPE_VIEWPORT+"'")},e.prototype.setRowData=function(e){if(this.gridOptionsWrapper.isRowModelDefault())if(this.gridOptionsWrapper.isDeltaRowDataMode()){var t=this.immutableService.createTransactionForRowData(e),o=t[0],r=t[1];this.clientSideRowModel.updateRowData(o,r),this.rowRenderer.refreshFullWidthRows()}else this.selectionController.reset(),this.clientSideRowModel.setRowData(e);else console.warn("cannot call setRowData unless using normal row model")},e.prototype.setFloatingTopRowData=function(e){console.warn("ag-Grid: since v12, api.setFloatingTopRowData() is now api.setPinnedTopRowData()"),this.setPinnedTopRowData(e)},e.prototype.setFloatingBottomRowData=function(e){console.warn("ag-Grid: since v12, api.setFloatingBottomRowData() is now api.setPinnedBottomRowData()"),this.setPinnedBottomRowData(e)},e.prototype.getFloatingTopRowCount=function(){return console.warn("ag-Grid: since v12, api.getFloatingTopRowCount() is now api.getPinnedTopRowCount()"),this.getPinnedTopRowCount()},e.prototype.getFloatingBottomRowCount=function(){return console.warn("ag-Grid: since v12, api.getFloatingBottomRowCount() is now api.getPinnedBottomRowCount()"),this.getPinnedBottomRowCount()},e.prototype.getFloatingTopRow=function(e){return console.warn("ag-Grid: since v12, api.getFloatingTopRow() is now api.getPinnedTopRow()"),this.getPinnedTopRow(e)},e.prototype.getFloatingBottomRow=function(e){return console.warn("ag-Grid: since v12, api.getFloatingBottomRow() is now api.getPinnedBottomRow()"),this.getPinnedBottomRow(e)},e.prototype.setPinnedTopRowData=function(e){this.pinnedRowModel.setPinnedTopRowData(e)},e.prototype.setPinnedBottomRowData=function(e){this.pinnedRowModel.setPinnedBottomRowData(e)},e.prototype.getPinnedTopRowCount=function(){return this.pinnedRowModel.getPinnedTopRowCount()},e.prototype.getPinnedBottomRowCount=function(){return this.pinnedRowModel.getPinnedBottomRowCount()},e.prototype.getPinnedTopRow=function(e){return this.pinnedRowModel.getPinnedTopRow(e)},e.prototype.getPinnedBottomRow=function(e){return this.pinnedRowModel.getPinnedBottomRow(e)},e.prototype.setColumnDefs=function(e,t){void 0===t&&(t="api"),this.columnController.setColumnDefs(e,t)},e.prototype.expireValueCache=function(){this.valueCache.expire()},e.prototype.getVerticalPixelRange=function(){return this.gridPanel.getVScrollPosition()},e.prototype.getHorizontalPixelRange=function(){return this.gridPanel.getHScrollPosition()},e.prototype.setAlwaysShowVerticalScroll=function(e){this.gridOptionsWrapper.setProperty("alwaysShowVerticalScroll",e)},e.prototype.refreshToolPanel=function(){this.gridCore.refreshSideBar()},e.prototype.refreshCells=function(e){void 0===e&&(e={}),Array.isArray(e)?console.warn("since ag-Grid v11.1, refreshCells() now takes parameters, please see the documentation."):this.rowRenderer.refreshCells(e)},e.prototype.flashCells=function(e){void 0===e&&(e={}),this.rowRenderer.flashCells(e)},e.prototype.redrawRows=function(e){void 0===e&&(e={}),e&&e.rowNodes?this.rowRenderer.redrawRows(e.rowNodes):this.rowRenderer.redrawAfterModelUpdate()},e.prototype.timeFullRedraw=function(e){void 0===e&&(e=1);var t=0,o=0,r=0,n=this;!function i(){var s=(new Date).getTime();n.rowRenderer.redrawAfterModelUpdate();var a=(new Date).getTime();window.setTimeout((function(){var n=(new Date).getTime(),l=a-s,p=n-a;console.log("duration: processing = "+l+"ms, reflow = "+p+"ms"),t++,o+=l,r+=p,t<e?window.setTimeout(i,1e3):(console.log("tests complete. iteration count = "+t),console.log("average processing = "+o/t+"ms"),console.log("average reflow = "+r/t+"ms"))}),0)}()},e.prototype.refreshView=function(){console.warn("ag-Grid: since v11.1, refreshView() is deprecated, please call refreshCells() or redrawRows() instead"),this.redrawRows()},e.prototype.refreshRows=function(e){console.warn("since ag-Grid v11.1, refreshRows() is deprecated, please use refreshCells({rowNodes: rows}) or redrawRows({rowNodes: rows}) instead"),this.refreshCells({rowNodes:e})},e.prototype.rowDataChanged=function(e){console.warn("ag-Grid: rowDataChanged is deprecated, either call refreshView() to refresh everything, or call rowNode.setRowData(newData) to set value on a particular node"),this.redrawRows()},e.prototype.softRefreshView=function(){console.error("ag-Grid: since v16, softRefreshView() is no longer supported. Please check the documentation on how to refresh.")},e.prototype.refreshGroupRows=function(){console.warn("ag-Grid: since v11.1, refreshGroupRows() is no longer supported, call refreshCells() instead. Because refreshCells() now does dirty checking, it will only refresh cells that have changed, so it should not be necessary to only refresh the group rows."),this.refreshCells()},e.prototype.setFunctionsReadOnly=function(e){this.gridOptionsWrapper.setProperty("functionsReadOnly",e)},e.prototype.refreshHeader=function(){this.headerRootComp.refreshHeader(),this.gridPanel.setHeaderAndFloatingHeights()},e.prototype.isAnyFilterPresent=function(){return this.filterManager.isAnyFilterPresent()},e.prototype.isAdvancedFilterPresent=function(){return console.warn("ag-Grid: isAdvancedFilterPresent() is deprecated, please use isColumnFilterPresent()"),this.isColumnFilterPresent()},e.prototype.isColumnFilterPresent=function(){return this.filterManager.isAdvancedFilterPresent()},e.prototype.isQuickFilterPresent=function(){return this.filterManager.isQuickFilterPresent()},e.prototype.getModel=function(){return this.rowModel},e.prototype.onGroupExpandedOrCollapsed=function(e){S._.missing(this.clientSideRowModel)&&console.warn("ag-Grid: cannot call onGroupExpandedOrCollapsed unless using normal row model"),S._.exists(e)&&console.warn("ag-Grid: api.onGroupExpandedOrCollapsed - refreshFromIndex parameter is no longer used, the grid will refresh all rows"),this.clientSideRowModel.refreshModel({step:h.Constants.STEP_MAP})},e.prototype.refreshInMemoryRowModel=function(e){console.warn("ag-grid: since version 18.x, api.refreshInMemoryRowModel() should be replaced with api.refreshClientSideRowModel()"),this.refreshClientSideRowModel(e)},e.prototype.refreshClientSideRowModel=function(e){S._.missing(this.clientSideRowModel)&&console.warn("cannot call refreshClientSideRowModel unless using normal row model");var t=h.Constants.STEP_EVERYTHING,o={group:h.Constants.STEP_EVERYTHING,filter:h.Constants.STEP_FILTER,map:h.Constants.STEP_MAP,aggregate:h.Constants.STEP_AGGREGATE,sort:h.Constants.STEP_SORT,pivot:h.Constants.STEP_PIVOT};if(S._.exists(e)&&(t=o[e]),S._.missing(t))console.error("ag-Grid: invalid step "+e+", available steps are "+Object.keys(o).join(", "));else{var r={step:t,keepRenderedRows:!0,animate:!0,keepEditingRows:!0};this.clientSideRowModel.refreshModel(r)}},e.prototype.isAnimationFrameQueueEmpty=function(){return this.animationFrameService.isQueueEmpty()},e.prototype.getRowNode=function(e){return this.rowModel.getRowNode(e)},e.prototype.expandAll=function(){S._.missing(this.clientSideRowModel)?console.warn("ag-Grid: cannot call expandAll unless using normal row model"):this.clientSideRowModel.expandOrCollapseAll(!0)},e.prototype.collapseAll=function(){S._.missing(this.clientSideRowModel)?console.warn("ag-Grid: cannot call collapseAll unless using normal row model"):this.clientSideRowModel.expandOrCollapseAll(!1)},e.prototype.addVirtualRowListener=function(e,t,o){"string"!=typeof e&&console.warn("ag-Grid: addVirtualRowListener is deprecated, please use addRenderedRowListener."),this.addRenderedRowListener(e,t,o)},e.prototype.addRenderedRowListener=function(e,t,o){"virtualRowSelected"===e&&console.warn("ag-Grid: event virtualRowSelected is deprecated, to register for individual row\n selection events, add a listener directly to the row node."),this.rowRenderer.addRenderedRowListener(e,t,o)},e.prototype.setQuickFilter=function(e){this.filterManager.setQuickFilter(e)},e.prototype.selectIndex=function(e,t,o){console.warn("ag-Grid: do not use api for selection, call node.setSelected(value) instead"),o&&console.warn("ag-Grid: suppressEvents is no longer supported, stop listening for the event if you no longer want it"),this.selectionController.selectIndex(e,t)},e.prototype.deselectIndex=function(e,t){void 0===t&&(t=!1),console.warn("ag-Grid: do not use api for selection, call node.setSelected(value) instead"),t&&console.warn("ag-Grid: suppressEvents is no longer supported, stop listening for the event if you no longer want it"),this.selectionController.deselectIndex(e)},e.prototype.selectNode=function(e,t,o){void 0===t&&(t=!1),void 0===o&&(o=!1),console.warn("ag-Grid: API for selection is deprecated, call node.setSelected(value) instead"),o&&console.warn("ag-Grid: suppressEvents is no longer supported, stop listening for the event if you no longer want it"),e.setSelectedParams({newValue:!0,clearSelection:!t})},e.prototype.deselectNode=function(e,t){void 0===t&&(t=!1),console.warn("ag-Grid: API for selection is deprecated, call node.setSelected(value) instead"),t&&console.warn("ag-Grid: suppressEvents is no longer supported, stop listening for the event if you no longer want it"),e.setSelectedParams({newValue:!1})},e.prototype.selectAll=function(){this.selectionController.selectAllRowNodes()},e.prototype.deselectAll=function(){this.selectionController.deselectAllRowNodes()},e.prototype.selectAllFiltered=function(){this.selectionController.selectAllRowNodes(!0)},e.prototype.deselectAllFiltered=function(){this.selectionController.deselectAllRowNodes(!0)},e.prototype.recomputeAggregates=function(){S._.missing(this.clientSideRowModel)&&console.warn("cannot call recomputeAggregates unless using normal row model"),console.warn("recomputeAggregates is deprecated, please call api.refreshClientSideRowModel('aggregate') instead"),this.clientSideRowModel.refreshModel({step:h.Constants.STEP_AGGREGATE})},e.prototype.sizeColumnsToFit=function(){this.gridPanel.sizeColumnsToFit()},e.prototype.showLoadingOverlay=function(){this.gridPanel.showLoadingOverlay()},e.prototype.showNoRowsOverlay=function(){this.gridPanel.showNoRowsOverlay()},e.prototype.hideOverlay=function(){this.gridPanel.hideOverlay()},e.prototype.isNodeSelected=function(e){return console.warn("ag-Grid: no need to call api.isNodeSelected(), just call node.isSelected() instead"),e.isSelected()},e.prototype.getSelectedNodesById=function(){return console.error("ag-Grid: since version 3.4, getSelectedNodesById no longer exists, use getSelectedNodes() instead"),null},e.prototype.getSelectedNodes=function(){return this.selectionController.getSelectedNodes()},e.prototype.getSelectedRows=function(){return this.selectionController.getSelectedRows()},e.prototype.getBestCostNodeSelection=function(){return this.selectionController.getBestCostNodeSelection()},e.prototype.getRenderedNodes=function(){return this.rowRenderer.getRenderedNodes()},e.prototype.ensureColIndexVisible=function(e){console.warn("ag-Grid: ensureColIndexVisible(index) no longer supported, use ensureColumnVisible(colKey) instead.")},e.prototype.ensureColumnVisible=function(e){this.gridPanel.ensureColumnVisible(e)},e.prototype.ensureIndexVisible=function(e,t){this.gridPanel.ensureIndexVisible(e,t)},e.prototype.ensureNodeVisible=function(e,t){this.gridCore.ensureNodeVisible(e,t)},e.prototype.forEachLeafNode=function(e){S._.missing(this.clientSideRowModel)&&console.warn("cannot call forEachNode unless using normal row model"),this.clientSideRowModel.forEachLeafNode(e)},e.prototype.forEachNode=function(e){this.rowModel.forEachNode(e)},e.prototype.forEachNodeAfterFilter=function(e){S._.missing(this.clientSideRowModel)&&console.warn("cannot call forEachNodeAfterFilter unless using normal row model"),this.clientSideRowModel.forEachNodeAfterFilter(e)},e.prototype.forEachNodeAfterFilterAndSort=function(e){S._.missing(this.clientSideRowModel)&&console.warn("cannot call forEachNodeAfterFilterAndSort unless using normal row model"),this.clientSideRowModel.forEachNodeAfterFilterAndSort(e)},e.prototype.getFilterApiForColDef=function(e){return console.warn("ag-grid API method getFilterApiForColDef deprecated, use getFilterApi instead"),this.getFilterInstance(e)},e.prototype.getFilterInstance=function(e){var t=this.columnController.getPrimaryColumn(e);if(t)return this.filterManager.getFilterComponent(t,"NO_UI").resolveNow(null,(function(e){return e}))},e.prototype.getFilterApi=function(e){return console.warn("ag-Grid: getFilterApi is deprecated, use getFilterInstance instead"),this.getFilterInstance(e)},e.prototype.destroyFilter=function(e){var t=this.columnController.getPrimaryColumn(e);if(t)return this.filterManager.destroyFilter(t,"filterDestroyed")},e.prototype.getStatusPanel=function(e){if(this.statusBarService)return this.statusBarService.getStatusPanel(e)},e.prototype.getColumnDef=function(e){var t=this.columnController.getPrimaryColumn(e);return t?t.getColDef():null},e.prototype.onFilterChanged=function(){this.filterManager.onFilterChanged()},e.prototype.onSortChanged=function(){this.sortController.onSortChanged()},e.prototype.setSortModel=function(e,t){void 0===t&&(t="api"),this.sortController.setSortModel(e,t)},e.prototype.getSortModel=function(){return this.sortController.getSortModel()},e.prototype.setFilterModel=function(e){this.filterManager.setFilterModel(e)},e.prototype.getFilterModel=function(){return this.filterManager.getFilterModel()},e.prototype.getFocusedCell=function(){return this.focusedCellController.getFocusedCell()},e.prototype.clearFocusedCell=function(){return this.focusedCellController.clearFocusedCell()},e.prototype.setFocusedCell=function(e,t,o){this.focusedCellController.setFocusedCell(e,t,o,!0)},e.prototype.setSuppressRowDrag=function(e){this.gridOptionsWrapper.setProperty(u.GridOptionsWrapper.PROP_SUPPRESS_ROW_DRAG,e)},e.prototype.setHeaderHeight=function(e){this.gridOptionsWrapper.setProperty(u.GridOptionsWrapper.PROP_HEADER_HEIGHT,e),this.doLayout()},e.prototype.setGridAutoHeight=function(e){console.warn("api.setGridAutoHeight(boolean) is deprecated, please use api.setDomLayout() instead"),this.setDomLayout(e?"autoHeight":"normal")},e.prototype.setDomLayout=function(e){this.gridOptionsWrapper.setProperty(u.GridOptionsWrapper.PROP_DOM_LAYOUT,e)},e.prototype.setEnableCellTextSelection=function(e){this.gridPanel.setCellTextSelection(e)},e.prototype.setGroupHeaderHeight=function(e){this.gridOptionsWrapper.setProperty(u.GridOptionsWrapper.PROP_GROUP_HEADER_HEIGHT,e),this.doLayout()},e.prototype.setFloatingFiltersHeight=function(e){this.gridOptionsWrapper.setProperty(u.GridOptionsWrapper.PROP_FLOATING_FILTERS_HEIGHT,e),this.doLayout()},e.prototype.setPivotGroupHeaderHeight=function(e){this.gridOptionsWrapper.setProperty(u.GridOptionsWrapper.PROP_PIVOT_GROUP_HEADER_HEIGHT,e),this.doLayout()},e.prototype.setPivotHeaderHeight=function(e){this.gridOptionsWrapper.setProperty(u.GridOptionsWrapper.PROP_PIVOT_HEADER_HEIGHT,e),this.doLayout()},e.prototype.isSideBarVisible=function(){return this.gridCore.isSideBarVisible()},e.prototype.setSideBarVisible=function(e){this.gridCore.setSideBarVisible(e)},e.prototype.showToolPanel=function(e){console.warn("ag-grid: from v19 api.showToolPanel has been deprecated in favour of api.setSideBarVisible"),this.setSideBarVisible(e)},e.prototype.openToolPanel=function(e){this.gridCore.openToolPanel(e)},e.prototype.closeToolPanel=function(){this.gridCore.closeToolPanel()},e.prototype.getOpenedToolPanel=function(){return this.gridCore.getOpenedToolPanel()},e.prototype.getSideBar=function(){return this.gridCore.getSideBar()},e.prototype.setSideBar=function(e){return this.gridCore.setSideBar(e)},e.prototype.setSuppressClipboardPaste=function(e){this.gridOptionsWrapper.setProperty(u.GridOptionsWrapper.PROP_SUPPRESS_CLIPBOARD_PASTE,e)},e.prototype.isToolPanelShowing=function(){return this.gridCore.isToolPanelShowing()},e.prototype.doLayout=function(){this.gridPanel.checkViewportAndScrolls()},e.prototype.resetRowHeights=function(){S._.exists(this.clientSideRowModel)&&this.clientSideRowModel.resetRowHeights()},e.prototype.setGroupRemoveSingleChildren=function(e){this.gridOptionsWrapper.setProperty(u.GridOptionsWrapper.PROP_GROUP_REMOVE_SINGLE_CHILDREN,e)},e.prototype.setGroupRemoveLowestSingleChildren=function(e){this.gridOptionsWrapper.setProperty(u.GridOptionsWrapper.PROP_GROUP_REMOVE_LOWEST_SINGLE_CHILDREN,e)},e.prototype.onRowHeightChanged=function(){S._.exists(this.clientSideRowModel)&&this.clientSideRowModel.onRowHeightChanged()},e.prototype.getValue=function(e,t){var o=this.columnController.getPrimaryColumn(e);return S._.missing(o)&&(o=this.columnController.getGridColumn(e)),S._.missing(o)?null:this.valueService.getValue(o,t)},e.prototype.addEventListener=function(e,t){var o=this.gridOptionsWrapper.useAsyncEvents();this.eventService.addEventListener(e,t,o)},e.prototype.addGlobalListener=function(e){var t=this.gridOptionsWrapper.useAsyncEvents();this.eventService.addGlobalListener(e,t)},e.prototype.removeEventListener=function(e,t){var o=this.gridOptionsWrapper.useAsyncEvents();this.eventService.removeEventListener(e,t,o)},e.prototype.removeGlobalListener=function(e){var t=this.gridOptionsWrapper.useAsyncEvents();this.eventService.removeGlobalListener(e,t)},e.prototype.dispatchEvent=function(e){this.eventService.dispatchEvent(e)},e.prototype.destroy=function(){this.gridCore.destroy(),this.context.destroy()},e.prototype.resetQuickFilter=function(){this.rowModel.forEachNode((function(e){return e.quickFilterAggregateText=null}))},e.prototype.getRangeSelections=function(){return this.rangeController?this.rangeController.getCellRanges():(console.warn("ag-Grid: cell range selection is only available in ag-Grid Enterprise"),null)},e.prototype.camelCaseToHumanReadable=function(e){return S._.camelCaseToHumanText(e)},e.prototype.addRangeSelection=function(e){this.rangeController||console.warn("ag-Grid: cell range selection is only available in ag-Grid Enterprise"),this.rangeController.addRange(e)},e.prototype.clearRangeSelection=function(){this.rangeController||console.warn("ag-Grid: cell range selection is only available in ag-Grid Enterprise"),this.rangeController.clearSelection()},e.prototype.copySelectedRowsToClipboard=function(e,t){this.clipboardService||console.warn("ag-Grid: clipboard is only available in ag-Grid Enterprise"),this.clipboardService.copySelectedRowsToClipboard(e,t)},e.prototype.copySelectedRangeToClipboard=function(e){this.clipboardService||console.warn("ag-Grid: clipboard is only available in ag-Grid Enterprise"),this.clipboardService.copySelectedRangeToClipboard(e)},e.prototype.copySelectedRangeDown=function(){this.clipboardService||console.warn("ag-Grid: clipboard is only available in ag-Grid Enterprise"),this.clipboardService.copyRangeDown()},e.prototype.showColumnMenuAfterButtonClick=function(e,t){var o=this.columnController.getPrimaryColumn(e);this.menuFactory.showMenuAfterButtonClick(o,t)},e.prototype.showColumnMenuAfterMouseClick=function(e,t){var o=this.columnController.getPrimaryColumn(e);this.menuFactory.showMenuAfterMouseEvent(o,t)},e.prototype.hidePopupMenu=function(){this.contextMenuFactory&&this.contextMenuFactory.hideActiveMenu(),this.menuFactory.hideActiveMenu()},e.prototype.setPopupParent=function(e){this.gridOptionsWrapper.setProperty(u.GridOptionsWrapper.PROP_POPUP_PARENT,e)},e.prototype.tabToNextCell=function(){return this.rowRenderer.tabToNextCell(!1)},e.prototype.tabToPreviousCell=function(){return this.rowRenderer.tabToNextCell(!0)},e.prototype.getCellRendererInstances=function(e){return void 0===e&&(e={}),this.rowRenderer.getCellRendererInstances(e)},e.prototype.getCellEditorInstances=function(e){return void 0===e&&(e={}),this.rowRenderer.getCellEditorInstances(e)},e.prototype.getEditingCells=function(){return this.rowRenderer.getEditingCells()},e.prototype.stopEditing=function(e){void 0===e&&(e=!1),this.rowRenderer.stopEditing(e)},e.prototype.startEditingCell=function(e){var t=this.columnController.getGridColumn(e.colKey);if(t){var o={rowIndex:e.rowIndex,floating:e.rowPinned,column:t},r=new y.GridCell(o);S._.missing(e.rowPinned)&&this.gridPanel.ensureIndexVisible(e.rowIndex),this.rowRenderer.startEditingCell(r,e.keyPress,e.charPress)}else console.warn("ag-Grid: no column found for "+e.colKey)},e.prototype.addAggFunc=function(e,t){this.aggFuncService&&this.aggFuncService.addAggFunc(e,t)},e.prototype.addAggFuncs=function(e){this.aggFuncService&&this.aggFuncService.addAggFuncs(e)},e.prototype.clearAggFuncs=function(){this.aggFuncService&&this.aggFuncService.clear()},e.prototype.updateRowData=function(e){var t=null;return this.clientSideRowModel?t=this.clientSideRowModel.updateRowData(e):this.infinitePageRowModel?this.infinitePageRowModel.updateRowData(e):console.error("ag-Grid: updateRowData() only works with ClientSideRowModel and InfiniteRowModel."),this.rowRenderer.refreshFullWidthRows(),this.gridOptionsWrapper.isSuppressChangeDetection()||this.rowRenderer.refreshCells(),t},e.prototype.batchUpdateRowData=function(e,t){this.clientSideRowModel?this.clientSideRowModel.batchUpdateRowData(e,t):console.error("ag-Grid: api.batchUpdateRowData() only works with ClientSideRowModel.")},e.prototype.insertItemsAtIndex=function(e,t,o){void 0===o&&(o=!1),console.warn("ag-Grid: insertItemsAtIndex() is deprecated, use updateRowData(transaction) instead."),this.updateRowData({add:t,addIndex:e,update:null,remove:null})},e.prototype.removeItems=function(e,t){void 0===t&&(t=!1),console.warn("ag-Grid: removeItems() is deprecated, use updateRowData(transaction) instead.");var o=e.map((function(e){return e.data}));this.updateRowData({add:null,addIndex:null,update:null,remove:o})},e.prototype.addItems=function(e,t){void 0===t&&(t=!1),console.warn("ag-Grid: addItems() is deprecated, use updateRowData(transaction) instead."),this.updateRowData({add:e,addIndex:null,update:null,remove:null})},e.prototype.refreshVirtualPageCache=function(){console.warn("ag-Grid: refreshVirtualPageCache() is now called refreshInfiniteCache(), please call refreshInfiniteCache() instead"),this.refreshInfiniteCache()},e.prototype.refreshInfinitePageCache=function(){console.warn("ag-Grid: refreshInfinitePageCache() is now called refreshInfiniteCache(), please call refreshInfiniteCache() instead"),this.refreshInfiniteCache()},e.prototype.refreshInfiniteCache=function(){this.infinitePageRowModel?this.infinitePageRowModel.refreshCache():console.warn("ag-Grid: api.refreshInfiniteCache is only available when rowModelType='infinite'.")},e.prototype.purgeVirtualPageCache=function(){console.warn("ag-Grid: purgeVirtualPageCache() is now called purgeInfiniteCache(), please call purgeInfiniteCache() instead"),this.purgeInfinitePageCache()},e.prototype.purgeInfinitePageCache=function(){console.warn("ag-Grid: purgeInfinitePageCache() is now called purgeInfiniteCache(), please call purgeInfiniteCache() instead"),this.purgeInfiniteCache()},e.prototype.purgeInfiniteCache=function(){this.infinitePageRowModel?this.infinitePageRowModel.purgeCache():console.warn("ag-Grid: api.purgeInfiniteCache is only available when rowModelType='infinite'.")},e.prototype.purgeEnterpriseCache=function(e){console.warn("ag-grid: since version 18.x, api.purgeEnterpriseCache() should be replaced with api.purgeServerSideCache()"),this.purgeServerSideCache(e)},e.prototype.purgeServerSideCache=function(e){this.serverSideRowModel?this.serverSideRowModel.purgeCache(e):console.warn("ag-Grid: api.purgeServerSideCache is only available when rowModelType='enterprise'.")},e.prototype.getVirtualRowCount=function(){return console.warn("ag-Grid: getVirtualRowCount() is now called getInfiniteRowCount(), please call getInfiniteRowCount() instead"),this.getInfiniteRowCount()},e.prototype.getInfiniteRowCount=function(){if(this.infinitePageRowModel)return this.infinitePageRowModel.getVirtualRowCount();console.warn("ag-Grid: api.getVirtualRowCount is only available when rowModelType='virtual'.")},e.prototype.isMaxRowFound=function(){if(this.infinitePageRowModel)return this.infinitePageRowModel.isMaxRowFound();console.warn("ag-Grid: api.isMaxRowFound is only available when rowModelType='virtual'.")},e.prototype.setVirtualRowCount=function(e,t){console.warn("ag-Grid: setVirtualRowCount() is now called setInfiniteRowCount(), please call setInfiniteRowCount() instead"),this.setInfiniteRowCount(e,t)},e.prototype.setInfiniteRowCount=function(e,t){this.infinitePageRowModel?this.infinitePageRowModel.setVirtualRowCount(e,t):console.warn("ag-Grid: api.setVirtualRowCount is only available when rowModelType='virtual'.")},e.prototype.getVirtualPageState=function(){return console.warn("ag-Grid: getVirtualPageState() is now called getCacheBlockState(), please call getCacheBlockState() instead"),this.getCacheBlockState()},e.prototype.getInfinitePageState=function(){return console.warn("ag-Grid: getInfinitePageState() is now called getCacheBlockState(), please call getCacheBlockState() instead"),this.getCacheBlockState()},e.prototype.getCacheBlockState=function(){return this.infinitePageRowModel?this.infinitePageRowModel.getBlockState():this.serverSideRowModel?this.serverSideRowModel.getBlockState():void console.warn("ag-Grid: api.getCacheBlockState() is only available when rowModelType='infinite' or rowModelType='serverSide'.")},e.prototype.checkGridSize=function(){this.gridPanel.setHeaderAndFloatingHeights()},e.prototype.getFirstRenderedRow=function(){return console.warn("in ag-Grid v12, getFirstRenderedRow() was renamed to getFirstDisplayedRow()"),this.getFirstDisplayedRow()},e.prototype.getFirstDisplayedRow=function(){return this.rowRenderer.getFirstVirtualRenderedRow()},e.prototype.getLastRenderedRow=function(){return console.warn("in ag-Grid v12, getLastRenderedRow() was renamed to getLastDisplayedRow()"),this.getLastDisplayedRow()},e.prototype.getLastDisplayedRow=function(){return this.rowRenderer.getLastVirtualRenderedRow()},e.prototype.getDisplayedRowAtIndex=function(e){return this.rowModel.getRow(e)},e.prototype.getDisplayedRowCount=function(){return this.rowModel.getRowCount()},e.prototype.paginationIsLastPageFound=function(){return this.paginationProxy.isLastPageFound()},e.prototype.paginationGetPageSize=function(){return this.paginationProxy.getPageSize()},e.prototype.paginationSetPageSize=function(e){this.gridOptionsWrapper.setProperty("paginationPageSize",e)},e.prototype.paginationGetCurrentPage=function(){return this.paginationProxy.getCurrentPage()},e.prototype.paginationGetTotalPages=function(){return this.paginationProxy.getTotalPages()},e.prototype.paginationGetRowCount=function(){return this.paginationProxy.getTotalRowCount()},e.prototype.paginationGoToNextPage=function(){this.paginationProxy.goToNextPage()},e.prototype.paginationGoToPreviousPage=function(){this.paginationProxy.goToPreviousPage()},e.prototype.paginationGoToFirstPage=function(){this.paginationProxy.goToFirstPage()},e.prototype.paginationGoToLastPage=function(){this.paginationProxy.goToLastPage()},e.prototype.paginationGoToPage=function(e){this.paginationProxy.goToPage(e)},r([f.Autowired("immutableService"),n("design:type",w.ImmutableService)],e.prototype,"immutableService",void 0),r([f.Autowired("csvCreator"),n("design:type",i.CsvCreator)],e.prototype,"csvCreator",void 0),r([f.Optional("excelCreator"),n("design:type",Object)],e.prototype,"excelCreator",void 0),r([f.Autowired("rowRenderer"),n("design:type",s.RowRenderer)],e.prototype,"rowRenderer",void 0),r([f.Autowired("filterManager"),n("design:type",a.FilterManager)],e.prototype,"filterManager",void 0),r([f.Autowired("columnController"),n("design:type",l.ColumnController)],e.prototype,"columnController",void 0),r([f.Autowired("selectionController"),n("design:type",p.SelectionController)],e.prototype,"selectionController",void 0),r([f.Autowired("gridOptionsWrapper"),n("design:type",u.GridOptionsWrapper)],e.prototype,"gridOptionsWrapper",void 0),r([f.Autowired("valueService"),n("design:type",d.ValueService)],e.prototype,"valueService",void 0),r([f.Autowired("alignedGridsService"),n("design:type",_.AlignedGridsService)],e.prototype,"alignedGridsService",void 0),r([f.Autowired("eventService"),n("design:type",c.EventService)],e.prototype,"eventService",void 0),r([f.Autowired("pinnedRowModel"),n("design:type",b.PinnedRowModel)],e.prototype,"pinnedRowModel",void 0),r([f.Autowired("context"),n("design:type",f.Context)],e.prototype,"context",void 0),r([f.Autowired("rowModel"),n("design:type",Object)],e.prototype,"rowModel",void 0),r([f.Autowired("sortController"),n("design:type",g.SortController)],e.prototype,"sortController",void 0),r([f.Autowired("paginationProxy"),n("design:type",C.PaginationProxy)],e.prototype,"paginationProxy",void 0),r([f.Autowired("focusedCellController"),n("design:type",m.FocusedCellController)],e.prototype,"focusedCellController",void 0),r([f.Optional("rangeController"),n("design:type",Object)],e.prototype,"rangeController",void 0),r([f.Optional("clipboardService"),n("design:type",Object)],e.prototype,"clipboardService",void 0),r([f.Optional("aggFuncService"),n("design:type",Object)],e.prototype,"aggFuncService",void 0),r([f.Autowired("menuFactory"),n("design:type",Object)],e.prototype,"menuFactory",void 0),r([f.Optional("contextMenuFactory"),n("design:type",Object)],e.prototype,"contextMenuFactory",void 0),r([f.Autowired("cellRendererFactory"),n("design:type",v.CellRendererFactory)],e.prototype,"cellRendererFactory",void 0),r([f.Autowired("valueCache"),n("design:type",E.ValueCache)],e.prototype,"valueCache",void 0),r([f.Optional("sideBarComp"),n("design:type",Object)],e.prototype,"sideBarComp",void 0),r([f.Autowired("animationFrameService"),n("design:type",R.AnimationFrameService)],e.prototype,"animationFrameService",void 0),r([f.Optional("statusBarService"),n("design:type",Object)],e.prototype,"statusBarService",void 0),r([f.PostConstruct,n("design:type",Function),n("design:paramtypes",[]),n("design:returntype",void 0)],e.prototype,"init",null),r([f.Bean("gridApi")],e)}();t.GridApi=O},41451:function(e,t,o){var r,n=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o])},r(e,t)},function(e,t){function o(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)}),i=this&&this.__decorate||function(e,t,o,r){var n,i=arguments.length,s=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,o):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,o,r);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(s=(i<3?n(s):i>3?n(t,o,s):n(t,o))||s);return i>3&&s&&Object.defineProperty(t,o,s),s},s=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)};Object.defineProperty(t,"__esModule",{value:!0});var a=o(8534),l=o(60843),p=o(63405),u=o(72493),d=o(44081),c=o(13887),h=o(54828),f=o(44871),g=o(40797),m=o(83423),y=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),t.prototype.registerGridComp=function(e){this.gridPanel=e,this.addDestroyableEventListener(this.eventService,p.Events.EVENT_BODY_HEIGHT_CHANGED,this.onBodyHeightChanged.bind(this)),this.addDestroyableEventListener(this.eventService,p.Events.EVENT_SCROLL_VISIBILITY_CHANGED,this.onScrollVisibilityChanged.bind(this)),this.checkPageSize()},t.prototype.notActive=function(){return!this.gridOptionsWrapper.isPaginationAutoPageSize()},t.prototype.onScrollVisibilityChanged=function(){this.checkPageSize()},t.prototype.onBodyHeightChanged=function(){this.checkPageSize()},t.prototype.checkPageSize=function(){if(!this.notActive()){var e=this.gridOptionsWrapper.getRowHeightAsNumber(),t=this.gridPanel.getBodyHeight();if(t>0){var o=Math.floor(t/e);this.gridOptionsWrapper.setProperty("paginationPageSize",o)}}},i([u.Autowired("eventService"),s("design:type",l.EventService)],t.prototype,"eventService",void 0),i([u.Autowired("gridOptionsWrapper"),s("design:type",d.GridOptionsWrapper)],t.prototype,"gridOptionsWrapper",void 0),i([u.Autowired("scrollVisibleService"),s("design:type",c.ScrollVisibleService)],t.prototype,"scrollVisibleService",void 0),i([u.Bean("paginationAutoPageSizeService")],t)}(a.BeanStub);t.PaginationAutoPageSizeService=y;var v=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.currentPage=0,t.topRowIndex=0,t.bottomRowIndex=0,t.pixelOffset=0,t}return n(t,e),t.prototype.postConstruct=function(){this.active=this.gridOptionsWrapper.isPagination(),this.addDestroyableEventListener(this.eventService,p.Events.EVENT_MODEL_UPDATED,this.onModelUpdated.bind(this)),this.addDestroyableEventListener(this.gridOptionsWrapper,"paginationPageSize",this.onModelUpdated.bind(this)),this.onModelUpdated()},t.prototype.ensureRowHeightsValid=function(e,t,o,r){var n=this.rowModel.ensureRowHeightsValid(e,t,this.getPageFirstRow(),this.getPageLastRow());return n&&this.setIndexesAndBounds(),n},t.prototype.isLastRowFound=function(){return this.rowModel.isLastRowFound()},t.prototype.onModelUpdated=function(e){this.setIndexesAndBounds();var t={type:p.Events.EVENT_PAGINATION_CHANGED,animate:!!e&&e.animate,newData:!!e&&e.newData,newPage:!!e&&e.newPage,keepRenderedRows:!!e&&e.keepRenderedRows,api:this.gridApi,columnApi:this.columnApi};this.eventService.dispatchEvent(t)},t.prototype.goToPage=function(e){if(this.active&&this.currentPage!==e){this.currentPage=e;var t={type:p.Events.EVENT_MODEL_UPDATED,animate:!1,keepRenderedRows:!1,newData:!1,newPage:!0,api:this.gridApi,columnApi:this.columnApi};this.onModelUpdated(t)}},t.prototype.getPixelOffset=function(){return this.pixelOffset},t.prototype.getRow=function(e){return this.rowModel.getRow(e)},t.prototype.getRowNode=function(e){return this.rowModel.getRowNode(e)},t.prototype.getRowIndexAtPixel=function(e){return this.rowModel.getRowIndexAtPixel(e)},t.prototype.getCurrentPageHeight=function(){return m._.missing(this.topRowBounds)||m._.missing(this.bottomRowBounds)?0:this.bottomRowBounds.rowTop+this.bottomRowBounds.rowHeight-this.topRowBounds.rowTop},t.prototype.isRowPresent=function(e){return!!this.rowModel.isRowPresent(e)&&e.rowIndex>=this.topRowIndex&&e.rowIndex<=this.bottomRowIndex},t.prototype.isEmpty=function(){return this.rowModel.isEmpty()},t.prototype.isRowsToRender=function(){return this.rowModel.isRowsToRender()},t.prototype.getNodesInRangeForSelection=function(e,t){return this.rowModel.getNodesInRangeForSelection(e,t)},t.prototype.forEachNode=function(e){return this.rowModel.forEachNode(e)},t.prototype.getType=function(){return this.rowModel.getType()},t.prototype.getRowBounds=function(e){return this.rowModel.getRowBounds(e)},t.prototype.getPageFirstRow=function(){return this.pageSize*this.currentPage},t.prototype.getPageLastRow=function(){var e=this.pageSize*(this.currentPage+1)-1,t=this.rowModel.getPageLastRow();return t>e?e:t},t.prototype.getRowCount=function(){return this.rowModel.getRowCount()},t.prototype.goToPageWithIndex=function(e){if(this.active){var t=Math.floor(e/this.pageSize);this.goToPage(t)}},t.prototype.getTotalRowCount=function(){return this.rowModel.getPageLastRow()+1},t.prototype.isLastPageFound=function(){return this.rowModel.isLastRowFound()},t.prototype.getCurrentPage=function(){return this.currentPage},t.prototype.goToNextPage=function(){this.goToPage(this.currentPage+1)},t.prototype.goToPreviousPage=function(){this.goToPage(this.currentPage-1)},t.prototype.goToFirstPage=function(){this.goToPage(0)},t.prototype.goToLastPage=function(){var e=this.rowModel.getPageLastRow()+1,t=Math.floor(e/this.pageSize);this.goToPage(t)},t.prototype.getPageSize=function(){return this.pageSize},t.prototype.getTotalPages=function(){return this.totalPages},t.prototype.setPageSize=function(){this.pageSize=this.gridOptionsWrapper.getPaginationPageSize(),this.pageSize>=1||(this.pageSize=100)},t.prototype.setIndexesAndBounds=function(){if(this.active){this.setPageSize();var e=this.getTotalRowCount();this.totalPages=Math.floor((e-1)/this.pageSize)+1,this.currentPage>=this.totalPages&&(this.currentPage=this.totalPages-1),(!m._.isNumeric(this.currentPage)||this.currentPage<0)&&(this.currentPage=0),this.topRowIndex=this.pageSize*this.currentPage,this.bottomRowIndex=this.pageSize*(this.currentPage+1)-1;var t=this.rowModel.getPageLastRow();this.bottomRowIndex>t&&(this.bottomRowIndex=t)}else this.pageSize=this.rowModel.getPageLastRow()+1,this.totalPages=1,this.currentPage=0,this.topRowIndex=0,this.bottomRowIndex=this.rowModel.getPageLastRow();this.topRowBounds=this.rowModel.getRowBounds(this.topRowIndex),this.bottomRowBounds=this.rowModel.getRowBounds(this.bottomRowIndex),this.pixelOffset=m._.exists(this.topRowBounds)?this.topRowBounds.rowTop:0},i([u.Autowired("rowModel"),s("design:type",Object)],t.prototype,"rowModel",void 0),i([u.Autowired("eventService"),s("design:type",l.EventService)],t.prototype,"eventService",void 0),i([u.Autowired("gridOptionsWrapper"),s("design:type",d.GridOptionsWrapper)],t.prototype,"gridOptionsWrapper",void 0),i([u.Autowired("selectionController"),s("design:type",h.SelectionController)],t.prototype,"selectionController",void 0),i([u.Autowired("columnApi"),s("design:type",f.ColumnApi)],t.prototype,"columnApi",void 0),i([u.Autowired("gridApi"),s("design:type",g.GridApi)],t.prototype,"gridApi",void 0),i([u.PostConstruct,s("design:type",Function),s("design:paramtypes",[]),s("design:returntype",void 0)],t.prototype,"postConstruct",null),i([u.Bean("paginationProxy")],t)}(a.BeanStub);t.PaginationProxy=v},41832:function(e,t,o){var r=this&&this.__decorate||function(e,t,o,r){var n,i=arguments.length,s=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,o):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,o,r);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(s=(i<3?n(s):i>3?n(t,o,s):n(t,o))||s);return i>3&&s&&Object.defineProperty(t,o,s),s},n=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)};Object.defineProperty(t,"__esModule",{value:!0});var i=o(10042),s=o(72493),a=o(44081),l=o(78481),p=function(){function e(){}return e.prototype.registerGridComp=function(e){this.gridPanel=e},e.prototype.registerHeaderRootComp=function(e){this.headerRootComp=e},e.prototype.getPreferredWidthForColumn=function(e){var t=this.getHeaderCellForColumn(e);if(!t)return-1;var o=document.createElement("span");o.style.position="fixed";var r=this.gridPanel.getCenterContainer();r.appendChild(o),this.putRowCellsIntoDummyContainer(e,o),this.cloneItemIntoDummy(t,o);var n=o.offsetWidth;return r.removeChild(o),n+this.gridOptionsWrapper.getAutoSizePadding()},e.prototype.getHeaderCellForColumn=function(e){var t=null;return this.headerRootComp.forEachHeaderElement((function(o){if(o instanceof l.HeaderWrapperComp){var r=o;r.getColumn()===e&&(t=r)}})),t?t.getGui():null},e.prototype.putRowCellsIntoDummyContainer=function(e,t){var o=this;this.rowRenderer.getAllCellsForColumn(e).forEach((function(e){return o.cloneItemIntoDummy(e,t)}))},e.prototype.cloneItemIntoDummy=function(e,t){var o=e.cloneNode(!0);o.style.width="",o.style.position="static",o.style.left="";var r=document.createElement("div");r.style.display="table-row",r.appendChild(o),t.appendChild(r)},r([s.Autowired("rowRenderer"),n("design:type",i.RowRenderer)],e.prototype,"rowRenderer",void 0),r([s.Autowired("gridOptionsWrapper"),n("design:type",a.GridOptionsWrapper)],e.prototype,"gridOptionsWrapper",void 0),r([s.Bean("autoWidthCalculator")],e)}();t.AutoWidthCalculator=p},42195:function(e,t,o){var r=this&&this.__decorate||function(e,t,o,r){var n,i=arguments.length,s=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,o):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,o,r);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(s=(i<3?n(s):i>3?n(t,o,s):n(t,o))||s);return i>3&&s&&Object.defineProperty(t,o,s),s},n=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)};Object.defineProperty(t,"__esModule",{value:!0});var i=o(72493),s=o(60843),a=o(63405),l=o(44081),p=o(44871),u=o(98239),d=o(34782),c=o(40797),h=o(23054),f=o(83423),g=function(){function e(){}return e.prototype.init=function(){this.eventService.addEventListener(a.Events.EVENT_COLUMN_PIVOT_MODE_CHANGED,this.clearFocusedCell.bind(this)),this.eventService.addEventListener(a.Events.EVENT_COLUMN_EVERYTHING_CHANGED,this.clearFocusedCell.bind(this)),this.eventService.addEventListener(a.Events.EVENT_COLUMN_GROUP_OPENED,this.clearFocusedCell.bind(this)),this.eventService.addEventListener(a.Events.EVENT_COLUMN_MOVED,this.clearFocusedCell.bind(this)),this.eventService.addEventListener(a.Events.EVENT_COLUMN_PINNED,this.clearFocusedCell.bind(this)),this.eventService.addEventListener(a.Events.EVENT_COLUMN_ROW_GROUP_CHANGED,this.clearFocusedCell.bind(this)),this.eventService.addEventListener(a.Events.EVENT_COLUMN_VISIBLE,this.clearFocusedCell.bind(this))},e.prototype.clearFocusedCell=function(){this.focusedCell=null,this.onCellFocused(!1)},e.prototype.getFocusedCell=function(){return this.focusedCell},e.prototype.getFocusCellToUseAfterRefresh=function(){return this.gridOptionsWrapper.isSuppressFocusAfterRefresh()?null:this.focusedCell&&this.getGridCellForDomElement(document.activeElement)?this.focusedCell:null},e.prototype.getGridCellForDomElement=function(e){for(var t=e;t;){var o=this.gridOptionsWrapper.getDomData(t,h.CellComp.DOM_DATA_KEY_CELL_COMP);if(o)return o.getGridCell();t=t.parentNode}return null},e.prototype.setFocusedCell=function(e,t,o,r){void 0===r&&(r=!1);var n=f._.makeNull(this.columnController.getGridColumn(t));this.focusedCell=new d.GridCell({rowIndex:e,floating:f._.makeNull(o),column:n}),this.onCellFocused(r)},e.prototype.isCellFocused=function(e){return!f._.missing(this.focusedCell)&&this.focusedCell.column===e.column&&this.isRowFocused(e.rowIndex,e.floating)},e.prototype.isRowNodeFocused=function(e){return this.isRowFocused(e.rowIndex,e.rowPinned)},e.prototype.isAnyCellFocused=function(){return!!this.focusedCell},e.prototype.isRowFocused=function(e,t){if(f._.missing(this.focusedCell))return!1;var o=f._.makeNull(t);return this.focusedCell.rowIndex===e&&this.focusedCell.floating===o},e.prototype.onCellFocused=function(e){var t={type:a.Events.EVENT_CELL_FOCUSED,forceBrowserFocus:e,rowIndex:null,column:null,floating:null,api:this.gridApi,columnApi:this.columnApi,rowPinned:null};this.focusedCell&&(t.rowIndex=this.focusedCell.rowIndex,t.column=this.focusedCell.column,t.rowPinned=this.focusedCell.floating),this.eventService.dispatchEvent(t)},r([i.Autowired("eventService"),n("design:type",s.EventService)],e.prototype,"eventService",void 0),r([i.Autowired("gridOptionsWrapper"),n("design:type",l.GridOptionsWrapper)],e.prototype,"gridOptionsWrapper",void 0),r([i.Autowired("columnController"),n("design:type",u.ColumnController)],e.prototype,"columnController",void 0),r([i.Autowired("columnApi"),n("design:type",p.ColumnApi)],e.prototype,"columnApi",void 0),r([i.Autowired("gridApi"),n("design:type",c.GridApi)],e.prototype,"gridApi",void 0),r([i.PostConstruct,n("design:type",Function),n("design:paramtypes",[]),n("design:returntype",void 0)],e.prototype,"init",null),r([i.Bean("focusedCellController")],e)}();t.FocusedCellController=g},42664:function(e,t,o){var r=this&&this.__decorate||function(e,t,o,r){var n,i=arguments.length,s=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,o):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,o,r);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(s=(i<3?n(s):i>3?n(t,o,s):n(t,o))||s);return i>3&&s&&Object.defineProperty(t,o,s),s},n=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)};Object.defineProperty(t,"__esModule",{value:!0});var i=o(72493),s=o(98239),a=o(45727),l=o(54828),p=o(44081),u=o(31887),d=o(7897),c=o(12598),h=o(74517),f=o(50580),g=o(83423),m=function(){function e(e){var t=e.columnController,o=e.valueService,r=e.gridOptionsWrapper,n=e.processCellCallback,i=e.processHeaderCallback,s=e.cellAndHeaderEscaper;this.columnController=t,this.valueService=o,this.gridOptionsWrapper=r,this.processCellCallback=n,this.processHeaderCallback=i,this.cellAndHeaderEscaper=s}return e.prototype.extractHeaderValue=function(e){var t=this.getHeaderName(this.processHeaderCallback,e);return null==t&&(t=""),this.cellAndHeaderEscaper?this.cellAndHeaderEscaper(t):t},e.prototype.extractRowCellValue=function(e,t,o,r){var n,i=this.columnController.getRowGroupColumns().length>0;return n=r&&r.group&&i&&0===t?this.createValueForGroupNode(r):this.valueService.getValue(e,r),null==(n=this.processCell(r,e,n,this.processCellCallback,o))&&(n=""),this.cellAndHeaderEscaper?this.cellAndHeaderEscaper(n):n},e.prototype.getHeaderName=function(e,t){return e?e({column:t,api:this.gridOptionsWrapper.getApi(),columnApi:this.gridOptionsWrapper.getColumnApi(),context:this.gridOptionsWrapper.getContext()}):this.columnController.getDisplayNameForColumn(t,"csv",!0)},e.prototype.createValueForGroupNode=function(e){for(var t=[e.key];e.parent;)e=e.parent,t.push(e.key);return t.reverse().join(" -> ")},e.prototype.processCell=function(e,t,o,r,n){return r?r({column:t,node:e,value:o,api:this.gridOptionsWrapper.getApi(),columnApi:this.gridOptionsWrapper.getColumnApi(),context:this.gridOptionsWrapper.getContext(),type:n}):o},e}();t.BaseGridSerializingSession=m;var y,v=function(){function e(){}return e.prototype.serialize=function(e,t){var o=t&&t.skipGroups,r=t&&t.skipHeader,n=t&&t.columnGroups,i=t&&t.skipFooters,s=t&&t.skipPinnedTop,l=t&&t.skipPinnedBottom,p=t&&t.customHeader,u=t&&t.customFooter,d=t&&t.allColumns,h=t&&t.onlySelected,f=t&&t.columnKeys,m=t&&t.onlySelectedAllPages,y=t&&t.shouldRowBeSkipped||function(){return!1},v=this.gridOptionsWrapper.getApi(),C=this.gridOptionsWrapper.isGroupRemoveSingleChildren(),w=this.gridOptionsWrapper.isGroupRemoveLowestSingleChildren(),E=this.gridOptionsWrapper.getContext(),_=this.columnController.isPivotMode(),b=this.rowModel.getType()===a.Constants.ROW_MODEL_TYPE_CLIENT_SIDE,R=!b&&h,S=[];if(S=g._.existsAndNotEmpty(f)?this.columnController.getGridColumns(f):d&&!_?(S=this.gridOptionsWrapper.isTreeData()?this.columnController.getGridColumns([a.Constants.GROUP_AUTO_COLUMN_ID]):[]).concat(this.columnController.getAllPrimaryColumns()||[]):this.columnController.getAllDisplayedColumns(),p&&e.addCustomHeader(p),e.prepare(S),n){var O=new c.GroupInstanceIdCreator,T=this.displayedGroupCreator.createDisplayedGroups(S,this.columnController.getGridBalancedTree(),O,null);this.recursivelyAddHeaderGroups(T,e)}if(!r){var P=e.onNewHeaderRow();S.forEach((function(e,t){P.onColumn(e,t,void 0)}))}function A(t){var r=w&&t.leafGroup,n=1===t.allChildrenCount&&(C||r);if((!t.group||!o&&!n)&&(!i||!t.footer)&&(!h||t.isSelected())&&(!s||"top"!==t.rowPinned)&&(!l||"bottom"!==t.rowPinned)&&(-1!==t.level||t.leafGroup)&&!y({node:t,api:v,context:E})){var a=e.onNewBodyRow();S.forEach((function(e,o){a.onColumn(e,o,t)}))}}return this.pinnedRowModel.forEachPinnedTopRow(A),_?this.rowModel.forEachPivotNode?this.rowModel.forEachPivotNode(A):this.rowModel.forEachNode(A):m||R?this.selectionController.getSelectedNodes().forEach((function(e){A(e)})):b?this.rowModel.forEachNodeAfterFilterAndSort(A):this.rowModel.forEachNode(A),this.pinnedRowModel.forEachPinnedBottomRow(A),u&&e.addCustomFooter(u),e.parse()},e.prototype.recursivelyAddHeaderGroups=function(e,t){var o=[];e.forEach((function(e){var t=e;t.getChildren&&t.getChildren().forEach((function(e){return o.push(e)}))})),e.length>0&&e[0]instanceof h.ColumnGroup&&this.doAddHeaderHeader(t,e),o&&o.length>0&&this.recursivelyAddHeaderGroups(o,t)},e.prototype.doAddHeaderHeader=function(e,t){var o=this,r=e.onNewHeaderGroupingRow(),n=0;t.forEach((function(e){var t=e,i=o.columnController.getDisplayNameForColumnGroup(t,"header");r.onColumn(i||"",n++,t.getLeafColumns().length-1)}))},r([i.Autowired("displayedGroupCreator"),n("design:type",u.DisplayedGroupCreator)],e.prototype,"displayedGroupCreator",void 0),r([i.Autowired("columnController"),n("design:type",s.ColumnController)],e.prototype,"columnController",void 0),r([i.Autowired("rowModel"),n("design:type",Object)],e.prototype,"rowModel",void 0),r([i.Autowired("pinnedRowModel"),n("design:type",f.PinnedRowModel)],e.prototype,"pinnedRowModel",void 0),r([i.Autowired("selectionController"),n("design:type",l.SelectionController)],e.prototype,"selectionController",void 0),r([i.Autowired("columnFactory"),n("design:type",d.ColumnFactory)],e.prototype,"columnFactory",void 0),r([i.Autowired("gridOptionsWrapper"),n("design:type",p.GridOptionsWrapper)],e.prototype,"gridOptionsWrapper",void 0),r([i.Bean("gridSerializer")],e)}();t.GridSerializer=v,(y=t.RowType||(t.RowType={}))[y.HEADER_GROUPING=0]="HEADER_GROUPING",y[y.HEADER=1]="HEADER",y[y.BODY=2]="BODY"},42726:function(e,t,o){var r=this&&this.__decorate||function(e,t,o,r){var n,i=arguments.length,s=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,o):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,o,r);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(s=(i<3?n(s):i>3?n(t,o,s):n(t,o))||s);return i>3&&s&&Object.defineProperty(t,o,s),s},n=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)};Object.defineProperty(t,"__esModule",{value:!0});var i=o(72493),s=o(55e3),a=o(73575),l=o(44081),p=o(60843),u=o(83423),d=function(){function e(){}return e.prototype.hideActiveMenu=function(){this.hidePopup&&this.hidePopup()},e.prototype.showMenuAfterMouseEvent=function(e,t){var o=this;this.showPopup(e,(function(r){o.popupService.positionPopupUnderMouseEvent({column:e,type:"columnMenu",mouseEvent:t,ePopup:r})}))},e.prototype.showMenuAfterButtonClick=function(e,t){var o=this;this.showPopup(e,(function(r){o.popupService.positionPopupUnderComponent({type:"columnMenu",eventSource:t,ePopup:r,keepWithinBounds:!0,column:e})}))},e.prototype.showPopup=function(e,t){var o,r=this,n=this.filterManager.getOrCreateFilterWrapper(e,"COLUMN_MENU"),i=document.createElement("div");u._.addCssClass(i,"ag-menu"),n.guiPromise.promise.then((function(e){i.appendChild(e)}));var s=function(e){"horizontal"===e.direction&&o()};this.eventService.addEventListener("bodyScroll",s),o=this.popupService.addAsModalPopup(i,!0,(function(){r.eventService.removeEventListener("bodyScroll",s),e.setMenuVisible(!1,"contextMenu")})),t(i),n.filterPromise.then((function(e){if(e.afterGuiAttached){var t={hidePopup:o};e.afterGuiAttached(t)}})),this.hidePopup=o,e.setMenuVisible(!0,"contextMenu")},e.prototype.isMenuEnabled=function(e){return e.isFilterAllowed()},r([i.Autowired("eventService"),n("design:type",p.EventService)],e.prototype,"eventService",void 0),r([i.Autowired("filterManager"),n("design:type",s.FilterManager)],e.prototype,"filterManager",void 0),r([i.Autowired("popupService"),n("design:type",a.PopupService)],e.prototype,"popupService",void 0),r([i.Autowired("gridOptionsWrapper"),n("design:type",l.GridOptionsWrapper)],e.prototype,"gridOptionsWrapper",void 0),r([i.Bean("menuFactory")],e)}();t.StandardMenuFactory=d},43389:(e,t)=>{var o;Object.defineProperty(t,"__esModule",{value:!0}),function(e){e.IdentityCheck="IdentityCheck",e.DeepValueCheck="DeepValueCheck",e.NoCheck="NoCheck"}(o=t.ChangeDetectionStrategyType||(t.ChangeDetectionStrategyType={}));var r=function(){function e(){var e;this.strategyMap=((e={})[o.DeepValueCheck]=new i,e[o.IdentityCheck]=new n((function(e,t){return e===t})),e[o.NoCheck]=new n((function(e,t){return!0})),e)}return e.prototype.getStrategy=function(e){return this.strategyMap[e]},e}();t.ChangeDetectionService=r;var n=function(){function e(e){this.strategy=e}return e.prototype.areEqual=function(e,t){return this.strategy(e,t)},e}(),i=function(){function e(){}return e.prototype.areEqual=function(t,o){return e.areEquivalent(e.copy(t),e.copy(o))},e.unwrapStringOrNumber=function(e){return e instanceof Number||e instanceof String?e.valueOf():e},e.copy=function(e){if(!e)return e;if(Array.isArray(e)){for(var t=[],o=0;o<e.length;o++)t.push(this.copy(e[o]));return t}return"object"!=typeof e?e:[{},e].reduce((function(e,t){return Object.keys(t).forEach((function(o){e[o]=t[o]})),e}),{})},e.areEquivalent=function(t,o){if(t=e.unwrapStringOrNumber(t),o=e.unwrapStringOrNumber(o),t===o)return!0;if(null===t||null===o||typeof t!=typeof o)return!1;if(t instanceof Date)return o instanceof Date&&t.valueOf()===o.valueOf();if("function"==typeof t)return t.toString()===o.toString();if("object"!=typeof t)return t==o;var r=void 0===t.areEquivPropertyTracking,n=void 0===o.areEquivPropertyTracking;try{var i=void 0;if(r)t.areEquivPropertyTracking=[];else if(t.areEquivPropertyTracking.some((function(e){return e===o})))return!0;if(n)o.areEquivPropertyTracking=[];else if(o.areEquivPropertyTracking.some((function(e){return e===t})))return!0;t.areEquivPropertyTracking.push(o),o.areEquivPropertyTracking.push(t);var s={};for(i in t)"areEquivPropertyTracking"!=i&&(s[i]=null);for(i in o)"areEquivPropertyTracking"!=i&&(s[i]=null);for(i in s)if(!this.areEquivalent(t[i],o[i]))return!1;return!0}finally{r&&delete t.areEquivPropertyTracking,n&&delete o.areEquivPropertyTracking}},e}()},43460:function(e,t,o){var r,n=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o])},r(e,t)},function(e,t){function o(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)}),i=this&&this.__decorate||function(e,t,o,r){var n,i=arguments.length,s=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,o):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,o,r);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(s=(i<3?n(s):i>3?n(t,o,s):n(t,o))||s);return i>3&&s&&Object.defineProperty(t,o,s),s},s=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)};Object.defineProperty(t,"__esModule",{value:!0});var a=o(72493),l=o(42664),p=o(33467),u=o(98239),d=o(24463),c=o(44081),h=o(45727),f=o(83423),g="\r\n",m=function(e){function t(t){var o=e.call(this,{columnController:t.columnController,valueService:t.valueService,gridOptionsWrapper:t.gridOptionsWrapper,processCellCallback:t.processCellCallback,processHeaderCallback:t.processHeaderCallback})||this;o.result="",o.lineOpened=!1;var r=t.suppressQuotes,n=t.columnSeparator;return o.suppressQuotes=r,o.columnSeparator=n,o}return n(t,e),t.prototype.prepare=function(e){},t.prototype.addCustomHeader=function(e){e&&(this.result+=e+g)},t.prototype.addCustomFooter=function(e){e&&(this.result+=e+g)},t.prototype.onNewHeaderGroupingRow=function(){return this.lineOpened&&(this.result+=g),{onColumn:this.onNewHeaderGroupingRowColumn.bind(this)}},t.prototype.onNewHeaderGroupingRowColumn=function(e,t,o){0!=t&&(this.result+=this.columnSeparator),this.result+=this.putInQuotes(e,this.suppressQuotes);for(var r=1;r<=o;r++)this.result+=this.columnSeparator+this.putInQuotes("",this.suppressQuotes);this.lineOpened=!0},t.prototype.onNewHeaderRow=function(){return this.lineOpened&&(this.result+=g),{onColumn:this.onNewHeaderRowColumn.bind(this)}},t.prototype.onNewHeaderRowColumn=function(e,t,o){0!=t&&(this.result+=this.columnSeparator),this.result+=this.putInQuotes(this.extractHeaderValue(e),this.suppressQuotes),this.lineOpened=!0},t.prototype.onNewBodyRow=function(){return this.lineOpened&&(this.result+=g),{onColumn:this.onNewBodyRowColumn.bind(this)}},t.prototype.onNewBodyRowColumn=function(e,t,o){0!=t&&(this.result+=this.columnSeparator),this.result+=this.putInQuotes(this.extractRowCellValue(e,t,h.Constants.EXPORT_TYPE_CSV,o),this.suppressQuotes),this.lineOpened=!0},t.prototype.putInQuotes=function(e,t){return t?e:null==e?'""':("string"==typeof e?o=e:"function"==typeof e.toString?o=e.toString():(console.warn("unknown value type during csv conversion"),o=""),'"'+o.replace(/"/g,'""')+'"');var o},t.prototype.parse=function(){return this.result},t}(l.BaseGridSerializingSession);t.CsvSerializingSession=m;var y=function(){function e(){}return e.prototype.setBeans=function(e){this.beans=e},e.prototype.export=function(e){if(this.isExportSuppressed())return console.warn("ag-grid: Export cancelled. Export is not allowed as per your configuration."),"";var t=this.getMergedParamsAndData(e),o=t.mergedParams,r=t.data,n=o&&o.fileName&&0!==o.fileName.length?o.fileName:this.getDefaultFileName();return-1===n.indexOf(".")&&(n=n+"."+this.getDefaultFileExtension()),this.beans.downloader.download(n,this.packageFile(r)),r},e.prototype.getData=function(e){return this.getMergedParamsAndData(e).data},e.prototype.getMergedParamsAndData=function(e){var t=this.mergeDefaultParams(e);return{mergedParams:t,data:this.beans.gridSerializer.serialize(this.createSerializingSession(t),t)}},e.prototype.mergeDefaultParams=function(e){var t=this.beans.gridOptionsWrapper.getDefaultExportParams(),o={};return f._.assign(o,t),f._.assign(o,e),o},e.prototype.packageFile=function(e){return new Blob(["\ufeff",e],{type:window.navigator.msSaveOrOpenBlob?this.getMimeType():"octet/stream"})},e}();t.BaseCreator=y;var v=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),t.prototype.postConstruct=function(){this.setBeans({downloader:this.downloader,gridSerializer:this.gridSerializer,gridOptionsWrapper:this.gridOptionsWrapper})},t.prototype.exportDataAsCsv=function(e){return this.export(e)},t.prototype.getDataAsCsv=function(e){return this.getData(e)},t.prototype.getMimeType=function(){return"text/csv;charset=utf-8;"},t.prototype.getDefaultFileName=function(){return"export.csv"},t.prototype.getDefaultFileExtension=function(){return"csv"},t.prototype.createSerializingSession=function(e){var t=this,o=t.columnController,r=t.valueService,n=t.gridOptionsWrapper,i=e,s=i.processCellCallback,a=i.processHeaderCallback,l=i.suppressQuotes,p=i.columnSeparator;return new m({columnController:o,valueService:r,gridOptionsWrapper:n,processCellCallback:s||void 0,processHeaderCallback:a||void 0,suppressQuotes:l||!1,columnSeparator:p||","})},t.prototype.isExportSuppressed=function(){return this.gridOptionsWrapper.isSuppressCsvExport()},i([a.Autowired("columnController"),s("design:type",u.ColumnController)],t.prototype,"columnController",void 0),i([a.Autowired("valueService"),s("design:type",d.ValueService)],t.prototype,"valueService",void 0),i([a.Autowired("downloader"),s("design:type",p.Downloader)],t.prototype,"downloader",void 0),i([a.Autowired("gridSerializer"),s("design:type",l.GridSerializer)],t.prototype,"gridSerializer",void 0),i([a.Autowired("gridOptionsWrapper"),s("design:type",c.GridOptionsWrapper)],t.prototype,"gridOptionsWrapper",void 0),i([a.PostConstruct,s("design:type",Function),s("design:paramtypes",[]),s("design:returntype",void 0)],t.prototype,"postConstruct",null),i([a.Bean("csvCreator")],t)}(y);t.CsvCreator=v},43878:function(e,t,o){var r=this&&this.__decorate||function(e,t,o,r){var n,i=arguments.length,s=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,o):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,o,r);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(s=(i<3?n(s):i>3?n(t,o,s):n(t,o))||s);return i>3&&s&&Object.defineProperty(t,o,s),s},n=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)};Object.defineProperty(t,"__esModule",{value:!0});var i=o(72493),s=o(26016),a=o(44081),l=o(98239),p=o(7897),u=o(45727),d=o(83423),c=function(){function e(){}var t;return t=e,e.prototype.createAutoGroupColumns=function(e){var t=this,o=[],r=this.gridOptionsWrapper.isTreeData(),n=this.gridOptionsWrapper.isGroupMultiAutoColumn();return r&&n&&(console.warn("ag-Grid: you cannot mix groupMultiAutoColumn with treeData, only one column can be used to display groups when doing tree data"),n=!1),n?e.forEach((function(e,r){o.push(t.createOneAutoGroupColumn(e,r))})):o.push(this.createOneAutoGroupColumn()),o},e.prototype.createOneAutoGroupColumn=function(e,o){var r,n=this.generateDefaultColDef(e);r=e?u.Constants.GROUP_AUTO_COLUMN_ID+"-"+e.getId():t.GROUP_AUTO_COLUMN_BUNDLE_ID;var i=this.gridOptionsWrapper.getAutoGroupColumnDef();d._.mergeDeep(n,i),(n=this.columnFactory.mergeColDefs(n)).colId=r,this.gridOptionsWrapper.isTreeData()||d._.missing(n.field)&&d._.missing(n.valueGetter)&&d._.missing(n.filterValueGetter)&&(n.filter=!1),o&&o>0&&(n.headerCheckboxSelection=!1);var a=new s.Column(n,null,r,!0);return this.context.wireBean(a),a},e.prototype.generateDefaultColDef=function(e){var t=this.gridOptionsWrapper.getAutoGroupColumnDef(),o={headerName:this.gridOptionsWrapper.getLocaleTextFunc()("group","Group"),enableRowGroup:!0};if(t&&(t.cellRenderer||t.cellRendererFramework)||(o.cellRenderer="agGroupCellRenderer"),e){var r=e.getColDef();d._.assign(o,{headerName:this.columnController.getDisplayNameForColumn(e,"header"),headerValueGetter:r.headerValueGetter}),r.cellRenderer&&d._.assign(o,{cellRendererParams:{innerRenderer:r.cellRenderer,innerRendererParams:r.cellRendererParams}}),o.showRowGroup=e.getColId()}else o.showRowGroup=!0;return o},e.GROUP_AUTO_COLUMN_BUNDLE_ID=u.Constants.GROUP_AUTO_COLUMN_ID,r([i.Autowired("gridOptionsWrapper"),n("design:type",a.GridOptionsWrapper)],e.prototype,"gridOptionsWrapper",void 0),r([i.Autowired("context"),n("design:type",i.Context)],e.prototype,"context",void 0),r([i.Autowired("columnController"),n("design:type",l.ColumnController)],e.prototype,"columnController",void 0),r([i.Autowired("columnFactory"),n("design:type",p.ColumnFactory)],e.prototype,"columnFactory",void 0),t=r([i.Bean("autoGroupColService")],e)}();t.AutoGroupColService=c},44081:function(e,t,o){var r=this&&this.__decorate||function(e,t,o,r){var n,i=arguments.length,s=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,o):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,o,r);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(s=(i<3?n(s):i>3?n(t,o,s):n(t,o))||s);return i>3&&s&&Object.defineProperty(t,o,s),s},n=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},i=this&&this.__param||function(e,t){return function(o,r){t(o,r,e)}};Object.defineProperty(t,"__esModule",{value:!0});var s=o(60843),a=o(45727),l=o(97156),p=o(40797),u=o(72493),d=o(44871),c=o(98239),h=o(59007),f=o(37789),g=o(80834),m=o(85222),y=o(23801),v=o(96896),C=o(83423);function w(e){return!0===e||"true"===e}var E=function(){function e(){this.propertyEventService=new s.EventService,this.domDataKey="__AG_"+Math.random().toString(),this.layoutElements=[]}var t;return t=e,e.prototype.agWire=function(e,t){this.gridOptions.api=e,this.gridOptions.columnApi=t,this.checkForDeprecated(),this.checkForViolations()},e.prototype.destroy=function(){this.gridOptions.api=null,this.gridOptions.columnApi=null},e.prototype.init=function(){!0!==this.gridOptions.suppressPropertyNamesCheck&&(this.checkGridOptionsProperties(),this.checkColumnDefProperties());var e=this.useAsyncEvents();this.eventService.addGlobalListener(this.globalEventHandler.bind(this),e),this.isGroupSelectsChildren()&&this.isSuppressParentsInRowNodes()&&console.warn("ag-Grid: groupSelectsChildren does not work wth suppressParentsInRowNodes, this selection method needs the part in rowNode to work"),this.isGroupSelectsChildren()&&(this.isRowSelectionMulti()||console.warn("ag-Grid: rowSelection must be 'multiple' for groupSelectsChildren to make sense"),this.isRowModelServerSide()&&console.warn("ag-Grid: group selects children is NOT support for Server Side Row Model. This is because the rows are lazy loaded, so selecting a group is not possible asthe grid has no way of knowing what the children are.")),this.isGroupRemoveSingleChildren()&&this.isGroupHideOpenParents()&&console.warn("ag-Grid: groupRemoveSingleChildren and groupHideOpenParents do not work with each other, you need to pick one. And don't ask us how to us these together on our support forum either you will get the same answer!"),this.addEventListener(t.PROP_DOM_LAYOUT,this.updateLayoutClasses.bind(this))},e.prototype.checkColumnDefProperties=function(){var e=this;null!=this.gridOptions.columnDefs&&this.gridOptions.columnDefs.forEach((function(t){var o=Object.getOwnPropertyNames(t),r=g.ColDefUtil.ALL_PROPERTIES.concat(g.ColDefUtil.FRAMEWORK_PROPERTIES);e.checkProperties(o,r,r,"colDef","https://www.ag-grid.com/javascript-grid-column-properties/")}))},e.prototype.checkGridOptionsProperties=function(){var e=Object.getOwnPropertyNames(this.gridOptions),t=f.PropertyKeys.ALL_PROPERTIES.concat(f.PropertyKeys.FRAMEWORK_PROPERTIES);Object.keys(m.Events).forEach((function(e){return t.push(l.ComponentUtil.getCallbackForEvent(m.Events[e]))}));var o=t.concat("api","columnApi");this.checkProperties(e,o,t,"gridOptions","https://www.ag-grid.com/javascript-grid-properties/")},e.prototype.checkProperties=function(e,t,o,r,n){var i=C._.fuzzyCheckStrings(e,t,o),s=Object.keys(i);s.forEach((function(e){var t=i[e];console.warn("ag-grid: invalid "+r+" property '"+e+"' did you mean any of these: "+t.slice(0,8).join(","))})),s.length>0&&console.warn("ag-grid: to see all the valid "+r+" properties please check: "+n)},e.prototype.getDomData=function(e,t){var o=e[this.domDataKey];if(o)return o[t]},e.prototype.setDomData=function(e,t,o){var r=e[this.domDataKey];C._.missing(r)&&(r={},e[this.domDataKey]=r),r[t]=o},e.prototype.isEnterprise=function(){return this.enterprise},e.prototype.isRowSelection=function(){return"single"===this.gridOptions.rowSelection||"multiple"===this.gridOptions.rowSelection},e.prototype.isRowDeselection=function(){return w(this.gridOptions.rowDeselection)},e.prototype.isRowSelectionMulti=function(){return"multiple"===this.gridOptions.rowSelection},e.prototype.isRowMultiSelectWithClick=function(){return w(this.gridOptions.rowMultiSelectWithClick)},e.prototype.getContext=function(){return this.gridOptions.context},e.prototype.isPivotMode=function(){return w(this.gridOptions.pivotMode)},e.prototype.isPivotTotals=function(){return w(this.gridOptions.pivotTotals)},e.prototype.getPivotColumnGroupTotals=function(){return this.gridOptions.pivotColumnGroupTotals},e.prototype.getPivotRowTotals=function(){return this.gridOptions.pivotRowTotals},e.prototype.isRowModelInfinite=function(){return this.gridOptions.rowModelType===a.Constants.ROW_MODEL_TYPE_INFINITE},e.prototype.isRowModelViewport=function(){return this.gridOptions.rowModelType===a.Constants.ROW_MODEL_TYPE_VIEWPORT},e.prototype.isRowModelServerSide=function(){return this.gridOptions.rowModelType===a.Constants.ROW_MODEL_TYPE_SERVER_SIDE},e.prototype.isRowModelDefault=function(){return C._.missing(this.gridOptions.rowModelType)||this.gridOptions.rowModelType===a.Constants.ROW_MODEL_TYPE_CLIENT_SIDE||this.gridOptions.rowModelType===a.Constants.DEPRECATED_ROW_MODEL_TYPE_NORMAL},e.prototype.isFullRowEdit=function(){return"fullRow"===this.gridOptions.editType},e.prototype.isSuppressFocusAfterRefresh=function(){return w(this.gridOptions.suppressFocusAfterRefresh)},e.prototype.isSuppressBrowserResizeObserver=function(){return w(this.gridOptions.suppressBrowserResizeObserver)},e.prototype.isSuppressMaintainUnsortedOrder=function(){return w(this.gridOptions.suppressMaintainUnsortedOrder)},e.prototype.isShowToolPanel=function(){return w(this.gridOptions.sideBar&&Array.isArray(this.getSideBar().toolPanels))},e.prototype.getSideBar=function(){return this.gridOptions.sideBar},e.prototype.isSuppressTouch=function(){return w(this.gridOptions.suppressTouch)},e.prototype.isSuppressRowTransform=function(){return w(this.gridOptions.suppressRowTransform)},e.prototype.isSuppressSetColumnStateEvents=function(){return w(this.gridOptions.suppressSetColumnStateEvents)},e.prototype.useAsyncEvents=function(){return!w(this.gridOptions.suppressAsyncEvents)},e.prototype.isEnableCellChangeFlash=function(){return w(this.gridOptions.enableCellChangeFlash)},e.prototype.isGroupSelectsChildren=function(){var e=w(this.gridOptions.groupSelectsChildren);return e&&this.isTreeData()?(console.warn("ag-Grid: groupSelectsChildren does not work with tree data"),!1):e},e.prototype.isSuppressRowHoverHighlight=function(){return w(this.gridOptions.suppressRowHoverHighlight)},e.prototype.isGroupSelectsFiltered=function(){return w(this.gridOptions.groupSelectsFiltered)},e.prototype.isGroupHideOpenParents=function(){return w(this.gridOptions.groupHideOpenParents)},e.prototype.isGroupMultiAutoColumn=function(){return w(this.gridOptions.groupMultiAutoColumn)||w(this.gridOptions.groupHideOpenParents)},e.prototype.isGroupRemoveSingleChildren=function(){return w(this.gridOptions.groupRemoveSingleChildren)},e.prototype.isGroupRemoveLowestSingleChildren=function(){return w(this.gridOptions.groupRemoveLowestSingleChildren)},e.prototype.isGroupIncludeFooter=function(){return w(this.gridOptions.groupIncludeFooter)},e.prototype.isGroupIncludeTotalFooter=function(){return w(this.gridOptions.groupIncludeTotalFooter)},e.prototype.isGroupSuppressBlankHeader=function(){return w(this.gridOptions.groupSuppressBlankHeader)},e.prototype.isSuppressRowClickSelection=function(){return w(this.gridOptions.suppressRowClickSelection)},e.prototype.isSuppressCellSelection=function(){return w(this.gridOptions.suppressCellSelection)},e.prototype.isSuppressMultiSort=function(){return w(this.gridOptions.suppressMultiSort)},e.prototype.isMultiSortKeyCtrl=function(){return"ctrl"===this.gridOptions.multiSortKey},e.prototype.isGroupSuppressAutoColumn=function(){return w(this.gridOptions.groupSuppressAutoColumn)},e.prototype.isSuppressDragLeaveHidesColumns=function(){return w(this.gridOptions.suppressDragLeaveHidesColumns)},e.prototype.isSuppressScrollOnNewData=function(){return w(this.gridOptions.suppressScrollOnNewData)},e.prototype.isRowDragManaged=function(){return w(this.gridOptions.rowDragManaged)},e.prototype.isSuppressRowDrag=function(){return w(this.gridOptions.suppressRowDrag)},e.prototype.getDomLayout=function(){var e=this,t=this.gridOptions.domLayout;return t===a.Constants.DOM_LAYOUT_PRINT||t===a.Constants.DOM_LAYOUT_AUTO_HEIGHT||t===a.Constants.DOM_LAYOUT_NORMAL?t:(null==t||C._.doOnce((function(){return console.warn("ag-Grid: "+e.gridOptions.domLayout+" is not valid for DOM Layout, valid values are "+a.Constants.DOM_LAYOUT_NORMAL+", "+a.Constants.DOM_LAYOUT_AUTO_HEIGHT+" and "+a.Constants.DOM_LAYOUT_PRINT)}),"warn about dom layout values"),a.Constants.DOM_LAYOUT_NORMAL)},e.prototype.isSuppressHorizontalScroll=function(){return w(this.gridOptions.suppressHorizontalScroll)},e.prototype.isSuppressMaxRenderedRowRestriction=function(){return w(this.gridOptions.suppressMaxRenderedRowRestriction)},e.prototype.isExcludeChildrenWhenTreeDataFiltering=function(){return w(this.gridOptions.excludeChildrenWhenTreeDataFiltering)},e.prototype.isAlwaysShowVerticalScroll=function(){return w(this.gridOptions.alwaysShowVerticalScroll)},e.prototype.isSuppressLoadingOverlay=function(){return w(this.gridOptions.suppressLoadingOverlay)},e.prototype.isSuppressNoRowsOverlay=function(){return w(this.gridOptions.suppressNoRowsOverlay)},e.prototype.isSuppressFieldDotNotation=function(){return w(this.gridOptions.suppressFieldDotNotation)},e.prototype.getPinnedTopRowData=function(){return this.gridOptions.pinnedTopRowData},e.prototype.getPinnedBottomRowData=function(){return this.gridOptions.pinnedBottomRowData},e.prototype.isFunctionsPassive=function(){return w(this.gridOptions.functionsPassive)},e.prototype.isSuppressTabbing=function(){return w(this.gridOptions.suppressTabbing)},e.prototype.isSuppressChangeDetection=function(){return w(this.gridOptions.suppressChangeDetection)},e.prototype.isSuppressAnimationFrame=function(){return w(this.gridOptions.suppressAnimationFrame)},e.prototype.getQuickFilterText=function(){return this.gridOptions.quickFilterText},e.prototype.isCacheQuickFilter=function(){return w(this.gridOptions.cacheQuickFilter)},e.prototype.isUnSortIcon=function(){return w(this.gridOptions.unSortIcon)},e.prototype.isSuppressMenuHide=function(){return w(this.gridOptions.suppressMenuHide)},e.prototype.isEnterMovesDownAfterEdit=function(){return w(this.gridOptions.enterMovesDownAfterEdit)},e.prototype.isEnterMovesDown=function(){return w(this.gridOptions.enterMovesDown)},e.prototype.getRowStyle=function(){return this.gridOptions.rowStyle},e.prototype.getRowClass=function(){return this.gridOptions.rowClass},e.prototype.getRowStyleFunc=function(){return this.gridOptions.getRowStyle},e.prototype.getRowClassFunc=function(){return this.gridOptions.getRowClass},e.prototype.rowClassRules=function(){return this.gridOptions.rowClassRules},e.prototype.getPopupParent=function(){return this.gridOptions.popupParent},e.prototype.getBlockLoadDebounceMillis=function(){return this.gridOptions.blockLoadDebounceMillis},e.prototype.getPostProcessPopupFunc=function(){return this.gridOptions.postProcessPopup},e.prototype.getDoesDataFlowerFunc=function(){return this.gridOptions.doesDataFlower},e.prototype.getPaginationNumberFormatterFunc=function(){return this.gridOptions.paginationNumberFormatter},e.prototype.getChildCountFunc=function(){return this.gridOptions.getChildCount},e.prototype.getDefaultGroupSortComparator=function(){return this.gridOptions.defaultGroupSortComparator},e.prototype.getIsFullWidthCellFunc=function(){return this.gridOptions.isFullWidthCell},e.prototype.getFullWidthCellRendererParams=function(){return this.gridOptions.fullWidthCellRendererParams},e.prototype.isEmbedFullWidthRows=function(){return w(this.gridOptions.deprecatedEmbedFullWidthRows)},e.prototype.getSuppressKeyboardEventFunc=function(){return this.gridOptions.suppressKeyboardEvent},e.prototype.getBusinessKeyForNodeFunc=function(){return this.gridOptions.getBusinessKeyForNode},e.prototype.getApi=function(){return this.gridOptions.api},e.prototype.getColumnApi=function(){return this.gridOptions.columnApi},e.prototype.isDeltaRowDataMode=function(){return w(this.gridOptions.deltaRowDataMode)},e.prototype.isDeltaColumnMode=function(){return w(this.gridOptions.deltaColumnMode)},e.prototype.isEnsureDomOrder=function(){return w(this.gridOptions.ensureDomOrder)},e.prototype.isEnableCharts=function(){return w(this.gridOptions.enableCharts)},e.prototype.getColResizeDefault=function(){return this.gridOptions.colResizeDefault},e.prototype.isSingleClickEdit=function(){return w(this.gridOptions.singleClickEdit)},e.prototype.isSuppressClickEdit=function(){return w(this.gridOptions.suppressClickEdit)},e.prototype.isStopEditingWhenGridLosesFocus=function(){return w(this.gridOptions.stopEditingWhenGridLosesFocus)},e.prototype.getGroupDefaultExpanded=function(){return this.gridOptions.groupDefaultExpanded},e.prototype.getMaxConcurrentDatasourceRequests=function(){return this.gridOptions.maxConcurrentDatasourceRequests},e.prototype.getMaxBlocksInCache=function(){return this.gridOptions.maxBlocksInCache},e.prototype.getCacheOverflowSize=function(){return this.gridOptions.cacheOverflowSize},e.prototype.getPaginationPageSize=function(){return this.gridOptions.paginationPageSize},e.prototype.getCacheBlockSize=function(){return this.gridOptions.cacheBlockSize},e.prototype.getInfiniteInitialRowCount=function(){return this.gridOptions.infiniteInitialRowCount},e.prototype.isPurgeClosedRowNodes=function(){return w(this.gridOptions.purgeClosedRowNodes)},e.prototype.isSuppressPaginationPanel=function(){return w(this.gridOptions.suppressPaginationPanel)},e.prototype.getRowData=function(){return this.gridOptions.rowData},e.prototype.isGroupUseEntireRow=function(){return w(this.gridOptions.groupUseEntireRow)},e.prototype.isEnableRtl=function(){return w(this.gridOptions.enableRtl)},e.prototype.getAutoGroupColumnDef=function(){return this.gridOptions.autoGroupColumnDef},e.prototype.isGroupSuppressRow=function(){return w(this.gridOptions.groupSuppressRow)},e.prototype.getRowGroupPanelShow=function(){return this.gridOptions.rowGroupPanelShow},e.prototype.getPivotPanelShow=function(){return this.gridOptions.pivotPanelShow},e.prototype.isAngularCompileRows=function(){return w(this.gridOptions.angularCompileRows)},e.prototype.isAngularCompileFilters=function(){return w(this.gridOptions.angularCompileFilters)},e.prototype.isAngularCompileHeaders=function(){return w(this.gridOptions.angularCompileHeaders)},e.prototype.isDebug=function(){return w(this.gridOptions.debug)},e.prototype.getColumnDefs=function(){return this.gridOptions.columnDefs},e.prototype.getColumnTypes=function(){return this.gridOptions.columnTypes},e.prototype.getDatasource=function(){return this.gridOptions.datasource},e.prototype.getViewportDatasource=function(){return this.gridOptions.viewportDatasource},e.prototype.getServerSideDatasource=function(){return this.gridOptions.serverSideDatasource},e.prototype.isAccentedSort=function(){return w(this.gridOptions.accentedSort)},e.prototype.isEnableBrowserTooltips=function(){return w(this.gridOptions.enableBrowserTooltips)},e.prototype.isEnableCellExpressions=function(){return w(this.gridOptions.enableCellExpressions)},e.prototype.isEnableGroupEdit=function(){return w(this.gridOptions.enableGroupEdit)},e.prototype.isSuppressMiddleClickScrolls=function(){return w(this.gridOptions.suppressMiddleClickScrolls)},e.prototype.isSuppressPreventDefaultOnMouseWheel=function(){return w(this.gridOptions.suppressPreventDefaultOnMouseWheel)},e.prototype.isSuppressColumnVirtualisation=function(){return w(this.gridOptions.suppressColumnVirtualisation)},e.prototype.isSuppressContextMenu=function(){return w(this.gridOptions.suppressContextMenu)},e.prototype.isAllowContextMenuWithControlKey=function(){return w(this.gridOptions.allowContextMenuWithControlKey)},e.prototype.isSuppressCopyRowsToClipboard=function(){return w(this.gridOptions.suppressCopyRowsToClipboard)},e.prototype.isCopyHeadersToClipboard=function(){return w(this.gridOptions.copyHeadersToClipboard)},e.prototype.isSuppressClipboardPaste=function(){return w(this.gridOptions.suppressClipboardPaste)},e.prototype.isPagination=function(){return w(this.gridOptions.pagination)},e.prototype.isSuppressEnterpriseResetOnNewColumns=function(){return w(this.gridOptions.suppressEnterpriseResetOnNewColumns)},e.prototype.getProcessDataFromClipboardFunc=function(){return this.gridOptions.processDataFromClipboard},e.prototype.getBatchUpdateWaitMillis=function(){return C._.exists(this.gridOptions.batchUpdateWaitMillis)?this.gridOptions.batchUpdateWaitMillis:a.Constants.BATCH_WAIT_MILLIS},e.prototype.isSuppressMovableColumns=function(){return w(this.gridOptions.suppressMovableColumns)},e.prototype.isAnimateRows=function(){return!this.isEnsureDomOrder()&&w(this.gridOptions.animateRows)},e.prototype.isSuppressColumnMoveAnimation=function(){return w(this.gridOptions.suppressColumnMoveAnimation)},e.prototype.isSuppressAggFuncInHeader=function(){return w(this.gridOptions.suppressAggFuncInHeader)},e.prototype.isSuppressAggAtRootLevel=function(){return w(this.gridOptions.suppressAggAtRootLevel)},e.prototype.isEnableRangeSelection=function(){return w(this.gridOptions.enableRangeSelection)},e.prototype.isSuppressMultiRangeSelection=function(){return w(this.gridOptions.suppressMultiRangeSelection)},e.prototype.isPaginationAutoPageSize=function(){return w(this.gridOptions.paginationAutoPageSize)},e.prototype.isRememberGroupStateWhenNewData=function(){return w(this.gridOptions.rememberGroupStateWhenNewData)},e.prototype.getIcons=function(){return this.gridOptions.icons},e.prototype.getAggFuncs=function(){return this.gridOptions.aggFuncs},e.prototype.getSortingOrder=function(){return this.gridOptions.sortingOrder},e.prototype.getAlignedGrids=function(){return this.gridOptions.alignedGrids},e.prototype.isMasterDetail=function(){var e=this,t=w(this.gridOptions.masterDetail);return C._.doOnce((function(){t&&!e.enterprise&&console.warn("ag-grid: Master Detail is an Enterprise feature of ag-Grid.")}),"MasterDetailEnterpriseCheck"),t&&this.enterprise},e.prototype.getIsRowMasterFunc=function(){return this.gridOptions.isRowMaster},e.prototype.getIsRowSelectableFunc=function(){return this.gridOptions.isRowSelectable},e.prototype.getGroupRowRendererParams=function(){return this.gridOptions.groupRowRendererParams},e.prototype.getOverlayLoadingTemplate=function(){return this.gridOptions.overlayLoadingTemplate},e.prototype.getOverlayNoRowsTemplate=function(){return this.gridOptions.overlayNoRowsTemplate},e.prototype.isSuppressAutoSize=function(){return w(this.gridOptions.suppressAutoSize)},e.prototype.isEnableCellTextSelection=function(){return w(this.gridOptions.enableCellTextSelection)},e.prototype.isSuppressParentsInRowNodes=function(){return w(this.gridOptions.suppressParentsInRowNodes)},e.prototype.isFunctionsReadOnly=function(){return w(this.gridOptions.functionsReadOnly)},e.prototype.isFloatingFilter=function(){return this.gridOptions.floatingFilter},e.prototype.isEnableCellTextSelect=function(){return w(this.gridOptions.enableCellTextSelection)},e.prototype.isEnableOldSetFilterModel=function(){return w(this.gridOptions.enableOldSetFilterModel)},e.prototype.getDefaultColDef=function(){return this.gridOptions.defaultColDef},e.prototype.getDefaultColGroupDef=function(){return this.gridOptions.defaultColGroupDef},e.prototype.getDefaultExportParams=function(){return this.gridOptions.defaultExportParams},e.prototype.isSuppressCsvExport=function(){return w(this.gridOptions.suppressCsvExport)},e.prototype.isSuppressExcelExport=function(){return w(this.gridOptions.suppressExcelExport)},e.prototype.isSuppressMakeColumnVisibleAfterUnGroup=function(){return w(this.gridOptions.suppressMakeColumnVisibleAfterUnGroup)},e.prototype.getNodeChildDetailsFunc=function(){return this.gridOptions.getNodeChildDetails},e.prototype.getDataPathFunc=function(){return this.gridOptions.getDataPath},e.prototype.getIsServerSideGroupFunc=function(){return this.gridOptions.isServerSideGroup},e.prototype.getServerSideGroupKeyFunc=function(){return this.gridOptions.getServerSideGroupKey},e.prototype.getGroupRowAggNodesFunc=function(){return this.gridOptions.groupRowAggNodes},e.prototype.getContextMenuItemsFunc=function(){return this.gridOptions.getContextMenuItems},e.prototype.getMainMenuItemsFunc=function(){return this.gridOptions.getMainMenuItems},e.prototype.getRowNodeIdFunc=function(){return this.gridOptions.getRowNodeId},e.prototype.getNavigateToNextCellFunc=function(){return this.gridOptions.navigateToNextCell},e.prototype.getTabToNextCellFunc=function(){return this.gridOptions.tabToNextCell},e.prototype.isTreeData=function(){var e=this,t=w(this.gridOptions.treeData);return C._.doOnce((function(){t&&!e.enterprise&&console.warn("ag-grid: TreeData is an Enterprise feature of ag-Grid.")}),"TreeDataEnterpriseCheck"),t},e.prototype.isValueCache=function(){return w(this.gridOptions.valueCache)},e.prototype.isValueCacheNeverExpires=function(){return w(this.gridOptions.valueCacheNeverExpires)},e.prototype.isDeltaSort=function(){return w(this.gridOptions.deltaSort)},e.prototype.isAggregateOnlyChangedColumns=function(){return w(this.gridOptions.aggregateOnlyChangedColumns)},e.prototype.getProcessSecondaryColDefFunc=function(){return this.gridOptions.processSecondaryColDef},e.prototype.getProcessSecondaryColGroupDefFunc=function(){return this.gridOptions.processSecondaryColGroupDef},e.prototype.getSendToClipboardFunc=function(){return this.gridOptions.sendToClipboard},e.prototype.getProcessRowPostCreateFunc=function(){return this.gridOptions.processRowPostCreate},e.prototype.getProcessCellForClipboardFunc=function(){return this.gridOptions.processCellForClipboard},e.prototype.getProcessHeaderForClipboardFunc=function(){return this.gridOptions.processHeaderForClipboard},e.prototype.getProcessCellFromClipboardFunc=function(){return this.gridOptions.processCellFromClipboard},e.prototype.getViewportRowModelPageSize=function(){return(e=this.gridOptions.viewportRowModelPageSize)>0?e:5;var e},e.prototype.getViewportRowModelBufferSize=function(){return(e=this.gridOptions.viewportRowModelBufferSize)>=0?e:5;var e},e.prototype.isServerSideSortingAlwaysResets=function(){return w(this.gridOptions.serverSideSortingAlwaysResets)},e.prototype.getPostSortFunc=function(){return this.gridOptions.postSort},e.prototype.getClipboardDeliminator=function(){return C._.exists(this.gridOptions.clipboardDeliminator)?this.gridOptions.clipboardDeliminator:"\t"},e.prototype.setProperty=function(e,t){var o=this.gridOptions,r=o[e];if(r!==t){o[e]=t;var n={type:e,currentValue:t,previousValue:r};this.propertyEventService.dispatchEvent(n)}},e.prototype.addLayoutElement=function(e){this.layoutElements.push(e),this.updateLayoutClasses()},e.prototype.updateLayoutClasses=function(){var e=this.getDomLayout(),t=e===a.Constants.DOM_LAYOUT_AUTO_HEIGHT,o=e===a.Constants.DOM_LAYOUT_PRINT,r=e===a.Constants.DOM_LAYOUT_NORMAL;this.layoutElements.forEach((function(e){C._.addOrRemoveCssClass(e,"ag-layout-auto-height",t),C._.addOrRemoveCssClass(e,"ag-layout-normal",r),C._.addOrRemoveCssClass(e,"ag-layout-print",o)}))},e.prototype.addEventListener=function(e,o){t.checkEventDeprecation(e),this.propertyEventService.addEventListener(e,o)},e.checkEventDeprecation=function(e){"floatingRowDataChanged"===e&&console.warn("ag-Grid: floatingRowDataChanged is now called pinnedRowDataChanged")},e.prototype.removeEventListener=function(e,t){this.propertyEventService.removeEventListener(e,t)},e.prototype.getAutoSizePadding=function(){return this.gridOptions.autoSizePadding&&this.gridOptions.autoSizePadding>0?this.gridOptions.autoSizePadding:20},e.prototype.getHeaderHeight=function(){return"number"==typeof this.gridOptions.headerHeight?this.gridOptions.headerHeight:this.specialForNewMaterial(25,"headerHeight")},e.prototype.getFloatingFiltersHeight=function(){return"number"==typeof this.gridOptions.floatingFiltersHeight?this.gridOptions.floatingFiltersHeight:this.specialForNewMaterial(25,"headerHeight")},e.prototype.getGroupHeaderHeight=function(){return"number"==typeof this.gridOptions.groupHeaderHeight?this.gridOptions.groupHeaderHeight:this.getHeaderHeight()},e.prototype.getPivotHeaderHeight=function(){return"number"==typeof this.gridOptions.pivotHeaderHeight?this.gridOptions.pivotHeaderHeight:this.getHeaderHeight()},e.prototype.getPivotGroupHeaderHeight=function(){return"number"==typeof this.gridOptions.pivotGroupHeaderHeight?this.gridOptions.pivotGroupHeaderHeight:this.getGroupHeaderHeight()},e.prototype.isExternalFilterPresent=function(){return"function"==typeof this.gridOptions.isExternalFilterPresent&&this.gridOptions.isExternalFilterPresent()},e.prototype.doesExternalFilterPass=function(e){return"function"==typeof this.gridOptions.doesExternalFilterPass&&this.gridOptions.doesExternalFilterPass(e)},e.prototype.getDocument=function(){var e=null;return this.gridOptions.getDocument&&C._.exists(this.gridOptions.getDocument)&&(e=this.gridOptions.getDocument()),e&&C._.exists(e)?e:document},e.prototype.getMinColWidth=function(){return this.gridOptions.minColWidth&&this.gridOptions.minColWidth>t.MIN_COL_WIDTH?this.gridOptions.minColWidth:t.MIN_COL_WIDTH},e.prototype.getMaxColWidth=function(){return this.gridOptions.maxColWidth&&this.gridOptions.maxColWidth>t.MIN_COL_WIDTH?this.gridOptions.maxColWidth:null},e.prototype.getColWidth=function(){return"number"!=typeof this.gridOptions.colWidth||this.gridOptions.colWidth<t.MIN_COL_WIDTH?200:this.gridOptions.colWidth},e.prototype.getRowBufferInPixels=function(){var e;return"number"==typeof this.gridOptions.rowBuffer?this.gridOptions.rowBuffer<0?(C._.doOnce((function(){return console.warn("ag-Grid: rowBuffer should not be negative")}),"warn rowBuffer negative"),e=0):e=this.gridOptions.rowBuffer:e=a.Constants.ROW_BUFFER_SIZE,e*this.getRowHeightAsNumber()},e.prototype.getScrollbarWidth=function(){var e=this.gridOptions.scrollbarWidth;return("number"!=typeof e||e<0)&&(e=C._.getScrollbarWidth()),e},e.prototype.checkForDeprecated=function(){var e=this,t=this.gridOptions;t.suppressUnSort&&console.warn("ag-grid: as of v1.12.4 suppressUnSort is not used. Please use sortingOrder instead."),t.suppressDescSort&&console.warn("ag-grid: as of v1.12.4 suppressDescSort is not used. Please use sortingOrder instead."),t.groupAggFields&&console.warn("ag-grid: as of v3 groupAggFields is not used. Please add appropriate agg fields to your columns."),t.groupHidePivotColumns&&console.warn("ag-grid: as of v3 groupHidePivotColumns is not used as pivot columns are now called rowGroup columns. Please refer to the documentation"),t.groupKeys&&console.warn("ag-grid: as of v3 groupKeys is not used. You need to set rowGroupIndex on the columns to group. Please refer to the documentation"),"boolean"==typeof t.groupDefaultExpanded&&console.warn("ag-grid: groupDefaultExpanded can no longer be boolean. for groupDefaultExpanded=true, use groupDefaultExpanded=9999 instead, to expand all the groups"),(t.onRowDeselected||t.rowDeselected)&&console.warn("ag-grid: since version 3.4 event rowDeselected no longer exists, please check the docs"),t.rowsAlreadyGrouped&&console.warn("ag-grid: since version 3.4 rowsAlreadyGrouped no longer exists, please use getNodeChildDetails() instead"),t.groupAggFunction&&console.warn("ag-grid: since version 4.3.x groupAggFunction is now called groupRowAggNodes"),t.checkboxSelection&&console.warn("ag-grid: since version 8.0.x checkboxSelection is not supported as a grid option. If you want this on all columns, use defaultColDef instead and set it there"),t.paginationInitialRowCount&&console.warn("ag-grid: since version 9.0.x paginationInitialRowCount is now called infiniteInitialRowCount"),t.infinitePageSize&&console.warn("ag-grid: since version 9.0.x infinitePageSize is now called cacheBlockSize"),t.infiniteBlockSize&&console.warn("ag-grid: since version 10.0.x infiniteBlockSize is now called cacheBlockSize"),t.maxPagesInCache&&console.warn("ag-grid: since version 10.0.x maxPagesInCache is now called maxBlocksInCache"),t.paginationOverflowSize&&console.warn("ag-grid: since version 10.0.x paginationOverflowSize is now called cacheOverflowSize"),t.suppressMenuFilterPanel&&console.warn("ag-grid: since version 11.0.x, use property colDef.menuTabs=['generalMenuTab','columnsMenuTab'] instead of suppressMenuFilterPanel=true"),t.suppressMenuMainPanel&&console.warn("ag-grid: since version 11.0.x, use property colDef.menuTabs=['filterMenuTab','columnsMenuTab'] instead of suppressMenuMainPanel=true"),t.suppressMenuColumnPanel&&console.warn("ag-grid: since version 11.0.x, use property colDef.menuTabs=['generalMenuTab','filterMenuTab'] instead of suppressMenuColumnPanel=true"),t.suppressUseColIdForGroups&&console.warn("ag-grid: since version 11.0.x, this is not in use anymore. You should be able to remove it from your definition"),t.groupSuppressRow&&console.warn("ag-grid: since version 18.2.x, 'groupSuppressRow' should not be used anymore. Instead remove row groups and perform custom sorting."),t.groupColumnDef&&console.warn("ag-grid: since version 11.0.x, groupColumnDef has been renamed, this property is now called autoGroupColumnDef. Please change your configuration accordingly"),t.slaveGrids&&console.warn("ag-grid: since version 12.x, slaveGrids has been renamed, this property is now called alignedGrids. Please change your configuration accordingly"),t.floatingTopRowData&&console.warn("ag-grid: since version 12.x, floatingTopRowData is now called pinnedTopRowData"),t.floatingBottomRowData&&console.warn("ag-grid: since version 12.x, floatingBottomRowData is now called pinnedBottomRowData"),t.paginationStartPage&&console.warn("ag-grid: since version 12.x, paginationStartPage is gone, please call api.paginationGoToPage("+t.paginationStartPage+") instead."),t.getHeaderCellTemplate&&console.warn("ag-grid: since version 15.x, getHeaderCellTemplate is gone, please check the header documentation on how to set header templates."),t.headerCellTemplate&&console.warn("ag-grid: since version 15.x, headerCellTemplate is gone, please check the header documentation on how to set header templates."),t.headerCellRenderer&&console.warn("ag-grid: since version 15.x, headerCellRenderer is gone, please check the header documentation on how to set header templates."),t.angularCompileHeaders&&console.warn("ag-grid: since version 15.x, angularCompileHeaders is gone, please see the getting started for Angular 1 docs to see how to do headers in Angular 1.x."),t.pivotTotals&&(console.warn("ag-grid: since version 18.x, pivotTotals has been removed, instead if using pivotTotals, set pivotColumnGroupTotals='before'|'after'."),t.pivotColumnGroupTotals="before"),"inMemory"===t.rowModelType&&(console.warn("ag-grid: since version 18.x, The In Memory Row Model has been renamed to the Client Side Row Model, set rowModelType='clientSide' instead."),t.rowModelType="clientSide"),"enterprise"===t.rowModelType&&(console.warn("ag-grid: since version 18.x, The Enterprise Row Model has been renamed to the Server Side Row Model, set rowModelType='serverSide' instead."),t.rowModelType="serverSide"),t.layoutInterval&&console.warn("ag-grid: since version 18.x, layoutInterval is no longer a property. This is because the grid now uses CSS Flex for layout."),t.gridAutoHeight&&(console.warn("ag-grid: since version 19.x, gridAutoHeight is gone, please use domLayout=autoHeight instead"),t.domLayout="autoHeight"),!0===t.showToolPanel&&(console.warn("ag-grid: since version 19.x, showToolPanel is gone, please specify toolPanel components. See https://www.ag-grid.com/javascript-grid-tool-panel/"),t.showToolPanel=void 0,t.sideBar=t.sideBar||!0),!1===t.showToolPanel&&(console.warn("ag-grid: since version 19.x, showToolPanel is gone, please specify toolPanel components. See https://www.ag-grid.com/javascript-grid-tool-panel/"),t.showToolPanel=void 0,t.sideBar=t.sideBar||!1);var o={toolPanelSuppressRowGroups:"suppressRowGroups",toolPanelSuppressValues:"suppressValues",toolPanelSuppressPivots:"suppressPivots",toolPanelSuppressPivotMode:"suppressPivotMode",toolPanelSuppressColumnFilter:"suppressColumnFilter",toolPanelSuppressColumnSelectAll:"suppressColumnSelectAll",toolPanelSuppressSideButtons:"suppressSideButtons",toolPanelSuppressColumnExpandAll:"suppressColumnExpandAll",contractColumnSelection:"contractColumnSelection"},r={};Object.keys(o).forEach((function(t){var n=o[t],i=e.gridOptions[t];if(void 0!==i){if("toolPanelSuppressSideButtons"===t)return void console.warn("ag-grid: since v19.0 toolPanelSuppressSideButtons has been completely removed. See https://www.ag-grid.com/javascript-grid-tool-panel/");console.warn("ag-grid: since v19.0 gridOptions."+t+" is deprecated, please use gridOptions.sideBar.toolPanel[columnsIndex].componentParams."+n),r[n]=i}})),Object.keys(r).length>0&&!C._.exists(t.sideBar)&&(console.warn("ag-grid: since version 19.x, sideBar is mandatory if using toolPanel related properties. See https://www.ag-grid.com/javascript-grid-tool-panel/"),t.sideBar=!0),null!=t.sideBar&&(t.sideBar=v.SideBarDefParser.parse(t.sideBar));var n=this.gridOptions.sideBar;if(Object.keys(r).length>0&&n&&n.toolPanels){var i=n.toolPanels.filter((function(e){return"columns"===e.id}));1===i.length&&C._.mergeDeep(i[0],{componentParams:r})}t.enableStatusBar&&(console.warn("ag-grid: since version 19.x, enableStatusBar is gone, please specify statusBar components"),t.statusBar=t.statusBar||{components:[{component:"agAggregationComponent"}]}),t.alwaysShowStatusBar&&console.warn("ag-grid: since version 19.x, alwaysShowStatusBar is gone. Please specify a min-height on the ag-status-bar css class, eg .ag-status-bar {min-height: 35px; }"),(t.enableServerSideSorting||t.enableSorting)&&(console.warn("ag-Grid: since v20, grid options enableSorting and enableServerSideSorting are gone. Instead set sortable=true on the column definition for the columns sorting are allowed on. To migrate from gridOption.enableSorting=true, set gridOptions.defaultColDef.sortable=true"),t.defaultColDef||(t.defaultColDef={}),t.defaultColDef.sortable||(t.defaultColDef.sortable=!0)),(t.enableFilter||t.enableServerSideFilter)&&(console.warn("ag-Grid: since v20, grid options enableFilter and enableServerSideFilter are gone. Instead set filter=true (if not already specifying a specific filter) on the column definition for the columns filtering is allowed on. To migrate from gridOptions.enableFilter=true, set gridOptions.defaultColDef.filter=true. If you are explicitly setting specific filters for each column (ie colDef.filter is already set) the you don't need to do anything."),t.defaultColDef||(t.defaultColDef={}),t.defaultColDef.filter||(t.defaultColDef.filter=!0)),t.enableColResize&&(console.warn("ag-Grid: since v20, grid options enableColResize is gone. Instead set resizable=true on the column definition for the columns resizing are allowed on. To migrate from gridOption.enableColResize=true, set gridOptions.defaultColDef.resizable=true"),t.defaultColDef||(t.defaultColDef={}),t.defaultColDef.resizable||(t.defaultColDef.resizable=!0)),t.embedFullWidthRows&&console.warn("ag-Grid: since v20.1, embedFullWidthRows is now gone. This property was introduced to allow faster vertical scrolling when using slow browsers (IE) and full width rows. However in v20 the dom layout was redesigned and this performance problem no longer exists, hence this property 'hack' is no longer necessary."),t.suppressTabbing&&console.warn("ag-Grid: since v20.1, suppressTabbing is replaced with the more powerful grid callback suppressKeyboardEvent(params) which can suppress any keyboard event including tabbing.")},e.prototype.checkForViolations=function(){this.isTreeData()&&this.treeDataViolations()},e.prototype.treeDataViolations=function(){this.isRowModelDefault()&&C._.missing(this.getDataPathFunc())&&console.warn("ag-Grid: property usingTreeData=true with rowModel=clientSide, but you did not provide getDataPath function, please provide getDataPath function if using tree data."),this.isRowModelServerSide()&&(C._.missing(this.getIsServerSideGroupFunc())&&console.warn("ag-Grid: property usingTreeData=true with rowModel=serverSide, but you did not provide isServerSideGroup function, please provide isServerSideGroup function if using tree data."),C._.missing(this.getServerSideGroupKeyFunc())&&console.warn("ag-Grid: property usingTreeData=true with rowModel=serverSide, but you did not provide getServerSideGroupKey function, please provide getServerSideGroupKey function if using tree data."))},e.prototype.getLocaleTextFunc=function(){if(this.gridOptions.localeTextFunc)return this.gridOptions.localeTextFunc;var e=this;return function(t,o){var r=e.gridOptions.localeText;return r&&r[t]?r[t]:o}},e.prototype.globalEventHandler=function(e,t){var o=l.ComponentUtil.getCallbackForEvent(e);"function"==typeof this.gridOptions[o]&&this.gridOptions[o](t)},e.prototype.getRowHeightAsNumber=function(){return!this.gridOptions.rowHeight||C._.missing(this.gridOptions.rowHeight)?this.getDefaultRowHeight():this.gridOptions.rowHeight&&this.isNumeric(this.gridOptions.rowHeight)?this.gridOptions.rowHeight:(console.warn("ag-Grid row height must be a number if not using standard row model"),this.getDefaultRowHeight())},e.prototype.getRowHeightForNode=function(e,t){if(void 0===t&&(t=!1),"function"==typeof this.gridOptions.getRowHeight){if(t)return{height:this.getDefaultRowHeight(),estimated:!0};var o={node:e,data:e.data,api:this.gridOptions.api,context:this.gridOptions.context};return{height:this.gridOptions.getRowHeight(o),estimated:!1}}if(e.detail&&this.isMasterDetail())return this.isNumeric(this.gridOptions.detailRowHeight)?{height:this.gridOptions.detailRowHeight,estimated:!1}:{height:300,estimated:!1};var r=this.getDefaultRowHeight(),n=this.gridOptions.rowHeight&&this.isNumeric(this.gridOptions.rowHeight)?this.gridOptions.rowHeight:r;if(this.columnController.isAutoRowHeightActive()){if(t)return{height:n,estimated:!0};var i=this.autoHeightCalculator.getPreferredHeightForRow(e);return{height:Math.max(i,r),estimated:!1}}return{height:n,estimated:!1}},e.prototype.isDynamicRowHeight=function(){return"function"==typeof this.gridOptions.getRowHeight},e.prototype.getVirtualItemHeight=function(){return this.specialForNewMaterial(20,"virtualItemHeight")},e.prototype.isNumeric=function(e){return!isNaN(e)&&"number"==typeof e},e.prototype.specialForNewMaterial=function(e,t){var o=this.environment.getTheme();return o&&0===o.indexOf("ag-theme")?this.environment.getSassVariable(o,t):e},e.prototype.getDefaultRowHeight=function(){return this.specialForNewMaterial(25,"rowHeight")},e.MIN_COL_WIDTH=10,e.PROP_HEADER_HEIGHT="headerHeight",e.PROP_GROUP_REMOVE_SINGLE_CHILDREN="groupRemoveSingleChildren",e.PROP_GROUP_REMOVE_LOWEST_SINGLE_CHILDREN="groupRemoveLowestSingleChildren",e.PROP_PIVOT_HEADER_HEIGHT="pivotHeaderHeight",e.PROP_SUPPRESS_CLIPBOARD_PASTE="suppressClipboardPaste",e.PROP_GROUP_HEADER_HEIGHT="groupHeaderHeight",e.PROP_PIVOT_GROUP_HEADER_HEIGHT="pivotGroupHeaderHeight",e.PROP_FLOATING_FILTERS_HEIGHT="floatingFiltersHeight",e.PROP_SUPPRESS_ROW_DRAG="suppressRowDrag",e.PROP_POPUP_PARENT="popupParent",e.PROP_DOM_LAYOUT="domLayout",r([u.Autowired("gridOptions"),n("design:type",Object)],e.prototype,"gridOptions",void 0),r([u.Autowired("columnController"),n("design:type",c.ColumnController)],e.prototype,"columnController",void 0),r([u.Autowired("eventService"),n("design:type",s.EventService)],e.prototype,"eventService",void 0),r([u.Autowired("enterprise"),n("design:type",Boolean)],e.prototype,"enterprise",void 0),r([u.Autowired("frameworkFactory"),n("design:type",Object)],e.prototype,"frameworkFactory",void 0),r([u.Autowired("gridApi"),n("design:type",p.GridApi)],e.prototype,"gridApi",void 0),r([u.Autowired("columnApi"),n("design:type",d.ColumnApi)],e.prototype,"columnApi",void 0),r([u.Autowired("environment"),n("design:type",h.Environment)],e.prototype,"environment",void 0),r([u.Autowired("autoHeightCalculator"),n("design:type",y.AutoHeightCalculator)],e.prototype,"autoHeightCalculator",void 0),r([i(0,u.Qualifier("gridApi")),i(1,u.Qualifier("columnApi")),n("design:type",Function),n("design:paramtypes",[p.GridApi,d.ColumnApi]),n("design:returntype",void 0)],e.prototype,"agWire",null),r([u.PreDestroy,n("design:type",Function),n("design:paramtypes",[]),n("design:returntype",void 0)],e.prototype,"destroy",null),r([u.PostConstruct,n("design:type",Function),n("design:paramtypes",[]),n("design:returntype",void 0)],e.prototype,"init",null),t=r([u.Bean("gridOptionsWrapper")],e)}();t.GridOptionsWrapper=E},44329:function(e,t,o){var r,n=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o])},r(e,t)},function(e,t){function o(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)});Object.defineProperty(t,"__esModule",{value:!0});var i=o(83423),s=o(15068),a=function(e){function t(o,r){var n=e.call(this)||this;return n.version=0,n.state=t.STATE_DIRTY,n.rowNodeCacheParams=r,n.blockNumber=o,n.startRow=o*r.blockSize,n.endRow=n.startRow+r.blockSize,n}return n(t,e),t.prototype.isAnyNodeOpen=function(e){var t=!1;return this.forEachNodeCallback((function(e){e.expanded&&(t=!0)}),e),t},t.prototype.forEachNodeCallback=function(e,t){for(var o=this.startRow;o<this.endRow;o++)o<t&&e(this.getRowUsingLocalIndex(o),o)},t.prototype.forEachNode=function(e,t,o,r){this.forEachNodeCallback((function(o){e(o,t.next()),r&&o.childrenCache&&o.childrenCache.forEachNodeDeep(e,t)}),o)},t.prototype.forEachNodeDeep=function(e,t,o){this.forEachNode(e,t,o,!0)},t.prototype.forEachNodeShallow=function(e,t,o){this.forEachNode(e,t,o,!1)},t.prototype.getVersion=function(){return this.version},t.prototype.getLastAccessed=function(){return this.lastAccessed},t.prototype.getRowUsingLocalIndex=function(e,t){void 0===t&&(t=!1),t||(this.lastAccessed=this.rowNodeCacheParams.lastAccessedSequence.next());var o=e-this.startRow;return this.rowNodes[o]},t.prototype.init=function(e){this.beans=e,this.createRowNodes()},t.prototype.getStartRow=function(){return this.startRow},t.prototype.getEndRow=function(){return this.endRow},t.prototype.getBlockNumber=function(){return this.blockNumber},t.prototype.setDirty=function(){this.version++,this.state=t.STATE_DIRTY},t.prototype.setDirtyAndPurge=function(){this.setDirty(),this.rowNodes.forEach((function(e){e.setData(null)}))},t.prototype.getState=function(){return this.state},t.prototype.setRowNode=function(e,t){var o=e-this.startRow;this.rowNodes[o]=t},t.prototype.setBlankRowNode=function(e){var t=e-this.startRow,o=this.createBlankRowNode(e);return this.rowNodes[t]=o,o},t.prototype.setNewData=function(e,t){var o=this.setBlankRowNode(e);return this.setDataAndId(o,t,this.startRow+e),o},t.prototype.createBlankRowNode=function(e){var t=new s.RowNode;return this.beans.context.wireBean(t),t.setRowHeight(this.rowNodeCacheParams.rowHeight),t},t.prototype.createRowNodes=function(){this.rowNodes=[];for(var e=0;e<this.rowNodeCacheParams.blockSize;e++){var t=this.startRow+e,o=this.createBlankRowNode(t);this.rowNodes.push(o)}},t.prototype.load=function(){this.state=t.STATE_LOADING,this.loadFromDatasource()},t.prototype.pageLoadFailed=function(){this.state=t.STATE_FAILED;var e={type:t.EVENT_LOAD_COMPLETE,success:!1,page:this,lastRow:null};this.dispatchEvent(e)},t.prototype.populateWithRowData=function(e){var t=this,o=[];this.rowNodes.forEach((function(r,n){var i=e[n];r.stub&&o.push(r),t.setDataAndId(r,i,t.startRow+n)})),o.length>0&&this.beans.rowRenderer.redrawRows(o)},t.prototype.destroy=function(){e.prototype.destroy.call(this),this.rowNodes.forEach((function(e){e.childrenCache&&(e.childrenCache.destroy(),e.childrenCache=null),e.clearRowTop()}))},t.prototype.pageLoaded=function(e,o,r){e===this.version&&(this.state=t.STATE_LOADED,this.populateWithRowData(o)),r=i._.cleanNumber(r);var n={type:t.EVENT_LOAD_COMPLETE,success:!0,page:this,lastRow:r};this.dispatchEvent(n)},t.EVENT_LOAD_COMPLETE="loadComplete",t.STATE_DIRTY="dirty",t.STATE_LOADING="loading",t.STATE_LOADED="loaded",t.STATE_FAILED="failed",t}(o(8534).BeanStub);t.RowNodeBlock=a},44859:(e,t,o)=>{Object.defineProperty(t,"__esModule",{value:!0});var r=o(83423);t.defaultGroupComparator=function(e,t,o,n,i){void 0===i&&(i=!1),console.warn("ag-Grid: Since ag-grid 11.0.0 defaultGroupComparator is not necessary. You can remove this from your colDef");var s=r._.exists(o)&&o.group,a=r._.exists(n)&&n.group,l=!s&&!a;return s&&a?r._.defaultComparator(o.key,n.key,i):l?r._.defaultComparator(e,t,i):s?1:-1}},44871:function(e,t,o){var r=this&&this.__decorate||function(e,t,o,r){var n,i=arguments.length,s=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,o):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,o,r);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(s=(i<3?n(s):i>3?n(t,o,s):n(t,o))||s);return i>3&&s&&Object.defineProperty(t,o,s),s},n=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)};Object.defineProperty(t,"__esModule",{value:!0});var i=o(98239),s=o(72493),a=function(){function e(){}return e.prototype.sizeColumnsToFit=function(e){this.columnController.sizeColumnsToFit(e,"api")},e.prototype.setColumnGroupOpened=function(e,t){this.columnController.setColumnGroupOpened(e,t,"api")},e.prototype.getColumnGroup=function(e,t){return this.columnController.getColumnGroup(e,t)},e.prototype.getOriginalColumnGroup=function(e){return this.columnController.getOriginalColumnGroup(e)},e.prototype.getDisplayNameForColumn=function(e,t){return this.columnController.getDisplayNameForColumn(e,t)},e.prototype.getDisplayNameForColumnGroup=function(e,t){return this.columnController.getDisplayNameForColumnGroup(e,t)},e.prototype.getColumn=function(e){return this.columnController.getPrimaryColumn(e)},e.prototype.setColumnState=function(e){return this.columnController.setColumnState(e,!1,"api")},e.prototype.getColumnState=function(){return this.columnController.getColumnState()},e.prototype.resetColumnState=function(){this.columnController.resetColumnState(!1,"api")},e.prototype.getColumnGroupState=function(){return this.columnController.getColumnGroupState()},e.prototype.setColumnGroupState=function(e){this.columnController.setColumnGroupState(e,"api")},e.prototype.resetColumnGroupState=function(){this.columnController.resetColumnGroupState("api")},e.prototype.isPinning=function(){return this.columnController.isPinningLeft()||this.columnController.isPinningRight()},e.prototype.isPinningLeft=function(){return this.columnController.isPinningLeft()},e.prototype.isPinningRight=function(){return this.columnController.isPinningRight()},e.prototype.getDisplayedColAfter=function(e){return this.columnController.getDisplayedColAfter(e)},e.prototype.getDisplayedColBefore=function(e){return this.columnController.getDisplayedColBefore(e)},e.prototype.setColumnVisible=function(e,t){this.columnController.setColumnVisible(e,t,"api")},e.prototype.setColumnsVisible=function(e,t){this.columnController.setColumnsVisible(e,t,"api")},e.prototype.setColumnPinned=function(e,t){this.columnController.setColumnPinned(e,t,"api")},e.prototype.setColumnsPinned=function(e,t){this.columnController.setColumnsPinned(e,t,"api")},e.prototype.getAllColumns=function(){return this.columnController.getAllPrimaryColumns()},e.prototype.getAllGridColumns=function(){return this.columnController.getAllGridColumns()},e.prototype.getDisplayedLeftColumns=function(){return this.columnController.getDisplayedLeftColumns()},e.prototype.getDisplayedCenterColumns=function(){return this.columnController.getDisplayedCenterColumns()},e.prototype.getDisplayedRightColumns=function(){return this.columnController.getDisplayedRightColumns()},e.prototype.getAllDisplayedColumns=function(){return this.columnController.getAllDisplayedColumns()},e.prototype.getAllDisplayedVirtualColumns=function(){return this.columnController.getAllDisplayedVirtualColumns()},e.prototype.moveColumn=function(e,t){"number"==typeof e?(console.warn("ag-Grid: you are using moveColumn(fromIndex, toIndex) - moveColumn takes a column key and a destination index, not two indexes, to move with indexes use moveColumnByIndex(from,to) instead"),this.columnController.moveColumnByIndex(e,t,"api")):this.columnController.moveColumn(e,t,"api")},e.prototype.moveColumnByIndex=function(e,t){this.columnController.moveColumnByIndex(e,t,"api")},e.prototype.moveColumns=function(e,t){this.columnController.moveColumns(e,t,"api")},e.prototype.moveRowGroupColumn=function(e,t){this.columnController.moveRowGroupColumn(e,t)},e.prototype.setColumnAggFunc=function(e,t){this.columnController.setColumnAggFunc(e,t)},e.prototype.setColumnWidth=function(e,t,o){void 0===o&&(o=!0),this.columnController.setColumnWidth(e,t,!1,o)},e.prototype.setPivotMode=function(e){this.columnController.setPivotMode(e)},e.prototype.isPivotMode=function(){return this.columnController.isPivotMode()},e.prototype.getSecondaryPivotColumn=function(e,t){return this.columnController.getSecondaryPivotColumn(e,t)},e.prototype.setValueColumns=function(e){this.columnController.setValueColumns(e,"api")},e.prototype.getValueColumns=function(){return this.columnController.getValueColumns()},e.prototype.removeValueColumn=function(e){this.columnController.removeValueColumn(e,"api")},e.prototype.removeValueColumns=function(e){this.columnController.removeValueColumns(e,"api")},e.prototype.addValueColumn=function(e){this.columnController.addValueColumn(e,"api")},e.prototype.addValueColumns=function(e){this.columnController.addValueColumns(e,"api")},e.prototype.setRowGroupColumns=function(e){this.columnController.setRowGroupColumns(e,"api")},e.prototype.removeRowGroupColumn=function(e){this.columnController.removeRowGroupColumn(e,"api")},e.prototype.removeRowGroupColumns=function(e){this.columnController.removeRowGroupColumns(e,"api")},e.prototype.addRowGroupColumn=function(e){this.columnController.addRowGroupColumn(e,"api")},e.prototype.addRowGroupColumns=function(e){this.columnController.addRowGroupColumns(e,"api")},e.prototype.getRowGroupColumns=function(){return this.columnController.getRowGroupColumns()},e.prototype.setPivotColumns=function(e){this.columnController.setPivotColumns(e,"api")},e.prototype.removePivotColumn=function(e){this.columnController.removePivotColumn(e,"api")},e.prototype.removePivotColumns=function(e){this.columnController.removePivotColumns(e,"api")},e.prototype.addPivotColumn=function(e){this.columnController.addPivotColumn(e,"api")},e.prototype.addPivotColumns=function(e){this.columnController.addPivotColumns(e,"api")},e.prototype.getPivotColumns=function(){return this.columnController.getPivotColumns()},e.prototype.getLeftDisplayedColumnGroups=function(){return this.columnController.getLeftDisplayedColumnGroups()},e.prototype.getCenterDisplayedColumnGroups=function(){return this.columnController.getCenterDisplayedColumnGroups()},e.prototype.getRightDisplayedColumnGroups=function(){return this.columnController.getRightDisplayedColumnGroups()},e.prototype.getAllDisplayedColumnGroups=function(){return this.columnController.getAllDisplayedColumnGroups()},e.prototype.autoSizeColumn=function(e){return this.columnController.autoSizeColumn(e,"api")},e.prototype.autoSizeColumns=function(e){return this.columnController.autoSizeColumns(e,"api")},e.prototype.autoSizeAllColumns=function(){this.columnController.autoSizeAllColumns("api")},e.prototype.setSecondaryColumns=function(e){this.columnController.setSecondaryColumns(e,"api")},e.prototype.getSecondaryColumns=function(){return this.columnController.getSecondaryColumns()},e.prototype.getPrimaryColumns=function(){return this.columnController.getAllPrimaryColumns()},e.prototype.columnGroupOpened=function(e,t){console.error("ag-Grid: columnGroupOpened no longer exists, use setColumnGroupOpened"),this.setColumnGroupOpened(e,t)},e.prototype.hideColumns=function(e,t){console.error("ag-Grid: hideColumns is deprecated, use setColumnsVisible"),this.columnController.setColumnsVisible(e,!t,"api")},e.prototype.hideColumn=function(e,t){console.error("ag-Grid: hideColumn is deprecated, use setColumnVisible"),this.columnController.setColumnVisible(e,!t,"api")},e.prototype.setState=function(e){return console.error("ag-Grid: setState is deprecated, use setColumnState"),this.setColumnState(e)},e.prototype.getState=function(){return console.error("ag-Grid: getState is deprecated, use getColumnState"),this.getColumnState()},e.prototype.resetState=function(){console.error("ag-Grid: resetState is deprecated, use resetColumnState"),this.resetColumnState()},e.prototype.getAggregationColumns=function(){return console.error("ag-Grid: getAggregationColumns is deprecated, use getValueColumns"),this.columnController.getValueColumns()},e.prototype.removeAggregationColumn=function(e){console.error("ag-Grid: removeAggregationColumn is deprecated, use removeValueColumn"),this.columnController.removeValueColumn(e,"api")},e.prototype.removeAggregationColumns=function(e){console.error("ag-Grid: removeAggregationColumns is deprecated, use removeValueColumns"),this.columnController.removeValueColumns(e,"api")},e.prototype.addAggregationColumn=function(e){console.error("ag-Grid: addAggregationColumn is deprecated, use addValueColumn"),this.columnController.addValueColumn(e,"api")},e.prototype.addAggregationColumns=function(e){console.error("ag-Grid: addAggregationColumns is deprecated, use addValueColumns"),this.columnController.addValueColumns(e,"api")},e.prototype.setColumnAggFunction=function(e,t){console.error("ag-Grid: setColumnAggFunction is deprecated, use setColumnAggFunc"),this.columnController.setColumnAggFunc(e,t,"api")},e.prototype.getDisplayNameForCol=function(e){return console.error("ag-Grid: getDisplayNameForCol is deprecated, use getDisplayNameForColumn"),this.getDisplayNameForColumn(e,null)},r([s.Autowired("columnController"),n("design:type",i.ColumnController)],e.prototype,"columnController",void 0),r([s.Bean("columnApi")],e)}();t.ColumnApi=a},45697:function(e,t,o){var r,n=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o])},r(e,t)},function(e,t){function o(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)}),i=this&&this.__decorate||function(e,t,o,r){var n,i=arguments.length,s=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,o):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,o,r);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(s=(i<3?n(s):i>3?n(t,o,s):n(t,o))||s);return i>3&&s&&Object.defineProperty(t,o,s),s},s=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)};Object.defineProperty(t,"__esModule",{value:!0});var a,l=o(44081),p=o(72493),u=o(22131),d=o(85910),c=o(47721),h=o(83423);!function(e){e[e.Loading=0]="Loading",e[e.NoRows=1]="NoRows"}(a||(a={}));var f=function(e){function t(){return e.call(this,t.TEMPLATE)||this}return n(t,e),t.prototype.postConstruct=function(){this.gridOptionsWrapper.addLayoutElement(this.eOverlayWrapper),this.setVisible(!1)},t.prototype.setWrapperTypeClass=function(e){h._.addOrRemoveCssClass(this.eOverlayWrapper,"ag-overlay-loading-wrapper",e===a.Loading),h._.addOrRemoveCssClass(this.eOverlayWrapper,"ag-overlay-no-rows-wrapper",e===a.NoRows)},t.prototype.showLoadingOverlay=function(){var e=this;this.setWrapperTypeClass(a.Loading),this.destroyActiveOverlay();var t={api:this.gridOptionsWrapper.getApi()};this.userComponentFactory.newLoadingOverlayComponent(t).then((function(t){e.eOverlayWrapper.appendChild(t.getGui()),e.activeOverlay=t})),this.setVisible(!0)},t.prototype.showNoRowsOverlay=function(){var e=this;this.setWrapperTypeClass(a.NoRows),this.destroyActiveOverlay();var t={api:this.gridOptionsWrapper.getApi()};this.userComponentFactory.newNoRowsOverlayComponent(t).then((function(t){e.eOverlayWrapper.appendChild(t.getGui()),e.activeOverlay=t})),this.setVisible(!0)},t.prototype.destroyActiveOverlay=function(){this.activeOverlay&&(this.activeOverlay.destroy&&this.activeOverlay.destroy(),this.activeOverlay=void 0,h._.clearElement(this.eOverlayWrapper))},t.prototype.hideOverlay=function(){this.destroyActiveOverlay(),this.setVisible(!1)},t.prototype.destroy=function(){e.prototype.destroy.call(this),this.destroyActiveOverlay()},t.TEMPLATE='<div class="ag-overlay">\n <div class="ag-overlay-panel" role="presentation">\n <div class="ag-overlay-wrapper" ref="eOverlayWrapper"></div>\n </div>\n </div>',i([p.Autowired("gridOptionsWrapper"),s("design:type",l.GridOptionsWrapper)],t.prototype,"gridOptionsWrapper",void 0),i([p.Autowired("userComponentFactory"),s("design:type",d.UserComponentFactory)],t.prototype,"userComponentFactory",void 0),i([c.RefSelector("eOverlayWrapper"),s("design:type",HTMLElement)],t.prototype,"eOverlayWrapper",void 0),i([p.PostConstruct,s("design:type",Function),s("design:paramtypes",[]),s("design:returntype",void 0)],t.prototype,"postConstruct",null),t}(u.Component);t.OverlayWrapperComponent=f},45727:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0});var o=function(){function e(){}return e.STEP_EVERYTHING=0,e.STEP_FILTER=1,e.STEP_SORT=2,e.STEP_MAP=3,e.STEP_AGGREGATE=4,e.STEP_PIVOT=5,e.ROW_BUFFER_SIZE=10,e.LAYOUT_INTERVAL=500,e.BATCH_WAIT_MILLIS=50,e.EXPORT_TYPE_DRAG_COPY="dragCopy",e.EXPORT_TYPE_CLIPBOARD="clipboard",e.EXPORT_TYPE_EXCEL="excel",e.EXPORT_TYPE_CSV="csv",e.KEY_BACKSPACE=8,e.KEY_TAB=9,e.KEY_NEW_LINE=10,e.KEY_ENTER=13,e.KEY_SHIFT=16,e.KEY_ESCAPE=27,e.KEY_SPACE=32,e.KEY_LEFT=37,e.KEY_UP=38,e.KEY_RIGHT=39,e.KEY_DOWN=40,e.KEY_DELETE=46,e.KEY_A=65,e.KEY_C=67,e.KEY_V=86,e.KEY_D=68,e.KEY_F2=113,e.KEY_PAGE_UP=33,e.KEY_PAGE_DOWN=34,e.KEY_PAGE_HOME=36,e.KEY_PAGE_END=35,e.ROW_MODEL_TYPE_INFINITE="infinite",e.ROW_MODEL_TYPE_VIEWPORT="viewport",e.ROW_MODEL_TYPE_CLIENT_SIDE="clientSide",e.ROW_MODEL_TYPE_SERVER_SIDE="serverSide",e.DEPRECATED_ROW_MODEL_TYPE_NORMAL="normal",e.ALWAYS="always",e.ONLY_WHEN_GROUPING="onlyWhenGrouping",e.PINNED_TOP="top",e.PINNED_BOTTOM="bottom",e.DOM_LAYOUT_NORMAL="normal",e.DOM_LAYOUT_PRINT="print",e.DOM_LAYOUT_AUTO_HEIGHT="autoHeight",e.GROUP_AUTO_COLUMN_ID="ag-Grid-AutoColumn",e}();t.Constants=o},46379:function(e,t,o){var r,n=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o])},r(e,t)},function(e,t){function o(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)});Object.defineProperty(t,"__esModule",{value:!0});var i=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),t.prototype.isPopup=function(){return!0},t}(o(22131).Component);t.PopupComponent=i},47008:(e,t,o)=>{Object.defineProperty(t,"__esModule",{value:!0});var r=void 0===o.g?{}:o.g;r.HTMLElement="undefined"==typeof HTMLElement?{}:HTMLElement,r.HTMLButtonElement="undefined"==typeof HTMLButtonElement?{}:HTMLButtonElement,r.HTMLSelectElement="undefined"==typeof HTMLSelectElement?{}:HTMLSelectElement,r.HTMLInputElement="undefined"==typeof HTMLInputElement?{}:HTMLInputElement,r.Node="undefined"==typeof Node?{}:Node,r.MouseEvent="undefined"==typeof MouseEvent?{}:MouseEvent;var n=o(7897);t.ColumnFactory=n.ColumnFactory;var i=o(98239);t.ColumnController=i.ColumnController;var s=o(69734);t.ColumnKeyCreator=s.ColumnKeyCreator;var a=o(814);t.ColumnUtils=a.ColumnUtils;var l=o(31887);t.DisplayedGroupCreator=l.DisplayedGroupCreator;var p=o(12598);t.GroupInstanceIdCreator=p.GroupInstanceIdCreator;var u=o(97156);t.ComponentUtil=u.ComponentUtil;var d=o(80834);t.ColDefUtil=d.ColDefUtil;var c=o(36777);t.UserComponentRegistry=c.UserComponentRegistry;var h=o(85910);t.UserComponentFactory=h.UserComponentFactory;var f=o(75013);t.initialiseAgGridWithAngular1=f.initialiseAgGridWithAngular1;var g=o(61862);t.initialiseAgGridWithWebComponents=g.initialiseAgGridWithWebComponents;var m=o(8534);t.BeanStub=m.BeanStub;var y=o(72493);t.Context=y.Context,t.Autowired=y.Autowired,t.PostConstruct=y.PostConstruct,t.PreConstruct=y.PreConstruct,t.Optional=y.Optional,t.Bean=y.Bean,t.Qualifier=y.Qualifier,t.PreDestroy=y.PreDestroy;var v=o(47721);t.QuerySelector=v.QuerySelector,t.Listener=v.Listener,t.RefSelector=v.RefSelector;var C=o(58342);t.DragAndDropService=C.DragAndDropService,t.DragSourceType=C.DragSourceType,t.HDirection=C.HDirection,t.VDirection=C.VDirection;var w=o(25230);t.DragService=w.DragService;var E=o(26016);t.Column=E.Column;var _=o(74517);t.ColumnGroup=_.ColumnGroup;var b=o(34782);t.GridCell=b.GridCell;var R=o(3976);t.GridRow=R.GridRow;var S=o(72948);t.OriginalColumnGroup=S.OriginalColumnGroup;var O=o(15068);t.RowNode=O.RowNode;var T=o(13650);t.BaseFilter=T.BaseFilter;var P=o(34255);t.DateFilter=P.DateFilter;var A=o(55e3);t.FilterManager=A.FilterManager;var I=o(92378);t.NumberFilter=I.NumberFilter;var D=o(99104);t.TextFilter=D.TextFilter;var N=o(64229);t.GridPanel=N.GridPanel;var x=o(13887);t.ScrollVisibleService=x.ScrollVisibleService;var F=o(1571);t.MouseEventService=F.MouseEventService;var M=o(20080);t.BodyDropPivotTarget=M.BodyDropPivotTarget;var k=o(69992);t.BodyDropTarget=k.BodyDropTarget;var L=o(34506);t.CssClassApplier=L.CssClassApplier;var G=o(40706);t.HeaderContainer=G.HeaderContainer;var j=o(89929);t.HeaderRootComp=j.HeaderRootComp;var W=o(15774);t.HeaderRowComp=W.HeaderRowComp;var V=o(97177);t.HorizontalResizeService=V.HorizontalResizeService;var H=o(27887);t.MoveColumnController=H.MoveColumnController;var B=o(42726);t.StandardMenuFactory=B.StandardMenuFactory;var z=o(88333);t.TabbedLayout=z.TabbedLayout;var U=o(72955);t.VerticalStack=U.VerticalStack;var Y=o(7760);t.simpleHttpRequest=Y.simpleHttpRequest;var q=o(49281);t.LargeTextCellEditor=q.LargeTextCellEditor;var $=o(15724);t.PopupEditorWrapper=$.PopupEditorWrapper;var K=o(31923);t.PopupSelectCellEditor=K.PopupSelectCellEditor;var Z=o(5448);t.PopupTextCellEditor=Z.PopupTextCellEditor;var J=o(84715);t.SelectCellEditor=J.SelectCellEditor;var Q=o(71616);t.TextCellEditor=Q.TextCellEditor;var X=o(15959);t.AnimateShowChangeCellRenderer=X.AnimateShowChangeCellRenderer;var ee=o(30811);t.AnimateSlideCellRenderer=ee.AnimateSlideCellRenderer;var te=o(79886);t.GroupCellRenderer=te.GroupCellRenderer;var oe=o(38152);t.SetLeftFeature=oe.SetLeftFeature;var re=o(41832);t.AutoWidthCalculator=re.AutoWidthCalculator;var ne=o(34470);t.CellRendererFactory=ne.CellRendererFactory;var ie=o(95125);t.CheckboxSelectionComponent=ie.CheckboxSelectionComponent;var se=o(23054);t.CellComp=se.CellComp;var ae=o(19378);t.RowComp=ae.RowComp;var le=o(10042);t.RowRenderer=le.RowRenderer;var pe=o(93121);t.ValueFormatterService=pe.ValueFormatterService;var ue=o(24048);t.FilterStage=ue.FilterStage;var de=o(57498);t.FlattenStage=de.FlattenStage;var ce=o(18954);t.SortStage=ce.SortStage;var he=o(50580);t.PinnedRowModel=he.PinnedRowModel;var fe=o(719);t.ClientSideRowModel=fe.ClientSideRowModel;var ge=o(68363);t.ChangedPath=ge.ChangedPath;var me=o(28771);t.ClientSideNodeManager=me.ClientSideNodeManager;var ye=o(30971);t.InfiniteRowModel=ye.InfiniteRowModel;var ve=o(44329);t.RowNodeBlock=ve.RowNodeBlock;var Ce=o(84210);t.RowNodeBlockLoader=Ce.RowNodeBlockLoader;var we=o(41451);t.PaginationProxy=we.PaginationProxy;var Ee=o(65802);t.RowNodeCache=Ee.RowNodeCache;var _e=o(66490);t.StylingService=_e.StylingService;var be=o(21951);t.AgCheckbox=be.AgCheckbox;var Re=o(32090);t.PopupWindow=Re.PopupWindow;var Se=o(57322);t.PopupMessageBox=Se.PopupMessageBox;var Oe=o(22131);t.Component=Oe.Component;var Te=o(46379);t.PopupComponent=Te.PopupComponent;var Pe=o(73575);t.PopupService=Pe.PopupService;var Ae=o(66419);t.TouchListener=Ae.TouchListener;var Ie=o(43460);t.CsvCreator=Ie.CsvCreator,t.BaseCreator=Ie.BaseCreator;var De=o(33467);t.Downloader=De.Downloader;var Ne=o(59873);t.XmlFactory=Ne.XmlFactory;var xe=o(42664);t.BaseGridSerializingSession=xe.BaseGridSerializingSession,t.GridSerializer=xe.GridSerializer;var Fe=o(42664);t.RowType=Fe.RowType;var Me=o(9018);t.ZipContainer=Me.ZipContainer;var ke=o(86895);t.BaseFrameworkFactory=ke.BaseFrameworkFactory;var Le=o(38427);t.CellNavigationService=Le.CellNavigationService;var Ge=o(10190);t.AlignedGridsService=Ge.AlignedGridsService;var je=o(45727);t.Constants=je.Constants;var We=o(65360);t.Grid=We.Grid;var Ve=o(40797);t.GridApi=Ve.GridApi;var He=o(85222);t.Events=He.Events;var Be=o(42195);t.FocusedCellController=Be.FocusedCellController;var ze=o(44859);t.defaultGroupComparator=ze.defaultGroupComparator;var Ue=o(44081);t.GridOptionsWrapper=Ue.GridOptionsWrapper;var Ye=o(60843);t.EventService=Ye.EventService;var qe=o(4889);t.SelectableService=qe.SelectableService;var $e=o(81999);t.GridCore=$e.GridCore;var Ke=o(37132);t.Logger=Ke.Logger;var Ze=o(54828);t.SelectionController=Ze.SelectionController;var Je=o(86608);t.SortController=Je.SortController;var Qe=o(92427);t.TemplateService=Qe.TemplateService;var Xe=o(83423);t.Utils=Xe.Utils,t.NumberSequence=Xe.NumberSequence,t._=Xe._,t.Promise=Xe.Promise;var et=o(24463);t.ValueService=et.ValueService;var tt=o(40634);t.ExpressionService=tt.ExpressionService;var ot=o(37132);t.LoggerFactory=ot.LoggerFactory;var rt=o(44871);t.ColumnApi=rt.ColumnApi;var nt=o(52814);t.BaseComponentWrapper=nt.BaseComponentWrapper;var it=o(59007);t.Environment=it.Environment;var st=o(39984);t.TooltipManager=st.TooltipManager},47721:(e,t)=>{function o(e,t,o,r){null!==e?"number"!=typeof r?i(t,"querySelectors",{attributeName:o,querySelector:e}):console.error("ag-Grid: QuerySelector should be on an attribute"):console.error("ag-Grid: QuerySelector selector should not be null")}function r(e,t,o){null!==e?i(t,"listenerMethods",{methodName:o,eventName:e}):console.error("ag-Grid: EventListener eventName should not be null")}function n(e,t,o){null!==e?i(t,"methods",{methodName:o,alias:e}):console.error("ag-Grid: EventListener eventName should not be null")}function i(e,t,o){var r=function(e,t){return e.__agComponentMetaData||(e.__agComponentMetaData={}),e.__agComponentMetaData[t]||(e.__agComponentMetaData[t]={}),e.__agComponentMetaData[t]}(e,e.constructor.name);r[t]||(r[t]=[]),r[t].push(o)}Object.defineProperty(t,"__esModule",{value:!0}),t.QuerySelector=function(e){return o.bind(this,e)},t.RefSelector=function(e){return o.bind(this,"[ref="+e+"]")},t.Listener=function(e){return r.bind(this,e)},t.Method=function(e){return n.bind(this,e)}},48011:function(e,t,o){var r=this&&this.__decorate||function(e,t,o,r){var n,i=arguments.length,s=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,o):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,o,r);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(s=(i<3?n(s):i>3?n(t,o,s):n(t,o))||s);return i>3&&s&&Object.defineProperty(t,o,s),s},n=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)};Object.defineProperty(t,"__esModule",{value:!0});var i=o(72493),s=o(44081),a=o(83423),l=function(){function e(e){this.childCount=0,this.rowTemplatesToAdd=[],this.afterGuiAttachedCallbacks=[],this.lastMadeVisibleTime=0,this.eContainer=e.eContainer,this.eViewport=e.eViewport,e.eWrapper&&(this.eWrapper=e.eWrapper),this.hideWhenNoChildren=e.hideWhenNoChildren}return e.prototype.setVerticalScrollPosition=function(e){this.scrollTop=e},e.prototype.postConstruct=function(){this.checkDomOrder(),this.checkVisibility(),this.gridOptionsWrapper.addEventListener(s.GridOptionsWrapper.PROP_DOM_LAYOUT,this.checkDomOrder.bind(this))},e.prototype.checkDomOrder=function(){this.domOrder=this.gridOptionsWrapper.isEnsureDomOrder()},e.prototype.getRowElement=function(e){return this.eContainer.querySelector('[comp-id="'+e+'"]')},e.prototype.setHeight=function(e){null!=e?(this.eContainer.style.height=e+"px",this.eWrapper&&(this.eWrapper.style.height=e+"px")):this.eContainer.style.height=""},e.prototype.flushRowTemplates=function(){if(0!==this.rowTemplatesToAdd.length){var e=this.rowTemplatesToAdd.join("");a._.appendHtml(this.eContainer,e),this.rowTemplatesToAdd.length=0}this.afterGuiAttachedCallbacks.forEach((function(e){return e()})),this.afterGuiAttachedCallbacks.length=0,this.lastPlacedElement=null},e.prototype.appendRowTemplate=function(e,t){this.domOrder?this.lastPlacedElement=a._.insertTemplateWithDomOrder(this.eContainer,e,this.lastPlacedElement):this.rowTemplatesToAdd.push(e),this.afterGuiAttachedCallbacks.push(t),this.childCount++,this.checkVisibility()},e.prototype.ensureDomOrder=function(e){this.domOrder&&(a._.ensureDomOrder(this.eContainer,e,this.lastPlacedElement),this.lastPlacedElement=e)},e.prototype.removeRowElement=function(e){this.eContainer.removeChild(e),this.childCount--,this.checkVisibility()},e.prototype.checkVisibility=function(){if(this.hideWhenNoChildren){var e=this.eViewport?this.eViewport:this.eContainer,t=this.childCount>0;this.visible!==t&&(this.visible=t,this.lastMadeVisibleTime=(new Date).getTime(),a._.setVisible(e,t),t&&this.eViewport&&(this.eViewport.scrollTop=this.scrollTop))}},e.prototype.isMadeVisibleRecently=function(){return(new Date).getTime()-this.lastMadeVisibleTime<500},r([i.Autowired("gridOptionsWrapper"),n("design:type",s.GridOptionsWrapper)],e.prototype,"gridOptionsWrapper",void 0),r([i.PostConstruct,n("design:type",Function),n("design:paramtypes",[]),n("design:returntype",void 0)],e.prototype,"postConstruct",null),e}();t.RowContainerComponent=l},49281:function(e,t,o){var r,n=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o])},r(e,t)},function(e,t){function o(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)});Object.defineProperty(t,"__esModule",{value:!0});var i=o(46379),s=o(45727),a=o(83423),l=function(e){function t(){return e.call(this,t.TEMPLATE)||this}return n(t,e),t.prototype.init=function(e){this.params=e,this.focusAfterAttached=e.cellStartedEdit,this.textarea=document.createElement("textarea"),this.textarea.maxLength=e.maxLength?e.maxLength:"200",this.textarea.cols=e.cols?e.cols:"60",this.textarea.rows=e.rows?e.rows:"10",a._.exists(e.value)&&(this.textarea.value=e.value.toString()),this.getGui().querySelector(".ag-large-textarea").appendChild(this.textarea),this.addGuiEventListener("keydown",this.onKeyDown.bind(this))},t.prototype.onKeyDown=function(e){var t=e.which||e.keyCode;(t==s.Constants.KEY_LEFT||t==s.Constants.KEY_UP||t==s.Constants.KEY_RIGHT||t==s.Constants.KEY_DOWN||e.shiftKey&&t==s.Constants.KEY_ENTER)&&e.stopPropagation()},t.prototype.afterGuiAttached=function(){this.focusAfterAttached&&this.textarea.focus()},t.prototype.getValue=function(){return this.params.parseValue(this.textarea.value)},t.TEMPLATE='<div class="ag-large-text" tabindex="0"><div class="ag-large-textarea"></div></div>',t}(i.PopupComponent);t.LargeTextCellEditor=l},49498:(e,t,o)=>{t.AgGridReact=o(83684).AgGridReact,o(85397).AgGridColumn},50298:function(e,t,o){var r,n=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o])},r(e,t)},function(e,t){function o(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)}),i=this&&this.__decorate||function(e,t,o,r){var n,i=arguments.length,s=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,o):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,o,r);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(s=(i<3?n(s):i>3?n(t,o,s):n(t,o))||s);return i>3&&s&&Object.defineProperty(t,o,s),s},s=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)};Object.defineProperty(t,"__esModule",{value:!0});var a=o(44081),l=o(72493),p=function(e){function t(){return e.call(this)||this}return n(t,e),t.prototype.init=function(e){var o=this.gridOptionsWrapper.getOverlayNoRowsTemplate()?this.gridOptionsWrapper.getOverlayNoRowsTemplate():t.DEFAULT_NO_ROWS_TEMPLATE,r=this.gridOptionsWrapper.getLocaleTextFunc(),n=o.replace("[NO_ROWS_TO_SHOW]",r("noRowsToShow","No Rows To Show"));this.setTemplate(n)},t.DEFAULT_NO_ROWS_TEMPLATE='<span class="ag-overlay-no-rows-center">[NO_ROWS_TO_SHOW]</span>',i([l.Autowired("gridOptionsWrapper"),s("design:type",a.GridOptionsWrapper)],t.prototype,"gridOptionsWrapper",void 0),t}(o(22131).Component);t.NoRowsOverlayComponent=p},50580:function(e,t,o){var r=this&&this.__decorate||function(e,t,o,r){var n,i=arguments.length,s=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,o):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,o,r);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(s=(i<3?n(s):i>3?n(t,o,s):n(t,o))||s);return i>3&&s&&Object.defineProperty(t,o,s),s},n=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)};Object.defineProperty(t,"__esModule",{value:!0});var i=o(44081),s=o(15068),a=o(72493),l=o(60843),p=o(63405),u=o(45727),d=o(44871),c=o(40797),h=o(83423),f=function(){function e(){}return e.prototype.init=function(){this.setPinnedTopRowData(this.gridOptionsWrapper.getPinnedTopRowData()),this.setPinnedBottomRowData(this.gridOptionsWrapper.getPinnedBottomRowData())},e.prototype.isEmpty=function(e){var t=e===u.Constants.PINNED_TOP?this.pinnedTopRows:this.pinnedBottomRows;return h._.missingOrEmpty(t)},e.prototype.isRowsToRender=function(e){return!this.isEmpty(e)},e.prototype.getRowAtPixel=function(e,t){var o=t===u.Constants.PINNED_TOP?this.pinnedTopRows:this.pinnedBottomRows;if(h._.missingOrEmpty(o))return 0;for(var r=0;r<o.length;r++){var n=o[r];if(n.rowTop+n.rowHeight-1>=e)return r}return o.length-1},e.prototype.setPinnedTopRowData=function(e){this.pinnedTopRows=this.createNodesFromData(e,!0);var t={type:p.Events.EVENT_PINNED_ROW_DATA_CHANGED,api:this.gridApi,columnApi:this.columnApi};this.eventService.dispatchEvent(t)},e.prototype.setPinnedBottomRowData=function(e){this.pinnedBottomRows=this.createNodesFromData(e,!1);var t={type:p.Events.EVENT_PINNED_ROW_DATA_CHANGED,api:this.gridApi,columnApi:this.columnApi};this.eventService.dispatchEvent(t)},e.prototype.createNodesFromData=function(e,t){var o=this,r=[];if(e){var n=0;e.forEach((function(e,i){var a=new s.RowNode;o.context.wireBean(a),a.data=e,a.rowPinned=t?u.Constants.PINNED_TOP:u.Constants.PINNED_BOTTOM,a.setRowTop(n),a.setRowHeight(o.gridOptionsWrapper.getRowHeightForNode(a).height),a.setRowIndex(i),n+=a.rowHeight,r.push(a)}))}return r},e.prototype.getPinnedTopRowData=function(){return this.pinnedTopRows},e.prototype.getPinnedBottomRowData=function(){return this.pinnedBottomRows},e.prototype.getPinnedTopTotalHeight=function(){return this.getTotalHeight(this.pinnedTopRows)},e.prototype.getPinnedTopRowCount=function(){return this.pinnedTopRows?this.pinnedTopRows.length:0},e.prototype.getPinnedBottomRowCount=function(){return this.pinnedBottomRows?this.pinnedBottomRows.length:0},e.prototype.getPinnedTopRow=function(e){return this.pinnedTopRows[e]},e.prototype.getPinnedBottomRow=function(e){return this.pinnedBottomRows[e]},e.prototype.forEachPinnedTopRow=function(e){h._.missingOrEmpty(this.pinnedTopRows)||this.pinnedTopRows.forEach(e)},e.prototype.forEachPinnedBottomRow=function(e){h._.missingOrEmpty(this.pinnedBottomRows)||this.pinnedBottomRows.forEach(e)},e.prototype.getPinnedBottomTotalHeight=function(){return this.getTotalHeight(this.pinnedBottomRows)},e.prototype.getTotalHeight=function(e){if(e&&0!==e.length){var t=e[e.length-1];return t.rowTop+t.rowHeight}return 0},r([a.Autowired("gridOptionsWrapper"),n("design:type",i.GridOptionsWrapper)],e.prototype,"gridOptionsWrapper",void 0),r([a.Autowired("eventService"),n("design:type",l.EventService)],e.prototype,"eventService",void 0),r([a.Autowired("context"),n("design:type",a.Context)],e.prototype,"context",void 0),r([a.Autowired("columnApi"),n("design:type",d.ColumnApi)],e.prototype,"columnApi",void 0),r([a.Autowired("gridApi"),n("design:type",c.GridApi)],e.prototype,"gridApi",void 0),r([a.PostConstruct,n("design:type",Function),n("design:paramtypes",[]),n("design:returntype",void 0)],e.prototype,"init",null),r([a.Bean("pinnedRowModel")],e)}();t.PinnedRowModel=f},51755:function(e,t,o){var r,n=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o])},r(e,t)},function(e,t){function o(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)}),i=this&&this.__decorate||function(e,t,o,r){var n,i=arguments.length,s=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,o):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,o,r);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(s=(i<3?n(s):i>3?n(t,o,s):n(t,o))||s);return i>3&&s&&Object.defineProperty(t,o,s),s},s=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)};Object.defineProperty(t,"__esModule",{value:!0});var a=o(8534),l=o(72493),p=o(60843),u=o(85222),d=o(83423),c=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.scrollY=0,t.uiBodyHeight=0,t}return n(t,e),t.prototype.postConstruct=function(){this.addDestroyableEventListener(this.eventService,u.Events.EVENT_BODY_HEIGHT_CHANGED,this.updateOffset.bind(this)),this.scrollBarWidth=d._.getScrollbarWidth(),this.maxDivHeight=d._.getMaxDivHeight()},t.prototype.registerGridComp=function(e){this.gridPanel=e},t.prototype.isScaling=function(){return this.scaling},t.prototype.getOffset=function(){return this.offset},t.prototype.updateOffset=function(){if(this.scaling){var e=this.gridPanel.getVScrollPosition().top,t=this.getUiBodyHeight();(e!==this.scrollY||t!==this.uiBodyHeight)&&(this.scrollY=e,this.uiBodyHeight=t,this.calculateOffset())}},t.prototype.calculateOffset=function(){this.uiContainerHeight=this.maxDivHeight,this.pixelsToShave=this.modelHeight-this.uiContainerHeight,this.maxScrollY=this.uiContainerHeight-this.uiBodyHeight;var e=this.scrollY/this.maxScrollY;this.setOffset(e*this.pixelsToShave)},t.prototype.clearOffset=function(){this.uiContainerHeight=this.modelHeight,this.pixelsToShave=0,this.setOffset(0)},t.prototype.setOffset=function(e){var t="number"==typeof e?Math.floor(e):null;this.offset!==t&&(this.offset=t,this.eventService.dispatchEvent({type:u.Events.EVENT_HEIGHT_SCALE_CHANGED}))},t.prototype.setModelHeight=function(e){this.modelHeight=e,this.scaling=this.maxDivHeight>0&&e>this.maxDivHeight,this.scaling?this.calculateOffset():this.clearOffset()},t.prototype.getUiContainerHeight=function(){return this.uiContainerHeight},t.prototype.getRealPixelPosition=function(e){return e-this.offset},t.prototype.getUiBodyHeight=function(){var e=this.gridPanel.getVScrollPosition();return e.bottom-e.top},t.prototype.getScrollPositionForPixel=function(e){if(this.pixelsToShave<=0)return e;var t=e/(this.modelHeight-this.getUiBodyHeight());return this.maxScrollY*t},i([l.Autowired("eventService"),s("design:type",p.EventService)],t.prototype,"eventService",void 0),i([l.PostConstruct,s("design:type",Function),s("design:paramtypes",[]),s("design:returntype",void 0)],t.prototype,"postConstruct",null),i([l.Bean("maxDivHeightScaler")],t)}(a.BeanStub);t.MaxDivHeightScaler=c},52814:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0});var o=function(){function e(){}return e.prototype.wrap=function(e,t,o,r){var n=this;void 0===o&&(o=[]);var i=this.createWrapper(e,r);return t.forEach((function(e){n.createMethod(i,e,!0)})),o.forEach((function(e){n.createMethod(i,e,!1)})),i},e.prototype.createMethod=function(e,t,o){e.addMethod(t,this.createMethodProxy(e,t,o))},e.prototype.createMethodProxy=function(e,t,o){return function(){return e.hasMethod(t)?e.callMethod(t,arguments):(o&&console.warn("ag-Grid: Framework component is missing the method "+t+"()"),null)}},e}();t.BaseComponentWrapper=o},54828:function(e,t,o){var r=this&&this.__decorate||function(e,t,o,r){var n,i=arguments.length,s=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,o):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,o,r);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(s=(i<3?n(s):i>3?n(t,o,s):n(t,o))||s);return i>3&&s&&Object.defineProperty(t,o,s),s},n=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},i=this&&this.__param||function(e,t){return function(o,r){t(o,r,e)}};Object.defineProperty(t,"__esModule",{value:!0});var s=o(72493),a=o(72493),l=o(37132),p=o(60843),u=o(63405),d=o(72493),c=o(44081),h=o(72493),f=o(45727),g=o(44871),m=o(40797),y=o(83423),v=o(68363),C=function(){function e(){}return e.prototype.setBeans=function(e){this.logger=e.create("SelectionController"),this.reset(),this.gridOptionsWrapper.isRowModelDefault()?this.eventService.addEventListener(u.Events.EVENT_ROW_DATA_CHANGED,this.reset.bind(this)):this.logger.log("dont know what to do here")},e.prototype.init=function(){this.groupSelectsChildren=this.gridOptionsWrapper.isGroupSelectsChildren(),this.eventService.addEventListener(u.Events.EVENT_ROW_SELECTED,this.onRowSelected.bind(this))},e.prototype.setLastSelectedNode=function(e){this.lastSelectedNode=e},e.prototype.getLastSelectedNode=function(){return this.lastSelectedNode},e.prototype.getSelectedNodes=function(){var e=[];return y._.iterateObject(this.selectedNodes,(function(t,o){o&&e.push(o)})),e},e.prototype.getSelectedRows=function(){var e=[];return y._.iterateObject(this.selectedNodes,(function(t,o){o&&o.data&&e.push(o.data)})),e},e.prototype.removeGroupsFromSelection=function(){var e=this;y._.iterateObject(this.selectedNodes,(function(t,o){o&&o.group&&(e.selectedNodes[o.id]=void 0)}))},e.prototype.updateGroupsFromChildrenSelections=function(e){if(this.gridOptionsWrapper.isGroupSelectsChildren()&&this.rowModel.getType()===f.Constants.ROW_MODEL_TYPE_CLIENT_SIDE){var t=this.rowModel.getRootNode();e||(e=new v.ChangedPath(!0,t)).setInactive(),e.forEachChangedNodeDepthFirst((function(e){e!==t&&e.calculateSelectedFromChildren()}))}},e.prototype.getNodeForIdIfSelected=function(e){return this.selectedNodes[e]},e.prototype.clearOtherNodes=function(e){var t=this,o={},r=0;return y._.iterateObject(this.selectedNodes,(function(n,i){if(i&&i.id!==e.id){var s=t.selectedNodes[i.id];r+=s.setSelectedParams({newValue:!1,clearSelection:!1,suppressFinishActions:!0}),t.groupSelectsChildren&&i.parent&&(o[i.parent.id]=i.parent)}})),y._.iterateObject(o,(function(e,t){t.calculateSelectedFromChildren()})),r},e.prototype.onRowSelected=function(e){var t=e.node;this.groupSelectsChildren&&t.group||(t.isSelected()?this.selectedNodes[t.id]=t:this.selectedNodes[t.id]=void 0)},e.prototype.syncInRowNode=function(e,t){this.syncInOldRowNode(e,t),this.syncInNewRowNode(e)},e.prototype.syncInOldRowNode=function(e,t){y._.exists(t)&&e.id!==t.id&&y._.exists(this.selectedNodes[t.id])&&(this.selectedNodes[t.id]=t)},e.prototype.syncInNewRowNode=function(e){y._.exists(this.selectedNodes[e.id])?(e.setSelectedInitialValue(!0),this.selectedNodes[e.id]=e):e.setSelectedInitialValue(!1)},e.prototype.reset=function(){this.logger.log("reset"),this.selectedNodes={},this.lastSelectedNode=null},e.prototype.getBestCostNodeSelection=function(){this.rowModel.getType()!==f.Constants.ROW_MODEL_TYPE_CLIENT_SIDE&&console.warn("getBestCostNodeSelection is only available when using normal row model");var e=this.rowModel.getTopLevelNodes();if(null!==e){var t=[];return function e(o){for(var r=0,n=o.length;r<n;r++){var i=o[r];i.isSelected()?t.push(i):i.group&&i.children&&e(i.children)}}(e),t}console.warn("selectAll not available doing rowModel=virtual")},e.prototype.setRowModel=function(e){this.rowModel=e},e.prototype.isEmpty=function(){var e=0;return y._.iterateObject(this.selectedNodes,(function(t,o){o&&e++})),0===e},e.prototype.deselectAllRowNodes=function(e){void 0===e&&(e=!1);var t=function(e){return e.selectThisNode(!1)},o=this.rowModel.getType()===f.Constants.ROW_MODEL_TYPE_CLIENT_SIDE;if(e){if(!o)return void console.error("ag-Grid: selecting just filtered only works with In Memory Row Model");this.rowModel.forEachNodeAfterFilter(t)}else y._.iterateObject(this.selectedNodes,(function(e,o){o&&t(o)})),this.reset();o&&this.groupSelectsChildren&&this.updateGroupsFromChildrenSelections();var r={type:u.Events.EVENT_SELECTION_CHANGED,api:this.gridApi,columnApi:this.columnApi};this.eventService.dispatchEvent(r)},e.prototype.selectAllRowNodes=function(e){if(void 0===e&&(e=!1),this.rowModel.getType()!==f.Constants.ROW_MODEL_TYPE_CLIENT_SIDE)throw new Error("selectAll only available with normal row model, ie not "+this.rowModel.getType());var t=this.rowModel,o=function(e){return e.selectThisNode(!0)};e?t.forEachNodeAfterFilter(o):t.forEachNode(o),this.rowModel.getType()===f.Constants.ROW_MODEL_TYPE_CLIENT_SIDE&&this.groupSelectsChildren&&this.updateGroupsFromChildrenSelections();var r={type:u.Events.EVENT_SELECTION_CHANGED,api:this.gridApi,columnApi:this.columnApi};this.eventService.dispatchEvent(r)},e.prototype.selectNode=function(e,t){e&&e.setSelectedParams({newValue:!0,clearSelection:!t})},e.prototype.deselectIndex=function(e){var t=this.rowModel.getRow(e);this.deselectNode(t)},e.prototype.deselectNode=function(e){e&&e.setSelectedParams({newValue:!1,clearSelection:!1})},e.prototype.selectIndex=function(e,t){var o=this.rowModel.getRow(e);this.selectNode(o,t)},r([d.Autowired("eventService"),n("design:type",p.EventService)],e.prototype,"eventService",void 0),r([d.Autowired("rowModel"),n("design:type",Object)],e.prototype,"rowModel",void 0),r([d.Autowired("gridOptionsWrapper"),n("design:type",c.GridOptionsWrapper)],e.prototype,"gridOptionsWrapper",void 0),r([d.Autowired("columnApi"),n("design:type",g.ColumnApi)],e.prototype,"columnApi",void 0),r([d.Autowired("gridApi"),n("design:type",m.GridApi)],e.prototype,"gridApi",void 0),r([i(0,a.Qualifier("loggerFactory")),n("design:type",Function),n("design:paramtypes",[l.LoggerFactory]),n("design:returntype",void 0)],e.prototype,"setBeans",null),r([h.PostConstruct,n("design:type",Function),n("design:paramtypes",[]),n("design:returntype",void 0)],e.prototype,"init",null),r([s.Bean("selectionController")],e)}();t.SelectionController=C},55e3:function(e,t,o){var r=this&&this.__decorate||function(e,t,o,r){var n,i=arguments.length,s=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,o):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,o,r);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(s=(i<3?n(s):i>3?n(t,o,s):n(t,o))||s);return i>3&&s&&Object.defineProperty(t,o,s),s},n=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)};Object.defineProperty(t,"__esModule",{value:!0});var i=o(83423),s=o(44081),a=o(73575),l=o(24463),p=o(98239),u=o(44871),d=o(72493),c=o(60843),h=o(63405),f=o(40797),g=o(85910),m=function(){function e(){this.allFilters={},this.quickFilter=null,this.quickFilterParts=null}var t;return t=e,e.prototype.registerGridCore=function(e){this.gridCore=e},e.prototype.init=function(){this.eventService.addEventListener(h.Events.EVENT_ROW_DATA_CHANGED,this.onNewRowsLoaded.bind(this)),this.eventService.addEventListener(h.Events.EVENT_NEW_COLUMNS_LOADED,this.onNewColumnsLoaded.bind(this)),this.quickFilter=this.parseQuickFilter(this.gridOptionsWrapper.getQuickFilterText()),this.setQuickFilterParts(),this.checkExternalFilter()},e.prototype.setQuickFilterParts=function(){this.quickFilter?this.quickFilterParts=this.quickFilter.split(" "):this.quickFilterParts=null},e.prototype.setFilterModel=function(e){var t=this,o=[];if(e){var r=Object.keys(e);i._.iterateObject(this.allFilters,(function(n,s){i._.removeFromArray(r,n);var a=e[n];t.setModelOnFilterWrapper(s.filterPromise,a),o.push(s.filterPromise)})),i._.iterateArray(r,(function(r){var n=t.columnController.getPrimaryColumn(r);if(n){var i=t.getOrCreateFilterWrapper(n,"NO_UI");t.setModelOnFilterWrapper(i.filterPromise,e[r]),o.push(i.filterPromise)}else console.warn("Warning ag-grid setFilterModel - no column found for colId "+r)}))}else i._.iterateObject(this.allFilters,(function(e,r){t.setModelOnFilterWrapper(r.filterPromise,null),o.push(r.filterPromise)}));i.Promise.all(o).then((function(e){t.onFilterChanged()}))},e.prototype.setModelOnFilterWrapper=function(e,t){e.then((function(e){"function"==typeof e.setModel?e.setModel(t):console.warn("Warning ag-grid - filter missing setModel method, which is needed for setFilterModel")}))},e.prototype.getFilterModel=function(){var e={};return i._.iterateObject(this.allFilters,(function(t,o){var r=o.filterPromise.resolveNow(null,(function(e){return e}));if(null==r)return null;if("function"==typeof r.getModel){var n=r.getModel();i._.exists(n)&&(e[t]=n)}else console.warn("Warning ag-grid - filter API missing getModel method, which is needed for getFilterModel")})),e},e.prototype.isAdvancedFilterPresent=function(){return this.advancedFilterPresent},e.prototype.setAdvancedFilterPresent=function(){var e=!1;i._.iterateObject(this.allFilters,(function(t,o){o.filterPromise.resolveNow(!1,(function(e){return e.isFilterActive()}))&&(e=!0)})),this.advancedFilterPresent=e},e.prototype.updateFilterFlagInColumns=function(e){i._.iterateObject(this.allFilters,(function(t,o){var r=o.filterPromise.resolveNow(!1,(function(e){return e.isFilterActive()}));o.column.setFilterActive(r,e)}))},e.prototype.isAnyFilterPresent=function(){return this.isQuickFilterPresent()||this.advancedFilterPresent||this.externalFilterPresent},e.prototype.doesFilterPass=function(e,t){for(var o=e.data,r=Object.keys(this.allFilters),n=0,i=r.length;n<i;n++){var s=r[n],a=this.allFilters[s];if(void 0!==a){var l=a.filterPromise.resolveNow(void 0,(function(e){return e}));if(void 0!==l&&l!==t&&l.isFilterActive()){l.doesFilterPass||console.error("Filter is missing method doesFilterPass");var p={node:e,data:o};if(!l.doesFilterPass(p))return!1}}}return!0},e.prototype.parseQuickFilter=function(e){return i._.missing(e)||""===e?null:this.gridOptionsWrapper.isRowModelDefault()?e.toUpperCase():(console.warn("ag-grid: quick filtering only works with the Client-side Row Model"),null)},e.prototype.setQuickFilter=function(e){var t=this.parseQuickFilter(e);this.quickFilter!==t&&(this.quickFilter=t,this.setQuickFilterParts(),this.onFilterChanged())},e.prototype.checkExternalFilter=function(){this.externalFilterPresent=this.gridOptionsWrapper.isExternalFilterPresent()},e.prototype.onFilterChanged=function(){this.setAdvancedFilterPresent(),this.updateFilterFlagInColumns("filterChanged"),this.checkExternalFilter(),i._.iterateObject(this.allFilters,(function(e,t){t.filterPromise.then((function(e){e.onAnyFilterChanged&&e.onAnyFilterChanged()}))}));var e={type:h.Events.EVENT_FILTER_CHANGED,api:this.gridApi,columnApi:this.columnApi};this.eventService.dispatchEvent(e)},e.prototype.isQuickFilterPresent=function(){return null!==this.quickFilter},e.prototype.doesRowPassOtherFilters=function(e,t){return this.doesRowPassFilter(t,e)},e.prototype.doesRowPassQuickFilterNoCache=function(e,t){var o=this,r=this.columnController.getAllColumnsForQuickFilter(),n=!1;return r.forEach((function(r){if(!n){var s=o.getQuickFilterTextForColumn(r,e);i._.exists(s)&&s.indexOf(t)>=0&&(n=!0)}})),n},e.prototype.doesRowPassQuickFilterCache=function(e,t){return e.quickFilterAggregateText||this.aggregateRowForQuickFilter(e),e.quickFilterAggregateText.indexOf(t)>=0},e.prototype.doesRowPassQuickFilter=function(e){var t=this,o=!0,r=this.gridOptionsWrapper.isCacheQuickFilter();return this.quickFilterParts.forEach((function(n){(r?t.doesRowPassQuickFilterCache(e,n):t.doesRowPassQuickFilterNoCache(e,n))||(o=!1)})),o},e.prototype.doesRowPassFilter=function(e,t){return!(this.isQuickFilterPresent()&&!this.doesRowPassQuickFilter(e)||this.externalFilterPresent&&!this.gridOptionsWrapper.doesExternalFilterPass(e)||this.advancedFilterPresent&&!this.doesFilterPass(e,t))},e.prototype.getQuickFilterTextForColumn=function(e,t){var o,r=this.valueService.getValue(e,t,!0),n=e.getColDef();if(e.getColDef().getQuickFilterText){var s={value:r,node:t,data:t.data,column:e,colDef:n};o=e.getColDef().getQuickFilterText(s)}else o=r;return i._.exists(o)?o.toString().toUpperCase():null},e.prototype.aggregateRowForQuickFilter=function(e){var o=this,r=[];this.columnController.getAllColumnsForQuickFilter().forEach((function(t){var n=o.getQuickFilterTextForColumn(t,e);i._.exists(n)&&r.push(n)})),e.quickFilterAggregateText=r.join(t.QUICK_FILTER_SEPARATOR)},e.prototype.onNewRowsLoaded=function(e){i._.iterateObject(this.allFilters,(function(e,t){t.filterPromise.then((function(e){e.onNewRowsLoaded&&e.onNewRowsLoaded()}))})),this.updateFilterFlagInColumns(e),this.setAdvancedFilterPresent()},e.prototype.createValueGetter=function(e){var t=this;return function(o){return t.valueService.getValue(e,o,!0)}},e.prototype.getFilterComponent=function(e,t){return this.getOrCreateFilterWrapper(e,t).filterPromise},e.prototype.isFilterActive=function(e){var t=this.cachedFilter(e);return!!t&&t.filterPromise.resolveNow(!1,(function(e){return e.isFilterActive()}))},e.prototype.getOrCreateFilterWrapper=function(e,t){var o=this.cachedFilter(e);return o?"NO_UI"!==t&&this.putIntoGui(o,t):(o=this.createFilterWrapper(e,t),this.allFilters[e.getColId()]=o),o},e.prototype.cachedFilter=function(e){return this.allFilters[e.getColId()]},e.prototype.createFilterInstance=function(e,t){var o=this,r="agTextColumnFilter";this.gridOptionsWrapper.isEnterprise()&&(r="agSetColumnFilter");var n=i._.cloneObject(e.getColDef()),s={type:h.Events.EVENT_FILTER_MODIFIED,api:this.gridApi,columnApi:this.columnApi},a=this.onFilterChanged.bind(this),l={api:this.gridOptionsWrapper.getApi(),column:e,colDef:n,rowModel:this.rowModel,filterChangedCallback:a,filterModifiedCallback:function(){return o.eventService.dispatchEvent(s)},valueGetter:this.createValueGetter(e),context:this.gridOptionsWrapper.getContext(),doesRowPassOtherFilter:null,$scope:t};return this.userComponentFactory.newFilterComponent(n,l,r,(function(e,t){return i._.assign(e,{doesRowPassOtherFilter:o.doesRowPassOtherFilters.bind(o,t)})}))},e.prototype.createFilterWrapper=function(e,t){var o={column:e,filterPromise:null,scope:null,compiledElement:null,guiPromise:i.Promise.external()};return o.scope=this.gridOptionsWrapper.isAngularCompileFilters()?this.$scope.$new():null,o.filterPromise=this.createFilterInstance(e,o.scope),this.putIntoGui(o,t),o},e.prototype.putIntoGui=function(e,t){var o=this,r=document.createElement("div");r.className="ag-filter",e.filterPromise.then((function(n){var s=n.getGui();if(i._.missing(s)&&console.warn("getGui method from filter returned "+s+", it should be a DOM element or an HTML template string."),"string"==typeof s&&(s=i._.loadTemplate(s)),r.appendChild(s),e.scope){var a=o.$compile(r)(e.scope);e.compiledElement=a,window.setTimeout((function(){return e.scope.$apply()}),0)}e.guiPromise.resolve(r),o.eventService.dispatchEvent({type:h.Events.EVENT_FILTER_OPENED,column:e.column,source:t,eGui:r,api:o.gridApi,columnApi:o.columnApi})}))},e.prototype.onNewColumnsLoaded=function(){var e=this,t=!1;i._.iterateObject(this.allFilters,(function(o,r){!e.columnController.getPrimaryColumn(r.column)&&(t=!0,e.disposeFilterWrapper(r,"filterDestroyed"))})),t&&this.onFilterChanged()},e.prototype.destroyFilter=function(e,t){void 0===t&&(t="api");var o=this.allFilters[e.getColId()];o&&(this.disposeFilterWrapper(o,t),this.onFilterChanged())},e.prototype.disposeFilterWrapper=function(e,t){var o=this;e.filterPromise.then((function(r){r.setModel(null),r.destroy&&r.destroy(),e.column.setFilterActive(!1,t),e.scope&&(e.compiledElement&&e.compiledElement.remove(),e.scope.$destroy()),delete o.allFilters[e.column.getColId()]}))},e.prototype.destroy=function(){var e=this;i._.iterateObject(this.allFilters,(function(t,o){e.disposeFilterWrapper(o,"filterDestroyed")}))},e.QUICK_FILTER_SEPARATOR="\n",r([d.Autowired("$compile"),n("design:type",Object)],e.prototype,"$compile",void 0),r([d.Autowired("$scope"),n("design:type",Object)],e.prototype,"$scope",void 0),r([d.Autowired("gridOptionsWrapper"),n("design:type",s.GridOptionsWrapper)],e.prototype,"gridOptionsWrapper",void 0),r([d.Autowired("popupService"),n("design:type",a.PopupService)],e.prototype,"popupService",void 0),r([d.Autowired("valueService"),n("design:type",l.ValueService)],e.prototype,"valueService",void 0),r([d.Autowired("columnController"),n("design:type",p.ColumnController)],e.prototype,"columnController",void 0),r([d.Autowired("rowModel"),n("design:type",Object)],e.prototype,"rowModel",void 0),r([d.Autowired("eventService"),n("design:type",c.EventService)],e.prototype,"eventService",void 0),r([d.Autowired("enterprise"),n("design:type",Boolean)],e.prototype,"enterprise",void 0),r([d.Autowired("context"),n("design:type",d.Context)],e.prototype,"context",void 0),r([d.Autowired("columnApi"),n("design:type",u.ColumnApi)],e.prototype,"columnApi",void 0),r([d.Autowired("gridApi"),n("design:type",f.GridApi)],e.prototype,"gridApi",void 0),r([d.Autowired("userComponentFactory"),n("design:type",g.UserComponentFactory)],e.prototype,"userComponentFactory",void 0),r([d.PostConstruct,n("design:type",Function),n("design:paramtypes",[]),n("design:returntype",void 0)],e.prototype,"init",null),r([d.PreDestroy,n("design:type",Function),n("design:paramtypes",[]),n("design:returntype",void 0)],e.prototype,"destroy",null),t=r([d.Bean("filterManager")],e)}();t.FilterManager=m},55090:function(e,t,o){var r=this&&this.__decorate||function(e,t,o,r){var n,i=arguments.length,s=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,o):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,o,r);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(s=(i<3?n(s):i>3?n(t,o,s):n(t,o))||s);return i>3&&s&&Object.defineProperty(t,o,s),s},n=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)};Object.defineProperty(t,"__esModule",{value:!0});var i=o(72493),s=o(44871),a=o(98239),l=o(40797),p=o(44081),u=o(40634),d=o(10042),c=o(92427),h=o(24463),f=o(60843),g=o(64314),m=o(42195),y=o(34470),v=o(73575),C=o(93121),w=o(66490),E=o(93830),_=o(41451),b=o(69065),R=o(85910),S=o(58342),O=o(86608),T=o(55e3),P=o(51755),A=o(39984),I=function(){function e(){}return e.prototype.registerGridComp=function(e){this.gridPanel=e},e.prototype.postConstruct=function(){this.doingMasterDetail=this.gridOptionsWrapper.isMasterDetail()},r([i.Autowired("paginationProxy"),n("design:type",_.PaginationProxy)],e.prototype,"paginationProxy",void 0),r([i.Autowired("context"),n("design:type",i.Context)],e.prototype,"context",void 0),r([i.Autowired("columnApi"),n("design:type",s.ColumnApi)],e.prototype,"columnApi",void 0),r([i.Autowired("gridApi"),n("design:type",l.GridApi)],e.prototype,"gridApi",void 0),r([i.Autowired("gridOptionsWrapper"),n("design:type",p.GridOptionsWrapper)],e.prototype,"gridOptionsWrapper",void 0),r([i.Autowired("expressionService"),n("design:type",u.ExpressionService)],e.prototype,"expressionService",void 0),r([i.Autowired("rowRenderer"),n("design:type",d.RowRenderer)],e.prototype,"rowRenderer",void 0),r([i.Autowired("$compile"),n("design:type",Object)],e.prototype,"$compile",void 0),r([i.Autowired("templateService"),n("design:type",c.TemplateService)],e.prototype,"templateService",void 0),r([i.Autowired("valueService"),n("design:type",h.ValueService)],e.prototype,"valueService",void 0),r([i.Autowired("eventService"),n("design:type",f.EventService)],e.prototype,"eventService",void 0),r([i.Autowired("columnController"),n("design:type",a.ColumnController)],e.prototype,"columnController",void 0),r([i.Autowired("columnAnimationService"),n("design:type",g.ColumnAnimationService)],e.prototype,"columnAnimationService",void 0),r([i.Optional("rangeController"),n("design:type",Object)],e.prototype,"rangeController",void 0),r([i.Autowired("focusedCellController"),n("design:type",m.FocusedCellController)],e.prototype,"focusedCellController",void 0),r([i.Optional("contextMenuFactory"),n("design:type",Object)],e.prototype,"contextMenuFactory",void 0),r([i.Autowired("cellRendererFactory"),n("design:type",y.CellRendererFactory)],e.prototype,"cellRendererFactory",void 0),r([i.Autowired("popupService"),n("design:type",v.PopupService)],e.prototype,"popupService",void 0),r([i.Autowired("valueFormatterService"),n("design:type",C.ValueFormatterService)],e.prototype,"valueFormatterService",void 0),r([i.Autowired("stylingService"),n("design:type",w.StylingService)],e.prototype,"stylingService",void 0),r([i.Autowired("columnHoverService"),n("design:type",E.ColumnHoverService)],e.prototype,"columnHoverService",void 0),r([i.Autowired("enterprise"),n("design:type",Boolean)],e.prototype,"enterprise",void 0),r([i.Autowired("userComponentFactory"),n("design:type",R.UserComponentFactory)],e.prototype,"userComponentFactory",void 0),r([i.Autowired("animationFrameService"),n("design:type",b.AnimationFrameService)],e.prototype,"taskQueue",void 0),r([i.Autowired("dragAndDropService"),n("design:type",S.DragAndDropService)],e.prototype,"dragAndDropService",void 0),r([i.Autowired("sortController"),n("design:type",O.SortController)],e.prototype,"sortController",void 0),r([i.Autowired("filterManager"),n("design:type",T.FilterManager)],e.prototype,"filterManager",void 0),r([i.Autowired("maxDivHeightScaler"),n("design:type",P.MaxDivHeightScaler)],e.prototype,"maxDivHeightScaler",void 0),r([i.Autowired("tooltipManager"),n("design:type",A.TooltipManager)],e.prototype,"tooltipManager",void 0),r([i.PostConstruct,n("design:type",Function),n("design:paramtypes",[]),n("design:returntype",void 0)],e.prototype,"postConstruct",null),r([i.Bean("beans")],e)}();t.Beans=I},57322:function(e,t,o){var r,n=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o])},r(e,t)},function(e,t){function o(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)}),i=this&&this.__decorate||function(e,t,o,r){var n,i=arguments.length,s=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,o):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,o,r);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(s=(i<3?n(s):i>3?n(t,o,s):n(t,o))||s);return i>3&&s&&Object.defineProperty(t,o,s),s},s=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)};Object.defineProperty(t,"__esModule",{value:!0});var a=o(32090),l=o(72493),p=o(22131),u=o(47721),d=function(e){function t(t,o){var r=e.call(this)||this;return r.title=t,r.message=o,r}return n(t,e),t.prototype.postConstruct=function(){var t=this;e.prototype.postConstruct.call(this),this.setTitle(this.title);var o=new c;this.addFeature(this.getContext(),o),o.setMessage(this.message),this.setBody(o.getGui()),this.addDestroyableEventListener(o,"onBtOk",(function(){return t.closePopup()}))},t}(a.PopupWindow);t.PopupMessageBox=d;var c=function(e){function t(){return e.call(this,t.TEMPLATE)||this}return n(t,e),t.prototype.setMessage=function(e){this.eCenter.innerText=e},t.prototype.postConstruct=function(){this.addDestroyableEventListener(this.eOk,"click",this.onBtOk.bind(this))},t.prototype.onBtOk=function(){this.dispatchEvent({type:"onBtOk"})},t.TEMPLATE='<div>\n <div ref="eCenter"></div>\n <div ref="eButtons">\n <button ref="eOk">OK</button>\n </div>\n </div>',i([u.RefSelector("eCenter"),s("design:type",HTMLElement)],t.prototype,"eCenter",void 0),i([u.RefSelector("eOk"),s("design:type",HTMLElement)],t.prototype,"eOk",void 0),i([l.PostConstruct,s("design:type",Function),s("design:paramtypes",[]),s("design:returntype",void 0)],t.prototype,"postConstruct",null),t}(p.Component)},57498:function(e,t,o){var r=this&&this.__decorate||function(e,t,o,r){var n,i=arguments.length,s=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,o):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,o,r);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(s=(i<3?n(s):i>3?n(t,o,s):n(t,o))||s);return i>3&&s&&Object.defineProperty(t,o,s),s},n=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)};Object.defineProperty(t,"__esModule",{value:!0});var i=o(72493),s=o(15068),a=o(44081),l=o(54828),p=o(60843),u=o(98239),d=o(83423),c=function(){function e(){}return e.prototype.execute=function(e){var t=e.rowNode,o=[],r={value:0},n=this.columnController.isPivotMode(),i=n&&t.leafGroup,s=i?[t]:t.childrenAfterSort;return this.recursivelyAddToRowsToDisplay(s,o,r,n,0),!i&&this.gridOptionsWrapper.isGroupIncludeTotalFooter()&&(this.ensureFooterNodeExists(t),this.addRowNodeToRowsToDisplay(t.sibling,o,r,0)),o},e.prototype.recursivelyAddToRowsToDisplay=function(e,t,o,r,n){if(!d._.missingOrEmpty(e))for(var i=this.gridOptionsWrapper.isGroupSuppressRow(),s=this.gridOptionsWrapper.isGroupHideOpenParents(),a=this.gridOptionsWrapper.isGroupRemoveSingleChildren(),l=!a&&this.gridOptionsWrapper.isGroupRemoveLowestSingleChildren(),p=0;p<e.length;p++){var u=e[p],c=u.hasChildren(),h=i&&c,f=r&&!c,g=a&&c&&1===u.childrenAfterGroup.length,m=l&&c&&u.leafGroup&&1===u.childrenAfterGroup.length,y=r&&u.leafGroup,v=s&&u.expanded&&!y;if(!(f||h||v||g||m)&&this.addRowNodeToRowsToDisplay(u,t,o,n),!r||!u.leafGroup)if(c){var C=g||m;if(u.expanded||C){var w=C?n:n+1;this.recursivelyAddToRowsToDisplay(u.childrenAfterSort,t,o,r,w),this.gridOptionsWrapper.isGroupIncludeFooter()&&(this.ensureFooterNodeExists(u),this.addRowNodeToRowsToDisplay(u.sibling,t,o,n))}}else if(u.master&&u.expanded){var E=this.createDetailNode(u);this.addRowNodeToRowsToDisplay(E,t,o,n)}}},e.prototype.addRowNodeToRowsToDisplay=function(e,t,o,r){t.push(e);var n=this.gridOptionsWrapper.isGroupMultiAutoColumn();e.setUiLevel(n?0:r)},e.prototype.ensureFooterNodeExists=function(e){if(!d._.exists(e.sibling)){var t=new s.RowNode;this.context.wireBean(t),Object.keys(e).forEach((function(o){t[o]=e[o]})),t.footer=!0,t.rowTop=null,t.oldRowTop=null,d._.exists(t.id)&&(t.id="rowGroupFooter_"+t.id),t.sibling=e,e.sibling=t}},e.prototype.createDetailNode=function(e){if(d._.exists(e.detailNode))return e.detailNode;var t=new s.RowNode;return this.context.wireBean(t),t.detail=!0,t.selectable=!1,t.flower=t.detail,t.parent=e,d._.exists(e.id)&&(t.id="detail_"+e.id),t.data=e.data,t.level=e.level+1,e.detailNode=t,e.childFlower=e.detailNode,t},r([i.Autowired("gridOptionsWrapper"),n("design:type",a.GridOptionsWrapper)],e.prototype,"gridOptionsWrapper",void 0),r([i.Autowired("selectionController"),n("design:type",l.SelectionController)],e.prototype,"selectionController",void 0),r([i.Autowired("eventService"),n("design:type",p.EventService)],e.prototype,"eventService",void 0),r([i.Autowired("context"),n("design:type",i.Context)],e.prototype,"context",void 0),r([i.Autowired("columnController"),n("design:type",u.ColumnController)],e.prototype,"columnController",void 0),r([i.Bean("flattenStage")],e)}();t.FlattenStage=c},58342:function(e,t,o){var r=this&&this.__decorate||function(e,t,o,r){var n,i=arguments.length,s=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,o):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,o,r);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(s=(i<3?n(s):i>3?n(t,o,s):n(t,o))||s);return i>3&&s&&Object.defineProperty(t,o,s),s},n=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},i=this&&this.__param||function(e,t){return function(o,r){t(o,r,e)}};Object.defineProperty(t,"__esModule",{value:!0});var s,a,l,p=o(37132),u=o(72493),d=o(44081),c=o(25230),h=o(98239),f=o(59007),g=o(83423);!function(e){e[e.ToolPanel=0]="ToolPanel",e[e.HeaderCell=1]="HeaderCell",e[e.RowDrag=2]="RowDrag"}(s=t.DragSourceType||(t.DragSourceType={})),function(e){e[e.Up=0]="Up",e[e.Down=1]="Down"}(a=t.VDirection||(t.VDirection={})),function(e){e[e.Left=0]="Left",e[e.Right=1]="Right"}(l=t.HDirection||(t.HDirection={}));var m=function(){function e(){this.dragSourceAndParamsList=[],this.dropTargets=[]}var t;return t=e,e.prototype.init=function(){this.ePinnedIcon=g._.createIcon("columnMovePin",this.gridOptionsWrapper,null),this.ePlusIcon=g._.createIcon("columnMoveAdd",this.gridOptionsWrapper,null),this.eHiddenIcon=g._.createIcon("columnMoveHide",this.gridOptionsWrapper,null),this.eMoveIcon=g._.createIcon("columnMoveMove",this.gridOptionsWrapper,null),this.eLeftIcon=g._.createIcon("columnMoveLeft",this.gridOptionsWrapper,null),this.eRightIcon=g._.createIcon("columnMoveRight",this.gridOptionsWrapper,null),this.eGroupIcon=g._.createIcon("columnMoveGroup",this.gridOptionsWrapper,null),this.eAggregateIcon=g._.createIcon("columnMoveValue",this.gridOptionsWrapper,null),this.ePivotIcon=g._.createIcon("columnMovePivot",this.gridOptionsWrapper,null),this.eDropNotAllowedIcon=g._.createIcon("dropNotAllowed",this.gridOptionsWrapper,null)},e.prototype.setBeans=function(e){this.logger=e.create("OldToolPanelDragAndDropService")},e.prototype.getStringType=function(e){switch(e){case s.RowDrag:return"row";case s.HeaderCell:return"headerCell";case s.ToolPanel:return"toolPanel";default:return console.warn("ag-Grid: bug - unknown drag type "+e),null}},e.prototype.addDragSource=function(e,t){void 0===t&&(t=!1);var o={eElement:e.eElement,dragStartPixels:e.dragStartPixels,onDragStart:this.onDragStart.bind(this,e),onDragStop:this.onDragStop.bind(this),onDragging:this.onDragging.bind(this)};this.dragSourceAndParamsList.push({params:o,dragSource:e}),this.dragService.addDragSource(o,t)},e.prototype.removeDragSource=function(e){var t=g._.find(this.dragSourceAndParamsList,(function(t){return t.dragSource===e}));t&&(this.dragService.removeDragSource(t.params),g._.removeFromArray(this.dragSourceAndParamsList,t))},e.prototype.destroy=function(){var e=this;this.dragSourceAndParamsList.forEach((function(t){e.dragService.removeDragSource(t.params)})),this.dragSourceAndParamsList.length=0},e.prototype.nudge=function(){this.dragging&&this.onDragging(this.eventLastTime,!0)},e.prototype.onDragStart=function(e,t){this.dragging=!0,this.dragSource=e,this.eventLastTime=t,this.dragItem=this.dragSource.dragItemCallback(),this.lastDropTarget=this.dragSource.dragSourceDropTarget,this.dragSource.dragStarted&&this.dragSource.dragStarted(),this.createGhost()},e.prototype.onDragStop=function(e){if(this.eventLastTime=null,this.dragging=!1,this.dragSource.dragStopped&&this.dragSource.dragStopped(),this.lastDropTarget&&this.lastDropTarget.onDragStop){var t=this.createDropTargetEvent(this.lastDropTarget,e,null,null,!1);this.lastDropTarget.onDragStop(t)}this.lastDropTarget=null,this.dragItem=null,this.removeGhost()},e.prototype.onDragging=function(e,t){var o=this.workOutHDirection(e),r=this.workOutVDirection(e);this.eventLastTime=e,this.positionGhost(e);var n=g._.find(this.dropTargets,this.isMouseOnDropTarget.bind(this,e));if(n!==this.lastDropTarget)this.leaveLastTargetIfExists(e,o,r,t),this.enterDragTargetIfExists(n,e,o,r,t),this.lastDropTarget=n;else if(n){var i=this.createDropTargetEvent(n,e,o,r,t);n.onDragging(i)}},e.prototype.enterDragTargetIfExists=function(e,t,o,r,n){if(e){var i=this.createDropTargetEvent(e,t,o,r,n);e.onDragEnter(i),this.setGhostIcon(e.getIconName?e.getIconName():null)}},e.prototype.leaveLastTargetIfExists=function(e,t,o,r){if(this.lastDropTarget){var n=this.createDropTargetEvent(this.lastDropTarget,e,t,o,r);this.lastDropTarget.onDragLeave(n),this.setGhostIcon(null)}},e.prototype.getAllContainersFromDropTarget=function(e){var t=[e.getContainer()],o=e.getSecondaryContainers?e.getSecondaryContainers():null;return o&&(t=t.concat(o)),t},e.prototype.isMouseOnDropTarget=function(e,t){var o=this.getAllContainersFromDropTarget(t),r=!1;return o.forEach((function(t){if(t){var o=t.getBoundingClientRect();if(0!==o.width&&0!==o.height){var n=e.clientX>=o.left&&e.clientX<=o.right,i=e.clientY>=o.top&&e.clientY<=o.bottom;n&&i&&(r=!0)}}})),!!r&&t.isInterestedIn(this.dragSource.type)},e.prototype.addDropTarget=function(e){this.dropTargets.push(e)},e.prototype.workOutHDirection=function(e){return this.eventLastTime.clientX>e.clientX?l.Left:this.eventLastTime.clientX<e.clientX?l.Right:null},e.prototype.workOutVDirection=function(e){return this.eventLastTime.clientY>e.clientY?a.Up:this.eventLastTime.clientY<e.clientY?a.Down:null},e.prototype.createDropTargetEvent=function(e,t,o,r,n){var i=e.getContainer().getBoundingClientRect();return{event:t,x:t.clientX-i.left,y:t.clientY-i.top,vDirection:r,hDirection:o,dragSource:this.dragSource,fromNudge:n,dragItem:this.dragItem}},e.prototype.positionGhost=function(e){var t=this.eGhost.getBoundingClientRect().height,o=g._.getBodyWidth()-2,r=g._.getBodyHeight()-2,n=e.pageY-t/2,i=e.pageX-30,s=this.gridOptionsWrapper.getDocument(),a=window.pageYOffset||s.documentElement.scrollTop,l=window.pageXOffset||s.documentElement.scrollLeft;o>0&&i+this.eGhost.clientWidth>o+l&&(i=o+l-this.eGhost.clientWidth),i<0&&(i=0),r>0&&n+this.eGhost.clientHeight>r+a&&(n=r+a-this.eGhost.clientHeight),n<0&&(n=0),this.eGhost.style.left=i+"px",this.eGhost.style.top=n+"px"},e.prototype.removeGhost=function(){this.eGhost&&this.eGhostParent&&this.eGhostParent.removeChild(this.eGhost),this.eGhost=null},e.prototype.createGhost=function(){this.eGhost=g._.loadTemplate(t.GHOST_TEMPLATE);var e=this.environment.getTheme();e&&g._.addCssClass(this.eGhost,e),this.eGhostIcon=this.eGhost.querySelector(".ag-dnd-ghost-icon"),this.setGhostIcon(null),this.eGhost.querySelector(".ag-dnd-ghost-label").innerHTML=g._.escape(this.dragSource.dragItemName),this.eGhost.style.height="25px",this.eGhost.style.top="20px",this.eGhost.style.left="20px";var o=this.gridOptionsWrapper.getDocument();this.eGhostParent=o.querySelector("body"),this.eGhostParent?this.eGhostParent.appendChild(this.eGhost):console.warn("ag-Grid: could not find document body, it is needed for dragging columns")},e.prototype.setGhostIcon=function(e,o){var r;switch(void 0===o&&(o=!1),g._.clearElement(this.eGhostIcon),e){case t.ICON_ADD:r=this.ePlusIcon;break;case t.ICON_PINNED:r=this.ePinnedIcon;break;case t.ICON_MOVE:r=this.eMoveIcon;break;case t.ICON_LEFT:r=this.eLeftIcon;break;case t.ICON_RIGHT:r=this.eRightIcon;break;case t.ICON_GROUP:r=this.eGroupIcon;break;case t.ICON_AGGREGATE:r=this.eAggregateIcon;break;case t.ICON_PIVOT:r=this.ePivotIcon;break;case t.ICON_NOT_ALLOWED:r=this.eDropNotAllowedIcon;break;default:r=this.eHiddenIcon}this.eGhostIcon.appendChild(r),g._.addOrRemoveCssClass(this.eGhostIcon,"ag-shake-left-to-right",o)},e.ICON_PINNED="pinned",e.ICON_ADD="add",e.ICON_MOVE="move",e.ICON_LEFT="left",e.ICON_RIGHT="right",e.ICON_GROUP="group",e.ICON_AGGREGATE="aggregate",e.ICON_PIVOT="pivot",e.ICON_NOT_ALLOWED="notAllowed",e.GHOST_TEMPLATE='<div class="ag-dnd-ghost"> <span class="ag-dnd-ghost-icon ag-shake-left-to-right"></span> <div class="ag-dnd-ghost-label"> </div></div>',r([u.Autowired("gridOptionsWrapper"),n("design:type",d.GridOptionsWrapper)],e.prototype,"gridOptionsWrapper",void 0),r([u.Autowired("dragService"),n("design:type",c.DragService)],e.prototype,"dragService",void 0),r([u.Autowired("environment"),n("design:type",f.Environment)],e.prototype,"environment",void 0),r([u.Autowired("columnController"),n("design:type",h.ColumnController)],e.prototype,"columnController",void 0),r([u.PostConstruct,n("design:type",Function),n("design:paramtypes",[]),n("design:returntype",void 0)],e.prototype,"init",null),r([i(0,u.Qualifier("loggerFactory")),n("design:type",Function),n("design:paramtypes",[p.LoggerFactory]),n("design:returntype",void 0)],e.prototype,"setBeans",null),r([u.PreDestroy,n("design:type",Function),n("design:paramtypes",[]),n("design:returntype",void 0)],e.prototype,"destroy",null),t=r([u.Bean("dragAndDropService")],e)}();t.DragAndDropService=m},59007:function(e,t,o){var r=this&&this.__decorate||function(e,t,o,r){var n,i=arguments.length,s=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,o):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,o,r);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(s=(i<3?n(s):i>3?n(t,o,s):n(t,o))||s);return i>3&&s&&Object.defineProperty(t,o,s),s},n=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)};Object.defineProperty(t,"__esModule",{value:!0});var i=o(72493),s=o(83423),a={"ag-theme-material":{headerHeight:56,virtualItemHeight:40,rowHeight:48},"ag-theme-classic":{headerHeight:25,virtualItemHeight:20,rowHeight:25},"ag-theme-balham":{headerHeight:32,virtualItemHeight:28,rowHeight:28}},l=function(){function e(){}return e.prototype.getSassVariable=function(e,t){return"ag-theme-material"==e?a["ag-theme-material"][t]:"ag-theme-balham"==e||"ag-theme-balham-dark"==e?a["ag-theme-balham"][t]:a["ag-theme-classic"][t]},e.prototype.getTheme=function(){for(var e,t=/\bag-(fresh|dark|blue|material|bootstrap|(?:theme-([\w\-]*)))\b/,o=this.eGridDiv;o&&(e=t.exec(o.className),null!=(o=o.parentElement)&&!e););if(e){var r=e[0];if(void 0===e[2]){var n=r.replace("ag-","ag-theme-");s._.doOnce((function(){return console.warn("ag-Grid: As of v19 old theme are no longer provided. Please replace "+r+" with "+n+".")}),"using-old-theme")}return r}},r([i.Autowired("eGridDiv"),n("design:type",HTMLElement)],e.prototype,"eGridDiv",void 0),r([i.Bean("environment")],e)}();t.Environment=l},59873:function(e,t,o){var r=this&&this.__decorate||function(e,t,o,r){var n,i=arguments.length,s=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,o):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,o,r);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(s=(i<3?n(s):i>3?n(t,o,s):n(t,o))||s);return i>3&&s&&Object.defineProperty(t,o,s),s};Object.defineProperty(t,"__esModule",{value:!0});var n=o(72493),i="\r\n",s=function(){function e(){}return e.prototype.createHeader=function(e){void 0===e&&(e={});var t=["version"];return e.version||(e.version="1.0"),e.encoding&&t.push("encoding"),e.standalone&&t.push("standalone"),"<?xml "+t.map((function(t){return t+'="'+e[t]+'"'})).join(" ")+" ?>"},e.prototype.createXml=function(e,t){var o=this,r="";e.properties&&(e.properties.prefixedAttributes&&e.properties.prefixedAttributes.forEach((function(e){Object.keys(e.map).forEach((function(n){r+=o.returnAttributeIfPopulated(e.prefix+n,e.map[n],t)}))})),e.properties.rawMap&&Object.keys(e.properties.rawMap).forEach((function(n){r+=o.returnAttributeIfPopulated(n,e.properties.rawMap[n],t)})));var n="<"+e.name+r;return e.children||null!=e.textNode?null!=e.textNode?n+">"+e.textNode+"</"+e.name+">"+i:(n+=">\r\n",e.children&&e.children.forEach((function(e){n+=o.createXml(e,t)})),n+"</"+e.name+">"+i):n+"/>"+i},e.prototype.returnAttributeIfPopulated=function(e,t,o){if(!t&&""!==t&&0!==t)return"";var r=t;return"boolean"==typeof t&&o&&(r=o(t))," "+e+'="'+r+'"'},r([n.Bean("xmlFactory")],e)}();t.XmlFactory=s},60843:function(e,t,o){var r=this&&this.__decorate||function(e,t,o,r){var n,i=arguments.length,s=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,o):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,o,r);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(s=(i<3?n(s):i>3?n(t,o,s):n(t,o))||s);return i>3&&s&&Object.defineProperty(t,o,s),s},n=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},i=this&&this.__param||function(e,t){return function(o,r){t(o,r,e)}};Object.defineProperty(t,"__esModule",{value:!0});var s=o(37132),a=o(72493),l=o(72493),p=o(44081),u=o(83423),d=function(){function e(){this.allSyncListeners={},this.allAsyncListeners={},this.globalSyncListeners=[],this.globalAsyncListeners=[],this.asyncFunctionsQueue=[],this.scheduled=!1,this.firedEvents={}}var t;return t=e,e.prototype.setBeans=function(e,t,o){if(void 0===o&&(o=null),this.logger=e.create("EventService"),o){var r=t.useAsyncEvents();this.addGlobalListener(o,r)}},e.prototype.getListenerList=function(e,t){var o=t?this.allAsyncListeners:this.allSyncListeners,r=o[e];return r||(r=[],o[e]=r),r},e.prototype.addEventListener=function(e,t,o){void 0===o&&(o=!1);var r=this.getListenerList(e,o);r.indexOf(t)<0&&r.push(t)},e.prototype.addModalPriorityEventListener=function(e,o,r){void 0===r&&(r=!1),this.addEventListener(e+t.PRIORITY,o,r)},e.prototype.addGlobalListener=function(e,t){void 0===t&&(t=!1),t?this.globalAsyncListeners.push(e):this.globalSyncListeners.push(e)},e.prototype.removeEventListener=function(e,t,o){void 0===o&&(o=!1);var r=this.getListenerList(e,o);u._.removeFromArray(r,t)},e.prototype.removeGlobalListener=function(e,t){void 0===t&&(t=!1),t?u._.removeFromArray(this.globalAsyncListeners,e):u._.removeFromArray(this.globalSyncListeners,e)},e.prototype.dispatchEvent=function(e){this.dispatchToListeners(e,!0),this.dispatchToListeners(e,!1),this.firedEvents[e.type]=!0},e.prototype.dispatchEventOnce=function(e){this.firedEvents[e.type]||this.dispatchEvent(e)},e.prototype.dispatchToListeners=function(e,o){var r=this,n=o?this.globalAsyncListeners:this.globalSyncListeners,i=e.type,s=this.getListenerList(i+t.PRIORITY,o);u._.forEachSnapshotFirst(s,(function(t){o?r.dispatchAsync((function(){return t(e)})):t(e)}));var a=this.getListenerList(i,o);u._.forEachSnapshotFirst(a,(function(t){o?r.dispatchAsync((function(){return t(e)})):t(e)})),u._.forEachSnapshotFirst(n,(function(t){o?r.dispatchAsync((function(){return t(i,e)})):t(i,e)}))},e.prototype.dispatchAsync=function(e){this.asyncFunctionsQueue.push(e),this.scheduled||(window.setTimeout(this.flushAsyncQueue.bind(this),0),this.scheduled=!0)},e.prototype.flushAsyncQueue=function(){this.scheduled=!1;var e=this.asyncFunctionsQueue.slice();this.asyncFunctionsQueue=[],e.forEach((function(e){return e()}))},e.PRIORITY="-P1",r([i(0,l.Qualifier("loggerFactory")),i(1,l.Qualifier("gridOptionsWrapper")),i(2,l.Qualifier("globalEventListener")),n("design:type",Function),n("design:paramtypes",[s.LoggerFactory,p.GridOptionsWrapper,Function]),n("design:returntype",void 0)],e.prototype,"setBeans",null),t=r([a.Bean("eventService")],e)}();t.EventService=d},61862:(e,t,o)=>{Object.defineProperty(t,"__esModule",{value:!0});var r=o(97156),n=o(65360),i=!1;t.initialiseAgGridWithWebComponents=function(){if(console.warn("ag-grid: initialiseAgGridWithWebComponents is deprecated. Please use the ag-grid-webcomponent dependency instead. "),!i){i=!0,"undefined"!=typeof document&&document.registerElement||console.error("ag-Grid: unable to find document.registerElement() function, unable to initialise ag-Grid as a Web Component");var e=Object.create(HTMLElement.prototype);r.ComponentUtil.ALL_PROPERTIES.forEach((function(t){Object.defineProperty(e,t,{set:function(e){this.__agGridSetProperty(t,e)},get:function(){return this.__agGridGetProperty(t)},enumerable:!0,configurable:!0})}));var t=e;t.__agGridSetProperty=function(e,t){this.__attributes||(this.__attributes={}),this.__attributes[e]=t;var o={};o[e]={currentValue:t},this.onChange(o)},t.onChange=function(e){this._initialised&&r.ComponentUtil.processOnChange(e,this._gridOptions,this.api,this.columnApi)},t.__agGridGetProperty=function(e){return this.__attributes||(this.__attributes={}),this.__attributes[e]},t.setGridOptions=function(e){var t=this.globalEventListener.bind(this);this._gridOptions=r.ComponentUtil.copyAttributesToGridOptions(e,this);var o={globalEventListener:t};this._agGrid=new n.Grid(this,this._gridOptions,o),this.api=e.api,this.columnApi=e.columnApi,this._initialised=!0},t.createdCallback=function(){for(var e=0;e<this.attributes.length;e++){var t=this.attributes[e];this.setPropertyFromAttribute(t)}},t.setPropertyFromAttribute=function(e){var t,o="string"==typeof(t=e.nodeName)?t.replace(/-([a-z])/g,(function(e){return e[1].toUpperCase()})):t,n=e.nodeValue;r.ComponentUtil.ALL_PROPERTIES.indexOf(o)>=0&&(this[o]=n)},t.attachedCallback=function(e){},t.detachedCallback=function(e){},t.attributeChangedCallback=function(e){var t=this.attributes[e];this.setPropertyFromAttribute(t)},t.globalEventListener=function(e,t){var o=e.toLowerCase(),r=new Event(o);r.agGridDetails=t,this.dispatchEvent(r);var n="on"+o;"function"==typeof this[n]&&this[n](r)},document.registerElement("ag-grid",{prototype:e})}}},63405:(e,t,o)=>{Object.defineProperty(t,"__esModule",{value:!0});var r=o(85222);t.Events=r.Events},64229:function(e,t,o){var r,n=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o])},r(e,t)},function(e,t){function o(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)}),i=this&&this.__decorate||function(e,t,o,r){var n,i=arguments.length,s=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,o):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,o,r);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(s=(i<3?n(s):i>3?n(t,o,s):n(t,o))||s);return i>3&&s&&Object.defineProperty(t,o,s),s},s=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)};Object.defineProperty(t,"__esModule",{value:!0});var a=o(44081),l=o(98239),p=o(44871),u=o(10042),d=o(72493),c=o(60843),h=o(63405),f=o(25230),g=o(45727),m=o(1571),y=o(42195),v=o(13887),C=o(48011),w=o(41451),E=o(15724),_=o(10190),b=o(50580),R=o(40797),S=o(69065),O=o(19378),T=o(8894),P=o(24463),A=o(66419),I=o(58342),D=o(36819),N=o(51755),x=o(45697),F=o(22131),M=o(23801),k=o(64314),L=o(41832),G=o(55090),j=o(47721),W=o(89929),V=o(68198),H=o(83423),B=function(e){function t(){var t=e.call(this,'<div class="ag-root ag-unselectable" role="grid" unselectable="on">\n <ag-header-root ref="headerRoot" unselectable="on"></ag-header-root>\n <div class="ag-floating-top" ref="eTop" role="presentation" unselectable="on">\n <div class="ag-pinned-left-floating-top" ref="eLeftTop" role="presentation" unselectable="on"></div>\n <div class="ag-floating-top-viewport" ref="eTopViewport" role="presentation" unselectable="on">\n <div class="ag-floating-top-container" ref="eTopContainer" role="presentation" unselectable="on"></div>\n </div>\n <div class="ag-pinned-right-floating-top" ref="eRightTop" role="presentation" unselectable="on"></div>\n <div class="ag-floating-top-full-width-container" ref="eTopFullWidthContainer" role="presentation" unselectable="on"></div>\n </div>\n <div class="ag-body-viewport" ref="eBodyViewport" role="presentation" unselectable="on">\n <div class="ag-pinned-left-cols-container" ref="eLeftContainer" role="presentation" unselectable="on"></div>\n <div class="ag-center-cols-clipper" ref="eCenterColsClipper">\n <div class="ag-center-cols-viewport" ref="eCenterViewport" role="presentation" unselectable="on">\n <div class="ag-center-cols-container" ref="eCenterContainer" role="presentation" unselectable="on"></div>\n </div>\n </div>\n <div class="ag-pinned-right-cols-container" ref="eRightContainer" role="presentation" unselectable="on"></div>\n <div class="ag-full-width-container" ref="eFullWidthContainer" role="presentation" unselectable="on"></div>\n </div>\n <div class="ag-floating-bottom" ref="eBottom" role="presentation" unselectable="on">\n <div class="ag-pinned-left-floating-bottom" ref="eLeftBottom" role="presentation" unselectable="on"></div>\n <div class="ag-floating-bottom-viewport" ref="eBottomViewport" role="presentation" unselectable="on">\n <div class="ag-floating-bottom-container" ref="eBottomContainer" role="presentation" unselectable="on"></div>\n </div>\n <div class="ag-pinned-right-floating-bottom" ref="eRightBottom" role="presentation" unselectable="on"></div>\n <div class="ag-floating-bottom-full-width-container" ref="eBottomFullWidthContainer" role="presentation" unselectable="on"></div>\n </div>\n <div class="ag-body-horizontal-scroll" ref="eHorizontalScrollBody">\n <div class="ag-horizontal-left-spacer" ref="eHorizontalLeftSpacer"></div>\n <div class="ag-body-horizontal-scroll-viewport" ref="eBodyHorizontalScrollViewport">\n <div class="ag-body-horizontal-scroll-container" ref="eBodyHorizontalScrollContainer"></div>\n </div>\n <div class="ag-horizontal-right-spacer" ref="eHorizontalRightSpacer"></div>\n </div>\n <ag-overlay-wrapper ref="overlayWrapper"></ag-overlay-wrapper>\n </div>')||this;return t.scrollLeft=-1,t.scrollTop=-1,t.resetLastHorizontalScrollElementDebounce=H._.debounce(t.resetLastHorizontalScrollElement.bind(t),500),t}return n(t,e),t.prototype.getVScrollPosition=function(){return{top:this.eBodyViewport.scrollTop,bottom:this.eBodyViewport.scrollTop+this.eBodyViewport.offsetHeight}},t.prototype.getHScrollPosition=function(){return{left:this.eCenterViewport.scrollLeft,right:this.eCenterViewport.scrollLeft+this.eCenterViewport.offsetWidth}},t.prototype.onRowDataChanged=function(){this.showOrHideOverlay()},t.prototype.showOrHideOverlay=function(){var e=this.paginationProxy.isEmpty(),t=this.gridOptionsWrapper.isSuppressNoRowsOverlay();this[e&&!t?"showNoRowsOverlay":"hideOverlay"]()},t.prototype.onNewColumnsLoaded=function(){this.columnController.isReady()&&!this.paginationProxy.isEmpty()&&this.hideOverlay()},t.prototype.init=function(){var e=this;this.scrollWidth=this.gridOptionsWrapper.getScrollbarWidth(),this.enableRtl=this.gridOptionsWrapper.isEnableRtl(),this.printLayout=this.gridOptionsWrapper.getDomLayout()===g.Constants.DOM_LAYOUT_PRINT,this.gridOptionsWrapper.addLayoutElement(this.getGui()),this.gridOptionsWrapper.addLayoutElement(this.eBodyViewport),this.suppressScrollOnFloatingRow(),this.setupRowAnimationCssClass(),this.buildRowContainerComponents(),this.addEventListeners(),this.addDragListeners(),this.addScrollListener(),this.gridOptionsWrapper.isRowModelDefault()&&!this.gridOptionsWrapper.getRowData()&&this.showLoadingOverlay(),this.setCellTextSelection(this.gridOptionsWrapper.isEnableCellTextSelect()),this.setPinnedContainerSize(),this.setHeaderAndFloatingHeights(),this.disableBrowserDragging(),this.addMouseListeners(),this.addKeyboardEvents(),this.addBodyViewportListener(),this.addStopEditingWhenGridLosesFocus(),this.mockContextMenuForIPad(),this.addRowDragListener(),this.$scope&&this.addAngularApplyCheck(),this.onDisplayedColumnsWidthChanged(),this.gridApi.registerGridComp(this),this.alignedGridsService.registerGridComp(this),this.headerRootComp.registerGridComp(this),this.navigationService.registerGridComp(this),this.heightScaler.registerGridComp(this),this.autoHeightCalculator.registerGridComp(this),this.columnAnimationService.registerGridComp(this),this.autoWidthCalculator.registerGridComp(this),this.paginationAutoPageSizeService.registerGridComp(this),this.beans.registerGridComp(this),this.rowRenderer.registerGridComp(this),this.rangeController&&this.rangeController.registerGridComp(this),[this.eCenterViewport,this.eBodyViewport].forEach((function(t){var o=e.resizeObserverService.observeResize(t,e.onCenterViewportResized.bind(e));e.addDestroyFunc((function(){return o()}))}))},t.prototype.onDomLayoutChanged=function(){var e=this.gridOptionsWrapper.getDomLayout()===g.Constants.DOM_LAYOUT_PRINT;this.printLayout!==e&&(this.printLayout=e,this.setWidthsOfContainers(),this.setPinnedContainerSize())},t.prototype.onCenterViewportResized=function(){this.checkViewportAndScrolls()},t.prototype.setColumnMovingCss=function(e){this.addOrRemoveCssClass("ag-column-moving",e)},t.prototype.setCellTextSelection=function(e){void 0===e&&(e=!1),[this.eTop,this.eCenterContainer,this.eBottom].forEach((function(t){return H._.addOrRemoveCssClass(t,"ag-selectable",e)}))},t.prototype.addRowDragListener=function(){var e=new D.RowDragFeature(this.eBodyViewport,this);this.getContext().wireBean(e),this.dragAndDropService.addDropTarget(e)},t.prototype.addStopEditingWhenGridLosesFocus=function(){var e=this;if(this.gridOptionsWrapper.isStopEditingWhenGridLosesFocus()){var t=function(t){for(var o=!1,r=t.relatedTarget;H._.exists(r)&&!o;){var n=!!e.gridOptionsWrapper.getDomData(r,E.PopupEditorWrapper.DOM_KEY_POPUP_EDITOR_WRAPPER),i=e.eBodyViewport===r||e.eBottom===r||e.eTop===r;o=n||i,r=r.parentNode}o||e.rowRenderer.stopEditing()};this.addDestroyableEventListener(this.eBodyViewport,"focusout",t),this.addDestroyableEventListener(this.eTop,"focusout",t),this.addDestroyableEventListener(this.eBottom,"focusout",t)}},t.prototype.addAngularApplyCheck=function(){var e=this,t=!1,o=function(){t||(t=!0,window.setTimeout((function(){t=!1,e.$scope.$apply()}),0))};this.addDestroyableEventListener(this.eventService,h.Events.EVENT_DISPLAYED_COLUMNS_CHANGED,o),this.addDestroyableEventListener(this.eventService,h.Events.EVENT_VIRTUAL_COLUMNS_CHANGED,o)},t.prototype.disableBrowserDragging=function(){this.addGuiEventListener("dragstart",(function(e){if(e.target instanceof HTMLImageElement)return e.preventDefault(),!1}))},t.prototype.addEventListeners=function(){this.addDestroyableEventListener(this.eventService,h.Events.EVENT_DISPLAYED_COLUMNS_CHANGED,this.onDisplayedColumnsChanged.bind(this)),this.addDestroyableEventListener(this.eventService,h.Events.EVENT_DISPLAYED_COLUMNS_WIDTH_CHANGED,this.onDisplayedColumnsWidthChanged.bind(this)),this.addDestroyableEventListener(this.eventService,h.Events.EVENT_PINNED_ROW_DATA_CHANGED,this.setHeaderAndFloatingHeights.bind(this)),this.addDestroyableEventListener(this.eventService,h.Events.EVENT_ROW_DATA_CHANGED,this.onRowDataChanged.bind(this)),this.addDestroyableEventListener(this.eventService,h.Events.EVENT_ROW_DATA_UPDATED,this.onRowDataChanged.bind(this)),this.addDestroyableEventListener(this.eventService,h.Events.EVENT_NEW_COLUMNS_LOADED,this.onNewColumnsLoaded.bind(this)),this.addDestroyableEventListener(this.gridOptionsWrapper,a.GridOptionsWrapper.PROP_HEADER_HEIGHT,this.setHeaderAndFloatingHeights.bind(this)),this.addDestroyableEventListener(this.gridOptionsWrapper,a.GridOptionsWrapper.PROP_PIVOT_HEADER_HEIGHT,this.setHeaderAndFloatingHeights.bind(this)),this.addDestroyableEventListener(this.gridOptionsWrapper,a.GridOptionsWrapper.PROP_GROUP_HEADER_HEIGHT,this.setHeaderAndFloatingHeights.bind(this)),this.addDestroyableEventListener(this.gridOptionsWrapper,a.GridOptionsWrapper.PROP_PIVOT_GROUP_HEADER_HEIGHT,this.setHeaderAndFloatingHeights.bind(this)),this.addDestroyableEventListener(this.gridOptionsWrapper,a.GridOptionsWrapper.PROP_FLOATING_FILTERS_HEIGHT,this.setHeaderAndFloatingHeights.bind(this)),this.addDestroyableEventListener(this.gridOptionsWrapper,a.GridOptionsWrapper.PROP_DOM_LAYOUT,this.onDomLayoutChanged.bind(this))},t.prototype.addDragListeners=function(){var e=this;this.gridOptionsWrapper.isEnableRangeSelection()&&!H._.missing(this.rangeController)&&[this.eLeftContainer,this.eRightContainer,this.eCenterContainer,this.eTop,this.eBottom].forEach((function(t){var o={eElement:t,onDragStart:e.rangeController.onDragStart.bind(e.rangeController),onDragStop:e.rangeController.onDragStop.bind(e.rangeController),onDragging:e.rangeController.onDragging.bind(e.rangeController),skipMouseEvent:function(e){return e.shiftKey}};e.dragService.addDragSource(o),e.addDestroyFunc((function(){return e.dragService.removeDragSource(o)}))}))},t.prototype.addMouseListeners=function(){var e=this;["click","mousedown","dblclick","contextmenu","mouseover","mouseout"].forEach((function(t){var o=e.processMouseEvent.bind(e,t);e.eAllCellContainers.forEach((function(r){return e.addDestroyableEventListener(r,t,o)}))}))},t.prototype.addKeyboardEvents=function(){var e=this;["keydown","keypress"].forEach((function(t){var o=e.processKeyboardEvent.bind(e,t);e.eAllCellContainers.forEach((function(r){e.addDestroyableEventListener(r,t,o,!0)}))}))},t.prototype.addBodyViewportListener=function(){var e=this;this.addDestroyableEventListener(this.eBodyViewport,"contextmenu",(function(t){var o=H._.getTarget(t);o!==e.eBodyViewport&&o!==e.eCenterViewport||(e.onContextMenu(t,null,null,null,null),e.preventDefaultOnContextMenu(t))}))},t.prototype.getBodyClientRect=function(){if(this.eBodyViewport)return this.eBodyViewport.getBoundingClientRect()},t.prototype.getRowForEvent=function(e){for(var t=H._.getTarget(e);t;){var o=this.gridOptionsWrapper.getDomData(t,O.RowComp.DOM_DATA_KEY_RENDERED_ROW);if(o)return o;t=t.parentElement}return null},t.prototype.processKeyboardEvent=function(e,t){var o=H._.getCellCompForEvent(this.gridOptionsWrapper,t),r=o.getRenderedRow().getRowNode(),n=o.getColumn(),i=o.isEditing();if(o){if(H._.isUserSuppressingKeyboardEvent(this.gridOptionsWrapper,t,r,n,i))t.preventDefault();else switch(e){case"keydown":this.navigationService.handlePageScrollingKey(t)||o.onKeyDown(t),this.doClipboardOperations(t,o);break;case"keypress":o.onKeyPress(t)}if("keydown"===e){var s=o.createEvent(t,h.Events.EVENT_CELL_KEY_DOWN);this.beans.eventService.dispatchEvent(s)}if("keypress"===e){var a=o.createEvent(t,h.Events.EVENT_CELL_KEY_PRESS);this.beans.eventService.dispatchEvent(a)}}},t.prototype.doClipboardOperations=function(e,t){if((e.ctrlKey||e.metaKey)&&!t.isEditing()&&this.mouseEventService.isEventFromThisGrid(e))switch(e.which){case g.Constants.KEY_A:return this.onCtrlAndA(e);case g.Constants.KEY_C:return this.onCtrlAndC(e);case g.Constants.KEY_V:return this.onCtrlAndV();case g.Constants.KEY_D:return this.onCtrlAndD(e)}},t.prototype.scrollToTop=function(){this.eBodyViewport.scrollTop=0},t.prototype.processMouseEvent=function(e,t){if(this.mouseEventService.isEventFromThisGrid(t)&&!H._.isStopPropagationForAgGrid(t)){var o=this.getRowForEvent(t),r=this.mouseEventService.getRenderedCellForEvent(t);"contextmenu"===e?this.handleContextMenuMouseEvent(t,null,o,r):(r&&r.onMouseEvent(e,t),o&&o.onMouseEvent(e,t)),this.preventDefaultOnContextMenu(t)}},t.prototype.mockContextMenuForIPad=function(){var e=this;H._.isUserAgentIPad()&&this.eAllCellContainers.forEach((function(t){var o=new A.TouchListener(t);e.addDestroyableEventListener(o,A.TouchListener.EVENT_LONG_TAP,(function(t){var o=e.getRowForEvent(t.touchEvent),r=e.mouseEventService.getRenderedCellForEvent(t.touchEvent);e.handleContextMenuMouseEvent(null,t.touchEvent,o,r)})),e.addDestroyFunc((function(){return o.destroy()}))}))},t.prototype.handleContextMenuMouseEvent=function(e,t,o,r){var n=o?o.getRowNode():null,i=r?r.getColumn():null,s=null;if(i){var a=e||t;r.dispatchCellContextMenuEvent(a),s=this.valueService.getValue(i,n)}this.onContextMenu(e,t,n,i,s)},t.prototype.onContextMenu=function(e,t,o,r,n){if((this.gridOptionsWrapper.isAllowContextMenuWithControlKey()||!e||!e.ctrlKey&&!e.metaKey)&&this.contextMenuFactory&&!this.gridOptionsWrapper.isSuppressContextMenu()){var i=e||t.touches[0];this.contextMenuFactory.showMenu(o,r,n,i),(e||t).preventDefault()}},t.prototype.preventDefaultOnContextMenu=function(e){this.gridOptionsWrapper.isSuppressMiddleClickScrolls()&&2===e.which&&e.preventDefault()},t.prototype.onCtrlAndA=function(e){var t=this,o=t.columnController,r=t.pinnedRowModel,n=t.paginationProxy,i=t.rangeController,s=g.Constants.PINNED_BOTTOM,a=g.Constants.PINNED_TOP;if(i&&n.isRowsToRender()){var l=[r.isEmpty(a),r.isEmpty(s)],p=l[0]?null:a,u=void 0,d=void 0;l[1]?(u=null,d=this.paginationProxy.getTotalRowCount()-1):(u=s,d=r.getPinnedBottomRowData().length-1);var c=o.getAllDisplayedColumns();if(H._.missingOrEmpty(c))return;i.setRange({rowStart:0,floatingStart:p,rowEnd:d,floatingEnd:u,columnStart:c[0],columnEnd:c[c.length-1]})}e.preventDefault()},t.prototype.onCtrlAndC=function(e){if(this.clipboardService&&!this.gridOptionsWrapper.isEnableCellTextSelection()){var t=this.focusedCellController.getFocusedCell();this.clipboardService.copyToClipboard(),e.preventDefault(),t&&this.focusedCellController.setFocusedCell(t.rowIndex,t.column,t.floating,!0)}},t.prototype.onCtrlAndV=function(){this.enterprise&&!this.gridOptionsWrapper.isSuppressClipboardPaste()&&this.clipboardService.pasteFromClipboard()},t.prototype.onCtrlAndD=function(e){this.enterprise&&(this.clipboardService.copyRangeDown(),e.preventDefault())},t.prototype.ensureIndexVisible=function(e,t){if(!this.printLayout){var o=this.paginationProxy.getTotalRowCount();if("number"!=typeof e||e<0||e>=o)console.warn("invalid row index for ensureIndexVisible: "+e);else{this.paginationProxy.goToPageWithIndex(e);var r,n=this.paginationProxy.getRow(e);do{var i=n.rowTop,s=n.rowHeight,a=this.paginationProxy.getPixelOffset(),l=n.rowTop-a,p=l+n.rowHeight,u=this.getVScrollPosition(),d=this.heightScaler.getOffset(),c=u.top+d,h=u.bottom+d,f=h-c,g=this.heightScaler.getScrollPositionForPixel(l),m=this.heightScaler.getScrollPositionForPixel(p-f),y=Math.min((g+m)/2,l),v=null;"top"===t?v=g:"bottom"===t?v=m:"middle"===t?v=y:c>l?v=g:h<p&&(v=m),null!==v&&(this.eBodyViewport.scrollTop=v,this.rowRenderer.redrawAfterScroll()),r=i!==n.rowTop||s!==n.rowHeight}while(r);this.animationFrameService.flushAllFrames()}}},t.prototype.getCenterWidth=function(){return this.eCenterViewport.clientWidth},t.prototype.isVerticalScrollShowing=function(){var e=this.gridOptionsWrapper.isAlwaysShowVerticalScroll();return H._.addOrRemoveCssClass(this.eBodyViewport,"ag-force-vertical-scroll",e),e||H._.isVerticalScrollShowing(this.eBodyViewport)},t.prototype.isHorizontalScrollShowing=function(){return H._.isHorizontalScrollShowing(this.eCenterViewport)},t.prototype.checkViewportAndScrolls=function(){this.updateScrollVisibleService(),this.checkBodyHeight(),this.onHorizontalViewportChanged(),this.setPinnedContainerSize()},t.prototype.updateScrollVisibleService=function(){this.updateScrollVisibleServiceImpl(),setTimeout(this.updateScrollVisibleServiceImpl.bind(this),500)},t.prototype.updateScrollVisibleServiceImpl=function(){var e={horizontalScrollShowing:!1,verticalScrollShowing:!1};e.verticalScrollShowing=this.isVerticalScrollShowing(),e.horizontalScrollShowing=this.isHorizontalScrollShowing(),this.scrollVisibleService.setScrollsVisible(e),this.setHorizontalScrollVisible(e.horizontalScrollShowing),this.setVerticalScrollPaddingVisible(e.verticalScrollShowing)},t.prototype.setHorizontalScrollVisible=function(e){var t=this.gridOptionsWrapper.isSuppressHorizontalScroll(),o=e&&this.gridOptionsWrapper.getScrollbarWidth()||0,r=t?0:o,n=H._.isBrowserIE()&&e;this.eCenterViewport.style.height="calc(100% + "+o+"px)",H._.setFixedHeight(this.eHorizontalScrollBody,r),H._.setFixedHeight(this.eBodyHorizontalScrollViewport,r+(n?1:0)),n&&(this.eBodyHorizontalScrollViewport.style.bottom="1px"),H._.setFixedHeight(this.eBodyHorizontalScrollContainer,r)},t.prototype.setVerticalScrollPaddingVisible=function(e){var t=e?"scroll":"hidden";this.eTop.style.overflowY=this.eBottom.style.overflowY=t,this.setFakeHScrollSpacerWidths()},t.prototype.ensureColumnVisible=function(e){var t=this.columnController.getGridColumn(e);if(t)if(t.isPinned())console.warn("calling ensureIndexVisible on a "+t.getPinned()+" pinned column doesn't make sense for column "+t.getColId());else if(this.columnController.isColumnDisplayed(t)){var o,r,n=t.getLeft(),i=n+t.getActualWidth(),s=this.eCenterViewport.clientWidth,a=this.getCenterViewportScrollLeft(),l=this.columnController.getBodyContainerWidth();this.enableRtl?(o=l-a-s,r=l-a):(o=a,r=s+a);var p=o>n,u=r<i,d=s<t.getActualWidth(),c=p||d,h=u,f=this.getCenterViewportScrollLeft();(c||h)&&(f=this.enableRtl?c?l-s-n:l-i:c?n:i-s,this.setCenterViewportScrollLeft(f)),this.onHorizontalViewportChanged(),this.animationFrameService.flushAllFrames()}else console.warn("column is not currently visible")},t.prototype.showLoadingOverlay=function(){this.gridOptionsWrapper.isSuppressLoadingOverlay()||this.overlayWrapper.showLoadingOverlay()},t.prototype.showNoRowsOverlay=function(){this.gridOptionsWrapper.isSuppressNoRowsOverlay()||this.overlayWrapper.showNoRowsOverlay()},t.prototype.hideOverlay=function(){this.overlayWrapper.hideOverlay()},t.prototype.sizeColumnsToFit=function(e){var t=this,o=this.eBodyViewport.clientWidth;o>0?this.columnController.sizeColumnsToFit(o,"sizeColumnsToFit"):void 0===e?window.setTimeout((function(){t.sizeColumnsToFit(100)}),0):100===e?window.setTimeout((function(){t.sizeColumnsToFit(500)}),100):500===e?window.setTimeout((function(){t.sizeColumnsToFit(-1)}),500):console.warn("ag-Grid: tried to call sizeColumnsToFit() but the grid is coming back with zero width, maybe the grid is not visible yet on the screen?")},t.prototype.getCenterContainer=function(){return this.eCenterContainer},t.prototype.getDropTargetBodyContainers=function(){return[this.eCenterViewport,this.eTopViewport,this.eBottomViewport]},t.prototype.getDropTargetLeftContainers=function(){return[this.eLeftContainer,this.eLeftBottom,this.eLeftTop]},t.prototype.getDropTargetRightContainers=function(){return[this.eRightContainer,this.eRightBottom,this.eRightTop]},t.prototype.buildRowContainerComponents=function(){var e=this;this.eAllCellContainers=[this.eLeftContainer,this.eRightContainer,this.eCenterContainer,this.eTop,this.eBottom,this.eFullWidthContainer],this.rowContainerComponents={body:new C.RowContainerComponent({eContainer:this.eCenterContainer,eWrapper:this.eCenterColsClipper,eViewport:this.eBodyViewport}),fullWidth:new C.RowContainerComponent({eContainer:this.eFullWidthContainer}),pinnedLeft:new C.RowContainerComponent({eContainer:this.eLeftContainer}),pinnedRight:new C.RowContainerComponent({eContainer:this.eRightContainer}),floatingTop:new C.RowContainerComponent({eContainer:this.eTopContainer}),floatingTopPinnedLeft:new C.RowContainerComponent({eContainer:this.eLeftTop}),floatingTopPinnedRight:new C.RowContainerComponent({eContainer:this.eRightTop}),floatingTopFullWidth:new C.RowContainerComponent({eContainer:this.eTopFullWidthContainer,hideWhenNoChildren:!0}),floatingBottom:new C.RowContainerComponent({eContainer:this.eBottomContainer}),floatingBottomPinnedLeft:new C.RowContainerComponent({eContainer:this.eLeftBottom}),floatingBottomPinnedRight:new C.RowContainerComponent({eContainer:this.eRightBottom}),floatingBottomFullWith:new C.RowContainerComponent({eContainer:this.eBottomFullWidthContainer,hideWhenNoChildren:!0})},H._.iterateObject(this.rowContainerComponents,(function(t,o){o&&e.getContext().wireBean(o)}))},t.prototype.setupRowAnimationCssClass=function(){var e=this,t=function(){var t=e.gridOptionsWrapper.isAnimateRows()&&!e.heightScaler.isScaling();H._.addOrRemoveCssClass(e.eBodyViewport,"ag-row-animation",t),H._.addOrRemoveCssClass(e.eBodyViewport,"ag-row-no-animation",!t)};t(),this.addDestroyableEventListener(this.eventService,h.Events.EVENT_HEIGHT_SCALE_CHANGED,t)},t.prototype.suppressScrollOnFloatingRow=function(){var e=this;this.addDestroyableEventListener(this.eTopViewport,"scroll",(function(){return e.eTopViewport.scrollLeft=0})),this.addDestroyableEventListener(this.eBottomViewport,"scroll",(function(){return e.eTopViewport.scrollLeft=0}))},t.prototype.getRowContainers=function(){return this.rowContainerComponents},t.prototype.getFloatingTopBottom=function(){return[this.eTop,this.eBottom]},t.prototype.onDisplayedColumnsChanged=function(){this.setPinnedContainerSize(),this.setHeaderAndFloatingHeights(),this.onHorizontalViewportChanged(),this.updateScrollVisibleService()},t.prototype.onDisplayedColumnsWidthChanged=function(){this.setWidthsOfContainers(),this.onHorizontalViewportChanged(),this.updateScrollVisibleService(),this.enableRtl&&this.horizontallyScrollHeaderCenterAndFloatingCenter()},t.prototype.setWidthsOfContainers=function(){this.setCenterWidth(),this.setPinnedContainerSize()},t.prototype.setCenterWidth=function(){var e=this.columnController.getBodyContainerWidth();this.printLayout&&(e+=this.columnController.getPinnedLeftContainerWidth()+this.columnController.getPinnedRightContainerWidth()),this.headerRootComp.setHeaderContainerWidth(e);var t=e+"px";this.eCenterContainer.style.width=t,this.eBottomContainer.style.width=t,this.eTopContainer.style.width=t,this.printLayout||(this.eBodyHorizontalScrollContainer.style.width=t)},t.prototype.setPinnedLeftWidth=function(){var e=this,t=this.pinningLeft,o=this.columnController.getPinnedLeftContainerWidth(),r=this.pinningLeft=!this.printLayout&&o>0,n=[this.eLeftContainer,this.eLeftTop,this.eLeftBottom];t!==r&&this.headerRootComp.setLeftVisible(r),n.forEach((function(t){return H._.setVisible(t,e.pinningLeft)})),r&&n.forEach((function(e){return H._.setFixedWidth(e,o)}))},t.prototype.setPinnedRightWidth=function(){var e=this.pinningRight,t=this.columnController.getPinnedRightContainerWidth(),o=this.pinningRight=!this.printLayout&&t>0,r=[this.eRightContainer,this.eRightTop,this.eRightBottom];e!==o&&this.headerRootComp.setRightVisible(o),r.forEach((function(e){return H._.setVisible(e,o)})),o&&r.forEach((function(e){return H._.setFixedWidth(e,t)}))},t.prototype.setPinnedContainerSize=function(){this.setPinnedLeftWidth(),this.setPinnedRightWidth(),this.setFakeHScrollSpacerWidths()},t.prototype.setFakeHScrollSpacerWidths=function(){var e=this.columnController.getPinnedRightContainerWidth();!this.enableRtl&&this.isVerticalScrollShowing()&&(e+=this.scrollWidth),H._.setFixedWidth(this.eHorizontalRightSpacer,e),H._.addOrRemoveCssClass(this.eHorizontalRightSpacer,"ag-scroller-corner",e<=this.scrollWidth);var t=this.columnController.getPinnedLeftContainerWidth();this.enableRtl&&this.isVerticalScrollShowing()&&(t+=this.scrollWidth),H._.setFixedWidth(this.eHorizontalLeftSpacer,t),H._.addOrRemoveCssClass(this.eHorizontalLeftSpacer,"ag-scroller-corner",t<=this.scrollWidth)},t.prototype.checkBodyHeight=function(){var e=this.eBodyViewport.clientHeight;if(this.bodyHeight!==e){this.bodyHeight=e;var t={type:h.Events.EVENT_BODY_HEIGHT_CHANGED,api:this.gridApi,columnApi:this.columnApi};this.eventService.dispatchEvent(t)}},t.prototype.setHeaderAndFloatingHeights=function(){var e,t,o,r=this,n=r.columnController,i=r.gridOptionsWrapper,s=r.pinnedRowModel,a=r.eTop,l=r.eBottom,p=0,u=n.getHeaderRowCount();n.isPivotMode()?(p=0,t=i.getPivotGroupHeaderHeight(),o=i.getPivotHeaderHeight()):(i.isFloatingFilter()&&u++,p=i.isFloatingFilter()?1:0,t=i.getGroupHeaderHeight(),o=i.getHeaderHeight());var d=u-(1+p);e=p*i.getFloatingFiltersHeight(),e+=d*t,e+=o,this.headerRootComp.setHeight(e);var c=s.getPinnedTopTotalHeight();c&&(c+=1);var h=s.getPinnedBottomTotalHeight();h&&(h+=1);var f=c+"px",g=h+"px";a.style.minHeight=f,a.style.height=f,a.style.display=c?"inherit":"none",l.style.minHeight=g,l.style.height=g,l.style.display=h?"inherit":"none",this.checkBodyHeight()},t.prototype.getBodyHeight=function(){return this.bodyHeight},t.prototype.setHorizontalScrollPosition=function(e){this.eCenterViewport.scrollLeft=e,this.doHorizontalScroll(e)},t.prototype.setVerticalScrollPosition=function(e){this.eBodyViewport.scrollTop=e},t.prototype.scrollHorizontally=function(e){var t=this.eCenterViewport.scrollLeft;return this.setHorizontalScrollPosition(t+e),this.eCenterViewport.scrollLeft-t},t.prototype.scrollVertically=function(e){var t=this.eBodyViewport.scrollTop;return this.setVerticalScrollPosition(t+e),this.eBodyViewport.scrollTop-t},t.prototype.addScrollListener=function(){this.addDestroyableEventListener(this.eCenterViewport,"scroll",this.onCenterViewportScroll.bind(this)),this.addDestroyableEventListener(this.eBodyHorizontalScrollViewport,"scroll",this.onFakeHorizontalScroll.bind(this)),this.addDestroyableEventListener(this.eBodyViewport,"scroll",this.onVerticalScroll.bind(this))},t.prototype.onVerticalScroll=function(){var e=this.eBodyViewport.scrollTop;this.scrollTop=e,this.animationFrameService.setScrollTop(e),this.redrawRowsAfterScroll()},t.prototype.isControllingScroll=function(e){return this.lastHorizontalScrollElement?e===this.lastHorizontalScrollElement:(this.lastHorizontalScrollElement=e,!0)},t.prototype.onFakeHorizontalScroll=function(){this.isControllingScroll(this.eBodyHorizontalScrollViewport)&&this.onBodyHorizontalScroll(this.eBodyHorizontalScrollViewport)},t.prototype.onCenterViewportScroll=function(){this.isControllingScroll(this.eCenterViewport)&&this.onBodyHorizontalScroll(this.eCenterViewport)},t.prototype.onBodyHorizontalScroll=function(e){var t=this.eCenterViewport,o=t.scrollWidth,r=t.clientWidth,n=Math.floor(H._.getScrollLeft(e,this.enableRtl));n<0||n+r>o||(this.doHorizontalScroll(n),this.resetLastHorizontalScrollElementDebounce())},t.prototype.resetLastHorizontalScrollElement=function(){this.lastHorizontalScrollElement=null},t.prototype.doHorizontalScroll=function(e){this.scrollLeft=e;var t={type:h.Events.EVENT_BODY_SCROLL,api:this.gridApi,columnApi:this.columnApi,direction:"horizontal",left:this.scrollLeft,top:this.scrollTop};this.eventService.dispatchEvent(t),this.horizontallyScrollHeaderCenterAndFloatingCenter(e),this.onHorizontalViewportChanged()},t.prototype.redrawRowsAfterScroll=function(){var e={type:h.Events.EVENT_BODY_SCROLL,direction:"vertical",api:this.gridApi,columnApi:this.columnApi,left:this.scrollLeft,top:this.scrollTop};this.eventService.dispatchEvent(e)},t.prototype.onHorizontalViewportChanged=function(){var e=this.eCenterViewport.clientWidth,t=this.getCenterViewportScrollLeft();this.columnController.setVirtualViewportPosition(e,t)},t.prototype.getCenterViewportScrollLeft=function(){return H._.getScrollLeft(this.eCenterViewport,this.enableRtl)},t.prototype.setCenterViewportScrollLeft=function(e){H._.setScrollLeft(this.eCenterViewport,e,this.enableRtl)},t.prototype.horizontallyScrollHeaderCenterAndFloatingCenter=function(e){void 0===e&&(e=this.getCenterViewportScrollLeft());var t=this.enableRtl?e:-e,o=this.eCenterViewport,r=o.clientWidth,n=o.scrollWidth;if(!(Math.abs(t)+r>n||this.enableRtl&&t<0||!this.enableRtl&&t>0)){this.headerRootComp.setHorizontalScroll(t),this.eBottomContainer.style.transform="translateX("+t+"px)",this.eTopContainer.style.transform="translateX("+t+"px)";var i=this.lastHorizontalScrollElement===this.eCenterViewport?this.eBodyHorizontalScrollViewport:this.eCenterViewport;H._.setScrollLeft(i,e,this.enableRtl)}},t.prototype.addScrollEventListener=function(e){this.eBodyViewport.addEventListener("scroll",e)},t.prototype.removeScrollEventListener=function(e){this.eBodyViewport.removeEventListener("scroll",e)},i([d.Autowired("alignedGridsService"),s("design:type",_.AlignedGridsService)],t.prototype,"alignedGridsService",void 0),i([d.Autowired("gridOptionsWrapper"),s("design:type",a.GridOptionsWrapper)],t.prototype,"gridOptionsWrapper",void 0),i([d.Autowired("columnController"),s("design:type",l.ColumnController)],t.prototype,"columnController",void 0),i([d.Autowired("rowRenderer"),s("design:type",u.RowRenderer)],t.prototype,"rowRenderer",void 0),i([d.Autowired("pinnedRowModel"),s("design:type",b.PinnedRowModel)],t.prototype,"pinnedRowModel",void 0),i([d.Autowired("eventService"),s("design:type",c.EventService)],t.prototype,"eventService",void 0),i([d.Autowired("animationFrameService"),s("design:type",S.AnimationFrameService)],t.prototype,"animationFrameService",void 0),i([d.Autowired("navigationService"),s("design:type",T.NavigationService)],t.prototype,"navigationService",void 0),i([d.Autowired("autoHeightCalculator"),s("design:type",M.AutoHeightCalculator)],t.prototype,"autoHeightCalculator",void 0),i([d.Autowired("columnAnimationService"),s("design:type",k.ColumnAnimationService)],t.prototype,"columnAnimationService",void 0),i([d.Autowired("autoWidthCalculator"),s("design:type",L.AutoWidthCalculator)],t.prototype,"autoWidthCalculator",void 0),i([d.Autowired("paginationAutoPageSizeService"),s("design:type",w.PaginationAutoPageSizeService)],t.prototype,"paginationAutoPageSizeService",void 0),i([d.Autowired("beans"),s("design:type",G.Beans)],t.prototype,"beans",void 0),i([d.Autowired("paginationProxy"),s("design:type",w.PaginationProxy)],t.prototype,"paginationProxy",void 0),i([d.Autowired("columnApi"),s("design:type",p.ColumnApi)],t.prototype,"columnApi",void 0),i([d.Autowired("gridApi"),s("design:type",R.GridApi)],t.prototype,"gridApi",void 0),i([d.Autowired("dragService"),s("design:type",f.DragService)],t.prototype,"dragService",void 0),i([d.Autowired("mouseEventService"),s("design:type",m.MouseEventService)],t.prototype,"mouseEventService",void 0),i([d.Autowired("focusedCellController"),s("design:type",y.FocusedCellController)],t.prototype,"focusedCellController",void 0),i([d.Autowired("$scope"),s("design:type",Object)],t.prototype,"$scope",void 0),i([d.Autowired("scrollVisibleService"),s("design:type",v.ScrollVisibleService)],t.prototype,"scrollVisibleService",void 0),i([d.Autowired("valueService"),s("design:type",P.ValueService)],t.prototype,"valueService",void 0),i([d.Autowired("dragAndDropService"),s("design:type",I.DragAndDropService)],t.prototype,"dragAndDropService",void 0),i([d.Autowired("maxDivHeightScaler"),s("design:type",N.MaxDivHeightScaler)],t.prototype,"heightScaler",void 0),i([d.Autowired("enterprise"),s("design:type",Boolean)],t.prototype,"enterprise",void 0),i([d.Autowired("resizeObserverService"),s("design:type",V.ResizeObserverService)],t.prototype,"resizeObserverService",void 0),i([d.Optional("rangeController"),s("design:type",Object)],t.prototype,"rangeController",void 0),i([d.Optional("contextMenuFactory"),s("design:type",Object)],t.prototype,"contextMenuFactory",void 0),i([d.Optional("clipboardService"),s("design:type",Object)],t.prototype,"clipboardService",void 0),i([j.RefSelector("eBodyViewport"),s("design:type",HTMLElement)],t.prototype,"eBodyViewport",void 0),i([j.RefSelector("eCenterContainer"),s("design:type",HTMLElement)],t.prototype,"eCenterContainer",void 0),i([j.RefSelector("eCenterViewport"),s("design:type",HTMLElement)],t.prototype,"eCenterViewport",void 0),i([j.RefSelector("eLeftContainer"),s("design:type",HTMLElement)],t.prototype,"eLeftContainer",void 0),i([j.RefSelector("eRightContainer"),s("design:type",HTMLElement)],t.prototype,"eRightContainer",void 0),i([j.RefSelector("eCenterColsClipper"),s("design:type",HTMLElement)],t.prototype,"eCenterColsClipper",void 0),i([j.RefSelector("eHorizontalScrollBody"),s("design:type",HTMLElement)],t.prototype,"eHorizontalScrollBody",void 0),i([j.RefSelector("eHorizontalLeftSpacer"),s("design:type",HTMLElement)],t.prototype,"eHorizontalLeftSpacer",void 0),i([j.RefSelector("eHorizontalRightSpacer"),s("design:type",HTMLElement)],t.prototype,"eHorizontalRightSpacer",void 0),i([j.RefSelector("eBodyHorizontalScrollViewport"),s("design:type",HTMLElement)],t.prototype,"eBodyHorizontalScrollViewport",void 0),i([j.RefSelector("eBodyHorizontalScrollContainer"),s("design:type",HTMLElement)],t.prototype,"eBodyHorizontalScrollContainer",void 0),i([j.RefSelector("eFullWidthContainer"),s("design:type",HTMLElement)],t.prototype,"eFullWidthContainer",void 0),i([j.RefSelector("eTop"),s("design:type",HTMLElement)],t.prototype,"eTop",void 0),i([j.RefSelector("eLeftTop"),s("design:type",HTMLElement)],t.prototype,"eLeftTop",void 0),i([j.RefSelector("eRightTop"),s("design:type",HTMLElement)],t.prototype,"eRightTop",void 0),i([j.RefSelector("eTopContainer"),s("design:type",HTMLElement)],t.prototype,"eTopContainer",void 0),i([j.RefSelector("eTopViewport"),s("design:type",HTMLElement)],t.prototype,"eTopViewport",void 0),i([j.RefSelector("eTopFullWidthContainer"),s("design:type",HTMLElement)],t.prototype,"eTopFullWidthContainer",void 0),i([j.RefSelector("eBottom"),s("design:type",HTMLElement)],t.prototype,"eBottom",void 0),i([j.RefSelector("eLeftBottom"),s("design:type",HTMLElement)],t.prototype,"eLeftBottom",void 0),i([j.RefSelector("eRightBottom"),s("design:type",HTMLElement)],t.prototype,"eRightBottom",void 0),i([j.RefSelector("eBottomContainer"),s("design:type",HTMLElement)],t.prototype,"eBottomContainer",void 0),i([j.RefSelector("eBottomViewport"),s("design:type",HTMLElement)],t.prototype,"eBottomViewport",void 0),i([j.RefSelector("eBottomFullWidthContainer"),s("design:type",HTMLElement)],t.prototype,"eBottomFullWidthContainer",void 0),i([j.RefSelector("headerRoot"),s("design:type",W.HeaderRootComp)],t.prototype,"headerRootComp",void 0),i([j.RefSelector("overlayWrapper"),s("design:type",x.OverlayWrapperComponent)],t.prototype,"overlayWrapper",void 0),i([d.PostConstruct,s("design:type",Function),s("design:paramtypes",[]),s("design:returntype",void 0)],t.prototype,"init",null),t}(F.Component);t.GridPanel=B},64314:function(e,t,o){var r=this&&this.__decorate||function(e,t,o,r){var n,i=arguments.length,s=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,o):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,o,r);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(s=(i<3?n(s):i>3?n(t,o,s):n(t,o))||s);return i>3&&s&&Object.defineProperty(t,o,s),s},n=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)};Object.defineProperty(t,"__esModule",{value:!0});var i=o(72493),s=o(44081),a=function(){function e(){this.executeNextFuncs=[],this.executeLaterFuncs=[],this.active=!1,this.animationThreadCount=0}return e.prototype.registerGridComp=function(e){this.gridPanel=e},e.prototype.isActive=function(){return this.active},e.prototype.start=function(){this.active||this.gridOptionsWrapper.isSuppressColumnMoveAnimation()||this.gridOptionsWrapper.isEnableRtl()||(this.ensureAnimationCssClassPresent(),this.active=!0)},e.prototype.finish=function(){this.active&&(this.flush(),this.active=!1)},e.prototype.executeNextVMTurn=function(e){this.active?this.executeNextFuncs.push(e):e()},e.prototype.executeLaterVMTurn=function(e){this.active?this.executeLaterFuncs.push(e):e()},e.prototype.ensureAnimationCssClassPresent=function(){var e=this;this.animationThreadCount++;var t=this.animationThreadCount;this.gridPanel.setColumnMovingCss(!0),this.executeLaterFuncs.push((function(){e.animationThreadCount===t&&e.gridPanel.setColumnMovingCss(!1)}))},e.prototype.flush=function(){var e=this.executeNextFuncs;this.executeNextFuncs=[];var t=this.executeLaterFuncs;this.executeLaterFuncs=[],0===e.length&&0===t.length||(window.setTimeout((function(){return e.forEach((function(e){return e()}))}),0),window.setTimeout((function(){return t.forEach((function(e){return e()}))}),300))},r([i.Autowired("gridOptionsWrapper"),n("design:type",s.GridOptionsWrapper)],e.prototype,"gridOptionsWrapper",void 0),r([i.Bean("columnAnimationService")],e)}();t.ColumnAnimationService=a},65360:(e,t,o)=>{Object.defineProperty(t,"__esModule",{value:!0});var r=o(44081),n=o(54828),i=o(44871),s=o(98239),a=o(10042),l=o(89929),p=o(55e3),u=o(24463),d=o(60843),c=o(64229),h=o(40797),f=o(7897),g=o(31887),m=o(40634),y=o(92427),v=o(73575),C=o(37132),w=o(814),E=o(41832),_=o(97177),b=o(72493),R=o(43460),S=o(81999),O=o(42726),T=o(58342),P=o(25230),A=o(86608),I=o(42195),D=o(1571),N=o(38427),x=o(24048),F=o(18954),M=o(57498),k=o(63405),L=o(30971),G=o(719),j=o(34470),W=o(93121),V=o(21951),H=o(86895),B=o(13887),z=o(33467),U=o(59873),Y=o(42664),q=o(66490),$=o(93830),K=o(64314),Z=o(2461),J=o(663),Q=o(43878),X=o(41451),ee=o(76133),te=o(45727),oe=o(88842),re=o(6065),ne=o(10190),ie=o(50580),se=o(85910),ae=o(36777),le=o(69638),pe=o(22743),ue=o(55090),de=o(59007),ce=o(69065),he=o(8894),fe=o(51755),ge=o(4889),me=o(23801),ye=o(21914),ve=o(68198),Ce=o(9018),we=o(83423),Ee=o(39984),_e=o(45697),be=function(){function e(t,o,k){t||console.error("ag-Grid: no div element provided to the grid"),o||console.error("ag-Grid: no gridOptions provided to the grid"),this.gridOptions=o;var L=this.getRowModelClass(o),G=we._.exists(e.enterpriseBeans),te=k?k.frameworkFactory:null;we._.missing(te)&&(te=new H.BaseFrameworkFactory);var be=[];e.enterpriseBeans&&(be=be.concat(e.enterpriseBeans)),e.frameworkBeans&&(be=be.concat(e.frameworkBeans));var Re={enterprise:G,gridOptions:o,eGridDiv:t,$scope:k?k.$scope:null,$compile:k?k.$compile:null,quickFilterOnScope:k?k.quickFilterOnScope:null,globalEventListener:k?k.globalEventListener:null,frameworkFactory:te};k&&k.seedBeanInstances&&we._.assign(Re,k.seedBeanInstances);var Se=[{componentName:"AgCheckbox",theClass:V.AgCheckbox},{componentName:"AgGridComp",theClass:c.GridPanel},{componentName:"AgHeaderRoot",theClass:l.HeaderRootComp},{componentName:"AgPagination",theClass:ye.PaginationComp},{componentName:"AgOverlayWrapper",theClass:_e.OverlayWrapperComponent}];e.enterpriseComponents&&(Se=Se.concat(e.enterpriseComponents));var Oe={overrideBeans:be,seed:Re,beans:[L,ue.Beans,X.PaginationAutoPageSizeService,h.GridApi,ae.UserComponentRegistry,le.AgComponentUtils,pe.ComponentMetadataProvider,ve.ResizeObserverService,ae.UserComponentRegistry,se.UserComponentFactory,fe.MaxDivHeightScaler,me.AutoHeightCalculator,j.CellRendererFactory,_.HorizontalResizeService,ie.PinnedRowModel,P.DragService,g.DisplayedGroupCreator,d.EventService,r.GridOptionsWrapper,v.PopupService,n.SelectionController,p.FilterManager,s.ColumnController,X.PaginationProxy,a.RowRenderer,m.ExpressionService,f.ColumnFactory,R.CsvCreator,z.Downloader,U.XmlFactory,Y.GridSerializer,y.TemplateService,ne.AlignedGridsService,he.NavigationService,v.PopupService,oe.ValueCache,u.ValueService,C.LoggerFactory,w.ColumnUtils,E.AutoWidthCalculator,O.StandardMenuFactory,T.DragAndDropService,i.ColumnApi,I.FocusedCellController,D.MouseEventService,de.Environment,N.CellNavigationService,x.FilterStage,F.SortStage,M.FlattenStage,J.FilterService,W.ValueFormatterService,q.StylingService,B.ScrollVisibleService,A.SortController,$.ColumnHoverService,K.ColumnAnimationService,Z.SortService,ge.SelectableService,Q.AutoGroupColService,ee.ImmutableService,re.ChangeDetectionService,ce.AnimationFrameService,Ee.TooltipManager,Ce.ZipContainer],components:Se,enterpriseDefaultComponents:e.enterpriseDefaultComponents,debug:!!o.debug};this.logger=new C.Logger("ag-Grid",(function(){return o.debug}));var Te=new C.Logger("Context",(function(){return Oe.debug}));this.context=new b.Context(Oe,Te);var Pe=new S.GridCore;this.context.wireBean(Pe),this.setColumnsAndData(),this.dispatchGridReadyEvent(o),this.logger.log("initialised successfully, enterprise = "+G)}return e.setEnterpriseBeans=function(t,o){this.enterpriseBeans=t,we._.iterateObject(o,(function(t,o){return e.RowModelClasses[t]=o}))},e.setEnterpriseComponents=function(e){this.enterpriseComponents=e},e.setFrameworkBeans=function(e){this.frameworkBeans=e},e.setEnterpriseDefaultComponents=function(e){this.enterpriseDefaultComponents=e},e.prototype.setColumnsAndData=function(){var e=this.context.getBean("gridOptionsWrapper"),t=this.context.getBean("columnController"),o=this.context.getBean("rowModel"),r=e.getColumnDefs(),n=e.getRowData();we._.missing(r)&&we._.missing(n)||(we._.exists(r)&&t.setColumnDefs(r,"gridInitializing"),we._.exists(n)&&o.getType()===te.Constants.ROW_MODEL_TYPE_CLIENT_SIDE&&o.setRowData(n))},e.prototype.dispatchGridReadyEvent=function(e){var t=this.context.getBean("eventService"),o={type:k.Events.EVENT_GRID_READY,api:e.api,columnApi:e.columnApi};t.dispatchEvent(o)},e.prototype.getRowModelClass=function(t){var o=t.rowModelType;if(o="enterprise"===o?te.Constants.ROW_MODEL_TYPE_SERVER_SIDE:o,we._.exists(o)){var r=e.RowModelClasses[o];if(we._.exists(r))return r;if("normal"===o)return console.warn("ag-Grid: normal rowModel deprecated. Should now be called client side row model instead."),G.ClientSideRowModel;console.error("ag-Grid: could not find matching row model for rowModelType "+o),o===te.Constants.ROW_MODEL_TYPE_VIEWPORT&&console.error("ag-Grid: rowModelType viewport is only available in ag-Grid Enterprise"),o===te.Constants.ROW_MODEL_TYPE_SERVER_SIDE&&console.error("ag-Grid: rowModelType server side is only available in ag-Grid Enterprise")}return G.ClientSideRowModel},e.prototype.destroy=function(){this.gridOptions.api.destroy()},e.RowModelClasses={infinite:L.InfiniteRowModel,clientSide:G.ClientSideRowModel},e}();t.Grid=be},65802:function(e,t,o){var r,n=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o])},r(e,t)},function(e,t){function o(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)});Object.defineProperty(t,"__esModule",{value:!0});var i=o(8534),s=o(44329),a=o(83423),l=function(e){function t(t){var o=e.call(this)||this;return o.maxRowFound=!1,o.blocks={},o.blockCount=0,o.virtualRowCount=t.initialRowCount,o.cacheParams=t,o}return n(t,e),t.prototype.destroy=function(){var t=this;e.prototype.destroy.call(this),this.forEachBlockInOrder((function(e){return t.destroyBlock(e)}))},t.prototype.init=function(){var e=this;this.active=!0,this.addDestroyFunc((function(){return e.active=!1}))},t.prototype.isActive=function(){return this.active},t.prototype.getVirtualRowCount=function(){return this.virtualRowCount},t.prototype.hack_setVirtualRowCount=function(e){this.virtualRowCount=e},t.prototype.isMaxRowFound=function(){return this.maxRowFound},t.prototype.onPageLoaded=function(e){this.cacheParams.rowNodeBlockLoader.loadComplete(),this.checkBlockToLoad(),this.isActive()&&(this.logger.log("onPageLoaded: page = "+e.page.getBlockNumber()+", lastRow = "+e.lastRow),e.success&&this.checkVirtualRowCount(e.page,e.lastRow))},t.prototype.purgeBlocksIfNeeded=function(e){var o=this,r=[];this.forEachBlockInOrder((function(t){t!==e&&r.push(t)})),r.sort((function(e,t){return t.getLastAccessed()-e.getLastAccessed()}));var n=this.cacheParams.maxBlocksInCache>0,i=n?this.cacheParams.maxBlocksInCache-1:null,a=t.MAX_EMPTY_BLOCKS_TO_KEEP-1;r.forEach((function(e,t){if(e.getState()===s.RowNodeBlock.STATE_DIRTY&&t>=a||n&&t>=i){if(e.isAnyNodeOpen(o.virtualRowCount))return;o.removeBlockFromCache(e)}}))},t.prototype.postCreateBlock=function(e){e.addEventListener(s.RowNodeBlock.EVENT_LOAD_COMPLETE,this.onPageLoaded.bind(this)),this.setBlock(e.getBlockNumber(),e),this.purgeBlocksIfNeeded(e),this.checkBlockToLoad()},t.prototype.removeBlockFromCache=function(e){e&&this.destroyBlock(e)},t.prototype.checkBlockToLoad=function(){this.cacheParams.rowNodeBlockLoader.checkBlockToLoad()},t.prototype.checkVirtualRowCount=function(e,t){if("number"==typeof t&&t>=0)this.virtualRowCount=t,this.maxRowFound=!0,this.onCacheUpdated();else if(!this.maxRowFound){var o=(e.getBlockNumber()+1)*this.cacheParams.blockSize+this.cacheParams.overflowSize;this.virtualRowCount<o?(this.virtualRowCount=o,this.onCacheUpdated()):this.cacheParams.dynamicRowHeight&&this.onCacheUpdated()}},t.prototype.setVirtualRowCount=function(e,t){this.virtualRowCount=e,a._.exists(t)&&(this.maxRowFound=t),this.maxRowFound||this.virtualRowCount%this.cacheParams.blockSize==0&&this.virtualRowCount++,this.onCacheUpdated()},t.prototype.forEachNodeDeep=function(e,t){var o=this;this.forEachBlockInOrder((function(r){r.forEachNodeDeep(e,t,o.virtualRowCount)}))},t.prototype.forEachBlockInOrder=function(e){var t=this.getBlockIdsSorted();this.forEachBlockId(t,e)},t.prototype.forEachBlockInReverseOrder=function(e){var t=this.getBlockIdsSorted().reverse();this.forEachBlockId(t,e)},t.prototype.forEachBlockId=function(e,t){var o=this;e.forEach((function(e){var r=o.blocks[e];t(r,e)}))},t.prototype.getBlockIdsSorted=function(){return Object.keys(this.blocks).map((function(e){return parseInt(e,10)})).sort((function(e,t){return e-t}))},t.prototype.getBlock=function(e){return this.blocks[e]},t.prototype.setBlock=function(e,t){this.blocks[e]=t,this.blockCount++,this.cacheParams.rowNodeBlockLoader.addBlock(t)},t.prototype.destroyBlock=function(e){delete this.blocks[e.getBlockNumber()],e.destroy(),this.blockCount--,this.cacheParams.rowNodeBlockLoader.removeBlock(e)},t.prototype.onCacheUpdated=function(){if(this.isActive()){var e={type:t.EVENT_CACHE_UPDATED};this.dispatchEvent(e)}},t.prototype.purgeCache=function(){var e=this;this.forEachBlockInOrder((function(t){return e.removeBlockFromCache(t)})),this.virtualRowCount=this.cacheParams.initialRowCount,this.maxRowFound=!1,this.onCacheUpdated()},t.prototype.getRowNodesInRange=function(e,t){var o=this,r=[],n=-1,i=!1,s=new a.NumberSequence;a._.missing(e)&&(i=!0);var l=!1;return this.forEachBlockInOrder((function(a,p){l||(i&&n+1!==p?l=!0:(n=p,a.forEachNodeShallow((function(o){var n=o===e||o===t;(i||n)&&r.push(o),n&&(i=!i)}),s,o.virtualRowCount)))})),l||i?[]:r},t.EVENT_CACHE_UPDATED="cacheUpdated",t.MAX_EMPTY_BLOCKS_TO_KEEP=2,t}(i.BeanStub);t.RowNodeCache=l},66419:(e,t,o)=>{Object.defineProperty(t,"__esModule",{value:!0});var r=o(60843),n=o(83423),i=function(){function e(e,t){void 0===t&&(t=!1);var o=this;this.destroyFuncs=[],this.touching=!1,this.eventService=new r.EventService,this.eElement=e,this.preventMouseClick=t;var n=this.onTouchStart.bind(this),i=this.onTouchMove.bind(this),s=this.onTouchEnd.bind(this);this.eElement.addEventListener("touchstart",n,{passive:!0}),this.eElement.addEventListener("touchmove",i,{passive:!0}),this.eElement.addEventListener("touchend",s,{passive:!1}),this.destroyFuncs.push((function(){o.eElement.removeEventListener("touchstart",n,{passive:!0}),o.eElement.removeEventListener("touchmove",i,{passive:!0}),o.eElement.removeEventListener("touchend",s,{passive:!1})}))}return e.prototype.getActiveTouch=function(e){for(var t=0;t<e.length;t++)if(e[t].identifier===this.touchStart.identifier)return e[t];return null},e.prototype.addEventListener=function(e,t){this.eventService.addEventListener(e,t)},e.prototype.removeEventListener=function(e,t){this.eventService.removeEventListener(e,t)},e.prototype.onTouchStart=function(t){var o=this;if(!this.touching){this.touchStart=t.touches[0],this.touching=!0,this.moved=!1;var r=this.touchStart;window.setTimeout((function(){var n=o.touchStart===r;if(o.touching&&n&&!o.moved){o.moved=!0;var i={type:e.EVENT_LONG_TAP,touchStart:o.touchStart,touchEvent:t};o.eventService.dispatchEvent(i)}}),500)}},e.prototype.onTouchMove=function(e){if(this.touching){var t=this.getActiveTouch(e.touches);t&&!n._.areEventsNear(t,this.touchStart,4)&&(this.moved=!0)}},e.prototype.onTouchEnd=function(t){if(this.touching){if(!this.moved){var o={type:e.EVENT_TAP,touchStart:this.touchStart};this.eventService.dispatchEvent(o),this.checkForDoubleTap()}this.preventMouseClick&&t.preventDefault(),this.touching=!1}},e.prototype.checkForDoubleTap=function(){var t=(new Date).getTime();if(this.lastTapTime&&this.lastTapTime>0)if(t-this.lastTapTime>e.DOUBLE_TAP_MILLIS){var o={type:e.EVENT_DOUBLE_TAP,touchStart:this.touchStart};this.eventService.dispatchEvent(o),this.lastTapTime=null}else this.lastTapTime=t;else this.lastTapTime=t},e.prototype.destroy=function(){this.destroyFuncs.forEach((function(e){return e()}))},e.EVENT_TAP="tap",e.EVENT_DOUBLE_TAP="doubleTap",e.EVENT_LONG_TAP="longTap",e.DOUBLE_TAP_MILLIS=500,e}();t.TouchListener=i},66490:function(e,t,o){var r=this&&this.__decorate||function(e,t,o,r){var n,i=arguments.length,s=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,o):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,o,r);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(s=(i<3?n(s):i>3?n(t,o,s):n(t,o))||s);return i>3&&s&&Object.defineProperty(t,o,s),s},n=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)};Object.defineProperty(t,"__esModule",{value:!0});var i=o(72493),s=o(40634),a=function(){function e(){}return e.prototype.processAllCellClasses=function(e,t,o,r){this.processClassRules(e.cellClassRules,t,o,r),this.processStaticCellClasses(e,t,o)},e.prototype.processClassRules=function(e,t,o,r){if("object"==typeof e&&null!==e)for(var n=Object.keys(e),i=0;i<n.length;i++){var s=n[i],a=e[s],l=void 0;"string"==typeof a?l=this.expressionService.evaluate(a,t):"function"==typeof a&&(l=a(t)),l?o(s):r&&r(s)}},e.prototype.processStaticCellClasses=function(e,t,o){if(e.cellClass){var r=void 0;"string"==typeof(r="function"==typeof e.cellClass?(0,e.cellClass)(t):e.cellClass)?o(r):Array.isArray(r)&&r.forEach((function(e){o(e)}))}},r([i.Autowired("expressionService"),n("design:type",s.ExpressionService)],e.prototype,"expressionService",void 0),r([i.Bean("stylingService")],e)}();t.StylingService=a},68198:function(e,t,o){var r=this&&this.__decorate||function(e,t,o,r){var n,i=arguments.length,s=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,o):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,o,r);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(s=(i<3?n(s):i>3?n(t,o,s):n(t,o))||s);return i>3&&s&&Object.defineProperty(t,o,s),s},n=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)};Object.defineProperty(t,"__esModule",{value:!0});var i=o(72493),s=o(44081),a=o(83423),l=function(){function e(){}return e.prototype.observeResize=function(e,t){var o,r,n,i,s,l=this.frameworkFactory,p=this.gridOptionsWrapper.isSuppressBrowserResizeObserver();return window.ResizeObserver&&!p?((s=new window.ResizeObserver(t)).observe(e),function(){return s.disconnect()}):(o=a._.offsetWidth(e),r=a._.offsetHeight(e),n=!0,(i=function(){if(n){var s=a._.offsetWidth(e),p=a._.offsetHeight(e);(s!==o||p!==r)&&(o=s,r=p,t()),l.setTimeout(i,500)}})(),function(){return n=!1})},r([i.Autowired("gridOptionsWrapper"),n("design:type",s.GridOptionsWrapper)],e.prototype,"gridOptionsWrapper",void 0),r([i.Autowired("frameworkFactory"),n("design:type",Object)],e.prototype,"frameworkFactory",void 0),r([i.Bean("resizeObserverService")],e)}();t.ResizeObserverService=l},68363:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0});var o=function(){function e(e,t){this.active=!0,this.nodeIdsToColumns={},this.mapToItems={},this.keepingColumns=e,this.pathRoot={rowNode:t,children:null},this.mapToItems[t.id]=this.pathRoot}return e.prototype.setInactive=function(){this.active=!1},e.prototype.isActive=function(){return this.active},e.prototype.depthFirstSearchChangedPath=function(e,t){if(e.children)for(var o=0;o<e.children.length;o++)this.depthFirstSearchChangedPath(e.children[o],t);t(e.rowNode)},e.prototype.depthFirstSearchEverything=function(e,t,o){if(e.childrenAfterGroup)for(var r=0;r<e.childrenAfterGroup.length;r++){var n=e.childrenAfterGroup[r];n.childrenAfterGroup?this.depthFirstSearchEverything(e.childrenAfterGroup[r],t,o):o&&t(n)}t(e)},e.prototype.forEachChangedNodeDepthFirst=function(e,t){void 0===t&&(t=!1),this.active?this.depthFirstSearchChangedPath(this.pathRoot,e):this.depthFirstSearchEverything(this.pathRoot.rowNode,e,t)},e.prototype.executeFromRootNode=function(e){e(this.pathRoot.rowNode)},e.prototype.createPathItems=function(e){for(var t=e,o=0;!this.mapToItems[t.id];){var r={rowNode:t,children:null};this.mapToItems[t.id]=r,o++,t=t.parent}return o},e.prototype.populateColumnsMap=function(e,t){var o=this;if(this.keepingColumns&&t)for(var r=e;r;)this.nodeIdsToColumns[r.id]||(this.nodeIdsToColumns[r.id]={}),t.forEach((function(e){return o.nodeIdsToColumns[r.id][e.getId()]=!0})),r=r.parent},e.prototype.linkPathItems=function(e,t){for(var o=e,r=0;r<t;r++){var n=this.mapToItems[o.id],i=this.mapToItems[o.parent.id];i.children||(i.children=[]),i.children.push(n),o=o.parent}},e.prototype.addParentNode=function(e,t){var o=this.createPathItems(e);this.linkPathItems(e,o),this.populateColumnsMap(e,t)},e.prototype.canSkip=function(e){return this.active&&!this.mapToItems[e.id]},e.prototype.getValueColumnsForNode=function(e,t){if(!this.keepingColumns)return t;var o=this.nodeIdsToColumns[e.id];return t.filter((function(e){return o[e.getId()]}))},e.prototype.getNotValueColumnsForNode=function(e,t){if(!this.keepingColumns)return null;var o=this.nodeIdsToColumns[e.id];return t.filter((function(e){return!o[e.getId()]}))},e}();t.ChangedPath=o},69065:function(e,t,o){var r=this&&this.__decorate||function(e,t,o,r){var n,i=arguments.length,s=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,o):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,o,r);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(s=(i<3?n(s):i>3?n(t,o,s):n(t,o))||s);return i>3&&s&&Object.defineProperty(t,o,s),s},n=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)};Object.defineProperty(t,"__esModule",{value:!0});var i=o(72493),s=o(44081),a=o(85222),l=o(60843),p=function(){function e(){this.createRowTasks=[],this.destroyRowTasks=[],this.ticking=!1,this.scrollGoingDown=!0,this.lastScrollTop=0}return e.prototype.setScrollTop=function(e){this.scrollGoingDown=e>this.lastScrollTop,this.lastScrollTop=e},e.prototype.init=function(){this.useAnimationFrame=!this.gridOptionsWrapper.isSuppressAnimationFrame()},e.prototype.verifyAnimationFrameOn=function(e){!1===this.useAnimationFrame&&console.warn("ag-Grid: AnimationFrameService."+e+" called but animation frames are off")},e.prototype.addP1Task=function(e,t){this.verifyAnimationFrameOn("addP1Task");var o={task:e,index:t};this.createRowTasks.push(o),this.schedule()},e.prototype.addP2Task=function(e){this.verifyAnimationFrameOn("addP2Task"),this.destroyRowTasks.push(e),this.schedule()},e.prototype.executeFrame=function(e){this.verifyAnimationFrameOn("executeFrame"),this.scrollGoingDown?this.createRowTasks.sort((function(e,t){return t.index-e.index})):this.createRowTasks.sort((function(e,t){return e.index-t.index}));for(var t=(new Date).getTime(),o=(new Date).getTime()-t,r=e<=0;r||o<e;){if(this.createRowTasks.length>0)this.createRowTasks.pop().task();else{if(!(this.destroyRowTasks.length>0))break;this.destroyRowTasks.pop()()}o=(new Date).getTime()-t}this.createRowTasks.length>0||this.destroyRowTasks.length>0?this.requestFrame():this.stopTicking()},e.prototype.stopTicking=function(){this.ticking=!1;var e={type:a.Events.EVENT_ANIMATION_QUEUE_EMPTY,columnApi:this.gridOptionsWrapper.getColumnApi(),api:this.gridOptionsWrapper.getApi()};this.eventService.dispatchEvent(e)},e.prototype.flushAllFrames=function(){this.useAnimationFrame&&this.executeFrame(-1)},e.prototype.schedule=function(){this.useAnimationFrame&&(this.ticking||(this.ticking=!0,this.requestFrame()))},e.prototype.requestFrame=function(){var e=this.executeFrame.bind(this,60);window.requestAnimationFrame?window.requestAnimationFrame(e):window.webkitRequestAnimationFrame?window.webkitRequestAnimationFrame(e):window.setTimeout(e,0)},e.prototype.isQueueEmpty=function(){return this.ticking},r([i.Autowired("gridOptionsWrapper"),n("design:type",s.GridOptionsWrapper)],e.prototype,"gridOptionsWrapper",void 0),r([i.Autowired("eventService"),n("design:type",l.EventService)],e.prototype,"eventService",void 0),r([i.PostConstruct,n("design:type",Function),n("design:paramtypes",[]),n("design:returntype",void 0)],e.prototype,"init",null),r([i.Bean("animationFrameService")],e)}();t.AnimationFrameService=p},69397:function(e,t,o){var r,n=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o])},r(e,t)},function(e,t){function o(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)}),i=this&&this.__decorate||function(e,t,o,r){var n,i=arguments.length,s=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,o):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,o,r);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(s=(i<3?n(s):i>3?n(t,o,s):n(t,o))||s);return i>3&&s&&Object.defineProperty(t,o,s),s},s=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)};Object.defineProperty(t,"__esModule",{value:!0});var a=o(72493),l=o(34255),p=o(47721),u=o(85910),d=o(22131),c=o(45727),h=o(83423),f=function(e){function t(){var t=e.call(this,'<div class="ag-input-text-wrapper"><input ref="eColumnFloatingFilter" class="ag-floating-filter-input"></div>')||this;return t.lastKnownModel=null,t}return n(t,e),t.prototype.init=function(e){this.onFloatingFilterChanged=e.onFloatingFilterChanged,this.currentParentModel=e.currentParentModel;var t=null!=e.debounceMs?e.debounceMs:500,o=h._.debounce(this.syncUpWithParentFilter.bind(this),t);this.addDestroyableEventListener(this.eColumnFloatingFilter,"input",o),this.addDestroyableEventListener(this.eColumnFloatingFilter,"keypress",o),this.addDestroyableEventListener(this.eColumnFloatingFilter,"keydown",o);var r=e.column.getDefinition();r.filterParams&&r.filterParams.filterOptions&&1===r.filterParams.filterOptions.length&&"inRange"===r.filterParams.filterOptions[0]&&(this.eColumnFloatingFilter.disabled=!0)},t.prototype.onParentModelChanged=function(e,t){if(null!=t)return this.eColumnFloatingFilter.value=this.parseAsText(t.condition1)+" "+t.operator+" "+this.parseAsText(t.condition2),this.eColumnFloatingFilter.disabled=!0,this.lastKnownModel=null,this.eColumnFloatingFilter.title=this.eColumnFloatingFilter.value,void(this.eColumnFloatingFilter.style.cursor="default");if(this.eColumnFloatingFilter.disabled=!1,this.equalModels(this.lastKnownModel,e))this.lastKnownModel||e||(this.eColumnFloatingFilter.value="");else{this.lastKnownModel=e;var o=this.asFloatingFilterText(e);o!==this.eColumnFloatingFilter.value&&(this.eColumnFloatingFilter.value=o,this.eColumnFloatingFilter.title="")}},t.prototype.syncUpWithParentFilter=function(e){var t=this.asParentModel();this.equalModels(this.lastKnownModel,t)||(h._.isKeyPressed(e,c.Constants.KEY_ENTER)?this.onFloatingFilterChanged({model:t,apply:!0}):this.onFloatingFilterChanged({model:t,apply:!1}))&&(this.lastKnownModel=t)},t.prototype.equalModels=function(e,t){return!!h._.referenceCompare(e,t)||!(!e||!t)&&!Array.isArray(e)&&!Array.isArray(t)&&h._.referenceCompare(e.type,t.type)&&h._.referenceCompare(e.filter,t.filter)&&h._.referenceCompare(e.filterTo,t.filterTo)&&h._.referenceCompare(e.filterType,t.filterType)},i([p.RefSelector("eColumnFloatingFilter"),s("design:type",HTMLInputElement)],t.prototype,"eColumnFloatingFilter",void 0),t}(d.Component);t.InputTextFloatingFilterComp=f;var g=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),t.prototype.asFloatingFilterText=function(e){return e?e.filter:""},t.prototype.asParentModel=function(){return{type:this.currentParentModel().type,filter:this.eColumnFloatingFilter.value,filterType:"text"}},t.prototype.parseAsText=function(e){return this.asFloatingFilterText(e)},t}(f);t.TextFloatingFilterComp=g;var m=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.lastKnownModel=null,t}return n(t,e),t.prototype.init=function(e){this.onFloatingFilterChanged=e.onFloatingFilterChanged,this.currentParentModel=e.currentParentModel;var t=null!=e.debounceMs?e.debounceMs:500,o={onDateChanged:h._.debounce(this.onDateChanged.bind(this),t),filterParams:e.column.getColDef().filterParams};this.dateComponentPromise=this.userComponentFactory.newDateComponent(o);var r=h._.loadTemplate("<div></div>");this.dateComponentPromise.then((function(t){r.appendChild(t.getGui());var o=e.column.getDefinition(),n=o.filterParams&&o.filterParams.filterOptions&&1===o.filterParams.filterOptions.length&&"inRange"===o.filterParams.filterOptions[0];t.eDateInput&&(t.eDateInput.disabled=n)})),r.style.width="100%",r.style.height="100%",this.setTemplateFromElement(r)},t.prototype.onDateChanged=function(){var e=this.currentParentModel(),t=this.asParentModel();this.equalModels(e,t)||(this.onFloatingFilterChanged({model:t,apply:!0}),this.lastKnownModel=t)},t.prototype.equalModels=function(e,t){return!!h._.referenceCompare(e,t)||!(!e||!t)&&!Array.isArray(e)&&!Array.isArray(t)&&h._.referenceCompare(e.type,t.type)&&h._.referenceCompare(e.dateFrom,t.dateFrom)&&h._.referenceCompare(e.dateTo,t.dateTo)&&h._.referenceCompare(e.filterType,t.filterType)},t.prototype.asParentModel=function(){var e=this.currentParentModel(),t=this.dateComponentPromise.resolveNow(null,(function(e){return e.getDate()})),o=h._.serializeDateToYyyyMmDd(l.DateFilter.removeTimezone(t),"-");return{type:e.type,dateFrom:o,dateTo:e?e.dateTo:null,filterType:"date"}},t.prototype.onParentModelChanged=function(e){var t=this;this.lastKnownModel=e,this.dateComponentPromise.then((function(o){e&&e.dateFrom?(t.enrichDateInput(e.type,e.dateFrom,e.dateTo,o),o.setDate(h._.parseYyyyMmDdToDate(e.dateFrom,"-"))):o.setDate(null)}))},t.prototype.enrichDateInput=function(e,t,o,r){r.eDateInput&&("inRange"===e?(r.eDateInput.title=t+" to "+o,r.eDateInput.disabled=!0):(r.eDateInput.title="",r.eDateInput.disabled=!1))},i([a.Autowired("userComponentFactory"),s("design:type",u.UserComponentFactory)],t.prototype,"userComponentFactory",void 0),t}(d.Component);t.DateFloatingFilterComp=m;var y=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),t.prototype.asFloatingFilterText=function(e){var t=this.currentParentModel();return null==e&&null==t?"":null==e&&null!=t&&"inRange"!==t.type?(this.eColumnFloatingFilter.disabled=!1,""):null!=t&&"inRange"===t.type?(this.eColumnFloatingFilter.disabled=!0,this.parseAsText(t)):(this.eColumnFloatingFilter.disabled=!1,this.parseAsText(e))},t.prototype.parseAsText=function(e){var t=this.asNumber(e.filter);if(e.type&&"inRange"===e.type){var o=this.asNumber(e.filterTo);return(t?t+"":"")+"-"+(o?o+"":"")}return null!=t?t+"":""},t.prototype.asParentModel=function(){var e,t=this.currentParentModel(),o=this.asNumber(this.eColumnFloatingFilter.value),r=this.eColumnFloatingFilter.value;return e=null==o&&""===r?null:null==o?t.filter:o,{type:t.type,filter:e,filterTo:t?t.filterTo:null,filterType:"number"}},t.prototype.asNumber=function(e){if(null==e)return null;if(""===e)return null;var t=Number(e);return h._.isNumeric(t)?t:null},t}(f);t.NumberFloatingFilterComp=y;var v=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),t.prototype.init=function(t){e.prototype.init.call(this,t),this.eColumnFloatingFilter.disabled=!0},t.prototype.asFloatingFilterText=function(e){if(this.eColumnFloatingFilter.disabled=!0,!e)return"";var t=e instanceof Array?e:e.values;if(0===t.length)return"";var o=t.length>10?t.slice(0,10).concat("..."):t;return"("+t.length+") "+o.join(",")},t.prototype.parseAsText=function(e){return this.asFloatingFilterText(e)},t.prototype.asParentModel=function(){return null==this.eColumnFloatingFilter.value||""===this.eColumnFloatingFilter.value?{values:[],filterType:"set"}:{values:this.eColumnFloatingFilter.value.split(","),filterType:"set"}},t.prototype.equalModels=function(e,t){return!1},t}(f);t.SetFloatingFilterComp=v;var C=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),t.prototype.init=function(t){e.prototype.init.call(this,t),this.eColumnFloatingFilter.disabled=!0},t.prototype.onParentModelChanged=function(e){this.eColumnFloatingFilter.value=this.asFloatingFilterText(this.currentParentModel())},t.prototype.asFloatingFilterText=function(e){return e},t.prototype.parseAsText=function(e){return e},t.prototype.asParentModel=function(){return null},t}(f);t.ReadModelAsStringFloatingFilterComp=C},69638:function(e,t,o){var r=this&&this.__decorate||function(e,t,o,r){var n,i=arguments.length,s=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,o):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,o,r);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(s=(i<3?n(s):i>3?n(t,o,s):n(t,o))||s);return i>3&&s&&Object.defineProperty(t,o,s),s},n=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)};Object.defineProperty(t,"__esModule",{value:!0});var i=o(72493),s=o(22743),a=o(83423),l=function(){function e(){}return e.prototype.adaptFunction=function(e,t,o,r){if(null==t)return{component:null,componentFromFramework:o,source:r,paramsFromSelector:null};var n=this.componentMetadataProvider.retrieve(e);return n&&n.functionAdapter?{componentFromFramework:o,component:n.functionAdapter(t),source:r,paramsFromSelector:null}:null},e.prototype.adaptCellRendererFunction=function(e){return function(){function t(){}return t.prototype.refresh=function(e){return!1},t.prototype.getGui=function(){var t=e(this.params),o=typeof t;return"string"===o||"number"===o||"boolean"===o?a._.loadTemplate("<span>"+t+"</span>"):t},t.prototype.init=function(e){this.params=e},t}()},e.prototype.doesImplementIComponent=function(e){return!!e&&e.prototype&&"getGui"in e.prototype},r([i.Autowired("componentMetadataProvider"),n("design:type",s.ComponentMetadataProvider)],e.prototype,"componentMetadataProvider",void 0),r([i.Bean("agComponentUtils")],e)}();t.AgComponentUtils=l},69734:(e,t,o)=>{Object.defineProperty(t,"__esModule",{value:!0});var r=o(83423),n=function(){function e(){this.existingKeys=[]}return e.prototype.addExistingKeys=function(e){this.existingKeys=this.existingKeys.concat(e)},e.prototype.getUniqueKey=function(e,t){e=r._.toStringOrNull(e);for(var o=0;;){var n=void 0;if(e?(n=e,0!==o&&(n+="_"+o)):t?(n=t,0!==o&&(n+="_"+o)):n=""+o,this.existingKeys.indexOf(n)<0)return this.existingKeys.push(n),n;o++}},e}();t.ColumnKeyCreator=n},69992:function(e,t,o){var r=this&&this.__decorate||function(e,t,o,r){var n,i=arguments.length,s=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,o):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,o,r);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(s=(i<3?n(s):i>3?n(t,o,s):n(t,o))||s);return i>3&&s&&Object.defineProperty(t,o,s),s},n=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)};Object.defineProperty(t,"__esModule",{value:!0});var i,s=o(58342),a=o(72493),l=o(27887),p=o(26016),u=o(20080),d=o(98239);!function(e){e[e.ColumnMove=0]="ColumnMove",e[e.Pivot=1]="Pivot"}(i||(i={}));var c=function(){function e(e,t){this.dropListeners={},this.pinned=e,this.eContainer=t}return e.prototype.registerGridComp=function(e){switch(this.gridPanel=e,this.moveColumnController.registerGridComp(e),this.pinned){case p.Column.PINNED_LEFT:this.eSecondaryContainers=this.gridPanel.getDropTargetLeftContainers();break;case p.Column.PINNED_RIGHT:this.eSecondaryContainers=this.gridPanel.getDropTargetRightContainers();break;default:this.eSecondaryContainers=this.gridPanel.getDropTargetBodyContainers()}},e.prototype.isInterestedIn=function(e){return e===s.DragSourceType.HeaderCell||e===s.DragSourceType.ToolPanel},e.prototype.getSecondaryContainers=function(){return this.eSecondaryContainers},e.prototype.getContainer=function(){return this.eContainer},e.prototype.init=function(){this.moveColumnController=new l.MoveColumnController(this.pinned,this.eContainer),this.context.wireBean(this.moveColumnController);var e=new u.BodyDropPivotTarget(this.pinned);this.context.wireBean(e),this.dropListeners[i.ColumnMove]=this.moveColumnController,this.dropListeners[i.Pivot]=e,this.dragAndDropService.addDropTarget(this)},e.prototype.getIconName=function(){return this.currentDropListener.getIconName()},e.prototype.getDropType=function(e){return this.columnController.isPivotMode()&&e.dragSource.type===s.DragSourceType.ToolPanel?i.Pivot:i.ColumnMove},e.prototype.onDragEnter=function(e){var t=this.getDropType(e);this.currentDropListener=this.dropListeners[t],this.currentDropListener.onDragEnter(e)},e.prototype.onDragLeave=function(e){this.currentDropListener.onDragLeave(e)},e.prototype.onDragging=function(e){this.currentDropListener.onDragging(e)},e.prototype.onDragStop=function(e){this.currentDropListener.onDragStop(e)},r([a.Autowired("context"),n("design:type",a.Context)],e.prototype,"context",void 0),r([a.Autowired("dragAndDropService"),n("design:type",s.DragAndDropService)],e.prototype,"dragAndDropService",void 0),r([a.Autowired("columnController"),n("design:type",d.ColumnController)],e.prototype,"columnController",void 0),r([a.PostConstruct,n("design:type",Function),n("design:paramtypes",[]),n("design:returntype",void 0)],e.prototype,"init",null),e}();t.BodyDropTarget=c},71616:function(e,t,o){var r,n=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o])},r(e,t)},function(e,t){function o(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)});Object.defineProperty(t,"__esModule",{value:!0});var i=o(45727),s=o(46379),a=o(83423),l=function(e){function t(){var o=e.call(this,t.TEMPLATE)||this;return o.eInput=o.getGui().querySelector("input"),o}return n(t,e),t.prototype.init=function(e){this.params=e;var t,o=this.eInput;e.cellStartedEdit?(this.focusAfterAttached=!0,e.keyPress===i.Constants.KEY_BACKSPACE||e.keyPress===i.Constants.KEY_DELETE?t="":e.charPress?t=e.charPress:(t=this.getStartValue(e),e.keyPress!==i.Constants.KEY_F2&&(this.highlightAllOnFocus=!0))):(this.focusAfterAttached=!1,t=this.getStartValue(e)),a._.exists(t)&&(o.value=t),this.addDestroyableEventListener(o,"keydown",(function(e){if(e.keyCode===i.Constants.KEY_LEFT||e.keyCode===i.Constants.KEY_RIGHT||e.keyCode===i.Constants.KEY_UP||e.keyCode===i.Constants.KEY_DOWN||e.keyCode===i.Constants.KEY_PAGE_DOWN||e.keyCode===i.Constants.KEY_PAGE_UP||e.keyCode===i.Constants.KEY_PAGE_HOME||e.keyCode===i.Constants.KEY_PAGE_END){e.stopPropagation();var t=e.keyCode===i.Constants.KEY_PAGE_UP,o=e.keyCode===i.Constants.KEY_PAGE_DOWN;(t||o)&&e.preventDefault()}}))},t.prototype.afterGuiAttached=function(){if(this.focusAfterAttached){var e=this.eInput;if(e.focus(),this.highlightAllOnFocus)e.select();else{var t=e.value?e.value.length:0;t>0&&e.setSelectionRange(t,t)}}},t.prototype.focusIn=function(){var e=this.eInput;e.focus(),e.select()},t.prototype.getValue=function(){var e=this.eInput;return this.params.parseValue(e.value)},t.prototype.getStartValue=function(e){return e.useFormatter||e.column.getColDef().refData?e.formatValue(e.value):e.value},t.prototype.isPopup=function(){return!1},t.TEMPLATE='<div class="ag-input-text-wrapper"><input class="ag-cell-edit-input" type="text"/></div>',t}(s.PopupComponent);t.TextCellEditor=l},72493:(e,t,o)=>{Object.defineProperty(t,"__esModule",{value:!0});var r=o(83423),n=function(){function e(e,t){if(this.beanWrappers={},this.componentsMappedByName={},this.destroyed=!1,e&&e.beans){this.contextParams=e,this.logger=t,this.logger.log(">> creating ag-Application Context"),this.setupComponents(),this.createBeans();var o=this.getBeanInstances();this.wireBeans(o),this.logger.log(">> ag-Application Context ready - component is alive")}}return e.prototype.getBeanInstances=function(){return r._.mapObject(this.beanWrappers,(function(e){return e.beanInstance}))},e.prototype.setupComponents=function(){var e=this;this.contextParams.components&&this.contextParams.components.forEach((function(t){return e.addComponent(t)}))},e.prototype.addComponent=function(e){var t=e.componentName.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase().toUpperCase();this.componentsMappedByName[t]=e.theClass},e.prototype.createComponentFromElement=function(e,t){var o=e.nodeName;if(this.componentsMappedByName&&this.componentsMappedByName[o]){var r=new this.componentsMappedByName[o];return this.wireBean(r,t),r}return null},e.prototype.wireBean=function(e,t){if(!e)throw Error("Can't wire to bean since it is null");this.wireBeans([e],t)},e.prototype.wireBeans=function(e,t){this.autoWireBeans(e),this.methodWireBeans(e),this.callLifeCycleMethods(e,"preConstructMethods"),r._.exists(t)&&e.forEach(t),this.callLifeCycleMethods(e,"postConstructMethods")},e.prototype.createBeans=function(){var e=this;this.contextParams.beans.forEach(this.createBeanWrapper.bind(this)),this.contextParams.overrideBeans&&this.contextParams.overrideBeans.forEach(this.createBeanWrapper.bind(this)),r._.iterateObject(this.beanWrappers,(function(t,o){var r;o.bean.__agBeanMetaData&&o.bean.__agBeanMetaData.autowireMethods&&o.bean.__agBeanMetaData.autowireMethods.agConstructor&&(r=o.bean.__agBeanMetaData.autowireMethods.agConstructor);var n,i,s=e.getBeansForParameters(r,o.bean.name),a=(n=o.bean,i=[null].concat(s),new(n.bind.apply(n,i)));o.beanInstance=a,e.logger.log("bean "+e.getBeanName(a)+" created")}))},e.prototype.createBeanWrapper=function(e){var t=e.__agBeanMetaData;if(!t){var o;return o=e.prototype.constructor?e.prototype.constructor.name:""+e,void console.error("context item "+o+" is not a bean")}var r={bean:e,beanInstance:null,beanName:t.beanName};this.beanWrappers[t.beanName]=r},e.prototype.autoWireBeans=function(e){var t=this;e.forEach((function(e){t.forEachMetaDataInHierarchy(e,(function(o,r){var n=o.agClassAttributes;n&&n.forEach((function(o){var n=t.lookupBeanInstance(r,o.beanName,o.optional);e[o.attributeName]=n}))}))}))},e.prototype.methodWireBeans=function(e){var t=this;e.forEach((function(e){t.forEachMetaDataInHierarchy(e,(function(o,n){r._.iterateObject(o.autowireMethods,(function(o,r){if("agConstructor"!==o){var i=t.getBeansForParameters(r,n);e[o].apply(e,i)}}))}))}))},e.prototype.forEachMetaDataInHierarchy=function(e,t){for(var o=Object.getPrototypeOf(e);null!=o;){var r=o.constructor;r.hasOwnProperty("__agBeanMetaData")&&t(r.__agBeanMetaData,this.getBeanName(r)),o=Object.getPrototypeOf(o)}},e.prototype.getBeanName=function(e){if(e.__agBeanMetaData&&e.__agBeanMetaData.beanName)return e.__agBeanMetaData.beanName;var t=e.toString();return t.substring(9,t.indexOf("("))},e.prototype.getBeansForParameters=function(e,t){var o=this,n=[];return e&&r._.iterateObject(e,(function(e,r){var i=o.lookupBeanInstance(t,r);n[Number(e)]=i})),n},e.prototype.lookupBeanInstance=function(e,t,o){if(void 0===o&&(o=!1),"context"===t)return this;if(this.contextParams.seed&&this.contextParams.seed.hasOwnProperty(t))return this.contextParams.seed[t];var r=this.beanWrappers[t];return r?r.beanInstance:(o||console.error("ag-Grid: unable to find bean reference "+t+" while initialising "+e),null)},e.prototype.callLifeCycleMethods=function(e,t){var o=this;e.forEach((function(e){o.forEachMetaDataInHierarchy(e,(function(o){var r=o[t];r&&r.forEach((function(t){return e[t]()}))}))}))},e.prototype.getBean=function(e){return this.lookupBeanInstance("getBean",e,!0)},e.prototype.getEnterpriseDefaultComponents=function(){return this.contextParams.enterpriseDefaultComponents},e.prototype.destroy=function(){if(!this.destroyed){this.logger.log(">> Shutting down ag-Application Context");var e=this.getBeanInstances();this.callLifeCycleMethods(e,"preDestroyMethods"),this.contextParams.seed=null,this.destroyed=!0,this.logger.log(">> ag-Application Context shut down - component is dead")}},e}();function i(e,t,o,r,n,i){if(null!==t)if("number"!=typeof i){var a=s(e.constructor);a.agClassAttributes||(a.agClassAttributes=[]),a.agClassAttributes.push({attributeName:n,beanName:t,optional:o})}else console.error("ag-Grid: Autowired should be on an attribute");else console.error("ag-Grid: Autowired name should not be null")}function s(e){return e.hasOwnProperty("__agBeanMetaData")||(e.__agBeanMetaData={}),e.__agBeanMetaData}t.Context=n,t.PreConstruct=function(e,t,o){var r=s(e.constructor);r.postConstructMethods||(r.preConstructMethods=[]),r.preConstructMethods.push(t)},t.PostConstruct=function(e,t,o){var r=s(e.constructor);r.postConstructMethods||(r.postConstructMethods=[]),r.postConstructMethods.push(t)},t.PreDestroy=function(e,t,o){var r=s(e.constructor);r.preDestroyMethods||(r.preDestroyMethods=[]),r.preDestroyMethods.push(t)},t.Bean=function(e){return function(t){s(t).beanName=e}},t.Autowired=function(e){return function(t,o,r){i(t,e,!1,0,o,null)}},t.Optional=function(e){return function(t,o,r){i(t,e,!0,0,o,null)}},t.Qualifier=function(e){return function(t,o,r){var n,i="function"==typeof t?t:t.constructor;if("number"==typeof r){var a=void 0;o?(n=s(i),a=o):(n=s(i),a="agConstructor"),n.autowireMethods||(n.autowireMethods={}),n.autowireMethods[a]||(n.autowireMethods[a]={}),n.autowireMethods[a][r]=e}}}},72948:function(e,t,o){var r=this&&this.__decorate||function(e,t,o,r){var n,i=arguments.length,s=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,o):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,o,r);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(s=(i<3?n(s):i>3?n(t,o,s):n(t,o))||s);return i>3&&s&&Object.defineProperty(t,o,s),s},n=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)};Object.defineProperty(t,"__esModule",{value:!0});var i=o(72493),s=o(74517),a=o(26016),l=o(60843),p=o(44871),u=o(40797),d=function(){function e(e,t,o,r){this.localEventService=new l.EventService,this.expandable=!1,this.colGroupDef=e,this.groupId=t,this.expanded=e&&!!e.openByDefault,this.padding=o,this.level=r}return e.prototype.setOriginalParent=function(e){this.originalParent=this.originalParent},e.prototype.getOriginalParent=function(){return this.originalParent},e.prototype.getLevel=function(){return this.level},e.prototype.isVisible=function(){return!!this.children&&this.children.some((function(e){return e.isVisible()}))},e.prototype.isPadding=function(){return this.padding},e.prototype.setExpanded=function(t){this.expanded=void 0!==t&&t;var o={type:e.EVENT_EXPANDED_CHANGED};this.localEventService.dispatchEvent(o)},e.prototype.isExpandable=function(){return this.expandable},e.prototype.isExpanded=function(){return this.expanded},e.prototype.getGroupId=function(){return this.groupId},e.prototype.getId=function(){return this.getGroupId()},e.prototype.setChildren=function(e){this.children=e},e.prototype.getChildren=function(){return this.children},e.prototype.getColGroupDef=function(){return this.colGroupDef},e.prototype.getLeafColumns=function(){var e=[];return this.addLeafColumns(e),e},e.prototype.addLeafColumns=function(t){this.children&&this.children.forEach((function(o){o instanceof a.Column?t.push(o):o instanceof e&&o.addLeafColumns(t)}))},e.prototype.getColumnGroupShow=function(){return this.padding?this.children[0].getColumnGroupShow():this.colGroupDef.columnGroupShow},e.prototype.setupExpandable=function(){var e=this;this.setExpandable(),this.getLeafColumns().forEach((function(t){return t.addEventListener(a.Column.EVENT_VISIBLE_CHANGED,e.onColumnVisibilityChanged.bind(e))}))},e.prototype.setExpandable=function(){if(!this.isPadding()){for(var t=!1,o=!1,r=!1,n=this.findChildren(),i=0,a=n.length;i<a;i++){var l=n[i];if(l.isVisible()){var p=l.getColumnGroupShow();p===s.ColumnGroup.HEADER_GROUP_SHOW_OPEN?(t=!0,r=!0):p===s.ColumnGroup.HEADER_GROUP_SHOW_CLOSED?(o=!0,r=!0):(t=!0,o=!0)}}var u=t&&o&&r;if(this.expandable!==u){this.expandable=u;var d={type:e.EVENT_EXPANDABLE_CHANGED};this.localEventService.dispatchEvent(d)}}},e.prototype.findChildren=function(){var t=this.children,o=t[0];if(o&&(!o.isPadding||!o.isPadding()))return t;for(;1===t.length&&t[0]instanceof e;)t=t[0].children;return t},e.prototype.onColumnVisibilityChanged=function(){this.setExpandable()},e.prototype.addEventListener=function(e,t){this.localEventService.addEventListener(e,t)},e.prototype.removeEventListener=function(e,t){this.localEventService.removeEventListener(e,t)},e.EVENT_EXPANDED_CHANGED="expandedChanged",e.EVENT_EXPANDABLE_CHANGED="expandableChanged",r([i.Autowired("columnApi"),n("design:type",p.ColumnApi)],e.prototype,"columnApi",void 0),r([i.Autowired("gridApi"),n("design:type",u.GridApi)],e.prototype,"gridApi",void 0),e}();t.OriginalColumnGroup=d},72955:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0});var o=function(){function e(){this.isLayoutPanel=!0,this.childPanels=[],this.eGui=document.createElement("div"),this.eGui.style.height="100%"}return e.prototype.addPanel=function(e,t){var o;e.isLayoutPanel?(this.childPanels.push(e),o=e.getGui()):o=e,t&&(o.style.height=t),this.eGui.appendChild(o)},e.prototype.getGui=function(){return this.eGui},e.prototype.doLayout=function(){for(var e=0;e<this.childPanels.length;e++)this.childPanels[e].doLayout()},e}();t.VerticalStack=o},73575:function(e,t,o){var r=this&&this.__decorate||function(e,t,o,r){var n,i=arguments.length,s=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,o):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,o,r);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(s=(i<3?n(s):i>3?n(t,o,s):n(t,o))||s);return i>3&&s&&Object.defineProperty(t,o,s),s},n=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)};Object.defineProperty(t,"__esModule",{value:!0});var i=o(45727),s=o(72493),a=o(44081),l=o(59007),p=o(60843),u=o(63405),d=o(83423),c=function(){function e(){this.activePopupElements=[]}return e.prototype.registerGridCore=function(e){this.gridCore=e},e.prototype.getDocument=function(){return this.gridOptionsWrapper.getDocument()},e.prototype.getPopupParent=function(){return this.gridOptionsWrapper.getPopupParent()||this.gridCore.getRootGui()},e.prototype.positionPopupForMenu=function(e){var t,o=e.eventSource.getBoundingClientRect(),r=this.getDocument(),n=this.getPopupParent();t=n===r.body?r.documentElement.getBoundingClientRect():n.getBoundingClientRect();var i=o.top-t.top;i=this.keepYWithinBounds(e,i);var s=e.ePopup.clientWidth>0?e.ePopup.clientWidth:200;e.ePopup.style.minWidth=s+"px";var a,l=t.right-t.left-s;function p(){return o.right-t.left-2}function u(){return o.left-t.left-s}this.gridOptionsWrapper.isEnableRtl()?((a=u())<0&&(a=p()),a>l&&(a=0)):((a=p())>l&&(a=u()),a<0&&(a=0)),e.ePopup.style.left=a+"px",e.ePopup.style.top=i+"px"},e.prototype.positionPopupUnderMouseEvent=function(e){var t=this.calculatePointerAlign(e.mouseEvent),o=t.x,r=t.y,n=e.ePopup,i=e.nudgeX,s=e.nudgeY;this.positionPopup({ePopup:n,x:o,y:r,nudgeX:i,nudgeY:s,keepWithinBounds:!0}),this.callPostProcessPopup(e.ePopup,null,e.mouseEvent,e.type,e.column,e.rowNode)},e.prototype.calculatePointerAlign=function(e){var t=this.getDocument(),o=this.getPopupParent(),r=o.getBoundingClientRect(),n=t.documentElement.getBoundingClientRect();return{x:e.clientX-(o===t.body?n.left:r.left),y:e.clientY-(o===t.body?n.top:r.top)}},e.prototype.positionPopupUnderComponent=function(e){var t,o=e.eventSource.getBoundingClientRect(),r=this.getDocument(),n=this.getPopupParent();t=n===r.body?r.documentElement.getBoundingClientRect():n.getBoundingClientRect(),this.positionPopup({ePopup:e.ePopup,minWidth:e.minWidth,minHeight:e.minHeight,nudgeX:e.nudgeX,nudgeY:e.nudgeY,x:o.left-t.left,y:o.top-t.top+o.height,keepWithinBounds:e.keepWithinBounds}),this.callPostProcessPopup(e.ePopup,e.eventSource,null,e.type,e.column,e.rowNode)},e.prototype.callPostProcessPopup=function(e,t,o,r,n,i){var s=this.gridOptionsWrapper.getPostProcessPopupFunc();s&&s({column:n,rowNode:i,ePopup:e,type:r,eventSource:t,mouseEvent:o})},e.prototype.positionPopupOverComponent=function(e){var t,o=e.eventSource.getBoundingClientRect(),r=this.getDocument(),n=this.getPopupParent();t=n===r.body?r.documentElement.getBoundingClientRect():n.getBoundingClientRect(),this.positionPopup({ePopup:e.ePopup,minWidth:e.minWidth,nudgeX:e.nudgeX,nudgeY:e.nudgeY,x:o.left-t.left,y:o.top-t.top,keepWithinBounds:e.keepWithinBounds}),this.callPostProcessPopup(e.ePopup,e.eventSource,null,e.type,e.column,e.rowNode)},e.prototype.positionPopup=function(e){var t=e.x,o=e.y;e.nudgeX&&(t+=e.nudgeX),e.nudgeY&&(o+=e.nudgeY),e.keepWithinBounds&&(t=this.keepXWithinBounds(e,t),o=this.keepYWithinBounds(e,o)),e.ePopup.style.left=t+"px",e.ePopup.style.top=o+"px"},e.prototype.keepYWithinBounds=function(e,t){var o=this.gridOptionsWrapper.getDocument(),r=o.documentElement,n=this.getPopupParent(),i=n.getBoundingClientRect(),s=o.documentElement.getBoundingClientRect(),a=n===o.body,l=Math.min(200,i.height),p=0;e.minHeight&&e.minHeight<l?l=e.minHeight:e.ePopup.offsetHeight>0&&(l=e.ePopup.clientHeight,p=d._.getAbsoluteHeight(e.ePopup)-l);var u=a?d._.getAbsoluteHeight(r)+r.scrollTop:i.height;a&&(u-=Math.abs(s.top-i.top));var c=u-l-p-3;return Math.min(Math.max(t,0),Math.abs(c))},e.prototype.keepXWithinBounds=function(e,t){var o=this.gridOptionsWrapper.getDocument(),r=o.documentElement,n=this.getPopupParent(),i=n.getBoundingClientRect(),s=o.documentElement.getBoundingClientRect(),a=n===o.body,l=Math.min(200,i.width),p=0;e.minWidth&&e.minWidth<l?l=e.minWidth:e.ePopup.clientWidth>0&&(l=e.ePopup.clientWidth,e.ePopup.style.minWidth=l+"px",p=d._.getAbsoluteWidth(e.ePopup)-l);var u=a?d._.getAbsoluteWidth(r)+r.scrollLeft:i.width;a&&(u-=Math.abs(s.left-i.left));var c=u-l-p-3;return Math.min(Math.max(t,0),Math.abs(c))},e.prototype.addAsModalPopup=function(e,t,o,r){return this.addPopup(!0,e,t,o,r)},e.prototype.addPopup=function(e,t,o,r,n){var s=this,a=this.gridOptionsWrapper.getDocument();if(!a)return console.warn("ag-grid: could not find the document, document is empty"),function(){};t.style.top="0px",t.style.left="0px";var l=this.getPopupParent();if(d._.isVisible(t)&&l.contains(t))return function(){};var p=document.createElement("div"),c=this.environment.getTheme();c&&d._.addCssClass(p,c),p.appendChild(t),l.appendChild(p),this.activePopupElements.push(t);var h=!1,f=function(e){(e.which||e.keyCode)===i.Constants.KEY_ESCAPE&&y(null)},g=function(e){y(e)},m=function(e){y(null,e)},y=function(e,o){s.isEventFromCurrentPopup(e,o,t)||s.isEventSameChainAsOriginalEvent(n,e,o)||h||(h=!0,l.removeChild(p),d._.removeFromArray(s.activePopupElements,t),a.removeEventListener("keydown",f),a.removeEventListener("click",g),a.removeEventListener("touchstart",m),a.removeEventListener("contextmenu",g),s.eventService.removeEventListener(u.Events.EVENT_DRAG_STARTED,g),r&&r())};return window.setTimeout((function(){o&&a.addEventListener("keydown",f),e&&(a.addEventListener("click",g),s.eventService.addEventListener(u.Events.EVENT_DRAG_STARTED,g),a.addEventListener("touchstart",m),a.addEventListener("contextmenu",g))}),0),y},e.prototype.isEventFromCurrentPopup=function(e,t,o){var r=e||t;if(r){for(var n=this.activePopupElements.indexOf(o);n<this.activePopupElements.length;n++){var i=this.activePopupElements[n];if(d._.isElementInEventPath(i,r))return!0}for(var s=r.target;s&&s!=document.body;){if(s.classList.contains("ag-custom-component-popup")||null===s.parentElement)return!0;s=s.parentElement}}return!1},e.prototype.isEventSameChainAsOriginalEvent=function(e,t,o){var r=null;if(t?r=t:o&&(r=o.touches[0]),r&&e){var n=t?t.screenX:0,i=t?t.screenY:0,s=Math.abs(e.screenX-n)<5,a=Math.abs(e.screenY-i)<5;if(s&&a)return!0}return!1},r([s.Autowired("gridOptionsWrapper"),n("design:type",a.GridOptionsWrapper)],e.prototype,"gridOptionsWrapper",void 0),r([s.Autowired("environment"),n("design:type",l.Environment)],e.prototype,"environment",void 0),r([s.Autowired("eventService"),n("design:type",p.EventService)],e.prototype,"eventService",void 0),r([s.Bean("popupService")],e)}();t.PopupService=c},74517:function(e,t,o){var r=this&&this.__decorate||function(e,t,o,r){var n,i=arguments.length,s=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,o):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,o,r);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(s=(i<3?n(s):i>3?n(t,o,s):n(t,o))||s);return i>3&&s&&Object.defineProperty(t,o,s),s},n=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)};Object.defineProperty(t,"__esModule",{value:!0});var i=o(26016),s=o(60843),a=o(72493),l=o(44081),p=o(44871),u=o(40797),d=function(){function e(e,t,o,r){this.displayedChildren=[],this.localEventService=new s.EventService,this.groupId=t,this.instanceId=o,this.originalColumnGroup=e,this.pinned=r}return e.createUniqueId=function(e,t){return e+"_"+t},e.prototype.reset=function(){this.parent=null,this.children=null,this.displayedChildren=null},e.prototype.getParent=function(){return this.parent},e.prototype.setParent=function(e){this.parent=e},e.prototype.getUniqueId=function(){return e.createUniqueId(this.groupId,this.instanceId)},e.prototype.isEmptyGroup=function(){return 0===this.displayedChildren.length},e.prototype.isMoving=function(){var e=this.getOriginalColumnGroup().getLeafColumns();if(!e||0===e.length)return!1;var t=!0;return e.forEach((function(e){e.isMoving()||(t=!1)})),t},e.prototype.checkLeft=function(){if(this.displayedChildren.forEach((function(t){t instanceof e&&t.checkLeft()})),this.displayedChildren.length>0)if(this.gridOptionsWrapper.isEnableRtl()){var t=this.displayedChildren[this.displayedChildren.length-1].getLeft();this.setLeft(t)}else{var o=this.displayedChildren[0].getLeft();this.setLeft(o)}else this.setLeft(null)},e.prototype.getLeft=function(){return this.left},e.prototype.getOldLeft=function(){return this.oldLeft},e.prototype.setLeft=function(t){this.oldLeft=t,this.left!==t&&(this.left=t,this.localEventService.dispatchEvent(this.createAgEvent(e.EVENT_LEFT_CHANGED)))},e.prototype.getPinned=function(){return this.pinned},e.prototype.createAgEvent=function(e){return{type:e}},e.prototype.addEventListener=function(e,t){this.localEventService.addEventListener(e,t)},e.prototype.removeEventListener=function(e,t){this.localEventService.removeEventListener(e,t)},e.prototype.getGroupId=function(){return this.groupId},e.prototype.getInstanceId=function(){return this.instanceId},e.prototype.isChildInThisGroupDeepSearch=function(t){var o=!1;return this.children.forEach((function(r){t===r&&(o=!0),r instanceof e&&r.isChildInThisGroupDeepSearch(t)&&(o=!0)})),o},e.prototype.getActualWidth=function(){var e=0;return this.displayedChildren&&this.displayedChildren.forEach((function(t){e+=t.getActualWidth()})),e},e.prototype.isResizable=function(){if(!this.displayedChildren)return!1;var e=!1;return this.displayedChildren.forEach((function(t){t.isResizable()&&(e=!0)})),e},e.prototype.getMinWidth=function(){var e=0;return this.displayedChildren.forEach((function(t){e+=t.getMinWidth()})),e},e.prototype.addChild=function(e){this.children||(this.children=[]),this.children.push(e)},e.prototype.getDisplayedChildren=function(){return this.displayedChildren},e.prototype.getLeafColumns=function(){var e=[];return this.addLeafColumns(e),e},e.prototype.getDisplayedLeafColumns=function(){var e=[];return this.addDisplayedLeafColumns(e),e},e.prototype.getDefinition=function(){return this.originalColumnGroup.getColGroupDef()},e.prototype.getColGroupDef=function(){return this.originalColumnGroup.getColGroupDef()},e.prototype.isPadding=function(){return this.originalColumnGroup.isPadding()},e.prototype.isExpandable=function(){return this.originalColumnGroup.isExpandable()},e.prototype.isExpanded=function(){return this.originalColumnGroup.isExpanded()},e.prototype.setExpanded=function(e){this.originalColumnGroup.setExpanded(e)},e.prototype.addDisplayedLeafColumns=function(t){this.displayedChildren.forEach((function(o){o instanceof i.Column?t.push(o):o instanceof e&&o.addDisplayedLeafColumns(t)}))},e.prototype.addLeafColumns=function(t){this.children.forEach((function(o){o instanceof i.Column?t.push(o):o instanceof e&&o.addLeafColumns(t)}))},e.prototype.getChildren=function(){return this.children},e.prototype.getColumnGroupShow=function(){return this.originalColumnGroup.getColumnGroupShow()},e.prototype.getOriginalColumnGroup=function(){return this.originalColumnGroup},e.prototype.calculateDisplayedColumns=function(){var t=this;this.displayedChildren=[];var o=this;if(this.isPadding())for(;o.getParent()&&o.isPadding();)o=o.getParent();o.originalColumnGroup.isExpandable()?this.children.forEach((function(r){switch(r.getColumnGroupShow()){case e.HEADER_GROUP_SHOW_OPEN:o.originalColumnGroup.isExpanded()&&t.displayedChildren.push(r);break;case e.HEADER_GROUP_SHOW_CLOSED:o.originalColumnGroup.isExpanded()||t.displayedChildren.push(r);break;default:t.displayedChildren.push(r)}})):this.displayedChildren=this.children,this.localEventService.dispatchEvent(this.createAgEvent(e.EVENT_DISPLAYED_CHILDREN_CHANGED))},e.HEADER_GROUP_SHOW_OPEN="open",e.HEADER_GROUP_SHOW_CLOSED="closed",e.EVENT_LEFT_CHANGED="leftChanged",e.EVENT_DISPLAYED_CHILDREN_CHANGED="displayedChildrenChanged",r([a.Autowired("gridOptionsWrapper"),n("design:type",l.GridOptionsWrapper)],e.prototype,"gridOptionsWrapper",void 0),r([a.Autowired("columnApi"),n("design:type",p.ColumnApi)],e.prototype,"columnApi",void 0),r([a.Autowired("gridApi"),n("design:type",u.GridApi)],e.prototype,"gridApi",void 0),e}();t.ColumnGroup=d},75013:(e,t,o)=>{Object.defineProperty(t,"__esModule",{value:!0});var r=o(65360);function n(e,t,o,n){var i,s,a=n.agGrid;if(s=a+".quickFilterText",i=t.$eval(a)){var l=e[0],p={$scope:t,$compile:o,quickFilterOnScope:s},u=new r.Grid(l,i,p);t.$on("$destroy",(function(){u.destroy(),u=null}))}else console.warn("WARNING - grid options for ag-Grid not found. Please ensure the attribute ag-grid points to a valid object on the scope")}t.initialiseAgGridWithAngular1=function(e){e.module("agGrid",[]).directive("agGrid",(function(){return{restrict:"A",controller:["$element","$scope","$compile","$attrs",n],scope:!0}}))}},75167:function(e,t,o){var r,n=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o])},r(e,t)},function(e,t){function o(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)});Object.defineProperty(t,"__esModule",{value:!0});var i=function(e){function t(){return e.call(this,'<div class="ag-tooltip"></div>')||this}return n(t,e),t.prototype.init=function(e){var t=e.value;this.getGui().innerHTML=t},t}(o(46379).PopupComponent);t.TooltipComponent=i},75449:function(e,t,o){var r,n=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o])},r(e,t)},function(e,t){function o(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)});Object.defineProperty(t,"__esModule",{value:!0});var i=o(96652),s=o(46410),a=o(47008),l=o(47008),p=function(e){function t(o,r){var n=e.call(this)||this;return n.portal=null,n.componentWrappingElement="div",n.reactComponent=o,n.parentComponent=r,n.statelessComponent=t.isStateless(n.reactComponent),n}return n(t,e),t.prototype.getFrameworkComponentInstance=function(){return this.componentInstance},t.prototype.isStatelesComponent=function(){return this.statelessComponent},t.prototype.getReactComponentName=function(){return this.reactComponent.name},t.prototype.init=function(e){var t=this;return new l.Promise((function(o){t.eParentElement=t.createParentElement(e),t.createReactComponent(e,o)}))},t.prototype.getGui=function(){return this.eParentElement},t.prototype.destroy=function(){return this.parentComponent.destroyPortal(this.portal)},t.prototype.createReactComponent=function(e,t){var o=this;this.statelessComponent||(e.ref=function(e){o.componentInstance=e});var r=i.createElement(this.reactComponent,e),n=s.createPortal(r,this.eParentElement);this.portal=n,this.parentComponent.mountReactPortal(n,this,t)},t.prototype.createParentElement=function(e){var t=document.createElement(this.parentComponent.props.componentWrappingElement||"div");return a.Utils.addCssClass(t,"ag-react-container"),e.reactContainer=this.eParentElement,t},t.isStateless=function(e){return"function"==typeof e&&!(e.prototype&&e.prototype.isReactComponent)},t}(o(30844).BaseReactComponent);t.ReactComponent=p},76133:function(e,t,o){var r=this&&this.__decorate||function(e,t,o,r){var n,i=arguments.length,s=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,o):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,o,r);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(s=(i<3?n(s):i>3?n(t,o,s):n(t,o))||s);return i>3&&s&&Object.defineProperty(t,o,s),s},n=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)};Object.defineProperty(t,"__esModule",{value:!0});var i=o(72493),s=o(45727),a=o(44081),l=o(83423),p=function(){function e(){}return e.prototype.postConstruct=function(){this.rowModel.getType()===s.Constants.ROW_MODEL_TYPE_CLIENT_SIDE&&(this.clientSideRowModel=this.rowModel)},e.prototype.createTransactionForRowData=function(e){if(l._.missing(this.clientSideRowModel))console.error("ag-Grid: ImmutableService only works with ClientSideRowModel");else{var t=this.gridOptionsWrapper.getRowNodeIdFunc();if(t&&!l._.missing(t)){var o={remove:[],update:[],add:[]},r=this.clientSideRowModel.getCopyOfNodesMap(),n=this.gridOptionsWrapper.isSuppressMaintainUnsortedOrder()?null:{};return l._.exists(e)&&e.forEach((function(e,i){var s=t(e),a=r[s];n&&(n[s]=i),a?(a.data!==e&&o.update.push(e),r[s]=void 0):o.add.push(e)})),l._.iterateObject(r,(function(e,t){t&&o.remove.push(t.data)})),[o,n]}console.error("ag-Grid: ImmutableService requires getRowNodeId() callback to be implemented, your row data need IDs!")}},r([i.Autowired("rowModel"),n("design:type",Object)],e.prototype,"rowModel",void 0),r([i.Autowired("gridOptionsWrapper"),n("design:type",a.GridOptionsWrapper)],e.prototype,"gridOptionsWrapper",void 0),r([i.PostConstruct,n("design:type",Function),n("design:paramtypes",[]),n("design:returntype",void 0)],e.prototype,"postConstruct",null),r([i.Bean("immutableService")],e)}();t.ImmutableService=p},78115:(e,t,o)=>{o.d(t,{ry:()=>ir});var r,n,i,s,a,l,p="vercel.ai.error",u=Symbol.for(p),d=class e extends(n=Error,r=u,n){constructor({name:e,message:t,cause:o}){super(t),this[r]=!0,this.name=e,this.cause=o}static isInstance(t){return e.hasMarker(t,p)}static hasMarker(e,t){const o=Symbol.for(t);return null!=e&&"object"==typeof e&&o in e&&"boolean"==typeof e[o]&&!0===e[o]}},c="AI_APICallError",h=`vercel.ai.error.${c}`,f=Symbol.for(h),g=class extends(s=d,i=f,s){constructor({message:e,url:t,requestBodyValues:o,statusCode:r,responseHeaders:n,responseBody:s,cause:a,isRetryable:l=null!=r&&(408===r||409===r||429===r||r>=500),data:p}){super({name:c,message:e,cause:a}),this[i]=!0,this.url=t,this.requestBodyValues=o,this.statusCode=r,this.responseHeaders=n,this.responseBody=s,this.isRetryable=l,this.data=p}static isInstance(e){return d.hasMarker(e,h)}},m="AI_EmptyResponseBodyError",y=`vercel.ai.error.${m}`,v=Symbol.for(y),C=class extends(l=d,a=v,l){constructor({message:e="Empty response body"}={}){super({name:m,message:e}),this[a]=!0}static isInstance(e){return d.hasMarker(e,y)}};function w(e){return null==e?"unknown error":"string"==typeof e?e:e instanceof Error?e.message:JSON.stringify(e)}var E,_,b,R,S,O,T,P,A,I,D,N,x,F,M,k,L="AI_InvalidArgumentError",G=`vercel.ai.error.${L}`,j=Symbol.for(G),W=class extends(_=d,E=j,_){constructor({message:e,cause:t,argument:o}){super({name:L,message:e,cause:t}),this[E]=!0,this.argument=o}static isInstance(e){return d.hasMarker(e,G)}},V="AI_InvalidPromptError",H=`vercel.ai.error.${V}`,B=Symbol.for(H),z=class extends(R=d,b=B,R){constructor({prompt:e,message:t,cause:o}){super({name:V,message:`Invalid prompt: ${t}`,cause:o}),this[b]=!0,this.prompt=e}static isInstance(e){return d.hasMarker(e,H)}},U="AI_InvalidResponseDataError",Y=`vercel.ai.error.${U}`,q=Symbol.for(Y),$=class extends(O=d,S=q,O){constructor({data:e,message:t=`Invalid response data: ${JSON.stringify(e)}.`}){super({name:U,message:t}),this[S]=!0,this.data=e}static isInstance(e){return d.hasMarker(e,Y)}},K="AI_JSONParseError",Z=`vercel.ai.error.${K}`,J=Symbol.for(Z),Q=class extends(P=d,T=J,P){constructor({text:e,cause:t}){super({name:K,message:`JSON parsing failed: Text: ${e}.\nError message: ${w(t)}`,cause:t}),this[T]=!0,this.text=e}static isInstance(e){return d.hasMarker(e,Z)}},X="AI_LoadAPIKeyError",ee=`vercel.ai.error.${X}`,te=Symbol.for(ee),oe=class extends(I=d,A=te,I){constructor({message:e}){super({name:X,message:e}),this[A]=!0}static isInstance(e){return d.hasMarker(e,ee)}},re=Symbol.for("vercel.ai.error.AI_LoadSettingError"),ne=`vercel.ai.error.${"AI_NoContentGeneratedError"}`,ie=Symbol.for(ne),se=`vercel.ai.error.${"AI_NoSuchModelError"}`,ae=Symbol.for(se),le="AI_TooManyEmbeddingValuesForCallError",pe=`vercel.ai.error.${le}`,ue=Symbol.for(pe),de=class extends(N=d,D=ue,N){constructor(e){super({name:le,message:`Too many values for a single embedding call. The ${e.provider} model "${e.modelId}" can only embed up to ${e.maxEmbeddingsPerCall} values per call, but ${e.values.length} values were provided.`}),this[D]=!0,this.provider=e.provider,this.modelId=e.modelId,this.maxEmbeddingsPerCall=e.maxEmbeddingsPerCall,this.values=e.values}static isInstance(e){return d.hasMarker(e,pe)}},ce="AI_TypeValidationError",he=`vercel.ai.error.${ce}`,fe=Symbol.for(he),ge=class e extends(F=d,x=fe,F){constructor({value:e,cause:t}){super({name:ce,message:`Type validation failed: Value: ${JSON.stringify(e)}.\nError message: ${w(t)}`,cause:t}),this[x]=!0,this.value=e}static isInstance(e){return d.hasMarker(e,he)}static wrap({value:t,cause:o}){return e.isInstance(o)&&o.value===t?o:new e({value:t,cause:o})}},me="AI_UnsupportedFunctionalityError",ye=`vercel.ai.error.${me}`,ve=Symbol.for(ye),Ce=class extends(k=d,M=ve,k){constructor({functionality:e,message:t=`'${e}' functionality not supported.`}){super({name:me,message:t}),this[M]=!0,this.functionality=e}static isInstance(e){return d.hasMarker(e,ye)}},we=o(21935),Ee=o(67299),_e=o(84340),be=o(29744),Re=o(65994).process;function Se(...e){return e.reduce(((e,t)=>({...e,...null!=t?t:{}})),{})}function Oe(e){return Object.fromEntries([...e.headers])}var{btoa:Te,atob:Pe}=globalThis;function Ae(e){const t=e.replace(/-/g,"+").replace(/_/g,"/"),o=Pe(t);return Uint8Array.from(o,(e=>e.codePointAt(0)))}function Ie(e){return e instanceof Uint8Array?function(e){let t="";for(let o=0;o<e.length;o++)t+=String.fromCodePoint(e[o]);return Te(t)}(e):e}function De(e,t={}){const{useArrayBrackets:o=!0}=t,r=new FormData;for(const[t,n]of Object.entries(e))if(null!=n)if(Array.isArray(n)){if(1===n.length){r.append(t,n[0]);continue}const e=o?`${t}[]`:t;for(const t of n)r.append(e,t)}else r.append(t,n);return r}var Ne,xe,Fe="AI_DownloadError",Me=`vercel.ai.error.${Fe}`,ke=Symbol.for(Me),Le=class extends(xe=d,Ne=ke,xe){constructor({url:e,statusCode:t,statusText:o,cause:r,message:n=(null==r?`Failed to download ${e}: ${t} ${o}`:`Failed to download ${e}: ${r}`)}){super({name:Fe,message:n,cause:r}),this[Ne]=!0,this.url=e,this.statusCode=t,this.statusText=o}static isInstance(e){return d.hasMarker(e,Me)}};async function Ge(e){try{const t=await fetch(e);if(!t.ok)throw new Le({url:e,statusCode:t.status,statusText:t.statusText});return await t.blob()}catch(t){if(Le.isInstance(t))throw t;throw new Le({url:e,cause:t})}}var je=(({prefix:e,size:t=16,alphabet:o="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz",separator:r="-"}={})=>{const n=()=>{const e=o.length,r=new Array(t);for(let n=0;n<t;n++)r[n]=o[Math.random()*e|0];return r.join("")};if(null==e)return n;if(o.includes(r))throw new W({argument:"separator",message:`The separator "${r}" must not be part of the alphabet "${o}".`});return()=>`${e}${r}${n()}`})();function We(e){return(e instanceof Error||e instanceof DOMException)&&("AbortError"===e.name||"ResponseAborted"===e.name||"TimeoutError"===e.name)}var Ve=["fetch failed","failed to fetch"];function He(e=globalThis){var t,o,r;return e.window?"runtime/browser":(null==(t=e.navigator)?void 0:t.userAgent)?`runtime/${e.navigator.userAgent.toLowerCase()}`:(null==(r=null==(o=e.process)?void 0:o.versions)?void 0:r.node)?`runtime/node.js/${e.process.version.substring(0)}`:e.EdgeRuntime?"runtime/vercel-edge":"runtime/unknown"}function Be(e,...t){const o=new Headers(function(e){if(null==e)return{};const t={};if(e instanceof Headers)e.forEach(((e,o)=>{t[o.toLowerCase()]=e}));else{Array.isArray(e)||(e=Object.entries(e));for(const[o,r]of e)null!=r&&(t[o.toLowerCase()]=r)}return t}(e)),r=o.get("user-agent")||"";return o.set("user-agent",[r,...t].filter(Boolean).join(" ")),Object.fromEntries(o.entries())}function ze(e){return null!=e}function Ue({apiKey:e,environmentVariableName:t,apiKeyParameterName:o="apiKey",description:r}){if("string"==typeof e)return e;if(null!=e)throw new oe({message:`${r} API key must be a string.`});if(void 0===Re)throw new oe({message:`${r} API key is missing. Pass it using the '${o}' parameter. Environment variables is not supported in this environment.`});if(null==(e=Re.env[t]))throw new oe({message:`${r} API key is missing. Pass it using the '${o}' parameter or the ${t} environment variable.`});if("string"!=typeof e)throw new oe({message:`${r} API key must be a string. The value of the ${t} environment variable is not a string.`});return e}var Ye=/"__proto__"\s*:/,qe=/"constructor"\s*:/;function $e(e){const t=JSON.parse(e);return null===t||"object"!=typeof t||!1===Ye.test(e)&&!1===qe.test(e)?t:function(e){let t=[e];for(;t.length;){const e=t;t=[];for(const o of e){if(Object.prototype.hasOwnProperty.call(o,"__proto__"))throw new SyntaxError("Object contains forbidden prototype property");if(Object.prototype.hasOwnProperty.call(o,"constructor")&&Object.prototype.hasOwnProperty.call(o.constructor,"prototype"))throw new SyntaxError("Object contains forbidden prototype property");for(const e in o){const r=o[e];r&&"object"==typeof r&&t.push(r)}}}return e}(t)}function Ke(e){const{stackTraceLimit:t}=Error;try{Error.stackTraceLimit=0}catch(t){return $e(e)}try{return $e(e)}finally{Error.stackTraceLimit=t}}function Ze(e){if("object"===e.type||Array.isArray(e.type)&&e.type.includes("object")){e.additionalProperties=!1;const{properties:t}=e;if(null!=t)for(const e of Object.keys(t))t[e]=Je(t[e])}null!=e.items&&(e.items=Array.isArray(e.items)?e.items.map(Je):Je(e.items)),null!=e.anyOf&&(e.anyOf=e.anyOf.map(Je)),null!=e.allOf&&(e.allOf=e.allOf.map(Je)),null!=e.oneOf&&(e.oneOf=e.oneOf.map(Je));const{definitions:t}=e;if(null!=t)for(const e of Object.keys(t))t[e]=Je(t[e]);return e}function Je(e){return"boolean"==typeof e?e:Ze(e)}var Qe=Symbol("Let zodToJsonSchema decide on which parser to use"),Xe={name:void 0,$refStrategy:"root",basePath:["#"],effectStrategy:"input",pipeStrategy:"all",dateStrategy:"format:date-time",mapStrategy:"entries",removeAdditionalStrategy:"passthrough",allowedAdditionalProperties:!0,rejectedAdditionalProperties:!1,definitionPath:"definitions",strictUnions:!1,definitions:{},errorMessages:!1,patternStrategy:"escape",applyRegexFlags:!1,emailStrategy:"format:email",base64Strategy:"contentEncoding:base64",nameStrategy:"ref"};function et(e,t){return mt(e.type._def,t)}function tt(e,t,o){const r=null!=o?o:t.dateStrategy;if(Array.isArray(r))return{anyOf:r.map(((o,r)=>tt(e,t,o)))};switch(r){case"string":case"format:date-time":return{type:"string",format:"date-time"};case"format:date":return{type:"string",format:"date"};case"integer":return ot(e)}}var ot=e=>{const t={type:"integer",format:"unix-time"};for(const o of e.checks)switch(o.kind){case"min":t.minimum=o.value;break;case"max":t.maximum=o.value}return t},rt=void 0,nt={cuid:/^[cC][^\s-]{8,}$/,cuid2:/^[0-9a-z]+$/,ulid:/^[0-9A-HJKMNP-TV-Z]{26}$/,email:/^(?!\.)(?!.*\.\.)([a-zA-Z0-9_'+\-\.]*)[a-zA-Z0-9_+-]@([a-zA-Z0-9][a-zA-Z0-9\-]*\.)+[a-zA-Z]{2,}$/,emoji:()=>(void 0===rt&&(rt=RegExp("^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$","u")),rt),uuid:/^[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}$/,ipv4:/^(?:(?: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])$/,ipv4Cidr:/^(?:(?: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])$/,ipv6:/^(([a-f0-9]{1,4}:){7}|::([a-f0-9]{1,4}:){0,6}|([a-f0-9]{1,4}:){1}:([a-f0-9]{1,4}:){0,5}|([a-f0-9]{1,4}:){2}:([a-f0-9]{1,4}:){0,4}|([a-f0-9]{1,4}:){3}:([a-f0-9]{1,4}:){0,3}|([a-f0-9]{1,4}:){4}:([a-f0-9]{1,4}:){0,2}|([a-f0-9]{1,4}:){5}:([a-f0-9]{1,4}:){0,1})([a-f0-9]{1,4}|(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2})))$/,ipv6Cidr:/^(([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])$/,base64:/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,base64url:/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,nanoid:/^[a-zA-Z0-9_-]{21}$/,jwt:/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/};function it(e,t){const o={type:"string"};if(e.checks)for(const r of e.checks)switch(r.kind){case"min":o.minLength="number"==typeof o.minLength?Math.max(o.minLength,r.value):r.value;break;case"max":o.maxLength="number"==typeof o.maxLength?Math.min(o.maxLength,r.value):r.value;break;case"email":switch(t.emailStrategy){case"format:email":lt(o,"email",r.message,t);break;case"format:idn-email":lt(o,"idn-email",r.message,t);break;case"pattern:zod":pt(o,nt.email,r.message,t)}break;case"url":lt(o,"uri",r.message,t);break;case"uuid":lt(o,"uuid",r.message,t);break;case"regex":pt(o,r.regex,r.message,t);break;case"cuid":pt(o,nt.cuid,r.message,t);break;case"cuid2":pt(o,nt.cuid2,r.message,t);break;case"startsWith":pt(o,RegExp(`^${st(r.value,t)}`),r.message,t);break;case"endsWith":pt(o,RegExp(`${st(r.value,t)}$`),r.message,t);break;case"datetime":lt(o,"date-time",r.message,t);break;case"date":lt(o,"date",r.message,t);break;case"time":lt(o,"time",r.message,t);break;case"duration":lt(o,"duration",r.message,t);break;case"length":o.minLength="number"==typeof o.minLength?Math.max(o.minLength,r.value):r.value,o.maxLength="number"==typeof o.maxLength?Math.min(o.maxLength,r.value):r.value;break;case"includes":pt(o,RegExp(st(r.value,t)),r.message,t);break;case"ip":"v6"!==r.version&&lt(o,"ipv4",r.message,t),"v4"!==r.version&&lt(o,"ipv6",r.message,t);break;case"base64url":pt(o,nt.base64url,r.message,t);break;case"jwt":pt(o,nt.jwt,r.message,t);break;case"cidr":"v6"!==r.version&&pt(o,nt.ipv4Cidr,r.message,t),"v4"!==r.version&&pt(o,nt.ipv6Cidr,r.message,t);break;case"emoji":pt(o,nt.emoji(),r.message,t);break;case"ulid":pt(o,nt.ulid,r.message,t);break;case"base64":switch(t.base64Strategy){case"format:binary":lt(o,"binary",r.message,t);break;case"contentEncoding:base64":o.contentEncoding="base64";break;case"pattern:zod":pt(o,nt.base64,r.message,t)}break;case"nanoid":pt(o,nt.nanoid,r.message,t)}return o}function st(e,t){return"escape"===t.patternStrategy?function(e){let t="";for(let o=0;o<e.length;o++)at.has(e[o])||(t+="\\"),t+=e[o];return t}(e):e}var at=new Set("ABCDEFGHIJKLMNOPQRSTUVXYZabcdefghijklmnopqrstuvxyz0123456789");function lt(e,t,o,r){var n;e.format||(null==(n=e.anyOf)?void 0:n.some((e=>e.format)))?(e.anyOf||(e.anyOf=[]),e.format&&(e.anyOf.push({format:e.format}),delete e.format),e.anyOf.push({format:t,...o&&r.errorMessages&&{errorMessage:{format:o}}})):e.format=t}function pt(e,t,o,r){var n;e.pattern||(null==(n=e.allOf)?void 0:n.some((e=>e.pattern)))?(e.allOf||(e.allOf=[]),e.pattern&&(e.allOf.push({pattern:e.pattern}),delete e.pattern),e.allOf.push({pattern:ut(t,r),...o&&r.errorMessages&&{errorMessage:{pattern:o}}})):e.pattern=ut(t,r)}function ut(e,t){var o;if(!t.applyRegexFlags||!e.flags)return e.source;const r=e.flags.includes("i"),n=e.flags.includes("m"),i=e.flags.includes("s"),s=r?e.source.toLowerCase():e.source;let a="",l=!1,p=!1,u=!1;for(let e=0;e<s.length;e++)if(l)a+=s[e],l=!1;else{if(r)if(p){if(s[e].match(/[a-z]/)){u?(a+=s[e],a+=`${s[e-2]}-${s[e]}`.toUpperCase(),u=!1):"-"===s[e+1]&&(null==(o=s[e+2])?void 0:o.match(/[a-z]/))?(a+=s[e],u=!0):a+=`${s[e]}${s[e].toUpperCase()}`;continue}}else if(s[e].match(/[a-z]/)){a+=`[${s[e]}${s[e].toUpperCase()}]`;continue}if(n){if("^"===s[e]){a+="(^|(?<=[\r\n]))";continue}if("$"===s[e]){a+="($|(?=[\r\n]))";continue}}i&&"."===s[e]?a+=p?`${s[e]}\r\n`:`[${s[e]}\r\n]`:(a+=s[e],"\\"===s[e]?l=!0:p&&"]"===s[e]?p=!1:p||"["!==s[e]||(p=!0))}try{new RegExp(a)}catch(o){return console.warn(`Could not convert regex pattern at ${t.currentPath.join("/")} to a flag-independent form! Falling back to the flag-ignorant source`),e.source}return a}function dt(e,t){var o,r,n,i,s,a;const l={type:"object",additionalProperties:null!=(o=mt(e.valueType._def,{...t,currentPath:[...t.currentPath,"additionalProperties"]}))?o:t.allowedAdditionalProperties};if((null==(r=e.keyType)?void 0:r._def.typeName)===_e.kY.ZodString&&(null==(n=e.keyType._def.checks)?void 0:n.length)){const{type:o,...r}=it(e.keyType._def,t);return{...l,propertyNames:r}}if((null==(i=e.keyType)?void 0:i._def.typeName)===_e.kY.ZodEnum)return{...l,propertyNames:{enum:e.keyType._def.values}};if((null==(s=e.keyType)?void 0:s._def.typeName)===_e.kY.ZodBranded&&e.keyType._def.type._def.typeName===_e.kY.ZodString&&(null==(a=e.keyType._def.type._def.checks)?void 0:a.length)){const{type:o,...r}=et(e.keyType._def,t);return{...l,propertyNames:r}}return l}var ct={ZodString:"string",ZodNumber:"number",ZodBigInt:"integer",ZodBoolean:"boolean",ZodNull:"null"};function ht(e){try{return e.isOptional()}catch(e){return!0}}var ft=(e,t,o)=>{switch(t){case _e.kY.ZodString:return it(e,o);case _e.kY.ZodNumber:return function(e){const t={type:"number"};if(!e.checks)return t;for(const o of e.checks)switch(o.kind){case"int":t.type="integer";break;case"min":o.inclusive?t.minimum=o.value:t.exclusiveMinimum=o.value;break;case"max":o.inclusive?t.maximum=o.value:t.exclusiveMaximum=o.value;break;case"multipleOf":t.multipleOf=o.value}return t}(e);case _e.kY.ZodObject:return function(e,t){const o={type:"object",properties:{}},r=[],n=e.shape();for(const e in n){let i=n[e];if(void 0===i||void 0===i._def)continue;const s=ht(i),a=mt(i._def,{...t,currentPath:[...t.currentPath,"properties",e],propertyPath:[...t.currentPath,"properties",e]});void 0!==a&&(o.properties[e]=a,s||r.push(e))}r.length&&(o.required=r);const i=function(e,t){if("ZodNever"!==e.catchall._def.typeName)return mt(e.catchall._def,{...t,currentPath:[...t.currentPath,"additionalProperties"]});switch(e.unknownKeys){case"passthrough":return t.allowedAdditionalProperties;case"strict":return t.rejectedAdditionalProperties;case"strip":return"strict"===t.removeAdditionalStrategy?t.allowedAdditionalProperties:t.rejectedAdditionalProperties}}(e,t);return void 0!==i&&(o.additionalProperties=i),o}(e,o);case _e.kY.ZodBigInt:return function(e){const t={type:"integer",format:"int64"};if(!e.checks)return t;for(const o of e.checks)switch(o.kind){case"min":o.inclusive?t.minimum=o.value:t.exclusiveMinimum=o.value;break;case"max":o.inclusive?t.maximum=o.value:t.exclusiveMaximum=o.value;break;case"multipleOf":t.multipleOf=o.value}return t}(e);case _e.kY.ZodBoolean:return{type:"boolean"};case _e.kY.ZodDate:return tt(e,o);case _e.kY.ZodUndefined:return{not:{}};case _e.kY.ZodNull:return{type:"null"};case _e.kY.ZodArray:return function(e,t){var o,r,n;const i={type:"array"};return(null==(o=e.type)?void 0:o._def)&&(null==(n=null==(r=e.type)?void 0:r._def)?void 0:n.typeName)!==_e.kY.ZodAny&&(i.items=mt(e.type._def,{...t,currentPath:[...t.currentPath,"items"]})),e.minLength&&(i.minItems=e.minLength.value),e.maxLength&&(i.maxItems=e.maxLength.value),e.exactLength&&(i.minItems=e.exactLength.value,i.maxItems=e.exactLength.value),i}(e,o);case _e.kY.ZodUnion:case _e.kY.ZodDiscriminatedUnion:return function(e,t){const o=e.options instanceof Map?Array.from(e.options.values()):e.options;if(o.every((e=>e._def.typeName in ct&&(!e._def.checks||!e._def.checks.length)))){const e=o.reduce(((e,t)=>{const o=ct[t._def.typeName];return o&&!e.includes(o)?[...e,o]:e}),[]);return{type:e.length>1?e:e[0]}}if(o.every((e=>"ZodLiteral"===e._def.typeName&&!e.description))){const e=o.reduce(((e,t)=>{const o=typeof t._def.value;switch(o){case"string":case"number":case"boolean":return[...e,o];case"bigint":return[...e,"integer"];case"object":if(null===t._def.value)return[...e,"null"];default:return e}}),[]);if(e.length===o.length){const t=e.filter(((e,t,o)=>o.indexOf(e)===t));return{type:t.length>1?t:t[0],enum:o.reduce(((e,t)=>e.includes(t._def.value)?e:[...e,t._def.value]),[])}}}else if(o.every((e=>"ZodEnum"===e._def.typeName)))return{type:"string",enum:o.reduce(((e,t)=>[...e,...t._def.values.filter((t=>!e.includes(t)))]),[])};return((e,t)=>{const o=(e.options instanceof Map?Array.from(e.options.values()):e.options).map(((e,o)=>mt(e._def,{...t,currentPath:[...t.currentPath,"anyOf",`${o}`]}))).filter((e=>!!e&&(!t.strictUnions||"object"==typeof e&&Object.keys(e).length>0)));return o.length?{anyOf:o}:void 0})(e,t)}(e,o);case _e.kY.ZodIntersection:return function(e,t){const o=[mt(e.left._def,{...t,currentPath:[...t.currentPath,"allOf","0"]}),mt(e.right._def,{...t,currentPath:[...t.currentPath,"allOf","1"]})].filter((e=>!!e)),r=[];return o.forEach((e=>{if("type"in(t=e)&&"string"===t.type||!("allOf"in t)){let t=e;if("additionalProperties"in e&&!1===e.additionalProperties){const{additionalProperties:o,...r}=e;t=r}r.push(t)}else r.push(...e.allOf);var t})),r.length?{allOf:r}:void 0}(e,o);case _e.kY.ZodTuple:return function(e,t){return e.rest?{type:"array",minItems:e.items.length,items:e.items.map(((e,o)=>mt(e._def,{...t,currentPath:[...t.currentPath,"items",`${o}`]}))).reduce(((e,t)=>void 0===t?e:[...e,t]),[]),additionalItems:mt(e.rest._def,{...t,currentPath:[...t.currentPath,"additionalItems"]})}:{type:"array",minItems:e.items.length,maxItems:e.items.length,items:e.items.map(((e,o)=>mt(e._def,{...t,currentPath:[...t.currentPath,"items",`${o}`]}))).reduce(((e,t)=>void 0===t?e:[...e,t]),[])}}(e,o);case _e.kY.ZodRecord:return dt(e,o);case _e.kY.ZodLiteral:return function(e){const t=typeof e.value;return"bigint"!==t&&"number"!==t&&"boolean"!==t&&"string"!==t?{type:Array.isArray(e.value)?"array":"object"}:{type:"bigint"===t?"integer":t,const:e.value}}(e);case _e.kY.ZodEnum:return function(e){return{type:"string",enum:Array.from(e.values)}}(e);case _e.kY.ZodNativeEnum:return function(e){const t=e.values,o=Object.keys(e.values).filter((e=>"number"!=typeof t[t[e]])).map((e=>t[e])),r=Array.from(new Set(o.map((e=>typeof e))));return{type:1===r.length?"string"===r[0]?"string":"number":["string","number"],enum:o}}(e);case _e.kY.ZodNullable:return function(e,t){if(["ZodString","ZodNumber","ZodBigInt","ZodBoolean","ZodNull"].includes(e.innerType._def.typeName)&&(!e.innerType._def.checks||!e.innerType._def.checks.length))return{type:[ct[e.innerType._def.typeName],"null"]};const o=mt(e.innerType._def,{...t,currentPath:[...t.currentPath,"anyOf","0"]});return o&&{anyOf:[o,{type:"null"}]}}(e,o);case _e.kY.ZodOptional:return((e,t)=>{var o;if(t.currentPath.toString()===(null==(o=t.propertyPath)?void 0:o.toString()))return mt(e.innerType._def,t);const r=mt(e.innerType._def,{...t,currentPath:[...t.currentPath,"anyOf","1"]});return r?{anyOf:[{not:{}},r]}:{}})(e,o);case _e.kY.ZodMap:return function(e,t){return"record"===t.mapStrategy?dt(e,t):{type:"array",maxItems:125,items:{type:"array",items:[mt(e.keyType._def,{...t,currentPath:[...t.currentPath,"items","items","0"]})||{},mt(e.valueType._def,{...t,currentPath:[...t.currentPath,"items","items","1"]})||{}],minItems:2,maxItems:2}}}(e,o);case _e.kY.ZodSet:return function(e,t){const o={type:"array",uniqueItems:!0,items:mt(e.valueType._def,{...t,currentPath:[...t.currentPath,"items"]})};return e.minSize&&(o.minItems=e.minSize.value),e.maxSize&&(o.maxItems=e.maxSize.value),o}(e,o);case _e.kY.ZodLazy:return()=>e.getter()._def;case _e.kY.ZodPromise:return function(e,t){return mt(e.type._def,t)}(e,o);case _e.kY.ZodNaN:case _e.kY.ZodNever:return{not:{}};case _e.kY.ZodEffects:return function(e,t){return"input"===t.effectStrategy?mt(e.schema._def,t):{}}(e,o);case _e.kY.ZodAny:case _e.kY.ZodUnknown:return{};case _e.kY.ZodDefault:return function(e,t){return{...mt(e.innerType._def,t),default:e.defaultValue()}}(e,o);case _e.kY.ZodBranded:return et(e,o);case _e.kY.ZodReadonly:case _e.kY.ZodCatch:return((e,t)=>mt(e.innerType._def,t))(e,o);case _e.kY.ZodPipeline:return((e,t)=>{if("input"===t.pipeStrategy)return mt(e.in._def,t);if("output"===t.pipeStrategy)return mt(e.out._def,t);const o=mt(e.in._def,{...t,currentPath:[...t.currentPath,"allOf","0"]});return{allOf:[o,mt(e.out._def,{...t,currentPath:[...t.currentPath,"allOf",o?"1":"0"]})].filter((e=>void 0!==e))}})(e,o);case _e.kY.ZodFunction:case _e.kY.ZodVoid:case _e.kY.ZodSymbol:default:return}},gt=(e,t)=>{let o=0;for(;o<e.length&&o<t.length&&e[o]===t[o];o++);return[(e.length-o).toString(),...t.slice(o)].join("/")};function mt(e,t,o=!1){var r;const n=t.seen.get(e);if(t.override){const i=null==(r=t.override)?void 0:r.call(t,e,t,n,o);if(i!==Qe)return i}if(n&&!o){const e=yt(n,t);if(void 0!==e)return e}const i={def:e,path:t.currentPath,jsonSchema:void 0};t.seen.set(e,i);const s=ft(e,e.typeName,t),a="function"==typeof s?mt(s(),t):s;if(a&&vt(e,t,a),t.postProcess){const o=t.postProcess(a,e,t);return i.jsonSchema=a,o}return i.jsonSchema=a,a}var yt=(e,t)=>{switch(t.$refStrategy){case"root":return{$ref:e.path.join("/")};case"relative":return{$ref:gt(t.currentPath,e.path)};case"none":case"seen":return e.path.length<t.currentPath.length&&e.path.every(((e,o)=>t.currentPath[o]===e))?(console.warn(`Recursive reference detected at ${t.currentPath.join("/")}! Defaulting to any`),{}):"seen"===t.$refStrategy?{}:void 0}},vt=(e,t,o)=>(e.description&&(o.description=e.description),o),Ct=(e,t)=>{var o;const r=(e=>{const t=(e=>"string"==typeof e?{...Xe,name:e}:{...Xe,...e})(e),o=void 0!==t.name?[...t.basePath,t.definitionPath,t.name]:t.basePath;return{...t,currentPath:o,propertyPath:void 0,seen:new Map(Object.entries(t.definitions).map((([e,o])=>[o._def,{def:o._def,path:[...t.basePath,t.definitionPath,e],jsonSchema:void 0}])))}})(t);let n="object"==typeof t&&t.definitions?Object.entries(t.definitions).reduce(((e,[t,o])=>{var n;return{...e,[t]:null!=(n=mt(o._def,{...r,currentPath:[...r.basePath,r.definitionPath,t]},!0))?n:{}}}),{}):void 0;const i="string"==typeof t?t:"title"===(null==t?void 0:t.nameStrategy)||null==t?void 0:t.name,s=null!=(o=mt(e._def,void 0===i?r:{...r,currentPath:[...r.basePath,r.definitionPath,i]},!1))?o:{},a="object"==typeof t&&void 0!==t.name&&"title"===t.nameStrategy?t.name:void 0;void 0!==a&&(s.title=a);const l=void 0===i?n?{...s,[r.definitionPath]:n}:s:{$ref:[..."relative"===r.$refStrategy?[]:r.basePath,r.definitionPath,i].join("/"),[r.definitionPath]:{...n,[i]:s}};return l.$schema="http://json-schema.org/draft-07/schema#",l},wt=Symbol.for("vercel.ai.schema");function Et(e){let t;return()=>(null==t&&(t=e()),t)}function _t(e,{validate:t}={}){return{[wt]:!0,_type:void 0,get jsonSchema(){return"function"==typeof e&&(e=e()),e},validate:t}}function bt(e,t){return function(e){return"_zod"in e}(e)?function(e,t){var o;const r=null!=(o=null==t?void 0:t.useReferences)&&o;return _t((()=>Ze(we.b(e,{target:"draft-7",io:"input",reused:r?"ref":"inline"}))),{validate:async t=>{const o=await Ee.bp(e,t);return o.success?{success:!0,value:o.data}:{success:!1,error:o.error}}})}(e,t):function(e,t){var o;const r=null!=(o=null==t?void 0:t.useReferences)&&o;return _t((()=>Ct(e,{$refStrategy:r?"root":"none"})),{validate:async t=>{const o=await e.safeParseAsync(t);return o.success?{success:!0,value:o.data}:{success:!1,error:o.error}}})}(e,t)}async function Rt({value:e,schema:t}){const o=await St({value:e,schema:t});if(!o.success)throw ge.wrap({value:e,cause:o.error});return o.value}async function St({value:e,schema:t}){const o=function(e){return null==e?_t({properties:{},additionalProperties:!1}):"object"==typeof(o=e)&&null!==o&&wt in o&&!0===o[wt]&&"jsonSchema"in o&&"validate"in o?e:"~standard"in e?"zod"===e["~standard"].vendor?bt(e):(t=e,_t((()=>Ze(t["~standard"].jsonSchema.input({target:"draft-07"}))),{validate:async e=>{const o=await t["~standard"].validate(e);return"value"in o?{success:!0,value:o.value}:{success:!1,error:new ge({value:e,cause:o.issues})}}})):e();var t,o}(t);try{if(null==o.validate)return{success:!0,value:e,rawValue:e};const t=await o.validate(e);return t.success?{success:!0,value:t.value,rawValue:e}:{success:!1,error:ge.wrap({value:e,cause:t.error}),rawValue:e}}catch(t){return{success:!1,error:ge.wrap({value:e,cause:t}),rawValue:e}}}async function Ot({text:e,schema:t}){try{const o=Ke(e);return null==t?{success:!0,value:o,rawValue:o}:await St({value:o,schema:t})}catch(t){return{success:!1,error:Q.isInstance(t)?t:new Q({text:e,cause:t}),rawValue:void 0}}}function Tt(e){try{return Ke(e),!0}catch(e){return!1}}function Pt({stream:e,schema:t}){return e.pipeThrough(new TextDecoderStream).pipeThrough(new be.Z).pipeThrough(new TransformStream({async transform({data:e},o){"[DONE]"!==e&&o.enqueue(await Ot({text:e,schema:t}))}}))}async function At({provider:e,providerOptions:t,schema:o}){if(null==(null==t?void 0:t[e]))return;const r=await St({value:t[e],schema:o});if(!r.success)throw new W({argument:"providerOptions",message:`invalid ${e} provider options`,cause:r.error});return r.value}var It=()=>globalThis.fetch,Dt=async({url:e,headers:t,body:o,failedResponseHandler:r,successfulResponseHandler:n,abortSignal:i,fetch:s})=>xt({url:e,headers:{"Content-Type":"application/json",...t},body:{content:JSON.stringify(o),values:o},failedResponseHandler:r,successfulResponseHandler:n,abortSignal:i,fetch:s}),Nt=async({url:e,headers:t,formData:o,failedResponseHandler:r,successfulResponseHandler:n,abortSignal:i,fetch:s})=>xt({url:e,headers:t,body:{content:o,values:Object.fromEntries(o.entries())},failedResponseHandler:r,successfulResponseHandler:n,abortSignal:i,fetch:s}),xt=async({url:e,headers:t={},body:o,successfulResponseHandler:r,failedResponseHandler:n,abortSignal:i,fetch:s=It()})=>{try{const a=await s(e,{method:"POST",headers:Be(t,"ai-sdk/provider-utils/4.0.5",He()),body:o.content,signal:i}),l=Oe(a);if(!a.ok){let t;try{t=await n({response:a,url:e,requestBodyValues:o.values})}catch(t){if(We(t)||g.isInstance(t))throw t;throw new g({message:"Failed to process error response",cause:t,statusCode:a.status,url:e,responseHeaders:l,requestBodyValues:o.values})}throw t.value}try{return await r({response:a,url:e,requestBodyValues:o.values})}catch(t){if(t instanceof Error&&(We(t)||g.isInstance(t)))throw t;throw new g({message:"Failed to process successful response",cause:t,statusCode:a.status,url:e,responseHeaders:l,requestBodyValues:o.values})}}catch(t){throw function({error:e,url:t,requestBodyValues:o}){if(We(e))return e;if(e instanceof TypeError&&Ve.includes(e.message.toLowerCase())){const r=e.cause;if(null!=r)return new g({message:`Cannot connect to API: ${r.message}`,cause:r,url:t,requestBodyValues:o,isRetryable:!0})}return e}({error:t,url:e,requestBodyValues:o.values})}};function Ft({id:e,inputSchema:t,outputSchema:o,supportsDeferredResults:r}){return({execute:n,needsApproval:i,toModelOutput:s,onInputStart:a,onInputDelta:l,onInputAvailable:p,...u})=>({type:"provider",id:e,args:u,inputSchema:t,outputSchema:o,execute:n,needsApproval:i,toModelOutput:s,onInputStart:a,onInputDelta:l,onInputAvailable:p,supportsDeferredResults:r})}var Mt=e=>async({response:t})=>{const o=Oe(t);if(null==t.body)throw new C({});return{responseHeaders:o,value:Pt({stream:t.body,schema:e})}},kt=e=>async({response:t,url:o,requestBodyValues:r})=>{const n=await t.text(),i=await Ot({text:n,schema:e}),s=Oe(t);if(!i.success)throw new g({message:"Invalid JSON response",cause:i.error,statusCode:t.status,responseHeaders:s,responseBody:n,url:o,requestBodyValues:r});return{responseHeaders:s,value:i.value,rawValue:i.rawValue}},Lt=o(8645),Gt=o(94149),jt=o(9606).URL,Wt=Lt.Ik({error:Lt.Ik({message:Lt.Yj(),type:Lt.Yj().nullish(),param:Lt.bz().nullish(),code:Lt.KC([Lt.Yj(),Lt.ai()]).nullish()})}),Vt=(({errorSchema:e,errorToMessage:t,isRetryable:o})=>async({response:r,url:n,requestBodyValues:i})=>{const s=await r.text(),a=Oe(r);if(""===s.trim())return{responseHeaders:a,value:new g({message:r.statusText,url:n,requestBodyValues:i,statusCode:r.status,responseHeaders:a,responseBody:s,isRetryable:null==o?void 0:o(r)})};try{const l=await async function({text:e,schema:t}){try{const o=Ke(e);return null==t?o:Rt({value:o,schema:t})}catch(t){if(Q.isInstance(t)||ge.isInstance(t))throw t;throw new Q({text:e,cause:t})}}({text:s,schema:e});return{responseHeaders:a,value:new g({message:t(l),url:n,requestBodyValues:i,statusCode:r.status,responseHeaders:a,responseBody:s,data:l,isRetryable:null==o?void 0:o(r,l)})}}catch(e){return{responseHeaders:a,value:new g({message:r.statusText,url:n,requestBodyValues:i,statusCode:r.status,responseHeaders:a,responseBody:s,isRetryable:null==o?void 0:o(r)})}}})({errorSchema:Wt,errorToMessage:e=>e.error.message});function Ht(e){const t=e.startsWith("o3")||e.startsWith("o4-mini")||e.startsWith("gpt-5")&&!e.startsWith("gpt-5-chat"),o=e.startsWith("gpt-4")||e.startsWith("gpt-5-mini")||e.startsWith("gpt-5")&&!e.startsWith("gpt-5-nano")&&!e.startsWith("gpt-5-chat")||e.startsWith("o3")||e.startsWith("o4-mini"),r=e.startsWith("o1")||e.startsWith("o3")||e.startsWith("o4-mini")||e.startsWith("codex-mini")||e.startsWith("computer-use-preview")||e.startsWith("gpt-5")&&!e.startsWith("gpt-5-chat");return{supportsFlexProcessing:t,supportsPriorityProcessing:o,isReasoningModel:r,systemMessageMode:r?"developer":"system",supportsNonReasoningParameters:e.startsWith("gpt-5.1")||e.startsWith("gpt-5.2")}}function Bt(e){var t,o,r,n,i,s;if(null==e)return{inputTokens:{total:void 0,noCache:void 0,cacheRead:void 0,cacheWrite:void 0},outputTokens:{total:void 0,text:void 0,reasoning:void 0},raw:void 0};const a=null!=(t=e.prompt_tokens)?t:0,l=null!=(o=e.completion_tokens)?o:0,p=null!=(n=null==(r=e.prompt_tokens_details)?void 0:r.cached_tokens)?n:0,u=null!=(s=null==(i=e.completion_tokens_details)?void 0:i.reasoning_tokens)?s:0;return{inputTokens:{total:a,noCache:a-p,cacheRead:p,cacheWrite:void 0},outputTokens:{total:l,text:l-u,reasoning:u},raw:e}}function zt({id:e,model:t,created:o}){return{id:null!=e?e:void 0,modelId:null!=t?t:void 0,timestamp:o?new Date(1e3*o):void 0}}function Ut(e){switch(e){case"stop":return"stop";case"length":return"length";case"content_filter":return"content-filter";case"function_call":case"tool_calls":return"tool-calls";default:return"other"}}var Yt=Et((()=>bt(Lt.Ik({id:Lt.Yj().nullish(),created:Lt.ai().nullish(),model:Lt.Yj().nullish(),choices:Lt.YO(Lt.Ik({message:Lt.Ik({role:Lt.eu("assistant").nullish(),content:Lt.Yj().nullish(),tool_calls:Lt.YO(Lt.Ik({id:Lt.Yj().nullish(),type:Lt.eu("function"),function:Lt.Ik({name:Lt.Yj(),arguments:Lt.Yj()})})).nullish(),annotations:Lt.YO(Lt.Ik({type:Lt.eu("url_citation"),url_citation:Lt.Ik({start_index:Lt.ai(),end_index:Lt.ai(),url:Lt.Yj(),title:Lt.Yj()})})).nullish()}),index:Lt.ai(),logprobs:Lt.Ik({content:Lt.YO(Lt.Ik({token:Lt.Yj(),logprob:Lt.ai(),top_logprobs:Lt.YO(Lt.Ik({token:Lt.Yj(),logprob:Lt.ai()}))})).nullish()}).nullish(),finish_reason:Lt.Yj().nullish()})),usage:Lt.Ik({prompt_tokens:Lt.ai().nullish(),completion_tokens:Lt.ai().nullish(),total_tokens:Lt.ai().nullish(),prompt_tokens_details:Lt.Ik({cached_tokens:Lt.ai().nullish()}).nullish(),completion_tokens_details:Lt.Ik({reasoning_tokens:Lt.ai().nullish(),accepted_prediction_tokens:Lt.ai().nullish(),rejected_prediction_tokens:Lt.ai().nullish()}).nullish()}).nullish()})))),qt=Et((()=>bt(Lt.KC([Lt.Ik({id:Lt.Yj().nullish(),created:Lt.ai().nullish(),model:Lt.Yj().nullish(),choices:Lt.YO(Lt.Ik({delta:Lt.Ik({role:Lt.k5(["assistant"]).nullish(),content:Lt.Yj().nullish(),tool_calls:Lt.YO(Lt.Ik({index:Lt.ai(),id:Lt.Yj().nullish(),type:Lt.eu("function").nullish(),function:Lt.Ik({name:Lt.Yj().nullish(),arguments:Lt.Yj().nullish()})})).nullish(),annotations:Lt.YO(Lt.Ik({type:Lt.eu("url_citation"),url_citation:Lt.Ik({start_index:Lt.ai(),end_index:Lt.ai(),url:Lt.Yj(),title:Lt.Yj()})})).nullish()}).nullish(),logprobs:Lt.Ik({content:Lt.YO(Lt.Ik({token:Lt.Yj(),logprob:Lt.ai(),top_logprobs:Lt.YO(Lt.Ik({token:Lt.Yj(),logprob:Lt.ai()}))})).nullish()}).nullish(),finish_reason:Lt.Yj().nullish(),index:Lt.ai()})),usage:Lt.Ik({prompt_tokens:Lt.ai().nullish(),completion_tokens:Lt.ai().nullish(),total_tokens:Lt.ai().nullish(),prompt_tokens_details:Lt.Ik({cached_tokens:Lt.ai().nullish()}).nullish(),completion_tokens_details:Lt.Ik({reasoning_tokens:Lt.ai().nullish(),accepted_prediction_tokens:Lt.ai().nullish(),rejected_prediction_tokens:Lt.ai().nullish()}).nullish()}).nullish()}),Wt])))),$t=Et((()=>bt(Lt.Ik({logitBias:Lt.g1(Gt.ai(),Lt.ai()).optional(),logprobs:Lt.KC([Lt.zM(),Lt.ai()]).optional(),parallelToolCalls:Lt.zM().optional(),user:Lt.Yj().optional(),reasoningEffort:Lt.k5(["none","minimal","low","medium","high","xhigh"]).optional(),maxCompletionTokens:Lt.ai().optional(),store:Lt.zM().optional(),metadata:Lt.g1(Lt.Yj().max(64),Lt.Yj().max(512)).optional(),prediction:Lt.g1(Lt.Yj(),Lt.bz()).optional(),serviceTier:Lt.k5(["auto","flex","priority","default"]).optional(),strictJsonSchema:Lt.zM().optional(),textVerbosity:Lt.k5(["low","medium","high"]).optional(),promptCacheKey:Lt.Yj().optional(),promptCacheRetention:Lt.k5(["in_memory","24h"]).optional(),safetyIdentifier:Lt.Yj().optional(),systemMessageMode:Lt.k5(["system","developer","remove"]).optional(),forceReasoning:Lt.zM().optional()})))),Kt=class{constructor(e,t){this.specificationVersion="v3",this.supportedUrls={"image/*":[/^https?:\/\/.*$/]},this.modelId=e,this.config=t}get provider(){return this.config.provider}async getArgs({prompt:e,maxOutputTokens:t,temperature:o,topP:r,topK:n,frequencyPenalty:i,presencePenalty:s,stopSequences:a,responseFormat:l,seed:p,tools:u,toolChoice:d,providerOptions:c}){var h,f,g,m,y;const v=[],C=null!=(h=await At({provider:"openai",providerOptions:c,schema:$t}))?h:{},w=Ht(this.modelId),E=null!=(f=C.forceReasoning)?f:w.isReasoningModel;null!=n&&v.push({type:"unsupported",feature:"topK"});const{messages:_,warnings:b}=function({prompt:e,systemMessageMode:t="system"}){var o;const r=[],n=[];for(const{role:i,content:s}of e)switch(i){case"system":switch(t){case"system":r.push({role:"system",content:s});break;case"developer":r.push({role:"developer",content:s});break;case"remove":n.push({type:"other",message:"system messages are removed for this model"});break;default:throw new Error(`Unsupported system message mode: ${t}`)}break;case"user":if(1===s.length&&"text"===s[0].type){r.push({role:"user",content:s[0].text});break}r.push({role:"user",content:s.map(((e,t)=>{var o,r,n;switch(e.type){case"text":return{type:"text",text:e.text};case"file":if(e.mediaType.startsWith("image/")){const t="image/*"===e.mediaType?"image/jpeg":e.mediaType;return{type:"image_url",image_url:{url:e.data instanceof jt?e.data.toString():`data:${t};base64,${Ie(e.data)}`,detail:null==(r=null==(o=e.providerOptions)?void 0:o.openai)?void 0:r.imageDetail}}}if(!e.mediaType.startsWith("audio/")){if("application/pdf"===e.mediaType){if(e.data instanceof jt)throw new Ce({functionality:"PDF file parts with URLs"});return{type:"file",file:"string"==typeof e.data&&e.data.startsWith("file-")?{file_id:e.data}:{filename:null!=(n=e.filename)?n:`part-${t}.pdf`,file_data:`data:application/pdf;base64,${Ie(e.data)}`}}}throw new Ce({functionality:`file part media type ${e.mediaType}`})}if(e.data instanceof jt)throw new Ce({functionality:"audio file parts with URLs"});switch(e.mediaType){case"audio/wav":return{type:"input_audio",input_audio:{data:Ie(e.data),format:"wav"}};case"audio/mp3":case"audio/mpeg":return{type:"input_audio",input_audio:{data:Ie(e.data),format:"mp3"}};default:throw new Ce({functionality:`audio content parts with media type ${e.mediaType}`})}}}))});break;case"assistant":{let e="";const t=[];for(const o of s)switch(o.type){case"text":e+=o.text;break;case"tool-call":t.push({id:o.toolCallId,type:"function",function:{name:o.toolName,arguments:JSON.stringify(o.input)}})}r.push({role:"assistant",content:e,tool_calls:t.length>0?t:void 0});break}case"tool":for(const e of s){if("tool-approval-response"===e.type)continue;const t=e.output;let n;switch(t.type){case"text":case"error-text":n=t.value;break;case"execution-denied":n=null!=(o=t.reason)?o:"Tool execution denied.";break;case"content":case"json":case"error-json":n=JSON.stringify(t.value)}r.push({role:"tool",tool_call_id:e.toolCallId,content:n})}break;default:throw new Error(`Unsupported role: ${i}`)}return{messages:r,warnings:n}}({prompt:e,systemMessageMode:null!=(g=C.systemMessageMode)?g:E?"developer":w.systemMessageMode});v.push(...b);const R=null==(m=C.strictJsonSchema)||m,S={model:this.modelId,logit_bias:C.logitBias,logprobs:!0===C.logprobs||"number"==typeof C.logprobs||void 0,top_logprobs:"number"==typeof C.logprobs?C.logprobs:"boolean"==typeof C.logprobs&&C.logprobs?0:void 0,user:C.user,parallel_tool_calls:C.parallelToolCalls,max_tokens:t,temperature:o,top_p:r,frequency_penalty:i,presence_penalty:s,response_format:"json"===(null==l?void 0:l.type)?null!=l.schema?{type:"json_schema",json_schema:{schema:l.schema,strict:R,name:null!=(y=l.name)?y:"response",description:l.description}}:{type:"json_object"}:void 0,stop:a,seed:p,verbosity:C.textVerbosity,max_completion_tokens:C.maxCompletionTokens,store:C.store,metadata:C.metadata,prediction:C.prediction,reasoning_effort:C.reasoningEffort,service_tier:C.serviceTier,prompt_cache_key:C.promptCacheKey,prompt_cache_retention:C.promptCacheRetention,safety_identifier:C.safetyIdentifier,messages:_};E?("none"===C.reasoningEffort&&w.supportsNonReasoningParameters||(null!=S.temperature&&(S.temperature=void 0,v.push({type:"unsupported",feature:"temperature",details:"temperature is not supported for reasoning models"})),null!=S.top_p&&(S.top_p=void 0,v.push({type:"unsupported",feature:"topP",details:"topP is not supported for reasoning models"})),null!=S.logprobs&&(S.logprobs=void 0,v.push({type:"other",message:"logprobs is not supported for reasoning models"}))),null!=S.frequency_penalty&&(S.frequency_penalty=void 0,v.push({type:"unsupported",feature:"frequencyPenalty",details:"frequencyPenalty is not supported for reasoning models"})),null!=S.presence_penalty&&(S.presence_penalty=void 0,v.push({type:"unsupported",feature:"presencePenalty",details:"presencePenalty is not supported for reasoning models"})),null!=S.logit_bias&&(S.logit_bias=void 0,v.push({type:"other",message:"logitBias is not supported for reasoning models"})),null!=S.top_logprobs&&(S.top_logprobs=void 0,v.push({type:"other",message:"topLogprobs is not supported for reasoning models"})),null!=S.max_tokens&&(null==S.max_completion_tokens&&(S.max_completion_tokens=S.max_tokens),S.max_tokens=void 0)):(this.modelId.startsWith("gpt-4o-search-preview")||this.modelId.startsWith("gpt-4o-mini-search-preview"))&&null!=S.temperature&&(S.temperature=void 0,v.push({type:"unsupported",feature:"temperature",details:"temperature is not supported for the search preview models and has been removed."})),"flex"!==C.serviceTier||w.supportsFlexProcessing||(v.push({type:"unsupported",feature:"serviceTier",details:"flex processing is only available for o3, o4-mini, and gpt-5 models"}),S.service_tier=void 0),"priority"!==C.serviceTier||w.supportsPriorityProcessing||(v.push({type:"unsupported",feature:"serviceTier",details:"priority processing is only available for supported models (gpt-4, gpt-5, gpt-5-mini, o3, o4-mini) and requires Enterprise access. gpt-5-nano is not supported"}),S.service_tier=void 0);const{tools:O,toolChoice:T,toolWarnings:P}=function({tools:e,toolChoice:t}){const o=[];if(null==(e=(null==e?void 0:e.length)?e:void 0))return{tools:void 0,toolChoice:void 0,toolWarnings:o};const r=[];for(const t of e)"function"===t.type?r.push({type:"function",function:{name:t.name,description:t.description,parameters:t.inputSchema,...null!=t.strict?{strict:t.strict}:{}}}):o.push({type:"unsupported",feature:`tool type: ${t.type}`});if(null==t)return{tools:r,toolChoice:void 0,toolWarnings:o};const n=t.type;switch(n){case"auto":case"none":case"required":return{tools:r,toolChoice:n,toolWarnings:o};case"tool":return{tools:r,toolChoice:{type:"function",function:{name:t.toolName}},toolWarnings:o};default:throw new Ce({functionality:`tool choice type: ${n}`})}}({tools:u,toolChoice:d});return{args:{...S,tools:O,tool_choice:T},warnings:[...v,...P]}}async doGenerate(e){var t,o,r,n,i,s,a;const{args:l,warnings:p}=await this.getArgs(e),{responseHeaders:u,value:d,rawValue:c}=await Dt({url:this.config.url({path:"/chat/completions",modelId:this.modelId}),headers:Se(this.config.headers(),e.headers),body:l,failedResponseHandler:Vt,successfulResponseHandler:kt(Yt),abortSignal:e.abortSignal,fetch:this.config.fetch}),h=d.choices[0],f=[],g=h.message.content;null!=g&&g.length>0&&f.push({type:"text",text:g});for(const e of null!=(t=h.message.tool_calls)?t:[])f.push({type:"tool-call",toolCallId:null!=(o=e.id)?o:je(),toolName:e.function.name,input:e.function.arguments});for(const e of null!=(r=h.message.annotations)?r:[])f.push({type:"source",sourceType:"url",id:je(),url:e.url_citation.url,title:e.url_citation.title});const m=null==(n=d.usage)?void 0:n.completion_tokens_details,y=(null==(i=d.usage)||i.prompt_tokens_details,{openai:{}});return null!=(null==m?void 0:m.accepted_prediction_tokens)&&(y.openai.acceptedPredictionTokens=null==m?void 0:m.accepted_prediction_tokens),null!=(null==m?void 0:m.rejected_prediction_tokens)&&(y.openai.rejectedPredictionTokens=null==m?void 0:m.rejected_prediction_tokens),null!=(null==(s=h.logprobs)?void 0:s.content)&&(y.openai.logprobs=h.logprobs.content),{content:f,finishReason:{unified:Ut(h.finish_reason),raw:null!=(a=h.finish_reason)?a:void 0},usage:Bt(d.usage),request:{body:l},response:{...zt(d),headers:u,body:c},warnings:p,providerMetadata:y}}async doStream(e){const{args:t,warnings:o}=await this.getArgs(e),r={...t,stream:!0,stream_options:{include_usage:!0}},{responseHeaders:n,value:i}=await Dt({url:this.config.url({path:"/chat/completions",modelId:this.modelId}),headers:Se(this.config.headers(),e.headers),body:r,failedResponseHandler:Vt,successfulResponseHandler:Mt(qt),abortSignal:e.abortSignal,fetch:this.config.fetch}),s=[];let a,l={unified:"other",raw:void 0},p=!1,u=!1;const d={openai:{}};return{stream:i.pipeThrough(new TransformStream({start(e){e.enqueue({type:"stream-start",warnings:o})},transform(t,o){var r,n,i,c,h,f,g,m,y,v,C,w,E,_,b,R,S;if(e.includeRawChunks&&o.enqueue({type:"raw",rawValue:t.rawValue}),!t.success)return l={unified:"error",raw:void 0},void o.enqueue({type:"error",error:t.error});const O=t.value;if("error"in O)return l={unified:"error",raw:void 0},void o.enqueue({type:"error",error:O.error});if(!p){const e=zt(O);Object.values(e).some(Boolean)&&(p=!0,o.enqueue({type:"response-metadata",...zt(O)}))}null!=O.usage&&(a=O.usage,null!=(null==(r=O.usage.completion_tokens_details)?void 0:r.accepted_prediction_tokens)&&(d.openai.acceptedPredictionTokens=null==(n=O.usage.completion_tokens_details)?void 0:n.accepted_prediction_tokens),null!=(null==(i=O.usage.completion_tokens_details)?void 0:i.rejected_prediction_tokens)&&(d.openai.rejectedPredictionTokens=null==(c=O.usage.completion_tokens_details)?void 0:c.rejected_prediction_tokens));const T=O.choices[0];if(null!=(null==T?void 0:T.finish_reason)&&(l={unified:Ut(T.finish_reason),raw:T.finish_reason}),null!=(null==(h=null==T?void 0:T.logprobs)?void 0:h.content)&&(d.openai.logprobs=T.logprobs.content),null==(null==T?void 0:T.delta))return;const P=T.delta;if(null!=P.content&&(u||(o.enqueue({type:"text-start",id:"0"}),u=!0),o.enqueue({type:"text-delta",id:"0",delta:P.content})),null!=P.tool_calls)for(const e of P.tool_calls){const t=e.index;if(null==s[t]){if("function"!==e.type)throw new $({data:e,message:"Expected 'function' type."});if(null==e.id)throw new $({data:e,message:"Expected 'id' to be a string."});if(null==(null==(f=e.function)?void 0:f.name))throw new $({data:e,message:"Expected 'function.name' to be a string."});o.enqueue({type:"tool-input-start",id:e.id,toolName:e.function.name}),s[t]={id:e.id,type:"function",function:{name:e.function.name,arguments:null!=(g=e.function.arguments)?g:""},hasFinished:!1};const r=s[t];null!=(null==(m=r.function)?void 0:m.name)&&null!=(null==(y=r.function)?void 0:y.arguments)&&(r.function.arguments.length>0&&o.enqueue({type:"tool-input-delta",id:r.id,delta:r.function.arguments}),Tt(r.function.arguments)&&(o.enqueue({type:"tool-input-end",id:r.id}),o.enqueue({type:"tool-call",toolCallId:null!=(v=r.id)?v:je(),toolName:r.function.name,input:r.function.arguments}),r.hasFinished=!0));continue}const r=s[t];r.hasFinished||(null!=(null==(C=e.function)?void 0:C.arguments)&&(r.function.arguments+=null!=(E=null==(w=e.function)?void 0:w.arguments)?E:""),o.enqueue({type:"tool-input-delta",id:r.id,delta:null!=(_=e.function.arguments)?_:""}),null!=(null==(b=r.function)?void 0:b.name)&&null!=(null==(R=r.function)?void 0:R.arguments)&&Tt(r.function.arguments)&&(o.enqueue({type:"tool-input-end",id:r.id}),o.enqueue({type:"tool-call",toolCallId:null!=(S=r.id)?S:je(),toolName:r.function.name,input:r.function.arguments}),r.hasFinished=!0))}if(null!=P.annotations)for(const e of P.annotations)o.enqueue({type:"source",sourceType:"url",id:je(),url:e.url_citation.url,title:e.url_citation.title})},flush(e){u&&e.enqueue({type:"text-end",id:"0"}),e.enqueue({type:"finish",finishReason:l,usage:Bt(a),...null!=d?{providerMetadata:d}:{}})}})),request:{body:r},response:{headers:n}}}};function Zt(e){var t,o,r,n;if(null==e)return{inputTokens:{total:void 0,noCache:void 0,cacheRead:void 0,cacheWrite:void 0},outputTokens:{total:void 0,text:void 0,reasoning:void 0},raw:void 0};const i=null!=(t=e.prompt_tokens)?t:0,s=null!=(o=e.completion_tokens)?o:0;return{inputTokens:{total:null!=(r=e.prompt_tokens)?r:void 0,noCache:i,cacheRead:void 0,cacheWrite:void 0},outputTokens:{total:null!=(n=e.completion_tokens)?n:void 0,text:s,reasoning:void 0},raw:e}}function Jt({id:e,model:t,created:o}){return{id:null!=e?e:void 0,modelId:null!=t?t:void 0,timestamp:null!=o?new Date(1e3*o):void 0}}function Qt(e){switch(e){case"stop":return"stop";case"length":return"length";case"content_filter":return"content-filter";case"function_call":case"tool_calls":return"tool-calls";default:return"other"}}var Xt=Et((()=>bt(Lt.Ik({id:Lt.Yj().nullish(),created:Lt.ai().nullish(),model:Lt.Yj().nullish(),choices:Lt.YO(Lt.Ik({text:Lt.Yj(),finish_reason:Lt.Yj(),logprobs:Lt.Ik({tokens:Lt.YO(Lt.Yj()),token_logprobs:Lt.YO(Lt.ai()),top_logprobs:Lt.YO(Lt.g1(Lt.Yj(),Lt.ai())).nullish()}).nullish()})),usage:Lt.Ik({prompt_tokens:Lt.ai(),completion_tokens:Lt.ai(),total_tokens:Lt.ai()}).nullish()})))),eo=Et((()=>bt(Lt.KC([Lt.Ik({id:Lt.Yj().nullish(),created:Lt.ai().nullish(),model:Lt.Yj().nullish(),choices:Lt.YO(Lt.Ik({text:Lt.Yj(),finish_reason:Lt.Yj().nullish(),index:Lt.ai(),logprobs:Lt.Ik({tokens:Lt.YO(Lt.Yj()),token_logprobs:Lt.YO(Lt.ai()),top_logprobs:Lt.YO(Lt.g1(Lt.Yj(),Lt.ai())).nullish()}).nullish()})),usage:Lt.Ik({prompt_tokens:Lt.ai(),completion_tokens:Lt.ai(),total_tokens:Lt.ai()}).nullish()}),Wt])))),to=Et((()=>bt(Lt.Ik({echo:Lt.zM().optional(),logitBias:Lt.g1(Lt.Yj(),Lt.ai()).optional(),suffix:Lt.Yj().optional(),user:Lt.Yj().optional(),logprobs:Lt.KC([Lt.zM(),Lt.ai()]).optional()})))),oo=class{constructor(e,t){this.specificationVersion="v3",this.supportedUrls={},this.modelId=e,this.config=t}get providerOptionsName(){return this.config.provider.split(".")[0].trim()}get provider(){return this.config.provider}async getArgs({prompt:e,maxOutputTokens:t,temperature:o,topP:r,topK:n,frequencyPenalty:i,presencePenalty:s,stopSequences:a,responseFormat:l,tools:p,toolChoice:u,seed:d,providerOptions:c}){const h=[],f={...await At({provider:"openai",providerOptions:c,schema:to}),...await At({provider:this.providerOptionsName,providerOptions:c,schema:to})};null!=n&&h.push({type:"unsupported",feature:"topK"}),(null==p?void 0:p.length)&&h.push({type:"unsupported",feature:"tools"}),null!=u&&h.push({type:"unsupported",feature:"toolChoice"}),null!=l&&"text"!==l.type&&h.push({type:"unsupported",feature:"responseFormat",details:"JSON response format is not supported."});const{prompt:g,stopSequences:m}=function({prompt:e,user:t="user",assistant:o="assistant"}){let r="";"system"===e[0].role&&(r+=`${e[0].content}\n\n`,e=e.slice(1));for(const{role:n,content:i}of e)switch(n){case"system":throw new z({message:"Unexpected system message in prompt: ${content}",prompt:e});case"user":r+=`${t}:\n${i.map((e=>{if("text"===e.type)return e.text})).filter(Boolean).join("")}\n\n`;break;case"assistant":r+=`${o}:\n${i.map((e=>{switch(e.type){case"text":return e.text;case"tool-call":throw new Ce({functionality:"tool-call messages"})}})).join("")}\n\n`;break;case"tool":throw new Ce({functionality:"tool messages"});default:throw new Error(`Unsupported role: ${n}`)}return r+=`${o}:\n`,{prompt:r,stopSequences:[`\n${t}:`]}}({prompt:e}),y=[...null!=m?m:[],...null!=a?a:[]];return{args:{model:this.modelId,echo:f.echo,logit_bias:f.logitBias,logprobs:!0===(null==f?void 0:f.logprobs)?0:!1===(null==f?void 0:f.logprobs)||null==f?void 0:f.logprobs,suffix:f.suffix,user:f.user,max_tokens:t,temperature:o,top_p:r,frequency_penalty:i,presence_penalty:s,seed:d,prompt:g,stop:y.length>0?y:void 0},warnings:h}}async doGenerate(e){var t;const{args:o,warnings:r}=await this.getArgs(e),{responseHeaders:n,value:i,rawValue:s}=await Dt({url:this.config.url({path:"/completions",modelId:this.modelId}),headers:Se(this.config.headers(),e.headers),body:o,failedResponseHandler:Vt,successfulResponseHandler:kt(Xt),abortSignal:e.abortSignal,fetch:this.config.fetch}),a=i.choices[0],l={openai:{}};return null!=a.logprobs&&(l.openai.logprobs=a.logprobs),{content:[{type:"text",text:a.text}],usage:Zt(i.usage),finishReason:{unified:Qt(a.finish_reason),raw:null!=(t=a.finish_reason)?t:void 0},request:{body:o},response:{...Jt(i),headers:n,body:s},providerMetadata:l,warnings:r}}async doStream(e){const{args:t,warnings:o}=await this.getArgs(e),r={...t,stream:!0,stream_options:{include_usage:!0}},{responseHeaders:n,value:i}=await Dt({url:this.config.url({path:"/completions",modelId:this.modelId}),headers:Se(this.config.headers(),e.headers),body:r,failedResponseHandler:Vt,successfulResponseHandler:Mt(eo),abortSignal:e.abortSignal,fetch:this.config.fetch});let s={unified:"other",raw:void 0};const a={openai:{}};let l,p=!0;return{stream:i.pipeThrough(new TransformStream({start(e){e.enqueue({type:"stream-start",warnings:o})},transform(t,o){if(e.includeRawChunks&&o.enqueue({type:"raw",rawValue:t.rawValue}),!t.success)return s={unified:"error",raw:void 0},void o.enqueue({type:"error",error:t.error});const r=t.value;if("error"in r)return s={unified:"error",raw:void 0},void o.enqueue({type:"error",error:r.error});p&&(p=!1,o.enqueue({type:"response-metadata",...Jt(r)}),o.enqueue({type:"text-start",id:"0"})),null!=r.usage&&(l=r.usage);const n=r.choices[0];null!=(null==n?void 0:n.finish_reason)&&(s={unified:Qt(n.finish_reason),raw:n.finish_reason}),null!=(null==n?void 0:n.logprobs)&&(a.openai.logprobs=n.logprobs),null!=(null==n?void 0:n.text)&&n.text.length>0&&o.enqueue({type:"text-delta",id:"0",delta:n.text})},flush(e){p||e.enqueue({type:"text-end",id:"0"}),e.enqueue({type:"finish",finishReason:s,providerMetadata:a,usage:Zt(l)})}})),request:{body:r},response:{headers:n}}}},ro=Et((()=>bt(Lt.Ik({dimensions:Lt.ai().optional(),user:Lt.Yj().optional()})))),no=Et((()=>bt(Lt.Ik({data:Lt.YO(Lt.Ik({embedding:Lt.YO(Lt.ai())})),usage:Lt.Ik({prompt_tokens:Lt.ai()}).nullish()})))),io=class{constructor(e,t){this.specificationVersion="v3",this.maxEmbeddingsPerCall=2048,this.supportsParallelCalls=!0,this.modelId=e,this.config=t}get provider(){return this.config.provider}async doEmbed({values:e,headers:t,abortSignal:o,providerOptions:r}){var n;if(e.length>this.maxEmbeddingsPerCall)throw new de({provider:this.provider,modelId:this.modelId,maxEmbeddingsPerCall:this.maxEmbeddingsPerCall,values:e});const i=null!=(n=await At({provider:"openai",providerOptions:r,schema:ro}))?n:{},{responseHeaders:s,value:a,rawValue:l}=await Dt({url:this.config.url({path:"/embeddings",modelId:this.modelId}),headers:Se(this.config.headers(),t),body:{model:this.modelId,input:e,encoding_format:"float",dimensions:i.dimensions,user:i.user},failedResponseHandler:Vt,successfulResponseHandler:kt(no),abortSignal:o,fetch:this.config.fetch});return{warnings:[],embeddings:a.data.map((e=>e.embedding)),usage:a.usage?{tokens:a.usage.prompt_tokens}:void 0,response:{headers:s,body:l}}}},so=Et((()=>bt(Lt.Ik({created:Lt.ai().nullish(),data:Lt.YO(Lt.Ik({b64_json:Lt.Yj(),revised_prompt:Lt.Yj().nullish()})),background:Lt.Yj().nullish(),output_format:Lt.Yj().nullish(),size:Lt.Yj().nullish(),quality:Lt.Yj().nullish(),usage:Lt.Ik({input_tokens:Lt.ai().nullish(),output_tokens:Lt.ai().nullish(),total_tokens:Lt.ai().nullish(),input_tokens_details:Lt.Ik({image_tokens:Lt.ai().nullish(),text_tokens:Lt.ai().nullish()}).nullish()}).nullish()})))),ao={"dall-e-3":1,"dall-e-2":10,"gpt-image-1":10,"gpt-image-1-mini":10,"gpt-image-1.5":10},lo=["gpt-image-1-mini","gpt-image-1.5","gpt-image-1"],po=class{constructor(e,t){this.modelId=e,this.config=t,this.specificationVersion="v3"}get maxImagesPerCall(){var e;return null!=(e=ao[this.modelId])?e:1}get provider(){return this.config.provider}async doGenerate({prompt:e,files:t,mask:o,n:r,size:n,aspectRatio:i,seed:s,providerOptions:a,headers:l,abortSignal:p}){var u,d,c,h,f,g,m,y,v,C,w;const E=[];null!=i&&E.push({type:"unsupported",feature:"aspectRatio",details:"This model does not support aspect ratio. Use `size` instead."}),null!=s&&E.push({type:"unsupported",feature:"seed"});const _=null!=(c=null==(d=null==(u=this.config._internal)?void 0:u.currentDate)?void 0:d.call(u))?c:new Date;if(null!=t){const{value:i,responseHeaders:s}=await Nt({url:this.config.url({path:"/images/edits",modelId:this.modelId}),headers:Se(this.config.headers(),l),formData:De({model:this.modelId,prompt:e,image:await Promise.all(t.map((e=>"file"===e.type?new Blob([e.data instanceof Uint8Array?new Blob([e.data],{type:e.mediaType}):new Blob([Ae(e.data)],{type:e.mediaType})],{type:e.mediaType}):Ge(e.url)))),mask:null!=o?await uo(o):void 0,n:r,size:n,...null!=(h=a.openai)?h:{}}),failedResponseHandler:Vt,successfulResponseHandler:kt(so),abortSignal:p,fetch:this.config.fetch});return{images:i.data.map((e=>e.b64_json)),warnings:E,usage:null!=i.usage?{inputTokens:null!=(f=i.usage.input_tokens)?f:void 0,outputTokens:null!=(g=i.usage.output_tokens)?g:void 0,totalTokens:null!=(m=i.usage.total_tokens)?m:void 0}:void 0,response:{timestamp:_,modelId:this.modelId,headers:s},providerMetadata:{openai:{images:i.data.map((e=>{var t,o,r,n,s;return{...e.revised_prompt?{revisedPrompt:e.revised_prompt}:{},created:null!=(t=i.created)?t:void 0,size:null!=(o=i.size)?o:void 0,quality:null!=(r=i.quality)?r:void 0,background:null!=(n=i.background)?n:void 0,outputFormat:null!=(s=i.output_format)?s:void 0}}))}}}}const{value:b,responseHeaders:R}=await Dt({url:this.config.url({path:"/images/generations",modelId:this.modelId}),headers:Se(this.config.headers(),l),body:{model:this.modelId,prompt:e,n:r,size:n,...null!=(y=a.openai)?y:{},...(S=this.modelId,lo.some((e=>S.startsWith(e)))?{}:{response_format:"b64_json"})},failedResponseHandler:Vt,successfulResponseHandler:kt(so),abortSignal:p,fetch:this.config.fetch});var S;return{images:b.data.map((e=>e.b64_json)),warnings:E,usage:null!=b.usage?{inputTokens:null!=(v=b.usage.input_tokens)?v:void 0,outputTokens:null!=(C=b.usage.output_tokens)?C:void 0,totalTokens:null!=(w=b.usage.total_tokens)?w:void 0}:void 0,response:{timestamp:_,modelId:this.modelId,headers:R},providerMetadata:{openai:{images:b.data.map((e=>{var t,o,r,n,i;return{...e.revised_prompt?{revisedPrompt:e.revised_prompt}:{},created:null!=(t=b.created)?t:void 0,size:null!=(o=b.size)?o:void 0,quality:null!=(r=b.quality)?r:void 0,background:null!=(n=b.background)?n:void 0,outputFormat:null!=(i=b.output_format)?i:void 0}}))}}}}};async function uo(e){if(!e)return;if("url"===e.type)return Ge(e.url);const t=e.data instanceof Uint8Array?e.data:Ae(e.data);return new Blob([t],{type:e.mediaType})}var co=Et((()=>bt(Lt.Ik({callId:Lt.Yj(),operation:Lt.gM("type",[Lt.Ik({type:Lt.eu("create_file"),path:Lt.Yj(),diff:Lt.Yj()}),Lt.Ik({type:Lt.eu("delete_file"),path:Lt.Yj()}),Lt.Ik({type:Lt.eu("update_file"),path:Lt.Yj(),diff:Lt.Yj()})])})))),ho=Et((()=>bt(Lt.Ik({status:Lt.k5(["completed","failed"]),output:Lt.Yj().optional()})))),fo=(Et((()=>bt(Lt.Ik({})))),Ft({id:"openai.apply_patch",inputSchema:co,outputSchema:ho})),go=Et((()=>bt(Lt.Ik({code:Lt.Yj().nullish(),containerId:Lt.Yj()})))),mo=Et((()=>bt(Lt.Ik({outputs:Lt.YO(Lt.gM("type",[Lt.Ik({type:Lt.eu("logs"),logs:Lt.Yj()}),Lt.Ik({type:Lt.eu("image"),url:Lt.Yj()})])).nullish()})))),yo=Et((()=>bt(Lt.Ik({container:Lt.KC([Lt.Yj(),Lt.Ik({fileIds:Lt.YO(Lt.Yj()).optional()})]).optional()})))),vo=Ft({id:"openai.code_interpreter",inputSchema:go,outputSchema:mo}),Co=Lt.Ik({key:Lt.Yj(),type:Lt.k5(["eq","ne","gt","gte","lt","lte","in","nin"]),value:Lt.KC([Lt.Yj(),Lt.ai(),Lt.zM(),Lt.YO(Lt.Yj())])}),wo=Lt.Ik({type:Lt.k5(["and","or"]),filters:Lt.YO(Lt.KC([Co,Lt.RZ((()=>wo))]))}),Eo=Et((()=>bt(Lt.Ik({vectorStoreIds:Lt.YO(Lt.Yj()),maxNumResults:Lt.ai().optional(),ranking:Lt.Ik({ranker:Lt.Yj().optional(),scoreThreshold:Lt.ai().optional()}).optional(),filters:Lt.KC([Co,wo]).optional()})))),_o=Et((()=>bt(Lt.Ik({queries:Lt.YO(Lt.Yj()),results:Lt.YO(Lt.Ik({attributes:Lt.g1(Lt.Yj(),Lt.L5()),fileId:Lt.Yj(),filename:Lt.Yj(),score:Lt.ai(),text:Lt.Yj()})).nullable()})))),bo=Ft({id:"openai.file_search",inputSchema:Lt.Ik({}),outputSchema:_o}),Ro=Et((()=>bt(Lt.Ik({background:Lt.k5(["auto","opaque","transparent"]).optional(),inputFidelity:Lt.k5(["low","high"]).optional(),inputImageMask:Lt.Ik({fileId:Lt.Yj().optional(),imageUrl:Lt.Yj().optional()}).optional(),model:Lt.Yj().optional(),moderation:Lt.k5(["auto"]).optional(),outputCompression:Lt.ai().int().min(0).max(100).optional(),outputFormat:Lt.k5(["png","jpeg","webp"]).optional(),partialImages:Lt.ai().int().min(0).max(3).optional(),quality:Lt.k5(["auto","low","medium","high"]).optional(),size:Lt.k5(["1024x1024","1024x1536","1536x1024","auto"]).optional()}).strict()))),So=Ft({id:"openai.image_generation",inputSchema:Et((()=>bt(Lt.Ik({})))),outputSchema:Et((()=>bt(Lt.Ik({result:Lt.Yj()}))))}),Oo=Et((()=>bt(Lt.Ik({action:Lt.Ik({type:Lt.eu("exec"),command:Lt.YO(Lt.Yj()),timeoutMs:Lt.ai().optional(),user:Lt.Yj().optional(),workingDirectory:Lt.Yj().optional(),env:Lt.g1(Lt.Yj(),Lt.Yj()).optional()})})))),To=Et((()=>bt(Lt.Ik({output:Lt.Yj()})))),Po=Ft({id:"openai.local_shell",inputSchema:Oo,outputSchema:To}),Ao=Et((()=>bt(Lt.Ik({action:Lt.Ik({commands:Lt.YO(Lt.Yj()),timeoutMs:Lt.ai().optional(),maxOutputLength:Lt.ai().optional()})})))),Io=Et((()=>bt(Lt.Ik({output:Lt.YO(Lt.Ik({stdout:Lt.Yj(),stderr:Lt.Yj(),outcome:Lt.gM("type",[Lt.Ik({type:Lt.eu("timeout")}),Lt.Ik({type:Lt.eu("exit"),exitCode:Lt.ai()})])}))})))),Do=Ft({id:"openai.shell",inputSchema:Ao,outputSchema:Io}),No=Et((()=>bt(Lt.Ik({externalWebAccess:Lt.zM().optional(),filters:Lt.Ik({allowedDomains:Lt.YO(Lt.Yj()).optional()}).optional(),searchContextSize:Lt.k5(["low","medium","high"]).optional(),userLocation:Lt.Ik({type:Lt.eu("approximate"),country:Lt.Yj().optional(),city:Lt.Yj().optional(),region:Lt.Yj().optional(),timezone:Lt.Yj().optional()}).optional()})))),xo=Ft({id:"openai.web_search",inputSchema:Et((()=>bt(Lt.Ik({})))),outputSchema:Et((()=>bt(Lt.Ik({action:Lt.gM("type",[Lt.Ik({type:Lt.eu("search"),query:Lt.Yj().optional()}),Lt.Ik({type:Lt.eu("openPage"),url:Lt.Yj().nullish()}),Lt.Ik({type:Lt.eu("findInPage"),url:Lt.Yj().nullish(),pattern:Lt.Yj().nullish()})]),sources:Lt.YO(Lt.gM("type",[Lt.Ik({type:Lt.eu("url"),url:Lt.Yj()}),Lt.Ik({type:Lt.eu("api"),name:Lt.Yj()})])).optional()}))))}),Fo=Et((()=>bt(Lt.Ik({searchContextSize:Lt.k5(["low","medium","high"]).optional(),userLocation:Lt.Ik({type:Lt.eu("approximate"),country:Lt.Yj().optional(),city:Lt.Yj().optional(),region:Lt.Yj().optional(),timezone:Lt.Yj().optional()}).optional()})))),Mo=Ft({id:"openai.web_search_preview",inputSchema:Et((()=>bt(Lt.Ik({})))),outputSchema:Et((()=>bt(Lt.Ik({action:Lt.gM("type",[Lt.Ik({type:Lt.eu("search"),query:Lt.Yj().optional()}),Lt.Ik({type:Lt.eu("openPage"),url:Lt.Yj().nullish()}),Lt.Ik({type:Lt.eu("findInPage"),url:Lt.Yj().nullish(),pattern:Lt.Yj().nullish()})])}))))}),ko=Lt.RZ((()=>Lt.KC([Lt.Yj(),Lt.ai(),Lt.zM(),Lt.ch(),Lt.YO(ko),Lt.g1(Lt.Yj(),ko)]))),Lo=Et((()=>bt(Lt.Ik({serverLabel:Lt.Yj(),allowedTools:Lt.KC([Lt.YO(Lt.Yj()),Lt.Ik({readOnly:Lt.zM().optional(),toolNames:Lt.YO(Lt.Yj()).optional()})]).optional(),authorization:Lt.Yj().optional(),connectorId:Lt.Yj().optional(),headers:Lt.g1(Lt.Yj(),Lt.Yj()).optional(),requireApproval:Lt.KC([Lt.k5(["always","never"]),Lt.Ik({never:Lt.Ik({toolNames:Lt.YO(Lt.Yj()).optional()}).optional()})]).optional(),serverDescription:Lt.Yj().optional(),serverUrl:Lt.Yj().optional()}).refine((e=>null!=e.serverUrl||null!=e.connectorId),"One of serverUrl or connectorId must be provided.")))),Go=Ft({id:"openai.mcp",inputSchema:Et((()=>bt(Lt.Ik({})))),outputSchema:Et((()=>bt(Lt.Ik({type:Lt.eu("call"),serverLabel:Lt.Yj(),name:Lt.Yj(),arguments:Lt.Yj(),output:Lt.Yj().nullish(),error:Lt.KC([Lt.Yj(),ko]).optional()}))))}),jo={applyPatch:fo,codeInterpreter:(e={})=>vo(e),fileSearch:bo,imageGeneration:(e={})=>So(e),localShell:Po,shell:Do,webSearchPreview:Mo,webSearch:(e={})=>xo(e),mcp:e=>Go(e)};function Wo(e){var t,o,r,n;if(null==e)return{inputTokens:{total:void 0,noCache:void 0,cacheRead:void 0,cacheWrite:void 0},outputTokens:{total:void 0,text:void 0,reasoning:void 0},raw:void 0};const i=e.input_tokens,s=e.output_tokens,a=null!=(o=null==(t=e.input_tokens_details)?void 0:t.cached_tokens)?o:0,l=null!=(n=null==(r=e.output_tokens_details)?void 0:r.reasoning_tokens)?n:0;return{inputTokens:{total:i,noCache:i-a,cacheRead:a,cacheWrite:void 0},outputTokens:{total:s,text:s-l,reasoning:l},raw:e}}function Vo(e,t){return!!t&&t.some((t=>e.startsWith(t)))}var Ho=Lt.Ik({itemId:Lt.Yj().nullish(),reasoningEncryptedContent:Lt.Yj().nullish()});function Bo({finishReason:e,hasFunctionCall:t}){switch(e){case void 0:case null:return t?"tool-calls":"stop";case"max_output_tokens":return"length";case"content_filter":return"content-filter";default:return t?"tool-calls":"other"}}var zo=Et((()=>bt(Lt.KC([Lt.Ik({type:Lt.eu("response.output_text.delta"),item_id:Lt.Yj(),delta:Lt.Yj(),logprobs:Lt.YO(Lt.Ik({token:Lt.Yj(),logprob:Lt.ai(),top_logprobs:Lt.YO(Lt.Ik({token:Lt.Yj(),logprob:Lt.ai()}))})).nullish()}),Lt.Ik({type:Lt.k5(["response.completed","response.incomplete"]),response:Lt.Ik({incomplete_details:Lt.Ik({reason:Lt.Yj()}).nullish(),usage:Lt.Ik({input_tokens:Lt.ai(),input_tokens_details:Lt.Ik({cached_tokens:Lt.ai().nullish()}).nullish(),output_tokens:Lt.ai(),output_tokens_details:Lt.Ik({reasoning_tokens:Lt.ai().nullish()}).nullish()}),service_tier:Lt.Yj().nullish()})}),Lt.Ik({type:Lt.eu("response.created"),response:Lt.Ik({id:Lt.Yj(),created_at:Lt.ai(),model:Lt.Yj(),service_tier:Lt.Yj().nullish()})}),Lt.Ik({type:Lt.eu("response.output_item.added"),output_index:Lt.ai(),item:Lt.gM("type",[Lt.Ik({type:Lt.eu("message"),id:Lt.Yj()}),Lt.Ik({type:Lt.eu("reasoning"),id:Lt.Yj(),encrypted_content:Lt.Yj().nullish()}),Lt.Ik({type:Lt.eu("function_call"),id:Lt.Yj(),call_id:Lt.Yj(),name:Lt.Yj(),arguments:Lt.Yj()}),Lt.Ik({type:Lt.eu("web_search_call"),id:Lt.Yj(),status:Lt.Yj()}),Lt.Ik({type:Lt.eu("computer_call"),id:Lt.Yj(),status:Lt.Yj()}),Lt.Ik({type:Lt.eu("file_search_call"),id:Lt.Yj()}),Lt.Ik({type:Lt.eu("image_generation_call"),id:Lt.Yj()}),Lt.Ik({type:Lt.eu("code_interpreter_call"),id:Lt.Yj(),container_id:Lt.Yj(),code:Lt.Yj().nullable(),outputs:Lt.YO(Lt.gM("type",[Lt.Ik({type:Lt.eu("logs"),logs:Lt.Yj()}),Lt.Ik({type:Lt.eu("image"),url:Lt.Yj()})])).nullable(),status:Lt.Yj()}),Lt.Ik({type:Lt.eu("mcp_call"),id:Lt.Yj(),status:Lt.Yj(),approval_request_id:Lt.Yj().nullish()}),Lt.Ik({type:Lt.eu("mcp_list_tools"),id:Lt.Yj()}),Lt.Ik({type:Lt.eu("mcp_approval_request"),id:Lt.Yj()}),Lt.Ik({type:Lt.eu("apply_patch_call"),id:Lt.Yj(),call_id:Lt.Yj(),status:Lt.k5(["in_progress","completed"]),operation:Lt.gM("type",[Lt.Ik({type:Lt.eu("create_file"),path:Lt.Yj(),diff:Lt.Yj()}),Lt.Ik({type:Lt.eu("delete_file"),path:Lt.Yj()}),Lt.Ik({type:Lt.eu("update_file"),path:Lt.Yj(),diff:Lt.Yj()})])}),Lt.Ik({type:Lt.eu("shell_call"),id:Lt.Yj(),call_id:Lt.Yj(),status:Lt.k5(["in_progress","completed","incomplete"]),action:Lt.Ik({commands:Lt.YO(Lt.Yj())})})])}),Lt.Ik({type:Lt.eu("response.output_item.done"),output_index:Lt.ai(),item:Lt.gM("type",[Lt.Ik({type:Lt.eu("message"),id:Lt.Yj()}),Lt.Ik({type:Lt.eu("reasoning"),id:Lt.Yj(),encrypted_content:Lt.Yj().nullish()}),Lt.Ik({type:Lt.eu("function_call"),id:Lt.Yj(),call_id:Lt.Yj(),name:Lt.Yj(),arguments:Lt.Yj(),status:Lt.eu("completed")}),Lt.Ik({type:Lt.eu("code_interpreter_call"),id:Lt.Yj(),code:Lt.Yj().nullable(),container_id:Lt.Yj(),outputs:Lt.YO(Lt.gM("type",[Lt.Ik({type:Lt.eu("logs"),logs:Lt.Yj()}),Lt.Ik({type:Lt.eu("image"),url:Lt.Yj()})])).nullable()}),Lt.Ik({type:Lt.eu("image_generation_call"),id:Lt.Yj(),result:Lt.Yj()}),Lt.Ik({type:Lt.eu("web_search_call"),id:Lt.Yj(),status:Lt.Yj(),action:Lt.gM("type",[Lt.Ik({type:Lt.eu("search"),query:Lt.Yj().nullish(),sources:Lt.YO(Lt.gM("type",[Lt.Ik({type:Lt.eu("url"),url:Lt.Yj()}),Lt.Ik({type:Lt.eu("api"),name:Lt.Yj()})])).nullish()}),Lt.Ik({type:Lt.eu("open_page"),url:Lt.Yj().nullish()}),Lt.Ik({type:Lt.eu("find_in_page"),url:Lt.Yj().nullish(),pattern:Lt.Yj().nullish()})])}),Lt.Ik({type:Lt.eu("file_search_call"),id:Lt.Yj(),queries:Lt.YO(Lt.Yj()),results:Lt.YO(Lt.Ik({attributes:Lt.g1(Lt.Yj(),Lt.KC([Lt.Yj(),Lt.ai(),Lt.zM()])),file_id:Lt.Yj(),filename:Lt.Yj(),score:Lt.ai(),text:Lt.Yj()})).nullish()}),Lt.Ik({type:Lt.eu("local_shell_call"),id:Lt.Yj(),call_id:Lt.Yj(),action:Lt.Ik({type:Lt.eu("exec"),command:Lt.YO(Lt.Yj()),timeout_ms:Lt.ai().optional(),user:Lt.Yj().optional(),working_directory:Lt.Yj().optional(),env:Lt.g1(Lt.Yj(),Lt.Yj()).optional()})}),Lt.Ik({type:Lt.eu("computer_call"),id:Lt.Yj(),status:Lt.eu("completed")}),Lt.Ik({type:Lt.eu("mcp_call"),id:Lt.Yj(),status:Lt.Yj(),arguments:Lt.Yj(),name:Lt.Yj(),server_label:Lt.Yj(),output:Lt.Yj().nullish(),error:Lt.KC([Lt.Yj(),Lt.Ik({type:Lt.Yj().optional(),code:Lt.KC([Lt.ai(),Lt.Yj()]).optional(),message:Lt.Yj().optional()}).loose()]).nullish(),approval_request_id:Lt.Yj().nullish()}),Lt.Ik({type:Lt.eu("mcp_list_tools"),id:Lt.Yj(),server_label:Lt.Yj(),tools:Lt.YO(Lt.Ik({name:Lt.Yj(),description:Lt.Yj().optional(),input_schema:Lt.bz(),annotations:Lt.g1(Lt.Yj(),Lt.L5()).optional()})),error:Lt.KC([Lt.Yj(),Lt.Ik({type:Lt.Yj().optional(),code:Lt.KC([Lt.ai(),Lt.Yj()]).optional(),message:Lt.Yj().optional()}).loose()]).optional()}),Lt.Ik({type:Lt.eu("mcp_approval_request"),id:Lt.Yj(),server_label:Lt.Yj(),name:Lt.Yj(),arguments:Lt.Yj(),approval_request_id:Lt.Yj().optional()}),Lt.Ik({type:Lt.eu("apply_patch_call"),id:Lt.Yj(),call_id:Lt.Yj(),status:Lt.k5(["in_progress","completed"]),operation:Lt.gM("type",[Lt.Ik({type:Lt.eu("create_file"),path:Lt.Yj(),diff:Lt.Yj()}),Lt.Ik({type:Lt.eu("delete_file"),path:Lt.Yj()}),Lt.Ik({type:Lt.eu("update_file"),path:Lt.Yj(),diff:Lt.Yj()})])}),Lt.Ik({type:Lt.eu("shell_call"),id:Lt.Yj(),call_id:Lt.Yj(),status:Lt.k5(["in_progress","completed","incomplete"]),action:Lt.Ik({commands:Lt.YO(Lt.Yj())})})])}),Lt.Ik({type:Lt.eu("response.function_call_arguments.delta"),item_id:Lt.Yj(),output_index:Lt.ai(),delta:Lt.Yj()}),Lt.Ik({type:Lt.eu("response.image_generation_call.partial_image"),item_id:Lt.Yj(),output_index:Lt.ai(),partial_image_b64:Lt.Yj()}),Lt.Ik({type:Lt.eu("response.code_interpreter_call_code.delta"),item_id:Lt.Yj(),output_index:Lt.ai(),delta:Lt.Yj()}),Lt.Ik({type:Lt.eu("response.code_interpreter_call_code.done"),item_id:Lt.Yj(),output_index:Lt.ai(),code:Lt.Yj()}),Lt.Ik({type:Lt.eu("response.output_text.annotation.added"),annotation:Lt.gM("type",[Lt.Ik({type:Lt.eu("url_citation"),start_index:Lt.ai(),end_index:Lt.ai(),url:Lt.Yj(),title:Lt.Yj()}),Lt.Ik({type:Lt.eu("file_citation"),file_id:Lt.Yj(),filename:Lt.Yj(),index:Lt.ai()}),Lt.Ik({type:Lt.eu("container_file_citation"),container_id:Lt.Yj(),file_id:Lt.Yj(),filename:Lt.Yj(),start_index:Lt.ai(),end_index:Lt.ai()}),Lt.Ik({type:Lt.eu("file_path"),file_id:Lt.Yj(),index:Lt.ai()})])}),Lt.Ik({type:Lt.eu("response.reasoning_summary_part.added"),item_id:Lt.Yj(),summary_index:Lt.ai()}),Lt.Ik({type:Lt.eu("response.reasoning_summary_text.delta"),item_id:Lt.Yj(),summary_index:Lt.ai(),delta:Lt.Yj()}),Lt.Ik({type:Lt.eu("response.reasoning_summary_part.done"),item_id:Lt.Yj(),summary_index:Lt.ai()}),Lt.Ik({type:Lt.eu("response.apply_patch_call_operation_diff.delta"),item_id:Lt.Yj(),output_index:Lt.ai(),delta:Lt.Yj(),obfuscation:Lt.Yj().nullish()}),Lt.Ik({type:Lt.eu("response.apply_patch_call_operation_diff.done"),item_id:Lt.Yj(),output_index:Lt.ai(),diff:Lt.Yj()}),Lt.Ik({type:Lt.eu("error"),sequence_number:Lt.ai(),error:Lt.Ik({type:Lt.Yj(),code:Lt.Yj(),message:Lt.Yj(),param:Lt.Yj().nullish()})}),Lt.Ik({type:Lt.Yj()}).loose().transform((e=>({type:"unknown_chunk",message:e.type})))])))),Uo=Et((()=>bt(Lt.Ik({id:Lt.Yj().optional(),created_at:Lt.ai().optional(),error:Lt.Ik({message:Lt.Yj(),type:Lt.Yj(),param:Lt.Yj().nullish(),code:Lt.Yj()}).nullish(),model:Lt.Yj().optional(),output:Lt.YO(Lt.gM("type",[Lt.Ik({type:Lt.eu("message"),role:Lt.eu("assistant"),id:Lt.Yj(),content:Lt.YO(Lt.Ik({type:Lt.eu("output_text"),text:Lt.Yj(),logprobs:Lt.YO(Lt.Ik({token:Lt.Yj(),logprob:Lt.ai(),top_logprobs:Lt.YO(Lt.Ik({token:Lt.Yj(),logprob:Lt.ai()}))})).nullish(),annotations:Lt.YO(Lt.gM("type",[Lt.Ik({type:Lt.eu("url_citation"),start_index:Lt.ai(),end_index:Lt.ai(),url:Lt.Yj(),title:Lt.Yj()}),Lt.Ik({type:Lt.eu("file_citation"),file_id:Lt.Yj(),filename:Lt.Yj(),index:Lt.ai()}),Lt.Ik({type:Lt.eu("container_file_citation"),container_id:Lt.Yj(),file_id:Lt.Yj(),filename:Lt.Yj(),start_index:Lt.ai(),end_index:Lt.ai()}),Lt.Ik({type:Lt.eu("file_path"),file_id:Lt.Yj(),index:Lt.ai()})]))}))}),Lt.Ik({type:Lt.eu("web_search_call"),id:Lt.Yj(),status:Lt.Yj(),action:Lt.gM("type",[Lt.Ik({type:Lt.eu("search"),query:Lt.Yj().nullish(),sources:Lt.YO(Lt.gM("type",[Lt.Ik({type:Lt.eu("url"),url:Lt.Yj()}),Lt.Ik({type:Lt.eu("api"),name:Lt.Yj()})])).nullish()}),Lt.Ik({type:Lt.eu("open_page"),url:Lt.Yj().nullish()}),Lt.Ik({type:Lt.eu("find_in_page"),url:Lt.Yj().nullish(),pattern:Lt.Yj().nullish()})])}),Lt.Ik({type:Lt.eu("file_search_call"),id:Lt.Yj(),queries:Lt.YO(Lt.Yj()),results:Lt.YO(Lt.Ik({attributes:Lt.g1(Lt.Yj(),Lt.KC([Lt.Yj(),Lt.ai(),Lt.zM()])),file_id:Lt.Yj(),filename:Lt.Yj(),score:Lt.ai(),text:Lt.Yj()})).nullish()}),Lt.Ik({type:Lt.eu("code_interpreter_call"),id:Lt.Yj(),code:Lt.Yj().nullable(),container_id:Lt.Yj(),outputs:Lt.YO(Lt.gM("type",[Lt.Ik({type:Lt.eu("logs"),logs:Lt.Yj()}),Lt.Ik({type:Lt.eu("image"),url:Lt.Yj()})])).nullable()}),Lt.Ik({type:Lt.eu("image_generation_call"),id:Lt.Yj(),result:Lt.Yj()}),Lt.Ik({type:Lt.eu("local_shell_call"),id:Lt.Yj(),call_id:Lt.Yj(),action:Lt.Ik({type:Lt.eu("exec"),command:Lt.YO(Lt.Yj()),timeout_ms:Lt.ai().optional(),user:Lt.Yj().optional(),working_directory:Lt.Yj().optional(),env:Lt.g1(Lt.Yj(),Lt.Yj()).optional()})}),Lt.Ik({type:Lt.eu("function_call"),call_id:Lt.Yj(),name:Lt.Yj(),arguments:Lt.Yj(),id:Lt.Yj()}),Lt.Ik({type:Lt.eu("computer_call"),id:Lt.Yj(),status:Lt.Yj().optional()}),Lt.Ik({type:Lt.eu("reasoning"),id:Lt.Yj(),encrypted_content:Lt.Yj().nullish(),summary:Lt.YO(Lt.Ik({type:Lt.eu("summary_text"),text:Lt.Yj()}))}),Lt.Ik({type:Lt.eu("mcp_call"),id:Lt.Yj(),status:Lt.Yj(),arguments:Lt.Yj(),name:Lt.Yj(),server_label:Lt.Yj(),output:Lt.Yj().nullish(),error:Lt.KC([Lt.Yj(),Lt.Ik({type:Lt.Yj().optional(),code:Lt.KC([Lt.ai(),Lt.Yj()]).optional(),message:Lt.Yj().optional()}).loose()]).nullish(),approval_request_id:Lt.Yj().nullish()}),Lt.Ik({type:Lt.eu("mcp_list_tools"),id:Lt.Yj(),server_label:Lt.Yj(),tools:Lt.YO(Lt.Ik({name:Lt.Yj(),description:Lt.Yj().optional(),input_schema:Lt.bz(),annotations:Lt.g1(Lt.Yj(),Lt.L5()).optional()})),error:Lt.KC([Lt.Yj(),Lt.Ik({type:Lt.Yj().optional(),code:Lt.KC([Lt.ai(),Lt.Yj()]).optional(),message:Lt.Yj().optional()}).loose()]).optional()}),Lt.Ik({type:Lt.eu("mcp_approval_request"),id:Lt.Yj(),server_label:Lt.Yj(),name:Lt.Yj(),arguments:Lt.Yj(),approval_request_id:Lt.Yj().optional()}),Lt.Ik({type:Lt.eu("apply_patch_call"),id:Lt.Yj(),call_id:Lt.Yj(),status:Lt.k5(["in_progress","completed"]),operation:Lt.gM("type",[Lt.Ik({type:Lt.eu("create_file"),path:Lt.Yj(),diff:Lt.Yj()}),Lt.Ik({type:Lt.eu("delete_file"),path:Lt.Yj()}),Lt.Ik({type:Lt.eu("update_file"),path:Lt.Yj(),diff:Lt.Yj()})])}),Lt.Ik({type:Lt.eu("shell_call"),id:Lt.Yj(),call_id:Lt.Yj(),status:Lt.k5(["in_progress","completed","incomplete"]),action:Lt.Ik({commands:Lt.YO(Lt.Yj())})})])).optional(),service_tier:Lt.Yj().nullish(),incomplete_details:Lt.Ik({reason:Lt.Yj()}).nullish(),usage:Lt.Ik({input_tokens:Lt.ai(),input_tokens_details:Lt.Ik({cached_tokens:Lt.ai().nullish()}).nullish(),output_tokens:Lt.ai(),output_tokens_details:Lt.Ik({reasoning_tokens:Lt.ai().nullish()}).nullish()}).optional()})))),Yo=Et((()=>bt(Lt.Ik({conversation:Lt.Yj().nullish(),include:Lt.YO(Lt.k5(["reasoning.encrypted_content","file_search_call.results","message.output_text.logprobs"])).nullish(),instructions:Lt.Yj().nullish(),logprobs:Lt.KC([Lt.zM(),Lt.ai().min(1).max(20)]).optional(),maxToolCalls:Lt.ai().nullish(),metadata:Lt.bz().nullish(),parallelToolCalls:Lt.zM().nullish(),previousResponseId:Lt.Yj().nullish(),promptCacheKey:Lt.Yj().nullish(),promptCacheRetention:Lt.k5(["in_memory","24h"]).nullish(),reasoningEffort:Lt.Yj().nullish(),reasoningSummary:Lt.Yj().nullish(),safetyIdentifier:Lt.Yj().nullish(),serviceTier:Lt.k5(["auto","flex","priority","default"]).nullish(),store:Lt.zM().nullish(),strictJsonSchema:Lt.zM().nullish(),textVerbosity:Lt.k5(["low","medium","high"]).nullish(),truncation:Lt.k5(["auto","disabled"]).nullish(),user:Lt.Yj().nullish(),systemMessageMode:Lt.k5(["system","developer","remove"]).optional(),forceReasoning:Lt.zM().optional()}))));function qo(e){var t,o;const r={};for(const n of e)if("assistant"===n.role)for(const e of n.content){if("tool-call"!==e.type)continue;const n=null==(o=null==(t=e.providerOptions)?void 0:t.openai)?void 0:o.approvalRequestId;null!=n&&(r[n]=e.toolCallId)}return r}var $o=class{constructor(e,t){this.specificationVersion="v3",this.supportedUrls={"image/*":[/^https?:\/\/.*$/],"application/pdf":[/^https?:\/\/.*$/]},this.modelId=e,this.config=t}get provider(){return this.config.provider}async getArgs({maxOutputTokens:e,temperature:t,stopSequences:o,topP:r,topK:n,presencePenalty:i,frequencyPenalty:s,seed:a,prompt:l,providerOptions:p,tools:u,toolChoice:d,responseFormat:c}){var h,f,g,m,y,v;const C=[],w=Ht(this.modelId);null!=n&&C.push({type:"unsupported",feature:"topK"}),null!=a&&C.push({type:"unsupported",feature:"seed"}),null!=i&&C.push({type:"unsupported",feature:"presencePenalty"}),null!=s&&C.push({type:"unsupported",feature:"frequencyPenalty"}),null!=o&&C.push({type:"unsupported",feature:"stopSequences"});const E=this.config.provider.includes("azure")?"azure":"openai";let _=await At({provider:E,providerOptions:p,schema:Yo});null==_&&"openai"!==E&&(_=await At({provider:"openai",providerOptions:p,schema:Yo}));const b=null!=(h=null==_?void 0:_.forceReasoning)?h:w.isReasoningModel;(null==_?void 0:_.conversation)&&(null==_?void 0:_.previousResponseId)&&C.push({type:"unsupported",feature:"conversation",details:"conversation and previousResponseId cannot be used together"});const R=function({tools:e=[],providerToolNames:t}){const o={},r={};for(const n of e)if("provider"===n.type&&n.id in t){const e=t[n.id];o[n.name]=e,r[e]=n.name}return{toProviderToolName:e=>{var t;return null!=(t=o[e])?t:e},toCustomToolName:e=>{var t;return null!=(t=r[e])?t:e}}}({tools:u,providerToolNames:{"openai.code_interpreter":"code_interpreter","openai.file_search":"file_search","openai.image_generation":"image_generation","openai.local_shell":"local_shell","openai.shell":"shell","openai.web_search":"web_search","openai.web_search_preview":"web_search_preview","openai.mcp":"mcp","openai.apply_patch":"apply_patch"}}),{input:S,warnings:O}=await async function({prompt:e,toolNameMapping:t,systemMessageMode:o,providerOptionsName:r,fileIdPrefixes:n,store:i,hasLocalShellTool:s=!1,hasShellTool:a=!1,hasApplyPatchTool:l=!1}){var p,u,d,c,h,f,g,m,y,v,C,w,E;const _=[],b=[],R=new Set;for(const{role:S,content:O}of e)switch(S){case"system":switch(o){case"system":_.push({role:"system",content:O});break;case"developer":_.push({role:"developer",content:O});break;case"remove":b.push({type:"other",message:"system messages are removed for this model"});break;default:throw new Error(`Unsupported system message mode: ${o}`)}break;case"user":_.push({role:"user",content:O.map(((e,t)=>{var o,i,s;switch(e.type){case"text":return{type:"input_text",text:e.text};case"file":if(e.mediaType.startsWith("image/")){const t="image/*"===e.mediaType?"image/jpeg":e.mediaType;return{type:"input_image",...e.data instanceof jt?{image_url:e.data.toString()}:"string"==typeof e.data&&Vo(e.data,n)?{file_id:e.data}:{image_url:`data:${t};base64,${Ie(e.data)}`},detail:null==(i=null==(o=e.providerOptions)?void 0:o[r])?void 0:i.imageDetail}}if("application/pdf"===e.mediaType)return e.data instanceof jt?{type:"input_file",file_url:e.data.toString()}:{type:"input_file",..."string"==typeof e.data&&Vo(e.data,n)?{file_id:e.data}:{filename:null!=(s=e.filename)?s:`part-${t}.pdf`,file_data:`data:application/pdf;base64,${Ie(e.data)}`}};throw new Ce({functionality:`file part media type ${e.mediaType}`})}}))});break;case"assistant":{const e={};for(const o of O)switch(o.type){case"text":{const e=null==(u=null==(p=o.providerOptions)?void 0:p[r])?void 0:u.itemId;if(i&&null!=e){_.push({type:"item_reference",id:e});break}_.push({role:"assistant",content:[{type:"output_text",text:o.text}],id:e});break}case"tool-call":{const e=null!=(g=null==(c=null==(d=o.providerOptions)?void 0:d[r])?void 0:c.itemId)?g:null==(f=null==(h=o.providerMetadata)?void 0:h[r])?void 0:f.itemId;if(o.providerExecuted){i&&null!=e&&_.push({type:"item_reference",id:e});break}if(i&&null!=e){_.push({type:"item_reference",id:e});break}const n=t.toProviderToolName(o.toolName);if(s&&"local_shell"===n){const t=await Rt({value:o.input,schema:Oo});_.push({type:"local_shell_call",call_id:o.toolCallId,id:e,action:{type:"exec",command:t.action.command,timeout_ms:t.action.timeoutMs,user:t.action.user,working_directory:t.action.workingDirectory,env:t.action.env}});break}if(a&&"shell"===n){const t=await Rt({value:o.input,schema:Ao});_.push({type:"shell_call",call_id:o.toolCallId,id:e,status:"completed",action:{commands:t.action.commands,timeout_ms:t.action.timeoutMs,max_output_length:t.action.maxOutputLength}});break}_.push({type:"function_call",call_id:o.toolCallId,name:n,arguments:JSON.stringify(o.input),id:e});break}case"tool-result":if("execution-denied"===o.output.type||"json"===o.output.type&&"object"==typeof o.output.value&&null!=o.output.value&&"type"in o.output.value&&"execution-denied"===o.output.value.type)break;if(i){const e=null!=(v=null==(y=null==(m=o.providerMetadata)?void 0:m[r])?void 0:y.itemId)?v:o.toolCallId;_.push({type:"item_reference",id:e})}else b.push({type:"other",message:`Results for OpenAI tool ${o.toolName} are not sent to the API when store is false`});break;case"reasoning":{const t=await At({provider:r,providerOptions:o.providerOptions,schema:Ho}),n=null==t?void 0:t.itemId;if(null!=n){const r=e[n];if(i)void 0===r&&(_.push({type:"item_reference",id:n}),e[n]={type:"reasoning",id:n,summary:[]});else{const i=[];o.text.length>0?i.push({type:"summary_text",text:o.text}):void 0!==r&&b.push({type:"other",message:`Cannot append empty reasoning part to existing reasoning sequence. Skipping reasoning part: ${JSON.stringify(o)}.`}),void 0===r?(e[n]={type:"reasoning",id:n,encrypted_content:null==t?void 0:t.reasoningEncryptedContent,summary:i},_.push(e[n])):(r.summary.push(...i),null!=(null==t?void 0:t.reasoningEncryptedContent)&&(r.encrypted_content=t.reasoningEncryptedContent))}}else b.push({type:"other",message:`Non-OpenAI reasoning parts are not supported. Skipping reasoning part: ${JSON.stringify(o)}.`});break}}break}case"tool":for(const e of O){if("tool-approval-response"===e.type){const t=e;if(R.has(t.approvalId))continue;R.add(t.approvalId),i&&_.push({type:"item_reference",id:t.approvalId}),_.push({type:"mcp_approval_response",approval_request_id:t.approvalId,approve:t.approved});continue}const o=e.output;if("execution-denied"===o.type&&(null==(w=null==(C=o.providerOptions)?void 0:C.openai)?void 0:w.approvalId))continue;const r=t.toProviderToolName(e.toolName);if(s&&"local_shell"===r&&"json"===o.type){const t=await Rt({value:o.value,schema:To});_.push({type:"local_shell_call_output",call_id:e.toolCallId,output:t.output});continue}if(a&&"shell"===r&&"json"===o.type){const t=await Rt({value:o.value,schema:Io});_.push({type:"shell_call_output",call_id:e.toolCallId,output:t.output.map((e=>({stdout:e.stdout,stderr:e.stderr,outcome:"timeout"===e.outcome.type?{type:"timeout"}:{type:"exit",exit_code:e.outcome.exitCode}})))});continue}if(l&&"apply_patch"===e.toolName&&"json"===o.type){const t=await Rt({value:o.value,schema:ho});_.push({type:"apply_patch_call_output",call_id:e.toolCallId,status:t.status,output:t.output});continue}let n;switch(o.type){case"text":case"error-text":n=o.value;break;case"execution-denied":n=null!=(E=o.reason)?E:"Tool execution denied.";break;case"json":case"error-json":n=JSON.stringify(o.value);break;case"content":n=o.value.map((e=>{var t;switch(e.type){case"text":return{type:"input_text",text:e.text};case"image-data":return{type:"input_image",image_url:`data:${e.mediaType};base64,${e.data}`};case"image-url":return{type:"input_image",image_url:e.url};case"file-data":return{type:"input_file",filename:null!=(t=e.filename)?t:"data",file_data:`data:${e.mediaType};base64,${e.data}`};default:return void b.push({type:"other",message:`unsupported tool content part type: ${e.type}`})}})).filter(ze)}_.push({type:"function_call_output",call_id:e.toolCallId,output:n})}break;default:throw new Error(`Unsupported role: ${S}`)}return{input:_,warnings:b}}({prompt:l,toolNameMapping:R,systemMessageMode:null!=(f=null==_?void 0:_.systemMessageMode)?f:b?"developer":w.systemMessageMode,providerOptionsName:E,fileIdPrefixes:this.config.fileIdPrefixes,store:null==(g=null==_?void 0:_.store)||g,hasLocalShellTool:I("openai.local_shell"),hasShellTool:I("openai.shell"),hasApplyPatchTool:I("openai.apply_patch")});C.push(...O);const T=null==(m=null==_?void 0:_.strictJsonSchema)||m;let P=null==_?void 0:_.include;function A(e){null==P?P=[e]:P.includes(e)||(P=[...P,e])}function I(e){return null!=(null==u?void 0:u.find((t=>"provider"===t.type&&t.id===e)))}const D="number"==typeof(null==_?void 0:_.logprobs)?null==_?void 0:_.logprobs:!0===(null==_?void 0:_.logprobs)?20:void 0;D&&A("message.output_text.logprobs");const N=null==(y=null==u?void 0:u.find((e=>"provider"===e.type&&("openai.web_search"===e.id||"openai.web_search_preview"===e.id))))?void 0:y.name;N&&A("web_search_call.action.sources"),I("openai.code_interpreter")&&A("code_interpreter_call.outputs");const x=null==_?void 0:_.store;!1===x&&b&&A("reasoning.encrypted_content");const F={model:this.modelId,input:S,temperature:t,top_p:r,max_output_tokens:e,...("json"===(null==c?void 0:c.type)||(null==_?void 0:_.textVerbosity))&&{text:{..."json"===(null==c?void 0:c.type)&&{format:null!=c.schema?{type:"json_schema",strict:T,name:null!=(v=c.name)?v:"response",description:c.description,schema:c.schema}:{type:"json_object"}},...(null==_?void 0:_.textVerbosity)&&{verbosity:_.textVerbosity}}},conversation:null==_?void 0:_.conversation,max_tool_calls:null==_?void 0:_.maxToolCalls,metadata:null==_?void 0:_.metadata,parallel_tool_calls:null==_?void 0:_.parallelToolCalls,previous_response_id:null==_?void 0:_.previousResponseId,store:x,user:null==_?void 0:_.user,instructions:null==_?void 0:_.instructions,service_tier:null==_?void 0:_.serviceTier,include:P,prompt_cache_key:null==_?void 0:_.promptCacheKey,prompt_cache_retention:null==_?void 0:_.promptCacheRetention,safety_identifier:null==_?void 0:_.safetyIdentifier,top_logprobs:D,truncation:null==_?void 0:_.truncation,...b&&(null!=(null==_?void 0:_.reasoningEffort)||null!=(null==_?void 0:_.reasoningSummary))&&{reasoning:{...null!=(null==_?void 0:_.reasoningEffort)&&{effort:_.reasoningEffort},...null!=(null==_?void 0:_.reasoningSummary)&&{summary:_.reasoningSummary}}}};b?"none"===(null==_?void 0:_.reasoningEffort)&&w.supportsNonReasoningParameters||(null!=F.temperature&&(F.temperature=void 0,C.push({type:"unsupported",feature:"temperature",details:"temperature is not supported for reasoning models"})),null!=F.top_p&&(F.top_p=void 0,C.push({type:"unsupported",feature:"topP",details:"topP is not supported for reasoning models"}))):(null!=(null==_?void 0:_.reasoningEffort)&&C.push({type:"unsupported",feature:"reasoningEffort",details:"reasoningEffort is not supported for non-reasoning models"}),null!=(null==_?void 0:_.reasoningSummary)&&C.push({type:"unsupported",feature:"reasoningSummary",details:"reasoningSummary is not supported for non-reasoning models"})),"flex"!==(null==_?void 0:_.serviceTier)||w.supportsFlexProcessing||(C.push({type:"unsupported",feature:"serviceTier",details:"flex processing is only available for o3, o4-mini, and gpt-5 models"}),delete F.service_tier),"priority"!==(null==_?void 0:_.serviceTier)||w.supportsPriorityProcessing||(C.push({type:"unsupported",feature:"serviceTier",details:"priority processing is only available for supported models (gpt-4, gpt-5, gpt-5-mini, o3, o4-mini) and requires Enterprise access. gpt-5-nano is not supported"}),delete F.service_tier);const{tools:M,toolChoice:k,toolWarnings:L}=await async function({tools:e,toolChoice:t}){const o=[];if(null==(e=(null==e?void 0:e.length)?e:void 0))return{tools:void 0,toolChoice:void 0,toolWarnings:o};const r=[];for(const t of e)switch(t.type){case"function":r.push({type:"function",name:t.name,description:t.description,parameters:t.inputSchema,...null!=t.strict?{strict:t.strict}:{}});break;case"provider":switch(t.id){case"openai.file_search":{const e=await Rt({value:t.args,schema:Eo});r.push({type:"file_search",vector_store_ids:e.vectorStoreIds,max_num_results:e.maxNumResults,ranking_options:e.ranking?{ranker:e.ranking.ranker,score_threshold:e.ranking.scoreThreshold}:void 0,filters:e.filters});break}case"openai.local_shell":r.push({type:"local_shell"});break;case"openai.shell":r.push({type:"shell"});break;case"openai.apply_patch":r.push({type:"apply_patch"});break;case"openai.web_search_preview":{const e=await Rt({value:t.args,schema:Fo});r.push({type:"web_search_preview",search_context_size:e.searchContextSize,user_location:e.userLocation});break}case"openai.web_search":{const e=await Rt({value:t.args,schema:No});r.push({type:"web_search",filters:null!=e.filters?{allowed_domains:e.filters.allowedDomains}:void 0,external_web_access:e.externalWebAccess,search_context_size:e.searchContextSize,user_location:e.userLocation});break}case"openai.code_interpreter":{const e=await Rt({value:t.args,schema:yo});r.push({type:"code_interpreter",container:null==e.container?{type:"auto",file_ids:void 0}:"string"==typeof e.container?e.container:{type:"auto",file_ids:e.container.fileIds}});break}case"openai.image_generation":{const e=await Rt({value:t.args,schema:Ro});r.push({type:"image_generation",background:e.background,input_fidelity:e.inputFidelity,input_image_mask:e.inputImageMask?{file_id:e.inputImageMask.fileId,image_url:e.inputImageMask.imageUrl}:void 0,model:e.model,moderation:e.moderation,partial_images:e.partialImages,quality:e.quality,output_compression:e.outputCompression,output_format:e.outputFormat,size:e.size});break}case"openai.mcp":{const e=await Rt({value:t.args,schema:Lo}),o=e=>({tool_names:e.toolNames}),n=e.requireApproval,i=null==n?void 0:"string"==typeof n?n:null!=n.never?{never:o(n.never)}:void 0;r.push({type:"mcp",server_label:e.serverLabel,allowed_tools:Array.isArray(e.allowedTools)?e.allowedTools:e.allowedTools?{read_only:e.allowedTools.readOnly,tool_names:e.allowedTools.toolNames}:void 0,authorization:e.authorization,connector_id:e.connectorId,headers:e.headers,require_approval:null!=i?i:"never",server_description:e.serverDescription,server_url:e.serverUrl});break}}break;default:o.push({type:"unsupported",feature:`function tool ${t}`})}if(null==t)return{tools:r,toolChoice:void 0,toolWarnings:o};const n=t.type;switch(n){case"auto":case"none":case"required":return{tools:r,toolChoice:n,toolWarnings:o};case"tool":return{tools:r,toolChoice:"code_interpreter"===t.toolName||"file_search"===t.toolName||"image_generation"===t.toolName||"web_search_preview"===t.toolName||"web_search"===t.toolName||"mcp"===t.toolName||"apply_patch"===t.toolName?{type:t.toolName}:{type:"function",name:t.toolName},toolWarnings:o};default:throw new Ce({functionality:`tool choice type: ${n}`})}}({tools:u,toolChoice:d});return{webSearchToolName:N,args:{...F,tools:M,tool_choice:k},warnings:[...C,...L],store:x,toolNameMapping:R,providerOptionsName:E}}async doGenerate(e){var t,o,r,n,i,s,a,l,p,u,d,c,h,f,m,y,v,C,w,E,_,b,R,S,O;const{args:T,warnings:P,webSearchToolName:A,toolNameMapping:I,providerOptionsName:D}=await this.getArgs(e),N=this.config.url({path:"/responses",modelId:this.modelId}),x=qo(e.prompt),{responseHeaders:F,value:M,rawValue:k}=await Dt({url:N,headers:Se(this.config.headers(),e.headers),body:T,failedResponseHandler:Vt,successfulResponseHandler:kt(Uo),abortSignal:e.abortSignal,fetch:this.config.fetch});if(M.error)throw new g({message:M.error.message,url:N,requestBodyValues:T,statusCode:400,responseHeaders:F,responseBody:k,isRetryable:!1});const L=[],G=[];let j=!1;for(const g of M.output)switch(g.type){case"reasoning":0===g.summary.length&&g.summary.push({type:"summary_text",text:""});for(const e of g.summary)L.push({type:"reasoning",text:e.text,providerMetadata:{[D]:{itemId:g.id,reasoningEncryptedContent:null!=(t=g.encrypted_content)?t:null}}});break;case"image_generation_call":L.push({type:"tool-call",toolCallId:g.id,toolName:I.toCustomToolName("image_generation"),input:"{}",providerExecuted:!0}),L.push({type:"tool-result",toolCallId:g.id,toolName:I.toCustomToolName("image_generation"),result:{result:g.result}});break;case"local_shell_call":L.push({type:"tool-call",toolCallId:g.call_id,toolName:I.toCustomToolName("local_shell"),input:JSON.stringify({action:g.action}),providerMetadata:{[D]:{itemId:g.id}}});break;case"shell_call":L.push({type:"tool-call",toolCallId:g.call_id,toolName:I.toCustomToolName("shell"),input:JSON.stringify({action:{commands:g.action.commands}}),providerMetadata:{[D]:{itemId:g.id}}});break;case"message":for(const t of g.content){(null==(r=null==(o=e.providerOptions)?void 0:o[D])?void 0:r.logprobs)&&t.logprobs&&G.push(t.logprobs);const y={itemId:g.id,...t.annotations.length>0&&{annotations:t.annotations}};L.push({type:"text",text:t.text,providerMetadata:{[D]:y}});for(const e of t.annotations)"url_citation"===e.type?L.push({type:"source",sourceType:"url",id:null!=(s=null==(i=(n=this.config).generateId)?void 0:i.call(n))?s:je(),url:e.url,title:e.title}):"file_citation"===e.type?L.push({type:"source",sourceType:"document",id:null!=(p=null==(l=(a=this.config).generateId)?void 0:l.call(a))?p:je(),mediaType:"text/plain",title:e.filename,filename:e.filename,providerMetadata:{[D]:{type:e.type,fileId:e.file_id,index:e.index}}}):"container_file_citation"===e.type?L.push({type:"source",sourceType:"document",id:null!=(c=null==(d=(u=this.config).generateId)?void 0:d.call(u))?c:je(),mediaType:"text/plain",title:e.filename,filename:e.filename,providerMetadata:{[D]:{type:e.type,fileId:e.file_id,containerId:e.container_id}}}):"file_path"===e.type&&L.push({type:"source",sourceType:"document",id:null!=(m=null==(f=(h=this.config).generateId)?void 0:f.call(h))?m:je(),mediaType:"application/octet-stream",title:e.file_id,filename:e.file_id,providerMetadata:{[D]:{type:e.type,fileId:e.file_id,index:e.index}}})}break;case"function_call":j=!0,L.push({type:"tool-call",toolCallId:g.call_id,toolName:g.name,input:g.arguments,providerMetadata:{[D]:{itemId:g.id}}});break;case"web_search_call":L.push({type:"tool-call",toolCallId:g.id,toolName:I.toCustomToolName(null!=A?A:"web_search"),input:JSON.stringify({}),providerExecuted:!0}),L.push({type:"tool-result",toolCallId:g.id,toolName:I.toCustomToolName(null!=A?A:"web_search"),result:Zo(g.action)});break;case"mcp_call":{const e=null!=g.approval_request_id&&null!=(y=x[g.approval_request_id])?y:g.id,t=`mcp.${g.name}`;L.push({type:"tool-call",toolCallId:e,toolName:t,input:g.arguments,providerExecuted:!0,dynamic:!0}),L.push({type:"tool-result",toolCallId:e,toolName:t,result:{type:"call",serverLabel:g.server_label,name:g.name,arguments:g.arguments,...null!=g.output?{output:g.output}:{},...null!=g.error?{error:g.error}:{}},providerMetadata:{[D]:{itemId:g.id}}});break}case"mcp_list_tools":break;case"mcp_approval_request":{const e=null!=(v=g.approval_request_id)?v:g.id,t=null!=(E=null==(w=(C=this.config).generateId)?void 0:w.call(C))?E:je(),o=`mcp.${g.name}`;L.push({type:"tool-call",toolCallId:t,toolName:o,input:g.arguments,providerExecuted:!0,dynamic:!0}),L.push({type:"tool-approval-request",approvalId:e,toolCallId:t});break}case"computer_call":L.push({type:"tool-call",toolCallId:g.id,toolName:I.toCustomToolName("computer_use"),input:"",providerExecuted:!0}),L.push({type:"tool-result",toolCallId:g.id,toolName:I.toCustomToolName("computer_use"),result:{type:"computer_use_tool_result",status:g.status||"completed"}});break;case"file_search_call":L.push({type:"tool-call",toolCallId:g.id,toolName:I.toCustomToolName("file_search"),input:"{}",providerExecuted:!0}),L.push({type:"tool-result",toolCallId:g.id,toolName:I.toCustomToolName("file_search"),result:{queries:g.queries,results:null!=(b=null==(_=g.results)?void 0:_.map((e=>({attributes:e.attributes,fileId:e.file_id,filename:e.filename,score:e.score,text:e.text}))))?b:null}});break;case"code_interpreter_call":L.push({type:"tool-call",toolCallId:g.id,toolName:I.toCustomToolName("code_interpreter"),input:JSON.stringify({code:g.code,containerId:g.container_id}),providerExecuted:!0}),L.push({type:"tool-result",toolCallId:g.id,toolName:I.toCustomToolName("code_interpreter"),result:{outputs:g.outputs}});break;case"apply_patch_call":L.push({type:"tool-call",toolCallId:g.call_id,toolName:I.toCustomToolName("apply_patch"),input:JSON.stringify({callId:g.call_id,operation:g.operation}),providerMetadata:{[D]:{itemId:g.id}}})}const W={[D]:{responseId:M.id}};G.length>0&&(W[D].logprobs=G),"string"==typeof M.service_tier&&(W[D].serviceTier=M.service_tier);const V=M.usage;return{content:L,finishReason:{unified:Bo({finishReason:null==(R=M.incomplete_details)?void 0:R.reason,hasFunctionCall:j}),raw:null!=(O=null==(S=M.incomplete_details)?void 0:S.reason)?O:void 0},usage:Wo(V),request:{body:T},response:{id:M.id,timestamp:new Date(1e3*M.created_at),modelId:M.model,headers:F,body:k},providerMetadata:W,warnings:P}}async doStream(e){const{args:t,warnings:o,webSearchToolName:r,toolNameMapping:n,store:i,providerOptionsName:s}=await this.getArgs(e),{responseHeaders:a,value:l}=await Dt({url:this.config.url({path:"/responses",modelId:this.modelId}),headers:Se(this.config.headers(),e.headers),body:{...t,stream:!0},failedResponseHandler:Vt,successfulResponseHandler:Mt(zo),abortSignal:e.abortSignal,fetch:this.config.fetch}),p=this,u=qo(e.prompt),d=new Map;let c,h={unified:"other",raw:void 0};const f=[];let g=null;const m={},y=[];let v=!1;const C={};let w;return{stream:l.pipeThrough(new TransformStream({start(e){e.enqueue({type:"stream-start",warnings:o})},transform(t,o){var a,l,E,_,b,R,S,O,T,P,A,I,D,N,x,F,M,k,L,G,j,W,V,H,B,z,U,Y,q,$;if(e.includeRawChunks&&o.enqueue({type:"raw",rawValue:t.rawValue}),!t.success)return h={unified:"error",raw:void 0},void o.enqueue({type:"error",error:t.error});const K=t.value;if(Ko(K))if("function_call"===K.item.type)m[K.output_index]={toolName:K.item.name,toolCallId:K.item.call_id},o.enqueue({type:"tool-input-start",id:K.item.call_id,toolName:K.item.name});else if("web_search_call"===K.item.type)m[K.output_index]={toolName:n.toCustomToolName(null!=r?r:"web_search"),toolCallId:K.item.id},o.enqueue({type:"tool-input-start",id:K.item.id,toolName:n.toCustomToolName(null!=r?r:"web_search"),providerExecuted:!0}),o.enqueue({type:"tool-input-end",id:K.item.id}),o.enqueue({type:"tool-call",toolCallId:K.item.id,toolName:n.toCustomToolName(null!=r?r:"web_search"),input:JSON.stringify({}),providerExecuted:!0});else if("computer_call"===K.item.type)m[K.output_index]={toolName:n.toCustomToolName("computer_use"),toolCallId:K.item.id},o.enqueue({type:"tool-input-start",id:K.item.id,toolName:n.toCustomToolName("computer_use"),providerExecuted:!0});else if("code_interpreter_call"===K.item.type)m[K.output_index]={toolName:n.toCustomToolName("code_interpreter"),toolCallId:K.item.id,codeInterpreter:{containerId:K.item.container_id}},o.enqueue({type:"tool-input-start",id:K.item.id,toolName:n.toCustomToolName("code_interpreter"),providerExecuted:!0}),o.enqueue({type:"tool-input-delta",id:K.item.id,delta:`{"containerId":"${K.item.container_id}","code":"`});else if("file_search_call"===K.item.type)o.enqueue({type:"tool-call",toolCallId:K.item.id,toolName:n.toCustomToolName("file_search"),input:"{}",providerExecuted:!0});else if("image_generation_call"===K.item.type)o.enqueue({type:"tool-call",toolCallId:K.item.id,toolName:n.toCustomToolName("image_generation"),input:"{}",providerExecuted:!0});else if("mcp_call"===K.item.type||"mcp_list_tools"===K.item.type||"mcp_approval_request"===K.item.type);else if("apply_patch_call"===K.item.type){const{call_id:e,operation:t}=K.item;if(m[K.output_index]={toolName:n.toCustomToolName("apply_patch"),toolCallId:e,applyPatch:{hasDiff:"delete_file"===t.type,endEmitted:"delete_file"===t.type}},o.enqueue({type:"tool-input-start",id:e,toolName:n.toCustomToolName("apply_patch")}),"delete_file"===t.type){const r=JSON.stringify({callId:e,operation:t});o.enqueue({type:"tool-input-delta",id:e,delta:r}),o.enqueue({type:"tool-input-end",id:e})}else o.enqueue({type:"tool-input-delta",id:e,delta:`{"callId":"${Jo(e)}","operation":{"type":"${Jo(t.type)}","path":"${Jo(t.path)}","diff":"`})}else"shell_call"===K.item.type?m[K.output_index]={toolName:n.toCustomToolName("shell"),toolCallId:K.item.call_id}:"message"===K.item.type?(y.splice(0,y.length),o.enqueue({type:"text-start",id:K.item.id,providerMetadata:{[s]:{itemId:K.item.id}}})):Ko(K)&&"reasoning"===K.item.type&&(C[K.item.id]={encryptedContent:K.item.encrypted_content,summaryParts:{0:"active"}},o.enqueue({type:"reasoning-start",id:`${K.item.id}:0`,providerMetadata:{[s]:{itemId:K.item.id,reasoningEncryptedContent:null!=(a=K.item.encrypted_content)?a:null}}}));else if(function(e){return"response.output_item.done"===e.type}(K)){if("message"===K.item.type)o.enqueue({type:"text-end",id:K.item.id,providerMetadata:{[s]:{itemId:K.item.id,...y.length>0&&{annotations:y}}}});else if("function_call"===K.item.type)m[K.output_index]=void 0,v=!0,o.enqueue({type:"tool-input-end",id:K.item.call_id}),o.enqueue({type:"tool-call",toolCallId:K.item.call_id,toolName:K.item.name,input:K.item.arguments,providerMetadata:{[s]:{itemId:K.item.id}}});else if("web_search_call"===K.item.type)m[K.output_index]=void 0,o.enqueue({type:"tool-result",toolCallId:K.item.id,toolName:n.toCustomToolName(null!=r?r:"web_search"),result:Zo(K.item.action)});else if("computer_call"===K.item.type)m[K.output_index]=void 0,o.enqueue({type:"tool-input-end",id:K.item.id}),o.enqueue({type:"tool-call",toolCallId:K.item.id,toolName:n.toCustomToolName("computer_use"),input:"",providerExecuted:!0}),o.enqueue({type:"tool-result",toolCallId:K.item.id,toolName:n.toCustomToolName("computer_use"),result:{type:"computer_use_tool_result",status:K.item.status||"completed"}});else if("file_search_call"===K.item.type)m[K.output_index]=void 0,o.enqueue({type:"tool-result",toolCallId:K.item.id,toolName:n.toCustomToolName("file_search"),result:{queries:K.item.queries,results:null!=(E=null==(l=K.item.results)?void 0:l.map((e=>({attributes:e.attributes,fileId:e.file_id,filename:e.filename,score:e.score,text:e.text}))))?E:null}});else if("code_interpreter_call"===K.item.type)m[K.output_index]=void 0,o.enqueue({type:"tool-result",toolCallId:K.item.id,toolName:n.toCustomToolName("code_interpreter"),result:{outputs:K.item.outputs}});else if("image_generation_call"===K.item.type)o.enqueue({type:"tool-result",toolCallId:K.item.id,toolName:n.toCustomToolName("image_generation"),result:{result:K.item.result}});else if("mcp_call"===K.item.type){m[K.output_index]=void 0;const e=null!=(_=K.item.approval_request_id)?_:void 0,t=null!=e&&null!=(R=null!=(b=d.get(e))?b:u[e])?R:K.item.id,r=`mcp.${K.item.name}`;o.enqueue({type:"tool-call",toolCallId:t,toolName:r,input:K.item.arguments,providerExecuted:!0,dynamic:!0}),o.enqueue({type:"tool-result",toolCallId:t,toolName:r,result:{type:"call",serverLabel:K.item.server_label,name:K.item.name,arguments:K.item.arguments,...null!=K.item.output?{output:K.item.output}:{},...null!=K.item.error?{error:K.item.error}:{}},providerMetadata:{[s]:{itemId:K.item.id}}})}else if("mcp_list_tools"===K.item.type)m[K.output_index]=void 0;else if("apply_patch_call"===K.item.type){const e=m[K.output_index];(null==e?void 0:e.applyPatch)&&!e.applyPatch.endEmitted&&"delete_file"!==K.item.operation.type&&(e.applyPatch.hasDiff||o.enqueue({type:"tool-input-delta",id:e.toolCallId,delta:Jo(K.item.operation.diff)}),o.enqueue({type:"tool-input-delta",id:e.toolCallId,delta:'"}}'}),o.enqueue({type:"tool-input-end",id:e.toolCallId}),e.applyPatch.endEmitted=!0),e&&"completed"===K.item.status&&o.enqueue({type:"tool-call",toolCallId:e.toolCallId,toolName:n.toCustomToolName("apply_patch"),input:JSON.stringify({callId:K.item.call_id,operation:K.item.operation}),providerMetadata:{[s]:{itemId:K.item.id}}}),m[K.output_index]=void 0}else if("mcp_approval_request"===K.item.type){m[K.output_index]=void 0;const e=null!=(T=null==(O=(S=p.config).generateId)?void 0:O.call(S))?T:je(),t=null!=(P=K.item.approval_request_id)?P:K.item.id;d.set(t,e);const r=`mcp.${K.item.name}`;o.enqueue({type:"tool-call",toolCallId:e,toolName:r,input:K.item.arguments,providerExecuted:!0,dynamic:!0}),o.enqueue({type:"tool-approval-request",approvalId:t,toolCallId:e})}else if("local_shell_call"===K.item.type)m[K.output_index]=void 0,o.enqueue({type:"tool-call",toolCallId:K.item.call_id,toolName:n.toCustomToolName("local_shell"),input:JSON.stringify({action:{type:"exec",command:K.item.action.command,timeoutMs:K.item.action.timeout_ms,user:K.item.action.user,workingDirectory:K.item.action.working_directory,env:K.item.action.env}}),providerMetadata:{[s]:{itemId:K.item.id}}});else if("shell_call"===K.item.type)m[K.output_index]=void 0,o.enqueue({type:"tool-call",toolCallId:K.item.call_id,toolName:n.toCustomToolName("shell"),input:JSON.stringify({action:{commands:K.item.action.commands}}),providerMetadata:{[s]:{itemId:K.item.id}}});else if("reasoning"===K.item.type){const e=C[K.item.id],t=Object.entries(e.summaryParts).filter((([e,t])=>"active"===t||"can-conclude"===t)).map((([e])=>e));for(const e of t)o.enqueue({type:"reasoning-end",id:`${K.item.id}:${e}`,providerMetadata:{[s]:{itemId:K.item.id,reasoningEncryptedContent:null!=(A=K.item.encrypted_content)?A:null}}});delete C[K.item.id]}}else if(function(e){return"response.function_call_arguments.delta"===e.type}(K)){const e=m[K.output_index];null!=e&&o.enqueue({type:"tool-input-delta",id:e.toolCallId,delta:K.delta})}else if(function(e){return"response.apply_patch_call_operation_diff.delta"===e.type}(K)){const e=m[K.output_index];(null==e?void 0:e.applyPatch)&&(o.enqueue({type:"tool-input-delta",id:e.toolCallId,delta:Jo(K.delta)}),e.applyPatch.hasDiff=!0)}else if(function(e){return"response.apply_patch_call_operation_diff.done"===e.type}(K)){const e=m[K.output_index];(null==e?void 0:e.applyPatch)&&!e.applyPatch.endEmitted&&(e.applyPatch.hasDiff||(o.enqueue({type:"tool-input-delta",id:e.toolCallId,delta:Jo(K.diff)}),e.applyPatch.hasDiff=!0),o.enqueue({type:"tool-input-delta",id:e.toolCallId,delta:'"}}'}),o.enqueue({type:"tool-input-end",id:e.toolCallId}),e.applyPatch.endEmitted=!0)}else if(function(e){return"response.image_generation_call.partial_image"===e.type}(K))o.enqueue({type:"tool-result",toolCallId:K.item_id,toolName:n.toCustomToolName("image_generation"),result:{result:K.partial_image_b64},preliminary:!0});else if(function(e){return"response.code_interpreter_call_code.delta"===e.type}(K)){const e=m[K.output_index];null!=e&&o.enqueue({type:"tool-input-delta",id:e.toolCallId,delta:Jo(K.delta)})}else if(function(e){return"response.code_interpreter_call_code.done"===e.type}(K)){const e=m[K.output_index];null!=e&&(o.enqueue({type:"tool-input-delta",id:e.toolCallId,delta:'"}'}),o.enqueue({type:"tool-input-end",id:e.toolCallId}),o.enqueue({type:"tool-call",toolCallId:e.toolCallId,toolName:n.toCustomToolName("code_interpreter"),input:JSON.stringify({code:K.code,containerId:e.codeInterpreter.containerId}),providerExecuted:!0}))}else if(function(e){return"response.created"===e.type}(K))g=K.response.id,o.enqueue({type:"response-metadata",id:K.response.id,timestamp:new Date(1e3*K.response.created_at),modelId:K.response.model});else if(function(e){return"response.output_text.delta"===e.type}(K))o.enqueue({type:"text-delta",id:K.item_id,delta:K.delta}),(null==(D=null==(I=e.providerOptions)?void 0:I[s])?void 0:D.logprobs)&&K.logprobs&&f.push(K.logprobs);else if("response.reasoning_summary_part.added"===K.type){if(K.summary_index>0){const e=C[K.item_id];e.summaryParts[K.summary_index]="active";for(const t of Object.keys(e.summaryParts))"can-conclude"===e.summaryParts[t]&&(o.enqueue({type:"reasoning-end",id:`${K.item_id}:${t}`,providerMetadata:{[s]:{itemId:K.item_id}}}),e.summaryParts[t]="concluded");o.enqueue({type:"reasoning-start",id:`${K.item_id}:${K.summary_index}`,providerMetadata:{[s]:{itemId:K.item_id,reasoningEncryptedContent:null!=(x=null==(N=C[K.item_id])?void 0:N.encryptedContent)?x:null}}})}}else"response.reasoning_summary_text.delta"===K.type?o.enqueue({type:"reasoning-delta",id:`${K.item_id}:${K.summary_index}`,delta:K.delta,providerMetadata:{[s]:{itemId:K.item_id}}}):"response.reasoning_summary_part.done"===K.type?i?(o.enqueue({type:"reasoning-end",id:`${K.item_id}:${K.summary_index}`,providerMetadata:{[s]:{itemId:K.item_id}}}),C[K.item_id].summaryParts[K.summary_index]="concluded"):C[K.item_id].summaryParts[K.summary_index]="can-conclude":function(e){return"response.completed"===e.type||"response.incomplete"===e.type}(K)?(h={unified:Bo({finishReason:null==(F=K.response.incomplete_details)?void 0:F.reason,hasFunctionCall:v}),raw:null!=(k=null==(M=K.response.incomplete_details)?void 0:M.reason)?k:void 0},c=K.response.usage,"string"==typeof K.response.service_tier&&(w=K.response.service_tier)):function(e){return"response.output_text.annotation.added"===e.type}(K)?(y.push(K.annotation),"url_citation"===K.annotation.type?o.enqueue({type:"source",sourceType:"url",id:null!=(j=null==(G=(L=p.config).generateId)?void 0:G.call(L))?j:je(),url:K.annotation.url,title:K.annotation.title}):"file_citation"===K.annotation.type?o.enqueue({type:"source",sourceType:"document",id:null!=(H=null==(V=(W=p.config).generateId)?void 0:V.call(W))?H:je(),mediaType:"text/plain",title:K.annotation.filename,filename:K.annotation.filename,providerMetadata:{[s]:{type:K.annotation.type,fileId:K.annotation.file_id,index:K.annotation.index}}}):"container_file_citation"===K.annotation.type?o.enqueue({type:"source",sourceType:"document",id:null!=(U=null==(z=(B=p.config).generateId)?void 0:z.call(B))?U:je(),mediaType:"text/plain",title:K.annotation.filename,filename:K.annotation.filename,providerMetadata:{[s]:{type:K.annotation.type,fileId:K.annotation.file_id,containerId:K.annotation.container_id}}}):"file_path"===K.annotation.type&&o.enqueue({type:"source",sourceType:"document",id:null!=($=null==(q=(Y=p.config).generateId)?void 0:q.call(Y))?$:je(),mediaType:"application/octet-stream",title:K.annotation.file_id,filename:K.annotation.file_id,providerMetadata:{[s]:{type:K.annotation.type,fileId:K.annotation.file_id,index:K.annotation.index}}})):function(e){return"error"===e.type}(K)&&o.enqueue({type:"error",error:K})},flush(e){const t={[s]:{responseId:g}};f.length>0&&(t[s].logprobs=f),void 0!==w&&(t[s].serviceTier=w),e.enqueue({type:"finish",finishReason:h,usage:Wo(c),providerMetadata:t})}})),request:{body:t},response:{headers:a}}}};function Ko(e){return"response.output_item.added"===e.type}function Zo(e){var t;switch(e.type){case"search":return{action:{type:"search",query:null!=(t=e.query)?t:void 0},...null!=e.sources&&{sources:e.sources}};case"open_page":return{action:{type:"openPage",url:e.url}};case"find_in_page":return{action:{type:"findInPage",url:e.url,pattern:e.pattern}}}}function Jo(e){return JSON.stringify(e).slice(1,-1)}var Qo=Et((()=>bt(Lt.Ik({instructions:Lt.Yj().nullish(),speed:Lt.ai().min(.25).max(4).default(1).nullish()})))),Xo=class{constructor(e,t){this.modelId=e,this.config=t,this.specificationVersion="v3"}get provider(){return this.config.provider}async getArgs({text:e,voice:t="alloy",outputFormat:o="mp3",speed:r,instructions:n,language:i,providerOptions:s}){const a=[],l=await At({provider:"openai",providerOptions:s,schema:Qo}),p={model:this.modelId,input:e,voice:t,response_format:"mp3",speed:r,instructions:n};if(o&&(["mp3","opus","aac","flac","wav","pcm"].includes(o)?p.response_format=o:a.push({type:"unsupported",feature:"outputFormat",details:`Unsupported output format: ${o}. Using mp3 instead.`})),l){const e={};for(const t in e){const o=e[t];void 0!==o&&(p[t]=o)}}return i&&a.push({type:"unsupported",feature:"language",details:`OpenAI speech models do not support language selection. Language parameter "${i}" was ignored.`}),{requestBody:p,warnings:a}}async doGenerate(e){var t,o,r;const n=null!=(r=null==(o=null==(t=this.config._internal)?void 0:t.currentDate)?void 0:o.call(t))?r:new Date,{requestBody:i,warnings:s}=await this.getArgs(e),{value:a,responseHeaders:l,rawValue:p}=await Dt({url:this.config.url({path:"/audio/speech",modelId:this.modelId}),headers:Se(this.config.headers(),e.headers),body:i,failedResponseHandler:Vt,successfulResponseHandler:async({response:e,url:t,requestBodyValues:o})=>{const r=Oe(e);if(!e.body)throw new g({message:"Response body is empty",url:t,requestBodyValues:o,statusCode:e.status,responseHeaders:r,responseBody:void 0});try{const t=await e.arrayBuffer();return{responseHeaders:r,value:new Uint8Array(t)}}catch(n){throw new g({message:"Failed to read response as array buffer",url:t,requestBodyValues:o,statusCode:e.status,responseHeaders:r,responseBody:void 0,cause:n})}},abortSignal:e.abortSignal,fetch:this.config.fetch});return{audio:a,warnings:s,request:{body:JSON.stringify(i)},response:{timestamp:n,modelId:this.modelId,headers:l,body:p}}}},er=Et((()=>bt(Lt.Ik({text:Lt.Yj(),language:Lt.Yj().nullish(),duration:Lt.ai().nullish(),words:Lt.YO(Lt.Ik({word:Lt.Yj(),start:Lt.ai(),end:Lt.ai()})).nullish(),segments:Lt.YO(Lt.Ik({id:Lt.ai(),seek:Lt.ai(),start:Lt.ai(),end:Lt.ai(),text:Lt.Yj(),tokens:Lt.YO(Lt.ai()),temperature:Lt.ai(),avg_logprob:Lt.ai(),compression_ratio:Lt.ai(),no_speech_prob:Lt.ai()})).nullish()})))),tr=Et((()=>bt(Lt.Ik({include:Lt.YO(Lt.Yj()).optional(),language:Lt.Yj().optional(),prompt:Lt.Yj().optional(),temperature:Lt.ai().min(0).max(1).default(0).optional(),timestampGranularities:Lt.YO(Lt.k5(["word","segment"])).default(["segment"]).optional()})))),or={afrikaans:"af",arabic:"ar",armenian:"hy",azerbaijani:"az",belarusian:"be",bosnian:"bs",bulgarian:"bg",catalan:"ca",chinese:"zh",croatian:"hr",czech:"cs",danish:"da",dutch:"nl",english:"en",estonian:"et",finnish:"fi",french:"fr",galician:"gl",german:"de",greek:"el",hebrew:"he",hindi:"hi",hungarian:"hu",icelandic:"is",indonesian:"id",italian:"it",japanese:"ja",kannada:"kn",kazakh:"kk",korean:"ko",latvian:"lv",lithuanian:"lt",macedonian:"mk",malay:"ms",marathi:"mr",maori:"mi",nepali:"ne",norwegian:"no",persian:"fa",polish:"pl",portuguese:"pt",romanian:"ro",russian:"ru",serbian:"sr",slovak:"sk",slovenian:"sl",spanish:"es",swahili:"sw",swedish:"sv",tagalog:"tl",tamil:"ta",thai:"th",turkish:"tr",ukrainian:"uk",urdu:"ur",vietnamese:"vi",welsh:"cy"},rr=class{constructor(e,t){this.modelId=e,this.config=t,this.specificationVersion="v3"}get provider(){return this.config.provider}async getArgs({audio:e,mediaType:t,providerOptions:o}){const r=await At({provider:"openai",providerOptions:o,schema:tr}),n=new FormData,i=e instanceof Uint8Array?new Blob([e]):new Blob([Ae(e)]);n.append("model",this.modelId);const s=function(e){var t;const[o,r=""]=e.toLowerCase().split("/");return null!=(t={mpeg:"mp3","x-wav":"wav",opus:"ogg",mp4:"m4a","x-m4a":"m4a"}[r])?t:r}(t);if(n.append("file",new File([i],"audio",{type:t}),`audio.${s}`),r){const e={include:r.include,language:r.language,prompt:r.prompt,response_format:["gpt-4o-transcribe","gpt-4o-mini-transcribe"].includes(this.modelId)?"json":"verbose_json",temperature:r.temperature,timestamp_granularities:r.timestampGranularities};for(const[t,o]of Object.entries(e))if(null!=o)if(Array.isArray(o))for(const e of o)n.append(`${t}[]`,String(e));else n.append(t,String(o))}return{formData:n,warnings:[]}}async doGenerate(e){var t,o,r,n,i,s,a,l;const p=null!=(r=null==(o=null==(t=this.config._internal)?void 0:t.currentDate)?void 0:o.call(t))?r:new Date,{formData:u,warnings:d}=await this.getArgs(e),{value:c,responseHeaders:h,rawValue:f}=await Nt({url:this.config.url({path:"/audio/transcriptions",modelId:this.modelId}),headers:Se(this.config.headers(),e.headers),formData:u,failedResponseHandler:Vt,successfulResponseHandler:kt(er),abortSignal:e.abortSignal,fetch:this.config.fetch}),g=null!=c.language&&c.language in or?or[c.language]:void 0;return{text:c.text,segments:null!=(a=null!=(s=null==(n=c.segments)?void 0:n.map((e=>({text:e.text,startSecond:e.start,endSecond:e.end}))))?s:null==(i=c.words)?void 0:i.map((e=>({text:e.word,startSecond:e.start,endSecond:e.end}))))?a:[],language:g,durationInSeconds:null!=(l=c.duration)?l:void 0,warnings:d,response:{timestamp:p,modelId:this.modelId,headers:h,body:f}}}},nr="3.0.9";function ir(e={}){var t,o;const r=null!=(t=null==(n=function({settingValue:e,environmentVariableName:t}){return"string"==typeof e||null==e&&void 0!==Re&&null!=(e=Re.env[t])&&"string"==typeof e?e:void 0}({settingValue:e.baseURL,environmentVariableName:"OPENAI_BASE_URL"}))?void 0:n.replace(/\/$/,""))?t:"https://api.openai.com/v1";var n;const i=null!=(o=e.name)?o:"openai",s=()=>Be({Authorization:`Bearer ${Ue({apiKey:e.apiKey,environmentVariableName:"OPENAI_API_KEY",description:"OpenAI"})}`,"OpenAI-Organization":e.organization,"OpenAI-Project":e.project,...e.headers},`ai-sdk/openai/${nr}`),a=t=>new io(t,{provider:`${i}.embedding`,url:({path:e})=>`${r}${e}`,headers:s,fetch:e.fetch}),l=t=>new po(t,{provider:`${i}.image`,url:({path:e})=>`${r}${e}`,headers:s,fetch:e.fetch}),p=t=>new rr(t,{provider:`${i}.transcription`,url:({path:e})=>`${r}${e}`,headers:s,fetch:e.fetch}),u=t=>new Xo(t,{provider:`${i}.speech`,url:({path:e})=>`${r}${e}`,headers:s,fetch:e.fetch}),d=e=>{if(new.target)throw new Error("The OpenAI model function cannot be called with the new keyword.");return c(e)},c=t=>new $o(t,{provider:`${i}.responses`,url:({path:e})=>`${r}${e}`,headers:s,fetch:e.fetch,fileIdPrefixes:["file-"]}),h=function(e){return d(e)};return h.specificationVersion="v3",h.languageModel=d,h.chat=t=>new Kt(t,{provider:`${i}.chat`,url:({path:e})=>`${r}${e}`,headers:s,fetch:e.fetch}),h.completion=t=>new oo(t,{provider:`${i}.completion`,url:({path:e})=>`${r}${e}`,headers:s,fetch:e.fetch}),h.responses=c,h.embedding=a,h.embeddingModel=a,h.textEmbedding=a,h.textEmbeddingModel=a,h.image=l,h.imageModel=l,h.transcription=p,h.transcriptionModel=p,h.speech=u,h.speechModel=u,h.tools=jo,h}ir()},78481:function(e,t,o){var r,n=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o])},r(e,t)},function(e,t){function o(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)}),i=this&&this.__decorate||function(e,t,o,r){var n,i=arguments.length,s=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,o):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,o,r);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(s=(i<3?n(s):i>3?n(t,o,s):n(t,o))||s);return i>3&&s&&Object.defineProperty(t,o,s),s},s=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)};Object.defineProperty(t,"__esModule",{value:!0});var a=o(22131),l=o(72493),p=o(26016),u=o(58342),d=o(44871),c=o(98239),h=o(97177),f=o(44081),g=o(34506),m=o(38152),y=o(40797),v=o(86608),C=o(60843),w=o(85910),E=o(21951),_=o(47721),b=o(2299),R=o(63405),S=o(93830),O=o(55090),T=o(81604),P=o(66419),A=o(83423),I=function(e){function t(o,r,n){var i=e.call(this,t.TEMPLATE)||this;return i.column=o,i.dragSourceDropTarget=r,i.pinned=n,i}return n(t,e),t.prototype.getColumn=function(){return this.column},t.prototype.getComponentHolder=function(){return this.column.getColDef()},t.prototype.init=function(){var e=this.getComponentHolder(),t=this.columnController.getDisplayNameForColumn(this.column,"header",!0),o=e.sortable,r=this.menuFactory.isMenuEnabled(this.column)&&!e.suppressMenu;this.appendHeaderComp(t,o,r),this.setupWidth(),this.setupMovingCss(),this.setupTooltip(),this.setupResize(),this.setupMenuClass(),this.setupSortableClass(o),this.addColumnHoverListener(),this.addFeature(this.getContext(),new T.HoverFeature([this.column],this.getGui())),this.addDestroyableEventListener(this.column,p.Column.EVENT_FILTER_ACTIVE_CHANGED,this.onFilterChanged.bind(this)),this.onFilterChanged(),this.addFeature(this.getContext(),new b.SelectAllFeature(this.cbSelectAll,this.column));var n=new m.SetLeftFeature(this.column,this.getGui(),this.beans);n.init(),this.addDestroyFunc(n.destroy.bind(n)),this.addAttributes(),g.CssClassApplier.addHeaderClassesFromColDef(e,this.getGui(),this.gridOptionsWrapper,this.column,null)},t.prototype.addColumnHoverListener=function(){this.addDestroyableEventListener(this.eventService,R.Events.EVENT_COLUMN_HOVER_CHANGED,this.onColumnHover.bind(this)),this.onColumnHover()},t.prototype.onColumnHover=function(){var e=this.columnHoverService.isHovered(this.column);A._.addOrRemoveCssClass(this.getGui(),"ag-column-hover",e)},t.prototype.setupSortableClass=function(e){if(e){var t=this.getGui();A._.addCssClass(t,"ag-header-cell-sortable")}},t.prototype.onFilterChanged=function(){var e=this.column.isFilterActive();A._.addOrRemoveCssClass(this.getGui(),"ag-header-cell-filtered",e)},t.prototype.appendHeaderComp=function(e,t,o){var r=this,n={column:this.column,displayName:e,enableSorting:t,enableMenu:o,showColumnMenu:function(e){r.gridApi.showColumnMenuAfterButtonClick(r.column,e)},progressSort:function(e){r.sortController.progressSort(r.column,!!e,"uiColumnSorted")},setSort:function(e,t){r.sortController.setSortForColumn(r.column,e,!!t,"uiColumnSorted")},api:this.gridApi,columnApi:this.columnApi,context:this.gridOptionsWrapper.getContext()},i=this.afterHeaderCompCreated.bind(this,e);this.userComponentFactory.newHeaderComponent(n).then(i)},t.prototype.afterHeaderCompCreated=function(e,t){this.appendChild(t),this.setupMove(t.getGui(),e)},t.prototype.onColumnMovingChanged=function(){this.column.isMoving()?A._.addCssClass(this.getGui(),"ag-header-cell-moving"):A._.removeCssClass(this.getGui(),"ag-header-cell-moving")},t.prototype.setupMove=function(e,t){var o=this;if(!(this.gridOptionsWrapper.isSuppressMovableColumns()||this.getComponentHolder().suppressMovable||this.column.isLockPosition())&&e){var r={type:u.DragSourceType.HeaderCell,eElement:e,dragItemCallback:function(){return o.createDragItem()},dragItemName:t,dragSourceDropTarget:this.dragSourceDropTarget,dragStarted:function(){return o.column.setMoving(!0,"uiColumnMoved")},dragStopped:function(){return o.column.setMoving(!1,"uiColumnMoved")}};this.dragAndDropService.addDragSource(r,!0),this.addDestroyFunc((function(){return o.dragAndDropService.removeDragSource(r)}))}},t.prototype.createDragItem=function(){var e={};return e[this.column.getId()]=this.column.isVisible(),{columns:[this.column],visibleState:e}},t.prototype.setupResize=function(){var e=this,t=this.getComponentHolder();if(this.eResize)if(this.column.isResizable()){var o=this.horizontalResizeService.addResizeBar({eResizeBar:this.eResize,onResizeStart:this.onResizeStart.bind(this),onResizing:this.onResizing.bind(this,!1),onResizeEnd:this.onResizing.bind(this,!0)});if(this.addDestroyFunc(o),!this.gridOptionsWrapper.isSuppressAutoSize()&&!t.suppressAutoSize){this.addDestroyableEventListener(this.eResize,"dblclick",(function(){e.columnController.autoSizeColumn(e.column,"uiColumnResized")}));var r=new P.TouchListener(this.eResize);this.addDestroyableEventListener(r,P.TouchListener.EVENT_DOUBLE_TAP,(function(){e.columnController.autoSizeColumn(e.column,"uiColumnResized")})),this.addDestroyFunc(r.destroy.bind(r))}}else A._.removeFromParent(this.eResize)},t.prototype.onResizing=function(e,t){var o=this.normaliseResizeAmount(t),r=this.resizeStartWidth+o;this.columnController.setColumnWidth(this.column,r,this.resizeWithShiftKey,e,"uiColumnDragged"),e&&A._.removeCssClass(this.getGui(),"ag-column-resizing")},t.prototype.onResizeStart=function(e){this.resizeStartWidth=this.column.getActualWidth(),this.resizeWithShiftKey=e,A._.addCssClass(this.getGui(),"ag-column-resizing")},t.prototype.getTooltipText=function(){return this.getComponentHolder().headerTooltip},t.prototype.setupTooltip=function(){var e=this.getTooltipText();null!=e&&(this.gridOptionsWrapper.isEnableBrowserTooltips()?this.getGui().setAttribute("title",e):this.beans.tooltipManager.registerTooltip(this))},t.prototype.setupMovingCss=function(){this.addDestroyableEventListener(this.column,p.Column.EVENT_MOVING_CHANGED,this.onColumnMovingChanged.bind(this)),this.onColumnMovingChanged()},t.prototype.addAttributes=function(){this.getGui().setAttribute("col-id",this.column.getColId())},t.prototype.setupWidth=function(){this.addDestroyableEventListener(this.column,p.Column.EVENT_WIDTH_CHANGED,this.onColumnWidthChanged.bind(this)),this.onColumnWidthChanged()},t.prototype.setupMenuClass=function(){this.addDestroyableEventListener(this.column,p.Column.EVENT_MENU_VISIBLE_CHANGED,this.onMenuVisible.bind(this)),this.onColumnWidthChanged()},t.prototype.onMenuVisible=function(){this.addOrRemoveCssClass("ag-column-menu-visible",this.column.isMenuVisible())},t.prototype.onColumnWidthChanged=function(){this.getGui().style.width=this.column.getActualWidth()+"px"},t.prototype.normaliseResizeAmount=function(e){var t=e;return this.gridOptionsWrapper.isEnableRtl()?this.pinned!==p.Column.PINNED_LEFT&&(t*=-1):this.pinned===p.Column.PINNED_RIGHT&&(t*=-1),t},t.TEMPLATE='<div class="ag-header-cell" role="presentation" unselectable="on"><div ref="eResize" class="ag-header-cell-resize" role="presentation"></div><ag-checkbox ref="cbSelectAll" class="ag-header-select-all" role="presentation"></ag-checkbox></div>',i([l.Autowired("gridOptionsWrapper"),s("design:type",f.GridOptionsWrapper)],t.prototype,"gridOptionsWrapper",void 0),i([l.Autowired("dragAndDropService"),s("design:type",u.DragAndDropService)],t.prototype,"dragAndDropService",void 0),i([l.Autowired("columnController"),s("design:type",c.ColumnController)],t.prototype,"columnController",void 0),i([l.Autowired("horizontalResizeService"),s("design:type",h.HorizontalResizeService)],t.prototype,"horizontalResizeService",void 0),i([l.Autowired("menuFactory"),s("design:type",Object)],t.prototype,"menuFactory",void 0),i([l.Autowired("gridApi"),s("design:type",y.GridApi)],t.prototype,"gridApi",void 0),i([l.Autowired("columnApi"),s("design:type",d.ColumnApi)],t.prototype,"columnApi",void 0),i([l.Autowired("sortController"),s("design:type",v.SortController)],t.prototype,"sortController",void 0),i([l.Autowired("eventService"),s("design:type",C.EventService)],t.prototype,"eventService",void 0),i([l.Autowired("userComponentFactory"),s("design:type",w.UserComponentFactory)],t.prototype,"userComponentFactory",void 0),i([l.Autowired("columnHoverService"),s("design:type",S.ColumnHoverService)],t.prototype,"columnHoverService",void 0),i([l.Autowired("beans"),s("design:type",O.Beans)],t.prototype,"beans",void 0),i([_.RefSelector("eResize"),s("design:type",HTMLElement)],t.prototype,"eResize",void 0),i([_.RefSelector("cbSelectAll"),s("design:type",E.AgCheckbox)],t.prototype,"cbSelectAll",void 0),i([l.PostConstruct,s("design:type",Function),s("design:paramtypes",[]),s("design:returntype",void 0)],t.prototype,"init",null),t}(a.Component);t.HeaderWrapperComp=I},79886:function(e,t,o){var r,n=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o])},r(e,t)},function(e,t){function o(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)}),i=this&&this.__decorate||function(e,t,o,r){var n,i=arguments.length,s=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,o):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,o,r);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(s=(i<3?n(s):i>3?n(t,o,s):n(t,o))||s);return i>3&&s&&Object.defineProperty(t,o,s),s},s=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)};Object.defineProperty(t,"__esModule",{value:!0});var a=o(44081),l=o(40634),p=o(60843),u=o(45727),d=o(72493),c=o(22131),h=o(15068),f=o(93121),g=o(95125),m=o(98239),y=o(26016),v=o(47721),C=o(1571),w=o(85910),E=o(83423),_=function(e){function t(){return e.call(this,t.TEMPLATE)||this}return n(t,e),t.prototype.init=function(e){this.params=e,this.gridOptionsWrapper.isGroupIncludeTotalFooter()&&this.assignBlankValueToGroupFooterCell(e);var t=this.isEmbeddedRowMismatch(),o=null==e.value;this.cellIsBlank=t||o,this.cellIsBlank||(this.setupDragOpenParents(),this.addExpandAndContract(),this.addCheckboxIfNeeded(),this.addValueElement(),this.setupIndent())},t.prototype.assignBlankValueToGroupFooterCell=function(e){e.value||-1!=e.node.level||(e.value="")},t.prototype.isEmbeddedRowMismatch=function(){if(this.params.fullWidth&&this.gridOptionsWrapper.isEmbedFullWidthRows()){var e=this.params.pinned===y.Column.PINNED_LEFT,t=this.params.pinned===y.Column.PINNED_RIGHT,o=!e&&!t;return this.gridOptionsWrapper.isEnableRtl()?this.columnController.isPinningLeft()?!t:!o:this.columnController.isPinningLeft()?!e:!o}return!1},t.prototype.setIndent=function(){if(!this.gridOptionsWrapper.isGroupHideOpenParents()){var e=this.params,t=e.node.uiLevel;e.padding>=0?this.setPaddingDeprecatedWay(t,e.padding):(this.indentClass&&this.removeCssClass(this.indentClass),this.indentClass="ag-row-group-indent-"+t,this.addCssClass(this.indentClass))}},t.prototype.setPaddingDeprecatedWay=function(e,t){E._.doOnce((function(){return console.warn("ag-Grid: since v14.2, configuring padding for groupCellRenderer should be done with Sass variables and themes. Please see the ag-Grid documentation page for Themes, in particular the property $row-group-indent-size.")}),"groupCellRenderer->doDeprecatedWay");var o=e*t;this.gridOptionsWrapper.isEnableRtl()?this.getGui().style.paddingRight=o+"px":this.getGui().style.paddingLeft=o+"px"},t.prototype.setupIndent=function(){var e=this.params.node;this.params.suppressPadding||(this.addDestroyableEventListener(e,h.RowNode.EVENT_UI_LEVEL_CHANGED,this.setIndent.bind(this)),this.setIndent())},t.prototype.addValueElement=function(){var e=this.params,t=this.displayedGroup;t.footer?this.createFooterCell():t.hasChildren()||E._.get(e.colDef,"cellRendererParams.innerRenderer",null)||E._.get(e.colDef,"cellRendererParams.innerRendererFramework",null)?(this.createGroupCell(),t.hasChildren()&&this.addChildCount()):this.createLeafCell()},t.prototype.createFooterCell=function(){var e,t=this.params.footerValueGetter;if(t){var o=E._.cloneObject(this.params);o.value=this.params.value,"function"==typeof t?e=t(o):"string"==typeof t?e=this.expressionService.evaluate(t,o):console.warn("ag-Grid: footerValueGetter should be either a function or a string (expression)")}else e="Total "+this.params.value;this.eValue.innerHTML=e},t.prototype.createGroupCell=function(){var e,t=this,o=this.params,r=this.displayedGroup.rowGroupColumn||o.column,n=this.params.value,i=r?this.valueFormatterService.formatValue(r,o.node,o.scope,n):null;o.valueFormatted=i,(e=1==o.fullWidth?this.useFullWidth(o):this.useInnerRenderer(this.params.colDef.cellRendererParams,r.getColDef(),o))&&e.then((function(e){t.innerCellRenderer=e}))},t.prototype.useInnerRenderer=function(e,t,o){var r=this,n=null,i=this.userComponentFactory.lookupComponentClassDef(e,"innerRenderer");if(i&&null!=i.component&&i.source!=w.ComponentSource.DEFAULT)n=this.userComponentFactory.newInnerCellRenderer(e,o);else{var s=this.userComponentFactory.lookupComponentClassDef(t,"cellRenderer");n=s&&s.source!=w.ComponentSource.DEFAULT?this.userComponentFactory.newCellRenderer(t,o):s&&s.source==w.ComponentSource.DEFAULT&&E._.get(t,"cellRendererParams.innerRenderer",null)?this.userComponentFactory.newInnerCellRenderer(t.cellRendererParams,o):this.userComponentFactory.newCellRenderer({},o)}return null!=n?n.then((function(e){null!=e?E._.bindCellRendererToHtmlElement(n,r.eValue):r.eValue.innerText=null!=o.valueFormatted?o.valueFormatted:o.value})):this.eValue.innerText=null!=o.valueFormatted?o.valueFormatted:o.value,n},t.prototype.useFullWidth=function(e){var t=this.userComponentFactory.newFullWidthGroupRowInnerCellRenderer(e);return null!=t?E._.bindCellRendererToHtmlElement(t,this.eValue):this.eValue.innerText=null!=e.valueFormatted?e.valueFormatted:e.value,t},t.prototype.addChildCount=function(){this.params.suppressCount||(this.addDestroyableEventListener(this.displayedGroup,h.RowNode.EVENT_ALL_CHILDREN_COUNT_CHANGED,this.updateChildCount.bind(this)),this.updateChildCount())},t.prototype.updateChildCount=function(){var e=this.displayedGroup.allChildrenCount;this.eChildCount.innerHTML=e>=0?"("+e+")":""},t.prototype.createLeafCell=function(){E._.exists(this.params.value)&&(this.eValue.innerHTML=this.params.valueFormatted?this.params.valueFormatted:this.params.value)},t.prototype.isUserWantsSelected=function(){var e=this.params.checkbox;return"function"==typeof e?e(this.params):!0===e},t.prototype.addCheckboxIfNeeded=function(){var e=this.displayedGroup,t=this.isUserWantsSelected()&&!e.footer&&!e.rowPinned&&!e.detail;if(t){var o=new g.CheckboxSelectionComponent;this.getContext().wireBean(o),o.init({rowNode:e,column:this.params.column}),this.eCheckbox.appendChild(o.getGui()),this.addDestroyFunc((function(){return o.destroy()}))}E._.addOrRemoveCssClass(this.eCheckbox,"ag-invisible",!t)},t.prototype.addExpandAndContract=function(){var e=this.params,t=e.eGridCell,o=E._.createIconNoSpan("groupExpanded",this.gridOptionsWrapper,null),r=E._.createIconNoSpan("groupContracted",this.gridOptionsWrapper,null);this.eExpanded.appendChild(o),this.eContracted.appendChild(r),this.addDestroyableEventListener(this.eExpanded,"click",this.onExpandClicked.bind(this)),this.addDestroyableEventListener(this.eContracted,"click",this.onExpandClicked.bind(this)),this.addDestroyableEventListener(t,"keydown",this.onKeyDown.bind(this),{capture:!0}),this.addDestroyableEventListener(e.node,h.RowNode.EVENT_EXPANDED_CHANGED,this.showExpandAndContractIcons.bind(this)),this.showExpandAndContractIcons(),this.addDestroyableEventListener(this.displayedGroup,h.RowNode.EVENT_ALL_CHILDREN_COUNT_CHANGED,this.onAllChildrenCountChanged.bind(this)),this.gridOptionsWrapper.isEnableGroupEdit()||!this.isExpandable()||e.suppressDoubleClickExpand||this.addDestroyableEventListener(t,"dblclick",this.onCellDblClicked.bind(this))},t.prototype.onAllChildrenCountChanged=function(){this.showExpandAndContractIcons(),this.setIndent()},t.prototype.onKeyDown=function(e){if(!e.defaultPrevented&&E._.isKeyPressed(e,u.Constants.KEY_ENTER)){if(this.params.column.isCellEditable(this.params.node))return;e.preventDefault(),this.onExpandOrContract()}},t.prototype.setupDragOpenParents=function(){var e=this.params.column,t=this.params.node;if(this.gridOptionsWrapper.isGroupHideOpenParents())if(t.hasChildren()){var o=t.rowGroupColumn;this.draggedFromHideOpenParents=!e.isRowGroupDisplayed(o.getId())}else this.draggedFromHideOpenParents=!0;else this.draggedFromHideOpenParents=!1;if(this.draggedFromHideOpenParents)for(var r=t.parent;!E._.missing(r);){if(r.rowGroupColumn&&e.isRowGroupDisplayed(r.rowGroupColumn.getId())){this.displayedGroup=r;break}r=r.parent}E._.missing(this.displayedGroup)&&(this.displayedGroup=t)},t.prototype.onExpandClicked=function(e){E._.isStopPropagationForAgGrid(e)||(E._.stopPropagationForAgGrid(e),this.onExpandOrContract())},t.prototype.onCellDblClicked=function(e){E._.isStopPropagationForAgGrid(e)||E._.isElementInEventPath(this.eExpanded,e)||E._.isElementInEventPath(this.eContracted,e)||this.onExpandOrContract()},t.prototype.onExpandOrContract=function(){var e=this.displayedGroup;e.setExpanded(!e.expanded)},t.prototype.isExpandable=function(){var e=this.params.node,t=this.columnController.isPivotMode()&&e.leafGroup;return this.draggedFromHideOpenParents||e.isExpandable()&&!e.footer&&!t},t.prototype.showExpandAndContractIcons=function(){var e=this.params.node;if(this.isExpandable()){var t=!!this.draggedFromHideOpenParents||e.expanded;E._.setVisible(this.eContracted,!t),E._.setVisible(this.eExpanded,t)}else E._.setVisible(this.eExpanded,!1),E._.setVisible(this.eContracted,!1);var o=this.displayedGroup,r=this.columnController.isPivotMode()&&o.leafGroup,n=!o.isExpandable(),i=o.footer||n||r;this.addOrRemoveCssClass("ag-row-group-leaf-indent",i)},t.prototype.destroy=function(){e.prototype.destroy.call(this),this.innerCellRenderer&&this.innerCellRenderer.destroy&&this.innerCellRenderer.destroy()},t.prototype.refresh=function(){return!1},t.TEMPLATE='<span><span class="ag-group-expanded" ref="eExpanded"></span><span class="ag-group-contracted" ref="eContracted"></span><span class="ag-group-checkbox ag-invisible" ref="eCheckbox"></span><span class="ag-group-value" ref="eValue"></span><span class="ag-group-child-count" ref="eChildCount"></span></span>',i([d.Autowired("gridOptionsWrapper"),s("design:type",a.GridOptionsWrapper)],t.prototype,"gridOptionsWrapper",void 0),i([d.Autowired("expressionService"),s("design:type",l.ExpressionService)],t.prototype,"expressionService",void 0),i([d.Autowired("eventService"),s("design:type",p.EventService)],t.prototype,"eventService",void 0),i([d.Autowired("valueFormatterService"),s("design:type",f.ValueFormatterService)],t.prototype,"valueFormatterService",void 0),i([d.Autowired("columnController"),s("design:type",m.ColumnController)],t.prototype,"columnController",void 0),i([d.Autowired("mouseEventService"),s("design:type",C.MouseEventService)],t.prototype,"mouseEventService",void 0),i([d.Autowired("userComponentFactory"),s("design:type",w.UserComponentFactory)],t.prototype,"userComponentFactory",void 0),i([v.RefSelector("eExpanded"),s("design:type",HTMLElement)],t.prototype,"eExpanded",void 0),i([v.RefSelector("eContracted"),s("design:type",HTMLElement)],t.prototype,"eContracted",void 0),i([v.RefSelector("eCheckbox"),s("design:type",HTMLElement)],t.prototype,"eCheckbox",void 0),i([v.RefSelector("eValue"),s("design:type",HTMLElement)],t.prototype,"eValue",void 0),i([v.RefSelector("eChildCount"),s("design:type",HTMLElement)],t.prototype,"eChildCount",void 0),t}(c.Component);t.GroupCellRenderer=_},80834:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0});var o=function(){function e(){}return e.STRING_PROPERTIES=["headerName","columnGroupShow","headerClass","toolPanelClass","headerValueGetter","pivotKeys","groupId","colId","sort","field","type","tooltipComponent","tooltipField","headerTooltip","cellClass","showRowGroup","template","templateUrl","filter","aggFunc","cellRenderer","cellEditor","pinned"],e.OBJECT_PROPERTIES=["headerGroupComponent","headerGroupComponentFramework","headerGroupComponentParams","cellStyle","cellRendererParams","cellEditorFramework","cellEditorParams","pinnedRowCellRendererFramework","pinnedRowCellRendererParams","filterFramework","filterParams","pivotValueColumn","headerComponent","headerComponentFramework","headerComponentParams","floatingFilterComponent","floatingFilterComponentParams","floatingFilterComponentFramework","tooltipComponent","tooltipComponentParams","tooltipComponentFramework","refData"],e.ARRAY_PROPERTIES=["children","sortingOrder","allowedAggFuncs","menuTabs","pivotTotalColumnIds","cellClassRules","icons"],e.NUMBER_PROPERTIES=["sortedAt","width","minWidth","maxWidth","rowGroupIndex","pivotIndex"],e.BOOLEAN_PROPERTIES=["suppressCellFlash","suppressToolPanel","openByDefault","marryChildren","hide","rowGroup","pivot","checkboxSelection","headerCheckboxSelection","headerCheckboxSelectionFilteredOnly","suppressMenu","suppressSorting","suppressMovable","suppressFilter","lockPosition","lockVisible","lockPinned","unSortIcon","suppressSizeToFit","suppressResize","suppressAutoSize","enableRowGroup","enablePivot","enableValue","editable","suppressPaste","suppressNavigable","enableCellChangeFlash","rowDrag","autoHeight","sortable","resizable","singleClickEdit"],e.FUNCTION_PROPERTIES=["valueGetter","valueSetter","filterValueGetter","keyCreator","cellRenderer","cellRendererFramework","pinnedRowCellRenderer","valueFormatter","pinnedRowValueFormatter","valueParser","comparator","equals","pivotComparator","suppressKeyboardEvent","colSpan","rowSpan","getQuickFilterText","newValueHandler","onCellValueChanged","onCellClicked","onCellDoubleClicked","onCellContextMenu","tooltip","tooltipValueGetter","tooltipComponent","tooltipComponentFramework","cellRendererSelector","cellEditorSelector"],e.ALL_PROPERTIES=e.ARRAY_PROPERTIES.concat(e.OBJECT_PROPERTIES).concat(e.STRING_PROPERTIES).concat(e.NUMBER_PROPERTIES).concat(e.FUNCTION_PROPERTIES).concat(e.BOOLEAN_PROPERTIES),e.FRAMEWORK_PROPERTIES=["__ob__","__metadata__","mappedColumnProperties","hasChildColumns","toColDef","createColDefFromGridColumn"],e}();t.ColDefUtil=o},81604:function(e,t,o){var r,n=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o])},r(e,t)},function(e,t){function o(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)}),i=this&&this.__decorate||function(e,t,o,r){var n,i=arguments.length,s=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,o):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,o,r);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(s=(i<3?n(s):i>3?n(t,o,s):n(t,o))||s);return i>3&&s&&Object.defineProperty(t,o,s),s},s=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)};Object.defineProperty(t,"__esModule",{value:!0});var a=o(8534),l=o(72493),p=o(93830),u=function(e){function t(t,o){var r=e.call(this)||this;return r.columns=t,r.addMouseHoverListeners(o),r}return n(t,e),t.prototype.addMouseHoverListeners=function(e){this.addDestroyableEventListener(e,"mouseout",this.onMouseOut.bind(this)),this.addDestroyableEventListener(e,"mouseover",this.onMouseOver.bind(this))},t.prototype.onMouseOut=function(){this.columnHoverService.clearMouseOver()},t.prototype.onMouseOver=function(){this.columnHoverService.setMouseOver(this.columns)},i([l.Autowired("columnHoverService"),s("design:type",p.ColumnHoverService)],t.prototype,"columnHoverService",void 0),t}(a.BeanStub);t.HoverFeature=u},81999:function(e,t,o){var r,n=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o])},r(e,t)},function(e,t){function o(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)}),i=this&&this.__decorate||function(e,t,o,r){var n,i=arguments.length,s=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,o):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,o,r);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(s=(i<3?n(s):i>3?n(t,o,s):n(t,o))||s);return i>3&&s&&Object.defineProperty(t,o,s),s},s=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)};Object.defineProperty(t,"__esModule",{value:!0});var a=o(44081),l=o(44871),p=o(98239),u=o(10042),d=o(55e3),c=o(60843),h=o(64229),f=o(37132),g=o(73575),m=o(72493),y=o(42195),v=o(22131),C=o(40797),w=o(47721),E=o(63405),_=o(68198),b=o(96896),R=o(83423),S=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),t.prototype.init=function(){var e=this;this.logger=this.loggerFactory.create("GridCore");var o=this.enterprise?t.TEMPLATE_ENTERPRISE:t.TEMPLATE_NORMAL;if(this.setTemplate(o),[this.gridApi,this.filterManager,this.rowRenderer,this.popupService].forEach((function(t){return t.registerGridCore(e)})),this.enterprise&&this.clipboardService.registerGridCore(this),this.gridOptionsWrapper.addLayoutElement(this.getGui()),this.setSideBarVisible(this.gridOptionsWrapper.isShowToolPanel()),this.eGridDiv.appendChild(this.getGui()),this.addDestroyFunc((function(){e.eGridDiv.removeChild(e.getGui())})),this.$scope){var r=this.$scope.$watch(this.quickFilterOnScope,(function(t){return e.filterManager.setQuickFilter(t)}));this.addDestroyFunc(r)}this.addRtlSupport(),this.logger.log("ready"),this.gridOptionsWrapper.addLayoutElement(this.eRootWrapperBody);var n=this.gridPanel.getGui();this.addDestroyableEventListener(n,"focusin",(function(){R._.addCssClass(n,"ag-has-focus")})),this.addDestroyableEventListener(n,"focusout",(function(e){n.contains(e.relatedTarget)||R._.removeCssClass(n,"ag-has-focus")}));var i=this.resizeObserverService.observeResize(this.eGridDiv,this.onGridSizeChanged.bind(this));this.addDestroyFunc((function(){return i()}))},t.prototype.onGridSizeChanged=function(){var e={type:E.Events.EVENT_GRID_SIZE_CHANGED,api:this.gridApi,columnApi:this.columnApi,clientWidth:this.eGridDiv.clientWidth,clientHeight:this.eGridDiv.clientHeight};this.eventService.dispatchEvent(e)},t.prototype.addRtlSupport=function(){var e=this.gridOptionsWrapper.isEnableRtl()?"ag-rtl":"ag-ltr";R._.addCssClass(this.getGui(),e)},t.prototype.getRootGui=function(){return this.getGui()},t.prototype.isSideBarVisible=function(){return!!this.sideBarComp&&this.sideBarComp.isVisible()},t.prototype.setSideBarVisible=function(e){this.sideBarComp?this.sideBarComp.setVisible(e):e&&console.warn("ag-Grid: toolPanel is only available in ag-Grid Enterprise")},t.prototype.closeToolPanel=function(){this.sideBarComp?this.sideBarComp.close():console.warn("ag-Grid: toolPanel is only available in ag-Grid Enterprise")},t.prototype.getSideBar=function(){return this.gridOptions.sideBar},t.prototype.refreshSideBar=function(){this.sideBarComp&&this.sideBarComp.refresh()},t.prototype.setSideBar=function(e){this.eRootWrapperBody.removeChild(this.sideBarComp.getGui()),this.gridOptions.sideBar=b.SideBarDefParser.parse(e),this.sideBarComp.reset(),this.eRootWrapperBody.appendChild(this.sideBarComp.getGui())},t.prototype.getOpenedToolPanel=function(){return this.sideBarComp?this.sideBarComp.openedItem():null},t.prototype.openToolPanel=function(e){this.sideBarComp?this.sideBarComp.openToolPanel(e):console.warn("ag-Grid: toolPanel is only available in ag-Grid Enterprise")},t.prototype.isToolPanelShowing=function(){return this.sideBarComp.isToolPanelShowing()},t.prototype.destroy=function(){e.prototype.destroy.call(this),this.logger.log("Grid DOM removed")},t.prototype.ensureNodeVisible=function(e,t){if(void 0===t&&(t="top"),this.doingVirtualPaging)throw new Error("Cannot use ensureNodeVisible when doing virtual paging, as we cannot check rows that are not in memory");for(var o=this.rowModel.getPageLastRow()+1,r="function"==typeof e,n=-1,i=0;i<o;i++){var s=this.rowModel.getRow(i);if(r){if(e(s)){n=i;break}}else if(e===s||e===s.data){n=i;break}}n>=0&&this.gridPanel.ensureIndexVisible(n,t)},t.TEMPLATE_NORMAL='<div class="ag-root-wrapper">\n <div class="ag-root-wrapper-body" ref="rootWrapperBody">\n <ag-grid-comp ref="gridPanel"></ag-grid-comp>\n </div>\n <ag-pagination></ag-pagination>\n </div>',t.TEMPLATE_ENTERPRISE='<div class="ag-root-wrapper">\n <ag-grid-header-drop-zones></ag-grid-header-drop-zones>\n <div ref="rootWrapperBody" class="ag-root-wrapper-body">\n <ag-grid-comp ref="gridPanel"></ag-grid-comp>\n <ag-side-bar ref="sideBar"></ag-side-bar>\n </div>\n <ag-status-bar ref="statusBar"></ag-status-bar>\n <ag-pagination></ag-pagination>\n <ag-watermark></ag-watermark>\n </div>',i([m.Autowired("enterprise"),s("design:type",Boolean)],t.prototype,"enterprise",void 0),i([m.Autowired("gridOptions"),s("design:type",Object)],t.prototype,"gridOptions",void 0),i([m.Autowired("gridOptionsWrapper"),s("design:type",a.GridOptionsWrapper)],t.prototype,"gridOptionsWrapper",void 0),i([m.Autowired("rowModel"),s("design:type",Object)],t.prototype,"rowModel",void 0),i([m.Autowired("frameworkFactory"),s("design:type",Object)],t.prototype,"frameworkFactory",void 0),i([m.Autowired("resizeObserverService"),s("design:type",_.ResizeObserverService)],t.prototype,"resizeObserverService",void 0),i([m.Autowired("columnController"),s("design:type",p.ColumnController)],t.prototype,"columnController",void 0),i([m.Autowired("rowRenderer"),s("design:type",u.RowRenderer)],t.prototype,"rowRenderer",void 0),i([m.Autowired("filterManager"),s("design:type",d.FilterManager)],t.prototype,"filterManager",void 0),i([m.Autowired("eventService"),s("design:type",c.EventService)],t.prototype,"eventService",void 0),i([m.Autowired("eGridDiv"),s("design:type",HTMLElement)],t.prototype,"eGridDiv",void 0),i([m.Autowired("$scope"),s("design:type",Object)],t.prototype,"$scope",void 0),i([m.Autowired("quickFilterOnScope"),s("design:type",String)],t.prototype,"quickFilterOnScope",void 0),i([m.Autowired("popupService"),s("design:type",g.PopupService)],t.prototype,"popupService",void 0),i([m.Autowired("focusedCellController"),s("design:type",y.FocusedCellController)],t.prototype,"focusedCellController",void 0),i([m.Autowired("loggerFactory"),s("design:type",f.LoggerFactory)],t.prototype,"loggerFactory",void 0),i([m.Autowired("columnApi"),s("design:type",l.ColumnApi)],t.prototype,"columnApi",void 0),i([m.Autowired("gridApi"),s("design:type",C.GridApi)],t.prototype,"gridApi",void 0),i([m.Optional("clipboardService"),s("design:type",Object)],t.prototype,"clipboardService",void 0),i([w.RefSelector("gridPanel"),s("design:type",h.GridPanel)],t.prototype,"gridPanel",void 0),i([w.RefSelector("sideBar"),s("design:type",Object)],t.prototype,"sideBarComp",void 0),i([w.RefSelector("rootWrapperBody"),s("design:type",HTMLElement)],t.prototype,"eRootWrapperBody",void 0),i([m.PostConstruct,s("design:type",Function),s("design:paramtypes",[]),s("design:returntype",void 0)],t.prototype,"init",null),t}(v.Component);t.GridCore=S},83423:(e,t,o)=>{Object.defineProperty(t,"__esModule",{value:!0});var r=o(45727),n=/((\/\/.*$)|(\/\*[\s\S]*?\*\/))/gm,i=/([^\s,]+)/g,s="__ag_Grid_Stop_Propagation",a=function(){function e(){this.timestamp=(new Date).getTime()}return e.prototype.print=function(e){var t=(new Date).getTime()-this.timestamp;console.info(e+" = "+t),this.timestamp=(new Date).getTime()},e}();t.Timer=a;var l={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},p=/[&<>"']/g,u=function(){function e(){}return e.doIeFocusHack=function(e){(t._.isBrowserIE()||t._.isBrowserEdge())&&(t._.missing(document.activeElement)||document.activeElement===document.body)&&e.focus()},e.doOnce=function(e,t){this.doOnceFlags[t]||(e(),this.doOnceFlags[t]=!0)},e.isLeftClick=function(e){return"buttons"in e?1==e.buttons:1==(e.which||e.button)},e.areEventsNear=function(e,t,o){if(0===o)return!1;var r=Math.abs(e.clientX-t.clientX),n=Math.abs(e.clientY-t.clientY);return Math.max(r,n)<=o},e.jsonEquals=function(e,t){return(e?JSON.stringify(e):null)===(t?JSON.stringify(t):null)},e.shallowCompare=function(e,t){if(this.missing(e)&&this.missing(t))return!0;if(this.missing(e)||this.missing(t))return!1;if(e.length!==t.length)return!1;for(var o=0;o<e.length;o++)if(e[o]!==t[o])return!1;return!0},e.getNameOfClass=function(e){var t=e.toString(),o=/function (.{1,})\(/.exec(t);return o&&o.length>1?o[1]:""},e.values=function(e){var t=[];return this.iterateObject(e,(function(e,o){t.push(o)})),t},e.getValueUsingField=function(e,t,o){if(t&&e){if(o){for(var r=t.split("."),n=e,i=0;i<r.length;i++)if(n=n[r[i]],this.missing(n))return null;return n}return e[t]}},e.getAbsoluteHeight=function(e){var t=window.getComputedStyle(e),o=parseFloat(t.marginTop)+parseFloat(t.marginBottom);return Math.ceil(e.offsetHeight+o)},e.getAbsoluteWidth=function(e){var t=window.getComputedStyle(e),o=parseFloat(t.marginLeft)+parseFloat(t.marginRight);return Math.ceil(e.offsetWidth+o)},e.getScrollLeft=function(e,t){var o=e.scrollLeft;return t&&(o=Math.abs(o),this.isBrowserChrome()&&(o=e.scrollWidth-e.clientWidth-o)),o},e.cleanNumber=function(e){return"string"==typeof e&&(e=parseInt(e,10)),"number"==typeof e?Math.floor(e):null},e.setScrollLeft=function(e,t,o){o&&((this.isBrowserSafari()||this.isBrowserChrome())&&(t=e.scrollWidth-e.clientWidth-t),this.isBrowserFirefox()&&(t*=-1)),e.scrollLeft=t},e.iterateNamedNodeMap=function(e,t){if(e)for(var o=0;o<e.length;o++){var r=e[o];t(r.name,r.value)}},e.iterateObject=function(e,t){if(e&&!this.missing(e))if(Array.isArray(e))e.forEach((function(e,o){t(o+"",e)}));else for(var o=Object.keys(e),r=0;r<o.length;r++){var n=o[r],i=e[n];t(n,i)}},e.cloneObject=function(e){for(var t={},o=Object.keys(e),r=0;r<o.length;r++){var n=o[r],i=e[n];t[n]=i}return t},e.deepCloneObject=function(e){return JSON.parse(JSON.stringify(e))},e.map=function(e,t){for(var o=[],r=0;r<e.length;r++){var n=t(e[r],r);o.push(n)}return o},e.mapObject=function(t,o){var r=[];return e.iterateObject(t,(function(e,t){r.push(o(t))})),r},e.forEach=function(e,t){if(e)for(var o=0;o<e.length;o++)t(e[o],o)},e.filter=function(e,t){var o=[];return e.forEach((function(e){t(e)&&o.push(e)})),o},e.getAllKeysInObjects=function(e){var t={};return e.forEach((function(e){e&&Object.keys(e).forEach((function(e){return t[e]=null}))})),Object.keys(t)},e.mergeDeep=function(t,o){this.exists(o)&&this.iterateObject(o,(function(o,r){var n=t[o];n!==r&&("object"==typeof n&&"object"==typeof r?e.mergeDeep(n,r):t[o]=r)}))},e.assign=function(e){for(var t=this,o=[],r=1;r<arguments.length;r++)o[r-1]=arguments[r];return o.forEach((function(o){t.exists(o)&&t.iterateObject(o,(function(t,o){e[t]=o}))})),e},e.parseYyyyMmDdToDate=function(e,t){try{if(!e)return null;if(-1===e.indexOf(t))return null;var o=e.split(t);return 3!=o.length?null:new Date(Number(o[0]),Number(o[1])-1,Number(o[2]))}catch(e){return null}},e.serializeDateToYyyyMmDd=function(t,o){return t?t.getFullYear()+o+e.pad(t.getMonth()+1,2)+o+e.pad(t.getDate(),2):null},e.pad=function(e,t){for(var o=e+"";o.length<t;)o="0"+o;return o},e.pushAll=function(e,t){this.missing(t)||this.missing(e)||t.forEach((function(t){return e.push(t)}))},e.createArrayOfNumbers=function(e,t){for(var o=[],r=e;r<=t;r++)o.push(r);return o},e.getFunctionParameters=function(e){var t=e.toString().replace(n,""),o=t.slice(t.indexOf("(")+1,t.indexOf(")")).match(i);return null===o?[]:o},e.find=function(e,t,o){if(null==e)return null;if(!Array.isArray(e)){var r=this.values(e);return this.find(r,t,o)}for(var n=e,i=null,s=0;s<n.length;s++){var a=n[s];if("string"==typeof t){if(a[t]===o){i=a;break}}else if(t(a)){i=a;break}}return i},e.toStrings=function(e){return this.map(e,(function(e){return null!=e&&e.toString?e.toString():null}))},e.iterateArray=function(e,t){for(var o=0;o<e.length;o++)t(e[o],o)},e.isNode=function(e){return"function"==typeof Node?e instanceof Node:e&&"object"==typeof e&&"number"==typeof e.nodeType&&"string"==typeof e.nodeName},e.isElement=function(e){return"function"==typeof HTMLElement?e instanceof HTMLElement:e&&"object"==typeof e&&null!==e&&1===e.nodeType&&"string"==typeof e.nodeName},e.isNodeOrElement=function(e){return this.isNode(e)||this.isElement(e)},e.copyNodeList=function(e){for(var t=e?e.length:0,o=[],r=0;r<t;r++)o.push(e[r]);return o},e.isEventFromPrintableCharacter=function(o){var n=String.fromCharCode(o.charCode);if(this.isKeyPressed(o,r.Constants.KEY_NEW_LINE))return!1;if(o.altKey||o.ctrlKey)return!1;if(t._.exists(o.key)){var i=1===o.key.length,s=e.isNumpadDelWithNumlockOnForEdgeOrIe(o);return i||s}return e.PRINTABLE_CHARACTERS.indexOf(n)>=0},e.isUserSuppressingKeyboardEvent=function(e,t,o,r,n){var i=e.getSuppressKeyboardEventFunc(),s=r.getColDef().suppressKeyboardEvent;if(!i&&!s)return!1;var a={event:t,editing:n,column:r,api:e.getApi(),node:o,data:o.data,colDef:r.getColDef(),context:e.getContext(),columnApi:e.getColumnApi()};return!(!s||!s(a))||!!i&&i(a)},e.getCellCompForEvent=function(e,t){for(var o=this.getTarget(t);o;){var r=e.getDomData(o,"cellComp");if(r)return r;o=o.parentElement}return null},e.addChangeListener=function(e,t){e.addEventListener("changed",t),e.addEventListener("paste",t),e.addEventListener("input",t),e.addEventListener("keydown",t),e.addEventListener("keyup",t)},e.makeNull=function(e){return null==e||""===e?null:e},e.missing=function(e){return!this.exists(e)},e.missingOrEmpty=function(e){return!e||this.missing(e)||0===e.length},e.missingOrEmptyObject=function(e){return this.missing(e)||0===Object.keys(e).length},e.exists=function(e,t){return void 0===t&&(t=!1),null!=e&&(""!==e||t)},e.firstExistingValue=function(){for(var e=[],o=0;o<arguments.length;o++)e[o]=arguments[o];for(var r=0;r<e.length;r++){var n=e[r];if(t._.exists(n))return n}return null},e.anyExists=function(e){if(e)for(var t=0;t<e.length;t++)if(this.exists(e[t]))return!0;return!1},e.existsAndNotEmpty=function(e){return null!=e&&this.exists(e)&&e.length>0},e.clearElement=function(e){for(;e&&e.firstChild;)e.removeChild(e.firstChild)},e.removeElement=function(e,t){this.removeFromParent(e.querySelector(t))},e.removeFromParent=function(e){e&&e.parentNode&&e.parentNode.removeChild(e)},e.isVisible=function(e){return null!==e.offsetParent},e.loadTemplate=function(e){var t=document.createElement("div");return t.innerHTML=e,t.firstChild},e.appendHtml=function(e,t){e.lastChild?e.insertAdjacentHTML("afterbegin",t):e.innerHTML=t},e.addOrRemoveCssClass=function(e,t,o){o?this.addCssClass(e,t):this.removeCssClass(e,t)},e.callIfPresent=function(e){e&&e()},e.addCssClass=function(e,t){var o=this;if(t&&0!==t.length)if(t.indexOf(" ")>=0)t.split(" ").forEach((function(t){return o.addCssClass(e,t)}));else if(e.classList)e.classList.contains(t)||e.classList.add(t);else if(e.className&&e.className.length>0){var r=e.className.split(" ");r.indexOf(t)<0&&(r.push(t),e.setAttribute("class",r.join(" ")))}else e.setAttribute("class",t)},e.containsClass=function(e,t){if(e.classList)return e.classList.contains(t);if(e.className){var o=e.className===t,r=e.className.indexOf(" "+t+" ")>=0,n=0===e.className.indexOf(t+" "),i=e.className.lastIndexOf(" "+t)===e.className.length-t.length-1;return o||r||n||i}return!1},e.getElementAttribute=function(e,t){return e.attributes&&e.attributes[t]?e.attributes[t].value:null},e.offsetHeight=function(e){return e&&e.clientHeight?e.clientHeight:0},e.offsetWidth=function(e){return e&&e.clientWidth?e.clientWidth:0},e.sortNumberArray=function(e){e.sort((function(e,t){return e-t}))},e.removeCssClass=function(e,t){if(e.classList)e.classList.contains(t)&&e.classList.remove(t);else if(e.className&&e.className.length>0){var o=e.className.split(" ");if(o.indexOf(t)>=0){for(;o.indexOf(t)>=0;)o.splice(o.indexOf(t),1);e.setAttribute("class",o.join(" "))}}},e.removeRepeatsFromArray=function(e,t){if(e)for(var o=e.length-2;o>=0;o--){var r=e[o]===t,n=e[o+1]===t;r&&n&&e.splice(o+1,1)}},e.removeFromArray=function(e,t){e.indexOf(t)>=0&&e.splice(e.indexOf(t),1)},e.removeAllFromArray=function(e,t){t.forEach((function(t){e.indexOf(t)>=0&&e.splice(e.indexOf(t),1)}))},e.insertIntoArray=function(e,t,o){e.splice(o,0,t)},e.insertArrayIntoArray=function(e,t,o){if(!this.missing(e)&&!this.missing(t))for(var r=t.length-1;r>=0;r--){var n=t[r];this.insertIntoArray(e,n,o)}},e.moveInArray=function(e,t,o){var r=this;t.forEach((function(t){r.removeFromArray(e,t)})),t.slice().reverse().forEach((function(t){r.insertIntoArray(e,t,o)}))},e.defaultComparator=function(e,t,o){void 0===o&&(o=!1);var r=null==e,n=null==t;if(e&&e.toNumber&&(e=e.toNumber()),t&&t.toNumber&&(t=t.toNumber()),r&&n)return 0;if(r)return-1;if(n)return 1;if("string"==typeof e){if(!o)return i(e,t);try{return e.localeCompare(t)}catch(o){return i(e,t)}}return e<t?-1:e>t?1:0;function i(e,t){return e>t?1:e<t?-1:0}},e.compareArrays=function(e,t){if(this.missing(e)&&this.missing(t))return!0;if(this.missing(e)||this.missing(t)||!e||!t)return!1;if(e.length!==t.length)return!1;for(var o=0;o<e.length;o++)if(e[o]!==t[o])return!1;return!0},e.ensureDomOrder=function(e,t,o){o&&o.nextSibling===t||(o?o.nextSibling?e.insertBefore(t,o.nextSibling):e.appendChild(t):e.firstChild&&e.firstChild!==t&&e.insertAdjacentElement("afterbegin",t))},e.insertWithDomOrder=function(e,t,o){o?o.nextSibling?e.insertBefore(t,o.nextSibling):e.appendChild(t):e.firstChild?e.insertBefore(t,e.firstChild):e.appendChild(t)},e.insertTemplateWithDomOrder=function(e,t,o){var r;return o?(o.insertAdjacentHTML("afterend",t),r=o.nextSibling):(e.firstChild?e.insertAdjacentHTML("afterbegin",t):e.innerHTML=t,r=e.firstChild),r},e.every=function(e,t){if(!e||0===e.length)return!0;for(var o=0;o<e.length;o++)if(!t(e[o]))return!1;return!0},e.toStringOrNull=function(e){return this.exists(e)&&e.toString?e.toString():null},e.formatSize=function(e){return"number"==typeof e?e+"px":e},e.formatNumberTwoDecimalPlacesAndCommas=function(e){return"number"!=typeof e?"":(Math.round(100*e)/100).toString().replace(/(\d)(?=(\d{3})+(?!\d))/g,"$1,")},e.formatNumberCommas=function(e){return"number"!=typeof e?"":e.toString().replace(/(\d)(?=(\d{3})+(?!\d))/g,"$1,")},e.prependDC=function(e,t){this.exists(e.firstChild)?e.insertBefore(t,e.firstChild):e.appendChild(t)},e.createIcon=function(e,t,o){var r=this.createIconNoSpan(e,t,o);if(r.className.indexOf("ag-icon")>-1)return r;var n=document.createElement("span");return n.appendChild(r),n},e.createIconNoSpan=function(e,t,o){var r=null,n=o&&o.getColDef().icons?o.getColDef().icons:null;if(n&&(r=n[e]),!r&&t.getIcons()&&(r=t.getIcons()[e]),r){var i=void 0;if("function"==typeof r)i=r();else{if("string"!=typeof r)throw new Error("icon from grid options needs to be a string or a function");i=r}if("string"==typeof i)return this.loadTemplate(i);if(this.isNodeOrElement(i))return i;throw new Error("iconRenderer should return back a string or a dom object")}var s=document.createElement("span"),a=this.iconNameClassMap[e];if(!a)throw new Error(e+" did not find class");return s.setAttribute("class","ag-icon ag-icon-"+a),s.setAttribute("unselectable","on"),s},e.addStylesToElement=function(e,t){var o=this;t&&Object.keys(t).forEach((function(r){var n=o.hyphenToCamelCase(r);n&&(e.style[n]=t[r])}))},e.isHorizontalScrollShowing=function(e){return e.clientWidth<e.scrollWidth},e.isVerticalScrollShowing=function(e){return e.clientHeight<e.scrollHeight},e.getMaxDivHeight=function(){if(!document.body)return-1;var e=1e6,t=navigator.userAgent.toLowerCase().match(/firefox/)?6e6:1e9,o=this.loadTemplate("<div/>");for(document.body.appendChild(o);;){var r=2*e;if(o.style.height=r+"px",r>t||o.clientHeight!==r)break;e=r}return document.body.removeChild(o),e},e.getScrollbarWidth=function(){var e=document.createElement("div");e.style.visibility="hidden",e.style.width="100px",e.style.msOverflowStyle="scrollbar",document.body.appendChild(e);var t=e.offsetWidth;e.style.overflow="scroll";var o=document.createElement("div");o.style.width="100%",e.appendChild(o);var r=o.offsetWidth;return e.parentNode&&e.parentNode.removeChild(e),t-r},e.hasOverflowScrolling=function(){var e=["webkit","moz","o","ms"],t=document.createElement("div"),o=!1;document.getElementsByTagName("body")[0].appendChild(t),t.setAttribute("style",e.map((function(e){return"-"+e+"-overflow-scrolling: touch"})).concat("overflow-scrolling: touch").join(";"));var r=window.getComputedStyle(t);if("touch"===r.overflowScrolling&&(o=!0),!o)for(var n=0,i=e;n<i.length;n++)if("touch"===r[i[n]+"OverflowScrolling"]){o=!0;break}return t.parentNode&&t.parentNode.removeChild(t),o},e.isKeyPressed=function(e,t){return(e.which||e.keyCode)===t},e.setVisible=function(e,t){this.addOrRemoveCssClass(e,"ag-hidden",!t)},e.setHidden=function(e,t){this.addOrRemoveCssClass(e,"ag-invisible",t)},e.setFixedWidth=function(e,t){t=this.formatSize(t),e.style.width=t,e.style.maxWidth=t,e.style.minWidth=t},e.setFixedHeight=function(e,t){t=this.formatSize(t),e.style.height=t,e.style.maxHeight=t,e.style.minHeight=t},e.isBrowserIE=function(){return void 0===this.isIE&&(this.isIE=!!document.documentMode),this.isIE},e.isBrowserEdge=function(){return void 0===this.isEdge&&(this.isEdge=!this.isBrowserIE()&&!!window.StyleMedia),this.isEdge},e.isBrowserSafari=function(){if(void 0===this.isSafari){var e=window;this.isSafari=Object.prototype.toString.call(e.HTMLElement).indexOf("Constructor")>0||!!(t=!e.safari||e.safari.pushNotification)&&"[object SafariRemoteNotification]"===t.toString()}var t;return this.isSafari},e.isBrowserChrome=function(){if(void 0===this.isChrome){var e=window;this.isChrome=!!e.chrome&&(!!e.chrome.webstore||!!e.chrome.runtime)||/Chrome/.test(navigator.userAgent)&&/Google Inc/.test(navigator.vendor)}return this.isChrome},e.isBrowserFirefox=function(){if(void 0===this.isFirefox){var e=window;this.isFirefox=void 0!==e.InstallTrigger}return this.isFirefox},e.isUserAgentIPad=function(){return void 0===this.isIPad&&(this.isIPad=null!=navigator.userAgent.match(/iPad|iPhone/i)),this.isIPad},e.getTarget=function(e){var t=e;return t.target||t.srcElement},e.isElementChildOfClass=function(e,t,o){for(var r=0;e;){if(this.containsClass(e,t))return!0;if(e=e.parentElement,o&&++r>o)break}return!1},e.isElementInEventPath=function(e,o){return!(!o||!e)&&t._.getEventPath(o).indexOf(e)>=0},e.isFunction=function(e){return!!(e&&e.constructor&&e.call&&e.apply)},e.createEventPath=function(e){for(var o=[],r=t._.getTarget(e);r;)o.push(r),r=r.parentElement;return o},e.addAgGridEventPath=function(e){e.__agGridEventPath=this.getEventPath(e)},e.getEventPath=function(e){var t=e;return t.deepPath?t.deepPath():t.path?t.path:t.composedPath?t.composedPath():t.__agGridEventPath?t.__agGridEventPath:this.createEventPath(e)},e.forEachSnapshotFirst=function(e,t){e&&e.slice(0).forEach(t)},e.getBodyWidth=function(){return document.body?document.body.clientWidth:window.innerHeight?window.innerWidth:document.documentElement&&document.documentElement.clientWidth?document.documentElement.clientWidth:-1},e.getBodyHeight=function(){return document.body?document.body.clientHeight:window.innerHeight?window.innerHeight:document.documentElement&&document.documentElement.clientHeight?document.documentElement.clientHeight:-1},e.setCheckboxState=function(e,t){"boolean"==typeof t?(e.checked=t,e.indeterminate=!1):e.indeterminate=!0},e.traverseNodesWithKey=function(e,t){var o=[];!function e(r){r.forEach((function(r){if(r.group||r.hasChildren()){o.push(r.key);var n=o.join("|");t(r,n),e(r.childrenAfterGroup),o.pop()}}))}(e)},e.camelCaseToHyphen=function(e){return null==e?null:e.replace(/([A-Z])/g,(function(e){return"-"+e[0].toLowerCase()}))},e.hyphenToCamelCase=function(e){return null==e?null:e.replace(/-([a-z])/g,(function(e){return e[1].toUpperCase()}))},e.cssStyleObjectToMarkup=function(e){var t=this;if(!e)return"";var o=[];return this.iterateObject(e,(function(e,r){var n=t.camelCaseToHyphen(e);o.push(n+": "+r+";")})),o.join(" ")},e.isNumeric=function(e){return""!==e&&!isNaN(parseFloat(e))&&isFinite(e)},e.escape=function(e){return null!=e&&e.replace?e.replace(p,(function(e){return l[e]})):e},e.normalizeWheel=function(e){var t=0,o=0,r=0,n=0;return"detail"in e&&(o=e.detail),"wheelDelta"in e&&(o=-e.wheelDelta/120),"wheelDeltaY"in e&&(o=-e.wheelDeltaY/120),"wheelDeltaX"in e&&(t=-e.wheelDeltaX/120),"axis"in e&&e.axis===e.HORIZONTAL_AXIS&&(t=o,o=0),r=10*t,n=10*o,"deltaY"in e&&(n=e.deltaY),"deltaX"in e&&(r=e.deltaX),(r||n)&&e.deltaMode&&(1==e.deltaMode?(r*=40,n*=40):(r*=800,n*=800)),r&&!t&&(t=r<1?-1:1),n&&!o&&(o=n<1?-1:1),{spinX:t,spinY:o,pixelX:r,pixelY:n}},e.debounce=function(e,t,o){var r;return void 0===o&&(o=!1),function(){for(var n=[],i=0;i<arguments.length;i++)n[i]=arguments[i];var s=this,a=o&&!r;window.clearTimeout(r),r=window.setTimeout((function(){r=null,o||e.apply(s,n)}),t),a&&e.apply(s,n)}},e.stopPropagationForAgGrid=function(e){e[s]=!0},e.isStopPropagationForAgGrid=function(e){return!0===e[s]},e.executeInAWhile=function(e){this.executeAfter(e,400)},e.executeNextVMTurn=function(e){this.executeAfter(e,0)},e.executeAfter=function(e,t){e.length>0&&window.setTimeout((function(){e.forEach((function(e){return e()}))}),t)},e.referenceCompare=function(e,t){return null==e&&null==t||(null!=e||!t)&&(!e||null!=t)&&e===t},e.get=function(t,o,r){if(null==t)return r;if(o.indexOf(".")>-1){var n=o.split(".");return null!=(i=t[n[0]])?e.get(i,n.slice(1,n.length).join("."),r):r}var i;return null!=(i=t[o])?i:r},e.addSafePassiveEventListener=function(t,o,r,n){-1!==e.passiveEvents.indexOf(o)&&(void 0===n?n={}:"boolean"==typeof n&&(n={capture:n}),n.passive=!0),t.addEventListener(o,r,n)},e.camelCaseToHumanText=function(e){return e&&null!=e?e.replace(/([A-Z])([A-Z])([a-z])|([a-z])([A-Z])/g,"$1$4 $2$3$5").replace("."," ").split(" ").map((function(e){return e.substring(0,1).toUpperCase()+(e.length>1?e.substring(1,e.length):"")})).join(" "):null},e.message=function(e){var t=document.createElement("div");t.innerHTML=e;var o=document.querySelector("#__ag__message");o||(o=this.loadTemplate('<div id="__ag__message" style="display: inline-block; position: absolute; top: 0px; left: 0px; color: white; background-color: black; z-index: 20; padding: 2px; border: 1px solid darkred; height: 200px; overflow-y: auto;"></div>'),document.body&&document.body.appendChild(o)),o.insertBefore(t,o.children[0])},e.sortRowNodesByOrder=function(e,t){if(e){for(var o=function(e,o){var r=t[e.id],n=t[o.id],i=void 0!==r,s=void 0!==n;return i&&s?r-n:i||s?i?1:-1:e.__objectId-o.__objectId},r=!1,n=0;n<e.length-1;n++)if(o(e[n],e[n+1])>0){r=!0;break}r&&e.sort(o)}},e.fuzzyCheckStrings=function(e,t,o){var r=this,n={},i=e.filter((function(e){return!t.some((function(t){return t===e}))}));return i.length>0&&i.forEach((function(e){return n[e]=r.fuzzySuggestions(e,t,o)})),n},e.fuzzySuggestions=function(e,o,r){var n=r.slice(0);return n.sort((function(o,r){var n=t._.string_similarity(o.toLowerCase(),e.toLowerCase()),i=t._.string_similarity(r.toLowerCase(),e.toLowerCase());return n>i?-1:n===i?0:1})),n},e.get_bigrams=function(e){var t,o,r,n=e.toLowerCase(),i=new Array(n.length-1);for(t=o=0,r=i.length;o<=r;t=o+=1)i[t]=n.slice(t,t+2);return i},e.isNumpadDelWithNumlockOnForEdgeOrIe=function(t){return!(!e.isBrowserEdge()&&!e.isBrowserIE())&&t.key===e.NUMPAD_DEL_NUMLOCK_ON_KEY&&t.charCode===e.NUMPAD_DEL_NUMLOCK_ON_CHARCODE},e.bindCellRendererToHtmlElement=function(e,t){e.then((function(e){var o=e.getGui();null!=o&&("object"==typeof o?t.appendChild(o):t.innerHTML=o)}))},e.PRINTABLE_CHARACTERS="qwertyuiopasdfghjklzxcvbnmQWERTYUIOPASDFGHJKLZXCVBNM1234567890!\"£$%^&*()_+-=[];'#,./\\|<>?:@~{}",e.NUMPAD_DEL_NUMLOCK_ON_KEY="Del",e.NUMPAD_DEL_NUMLOCK_ON_CHARCODE=46,e.doOnceFlags={},e.compose=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return function(t){return e.reduce((function(e,t){return t(e)}),t)}},e.decToHex=function(e,t){for(var o="",r=0;r<t;r++)o+=String.fromCharCode(255&e),e>>>=8;return o},e.utf8_encode=function(e){for(var t="",o=0,r=(e=e.replace(/\r\n/g,"\n")).length;o<r;o++){var n=e.charCodeAt(o);n<128?t+=String.fromCharCode(n):n>127&&n<2048?(t+=String.fromCharCode(n>>6|192),t+=String.fromCharCode(63&n|128)):(t+=String.fromCharCode(n>>12|224),t+=String.fromCharCode(n>>6&63|128),t+=String.fromCharCode(63&n|128))}return t},e.iconNameClassMap={columnGroupOpened:"expanded",columnGroupClosed:"contracted",columnSelectClosed:"tree-closed",columnSelectOpen:"tree-open",columnMovePin:"pin",columnMoveAdd:"plus",columnMoveHide:"eye-slash",columnMoveMove:"arrows",columnMoveLeft:"left",columnMoveRight:"right",columnMoveGroup:"group",columnMoveValue:"aggregation",columnMovePivot:"pivot",dropNotAllowed:"not-allowed",groupContracted:"expanded",groupExpanded:"contracted",checkboxChecked:"checkbox-checked",checkboxUnchecked:"checkbox-unchecked",checkboxIndeterminate:"checkbox-indeterminate",checkboxCheckedReadOnly:"checkbox-checked-readonly",checkboxUncheckedReadOnly:"checkbox-unchecked-readonly",checkboxIndeterminateReadOnly:"checkbox-indeterminate-readonly",groupLoading:"loading",menu:"menu",filter:"filter",columns:"columns",menuPin:"pin",menuValue:"aggregation",menuAddRowGroup:"group",menuRemoveRowGroup:"group",clipboardCopy:"copy",clipboardCut:"cut",clipboardPaste:"paste",pivotPanel:"pivot",rowGroupPanel:"group",valuePanel:"aggregation",columnDrag:"column-drag",rowDrag:"row-drag",sortAscending:"asc",sortDescending:"desc",sortUnSort:"none"},e.passiveEvents=["touchstart","touchend","touchmove","touchcancel"],e.string_similarity=function(t,o){if(t.length>0&&o.length>0){var r,n=e.get_bigrams(t),i=e.get_bigrams(o),s=n.length+i.length,a=0,l=void 0;for(l=0,r=n.length;l<r;l++){var p,u=n[l],d=void 0;for(d=0,p=i.length;d<p;d++)u===i[d]&&a++}if(a>0)return 2*a/s}return 0},e}();t.Utils=u;var d,c=function(){function e(e,t){void 0===e&&(e=0),void 0===t&&(t=1),this.nextValue=e,this.step=t}return e.prototype.next=function(){var e=this.nextValue;return this.nextValue+=this.step,e},e.prototype.peek=function(){return this.nextValue},e.prototype.skip=function(e){this.nextValue+=e},e}();t.NumberSequence=c,t._=u,function(e){e[e.IN_PROGRESS=0]="IN_PROGRESS",e[e.RESOLVED=1]="RESOLVED"}(d=t.PromiseStatus||(t.PromiseStatus={}));var h=function(){function e(e){this.status=d.IN_PROGRESS,this.resolution=null,this.listOfWaiters=[],e(this.onDone.bind(this),this.onReject.bind(this))}return e.all=function(t){return new e((function(e){var o=[],r=t.length;t.forEach((function(t,n){t.then((function(t){r--,o[n]=t,0==r&&e(o)})),o.push(null)}))}))},e.resolve=function(t){return new e((function(e){return e(t)}))},e.external=function(){var t;return{promise:new e((function(e){t=e})),resolve:function(e){t(e)}}},e.prototype.then=function(e){this.status===d.IN_PROGRESS?this.listOfWaiters.push(e):e(this.resolution)},e.prototype.firstOneOnly=function(e){this.status===d.IN_PROGRESS?0===this.listOfWaiters.length&&this.listOfWaiters.push(e):e(this.resolution)},e.prototype.map=function(t){var o=this;return new e((function(e){o.then((function(o){e(t(o))}))}))},e.prototype.resolveNow=function(e,t){return this.status==d.IN_PROGRESS?e:t(this.resolution)},e.prototype.onDone=function(e){this.status=d.RESOLVED,this.resolution=e,this.listOfWaiters.forEach((function(t){return t(e)}))},e.prototype.onReject=function(e){console.warn("TBI")},e}();t.Promise=h},83684:function(e,t,o){var r,n=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o])},r(e,t)},function(e,t){function o(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)}),i=this&&this.__decorate||function(e,t,o,r){var n,i=arguments.length,s=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,o):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,o,r);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(s=(i<3?n(s):i>3?n(t,o,s):n(t,o))||s);return i>3&&s&&Object.defineProperty(t,o,s),s},s=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)};Object.defineProperty(t,"__esModule",{value:!0});var a=o(96652),l=o(46410),p=o(4855),u=o(47008),d=o(47008),c=o(85397),h=o(75449),f=o(43389),g=o(2102),m=function(e){function t(t,o){var r=e.call(this,t,o)||this;return r.props=t,r.state=o,r.destroyed=!1,r.changeDetectionService=new f.ChangeDetectionService,r.api=null,r.portals=[],r.hasPendingPortalUpdate=!1,r}return n(t,e),t.prototype.render=function(){var e=this;return a.createElement("div",{style:this.createStyleForDiv(),ref:function(t){e.eGridDiv=t}},this.portals)},t.prototype.createStyleForDiv=function(){var e={height:"100%"},t=this.props.containerStyle;return t&&Object.keys(t).forEach((function(o){e[o]=t[o]})),e},t.prototype.componentDidMount=function(){var e={seedBeanInstances:{agGridReact:this}},t=this.props.gridOptions||{};c.AgGridColumn.hasChildColumns(this.props)&&(t.columnDefs=c.AgGridColumn.mapChildColumnDefs(this.props)),this.gridOptions=u.ComponentUtil.copyAttributesToGridOptions(t,this.props),new u.Grid(this.eGridDiv,this.gridOptions,e),this.api=this.gridOptions.api,this.columnApi=this.gridOptions.columnApi},t.prototype.shouldComponentUpdate=function(){return!1},t.prototype.waitForInstance=function(e,o,r){var n=this;if(void 0===r&&(r=0),e.getFrameworkComponentInstance()||e.isStatelesComponent())o(null);else{if(r>=t.MAX_COMPONENT_CREATION_TIME)return void console.error("ag-Grid: React Component '"+e.getReactComponentName()+"' not created within "+t.MAX_COMPONENT_CREATION_TIME+"ms");window.setTimeout((function(){return n.waitForInstance(e,o,r+5)}),5)}},t.prototype.mountReactPortal=function(e,t,o){this.portals=this.portals.concat([e]),this.batchUpdate(this.waitForInstance(t,o))},t.prototype.batchUpdate=function(e){var t=this;if(this.hasPendingPortalUpdate)return e&&e();setTimeout((function(){t.api&&t.forceUpdate((function(){e&&e(),t.hasPendingPortalUpdate=!1}))})),this.hasPendingPortalUpdate=!0},t.prototype.destroyPortal=function(e){this.portals=this.portals.filter((function(t){return t!==e})),this.batchUpdate()},t.prototype.getStrategyTypeForProp=function(e){if("rowData"===e){if(this.props.rowDataChangeDetectionStrategy)return this.props.rowDataChangeDetectionStrategy;if(this.props.deltaRowDataMode)return f.ChangeDetectionStrategyType.IdentityCheck}return f.ChangeDetectionStrategyType.DeepValueCheck},t.prototype.componentWillReceiveProps=function(e){var t=this,o=!!e.debug,r={};Object.keys(e).forEach((function(n){-1!==u.ComponentUtil.ALL_PROPERTIES.indexOf(n)&&(t.changeDetectionService.getStrategy(t.getStrategyTypeForProp(n)).areEqual(t.props[n],e[n])||(o&&console.log("agGridReact: ["+n+"] property changed"),r[n]={previousValue:t.props[n],currentValue:e[n]}))})),u.ComponentUtil.getEventCallbacks().forEach((function(n){t.props[n]!==e[n]&&(o&&console.log("agGridReact: ["+n+"] event callback changed"),r[n]={previousValue:t.props[n],currentValue:e[n]})})),u.ComponentUtil.processOnChange(r,this.gridOptions,this.api,this.columnApi)},t.prototype.componentWillUnmount=function(){this.api&&(this.api.destroy(),this.api=null)},t.MAX_COMPONENT_CREATION_TIME=1e3,t}(a.Component);function y(e,t){e.forEach((function(e){m[e]=t}))}t.AgGridReact=m,m.propTypes={gridOptions:p.object},y(u.ComponentUtil.getEventCallbacks(),p.func),y(u.ComponentUtil.BOOLEAN_PROPERTIES,p.bool),y(u.ComponentUtil.STRING_PROPERTIES,p.string),y(u.ComponentUtil.OBJECT_PROPERTIES,p.object),y(u.ComponentUtil.ARRAY_PROPERTIES,p.array),y(u.ComponentUtil.NUMBER_PROPERTIES,p.number),y(u.ComponentUtil.FUNCTION_PROPERTIES,p.func);var v=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),t.prototype.createWrapper=function(e){return this.useLegacyReact()?new g.LegacyReactComponent(e,this.agGridReact):new h.ReactComponent(e,this.agGridReact)},t.prototype.useLegacyReact=function(){return"function"!=typeof l.unstable_renderSubtreeIntoContainer||this.agGridReact&&this.agGridReact.gridOptions&&!this.agGridReact.gridOptions.reactNext},i([d.Autowired("agGridReact"),s("design:type",m)],t.prototype,"agGridReact",void 0),i([d.Bean("frameworkComponentWrapper")],t)}(d.BaseComponentWrapper);u.Grid.setFrameworkBeans([v])},84210:function(e,t,o){var r=this&&this.__decorate||function(e,t,o,r){var n,i=arguments.length,s=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,o):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,o,r);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(s=(i<3?n(s):i>3?n(t,o,s):n(t,o))||s);return i>3&&s&&Object.defineProperty(t,o,s),s},n=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},i=this&&this.__param||function(e,t){return function(o,r){t(o,r,e)}};Object.defineProperty(t,"__esModule",{value:!0});var s=o(44329),a=o(37132),l=o(72493),p=o(83423),u=function(){function e(e,t){this.activeBlockLoadsCount=0,this.blocks=[],this.active=!0,this.maxConcurrentRequests=e,t&&t>0&&(this.checkBlockToLoadDebounce=p._.debounce(this.performCheckBlocksToLoad.bind(this),t))}return e.prototype.setBeans=function(e){this.logger=e.create("RowNodeBlockLoader")},e.prototype.addBlock=function(e){this.blocks.push(e)},e.prototype.removeBlock=function(e){p._.removeFromArray(this.blocks,e)},e.prototype.destroy=function(){this.active=!1},e.prototype.loadComplete=function(){this.activeBlockLoadsCount--},e.prototype.checkBlockToLoad=function(){this.checkBlockToLoadDebounce?this.checkBlockToLoadDebounce():this.performCheckBlocksToLoad()},e.prototype.performCheckBlocksToLoad=function(){if(this.active)if(this.printCacheStatus(),this.activeBlockLoadsCount>=this.maxConcurrentRequests)this.logger.log("checkBlockToLoad: max loads exceeded");else{var e=null;this.blocks.forEach((function(t){t.getState()===s.RowNodeBlock.STATE_DIRTY&&(e=t)})),e?(e.load(),this.activeBlockLoadsCount++,this.logger.log("checkBlockToLoad: loading page "+e.getBlockNumber()),this.printCacheStatus()):this.logger.log("checkBlockToLoad: no pages to load")}},e.prototype.getBlockState=function(){var e={};return this.blocks.forEach((function(t){var o=t.getNodeIdPrefix(),r={blockNumber:t.getBlockNumber(),startRow:t.getStartRow(),endRow:t.getEndRow(),pageStatus:t.getState()};p._.exists(o)?e[o+t.getBlockNumber()]=r:e[t.getBlockNumber()]=r})),e},e.prototype.printCacheStatus=function(){this.logger.isLogging()&&this.logger.log("printCacheStatus: activePageLoadsCount = "+this.activeBlockLoadsCount+", blocks = "+JSON.stringify(this.getBlockState()))},r([i(0,l.Qualifier("loggerFactory")),n("design:type",Function),n("design:paramtypes",[a.LoggerFactory]),n("design:returntype",void 0)],e.prototype,"setBeans",null),e}();t.RowNodeBlockLoader=u},84715:function(e,t,o){var r,n=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o])},r(e,t)},function(e,t){function o(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)}),i=this&&this.__decorate||function(e,t,o,r){var n,i=arguments.length,s=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,o):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,o,r);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(s=(i<3?n(s):i>3?n(t,o,s):n(t,o))||s);return i>3&&s&&Object.defineProperty(t,o,s),s},s=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)};Object.defineProperty(t,"__esModule",{value:!0});var a=o(46379),l=o(45727),p=o(72493),u=o(44081),d=o(93121),c=o(83423),h=function(e){function t(){var t=e.call(this,'<div class="ag-cell-edit-input"><select class="ag-cell-edit-input"/></div>')||this;return t.eSelect=t.getGui().querySelector("select"),t}return n(t,e),t.prototype.init=function(e){var t=this;this.focusAfterAttached=e.cellStartedEdit,c._.missing(e.values)?console.warn("ag-Grid: no values found for select cellEditor"):(e.values.forEach((function(o){var r=document.createElement("option");r.value=o;var n=t.valueFormatterService.formatValue(e.column,null,null,o),i=null!=n;r.text=i?n:o,e.value===o&&(r.selected=!0),t.eSelect.appendChild(r)})),this.gridOptionsWrapper.isFullRowEdit()||this.addDestroyableEventListener(this.eSelect,"change",(function(){return e.stopEditing()})),this.addDestroyableEventListener(this.eSelect,"keydown",(function(e){(e.keyCode===l.Constants.KEY_UP||e.keyCode===l.Constants.KEY_DOWN)&&e.stopPropagation()})),this.addDestroyableEventListener(this.eSelect,"mousedown",(function(e){e.stopPropagation()})))},t.prototype.afterGuiAttached=function(){this.focusAfterAttached&&this.eSelect.focus()},t.prototype.focusIn=function(){this.eSelect.focus()},t.prototype.getValue=function(){return this.eSelect.value},t.prototype.isPopup=function(){return!1},i([p.Autowired("gridOptionsWrapper"),s("design:type",u.GridOptionsWrapper)],t.prototype,"gridOptionsWrapper",void 0),i([p.Autowired("valueFormatterService"),s("design:type",d.ValueFormatterService)],t.prototype,"valueFormatterService",void 0),t}(a.PopupComponent);t.SelectCellEditor=h},85222:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0});var o=function(){function e(){}return e.EVENT_COLUMN_EVERYTHING_CHANGED="columnEverythingChanged",e.EVENT_NEW_COLUMNS_LOADED="newColumnsLoaded",e.EVENT_COLUMN_PIVOT_MODE_CHANGED="columnPivotModeChanged",e.EVENT_COLUMN_ROW_GROUP_CHANGED="columnRowGroupChanged",e.EVENT_EXPAND_COLLAPSE_ALL="expandOrCollapseAll",e.EVENT_COLUMN_PIVOT_CHANGED="columnPivotChanged",e.EVENT_GRID_COLUMNS_CHANGED="gridColumnsChanged",e.EVENT_COLUMN_VALUE_CHANGED="columnValueChanged",e.EVENT_COLUMN_MOVED="columnMoved",e.EVENT_COLUMN_VISIBLE="columnVisible",e.EVENT_COLUMN_PINNED="columnPinned",e.EVENT_COLUMN_GROUP_OPENED="columnGroupOpened",e.EVENT_COLUMN_RESIZED="columnResized",e.EVENT_DISPLAYED_COLUMNS_CHANGED="displayedColumnsChanged",e.EVENT_VIRTUAL_COLUMNS_CHANGED="virtualColumnsChanged",e.EVENT_ROW_GROUP_OPENED="rowGroupOpened",e.EVENT_ROW_DATA_CHANGED="rowDataChanged",e.EVENT_ROW_DATA_UPDATED="rowDataUpdated",e.EVENT_PINNED_ROW_DATA_CHANGED="pinnedRowDataChanged",e.EVENT_RANGE_SELECTION_CHANGED="rangeSelectionChanged",e.EVENT_TOOL_PANEL_VISIBLE_CHANGED="toolPanelVisibleChanged",e.EVENT_MODEL_UPDATED="modelUpdated",e.EVENT_PASTE_START="pasteStart",e.EVENT_PASTE_END="pasteEnd",e.EVENT_CELL_CLICKED="cellClicked",e.EVENT_CELL_DOUBLE_CLICKED="cellDoubleClicked",e.EVENT_CELL_MOUSE_DOWN="cellMouseDown",e.EVENT_CELL_CONTEXT_MENU="cellContextMenu",e.EVENT_CELL_VALUE_CHANGED="cellValueChanged",e.EVENT_ROW_VALUE_CHANGED="rowValueChanged",e.EVENT_CELL_FOCUSED="cellFocused",e.EVENT_ROW_SELECTED="rowSelected",e.EVENT_SELECTION_CHANGED="selectionChanged",e.EVENT_CELL_KEY_DOWN="cellKeyDown",e.EVENT_CELL_KEY_PRESS="cellKeyPress",e.EVENT_CELL_MOUSE_OVER="cellMouseOver",e.EVENT_CELL_MOUSE_OUT="cellMouseOut",e.EVENT_FILTER_CHANGED="filterChanged",e.EVENT_FILTER_MODIFIED="filterModified",e.EVENT_FILTER_OPENED="filterOpened",e.EVENT_SORT_CHANGED="sortChanged",e.EVENT_VIRTUAL_ROW_REMOVED="virtualRowRemoved",e.EVENT_ROW_CLICKED="rowClicked",e.EVENT_ROW_DOUBLE_CLICKED="rowDoubleClicked",e.EVENT_GRID_READY="gridReady",e.EVENT_GRID_SIZE_CHANGED="gridSizeChanged",e.EVENT_VIEWPORT_CHANGED="viewportChanged",e.EVENT_FIRST_DATA_RENDERED="firstDataRendered",e.EVENT_DRAG_STARTED="dragStarted",e.EVENT_DRAG_STOPPED="dragStopped",e.EVENT_ROW_EDITING_STARTED="rowEditingStarted",e.EVENT_ROW_EDITING_STOPPED="rowEditingStopped",e.EVENT_CELL_EDITING_STARTED="cellEditingStarted",e.EVENT_CELL_EDITING_STOPPED="cellEditingStopped",e.EVENT_BODY_SCROLL="bodyScroll",e.EVENT_ANIMATION_QUEUE_EMPTY="animationQueueEmpty",e.EVENT_HEIGHT_SCALE_CHANGED="heightScaleChanged",e.EVENT_PAGINATION_CHANGED="paginationChanged",e.EVENT_COMPONENT_STATE_CHANGED="componentStateChanged",e.EVENT_BODY_HEIGHT_CHANGED="bodyHeightChanged",e.EVENT_DISPLAYED_COLUMNS_WIDTH_CHANGED="displayedColumnsWidthChanged",e.EVENT_SCROLL_VISIBILITY_CHANGED="scrollVisibilityChanged",e.EVENT_COLUMN_HOVER_CHANGED="columnHoverChanged",e.EVENT_FLASH_CELLS="flashCells",e.EVENT_ROW_DRAG_ENTER="rowDragEnter",e.EVENT_ROW_DRAG_MOVE="rowDragMove",e.EVENT_ROW_DRAG_LEAVE="rowDragLeave",e.EVENT_ROW_DRAG_END="rowDragEnd",e.EVENT_COLUMN_ROW_GROUP_CHANGE_REQUEST="columnRowGroupChangeRequest",e.EVENT_COLUMN_PIVOT_CHANGE_REQUEST="columnPivotChangeRequest",e.EVENT_COLUMN_VALUE_CHANGE_REQUEST="columnValueChangeRequest",e.EVENT_COLUMN_AGG_FUNC_CHANGE_REQUEST="columnAggFuncChangeRequest",e}();t.Events=o},85397:function(e,t,o){var r,n=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o])},r(e,t)},function(e,t){function o(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)});Object.defineProperty(t,"__esModule",{value:!0});var i=o(96652),s=o(96652),a=o(4855),l=o(47008),p=function(e){function t(t,o){var r=e.call(this,t,o)||this;return r.props=t,r.state=o,r}return n(t,e),t.prototype.render=function(){return null},t.mapChildColumnDefs=function(e){return i.Children.map(e.children,(function(e){return t.toColDef(e.props)}))},t.toColDef=function(e){var o=t.createColDefFromGridColumn(e);return t.hasChildColumns(e)&&(o.children=t.getChildColDefs(e.children)),o},t.hasChildColumns=function(e){return i.Children.count(e.children)>0},t.getChildColDefs=function(e){return i.Children.map(e,(function(e){return t.createColDefFromGridColumn(e.props)}))},t.createColDefFromGridColumn=function(e){var o={};return t.assign(o,e),delete o.children,o},t.assign=function(e,t){return[t].reduce((function(e,t){return Object.keys(t).forEach((function(o){e[o]=t[o]})),e}),e)},t}(s.Component);function u(e,t){e.forEach((function(e){p[e]=t}))}t.AgGridColumn=p,u(l.ColDefUtil.BOOLEAN_PROPERTIES,a.bool),u(l.ColDefUtil.STRING_PROPERTIES,a.string),u(l.ColDefUtil.OBJECT_PROPERTIES,a.object),u(l.ColDefUtil.ARRAY_PROPERTIES,a.array),u(l.ColDefUtil.NUMBER_PROPERTIES,a.number),u(l.ColDefUtil.FUNCTION_PROPERTIES,a.func)},85910:function(e,t,o){var r=this&&this.__decorate||function(e,t,o,r){var n,i=arguments.length,s=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,o):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,o,r);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(s=(i<3?n(s):i>3?n(t,o,s):n(t,o))||s);return i>3&&s&&Object.defineProperty(t,o,s),s},n=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)};Object.defineProperty(t,"__esModule",{value:!0});var i,s=o(72493),a=o(44081),l=o(36777),p=o(69638),u=o(22743),d=o(83423);!function(e){e[e.DEFAULT=0]="DEFAULT",e[e.REGISTERED_BY_NAME=1]="REGISTERED_BY_NAME",e[e.HARDCODED=2]="HARDCODED"}(i=t.ComponentSource||(t.ComponentSource={}));var c=function(){function e(){}return e.prototype.newDateComponent=function(e){return this.createAndInitUserComponent(this.gridOptions,e,"dateComponent","agDateInput")},e.prototype.newHeaderComponent=function(e){return this.createAndInitUserComponent(e.column.getColDef(),e,"headerComponent","agColumnHeader")},e.prototype.newHeaderGroupComponent=function(e){return this.createAndInitUserComponent(e.columnGroup.getColGroupDef(),e,"headerGroupComponent","agColumnGroupHeader")},e.prototype.newFullWidthGroupRowInnerCellRenderer=function(e){return this.createAndInitUserComponent(this.gridOptions,e,"groupRowInnerRenderer",null,!0)},e.prototype.newFullWidthCellRenderer=function(e,t,o){return this.createAndInitUserComponent(null,e,t,o)},e.prototype.newCellRenderer=function(e,t){return this.createAndInitUserComponent(e,t,"cellRenderer",null,!0)},e.prototype.newPinnedRowCellRenderer=function(e,t){return this.createAndInitUserComponent(e,t,"pinnedRowCellRenderer",null,!0)},e.prototype.newCellEditor=function(e,t){return this.createAndInitUserComponent(e,t,"cellEditor","agCellEditor")},e.prototype.newInnerCellRenderer=function(e,t){return this.createAndInitUserComponent(e,t,"innerRenderer",null)},e.prototype.newLoadingOverlayComponent=function(e){return this.createAndInitUserComponent(this.gridOptions,e,"loadingOverlayComponent","agLoadingOverlay")},e.prototype.newNoRowsOverlayComponent=function(e){return this.createAndInitUserComponent(this.gridOptions,e,"noRowsOverlayComponent","agNoRowsOverlay")},e.prototype.newTooltipComponent=function(e){var t=e.column&&e.column.getColDef();return this.createAndInitUserComponent(t,e,"tooltipComponent","agTooltipComponent")},e.prototype.newFilterComponent=function(e,t,o,r){return this.createAndInitUserComponent(e,t,"filter",o,!1,r)},e.prototype.newFloatingFilterComponent=function(e,t,o){return this.createAndInitUserComponent(e,t,"floatingFilterComponent",o,!0)},e.prototype.newToolPanelComponent=function(e,t){return this.createAndInitUserComponent(e,t,"toolPanel")},e.prototype.newStatusPanelComponent=function(e,t){return this.createAndInitUserComponent(e,t,"statusPanel")},e.prototype.createAndInitUserComponent=function(e,t,o,r,n,i){void 0===n&&(n=!1),e||(e=this.gridOptions);var s=this.createComponentInstance(e,o,t,r,n);if(!s)return null;var a=s.componentInstance,l=this.createFinalParams(e,o,t,s.paramsFromSelector);this.addReactHacks(l);var p=i?i(l,a):l,u=this.initComponent(a,p);return null==u?d.Promise.resolve(a):u.map((function(e){return a}))},e.prototype.addReactHacks=function(e){var t=this.context.getBean("agGridReact");t&&(e.agGridReact=d._.cloneObject(t));var o=this.context.getBean("frameworkComponentWrapper");o&&(e.frameworkComponentWrapper=o)},e.prototype.createUserComponentFromConcreteClass=function(e,t){var o=new e;return this.initComponent(o,t),o},e.prototype.lookupComponentClassDef=function(e,t,o,r){void 0===o&&(o=null);var n,s=null,a=null,l=null,p=null;if(null!=e){var u=e[t];null==u||!0===u||("string"==typeof u?s=u:"boolean"==typeof u||(this.agComponentUtils.doesImplementIComponent(u)?a=u:l=u)),p=e[t+"Framework"],n=e[t+"Selector"]}if(a&&p||s&&p||l&&p)throw Error("ag-grid: you are trying to specify: "+t+" twice as a component.");if(p&&!this.frameworkComponentWrapper)throw Error("ag-grid: you are specifying a framework component but you are not using a framework version of ag-grid for : "+t);if(n&&(s||a||l||p))throw Error("ag-grid: you can't specify both, the selector and the component of ag-grid for : "+t);if(p)return{componentFromFramework:!0,component:p,source:i.HARDCODED,paramsFromSelector:null};if(a)return{componentFromFramework:!1,component:a,source:i.HARDCODED,paramsFromSelector:null};if(l)return this.agComponentUtils.adaptFunction(t,l,!1,i.HARDCODED);var d,c=n?n(o):null;if(!(d=c&&c.component?c.component:s||r))return null;var h=this.lookupFromRegisteredComponents(t,d);return{componentFromFramework:h.componentFromFramework,component:h.component,source:h.source,paramsFromSelector:c?c.params:null}},e.prototype.lookupFromRegisteredComponents=function(e,t){var o=null!=t?t:e,r=this.userComponentRegistry.retrieve(o);return null==r?null:r.componentFromFramework?{component:r.component,componentFromFramework:!0,source:i.REGISTERED_BY_NAME,paramsFromSelector:null}:this.agComponentUtils.doesImplementIComponent(r.component)?{component:r.component,componentFromFramework:!1,source:r.source==l.RegisteredComponentSource.REGISTERED?i.REGISTERED_BY_NAME:i.DEFAULT,paramsFromSelector:null}:this.agComponentUtils.adaptFunction(e,r.component,r.componentFromFramework,r.source==l.RegisteredComponentSource.REGISTERED?i.REGISTERED_BY_NAME:i.DEFAULT)},e.prototype.createFinalParams=function(e,t,o,r){void 0===r&&(r=null);var n={};d._.mergeDeep(n,o);var i=e?e[t+"Params"]:null;return null!=i&&("function"==typeof i?d._.mergeDeep(n,i(o)):"object"==typeof i&&d._.mergeDeep(n,i)),d._.mergeDeep(n,r),n},e.prototype.createComponentInstance=function(e,t,o,r,n){var i,s=this.lookupComponentClassDef(e,t,o,r);if(!s||!s.component)return n||console.error("Error creating component "+t+"=>"+r),null;if(s.componentFromFramework){var a=s.component,l=this.componentMetadataProvider.retrieve(t);i=this.frameworkComponentWrapper.wrap(a,l.mandatoryMethodList,l.optionalMethodList,r)}else i=new s.component;return{componentInstance:i,paramsFromSelector:s.paramsFromSelector}},e.prototype.initComponent=function(e,t){return this.context.wireBean(e),null==e.init?void 0:e.init(t)},r([s.Autowired("gridOptions"),n("design:type",Object)],e.prototype,"gridOptions",void 0),r([s.Autowired("gridOptionsWrapper"),n("design:type",a.GridOptionsWrapper)],e.prototype,"gridOptionsWrapper",void 0),r([s.Autowired("context"),n("design:type",s.Context)],e.prototype,"context",void 0),r([s.Autowired("agComponentUtils"),n("design:type",p.AgComponentUtils)],e.prototype,"agComponentUtils",void 0),r([s.Autowired("componentMetadataProvider"),n("design:type",u.ComponentMetadataProvider)],e.prototype,"componentMetadataProvider",void 0),r([s.Autowired("userComponentRegistry"),n("design:type",l.UserComponentRegistry)],e.prototype,"userComponentRegistry",void 0),r([s.Optional("frameworkComponentWrapper"),n("design:type",Object)],e.prototype,"frameworkComponentWrapper",void 0),r([s.Bean("userComponentFactory")],e)}();t.UserComponentFactory=c},86608:function(e,t,o){var r=this&&this.__decorate||function(e,t,o,r){var n,i=arguments.length,s=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,o):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,o,r);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(s=(i<3?n(s):i>3?n(t,o,s):n(t,o))||s);return i>3&&s&&Object.defineProperty(t,o,s),s},n=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)};Object.defineProperty(t,"__esModule",{value:!0});var i=o(26016),s=o(72493),a=o(44081),l=o(44871),p=o(98239),u=o(60843),d=o(63405),c=o(40797),h=o(83423),f=function(){function e(){}var t;return t=e,e.prototype.progressSort=function(e,t,o){void 0===o&&(o="api");var r=this.getNextSortDirection(e);this.setSortForColumn(e,r,t,o)},e.prototype.setSortForColumn=function(e,t,o,r){if(void 0===r&&(r="api"),t!==i.Column.SORT_ASC&&t!==i.Column.SORT_DESC&&(t=null),e.setSort(t,r),e.getSort()){var n=Number((new Date).valueOf());e.setSortedAt(n)}else e.setSortedAt(null);o&&!this.gridOptionsWrapper.isSuppressMultiSort()||this.clearSortBarThisColumn(e,r),this.dispatchSortChangedEvents()},e.prototype.onSortChanged=function(){this.dispatchSortChangedEvents()},e.prototype.dispatchSortChangedEvents=function(){var e={type:d.Events.EVENT_SORT_CHANGED,api:this.gridApi,columnApi:this.columnApi};this.eventService.dispatchEvent(e)},e.prototype.clearSortBarThisColumn=function(e,t){this.columnController.getPrimaryAndSecondaryAndAutoColumns().forEach((function(o){o!==e&&o.setSort(void 0,t)}))},e.prototype.getNextSortDirection=function(e){var o;if(o=e.getColDef().sortingOrder?e.getColDef().sortingOrder:this.gridOptionsWrapper.getSortingOrder()?this.gridOptionsWrapper.getSortingOrder():t.DEFAULT_SORTING_ORDER,!Array.isArray(o)||o.length<=0)return console.warn("ag-grid: sortingOrder must be an array with at least one element, currently it's "+o),null;var r,n=o.indexOf(e.getSort()),i=n<0,s=n==o.length-1;return r=i||s?o[0]:o[n+1],t.DEFAULT_SORTING_ORDER.indexOf(r)<0?(console.warn("ag-grid: invalid sort type "+r),null):r},e.prototype.getSortModel=function(){var e=this.getColumnsWithSortingOrdered();return h._.map(e,(function(e){return{colId:e.getColId(),sort:e.getSort()}}))},e.prototype.setSortModel=function(e,t){var o=this;void 0===t&&(t="api");var r=e&&e.length>0;this.columnController.getPrimaryAndSecondaryAndAutoColumns().forEach((function(n){var i=null,s=-1;if(r&&n.getColDef().sortable)for(var a=0;a<e.length;a++){var l=e[a];"string"==typeof l.colId&&"string"==typeof n.getColId()&&o.compareColIds(l,n)&&(i=l.sort,s=a)}i?(n.setSort(i,t),n.setSortedAt(s)):(n.setSort(null,t),n.setSortedAt(null))})),this.dispatchSortChangedEvents()},e.prototype.compareColIds=function(e,t){return e.colId===t.getColId()},e.prototype.getColumnsWithSortingOrdered=function(){var e=this.columnController.getPrimaryAndSecondaryAndAutoColumns(),t=h._.filter(e,(function(e){return!!e.getSort()}));return t.sort((function(e,t){return e.sortedAt-t.sortedAt})),t},e.prototype.getSortForRowController=function(){var e=this.getColumnsWithSortingOrdered();return h._.map(e,(function(e){return{inverter:e.getSort()===i.Column.SORT_ASC?1:-1,column:e}}))},e.DEFAULT_SORTING_ORDER=[i.Column.SORT_ASC,i.Column.SORT_DESC,null],r([s.Autowired("gridOptionsWrapper"),n("design:type",a.GridOptionsWrapper)],e.prototype,"gridOptionsWrapper",void 0),r([s.Autowired("columnController"),n("design:type",p.ColumnController)],e.prototype,"columnController",void 0),r([s.Autowired("eventService"),n("design:type",u.EventService)],e.prototype,"eventService",void 0),r([s.Autowired("columnApi"),n("design:type",l.ColumnApi)],e.prototype,"columnApi",void 0),r([s.Autowired("gridApi"),n("design:type",c.GridApi)],e.prototype,"gridApi",void 0),t=r([s.Bean("sortController")],e)}();t.SortController=f},86895:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0});var o=function(){function e(){}return e.prototype.dateComponent=function(e){return e.dateComponent},e.prototype.colDefFloatingCellRenderer=function(e){return e.pinnedRowCellRenderer},e.prototype.colDefCellRenderer=function(e){return e.cellRenderer},e.prototype.colDefCellEditor=function(e){return e.cellEditor},e.prototype.colDefFilter=function(e){return e.filter},e.prototype.gridOptionsFullWidthCellRenderer=function(e){return e.fullWidthCellRenderer},e.prototype.gridOptionsGroupRowRenderer=function(e){return e.groupRowRenderer},e.prototype.gridOptionsGroupRowInnerRenderer=function(e){return e.groupRowInnerRenderer},e.prototype.setTimeout=function(e,t){window.setTimeout(e,t)},e}();t.BaseFrameworkFactory=o},87952:function(e,t,o){var r,n=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o])},r(e,t)},function(e,t){function o(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)}),i=this&&this.__decorate||function(e,t,o,r){var n,i=arguments.length,s=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,o):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,o,r);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(s=(i<3?n(s):i>3?n(t,o,s):n(t,o))||s);return i>3&&s&&Object.defineProperty(t,o,s),s},s=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)};Object.defineProperty(t,"__esModule",{value:!0});var a=o(22131),l=o(72493),p=o(15068),u=o(58342),d=o(85222),c=o(8534),h=o(83423),f=function(e){function t(t,o,r,n){var i=e.call(this,'<div class="ag-row-drag"></div>')||this;return i.visibleMode=null,i.rowNode=t,i.column=o,i.cellValue=r,i.beans=n,i}return n(t,e),t.prototype.postConstruct=function(){this.getGui().appendChild(h._.createIconNoSpan("rowDrag",this.beans.gridOptionsWrapper,null)),this.addDragSource(),this.checkCompatibility(),this.beans.gridOptionsWrapper.isRowDragManaged()?this.addFeature(this.beans.context,new m(this,this.beans,this.rowNode,this.column)):this.addFeature(this.beans.context,new g(this,this.beans,this.rowNode,this.column))},t.prototype.checkCompatibility=function(){var e=this.beans.gridOptionsWrapper.isRowDragManaged();this.beans.gridOptionsWrapper.isTreeData()&&e&&h._.doOnce((function(){return console.warn("ag-Grid: If using row drag with tree data, you cannot have rowDragManaged=true")}),"RowDragComp.managedAndTreeData")},t.prototype.addDragSource=function(){var e=this,t={rowNode:this.rowNode},o={type:u.DragSourceType.RowDrag,eElement:this.getGui(),dragItemName:this.cellValue,dragItemCallback:function(){return t},dragStartPixels:0};this.beans.dragAndDropService.addDragSource(o,!0),this.addDestroyFunc((function(){return e.beans.dragAndDropService.removeDragSource(o)}))},t.prototype.getVisibleMode=function(){return this.visibleMode},t.prototype.setVisibleMode=function(e){this.visibleMode=e},i([l.PostConstruct,s("design:type",Function),s("design:paramtypes",[]),s("design:returntype",void 0)],t.prototype,"postConstruct",null),t}(a.Component);t.RowDragComp=f;var g=function(e){function t(t,o,r,n){var i=e.call(this)||this;return i.parent=t,i.beans=o,i.column=n,i.rowNode=r,i}return n(t,e),t.prototype.postConstruct=function(){this.addDestroyableEventListener(this.beans.gridOptionsWrapper,"suppressRowDrag",this.onSuppressRowDrag.bind(this)),this.addDestroyableEventListener(this.rowNode,p.RowNode.EVENT_DATA_CHANGED,this.workOutVisibility.bind(this)),this.addDestroyableEventListener(this.rowNode,p.RowNode.EVENT_CELL_CHANGED,this.workOutVisibility.bind(this)),this.workOutVisibility()},t.prototype.onSuppressRowDrag=function(){this.workOutVisibility()},t.prototype.workOutVisibility=function(){if(this.beans.gridOptionsWrapper.isSuppressRowDrag())this.parent.setVisibleMode("display"),this.parent.setVisible(!1,"display");else{var e=this.column.isRowDrag(this.rowNode);if(!this.parent.getVisibleMode()){var t=h._.isFunction(this.column.getColDef().rowDrag);this.parent.setVisibleMode(t?"visibility":"display")}this.parent.setVisible(e,this.parent.getVisibleMode())}},i([l.PostConstruct,s("design:type",Function),s("design:paramtypes",[]),s("design:returntype",void 0)],t.prototype,"postConstruct",null),t}(c.BeanStub),m=function(e){function t(t,o,r,n){var i=e.call(this)||this;return i.parent=t,i.beans=o,i.column=n,i.rowNode=r,i}return n(t,e),t.prototype.postConstruct=function(){this.addDestroyableEventListener(this.beans.eventService,d.Events.EVENT_SORT_CHANGED,this.onSortChanged.bind(this)),this.addDestroyableEventListener(this.beans.eventService,d.Events.EVENT_FILTER_CHANGED,this.onFilterChanged.bind(this)),this.addDestroyableEventListener(this.beans.eventService,d.Events.EVENT_COLUMN_ROW_GROUP_CHANGED,this.onRowGroupChanged.bind(this)),this.addDestroyableEventListener(this.rowNode,p.RowNode.EVENT_DATA_CHANGED,this.workOutVisibility.bind(this)),this.addDestroyableEventListener(this.rowNode,p.RowNode.EVENT_CELL_CHANGED,this.workOutVisibility.bind(this)),this.addDestroyableEventListener(this.beans.gridOptionsWrapper,"suppressRowDrag",this.onSuppressRowDrag.bind(this)),this.updateSortActive(),this.updateFilterActive(),this.updateRowGroupActive(),this.workOutVisibility()},t.prototype.updateRowGroupActive=function(){var e=this.beans.columnController.getRowGroupColumns();this.rowGroupActive=!h._.missingOrEmpty(e)},t.prototype.onRowGroupChanged=function(){this.updateRowGroupActive(),this.workOutVisibility()},t.prototype.updateSortActive=function(){var e=this.beans.sortController.getSortModel();this.sortActive=!h._.missingOrEmpty(e)},t.prototype.onSortChanged=function(){this.updateSortActive(),this.workOutVisibility()},t.prototype.updateFilterActive=function(){this.filterActive=this.beans.filterManager.isAnyFilterPresent()},t.prototype.onFilterChanged=function(){this.updateFilterActive(),this.workOutVisibility()},t.prototype.onSuppressRowDrag=function(){this.workOutVisibility()},t.prototype.workOutVisibility=function(){var e=this.sortActive||this.filterActive||this.rowGroupActive,t=this.beans.gridOptionsWrapper.isSuppressRowDrag();if(e||t)this.parent.setVisibleMode("display"),this.parent.setVisible(!1,"display");else{var o=this.column.isRowDrag(this.rowNode);if(!this.parent.getVisibleMode()){var r=h._.isFunction(this.column.getColDef().rowDrag);this.parent.setVisibleMode(r?"visibility":"display")}this.parent.setVisible(o,this.parent.getVisibleMode())}},i([l.PostConstruct,s("design:type",Function),s("design:paramtypes",[]),s("design:returntype",void 0)],t.prototype,"postConstruct",null),t}(c.BeanStub)},88333:(e,t,o)=>{Object.defineProperty(t,"__esModule",{value:!0});var r=o(83423),n=function(){function e(t){var o=this;this.items=[],this.params=t,this.eGui=document.createElement("div"),this.eGui.innerHTML=e.TEMPLATE,this.eHeader=this.eGui.querySelector('[ref="tabHeader"]'),this.eBody=this.eGui.querySelector('[ref="tabBody"]'),r._.addCssClass(this.eGui,t.cssClass),t.items&&t.items.forEach((function(e){return o.addItem(e)}))}return e.prototype.setAfterAttachedParams=function(e){this.afterAttachedParams=e},e.prototype.getMinDimensions=function(){var e=this.eGui.cloneNode(!0),t=e.querySelector('[ref="tabBody"]');e.style.position="fixed",this.eGui.appendChild(e);var o=0,n=0;return this.items.forEach((function(i){r._.clearElement(t);var s=i.tabbedItem.bodyPromise.resolveNow(null,(function(e){return e.cloneNode(!0)}));null!=s&&(t.appendChild(s),o<e.offsetWidth&&(o=e.offsetWidth),n<e.offsetHeight&&(n=e.offsetHeight))})),this.eGui.removeChild(e),{height:n,width:o}},e.prototype.showFirstItem=function(){this.items.length>0&&this.showItemWrapper(this.items[0])},e.prototype.addItem=function(e){var t=document.createElement("span");t.appendChild(e.title),r._.addCssClass(t,"ag-tab"),this.eHeader.appendChild(t);var o={tabbedItem:e,eHeaderButton:t};this.items.push(o),t.addEventListener("click",this.showItemWrapper.bind(this,o))},e.prototype.showItem=function(e){var t=r._.find(this.items,(function(t){return t.tabbedItem===e}));t&&this.showItemWrapper(t)},e.prototype.showItemWrapper=function(e){var t=this;this.params.onItemClicked&&this.params.onItemClicked({item:e.tabbedItem}),this.activeItem!==e?(r._.clearElement(this.eBody),e.tabbedItem.bodyPromise.then((function(e){t.eBody.appendChild(e)})),this.activeItem&&r._.removeCssClass(this.activeItem.eHeaderButton,"ag-tab-selected"),r._.addCssClass(e.eHeaderButton,"ag-tab-selected"),this.activeItem=e,e.tabbedItem.afterAttachedCallback&&e.tabbedItem.afterAttachedCallback(this.afterAttachedParams)):r._.callIfPresent(this.params.onActiveItemClicked)},e.prototype.getGui=function(){return this.eGui},e.TEMPLATE='<div><div ref="tabHeader" class="ag-tab-header"></div><div ref="tabBody" class="ag-tab-body"></div></div>',e}();t.TabbedLayout=n},88842:function(e,t,o){var r=this&&this.__decorate||function(e,t,o,r){var n,i=arguments.length,s=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,o):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,o,r);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(s=(i<3?n(s):i>3?n(t,o,s):n(t,o))||s);return i>3&&s&&Object.defineProperty(t,o,s),s},n=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)};Object.defineProperty(t,"__esModule",{value:!0});var i=o(72493),s=o(44081),a=function(){function e(){this.cacheVersion=0}return e.prototype.init=function(){this.active=this.gridOptionsWrapper.isValueCache(),this.neverExpires=this.gridOptionsWrapper.isValueCacheNeverExpires()},e.prototype.onDataChanged=function(){this.neverExpires||this.expire()},e.prototype.expire=function(){this.cacheVersion++},e.prototype.setValue=function(e,t,o){this.active&&(e.__cacheVersion!==this.cacheVersion&&(e.__cacheVersion=this.cacheVersion,e.__cacheData={}),e.__cacheData[t]=o)},e.prototype.getValue=function(e,t){return this.active&&e.__cacheVersion===this.cacheVersion&&void 0!==e.__cacheData[t]?e.__cacheData[t]:void 0},r([i.Autowired("gridOptionsWrapper"),n("design:type",s.GridOptionsWrapper)],e.prototype,"gridOptionsWrapper",void 0),r([i.PostConstruct,n("design:type",Function),n("design:paramtypes",[]),n("design:returntype",void 0)],e.prototype,"init",null),r([i.Bean("valueCache")],e)}();t.ValueCache=a},89929:function(e,t,o){var r,n=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o])},r(e,t)},function(e,t){function o(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)}),i=this&&this.__decorate||function(e,t,o,r){var n,i=arguments.length,s=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,o):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,o,r);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(s=(i<3?n(s):i>3?n(t,o,s):n(t,o))||s);return i>3&&s&&Object.defineProperty(t,o,s),s},s=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)};Object.defineProperty(t,"__esModule",{value:!0});var a=o(44081),l=o(98239),p=o(26016),u=o(72493),d=o(40706),c=o(60843),h=o(63405),f=o(22131),g=o(47721),m=o(40797),y=o(41832),v=o(45727),C=o(83423),w=function(e){function t(){return e.call(this,t.TEMPLATE)||this}return n(t,e),t.prototype.registerGridComp=function(e){this.gridPanel=e,this.childContainers.forEach((function(t){return t.registerGridComp(e)}))},t.prototype.postConstruct=function(){var e=this;this.printLayout=this.gridOptionsWrapper.getDomLayout()===v.Constants.DOM_LAYOUT_PRINT,this.gridApi.registerHeaderRootComp(this),this.autoWidthCalculator.registerHeaderRootComp(this);var t=new d.HeaderContainer(this.eHeaderContainer,this.eHeaderViewport,null),o=new d.HeaderContainer(this.ePinnedLeftHeader,null,p.Column.PINNED_LEFT),r=new d.HeaderContainer(this.ePinnedRightHeader,null,p.Column.PINNED_RIGHT);this.childContainers=[t,o,r],this.childContainers.forEach((function(t){return e.getContext().wireBean(t)})),this.addDestroyableEventListener(this.eventService,h.Events.EVENT_COLUMN_VALUE_CHANGED,this.refreshHeader.bind(this)),this.addDestroyableEventListener(this.gridOptionsWrapper,a.GridOptionsWrapper.PROP_DOM_LAYOUT,this.onDomLayoutChanged.bind(this)),this.addDestroyableEventListener(this.eventService,h.Events.EVENT_COLUMN_PIVOT_MODE_CHANGED,this.onPivotModeChanged.bind(this)),this.onPivotModeChanged(),this.addPreventHeaderScroll(),this.columnController.isReady()&&this.refreshHeader()},t.prototype.onDomLayoutChanged=function(){var e=this.gridOptionsWrapper.getDomLayout()===v.Constants.DOM_LAYOUT_PRINT;this.printLayout!==e&&(this.printLayout=e,this.refreshHeader())},t.prototype.setHorizontalScroll=function(e){this.eHeaderContainer.style.transform="translateX("+e+"px)"},t.prototype.forEachHeaderElement=function(e){this.childContainers.forEach((function(t){return t.forEachHeaderElement(e)}))},t.prototype.destroy=function(){e.prototype.destroy.call(this),this.childContainers.forEach((function(e){return e.destroy()}))},t.prototype.refreshHeader=function(){this.childContainers.forEach((function(e){return e.refresh()}))},t.prototype.onPivotModeChanged=function(){var e=this.columnController.isPivotMode();C._.addOrRemoveCssClass(this.getGui(),"ag-pivot-on",e),C._.addOrRemoveCssClass(this.getGui(),"ag-pivot-off",!e)},t.prototype.setHeight=function(e){var t=e+"px";this.getGui().style.height=t,this.getGui().style.minHeight=t},t.prototype.addPreventHeaderScroll=function(){var e=this;this.addDestroyableEventListener(this.eHeaderViewport,"scroll",(function(){var t=e.eHeaderViewport.scrollLeft;0!==t&&(e.gridPanel.scrollHorizontally(t),e.eHeaderViewport.scrollLeft=0)}))},t.prototype.setHeaderContainerWidth=function(e){this.eHeaderContainer.style.width=e+"px"},t.prototype.setLeftVisible=function(e){C._.setVisible(this.ePinnedLeftHeader,e)},t.prototype.setRightVisible=function(e){C._.setVisible(this.ePinnedRightHeader,e)},t.TEMPLATE='<div class="ag-header" role="row">\n <div class="ag-pinned-left-header" ref="ePinnedLeftHeader" role="presentation"></div>\n <div class="ag-header-viewport" ref="eHeaderViewport" role="presentation">\n <div class="ag-header-container" ref="eHeaderContainer" role="presentation"></div>\n </div>\n <div class="ag-pinned-right-header" ref="ePinnedRightHeader" role="presentation"></div>\n </div>',i([g.RefSelector("ePinnedLeftHeader"),s("design:type",HTMLElement)],t.prototype,"ePinnedLeftHeader",void 0),i([g.RefSelector("ePinnedRightHeader"),s("design:type",HTMLElement)],t.prototype,"ePinnedRightHeader",void 0),i([g.RefSelector("eHeaderContainer"),s("design:type",HTMLElement)],t.prototype,"eHeaderContainer",void 0),i([g.RefSelector("eHeaderViewport"),s("design:type",HTMLElement)],t.prototype,"eHeaderViewport",void 0),i([u.Autowired("gridOptionsWrapper"),s("design:type",a.GridOptionsWrapper)],t.prototype,"gridOptionsWrapper",void 0),i([u.Autowired("columnController"),s("design:type",l.ColumnController)],t.prototype,"columnController",void 0),i([u.Autowired("eventService"),s("design:type",c.EventService)],t.prototype,"eventService",void 0),i([u.Autowired("gridApi"),s("design:type",m.GridApi)],t.prototype,"gridApi",void 0),i([u.Autowired("autoWidthCalculator"),s("design:type",y.AutoWidthCalculator)],t.prototype,"autoWidthCalculator",void 0),i([u.PostConstruct,s("design:type",Function),s("design:paramtypes",[]),s("design:returntype",void 0)],t.prototype,"postConstruct",null),t}(f.Component);t.HeaderRootComp=w},92378:function(e,t,o){var r,n=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o])},r(e,t)},function(e,t){function o(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)}),i=this&&this.__decorate||function(e,t,o,r){var n,i=arguments.length,s=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,o):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,o,r);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(s=(i<3?n(s):i>3?n(t,o,s):n(t,o))||s);return i>3&&s&&Object.defineProperty(t,o,s),s},s=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)};Object.defineProperty(t,"__esModule",{value:!0});var a=o(47721),l=o(13650),p=o(83423),u=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),t.prototype.modelFromFloatingFilter=function(e){return{type:this.selectedFilter,filter:Number(e),filterTo:this.filterNumberTo,filterType:"number"}},t.prototype.getApplicableFilterTypes=function(){return[l.BaseFilter.EQUALS,l.BaseFilter.NOT_EQUAL,l.BaseFilter.LESS_THAN,l.BaseFilter.LESS_THAN_OR_EQUAL,l.BaseFilter.GREATER_THAN,l.BaseFilter.GREATER_THAN_OR_EQUAL,l.BaseFilter.IN_RANGE]},t.prototype.bodyTemplate=function(e){var t=this.translate.bind(this),o=e==l.FilterConditionType.MAIN?"filterText":"filterConditionText",r=e==l.FilterConditionType.MAIN?"filterNumberToPanel":"filterNumberToPanelCondition",n=e==l.FilterConditionType.MAIN?"filterToText":"filterToConditionText";return'<div class="ag-filter-body">\n <div class="ag-input-text-wrapper">\n <input class="ag-filter-filter" id="'+o+'" type="text" placeholder="'+t("filterOoo")+'"/>\n </div>\n <div class="ag-input-text-wrapper ag-filter-number-to" id="'+r+'">\n <input class="ag-filter-filter" id="'+n+'" type="text" placeholder="'+t("filterOoo")+'"/>\n </div>\n </div>'},t.prototype.initialiseFilterBodyUi=function(t){e.prototype.initialiseFilterBodyUi.call(this,t),t===l.FilterConditionType.MAIN?(this.eFilterTextField=this.queryForHtmlInputElement("#filterText"),this.addFilterChangedEventListeners(t,this.eFilterTextField,this.eFilterToTextField)):(this.eFilterTextConditionField=this.queryForHtmlInputElement("#filterConditionText"),this.addFilterChangedEventListeners(t,this.eFilterTextConditionField,this.eFilterToConditionText),this.setFilter(this.filterNumberCondition,l.FilterConditionType.CONDITION),this.setFilterTo(this.filterNumberConditionTo,l.FilterConditionType.CONDITION),this.setFilterType(this.selectedFilterCondition,l.FilterConditionType.CONDITION))},t.prototype.addFilterChangedEventListeners=function(e,t,o){var r=this,n=this.getDebounceMs(this.filterParams),i=p._.debounce((function(){return r.onTextFieldsChanged(e,t,o)}),n);this.addDestroyableEventListener(t,"input",i),this.addDestroyableEventListener(o,"input",i)},t.prototype.afterGuiAttached=function(){this.eFilterTextField.focus()},t.prototype.comparator=function(){return function(e,t){return e===t?0:e<t?1:e>t?-1:void 0}},t.prototype.onTextFieldsChanged=function(e,t,o){var r=this.stringToFloat(t.value),n=this.stringToFloat(o.value);e===l.FilterConditionType.MAIN?this.filterNumber===r&&this.filterNumberTo===n||(this.filterNumber=r,this.filterNumberTo=n,this.onFilterChanged()):this.filterNumberCondition===r&&this.filterNumberConditionTo===n||(this.filterNumberCondition=r,this.filterNumberConditionTo=n,this.onFilterChanged())},t.prototype.filterValues=function(e){return e===l.FilterConditionType.MAIN?this.selectedFilter!==l.BaseFilter.IN_RANGE?this.asNumber(this.filterNumber):[this.asNumber(this.filterNumber),this.asNumber(this.filterNumberTo)]:this.selectedFilterCondition!==l.BaseFilter.IN_RANGE?this.asNumber(this.filterNumberCondition):[this.asNumber(this.filterNumberCondition),this.asNumber(this.filterNumberConditionTo)]},t.prototype.asNumber=function(e){return p._.isNumeric(e)?e:null},t.prototype.stringToFloat=function(e){var t=p._.makeNull(e);return t&&""===t.trim()&&(t=null),null!=t?parseFloat(t):null},t.prototype.setFilter=function(e,t){if(null!==(e=p._.makeNull(e))&&"number"!=typeof e&&(e=parseFloat(e)),t===l.FilterConditionType.MAIN){if(this.filterNumber=e,!this.eFilterTextField)return;this.eFilterTextField.value=e}else{if(this.filterNumberCondition=e,!this.eFilterTextConditionField)return;this.eFilterTextConditionField.value=e}},t.prototype.setFilterTo=function(e,t){if(null!==(e=p._.makeNull(e))&&"number"!=typeof e&&(e=parseFloat(e)),t===l.FilterConditionType.MAIN){if(this.filterNumberTo=e,!this.eFilterToTextField)return;this.eFilterToTextField.value=e}else{if(this.filterNumberConditionTo=e,!this.eFilterToConditionText)return;this.eFilterToConditionText.value=e}},t.prototype.getFilter=function(e){return e===l.FilterConditionType.MAIN?this.filterNumber:this.filterNumberCondition},t.prototype.serialize=function(e){var t=e===l.FilterConditionType.MAIN?this.selectedFilter:this.selectedFilterCondition,o=e===l.FilterConditionType.MAIN?this.filterNumber:this.filterNumberCondition,r=e===l.FilterConditionType.MAIN?this.filterNumberTo:this.filterNumberConditionTo;return{type:t||this.defaultFilter,filter:o,filterTo:r,filterType:"number"}},t.prototype.parse=function(e,t){this.setFilterType(e.type,t),this.setFilter(e.filter,t),this.setFilterTo(e.filterTo,t)},t.prototype.refreshFilterBodyUi=function(e){var o=e===l.FilterConditionType.MAIN?this.selectedFilter:this.selectedFilterCondition,r=e===l.FilterConditionType.MAIN?this.eNumberToPanel:this.eNumberToConditionPanel;if(r){var n=o===t.IN_RANGE;p._.setVisible(r,n)}var i=e===l.FilterConditionType.MAIN?this.eFilterTextField:this.eFilterTextConditionField;if(i){var s=!this.doesFilterHaveHiddenInput(o)&&o!==l.BaseFilter.EMPTY;p._.setVisible(i,s)}},t.prototype.resetState=function(e){void 0===e&&(e=!1),e||(this.setFilterType(this.defaultFilter,l.FilterConditionType.MAIN),this.setFilter(null,l.FilterConditionType.MAIN),this.setFilterTo(null,l.FilterConditionType.MAIN)),this.setFilterType(this.defaultFilter,l.FilterConditionType.CONDITION),this.setFilter(null,l.FilterConditionType.CONDITION),this.setFilterTo(null,l.FilterConditionType.CONDITION)},t.prototype.setType=function(e,t){this.setFilterType(e,t)},t.LESS_THAN="lessThan",i([a.QuerySelector("#filterText"),s("design:type",HTMLInputElement)],t.prototype,"eFilterTextField",void 0),i([a.QuerySelector("#filterTextCondition"),s("design:type",HTMLInputElement)],t.prototype,"eFilterTextConditionField",void 0),i([a.QuerySelector("#filterToText"),s("design:type",HTMLInputElement)],t.prototype,"eFilterToTextField",void 0),i([a.QuerySelector("#filterToConditionText"),s("design:type",HTMLInputElement)],t.prototype,"eFilterToConditionText",void 0),i([a.QuerySelector("#filterNumberToPanel"),s("design:type",HTMLElement)],t.prototype,"eNumberToPanel",void 0),i([a.QuerySelector("#filterNumberToPanelCondition"),s("design:type",HTMLElement)],t.prototype,"eNumberToConditionPanel",void 0),t}(l.ScalarBaseFilter);t.NumberFilter=u},92427:function(e,t,o){var r=this&&this.__decorate||function(e,t,o,r){var n,i=arguments.length,s=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,o):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,o,r);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(s=(i<3?n(s):i>3?n(t,o,s):n(t,o))||s);return i>3&&s&&Object.defineProperty(t,o,s),s},n=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)};Object.defineProperty(t,"__esModule",{value:!0});var i=o(72493),s=o(72493),a=function(){function e(){this.templateCache={},this.waitingCallbacks={}}return e.prototype.getTemplate=function(e,t){var o=this.templateCache[e];if(o)return o;var r=this.waitingCallbacks[e],n=this;if(!r){r=[],this.waitingCallbacks[e]=r;var i=new XMLHttpRequest;i.onload=function(){n.handleHttpResult(this,e)},i.open("GET",e),i.send()}return t&&r.push(t),null},e.prototype.handleHttpResult=function(e,t){if(200===e.status&&null!==e.response){this.templateCache[t]=e.response||e.responseText;for(var o=this.waitingCallbacks[t],r=0;r<o.length;r++)(0,o[r])();if(this.$scope){var n=this;window.setTimeout((function(){n.$scope.$apply()}),0)}}else console.warn("Unable to get template error "+e.status+" - "+t)},r([s.Autowired("$scope"),n("design:type",Object)],e.prototype,"$scope",void 0),r([i.Bean("templateService")],e)}();t.TemplateService=a},93121:function(e,t,o){var r=this&&this.__decorate||function(e,t,o,r){var n,i=arguments.length,s=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,o):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,o,r);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(s=(i<3?n(s):i>3?n(t,o,s):n(t,o))||s);return i>3&&s&&Object.defineProperty(t,o,s),s},n=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)};Object.defineProperty(t,"__esModule",{value:!0});var i=o(72493),s=o(44081),a=o(40634),l=function(){function e(){}return e.prototype.formatValue=function(e,t,o,r){var n,i=e.getColDef(),s=null;if(n=t&&t.rowPinned&&i.pinnedRowValueFormatter?i.pinnedRowValueFormatter:i.valueFormatter){var a={value:r,node:t,data:t?t.data:null,colDef:e.getColDef(),column:e,api:this.gridOptionsWrapper.getApi(),columnApi:this.gridOptionsWrapper.getColumnApi(),context:this.gridOptionsWrapper.getContext()};a.$scope=o,s=this.expressionService.evaluate(n,a)}else if(i.refData)return i.refData[r]||"";return null==s&&Array.isArray(r)&&(s=r.join(", ")),s},r([i.Autowired("gridOptionsWrapper"),n("design:type",s.GridOptionsWrapper)],e.prototype,"gridOptionsWrapper",void 0),r([i.Autowired("expressionService"),n("design:type",a.ExpressionService)],e.prototype,"expressionService",void 0),r([i.Bean("valueFormatterService")],e)}();t.ValueFormatterService=l},93830:function(e,t,o){var r,n=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o])},r(e,t)},function(e,t){function o(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)}),i=this&&this.__decorate||function(e,t,o,r){var n,i=arguments.length,s=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,o):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,o,r);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(s=(i<3?n(s):i>3?n(t,o,s):n(t,o))||s);return i>3&&s&&Object.defineProperty(t,o,s),s},s=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)};Object.defineProperty(t,"__esModule",{value:!0});var a=o(60843),l=o(72493),p=o(63405),u=o(8534),d=o(44871),c=o(40797),h=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),t.prototype.setMouseOver=function(e){this.selectedColumns=e;var t={type:p.Events.EVENT_COLUMN_HOVER_CHANGED,api:this.gridApi,columnApi:this.columnApi};this.eventService.dispatchEvent(t)},t.prototype.clearMouseOver=function(){this.selectedColumns=null;var e={type:p.Events.EVENT_COLUMN_HOVER_CHANGED,api:this.gridApi,columnApi:this.columnApi};this.eventService.dispatchEvent(e)},t.prototype.isHovered=function(e){return this.selectedColumns&&this.selectedColumns.indexOf(e)>=0},i([l.Autowired("eventService"),s("design:type",a.EventService)],t.prototype,"eventService",void 0),i([l.Autowired("columnApi"),s("design:type",d.ColumnApi)],t.prototype,"columnApi",void 0),i([l.Autowired("gridApi"),s("design:type",c.GridApi)],t.prototype,"gridApi",void 0),i([l.Bean("columnHoverService")],t)}(u.BeanStub);t.ColumnHoverService=h},94192:(e,t,o)=>{var r,n=o(65994).process,i=Object.create,s=Object.defineProperty,a=Object.getOwnPropertyDescriptor,l=Object.getOwnPropertyNames,p=Object.getPrototypeOf,u=Object.prototype.hasOwnProperty,d=(e,t,o,r)=>{if(t&&"object"==typeof t||"function"==typeof t)for(let n of l(t))u.call(e,n)||n===o||s(e,n,{get:()=>t[n],enumerable:!(r=a(t,n))||r.enumerable});return e},c={};function h(...e){return e.reduce(((e,t)=>({...e,...null!=t?t:{}})),{})}function f(e){let t=!1;return new ReadableStream({async pull(o){if(!t)try{const{value:t,done:r}=await e.next();r?o.close():o.enqueue(t)}catch(e){o.error(e)}},async cancel(o){if(t=!0,e.return)try{await e.return(o)}catch(e){}}})}function g({tools:e=[],providerToolNames:t}){const o={},r={};for(const n of e)if("provider"===n.type&&n.id in t){const e=t[n.id];o[n.name]=e,r[e]=n.name}return{toProviderToolName:e=>{var t;return null!=(t=o[e])?t:e},toCustomToolName:e=>{var t;return null!=(t=r[e])?t:e}}}async function m(e,t){if(null==e)return Promise.resolve();const o=null==t?void 0:t.abortSignal;return new Promise(((t,r)=>{if(null==o?void 0:o.aborted)return void r(y());const n=setTimeout((()=>{i(),t()}),e),i=()=>{clearTimeout(n),null==o||o.removeEventListener("abort",s)},s=()=>{i(),r(y())};null==o||o.addEventListener("abort",s)}))}function y(){return new DOMException("Delay was aborted","AbortError")}((e,t)=>{for(var o in t)s(e,o,{get:t[o],enumerable:!0})})(c,{DEFAULT_MAX_DOWNLOAD_SIZE:()=>F,DelayedPromise:()=>v,DownloadError:()=>x,EventSourceParserStream:()=>St.EventSourceParserStream,VERSION:()=>Z,asSchema:()=>Ke,combineHeaders:()=>h,convertAsyncIteratorToReadableStream:()=>f,convertBase64ToUint8Array:()=>_,convertImageModelFileToDataUri:()=>S,convertToBase64:()=>R,convertToFormData:()=>O,convertUint8ArrayToBase64:()=>b,createBinaryResponseHandler:()=>Et,createEventSourceResponseHandler:()=>Ct,createIdGenerator:()=>G,createJsonErrorResponseHandler:()=>vt,createJsonResponseHandler:()=>wt,createProviderToolFactory:()=>ht,createProviderToolFactoryWithOutputSchema:()=>ft,createStatusCodeErrorResponseHandler:()=>_t,createToolNameMapping:()=>g,delay:()=>m,downloadBlob:()=>k,dynamicTool:()=>ct,executeTool:()=>Rt,extractResponseHeaders:()=>C,generateId:()=>j,getErrorMessage:()=>W,getFromApi:()=>Q,getRuntimeEnvironmentUserAgent:()=>q,injectJsonInstructionIntoMessages:()=>oe,isAbortError:()=>B,isNonNullable:()=>re,isParsableJson:()=>tt,isUrlSupported:()=>ne,jsonSchema:()=>$e,lazySchema:()=>qe,loadApiKey:()=>se,loadOptionalSetting:()=>ae,loadSetting:()=>pe,mediaTypeToExtension:()=>ue,normalizeHeaders:()=>$,parseJSON:()=>Xe,parseJsonEventStream:()=>rt,parseProviderOptions:()=>it,postFormDataToApi:()=>pt,postJsonToApi:()=>lt,postToApi:()=>ut,readResponseWithSizeLimit:()=>M,removeUndefinedEntries:()=>gt,resolve:()=>mt,safeParseJSON:()=>et,safeValidateTypes:()=>Qe,tool:()=>dt,validateTypes:()=>Je,withUserAgentSuffix:()=>K,withoutTrailingSlash:()=>bt,zodSchema:()=>Ze}),e.exports=(r=c,d(s({},"__esModule",{value:!0}),r));var v=class{constructor(){this.status={type:"pending"},this._resolve=void 0,this._reject=void 0}get promise(){return this._promise||(this._promise=new Promise(((e,t)=>{"resolved"===this.status.type?e(this.status.value):"rejected"===this.status.type&&t(this.status.error),this._resolve=e,this._reject=t}))),this._promise}resolve(e){var t;this.status={type:"resolved",value:e},this._promise&&(null==(t=this._resolve)||t.call(this,e))}reject(e){var t;this.status={type:"rejected",error:e},this._promise&&(null==(t=this._reject)||t.call(this,e))}isResolved(){return"resolved"===this.status.type}isRejected(){return"rejected"===this.status.type}isPending(){return"pending"===this.status.type}};function C(e){return Object.fromEntries([...e.headers])}var{btoa:w,atob:E}=globalThis;function _(e){const t=e.replace(/-/g,"+").replace(/_/g,"/"),o=E(t);return Uint8Array.from(o,(e=>e.codePointAt(0)))}function b(e){let t="";for(let o=0;o<e.length;o++)t+=String.fromCodePoint(e[o]);return w(t)}function R(e){return e instanceof Uint8Array?b(e):e}function S(e){return"url"===e.type?e.url:`data:${e.mediaType};base64,${"string"==typeof e.data?e.data:b(e.data)}`}function O(e,t={}){const{useArrayBrackets:o=!0}=t,r=new FormData;for(const[t,n]of Object.entries(e))if(null!=n)if(Array.isArray(n)){if(1===n.length){r.append(t,n[0]);continue}const e=o?`${t}[]`:t;for(const t of n)r.append(e,t)}else r.append(t,n);return r}var T,P,A=o(10292),I="AI_DownloadError",D=`vercel.ai.error.${I}`,N=Symbol.for(D),x=class extends(P=A.AISDKError,T=N,P){constructor({url:e,statusCode:t,statusText:o,cause:r,message:n=(null==r?`Failed to download ${e}: ${t} ${o}`:`Failed to download ${e}: ${r}`)}){super({name:I,message:n,cause:r}),this[T]=!0,this.url=e,this.statusCode=t,this.statusText=o}static isInstance(e){return A.AISDKError.hasMarker(e,D)}},F=2147483648;async function M({response:e,url:t,maxBytes:o=F}){const r=e.headers.get("content-length");if(null!=r){const e=parseInt(r,10);if(!isNaN(e)&&e>o)throw new x({url:t,message:`Download of ${t} exceeded maximum size of ${o} bytes (Content-Length: ${e}).`})}const n=e.body;if(null==n)return new Uint8Array(0);const i=n.getReader(),s=[];let a=0;try{for(;;){const{done:e,value:r}=await i.read();if(e)break;if(a+=r.length,a>o)throw new x({url:t,message:`Download of ${t} exceeded maximum size of ${o} bytes.`});s.push(r)}}finally{try{await i.cancel()}finally{i.releaseLock()}}const l=new Uint8Array(a);let p=0;for(const e of s)l.set(e,p),p+=e.length;return l}async function k(e,t){var o,r;try{const n=await fetch(e,{signal:null==t?void 0:t.abortSignal});if(!n.ok)throw new x({url:e,statusCode:n.status,statusText:n.statusText});const i=await M({response:n,url:e,maxBytes:null!=(o=null==t?void 0:t.maxBytes)?o:F}),s=null!=(r=n.headers.get("content-type"))?r:void 0;return new Blob([i],s?{type:s}:void 0)}catch(t){if(x.isInstance(t))throw t;throw new x({url:e,cause:t})}}var L=o(10292),G=({prefix:e,size:t=16,alphabet:o="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz",separator:r="-"}={})=>{const n=()=>{const e=o.length,r=new Array(t);for(let n=0;n<t;n++)r[n]=o[Math.random()*e|0];return r.join("")};if(null==e)return n;if(o.includes(r))throw new L.InvalidArgumentError({argument:"separator",message:`The separator "${r}" must not be part of the alphabet "${o}".`});return()=>`${e}${r}${n()}`},j=G();function W(e){return null==e?"unknown error":"string"==typeof e?e:e instanceof Error?e.message:JSON.stringify(e)}var V=o(10292),H=o(10292);function B(e){return(e instanceof Error||e instanceof DOMException)&&("AbortError"===e.name||"ResponseAborted"===e.name||"TimeoutError"===e.name)}var z=["fetch failed","failed to fetch"],U=["ConnectionRefused","ConnectionClosed","FailedToOpenSocket","ECONNRESET","ECONNREFUSED","ETIMEDOUT","EPIPE"];function Y({error:e,url:t,requestBodyValues:o}){if(B(e))return e;if(e instanceof TypeError&&z.includes(e.message.toLowerCase())){const r=e.cause;if(null!=r)return new H.APICallError({message:`Cannot connect to API: ${r.message}`,cause:r,url:t,requestBodyValues:o,isRetryable:!0})}return function(e){if(!(e instanceof Error))return!1;const t=e.code;return!("string"!=typeof t||!U.includes(t))}(e)?new H.APICallError({message:`Cannot connect to API: ${e.message}`,cause:e,url:t,requestBodyValues:o,isRetryable:!0}):e}function q(e=globalThis){var t,o,r;return e.window?"runtime/browser":(null==(t=e.navigator)?void 0:t.userAgent)?`runtime/${e.navigator.userAgent.toLowerCase()}`:(null==(r=null==(o=e.process)?void 0:o.versions)?void 0:r.node)?`runtime/node.js/${e.process.version.substring(0)}`:e.EdgeRuntime?"runtime/vercel-edge":"runtime/unknown"}function $(e){if(null==e)return{};const t={};if(e instanceof Headers)e.forEach(((e,o)=>{t[o.toLowerCase()]=e}));else{Array.isArray(e)||(e=Object.entries(e));for(const[o,r]of e)null!=r&&(t[o.toLowerCase()]=r)}return t}function K(e,...t){const o=new Headers($(e)),r=o.get("user-agent")||"";return o.set("user-agent",[r,...t].filter(Boolean).join(" ")),Object.fromEntries(o.entries())}var Z="4.0.15",J=()=>globalThis.fetch,Q=async({url:e,headers:t={},successfulResponseHandler:o,failedResponseHandler:r,abortSignal:n,fetch:i=J()})=>{try{const s=await i(e,{method:"GET",headers:K(t,`ai-sdk/provider-utils/${Z}`,q()),signal:n}),a=C(s);if(!s.ok){let t;try{t=await r({response:s,url:e,requestBodyValues:{}})}catch(t){if(B(t)||V.APICallError.isInstance(t))throw t;throw new V.APICallError({message:"Failed to process error response",cause:t,statusCode:s.status,url:e,responseHeaders:a,requestBodyValues:{}})}throw t.value}try{return await o({response:s,url:e,requestBodyValues:{}})}catch(t){if(t instanceof Error&&(B(t)||V.APICallError.isInstance(t)))throw t;throw new V.APICallError({message:"Failed to process successful response",cause:t,statusCode:s.status,url:e,responseHeaders:a,requestBodyValues:{}})}}catch(t){throw Y({error:t,url:e,requestBodyValues:{}})}},X="JSON schema:",ee="You MUST answer with a JSON object that matches the JSON schema above.",te="You MUST answer with JSON.";function oe({messages:e,schema:t,schemaPrefix:o,schemaSuffix:r}){var n,i;const s="system"===(null==(n=e[0])?void 0:n.role)?{...e[0]}:{role:"system",content:""};return s.content=function({prompt:e,schema:t,schemaPrefix:o=(null!=t?X:void 0),schemaSuffix:r=(null!=t?ee:te)}){return[null!=e&&e.length>0?e:void 0,null!=e&&e.length>0?"":void 0,o,null!=t?JSON.stringify(t):void 0,r].filter((e=>null!=e)).join("\n")}({prompt:s.content,schema:t,schemaPrefix:o,schemaSuffix:r}),[s,..."system"===(null==(i=e[0])?void 0:i.role)?e.slice(1):e]}function re(e){return null!=e}function ne({mediaType:e,url:t,supportedUrls:o}){return t=t.toLowerCase(),e=e.toLowerCase(),Object.entries(o).map((([e,t])=>{const o=e.toLowerCase();return"*"===o||"*/*"===o?{mediaTypePrefix:"",regexes:t}:{mediaTypePrefix:o.replace(/\*/,""),regexes:t}})).filter((({mediaTypePrefix:t})=>e.startsWith(t))).flatMap((({regexes:e})=>e)).some((e=>e.test(t)))}var ie=o(10292);function se({apiKey:e,environmentVariableName:t,apiKeyParameterName:o="apiKey",description:r}){if("string"==typeof e)return e;if(null!=e)throw new ie.LoadAPIKeyError({message:`${r} API key must be a string.`});if(void 0===n)throw new ie.LoadAPIKeyError({message:`${r} API key is missing. Pass it using the '${o}' parameter. Environment variables is not supported in this environment.`});if(null==(e=n.env[t]))throw new ie.LoadAPIKeyError({message:`${r} API key is missing. Pass it using the '${o}' parameter or the ${t} environment variable.`});if("string"!=typeof e)throw new ie.LoadAPIKeyError({message:`${r} API key must be a string. The value of the ${t} environment variable is not a string.`});return e}function ae({settingValue:e,environmentVariableName:t}){return"string"==typeof e||null==e&&void 0!==n&&null!=(e=n.env[t])&&"string"==typeof e?e:void 0}var le=o(10292);function pe({settingValue:e,environmentVariableName:t,settingName:o,description:r}){if("string"==typeof e)return e;if(null!=e)throw new le.LoadSettingError({message:`${r} setting must be a string.`});if(void 0===n)throw new le.LoadSettingError({message:`${r} setting is missing. Pass it using the '${o}' parameter. Environment variables is not supported in this environment.`});if(null==(e=n.env[t]))throw new le.LoadSettingError({message:`${r} setting is missing. Pass it using the '${o}' parameter or the ${t} environment variable.`});if("string"!=typeof e)throw new le.LoadSettingError({message:`${r} setting must be a string. The value of the ${t} environment variable is not a string.`});return e}function ue(e){var t;const[o,r=""]=e.toLowerCase().split("/");return null!=(t={mpeg:"mp3","x-wav":"wav",opus:"ogg",mp4:"m4a","x-m4a":"m4a"}[r])?t:r}var de=o(10292),ce=/"__proto__"\s*:/,he=/"constructor"\s*:/;function fe(e){const t=JSON.parse(e);return null===t||"object"!=typeof t||!1===ce.test(e)&&!1===he.test(e)?t:function(e){let t=[e];for(;t.length;){const e=t;t=[];for(const o of e){if(Object.prototype.hasOwnProperty.call(o,"__proto__"))throw new SyntaxError("Object contains forbidden prototype property");if(Object.prototype.hasOwnProperty.call(o,"constructor")&&Object.prototype.hasOwnProperty.call(o.constructor,"prototype"))throw new SyntaxError("Object contains forbidden prototype property");for(const e in o){const r=o[e];r&&"object"==typeof r&&t.push(r)}}}return e}(t)}function ge(e){const{stackTraceLimit:t}=Error;try{Error.stackTraceLimit=0}catch(t){return fe(e)}try{return fe(e)}finally{Error.stackTraceLimit=t}}var me=o(10292),ye=o(10292),ve=((e,t,o)=>(o=null!=e?i(p(e)):{},d(e&&e.__esModule?o:s(o,"default",{value:e,enumerable:!0}),e)))(o(19844));function Ce(e){if("object"===e.type||Array.isArray(e.type)&&e.type.includes("object")){e.additionalProperties=!1;const{properties:t}=e;if(null!=t)for(const e of Object.keys(t))t[e]=we(t[e])}null!=e.items&&(e.items=Array.isArray(e.items)?e.items.map(we):we(e.items)),null!=e.anyOf&&(e.anyOf=e.anyOf.map(we)),null!=e.allOf&&(e.allOf=e.allOf.map(we)),null!=e.oneOf&&(e.oneOf=e.oneOf.map(we));const{definitions:t}=e;if(null!=t)for(const e of Object.keys(t))t[e]=we(t[e]);return e}function we(e){return"boolean"==typeof e?e:Ce(e)}var Ee=Symbol("Let zodToJsonSchema decide on which parser to use"),_e={name:void 0,$refStrategy:"root",basePath:["#"],effectStrategy:"input",pipeStrategy:"all",dateStrategy:"format:date-time",mapStrategy:"entries",removeAdditionalStrategy:"passthrough",allowedAdditionalProperties:!0,rejectedAdditionalProperties:!1,definitionPath:"definitions",strictUnions:!1,definitions:{},errorMessages:!1,patternStrategy:"escape",applyRegexFlags:!1,emailStrategy:"format:email",base64Strategy:"contentEncoding:base64",nameStrategy:"ref"},be=o(79203),Re=o(79203);function Se(e,t){return He(e.type._def,t)}function Oe(e,t,o){const r=null!=o?o:t.dateStrategy;if(Array.isArray(r))return{anyOf:r.map(((o,r)=>Oe(e,t,o)))};switch(r){case"string":case"format:date-time":return{type:"string",format:"date-time"};case"format:date":return{type:"string",format:"date"};case"integer":return Te(e)}}var Te=e=>{const t={type:"integer",format:"unix-time"};for(const o of e.checks)switch(o.kind){case"min":t.minimum=o.value;break;case"max":t.maximum=o.value}return t},Pe=o(79203),Ae=void 0,Ie={cuid:/^[cC][^\s-]{8,}$/,cuid2:/^[0-9a-z]+$/,ulid:/^[0-9A-HJKMNP-TV-Z]{26}$/,email:/^(?!\.)(?!.*\.\.)([a-zA-Z0-9_'+\-\.]*)[a-zA-Z0-9_+-]@([a-zA-Z0-9][a-zA-Z0-9\-]*\.)+[a-zA-Z]{2,}$/,emoji:()=>(void 0===Ae&&(Ae=RegExp("^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$","u")),Ae),uuid:/^[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}$/,ipv4:/^(?:(?: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])$/,ipv4Cidr:/^(?:(?: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])$/,ipv6:/^(([a-f0-9]{1,4}:){7}|::([a-f0-9]{1,4}:){0,6}|([a-f0-9]{1,4}:){1}:([a-f0-9]{1,4}:){0,5}|([a-f0-9]{1,4}:){2}:([a-f0-9]{1,4}:){0,4}|([a-f0-9]{1,4}:){3}:([a-f0-9]{1,4}:){0,3}|([a-f0-9]{1,4}:){4}:([a-f0-9]{1,4}:){0,2}|([a-f0-9]{1,4}:){5}:([a-f0-9]{1,4}:){0,1})([a-f0-9]{1,4}|(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2})))$/,ipv6Cidr:/^(([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])$/,base64:/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,base64url:/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,nanoid:/^[a-zA-Z0-9_-]{21}$/,jwt:/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/};function De(e,t){const o={type:"string"};if(e.checks)for(const r of e.checks)switch(r.kind){case"min":o.minLength="number"==typeof o.minLength?Math.max(o.minLength,r.value):r.value;break;case"max":o.maxLength="number"==typeof o.maxLength?Math.min(o.maxLength,r.value):r.value;break;case"email":switch(t.emailStrategy){case"format:email":Fe(o,"email",r.message,t);break;case"format:idn-email":Fe(o,"idn-email",r.message,t);break;case"pattern:zod":Me(o,Ie.email,r.message,t)}break;case"url":Fe(o,"uri",r.message,t);break;case"uuid":Fe(o,"uuid",r.message,t);break;case"regex":Me(o,r.regex,r.message,t);break;case"cuid":Me(o,Ie.cuid,r.message,t);break;case"cuid2":Me(o,Ie.cuid2,r.message,t);break;case"startsWith":Me(o,RegExp(`^${Ne(r.value,t)}`),r.message,t);break;case"endsWith":Me(o,RegExp(`${Ne(r.value,t)}$`),r.message,t);break;case"datetime":Fe(o,"date-time",r.message,t);break;case"date":Fe(o,"date",r.message,t);break;case"time":Fe(o,"time",r.message,t);break;case"duration":Fe(o,"duration",r.message,t);break;case"length":o.minLength="number"==typeof o.minLength?Math.max(o.minLength,r.value):r.value,o.maxLength="number"==typeof o.maxLength?Math.min(o.maxLength,r.value):r.value;break;case"includes":Me(o,RegExp(Ne(r.value,t)),r.message,t);break;case"ip":"v6"!==r.version&&Fe(o,"ipv4",r.message,t),"v4"!==r.version&&Fe(o,"ipv6",r.message,t);break;case"base64url":Me(o,Ie.base64url,r.message,t);break;case"jwt":Me(o,Ie.jwt,r.message,t);break;case"cidr":"v6"!==r.version&&Me(o,Ie.ipv4Cidr,r.message,t),"v4"!==r.version&&Me(o,Ie.ipv6Cidr,r.message,t);break;case"emoji":Me(o,Ie.emoji(),r.message,t);break;case"ulid":Me(o,Ie.ulid,r.message,t);break;case"base64":switch(t.base64Strategy){case"format:binary":Fe(o,"binary",r.message,t);break;case"contentEncoding:base64":o.contentEncoding="base64";break;case"pattern:zod":Me(o,Ie.base64,r.message,t)}break;case"nanoid":Me(o,Ie.nanoid,r.message,t)}return o}function Ne(e,t){return"escape"===t.patternStrategy?function(e){let t="";for(let o=0;o<e.length;o++)xe.has(e[o])||(t+="\\"),t+=e[o];return t}(e):e}var xe=new Set("ABCDEFGHIJKLMNOPQRSTUVXYZabcdefghijklmnopqrstuvxyz0123456789");function Fe(e,t,o,r){var n;e.format||(null==(n=e.anyOf)?void 0:n.some((e=>e.format)))?(e.anyOf||(e.anyOf=[]),e.format&&(e.anyOf.push({format:e.format}),delete e.format),e.anyOf.push({format:t,...o&&r.errorMessages&&{errorMessage:{format:o}}})):e.format=t}function Me(e,t,o,r){var n;e.pattern||(null==(n=e.allOf)?void 0:n.some((e=>e.pattern)))?(e.allOf||(e.allOf=[]),e.pattern&&(e.allOf.push({pattern:e.pattern}),delete e.pattern),e.allOf.push({pattern:ke(t,r),...o&&r.errorMessages&&{errorMessage:{pattern:o}}})):e.pattern=ke(t,r)}function ke(e,t){var o;if(!t.applyRegexFlags||!e.flags)return e.source;const r=e.flags.includes("i"),n=e.flags.includes("m"),i=e.flags.includes("s"),s=r?e.source.toLowerCase():e.source;let a="",l=!1,p=!1,u=!1;for(let e=0;e<s.length;e++)if(l)a+=s[e],l=!1;else{if(r)if(p){if(s[e].match(/[a-z]/)){u?(a+=s[e],a+=`${s[e-2]}-${s[e]}`.toUpperCase(),u=!1):"-"===s[e+1]&&(null==(o=s[e+2])?void 0:o.match(/[a-z]/))?(a+=s[e],u=!0):a+=`${s[e]}${s[e].toUpperCase()}`;continue}}else if(s[e].match(/[a-z]/)){a+=`[${s[e]}${s[e].toUpperCase()}]`;continue}if(n){if("^"===s[e]){a+="(^|(?<=[\r\n]))";continue}if("$"===s[e]){a+="($|(?=[\r\n]))";continue}}i&&"."===s[e]?a+=p?`${s[e]}\r\n`:`[${s[e]}\r\n]`:(a+=s[e],"\\"===s[e]?l=!0:p&&"]"===s[e]?p=!1:p||"["!==s[e]||(p=!0))}try{new RegExp(a)}catch(o){return console.warn(`Could not convert regex pattern at ${t.currentPath.join("/")} to a flag-independent form! Falling back to the flag-ignorant source`),e.source}return a}function Le(e,t){var o,r,n,i,s,a;const l={type:"object",additionalProperties:null!=(o=He(e.valueType._def,{...t,currentPath:[...t.currentPath,"additionalProperties"]}))?o:t.allowedAdditionalProperties};if((null==(r=e.keyType)?void 0:r._def.typeName)===Pe.ZodFirstPartyTypeKind.ZodString&&(null==(n=e.keyType._def.checks)?void 0:n.length)){const{type:o,...r}=De(e.keyType._def,t);return{...l,propertyNames:r}}if((null==(i=e.keyType)?void 0:i._def.typeName)===Pe.ZodFirstPartyTypeKind.ZodEnum)return{...l,propertyNames:{enum:e.keyType._def.values}};if((null==(s=e.keyType)?void 0:s._def.typeName)===Pe.ZodFirstPartyTypeKind.ZodBranded&&e.keyType._def.type._def.typeName===Pe.ZodFirstPartyTypeKind.ZodString&&(null==(a=e.keyType._def.type._def.checks)?void 0:a.length)){const{type:o,...r}=Se(e.keyType._def,t);return{...l,propertyNames:r}}return l}var Ge={ZodString:"string",ZodNumber:"number",ZodBigInt:"integer",ZodBoolean:"boolean",ZodNull:"null"};function je(e){try{return e.isOptional()}catch(e){return!0}}var We=(e,t,o)=>{switch(t){case be.ZodFirstPartyTypeKind.ZodString:return De(e,o);case be.ZodFirstPartyTypeKind.ZodNumber:return function(e){const t={type:"number"};if(!e.checks)return t;for(const o of e.checks)switch(o.kind){case"int":t.type="integer";break;case"min":o.inclusive?t.minimum=o.value:t.exclusiveMinimum=o.value;break;case"max":o.inclusive?t.maximum=o.value:t.exclusiveMaximum=o.value;break;case"multipleOf":t.multipleOf=o.value}return t}(e);case be.ZodFirstPartyTypeKind.ZodObject:return function(e,t){const o={type:"object",properties:{}},r=[],n=e.shape();for(const e in n){let i=n[e];if(void 0===i||void 0===i._def)continue;const s=je(i),a=He(i._def,{...t,currentPath:[...t.currentPath,"properties",e],propertyPath:[...t.currentPath,"properties",e]});void 0!==a&&(o.properties[e]=a,s||r.push(e))}r.length&&(o.required=r);const i=function(e,t){if("ZodNever"!==e.catchall._def.typeName)return He(e.catchall._def,{...t,currentPath:[...t.currentPath,"additionalProperties"]});switch(e.unknownKeys){case"passthrough":return t.allowedAdditionalProperties;case"strict":return t.rejectedAdditionalProperties;case"strip":return"strict"===t.removeAdditionalStrategy?t.allowedAdditionalProperties:t.rejectedAdditionalProperties}}(e,t);return void 0!==i&&(o.additionalProperties=i),o}(e,o);case be.ZodFirstPartyTypeKind.ZodBigInt:return function(e){const t={type:"integer",format:"int64"};if(!e.checks)return t;for(const o of e.checks)switch(o.kind){case"min":o.inclusive?t.minimum=o.value:t.exclusiveMinimum=o.value;break;case"max":o.inclusive?t.maximum=o.value:t.exclusiveMaximum=o.value;break;case"multipleOf":t.multipleOf=o.value}return t}(e);case be.ZodFirstPartyTypeKind.ZodBoolean:return{type:"boolean"};case be.ZodFirstPartyTypeKind.ZodDate:return Oe(e,o);case be.ZodFirstPartyTypeKind.ZodUndefined:return{not:{}};case be.ZodFirstPartyTypeKind.ZodNull:return{type:"null"};case be.ZodFirstPartyTypeKind.ZodArray:return function(e,t){var o,r,n;const i={type:"array"};return(null==(o=e.type)?void 0:o._def)&&(null==(n=null==(r=e.type)?void 0:r._def)?void 0:n.typeName)!==Re.ZodFirstPartyTypeKind.ZodAny&&(i.items=He(e.type._def,{...t,currentPath:[...t.currentPath,"items"]})),e.minLength&&(i.minItems=e.minLength.value),e.maxLength&&(i.maxItems=e.maxLength.value),e.exactLength&&(i.minItems=e.exactLength.value,i.maxItems=e.exactLength.value),i}(e,o);case be.ZodFirstPartyTypeKind.ZodUnion:case be.ZodFirstPartyTypeKind.ZodDiscriminatedUnion:return function(e,t){const o=e.options instanceof Map?Array.from(e.options.values()):e.options;if(o.every((e=>e._def.typeName in Ge&&(!e._def.checks||!e._def.checks.length)))){const e=o.reduce(((e,t)=>{const o=Ge[t._def.typeName];return o&&!e.includes(o)?[...e,o]:e}),[]);return{type:e.length>1?e:e[0]}}if(o.every((e=>"ZodLiteral"===e._def.typeName&&!e.description))){const e=o.reduce(((e,t)=>{const o=typeof t._def.value;switch(o){case"string":case"number":case"boolean":return[...e,o];case"bigint":return[...e,"integer"];case"object":if(null===t._def.value)return[...e,"null"];default:return e}}),[]);if(e.length===o.length){const t=e.filter(((e,t,o)=>o.indexOf(e)===t));return{type:t.length>1?t:t[0],enum:o.reduce(((e,t)=>e.includes(t._def.value)?e:[...e,t._def.value]),[])}}}else if(o.every((e=>"ZodEnum"===e._def.typeName)))return{type:"string",enum:o.reduce(((e,t)=>[...e,...t._def.values.filter((t=>!e.includes(t)))]),[])};return((e,t)=>{const o=(e.options instanceof Map?Array.from(e.options.values()):e.options).map(((e,o)=>He(e._def,{...t,currentPath:[...t.currentPath,"anyOf",`${o}`]}))).filter((e=>!!e&&(!t.strictUnions||"object"==typeof e&&Object.keys(e).length>0)));return o.length?{anyOf:o}:void 0})(e,t)}(e,o);case be.ZodFirstPartyTypeKind.ZodIntersection:return function(e,t){const o=[He(e.left._def,{...t,currentPath:[...t.currentPath,"allOf","0"]}),He(e.right._def,{...t,currentPath:[...t.currentPath,"allOf","1"]})].filter((e=>!!e)),r=[];return o.forEach((e=>{if("type"in(t=e)&&"string"===t.type||!("allOf"in t)){let t=e;if("additionalProperties"in e&&!1===e.additionalProperties){const{additionalProperties:o,...r}=e;t=r}r.push(t)}else r.push(...e.allOf);var t})),r.length?{allOf:r}:void 0}(e,o);case be.ZodFirstPartyTypeKind.ZodTuple:return function(e,t){return e.rest?{type:"array",minItems:e.items.length,items:e.items.map(((e,o)=>He(e._def,{...t,currentPath:[...t.currentPath,"items",`${o}`]}))).reduce(((e,t)=>void 0===t?e:[...e,t]),[]),additionalItems:He(e.rest._def,{...t,currentPath:[...t.currentPath,"additionalItems"]})}:{type:"array",minItems:e.items.length,maxItems:e.items.length,items:e.items.map(((e,o)=>He(e._def,{...t,currentPath:[...t.currentPath,"items",`${o}`]}))).reduce(((e,t)=>void 0===t?e:[...e,t]),[])}}(e,o);case be.ZodFirstPartyTypeKind.ZodRecord:return Le(e,o);case be.ZodFirstPartyTypeKind.ZodLiteral:return function(e){const t=typeof e.value;return"bigint"!==t&&"number"!==t&&"boolean"!==t&&"string"!==t?{type:Array.isArray(e.value)?"array":"object"}:{type:"bigint"===t?"integer":t,const:e.value}}(e);case be.ZodFirstPartyTypeKind.ZodEnum:return function(e){return{type:"string",enum:Array.from(e.values)}}(e);case be.ZodFirstPartyTypeKind.ZodNativeEnum:return function(e){const t=e.values,o=Object.keys(e.values).filter((e=>"number"!=typeof t[t[e]])).map((e=>t[e])),r=Array.from(new Set(o.map((e=>typeof e))));return{type:1===r.length?"string"===r[0]?"string":"number":["string","number"],enum:o}}(e);case be.ZodFirstPartyTypeKind.ZodNullable:return function(e,t){if(["ZodString","ZodNumber","ZodBigInt","ZodBoolean","ZodNull"].includes(e.innerType._def.typeName)&&(!e.innerType._def.checks||!e.innerType._def.checks.length))return{type:[Ge[e.innerType._def.typeName],"null"]};const o=He(e.innerType._def,{...t,currentPath:[...t.currentPath,"anyOf","0"]});return o&&{anyOf:[o,{type:"null"}]}}(e,o);case be.ZodFirstPartyTypeKind.ZodOptional:return((e,t)=>{var o;if(t.currentPath.toString()===(null==(o=t.propertyPath)?void 0:o.toString()))return He(e.innerType._def,t);const r=He(e.innerType._def,{...t,currentPath:[...t.currentPath,"anyOf","1"]});return r?{anyOf:[{not:{}},r]}:{}})(e,o);case be.ZodFirstPartyTypeKind.ZodMap:return function(e,t){return"record"===t.mapStrategy?Le(e,t):{type:"array",maxItems:125,items:{type:"array",items:[He(e.keyType._def,{...t,currentPath:[...t.currentPath,"items","items","0"]})||{},He(e.valueType._def,{...t,currentPath:[...t.currentPath,"items","items","1"]})||{}],minItems:2,maxItems:2}}}(e,o);case be.ZodFirstPartyTypeKind.ZodSet:return function(e,t){const o={type:"array",uniqueItems:!0,items:He(e.valueType._def,{...t,currentPath:[...t.currentPath,"items"]})};return e.minSize&&(o.minItems=e.minSize.value),e.maxSize&&(o.maxItems=e.maxSize.value),o}(e,o);case be.ZodFirstPartyTypeKind.ZodLazy:return()=>e.getter()._def;case be.ZodFirstPartyTypeKind.ZodPromise:return function(e,t){return He(e.type._def,t)}(e,o);case be.ZodFirstPartyTypeKind.ZodNaN:case be.ZodFirstPartyTypeKind.ZodNever:return{not:{}};case be.ZodFirstPartyTypeKind.ZodEffects:return function(e,t){return"input"===t.effectStrategy?He(e.schema._def,t):{}}(e,o);case be.ZodFirstPartyTypeKind.ZodAny:case be.ZodFirstPartyTypeKind.ZodUnknown:return{};case be.ZodFirstPartyTypeKind.ZodDefault:return function(e,t){return{...He(e.innerType._def,t),default:e.defaultValue()}}(e,o);case be.ZodFirstPartyTypeKind.ZodBranded:return Se(e,o);case be.ZodFirstPartyTypeKind.ZodReadonly:case be.ZodFirstPartyTypeKind.ZodCatch:return((e,t)=>He(e.innerType._def,t))(e,o);case be.ZodFirstPartyTypeKind.ZodPipeline:return((e,t)=>{if("input"===t.pipeStrategy)return He(e.in._def,t);if("output"===t.pipeStrategy)return He(e.out._def,t);const o=He(e.in._def,{...t,currentPath:[...t.currentPath,"allOf","0"]});return{allOf:[o,He(e.out._def,{...t,currentPath:[...t.currentPath,"allOf",o?"1":"0"]})].filter((e=>void 0!==e))}})(e,o);case be.ZodFirstPartyTypeKind.ZodFunction:case be.ZodFirstPartyTypeKind.ZodVoid:case be.ZodFirstPartyTypeKind.ZodSymbol:default:return}},Ve=(e,t)=>{let o=0;for(;o<e.length&&o<t.length&&e[o]===t[o];o++);return[(e.length-o).toString(),...t.slice(o)].join("/")};function He(e,t,o=!1){var r;const n=t.seen.get(e);if(t.override){const i=null==(r=t.override)?void 0:r.call(t,e,t,n,o);if(i!==Ee)return i}if(n&&!o){const e=Be(n,t);if(void 0!==e)return e}const i={def:e,path:t.currentPath,jsonSchema:void 0};t.seen.set(e,i);const s=We(e,e.typeName,t),a="function"==typeof s?He(s(),t):s;if(a&&ze(e,t,a),t.postProcess){const o=t.postProcess(a,e,t);return i.jsonSchema=a,o}return i.jsonSchema=a,a}var Be=(e,t)=>{switch(t.$refStrategy){case"root":return{$ref:e.path.join("/")};case"relative":return{$ref:Ve(t.currentPath,e.path)};case"none":case"seen":return e.path.length<t.currentPath.length&&e.path.every(((e,o)=>t.currentPath[o]===e))?(console.warn(`Recursive reference detected at ${t.currentPath.join("/")}! Defaulting to any`),{}):"seen"===t.$refStrategy?{}:void 0}},ze=(e,t,o)=>(e.description&&(o.description=e.description),o),Ue=(e,t)=>{var o;const r=(e=>{const t=(e=>"string"==typeof e?{..._e,name:e}:{..._e,...e})(e),o=void 0!==t.name?[...t.basePath,t.definitionPath,t.name]:t.basePath;return{...t,currentPath:o,propertyPath:void 0,seen:new Map(Object.entries(t.definitions).map((([e,o])=>[o._def,{def:o._def,path:[...t.basePath,t.definitionPath,e],jsonSchema:void 0}])))}})(t);let n="object"==typeof t&&t.definitions?Object.entries(t.definitions).reduce(((e,[t,o])=>{var n;return{...e,[t]:null!=(n=He(o._def,{...r,currentPath:[...r.basePath,r.definitionPath,t]},!0))?n:{}}}),{}):void 0;const i="string"==typeof t?t:"title"===(null==t?void 0:t.nameStrategy)||null==t?void 0:t.name,s=null!=(o=He(e._def,void 0===i?r:{...r,currentPath:[...r.basePath,r.definitionPath,i]},!1))?o:{},a="object"==typeof t&&void 0!==t.name&&"title"===t.nameStrategy?t.name:void 0;void 0!==a&&(s.title=a);const l=void 0===i?n?{...s,[r.definitionPath]:n}:s:{$ref:[..."relative"===r.$refStrategy?[]:r.basePath,r.definitionPath,i].join("/"),[r.definitionPath]:{...n,[i]:s}};return l.$schema="http://json-schema.org/draft-07/schema#",l},Ye=Symbol.for("vercel.ai.schema");function qe(e){let t;return()=>(null==t&&(t=e()),t)}function $e(e,{validate:t}={}){return{[Ye]:!0,_type:void 0,get jsonSchema(){return"function"==typeof e&&(e=e()),e},validate:t}}function Ke(e){return null==e?$e({properties:{},additionalProperties:!1}):"object"==typeof(o=e)&&null!==o&&Ye in o&&!0===o[Ye]&&"jsonSchema"in o&&"validate"in o?e:"~standard"in e?"zod"===e["~standard"].vendor?Ze(e):(t=e,$e((()=>Ce(t["~standard"].jsonSchema.input({target:"draft-07"}))),{validate:async e=>{const o=await t["~standard"].validate(e);return"value"in o?{success:!0,value:o.value}:{success:!1,error:new ye.TypeValidationError({value:e,cause:o.issues})}}})):e();var t,o}function Ze(e,t){return function(e){return"_zod"in e}(e)?function(e,t){var o;const r=null!=(o=null==t?void 0:t.useReferences)&&o;return $e((()=>Ce(ve.toJSONSchema(e,{target:"draft-7",io:"input",reused:r?"ref":"inline"}))),{validate:async t=>{const o=await ve.safeParseAsync(e,t);return o.success?{success:!0,value:o.data}:{success:!1,error:o.error}}})}(e,t):function(e,t){var o;const r=null!=(o=null==t?void 0:t.useReferences)&&o;return $e((()=>Ue(e,{$refStrategy:r?"root":"none"})),{validate:async t=>{const o=await e.safeParseAsync(t);return o.success?{success:!0,value:o.data}:{success:!1,error:o.error}}})}(e,t)}async function Je({value:e,schema:t,context:o}){const r=await Qe({value:e,schema:t,context:o});if(!r.success)throw me.TypeValidationError.wrap({value:e,cause:r.error,context:o});return r.value}async function Qe({value:e,schema:t,context:o}){const r=Ke(t);try{if(null==r.validate)return{success:!0,value:e,rawValue:e};const t=await r.validate(e);return t.success?{success:!0,value:t.value,rawValue:e}:{success:!1,error:me.TypeValidationError.wrap({value:e,cause:t.error,context:o}),rawValue:e}}catch(t){return{success:!1,error:me.TypeValidationError.wrap({value:e,cause:t,context:o}),rawValue:e}}}async function Xe({text:e,schema:t}){try{const o=ge(e);return null==t?o:Je({value:o,schema:t})}catch(t){if(de.JSONParseError.isInstance(t)||de.TypeValidationError.isInstance(t))throw t;throw new de.JSONParseError({text:e,cause:t})}}async function et({text:e,schema:t}){try{const o=ge(e);return null==t?{success:!0,value:o,rawValue:o}:await Qe({value:o,schema:t})}catch(t){return{success:!1,error:de.JSONParseError.isInstance(t)?t:new de.JSONParseError({text:e,cause:t}),rawValue:void 0}}}function tt(e){try{return ge(e),!0}catch(e){return!1}}var ot=o(19538);function rt({stream:e,schema:t}){return e.pipeThrough(new TextDecoderStream).pipeThrough(new ot.EventSourceParserStream).pipeThrough(new TransformStream({async transform({data:e},o){"[DONE]"!==e&&o.enqueue(await et({text:e,schema:t}))}}))}var nt=o(10292);async function it({provider:e,providerOptions:t,schema:o}){if(null==(null==t?void 0:t[e]))return;const r=await Qe({value:t[e],schema:o});if(!r.success)throw new nt.InvalidArgumentError({argument:"providerOptions",message:`invalid ${e} provider options`,cause:r.error});return r.value}var st=o(10292),at=()=>globalThis.fetch,lt=async({url:e,headers:t,body:o,failedResponseHandler:r,successfulResponseHandler:n,abortSignal:i,fetch:s})=>ut({url:e,headers:{"Content-Type":"application/json",...t},body:{content:JSON.stringify(o),values:o},failedResponseHandler:r,successfulResponseHandler:n,abortSignal:i,fetch:s}),pt=async({url:e,headers:t,formData:o,failedResponseHandler:r,successfulResponseHandler:n,abortSignal:i,fetch:s})=>ut({url:e,headers:t,body:{content:o,values:Object.fromEntries(o.entries())},failedResponseHandler:r,successfulResponseHandler:n,abortSignal:i,fetch:s}),ut=async({url:e,headers:t={},body:o,successfulResponseHandler:r,failedResponseHandler:n,abortSignal:i,fetch:s=at()})=>{try{const a=await s(e,{method:"POST",headers:K(t,`ai-sdk/provider-utils/${Z}`,q()),body:o.content,signal:i}),l=C(a);if(!a.ok){let t;try{t=await n({response:a,url:e,requestBodyValues:o.values})}catch(t){if(B(t)||st.APICallError.isInstance(t))throw t;throw new st.APICallError({message:"Failed to process error response",cause:t,statusCode:a.status,url:e,responseHeaders:l,requestBodyValues:o.values})}throw t.value}try{return await r({response:a,url:e,requestBodyValues:o.values})}catch(t){if(t instanceof Error&&(B(t)||st.APICallError.isInstance(t)))throw t;throw new st.APICallError({message:"Failed to process successful response",cause:t,statusCode:a.status,url:e,responseHeaders:l,requestBodyValues:o.values})}}catch(t){throw Y({error:t,url:e,requestBodyValues:o.values})}};function dt(e){return e}function ct(e){return{...e,type:"dynamic"}}function ht({id:e,inputSchema:t}){return({execute:o,outputSchema:r,needsApproval:n,toModelOutput:i,onInputStart:s,onInputDelta:a,onInputAvailable:l,...p})=>({type:"provider",id:e,args:p,inputSchema:t,outputSchema:r,execute:o,needsApproval:n,toModelOutput:i,onInputStart:s,onInputDelta:a,onInputAvailable:l})}function ft({id:e,inputSchema:t,outputSchema:o,supportsDeferredResults:r}){return({execute:n,needsApproval:i,toModelOutput:s,onInputStart:a,onInputDelta:l,onInputAvailable:p,...u})=>({type:"provider",id:e,args:u,inputSchema:t,outputSchema:o,execute:n,needsApproval:i,toModelOutput:s,onInputStart:a,onInputDelta:l,onInputAvailable:p,supportsDeferredResults:r})}function gt(e){return Object.fromEntries(Object.entries(e).filter((([e,t])=>null!=t)))}async function mt(e){return"function"==typeof e&&(e=e()),Promise.resolve(e)}var yt=o(10292),vt=({errorSchema:e,errorToMessage:t,isRetryable:o})=>async({response:r,url:n,requestBodyValues:i})=>{const s=await r.text(),a=C(r);if(""===s.trim())return{responseHeaders:a,value:new yt.APICallError({message:r.statusText,url:n,requestBodyValues:i,statusCode:r.status,responseHeaders:a,responseBody:s,isRetryable:null==o?void 0:o(r)})};try{const l=await Xe({text:s,schema:e});return{responseHeaders:a,value:new yt.APICallError({message:t(l),url:n,requestBodyValues:i,statusCode:r.status,responseHeaders:a,responseBody:s,data:l,isRetryable:null==o?void 0:o(r,l)})}}catch(e){return{responseHeaders:a,value:new yt.APICallError({message:r.statusText,url:n,requestBodyValues:i,statusCode:r.status,responseHeaders:a,responseBody:s,isRetryable:null==o?void 0:o(r)})}}},Ct=e=>async({response:t})=>{const o=C(t);if(null==t.body)throw new yt.EmptyResponseBodyError({});return{responseHeaders:o,value:rt({stream:t.body,schema:e})}},wt=e=>async({response:t,url:o,requestBodyValues:r})=>{const n=await t.text(),i=await et({text:n,schema:e}),s=C(t);if(!i.success)throw new yt.APICallError({message:"Invalid JSON response",cause:i.error,statusCode:t.status,responseHeaders:s,responseBody:n,url:o,requestBodyValues:r});return{responseHeaders:s,value:i.value,rawValue:i.rawValue}},Et=()=>async({response:e,url:t,requestBodyValues:o})=>{const r=C(e);if(!e.body)throw new yt.APICallError({message:"Response body is empty",url:t,requestBodyValues:o,statusCode:e.status,responseHeaders:r,responseBody:void 0});try{const t=await e.arrayBuffer();return{responseHeaders:r,value:new Uint8Array(t)}}catch(n){throw new yt.APICallError({message:"Failed to read response as array buffer",url:t,requestBodyValues:o,statusCode:e.status,responseHeaders:r,responseBody:void 0,cause:n})}},_t=()=>async({response:e,url:t,requestBodyValues:o})=>{const r=C(e),n=await e.text();return{responseHeaders:r,value:new yt.APICallError({message:e.statusText,url:t,requestBodyValues:o,statusCode:e.status,responseHeaders:r,responseBody:n})}};function bt(e){return null==e?void 0:e.replace(/\/$/,"")}async function*Rt({execute:e,input:t,options:o}){const r=e(t,o);if(null!=(n=r)&&"function"==typeof n[Symbol.asyncIterator]){let e;for await(const t of r)e=t,yield{type:"preliminary",output:t};yield{type:"final",output:e}}else yield{type:"final",output:await r};var n}var St=o(19538)},95125:function(e,t,o){var r,n=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o])},r(e,t)},function(e,t){function o(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)}),i=this&&this.__decorate||function(e,t,o,r){var n,i=arguments.length,s=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,o):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,o,r);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(s=(i<3?n(s):i>3?n(t,o,s):n(t,o))||s);return i>3&&s&&Object.defineProperty(t,o,s),s},s=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)};Object.defineProperty(t,"__esModule",{value:!0});var a=o(22131),l=o(15068),p=o(72493),u=o(44081),d=o(63405),c=o(60843),h=o(40797),f=o(44871),g=o(83423),m=function(e){function t(){return e.call(this,'<span class="ag-selection-checkbox" unselectable="on"/>')||this}return n(t,e),t.prototype.createAndAddIcons=function(){this.eCheckedIcon=g._.createIconNoSpan("checkboxChecked",this.gridOptionsWrapper,this.column),this.eUncheckedIcon=g._.createIconNoSpan("checkboxUnchecked",this.gridOptionsWrapper,this.column),this.eIndeterminateIcon=g._.createIconNoSpan("checkboxIndeterminate",this.gridOptionsWrapper,this.column);var e=this.getGui();e.appendChild(this.eCheckedIcon),e.appendChild(this.eUncheckedIcon),e.appendChild(this.eIndeterminateIcon)},t.prototype.onDataChanged=function(){this.onSelectionChanged()},t.prototype.onSelectableChanged=function(){this.showOrHideSelect()},t.prototype.onSelectionChanged=function(){var e=this.rowNode.isSelected();g._.setVisible(this.eCheckedIcon,!0===e),g._.setVisible(this.eUncheckedIcon,!1===e),g._.setVisible(this.eIndeterminateIcon,"boolean"!=typeof e)},t.prototype.onCheckedClicked=function(){var e=this.gridOptionsWrapper.isGroupSelectsFiltered();return this.rowNode.setSelectedParams({newValue:!1,groupSelectsFiltered:e})},t.prototype.onUncheckedClicked=function(e){var t=this.gridOptionsWrapper.isGroupSelectsFiltered();return this.rowNode.setSelectedParams({newValue:!0,rangeSelect:e.shiftKey,groupSelectsFiltered:t})},t.prototype.onIndeterminateClicked=function(e){0===this.onUncheckedClicked(e)&&this.onCheckedClicked()},t.prototype.init=function(e){this.rowNode=e.rowNode,this.column=e.column,this.createAndAddIcons(),this.onSelectionChanged(),this.addGuiEventListener("click",(function(e){return g._.stopPropagationForAgGrid(e)})),this.addGuiEventListener("dblclick",(function(e){return g._.stopPropagationForAgGrid(e)})),this.addDestroyableEventListener(this.eCheckedIcon,"click",this.onCheckedClicked.bind(this)),this.addDestroyableEventListener(this.eUncheckedIcon,"click",this.onUncheckedClicked.bind(this)),this.addDestroyableEventListener(this.eIndeterminateIcon,"click",this.onIndeterminateClicked.bind(this)),this.addDestroyableEventListener(this.rowNode,l.RowNode.EVENT_ROW_SELECTED,this.onSelectionChanged.bind(this)),this.addDestroyableEventListener(this.rowNode,l.RowNode.EVENT_DATA_CHANGED,this.onDataChanged.bind(this)),this.addDestroyableEventListener(this.rowNode,l.RowNode.EVENT_SELECTABLE_CHANGED,this.onSelectableChanged.bind(this)),this.isRowSelectableFunc=this.gridOptionsWrapper.getIsRowSelectableFunc(),(this.isRowSelectableFunc||this.checkboxCallbackExists())&&(this.addDestroyableEventListener(this.eventService,d.Events.EVENT_DISPLAYED_COLUMNS_CHANGED,this.showOrHideSelect.bind(this)),this.showOrHideSelect())},t.prototype.showOrHideSelect=function(){var e=this.rowNode.selectable;e&&this.checkboxCallbackExists()&&(e=this.column.isCellCheckboxSelection(this.rowNode)),this.setVisible(e)},t.prototype.checkboxCallbackExists=function(){var e=this.column?this.column.getColDef():null;return e&&"function"==typeof e.checkboxSelection},i([p.Autowired("gridOptionsWrapper"),s("design:type",u.GridOptionsWrapper)],t.prototype,"gridOptionsWrapper",void 0),i([p.Autowired("eventService"),s("design:type",c.EventService)],t.prototype,"eventService",void 0),i([p.Autowired("gridApi"),s("design:type",h.GridApi)],t.prototype,"gridApi",void 0),i([p.Autowired("columnApi"),s("design:type",f.ColumnApi)],t.prototype,"columnApi",void 0),t}(a.Component);t.CheckboxSelectionComponent=m},95574:function(e,t,o){var r,n=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o])},r(e,t)},function(e,t){function o(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)}),i=this&&this.__decorate||function(e,t,o,r){var n,i=arguments.length,s=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,o):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,o,r);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(s=(i<3?n(s):i>3?n(t,o,s):n(t,o))||s);return i>3&&s&&Object.defineProperty(t,o,s),s},s=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)};Object.defineProperty(t,"__esModule",{value:!0});var a=o(22131),l=o(98239),p=o(44081),u=o(72493),d=o(66419),c=o(47721),h=o(72948),f=o(83423),g=function(e){function t(){return e.call(this,t.TEMPLATE)||this}return n(t,e),t.prototype.init=function(e){this.params=e,this.setupLabel(),this.addGroupExpandIcon(),this.setupExpandIcons()},t.prototype.setupExpandIcons=function(){var e=this;this.addInIcon("columnGroupOpened","agOpened"),this.addInIcon("columnGroupClosed","agClosed");var t=function(t){if(!f._.isStopPropagationForAgGrid(t)){var o=!e.params.columnGroup.isExpanded();e.columnController.setColumnGroupOpened(e.params.columnGroup.getOriginalColumnGroup(),o,"uiColumnExpanded")}};this.addTouchAndClickListeners(this.eCloseIcon,t),this.addTouchAndClickListeners(this.eOpenIcon,t);var o=function(e){f._.stopPropagationForAgGrid(e)};this.addDestroyableEventListener(this.eCloseIcon,"dblclick",o),this.addDestroyableEventListener(this.eOpenIcon,"dblclick",o),this.addDestroyableEventListener(this.getGui(),"dblclick",t),this.updateIconVisibility();var r=this.params.columnGroup.getOriginalColumnGroup();this.addDestroyableEventListener(r,h.OriginalColumnGroup.EVENT_EXPANDED_CHANGED,this.updateIconVisibility.bind(this)),this.addDestroyableEventListener(r,h.OriginalColumnGroup.EVENT_EXPANDABLE_CHANGED,this.updateIconVisibility.bind(this))},t.prototype.addTouchAndClickListeners=function(e,t){var o=new d.TouchListener(this.eCloseIcon);this.addDestroyableEventListener(o,d.TouchListener.EVENT_TAP,t),this.addDestroyFunc((function(){return o.destroy()})),this.addDestroyableEventListener(e,"click",t)},t.prototype.updateIconVisibility=function(){if(this.params.columnGroup.isExpandable()){var e=this.params.columnGroup.isExpanded();f._.setVisible(this.eOpenIcon,!e),f._.setVisible(this.eCloseIcon,e)}else f._.setVisible(this.eOpenIcon,!1),f._.setVisible(this.eCloseIcon,!1)},t.prototype.addInIcon=function(e,t){var o=f._.createIconNoSpan(e,this.gridOptionsWrapper,null);this.getRefElement(t).appendChild(o)},t.prototype.addGroupExpandIcon=function(){if(!this.params.columnGroup.isExpandable())return f._.setVisible(this.eOpenIcon,!1),void f._.setVisible(this.eCloseIcon,!1)},t.prototype.setupLabel=function(){this.params.displayName&&""!==this.params.displayName&&(this.getRefElement("agLabel").innerHTML=this.params.displayName)},t.TEMPLATE='<div class="ag-header-group-cell-label" ref="agContainer"><span ref="agLabel" class="ag-header-group-text"></span><span ref="agOpened" class="ag-header-icon ag-header-expand-icon ag-header-expand-icon-expanded"></span><span ref="agClosed" class="ag-header-icon ag-header-expand-icon ag-header-expand-icon-collapsed"></span></div>',i([u.Autowired("columnController"),s("design:type",l.ColumnController)],t.prototype,"columnController",void 0),i([u.Autowired("gridOptionsWrapper"),s("design:type",p.GridOptionsWrapper)],t.prototype,"gridOptionsWrapper",void 0),i([c.RefSelector("agOpened"),s("design:type",HTMLElement)],t.prototype,"eOpenIcon",void 0),i([c.RefSelector("agClosed"),s("design:type",HTMLElement)],t.prototype,"eCloseIcon",void 0),t}(a.Component);t.HeaderGroupComp=g},96896:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0});var o=function(){function e(){}return e.parse=function(t){if(!t)return null;if(!0===t)return{toolPanels:[e.DEFAULT_COLUMN_COMP,e.DEFAULT_FILTER_COMP],defaultToolPanel:"columns"};if("string"==typeof t)return e.parse([t]);if(Array.isArray(t)){var o=[];return t.forEach((function(t){var r=e.DEFAULT_BY_KEY[t];r?o.push(r):console.warn("ag-grid: the key "+t+" is not a valid key for specifying a tool panel, valid keys are: "+Object.keys(e.DEFAULT_BY_KEY).join(","))})),0===o.length?null:{toolPanels:o,defaultToolPanel:o[0].id}}return{toolPanels:e.parseComponents(t.toolPanels),defaultToolPanel:t.defaultToolPanel,hiddenByDefault:t.hiddenByDefault}},e.parseComponents=function(t){var o=[];return t.forEach((function(t){var r=null;if("string"==typeof t){var n=e.DEFAULT_BY_KEY[t];if(!n)return void console.warn("ag-grid: the key "+t+" is not a valid key for specifying a tool panel, valid keys are: "+Object.keys(e.DEFAULT_BY_KEY).join(","));r=n}else r=t;o.push(r)})),o},e.DEFAULT_COLUMN_COMP={id:"columns",labelDefault:"Columns",labelKey:"columns",iconKey:"columns",toolPanel:"agColumnsToolPanel"},e.DEFAULT_FILTER_COMP={id:"filters",labelDefault:"Filters",labelKey:"filters",iconKey:"filter",toolPanel:"agFiltersToolPanel"},e.DEFAULT_BY_KEY={columns:e.DEFAULT_COLUMN_COMP,filters:e.DEFAULT_FILTER_COMP},e}();t.SideBarDefParser=o},97156:(e,t,o)=>{Object.defineProperty(t,"__esModule",{value:!0});var r=o(63405),n=o(37789),i=o(44081),s=o(83423),a=function(){function e(){}return e.getEventCallbacks=function(){return e.EVENT_CALLBACKS||(e.EVENT_CALLBACKS=[],e.EVENT_CALLBACKS_NO_PREFIX=[],e.EVENTS.forEach((function(t){e.EVENT_CALLBACKS.push(e.getCallbackForEvent(t)),e.EVENT_CALLBACKS_NO_PREFIX.push(t)}))),e.EVENT_CALLBACKS},e.copyAttributesToGridOptions=function(t,o,r){void 0===r&&(r=!1),l(o),"object"!=typeof t&&(t={});var n=t;return e.ARRAY_PROPERTIES.concat(e.STRING_PROPERTIES).concat(e.OBJECT_PROPERTIES).concat(e.FUNCTION_PROPERTIES).forEach((function(e){void 0!==o[e]&&(n[e]=o[e])})),e.BOOLEAN_PROPERTIES.forEach((function(t){void 0!==o[t]&&(n[t]=e.toBoolean(o[t]))})),e.NUMBER_PROPERTIES.forEach((function(t){void 0!==o[t]&&(n[t]=e.toNumber(o[t]))})),e.getEventCallbacks().forEach((function(e){void 0!==o[e]&&(n[e]=o[e])})),r||e.EVENT_CALLBACKS_NO_PREFIX.forEach((function(t){var r=e.getCallbackForEvent(t);void 0===o[t]&&void 0===o[r]||i.GridOptionsWrapper.checkEventDeprecation(t)})),t},e.getCallbackForEvent=function(e){return!e||e.length<2?e:"on"+e[0].toUpperCase()+e.substr(1)},e.processOnChange=function(t,o,n,i){if(t){l(t);var a=o;e.ARRAY_PROPERTIES.concat(e.OBJECT_PROPERTIES).concat(e.STRING_PROPERTIES).forEach((function(e){t[e]&&(a[e]=t[e].currentValue)})),e.BOOLEAN_PROPERTIES.forEach((function(o){t[o]&&(a[o]=e.toBoolean(t[o].currentValue))})),e.NUMBER_PROPERTIES.forEach((function(o){t[o]&&(a[o]=e.toNumber(t[o].currentValue))})),e.getEventCallbacks().forEach((function(e){t[e]&&(a[e]=t[e].currentValue)})),t.enableCellTextSelection&&n.setEnableCellTextSelection(e.toBoolean(t.enableCellTextSelection.currentValue)),t.showToolPanel&&n.showToolPanel(e.toBoolean(t.showToolPanel.currentValue)),t.quickFilterText&&n.setQuickFilter(t.quickFilterText.currentValue),t.rowData&&n.setRowData(t.rowData.currentValue),t.pinnedTopRowData&&n.setPinnedTopRowData(t.pinnedTopRowData.currentValue),t.pinnedBottomRowData&&n.setPinnedBottomRowData(t.pinnedBottomRowData.currentValue),t.columnDefs&&n.setColumnDefs(t.columnDefs.currentValue,"gridOptionsChanged"),t.datasource&&n.setDatasource(t.datasource.currentValue),t.headerHeight&&n.setHeaderHeight(e.toNumber(t.headerHeight.currentValue)),t.paginationPageSize&&n.paginationSetPageSize(e.toNumber(t.paginationPageSize.currentValue)),t.pivotMode&&i.setPivotMode(e.toBoolean(t.pivotMode.currentValue)),t.groupRemoveSingleChildren&&n.setGroupRemoveSingleChildren(e.toBoolean(t.groupRemoveSingleChildren.currentValue)),t.suppressRowDrag&&n.setSuppressRowDrag(e.toBoolean(t.suppressRowDrag.currentValue)),t.gridAutoHeight&&n.setGridAutoHeight(e.toBoolean(t.gridAutoHeight.currentValue)),t.suppressClipboardPaste&&n.setSuppressClipboardPaste(e.toBoolean(t.suppressClipboardPaste.currentValue)),t.sideBar&&n.setSideBar(t.sideBar.currentValue),t.datasource&&n.setDatasource(t.datasource.currentValue);var p={type:r.Events.EVENT_COMPONENT_STATE_CHANGED,api:o.api,columnApi:o.columnApi};s._.iterateObject(t,(function(e,t){p[e]=t})),n.dispatchEvent(p)}},e.toBoolean=function(e){return"boolean"==typeof e?e:"string"==typeof e&&("TRUE"===e.toUpperCase()||""==e)},e.toNumber=function(e){return"number"==typeof e?e:"string"==typeof e?Number(e):void 0},e.EVENTS=[],e.STRING_PROPERTIES=n.PropertyKeys.STRING_PROPERTIES,e.OBJECT_PROPERTIES=n.PropertyKeys.OBJECT_PROPERTIES,e.ARRAY_PROPERTIES=n.PropertyKeys.ARRAY_PROPERTIES,e.NUMBER_PROPERTIES=n.PropertyKeys.NUMBER_PROPERTIES,e.BOOLEAN_PROPERTIES=n.PropertyKeys.BOOLEAN_PROPERTIES,e.FUNCTION_PROPERTIES=n.PropertyKeys.FUNCTION_PROPERTIES,e.ALL_PROPERTIES=n.PropertyKeys.ALL_PROPERTIES,e}();function l(e){(e.rowDeselected||e.onRowDeselected)&&console.warn("ag-grid: as of v3.4 rowDeselected no longer exists. Please check the docs.")}t.ComponentUtil=a,s._.iterateObject(r.Events,(function(e,t){a.EVENTS.push(t)}))},97177:function(e,t,o){var r=this&&this.__decorate||function(e,t,o,r){var n,i=arguments.length,s=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,o):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,o,r);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(s=(i<3?n(s):i>3?n(t,o,s):n(t,o))||s);return i>3&&s&&Object.defineProperty(t,o,s),s},n=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)};Object.defineProperty(t,"__esModule",{value:!0});var i=o(44081),s=o(72493),a=o(25230),l=function(){function e(){}return e.prototype.addResizeBar=function(e){var t=this,o={dragStartPixels:e.dragStartPixels||0,eElement:e.eResizeBar,onDragStart:this.onDragStart.bind(this,e),onDragStop:this.onDragStop.bind(this,e),onDragging:this.onDragging.bind(this,e)};return this.dragService.addDragSource(o,!0),function(){return t.dragService.removeDragSource(o)}},e.prototype.onDragStart=function(e,t){this.draggingStarted=!0,this.dragStartX=t.clientX,this.setResizeIcons();var o=t instanceof MouseEvent&&!0===t.shiftKey;e.onResizeStart(o)},e.prototype.setResizeIcons=function(){this.oldBodyCursor=this.eGridDiv.style.cursor,this.oldMsUserSelect=this.eGridDiv.style.msUserSelect,this.oldWebkitUserSelect=this.eGridDiv.style.webkitUserSelect,this.eGridDiv.style.cursor="col-resize",this.eGridDiv.style.msUserSelect="none",this.eGridDiv.style.webkitUserSelect="none"},e.prototype.onDragStop=function(e,t){e.onResizeEnd(this.resizeAmount),this.resetIcons()},e.prototype.resetIcons=function(){this.eGridDiv.style.cursor=this.oldBodyCursor,this.eGridDiv.style.msUserSelect=this.oldMsUserSelect,this.eGridDiv.style.webkitUserSelect=this.oldWebkitUserSelect},e.prototype.onDragging=function(e,t){this.resizeAmount=t.clientX-this.dragStartX,e.onResizing(this.resizeAmount)},r([s.Autowired("gridOptionsWrapper"),n("design:type",i.GridOptionsWrapper)],e.prototype,"gridOptionsWrapper",void 0),r([s.Autowired("dragService"),n("design:type",a.DragService)],e.prototype,"dragService",void 0),r([s.Autowired("eGridDiv"),n("design:type",HTMLElement)],e.prototype,"eGridDiv",void 0),r([s.Bean("horizontalResizeService")],e)}();t.HorizontalResizeService=l},98239:function(e,t,o){var r=this&&this.__decorate||function(e,t,o,r){var n,i=arguments.length,s=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,o):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,o,r);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(s=(i<3?n(s):i>3?n(t,o,s):n(t,o))||s);return i>3&&s&&Object.defineProperty(t,o,s),s},n=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},i=this&&this.__param||function(e,t){return function(o,r){t(o,r,e)}};Object.defineProperty(t,"__esModule",{value:!0});var s=o(74517),a=o(26016),l=o(44081),p=o(40634),u=o(7897),d=o(31887),c=o(41832),h=o(60843),f=o(814),g=o(37132),m=o(63405),y=o(72948),v=o(12598),C=o(72493),w=o(64314),E=o(43878),_=o(88842),b=o(40797),R=o(44871),S=o(83423),O=function(){function e(){this.primaryHeaderRowCount=0,this.secondaryHeaderRowCount=0,this.secondaryColumnsPresent=!1,this.gridHeaderRowCount=0,this.displayedLeftColumns=[],this.displayedRightColumns=[],this.displayedCenterColumns=[],this.allDisplayedColumns=[],this.allDisplayedVirtualColumns=[],this.allDisplayedCenterVirtualColumns=[],this.rowGroupColumns=[],this.valueColumns=[],this.pivotColumns=[],this.ready=!1,this.autoGroupsNeedBuilding=!1,this.pivotMode=!1,this.bodyWidth=0,this.leftWidth=0,this.rightWidth=0,this.bodyWidthDirty=!0}return e.prototype.init=function(){var e=this.gridOptionsWrapper.isPivotMode();this.suppressColumnVirtualisation=this.gridOptionsWrapper.isSuppressColumnVirtualisation(),this.isPivotSettingAllowed(e)&&(this.pivotMode=e),this.usingTreeData=this.gridOptionsWrapper.isTreeData()},e.prototype.setColumnDefs=function(e,t){void 0===t&&(t="api");var o=!!this.columnDefs;this.columnDefs=e,this.valueCache.expire(),this.autoGroupsNeedBuilding=!0;var r=this.primaryColumns,n=this.columnFactory.createColumnTree(e,!0,r);this.primaryColumnTree=n.columnTree,this.primaryHeaderRowCount=n.treeDept+1,this.primaryColumns=this.getColumnsFromTree(this.primaryColumnTree),this.extractRowGroupColumns(t,r),this.extractPivotColumns(t,r),this.createValueColumns(t,r),this.ready=!0,this.updateGridColumns(),this.updateDisplayedColumns(t),this.checkDisplayedVirtualColumns(),this.gridOptionsWrapper.isDeltaColumnMode()&&o&&this.resetColumnState(!0,t);var i={type:m.Events.EVENT_COLUMN_EVERYTHING_CHANGED,api:this.gridApi,columnApi:this.columnApi,source:t};this.eventService.dispatchEvent(i);var s={type:m.Events.EVENT_NEW_COLUMNS_LOADED,api:this.gridApi,columnApi:this.columnApi};this.eventService.dispatchEvent(s)},e.prototype.isAutoRowHeightActive=function(){return this.autoRowHeightColumns&&this.autoRowHeightColumns.length>0},e.prototype.getAllAutoRowHeightCols=function(){return this.autoRowHeightColumns},e.prototype.setVirtualViewportLeftAndRight=function(){this.gridOptionsWrapper.isEnableRtl()?(this.viewportLeft=this.bodyWidth-this.scrollPosition-this.scrollWidth,this.viewportRight=this.bodyWidth-this.scrollPosition):(this.viewportLeft=this.scrollPosition,this.viewportRight=this.scrollWidth+this.scrollPosition)},e.prototype.getDisplayedColumnsStartingAt=function(e){for(var t=e,o=[];t&&S._.exists(t);)o.push(t),t=this.getDisplayedColAfter(t);return o},e.prototype.checkDisplayedVirtualColumns=function(){if(S._.exists(this.displayedCenterColumns)){var e=this.allDisplayedVirtualColumns.map((function(e){return e.getId()})).join("#");if(this.updateVirtualSets(),e!==this.allDisplayedVirtualColumns.map((function(e){return e.getId()})).join("#")){var t={type:m.Events.EVENT_VIRTUAL_COLUMNS_CHANGED,api:this.gridApi,columnApi:this.columnApi};this.eventService.dispatchEvent(t)}}},e.prototype.setVirtualViewportPosition=function(e,t){(e!==this.scrollWidth||t!==this.scrollPosition||this.bodyWidthDirty)&&(this.scrollWidth=e,this.scrollPosition=t,this.bodyWidthDirty=!0,this.setVirtualViewportLeftAndRight(),this.ready&&this.checkDisplayedVirtualColumns())},e.prototype.isPivotMode=function(){return this.pivotMode},e.prototype.isPivotSettingAllowed=function(e){return!e||!this.gridOptionsWrapper.isTreeData()||(console.warn("ag-Grid: Pivot mode not available in conjunction Tree Data i.e. 'gridOptions.treeData: true'"),!1)},e.prototype.setPivotMode=function(e,t){if(void 0===t&&(t="api"),e!==this.pivotMode&&this.isPivotSettingAllowed(this.pivotMode)){this.pivotMode=e,this.updateDisplayedColumns(t);var o={type:m.Events.EVENT_COLUMN_PIVOT_MODE_CHANGED,api:this.gridApi,columnApi:this.columnApi};this.eventService.dispatchEvent(o)}},e.prototype.getSecondaryPivotColumn=function(e,t){if(!this.secondaryColumnsPresent)return null;var o=this.getPrimaryColumn(t),r=null;return this.secondaryColumns&&this.secondaryColumns.forEach((function(t){var n=t.getColDef().pivotKeys,i=t.getColDef().pivotValueColumn;S._.compareArrays(n,e)&&i===o&&(r=t)})),r},e.prototype.setBeans=function(e){this.logger=e.create("ColumnController")},e.prototype.setFirstRightAndLastLeftPinned=function(e){var t,o;this.gridOptionsWrapper.isEnableRtl()?(t=this.displayedLeftColumns?this.displayedLeftColumns[0]:null,o=this.displayedRightColumns?this.displayedRightColumns[this.displayedRightColumns.length-1]:null):(t=this.displayedLeftColumns?this.displayedLeftColumns[this.displayedLeftColumns.length-1]:null,o=this.displayedRightColumns?this.displayedRightColumns[0]:null),this.gridColumns.forEach((function(r){r.setLastLeftPinned(r===t,e),r.setFirstRightPinned(r===o,e)}))},e.prototype.autoSizeColumns=function(e,t){var o=this;void 0===t&&(t="api");for(var r=[],n=-1;0!==n;)n=0,this.actionOnGridColumns(e,(function(e){if(r.indexOf(e)>=0)return!1;var i=o.autoWidthCalculator.getPreferredWidthForColumn(e);if(i>0){var s=o.normaliseColumnWidth(e,i);e.setActualWidth(s,t),r.push(e),n++}return!0}),t);if(r.length>0){var i={type:m.Events.EVENT_COLUMN_RESIZED,columns:r,column:1===r.length?r[0]:null,finished:!0,api:this.gridApi,columnApi:this.columnApi,source:"autosizeColumns"};this.eventService.dispatchEvent(i)}},e.prototype.autoSizeColumn=function(e,t){void 0===t&&(t="api"),e&&this.autoSizeColumns([e],t)},e.prototype.autoSizeAllColumns=function(e){void 0===e&&(e="api");var t=this.getAllDisplayedColumns();this.autoSizeColumns(t,e)},e.prototype.getColumnsFromTree=function(e){var t=[];return function e(o){for(var r=0;r<o.length;r++){var n=o[r];n instanceof a.Column?t.push(n):n instanceof y.OriginalColumnGroup&&e(n.getChildren())}}(e),t},e.prototype.getAllDisplayedColumnGroups=function(){return this.displayedLeftColumnTree&&this.displayedRightColumnTree&&this.displayedCentreColumnTree?this.displayedLeftColumnTree.concat(this.displayedCentreColumnTree).concat(this.displayedRightColumnTree):null},e.prototype.getPrimaryColumnTree=function(){return this.primaryColumnTree},e.prototype.getHeaderRowCount=function(){return this.gridHeaderRowCount},e.prototype.getLeftDisplayedColumnGroups=function(){return this.displayedLeftColumnTree},e.prototype.getRightDisplayedColumnGroups=function(){return this.displayedRightColumnTree},e.prototype.getCenterDisplayedColumnGroups=function(){return this.displayedCentreColumnTree},e.prototype.getDisplayedColumnGroups=function(e){switch(e){case a.Column.PINNED_LEFT:return this.getLeftDisplayedColumnGroups();case a.Column.PINNED_RIGHT:return this.getRightDisplayedColumnGroups();default:return this.getCenterDisplayedColumnGroups()}},e.prototype.isColumnDisplayed=function(e){return this.getAllDisplayedColumns().indexOf(e)>=0},e.prototype.getAllDisplayedColumns=function(){return this.allDisplayedColumns},e.prototype.getAllDisplayedVirtualColumns=function(){return this.allDisplayedVirtualColumns},e.prototype.getDisplayedLeftColumnsForRow=function(e){return this.colSpanActive?this.getDisplayedColumnsForRow(e,this.displayedLeftColumns):this.displayedLeftColumns},e.prototype.getDisplayedRightColumnsForRow=function(e){return this.colSpanActive?this.getDisplayedColumnsForRow(e,this.displayedRightColumns):this.displayedRightColumns},e.prototype.getDisplayedColumnsForRow=function(e,t,o,r){for(var n,i=[],s=null,a=function(a){var l,p=t[a],u=t.length-a,d=Math.min(p.getColSpan(e),u),c=[p];if(d>1){for(var h=d-1,f=1;f<=h;f++)c.push(t[a+f]);a+=h}o?(l=!1,c.forEach((function(e){o(e)&&(l=!0)}))):l=!0,l&&(0===i.length&&s&&r&&r(p)&&i.push(s),i.push(p)),s=p,n=a},l=0;l<t.length;l++)a(l),l=n;return i},e.prototype.getAllDisplayedCenterVirtualColumnsForRow=function(e){var t=this;if(!this.colSpanActive)return this.allDisplayedCenterVirtualColumns;var o=this.suppressColumnVirtualisation?null:this.isColumnInViewport.bind(this);return this.getDisplayedColumnsForRow(e,this.displayedCenterColumns,o,(function(e){return e.getLeft()>t.viewportLeft}))},e.prototype.isColumnInViewport=function(e){var t=e.getLeft(),o=e.getLeft()+e.getActualWidth(),r=this.viewportLeft-200,n=this.viewportRight+200;return!(t<r&&o<r||t>n&&o>n)},e.prototype.getPinnedLeftContainerWidth=function(){return this.getWidthOfColsInList(this.displayedLeftColumns)},e.prototype.getPinnedRightContainerWidth=function(){return this.getWidthOfColsInList(this.displayedRightColumns)},e.prototype.updatePrimaryColumnList=function(e,t,o,r,n,i){var s=this;if(void 0===i&&(i="api"),e&&!S._.missingOrEmpty(e)){var a=!1;if(e.forEach((function(e){var n=s.getPrimaryColumn(e);if(n){if(o){if(t.indexOf(n)>=0)return;t.push(n)}else{if(t.indexOf(n)<0)return;S._.removeFromArray(t,n)}r(n),a=!0}})),a){this.autoGroupsNeedBuilding&&this.updateGridColumns(),this.updateDisplayedColumns(i);var l={type:n,columns:t,column:1===t.length?t[0]:null,api:this.gridApi,columnApi:this.columnApi,source:i};this.eventService.dispatchEvent(l)}}},e.prototype.setRowGroupColumns=function(e,t){void 0===t&&(t="api"),this.autoGroupsNeedBuilding=!0,this.setPrimaryColumnList(e,this.rowGroupColumns,m.Events.EVENT_COLUMN_ROW_GROUP_CHANGED,this.setRowGroupActive.bind(this),t)},e.prototype.setRowGroupActive=function(e,t,o){e!==t.isRowGroupActive()&&(t.setRowGroupActive(e,o),e||this.gridOptionsWrapper.isSuppressMakeColumnVisibleAfterUnGroup()||t.setVisible(!0,o))},e.prototype.addRowGroupColumn=function(e,t){void 0===t&&(t="api"),e&&this.addRowGroupColumns([e],t)},e.prototype.addRowGroupColumns=function(e,t){void 0===t&&(t="api"),this.autoGroupsNeedBuilding=!0,this.updatePrimaryColumnList(e,this.rowGroupColumns,!0,this.setRowGroupActive.bind(this,!0),m.Events.EVENT_COLUMN_ROW_GROUP_CHANGED,t)},e.prototype.removeRowGroupColumns=function(e,t){void 0===t&&(t="api"),this.autoGroupsNeedBuilding=!0,this.updatePrimaryColumnList(e,this.rowGroupColumns,!1,this.setRowGroupActive.bind(this,!1),m.Events.EVENT_COLUMN_ROW_GROUP_CHANGED,t)},e.prototype.removeRowGroupColumn=function(e,t){void 0===t&&(t="api"),e&&this.removeRowGroupColumns([e],t)},e.prototype.addPivotColumns=function(e,t){void 0===t&&(t="api"),this.updatePrimaryColumnList(e,this.pivotColumns,!0,(function(e){return e.setPivotActive(!0,t)}),m.Events.EVENT_COLUMN_PIVOT_CHANGED,t)},e.prototype.setPivotColumns=function(e,t){void 0===t&&(t="api"),this.setPrimaryColumnList(e,this.pivotColumns,m.Events.EVENT_COLUMN_PIVOT_CHANGED,(function(e,o){o.setPivotActive(e,t)}),t)},e.prototype.addPivotColumn=function(e,t){void 0===t&&(t="api"),this.addPivotColumns([e],t)},e.prototype.removePivotColumns=function(e,t){void 0===t&&(t="api"),this.updatePrimaryColumnList(e,this.pivotColumns,!1,(function(e){return e.setPivotActive(!1,t)}),m.Events.EVENT_COLUMN_PIVOT_CHANGED,t)},e.prototype.removePivotColumn=function(e,t){void 0===t&&(t="api"),this.removePivotColumns([e],t)},e.prototype.setPrimaryColumnList=function(e,t,o,r,n){var i=this;t.length=0,S._.exists(e)&&e.forEach((function(e){var o=i.getPrimaryColumn(e);o&&t.push(o)})),this.primaryColumns.forEach((function(e){var o=t.indexOf(e)>=0;r(o,e)})),this.autoGroupsNeedBuilding&&this.updateGridColumns(),this.updateDisplayedColumns(n);var s={type:o,columns:t,column:1===t.length?t[0]:null,api:this.gridApi,columnApi:this.columnApi,source:n};this.eventService.dispatchEvent(s)},e.prototype.setValueColumns=function(e,t){void 0===t&&(t="api"),this.setPrimaryColumnList(e,this.valueColumns,m.Events.EVENT_COLUMN_VALUE_CHANGED,this.setValueActive.bind(this),t)},e.prototype.setValueActive=function(e,t,o){if(e!==t.isValueActive()&&(t.setValueActive(e,o),e&&!t.getAggFunc())){var r=this.aggFuncService.getDefaultAggFunc(t);t.setAggFunc(r)}},e.prototype.addValueColumns=function(e,t){void 0===t&&(t="api"),this.updatePrimaryColumnList(e,this.valueColumns,!0,this.setValueActive.bind(this,!0),m.Events.EVENT_COLUMN_VALUE_CHANGED,t)},e.prototype.addValueColumn=function(e,t){void 0===t&&(t="api"),e&&this.addValueColumns([e],t)},e.prototype.removeValueColumn=function(e,t){void 0===t&&(t="api"),this.removeValueColumns([e],t)},e.prototype.removeValueColumns=function(e,t){void 0===t&&(t="api"),this.updatePrimaryColumnList(e,this.valueColumns,!1,this.setValueActive.bind(this,!1),m.Events.EVENT_COLUMN_VALUE_CHANGED,t)},e.prototype.normaliseColumnWidth=function(e,t){return t<e.getMinWidth()&&(t=e.getMinWidth()),e.isGreaterThanMax(t)&&(t=e.getMaxWidth()),t},e.prototype.getPrimaryOrGridColumn=function(e){return this.getPrimaryColumn(e)||this.getGridColumn(e)},e.prototype.setColumnWidth=function(e,t,o,r,n){void 0===n&&(n="api");var i=this.getPrimaryOrGridColumn(e);if(i){var s=[];if(s.push({width:t,ratios:[1],columns:[i]}),"shift"===this.gridOptionsWrapper.getColResizeDefault()&&(o=!o),o){var a=this.getDisplayedColAfter(i);if(!a)return;var l=i.getActualWidth()-t,p=a.getActualWidth()+l;s.push({width:p,ratios:[1],columns:[a]})}this.resizeColumnSets(s,r,n)}},e.prototype.checkMinAndMaxWidthsForSet=function(e){var t=e.columns,o=e.width,r=0,n=0,i=!0;return t.forEach((function(e){r+=e.getMinWidth(),e.getMaxWidth()>0?n+=e.getMaxWidth():i=!1})),o>=r&&(!i||o<=n)},e.prototype.resizeColumnSets=function(e,t,o){if(S._.every(e,this.checkMinAndMaxWidthsForSet.bind(this))){var r=[],n=[];e.forEach((function(e){var t=e.width,o=e.columns,i=e.ratios,s={},a={};o.forEach((function(e){return n.push(e)}));for(var l=!0,p=0,u=function(){if(++p>1e3)return console.error("ag-Grid: infinite loop in resizeColumnSets"),"break";l=!1;var e=[],r=[],n=0,u=t;o.forEach((function(t,o){if(a[t.getId()])u-=s[t.getId()];else{e.push(t);var l=i[o];n+=l,r.push(l)}}));var d=1/n;e.forEach((function(o,r){var n;r===e.length-1?n=u:(n=Math.round(i[r]*t*d),u-=n),n<o.getMinWidth()?(n=o.getMinWidth(),a[o.getId()]=!0,l=!0):o.getMaxWidth()>0&&n>o.getMaxWidth()&&(n=o.getMaxWidth(),a[o.getId()]=!0,l=!0),s[o.getId()]=n}))};l&&"break"!==u(););o.forEach((function(e){var t=s[e.getId()];e.getActualWidth()!==t&&(e.setActualWidth(t),r.push(e))}))}));var i=r.length>0;if(i&&(this.setLeftValues(o),this.updateBodyWidths(),this.checkDisplayedVirtualColumns()),i||t){var s={type:m.Events.EVENT_COLUMN_RESIZED,columns:n,column:1===n.length?n[0]:null,finished:t,api:this.gridApi,columnApi:this.columnApi,source:o};this.eventService.dispatchEvent(s)}}else if(t){var a=e&&e.length>0?e[0].columns:null,l={type:m.Events.EVENT_COLUMN_RESIZED,columns:a,column:a&&1===a.length?a[0]:null,finished:t,api:this.gridApi,columnApi:this.columnApi,source:o};this.eventService.dispatchEvent(l)}},e.prototype.setColumnAggFunc=function(e,t,o){if(void 0===o&&(o="api"),e){e.setAggFunc(t);var r={type:m.Events.EVENT_COLUMN_VALUE_CHANGED,columns:[e],column:e,api:this.gridApi,columnApi:this.columnApi,source:o};this.eventService.dispatchEvent(r)}},e.prototype.moveRowGroupColumn=function(e,t,o){void 0===o&&(o="api");var r=this.rowGroupColumns[e];this.rowGroupColumns.splice(e,1),this.rowGroupColumns.splice(t,0,r);var n={type:m.Events.EVENT_COLUMN_ROW_GROUP_CHANGED,columns:this.rowGroupColumns,column:1===this.rowGroupColumns.length?this.rowGroupColumns[0]:null,api:this.gridApi,columnApi:this.columnApi,source:o};this.eventService.dispatchEvent(n)},e.prototype.moveColumns=function(e,t,o){if(void 0===o&&(o="api"),this.columnAnimationService.start(),t>this.gridColumns.length-e.length)return console.warn("ag-Grid: tried to insert columns in invalid location, toIndex = "+t),void console.warn("ag-Grid: remember that you should not count the moving columns when calculating the new index");var r=this.getGridColumns(e);if(this.doesMovePassRules(r,t)){S._.moveInArray(this.gridColumns,r,t),this.updateDisplayedColumns(o);var n={type:m.Events.EVENT_COLUMN_MOVED,columns:r,column:1===r.length?r[0]:null,toIndex:t,api:this.gridApi,columnApi:this.columnApi,source:o};this.eventService.dispatchEvent(n),this.columnAnimationService.finish()}},e.prototype.doesMovePassRules=function(e,t){var o=this.gridColumns.slice();return S._.moveInArray(o,e,t),!!this.doesMovePassMarryChildren(o)&&!!this.doesMovePassLockedPositions(o)},e.prototype.doesMovePassLockedPositions=function(e){var t=!1,o=!0;return e.forEach((function(e){e.isLockPosition()?t&&(o=!1):t=!0})),o},e.prototype.doesMovePassMarryChildren=function(e){var t=!0;return this.columnUtils.depthFirstOriginalTreeSearch(null,this.gridBalancedTree,(function(o){if(o instanceof y.OriginalColumnGroup){var r=o;if(r.getColGroupDef()&&r.getColGroupDef().marryChildren){var n=[];r.getLeafColumns().forEach((function(t){var o=e.indexOf(t);n.push(o)})),Math.max.apply(Math,n)-Math.min.apply(Math,n)>r.getLeafColumns().length-1&&(t=!1)}}})),t},e.prototype.moveColumn=function(e,t,o){void 0===o&&(o="api"),this.moveColumns([e],t,o)},e.prototype.moveColumnByIndex=function(e,t,o){void 0===o&&(o="api");var r=this.gridColumns[e];this.moveColumn(r,t,o)},e.prototype.getBodyContainerWidth=function(){return this.bodyWidth},e.prototype.getContainerWidth=function(e){switch(e){case a.Column.PINNED_LEFT:return this.leftWidth;case a.Column.PINNED_RIGHT:return this.rightWidth;default:return this.bodyWidth}},e.prototype.updateBodyWidths=function(){var e=this.getWidthOfColsInList(this.displayedCenterColumns),t=this.getWidthOfColsInList(this.displayedLeftColumns),o=this.getWidthOfColsInList(this.displayedRightColumns);if(this.bodyWidthDirty=this.bodyWidth!==e,this.bodyWidth!==e||this.leftWidth!==t||this.rightWidth!==o){this.bodyWidth=e,this.leftWidth=t,this.rightWidth=o;var r={type:m.Events.EVENT_DISPLAYED_COLUMNS_WIDTH_CHANGED,api:this.gridApi,columnApi:this.columnApi};this.eventService.dispatchEvent(r)}},e.prototype.getValueColumns=function(){return this.valueColumns?this.valueColumns:[]},e.prototype.getPivotColumns=function(){return this.pivotColumns?this.pivotColumns:[]},e.prototype.isPivotActive=function(){return this.pivotColumns&&this.pivotColumns.length>0&&this.pivotMode},e.prototype.getRowGroupColumns=function(){return this.rowGroupColumns?this.rowGroupColumns:[]},e.prototype.getDisplayedCenterColumns=function(){return this.displayedCenterColumns},e.prototype.getDisplayedLeftColumns=function(){return this.displayedLeftColumns},e.prototype.getDisplayedRightColumns=function(){return this.displayedRightColumns},e.prototype.getDisplayedColumns=function(e){switch(e){case a.Column.PINNED_LEFT:return this.getDisplayedLeftColumns();case a.Column.PINNED_RIGHT:return this.getDisplayedRightColumns();default:return this.getDisplayedCenterColumns()}},e.prototype.getAllPrimaryColumns=function(){return this.primaryColumns?this.primaryColumns.slice():null},e.prototype.getSecondaryColumns=function(){return this.secondaryColumns?this.secondaryColumns.slice():null},e.prototype.getAllColumnsForQuickFilter=function(){return this.columnsForQuickFilter},e.prototype.getAllGridColumns=function(){return this.gridColumns},e.prototype.isEmpty=function(){return S._.missingOrEmpty(this.gridColumns)},e.prototype.isRowGroupEmpty=function(){return S._.missingOrEmpty(this.rowGroupColumns)},e.prototype.setColumnVisible=function(e,t,o){void 0===o&&(o="api"),this.setColumnsVisible([e],t,o)},e.prototype.setColumnsVisible=function(e,t,o){var r=this;void 0===o&&(o="api"),this.columnAnimationService.start(),this.actionOnGridColumns(e,(function(e){return e.isVisible()!==t&&(e.setVisible(t,o),!0)}),o,(function(){return{type:m.Events.EVENT_COLUMN_VISIBLE,visible:t,column:null,columns:null,api:r.gridApi,columnApi:r.columnApi,source:o}})),this.columnAnimationService.finish()},e.prototype.setColumnPinned=function(e,t,o){void 0===o&&(o="api"),e&&this.setColumnsPinned([e],t,o)},e.prototype.setColumnsPinned=function(e,t,o){var r,n=this;void 0===o&&(o="api"),"print"!==this.gridOptionsWrapper.getDomLayout()?(this.columnAnimationService.start(),r=!0===t||t===a.Column.PINNED_LEFT?a.Column.PINNED_LEFT:t===a.Column.PINNED_RIGHT?a.Column.PINNED_RIGHT:null,this.actionOnGridColumns(e,(function(e){return e.getPinned()!==r&&(e.setPinned(r),!0)}),o,(function(){return{type:m.Events.EVENT_COLUMN_PINNED,pinned:r,column:null,columns:null,api:n.gridApi,columnApi:n.columnApi,source:o}})),this.columnAnimationService.finish()):console.warn("Changing the column pinning status is not allowed with domLayout='print'")},e.prototype.actionOnGridColumns=function(e,t,o,r){var n=this;if(!S._.missingOrEmpty(e)){var i=[];if(e.forEach((function(e){var o=n.getGridColumn(e);o&&!1!==t(o)&&i.push(o)})),0!==i.length&&(this.updateDisplayedColumns(o),S._.exists(r)&&r)){var s=r();s.columns=i,s.column=1===i.length?i[0]:null,this.eventService.dispatchEvent(s)}}},e.prototype.getDisplayedColBefore=function(e){var t=this.getAllDisplayedColumns(),o=t.indexOf(e);return o>0?t[o-1]:null},e.prototype.getDisplayedColAfter=function(e){var t=this.getAllDisplayedColumns(),o=t.indexOf(e);return o<t.length-1?t[o+1]:null},e.prototype.getDisplayedGroupAfter=function(e){for(var t=e.getDisplayedLeafColumns()[0],o=e.getOriginalColumnGroup().getLevel();;){if(!(t=this.getDisplayedColAfter(t)))return null;for(var r=t.getParent();r.getOriginalColumnGroup().getLevel()!==o;)r=r.getParent();if(r!==e)return r}},e.prototype.isPinningLeft=function(){return this.displayedLeftColumns.length>0},e.prototype.isPinningRight=function(){return this.displayedRightColumns.length>0},e.prototype.getPrimaryAndSecondaryAndAutoColumns=function(){var e=this.primaryColumns?this.primaryColumns.slice(0):[];return this.groupAutoColumns&&S._.exists(this.groupAutoColumns)&&this.groupAutoColumns.forEach((function(t){return e.push(t)})),this.secondaryColumnsPresent&&this.secondaryColumns&&this.secondaryColumns.forEach((function(t){return e.push(t)})),e},e.prototype.createStateItemFromColumn=function(e){var t=e.isRowGroupActive()?this.rowGroupColumns.indexOf(e):null,o=e.isPivotActive()?this.pivotColumns.indexOf(e):null,r=e.isValueActive()?e.getAggFunc():null;return{colId:e.getColId(),hide:!e.isVisible(),aggFunc:r,width:e.getActualWidth(),pivotIndex:o,pinned:e.getPinned(),rowGroupIndex:t}},e.prototype.getColumnState=function(){if(S._.missing(this.primaryColumns))return[];var e=this.primaryColumns.map(this.createStateItemFromColumn.bind(this)),t=(this.groupAutoColumns?this.groupAutoColumns.map(this.createStateItemFromColumn.bind(this)):[]).concat(e);return this.pivotMode||this.orderColumnStateList(t),t},e.prototype.orderColumnStateList=function(e){var t=this.gridColumns.map((function(e){return e.getColId()}));e.sort((function(e,o){return t.indexOf(e.colId)-t.indexOf(o.colId)}))},e.prototype.resetColumnState=function(e,t){void 0===e&&(e=!1),void 0===t&&(t="api");var o=this.getColumnsFromTree(this.primaryColumnTree),r=[],n=1e3,i=1e3;o&&o.forEach((function(e){var t=e.getColDef().rowGroupIndex,o=e.getColDef().rowGroup,s=e.getColDef().pivotIndex,a=e.getColDef().pivot,l={colId:e.getColId(),aggFunc:e.getColDef().aggFunc,hide:e.getColDef().hide,pinned:e.getColDef().pinned,rowGroupIndex:t,pivotIndex:e.getColDef().pivotIndex,width:e.getColDef().width};S._.missing(t)&&o&&(l.rowGroupIndex=n++),S._.missing(s)&&a&&(l.pivotIndex=i++),r.push(l)})),this.setColumnState(r,e,t)},e.prototype.setColumnState=function(e,t,o){var r=this;if(void 0===t&&(t=!1),void 0===o&&(o="api"),S._.missingOrEmpty(this.primaryColumns))return!1;var n=this.getColumnState();this.autoGroupsNeedBuilding=!0;var i=this.primaryColumns.slice();this.rowGroupColumns=[],this.valueColumns=[],this.pivotColumns=[];var s=!0,a={},l={},p=[];if(e&&e.forEach((function(e){if(S._.exists(r.getAutoColumn(e.colId)))p.push(e);else{var t=r.getPrimaryColumn(e.colId);t?(r.syncColumnWithStateItem(t,e,a,l,o),S._.removeFromArray(i,t)):(console.warn("ag-grid: column "+e.colId+" not found"),s=!1)}})),i.forEach(this.syncColumnWithNoState.bind(this)),this.rowGroupColumns.sort(this.sortColumnListUsingIndexes.bind(this,a)),this.pivotColumns.sort(this.sortColumnListUsingIndexes.bind(this,l)),this.updateGridColumns(),p.forEach((function(e){var t=r.getAutoColumn(e.colId);r.syncColumnWithStateItem(t,e,a,l,o)})),e){var u=e.map((function(e){return e.colId}));this.gridColumns.sort((function(e,t){return u.indexOf(e.getId())-u.indexOf(t.getId())}))}if(this.updateDisplayedColumns(o),!t){var d={type:m.Events.EVENT_COLUMN_EVERYTHING_CHANGED,api:this.gridApi,columnApi:this.columnApi,source:o};this.eventService.dispatchEvent(d)}return this.raiseColumnEvents(n,o),s},e.prototype.raiseColumnEvents=function(e,t){var o=this;if(!this.gridOptionsWrapper.isSuppressSetColumnStateEvents()){var r=this.getColumnState(),n=function(n,i,s){if(!S._.compareArrays(e.map(i).sort(),r.map(i).sort())){var a={type:n,columns:s,column:1===s.length?s[0]:null,api:o.gridApi,columnApi:o.columnApi,source:t};o.eventService.dispatchEvent(a)}},i=function(t){var r=[],n={};return e.forEach((function(e){n[e.colId]=e})),o.gridColumns.forEach((function(e){var o=n[e.getColId()];o&&!t(o,e)||r.push(e)})),r};n(m.Events.EVENT_COLUMN_VALUE_CHANGED,(function(e){return e.colId+"-"+e.aggFunc}),this.valueColumns),n(m.Events.EVENT_COLUMN_PIVOT_CHANGED,(function(e){return e.colId+"-"+e.pivotIndex}),this.pivotColumns),n(m.Events.EVENT_COLUMN_ROW_GROUP_CHANGED,(function(e){return e.colId+"-"+e.rowGroupIndex}),this.rowGroupColumns),this.raiseColumnPinnedEvent(i((function(e,t){return e.pinned!==t.getPinned()})),t);var s=i((function(e,t){return e.hide===t.isVisible()}));this.raiseColumnVisibleEvent(s,t),this.raiseColumnResizeEvent(i((function(e,t){return e.width!==t.getActualWidth()})),t),this.raiseColumnMovedEvent(e,t)}},e.prototype.raiseColumnPinnedEvent=function(e,t){if(e.length>0){var o={type:m.Events.EVENT_COLUMN_PINNED,pinned:null,columns:e,column:null,api:this.gridApi,columnApi:this.columnApi,source:t};this.eventService.dispatchEvent(o)}},e.prototype.raiseColumnVisibleEvent=function(e,t){if(e.length>0){var o={type:m.Events.EVENT_COLUMN_VISIBLE,visible:void 0,columns:e,column:null,api:this.gridApi,columnApi:this.columnApi,source:t};this.eventService.dispatchEvent(o)}},e.prototype.raiseColumnResizeEvent=function(e,t){if(e.length>0){var o={type:m.Events.EVENT_COLUMN_RESIZED,columns:e,column:null,finished:!0,api:this.gridApi,columnApi:this.columnApi,source:t};this.eventService.dispatchEvent(o)}},e.prototype.raiseColumnMovedEvent=function(e,t){for(var o=[],r=this.getColumnState(),n=function(t){var n=e[t],s=r[t];if(!n||s.hide)return"continue";if(n.colId!==s.colId){var a=S._.find(i.allDisplayedColumns,(function(e){return e.getColId()===s.colId}));o.push(a)}},i=this,s=0;s<r.length;s++)n(s);if(o.length>0){var a={type:m.Events.EVENT_COLUMN_MOVED,columns:o,column:null,toIndex:void 0,api:this.gridApi,columnApi:this.columnApi,source:t};this.eventService.dispatchEvent(a)}},e.prototype.sortColumnListUsingIndexes=function(e,t,o){return e[t.getId()]-e[o.getId()]},e.prototype.syncColumnWithNoState=function(e,t){e.setVisible(!1,t),e.setAggFunc(null),e.setPinned(null),e.setRowGroupActive(!1,t),e.setPivotActive(!1,t),e.setValueActive(!1,t)},e.prototype.syncColumnWithStateItem=function(e,t,o,r,n){if(e){e.setVisible(!t.hide,n),e.setPinned(t.pinned);var i=this.gridOptionsWrapper.getMinColWidth();t.width&&i&&t.width>=i&&e.setActualWidth(t.width,n),"string"==typeof t.aggFunc?(e.setAggFunc(t.aggFunc),e.setValueActive(!0,n),this.valueColumns.push(e)):(S._.exists(t.aggFunc)&&console.warn("ag-Grid: 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 isintended for the column state to be stored and retrieved as simple JSON."),e.setAggFunc(null),e.setValueActive(!1,n)),"number"==typeof t.rowGroupIndex?(this.rowGroupColumns.push(e),e.setRowGroupActive(!0,n),o[e.getId()]=t.rowGroupIndex):e.setRowGroupActive(!1,n),"number"==typeof t.pivotIndex?(this.pivotColumns.push(e),e.setPivotActive(!0,n),r[e.getId()]=t.pivotIndex):e.setPivotActive(!1,n)}},e.prototype.getGridColumns=function(e){return this.getColumns(e,this.getGridColumn.bind(this))},e.prototype.getColumns=function(e,t){var o=[];return e&&e.forEach((function(e){var r=t(e);r&&o.push(r)})),o},e.prototype.getColumnWithValidation=function(e){var t=this.getPrimaryColumn(e);return t||console.warn("ag-Grid: could not find column "+t),t},e.prototype.getPrimaryColumn=function(e){return this.getColumn(e,this.primaryColumns)},e.prototype.getGridColumn=function(e){return this.getColumn(e,this.gridColumns)},e.prototype.getColumn=function(e,t){if(!e)return null;for(var o=0;o<t.length;o++)if(this.columnsMatch(t[o],e))return t[o];return this.getAutoColumn(e)},e.prototype.getAutoColumn=function(e){var t=this;return this.groupAutoColumns&&S._.exists(this.groupAutoColumns)&&!S._.missing(this.groupAutoColumns)?S._.find(this.groupAutoColumns,(function(o){return t.columnsMatch(o,e)})):null},e.prototype.columnsMatch=function(e,t){var o=e===t,r=e.getColDef()===t,n=e.getColId()==t;return o||r||n},e.prototype.getDisplayNameForColumn=function(e,t,o){if(void 0===o&&(o=!1),!e)return null;var r=this.getHeaderName(e.getColDef(),e,null,null,t);return o?this.wrapHeaderNameWithAggFunc(e,r):r},e.prototype.getDisplayNameForOriginalColumnGroup=function(e,t,o){var r=t?t.getColGroupDef():null;return r?this.getHeaderName(r,null,e,t,o):null},e.prototype.getDisplayNameForColumnGroup=function(e,t){return this.getDisplayNameForOriginalColumnGroup(e,e.getOriginalColumnGroup(),t)},e.prototype.getHeaderName=function(e,t,o,r,n){var i=e.headerValueGetter;if(i){var s={colDef:e,column:t,columnGroup:o,originalColumnGroup:r,location:n,api:this.gridOptionsWrapper.getApi(),context:this.gridOptionsWrapper.getContext()};return"function"==typeof i?i(s):"string"==typeof i?this.expressionService.evaluate(i,s):(console.warn("ag-grid: headerValueGetter must be a function or a string"),"")}return null!=e.headerName?e.headerName:e.field?S._.camelCaseToHumanText(e.field):""},e.prototype.wrapHeaderNameWithAggFunc=function(e,t){if(this.gridOptionsWrapper.isSuppressAggFuncInHeader())return t;var o,r=e.getColDef().pivotValueColumn,n=null;if(S._.exists(r))n=r?r.getAggFunc():null,o=!0;else{var i=e.isValueActive(),s=this.pivotMode||!this.isRowGroupEmpty();i&&s?(n=e.getAggFunc(),o=!0):o=!1}if(o){var a="string"==typeof n?n:"func";return this.gridOptionsWrapper.getLocaleTextFunc()(a,a)+"("+t+")"}return t},e.prototype.getColumnGroup=function(e,t){if(!e)return null;if(e instanceof s.ColumnGroup)return e;var o=this.getAllDisplayedColumnGroups(),r="number"==typeof t,n=null;return this.columnUtils.depthFirstAllColumnTreeSearch(o,(function(o){if(o instanceof s.ColumnGroup){var i=o;(r?e===i.getGroupId()&&t===i.getInstanceId():e===i.getGroupId())&&(n=i)}})),n},e.prototype.isReady=function(){return this.ready},e.prototype.createValueColumns=function(e,t){this.valueColumns=this.extractColumns(t,this.valueColumns,(function(t,o){return t.setValueActive(o,e)}),(function(){return null}),(function(e){return!!e.aggFunc})),this.valueColumns.forEach((function(e){e.getAggFunc()||e.setAggFunc(e.getColDef().aggFunc)}))},e.prototype.extractRowGroupColumns=function(e,t){this.rowGroupColumns=this.extractColumns(t,this.rowGroupColumns,(function(t,o){return t.setRowGroupActive(o,e)}),(function(e){return e.rowGroupIndex}),(function(e){return e.rowGroup}))},e.prototype.extractColumns=function(e,t,o,r,n){var i=this;t||(t=[]);var s=t.filter((function(e){return i.primaryColumns.indexOf(e)<0})),a=t.filter((function(e){return i.primaryColumns.indexOf(e)>=0})),l=this.primaryColumns.filter((function(t){return!e||e.indexOf(t)<0}));s.forEach((function(e){return o(e,!1)}));var p=[];return l.forEach((function(e){"number"==typeof r(e.getColDef())&&p.push(e)})),p.sort((function(e,t){var o=r(e.getColDef()),n=r(t.getColDef());return o===n?0:o<n?-1:1})),l.forEach((function(e){if(n(e.getColDef())){if(p.indexOf(e)>=0)return;p.push(e)}})),p.forEach((function(e){return o(e,!0)})),a.concat(p)},e.prototype.extractPivotColumns=function(e,t){this.pivotColumns=this.extractColumns(t,this.pivotColumns,(function(t,o){return t.setPivotActive(o,e)}),(function(e){return e.pivotIndex}),(function(e){return e.pivot}))},e.prototype.resetColumnGroupState=function(e){void 0===e&&(e="api");var t=[];this.columnUtils.depthFirstOriginalTreeSearch(null,this.primaryColumnTree,(function(e){if(e instanceof y.OriginalColumnGroup){var o={groupId:e.getGroupId(),open:e.getColGroupDef().openByDefault};t.push(o)}})),this.setColumnGroupState(t,e)},e.prototype.getColumnGroupState=function(){var e=[];return this.columnUtils.depthFirstOriginalTreeSearch(null,this.gridBalancedTree,(function(t){if(t instanceof y.OriginalColumnGroup){var o=t;e.push({groupId:o.getGroupId(),open:o.isExpanded()})}})),e},e.prototype.setColumnGroupState=function(e,t){var o=this;void 0===t&&(t="api"),this.columnAnimationService.start();var r=[];e.forEach((function(e){var t=e.groupId,n=e.open,i=o.getOriginalColumnGroup(t);i&&i.isExpanded()!==n&&(o.logger.log("columnGroupOpened("+i.getGroupId()+","+n+")"),i.setExpanded(n),r.push(i))})),this.updateGroupsAndDisplayedColumns(t),r.forEach((function(e){var t={type:m.Events.EVENT_COLUMN_GROUP_OPENED,columnGroup:e,api:o.gridApi,columnApi:o.columnApi};o.eventService.dispatchEvent(t)})),this.columnAnimationService.finish()},e.prototype.setColumnGroupOpened=function(e,t,o){var r;void 0===o&&(o="api"),r=e instanceof y.OriginalColumnGroup?e.getId():e,this.setColumnGroupState([{groupId:r,open:t}],o)},e.prototype.getOriginalColumnGroup=function(e){if(e instanceof y.OriginalColumnGroup)return e;"string"!=typeof e&&console.error("ag-Grid: group key must be a string");var t=null;return this.columnUtils.depthFirstOriginalTreeSearch(null,this.gridBalancedTree,(function(o){if(o instanceof y.OriginalColumnGroup){var r=o;r.getId()===e&&(t=r)}})),t},e.prototype.calculateColumnsForDisplay=function(){var e=this;return this.pivotMode&&!this.secondaryColumnsPresent?S._.filter(this.gridColumns,(function(t){var o=e.groupAutoColumns&&e.groupAutoColumns.indexOf(t)>=0,r=e.valueColumns&&e.valueColumns.indexOf(t)>=0;return o||r})):S._.filter(this.gridColumns,(function(t){return e.groupAutoColumns&&e.groupAutoColumns.indexOf(t)>=0||t.isVisible()}))},e.prototype.checkColSpanActiveInCols=function(e){var t=!1;return e.forEach((function(e){S._.exists(e.getColDef().colSpan)&&(t=!0)})),t},e.prototype.calculateColumnsForGroupDisplay=function(){var e=this;this.groupDisplayColumns=[];var t=function(t){var o=t.getColDef();o&&S._.exists(o.showRowGroup)&&e.groupDisplayColumns.push(t)};this.gridColumns.forEach(t),this.groupAutoColumns&&this.groupAutoColumns.forEach(t)},e.prototype.getGroupDisplayColumns=function(){return this.groupDisplayColumns},e.prototype.updateDisplayedColumns=function(e){var t=this.calculateColumnsForDisplay();this.buildDisplayedTrees(t),this.calculateColumnsForGroupDisplay(),this.updateGroupsAndDisplayedColumns(e),this.setFirstRightAndLastLeftPinned(e)},e.prototype.isSecondaryColumnsPresent=function(){return this.secondaryColumnsPresent},e.prototype.setSecondaryColumns=function(e,t){void 0===t&&(t="api");var o=e&&e.length>0;if(o||this.secondaryColumnsPresent){if(o){this.processSecondaryColumnDefinitions(e);var r=this.columnFactory.createColumnTree(e,!1);this.secondaryBalancedTree=r.columnTree,this.secondaryHeaderRowCount=r.treeDept+1,this.secondaryColumns=this.getColumnsFromTree(this.secondaryBalancedTree),this.secondaryColumnsPresent=!0}else this.secondaryBalancedTree=null,this.secondaryHeaderRowCount=-1,this.secondaryColumns=null,this.secondaryColumnsPresent=!1;this.updateGridColumns(),this.updateDisplayedColumns(t)}},e.prototype.processSecondaryColumnDefinitions=function(e){var t=this.gridOptionsWrapper.getProcessSecondaryColDefFunc(),o=this.gridOptionsWrapper.getProcessSecondaryColGroupDefFunc();(t||o)&&e&&function e(r){r.forEach((function(r){if(S._.exists(r.children)){var n=r;o&&o(n),e(n.children)}else t&&t(r)}))}(e)},e.prototype.updateGridColumns=function(){this.gridColsArePrimary&&(this.lastPrimaryOrder=this.gridColumns),this.secondaryColumns&&this.secondaryBalancedTree?(this.gridBalancedTree=this.secondaryBalancedTree.slice(),this.gridHeaderRowCount=this.secondaryHeaderRowCount,this.gridColumns=this.secondaryColumns.slice(),this.gridColsArePrimary=!1):(this.gridBalancedTree=this.primaryColumnTree.slice(),this.gridHeaderRowCount=this.primaryHeaderRowCount,this.gridColumns=this.primaryColumns.slice(),this.gridColsArePrimary=!0,this.orderGridColsLikeLastPrimary()),this.addAutoGroupToGridColumns(),this.autoRowHeightColumns=this.gridColumns.filter((function(e){return e.getColDef().autoHeight})),this.putFixedColumnsFirst(),this.setupQuickFilterColumns(),this.clearDisplayedColumns(),this.colSpanActive=this.checkColSpanActiveInCols(this.gridColumns);var e={type:m.Events.EVENT_GRID_COLUMNS_CHANGED,api:this.gridApi,columnApi:this.columnApi};this.eventService.dispatchEvent(e)},e.prototype.orderGridColsLikeLastPrimary=function(){var e=this;if(!S._.missing(this.lastPrimaryOrder)){var t=!0;if(this.gridColumns.forEach((function(o){e.lastPrimaryOrder.indexOf(o)>=0&&(t=!1)})),!t){var o=this.lastPrimaryOrder.filter((function(t){return e.gridColumns.indexOf(t)>=0})),r=this.gridColumns.filter((function(e){return o.indexOf(e)<0})),n=o.slice();r.forEach((function(e){var t=e.getOriginalParent();if(t){for(var o=[];!o.length&&t;)t.getLeafColumns().forEach((function(e){var t=n.indexOf(e)>=0,r=o.indexOf(e)<0;t&&r&&o.push(e)})),t=t.getOriginalParent();if(o.length){var r=o.map((function(e){return n.indexOf(e)})),i=Math.max.apply(Math,r);S._.insertIntoArray(n,e,i+1)}else n.push(e)}else n.push(e)})),this.gridColumns=n}}},e.prototype.isPrimaryColumnGroupsPresent=function(){return this.primaryHeaderRowCount>1},e.prototype.setupQuickFilterColumns=function(){this.groupAutoColumns?this.columnsForQuickFilter=this.primaryColumns.concat(this.groupAutoColumns):this.columnsForQuickFilter=this.primaryColumns},e.prototype.putFixedColumnsFirst=function(){var e=this.gridColumns.filter((function(e){return e.isLockPosition()})),t=this.gridColumns.filter((function(e){return!e.isLockPosition()}));this.gridColumns=e.concat(t)},e.prototype.addAutoGroupToGridColumns=function(){if(this.createGroupAutoColumnsIfNeeded(),!S._.missing(this.groupAutoColumns)){this.gridColumns=this.groupAutoColumns?this.groupAutoColumns.concat(this.gridColumns):this.gridColumns;var e=this.columnFactory.createForAutoGroups(this.groupAutoColumns,this.gridBalancedTree);this.gridBalancedTree=e.concat(this.gridBalancedTree)}},e.prototype.clearDisplayedColumns=function(){this.displayedLeftColumnTree=[],this.displayedRightColumnTree=[],this.displayedCentreColumnTree=[],this.displayedLeftHeaderRows={},this.displayedRightHeaderRows={},this.displayedCentreHeaderRows={},this.displayedLeftColumns=[],this.displayedRightColumns=[],this.displayedCenterColumns=[],this.allDisplayedColumns=[],this.allDisplayedVirtualColumns=[]},e.prototype.updateGroupsAndDisplayedColumns=function(e){this.updateOpenClosedVisibilityInColumnGroups(),this.updateDisplayedColumnsFromTrees(e),this.updateVirtualSets(),this.updateBodyWidths();var t={type:m.Events.EVENT_DISPLAYED_COLUMNS_CHANGED,api:this.gridApi,columnApi:this.columnApi};this.eventService.dispatchEvent(t)},e.prototype.updateDisplayedColumnsFromTrees=function(e){this.addToDisplayedColumns(this.displayedLeftColumnTree,this.displayedLeftColumns),this.addToDisplayedColumns(this.displayedCentreColumnTree,this.displayedCenterColumns),this.addToDisplayedColumns(this.displayedRightColumnTree,this.displayedRightColumns),this.setupAllDisplayedColumns(),this.setLeftValues(e)},e.prototype.setupAllDisplayedColumns=function(){this.gridOptionsWrapper.isEnableRtl()?this.allDisplayedColumns=this.displayedRightColumns.concat(this.displayedCenterColumns).concat(this.displayedLeftColumns):this.allDisplayedColumns=this.displayedLeftColumns.concat(this.displayedCenterColumns).concat(this.displayedRightColumns)},e.prototype.setLeftValues=function(e){this.setLeftValuesOfColumns(e),this.setLeftValuesOfGroups()},e.prototype.setLeftValuesOfColumns=function(e){var t=this,o=this.primaryColumns.slice(0),r=this.gridOptionsWrapper.isEnableRtl();[this.displayedLeftColumns,this.displayedRightColumns,this.displayedCenterColumns].forEach((function(n){if(r){var i=t.getWidthOfColsInList(n);n.forEach((function(t){i-=t.getActualWidth(),t.setLeft(i,e)}))}else{var s=0;n.forEach((function(t){t.setLeft(s,e),s+=t.getActualWidth()}))}S._.removeAllFromArray(o,n)})),o.forEach((function(t){t.setLeft(null,e)}))},e.prototype.setLeftValuesOfGroups=function(){[this.displayedLeftColumnTree,this.displayedRightColumnTree,this.displayedCentreColumnTree].forEach((function(e){e.forEach((function(e){e instanceof s.ColumnGroup&&e.checkLeft()}))}))},e.prototype.addToDisplayedColumns=function(e,t){t.length=0,this.columnUtils.depthFirstDisplayedColumnTreeSearch(e,(function(e){e instanceof a.Column&&t.push(e)}))},e.prototype.updateDisplayedCenterVirtualColumns=function(){this.suppressColumnVirtualisation?this.allDisplayedCenterVirtualColumns=this.displayedCenterColumns:this.allDisplayedCenterVirtualColumns=this.filterOutColumnsWithinViewport(),this.allDisplayedVirtualColumns=this.allDisplayedCenterVirtualColumns.concat(this.displayedLeftColumns).concat(this.displayedRightColumns);var e={};return this.allDisplayedVirtualColumns.forEach((function(t){e[t.getId()]=!0})),e},e.prototype.getVirtualHeaderGroupRow=function(e,t){var o;switch(e){case a.Column.PINNED_LEFT:o=this.displayedLeftHeaderRows[t];break;case a.Column.PINNED_RIGHT:o=this.displayedRightHeaderRows[t];break;default:o=this.displayedCentreHeaderRows[t]}return S._.missing(o)&&(o=[]),o},e.prototype.updateDisplayedVirtualGroups=function(e){function t(o,r,n){for(var i=!1,s=0;s<o.length;s++){var l=o[s];(l instanceof a.Column?!0===e[l.getId()]:t(l.getDisplayedChildren(),r,n+1))&&(i=!0,r[n]||(r[n]=[]),r[n].push(l))}return i}this.displayedLeftHeaderRows={},this.displayedRightHeaderRows={},this.displayedCentreHeaderRows={},t(this.displayedLeftColumnTree,this.displayedLeftHeaderRows,0),t(this.displayedRightColumnTree,this.displayedRightHeaderRows,0),t(this.displayedCentreColumnTree,this.displayedCentreHeaderRows,0)},e.prototype.updateVirtualSets=function(){var e=this.updateDisplayedCenterVirtualColumns();this.updateDisplayedVirtualGroups(e)},e.prototype.filterOutColumnsWithinViewport=function(){return S._.filter(this.displayedCenterColumns,this.isColumnInViewport.bind(this))},e.prototype.sizeColumnsToFit=function(e,t){var o=this;void 0===t&&(t="api");var r=this.getAllDisplayedColumns();if(!(e<=0||0===r.length)){for(var n=S._.filter(r,(function(e){return!0===e.getColDef().suppressSizeToFit})),i=S._.filter(r,(function(e){return!0!==e.getColDef().suppressSizeToFit})),s=i.slice(0),a=!1;!a;){a=!0;var l=e-this.getWidthOfColsInList(n);if(l<=0)i.forEach((function(e){e.setMinimum(t)}));else for(var p=l/this.getWidthOfColsInList(i),u=l,d=i.length-1;d>=0;d--){var c=i[d],h=Math.round(c.getActualWidth()*p);h<c.getMinWidth()?(c.setMinimum(t),f(c),a=!1):c.isGreaterThanMax(h)?(c.setActualWidth(c.getMaxWidth(),t),f(c),a=!1):0===d?c.setActualWidth(u,t):c.setActualWidth(h,t),u-=h}}this.setLeftValues(t),this.updateBodyWidths(),s.forEach((function(e){var t={type:m.Events.EVENT_COLUMN_RESIZED,column:e,columns:[e],finished:!0,api:o.gridApi,columnApi:o.columnApi,source:"sizeColumnsToFit"};o.eventService.dispatchEvent(t)}))}function f(e){S._.removeFromArray(i,e),n.push(e)}},e.prototype.buildDisplayedTrees=function(e){var t=S._.filter(e,(function(e){return"left"===e.getPinned()})),o=S._.filter(e,(function(e){return"right"===e.getPinned()})),r=S._.filter(e,(function(e){return"left"!==e.getPinned()&&"right"!==e.getPinned()})),n=new v.GroupInstanceIdCreator;this.displayedLeftColumnTree=this.displayedGroupCreator.createDisplayedGroups(t,this.gridBalancedTree,n,a.Column.PINNED_LEFT,this.displayedLeftColumnTree),this.displayedRightColumnTree=this.displayedGroupCreator.createDisplayedGroups(o,this.gridBalancedTree,n,a.Column.PINNED_RIGHT,this.displayedRightColumnTree),this.displayedCentreColumnTree=this.displayedGroupCreator.createDisplayedGroups(r,this.gridBalancedTree,n,null,this.displayedCentreColumnTree)},e.prototype.updateOpenClosedVisibilityInColumnGroups=function(){var e=this.getAllDisplayedColumnGroups();this.columnUtils.depthFirstAllColumnTreeSearch(e,(function(e){e instanceof s.ColumnGroup&&e.calculateDisplayedColumns()}))},e.prototype.getGroupAutoColumns=function(){return this.groupAutoColumns},e.prototype.createGroupAutoColumnsIfNeeded=function(){if(this.autoGroupsNeedBuilding)if(this.autoGroupsNeedBuilding=!1,!(this.rowGroupColumns.length>0||this.usingTreeData)||this.gridOptionsWrapper.isGroupSuppressAutoColumn()||this.gridOptionsWrapper.isGroupUseEntireRow()||this.gridOptionsWrapper.isGroupSuppressRow())this.groupAutoColumns=null;else{var e=this.autoGroupColService.createAutoGroupColumns(this.rowGroupColumns);!this.autoColsEqual(e,this.groupAutoColumns)&&(this.groupAutoColumns=e)}},e.prototype.autoColsEqual=function(e,t){if(!e&&!t)return!0;if(!e||!t)return!1;if(e.length!==t.length)return!1;for(var o=0;o<e.length;o++){var r=e[o],n=t[o];if(r.getColId()!==n.getColId())return!1}return!0},e.prototype.getWidthOfColsInList=function(e){for(var t=0,o=0;o<e.length;o++)t+=e[o].getActualWidth();return t},e.prototype.getGridBalancedTree=function(){return this.gridBalancedTree},r([C.Autowired("gridOptionsWrapper"),n("design:type",l.GridOptionsWrapper)],e.prototype,"gridOptionsWrapper",void 0),r([C.Autowired("expressionService"),n("design:type",p.ExpressionService)],e.prototype,"expressionService",void 0),r([C.Autowired("columnFactory"),n("design:type",u.ColumnFactory)],e.prototype,"columnFactory",void 0),r([C.Autowired("displayedGroupCreator"),n("design:type",d.DisplayedGroupCreator)],e.prototype,"displayedGroupCreator",void 0),r([C.Autowired("autoWidthCalculator"),n("design:type",c.AutoWidthCalculator)],e.prototype,"autoWidthCalculator",void 0),r([C.Autowired("eventService"),n("design:type",h.EventService)],e.prototype,"eventService",void 0),r([C.Autowired("columnUtils"),n("design:type",f.ColumnUtils)],e.prototype,"columnUtils",void 0),r([C.Autowired("context"),n("design:type",C.Context)],e.prototype,"context",void 0),r([C.Autowired("columnAnimationService"),n("design:type",w.ColumnAnimationService)],e.prototype,"columnAnimationService",void 0),r([C.Autowired("autoGroupColService"),n("design:type",E.AutoGroupColService)],e.prototype,"autoGroupColService",void 0),r([C.Optional("aggFuncService"),n("design:type",Object)],e.prototype,"aggFuncService",void 0),r([C.Optional("valueCache"),n("design:type",_.ValueCache)],e.prototype,"valueCache",void 0),r([C.Autowired("columnApi"),n("design:type",R.ColumnApi)],e.prototype,"columnApi",void 0),r([C.Autowired("gridApi"),n("design:type",b.GridApi)],e.prototype,"gridApi",void 0),r([C.PostConstruct,n("design:type",Function),n("design:paramtypes",[]),n("design:returntype",void 0)],e.prototype,"init",null),r([i(0,C.Qualifier("loggerFactory")),n("design:type",Function),n("design:paramtypes",[g.LoggerFactory]),n("design:returntype",void 0)],e.prototype,"setBeans",null),r([C.Bean("columnController")],e)}();t.ColumnController=O},99093:function(e,t,o){var r,n=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o])},r(e,t)},function(e,t){function o(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)}),i=this&&this.__decorate||function(e,t,o,r){var n,i=arguments.length,s=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,o):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,o,r);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(s=(i<3?n(s):i>3?n(t,o,s):n(t,o))||s);return i>3&&s&&Object.defineProperty(t,o,s),s},s=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)};Object.defineProperty(t,"__esModule",{value:!0});var a=o(72493),l=o(22131),p=o(44081),u=o(47721),d=o(83423),c=function(e){function t(){return e.call(this,t.TEMPLATE)||this}return n(t,e),t.prototype.init=function(e){var t=d._.createIconNoSpan("groupLoading",this.gridOptionsWrapper,null);this.eLoadingIcon.appendChild(t);var o=this.gridOptionsWrapper.getLocaleTextFunc();this.eLoadingText.innerText=o("loadingOoo","Loading")},t.prototype.refresh=function(e){return!1},t.TEMPLATE='<div class="ag-stub-cell">\n <span class="ag-loading-icon" ref="eLoadingIcon"></span>\n <span class="ag-loading-text" ref="eLoadingText"></span>\n </div>',i([a.Autowired("gridOptionsWrapper"),s("design:type",p.GridOptionsWrapper)],t.prototype,"gridOptionsWrapper",void 0),i([u.RefSelector("eLoadingIcon"),s("design:type",HTMLElement)],t.prototype,"eLoadingIcon",void 0),i([u.RefSelector("eLoadingText"),s("design:type",HTMLElement)],t.prototype,"eLoadingText",void 0),t}(l.Component);t.LoadingCellRenderer=c},99104:function(e,t,o){var r,n=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o])},r(e,t)},function(e,t){function o(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)}),i=this&&this.__decorate||function(e,t,o,r){var n,i=arguments.length,s=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,o):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,o,r);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(s=(i<3?n(s):i>3?n(t,o,s):n(t,o))||s);return i>3&&s&&Object.defineProperty(t,o,s),s},s=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)};Object.defineProperty(t,"__esModule",{value:!0});var a=o(13650),l=o(47721),p=o(83423),u=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),t.prototype.getDefaultType=function(){return a.BaseFilter.CONTAINS},t.prototype.customInit=function(){this.comparator=this.filterParams.textCustomComparator?this.filterParams.textCustomComparator:t.DEFAULT_COMPARATOR,this.formatter=this.filterParams.textFormatter?this.filterParams.textFormatter:1==this.filterParams.caseSensitive?t.DEFAULT_FORMATTER:t.DEFAULT_LOWERCASE_FORMATTER,e.prototype.customInit.call(this)},t.prototype.modelFromFloatingFilter=function(e){return{type:this.selectedFilter,filter:e,filterType:"text"}},t.prototype.getApplicableFilterTypes=function(){return[a.BaseFilter.EQUALS,a.BaseFilter.NOT_EQUAL,a.BaseFilter.STARTS_WITH,a.BaseFilter.ENDS_WITH,a.BaseFilter.CONTAINS,a.BaseFilter.NOT_CONTAINS]},t.prototype.bodyTemplate=function(e){var t=this.translate.bind(this);return'<div class="ag-filter-body">\n <div class="ag-input-text-wrapper">\n <input class="ag-filter-filter" id='+(e==a.FilterConditionType.MAIN?"filterText":"filterConditionText")+' type="text" placeholder="'+t("filterOoo","Filter...")+'"/>\n </div>\n </div>'},t.prototype.initialiseFilterBodyUi=function(t){e.prototype.initialiseFilterBodyUi.call(this,t),this.addFilterChangedListener(t),this.setFilter(this.filterConditionText,a.FilterConditionType.CONDITION),this.setFilterType(this.selectedFilterCondition,a.FilterConditionType.CONDITION)},t.prototype.addFilterChangedListener=function(e){var t=this,o=e===a.FilterConditionType.MAIN?this.eFilterTextField:this.eFilterConditionTextField,r=this.getDebounceMs(this.filterParams),n=p._.debounce((function(){return t.onFilterTextFieldChanged(e)}),r);this.addDestroyableEventListener(o,"input",n)},t.prototype.refreshFilterBodyUi=function(e){var t=e===a.FilterConditionType.MAIN?this.selectedFilter:this.selectedFilterCondition;this.eFilterConditionTextField&&this.addFilterChangedListener(a.FilterConditionType.CONDITION);var o=e===a.FilterConditionType.MAIN?this.eFilterTextField:this.eFilterConditionTextField;if(o){var r=!this.doesFilterHaveHiddenInput(t)&&t!==a.BaseFilter.EMPTY;p._.setVisible(o,r)}},t.prototype.afterGuiAttached=function(){this.eFilterTextField.focus()},t.prototype.filterValues=function(e){return e===a.FilterConditionType.MAIN?this.filterText:this.filterConditionText},t.prototype.individualFilterPasses=function(e,t){var o=t==a.FilterConditionType.MAIN?this.filterText:this.filterConditionText,r=t==a.FilterConditionType.MAIN?this.selectedFilter:this.selectedFilterCondition,n=this.customFilterOptions[r];if(n&&(null!=o||n.hideFilterInput)){var i=this.filterParams.valueGetter(e.node),s=this.formatter(i);return n.test(o,s)}return o?this.checkIndividualFilter(e,r,o):t===a.FilterConditionType.MAIN||"AND"===this.conditionValue},t.prototype.checkIndividualFilter=function(e,t,o){var r=this.filterParams.valueGetter(e.node),n=this.formatter(o);if(null==r||void 0===r)return t===a.BaseFilter.NOT_EQUAL||t===a.BaseFilter.NOT_CONTAINS;var i=this.formatter(r);return this.comparator(t,i,n)},t.prototype.onFilterTextFieldChanged=function(e){var t=e===a.FilterConditionType.MAIN?this.eFilterTextField.value:this.eFilterConditionTextField.value,o=e===a.FilterConditionType.MAIN?this.filterText:this.filterConditionText,r=p._.makeNull(t);if(r&&""===r.trim()&&(r=null),o!==r){var n=r&&1!=this.filterParams.caseSensitive?r.toLowerCase():r,i=o&&1!=this.filterParams.caseSensitive?o.toLowerCase():o;e===a.FilterConditionType.MAIN?this.filterText=this.formatter(r):this.filterConditionText=this.formatter(r),i!==n&&this.onFilterChanged()}},t.prototype.setFilter=function(e,t){if(e=p._.makeNull(e),t===a.FilterConditionType.MAIN)if(e){if(this.filterText=this.formatter(e),!this.eFilterTextField)return;this.eFilterTextField.value=e}else{if(this.filterText=null,!this.eFilterTextField)return;this.eFilterTextField.value=null}else if(e){if(this.filterConditionText=this.formatter(e),!this.eFilterConditionTextField)return;this.eFilterConditionTextField.value=e}else{if(this.filterConditionText=null,!this.eFilterConditionTextField)return;this.eFilterConditionTextField.value=null}},t.prototype.getFilter=function(){return this.filterText},t.prototype.resetState=function(e){void 0===e&&(e=!1),e||(this.setFilterType(this.defaultFilter,a.FilterConditionType.MAIN),this.setFilter(null,a.FilterConditionType.MAIN)),this.setFilterType(this.defaultFilter,a.FilterConditionType.CONDITION),this.setFilter(null,a.FilterConditionType.CONDITION)},t.prototype.serialize=function(e){var t=e===a.FilterConditionType.MAIN?this.selectedFilter:this.selectedFilterCondition,o=e===a.FilterConditionType.MAIN?this.filterText:this.filterConditionText;return{type:t||this.defaultFilter,filter:o,filterType:"text"}},t.prototype.parse=function(e,t){this.setFilterType(e.type,t),this.setFilter(e.filter,t)},t.prototype.setType=function(e,t){this.setFilterType(e,t)},t.DEFAULT_FORMATTER=function(e){return e},t.DEFAULT_LOWERCASE_FORMATTER=function(e){return null==e?null:e.toString().toLowerCase()},t.DEFAULT_COMPARATOR=function(e,o,r){switch(e){case t.CONTAINS:return o.indexOf(r)>=0;case t.NOT_CONTAINS:return-1===o.indexOf(r);case t.EQUALS:return o===r;case t.NOT_EQUAL:return o!=r;case t.STARTS_WITH:return 0===o.indexOf(r);case t.ENDS_WITH:var n=o.lastIndexOf(r);return n>=0&&n===o.length-r.length;default:return console.warn("invalid filter type "+e),!1}},i([l.QuerySelector("#filterText"),s("design:type",HTMLInputElement)],t.prototype,"eFilterTextField",void 0),i([l.QuerySelector("#filterConditionText"),s("design:type",HTMLInputElement)],t.prototype,"eFilterConditionTextField",void 0),t}(a.ComparableBaseFilter);t.TextFilter=u},99162:function(e,t,o){var r,n=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o])},r(e,t)},function(e,t){function o(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)}),i=this&&this.__decorate||function(e,t,o,r){var n,i=arguments.length,s=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,o):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,o,r);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(s=(i<3?n(s):i>3?n(t,o,s):n(t,o))||s);return i>3&&s&&Object.defineProperty(t,o,s),s},s=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},a=this&&this.__param||function(e,t){return function(o,r){t(o,r,e)}};Object.defineProperty(t,"__esModule",{value:!0});var l=o(72493),p=o(60843),u=o(63405),d=o(37132),c=o(28921),h=o(65802),f=o(40797),g=o(44871),m=function(e){function t(t){return e.call(this,t)||this}return n(t,e),t.prototype.setBeans=function(e){this.logger=e.create("InfiniteCache")},t.prototype.init=function(){e.prototype.init.call(this),this.getRow(0)},t.prototype.moveItemsDown=function(e,t,o){for(var r=e.getStartRow(),n=t+o,i=e.getEndRow()-1;i>=r;i--)if(!(i<n)){var s=i-o,a=this.getRow(s,!0);a?e.setRowNode(i,a):(e.setBlankRowNode(i),e.setDirty())}},t.prototype.insertItems=function(e,t,o){for(var r=e.getStartRow(),n=e.getEndRow(),i=[],s=0;s<o.length;s++){var a=t+s;if(a>=r&&a<n){var l=o[s],p=e.setNewData(a,l);i.push(p)}}return i},t.prototype.insertItemsAtIndex=function(e,t){var o=this,r=[];this.forEachBlockInReverseOrder((function(n){n.getEndRow()<=e||(o.moveItemsDown(n,e,t.length),o.insertItems(n,e,t).forEach((function(e){return r.push(e)})))})),this.isMaxRowFound()&&this.hack_setVirtualRowCount(this.getVirtualRowCount()+t.length),this.onCacheUpdated();var n={type:u.Events.EVENT_ROW_DATA_UPDATED,api:this.gridApi,columnApi:this.columnApi};this.eventService.dispatchEvent(n)},t.prototype.getRow=function(e,t){void 0===t&&(t=!1);var o=Math.floor(e/this.cacheParams.blockSize),r=this.getBlock(o);if(!r){if(t)return null;r=this.createBlock(o)}return r.getRow(e)},t.prototype.createBlock=function(e){var t=new c.InfiniteBlock(e,this.cacheParams);return this.getContext().wireBean(t),this.postCreateBlock(t),t},t.prototype.refreshCache=function(){this.forEachBlockInOrder((function(e){return e.setDirty()})),this.checkBlockToLoad()},i([l.Autowired("eventService"),s("design:type",p.EventService)],t.prototype,"eventService",void 0),i([l.Autowired("columnApi"),s("design:type",g.ColumnApi)],t.prototype,"columnApi",void 0),i([l.Autowired("gridApi"),s("design:type",f.GridApi)],t.prototype,"gridApi",void 0),i([a(0,l.Qualifier("loggerFactory")),s("design:type",Function),s("design:paramtypes",[d.LoggerFactory]),s("design:returntype",void 0)],t.prototype,"setBeans",null),i([l.PostConstruct,s("design:type",Function),s("design:paramtypes",[]),s("design:returntype",void 0)],t.prototype,"init",null),t}(h.RowNodeCache);t.InfiniteCache=m},99770:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.DefaultColumnTypes={numericColumn:{headerClass:"ag-numeric-header",cellClass:"ag-numeric-cell"}}}};