@deephaven/code-studio 0.89.0 → 0.89.1-beta.3

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 (45) hide show
  1. package/build/assets/{AppRoot-c5e8daa7.js → AppRoot-72bdb0ec.js} +3 -3
  2. package/build/assets/{AppRoot-c5e8daa7.js.map → AppRoot-72bdb0ec.js.map} +1 -1
  3. package/build/assets/{Chart-d25c5fc6.js → Chart-982c1e4c.js} +2 -2
  4. package/build/assets/{Chart-d25c5fc6.js.map → Chart-982c1e4c.js.map} +1 -1
  5. package/build/assets/ControlType-aad93e22.js +22 -0
  6. package/build/assets/ControlType-aad93e22.js.map +1 -0
  7. package/build/assets/{FontBootstrap-dcb09d9a.js → FontBootstrap-e2993739.js} +2 -2
  8. package/build/assets/{FontBootstrap-dcb09d9a.js.map → FontBootstrap-e2993739.js.map} +1 -1
  9. package/build/assets/{FormatterUtils-8c4fbb3c.js → FormatterUtils-b084c90b.js} +2 -2
  10. package/build/assets/{FormatterUtils-8c4fbb3c.js.map → FormatterUtils-b084c90b.js.map} +1 -1
  11. package/build/assets/{Grid-e52a4f2f.js → Grid-f2f3fbeb.js} +2 -2
  12. package/build/assets/{Grid-e52a4f2f.js.map → Grid-f2f3fbeb.js.map} +1 -1
  13. package/build/assets/{IrisGrid-2416d4a8.js → IrisGrid-e1d10a87.js} +2 -2
  14. package/build/assets/{IrisGrid-2416d4a8.js.map → IrisGrid-e1d10a87.js.map} +1 -1
  15. package/build/assets/{IrisGridModel-b7a106cf.js → IrisGridModel-e9fc5ada.js} +2 -2
  16. package/build/assets/{IrisGridModel-b7a106cf.js.map → IrisGridModel-e9fc5ada.js.map} +1 -1
  17. package/build/assets/{IrisGridShortcuts-71bcac30.js → IrisGridShortcuts-f6cc6409.js} +2 -2
  18. package/build/assets/{IrisGridShortcuts-71bcac30.js.map → IrisGridShortcuts-f6cc6409.js.map} +1 -1
  19. package/build/assets/{IrisGridThemeProvider-be0e9742.js → IrisGridThemeProvider-5b0ef26e.js} +2 -2
  20. package/build/assets/{IrisGridThemeProvider-be0e9742.js.map → IrisGridThemeProvider-5b0ef26e.js.map} +1 -1
  21. package/build/assets/{LocalWorkspaceStorage-d6344a4a.js → LocalWorkspaceStorage-8f15b332.js} +2 -2
  22. package/build/assets/{LocalWorkspaceStorage-d6344a4a.js.map → LocalWorkspaceStorage-8f15b332.js.map} +1 -1
  23. package/build/assets/{MarkdownEditor-e4a217f6.js → MarkdownEditor-a926bb89.js} +2 -2
  24. package/build/assets/{MarkdownEditor-e4a217f6.js.map → MarkdownEditor-a926bb89.js.map} +1 -1
  25. package/build/assets/{MarkdownNotebook-ef0316f6.js → MarkdownNotebook-6a54b413.js} +2 -2
  26. package/build/assets/{MarkdownNotebook-ef0316f6.js.map → MarkdownNotebook-6a54b413.js.map} +1 -1
  27. package/build/assets/{MissingPartitionError-6f5d2df4.js → MissingPartitionError-c813b4be.js} +2 -2
  28. package/build/assets/{MissingPartitionError-6f5d2df4.js.map → MissingPartitionError-c813b4be.js.map} +1 -1
  29. package/build/assets/{StyleGuideRoot-fa414870.js → StyleGuideRoot-4b5cf2e3.js} +2 -2
  30. package/build/assets/{StyleGuideRoot-fa414870.js.map → StyleGuideRoot-4b5cf2e3.js.map} +1 -1
  31. package/build/assets/TokenBoxCellRenderer-5e9a3b7e.js +2 -0
  32. package/build/assets/TokenBoxCellRenderer-5e9a3b7e.js.map +1 -0
  33. package/build/assets/{index-1c683534.js → index-73ed3e7e.js} +2 -2
  34. package/build/assets/{index-1c683534.js.map → index-73ed3e7e.js.map} +1 -1
  35. package/build/assets/{index-bc0b0e9a.js → index-a6ab7b46.js} +5 -5
  36. package/build/assets/index-a6ab7b46.js.map +1 -0
  37. package/build/assets/{index-d1ba1bbc.js → index-ca124227.js} +2 -2
  38. package/build/assets/{index-d1ba1bbc.js.map → index-ca124227.js.map} +1 -1
  39. package/build/index.html +1 -1
  40. package/package.json +30 -30
  41. package/build/assets/ControlType-1eb8fa6a.js +0 -22
  42. package/build/assets/ControlType-1eb8fa6a.js.map +0 -1
  43. package/build/assets/TokenBoxCellRenderer-f3e4d1db.js +0 -2
  44. package/build/assets/TokenBoxCellRenderer-f3e4d1db.js.map +0 -1
  45. package/build/assets/index-bc0b0e9a.js.map +0 -1
