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