@deephaven/code-studio 1.10.2-lerna-v9.0 → 1.10.2

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 (40) hide show
  1. package/build/assets/{AppRoot-Dsp0-nx9.js → AppRoot-BY4a1UaK.js} +6 -6
  2. package/build/assets/{AppRoot-Dsp0-nx9.js.map → AppRoot-BY4a1UaK.js.map} +1 -1
  3. package/build/assets/{Chart-P_gTGGZ1.js → Chart-DmqNQtr3.js} +2 -2
  4. package/build/assets/{Chart-P_gTGGZ1.js.map → Chart-DmqNQtr3.js.map} +1 -1
  5. package/build/assets/{ControlType-lgZLQmfY.js → ControlType-RBsIk8KS.js} +4 -4
  6. package/build/assets/{ControlType-lgZLQmfY.js.map → ControlType-RBsIk8KS.js.map} +1 -1
  7. package/build/assets/{FormatterUtils-C9ixv8yB.js → FormatterUtils-C3xgIs6_.js} +2 -2
  8. package/build/assets/{FormatterUtils-C9ixv8yB.js.map → FormatterUtils-C3xgIs6_.js.map} +1 -1
  9. package/build/assets/{Grid-DQPrZJGB.js → Grid-B7dO0Sbi.js} +2 -2
  10. package/build/assets/{Grid-DQPrZJGB.js.map → Grid-B7dO0Sbi.js.map} +1 -1
  11. package/build/assets/{GridTokenMouseHandler-X2JErABm.js → GridTokenMouseHandler-Ds5xKqrO.js} +2 -2
  12. package/build/assets/{GridTokenMouseHandler-X2JErABm.js.map → GridTokenMouseHandler-Ds5xKqrO.js.map} +1 -1
  13. package/build/assets/{IrisGrid-m82zJTmT.js → IrisGrid-CFqfz-_M.js} +2 -2
  14. package/build/assets/{IrisGrid-m82zJTmT.js.map → IrisGrid-CFqfz-_M.js.map} +1 -1
  15. package/build/assets/{IrisGridModel-BWX_u8pv.js → IrisGridModel-CfNBLna8.js} +3 -3
  16. package/build/assets/{IrisGridModel-BWX_u8pv.js.map → IrisGridModel-CfNBLna8.js.map} +1 -1
  17. package/build/assets/{IrisGridShortcuts-QN2zgZUQ.js → IrisGridShortcuts-Bw5ADLgT.js} +2 -2
  18. package/build/assets/{IrisGridShortcuts-QN2zgZUQ.js.map → IrisGridShortcuts-Bw5ADLgT.js.map} +1 -1
  19. package/build/assets/{IrisGridThemeProvider-DtrPDGfJ.js → IrisGridThemeProvider-CggmgZiA.js} +2 -2
  20. package/build/assets/{IrisGridThemeProvider-DtrPDGfJ.js.map → IrisGridThemeProvider-CggmgZiA.js.map} +1 -1
  21. package/build/assets/{LocalWorkspaceStorage-C6dxwi4z.js → LocalWorkspaceStorage-DXAI74vd.js} +2 -2
  22. package/build/assets/{LocalWorkspaceStorage-C6dxwi4z.js.map → LocalWorkspaceStorage-DXAI74vd.js.map} +1 -1
  23. package/build/assets/{MarkdownEditor-B4WFJDBT.js → MarkdownEditor-CjiUT8XD.js} +2 -2
  24. package/build/assets/{MarkdownEditor-B4WFJDBT.js.map → MarkdownEditor-CjiUT8XD.js.map} +1 -1
  25. package/build/assets/{MarkdownNotebook-Bw-fDcJ8.js → MarkdownNotebook-CsCP6Muy.js} +2 -2
  26. package/build/assets/{MarkdownNotebook-Bw-fDcJ8.js.map → MarkdownNotebook-CsCP6Muy.js.map} +1 -1
  27. package/build/assets/{MissingPartitionError-Cw7iLwy0.js → MissingPartitionError-DXkc6F4C.js} +2 -2
  28. package/build/assets/{MissingPartitionError-Cw7iLwy0.js.map → MissingPartitionError-DXkc6F4C.js.map} +1 -1
  29. package/build/assets/{MockChartModel-C5m_XRVw.js → MockChartModel-B0Gv2sr1.js} +2 -2
  30. package/build/assets/{MockChartModel-C5m_XRVw.js.map → MockChartModel-B0Gv2sr1.js.map} +1 -1
  31. package/build/assets/{StyleGuideRoot-DGm-hysw.js → StyleGuideRoot-BAYFLFTM.js} +2 -2
  32. package/build/assets/{StyleGuideRoot-DGm-hysw.js.map → StyleGuideRoot-BAYFLFTM.js.map} +1 -1
  33. package/build/assets/{index-LXmN419B.js → index-Bjvh6jhx.js} +4 -4
  34. package/build/assets/{index-LXmN419B.js.map → index-Bjvh6jhx.js.map} +1 -1
  35. package/build/assets/{index-CqIl8EDR.js → index-CVle8e1T.js} +2 -2
  36. package/build/assets/{index-CqIl8EDR.js.map → index-CVle8e1T.js.map} +1 -1
  37. package/build/assets/{index-DmVB6hX1.js → index-Cwc_E41j.js} +3 -3
  38. package/build/assets/{index-DmVB6hX1.js.map → index-Cwc_E41j.js.map} +1 -1
  39. package/build/index.html +2 -2
  40. package/package.json +31 -31