@@ -1,2 +1,2 @@
1
- import{V as Ee,bo as Ae,J as H,M as Ie,N as ie,r as B,bl as Re,aq as Z,bu as Pe,a1 as Ne,H as De}from"./vendor-808b021e.js";import{x as xe,br as Le,J as ye,L as Me,e as q,b9 as K}from"./index-d1ba1bbc.js";import{aU as Fe,a6 as He,c as te,ag as $}from"./ControlType-1eb8fa6a.js";import{_ as Te}from"./monaco-9ad65137.js";var le=Ee.forwardRef((o,e)=>{var{children:t,className:r,disabled:n,id:a,isLinked:i,isLinkedSource:l,isInvalid:s,onClick:u,onMouseEnter:f,onMouseLeave:c,style:d,"data-testid":h}=o,{UNSAFE_className:g}=Ae({},"button");return H.jsxs("button",{ref:e,type:"button",className:Ie("btn-socketed",{"btn-socketed-linked":i!==void 0&&i||l},{"btn-socketed-linked-source":l},{"is-invalid":s},r,g),id:a,onClick:u,onMouseEnter:f,onMouseLeave:c,style:d,disabled:n,"data-testid":h,children:[t,H.jsx(ie,{icon:xe,className:"linked btn-socketed-icon",transform:"down-1"}),H.jsx(ie,{icon:Le,className:"is-invalid btn-socketed-icon"})]})});le.displayName="SocketedButton";le.defaultProps={children:void 0,className:"",disabled:!1,id:void 0,isLinked:!1,isLinkedSource:!1,isInvalid:!1,onClick:void 0,onMouseEnter:void 0,onMouseLeave:void 0,style:void 0,"data-testid":void 0};const Dt=le;var we=Ee.createContext(new Map),xt=we.Provider;function ke(o){var e,t=B.useContext(we);return(e=t.get(o))!==null&&e!==void 0?e:o.Original}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 re(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){_e(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 _e(o,e,t){return e=je(e),e in o?Object.defineProperty(o,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):o[e]=t,o}function je(o){var e=We(o,"string");return typeof e=="symbol"?e:String(e)}function We(o,e){if(typeof o!="object"||o===null)return o;var t=o[Symbol.toPrimitive];if(t!==void 0){var r=t.call(o,e||"default");if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(o)}function Lt(o){var e,t;function r(n,a){var i=ke(t);return Fe(o)?H.jsx(i,re(re({},n),{},{ref:a})):H.jsx(i,re({},n))}return r.displayName="XComponent(".concat((e=o.displayName)!==null&&e!==void 0?e:o.name,")"),t=B.forwardRef(r),t.Original=o,t.isXComponent=!0,t}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 $e(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){Xe(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 Xe(o,e,t){return e=ze(e),e in o?Object.defineProperty(o,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):o[e]=t,o}function ze(o){var e=Be(o,"string");return typeof e=="symbol"?e:String(e)}function Be(o,e){if(typeof o!="object"||o===null)return o;var t=o[Symbol.toPrimitive];if(t!==void 0){var r=t.call(o,e||"default");if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(o)}var Ve=B.lazy(()=>Te(()=>import("./Chart-d25c5fc6.js"),["./Chart-d25c5fc6.js","./vendor-808b021e.js","./helpers-de833af9.js","./vendor-ade0ce05.css","./index-d1ba1bbc.js","./monaco-9ad65137.js","./monaco-0e9455f6.css","./index-f1c315fa.css","./Plotly-4140f65b.js","./plotly-4c21198a.js","./ControlType-1eb8fa6a.js","./ControlType-382d925e.css","./DownsamplingError-8e6bdb73.js","./useMergeRef-9935f949.js","./FormatterUtils-8c4fbb3c.js","./Chart-b5066b0e.css"],import.meta.url));function Mt(o){return H.jsx(B.Suspense,{fallback:H.jsx(ye,{}),children:H.jsx(Ve,$e({},o))})}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 G(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){L(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 L(o,e,t){return e=Ye(e),e in o?Object.defineProperty(o,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):o[e]=t,o}function Ye(o){var e=Ke(o,"string");return typeof e=="symbol"?e:String(e)}function Ke(o,e){if(typeof o!="object"||o===null)return o;var t=o[Symbol.toPrimitive];if(t!==void 0){var r=t.call(o,e||"default");if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(o)}var Q=Me.module("ChartUtils"),fe="io.deephaven.time.DateTime",Ze=36e5,qe=1e6;function Qe(o){return o.asDate!==void 0}function Je(o){return o.asNumber!==void 0}function de(o){return o.dhTimeZone!==void 0}function Ge(o){return o!=null&&o.range!=null&&(o.autorange===!1||o.autorange===void 0)}function Ue(){var o=document.createElement("canvas"),e=o.getContext("webgl")||o.getContext("experimental-webgl");return e!=null&&e instanceof WebGLRenderingContext}var et=Ue();class v{static getPlotlyErrorBars(e,t,r){var n=r.map((i,l)=>i-e[l]),a=t.map((i,l)=>e[l]-i);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*)(%?)(.*)/);q(a);var[,i,l,s,,u,f,c,d,h]=a,g=s.replace(",","").length,y=l.indexOf(",")>=0||s.indexOf(",")>=0,p=y?",":"",E=c!=null&&c!==""?"e":"f",C=d!==""?d:E,w=u.length+f.length,O="",S="0".concat(g).concat(p,".").concat(w).concat(O).concat(C),A=v.convertNumberPrefix(i),N=v.convertNumberPrefix(h);return{tickformat:S,tickprefix:A,ticksuffix:N,automargin:!0}}static addTickSpacing(e,t,r){var{gapBetweenMajorTicks:n}=t;if(n!=null&&n>0){var a=e||{},i=n;return r&&(i=n/qe),t.log&&(i=Math.log(i)),a.tickmode="linear",a.dtick=i,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 i=n.sources[a];if(i.axis===t)return i}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]:v.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=v.getAllAxes(e);return v.groupArray(t,"type")}static getChartForSeries(e,t){for(var{charts:r}=e,n=0;n<r.length;n+=1)for(var a=r[n],i=0;i<a.series.length;i+=1)if(t===a.series[i])return a;return null}static getLayoutRanges(e){for(var t={},r=Object.keys(e).filter(l=>l.indexOf("axis")>=0),n=0;n<r.length;n+=1){var a=r[n],i=e[a];Ge(i)&&(t[a]=[...i.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 groupArray(e,t){return e.reduce((r,n)=>{var a,i=n[t],l=(a=r.get(i))!==null&&a!==void 0?a:[];return l.push(n),r.set(i,l),r},new Map)}static normalizeColorway(e){if(e!=null){if(Array.isArray(e))return e;if(typeof e=="string")return e.split(" ");Q.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}constructor(e){L(this,"dh",void 0),L(this,"daysOfWeek",void 0),this.dh=e,this.daysOfWeek=Object.freeze(e.calendar.DayOfWeek.values()),He(this)}getAxisFormats(e,t){for(var r=this,n=new Map,a={tickformat:null,ticksuffix:null},i=v.getAllAxes(e),l=v.groupArray(i,"type"),{charts:s}=e,u=0;u<s.length;u+=1)for(var f=s[u],c=0;c<f.series.length;c+=1)for(var d=f.series[c],{sources:h}=d,g=h.filter(C=>C.axis),y=function(){var w=g[p],{axis:O}=w,{type:S}=O,A=l.get(S);q(A);var N=A.indexOf(O),P=r.getAxisPropertyName(S);if(P!=null){var R=v.getAxisLayoutProperty(P,N);if(n.has(R))Q.debug("".concat(R," already added."));else{Q.debug("Adding ".concat(R," to axisFormats."));var F=r.getPlotlyAxisFormat(w,t);if(F===null)n.set(R,a);else{n.set(R,F);var{businessCalendar:I}=O;if(I!=null){var b=[],{businessPeriods:D,businessDays:_,holidays:k,timeZone:j}=I,V=t==null?void 0:t.getColumnTypeFormatter(fe),W;de(V)&&(W=V.dhTimeZone);var X=W?(j.standardOffset-W.standardOffset)/60:0;k.length>0&&b.push(...r.createRangeBreakValuesFromHolidays(k,j,W)),D.forEach(Y=>b.push({pattern:"hour",bounds:[v.periodToDecimal(Y.close)+X,v.periodToDecimal(Y.open)+X]})),_.length<r.daysOfWeek.length&&r.createBoundsFromDays(_).forEach(Y=>b.push({pattern:"day of week",bounds:Y})),F.rangebreaks=b}if(n.size===f.axes.length)return{v:n}}}}},p=0;p<g.length;p+=1){var E=y();if(typeof E=="object")return E.v}return n}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&&et&&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(v.MODE_LINES),(r??!0)&&a.add(v.MODE_MARKERS);break;case n.plot.SeriesPlotStyle.LINE:(t??!0)&&a.add(v.MODE_LINES),(r??!1)&&a.add(v.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,r,{dh:n}=this,{sources:a}=e;return a.length===2&&((t=a[0])===null||t===void 0||(r=t.axis)===null||r===void 0?void 0:r.type)===n.plot.AxisType.Y?v.ORIENTATION.HORIZONTAL:v.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:i,isLinesVisible:l,isShapesVisible:s,plotStyle:u,lineColor:f,shapeColor:c,sources:d,shape:h,shapeSize:g}=e,y=d.some(O=>{var S;return(S=O.axis)===null||S===void 0?void 0:S.businessCalendar}),p=this.getChartType(u,y,a),E=this.getPlotlyChartMode(u,l??void 0,s??void 0),C=this.getPlotlySeriesOrientation(e),w=v.makeSeriesData(p,E,i,n,C);return this.addSourcesToSeriesData(w,u,d,t),this.addStylingToSeriesData(w,u,f,c,h,g,r),w}addSourcesToSeriesData(e,t,r,n){for(var a=e,i=0;i<r.length;i+=1){var l=r[i],{axis:s,type:u}=l,f=this.getPlotlyProperty(t,u);Re(a,f,[]);var c=s!=null?this.getAxisPropertyName(s.type):null;if(c!=null){var d=n.get(s.type);if(d){var h=d.indexOf(s),g=h>0?"".concat(h+1):"";a["".concat(c,"axis")]="".concat(c).concat(g)}}}}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,i=arguments.length>5&&arguments[5]!==void 0?arguments[5]:null,l=arguments.length>6&&arguments[6]!==void 0?arguments[6]:null,{dh:s}=this,u=e;if(u.marker={line:{}},u.line={width:1},t===s.plot.SeriesPlotStyle.AREA?u.fill="tozeroy":t===s.plot.SeriesPlotStyle.STACKED_AREA?u.stackgroup="stack":t===s.plot.SeriesPlotStyle.STEP?u.line.shape="hv":t===s.plot.SeriesPlotStyle.HISTOGRAM?u.width=[]:t===s.plot.SeriesPlotStyle.PIE?u.textinfo="label+percent":t===s.plot.SeriesPlotStyle.TREEMAP&&(u.hoverinfo="text",u.textinfo="label+text",u.tiling={packing:"squarify",pad:0},u.textposition="middle center"),r!=null&&(t===s.plot.SeriesPlotStyle.BAR?u.marker.color=r:u.line.color=r),n!=null&&(u.marker.color=n),a!=null&&a.length>0)try{u.marker.symbol=v.getMarkerSymbol(a)}catch(f){Q.warn("Unable to handle shape",a,":",f)}i!=null&&(u.marker.size=i*v.DEFAULT_MARKER_SIZE),l!=null&&t!==s.plot.SeriesPlotStyle.PIE&&(u.visible=l)}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,i=e,l=v.getAllAxes(t),s=0;s<t.charts.length;s+=1){var u=t.charts[s],f=r==null?void 0:r(u),c=this.getChartBounds(t,u,n,a);this.updateLayoutAxes(i,u.axes,l,n,a,c,f)}this.removeStaleAxes(i,l)}getChartBounds(e,t,r,n){var a,{dh:i}=this,{cols:l,rows:s}=e,{column:u,colspan:f,row:c,rowspan:d}=t,h=u+f,g=c+d,y=1/l,p=1/s,E=v.AXIS_SIZE_PX/r,C=v.AXIS_SIZE_PX/n,w={bottom:(s-g)*p+(g<s?C/2:0),top:(s-c)*p-(c>0?C/2:0),left:u*y+(u>0?E/2:0),right:h*y-(h<l?E/2:0)},O=v.groupArray(t.axes,"position"),S=(a=O.get(i.plot.AxisPosition.RIGHT))!==null&&a!==void 0?a:[];return S.length>0&&(r>0?w.right-=(w.right-w.left)*Math.max(0,Math.min(v.LEGEND_WIDTH_PX/r,v.MAX_LEGEND_SIZE)):w.right-=(w.right-w.left)*v.DEFAULT_AXIS_SIZE),w}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",""),i,l=e==null?void 0:e.getColumnTypeFormatter(t);return l!=null&&de(l)&&l.dhTimeZone!=null&&l.showTimeZone&&(i=n.i18n.DateTimeFormat.format(" z",new Date,l.dhTimeZone)),{tickformat:a,ticksuffix:i,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:i}=n,l=null;return te.isDateType(a)?(l=this.getPlotlyDateFormat(t,a,i),l=v.addTickSpacing(l,n,!0)):te.isNumberType(a)&&(l=v.getPlotlyNumberFormat(t,a,i),l=v.addTickSpacing(l,n,!1)),n.formatType===r.plot.AxisFormatType.CATEGORY&&(l?l.type="category":l={type:"category",tickformat:void 0,ticksuffix:void 0}),l}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,i=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{left:0,top:0,right:1,bottom:1},l=arguments.length>6?arguments[6]:void 0,{dh:s}=this,u=n>0?Math.max(v.MIN_AXIS_SIZE,Math.min(v.AXIS_SIZE_PX/a,v.MAX_AXIS_SIZE)):v.DEFAULT_AXIS_SIZE,f=a>0?Math.max(v.MIN_AXIS_SIZE,Math.min(v.AXIS_SIZE_PX/n,v.MAX_AXIS_SIZE)):v.DEFAULT_AXIS_SIZE,c=e,d=v.groupArray(t,"position"),h=v.groupArray(t,"type"),g=[...h.keys()],y=v.groupArray(r,"type"),p=0;p<g.length;p+=1){var E=g[p],C=this.getAxisPropertyName(E);if(C!=null){var w=h.get(E),O=y.get(E),S=E===s.plot.AxisType.Y,A=S?a:n;q(w),q(O);for(var N=0;N<w.length;N+=1){var P=w[N],R=O.indexOf(P),F=v.getAxisLayoutProperty(C,R);c[F]==null&&(c[F]={});var I=c[F];if(I!=null){this.updateLayoutAxis(I,P,N,d,u,f,i);var{range:b,autorange:D}=I;if(l!=null&&b!==void 0&&(D===void 0||D===!1)){var _=l(P),[k,j]=_(b);Q.debug("Setting downsample range",A,k,j),P.range(A,k,j)}else P.range(A)}}}}}removeStaleAxes(e,t){for(var r=e,n=v.groupArray(t,"type"),a=[...n.keys()],i=0;i<a.length;i+=1){var l=a[i],s=n.get(l);q(s);var u=s.length,f=this.getAxisPropertyName(l);if(f!=null)for(var c=v.getAxisLayoutProperty(f,u);r[c]!=null;)delete r[c],u+=1,c=v.getAxisLayoutProperty(f,u)}}updateLayoutAxis(e,t,r,n,a,i,l){var s,{dh:u}=this,f=t.type===u.plot.AxisType.Y,c=f?i:a,d=e,h=(s=t.label)!==null&&s!==void 0?s:"";if(d.title!==void 0&&typeof d.title!="string"?d.title.text=h:d.title={text:h},t.log&&(d.type="log"),d.side=this.getAxisSide(t.position),r>0){var g,y;d.overlaying=(g=this.getAxisPropertyName(t.type))!==null&&g!==void 0?g:void 0;var p=(y=n.get(t.position))!==null&&y!==void 0?y:[],E=p.indexOf(t);E>0&&(d.anchor="free",t.position===u.plot.AxisPosition.RIGHT?d.position=l.right+(E-p.length+1)*c:t.position===u.plot.AxisPosition.TOP?d.position=l.top+(E-p.length+1)*c:t.position===u.plot.AxisPosition.BOTTOM?d.position=l.bottom+(p.length-E+1)*c:t.position===u.plot.AxisPosition.LEFT&&(d.position=l.left+(p.length-E+1)*c))}else if(t.type===u.plot.AxisType.X){var C=n.get(u.plot.AxisPosition.LEFT)||[],w=n.get(u.plot.AxisPosition.RIGHT)||[],O=Math.max(l.left,l.left+(C.length-1)*i),S=Math.min(l.right-(w.length-1)*i,l.right);d.domain=[O,S]}else if(t.type===u.plot.AxisType.Y){var A=n.get(u.plot.AxisPosition.BOTTOM)||[],N=n.get(u.plot.AxisPosition.TOP)||[],P=Math.max(l.bottom,l.bottom+(A.length-1)*a),R=Math.min(l.top-(N.length-1)*a,l.top);d.domain=[P,R]}}createBoundsFromDays(e){var t=e.map(i=>this.daysOfWeek.indexOf(i)),r=this.daysOfWeek.filter(i=>!e.includes(i)).map(i=>this.daysOfWeek.indexOf(i)),n=new Set;r.forEach(i=>{for(var l=i+1;l<i+this.daysOfWeek.length;l+=1){var s=l%this.daysOfWeek.length;if(t.includes(s)){n.add(s);break}}});var a=[];return n.forEach(i=>{for(var l=i-1;l>i-this.daysOfWeek.length;l-=1){var s=l<0?l+this.daysOfWeek.length:l;if(t.includes(s)){var u=(s+1)%7;a.push([u,i]);break}}}),a}createRangeBreakValuesFromHolidays(e,t,r){var n=[],a=[];return e.forEach(i=>{i.businessPeriods.length>0?a.push(...this.createPartialHoliday(i,t,r)):n.push(this.createFullHoliday(i,t,r))}),[{values:n},...a]}createFullHoliday(e,t,r){return this.adjustDateForTimeZone("".concat(e.date.toString()," 00:00:00.000000"),t,r)}createPartialHoliday(e,t,r){var n=e.date.toString(),a=["00:00"];e.businessPeriods.forEach(d=>{a.push(d.open),a.push(d.close)}),a.push("24:00");for(var i=[],l=0;l<a.length;l+=2){var s=a[l],u=a[l+1];if(s!==u){var f=[this.adjustDateForTimeZone("".concat(n," ").concat(s,":00.000000"),t,r)],c=Ze*(v.periodToDecimal(u)-v.periodToDecimal(s));i.push({values:f,dvalue:c})}}return i}adjustDateForTimeZone(e,t,r){return r&&r.standardOffset!==t.standardOffset?this.unwrapValue(this.wrapValue(e,fe,t),r):e}makeFigureSettings(e,t){var{dh:r}=this,{series:n,xAxis:a,type:i}=e,l=v.titleFromSettings(e),s={formatType:"".concat(r.plot.AxisFormatType.NUMBER),type:"".concat(r.plot.AxisType.X),position:"".concat(r.plot.AxisPosition.BOTTOM)},u={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:[s,u],series:(n??[]).map(f=>({plotStyle:"".concat(i),name:f,dataSources:[{type:"".concat(r.plot.SourceType.X),columnName:a??"",axis:s,table:t},{type:"".concat(r.plot.SourceType.Y),columnName:f,axis:u,table:t}]}))}],title:l}}unwrapValue(e,t){var{dh:r}=this;if(e!=null){if(Qe(e))return r.i18n.DateTimeFormat.format(v.DATE_FORMAT,e,t);if(Je(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(te.isDateType(t)&&typeof e=="string"){var a=e,i=v.DATE_FORMAT.substr(0,e.length),l=n.i18n.DateTimeFormat.parse(i,a);if(!r)return l;var s="".concat(i," Z"),u=n.i18n.DateTimeFormat.format("Z",l,r),f=n.i18n.DateTimeFormat.parse(s,"".concat(a," ").concat(u)),c=n.i18n.DateTimeFormat.format("Z",f,r);return n.i18n.DateTimeFormat.parse(s,"".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}=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}}]},layout:this.makeDefaultLayout(e)}}makeDefaultLayout(e){var{dh:t}=this,{paper_bgcolor:r,plot_bgcolor:n,title_color:a,coastline_color:i,land_color:l,ocean_color:s,lake_color:u,river_color:f}=e,c={paper_bgcolor:r,plot_bgcolor:n,autosize:!0,colorway:v.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:G({},v.DEFAULT_TITLE_PADDING),y:1},legend:{font:{color:a}},margin:G({},v.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:i,landcolor:l,oceancolor:s,lakecolor:u,rivercolor:f}};return c.datarevision=0,c}hydrateSettings(e){var{dh:t}=this;return G(G({},e),{},{type:e.type!=null?t.plot.SeriesPlotStyle[e.type]:void 0})}}L(v,"DEFAULT_AXIS_SIZE",.15);L(v,"MIN_AXIS_SIZE",.025);L(v,"MAX_AXIS_SIZE",.2);L(v,"AXIS_SIZE_PX",75);L(v,"LEGEND_WIDTH_PX",50);L(v,"MAX_LEGEND_SIZE",.25);L(v,"ORIENTATION",Object.freeze({HORIZONTAL:"h",VERTICAL:"v"}));L(v,"DATE_FORMAT","yyyy-MM-dd HH:mm:ss.SSSSSS");L(v,"DEFAULT_MARGIN",Object.freeze({l:60,r:50,t:30,b:60,pad:0}));L(v,"DEFAULT_TITLE_PADDING",Object.freeze({t:8}));L(v,"SUBTITLE_LINE_HEIGHT",25);L(v,"DEFAULT_MARKER_SIZE",6);L(v,"MODE_MARKERS","markers");L(v,"MODE_LINES","lines");const Ft=v;function M(o,e,t){return e=tt(e),e in o?Object.defineProperty(o,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):o[e]=t,o}function tt(o){var e=rt(o,"string");return typeof e=="symbol"?e:String(e)}function rt(o,e){if(typeof o!="object"||o===null)return o;var t=o[Symbol.toPrimitive];if(t!==void 0){var r=t.call(o,e||"default");if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(o)}class x{constructor(e){M(this,"dh",void 0),M(this,"listeners",void 0),M(this,"formatter",void 0),M(this,"renderOptions",void 0),M(this,"rect",void 0),M(this,"isDownsamplingDisabled",void 0),M(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(x.EVENT_UPDATED,{detail:e}))}fireDisconnect(){this.fireEvent(new CustomEvent(x.EVENT_DISCONNECT))}fireReconnect(){this.fireEvent(new CustomEvent(x.EVENT_RECONNECT))}fireDownsampleStart(e){this.fireEvent(new CustomEvent(x.EVENT_DOWNSAMPLESTARTED,{detail:e}))}fireDownsampleFinish(e){this.fireEvent(new CustomEvent(x.EVENT_DOWNSAMPLEFINISHED,{detail:e}))}fireDownsampleFail(e){this.fireEvent(new CustomEvent(x.EVENT_DOWNSAMPLEFAILED,{detail:e}))}fireDownsampleNeeded(e){this.fireEvent(new CustomEvent(x.EVENT_DOWNSAMPLENEEDED,{detail:e}))}fireLoadFinished(){this.fireEvent(new CustomEvent(x.EVENT_LOADFINISHED))}fireError(e){this.fireEvent(new CustomEvent(x.EVENT_ERROR,{detail:e}))}}M(x,"EVENT_UPDATED","ChartModel.EVENT_UPDATED");M(x,"EVENT_DISCONNECT","ChartModel.EVENT_DISCONNECT");M(x,"EVENT_RECONNECT","ChartModel.EVENT_RECONNECT");M(x,"EVENT_DOWNSAMPLESTARTED","ChartModel.EVENT_DOWNSAMPLESTARTED");M(x,"EVENT_DOWNSAMPLEFINISHED","ChartModel.EVENT_DOWNSAMPLEFINISHED");M(x,"EVENT_DOWNSAMPLEFAILED","ChartModel.EVENT_DOWNSAMPLEFAILED");M(x,"EVENT_DOWNSAMPLENEEDED","ChartModel.EVENT_DOWNSAMPLENEEDED");M(x,"EVENT_LOADFINISHED","ChartModel.EVENT_LOADFINISHED");M(x,"EVENT_ERROR","ChartModel.EVENT_ERROR");const Ht=x;function ve(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 nt(o){for(var e=1;e<arguments.length;e++){var t=arguments[e]!=null?arguments[e]:{};e%2?ve(Object(t),!0).forEach(function(r){at(o,r,t[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(o,Object.getOwnPropertyDescriptors(t)):ve(Object(t)).forEach(function(r){Object.defineProperty(o,r,Object.getOwnPropertyDescriptor(t,r))})}return o}function at(o,e,t){return e=ot(e),e in o?Object.defineProperty(o,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):o[e]=t,o}function ot(o){var e=lt(o,"string");return typeof e=="symbol"?e:String(e)}function lt(o,e){if(typeof o!="object"||o===null)return o;var t=o[Symbol.toPrimitive];if(t!==void 0){var r=t.call(o,e||"default");if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(o)}var it=B.lazy(()=>Te(()=>import("./IrisGrid-2416d4a8.js"),["./IrisGrid-2416d4a8.js","./vendor-808b021e.js","./helpers-de833af9.js","./vendor-ade0ce05.css","./index-d1ba1bbc.js","./monaco-9ad65137.js","./monaco-0e9455f6.css","./index-f1c315fa.css","./ControlType-1eb8fa6a.js","./ControlType-382d925e.css","./MissingPartitionError-6f5d2df4.js","./FormatterUtils-8c4fbb3c.js","./IrisGridThemeProvider-be0e9742.js","./IrisGridShortcuts-71bcac30.js","./IrisGridShortcuts-7cf07b0f.css","./TokenBoxCellRenderer-f3e4d1db.js","./useMergeRef-9935f949.js","./TokenBoxCellRenderer-d8e9a802.css","./IrisGridThemeProvider-b29d55e2.css","./Grid-e52a4f2f.js","./Grid-6b71b6c4.css","./IrisGrid-aa2d04f6.css"],import.meta.url)),Se=B.forwardRef((o,e)=>H.jsx(B.Suspense,{fallback:H.jsx(ye,{}),children:H.jsx(it,nt({ref:e},o))}));Se.displayName="LazyIrisGrid";const kt=Se;function ut(o){return(o==null?void 0:o.hasExpandableRows)!==void 0}function J(o,e,t){return e=st(e),e in o?Object.defineProperty(o,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):o[e]=t,o}function st(o){var e=ct(o,"string");return typeof e=="symbol"?e:String(e)}function ct(o,e){if(typeof o!="object"||o===null)return o;var t=o[Symbol.toPrimitive];if(t!==void 0){var r=t.call(o,e||"default");if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(o)}var ae;(function(o){o.DOWN="DOWN",o.UP="UP",o.LEFT="LEFT",o.RIGHT="RIGHT"})(ae||(ae={}));class m{static normalize(e,t,r,n){var a=e,i=t,l=r,s=n;return a!=null&&l!=null&&l<a&&(a=l,l=e),i!=null&&s!=null&&s<i&&(i=s,s=t),[a,i,l,s]}static makeNormalized(e,t,r,n){return new m(...m.normalize(e,t,r,n))}static makeCell(e,t){return new m(e,t,e,t)}static makeColumn(e){return new m(e,null,e,null)}static makeRow(e){return new m(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],i=t.length-1;i>n;i-=1){var l=t[i];if(a.contains(l))t.splice(i,1);else if(l.contains(a)){r=!0,t[n]=l,t.splice(i,1);break}else if(a.startRow===l.startRow&&a.endRow===l.endRow){if(a.touches(l)){var{startRow:s,endRow:u}=a,f=m.minOrNull(a.startColumn,l.startColumn),c=m.maxOrNull(a.endColumn,l.endColumn);r=!0,t[n]=new m(f,s,c,u),t.splice(i,1);break}}else if(a.startColumn===l.startColumn&&a.endColumn===l.endColumn&&a.touches(l)){var{startColumn:d,endColumn:h}=a,g=m.minOrNull(a.startRow,l.startRow),y=m.maxOrNull(a.endRow,l.endRow);r=!0,t[n]=new m(d,g,h,y),t.splice(i,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){var r,n,a,i,l,s;if(e.equals(t))return e;var{startColumn:u,startRow:f,endColumn:c,endRow:d}=e;return u=u!=null&&t.startColumn!=null?Math.max(u,t.startColumn):(r=u)!==null&&r!==void 0?r:t.startColumn,c=c!=null&&t.endColumn!=null?Math.min(c,t.endColumn):(n=c)!==null&&n!==void 0?n:t.endColumn,f=f!=null&&t.startRow!=null?Math.max(f,t.startRow):(a=f)!==null&&a!==void 0?a:t.startRow,d=d!=null&&t.endRow!=null?Math.min(d,t.endRow):(i=d)!==null&&i!==void 0?i:t.endRow,u!=null&&u>((l=c)!==null&&l!==void 0?l:-1)||f!=null&&f>((s=d)!==null&&s!==void 0?s:-1)?null:new m(u,f,c,d)}static subtractFromRange(e,t){var r=[],n=m.intersection(e,t);return n==null?[e]:(n.startRow!=null&&(e.startRow==null||e.startRow<n.startRow)&&r.push(new m(e.startColumn,e.startRow,e.endColumn,n.startRow-1)),n.startColumn!=null&&(e.startColumn==null||e.startColumn<n.startColumn)&&r.push(new m(e.startColumn,n.startRow,n.startColumn-1,n.endRow)),n.endColumn!=null&&(e.endColumn==null||e.endColumn>n.endColumn)&&r.push(new m(n.endColumn+1,n.startRow,e.endColumn,n.endRow)),n.endRow!=null&&(e.endRow==null||e.endRow>n.endRow)&&r.push(new m(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(...m.subtractFromRange(e[n],t));return r}static subtractRangesFromRanges(e,t){for(var r=[...e],n=0;n<t.length;n+=1)r=m.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,i,l;return m.isBounded(e)?e:new m((n=e.startColumn)!==null&&n!==void 0?n:0,(a=e.startRow)!==null&&a!==void 0?a:0,(i=e.endColumn)!==null&&i!==void 0?i:t-1,(l=e.endRow)!==null&&l!==void 0?l:r-1)}static boundedRanges(e,t,r){return e.map(n=>m.boundedRange(n,t,r))}static offset(e,t,r){return new m(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]:m.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 i=e[a],l=i.nextCell(t,r,n);if(l!=null)return l}switch(n){case m.SELECTION_DIRECTION.DOWN:case m.SELECTION_DIRECTION.RIGHT:{var s=a<e.length-1?a+1:0,u=e[s];return u.startCell(n)}case m.SELECTION_DIRECTION.LEFT:case m.SELECTION_DIRECTION.UP:{var f=a>0?a-1:e.length-1,c=e[f];return c.startCell(n)}default:throw new Error("Invalid direction: ".concat(n))}}static cellCount(e){return e.reduce((t,r)=>{var n,a,i,l;return t+(((n=r.endRow)!==null&&n!==void 0?n:NaN)-((a=r.startRow)!==null&&a!==void 0?a:NaN)+1)*(((i=r.endColumn)!==null&&i!==void 0?i:NaN)-((l=r.startColumn)!==null&&l!==void 0?l: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]:m.SELECTION_DIRECTION.RIGHT,n=0;n<e.length;n+=1)e[n].forEach(t,r)}constructor(e,t,r,n){J(this,"startColumn",void 0),J(this,"startRow",void 0),J(this,"endColumn",void 0),J(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 m.isAxisRangeTouching(this.startRow,this.endRow,e.startRow,e.endRow)&&m.isAxisRangeTouching(this.startColumn,this.endColumn,e.startColumn,e.endColumn)}subtract(e){return m.subtractFromRange(this,e)}startCell(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:m.SELECTION_DIRECTION.DOWN;if(!m.isBounded(this))throw new Error("Cannot get the startCell of an unbounded range");switch(e){case m.SELECTION_DIRECTION.DOWN:case m.SELECTION_DIRECTION.RIGHT:return{column:this.startColumn,row:this.startRow};case m.SELECTION_DIRECTION.LEFT:case m.SELECTION_DIRECTION.UP:return{column:this.endColumn,row:this.endRow};default:throw new Error("Invalid direction: ".concat(e))}}nextCell(e,t,r){if(!m.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:i,endRow:l}=this;switch(r){case m.SELECTION_DIRECTION.DOWN:if(t<l)return{column:e,row:Math.max(t+1,i)};if(e<a)return{column:Math.max(e+1,n),row:i};break;case m.SELECTION_DIRECTION.UP:if(t>i)return{column:e,row:Math.min(t-1,l)};if(e>n)return{column:Math.min(e-1,a),row:l};break;case m.SELECTION_DIRECTION.RIGHT:if(e<a)return{column:Math.max(e+1,n),row:t};if(t<l)return{column:n,row:Math.max(t+1,i)};break;case m.SELECTION_DIRECTION.LEFT:if(e>n)return{column:Math.min(e-1,a),row:t};if(t>i)return{column:a,row:Math.min(t-1,l)};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]:m.SELECTION_DIRECTION.RIGHT,r=0,{column:n,row:a}=this.startCell(t);n!=null&&a!=null;){var i;e(n,a,r),r+=1,{column:n,row:a}=(i=this.nextCell(n,a,t))!==null&&i!==void 0?i:{}}}}J(m,"SELECTION_DIRECTION",ae);function ft(o){return Array.isArray(o)&&o.length===2&&(o[0]===null||typeof o[0]=="number")&&(o[1]===null||typeof o[1]=="number")}function U(o){return ft(o)&&o[0]!=null&&o[1]!=null}function me(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 ee(o){for(var e=1;e<arguments.length;e++){var t=arguments[e]!=null?arguments[e]:{};e%2?me(Object(t),!0).forEach(function(r){Oe(o,r,t[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(o,Object.getOwnPropertyDescriptors(t)):me(Object(t)).forEach(function(r){Object.defineProperty(o,r,Object.getOwnPropertyDescriptor(t,r))})}return o}function Oe(o,e,t){return e=dt(e),e in o?Object.defineProperty(o,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):o[e]=t,o}function dt(o){var e=vt(o,"string");return typeof e=="symbol"?e:String(e)}function vt(o,e){if(typeof o!="object"||o===null)return o;var t=o[Symbol.toPrimitive];if(t!==void 0){var r=t.call(o,e||"default");if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(o)}function _t(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),i=T.getColumnHeaderDepthAtY(t,r);return{x:e,y:t,row:a,column:n,columnHeaderDepth:i}}static getCellInfoFromXY(e,t,r){var{row:n,column:a}=T.getGridPointFromXY(e,t,r),{allColumnWidths:i,allRowHeights:l,allColumnXs:s,allRowYs:u,modelColumns:f,modelRows:c}=r,d=n!==null?c.get(n):null,h=a!==null?f.get(a):null,g=a!==null?s.get(a):null,y=n!==null?u.get(n):null,p=a!==null?i.get(a):null,E=n!==null?l.get(n):null;return{row:n,column:a,modelRow:d??null,modelColumn:h??null,left:g??null,top:y??null,columnWidth:p??null,rowHeight:E??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,i){var l=Math.max(e,r),s=Math.min(t,a-n-1),u=T.iterateFloating(r,n,a,i);if(u!==void 0)return u;for(var f=l;f<=s;f+=1)if(u=i(f),u!==void 0)return u}static isInItem(e,t,r,n){var a,i,l=(a=t.get(e))!==null&&a!==void 0?a:0,s=(i=r.get(e))!==null&&i!==void 0?i:0;return l<=n&&n<=l+s}static getItemAtOffset(e,t,r,n,a,i,l){var s=arguments.length>7&&arguments[7]!==void 0?arguments[7]:!1,u=s?void 0:T.iterateFloating(r,n,t,d=>{if(T.isInItem(d,i,l,e))return d});if(!s&&u!==void 0)return u;for(var f=0;f<a.length;f+=1){var c=a[f];if(T.isInItem(c,i,l,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:i,visibleColumns:l,allColumnXs:s,allColumnWidths:u,gridX:f}=t;return e<f?null:this.getItemAtOffset(e-f,n,a,i,l,s,u,r)}static getRowAtY(e,t){var{floatingTopRowCount:r,floatingBottomRowCount:n,rowCount:a,visibleRows:i,allRowYs:l,allRowHeights:s,gridY:u}=t;return e<u?null:this.getItemAtOffset(e-u,a,r,n,i,l,s)}static getNextShownItem(e,t,r,n){var a=r.findIndex(s=>s===e)||0;for(a-=1;a!=null&&a>=0;){var i=r[a],l=t.get(i);if(l!=null&&n.get(l)!==0)return i;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:i,floatingColumns:l,floatingLeftWidth:s,visibleColumns:u,allColumnXs:f,allColumnWidths:c,columnHeaderMaxDepth:d}=r,{allowColumnResize:h,headerSeparatorHandleSize:g}=n;if(d*i<t||!h||g<=0)return null;for(var y=e-a,p=g*.5,E=!1,C=l.length-1;C>=0;C-=1){var w,O,S=l[C],A=(w=f.get(S))!==null&&w!==void 0?w:0,N=(O=c.get(S))!==null&&O!==void 0?O:0,P=N===0;if(!E||!P){var R=A+N;P?R+=p:E&&(R-=p);var F=R-p,I=R+p;if(F<=y&&y<=I)return S;E=P}}E=!1;for(var b=u.length-1;b>=0;b-=1){var D,_,k=u[b],j=(D=f.get(k))!==null&&D!==void 0?D:0,V=(_=c.get(k))!==null&&_!==void 0?_:0,W=V===0;if(j<s-V)return null;if(!E||!W){var X=j+V;W?X+=p:E&&(X-=p);var Y=X-p,be=X+p;if(Y<=y&&y<=be)return k;E=W}}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(s=>s===e),i=a-1;i>=0;i-=1){var l=r[i];if(!T.isItemHidden(l,t))break;n.push(l)}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:i,visibleRows:l,allRowYs:s,allRowHeights:u}=r,{allowRowResize:f,headerSeparatorHandleSize:c}=n;if(a<e||!f||c<=0)return null;for(var d=t-i,h=c*.5,g=!1,y=l.length-1;y>=0;y-=1){var p,E,C=l[y],w=(p=s.get(C))!==null&&p!==void 0?p:0,O=(E=u.get(C))!==null&&E!==void 0?E:0,S=O===0;if(!g||!S){var A=w+O;S?A+=h:g&&(A-=h);var N=A-h,P=A+h;if(N<=d&&d<=P)return C;g=S}}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&&!U(a.from)&&a.to===e?a.from===t?n.pop():n[n.length-1]=ee(ee({},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 i=[...r],l=i[i.length-1];l!=null&&U(l.from)&&l.from[1]-l.from[0]===e[1]-e[0]&&l.to===e[0]?i[i.length-1]=ee(ee({},l),{},{to:a}):i.push({from:e,to:a});var s=i[i.length-1];return U(s.from)&&s.from[0]===s.to&&i.pop(),i}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]],i=function(){var{from:u,to:f}=r[l],c=1,d;U(u)?(c=u[1]-u[0]+1,[d]=u):d=u;for(var h=n?f:d,g=h+c-1,y=n?d:f,p=y-h,E=[],C=function(){var S,A,N=(S=a[w][0])!==null&&S!==void 0?S:Number.NEGATIVE_INFINITY,P=(A=a[w][1])!==null&&A!==void 0?A:Number.POSITIVE_INFINITY,R,F=[[N,h-1],[h,g],[g+1,P]].map(I=>{var[b,D]=I;return[Math.max(b,N),Math.min(D,P)]}).filter(I=>{var[b,D]=I;return b<=D}).map(I=>{var[b,D]=I;return h<=b&&g>=D?(R=[b+p,D+p],R):g<b?[b-c,D-c]:I}).map(I=>{var[b,D]=I;return y>b&&y<=D?[[b,y-1],[y+c,D+c]]:I===R?[I]:y<=b?[[b+c,D+c]]:[I]}).flat();E.push(...F)},w=0;w<a.length;w+=1)C();a=E.map(O=>{var[S,A]=O;return[Number.isFinite(S)?S:null,Number.isFinite(A)?A:null]})},l=n?r.length-1:0;n?l>=0:l<r.length;n?l-=1:l+=1)i();return a}static translateRange(e,t,r,n){for(var a=T.applyItemMoves(e.startColumn,e.endColumn,t,n),i=T.applyItemMoves(e.startRow,e.endRow,r,n),l=[],s=0;s<a.length;s+=1)for(var u=a[s],f=0;f<i.length;f+=1){var c=i[f];l.push(new m(u[0],c[0],u[1],c[1]))}return l}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]:$,r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:$;return T.translateRange(e,t,r,!0)}static getModelRanges(e){for(var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:$,r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:$,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]:$,r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:$;return this.translateRange(e,t,r,!1)}static getVisibleRanges(e){for(var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:$,r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:$,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:i,height:l,floatingTopRowCount:s,floatingBottomRowCount:u,floatingLeftColumnCount:f,floatingRightColumnCount:c,floatingLeftWidth:d,floatingRightWidth:h,floatingTopHeight:g,floatingBottomHeight:y,columnCount:p,rowCount:E}=e,C=n,w=a,O=i,S=l;return r!=null&&(r>f&&(C+=d),r<p-c&&(O-=h)),t!=null&&(t>s&&(w+=g),t<E-u&&(S-=y)),{x1:C,y1:w,x2:O,y2:S}}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:i,deltaY:l}=e;return!T.isMacPlatform()&&e.shiftKey&&e.deltaX===0&&e.deltaY!==0&&(i=e.deltaY,l=e.deltaX),(e==null?void 0:e.deltaMode)===WheelEvent.DOM_DELTA_PAGE?(i*=t,l*=r):(e==null?void 0:e.deltaMode)===WheelEvent.DOM_DELTA_LINE&&(T.isMacPlatform()?(i=Math.round(i*n),l=Math.round(l*a)):(i=Math.round(i*this.PIXELS_PER_LINE),l=Math.round(l*this.PIXELS_PER_LINE))),{deltaX:i,deltaY:l}}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],i=n[1];r===0?t.push([a,i]):a-1<=t[t.length-1][1]?t[t.length-1][1]=Math.max(t[t.length-1][1],i):t.push([a,i])}return t}static translateTokenBox(e,t){var{x1:r,y1:n,x2:a,y2:i}=e,{gridX:l,gridY:s,width:u,height:f,verticalBarWidth:c,horizontalBarHeight:d}=t,h=Z(l+r,l,u-c),g=Z(l+a,l,u-c),y=Z(s+n,s,f-d),p=Z(s+i,s,f-d);return{x1:h,y1:y,x2:g,y2:p,token:e.token}}static getTextRenderMetrics(e,t,r){var{metrics:n,model:a,theme:i}=e,{firstColumn:l,allColumnXs:s,allColumnWidths:u,allRowYs:f,allRowHeights:c,modelRows:d,modelColumns:h}=n,{cellHorizontalPadding:g,treeDepthIndent:y,treeHorizontalPadding:p}=i,E=K(d,r),C=K(h,t),w=a.textAlignForCell(C,E),O=K(s,t),S=K(f,r),A=K(u,t),N=K(c,r),P=t===l,R=0;ut(a)&&a.hasExpandableRows&&P&&(R=y*(a.depthForRow(r)+1)+p);var F=A-R,I=O+g,b=S+N*.5;return w==="right"?I=O+F-g:w==="center"&&(I=O+F*.5),I+=R,{width:F-g*2,x:I,y:b}}static findTokensWithProtocolInText(e){var t=Pe(e);return t.filter(r=>r.type==="url"?/^https?:\/\//.test(r.value):!0)}}Oe(T,"PIXELS_PER_LINE",100/3);const ge=T;function pe(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 he(o){for(var e=1;e<arguments.length;e++){var t=arguments[e]!=null?arguments[e]:{};e%2?pe(Object(t),!0).forEach(function(r){mt(o,r,t[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(o,Object.getOwnPropertyDescriptors(t)):pe(Object(t)).forEach(function(r){Object.defineProperty(o,r,Object.getOwnPropertyDescriptor(t,r))})}return o}function mt(o,e,t){return e=gt(e),e in o?Object.defineProperty(o,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):o[e]=t,o}function gt(o){var e=pt(o,"string");return typeof e=="symbol"?e:String(e)}function pt(o,e){if(typeof o!="object"||o===null)return o;var t=o[Symbol.toPrimitive];if(t!==void 0){var r=t.call(o,e||"default");if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(o)}var ht=(o,e)=>{var t=!1,r=Ne(o,he(he({},e),{},{dispose:()=>{t||(t=!0,r.clear(),t=!1)}}));return r};const Et=ht;function yt(o,e,t){return e=Tt(e),e in o?Object.defineProperty(o,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):o[e]=t,o}function Tt(o){var e=wt(o,"string");return typeof e=="symbol"?e:String(e)}function wt(o,e){if(typeof o!="object"||o===null)return o;var t=o[Symbol.toPrimitive];if(t!==void 0){var r=t.call(o,e||"default");if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(o)}var ne=5e3;class St extends De{constructor(){super(...arguments),yt(this,"getCachedTokensInText",Et((e,t)=>{if(t>=e.length)return ge.findTokensWithProtocolInText(e);var r=e.slice(t-1,ne).search(/\s/),n=t+r;r===-1&&(n=Math.min(ne,e.length));var a=e.substring(0,n);return ge.findTokensWithProtocolInText(a)}))}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]:ne,n=this.textForCell(e,t);return this.getCachedTokensInText(n,r)}renderTypeForCell(e,t){return"text"}}const Ot=St;function oe(o,e,t){return e=Ct(e),e in o?Object.defineProperty(o,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):o[e]=t,o}function Ct(o){var e=bt(o,"string");return typeof e=="symbol"?e:String(e)}function bt(o,e){if(typeof o!="object"||o===null)return o;var t=o[Symbol.toPrimitive];if(t!==void 0){var r=t.call(o,e||"default");if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(o)}var z=[],At=new Set;class Ce extends Ot{constructor(e){super(),oe(this,"dh",void 0),oe(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 groupedColumns(){return z}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 z}get initialMovedRows(){return z}get initialColumnHeaderGroups(){return z}get layoutHints(){return null}get frontColumns(){return z}get backColumns(){return z}get keyColumnSet(){return At}get frozenColumns(){return z}isColumnFrozen(e){return!1}isColumnSortable(e){return!1}get isFilterRequired(){return!1}get isReversible(){return!0}get isColumnStatisticsAvailable(){return!1}get description(){return""}get isCustomColumnsAvailable(){return!1}get isFormatColumnsAvailable(){return!1}get isExportAvailable(){return!1}get isValuesTableAvailable(){return!1}get isChartBuilderAvailable(){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.")}}oe(Ce,"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"}));const jt=Ce;export{Ht as C,m as G,kt as I,Mt as L,Dt as S,we as X,xt as a,Ft as b,Lt as c,jt as d,Ot as e,T as f,_t as g,ge as h,ut as i,ae as j,Et as m,ke as u};
2
- //# sourceMappingURL=IrisGridModel-b7a106cf.js.map
1
+ import{V as Ee,bo as Ae,J as H,M as Ie,N as ie,r as B,bl as Re,aq as Z,bu as Pe,a1 as Ne,H as De}from"./vendor-808b021e.js";import{x as xe,br as Le,J as ye,L as Me,e as q,b9 as K}from"./index-ca124227.js";import{aU as Fe,a6 as He,c as te,ag as $}from"./ControlType-aad93e22.js";import{_ as Te}from"./monaco-9ad65137.js";var le=Ee.forwardRef((o,e)=>{var{children:t,className:r,disabled:n,id:a,isLinked:i,isLinkedSource:l,isInvalid:s,onClick:u,onMouseEnter:f,onMouseLeave:c,style:d,"data-testid":h}=o,{UNSAFE_className:g}=Ae({},"button");return H.jsxs("button",{ref:e,type:"button",className:Ie("btn-socketed",{"btn-socketed-linked":i!==void 0&&i||l},{"btn-socketed-linked-source":l},{"is-invalid":s},r,g),id:a,onClick:u,onMouseEnter:f,onMouseLeave:c,style:d,disabled:n,"data-testid":h,children:[t,H.jsx(ie,{icon:xe,className:"linked btn-socketed-icon",transform:"down-1"}),H.jsx(ie,{icon:Le,className:"is-invalid btn-socketed-icon"})]})});le.displayName="SocketedButton";le.defaultProps={children:void 0,className:"",disabled:!1,id:void 0,isLinked:!1,isLinkedSource:!1,isInvalid:!1,onClick:void 0,onMouseEnter:void 0,onMouseLeave:void 0,style:void 0,"data-testid":void 0};const Dt=le;var we=Ee.createContext(new Map),xt=we.Provider;function ke(o){var e,t=B.useContext(we);return(e=t.get(o))!==null&&e!==void 0?e:o.Original}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 re(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){_e(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 _e(o,e,t){return e=je(e),e in o?Object.defineProperty(o,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):o[e]=t,o}function je(o){var e=We(o,"string");return typeof e=="symbol"?e:String(e)}function We(o,e){if(typeof o!="object"||o===null)return o;var t=o[Symbol.toPrimitive];if(t!==void 0){var r=t.call(o,e||"default");if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(o)}function Lt(o){var e,t;function r(n,a){var i=ke(t);return Fe(o)?H.jsx(i,re(re({},n),{},{ref:a})):H.jsx(i,re({},n))}return r.displayName="XComponent(".concat((e=o.displayName)!==null&&e!==void 0?e:o.name,")"),t=B.forwardRef(r),t.Original=o,t.isXComponent=!0,t}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 $e(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){Xe(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 Xe(o,e,t){return e=ze(e),e in o?Object.defineProperty(o,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):o[e]=t,o}function ze(o){var e=Be(o,"string");return typeof e=="symbol"?e:String(e)}function Be(o,e){if(typeof o!="object"||o===null)return o;var t=o[Symbol.toPrimitive];if(t!==void 0){var r=t.call(o,e||"default");if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(o)}var Ve=B.lazy(()=>Te(()=>import("./Chart-982c1e4c.js"),["./Chart-982c1e4c.js","./vendor-808b021e.js","./helpers-de833af9.js","./vendor-ade0ce05.css","./index-ca124227.js","./monaco-9ad65137.js","./monaco-0e9455f6.css","./index-f1c315fa.css","./Plotly-4140f65b.js","./plotly-4c21198a.js","./ControlType-aad93e22.js","./ControlType-382d925e.css","./DownsamplingError-8e6bdb73.js","./useMergeRef-9935f949.js","./FormatterUtils-b084c90b.js","./Chart-b5066b0e.css"],import.meta.url));function Mt(o){return H.jsx(B.Suspense,{fallback:H.jsx(ye,{}),children:H.jsx(Ve,$e({},o))})}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 G(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){L(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 L(o,e,t){return e=Ye(e),e in o?Object.defineProperty(o,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):o[e]=t,o}function Ye(o){var e=Ke(o,"string");return typeof e=="symbol"?e:String(e)}function Ke(o,e){if(typeof o!="object"||o===null)return o;var t=o[Symbol.toPrimitive];if(t!==void 0){var r=t.call(o,e||"default");if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(o)}var Q=Me.module("ChartUtils"),fe="io.deephaven.time.DateTime",Ze=36e5,qe=1e6;function Qe(o){return o.asDate!==void 0}function Je(o){return o.asNumber!==void 0}function de(o){return o.dhTimeZone!==void 0}function Ge(o){return o!=null&&o.range!=null&&(o.autorange===!1||o.autorange===void 0)}function Ue(){var o=document.createElement("canvas"),e=o.getContext("webgl")||o.getContext("experimental-webgl");return e!=null&&e instanceof WebGLRenderingContext}var et=Ue();class v{static getPlotlyErrorBars(e,t,r){var n=r.map((i,l)=>i-e[l]),a=t.map((i,l)=>e[l]-i);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*)(%?)(.*)/);q(a);var[,i,l,s,,u,f,c,d,h]=a,g=s.replace(",","").length,y=l.indexOf(",")>=0||s.indexOf(",")>=0,p=y?",":"",E=c!=null&&c!==""?"e":"f",C=d!==""?d:E,w=u.length+f.length,O="",S="0".concat(g).concat(p,".").concat(w).concat(O).concat(C),A=v.convertNumberPrefix(i),N=v.convertNumberPrefix(h);return{tickformat:S,tickprefix:A,ticksuffix:N,automargin:!0}}static addTickSpacing(e,t,r){var{gapBetweenMajorTicks:n}=t;if(n!=null&&n>0){var a=e||{},i=n;return r&&(i=n/qe),t.log&&(i=Math.log(i)),a.tickmode="linear",a.dtick=i,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 i=n.sources[a];if(i.axis===t)return i}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]:v.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=v.getAllAxes(e);return v.groupArray(t,"type")}static getChartForSeries(e,t){for(var{charts:r}=e,n=0;n<r.length;n+=1)for(var a=r[n],i=0;i<a.series.length;i+=1)if(t===a.series[i])return a;return null}static getLayoutRanges(e){for(var t={},r=Object.keys(e).filter(l=>l.indexOf("axis")>=0),n=0;n<r.length;n+=1){var a=r[n],i=e[a];Ge(i)&&(t[a]=[...i.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 groupArray(e,t){return e.reduce((r,n)=>{var a,i=n[t],l=(a=r.get(i))!==null&&a!==void 0?a:[];return l.push(n),r.set(i,l),r},new Map)}static normalizeColorway(e){if(e!=null){if(Array.isArray(e))return e;if(typeof e=="string")return e.split(" ");Q.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}constructor(e){L(this,"dh",void 0),L(this,"daysOfWeek",void 0),this.dh=e,this.daysOfWeek=Object.freeze(e.calendar.DayOfWeek.values()),He(this)}getAxisFormats(e,t){for(var r=this,n=new Map,a={tickformat:null,ticksuffix:null},i=v.getAllAxes(e),l=v.groupArray(i,"type"),{charts:s}=e,u=0;u<s.length;u+=1)for(var f=s[u],c=0;c<f.series.length;c+=1)for(var d=f.series[c],{sources:h}=d,g=h.filter(C=>C.axis),y=function(){var w=g[p],{axis:O}=w,{type:S}=O,A=l.get(S);q(A);var N=A.indexOf(O),P=r.getAxisPropertyName(S);if(P!=null){var R=v.getAxisLayoutProperty(P,N);if(n.has(R))Q.debug("".concat(R," already added."));else{Q.debug("Adding ".concat(R," to axisFormats."));var F=r.getPlotlyAxisFormat(w,t);if(F===null)n.set(R,a);else{n.set(R,F);var{businessCalendar:I}=O;if(I!=null){var b=[],{businessPeriods:D,businessDays:_,holidays:k,timeZone:j}=I,V=t==null?void 0:t.getColumnTypeFormatter(fe),W;de(V)&&(W=V.dhTimeZone);var X=W?(j.standardOffset-W.standardOffset)/60:0;k.length>0&&b.push(...r.createRangeBreakValuesFromHolidays(k,j,W)),D.forEach(Y=>b.push({pattern:"hour",bounds:[v.periodToDecimal(Y.close)+X,v.periodToDecimal(Y.open)+X]})),_.length<r.daysOfWeek.length&&r.createBoundsFromDays(_).forEach(Y=>b.push({pattern:"day of week",bounds:Y})),F.rangebreaks=b}if(n.size===f.axes.length)return{v:n}}}}},p=0;p<g.length;p+=1){var E=y();if(typeof E=="object")return E.v}return n}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&&et&&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(v.MODE_LINES),(r??!0)&&a.add(v.MODE_MARKERS);break;case n.plot.SeriesPlotStyle.LINE:(t??!0)&&a.add(v.MODE_LINES),(r??!1)&&a.add(v.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,r,{dh:n}=this,{sources:a}=e;return a.length===2&&((t=a[0])===null||t===void 0||(r=t.axis)===null||r===void 0?void 0:r.type)===n.plot.AxisType.Y?v.ORIENTATION.HORIZONTAL:v.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:i,isLinesVisible:l,isShapesVisible:s,plotStyle:u,lineColor:f,shapeColor:c,sources:d,shape:h,shapeSize:g}=e,y=d.some(O=>{var S;return(S=O.axis)===null||S===void 0?void 0:S.businessCalendar}),p=this.getChartType(u,y,a),E=this.getPlotlyChartMode(u,l??void 0,s??void 0),C=this.getPlotlySeriesOrientation(e),w=v.makeSeriesData(p,E,i,n,C);return this.addSourcesToSeriesData(w,u,d,t),this.addStylingToSeriesData(w,u,f,c,h,g,r),w}addSourcesToSeriesData(e,t,r,n){for(var a=e,i=0;i<r.length;i+=1){var l=r[i],{axis:s,type:u}=l,f=this.getPlotlyProperty(t,u);Re(a,f,[]);var c=s!=null?this.getAxisPropertyName(s.type):null;if(c!=null){var d=n.get(s.type);if(d){var h=d.indexOf(s),g=h>0?"".concat(h+1):"";a["".concat(c,"axis")]="".concat(c).concat(g)}}}}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,i=arguments.length>5&&arguments[5]!==void 0?arguments[5]:null,l=arguments.length>6&&arguments[6]!==void 0?arguments[6]:null,{dh:s}=this,u=e;if(u.marker={line:{}},u.line={width:1},t===s.plot.SeriesPlotStyle.AREA?u.fill="tozeroy":t===s.plot.SeriesPlotStyle.STACKED_AREA?u.stackgroup="stack":t===s.plot.SeriesPlotStyle.STEP?u.line.shape="hv":t===s.plot.SeriesPlotStyle.HISTOGRAM?u.width=[]:t===s.plot.SeriesPlotStyle.PIE?u.textinfo="label+percent":t===s.plot.SeriesPlotStyle.TREEMAP&&(u.hoverinfo="text",u.textinfo="label+text",u.tiling={packing:"squarify",pad:0},u.textposition="middle center"),r!=null&&(t===s.plot.SeriesPlotStyle.BAR?u.marker.color=r:u.line.color=r),n!=null&&(u.marker.color=n),a!=null&&a.length>0)try{u.marker.symbol=v.getMarkerSymbol(a)}catch(f){Q.warn("Unable to handle shape",a,":",f)}i!=null&&(u.marker.size=i*v.DEFAULT_MARKER_SIZE),l!=null&&t!==s.plot.SeriesPlotStyle.PIE&&(u.visible=l)}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,i=e,l=v.getAllAxes(t),s=0;s<t.charts.length;s+=1){var u=t.charts[s],f=r==null?void 0:r(u),c=this.getChartBounds(t,u,n,a);this.updateLayoutAxes(i,u.axes,l,n,a,c,f)}this.removeStaleAxes(i,l)}getChartBounds(e,t,r,n){var a,{dh:i}=this,{cols:l,rows:s}=e,{column:u,colspan:f,row:c,rowspan:d}=t,h=u+f,g=c+d,y=1/l,p=1/s,E=v.AXIS_SIZE_PX/r,C=v.AXIS_SIZE_PX/n,w={bottom:(s-g)*p+(g<s?C/2:0),top:(s-c)*p-(c>0?C/2:0),left:u*y+(u>0?E/2:0),right:h*y-(h<l?E/2:0)},O=v.groupArray(t.axes,"position"),S=(a=O.get(i.plot.AxisPosition.RIGHT))!==null&&a!==void 0?a:[];return S.length>0&&(r>0?w.right-=(w.right-w.left)*Math.max(0,Math.min(v.LEGEND_WIDTH_PX/r,v.MAX_LEGEND_SIZE)):w.right-=(w.right-w.left)*v.DEFAULT_AXIS_SIZE),w}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",""),i,l=e==null?void 0:e.getColumnTypeFormatter(t);return l!=null&&de(l)&&l.dhTimeZone!=null&&l.showTimeZone&&(i=n.i18n.DateTimeFormat.format(" z",new Date,l.dhTimeZone)),{tickformat:a,ticksuffix:i,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:i}=n,l=null;return te.isDateType(a)?(l=this.getPlotlyDateFormat(t,a,i),l=v.addTickSpacing(l,n,!0)):te.isNumberType(a)&&(l=v.getPlotlyNumberFormat(t,a,i),l=v.addTickSpacing(l,n,!1)),n.formatType===r.plot.AxisFormatType.CATEGORY&&(l?l.type="category":l={type:"category",tickformat:void 0,ticksuffix:void 0}),l}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,i=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{left:0,top:0,right:1,bottom:1},l=arguments.length>6?arguments[6]:void 0,{dh:s}=this,u=n>0?Math.max(v.MIN_AXIS_SIZE,Math.min(v.AXIS_SIZE_PX/a,v.MAX_AXIS_SIZE)):v.DEFAULT_AXIS_SIZE,f=a>0?Math.max(v.MIN_AXIS_SIZE,Math.min(v.AXIS_SIZE_PX/n,v.MAX_AXIS_SIZE)):v.DEFAULT_AXIS_SIZE,c=e,d=v.groupArray(t,"position"),h=v.groupArray(t,"type"),g=[...h.keys()],y=v.groupArray(r,"type"),p=0;p<g.length;p+=1){var E=g[p],C=this.getAxisPropertyName(E);if(C!=null){var w=h.get(E),O=y.get(E),S=E===s.plot.AxisType.Y,A=S?a:n;q(w),q(O);for(var N=0;N<w.length;N+=1){var P=w[N],R=O.indexOf(P),F=v.getAxisLayoutProperty(C,R);c[F]==null&&(c[F]={});var I=c[F];if(I!=null){this.updateLayoutAxis(I,P,N,d,u,f,i);var{range:b,autorange:D}=I;if(l!=null&&b!==void 0&&(D===void 0||D===!1)){var _=l(P),[k,j]=_(b);Q.debug("Setting downsample range",A,k,j),P.range(A,k,j)}else P.range(A)}}}}}removeStaleAxes(e,t){for(var r=e,n=v.groupArray(t,"type"),a=[...n.keys()],i=0;i<a.length;i+=1){var l=a[i],s=n.get(l);q(s);var u=s.length,f=this.getAxisPropertyName(l);if(f!=null)for(var c=v.getAxisLayoutProperty(f,u);r[c]!=null;)delete r[c],u+=1,c=v.getAxisLayoutProperty(f,u)}}updateLayoutAxis(e,t,r,n,a,i,l){var s,{dh:u}=this,f=t.type===u.plot.AxisType.Y,c=f?i:a,d=e,h=(s=t.label)!==null&&s!==void 0?s:"";if(d.title!==void 0&&typeof d.title!="string"?d.title.text=h:d.title={text:h},t.log&&(d.type="log"),d.side=this.getAxisSide(t.position),r>0){var g,y;d.overlaying=(g=this.getAxisPropertyName(t.type))!==null&&g!==void 0?g:void 0;var p=(y=n.get(t.position))!==null&&y!==void 0?y:[],E=p.indexOf(t);E>0&&(d.anchor="free",t.position===u.plot.AxisPosition.RIGHT?d.position=l.right+(E-p.length+1)*c:t.position===u.plot.AxisPosition.TOP?d.position=l.top+(E-p.length+1)*c:t.position===u.plot.AxisPosition.BOTTOM?d.position=l.bottom+(p.length-E+1)*c:t.position===u.plot.AxisPosition.LEFT&&(d.position=l.left+(p.length-E+1)*c))}else if(t.type===u.plot.AxisType.X){var C=n.get(u.plot.AxisPosition.LEFT)||[],w=n.get(u.plot.AxisPosition.RIGHT)||[],O=Math.max(l.left,l.left+(C.length-1)*i),S=Math.min(l.right-(w.length-1)*i,l.right);d.domain=[O,S]}else if(t.type===u.plot.AxisType.Y){var A=n.get(u.plot.AxisPosition.BOTTOM)||[],N=n.get(u.plot.AxisPosition.TOP)||[],P=Math.max(l.bottom,l.bottom+(A.length-1)*a),R=Math.min(l.top-(N.length-1)*a,l.top);d.domain=[P,R]}}createBoundsFromDays(e){var t=e.map(i=>this.daysOfWeek.indexOf(i)),r=this.daysOfWeek.filter(i=>!e.includes(i)).map(i=>this.daysOfWeek.indexOf(i)),n=new Set;r.forEach(i=>{for(var l=i+1;l<i+this.daysOfWeek.length;l+=1){var s=l%this.daysOfWeek.length;if(t.includes(s)){n.add(s);break}}});var a=[];return n.forEach(i=>{for(var l=i-1;l>i-this.daysOfWeek.length;l-=1){var s=l<0?l+this.daysOfWeek.length:l;if(t.includes(s)){var u=(s+1)%7;a.push([u,i]);break}}}),a}createRangeBreakValuesFromHolidays(e,t,r){var n=[],a=[];return e.forEach(i=>{i.businessPeriods.length>0?a.push(...this.createPartialHoliday(i,t,r)):n.push(this.createFullHoliday(i,t,r))}),[{values:n},...a]}createFullHoliday(e,t,r){return this.adjustDateForTimeZone("".concat(e.date.toString()," 00:00:00.000000"),t,r)}createPartialHoliday(e,t,r){var n=e.date.toString(),a=["00:00"];e.businessPeriods.forEach(d=>{a.push(d.open),a.push(d.close)}),a.push("24:00");for(var i=[],l=0;l<a.length;l+=2){var s=a[l],u=a[l+1];if(s!==u){var f=[this.adjustDateForTimeZone("".concat(n," ").concat(s,":00.000000"),t,r)],c=Ze*(v.periodToDecimal(u)-v.periodToDecimal(s));i.push({values:f,dvalue:c})}}return i}adjustDateForTimeZone(e,t,r){return r&&r.standardOffset!==t.standardOffset?this.unwrapValue(this.wrapValue(e,fe,t),r):e}makeFigureSettings(e,t){var{dh:r}=this,{series:n,xAxis:a,type:i}=e,l=v.titleFromSettings(e),s={formatType:"".concat(r.plot.AxisFormatType.NUMBER),type:"".concat(r.plot.AxisType.X),position:"".concat(r.plot.AxisPosition.BOTTOM)},u={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:[s,u],series:(n??[]).map(f=>({plotStyle:"".concat(i),name:f,dataSources:[{type:"".concat(r.plot.SourceType.X),columnName:a??"",axis:s,table:t},{type:"".concat(r.plot.SourceType.Y),columnName:f,axis:u,table:t}]}))}],title:l}}unwrapValue(e,t){var{dh:r}=this;if(e!=null){if(Qe(e))return r.i18n.DateTimeFormat.format(v.DATE_FORMAT,e,t);if(Je(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(te.isDateType(t)&&typeof e=="string"){var a=e,i=v.DATE_FORMAT.substr(0,e.length),l=n.i18n.DateTimeFormat.parse(i,a);if(!r)return l;var s="".concat(i," Z"),u=n.i18n.DateTimeFormat.format("Z",l,r),f=n.i18n.DateTimeFormat.parse(s,"".concat(a," ").concat(u)),c=n.i18n.DateTimeFormat.format("Z",f,r);return n.i18n.DateTimeFormat.parse(s,"".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}=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}}]},layout:this.makeDefaultLayout(e)}}makeDefaultLayout(e){var{dh:t}=this,{paper_bgcolor:r,plot_bgcolor:n,title_color:a,coastline_color:i,land_color:l,ocean_color:s,lake_color:u,river_color:f}=e,c={paper_bgcolor:r,plot_bgcolor:n,autosize:!0,colorway:v.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:G({},v.DEFAULT_TITLE_PADDING),y:1},legend:{font:{color:a}},margin:G({},v.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:i,landcolor:l,oceancolor:s,lakecolor:u,rivercolor:f}};return c.datarevision=0,c}hydrateSettings(e){var{dh:t}=this;return G(G({},e),{},{type:e.type!=null?t.plot.SeriesPlotStyle[e.type]:void 0})}}L(v,"DEFAULT_AXIS_SIZE",.15);L(v,"MIN_AXIS_SIZE",.025);L(v,"MAX_AXIS_SIZE",.2);L(v,"AXIS_SIZE_PX",75);L(v,"LEGEND_WIDTH_PX",50);L(v,"MAX_LEGEND_SIZE",.25);L(v,"ORIENTATION",Object.freeze({HORIZONTAL:"h",VERTICAL:"v"}));L(v,"DATE_FORMAT","yyyy-MM-dd HH:mm:ss.SSSSSS");L(v,"DEFAULT_MARGIN",Object.freeze({l:60,r:50,t:30,b:60,pad:0}));L(v,"DEFAULT_TITLE_PADDING",Object.freeze({t:8}));L(v,"SUBTITLE_LINE_HEIGHT",25);L(v,"DEFAULT_MARKER_SIZE",6);L(v,"MODE_MARKERS","markers");L(v,"MODE_LINES","lines");const Ft=v;function M(o,e,t){return e=tt(e),e in o?Object.defineProperty(o,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):o[e]=t,o}function tt(o){var e=rt(o,"string");return typeof e=="symbol"?e:String(e)}function rt(o,e){if(typeof o!="object"||o===null)return o;var t=o[Symbol.toPrimitive];if(t!==void 0){var r=t.call(o,e||"default");if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(o)}class x{constructor(e){M(this,"dh",void 0),M(this,"listeners",void 0),M(this,"formatter",void 0),M(this,"renderOptions",void 0),M(this,"rect",void 0),M(this,"isDownsamplingDisabled",void 0),M(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(x.EVENT_UPDATED,{detail:e}))}fireDisconnect(){this.fireEvent(new CustomEvent(x.EVENT_DISCONNECT))}fireReconnect(){this.fireEvent(new CustomEvent(x.EVENT_RECONNECT))}fireDownsampleStart(e){this.fireEvent(new CustomEvent(x.EVENT_DOWNSAMPLESTARTED,{detail:e}))}fireDownsampleFinish(e){this.fireEvent(new CustomEvent(x.EVENT_DOWNSAMPLEFINISHED,{detail:e}))}fireDownsampleFail(e){this.fireEvent(new CustomEvent(x.EVENT_DOWNSAMPLEFAILED,{detail:e}))}fireDownsampleNeeded(e){this.fireEvent(new CustomEvent(x.EVENT_DOWNSAMPLENEEDED,{detail:e}))}fireLoadFinished(){this.fireEvent(new CustomEvent(x.EVENT_LOADFINISHED))}fireError(e){this.fireEvent(new CustomEvent(x.EVENT_ERROR,{detail:e}))}}M(x,"EVENT_UPDATED","ChartModel.EVENT_UPDATED");M(x,"EVENT_DISCONNECT","ChartModel.EVENT_DISCONNECT");M(x,"EVENT_RECONNECT","ChartModel.EVENT_RECONNECT");M(x,"EVENT_DOWNSAMPLESTARTED","ChartModel.EVENT_DOWNSAMPLESTARTED");M(x,"EVENT_DOWNSAMPLEFINISHED","ChartModel.EVENT_DOWNSAMPLEFINISHED");M(x,"EVENT_DOWNSAMPLEFAILED","ChartModel.EVENT_DOWNSAMPLEFAILED");M(x,"EVENT_DOWNSAMPLENEEDED","ChartModel.EVENT_DOWNSAMPLENEEDED");M(x,"EVENT_LOADFINISHED","ChartModel.EVENT_LOADFINISHED");M(x,"EVENT_ERROR","ChartModel.EVENT_ERROR");const Ht=x;function ve(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 nt(o){for(var e=1;e<arguments.length;e++){var t=arguments[e]!=null?arguments[e]:{};e%2?ve(Object(t),!0).forEach(function(r){at(o,r,t[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(o,Object.getOwnPropertyDescriptors(t)):ve(Object(t)).forEach(function(r){Object.defineProperty(o,r,Object.getOwnPropertyDescriptor(t,r))})}return o}function at(o,e,t){return e=ot(e),e in o?Object.defineProperty(o,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):o[e]=t,o}function ot(o){var e=lt(o,"string");return typeof e=="symbol"?e:String(e)}function lt(o,e){if(typeof o!="object"||o===null)return o;var t=o[Symbol.toPrimitive];if(t!==void 0){var r=t.call(o,e||"default");if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(o)}var it=B.lazy(()=>Te(()=>import("./IrisGrid-e1d10a87.js"),["./IrisGrid-e1d10a87.js","./vendor-808b021e.js","./helpers-de833af9.js","./vendor-ade0ce05.css","./index-ca124227.js","./monaco-9ad65137.js","./monaco-0e9455f6.css","./index-f1c315fa.css","./ControlType-aad93e22.js","./ControlType-382d925e.css","./MissingPartitionError-c813b4be.js","./FormatterUtils-b084c90b.js","./IrisGridThemeProvider-5b0ef26e.js","./IrisGridShortcuts-f6cc6409.js","./IrisGridShortcuts-7cf07b0f.css","./TokenBoxCellRenderer-5e9a3b7e.js","./useMergeRef-9935f949.js","./TokenBoxCellRenderer-d8e9a802.css","./IrisGridThemeProvider-b29d55e2.css","./Grid-f2f3fbeb.js","./Grid-6b71b6c4.css","./IrisGrid-aa2d04f6.css"],import.meta.url)),Se=B.forwardRef((o,e)=>H.jsx(B.Suspense,{fallback:H.jsx(ye,{}),children:H.jsx(it,nt({ref:e},o))}));Se.displayName="LazyIrisGrid";const kt=Se;function ut(o){return(o==null?void 0:o.hasExpandableRows)!==void 0}function J(o,e,t){return e=st(e),e in o?Object.defineProperty(o,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):o[e]=t,o}function st(o){var e=ct(o,"string");return typeof e=="symbol"?e:String(e)}function ct(o,e){if(typeof o!="object"||o===null)return o;var t=o[Symbol.toPrimitive];if(t!==void 0){var r=t.call(o,e||"default");if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(o)}var ae;(function(o){o.DOWN="DOWN",o.UP="UP",o.LEFT="LEFT",o.RIGHT="RIGHT"})(ae||(ae={}));class m{static normalize(e,t,r,n){var a=e,i=t,l=r,s=n;return a!=null&&l!=null&&l<a&&(a=l,l=e),i!=null&&s!=null&&s<i&&(i=s,s=t),[a,i,l,s]}static makeNormalized(e,t,r,n){return new m(...m.normalize(e,t,r,n))}static makeCell(e,t){return new m(e,t,e,t)}static makeColumn(e){return new m(e,null,e,null)}static makeRow(e){return new m(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],i=t.length-1;i>n;i-=1){var l=t[i];if(a.contains(l))t.splice(i,1);else if(l.contains(a)){r=!0,t[n]=l,t.splice(i,1);break}else if(a.startRow===l.startRow&&a.endRow===l.endRow){if(a.touches(l)){var{startRow:s,endRow:u}=a,f=m.minOrNull(a.startColumn,l.startColumn),c=m.maxOrNull(a.endColumn,l.endColumn);r=!0,t[n]=new m(f,s,c,u),t.splice(i,1);break}}else if(a.startColumn===l.startColumn&&a.endColumn===l.endColumn&&a.touches(l)){var{startColumn:d,endColumn:h}=a,g=m.minOrNull(a.startRow,l.startRow),y=m.maxOrNull(a.endRow,l.endRow);r=!0,t[n]=new m(d,g,h,y),t.splice(i,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){var r,n,a,i,l,s;if(e.equals(t))return e;var{startColumn:u,startRow:f,endColumn:c,endRow:d}=e;return u=u!=null&&t.startColumn!=null?Math.max(u,t.startColumn):(r=u)!==null&&r!==void 0?r:t.startColumn,c=c!=null&&t.endColumn!=null?Math.min(c,t.endColumn):(n=c)!==null&&n!==void 0?n:t.endColumn,f=f!=null&&t.startRow!=null?Math.max(f,t.startRow):(a=f)!==null&&a!==void 0?a:t.startRow,d=d!=null&&t.endRow!=null?Math.min(d,t.endRow):(i=d)!==null&&i!==void 0?i:t.endRow,u!=null&&u>((l=c)!==null&&l!==void 0?l:-1)||f!=null&&f>((s=d)!==null&&s!==void 0?s:-1)?null:new m(u,f,c,d)}static subtractFromRange(e,t){var r=[],n=m.intersection(e,t);return n==null?[e]:(n.startRow!=null&&(e.startRow==null||e.startRow<n.startRow)&&r.push(new m(e.startColumn,e.startRow,e.endColumn,n.startRow-1)),n.startColumn!=null&&(e.startColumn==null||e.startColumn<n.startColumn)&&r.push(new m(e.startColumn,n.startRow,n.startColumn-1,n.endRow)),n.endColumn!=null&&(e.endColumn==null||e.endColumn>n.endColumn)&&r.push(new m(n.endColumn+1,n.startRow,e.endColumn,n.endRow)),n.endRow!=null&&(e.endRow==null||e.endRow>n.endRow)&&r.push(new m(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(...m.subtractFromRange(e[n],t));return r}static subtractRangesFromRanges(e,t){for(var r=[...e],n=0;n<t.length;n+=1)r=m.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,i,l;return m.isBounded(e)?e:new m((n=e.startColumn)!==null&&n!==void 0?n:0,(a=e.startRow)!==null&&a!==void 0?a:0,(i=e.endColumn)!==null&&i!==void 0?i:t-1,(l=e.endRow)!==null&&l!==void 0?l:r-1)}static boundedRanges(e,t,r){return e.map(n=>m.boundedRange(n,t,r))}static offset(e,t,r){return new m(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]:m.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 i=e[a],l=i.nextCell(t,r,n);if(l!=null)return l}switch(n){case m.SELECTION_DIRECTION.DOWN:case m.SELECTION_DIRECTION.RIGHT:{var s=a<e.length-1?a+1:0,u=e[s];return u.startCell(n)}case m.SELECTION_DIRECTION.LEFT:case m.SELECTION_DIRECTION.UP:{var f=a>0?a-1:e.length-1,c=e[f];return c.startCell(n)}default:throw new Error("Invalid direction: ".concat(n))}}static cellCount(e){return e.reduce((t,r)=>{var n,a,i,l;return t+(((n=r.endRow)!==null&&n!==void 0?n:NaN)-((a=r.startRow)!==null&&a!==void 0?a:NaN)+1)*(((i=r.endColumn)!==null&&i!==void 0?i:NaN)-((l=r.startColumn)!==null&&l!==void 0?l: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]:m.SELECTION_DIRECTION.RIGHT,n=0;n<e.length;n+=1)e[n].forEach(t,r)}constructor(e,t,r,n){J(this,"startColumn",void 0),J(this,"startRow",void 0),J(this,"endColumn",void 0),J(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 m.isAxisRangeTouching(this.startRow,this.endRow,e.startRow,e.endRow)&&m.isAxisRangeTouching(this.startColumn,this.endColumn,e.startColumn,e.endColumn)}subtract(e){return m.subtractFromRange(this,e)}startCell(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:m.SELECTION_DIRECTION.DOWN;if(!m.isBounded(this))throw new Error("Cannot get the startCell of an unbounded range");switch(e){case m.SELECTION_DIRECTION.DOWN:case m.SELECTION_DIRECTION.RIGHT:return{column:this.startColumn,row:this.startRow};case m.SELECTION_DIRECTION.LEFT:case m.SELECTION_DIRECTION.UP:return{column:this.endColumn,row:this.endRow};default:throw new Error("Invalid direction: ".concat(e))}}nextCell(e,t,r){if(!m.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:i,endRow:l}=this;switch(r){case m.SELECTION_DIRECTION.DOWN:if(t<l)return{column:e,row:Math.max(t+1,i)};if(e<a)return{column:Math.max(e+1,n),row:i};break;case m.SELECTION_DIRECTION.UP:if(t>i)return{column:e,row:Math.min(t-1,l)};if(e>n)return{column:Math.min(e-1,a),row:l};break;case m.SELECTION_DIRECTION.RIGHT:if(e<a)return{column:Math.max(e+1,n),row:t};if(t<l)return{column:n,row:Math.max(t+1,i)};break;case m.SELECTION_DIRECTION.LEFT:if(e>n)return{column:Math.min(e-1,a),row:t};if(t>i)return{column:a,row:Math.min(t-1,l)};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]:m.SELECTION_DIRECTION.RIGHT,r=0,{column:n,row:a}=this.startCell(t);n!=null&&a!=null;){var i;e(n,a,r),r+=1,{column:n,row:a}=(i=this.nextCell(n,a,t))!==null&&i!==void 0?i:{}}}}J(m,"SELECTION_DIRECTION",ae);function ft(o){return Array.isArray(o)&&o.length===2&&(o[0]===null||typeof o[0]=="number")&&(o[1]===null||typeof o[1]=="number")}function U(o){return ft(o)&&o[0]!=null&&o[1]!=null}function me(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 ee(o){for(var e=1;e<arguments.length;e++){var t=arguments[e]!=null?arguments[e]:{};e%2?me(Object(t),!0).forEach(function(r){Oe(o,r,t[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(o,Object.getOwnPropertyDescriptors(t)):me(Object(t)).forEach(function(r){Object.defineProperty(o,r,Object.getOwnPropertyDescriptor(t,r))})}return o}function Oe(o,e,t){return e=dt(e),e in o?Object.defineProperty(o,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):o[e]=t,o}function dt(o){var e=vt(o,"string");return typeof e=="symbol"?e:String(e)}function vt(o,e){if(typeof o!="object"||o===null)return o;var t=o[Symbol.toPrimitive];if(t!==void 0){var r=t.call(o,e||"default");if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(o)}function _t(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),i=T.getColumnHeaderDepthAtY(t,r);return{x:e,y:t,row:a,column:n,columnHeaderDepth:i}}static getCellInfoFromXY(e,t,r){var{row:n,column:a}=T.getGridPointFromXY(e,t,r),{allColumnWidths:i,allRowHeights:l,allColumnXs:s,allRowYs:u,modelColumns:f,modelRows:c}=r,d=n!==null?c.get(n):null,h=a!==null?f.get(a):null,g=a!==null?s.get(a):null,y=n!==null?u.get(n):null,p=a!==null?i.get(a):null,E=n!==null?l.get(n):null;return{row:n,column:a,modelRow:d??null,modelColumn:h??null,left:g??null,top:y??null,columnWidth:p??null,rowHeight:E??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,i){var l=Math.max(e,r),s=Math.min(t,a-n-1),u=T.iterateFloating(r,n,a,i);if(u!==void 0)return u;for(var f=l;f<=s;f+=1)if(u=i(f),u!==void 0)return u}static isInItem(e,t,r,n){var a,i,l=(a=t.get(e))!==null&&a!==void 0?a:0,s=(i=r.get(e))!==null&&i!==void 0?i:0;return l<=n&&n<=l+s}static getItemAtOffset(e,t,r,n,a,i,l){var s=arguments.length>7&&arguments[7]!==void 0?arguments[7]:!1,u=s?void 0:T.iterateFloating(r,n,t,d=>{if(T.isInItem(d,i,l,e))return d});if(!s&&u!==void 0)return u;for(var f=0;f<a.length;f+=1){var c=a[f];if(T.isInItem(c,i,l,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:i,visibleColumns:l,allColumnXs:s,allColumnWidths:u,gridX:f}=t;return e<f?null:this.getItemAtOffset(e-f,n,a,i,l,s,u,r)}static getRowAtY(e,t){var{floatingTopRowCount:r,floatingBottomRowCount:n,rowCount:a,visibleRows:i,allRowYs:l,allRowHeights:s,gridY:u}=t;return e<u?null:this.getItemAtOffset(e-u,a,r,n,i,l,s)}static getNextShownItem(e,t,r,n){var a=r.findIndex(s=>s===e)||0;for(a-=1;a!=null&&a>=0;){var i=r[a],l=t.get(i);if(l!=null&&n.get(l)!==0)return i;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:i,floatingColumns:l,floatingLeftWidth:s,visibleColumns:u,allColumnXs:f,allColumnWidths:c,columnHeaderMaxDepth:d}=r,{allowColumnResize:h,headerSeparatorHandleSize:g}=n;if(d*i<t||!h||g<=0)return null;for(var y=e-a,p=g*.5,E=!1,C=l.length-1;C>=0;C-=1){var w,O,S=l[C],A=(w=f.get(S))!==null&&w!==void 0?w:0,N=(O=c.get(S))!==null&&O!==void 0?O:0,P=N===0;if(!E||!P){var R=A+N;P?R+=p:E&&(R-=p);var F=R-p,I=R+p;if(F<=y&&y<=I)return S;E=P}}E=!1;for(var b=u.length-1;b>=0;b-=1){var D,_,k=u[b],j=(D=f.get(k))!==null&&D!==void 0?D:0,V=(_=c.get(k))!==null&&_!==void 0?_:0,W=V===0;if(j<s-V)return null;if(!E||!W){var X=j+V;W?X+=p:E&&(X-=p);var Y=X-p,be=X+p;if(Y<=y&&y<=be)return k;E=W}}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(s=>s===e),i=a-1;i>=0;i-=1){var l=r[i];if(!T.isItemHidden(l,t))break;n.push(l)}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:i,visibleRows:l,allRowYs:s,allRowHeights:u}=r,{allowRowResize:f,headerSeparatorHandleSize:c}=n;if(a<e||!f||c<=0)return null;for(var d=t-i,h=c*.5,g=!1,y=l.length-1;y>=0;y-=1){var p,E,C=l[y],w=(p=s.get(C))!==null&&p!==void 0?p:0,O=(E=u.get(C))!==null&&E!==void 0?E:0,S=O===0;if(!g||!S){var A=w+O;S?A+=h:g&&(A-=h);var N=A-h,P=A+h;if(N<=d&&d<=P)return C;g=S}}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&&!U(a.from)&&a.to===e?a.from===t?n.pop():n[n.length-1]=ee(ee({},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 i=[...r],l=i[i.length-1];l!=null&&U(l.from)&&l.from[1]-l.from[0]===e[1]-e[0]&&l.to===e[0]?i[i.length-1]=ee(ee({},l),{},{to:a}):i.push({from:e,to:a});var s=i[i.length-1];return U(s.from)&&s.from[0]===s.to&&i.pop(),i}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]],i=function(){var{from:u,to:f}=r[l],c=1,d;U(u)?(c=u[1]-u[0]+1,[d]=u):d=u;for(var h=n?f:d,g=h+c-1,y=n?d:f,p=y-h,E=[],C=function(){var S,A,N=(S=a[w][0])!==null&&S!==void 0?S:Number.NEGATIVE_INFINITY,P=(A=a[w][1])!==null&&A!==void 0?A:Number.POSITIVE_INFINITY,R,F=[[N,h-1],[h,g],[g+1,P]].map(I=>{var[b,D]=I;return[Math.max(b,N),Math.min(D,P)]}).filter(I=>{var[b,D]=I;return b<=D}).map(I=>{var[b,D]=I;return h<=b&&g>=D?(R=[b+p,D+p],R):g<b?[b-c,D-c]:I}).map(I=>{var[b,D]=I;return y>b&&y<=D?[[b,y-1],[y+c,D+c]]:I===R?[I]:y<=b?[[b+c,D+c]]:[I]}).flat();E.push(...F)},w=0;w<a.length;w+=1)C();a=E.map(O=>{var[S,A]=O;return[Number.isFinite(S)?S:null,Number.isFinite(A)?A:null]})},l=n?r.length-1:0;n?l>=0:l<r.length;n?l-=1:l+=1)i();return a}static translateRange(e,t,r,n){for(var a=T.applyItemMoves(e.startColumn,e.endColumn,t,n),i=T.applyItemMoves(e.startRow,e.endRow,r,n),l=[],s=0;s<a.length;s+=1)for(var u=a[s],f=0;f<i.length;f+=1){var c=i[f];l.push(new m(u[0],c[0],u[1],c[1]))}return l}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]:$,r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:$;return T.translateRange(e,t,r,!0)}static getModelRanges(e){for(var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:$,r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:$,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]:$,r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:$;return this.translateRange(e,t,r,!1)}static getVisibleRanges(e){for(var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:$,r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:$,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:i,height:l,floatingTopRowCount:s,floatingBottomRowCount:u,floatingLeftColumnCount:f,floatingRightColumnCount:c,floatingLeftWidth:d,floatingRightWidth:h,floatingTopHeight:g,floatingBottomHeight:y,columnCount:p,rowCount:E}=e,C=n,w=a,O=i,S=l;return r!=null&&(r>f&&(C+=d),r<p-c&&(O-=h)),t!=null&&(t>s&&(w+=g),t<E-u&&(S-=y)),{x1:C,y1:w,x2:O,y2:S}}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:i,deltaY:l}=e;return!T.isMacPlatform()&&e.shiftKey&&e.deltaX===0&&e.deltaY!==0&&(i=e.deltaY,l=e.deltaX),(e==null?void 0:e.deltaMode)===WheelEvent.DOM_DELTA_PAGE?(i*=t,l*=r):(e==null?void 0:e.deltaMode)===WheelEvent.DOM_DELTA_LINE&&(T.isMacPlatform()?(i=Math.round(i*n),l=Math.round(l*a)):(i=Math.round(i*this.PIXELS_PER_LINE),l=Math.round(l*this.PIXELS_PER_LINE))),{deltaX:i,deltaY:l}}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],i=n[1];r===0?t.push([a,i]):a-1<=t[t.length-1][1]?t[t.length-1][1]=Math.max(t[t.length-1][1],i):t.push([a,i])}return t}static translateTokenBox(e,t){var{x1:r,y1:n,x2:a,y2:i}=e,{gridX:l,gridY:s,width:u,height:f,verticalBarWidth:c,horizontalBarHeight:d}=t,h=Z(l+r,l,u-c),g=Z(l+a,l,u-c),y=Z(s+n,s,f-d),p=Z(s+i,s,f-d);return{x1:h,y1:y,x2:g,y2:p,token:e.token}}static getTextRenderMetrics(e,t,r){var{metrics:n,model:a,theme:i}=e,{firstColumn:l,allColumnXs:s,allColumnWidths:u,allRowYs:f,allRowHeights:c,modelRows:d,modelColumns:h}=n,{cellHorizontalPadding:g,treeDepthIndent:y,treeHorizontalPadding:p}=i,E=K(d,r),C=K(h,t),w=a.textAlignForCell(C,E),O=K(s,t),S=K(f,r),A=K(u,t),N=K(c,r),P=t===l,R=0;ut(a)&&a.hasExpandableRows&&P&&(R=y*(a.depthForRow(r)+1)+p);var F=A-R,I=O+g,b=S+N*.5;return w==="right"?I=O+F-g:w==="center"&&(I=O+F*.5),I+=R,{width:F-g*2,x:I,y:b}}static findTokensWithProtocolInText(e){var t=Pe(e);return t.filter(r=>r.type==="url"?/^https?:\/\//.test(r.value):!0)}}Oe(T,"PIXELS_PER_LINE",100/3);const ge=T;function pe(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 he(o){for(var e=1;e<arguments.length;e++){var t=arguments[e]!=null?arguments[e]:{};e%2?pe(Object(t),!0).forEach(function(r){mt(o,r,t[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(o,Object.getOwnPropertyDescriptors(t)):pe(Object(t)).forEach(function(r){Object.defineProperty(o,r,Object.getOwnPropertyDescriptor(t,r))})}return o}function mt(o,e,t){return e=gt(e),e in o?Object.defineProperty(o,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):o[e]=t,o}function gt(o){var e=pt(o,"string");return typeof e=="symbol"?e:String(e)}function pt(o,e){if(typeof o!="object"||o===null)return o;var t=o[Symbol.toPrimitive];if(t!==void 0){var r=t.call(o,e||"default");if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(o)}var ht=(o,e)=>{var t=!1,r=Ne(o,he(he({},e),{},{dispose:()=>{t||(t=!0,r.clear(),t=!1)}}));return r};const Et=ht;function yt(o,e,t){return e=Tt(e),e in o?Object.defineProperty(o,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):o[e]=t,o}function Tt(o){var e=wt(o,"string");return typeof e=="symbol"?e:String(e)}function wt(o,e){if(typeof o!="object"||o===null)return o;var t=o[Symbol.toPrimitive];if(t!==void 0){var r=t.call(o,e||"default");if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(o)}var ne=5e3;class St extends De{constructor(){super(...arguments),yt(this,"getCachedTokensInText",Et((e,t)=>{if(t>=e.length)return ge.findTokensWithProtocolInText(e);var r=e.slice(t-1,ne).search(/\s/),n=t+r;r===-1&&(n=Math.min(ne,e.length));var a=e.substring(0,n);return ge.findTokensWithProtocolInText(a)}))}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]:ne,n=this.textForCell(e,t);return this.getCachedTokensInText(n,r)}renderTypeForCell(e,t){return"text"}}const Ot=St;function oe(o,e,t){return e=Ct(e),e in o?Object.defineProperty(o,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):o[e]=t,o}function Ct(o){var e=bt(o,"string");return typeof e=="symbol"?e:String(e)}function bt(o,e){if(typeof o!="object"||o===null)return o;var t=o[Symbol.toPrimitive];if(t!==void 0){var r=t.call(o,e||"default");if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(o)}var z=[],At=new Set;class Ce extends Ot{constructor(e){super(),oe(this,"dh",void 0),oe(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 groupedColumns(){return z}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 z}get initialMovedRows(){return z}get initialColumnHeaderGroups(){return z}get layoutHints(){return null}get frontColumns(){return z}get backColumns(){return z}get keyColumnSet(){return At}get frozenColumns(){return z}isColumnFrozen(e){return!1}isColumnSortable(e){return!1}get isFilterRequired(){return!1}get isReversible(){return!0}get isColumnStatisticsAvailable(){return!1}get description(){return""}get isCustomColumnsAvailable(){return!1}get isFormatColumnsAvailable(){return!1}get isExportAvailable(){return!1}get isValuesTableAvailable(){return!1}get isChartBuilderAvailable(){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.")}}oe(Ce,"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"}));const jt=Ce;export{Ht as C,m as G,kt as I,Mt as L,Dt as S,we as X,xt as a,Ft as b,Lt as c,jt as d,Ot as e,T as f,_t as g,ge as h,ut as i,ae as j,Et as m,ke as u};
2
+ //# sourceMappingURL=IrisGridModel-e9fc5ada.js.map