@@ -1,3 +1,3 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./Chart-P_gTGGZ1.js","./vendor-DVrAV4v1.js","./helpers-BosuxZz1.js","./vendor-CawHrWiI.css","./index-DmVB6hX1.js","./monaco-DaE0jI-i.js","./monaco-CgHo24-M.css","./index-WCsQ0aAg.css","./Plotly-DIvLbxz7.js","./plotly-_1p61Fhy.js","./ControlType-lgZLQmfY.js","./ControlType-CFrcYBSr.css","./DownsamplingError--AAvWHv_.js","./useMergeRef-8Wi3k_Y6.js","./FormatterUtils-C9ixv8yB.js","./Chart-CTDcF-lR.css","./IrisGrid-m82zJTmT.js","./MissingPartitionError-Cw7iLwy0.js","./IrisGridThemeProvider-DtrPDGfJ.js","./IrisGridShortcuts-QN2zgZUQ.js","./IrisGridShortcuts-CJtrNKDP.css","./GridTokenMouseHandler-X2JErABm.js","./GridTokenMouseHandler-DTMTgCrk.css","./IrisGridThemeProvider-CBOV8q-p.css","./Grid-DQPrZJGB.js","./Grid-DPUNpG8i.css","./IrisGrid-D9d4SPGX.css"])))=>i.map(i=>d[i]);
2
- import{U as Ee,bH as ye,I as k,K as Te,M as ne,r as Z,bC as be,av as z,bO as we,a1 as Se,G as Ae}from"./vendor-DVrAV4v1.js";import{z as Oe,bT as Ce,N as de,e as X,L as Ne,bB as B}from"./index-DmVB6hX1.js";import{_ as me}from"./monaco-DaE0jI-i.js";import{ad as Re,c as ee,as as H}from"./ControlType-lgZLQmfY.js";var Ie=Ee.forwardRef((o,e)=>{var{children:t,className:r,disabled:n=!1,id:a,isLinked:l=!1,isLinkedSource:i=!1,isInvalid:u=!1,onClick:s,onMouseEnter:v,onMouseLeave:c,style:d,"data-testid":g}=o,{UNSAFE_className:m}=ye({},"button");return k.jsxs("button",{ref:e,type:"button",className:Te("btn-socketed",{"btn-socketed-linked":l!==void 0&&l||i},{"btn-socketed-linked-source":i},{"is-invalid":u},r,m),id:a,onClick:s,onMouseEnter:v,onMouseLeave:c,style:d,disabled:n,"data-testid":g,children:[t,k.jsx(ne,{icon:Oe,className:"linked btn-socketed-icon",transform:"down-1"}),k.jsx(ne,{icon:Ce,className:"is-invalid btn-socketed-icon"})]})});Ie.displayName="SocketedButton";function ae(o,e){var t=Object.keys(o);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(o);e&&(r=r.filter(function(n){return Object.getOwnPropertyDescriptor(o,n).enumerable})),t.push.apply(t,r)}return t}function Pe(o){for(var e=1;e<arguments.length;e++){var t=arguments[e]!=null?arguments[e]:{};e%2?ae(Object(t),!0).forEach(function(r){De(o,r,t[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(o,Object.getOwnPropertyDescriptors(t)):ae(Object(t)).forEach(function(r){Object.defineProperty(o,r,Object.getOwnPropertyDescriptor(t,r))})}return o}function De(o,e,t){return(e=Le(e))in o?Object.defineProperty(o,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):o[e]=t,o}function Le(o){var e=xe(o,"string");return typeof e=="symbol"?e:e+""}function xe(o,e){if(typeof o!="object"||!o)return o;var t=o[Symbol.toPrimitive];if(t!==void 0){var r=t.call(o,e);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(o)}var Me=Z.lazy(()=>me(()=>import("./Chart-P_gTGGZ1.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15]),import.meta.url));function Tt(o){return k.jsx(Z.Suspense,{fallback:k.jsx(de,{"data-testid":"lazy-chart-loading"}),children:k.jsx(Me,Pe({},o))})}function oe(o,e){var t=Object.keys(o);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(o);e&&(r=r.filter(function(n){return Object.getOwnPropertyDescriptor(o,n).enumerable})),t.push.apply(t,r)}return t}function q(o){for(var e=1;e<arguments.length;e++){var t=arguments[e]!=null?arguments[e]:{};e%2?oe(Object(t),!0).forEach(function(r){x(o,r,t[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(o,Object.getOwnPropertyDescriptors(t)):oe(Object(t)).forEach(function(r){Object.defineProperty(o,r,Object.getOwnPropertyDescriptor(t,r))})}return o}function x(o,e,t){return(e=Fe(e))in o?Object.defineProperty(o,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):o[e]=t,o}function Fe(o){var e=ke(o,"string");return typeof e=="symbol"?e:e+""}function ke(o,e){if(typeof o!="object"||!o)return o;var t=o[Symbol.toPrimitive];if(t!==void 0){var r=t.call(o,e);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(o)}var Y=Ne.module("ChartUtils"),le="io.deephaven.time.DateTime",He=36e5,je=1e6;function _e(o){return o.asDate!==void 0}function Be(o){return o.asNumber!==void 0}function ie(o){return o.dhTimeZone!==void 0}function We(o){return o!=null&&o.range!=null&&(o.autorange===!1||o.autorange===void 0)}function Ve(){try{var o=document.createElement("canvas"),e=o.getContext("webgl")||o.getContext("experimental-webgl");return e!=null&&e instanceof WebGLRenderingContext}catch{return!1}}var ze=Ve();class f{static getPlotlyErrorBars(e,t,r){var n=r.map((l,i)=>l-e[i]),a=t.map((l,i)=>e[i]-l);return{type:"data",symmetric:!1,array:n,arrayminus:a}}static convertNumberPrefix(e){return e.replace(/\u00A4\u00A4/g,"USD").replace(/\u00A4/g,"$")}static getPlotlyNumberFormat(e,t,r){if(r==null||r==="")return null;var n=r.split(";"),a=n[0].match(/^([^#,0.]*)([#,]*)([0,]*)(\.?)(0*)(#*)(E?0*)(%?)(.*)/);X(a);var[,l,i,u,,s,v,c,d,g]=a,m=u.replace(",","").length,E=i.indexOf(",")>=0||u.indexOf(",")>=0,h=E?",":"",y=c!=null&&c!==""?"e":"f",A=d!==""?d:y,b=s.length+v.length,S="",w="0".concat(m).concat(h,".").concat(b).concat(S).concat(A),O=f.convertNumberPrefix(l),I=f.convertNumberPrefix(g);return{tickformat:w,tickprefix:O,ticksuffix:I,automargin:!0}}static addTickSpacing(e,t,r){var{gapBetweenMajorTicks:n}=t;if(n!=null&&n>0){var a=e||{},l=n;return r&&(l=n/je),t.log&&(l=Math.log(l)),a.tickmode="linear",a.dtick=l,a}return e}static getSourceForAxis(e,t){for(var r=0;r<e.series.length;r+=1)for(var n=e.series[r],a=0;a<n.sources.length;a+=1){var l=n.sources[a];if(l.axis===t)return l}return null}static getSeriesVisibility(e,t){return t!=null&&t.hiddenSeries!=null&&t.hiddenSeries.includes(e)?"legendonly":!0}static getHiddenLabels(e){return e!=null&&e.hiddenSeries?[...e.hiddenSeries]:[]}static makeSeriesData(e,t,r,n){var a=arguments.length>4&&arguments[4]!==void 0?arguments[4]:f.ORIENTATION.VERTICAL;return{type:e,mode:t,name:r,orientation:a,showlegend:n??void 0}}static getMarkerSymbol(e){switch(e){case"SQUARE":return"square";case"CIRCLE":return"circle";case"DIAMOND":return"diamond";case"UP_TRIANGLE":return"triangle-up";case"DOWN_TRIANGLE":return"triangle-down";case"RIGHT_TRIANGLE":return"triangle-right";case"LEFT_TRIANGLE":return"triangle-left";case"ELLIPSE":case"HORIZONTAL_RECTANGLE":case"VERTICAL_RECTANGLE":default:throw new Error("Unrecognized shape ".concat(e))}}static getAllAxes(e){return e.charts.reduce((t,r)=>[...t,...r.axes],[])}static getAxisTypeMap(e){var t=f.getAllAxes(e);return f.groupArray(t,"type")}static getChartForSeries(e,t){for(var{charts:r}=e,n=0;n<r.length;n+=1)for(var a=r[n],l=0;l<a.series.length;l+=1)if(t===a.series[l])return a;return null}static getLayoutRanges(e){for(var t={},r=Object.keys(e).filter(i=>i.indexOf("axis")>=0),n=0;n<r.length;n+=1){var a=r[n],l=e[a];We(l)&&(t[a]=[...l.range])}return t}static getAxisLayoutProperty(e,t){var r=t>0?"".concat(t+1):"";return"".concat(e??"","axis").concat(r)}static periodToDecimal(e){var t=e.split(":");return Number(t[0])+Number(t[1])/60}static decimalToPeriod(e){var t=Math.floor(e),r=Math.round((e-t)*60);return"".concat(t.toString().padStart(2,"0"),":").concat(r.toString().padStart(2,"0"))}static groupArray(e,t){return e.reduce((r,n)=>{var a,l=n[t],i=(a=r.get(l))!==null&&a!==void 0?a:[];return i.push(n),r.set(l,i),r},new Map)}static normalizeColorway(e){if(e!=null){if(Array.isArray(e))return e;if(typeof e=="string")return e.split(" ");Y.warn("Unexpected colorway format: ".concat(e))}}static titleFromSettings(e){var{series:t,xAxis:r,title:n="".concat((t??[]).join(", ")," by ").concat(r)}=e;return n}static getTimeZoneDiff(e,t){return t?(e.standardOffset-t.standardOffset)/60:0}static createClosedRangesForPartialHoliday(e,t){var r=t.map(c=>[f.periodToDecimal(c.open),f.periodToDecimal(c.close)]);r.sort((c,d)=>c[0]-d[0]),r.length===0&&r.push([0,24]);var n=e.map(c=>[f.periodToDecimal(c.open),f.periodToDecimal(c.close)]);n.sort((c,d)=>c[0]-d[0]);for(var a=[],l=0;l<r.length;l+=1){for(var i=r[l],u=i[0],s=0;s<n.length;s+=1){var v=n[s];v[1]>u&&v[0]<i[1]&&(v[0]>u&&a.push([u,v[0]]),u=v[1])}u<i[1]&&a.push([u,i[1]])}return a}constructor(e){x(this,"dh",void 0),x(this,"daysOfWeek",void 0),this.dh=e,this.daysOfWeek=Object.freeze(e.calendar.DayOfWeek.values()),Re(this)}getAxisFormats(e,t){for(var r=new Map,n={tickformat:null,ticksuffix:null},a=f.getAllAxes(e),l=f.groupArray(a,"type"),{charts:i}=e,u=0;u<i.length;u+=1)for(var s=i[u],v=0;v<s.series.length;v+=1)for(var c=s.series[v],{sources:d}=c,g=d.filter(P=>P.axis),m=0;m<g.length;m+=1){var E=g[m],{axis:h}=E,{type:y}=h,A=l.get(y);X(A);var b=A.indexOf(h),S=this.getAxisPropertyName(y);if(S!=null){var w=f.getAxisLayoutProperty(S,b);if(r.has(w))Y.debug("".concat(w," already added."));else{Y.debug("Adding ".concat(w," to axisFormats."));var O=this.getPlotlyAxisFormat(E,t);if(O===null)r.set(w,n);else{r.set(w,O);var{businessCalendar:I}=h;if(I!=null&&(O.rangebreaks=this.createRangeBreaksFromBusinessCalendar(I,t)),r.size===s.axes.length)return r}}}}return r}getPlotlyChartType(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,{dh:n}=this;switch(e){case n.plot.SeriesPlotStyle.SCATTER:case n.plot.SeriesPlotStyle.LINE:return!t&&ze&&r?"scattergl":"scatter";case n.plot.SeriesPlotStyle.BAR:case n.plot.SeriesPlotStyle.STACKED_BAR:return"bar";case n.plot.SeriesPlotStyle.PIE:return"pie";case n.plot.SeriesPlotStyle.TREEMAP:return"treemap";case n.plot.SeriesPlotStyle.HISTOGRAM:return"histogram";case n.plot.SeriesPlotStyle.OHLC:return"ohlc";default:return}}getPlotlyChartMode(e,t,r){var{dh:n}=this,a=new Set;switch(e){case n.plot.SeriesPlotStyle.SCATTER:(t??!1)&&a.add(f.MODE_LINES),(r??!0)&&a.add(f.MODE_MARKERS);break;case n.plot.SeriesPlotStyle.LINE:(t??!0)&&a.add(f.MODE_LINES),(r??!1)&&a.add(f.MODE_MARKERS);break}return a.size>0?[...a].join("+"):void 0}getPlotlyProperty(e,t){var{dh:r}=this;switch(e){case r.plot.SeriesPlotStyle.PIE:switch(t){case r.plot.SourceType.X:return"labels";case r.plot.SourceType.Y:return"values"}break;case r.plot.SeriesPlotStyle.OHLC:switch(t){case r.plot.SourceType.TIME:return"x"}break;case r.plot.SeriesPlotStyle.TREEMAP:switch(t){case r.plot.SourceType.X:return"ids";case r.plot.SourceType.Y:return"values";case r.plot.SourceType.LABEL:return"labels";case r.plot.SourceType.PARENT:return"parents";case r.plot.SourceType.COLOR:return"marker.colors"}break}switch(t){case r.plot.SourceType.X:return"x";case r.plot.SourceType.Y:return"y";case r.plot.SourceType.Z:return"z";case r.plot.SourceType.X_LOW:return"xLow";case r.plot.SourceType.X_HIGH:return"xHigh";case r.plot.SourceType.Y_LOW:return"yLow";case r.plot.SourceType.Y_HIGH:return"yHigh";case r.plot.SourceType.TIME:return"time";case r.plot.SourceType.OPEN:return"open";case r.plot.SourceType.HIGH:return"high";case r.plot.SourceType.LOW:return"low";case r.plot.SourceType.CLOSE:return"close";case r.plot.SourceType.SHAPE:return"shape";case r.plot.SourceType.SIZE:return"size";case r.plot.SourceType.LABEL:return"label";case r.plot.SourceType.COLOR:return"color";case r.plot.SourceType.PARENT:return"parent";case r.plot.SourceType.HOVER_TEXT:return"hovertext";case r.plot.SourceType.TEXT:return"text";default:throw new Error("Unrecognized source type: ".concat(t))}}getPlotlySeriesOrientation(e){var t,{dh:r}=this,{sources:n}=e;return n.length===2&&((t=n[0])===null||t===void 0||(t=t.axis)===null||t===void 0?void 0:t.type)===r.plot.AxisType.Y?f.ORIENTATION.HORIZONTAL:f.ORIENTATION.VERTICAL}makeSeriesDataFromSeries(e,t,r){var n=arguments.length>3&&arguments[3]!==void 0?arguments[3]:null,a=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!0,{name:l,isLinesVisible:i,isShapesVisible:u,plotStyle:s,lineColor:v,shapeColor:c,sources:d,shape:g,shapeSize:m}=e,E=d.some(S=>{var w;return(w=S.axis)===null||w===void 0?void 0:w.businessCalendar}),h=this.getChartType(s,E,a),y=this.getPlotlyChartMode(s,i??void 0,u??void 0),A=this.getPlotlySeriesOrientation(e),b=f.makeSeriesData(h,y,l,n,A);return this.addSourcesToSeriesData(b,s,d,t),this.addStylingToSeriesData(b,s,v,c,g,m,r),b}addSourcesToSeriesData(e,t,r,n){for(var a=e,l=0;l<r.length;l+=1){var i=r[l],{axis:u,type:s}=i,v=this.getPlotlyProperty(t,s);be(a,v,[]);var c=u!=null?this.getAxisPropertyName(u.type):null;if(c!=null){var d=n.get(u.type);if(d){var g=d.indexOf(u),m=g>0?"".concat(g+1):"";a["".concat(c,"axis")]="".concat(c).concat(m)}}}}addStylingToSeriesData(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null,n=arguments.length>3&&arguments[3]!==void 0?arguments[3]:null,a=arguments.length>4&&arguments[4]!==void 0?arguments[4]:null,l=arguments.length>5&&arguments[5]!==void 0?arguments[5]:null,i=arguments.length>6&&arguments[6]!==void 0?arguments[6]:null,{dh:u}=this,s=e;if(s.marker={line:{}},s.line={width:1},t===u.plot.SeriesPlotStyle.AREA?s.fill="tozeroy":t===u.plot.SeriesPlotStyle.STACKED_AREA?s.stackgroup="stack":t===u.plot.SeriesPlotStyle.STEP?s.line.shape="hv":t===u.plot.SeriesPlotStyle.HISTOGRAM?s.width=[]:t===u.plot.SeriesPlotStyle.PIE?s.textinfo="label+percent":t===u.plot.SeriesPlotStyle.TREEMAP&&(s.hoverinfo="text",s.textinfo="label+text",s.tiling={packing:"squarify",pad:0},s.textposition="middle center"),r!=null&&(t===u.plot.SeriesPlotStyle.BAR?s.marker.color=r:s.line.color=r),n!=null&&(s.marker.color=n),a!=null&&a.length>0)try{s.marker.symbol=f.getMarkerSymbol(a)}catch(v){Y.warn("Unable to handle shape",a,":",v)}l!=null&&(s.marker.size=l*f.DEFAULT_MARKER_SIZE),i!=null&&t!==u.plot.SeriesPlotStyle.PIE&&(s.visible=i)}getChartType(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,{dh:n}=this;switch(e){case n.plot.SeriesPlotStyle.HISTOGRAM:return"bar";default:return this.getPlotlyChartType(e,t,r)}}getAxisPropertyName(e){var{dh:t}=this;switch(e){case t.plot.AxisType.X:return"x";case t.plot.AxisType.Y:return"y";default:return null}}getAxisSide(e){var{dh:t}=this;switch(e){case t.plot.AxisPosition.BOTTOM:return"bottom";case t.plot.AxisPosition.TOP:return"top";case t.plot.AxisPosition.LEFT:return"left";case t.plot.AxisPosition.RIGHT:return"right";default:return}}updateFigureAxes(e,t,r){for(var n=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0,a=arguments.length>4&&arguments[4]!==void 0?arguments[4]:0,l=e,i=f.getAllAxes(t),u=0;u<t.charts.length;u+=1){var s=t.charts[u],v=r==null?void 0:r(s),c=this.getChartBounds(t,s,n,a);this.updateLayoutAxes(l,s.axes,i,n,a,c,v)}this.removeStaleAxes(l,i)}getChartBounds(e,t,r,n){var a,{dh:l}=this,{cols:i,rows:u}=e,{column:s,colspan:v,row:c,rowspan:d}=t,g=s+v,m=c+d,E=1/i,h=1/u,y=f.AXIS_SIZE_PX/r,A=f.AXIS_SIZE_PX/n,b={bottom:(u-m)*h+(m<u?A/2:0),top:(u-c)*h-(c>0?A/2:0),left:s*E+(s>0?y/2:0),right:g*E-(g<i?y/2:0)},S=f.groupArray(t.axes,"position"),w=(a=S.get(l.plot.AxisPosition.RIGHT))!==null&&a!==void 0?a:[];return w.length>0&&(r>0?b.right-=(b.right-b.left)*Math.max(0,Math.min(f.LEGEND_WIDTH_PX/r,f.MAX_LEGEND_SIZE)):b.right-=(b.right-b.left)*f.DEFAULT_AXIS_SIZE),b}getPlotlyDateFormat(e,t,r){var{dh:n}=this,a=r==null?void 0:r.replace("%","%%").replace(/S{9}/g,"%9f").replace(/S{8}/g,"%8f").replace(/S{7}/g,"%7f").replace(/S{6}/g,"%6f").replace(/S{5}/g,"%5f").replace(/S{4}/g,"%4f").replace(/S{3}/g,"%3f").replace(/S{2}/g,"%2f").replace(/S{1}/g,"%1f").replace(/y{4}/g,"%Y").replace(/y{2}/g,"%y").replace(/M{4}/g,"%B").replace(/M{3}/g,"%b").replace(/M{2}/g,"%m").replace(/M{1}/g,"%-m").replace(/E{4,}/g,"%A").replace(/E{1,}/g,"%a").replace(/d{2}/g,"%d").replace(/([^%]|^)d{1}/g,"$1%-d").replace(/H{2}/g,"%H").replace(/h{2}/g,"%I").replace(/h{1}/g,"%-I").replace(/m{2}/g,"%M").replace(/s{2}/g,"%S").replace("'T'","T").replace(" z",""),l,i=e==null?void 0:e.getColumnTypeFormatter(t);return i!=null&&ie(i)&&i.dhTimeZone!=null&&i.showTimeZone&&(l=n.i18n.DateTimeFormat.format(" z",new Date,i.dhTimeZone)),{tickformat:a,ticksuffix:l,automargin:!0}}getPlotlyAxisFormat(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null,{dh:r}=this,{axis:n,columnType:a}=e,{formatPattern:l}=n,i=null;return ee.isDateType(a)?(i=this.getPlotlyDateFormat(t,a,l),i=f.addTickSpacing(i,n,!0)):ee.isNumberType(a)&&(i=f.getPlotlyNumberFormat(t,a,l),i=f.addTickSpacing(i,n,!1)),n.formatType===r.plot.AxisFormatType.CATEGORY&&(i?i.type="category":i={type:"category",tickformat:void 0,ticksuffix:void 0}),i}updateLayoutAxes(e,t,r){for(var n=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0,a=arguments.length>4&&arguments[4]!==void 0?arguments[4]:0,l=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{left:0,top:0,right:1,bottom:1},i=arguments.length>6?arguments[6]:void 0,{dh:u}=this,s=n>0?Math.max(f.MIN_AXIS_SIZE,Math.min(f.AXIS_SIZE_PX/a,f.MAX_AXIS_SIZE)):f.DEFAULT_AXIS_SIZE,v=a>0?Math.max(f.MIN_AXIS_SIZE,Math.min(f.AXIS_SIZE_PX/n,f.MAX_AXIS_SIZE)):f.DEFAULT_AXIS_SIZE,c=e,d=f.groupArray(t,"position"),g=f.groupArray(t,"type"),m=[...g.keys()],E=f.groupArray(r,"type"),h=0;h<m.length;h+=1){var y=m[h],A=this.getAxisPropertyName(y);if(A!=null){var b=g.get(y),S=E.get(y),w=y===u.plot.AxisType.Y,O=w?a:n;X(b),X(S);for(var I=0;I<b.length;I+=1){var P=b[I],M=S.indexOf(P),F=f.getAxisLayoutProperty(A,M);c[F]==null&&(c[F]={});var C=c[F];if(C!=null){this.updateLayoutAxis(C,P,I,d,s,v,l);var{range:N,autorange:L}=C;if(i!=null&&N!==void 0&&(L===void 0||L===!1)){var W=i(P),[_,V]=W(N);Y.debug("Setting downsample range",O,_,V),P.range(O,_,V)}else P.range(O)}}}}}removeStaleAxes(e,t){for(var r=e,n=f.groupArray(t,"type"),a=[...n.keys()],l=0;l<a.length;l+=1){var i=a[l],u=n.get(i);X(u);var s=u.length,v=this.getAxisPropertyName(i);if(v!=null)for(var c=f.getAxisLayoutProperty(v,s);r[c]!=null;)delete r[c],s+=1,c=f.getAxisLayoutProperty(v,s)}}updateLayoutAxis(e,t,r,n,a,l,i){var u,{dh:s}=this,v=t.type===s.plot.AxisType.Y,c=v?l:a,d=e,g=(u=t.label)!==null&&u!==void 0?u:"";if(d.title!==void 0&&typeof d.title!="string"?d.title.text=g:d.title={text:g},t.log&&(d.type="log"),d.side=this.getAxisSide(t.position),r>0){var m,E;d.overlaying=(m=this.getAxisPropertyName(t.type))!==null&&m!==void 0?m:void 0;var h=(E=n.get(t.position))!==null&&E!==void 0?E:[],y=h.indexOf(t);y>0&&(d.anchor="free",t.position===s.plot.AxisPosition.RIGHT?d.position=i.right+(y-h.length+1)*c:t.position===s.plot.AxisPosition.TOP?d.position=i.top+(y-h.length+1)*c:t.position===s.plot.AxisPosition.BOTTOM?d.position=i.bottom+(h.length-y+1)*c:t.position===s.plot.AxisPosition.LEFT&&(d.position=i.left+(h.length-y+1)*c))}else if(t.type===s.plot.AxisType.X){var A=n.get(s.plot.AxisPosition.LEFT)||[],b=n.get(s.plot.AxisPosition.RIGHT)||[],S=Math.max(i.left,i.left+(A.length-1)*l),w=Math.min(i.right-(b.length-1)*l,i.right);d.domain=[S,w]}else if(t.type===s.plot.AxisType.Y){var O=n.get(s.plot.AxisPosition.BOTTOM)||[],I=n.get(s.plot.AxisPosition.TOP)||[],P=Math.max(i.bottom,i.bottom+(O.length-1)*a),M=Math.min(i.top-(I.length-1)*a,i.top);d.domain=[P,M]}var{minRange:F,maxRange:C,log:N}=t;(!Number.isNaN(F)||!Number.isNaN(C))&&(d.autorangeoptions={},Number.isNaN(F)||(d.autorangeoptions.minallowed=N?Math.log10(F):F),Number.isNaN(C)||(d.autorangeoptions.maxallowed=N?Math.log10(C):C))}createBoundsFromPeriods(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;if(e.length===0)return[];for(var r=e.map(u=>[(f.periodToDecimal(u.open)+t)%24,(f.periodToDecimal(u.close)+t)%24]).sort((u,s)=>u[0]-s[0]),n=[],a=0;a<r.length;a+=1){var l=r[a],i=r[(a+1)%r.length];n.push([l[1],i[0]])}return n}createBreaksFromPeriods(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,r=this.createBoundsFromPeriods(e,t);return r.map(n=>({pattern:"hour",bounds:n}))}createBoundsFromDays(e){var t=this.daysOfWeek.length;if(e.length===t)return[];for(var r=e.map(u=>this.daysOfWeek.indexOf(u)),n=new Set(r),a=new Set,l=0;l<t;l+=1)!n.has(l)&&n.has((l-1+t)%t)&&a.add(l);var i=[];return a.forEach(u=>{for(var s=0;s<t;s+=1){var v=(u+s)%t;if(n.has(v)){i.push([u,v]);return}}throw new Error("Unable to find open day for closed day ".concat(u,", businessDays: ").concat(e))}),i}createBreaksFromDays(e){var t=this.createBoundsFromDays(e);return t.map(r=>({pattern:"day of week",bounds:r}))}createRangeBreaksFromBusinessCalendar(e,t){var r=[],{businessPeriods:n,businessDays:a,holidays:l,timeZone:i}=e,u=t==null?void 0:t.getColumnTypeFormatter(le),s;ie(u)&&(s=u.dhTimeZone);var v=f.getTimeZoneDiff(i,s);return l.length>0&&r.push(...this.createRangeBreakValuesFromHolidays(l,i,s,e)),r.push(...this.createBreaksFromPeriods(n,v)),r.push(...this.createBreaksFromDays(a)),r}createRangeBreakValuesFromHolidays(e,t,r,n){var a=[],l=[];return e.forEach(i=>{i.businessPeriods.length>0?l.push(...this.createPartialHoliday(i,t,r,n)):a.push(this.createFullHoliday(i,t,r))}),[{values:a},...l]}createFullHoliday(e,t,r){return this.adjustDateForTimeZone("".concat(e.date.toString()," 00:00:00.000000"),t,r)}createPartialHoliday(e,t,r,n){var a;if(e.businessPeriods.length===0)return[];var l=e.date.toString();if(n){var i=new Date(l).getDay(),u=n.businessDays.includes(this.daysOfWeek[i]);if(!u)return[]}for(var s=f.createClosedRangesForPartialHoliday(e.businessPeriods,(a=n==null?void 0:n.businessPeriods)!==null&&a!==void 0?a:[]),v=[],c=0;c<s.length;c+=1){var[d,g]=s[c];if(d!==g){var m=[this.adjustDateForTimeZone("".concat(l," ").concat(f.decimalToPeriod(d),":00.000000"),t,r)],E=He*(g-d);v.push({values:m,dvalue:E})}}return v}adjustDateForTimeZone(e,t,r){return r&&r.standardOffset!==t.standardOffset?this.unwrapValue(this.wrapValue(e,le,t),r):e}makeFigureSettings(e,t){var{dh:r}=this,{series:n,xAxis:a,type:l}=e,i=f.titleFromSettings(e),u={formatType:"".concat(r.plot.AxisFormatType.NUMBER),type:"".concat(r.plot.AxisType.X),position:"".concat(r.plot.AxisPosition.BOTTOM)},s={formatType:"".concat(r.plot.AxisFormatType.NUMBER),type:"".concat(r.plot.AxisType.Y),position:"".concat(r.plot.AxisPosition.LEFT)};return{charts:[{chartType:"".concat(r.plot.ChartType.XY),axes:[u,s],series:(n??[]).map(v=>({plotStyle:"".concat(l),name:v,dataSources:[{type:"".concat(r.plot.SourceType.X),columnName:a??"",axis:u,table:t},{type:"".concat(r.plot.SourceType.Y),columnName:v,axis:s,table:t}]}))}],title:i}}unwrapValue(e,t){var{dh:r}=this;if(e!=null){if(_e(e))return r.i18n.DateTimeFormat.format(f.DATE_FORMAT,e,t);if(Be(e))return e.asNumber()}return e}wrapValue(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null,{dh:n}=this;if(ee.isDateType(t)&&typeof e=="string"){var a=e,l=f.DATE_FORMAT.substr(0,e.length),i=n.i18n.DateTimeFormat.parse(l,a);if(!r)return i;var u="".concat(l," Z"),s=n.i18n.DateTimeFormat.format("Z",i,r),v=n.i18n.DateTimeFormat.parse(u,"".concat(a," ").concat(s)),c=n.i18n.DateTimeFormat.format("Z",v,r);return n.i18n.DateTimeFormat.parse(u,"".concat(a," ").concat(c))}return e}makeLayoutAxis(e,t){var{dh:r}=this,n={automargin:!0,gridcolor:t.gridcolor,linecolor:t.linecolor,rangeslider:{visible:!1},showline:!0,ticks:"outside",ticklen:5,tickcolor:t.paper_bgcolor,tickfont:{color:t.zerolinecolor},title:{font:{color:t.title_color}},legend:{font:{color:t.legend_color}}};return e===r.plot.AxisType.X?Object.assign(n,{showgrid:!0}):e===r.plot.AxisType.Y&&Object.assign(n,{zerolinecolor:t.zerolinecolor,zerolinewidth:2}),n}makeDefaultTemplate(e){var{error_band_line_color:t,ohlc_increasing:r,ohlc_decreasing:n,title_color:a,indicator_increasing:l,indicator_decreasing:i,indicator_gauge:u}=e;return{data:{bar:[{marker:{line:{color:"transparent"}}}],scatter:[{error_x:{color:t},error_y:{color:t}}],ohlc:[{increasing:{line:{color:r}},decreasing:{line:{color:n}}}],pie:[{outsidetextfont:{color:a}}],treemap:[{outsidetextfont:{color:a}}],indicator:[{title:{font:{color:a}},delta:{decreasing:{color:i},increasing:{color:l}},gauge:{bar:{color:u}}}]},layout:this.makeDefaultLayout(e)}}makeDefaultLayout(e){var{dh:t}=this,{paper_bgcolor:r,plot_bgcolor:n,title_color:a,coastline_color:l,land_color:i,ocean_color:u,lake_color:s,river_color:v}=e,c={paper_bgcolor:r,plot_bgcolor:n,autosize:!0,colorway:f.normalizeColorway(e==null?void 0:e.colorway),font:{family:"'Fira Sans', sans-serif",color:a},title:{font:{color:a},xanchor:"center",xref:"paper",yanchor:"top",pad:q({},f.DEFAULT_TITLE_PADDING),y:1},legend:{font:{color:a}},margin:q({},f.DEFAULT_MARGIN),xaxis:this.makeLayoutAxis(t.plot.AxisType.X,e),yaxis:this.makeLayoutAxis(t.plot.AxisType.Y,e),polar:{angularaxis:this.makeLayoutAxis(t.plot.AxisType.SHAPE,e),radialaxis:this.makeLayoutAxis(t.plot.AxisType.SHAPE,e),bgcolor:e.plot_bgcolor},scene:{xaxis:this.makeLayoutAxis(t.plot.AxisType.X,e),yaxis:this.makeLayoutAxis(t.plot.AxisType.Y,e),zaxis:this.makeLayoutAxis(null,e)},geo:{showcoastlines:!0,showframe:!1,showland:!0,showocean:!0,showlakes:!0,showrivers:!0,bgcolor:r,coastlinecolor:l,landcolor:i,oceancolor:u,lakecolor:s,rivercolor:v}};return c.datarevision=0,c}hydrateSettings(e){var{dh:t}=this;return q(q({},e),{},{type:e.type!=null?t.plot.SeriesPlotStyle[e.type]:void 0})}}x(f,"DEFAULT_AXIS_SIZE",.15);x(f,"MIN_AXIS_SIZE",.025);x(f,"MAX_AXIS_SIZE",.2);x(f,"AXIS_SIZE_PX",75);x(f,"LEGEND_WIDTH_PX",50);x(f,"MAX_LEGEND_SIZE",.25);x(f,"ORIENTATION",Object.freeze({HORIZONTAL:"h",VERTICAL:"v"}));x(f,"DATE_FORMAT","yyyy-MM-dd HH:mm:ss.SSSSSS");x(f,"DEFAULT_MARGIN",Object.freeze({l:60,r:50,t:30,b:60,pad:0}));x(f,"DEFAULT_TITLE_PADDING",Object.freeze({t:8}));x(f,"SUBTITLE_LINE_HEIGHT",25);x(f,"DEFAULT_MARKER_SIZE",6);x(f,"MODE_MARKERS","markers");x(f,"MODE_LINES","lines");function D(o,e,t){return(e=Xe(e))in o?Object.defineProperty(o,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):o[e]=t,o}function Xe(o){var e=Ye(o,"string");return typeof e=="symbol"?e:e+""}function Ye(o,e){if(typeof o!="object"||!o)return o;var t=o[Symbol.toPrimitive];if(t!==void 0){var r=t.call(o,e);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(o)}class R{constructor(e){D(this,"dh",void 0),D(this,"listeners",void 0),D(this,"formatter",void 0),D(this,"renderOptions",void 0),D(this,"rect",void 0),D(this,"isDownsamplingDisabled",void 0),D(this,"title",void 0),this.dh=e,this.listeners=[],this.isDownsamplingDisabled=!1}getData(){return[]}getDefaultTitle(){return""}getLayout(){return{}}getFilterColumnMap(){return new Map}isFilterRequired(){return!1}setFilter(e){}close(){}setFormatter(e){this.formatter=e}setRenderOptions(e){this.renderOptions=e}setDownsamplingDisabled(e){this.isDownsamplingDisabled=e}setDimensions(e){this.rect=e}setTitle(e){this.title=e}subscribe(e){this.listeners.push(e)}unsubscribe(e){this.listeners=this.listeners.filter(t=>t!==e)}fireEvent(e){for(var t=0;t<this.listeners.length;t+=1)this.listeners[t](e)}fireUpdate(e){this.fireEvent(new CustomEvent(R.EVENT_UPDATED,{detail:e}))}fireDisconnect(){this.fireEvent(new CustomEvent(R.EVENT_DISCONNECT))}fireReconnect(){this.fireEvent(new CustomEvent(R.EVENT_RECONNECT))}fireDownsampleStart(e){this.fireEvent(new CustomEvent(R.EVENT_DOWNSAMPLESTARTED,{detail:e}))}fireDownsampleFinish(e){this.fireEvent(new CustomEvent(R.EVENT_DOWNSAMPLEFINISHED,{detail:e}))}fireDownsampleFail(e){this.fireEvent(new CustomEvent(R.EVENT_DOWNSAMPLEFAILED,{detail:e}))}fireDownsampleNeeded(e){this.fireEvent(new CustomEvent(R.EVENT_DOWNSAMPLENEEDED,{detail:e}))}fireLoadFinished(){this.fireEvent(new CustomEvent(R.EVENT_LOADFINISHED))}fireError(e){this.fireEvent(new CustomEvent(R.EVENT_ERROR,{detail:e}))}fireBlocker(e){this.fireEvent(new CustomEvent(R.EVENT_BLOCKER,{detail:e}))}fireBlockerClear(){this.fireEvent(new CustomEvent(R.EVENT_BLOCKER_CLEAR))}fireLayoutUpdated(e){this.fireEvent(new CustomEvent(R.EVENT_LAYOUT_UPDATED,{detail:e}))}}D(R,"EVENT_UPDATED","ChartModel.EVENT_UPDATED");D(R,"EVENT_DISCONNECT","ChartModel.EVENT_DISCONNECT");D(R,"EVENT_RECONNECT","ChartModel.EVENT_RECONNECT");D(R,"EVENT_DOWNSAMPLESTARTED","ChartModel.EVENT_DOWNSAMPLESTARTED");D(R,"EVENT_DOWNSAMPLEFINISHED","ChartModel.EVENT_DOWNSAMPLEFINISHED");D(R,"EVENT_DOWNSAMPLEFAILED","ChartModel.EVENT_DOWNSAMPLEFAILED");D(R,"EVENT_DOWNSAMPLENEEDED","ChartModel.EVENT_DOWNSAMPLENEEDED");D(R,"EVENT_LOADFINISHED","ChartModel.EVENT_LOADFINISHED");D(R,"EVENT_ERROR","ChartModel.EVENT_ERROR");D(R,"EVENT_BLOCKER","ChartModel.EVENT_BLOCKER");D(R,"EVENT_BLOCKER_CLEAR","ChartModel.EVENT_BLOCKER_CLEAR");D(R,"EVENT_LAYOUT_UPDATED","ChartModel.EVENT_LAYOUT_UPDATED");function ue(o,e){var t=Object.keys(o);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(o);e&&(r=r.filter(function(n){return Object.getOwnPropertyDescriptor(o,n).enumerable})),t.push.apply(t,r)}return t}function $e(o){for(var e=1;e<arguments.length;e++){var t=arguments[e]!=null?arguments[e]:{};e%2?ue(Object(t),!0).forEach(function(r){Ze(o,r,t[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(o,Object.getOwnPropertyDescriptors(t)):ue(Object(t)).forEach(function(r){Object.defineProperty(o,r,Object.getOwnPropertyDescriptor(t,r))})}return o}function Ze(o,e,t){return(e=Ke(e))in o?Object.defineProperty(o,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):o[e]=t,o}function Ke(o){var e=qe(o,"string");return typeof e=="symbol"?e:e+""}function qe(o,e){if(typeof o!="object"||!o)return o;var t=o[Symbol.toPrimitive];if(t!==void 0){var r=t.call(o,e);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(o)}var Qe=Z.lazy(()=>me(()=>import("./IrisGrid-m82zJTmT.js"),__vite__mapDeps([16,1,2,3,4,5,6,7,10,11,17,14,18,19,13,20,21,22,23,24,25,26]),import.meta.url)),Je=Z.forwardRef((o,e)=>k.jsx(Z.Suspense,{fallback:k.jsx(de,{"data-testid":"lazy-iris-grid-loading"}),children:k.jsx(Qe,$e({ref:e},o))}));Je.displayName="LazyIrisGrid";function Ge(o){return(o==null?void 0:o.hasExpandableRows)!==void 0}function $(o,e,t){return(e=Ue(e))in o?Object.defineProperty(o,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):o[e]=t,o}function Ue(o){var e=et(o,"string");return typeof e=="symbol"?e:e+""}function et(o,e){if(typeof o!="object"||!o)return o;var t=o[Symbol.toPrimitive];if(t!==void 0){var r=t.call(o,e);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(o)}var tt=function(o){return o.DOWN="DOWN",o.UP="UP",o.LEFT="LEFT",o.RIGHT="RIGHT",o}({});class p{static normalize(e,t,r,n){var a=e,l=t,i=r,u=n;return a!=null&&i!=null&&i<a&&(a=i,i=e),l!=null&&u!=null&&u<l&&(l=u,u=t),[a,l,i,u]}static makeNormalized(e,t,r,n){return new p(...p.normalize(e,t,r,n))}static makeCell(e,t){return new p(e,t,e,t)}static makeColumn(e){return new p(e,null,e,null)}static makeRow(e){return new p(null,e,null,e)}static minOrNull(e,t){return e==null||t==null?null:Math.min(e,t)}static maxOrNull(e,t){return e==null||t==null?null:Math.max(e,t)}static consolidate(e){for(var t=e.slice(),r=!0;r;){r=!1;for(var n=0;n<t.length&&!r;n+=1)for(var a=t[n],l=t.length-1;l>n;l-=1){var i=t[l];if(a.contains(i))t.splice(l,1);else if(i.contains(a)){r=!0,t[n]=i,t.splice(l,1);break}else if(a.startRow===i.startRow&&a.endRow===i.endRow){if(a.touches(i)){var{startRow:u,endRow:s}=a,v=p.minOrNull(a.startColumn,i.startColumn),c=p.maxOrNull(a.endColumn,i.endColumn);r=!0,t[n]=new p(v,u,c,s),t.splice(l,1);break}}else if(a.startColumn===i.startColumn&&a.endColumn===i.endColumn&&a.touches(i)){var{startColumn:d,endColumn:g}=a,m=p.minOrNull(a.startRow,i.startRow),E=p.maxOrNull(a.endRow,i.endRow);r=!0,t[n]=new p(d,m,g,E),t.splice(l,1);break}}}return t}static isAxisRangeTouching(e,t,r,n){return e==null?t==null||r==null?!0:r<=t+1:t==null?n==null?!0:n>=e-1:r==null?n==null?!0:e<=n+1:n==null?t>=r-1:r>=e-1?r<=t+1:n>=e-1}static rangeArraysEqual(e,t){if(e===t)return!0;if(e==null||t==null||e.length!==t.length)return!1;for(var r=0;r<e.length;r+=1)if(!e[r].equals(t[r]))return!1;return!0}static intersection(e,t){if(e.equals(t))return e;var{startColumn:r,startRow:n,endColumn:a,endRow:l}=e;return r=r!=null&&t.startColumn!=null?Math.max(r,t.startColumn):r??t.startColumn,a=a!=null&&t.endColumn!=null?Math.min(a,t.endColumn):a??t.endColumn,n=n!=null&&t.startRow!=null?Math.max(n,t.startRow):n??t.startRow,l=l!=null&&t.endRow!=null?Math.min(l,t.endRow):l??t.endRow,r!=null&&r>(a??-1)||n!=null&&n>(l??-1)?null:new p(r,n,a,l)}static subtractFromRange(e,t){var r=[],n=p.intersection(e,t);return n==null?[e]:(n.startRow!=null&&(e.startRow==null||e.startRow<n.startRow)&&r.push(new p(e.startColumn,e.startRow,e.endColumn,n.startRow-1)),n.startColumn!=null&&(e.startColumn==null||e.startColumn<n.startColumn)&&r.push(new p(e.startColumn,n.startRow,n.startColumn-1,n.endRow)),n.endColumn!=null&&(e.endColumn==null||e.endColumn>n.endColumn)&&r.push(new p(n.endColumn+1,n.startRow,e.endColumn,n.endRow)),n.endRow!=null&&(e.endRow==null||e.endRow>n.endRow)&&r.push(new p(e.startColumn,n.endRow+1,e.endColumn,e.endRow)),r)}static subtractFromRanges(e,t){for(var r=[],n=0;n<e.length;n+=1)r.push(...p.subtractFromRange(e[n],t));return r}static subtractRangesFromRanges(e,t){for(var r=[...e],n=0;n<t.length;n+=1)r=p.subtractFromRanges(r,t[n]);return r}static isBounded(e){return e.startRow!=null&&e.startColumn!=null&&e.endRow!=null&&e.endColumn!=null}static boundedRange(e,t,r){var n,a,l,i;return p.isBounded(e)?e:new p((n=e.startColumn)!==null&&n!==void 0?n:0,(a=e.startRow)!==null&&a!==void 0?a:0,(l=e.endColumn)!==null&&l!==void 0?l:t-1,(i=e.endRow)!==null&&i!==void 0?i:r-1)}static boundedRanges(e,t,r){return e.map(n=>p.boundedRange(n,t,r))}static offset(e,t,r){return new p(e.startColumn!=null?e.startColumn+t:null,e.startRow!=null?e.startRow+r:null,e.endColumn!=null?e.endColumn+t:null,e.endRow!=null?e.endRow+r:null)}static nextCell(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null,r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null,n=arguments.length>3&&arguments[3]!==void 0?arguments[3]:p.SELECTION_DIRECTION.DOWN;if(e.length===0)return null;var a=-1;if(t!=null&&r!=null&&(a=e.findIndex(d=>d.containsCell(t,r)),a>=0)){var l=e[a],i=l.nextCell(t,r,n);if(i!=null)return i}switch(n){case p.SELECTION_DIRECTION.DOWN:case p.SELECTION_DIRECTION.RIGHT:{var u=a<e.length-1?a+1:0,s=e[u];return s.startCell(n)}case p.SELECTION_DIRECTION.LEFT:case p.SELECTION_DIRECTION.UP:{var v=a>0?a-1:e.length-1,c=e[v];return c.startCell(n)}default:throw new Error("Invalid direction: ".concat(n))}}static cellCount(e){return e.reduce((t,r)=>{var n,a,l,i;return t+(((n=r.endRow)!==null&&n!==void 0?n:NaN)-((a=r.startRow)!==null&&a!==void 0?a:NaN)+1)*(((l=r.endColumn)!==null&&l!==void 0?l:NaN)-((i=r.startColumn)!==null&&i!==void 0?i:NaN)+1)},0)}static rowCount(e){return e.reduce((t,r)=>{var n,a;return t+((n=r.endRow)!==null&&n!==void 0?n:NaN)-((a=r.startRow)!==null&&a!==void 0?a:NaN)+1},0)}static columnCount(e){return e.reduce((t,r)=>{var n,a;return t+((n=r.endColumn)!==null&&n!==void 0?n:NaN)-((a=r.startColumn)!==null&&a!==void 0?a:NaN)+1},0)}static containsCell(e,t,r){for(var n=0;n<e.length;n+=1){var a=e[n];if(a.containsCell(t,r))return!0}return!1}static forEachCell(e,t){for(var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:p.SELECTION_DIRECTION.RIGHT,n=0;n<e.length;n+=1)e[n].forEach(t,r)}constructor(e,t,r,n){$(this,"startColumn",void 0),$(this,"startRow",void 0),$(this,"endColumn",void 0),$(this,"endRow",void 0),this.startColumn=e,this.startRow=t,this.endColumn=r,this.endRow=n}equals(e){return this.startColumn===e.startColumn&&this.startRow===e.startRow&&this.endColumn===e.endColumn&&this.endRow===e.endRow}contains(e){return(this.startColumn==null||e.startColumn!=null&&this.startColumn<=e.startColumn)&&(this.startRow==null||e.startRow!=null&&this.startRow<=e.startRow)&&(this.endColumn==null||e.endColumn!=null&&this.endColumn>=e.endColumn)&&(this.endRow==null||e.endRow!=null&&this.endRow>=e.endRow)}containsCell(e,t){return e==null||t==null?!1:(this.startColumn==null||this.startColumn<=e)&&(this.endColumn==null||this.endColumn>=e)&&(this.startRow==null||this.startRow<=t)&&(this.endRow==null||this.endRow>=t)}touches(e){return p.isAxisRangeTouching(this.startRow,this.endRow,e.startRow,e.endRow)&&p.isAxisRangeTouching(this.startColumn,this.endColumn,e.startColumn,e.endColumn)}subtract(e){return p.subtractFromRange(this,e)}startCell(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:p.SELECTION_DIRECTION.DOWN;if(!p.isBounded(this))throw new Error("Cannot get the startCell of an unbounded range");switch(e){case p.SELECTION_DIRECTION.DOWN:case p.SELECTION_DIRECTION.RIGHT:return{column:this.startColumn,row:this.startRow};case p.SELECTION_DIRECTION.LEFT:case p.SELECTION_DIRECTION.UP:return{column:this.endColumn,row:this.endRow};default:throw new Error("Invalid direction: ".concat(e))}}nextCell(e,t,r){if(!p.isBounded(this))throw new Error("Bounded range required");if(e==null||t==null)throw new Error("Require a non-null cursor");var{startColumn:n,endColumn:a,startRow:l,endRow:i}=this;switch(r){case p.SELECTION_DIRECTION.DOWN:if(t<i)return{column:e,row:Math.max(t+1,l)};if(e<a)return{column:Math.max(e+1,n),row:l};break;case p.SELECTION_DIRECTION.UP:if(t>l)return{column:e,row:Math.min(t-1,i)};if(e>n)return{column:Math.min(e-1,a),row:i};break;case p.SELECTION_DIRECTION.RIGHT:if(e<a)return{column:Math.max(e+1,n),row:t};if(t<i)return{column:n,row:Math.max(t+1,l)};break;case p.SELECTION_DIRECTION.LEFT:if(e>n)return{column:Math.min(e-1,a),row:t};if(t>l)return{column:a,row:Math.min(t-1,i)};break;default:throw new Error("Invalid direction: ".concat(r))}return null}forEach(e){for(var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:p.SELECTION_DIRECTION.RIGHT,r=0,{column:n,row:a}=this.startCell(t);n!=null&&a!=null;){var l;e(n,a,r),r+=1,{column:n,row:a}=(l=this.nextCell(n,a,t))!==null&&l!==void 0?l:{}}}}$(p,"SELECTION_DIRECTION",tt);function rt(o){return Array.isArray(o)&&o.length===2&&(o[0]===null||typeof o[0]=="number")&&(o[1]===null||typeof o[1]=="number")}function Q(o){return rt(o)&&o[0]!=null&&o[1]!=null}function se(o,e){var t=Object.keys(o);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(o);e&&(r=r.filter(function(n){return Object.getOwnPropertyDescriptor(o,n).enumerable})),t.push.apply(t,r)}return t}function J(o){for(var e=1;e<arguments.length;e++){var t=arguments[e]!=null?arguments[e]:{};e%2?se(Object(t),!0).forEach(function(r){ge(o,r,t[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(o,Object.getOwnPropertyDescriptors(t)):se(Object(t)).forEach(function(r){Object.defineProperty(o,r,Object.getOwnPropertyDescriptor(t,r))})}return o}function ge(o,e,t){return(e=nt(e))in o?Object.defineProperty(o,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):o[e]=t,o}function nt(o){var e=at(o,"string");return typeof e=="symbol"?e:e+""}function at(o,e){if(typeof o!="object"||!o)return o;var t=o[Symbol.toPrimitive];if(t!==void 0){var r=t.call(o,e);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(o)}function bt(o){return(o==null?void 0:o.href)!==void 0}class T{static getGridPointFromXY(e,t,r){var n=T.getColumnAtX(e,r),a=T.getRowAtY(t,r),l=T.getColumnHeaderDepthAtY(t,r);return{x:e,y:t,row:a,column:n,columnHeaderDepth:l}}static getCellInfoFromXY(e,t,r){var{row:n,column:a}=T.getGridPointFromXY(e,t,r),{allColumnWidths:l,allRowHeights:i,allColumnXs:u,allRowYs:s,modelColumns:v,modelRows:c}=r,d=n!==null?c.get(n):null,g=a!==null?v.get(a):null,m=a!==null?u.get(a):null,E=n!==null?s.get(n):null,h=a!==null?l.get(a):null,y=n!==null?i.get(n):null;return{row:n,column:a,modelRow:d??null,modelColumn:g??null,left:m??null,top:E??null,columnWidth:h??null,rowHeight:y??null}}static getColumnHeaderDepthAtY(e,t){var r=T.getRowAtY(e,t),{columnHeaderHeight:n,columnHeaderMaxDepth:a}=t;if(r===null&&e<=n*a)return z(a-Math.ceil(e/n),0,a-1)}static iterateFloatingStart(e,t,r){for(var n=0;n<e&&n<t;n+=1){var a=r(n);if(a!==void 0)return a}}static iterateFloatingEnd(e,t,r){for(var n=0;n<e&&t-(e-n)>=0;n+=1){var a=r(t-(e-n));if(a!==void 0)return a}}static iterateFloating(e,t,r,n){var a=T.iterateFloatingStart(e,r,n);return a!==void 0?a:T.iterateFloatingEnd(t,r,n)}static iterateAllItems(e,t,r,n,a,l){var i=Math.max(e,r),u=Math.min(t,a-n-1),s=T.iterateFloating(r,n,a,l);if(s!==void 0)return s;for(var v=i;v<=u;v+=1)if(s=l(v),s!==void 0)return s}static isInItem(e,t,r,n){var a,l,i=(a=t.get(e))!==null&&a!==void 0?a:0,u=(l=r.get(e))!==null&&l!==void 0?l:0;return i<=n&&n<=i+u}static getItemAtOffset(e,t,r,n,a,l,i){var u=arguments.length>7&&arguments[7]!==void 0?arguments[7]:!1,s=u?void 0:T.iterateFloating(r,n,t,d=>{if(T.isInItem(d,l,i,e))return d});if(!u&&s!==void 0)return s;for(var v=0;v<a.length;v+=1){var c=a[v];if(T.isInItem(c,l,i,e))return c}return null}static getColumnAtX(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,{columnCount:n,floatingLeftColumnCount:a,floatingRightColumnCount:l,visibleColumns:i,allColumnXs:u,allColumnWidths:s,gridX:v}=t;return e<v?null:this.getItemAtOffset(e-v,n,a,l,i,u,s,r)}static getRowAtY(e,t){var{floatingTopRowCount:r,floatingBottomRowCount:n,rowCount:a,visibleRows:l,allRowYs:i,allRowHeights:u,gridY:s}=t;return e<s?null:this.getItemAtOffset(e-s,a,r,n,l,i,u)}static getNextShownItem(e,t,r,n){var a=r.findIndex(u=>u===e)||0;for(a-=1;a!=null&&a>=0;){var l=r[a],i=t.get(l);if(i!=null&&n.get(i)!==0)return l;a-=1}return null}static getNextShownColumn(e,t){var{modelColumns:r,visibleColumns:n,userColumnWidths:a}=t;return T.getNextShownItem(e,r,n,a)}static getNextShownRow(e,t){var{modelRows:r,visibleRows:n,userRowHeights:a}=t;return T.getNextShownItem(e,r,n,a)}static getColumnSeparatorIndex(e,t,r,n){var{rowHeaderWidth:a,columnHeaderHeight:l,floatingColumns:i,floatingLeftWidth:u,visibleColumns:s,allColumnXs:v,allColumnWidths:c,columnHeaderMaxDepth:d}=r,{allowColumnResize:g,headerSeparatorHandleSize:m}=n;if(d*l<t||!g||m<=0)return null;for(var E=e-a,h=m*.5,y=!1,A=i.length-1;A>=0;A-=1){var b,S,w=i[A],O=(b=v.get(w))!==null&&b!==void 0?b:0,I=(S=c.get(w))!==null&&S!==void 0?S:0,P=I===0;if(!y||!P){var M=O+I;P?M+=h:y&&(M-=h);var F=M-h,C=M+h;if(F<=E&&E<=C)return w;y=P}}y=!1;for(var N=s.length-1;N>=0;N-=1){var L,W,_=s[N],V=(L=v.get(_))!==null&&L!==void 0?L:0,G=(W=c.get(_))!==null&&W!==void 0?W:0,U=G===0;if(V<u-G)return null;if(!y||!U){var K=V+G;U?K+=h:y&&(K-=h);var pe=K-h,he=K+h;if(pe<=E&&E<=he)return _;y=U}}return null}static isItemHidden(e,t){return t.get(e)===0}static isColumnHidden(e,t){var{allColumnWidths:r}=t;return T.isItemHidden(e,r)}static isFloatingRow(e,t){if(e==null)return!1;var{floatingTopRowCount:r,floatingBottomRowCount:n,rowCount:a}=t;return e<r||e>=a-n}static isFloatingColumn(e,t){if(e==null)return!1;var{floatingLeftColumnCount:r,floatingRightColumnCount:n,columnCount:a}=t;return e<r||e>=a-n}static getHiddenItems(e,t,r){if(!T.isItemHidden(e,t))return[];for(var n=[e],a=r.findIndex(u=>u===e),l=a-1;l>=0;l-=1){var i=r[l];if(!T.isItemHidden(i,t))break;n.push(i)}return n}static getHiddenColumns(e,t){var{visibleColumns:r,allColumnWidths:n}=t;return T.getHiddenItems(e,n,r)}static getRowSeparatorIndex(e,t,r,n){var{rowHeaderWidth:a,columnHeaderHeight:l,visibleRows:i,allRowYs:u,allRowHeights:s}=r,{allowRowResize:v,headerSeparatorHandleSize:c}=n;if(a<e||!v||c<=0)return null;for(var d=t-l,g=c*.5,m=!1,E=i.length-1;E>=0;E-=1){var h,y,A=i[E],b=(h=u.get(A))!==null&&h!==void 0?h:0,S=(y=s.get(A))!==null&&y!==void 0?y:0,w=S===0;if(!m||!w){var O=b+S;w?O+=g:m&&(O-=g);var I=O-g,P=O+g;if(I<=d&&d<=P)return A;m=w}}return null}static isRowHidden(e,t){var{allRowHeights:r}=t;return T.isItemHidden(e,r)}static getHiddenRows(e,t){var{visibleRows:r,allRowHeights:n}=t;return T.getHiddenItems(e,n,r)}static moveItem(e,t,r){if(e===t)return r;var n=[...r],a=n[n.length-1];return a!=null&&!Q(a.from)&&a.to===e?a.from===t?n.pop():n[n.length-1]=J(J({},a),{},{to:t}):n.push({from:e,to:t}),n}static moveRange(e,t,r){var n=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;if(e[0]===e[1])return T.moveItem(e[0],t,r);var a=t;if(n&&e[0]<t&&(a-=e[1]-e[0]),e[0]===a)return r;var l=[...r],i=l[l.length-1];i!=null&&Q(i.from)&&i.from[1]-i.from[0]===e[1]-e[0]&&i.to===e[0]?l[l.length-1]=J(J({},i),{},{to:a}):l.push({from:e,to:a});var u=l[l.length-1];return Q(u.from)&&u.from[0]===u.to&&l.pop(),l}static moveItemOrRange(e,t,r){var n=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;return Array.isArray(e)?T.moveRange(e,t,r,n):T.moveItem(e,t,r)}static applyItemMoves(e,t,r){for(var n=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1,a=[[e,t]],l=function(){var{from:s,to:v}=r[i],c=1,d;Q(s)?(c=s[1]-s[0]+1,[d]=s):d=s;for(var g=n?v:d,m=g+c-1,E=n?d:v,h=E-g,y=[],A=function(){var w,O,I=(w=a[b][0])!==null&&w!==void 0?w:Number.NEGATIVE_INFINITY,P=(O=a[b][1])!==null&&O!==void 0?O:Number.POSITIVE_INFINITY,M,F=[[I,g-1],[g,m],[m+1,P]].map(C=>{var[N,L]=C;return[Math.max(N,I),Math.min(L,P)]}).filter(C=>{var[N,L]=C;return N<=L}).map(C=>{var[N,L]=C;return g<=N&&m>=L?(M=[N+h,L+h],M):m<N?[N-c,L-c]:C}).map(C=>{var[N,L]=C;return E>N&&E<=L?[[N,E-1],[E+c,L+c]]:C===M?[C]:E<=N?[[N+c,L+c]]:[C]}).flat();y.push(...F)},b=0;b<a.length;b+=1)A();a=y.map(S=>{var[w,O]=S;return[Number.isFinite(w)?w:null,Number.isFinite(O)?O:null]})},i=n?r.length-1:0;n?i>=0:i<r.length;n?i-=1:i+=1)l();return a}static translateRange(e,t,r,n){for(var a=T.applyItemMoves(e.startColumn,e.endColumn,t,n),l=T.applyItemMoves(e.startRow,e.endRow,r,n),i=[],u=0;u<a.length;u+=1)for(var s=a[u],v=0;v<l.length;v+=1){var c=l[v];i.push(new p(s[0],c[0],s[1],c[1]))}return i}static getModelIndex(e,t){var r=T.applyItemMoves(e,e,t,!0)[0][0];return r}static getModelIndexes(e,t){return e.map(r=>T.getModelIndex(r,t))}static getModelRangeIndexes(e,t,r){return T.applyItemMoves(e,t,r,!0)}static getModelRange(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:H,r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:H;return T.translateRange(e,t,r,!0)}static getModelRanges(e){for(var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:H,r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:H,n=[],a=0;a<e.length;a+=1)n.push(...T.getModelRange(e[a],t,r));return n}static getVisibleRangeIndexes(e,t,r){return T.applyItemMoves(e,t,r,!1)}static getVisibleRange(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:H,r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:H;return this.translateRange(e,t,r,!1)}static getVisibleRanges(e){for(var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:H,r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:H,n=[],a=0;a<e.length;a+=1)n.push(...T.getVisibleRange(e[a],t,r));return n}static getVisibleIndex(e,t){var r=T.applyItemMoves(e,e,t)[0][0];return r}static getVisibleIndexes(e,t){return e.map(r=>T.getVisibleIndex(r,t))}static isMacPlatform(){var{platform:e}=window.navigator;return e.startsWith("Mac")}static getModifierKey(){return T.isMacPlatform()?"metaKey":"ctrlKey"}static isModifierKeyDown(e){var t=T.getModifierKey();return e[t]}static checkColumnHidden(e,t){return t.get(e)===0}static checkAllColumnsHidden(e,t){return t.size===0?!1:e.every(r=>t.get(r)===0)}static getScrollDragBounds(e,t,r){var{gridX:n,gridY:a,width:l,height:i,floatingTopRowCount:u,floatingBottomRowCount:s,floatingLeftColumnCount:v,floatingRightColumnCount:c,floatingLeftWidth:d,floatingRightWidth:g,floatingTopHeight:m,floatingBottomHeight:E,columnCount:h,rowCount:y}=e,A=n,b=a,S=l,w=i;return r!=null&&(r>v&&(A+=d),r<h-c&&(S-=g)),t!=null&&(t>u&&(b+=m),t<y-s&&(w-=E)),{x1:A,y1:b,x2:S,y2:w}}static getScrollDelta(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1024,r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:768,n=arguments.length>3&&arguments[3]!==void 0?arguments[3]:20,a=arguments.length>4&&arguments[4]!==void 0?arguments[4]:20,{deltaX:l,deltaY:i}=e;return!T.isMacPlatform()&&e.shiftKey&&e.deltaX===0&&e.deltaY!==0&&(l=e.deltaY,i=e.deltaX),(e==null?void 0:e.deltaMode)===WheelEvent.DOM_DELTA_PAGE?(l*=t,i*=r):(e==null?void 0:e.deltaMode)===WheelEvent.DOM_DELTA_LINE&&(T.isMacPlatform()?(l=Math.round(l*n),i=Math.round(i*a)):(l=Math.round(l*this.PIXELS_PER_LINE),i=Math.round(i*this.PIXELS_PER_LINE))),{deltaX:l,deltaY:i}}static compareRanges(e,t){return e[0]==null||e[1]==null||t[0]==null||t[1]==null?0:e[0]!==t[0]?e[0]-t[0]:e[1]-t[1]}static mergeSortedRanges(e){for(var t=[],r=0;r<e.length;r+=1){var n=e[r],a=n[0],l=n[1];r===0?t.push([a,l]):a-1<=t[t.length-1][1]?t[t.length-1][1]=Math.max(t[t.length-1][1],l):t.push([a,l])}return t}static translateTokenBox(e,t){var{x1:r,y1:n,x2:a,y2:l}=e,{gridX:i,gridY:u,width:s,height:v,verticalBarWidth:c,horizontalBarHeight:d}=t,g=z(i+r,i,s-c),m=z(i+a,i,s-c),E=z(u+n,u,v-d),h=z(u+l,u,v-d);return{x1:g,y1:E,x2:m,y2:h,token:e.token}}static getTextRenderMetrics(e,t,r){var{metrics:n,model:a,theme:l}=e,{firstColumn:i,allColumnXs:u,allColumnWidths:s,allRowYs:v,allRowHeights:c,modelRows:d,modelColumns:g}=n,{cellHorizontalPadding:m,treeDepthIndent:E,treeHorizontalPadding:h}=l,y=B(d,r),A=B(g,t),b=a.textAlignForCell(A,y),S=B(u,t),w=B(v,r),O=B(s,t),I=B(c,r),P=t===i,M=0;Ge(a)&&a.hasExpandableRows&&P&&(M=E*(a.depthForRow(r)+1)+h);var F=O-M,C=S+m,N=w+I*.5;return b==="right"?C=S+F-m:b==="center"&&(C=S+F*.5),C+=M,{width:F-m*2,x:C,y:N}}static findTokensWithProtocolInText(e){var t=we(e);return t.filter(r=>r.type==="url"?/^https?:\/\//.test(r.value):!0)}}ge(T,"PIXELS_PER_LINE",100/3);function ce(o,e){var t=Object.keys(o);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(o);e&&(r=r.filter(function(n){return Object.getOwnPropertyDescriptor(o,n).enumerable})),t.push.apply(t,r)}return t}function ve(o){for(var e=1;e<arguments.length;e++){var t=arguments[e]!=null?arguments[e]:{};e%2?ce(Object(t),!0).forEach(function(r){ot(o,r,t[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(o,Object.getOwnPropertyDescriptors(t)):ce(Object(t)).forEach(function(r){Object.defineProperty(o,r,Object.getOwnPropertyDescriptor(t,r))})}return o}function ot(o,e,t){return(e=lt(e))in o?Object.defineProperty(o,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):o[e]=t,o}function lt(o){var e=it(o,"string");return typeof e=="symbol"?e:e+""}function it(o,e){if(typeof o!="object"||!o)return o;var t=o[Symbol.toPrimitive];if(t!==void 0){var r=t.call(o,e);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(o)}function ut(o,e){var t=!1,r=Se(o,ve(ve({},e),{},{dispose:()=>{t||(t=!0,r.clear(),t=!1)}}));return r}function st(o,e,t){return(e=ct(e))in o?Object.defineProperty(o,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):o[e]=t,o}function ct(o){var e=vt(o,"string");return typeof e=="symbol"?e:e+""}function vt(o,e){if(typeof o!="object"||!o)return o;var t=o[Symbol.toPrimitive];if(t!==void 0){var r=t.call(o,e);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(o)}var te=5e3;class ft extends Ae{constructor(){super(...arguments),st(this,"getCachedTokensInText",ut((e,t)=>{if(t>=e.length)return T.findTokensWithProtocolInText(e);var r=e.slice(t-1,te).search(/\s/),n=t+r;r===-1&&(n=Math.min(te,e.length));var a=e.substring(0,n);return T.findTokensWithProtocolInText(a)},{max:1e4}))}get floatingTopRowCount(){return 0}get floatingBottomRowCount(){return 0}get floatingLeftColumnCount(){return 0}get floatingRightColumnCount(){return 0}get columnHeaderMaxDepth(){return 1}truncationCharForCell(e,t){}textAlignForCell(e,t){return"left"}colorForCell(e,t,r){return r.textColor}backgroundColorForCell(e,t,r){return null}colorForColumnHeader(e){return null}textForRowHeader(e){return""}textForRowFooter(e){return""}isColumnMovable(e){return!0}isRowMovable(e){return!0}getColumnHeaderGroup(e,t){}getColumnHeaderParentGroup(e,t){}tokensForCell(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:te,n=this.textForCell(e,t);return this.getCachedTokensInText(n,r)}renderTypeForCell(e,t){return"text"}}function re(o,e,t){return(e=dt(e))in o?Object.defineProperty(o,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):o[e]=t,o}function dt(o){var e=mt(o,"string");return typeof e=="symbol"?e:e+""}function mt(o,e){if(typeof o!="object"||!o)return o;var t=o[Symbol.toPrimitive];if(t!==void 0){var r=t.call(o,e);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(o)}var j=[],fe=new Set;class gt extends ft{constructor(e){super(),re(this,"dh",void 0),re(this,"listenerCount",void 0),this.dh=e,this.listenerCount=0}addEventListener(e,t,r){super.addEventListener(e,t,r),this.listenerCount+=1,this.listenerCount===1&&this.startListening()}removeEventListener(e,t,r){super.removeEventListener(e,t,r),this.listenerCount-=1,this.listenerCount===0&&this.stopListening()}startListening(){}stopListening(){}get aggregatedColumns(){return j}get groupedColumns(){return j}get originalColumns(){return this.columns}sourceForCell(e,t){return{column:e,row:t}}getClearFilterRange(e){return this.isFilterable(e)?[e,e]:null}get initialMovedColumns(){return j}get initialMovedRows(){return j}get initialColumnHeaderGroups(){return j}get layoutHints(){return null}get frontColumns(){return j}get backColumns(){return j}get keyColumnSet(){return fe}get valueColumnSet(){return fe}get frozenColumns(){return j}isColumnFrozen(e){return!1}isColumnSortable(e){return!1}get isFilterRequired(){return!1}get isReversible(){return!0}get isColumnStatisticsAvailable(){return!1}get description(){return""}get isAggregatedColumnsAvailable(){return!1}get isCustomColumnsAvailable(){return!1}get isFormatColumnsAvailable(){return!1}get isExportAvailable(){return!1}get isValuesTableAvailable(){return!1}get isChartBuilderAvailable(){return!1}get isOrganizeColumnsAvailable(){return!1}get isRollupAvailable(){return!1}get isSelectDistinctAvailable(){return!1}get isTotalsAvailable(){return!1}get isViewportPending(){return!1}isFilterable(e){return!1}close(){}isRowMovable(){return!1}get isSeekRowAvailable(){return!1}dataBarOptionsForCell(e,t,r){throw new Error("Method not implemented.")}tooltipForCell(e,t){return null}}re(gt,"EVENT",Object.freeze({UPDATED:"UPDATED",FORMATTER_UPDATED:"FORMATTER_UPDATED",REQUEST_FAILED:"REQUEST_FAILED",COLUMNS_CHANGED:"COLUMNS_CHANGED",TABLE_CHANGED:"TABLE_CHANGED",FILTERS_CHANGED:"FILTERS_CHANGED",SORTS_CHANGED:"SORTS_CHANGED",DISCONNECT:"DISCONNECT",RECONNECT:"RECONNECT",TOTALS_UPDATED:"TOTALS_UPDATED",PENDING_DATA_UPDATED:"PENDING_DATA_UPDATED",VIEWPORT_UPDATED:"VIEWPORT_UPDATED"}));export{R as C,p as G,gt as I,Tt as L,Ie as S,f as a,Je as b,ft as c,T as d,Ge as e,bt as f,tt as g,Ve as i,ut as m};
3
- //# sourceMappingURL=IrisGridModel-BWX_u8pv.js.map
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./Chart-DmqNQtr3.js","./vendor-DVrAV4v1.js","./helpers-BosuxZz1.js","./vendor-CawHrWiI.css","./index-Cwc_E41j.js","./monaco-DaE0jI-i.js","./monaco-CgHo24-M.css","./index-WCsQ0aAg.css","./Plotly-DIvLbxz7.js","./plotly-_1p61Fhy.js","./ControlType-RBsIk8KS.js","./ControlType-CFrcYBSr.css","./DownsamplingError--AAvWHv_.js","./useMergeRef-8Wi3k_Y6.js","./FormatterUtils-C3xgIs6_.js","./Chart-CTDcF-lR.css","./IrisGrid-CFqfz-_M.js","./MissingPartitionError-DXkc6F4C.js","./IrisGridThemeProvider-CggmgZiA.js","./IrisGridShortcuts-Bw5ADLgT.js","./IrisGridShortcuts-CJtrNKDP.css","./GridTokenMouseHandler-Ds5xKqrO.js","./GridTokenMouseHandler-DTMTgCrk.css","./IrisGridThemeProvider-CBOV8q-p.css","./Grid-B7dO0Sbi.js","./Grid-DPUNpG8i.css","./IrisGrid-D9d4SPGX.css"])))=>i.map(i=>d[i]);
2
+ import{U as Ee,bH as ye,I as k,K as Te,M as ne,r as Z,bC as be,av as z,bO as we,a1 as Se,G as Ae}from"./vendor-DVrAV4v1.js";import{z as Oe,bT as Ce,N as de,e as X,L as Ne,bB as B}from"./index-Cwc_E41j.js";import{_ as me}from"./monaco-DaE0jI-i.js";import{ad as Re,c as ee,as as H}from"./ControlType-RBsIk8KS.js";var Ie=Ee.forwardRef((o,e)=>{var{children:t,className:r,disabled:n=!1,id:a,isLinked:l=!1,isLinkedSource:i=!1,isInvalid:u=!1,onClick:s,onMouseEnter:v,onMouseLeave:c,style:d,"data-testid":g}=o,{UNSAFE_className:m}=ye({},"button");return k.jsxs("button",{ref:e,type:"button",className:Te("btn-socketed",{"btn-socketed-linked":l!==void 0&&l||i},{"btn-socketed-linked-source":i},{"is-invalid":u},r,m),id:a,onClick:s,onMouseEnter:v,onMouseLeave:c,style:d,disabled:n,"data-testid":g,children:[t,k.jsx(ne,{icon:Oe,className:"linked btn-socketed-icon",transform:"down-1"}),k.jsx(ne,{icon:Ce,className:"is-invalid btn-socketed-icon"})]})});Ie.displayName="SocketedButton";function ae(o,e){var t=Object.keys(o);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(o);e&&(r=r.filter(function(n){return Object.getOwnPropertyDescriptor(o,n).enumerable})),t.push.apply(t,r)}return t}function Pe(o){for(var e=1;e<arguments.length;e++){var t=arguments[e]!=null?arguments[e]:{};e%2?ae(Object(t),!0).forEach(function(r){De(o,r,t[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(o,Object.getOwnPropertyDescriptors(t)):ae(Object(t)).forEach(function(r){Object.defineProperty(o,r,Object.getOwnPropertyDescriptor(t,r))})}return o}function De(o,e,t){return(e=Le(e))in o?Object.defineProperty(o,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):o[e]=t,o}function Le(o){var e=xe(o,"string");return typeof e=="symbol"?e:e+""}function xe(o,e){if(typeof o!="object"||!o)return o;var t=o[Symbol.toPrimitive];if(t!==void 0){var r=t.call(o,e);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(o)}var Me=Z.lazy(()=>me(()=>import("./Chart-DmqNQtr3.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15]),import.meta.url));function Tt(o){return k.jsx(Z.Suspense,{fallback:k.jsx(de,{"data-testid":"lazy-chart-loading"}),children:k.jsx(Me,Pe({},o))})}function oe(o,e){var t=Object.keys(o);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(o);e&&(r=r.filter(function(n){return Object.getOwnPropertyDescriptor(o,n).enumerable})),t.push.apply(t,r)}return t}function q(o){for(var e=1;e<arguments.length;e++){var t=arguments[e]!=null?arguments[e]:{};e%2?oe(Object(t),!0).forEach(function(r){x(o,r,t[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(o,Object.getOwnPropertyDescriptors(t)):oe(Object(t)).forEach(function(r){Object.defineProperty(o,r,Object.getOwnPropertyDescriptor(t,r))})}return o}function x(o,e,t){return(e=Fe(e))in o?Object.defineProperty(o,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):o[e]=t,o}function Fe(o){var e=ke(o,"string");return typeof e=="symbol"?e:e+""}function ke(o,e){if(typeof o!="object"||!o)return o;var t=o[Symbol.toPrimitive];if(t!==void 0){var r=t.call(o,e);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(o)}var Y=Ne.module("ChartUtils"),le="io.deephaven.time.DateTime",He=36e5,je=1e6;function _e(o){return o.asDate!==void 0}function Be(o){return o.asNumber!==void 0}function ie(o){return o.dhTimeZone!==void 0}function We(o){return o!=null&&o.range!=null&&(o.autorange===!1||o.autorange===void 0)}function Ve(){try{var o=document.createElement("canvas"),e=o.getContext("webgl")||o.getContext("experimental-webgl");return e!=null&&e instanceof WebGLRenderingContext}catch{return!1}}var ze=Ve();class f{static getPlotlyErrorBars(e,t,r){var n=r.map((l,i)=>l-e[i]),a=t.map((l,i)=>e[i]-l);return{type:"data",symmetric:!1,array:n,arrayminus:a}}static convertNumberPrefix(e){return e.replace(/\u00A4\u00A4/g,"USD").replace(/\u00A4/g,"$")}static getPlotlyNumberFormat(e,t,r){if(r==null||r==="")return null;var n=r.split(";"),a=n[0].match(/^([^#,0.]*)([#,]*)([0,]*)(\.?)(0*)(#*)(E?0*)(%?)(.*)/);X(a);var[,l,i,u,,s,v,c,d,g]=a,m=u.replace(",","").length,E=i.indexOf(",")>=0||u.indexOf(",")>=0,h=E?",":"",y=c!=null&&c!==""?"e":"f",A=d!==""?d:y,b=s.length+v.length,S="",w="0".concat(m).concat(h,".").concat(b).concat(S).concat(A),O=f.convertNumberPrefix(l),I=f.convertNumberPrefix(g);return{tickformat:w,tickprefix:O,ticksuffix:I,automargin:!0}}static addTickSpacing(e,t,r){var{gapBetweenMajorTicks:n}=t;if(n!=null&&n>0){var a=e||{},l=n;return r&&(l=n/je),t.log&&(l=Math.log(l)),a.tickmode="linear",a.dtick=l,a}return e}static getSourceForAxis(e,t){for(var r=0;r<e.series.length;r+=1)for(var n=e.series[r],a=0;a<n.sources.length;a+=1){var l=n.sources[a];if(l.axis===t)return l}return null}static getSeriesVisibility(e,t){return t!=null&&t.hiddenSeries!=null&&t.hiddenSeries.includes(e)?"legendonly":!0}static getHiddenLabels(e){return e!=null&&e.hiddenSeries?[...e.hiddenSeries]:[]}static makeSeriesData(e,t,r,n){var a=arguments.length>4&&arguments[4]!==void 0?arguments[4]:f.ORIENTATION.VERTICAL;return{type:e,mode:t,name:r,orientation:a,showlegend:n??void 0}}static getMarkerSymbol(e){switch(e){case"SQUARE":return"square";case"CIRCLE":return"circle";case"DIAMOND":return"diamond";case"UP_TRIANGLE":return"triangle-up";case"DOWN_TRIANGLE":return"triangle-down";case"RIGHT_TRIANGLE":return"triangle-right";case"LEFT_TRIANGLE":return"triangle-left";case"ELLIPSE":case"HORIZONTAL_RECTANGLE":case"VERTICAL_RECTANGLE":default:throw new Error("Unrecognized shape ".concat(e))}}static getAllAxes(e){return e.charts.reduce((t,r)=>[...t,...r.axes],[])}static getAxisTypeMap(e){var t=f.getAllAxes(e);return f.groupArray(t,"type")}static getChartForSeries(e,t){for(var{charts:r}=e,n=0;n<r.length;n+=1)for(var a=r[n],l=0;l<a.series.length;l+=1)if(t===a.series[l])return a;return null}static getLayoutRanges(e){for(var t={},r=Object.keys(e).filter(i=>i.indexOf("axis")>=0),n=0;n<r.length;n+=1){var a=r[n],l=e[a];We(l)&&(t[a]=[...l.range])}return t}static getAxisLayoutProperty(e,t){var r=t>0?"".concat(t+1):"";return"".concat(e??"","axis").concat(r)}static periodToDecimal(e){var t=e.split(":");return Number(t[0])+Number(t[1])/60}static decimalToPeriod(e){var t=Math.floor(e),r=Math.round((e-t)*60);return"".concat(t.toString().padStart(2,"0"),":").concat(r.toString().padStart(2,"0"))}static groupArray(e,t){return e.reduce((r,n)=>{var a,l=n[t],i=(a=r.get(l))!==null&&a!==void 0?a:[];return i.push(n),r.set(l,i),r},new Map)}static normalizeColorway(e){if(e!=null){if(Array.isArray(e))return e;if(typeof e=="string")return e.split(" ");Y.warn("Unexpected colorway format: ".concat(e))}}static titleFromSettings(e){var{series:t,xAxis:r,title:n="".concat((t??[]).join(", ")," by ").concat(r)}=e;return n}static getTimeZoneDiff(e,t){return t?(e.standardOffset-t.standardOffset)/60:0}static createClosedRangesForPartialHoliday(e,t){var r=t.map(c=>[f.periodToDecimal(c.open),f.periodToDecimal(c.close)]);r.sort((c,d)=>c[0]-d[0]),r.length===0&&r.push([0,24]);var n=e.map(c=>[f.periodToDecimal(c.open),f.periodToDecimal(c.close)]);n.sort((c,d)=>c[0]-d[0]);for(var a=[],l=0;l<r.length;l+=1){for(var i=r[l],u=i[0],s=0;s<n.length;s+=1){var v=n[s];v[1]>u&&v[0]<i[1]&&(v[0]>u&&a.push([u,v[0]]),u=v[1])}u<i[1]&&a.push([u,i[1]])}return a}constructor(e){x(this,"dh",void 0),x(this,"daysOfWeek",void 0),this.dh=e,this.daysOfWeek=Object.freeze(e.calendar.DayOfWeek.values()),Re(this)}getAxisFormats(e,t){for(var r=new Map,n={tickformat:null,ticksuffix:null},a=f.getAllAxes(e),l=f.groupArray(a,"type"),{charts:i}=e,u=0;u<i.length;u+=1)for(var s=i[u],v=0;v<s.series.length;v+=1)for(var c=s.series[v],{sources:d}=c,g=d.filter(P=>P.axis),m=0;m<g.length;m+=1){var E=g[m],{axis:h}=E,{type:y}=h,A=l.get(y);X(A);var b=A.indexOf(h),S=this.getAxisPropertyName(y);if(S!=null){var w=f.getAxisLayoutProperty(S,b);if(r.has(w))Y.debug("".concat(w," already added."));else{Y.debug("Adding ".concat(w," to axisFormats."));var O=this.getPlotlyAxisFormat(E,t);if(O===null)r.set(w,n);else{r.set(w,O);var{businessCalendar:I}=h;if(I!=null&&(O.rangebreaks=this.createRangeBreaksFromBusinessCalendar(I,t)),r.size===s.axes.length)return r}}}}return r}getPlotlyChartType(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,{dh:n}=this;switch(e){case n.plot.SeriesPlotStyle.SCATTER:case n.plot.SeriesPlotStyle.LINE:return!t&&ze&&r?"scattergl":"scatter";case n.plot.SeriesPlotStyle.BAR:case n.plot.SeriesPlotStyle.STACKED_BAR:return"bar";case n.plot.SeriesPlotStyle.PIE:return"pie";case n.plot.SeriesPlotStyle.TREEMAP:return"treemap";case n.plot.SeriesPlotStyle.HISTOGRAM:return"histogram";case n.plot.SeriesPlotStyle.OHLC:return"ohlc";default:return}}getPlotlyChartMode(e,t,r){var{dh:n}=this,a=new Set;switch(e){case n.plot.SeriesPlotStyle.SCATTER:(t??!1)&&a.add(f.MODE_LINES),(r??!0)&&a.add(f.MODE_MARKERS);break;case n.plot.SeriesPlotStyle.LINE:(t??!0)&&a.add(f.MODE_LINES),(r??!1)&&a.add(f.MODE_MARKERS);break}return a.size>0?[...a].join("+"):void 0}getPlotlyProperty(e,t){var{dh:r}=this;switch(e){case r.plot.SeriesPlotStyle.PIE:switch(t){case r.plot.SourceType.X:return"labels";case r.plot.SourceType.Y:return"values"}break;case r.plot.SeriesPlotStyle.OHLC:switch(t){case r.plot.SourceType.TIME:return"x"}break;case r.plot.SeriesPlotStyle.TREEMAP:switch(t){case r.plot.SourceType.X:return"ids";case r.plot.SourceType.Y:return"values";case r.plot.SourceType.LABEL:return"labels";case r.plot.SourceType.PARENT:return"parents";case r.plot.SourceType.COLOR:return"marker.colors"}break}switch(t){case r.plot.SourceType.X:return"x";case r.plot.SourceType.Y:return"y";case r.plot.SourceType.Z:return"z";case r.plot.SourceType.X_LOW:return"xLow";case r.plot.SourceType.X_HIGH:return"xHigh";case r.plot.SourceType.Y_LOW:return"yLow";case r.plot.SourceType.Y_HIGH:return"yHigh";case r.plot.SourceType.TIME:return"time";case r.plot.SourceType.OPEN:return"open";case r.plot.SourceType.HIGH:return"high";case r.plot.SourceType.LOW:return"low";case r.plot.SourceType.CLOSE:return"close";case r.plot.SourceType.SHAPE:return"shape";case r.plot.SourceType.SIZE:return"size";case r.plot.SourceType.LABEL:return"label";case r.plot.SourceType.COLOR:return"color";case r.plot.SourceType.PARENT:return"parent";case r.plot.SourceType.HOVER_TEXT:return"hovertext";case r.plot.SourceType.TEXT:return"text";default:throw new Error("Unrecognized source type: ".concat(t))}}getPlotlySeriesOrientation(e){var t,{dh:r}=this,{sources:n}=e;return n.length===2&&((t=n[0])===null||t===void 0||(t=t.axis)===null||t===void 0?void 0:t.type)===r.plot.AxisType.Y?f.ORIENTATION.HORIZONTAL:f.ORIENTATION.VERTICAL}makeSeriesDataFromSeries(e,t,r){var n=arguments.length>3&&arguments[3]!==void 0?arguments[3]:null,a=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!0,{name:l,isLinesVisible:i,isShapesVisible:u,plotStyle:s,lineColor:v,shapeColor:c,sources:d,shape:g,shapeSize:m}=e,E=d.some(S=>{var w;return(w=S.axis)===null||w===void 0?void 0:w.businessCalendar}),h=this.getChartType(s,E,a),y=this.getPlotlyChartMode(s,i??void 0,u??void 0),A=this.getPlotlySeriesOrientation(e),b=f.makeSeriesData(h,y,l,n,A);return this.addSourcesToSeriesData(b,s,d,t),this.addStylingToSeriesData(b,s,v,c,g,m,r),b}addSourcesToSeriesData(e,t,r,n){for(var a=e,l=0;l<r.length;l+=1){var i=r[l],{axis:u,type:s}=i,v=this.getPlotlyProperty(t,s);be(a,v,[]);var c=u!=null?this.getAxisPropertyName(u.type):null;if(c!=null){var d=n.get(u.type);if(d){var g=d.indexOf(u),m=g>0?"".concat(g+1):"";a["".concat(c,"axis")]="".concat(c).concat(m)}}}}addStylingToSeriesData(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null,n=arguments.length>3&&arguments[3]!==void 0?arguments[3]:null,a=arguments.length>4&&arguments[4]!==void 0?arguments[4]:null,l=arguments.length>5&&arguments[5]!==void 0?arguments[5]:null,i=arguments.length>6&&arguments[6]!==void 0?arguments[6]:null,{dh:u}=this,s=e;if(s.marker={line:{}},s.line={width:1},t===u.plot.SeriesPlotStyle.AREA?s.fill="tozeroy":t===u.plot.SeriesPlotStyle.STACKED_AREA?s.stackgroup="stack":t===u.plot.SeriesPlotStyle.STEP?s.line.shape="hv":t===u.plot.SeriesPlotStyle.HISTOGRAM?s.width=[]:t===u.plot.SeriesPlotStyle.PIE?s.textinfo="label+percent":t===u.plot.SeriesPlotStyle.TREEMAP&&(s.hoverinfo="text",s.textinfo="label+text",s.tiling={packing:"squarify",pad:0},s.textposition="middle center"),r!=null&&(t===u.plot.SeriesPlotStyle.BAR?s.marker.color=r:s.line.color=r),n!=null&&(s.marker.color=n),a!=null&&a.length>0)try{s.marker.symbol=f.getMarkerSymbol(a)}catch(v){Y.warn("Unable to handle shape",a,":",v)}l!=null&&(s.marker.size=l*f.DEFAULT_MARKER_SIZE),i!=null&&t!==u.plot.SeriesPlotStyle.PIE&&(s.visible=i)}getChartType(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,{dh:n}=this;switch(e){case n.plot.SeriesPlotStyle.HISTOGRAM:return"bar";default:return this.getPlotlyChartType(e,t,r)}}getAxisPropertyName(e){var{dh:t}=this;switch(e){case t.plot.AxisType.X:return"x";case t.plot.AxisType.Y:return"y";default:return null}}getAxisSide(e){var{dh:t}=this;switch(e){case t.plot.AxisPosition.BOTTOM:return"bottom";case t.plot.AxisPosition.TOP:return"top";case t.plot.AxisPosition.LEFT:return"left";case t.plot.AxisPosition.RIGHT:return"right";default:return}}updateFigureAxes(e,t,r){for(var n=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0,a=arguments.length>4&&arguments[4]!==void 0?arguments[4]:0,l=e,i=f.getAllAxes(t),u=0;u<t.charts.length;u+=1){var s=t.charts[u],v=r==null?void 0:r(s),c=this.getChartBounds(t,s,n,a);this.updateLayoutAxes(l,s.axes,i,n,a,c,v)}this.removeStaleAxes(l,i)}getChartBounds(e,t,r,n){var a,{dh:l}=this,{cols:i,rows:u}=e,{column:s,colspan:v,row:c,rowspan:d}=t,g=s+v,m=c+d,E=1/i,h=1/u,y=f.AXIS_SIZE_PX/r,A=f.AXIS_SIZE_PX/n,b={bottom:(u-m)*h+(m<u?A/2:0),top:(u-c)*h-(c>0?A/2:0),left:s*E+(s>0?y/2:0),right:g*E-(g<i?y/2:0)},S=f.groupArray(t.axes,"position"),w=(a=S.get(l.plot.AxisPosition.RIGHT))!==null&&a!==void 0?a:[];return w.length>0&&(r>0?b.right-=(b.right-b.left)*Math.max(0,Math.min(f.LEGEND_WIDTH_PX/r,f.MAX_LEGEND_SIZE)):b.right-=(b.right-b.left)*f.DEFAULT_AXIS_SIZE),b}getPlotlyDateFormat(e,t,r){var{dh:n}=this,a=r==null?void 0:r.replace("%","%%").replace(/S{9}/g,"%9f").replace(/S{8}/g,"%8f").replace(/S{7}/g,"%7f").replace(/S{6}/g,"%6f").replace(/S{5}/g,"%5f").replace(/S{4}/g,"%4f").replace(/S{3}/g,"%3f").replace(/S{2}/g,"%2f").replace(/S{1}/g,"%1f").replace(/y{4}/g,"%Y").replace(/y{2}/g,"%y").replace(/M{4}/g,"%B").replace(/M{3}/g,"%b").replace(/M{2}/g,"%m").replace(/M{1}/g,"%-m").replace(/E{4,}/g,"%A").replace(/E{1,}/g,"%a").replace(/d{2}/g,"%d").replace(/([^%]|^)d{1}/g,"$1%-d").replace(/H{2}/g,"%H").replace(/h{2}/g,"%I").replace(/h{1}/g,"%-I").replace(/m{2}/g,"%M").replace(/s{2}/g,"%S").replace("'T'","T").replace(" z",""),l,i=e==null?void 0:e.getColumnTypeFormatter(t);return i!=null&&ie(i)&&i.dhTimeZone!=null&&i.showTimeZone&&(l=n.i18n.DateTimeFormat.format(" z",new Date,i.dhTimeZone)),{tickformat:a,ticksuffix:l,automargin:!0}}getPlotlyAxisFormat(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null,{dh:r}=this,{axis:n,columnType:a}=e,{formatPattern:l}=n,i=null;return ee.isDateType(a)?(i=this.getPlotlyDateFormat(t,a,l),i=f.addTickSpacing(i,n,!0)):ee.isNumberType(a)&&(i=f.getPlotlyNumberFormat(t,a,l),i=f.addTickSpacing(i,n,!1)),n.formatType===r.plot.AxisFormatType.CATEGORY&&(i?i.type="category":i={type:"category",tickformat:void 0,ticksuffix:void 0}),i}updateLayoutAxes(e,t,r){for(var n=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0,a=arguments.length>4&&arguments[4]!==void 0?arguments[4]:0,l=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{left:0,top:0,right:1,bottom:1},i=arguments.length>6?arguments[6]:void 0,{dh:u}=this,s=n>0?Math.max(f.MIN_AXIS_SIZE,Math.min(f.AXIS_SIZE_PX/a,f.MAX_AXIS_SIZE)):f.DEFAULT_AXIS_SIZE,v=a>0?Math.max(f.MIN_AXIS_SIZE,Math.min(f.AXIS_SIZE_PX/n,f.MAX_AXIS_SIZE)):f.DEFAULT_AXIS_SIZE,c=e,d=f.groupArray(t,"position"),g=f.groupArray(t,"type"),m=[...g.keys()],E=f.groupArray(r,"type"),h=0;h<m.length;h+=1){var y=m[h],A=this.getAxisPropertyName(y);if(A!=null){var b=g.get(y),S=E.get(y),w=y===u.plot.AxisType.Y,O=w?a:n;X(b),X(S);for(var I=0;I<b.length;I+=1){var P=b[I],M=S.indexOf(P),F=f.getAxisLayoutProperty(A,M);c[F]==null&&(c[F]={});var C=c[F];if(C!=null){this.updateLayoutAxis(C,P,I,d,s,v,l);var{range:N,autorange:L}=C;if(i!=null&&N!==void 0&&(L===void 0||L===!1)){var W=i(P),[_,V]=W(N);Y.debug("Setting downsample range",O,_,V),P.range(O,_,V)}else P.range(O)}}}}}removeStaleAxes(e,t){for(var r=e,n=f.groupArray(t,"type"),a=[...n.keys()],l=0;l<a.length;l+=1){var i=a[l],u=n.get(i);X(u);var s=u.length,v=this.getAxisPropertyName(i);if(v!=null)for(var c=f.getAxisLayoutProperty(v,s);r[c]!=null;)delete r[c],s+=1,c=f.getAxisLayoutProperty(v,s)}}updateLayoutAxis(e,t,r,n,a,l,i){var u,{dh:s}=this,v=t.type===s.plot.AxisType.Y,c=v?l:a,d=e,g=(u=t.label)!==null&&u!==void 0?u:"";if(d.title!==void 0&&typeof d.title!="string"?d.title.text=g:d.title={text:g},t.log&&(d.type="log"),d.side=this.getAxisSide(t.position),r>0){var m,E;d.overlaying=(m=this.getAxisPropertyName(t.type))!==null&&m!==void 0?m:void 0;var h=(E=n.get(t.position))!==null&&E!==void 0?E:[],y=h.indexOf(t);y>0&&(d.anchor="free",t.position===s.plot.AxisPosition.RIGHT?d.position=i.right+(y-h.length+1)*c:t.position===s.plot.AxisPosition.TOP?d.position=i.top+(y-h.length+1)*c:t.position===s.plot.AxisPosition.BOTTOM?d.position=i.bottom+(h.length-y+1)*c:t.position===s.plot.AxisPosition.LEFT&&(d.position=i.left+(h.length-y+1)*c))}else if(t.type===s.plot.AxisType.X){var A=n.get(s.plot.AxisPosition.LEFT)||[],b=n.get(s.plot.AxisPosition.RIGHT)||[],S=Math.max(i.left,i.left+(A.length-1)*l),w=Math.min(i.right-(b.length-1)*l,i.right);d.domain=[S,w]}else if(t.type===s.plot.AxisType.Y){var O=n.get(s.plot.AxisPosition.BOTTOM)||[],I=n.get(s.plot.AxisPosition.TOP)||[],P=Math.max(i.bottom,i.bottom+(O.length-1)*a),M=Math.min(i.top-(I.length-1)*a,i.top);d.domain=[P,M]}var{minRange:F,maxRange:C,log:N}=t;(!Number.isNaN(F)||!Number.isNaN(C))&&(d.autorangeoptions={},Number.isNaN(F)||(d.autorangeoptions.minallowed=N?Math.log10(F):F),Number.isNaN(C)||(d.autorangeoptions.maxallowed=N?Math.log10(C):C))}createBoundsFromPeriods(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;if(e.length===0)return[];for(var r=e.map(u=>[(f.periodToDecimal(u.open)+t)%24,(f.periodToDecimal(u.close)+t)%24]).sort((u,s)=>u[0]-s[0]),n=[],a=0;a<r.length;a+=1){var l=r[a],i=r[(a+1)%r.length];n.push([l[1],i[0]])}return n}createBreaksFromPeriods(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,r=this.createBoundsFromPeriods(e,t);return r.map(n=>({pattern:"hour",bounds:n}))}createBoundsFromDays(e){var t=this.daysOfWeek.length;if(e.length===t)return[];for(var r=e.map(u=>this.daysOfWeek.indexOf(u)),n=new Set(r),a=new Set,l=0;l<t;l+=1)!n.has(l)&&n.has((l-1+t)%t)&&a.add(l);var i=[];return a.forEach(u=>{for(var s=0;s<t;s+=1){var v=(u+s)%t;if(n.has(v)){i.push([u,v]);return}}throw new Error("Unable to find open day for closed day ".concat(u,", businessDays: ").concat(e))}),i}createBreaksFromDays(e){var t=this.createBoundsFromDays(e);return t.map(r=>({pattern:"day of week",bounds:r}))}createRangeBreaksFromBusinessCalendar(e,t){var r=[],{businessPeriods:n,businessDays:a,holidays:l,timeZone:i}=e,u=t==null?void 0:t.getColumnTypeFormatter(le),s;ie(u)&&(s=u.dhTimeZone);var v=f.getTimeZoneDiff(i,s);return l.length>0&&r.push(...this.createRangeBreakValuesFromHolidays(l,i,s,e)),r.push(...this.createBreaksFromPeriods(n,v)),r.push(...this.createBreaksFromDays(a)),r}createRangeBreakValuesFromHolidays(e,t,r,n){var a=[],l=[];return e.forEach(i=>{i.businessPeriods.length>0?l.push(...this.createPartialHoliday(i,t,r,n)):a.push(this.createFullHoliday(i,t,r))}),[{values:a},...l]}createFullHoliday(e,t,r){return this.adjustDateForTimeZone("".concat(e.date.toString()," 00:00:00.000000"),t,r)}createPartialHoliday(e,t,r,n){var a;if(e.businessPeriods.length===0)return[];var l=e.date.toString();if(n){var i=new Date(l).getDay(),u=n.businessDays.includes(this.daysOfWeek[i]);if(!u)return[]}for(var s=f.createClosedRangesForPartialHoliday(e.businessPeriods,(a=n==null?void 0:n.businessPeriods)!==null&&a!==void 0?a:[]),v=[],c=0;c<s.length;c+=1){var[d,g]=s[c];if(d!==g){var m=[this.adjustDateForTimeZone("".concat(l," ").concat(f.decimalToPeriod(d),":00.000000"),t,r)],E=He*(g-d);v.push({values:m,dvalue:E})}}return v}adjustDateForTimeZone(e,t,r){return r&&r.standardOffset!==t.standardOffset?this.unwrapValue(this.wrapValue(e,le,t),r):e}makeFigureSettings(e,t){var{dh:r}=this,{series:n,xAxis:a,type:l}=e,i=f.titleFromSettings(e),u={formatType:"".concat(r.plot.AxisFormatType.NUMBER),type:"".concat(r.plot.AxisType.X),position:"".concat(r.plot.AxisPosition.BOTTOM)},s={formatType:"".concat(r.plot.AxisFormatType.NUMBER),type:"".concat(r.plot.AxisType.Y),position:"".concat(r.plot.AxisPosition.LEFT)};return{charts:[{chartType:"".concat(r.plot.ChartType.XY),axes:[u,s],series:(n??[]).map(v=>({plotStyle:"".concat(l),name:v,dataSources:[{type:"".concat(r.plot.SourceType.X),columnName:a??"",axis:u,table:t},{type:"".concat(r.plot.SourceType.Y),columnName:v,axis:s,table:t}]}))}],title:i}}unwrapValue(e,t){var{dh:r}=this;if(e!=null){if(_e(e))return r.i18n.DateTimeFormat.format(f.DATE_FORMAT,e,t);if(Be(e))return e.asNumber()}return e}wrapValue(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null,{dh:n}=this;if(ee.isDateType(t)&&typeof e=="string"){var a=e,l=f.DATE_FORMAT.substr(0,e.length),i=n.i18n.DateTimeFormat.parse(l,a);if(!r)return i;var u="".concat(l," Z"),s=n.i18n.DateTimeFormat.format("Z",i,r),v=n.i18n.DateTimeFormat.parse(u,"".concat(a," ").concat(s)),c=n.i18n.DateTimeFormat.format("Z",v,r);return n.i18n.DateTimeFormat.parse(u,"".concat(a," ").concat(c))}return e}makeLayoutAxis(e,t){var{dh:r}=this,n={automargin:!0,gridcolor:t.gridcolor,linecolor:t.linecolor,rangeslider:{visible:!1},showline:!0,ticks:"outside",ticklen:5,tickcolor:t.paper_bgcolor,tickfont:{color:t.zerolinecolor},title:{font:{color:t.title_color}},legend:{font:{color:t.legend_color}}};return e===r.plot.AxisType.X?Object.assign(n,{showgrid:!0}):e===r.plot.AxisType.Y&&Object.assign(n,{zerolinecolor:t.zerolinecolor,zerolinewidth:2}),n}makeDefaultTemplate(e){var{error_band_line_color:t,ohlc_increasing:r,ohlc_decreasing:n,title_color:a,indicator_increasing:l,indicator_decreasing:i,indicator_gauge:u}=e;return{data:{bar:[{marker:{line:{color:"transparent"}}}],scatter:[{error_x:{color:t},error_y:{color:t}}],ohlc:[{increasing:{line:{color:r}},decreasing:{line:{color:n}}}],pie:[{outsidetextfont:{color:a}}],treemap:[{outsidetextfont:{color:a}}],indicator:[{title:{font:{color:a}},delta:{decreasing:{color:i},increasing:{color:l}},gauge:{bar:{color:u}}}]},layout:this.makeDefaultLayout(e)}}makeDefaultLayout(e){var{dh:t}=this,{paper_bgcolor:r,plot_bgcolor:n,title_color:a,coastline_color:l,land_color:i,ocean_color:u,lake_color:s,river_color:v}=e,c={paper_bgcolor:r,plot_bgcolor:n,autosize:!0,colorway:f.normalizeColorway(e==null?void 0:e.colorway),font:{family:"'Fira Sans', sans-serif",color:a},title:{font:{color:a},xanchor:"center",xref:"paper",yanchor:"top",pad:q({},f.DEFAULT_TITLE_PADDING),y:1},legend:{font:{color:a}},margin:q({},f.DEFAULT_MARGIN),xaxis:this.makeLayoutAxis(t.plot.AxisType.X,e),yaxis:this.makeLayoutAxis(t.plot.AxisType.Y,e),polar:{angularaxis:this.makeLayoutAxis(t.plot.AxisType.SHAPE,e),radialaxis:this.makeLayoutAxis(t.plot.AxisType.SHAPE,e),bgcolor:e.plot_bgcolor},scene:{xaxis:this.makeLayoutAxis(t.plot.AxisType.X,e),yaxis:this.makeLayoutAxis(t.plot.AxisType.Y,e),zaxis:this.makeLayoutAxis(null,e)},geo:{showcoastlines:!0,showframe:!1,showland:!0,showocean:!0,showlakes:!0,showrivers:!0,bgcolor:r,coastlinecolor:l,landcolor:i,oceancolor:u,lakecolor:s,rivercolor:v}};return c.datarevision=0,c}hydrateSettings(e){var{dh:t}=this;return q(q({},e),{},{type:e.type!=null?t.plot.SeriesPlotStyle[e.type]:void 0})}}x(f,"DEFAULT_AXIS_SIZE",.15);x(f,"MIN_AXIS_SIZE",.025);x(f,"MAX_AXIS_SIZE",.2);x(f,"AXIS_SIZE_PX",75);x(f,"LEGEND_WIDTH_PX",50);x(f,"MAX_LEGEND_SIZE",.25);x(f,"ORIENTATION",Object.freeze({HORIZONTAL:"h",VERTICAL:"v"}));x(f,"DATE_FORMAT","yyyy-MM-dd HH:mm:ss.SSSSSS");x(f,"DEFAULT_MARGIN",Object.freeze({l:60,r:50,t:30,b:60,pad:0}));x(f,"DEFAULT_TITLE_PADDING",Object.freeze({t:8}));x(f,"SUBTITLE_LINE_HEIGHT",25);x(f,"DEFAULT_MARKER_SIZE",6);x(f,"MODE_MARKERS","markers");x(f,"MODE_LINES","lines");function D(o,e,t){return(e=Xe(e))in o?Object.defineProperty(o,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):o[e]=t,o}function Xe(o){var e=Ye(o,"string");return typeof e=="symbol"?e:e+""}function Ye(o,e){if(typeof o!="object"||!o)return o;var t=o[Symbol.toPrimitive];if(t!==void 0){var r=t.call(o,e);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(o)}class R{constructor(e){D(this,"dh",void 0),D(this,"listeners",void 0),D(this,"formatter",void 0),D(this,"renderOptions",void 0),D(this,"rect",void 0),D(this,"isDownsamplingDisabled",void 0),D(this,"title",void 0),this.dh=e,this.listeners=[],this.isDownsamplingDisabled=!1}getData(){return[]}getDefaultTitle(){return""}getLayout(){return{}}getFilterColumnMap(){return new Map}isFilterRequired(){return!1}setFilter(e){}close(){}setFormatter(e){this.formatter=e}setRenderOptions(e){this.renderOptions=e}setDownsamplingDisabled(e){this.isDownsamplingDisabled=e}setDimensions(e){this.rect=e}setTitle(e){this.title=e}subscribe(e){this.listeners.push(e)}unsubscribe(e){this.listeners=this.listeners.filter(t=>t!==e)}fireEvent(e){for(var t=0;t<this.listeners.length;t+=1)this.listeners[t](e)}fireUpdate(e){this.fireEvent(new CustomEvent(R.EVENT_UPDATED,{detail:e}))}fireDisconnect(){this.fireEvent(new CustomEvent(R.EVENT_DISCONNECT))}fireReconnect(){this.fireEvent(new CustomEvent(R.EVENT_RECONNECT))}fireDownsampleStart(e){this.fireEvent(new CustomEvent(R.EVENT_DOWNSAMPLESTARTED,{detail:e}))}fireDownsampleFinish(e){this.fireEvent(new CustomEvent(R.EVENT_DOWNSAMPLEFINISHED,{detail:e}))}fireDownsampleFail(e){this.fireEvent(new CustomEvent(R.EVENT_DOWNSAMPLEFAILED,{detail:e}))}fireDownsampleNeeded(e){this.fireEvent(new CustomEvent(R.EVENT_DOWNSAMPLENEEDED,{detail:e}))}fireLoadFinished(){this.fireEvent(new CustomEvent(R.EVENT_LOADFINISHED))}fireError(e){this.fireEvent(new CustomEvent(R.EVENT_ERROR,{detail:e}))}fireBlocker(e){this.fireEvent(new CustomEvent(R.EVENT_BLOCKER,{detail:e}))}fireBlockerClear(){this.fireEvent(new CustomEvent(R.EVENT_BLOCKER_CLEAR))}fireLayoutUpdated(e){this.fireEvent(new CustomEvent(R.EVENT_LAYOUT_UPDATED,{detail:e}))}}D(R,"EVENT_UPDATED","ChartModel.EVENT_UPDATED");D(R,"EVENT_DISCONNECT","ChartModel.EVENT_DISCONNECT");D(R,"EVENT_RECONNECT","ChartModel.EVENT_RECONNECT");D(R,"EVENT_DOWNSAMPLESTARTED","ChartModel.EVENT_DOWNSAMPLESTARTED");D(R,"EVENT_DOWNSAMPLEFINISHED","ChartModel.EVENT_DOWNSAMPLEFINISHED");D(R,"EVENT_DOWNSAMPLEFAILED","ChartModel.EVENT_DOWNSAMPLEFAILED");D(R,"EVENT_DOWNSAMPLENEEDED","ChartModel.EVENT_DOWNSAMPLENEEDED");D(R,"EVENT_LOADFINISHED","ChartModel.EVENT_LOADFINISHED");D(R,"EVENT_ERROR","ChartModel.EVENT_ERROR");D(R,"EVENT_BLOCKER","ChartModel.EVENT_BLOCKER");D(R,"EVENT_BLOCKER_CLEAR","ChartModel.EVENT_BLOCKER_CLEAR");D(R,"EVENT_LAYOUT_UPDATED","ChartModel.EVENT_LAYOUT_UPDATED");function ue(o,e){var t=Object.keys(o);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(o);e&&(r=r.filter(function(n){return Object.getOwnPropertyDescriptor(o,n).enumerable})),t.push.apply(t,r)}return t}function $e(o){for(var e=1;e<arguments.length;e++){var t=arguments[e]!=null?arguments[e]:{};e%2?ue(Object(t),!0).forEach(function(r){Ze(o,r,t[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(o,Object.getOwnPropertyDescriptors(t)):ue(Object(t)).forEach(function(r){Object.defineProperty(o,r,Object.getOwnPropertyDescriptor(t,r))})}return o}function Ze(o,e,t){return(e=Ke(e))in o?Object.defineProperty(o,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):o[e]=t,o}function Ke(o){var e=qe(o,"string");return typeof e=="symbol"?e:e+""}function qe(o,e){if(typeof o!="object"||!o)return o;var t=o[Symbol.toPrimitive];if(t!==void 0){var r=t.call(o,e);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(o)}var Qe=Z.lazy(()=>me(()=>import("./IrisGrid-CFqfz-_M.js"),__vite__mapDeps([16,1,2,3,4,5,6,7,10,11,17,14,18,19,13,20,21,22,23,24,25,26]),import.meta.url)),Je=Z.forwardRef((o,e)=>k.jsx(Z.Suspense,{fallback:k.jsx(de,{"data-testid":"lazy-iris-grid-loading"}),children:k.jsx(Qe,$e({ref:e},o))}));Je.displayName="LazyIrisGrid";function Ge(o){return(o==null?void 0:o.hasExpandableRows)!==void 0}function $(o,e,t){return(e=Ue(e))in o?Object.defineProperty(o,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):o[e]=t,o}function Ue(o){var e=et(o,"string");return typeof e=="symbol"?e:e+""}function et(o,e){if(typeof o!="object"||!o)return o;var t=o[Symbol.toPrimitive];if(t!==void 0){var r=t.call(o,e);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(o)}var tt=function(o){return o.DOWN="DOWN",o.UP="UP",o.LEFT="LEFT",o.RIGHT="RIGHT",o}({});class p{static normalize(e,t,r,n){var a=e,l=t,i=r,u=n;return a!=null&&i!=null&&i<a&&(a=i,i=e),l!=null&&u!=null&&u<l&&(l=u,u=t),[a,l,i,u]}static makeNormalized(e,t,r,n){return new p(...p.normalize(e,t,r,n))}static makeCell(e,t){return new p(e,t,e,t)}static makeColumn(e){return new p(e,null,e,null)}static makeRow(e){return new p(null,e,null,e)}static minOrNull(e,t){return e==null||t==null?null:Math.min(e,t)}static maxOrNull(e,t){return e==null||t==null?null:Math.max(e,t)}static consolidate(e){for(var t=e.slice(),r=!0;r;){r=!1;for(var n=0;n<t.length&&!r;n+=1)for(var a=t[n],l=t.length-1;l>n;l-=1){var i=t[l];if(a.contains(i))t.splice(l,1);else if(i.contains(a)){r=!0,t[n]=i,t.splice(l,1);break}else if(a.startRow===i.startRow&&a.endRow===i.endRow){if(a.touches(i)){var{startRow:u,endRow:s}=a,v=p.minOrNull(a.startColumn,i.startColumn),c=p.maxOrNull(a.endColumn,i.endColumn);r=!0,t[n]=new p(v,u,c,s),t.splice(l,1);break}}else if(a.startColumn===i.startColumn&&a.endColumn===i.endColumn&&a.touches(i)){var{startColumn:d,endColumn:g}=a,m=p.minOrNull(a.startRow,i.startRow),E=p.maxOrNull(a.endRow,i.endRow);r=!0,t[n]=new p(d,m,g,E),t.splice(l,1);break}}}return t}static isAxisRangeTouching(e,t,r,n){return e==null?t==null||r==null?!0:r<=t+1:t==null?n==null?!0:n>=e-1:r==null?n==null?!0:e<=n+1:n==null?t>=r-1:r>=e-1?r<=t+1:n>=e-1}static rangeArraysEqual(e,t){if(e===t)return!0;if(e==null||t==null||e.length!==t.length)return!1;for(var r=0;r<e.length;r+=1)if(!e[r].equals(t[r]))return!1;return!0}static intersection(e,t){if(e.equals(t))return e;var{startColumn:r,startRow:n,endColumn:a,endRow:l}=e;return r=r!=null&&t.startColumn!=null?Math.max(r,t.startColumn):r??t.startColumn,a=a!=null&&t.endColumn!=null?Math.min(a,t.endColumn):a??t.endColumn,n=n!=null&&t.startRow!=null?Math.max(n,t.startRow):n??t.startRow,l=l!=null&&t.endRow!=null?Math.min(l,t.endRow):l??t.endRow,r!=null&&r>(a??-1)||n!=null&&n>(l??-1)?null:new p(r,n,a,l)}static subtractFromRange(e,t){var r=[],n=p.intersection(e,t);return n==null?[e]:(n.startRow!=null&&(e.startRow==null||e.startRow<n.startRow)&&r.push(new p(e.startColumn,e.startRow,e.endColumn,n.startRow-1)),n.startColumn!=null&&(e.startColumn==null||e.startColumn<n.startColumn)&&r.push(new p(e.startColumn,n.startRow,n.startColumn-1,n.endRow)),n.endColumn!=null&&(e.endColumn==null||e.endColumn>n.endColumn)&&r.push(new p(n.endColumn+1,n.startRow,e.endColumn,n.endRow)),n.endRow!=null&&(e.endRow==null||e.endRow>n.endRow)&&r.push(new p(e.startColumn,n.endRow+1,e.endColumn,e.endRow)),r)}static subtractFromRanges(e,t){for(var r=[],n=0;n<e.length;n+=1)r.push(...p.subtractFromRange(e[n],t));return r}static subtractRangesFromRanges(e,t){for(var r=[...e],n=0;n<t.length;n+=1)r=p.subtractFromRanges(r,t[n]);return r}static isBounded(e){return e.startRow!=null&&e.startColumn!=null&&e.endRow!=null&&e.endColumn!=null}static boundedRange(e,t,r){var n,a,l,i;return p.isBounded(e)?e:new p((n=e.startColumn)!==null&&n!==void 0?n:0,(a=e.startRow)!==null&&a!==void 0?a:0,(l=e.endColumn)!==null&&l!==void 0?l:t-1,(i=e.endRow)!==null&&i!==void 0?i:r-1)}static boundedRanges(e,t,r){return e.map(n=>p.boundedRange(n,t,r))}static offset(e,t,r){return new p(e.startColumn!=null?e.startColumn+t:null,e.startRow!=null?e.startRow+r:null,e.endColumn!=null?e.endColumn+t:null,e.endRow!=null?e.endRow+r:null)}static nextCell(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null,r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null,n=arguments.length>3&&arguments[3]!==void 0?arguments[3]:p.SELECTION_DIRECTION.DOWN;if(e.length===0)return null;var a=-1;if(t!=null&&r!=null&&(a=e.findIndex(d=>d.containsCell(t,r)),a>=0)){var l=e[a],i=l.nextCell(t,r,n);if(i!=null)return i}switch(n){case p.SELECTION_DIRECTION.DOWN:case p.SELECTION_DIRECTION.RIGHT:{var u=a<e.length-1?a+1:0,s=e[u];return s.startCell(n)}case p.SELECTION_DIRECTION.LEFT:case p.SELECTION_DIRECTION.UP:{var v=a>0?a-1:e.length-1,c=e[v];return c.startCell(n)}default:throw new Error("Invalid direction: ".concat(n))}}static cellCount(e){return e.reduce((t,r)=>{var n,a,l,i;return t+(((n=r.endRow)!==null&&n!==void 0?n:NaN)-((a=r.startRow)!==null&&a!==void 0?a:NaN)+1)*(((l=r.endColumn)!==null&&l!==void 0?l:NaN)-((i=r.startColumn)!==null&&i!==void 0?i:NaN)+1)},0)}static rowCount(e){return e.reduce((t,r)=>{var n,a;return t+((n=r.endRow)!==null&&n!==void 0?n:NaN)-((a=r.startRow)!==null&&a!==void 0?a:NaN)+1},0)}static columnCount(e){return e.reduce((t,r)=>{var n,a;return t+((n=r.endColumn)!==null&&n!==void 0?n:NaN)-((a=r.startColumn)!==null&&a!==void 0?a:NaN)+1},0)}static containsCell(e,t,r){for(var n=0;n<e.length;n+=1){var a=e[n];if(a.containsCell(t,r))return!0}return!1}static forEachCell(e,t){for(var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:p.SELECTION_DIRECTION.RIGHT,n=0;n<e.length;n+=1)e[n].forEach(t,r)}constructor(e,t,r,n){$(this,"startColumn",void 0),$(this,"startRow",void 0),$(this,"endColumn",void 0),$(this,"endRow",void 0),this.startColumn=e,this.startRow=t,this.endColumn=r,this.endRow=n}equals(e){return this.startColumn===e.startColumn&&this.startRow===e.startRow&&this.endColumn===e.endColumn&&this.endRow===e.endRow}contains(e){return(this.startColumn==null||e.startColumn!=null&&this.startColumn<=e.startColumn)&&(this.startRow==null||e.startRow!=null&&this.startRow<=e.startRow)&&(this.endColumn==null||e.endColumn!=null&&this.endColumn>=e.endColumn)&&(this.endRow==null||e.endRow!=null&&this.endRow>=e.endRow)}containsCell(e,t){return e==null||t==null?!1:(this.startColumn==null||this.startColumn<=e)&&(this.endColumn==null||this.endColumn>=e)&&(this.startRow==null||this.startRow<=t)&&(this.endRow==null||this.endRow>=t)}touches(e){return p.isAxisRangeTouching(this.startRow,this.endRow,e.startRow,e.endRow)&&p.isAxisRangeTouching(this.startColumn,this.endColumn,e.startColumn,e.endColumn)}subtract(e){return p.subtractFromRange(this,e)}startCell(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:p.SELECTION_DIRECTION.DOWN;if(!p.isBounded(this))throw new Error("Cannot get the startCell of an unbounded range");switch(e){case p.SELECTION_DIRECTION.DOWN:case p.SELECTION_DIRECTION.RIGHT:return{column:this.startColumn,row:this.startRow};case p.SELECTION_DIRECTION.LEFT:case p.SELECTION_DIRECTION.UP:return{column:this.endColumn,row:this.endRow};default:throw new Error("Invalid direction: ".concat(e))}}nextCell(e,t,r){if(!p.isBounded(this))throw new Error("Bounded range required");if(e==null||t==null)throw new Error("Require a non-null cursor");var{startColumn:n,endColumn:a,startRow:l,endRow:i}=this;switch(r){case p.SELECTION_DIRECTION.DOWN:if(t<i)return{column:e,row:Math.max(t+1,l)};if(e<a)return{column:Math.max(e+1,n),row:l};break;case p.SELECTION_DIRECTION.UP:if(t>l)return{column:e,row:Math.min(t-1,i)};if(e>n)return{column:Math.min(e-1,a),row:i};break;case p.SELECTION_DIRECTION.RIGHT:if(e<a)return{column:Math.max(e+1,n),row:t};if(t<i)return{column:n,row:Math.max(t+1,l)};break;case p.SELECTION_DIRECTION.LEFT:if(e>n)return{column:Math.min(e-1,a),row:t};if(t>l)return{column:a,row:Math.min(t-1,i)};break;default:throw new Error("Invalid direction: ".concat(r))}return null}forEach(e){for(var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:p.SELECTION_DIRECTION.RIGHT,r=0,{column:n,row:a}=this.startCell(t);n!=null&&a!=null;){var l;e(n,a,r),r+=1,{column:n,row:a}=(l=this.nextCell(n,a,t))!==null&&l!==void 0?l:{}}}}$(p,"SELECTION_DIRECTION",tt);function rt(o){return Array.isArray(o)&&o.length===2&&(o[0]===null||typeof o[0]=="number")&&(o[1]===null||typeof o[1]=="number")}function Q(o){return rt(o)&&o[0]!=null&&o[1]!=null}function se(o,e){var t=Object.keys(o);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(o);e&&(r=r.filter(function(n){return Object.getOwnPropertyDescriptor(o,n).enumerable})),t.push.apply(t,r)}return t}function J(o){for(var e=1;e<arguments.length;e++){var t=arguments[e]!=null?arguments[e]:{};e%2?se(Object(t),!0).forEach(function(r){ge(o,r,t[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(o,Object.getOwnPropertyDescriptors(t)):se(Object(t)).forEach(function(r){Object.defineProperty(o,r,Object.getOwnPropertyDescriptor(t,r))})}return o}function ge(o,e,t){return(e=nt(e))in o?Object.defineProperty(o,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):o[e]=t,o}function nt(o){var e=at(o,"string");return typeof e=="symbol"?e:e+""}function at(o,e){if(typeof o!="object"||!o)return o;var t=o[Symbol.toPrimitive];if(t!==void 0){var r=t.call(o,e);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(o)}function bt(o){return(o==null?void 0:o.href)!==void 0}class T{static getGridPointFromXY(e,t,r){var n=T.getColumnAtX(e,r),a=T.getRowAtY(t,r),l=T.getColumnHeaderDepthAtY(t,r);return{x:e,y:t,row:a,column:n,columnHeaderDepth:l}}static getCellInfoFromXY(e,t,r){var{row:n,column:a}=T.getGridPointFromXY(e,t,r),{allColumnWidths:l,allRowHeights:i,allColumnXs:u,allRowYs:s,modelColumns:v,modelRows:c}=r,d=n!==null?c.get(n):null,g=a!==null?v.get(a):null,m=a!==null?u.get(a):null,E=n!==null?s.get(n):null,h=a!==null?l.get(a):null,y=n!==null?i.get(n):null;return{row:n,column:a,modelRow:d??null,modelColumn:g??null,left:m??null,top:E??null,columnWidth:h??null,rowHeight:y??null}}static getColumnHeaderDepthAtY(e,t){var r=T.getRowAtY(e,t),{columnHeaderHeight:n,columnHeaderMaxDepth:a}=t;if(r===null&&e<=n*a)return z(a-Math.ceil(e/n),0,a-1)}static iterateFloatingStart(e,t,r){for(var n=0;n<e&&n<t;n+=1){var a=r(n);if(a!==void 0)return a}}static iterateFloatingEnd(e,t,r){for(var n=0;n<e&&t-(e-n)>=0;n+=1){var a=r(t-(e-n));if(a!==void 0)return a}}static iterateFloating(e,t,r,n){var a=T.iterateFloatingStart(e,r,n);return a!==void 0?a:T.iterateFloatingEnd(t,r,n)}static iterateAllItems(e,t,r,n,a,l){var i=Math.max(e,r),u=Math.min(t,a-n-1),s=T.iterateFloating(r,n,a,l);if(s!==void 0)return s;for(var v=i;v<=u;v+=1)if(s=l(v),s!==void 0)return s}static isInItem(e,t,r,n){var a,l,i=(a=t.get(e))!==null&&a!==void 0?a:0,u=(l=r.get(e))!==null&&l!==void 0?l:0;return i<=n&&n<=i+u}static getItemAtOffset(e,t,r,n,a,l,i){var u=arguments.length>7&&arguments[7]!==void 0?arguments[7]:!1,s=u?void 0:T.iterateFloating(r,n,t,d=>{if(T.isInItem(d,l,i,e))return d});if(!u&&s!==void 0)return s;for(var v=0;v<a.length;v+=1){var c=a[v];if(T.isInItem(c,l,i,e))return c}return null}static getColumnAtX(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,{columnCount:n,floatingLeftColumnCount:a,floatingRightColumnCount:l,visibleColumns:i,allColumnXs:u,allColumnWidths:s,gridX:v}=t;return e<v?null:this.getItemAtOffset(e-v,n,a,l,i,u,s,r)}static getRowAtY(e,t){var{floatingTopRowCount:r,floatingBottomRowCount:n,rowCount:a,visibleRows:l,allRowYs:i,allRowHeights:u,gridY:s}=t;return e<s?null:this.getItemAtOffset(e-s,a,r,n,l,i,u)}static getNextShownItem(e,t,r,n){var a=r.findIndex(u=>u===e)||0;for(a-=1;a!=null&&a>=0;){var l=r[a],i=t.get(l);if(i!=null&&n.get(i)!==0)return l;a-=1}return null}static getNextShownColumn(e,t){var{modelColumns:r,visibleColumns:n,userColumnWidths:a}=t;return T.getNextShownItem(e,r,n,a)}static getNextShownRow(e,t){var{modelRows:r,visibleRows:n,userRowHeights:a}=t;return T.getNextShownItem(e,r,n,a)}static getColumnSeparatorIndex(e,t,r,n){var{rowHeaderWidth:a,columnHeaderHeight:l,floatingColumns:i,floatingLeftWidth:u,visibleColumns:s,allColumnXs:v,allColumnWidths:c,columnHeaderMaxDepth:d}=r,{allowColumnResize:g,headerSeparatorHandleSize:m}=n;if(d*l<t||!g||m<=0)return null;for(var E=e-a,h=m*.5,y=!1,A=i.length-1;A>=0;A-=1){var b,S,w=i[A],O=(b=v.get(w))!==null&&b!==void 0?b:0,I=(S=c.get(w))!==null&&S!==void 0?S:0,P=I===0;if(!y||!P){var M=O+I;P?M+=h:y&&(M-=h);var F=M-h,C=M+h;if(F<=E&&E<=C)return w;y=P}}y=!1;for(var N=s.length-1;N>=0;N-=1){var L,W,_=s[N],V=(L=v.get(_))!==null&&L!==void 0?L:0,G=(W=c.get(_))!==null&&W!==void 0?W:0,U=G===0;if(V<u-G)return null;if(!y||!U){var K=V+G;U?K+=h:y&&(K-=h);var pe=K-h,he=K+h;if(pe<=E&&E<=he)return _;y=U}}return null}static isItemHidden(e,t){return t.get(e)===0}static isColumnHidden(e,t){var{allColumnWidths:r}=t;return T.isItemHidden(e,r)}static isFloatingRow(e,t){if(e==null)return!1;var{floatingTopRowCount:r,floatingBottomRowCount:n,rowCount:a}=t;return e<r||e>=a-n}static isFloatingColumn(e,t){if(e==null)return!1;var{floatingLeftColumnCount:r,floatingRightColumnCount:n,columnCount:a}=t;return e<r||e>=a-n}static getHiddenItems(e,t,r){if(!T.isItemHidden(e,t))return[];for(var n=[e],a=r.findIndex(u=>u===e),l=a-1;l>=0;l-=1){var i=r[l];if(!T.isItemHidden(i,t))break;n.push(i)}return n}static getHiddenColumns(e,t){var{visibleColumns:r,allColumnWidths:n}=t;return T.getHiddenItems(e,n,r)}static getRowSeparatorIndex(e,t,r,n){var{rowHeaderWidth:a,columnHeaderHeight:l,visibleRows:i,allRowYs:u,allRowHeights:s}=r,{allowRowResize:v,headerSeparatorHandleSize:c}=n;if(a<e||!v||c<=0)return null;for(var d=t-l,g=c*.5,m=!1,E=i.length-1;E>=0;E-=1){var h,y,A=i[E],b=(h=u.get(A))!==null&&h!==void 0?h:0,S=(y=s.get(A))!==null&&y!==void 0?y:0,w=S===0;if(!m||!w){var O=b+S;w?O+=g:m&&(O-=g);var I=O-g,P=O+g;if(I<=d&&d<=P)return A;m=w}}return null}static isRowHidden(e,t){var{allRowHeights:r}=t;return T.isItemHidden(e,r)}static getHiddenRows(e,t){var{visibleRows:r,allRowHeights:n}=t;return T.getHiddenItems(e,n,r)}static moveItem(e,t,r){if(e===t)return r;var n=[...r],a=n[n.length-1];return a!=null&&!Q(a.from)&&a.to===e?a.from===t?n.pop():n[n.length-1]=J(J({},a),{},{to:t}):n.push({from:e,to:t}),n}static moveRange(e,t,r){var n=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;if(e[0]===e[1])return T.moveItem(e[0],t,r);var a=t;if(n&&e[0]<t&&(a-=e[1]-e[0]),e[0]===a)return r;var l=[...r],i=l[l.length-1];i!=null&&Q(i.from)&&i.from[1]-i.from[0]===e[1]-e[0]&&i.to===e[0]?l[l.length-1]=J(J({},i),{},{to:a}):l.push({from:e,to:a});var u=l[l.length-1];return Q(u.from)&&u.from[0]===u.to&&l.pop(),l}static moveItemOrRange(e,t,r){var n=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;return Array.isArray(e)?T.moveRange(e,t,r,n):T.moveItem(e,t,r)}static applyItemMoves(e,t,r){for(var n=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1,a=[[e,t]],l=function(){var{from:s,to:v}=r[i],c=1,d;Q(s)?(c=s[1]-s[0]+1,[d]=s):d=s;for(var g=n?v:d,m=g+c-1,E=n?d:v,h=E-g,y=[],A=function(){var w,O,I=(w=a[b][0])!==null&&w!==void 0?w:Number.NEGATIVE_INFINITY,P=(O=a[b][1])!==null&&O!==void 0?O:Number.POSITIVE_INFINITY,M,F=[[I,g-1],[g,m],[m+1,P]].map(C=>{var[N,L]=C;return[Math.max(N,I),Math.min(L,P)]}).filter(C=>{var[N,L]=C;return N<=L}).map(C=>{var[N,L]=C;return g<=N&&m>=L?(M=[N+h,L+h],M):m<N?[N-c,L-c]:C}).map(C=>{var[N,L]=C;return E>N&&E<=L?[[N,E-1],[E+c,L+c]]:C===M?[C]:E<=N?[[N+c,L+c]]:[C]}).flat();y.push(...F)},b=0;b<a.length;b+=1)A();a=y.map(S=>{var[w,O]=S;return[Number.isFinite(w)?w:null,Number.isFinite(O)?O:null]})},i=n?r.length-1:0;n?i>=0:i<r.length;n?i-=1:i+=1)l();return a}static translateRange(e,t,r,n){for(var a=T.applyItemMoves(e.startColumn,e.endColumn,t,n),l=T.applyItemMoves(e.startRow,e.endRow,r,n),i=[],u=0;u<a.length;u+=1)for(var s=a[u],v=0;v<l.length;v+=1){var c=l[v];i.push(new p(s[0],c[0],s[1],c[1]))}return i}static getModelIndex(e,t){var r=T.applyItemMoves(e,e,t,!0)[0][0];return r}static getModelIndexes(e,t){return e.map(r=>T.getModelIndex(r,t))}static getModelRangeIndexes(e,t,r){return T.applyItemMoves(e,t,r,!0)}static getModelRange(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:H,r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:H;return T.translateRange(e,t,r,!0)}static getModelRanges(e){for(var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:H,r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:H,n=[],a=0;a<e.length;a+=1)n.push(...T.getModelRange(e[a],t,r));return n}static getVisibleRangeIndexes(e,t,r){return T.applyItemMoves(e,t,r,!1)}static getVisibleRange(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:H,r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:H;return this.translateRange(e,t,r,!1)}static getVisibleRanges(e){for(var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:H,r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:H,n=[],a=0;a<e.length;a+=1)n.push(...T.getVisibleRange(e[a],t,r));return n}static getVisibleIndex(e,t){var r=T.applyItemMoves(e,e,t)[0][0];return r}static getVisibleIndexes(e,t){return e.map(r=>T.getVisibleIndex(r,t))}static isMacPlatform(){var{platform:e}=window.navigator;return e.startsWith("Mac")}static getModifierKey(){return T.isMacPlatform()?"metaKey":"ctrlKey"}static isModifierKeyDown(e){var t=T.getModifierKey();return e[t]}static checkColumnHidden(e,t){return t.get(e)===0}static checkAllColumnsHidden(e,t){return t.size===0?!1:e.every(r=>t.get(r)===0)}static getScrollDragBounds(e,t,r){var{gridX:n,gridY:a,width:l,height:i,floatingTopRowCount:u,floatingBottomRowCount:s,floatingLeftColumnCount:v,floatingRightColumnCount:c,floatingLeftWidth:d,floatingRightWidth:g,floatingTopHeight:m,floatingBottomHeight:E,columnCount:h,rowCount:y}=e,A=n,b=a,S=l,w=i;return r!=null&&(r>v&&(A+=d),r<h-c&&(S-=g)),t!=null&&(t>u&&(b+=m),t<y-s&&(w-=E)),{x1:A,y1:b,x2:S,y2:w}}static getScrollDelta(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1024,r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:768,n=arguments.length>3&&arguments[3]!==void 0?arguments[3]:20,a=arguments.length>4&&arguments[4]!==void 0?arguments[4]:20,{deltaX:l,deltaY:i}=e;return!T.isMacPlatform()&&e.shiftKey&&e.deltaX===0&&e.deltaY!==0&&(l=e.deltaY,i=e.deltaX),(e==null?void 0:e.deltaMode)===WheelEvent.DOM_DELTA_PAGE?(l*=t,i*=r):(e==null?void 0:e.deltaMode)===WheelEvent.DOM_DELTA_LINE&&(T.isMacPlatform()?(l=Math.round(l*n),i=Math.round(i*a)):(l=Math.round(l*this.PIXELS_PER_LINE),i=Math.round(i*this.PIXELS_PER_LINE))),{deltaX:l,deltaY:i}}static compareRanges(e,t){return e[0]==null||e[1]==null||t[0]==null||t[1]==null?0:e[0]!==t[0]?e[0]-t[0]:e[1]-t[1]}static mergeSortedRanges(e){for(var t=[],r=0;r<e.length;r+=1){var n=e[r],a=n[0],l=n[1];r===0?t.push([a,l]):a-1<=t[t.length-1][1]?t[t.length-1][1]=Math.max(t[t.length-1][1],l):t.push([a,l])}return t}static translateTokenBox(e,t){var{x1:r,y1:n,x2:a,y2:l}=e,{gridX:i,gridY:u,width:s,height:v,verticalBarWidth:c,horizontalBarHeight:d}=t,g=z(i+r,i,s-c),m=z(i+a,i,s-c),E=z(u+n,u,v-d),h=z(u+l,u,v-d);return{x1:g,y1:E,x2:m,y2:h,token:e.token}}static getTextRenderMetrics(e,t,r){var{metrics:n,model:a,theme:l}=e,{firstColumn:i,allColumnXs:u,allColumnWidths:s,allRowYs:v,allRowHeights:c,modelRows:d,modelColumns:g}=n,{cellHorizontalPadding:m,treeDepthIndent:E,treeHorizontalPadding:h}=l,y=B(d,r),A=B(g,t),b=a.textAlignForCell(A,y),S=B(u,t),w=B(v,r),O=B(s,t),I=B(c,r),P=t===i,M=0;Ge(a)&&a.hasExpandableRows&&P&&(M=E*(a.depthForRow(r)+1)+h);var F=O-M,C=S+m,N=w+I*.5;return b==="right"?C=S+F-m:b==="center"&&(C=S+F*.5),C+=M,{width:F-m*2,x:C,y:N}}static findTokensWithProtocolInText(e){var t=we(e);return t.filter(r=>r.type==="url"?/^https?:\/\//.test(r.value):!0)}}ge(T,"PIXELS_PER_LINE",100/3);function ce(o,e){var t=Object.keys(o);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(o);e&&(r=r.filter(function(n){return Object.getOwnPropertyDescriptor(o,n).enumerable})),t.push.apply(t,r)}return t}function ve(o){for(var e=1;e<arguments.length;e++){var t=arguments[e]!=null?arguments[e]:{};e%2?ce(Object(t),!0).forEach(function(r){ot(o,r,t[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(o,Object.getOwnPropertyDescriptors(t)):ce(Object(t)).forEach(function(r){Object.defineProperty(o,r,Object.getOwnPropertyDescriptor(t,r))})}return o}function ot(o,e,t){return(e=lt(e))in o?Object.defineProperty(o,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):o[e]=t,o}function lt(o){var e=it(o,"string");return typeof e=="symbol"?e:e+""}function it(o,e){if(typeof o!="object"||!o)return o;var t=o[Symbol.toPrimitive];if(t!==void 0){var r=t.call(o,e);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(o)}function ut(o,e){var t=!1,r=Se(o,ve(ve({},e),{},{dispose:()=>{t||(t=!0,r.clear(),t=!1)}}));return r}function st(o,e,t){return(e=ct(e))in o?Object.defineProperty(o,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):o[e]=t,o}function ct(o){var e=vt(o,"string");return typeof e=="symbol"?e:e+""}function vt(o,e){if(typeof o!="object"||!o)return o;var t=o[Symbol.toPrimitive];if(t!==void 0){var r=t.call(o,e);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(o)}var te=5e3;class ft extends Ae{constructor(){super(...arguments),st(this,"getCachedTokensInText",ut((e,t)=>{if(t>=e.length)return T.findTokensWithProtocolInText(e);var r=e.slice(t-1,te).search(/\s/),n=t+r;r===-1&&(n=Math.min(te,e.length));var a=e.substring(0,n);return T.findTokensWithProtocolInText(a)},{max:1e4}))}get floatingTopRowCount(){return 0}get floatingBottomRowCount(){return 0}get floatingLeftColumnCount(){return 0}get floatingRightColumnCount(){return 0}get columnHeaderMaxDepth(){return 1}truncationCharForCell(e,t){}textAlignForCell(e,t){return"left"}colorForCell(e,t,r){return r.textColor}backgroundColorForCell(e,t,r){return null}colorForColumnHeader(e){return null}textForRowHeader(e){return""}textForRowFooter(e){return""}isColumnMovable(e){return!0}isRowMovable(e){return!0}getColumnHeaderGroup(e,t){}getColumnHeaderParentGroup(e,t){}tokensForCell(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:te,n=this.textForCell(e,t);return this.getCachedTokensInText(n,r)}renderTypeForCell(e,t){return"text"}}function re(o,e,t){return(e=dt(e))in o?Object.defineProperty(o,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):o[e]=t,o}function dt(o){var e=mt(o,"string");return typeof e=="symbol"?e:e+""}function mt(o,e){if(typeof o!="object"||!o)return o;var t=o[Symbol.toPrimitive];if(t!==void 0){var r=t.call(o,e);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(o)}var j=[],fe=new Set;class gt extends ft{constructor(e){super(),re(this,"dh",void 0),re(this,"listenerCount",void 0),this.dh=e,this.listenerCount=0}addEventListener(e,t,r){super.addEventListener(e,t,r),this.listenerCount+=1,this.listenerCount===1&&this.startListening()}removeEventListener(e,t,r){super.removeEventListener(e,t,r),this.listenerCount-=1,this.listenerCount===0&&this.stopListening()}startListening(){}stopListening(){}get aggregatedColumns(){return j}get groupedColumns(){return j}get originalColumns(){return this.columns}sourceForCell(e,t){return{column:e,row:t}}getClearFilterRange(e){return this.isFilterable(e)?[e,e]:null}get initialMovedColumns(){return j}get initialMovedRows(){return j}get initialColumnHeaderGroups(){return j}get layoutHints(){return null}get frontColumns(){return j}get backColumns(){return j}get keyColumnSet(){return fe}get valueColumnSet(){return fe}get frozenColumns(){return j}isColumnFrozen(e){return!1}isColumnSortable(e){return!1}get isFilterRequired(){return!1}get isReversible(){return!0}get isColumnStatisticsAvailable(){return!1}get description(){return""}get isAggregatedColumnsAvailable(){return!1}get isCustomColumnsAvailable(){return!1}get isFormatColumnsAvailable(){return!1}get isExportAvailable(){return!1}get isValuesTableAvailable(){return!1}get isChartBuilderAvailable(){return!1}get isOrganizeColumnsAvailable(){return!1}get isRollupAvailable(){return!1}get isSelectDistinctAvailable(){return!1}get isTotalsAvailable(){return!1}get isViewportPending(){return!1}isFilterable(e){return!1}close(){}isRowMovable(){return!1}get isSeekRowAvailable(){return!1}dataBarOptionsForCell(e,t,r){throw new Error("Method not implemented.")}tooltipForCell(e,t){return null}}re(gt,"EVENT",Object.freeze({UPDATED:"UPDATED",FORMATTER_UPDATED:"FORMATTER_UPDATED",REQUEST_FAILED:"REQUEST_FAILED",COLUMNS_CHANGED:"COLUMNS_CHANGED",TABLE_CHANGED:"TABLE_CHANGED",FILTERS_CHANGED:"FILTERS_CHANGED",SORTS_CHANGED:"SORTS_CHANGED",DISCONNECT:"DISCONNECT",RECONNECT:"RECONNECT",TOTALS_UPDATED:"TOTALS_UPDATED",PENDING_DATA_UPDATED:"PENDING_DATA_UPDATED",VIEWPORT_UPDATED:"VIEWPORT_UPDATED"}));export{R as C,p as G,gt as I,Tt as L,Ie as S,f as a,Je as b,ft as c,T as d,Ge as e,bt as f,tt as g,Ve as i,ut as m};
3
+ //# sourceMappingURL=IrisGridModel-CfNBLna8.js.map