@deephaven/code-studio 0.99.2 → 0.100.1-beta.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-BROmmteh.js → AppRoot-t94UNDQV.js} +5 -5
- package/build/assets/{AppRoot-BROmmteh.js.map → AppRoot-t94UNDQV.js.map} +1 -1
- package/build/assets/{Chart-7s6L1Vff.js → Chart-B2JgQKsH.js} +2 -2
- package/build/assets/{Chart-7s6L1Vff.js.map → Chart-B2JgQKsH.js.map} +1 -1
- package/build/assets/{ControlType-DcauuB76.js → ControlType-Dj-CDf_9.js} +4 -4
- package/build/assets/{ControlType-DcauuB76.js.map → ControlType-Dj-CDf_9.js.map} +1 -1
- package/build/assets/{FontBootstrap-DjZD3KAo.js → FontBootstrap-DuYwbhy6.js} +2 -2
- package/build/assets/{FontBootstrap-DjZD3KAo.js.map → FontBootstrap-DuYwbhy6.js.map} +1 -1
- package/build/assets/{FormatterUtils-BJpD1Vjs.js → FormatterUtils-DOzoPtXx.js} +2 -2
- package/build/assets/{FormatterUtils-BJpD1Vjs.js.map → FormatterUtils-DOzoPtXx.js.map} +1 -1
- package/build/assets/Grid-DxDon3SA.js +4 -0
- package/build/assets/Grid-DxDon3SA.js.map +1 -0
- package/build/assets/GridTokenMouseHandler-Bn0NgIIU.js +2 -0
- package/build/assets/GridTokenMouseHandler-Bn0NgIIU.js.map +1 -0
- package/build/assets/IrisGrid-fwmA8-X0.js +3 -0
- package/build/assets/IrisGrid-fwmA8-X0.js.map +1 -0
- package/build/assets/{IrisGridModel-DVQ6ADFo.js → IrisGridModel-DAz4R-bY.js} +3 -3
- package/build/assets/IrisGridModel-DAz4R-bY.js.map +1 -0
- package/build/assets/{IrisGridShortcuts-BdD0M93a.js → IrisGridShortcuts-5WlWHxT7.js} +2 -2
- package/build/assets/{IrisGridShortcuts-BdD0M93a.js.map → IrisGridShortcuts-5WlWHxT7.js.map} +1 -1
- package/build/assets/IrisGridThemeProvider-D9-eie1Y.js +11 -0
- package/build/assets/IrisGridThemeProvider-D9-eie1Y.js.map +1 -0
- package/build/assets/{LocalWorkspaceStorage-CYVhfPrB.js → LocalWorkspaceStorage-B81p8nIF.js} +2 -2
- package/build/assets/{LocalWorkspaceStorage-CYVhfPrB.js.map → LocalWorkspaceStorage-B81p8nIF.js.map} +1 -1
- package/build/assets/{MarkdownEditor-B8e4Gkm4.js → MarkdownEditor-DNT6t-06.js} +2 -2
- package/build/assets/{MarkdownEditor-B8e4Gkm4.js.map → MarkdownEditor-DNT6t-06.js.map} +1 -1
- package/build/assets/{MarkdownNotebook-B4aba6rK.js → MarkdownNotebook-BMG-D3nh.js} +2 -2
- package/build/assets/{MarkdownNotebook-B4aba6rK.js.map → MarkdownNotebook-BMG-D3nh.js.map} +1 -1
- package/build/assets/{MissingPartitionError-Bl2CfsDY.js → MissingPartitionError-CweDgNeu.js} +3 -3
- package/build/assets/MissingPartitionError-CweDgNeu.js.map +1 -0
- package/build/assets/{StyleGuideRoot-Cosmv3hl.js → StyleGuideRoot-DTy8Gv0L.js} +2 -2
- package/build/assets/{StyleGuideRoot-Cosmv3hl.js.map → StyleGuideRoot-DTy8Gv0L.js.map} +1 -1
- package/build/assets/index-BMyH9To3.js +2 -0
- package/build/assets/{index-DYyYX0N7.js.map → index-BMyH9To3.js.map} +1 -1
- package/build/assets/{index-CnIcIL5M.js → index-BbT_j89C.js} +3 -3
- package/build/assets/{index-CnIcIL5M.js.map → index-BbT_j89C.js.map} +1 -1
- package/build/assets/{index-DtBh_y9-.js → index-CvK_72dS.js} +4 -4
- package/build/assets/{index-DtBh_y9-.js.map → index-CvK_72dS.js.map} +1 -1
- package/build/index.html +2 -2
- package/package.json +31 -31
- package/build/assets/Grid-BjYPeiPZ.js +0 -4
- package/build/assets/Grid-BjYPeiPZ.js.map +0 -1
- package/build/assets/IrisGrid-BWPwyT1k.js +0 -3
- package/build/assets/IrisGrid-BWPwyT1k.js.map +0 -1
- package/build/assets/IrisGridModel-DVQ6ADFo.js.map +0 -1
- package/build/assets/IrisGridThemeProvider-LgvlBqq_.js +0 -11
- package/build/assets/IrisGridThemeProvider-LgvlBqq_.js.map +0 -1
- package/build/assets/MissingPartitionError-Bl2CfsDY.js.map +0 -1
- package/build/assets/TokenBoxCellRenderer-BX2ktCBK.js +0 -2
- package/build/assets/TokenBoxCellRenderer-BX2ktCBK.js.map +0 -1
- package/build/assets/index-DYyYX0N7.js +0 -2
- /package/build/assets/{TokenBoxCellRenderer-CnOjKPv1.css → GridTokenMouseHandler-CnOjKPv1.css} +0 -0
package/build/assets/{LocalWorkspaceStorage-CYVhfPrB.js → LocalWorkspaceStorage-B81p8nIF.js}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{r as c,J as d,bi as rt,a9 as bt,M as A,V as Y,bj as vt,L as Pt,a3 as q,bk as wt,N as V,bl as xt,bm as St,ar as Ot,aL as Et,aa as Tt,ab as Rt,bn as Lt,I as me,bo as ot,a5 as Ft,a1 as Ct,bp as kt}from"./vendor--auZyZHQ.js";import{G as It,v as j,P as H,aQ as _t,B as U,aq as Dt,u as At,aH as ee,aJ as Mt,b$ as Nt,bU as jt,aV as Ut,R as $t,M as Bt,bc as Wt,c0 as Yt,cJ as qt,c3 as Gt,c7 as Ht,cK as Kt,ad as zt,a1 as Xt,a0 as Qt,cy as Jt,cA as Pe,as as Zt,cH as Vt,bb as en,aa as tn,cL as N,cI as nn,cM as rn,cN as on,cO as we,cP as xe,cQ as Se,cR as Oe,b as Ee,a as sn,I as an}from"./ControlType-DcauuB76.js";import{O as ln,t as un,l as Te,k as dn,T as cn}from"./IrisGridShortcuts-BdD0M93a.js";import{u as pn}from"./useMergeRef-B2sNDtfk.js";import{L as $,V as fn,k as hn,ao as mn,ap as yn,e as gn,M as bn,b as vn,aq as Pn,ar as wn,c as xn,K as ye}from"./index-CnIcIL5M.js";import{e as Sn,U as On,l as Re}from"./monaco-BVlTSxnv.js";function st(t,e){c.useEffect(()=>{if(t!=null){var n=new window.ResizeObserver(e);return n.observe(t),()=>{t!=null&&n.unobserve(t)}}},[t,e])}function yr(){var{selectedThemeKey:t,setSelectedThemeKey:e,themes:n}=It(),i=c.useCallback(r=>{e(r)},[e]);return d.jsx(rt,{label:"Pick a color scheme",items:n,selectedKey:t,onSelectionChange:i,children:r=>d.jsx(bt,{children:r.name},r.themeKey)})}function gr(t){var{className:e,style:n}=t;return d.jsx("div",{className:A("dh-logo",e),style:n})}var En=["UNSAFE_className"],Tn=["defaultSelectedKey","disabledKeys","selectedKey","ref"];function Le(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter(function(r){return Object.getOwnPropertyDescriptor(t,r).enumerable})),n.push.apply(n,i)}return n}function Fe(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?Le(Object(n),!0).forEach(function(i){Rn(t,i,n[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Le(Object(n)).forEach(function(i){Object.defineProperty(t,i,Object.getOwnPropertyDescriptor(n,i))})}return t}function Rn(t,e,n){return e=Ln(e),e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function Ln(t){var e=Fn(t,"string");return typeof e=="symbol"?e:String(e)}function Fn(t,e){if(typeof t!="object"||t===null)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var i=n.call(t,e||"default");if(typeof i!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function Ce(t,e){if(t==null)return{};var n=Cn(t,e),i,r;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);for(r=0;r<o.length;r++)i=o[r],!(e.indexOf(i)>=0)&&Object.prototype.propertyIsEnumerable.call(t,i)&&(n[i]=t[i])}return n}function Cn(t,e){if(t==null)return{};var n={},i=Object.keys(t),r,o;for(o=0;o<i.length;o++)r=i[o],!(e.indexOf(r)>=0)&&(n[r]=t[r]);return n}var kn=Y.forwardRef(function(e,n){var{UNSAFE_className:i}=e,r=Ce(e,En),o=ln(r),{defaultSelectedKey:a,disabledKeys:s,selectedKey:l,ref:u}=o,b=Ce(o,Tn),p=pn(n,u);return d.jsx(rt,Fe(Fe({},b),{},{ref:p,UNSAFE_className:A("dh-picker",i),defaultSelectedKey:a,disabledKeys:s,selectedKey:l}))});kn.displayName="Picker";var In=["color","UNSAFE_style"];function ke(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter(function(r){return Object.getOwnPropertyDescriptor(t,r).enumerable})),n.push.apply(n,i)}return n}function Q(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?ke(Object(n),!0).forEach(function(i){_n(t,i,n[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):ke(Object(n)).forEach(function(i){Object.defineProperty(t,i,Object.getOwnPropertyDescriptor(n,i))})}return t}function _n(t,e,n){return e=Dn(e),e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function Dn(t){var e=An(t,"string");return typeof e=="symbol"?e:String(e)}function An(t,e){if(typeof t!="object"||t===null)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var i=n.call(t,e||"default");if(typeof i!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function Mn(t,e){if(t==null)return{};var n=Nn(t,e),i,r;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);for(r=0;r<o.length;r++)i=o[r],!(e.indexOf(i)>=0)&&Object.prototype.propertyIsEnumerable.call(t,i)&&(n[i]=t[i])}return n}function Nn(t,e){if(t==null)return{};var n={},i=Object.keys(t),r,o;for(o=0;o<i.length;o++)r=i[o],!(e.indexOf(r)>=0)&&(n[r]=t[r]);return n}var jn=c.forwardRef((t,e)=>{var{color:n,UNSAFE_style:i}=t,r=Mn(t,In),o=c.useMemo(()=>Q(Q({},i),{},{color:un(n)}),[n,i]);return d.jsx(vt,Q(Q({},r),{},{ref:e,UNSAFE_style:o}))});jn.displayName="Heading";function Ie(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter(function(r){return Object.getOwnPropertyDescriptor(t,r).enumerable})),n.push.apply(n,i)}return n}function Un(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?Ie(Object(n),!0).forEach(function(i){D(t,i,n[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Ie(Object(n)).forEach(function(i){Object.defineProperty(t,i,Object.getOwnPropertyDescriptor(n,i))})}return t}function D(t,e,n){return e=$n(e),e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function $n(t){var e=Bn(t,"string");return typeof e=="symbol"?e:String(e)}function Bn(t,e){if(typeof t!="object"||t===null)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var i=n.call(t,e||"default");if(typeof i!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}var _e=$.module("ContextMenu");class K extends c.PureComponent{static handleContextMenu(e){e.metaKey||(e.stopPropagation(),e.preventDefault())}constructor(e){super(e),D(this,"container",void 0),D(this,"oldFocus",void 0),D(this,"activeSubMenuRef",void 0),D(this,"subMenuTimer",void 0),D(this,"rAF",void 0),D(this,"initialPosition",void 0),this.handleBlur=this.handleBlur.bind(this),this.handleCloseSubMenu=this.handleCloseSubMenu.bind(this),this.handleKeyDown=this.handleKeyDown.bind(this),this.handleMenuItemClick=this.handleMenuItemClick.bind(this),this.handleMenuItemContextMenu=this.handleMenuItemContextMenu.bind(this),this.handleMenuItemMouseMove=this.handleMenuItemMouseMove.bind(this),this.handleMouseLeave=this.handleMouseLeave.bind(this),this.handleWindowResize=this.handleWindowResize.bind(this),this.container=Y.createRef(),this.oldFocus=document.activeElement,this.activeSubMenuRef=Y.createRef(),this.subMenuTimer=0,this.rAF=0,this.initialPosition={top:e.top,left:e.left},this.state={menuItems:[],pendingItems:[],activeSubMenu:null,hasOverflow:!1,subMenuTop:null,subMenuLeft:null,subMenuParentWidth:0,subMenuParentHeight:0,keyboardIndex:-1,mouseIndex:-1}}componentDidMount(){this.initMenu(),this.verifyPosition(),window.addEventListener("resize",this.handleWindowResize),this.rAF=window.requestAnimationFrame(()=>{var e;(e=this.container.current)===null||e===void 0||e.focus();var{onMenuOpened:n}=this.props;n(this)})}componentDidUpdate(e,n){var{actions:i}=this.props,{activeSubMenu:r}=this.state;if(r!==n.activeSubMenu)if(r==null){var o;(o=this.container.current)===null||o===void 0||o.focus()}else this.setActiveSubMenuPosition();if(e.actions!==i&&(this.initMenu(),this.container.current==null||!this.container.current.contains(document.activeElement))){var a;(a=this.container.current)===null||a===void 0||a.focus()}this.verifyPosition()}componentWillUnmount(){this.cancelPromises(),window.removeEventListener("resize",this.handleWindowResize),cancelAnimationFrame(this.rAF)}getKeyboardIndex(){var{options:e}=this.props;if(e.separateKeyboardMouse!==void 0&&e.separateKeyboardMouse){var{keyboardIndex:n}=this.state;return n}return this.getMouseIndex()}setKeyboardIndex(e){var{options:n}=this.props;n.separateKeyboardMouse!==void 0&&n.separateKeyboardMouse?this.setState({keyboardIndex:e}):this.setMouseIndex(e)}getMouseIndex(){var{mouseIndex:e}=this.state;return e}setMouseIndex(e){this.setState({mouseIndex:e})}initMenu(){this.cancelPromises(),cancelAnimationFrame(this.rAF);var{options:e}=this.props,n=e.initialKeyboardIndex;n===void 0&&(n=-1);for(var{actions:i}=this.props,r=j.getMenuItems(i),o=[],a=r.length-1;a>=0;a-=1){var s=r[a];s instanceof Promise?this.initMenuPromise(s):o.push(s)}this.setState({mouseIndex:-1,keyboardIndex:n,activeSubMenu:null,menuItems:j.sortActions(o)})}initMenuPromise(e){var n=H.makeCancelable(e);this.setState(i=>({pendingItems:i.pendingItems.concat(n)})),n.then(i=>{this.setState(r=>{var o=r.pendingItems.indexOf(n);if(o>=0){var a=r.pendingItems.slice();return a.splice(o,1),{menuItems:j.sortActions(r.menuItems.concat(i)),pendingItems:a}}return null})},i=>{H.isCanceled(i)||(this.setState(r=>{var o=r.pendingItems.indexOf(n);if(o>=0){var a=r.pendingItems.slice();return a.splice(o,1),{pendingItems:a}}return null}),_e.error(i))})}cancelPromises(){var{pendingItems:e}=this.state;e.map(n=>n.cancel())}setActiveSubMenuPosition(){if(this.activeSubMenuRef.current!==null){var e=this.activeSubMenuRef.current.getBoundingClientRect();this.setState({subMenuTop:e.top,subMenuLeft:e.right,subMenuParentHeight:e.height,subMenuParentWidth:e.width})}}verifyPosition(){var e,n,i,r,{options:o,updatePosition:a,subMenuParentWidth:s,subMenuParentHeight:l,top:u,left:b}=this.props;if(!(!this.container.current||o.doNotVerifyPosition!=null&&o.doNotVerifyPosition)){var{top:p,left:m}=this.initialPosition,{width:P,height:h}=(e=(n=this.container.current)===null||n===void 0?void 0:n.getBoundingClientRect())!==null&&e!==void 0?e:{width:0,height:0},E=((i=(r=this.container.current)===null||r===void 0?void 0:r.scrollHeight)!==null&&i!==void 0?i:0)>window.innerHeight;h===0||P===0||(p+h>window.innerHeight&&(p-h-l>0?p-=h-l:p=window.innerHeight-h),m+P>window.innerWidth&&(m=m-P-s),(b!==m||u!==p)&&(this.setState({hasOverflow:E}),a(p,m)))}}handleWindowResize(){this.container.current&&this.closeMenu(!0)}handleBlur(e){if(!this.container.current){_e.warn("Container is null!");return}if(!this.container.current.contains(e.relatedTarget)){for(var n=e.relatedTarget,i=!1;n&&!i;)i=n.hasAttribute("data-dh-context-menu"),n=n.parentElement;i||this.closeMenu(!0)}}isEscapeKey(e){var{left:n}=this.props;return e==="Escape"||n<0&&e==="ArrowRight"||e==="ArrowLeft"}handleKeyDown(e){var{menuItems:n}=this.state,i=this.getKeyboardIndex(),r=i,o=!1;if(e.key==="Enter"||e.key===" "){i>=0&&i<n.length&&this.handleMenuItemClick(n[i],e);return}if(e.key==="ArrowRight"?i>=0&&i<=n.length?o=!0:r=0:this.isEscapeKey(e.key)?r=null:e.key==="ArrowUp"||e.shiftKey&&e.key==="Tab"?r=j.getNextMenuItem(r,-1,n):(e.key==="ArrowDown"||e.key==="Tab")&&(r=j.getNextMenuItem(r,1,n)),o){this.openSubMenu(i),e.preventDefault(),e.stopPropagation();return}i!==r&&(r!==null?this.setKeyboardIndex(r):(this.closeMenu(),this.oldFocus instanceof HTMLElement&&this.oldFocus.focus()),e.preventDefault(),e.stopPropagation())}openSubMenu(e){var{menuItems:n,activeSubMenu:i}=this.state,r=n[e].actions?e:null;i!==r&&this.setState({activeSubMenu:r,subMenuTop:null,subMenuLeft:null})}closeMenu(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1,{closeMenu:n,onMenuClosed:i}=this.props;cancelAnimationFrame(this.rAF),this.rAF=window.requestAnimationFrame(()=>{n(e),i(this)})}closeSubMenu(){this.setState({activeSubMenu:null})}handleCloseSubMenu(e){e?this.closeMenu(!0):this.closeSubMenu()}handleMenuItemClick(e,n){n.preventDefault(),n.stopPropagation();var{menuItems:i}=this.state;e!=null&&(e.disabled===void 0||!e.disabled)&&(e.actions!=null?this.openSubMenu(i.indexOf(e)):e.action!=null&&(e.action(n.nativeEvent),this.closeMenu(!0)))}handleMenuItemContextMenu(e,n){n.metaKey||this.handleMenuItemClick(e,n)}handleMenuItemMouseMove(e){var{menuItems:n}=this.state,i=n.indexOf(e);this.setMouseIndex(i),i>=0&&i<n.length&&(e.disabled===void 0||!e.disabled)&&this.openSubMenu(i)}handleMouseLeave(){this.setMouseIndex(-1)}render(){for(var e=[],{top:n,left:i}=this.props,{activeSubMenu:r,hasOverflow:o,keyboardIndex:a,menuItems:s,mouseIndex:l,pendingItems:u,subMenuTop:b,subMenuLeft:p,subMenuParentWidth:m,subMenuParentHeight:P}=this.state,h=0;h<s.length;h+=1){var E=s[h];h>0&&E.group!==s[h-1].group&&e.push(d.jsx("hr",{},"".concat(h,".separator")));var y=d.jsx(_t,{ref:r===h?this.activeSubMenuRef:null,isKeyboardSelected:a===h,isMouseSelected:l===h,menuItem:E,closeMenu:this.handleCloseSubMenu,onMenuItemClick:this.handleMenuItemClick,onMenuItemMouseMove:this.handleMenuItemMouseMove,onMenuItemContextMenu:this.handleMenuItemContextMenu},h);e.push(y)}var O=null;u.length>0&&(O=d.jsx("div",{className:"loading",children:d.jsx(fn,{className:"loading-spinner-vertical-align"})}));var{menuStyle:M,"data-testid":I}=this.props,R=r!==null&&b!==null&&p!==null;return d.jsxs(d.Fragment,{children:[d.jsxs("div",{className:A({"has-overflow":o},"context-menu-container"),style:Un({top:n,left:i},M),ref:this.container,"data-dh-context-menu":!0,onBlur:this.handleBlur,onKeyDown:this.handleKeyDown,onMouseLeave:this.handleMouseLeave,onContextMenu:K.handleContextMenu,role:"menuitem",tabIndex:0,"data-testid":I,children:[e,O]}),R&&r!==null&&b!==null&&p!==null&&d.jsx(K,{actions:s[r].actions||[],closeMenu:this.handleCloseSubMenu,top:b,left:p,updatePosition:(v,T)=>{this.setState({subMenuTop:v,subMenuLeft:T})},subMenuParentWidth:m,subMenuParentHeight:P},"sub-".concat(r))]})}}D(K,"defaultProps",{subMenuParentWidth:0,subMenuParentHeight:0,closeMenu(){},onMenuOpened(){},onMenuClosed(){},options:{},menuStyle:{},"data-testid":void 0});function De(t,e,n){return e=Wn(e),e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function Wn(t){var e=Yn(t,"string");return typeof e=="symbol"?e:String(e)}function Yn(t,e){if(typeof t!="object"||t===null)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var i=n.call(t,e||"default");if(typeof i!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}class br extends c.Component{constructor(e){super(e),De(this,"container",void 0),De(this,"openMenu",void 0),this.handleMenuClose=this.handleMenuClose.bind(this),this.handleContextMenu=this.handleContextMenu.bind(this),this.container=Y.createRef(),this.openMenu=Y.createRef(),this.state={actions:null,left:0,top:0}}componentDidMount(){var e;(e=this.container.current)!==null&&e!==void 0&&e.parentElement&&this.container.current.parentElement.addEventListener("contextmenu",this.handleContextMenu)}componentWillUnmount(){var e;(e=this.container.current)!==null&&e!==void 0&&e.parentElement&&this.container.current.parentElement.removeEventListener("contextmenu",this.handleContextMenu)}handleContextMenu(e){if(this.container.current){var n=this.container.current.getBoundingClientRect(),i=e.clientY-n.top,r=e.clientX-n.left,{actions:o}=this.state;if(o!=null&&e.target===this.container.current){e.preventDefault(),this.setState({actions:null},()=>{var s=document.elementFromPoint(r,i),l=new MouseEvent("contextmenu",{clientX:e.clientX,clientY:e.clientY,bubbles:!0,cancelable:!0});s==null||s.dispatchEvent(l)});return}if(j.isContextActionEvent(e)&&!(e.metaKey||e.ctrlKey)){var a=j.getMenuItems(e.contextActions);a.length!==0&&(e.preventDefault(),this.setState({actions:a,top:i,left:r}))}}}handleMenuClose(e){e===this.openMenu.current&&this.setState({actions:null})}render(){var e=null,{"data-testid":n}=this.props,{actions:i,top:r,left:o}=this.state;return i&&(e=d.jsx(K,{ref:this.openMenu,actions:i,onMenuClosed:this.handleMenuClose,top:r,left:o,updatePosition:(a,s)=>{this.setState({top:a,left:s})},"data-testid":n})),d.jsx("div",{className:A("context-menu-root",{active:i}),ref:this.container,children:e})}}function at(t,e,n){return e=qn(e),e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function qn(t){var e=Gn(t,"string");return typeof e=="symbol"?e:String(e)}function Gn(t,e){if(typeof t!="object"||t===null)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var i=n.call(t,e||"default");if(typeof i!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}class k extends c.Component{static handleEnter(e){var n=e;n.style.height="0"}static handleEntering(e){var n=e;n.style.height="".concat(k.getHeight(n),"px")}static handleExiting(e){var n=e;n.style.height="0"}static handleExit(e){var n=e;n.style.height="".concat(k.getHeight(n),"px")}static getHeight(e){var n=e.scrollWidth-e.clientWidth;return e.scrollHeight-n}constructor(e){super(e),this.handleEntered=this.handleEntered.bind(this)}handleEntered(e){var n=e;n.style.height="";var{autoFocusOnShow:i}=this.props;if(i!==void 0&&i){var r=n.querySelector("input, select, textarea");r!=null&&r.focus()}}render(){var{children:e,className:n,in:i,"data-testid":r}=this.props;return d.jsx(Pt,{in:i,classNames:{enterActive:"collapsing",enterDone:"collapse show",exitActive:"collapsing",exitDone:"collapse"},onEnter:k.handleEnter,onEntering:k.handleEntering,onEntered:this.handleEntered,onExit:k.handleExit,onExiting:k.handleExiting,timeout:350,children:o=>d.jsx("div",{className:A({collapse:o==="exited"},n),"data-testid":r,children:e})})}}at(k,"propTypes",{className:q.string,in:q.bool.isRequired,children:q.node.isRequired,autoFocusOnShow:q.bool,"data-testid":q.string});at(k,"defaultProps",{className:"",autoFocusOnShow:!1,"data-testid":void 0});function Ae(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter(function(r){return Object.getOwnPropertyDescriptor(t,r).enumerable})),n.push.apply(n,i)}return n}function oe(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?Ae(Object(n),!0).forEach(function(i){Hn(t,i,n[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Ae(Object(n)).forEach(function(i){Object.defineProperty(t,i,Object.getOwnPropertyDescriptor(n,i))})}return t}function Hn(t,e,n){return e=Kn(e),e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function Kn(t){var e=zn(t,"string");return typeof e=="symbol"?e:String(e)}function zn(t,e){if(typeof t!="object"||t===null)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var i=n.call(t,e||"default");if(typeof i!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}var lt=c.memo(t=>{var{tab:e,onClose:n,onSelect:i,isActive:r,activeRef:o,index:a,isDraggable:s,contextActions:l}=t,{key:u,isClosable:b=n!=null,title:p,icon:m}=e,P;return m!=null&&(P=Y.isValidElement(m)?m:d.jsx(V,{icon:m})),d.jsx(wt,{draggableId:u,index:a,isDragDisabled:!s,children:(h,E)=>d.jsxs("div",{className:"context-menu-wrapper",ref:r?o:null,children:[d.jsxs("div",oe(oe(oe({ref:h.innerRef},h.draggableProps),h.dragHandleProps),{},{className:A("btn btn-link btn-nav-tab",{active:r},{dragging:E.isDragging}),"data-testid":"btn-nav-tab-".concat(p),role:"tab",tabIndex:0,onAuxClick:y=>{b&&y.button===1&&y.buttons===0&&(n==null||n(u))},onClick:y=>{if(b&&y.button===1&&y.buttons===0){n==null||n(u);return}y.button===0&&y.buttons===0&&(y.target.focus(),i(u))},onKeyPress:y=>{y.key==="Enter"&&i(u)},children:[P,p,b&&d.jsx(U,{kind:"ghost",className:"btn-nav-tab-close",onClick:y=>{n==null||n(u),y.stopPropagation(),y.preventDefault()},icon:hn,tooltip:"Close"})]})),d.jsx(Dt,{actions:l})]})},u)});lt.displayName="NavTab";function Me(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter(function(r){return Object.getOwnPropertyDescriptor(t,r).enumerable})),n.push.apply(n,i)}return n}function Ne(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?Me(Object(n),!0).forEach(function(i){Xn(t,i,n[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Me(Object(n)).forEach(function(i){Object.defineProperty(t,i,Object.getOwnPropertyDescriptor(n,i))})}return t}function Xn(t,e,n){return e=Qn(e),e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function Qn(t){var e=Jn(t,"string");return typeof e=="symbol"?e:String(e)}function Jn(t,e){if(typeof t!="object"||t===null)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var i=n.call(t,e||"default");if(typeof i!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}var Zn=500,Vn=.01,ei=5e-4;function je(t){return t.scrollLeft===0}function Ue(t){return t.scrollLeft+t.clientWidth===t.scrollWidth||t.scrollWidth===0}function ti(t,e,n){var{isClosable:i=!1,key:r}=t,o=[];if(i&&n!=null){o.push({title:"Close",order:10,group:20,action:()=>{n(r)}});for(var a=!0,s=e.length-1;s>0&&e[s].key!==t.key;s-=1)if(e[s].isClosable===!0){a=!1;break}o.push({title:"Close to the Right",order:20,group:20,action:()=>{for(var l=e.length-1;l>0&&e[l].key!==r;l-=1)e[l].isClosable===!0&&n(e[l].key)},disabled:a}),o.push({title:"Close All",order:30,group:20,action:()=>{e.forEach(l=>{l.isClosable===!0&&n(l.key)})}})}return o}function vr(t){var{activeKey:e,tabs:n,onSelect:i,onReorder:r,onClose:o,makeContextActions:a}=t,s=c.useRef(),[l,u]=c.useState(!0),[b,p]=c.useState(!0),[m,P]=c.useState(!0),h=c.useCallback(()=>{s.current!=null&&(s.current.clientWidth<s.current.scrollWidth&&n.length>0?u(!0):u(!1),p(je(s.current)),P(Ue(s.current)))},[n]);st(s.current,h);var E=c.useCallback(f=>{Te.stopDragging(),f.destination&&(r==null||r(f.source.index,f.destination.index))},[r]),y=c.useCallback(()=>{if(s.current!=null){var f=je(s.current);f!==b&&p(f);var g=Ue(s.current);g!==m&&P(g)}},[b,m]),O=c.useRef({cancelClick:!1}),M=c.useCallback(()=>{if(!(s.current==null||O.current.cancelClick))for(var{children:f}=s.current,g=f.length-1;g>=0;g-=1){var w=f[g];if(w.offsetLeft<s.current.scrollLeft-5){w.scrollIntoView({behavior:"smooth",block:"nearest",inline:"start"});return}}},[]),I=c.useCallback(()=>{if(!(s.current==null||O.current.cancelClick))for(var{children:f}=s.current,g=0;g<f.length;g+=1){var w=f[g];if(w.offsetLeft+5>s.current.scrollLeft+s.current.offsetWidth){w.scrollIntoView({behavior:"smooth",block:"nearest",inline:"end"});return}}},[]),R=c.useCallback(function(f,g){var w=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,x=arguments.length>3?arguments[3]:void 0,L=s.current;L!=null&&(O.current.cancelClick=!0,f==="left"?L.scrollLeft=g-w:f==="right"&&(L.scrollLeft=g+w),O.current.rAF=requestAnimationFrame(X=>{var be=x??X,ve=X-be,re=Vn*ve+.5*ei*ve**2;re=Math.min(re,L.scrollWidth),R(f,g,re,be)}))},[]),v=c.useCallback(()=>{var{holdTimer:f,rAF:g}=O.current;f!=null&&(clearTimeout(f),O.current.holdTimer=void 0),g!=null&&(cancelAnimationFrame(g),O.current.rAF=void 0),window.removeEventListener("mouseup",v)},[]);c.useEffect(()=>()=>window.removeEventListener("mouseup",v),[v]);var T=c.useCallback(f=>{s.current!=null&&(O.current.holdTimer=window.setTimeout(R,Zn,f,s.current.scrollLeft)),O.current.cancelClick=!1,window.addEventListener("mouseup",v)},[v,R]),C=c.useCallback(()=>{T("left")},[T]),ne=c.useCallback(()=>{T("right")},[T]);c.useEffect(function(){var g,w=x=>{x.stopPropagation(),x.preventDefault();var L=x.currentTarget,X=Math.abs(x.deltaY)>Math.abs(x.deltaX)?x.deltaY:x.deltaX;L.scrollLeft+=Ot(X,-30,30)};return(g=s.current)===null||g===void 0||g.addEventListener("wheel",w),()=>{var x;(x=s.current)===null||x===void 0||x.removeEventListener("wheel",w)}},[]);var mt=c.useMemo(()=>{var f=new Map;return n.forEach(g=>{var{key:w}=g,x=[()=>ti(g,n,o),()=>{var L;return(L=a==null?void 0:a(g))!==null&&L!==void 0?L:[]}];f.set(w,x)}),f},[a,n,o]),ie=c.useRef(null),yt=n.find(f=>f.key===e),gt=n.map((f,g)=>{var{key:w}=f,x=f===yt;return d.jsx(lt,{tab:f,index:g,isActive:x,activeRef:ie,onSelect:i,onClose:o,isDraggable:r!=null,contextActions:mt.get(w)},w)});return c.useEffect(function(){ie.current!=null&&ie.current.scrollIntoView({block:"nearest",inline:"nearest"})},[e]),d.jsxs("nav",{className:"nav-container",children:[l&&d.jsx(U,{kind:"ghost",icon:d.jsx(V,{icon:mn,transform:"grow-4"}),className:"tab-controls-btn tab-controls-btn-left",tooltip:"Scroll left",onClick:M,onMouseDown:C,disabled:b}),d.jsx(xt,{onDragStart:Te.startDragging,onDragEnd:E,children:d.jsx(St,{droppableId:"droppable-tab-navigation",direction:"horizontal",children:(f,g)=>d.jsxs("div",Ne(Ne({ref:w=>{w!=null&&(s.current=w,f.innerRef(w))}},f.droppableProps),{},{className:A("nav nav-tabs",{dragging:g.draggingFromThisWith}),role:"tablist",onScroll:y,children:[gt,f.placeholder]}))})}),l&&d.jsx(U,{kind:"ghost",icon:d.jsx(V,{icon:yn,transform:"grow-4"}),className:"tab-controls-btn tab-controls-btn-right",tooltip:"Scroll right",onClick:I,onMouseDown:ne,disabled:m})]})}function ni(t,e){var n=At(),i=c.useMemo(()=>new n.CoreClient(t,e),[n,t,e]);return c.useEffect(()=>()=>{i.disconnect()},[i]),i}var ut=c.createContext(null);function Pr(t){var{serverUrl:e,options:n,children:i}=t,r=ni(e,n);return d.jsx(ut.Provider,{value:r,children:i})}function ii(){return ee(ut,"No Client available in useClient. Was code wrapped in ClientBootstrap or ClientContext.Provider?")}var ri={$schema:"http://json-schema.org/draft-07/schema#",title:"Options",type:"object",properties:{"allowed-confusables":{description:'A list of allowed "confusable" Unicode characters to ignore when enforcing `RUF001`, `RUF002`, and `RUF003`.',deprecated:!0,type:["array","null"],items:{type:"string",maxLength:1,minLength:1}},builtins:{description:"A list of builtins to treat as defined references, in addition to the system builtins.",type:["array","null"],items:{type:"string"}},"cache-dir":{description:"A path to the cache directory.\n\nBy default, Ruff stores cache results in a `.ruff_cache` directory in the current project root.\n\nHowever, Ruff will also respect the `RUFF_CACHE_DIR` environment variable, which takes precedence over that default.\n\nThis setting will override even the `RUFF_CACHE_DIR` environment variable, if set.",type:["string","null"]},"dummy-variable-rgx":{description:'A regular expression used to identify "dummy" variables, or those which should be ignored when enforcing (e.g.) unused-variable rules. The default expression matches `_`, `__`, and `_var`, but not `_var_`.',deprecated:!0,type:["string","null"]},exclude:{description:"A list of file patterns to exclude from formatting and linting.\n\nExclusions are based on globs, and can be either:\n\n- Single-path patterns, like `.mypy_cache` (to exclude any directory named `.mypy_cache` in the tree), `foo.py` (to exclude any file named `foo.py`), or `foo_*.py` (to exclude any file matching `foo_*.py` ). - Relative patterns, like `directory/foo.py` (to exclude that specific file) or `directory/*.py` (to exclude any Python files in `directory`). Note that these paths are relative to the project root (e.g., the directory containing your `pyproject.toml`).\n\nFor more information on the glob syntax, refer to the [`globset` documentation](https://docs.rs/globset/latest/globset/#syntax).\n\nNote that you'll typically want to use [`extend-exclude`](#extend-exclude) to modify the excluded paths.",type:["array","null"],items:{type:"string"}},"explicit-preview-rules":{description:"Whether to require exact codes to select preview rules. When enabled, preview rules will not be selected by prefixes — the full code of each preview rule will be required to enable the rule.",deprecated:!0,type:["boolean","null"]},extend:{description:"A path to a local `pyproject.toml` file to merge into this configuration. User home directory and environment variables will be expanded.\n\nTo resolve the current `pyproject.toml` file, Ruff will first resolve this base configuration file, then merge in any properties defined in the current configuration file.",type:["string","null"]},"extend-exclude":{description:"A list of file patterns to omit from formatting and linting, in addition to those specified by [`exclude`](#exclude).\n\nExclusions are based on globs, and can be either:\n\n- Single-path patterns, like `.mypy_cache` (to exclude any directory named `.mypy_cache` in the tree), `foo.py` (to exclude any file named `foo.py`), or `foo_*.py` (to exclude any file matching `foo_*.py` ). - Relative patterns, like `directory/foo.py` (to exclude that specific file) or `directory/*.py` (to exclude any Python files in `directory`). Note that these paths are relative to the project root (e.g., the directory containing your `pyproject.toml`).\n\nFor more information on the glob syntax, refer to the [`globset` documentation](https://docs.rs/globset/latest/globset/#syntax).",type:["array","null"],items:{type:"string"}},"extend-fixable":{description:"A list of rule codes or prefixes to consider fixable, in addition to those specified by [`fixable`](#lint_fixable).",deprecated:!0,type:["array","null"],items:{$ref:"#/definitions/RuleSelector"}},"extend-ignore":{description:"A list of rule codes or prefixes to ignore, in addition to those specified by `ignore`.",deprecated:!0,type:["array","null"],items:{$ref:"#/definitions/RuleSelector"}},"extend-include":{description:"A list of file patterns to include when linting, in addition to those specified by [`include`](#include).\n\nInclusion are based on globs, and should be single-path patterns, like `*.pyw`, to include any file with the `.pyw` extension.\n\nFor more information on the glob syntax, refer to the [`globset` documentation](https://docs.rs/globset/latest/globset/#syntax).",type:["array","null"],items:{type:"string"}},"extend-per-file-ignores":{description:"A list of mappings from file pattern to rule codes or prefixes to exclude, in addition to any rules excluded by [`per-file-ignores`](#lint_per-file-ignores).",deprecated:!0,type:["object","null"],additionalProperties:{type:"array",items:{$ref:"#/definitions/RuleSelector"}}},"extend-safe-fixes":{description:"A list of rule codes or prefixes for which unsafe fixes should be considered safe.",deprecated:!0,type:["array","null"],items:{$ref:"#/definitions/RuleSelector"}},"extend-select":{description:"A list of rule codes or prefixes to enable, in addition to those specified by [`select`](#lint_select).",deprecated:!0,type:["array","null"],items:{$ref:"#/definitions/RuleSelector"}},"extend-unfixable":{description:"A list of rule codes or prefixes to consider non-auto-fixable, in addition to those specified by [`unfixable`](#lint_unfixable).",deprecated:!0,type:["array","null"],items:{$ref:"#/definitions/RuleSelector"}},"extend-unsafe-fixes":{description:"A list of rule codes or prefixes for which safe fixes should be considered unsafe.",deprecated:!0,type:["array","null"],items:{$ref:"#/definitions/RuleSelector"}},external:{description:"A list of rule codes or prefixes that are unsupported by Ruff, but should be preserved when (e.g.) validating `# noqa` directives. Useful for retaining `# noqa` directives that cover plugins not yet implemented by Ruff.",deprecated:!0,type:["array","null"],items:{type:"string"}},fix:{description:"Enable fix behavior by-default when running `ruff` (overridden by the `--fix` and `--no-fix` command-line flags). Only includes automatic fixes unless `--unsafe-fixes` is provided.",type:["boolean","null"]},"fix-only":{description:"Like [`fix`](#fix), but disables reporting on leftover violation. Implies [`fix`](#fix).",type:["boolean","null"]},fixable:{description:"A list of rule codes or prefixes to consider fixable. By default, all rules are considered fixable.",deprecated:!0,type:["array","null"],items:{$ref:"#/definitions/RuleSelector"}},"flake8-annotations":{description:"Options for the `flake8-annotations` plugin.",deprecated:!0,anyOf:[{$ref:"#/definitions/Flake8AnnotationsOptions"},{type:"null"}]},"flake8-bandit":{description:"Options for the `flake8-bandit` plugin.",deprecated:!0,anyOf:[{$ref:"#/definitions/Flake8BanditOptions"},{type:"null"}]},"flake8-boolean-trap":{description:"Options for the `flake8-boolean-trap` plugin.",deprecated:!0,anyOf:[{$ref:"#/definitions/Flake8BooleanTrapOptions"},{type:"null"}]},"flake8-bugbear":{description:"Options for the `flake8-bugbear` plugin.",deprecated:!0,anyOf:[{$ref:"#/definitions/Flake8BugbearOptions"},{type:"null"}]},"flake8-builtins":{description:"Options for the `flake8-builtins` plugin.",deprecated:!0,anyOf:[{$ref:"#/definitions/Flake8BuiltinsOptions"},{type:"null"}]},"flake8-comprehensions":{description:"Options for the `flake8-comprehensions` plugin.",deprecated:!0,anyOf:[{$ref:"#/definitions/Flake8ComprehensionsOptions"},{type:"null"}]},"flake8-copyright":{description:"Options for the `flake8-copyright` plugin.",deprecated:!0,anyOf:[{$ref:"#/definitions/Flake8CopyrightOptions"},{type:"null"}]},"flake8-errmsg":{description:"Options for the `flake8-errmsg` plugin.",deprecated:!0,anyOf:[{$ref:"#/definitions/Flake8ErrMsgOptions"},{type:"null"}]},"flake8-gettext":{description:"Options for the `flake8-gettext` plugin.",deprecated:!0,anyOf:[{$ref:"#/definitions/Flake8GetTextOptions"},{type:"null"}]},"flake8-implicit-str-concat":{description:"Options for the `flake8-implicit-str-concat` plugin.",deprecated:!0,anyOf:[{$ref:"#/definitions/Flake8ImplicitStrConcatOptions"},{type:"null"}]},"flake8-import-conventions":{description:"Options for the `flake8-import-conventions` plugin.",deprecated:!0,anyOf:[{$ref:"#/definitions/Flake8ImportConventionsOptions"},{type:"null"}]},"flake8-pytest-style":{description:"Options for the `flake8-pytest-style` plugin.",deprecated:!0,anyOf:[{$ref:"#/definitions/Flake8PytestStyleOptions"},{type:"null"}]},"flake8-quotes":{description:"Options for the `flake8-quotes` plugin.",deprecated:!0,anyOf:[{$ref:"#/definitions/Flake8QuotesOptions"},{type:"null"}]},"flake8-self":{description:"Options for the `flake8_self` plugin.",deprecated:!0,anyOf:[{$ref:"#/definitions/Flake8SelfOptions"},{type:"null"}]},"flake8-tidy-imports":{description:"Options for the `flake8-tidy-imports` plugin.",deprecated:!0,anyOf:[{$ref:"#/definitions/Flake8TidyImportsOptions"},{type:"null"}]},"flake8-type-checking":{description:"Options for the `flake8-type-checking` plugin.",deprecated:!0,anyOf:[{$ref:"#/definitions/Flake8TypeCheckingOptions"},{type:"null"}]},"flake8-unused-arguments":{description:"Options for the `flake8-unused-arguments` plugin.",deprecated:!0,anyOf:[{$ref:"#/definitions/Flake8UnusedArgumentsOptions"},{type:"null"}]},"force-exclude":{description:"Whether to enforce [`exclude`](#exclude) and [`extend-exclude`](#extend-exclude) patterns, even for paths that are passed to Ruff explicitly. Typically, Ruff will lint any paths passed in directly, even if they would typically be excluded. Setting `force-exclude = true` will cause Ruff to respect these exclusions unequivocally.\n\nThis is useful for [`pre-commit`](https://pre-commit.com/), which explicitly passes all changed files to the [`ruff-pre-commit`](https://github.com/astral-sh/ruff-pre-commit) plugin, regardless of whether they're marked as excluded by Ruff's own settings.",type:["boolean","null"]},format:{description:"Options to configure code formatting.",anyOf:[{$ref:"#/definitions/FormatOptions"},{type:"null"}]},ignore:{description:"A list of rule codes or prefixes to ignore. Prefixes can specify exact rules (like `F841`), entire categories (like `F`), or anything in between.\n\nWhen breaking ties between enabled and disabled rules (via `select` and `ignore`, respectively), more specific prefixes override less specific prefixes.",deprecated:!0,type:["array","null"],items:{$ref:"#/definitions/RuleSelector"}},"ignore-init-module-imports":{description:"Avoid automatically removing unused imports in `__init__.py` files. Such imports will still be flagged, but with a dedicated message suggesting that the import is either added to the module's `__all__` symbol, or re-exported with a redundant alias (e.g., `import os as os`).\n\nThis option is enabled by default, but you can opt-in to removal of imports via an unsafe fix.",deprecated:!0,type:["boolean","null"]},include:{description:"A list of file patterns to include when linting.\n\nInclusion are based on globs, and should be single-path patterns, like `*.pyw`, to include any file with the `.pyw` extension. `pyproject.toml` is included here not for configuration but because we lint whether e.g. the `[project]` matches the schema.\n\nNotebook files (`.ipynb` extension) are included by default on Ruff 0.6.0+.\n\nFor more information on the glob syntax, refer to the [`globset` documentation](https://docs.rs/globset/latest/globset/#syntax).",type:["array","null"],items:{type:"string"}},"indent-width":{description:`The number of spaces per indentation level (tab).
|
|
1
|
+
import{r as c,J as d,bi as rt,a9 as bt,M as A,V as Y,bj as vt,L as Pt,a3 as q,bk as wt,N as V,bl as xt,bm as St,ar as Ot,aL as Et,aa as Tt,ab as Rt,bn as Lt,I as me,bo as ot,a5 as Ft,a1 as Ct,bp as kt}from"./vendor--auZyZHQ.js";import{G as It,v as j,P as H,aQ as _t,B as U,aq as Dt,u as At,aH as ee,aJ as Mt,b$ as Nt,bU as jt,aV as Ut,R as $t,M as Bt,bc as Wt,c0 as Yt,cJ as qt,c3 as Gt,c7 as Ht,cK as Kt,ad as zt,a1 as Xt,a0 as Qt,cy as Jt,cA as Pe,as as Zt,cH as Vt,bb as en,aa as tn,cL as N,cI as nn,cM as rn,cN as on,cO as we,cP as xe,cQ as Se,cR as Oe,b as Ee,a as sn,I as an}from"./ControlType-Dj-CDf_9.js";import{O as ln,t as un,l as Te,k as dn,T as cn}from"./IrisGridShortcuts-5WlWHxT7.js";import{u as pn}from"./useMergeRef-B2sNDtfk.js";import{L as $,V as fn,k as hn,ao as mn,ap as yn,e as gn,M as bn,b as vn,aq as Pn,ar as wn,c as xn,K as ye}from"./index-BbT_j89C.js";import{e as Sn,U as On,l as Re}from"./monaco-BVlTSxnv.js";function st(t,e){c.useEffect(()=>{if(t!=null){var n=new window.ResizeObserver(e);return n.observe(t),()=>{t!=null&&n.unobserve(t)}}},[t,e])}function yr(){var{selectedThemeKey:t,setSelectedThemeKey:e,themes:n}=It(),i=c.useCallback(r=>{e(r)},[e]);return d.jsx(rt,{label:"Pick a color scheme",items:n,selectedKey:t,onSelectionChange:i,children:r=>d.jsx(bt,{children:r.name},r.themeKey)})}function gr(t){var{className:e,style:n}=t;return d.jsx("div",{className:A("dh-logo",e),style:n})}var En=["UNSAFE_className"],Tn=["defaultSelectedKey","disabledKeys","selectedKey","ref"];function Le(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter(function(r){return Object.getOwnPropertyDescriptor(t,r).enumerable})),n.push.apply(n,i)}return n}function Fe(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?Le(Object(n),!0).forEach(function(i){Rn(t,i,n[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Le(Object(n)).forEach(function(i){Object.defineProperty(t,i,Object.getOwnPropertyDescriptor(n,i))})}return t}function Rn(t,e,n){return e=Ln(e),e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function Ln(t){var e=Fn(t,"string");return typeof e=="symbol"?e:String(e)}function Fn(t,e){if(typeof t!="object"||t===null)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var i=n.call(t,e||"default");if(typeof i!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function Ce(t,e){if(t==null)return{};var n=Cn(t,e),i,r;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);for(r=0;r<o.length;r++)i=o[r],!(e.indexOf(i)>=0)&&Object.prototype.propertyIsEnumerable.call(t,i)&&(n[i]=t[i])}return n}function Cn(t,e){if(t==null)return{};var n={},i=Object.keys(t),r,o;for(o=0;o<i.length;o++)r=i[o],!(e.indexOf(r)>=0)&&(n[r]=t[r]);return n}var kn=Y.forwardRef(function(e,n){var{UNSAFE_className:i}=e,r=Ce(e,En),o=ln(r),{defaultSelectedKey:a,disabledKeys:s,selectedKey:l,ref:u}=o,b=Ce(o,Tn),p=pn(n,u);return d.jsx(rt,Fe(Fe({},b),{},{ref:p,UNSAFE_className:A("dh-picker",i),defaultSelectedKey:a,disabledKeys:s,selectedKey:l}))});kn.displayName="Picker";var In=["color","UNSAFE_style"];function ke(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter(function(r){return Object.getOwnPropertyDescriptor(t,r).enumerable})),n.push.apply(n,i)}return n}function Q(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?ke(Object(n),!0).forEach(function(i){_n(t,i,n[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):ke(Object(n)).forEach(function(i){Object.defineProperty(t,i,Object.getOwnPropertyDescriptor(n,i))})}return t}function _n(t,e,n){return e=Dn(e),e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function Dn(t){var e=An(t,"string");return typeof e=="symbol"?e:String(e)}function An(t,e){if(typeof t!="object"||t===null)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var i=n.call(t,e||"default");if(typeof i!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function Mn(t,e){if(t==null)return{};var n=Nn(t,e),i,r;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);for(r=0;r<o.length;r++)i=o[r],!(e.indexOf(i)>=0)&&Object.prototype.propertyIsEnumerable.call(t,i)&&(n[i]=t[i])}return n}function Nn(t,e){if(t==null)return{};var n={},i=Object.keys(t),r,o;for(o=0;o<i.length;o++)r=i[o],!(e.indexOf(r)>=0)&&(n[r]=t[r]);return n}var jn=c.forwardRef((t,e)=>{var{color:n,UNSAFE_style:i}=t,r=Mn(t,In),o=c.useMemo(()=>Q(Q({},i),{},{color:un(n)}),[n,i]);return d.jsx(vt,Q(Q({},r),{},{ref:e,UNSAFE_style:o}))});jn.displayName="Heading";function Ie(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter(function(r){return Object.getOwnPropertyDescriptor(t,r).enumerable})),n.push.apply(n,i)}return n}function Un(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?Ie(Object(n),!0).forEach(function(i){D(t,i,n[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Ie(Object(n)).forEach(function(i){Object.defineProperty(t,i,Object.getOwnPropertyDescriptor(n,i))})}return t}function D(t,e,n){return e=$n(e),e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function $n(t){var e=Bn(t,"string");return typeof e=="symbol"?e:String(e)}function Bn(t,e){if(typeof t!="object"||t===null)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var i=n.call(t,e||"default");if(typeof i!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}var _e=$.module("ContextMenu");class K extends c.PureComponent{static handleContextMenu(e){e.metaKey||(e.stopPropagation(),e.preventDefault())}constructor(e){super(e),D(this,"container",void 0),D(this,"oldFocus",void 0),D(this,"activeSubMenuRef",void 0),D(this,"subMenuTimer",void 0),D(this,"rAF",void 0),D(this,"initialPosition",void 0),this.handleBlur=this.handleBlur.bind(this),this.handleCloseSubMenu=this.handleCloseSubMenu.bind(this),this.handleKeyDown=this.handleKeyDown.bind(this),this.handleMenuItemClick=this.handleMenuItemClick.bind(this),this.handleMenuItemContextMenu=this.handleMenuItemContextMenu.bind(this),this.handleMenuItemMouseMove=this.handleMenuItemMouseMove.bind(this),this.handleMouseLeave=this.handleMouseLeave.bind(this),this.handleWindowResize=this.handleWindowResize.bind(this),this.container=Y.createRef(),this.oldFocus=document.activeElement,this.activeSubMenuRef=Y.createRef(),this.subMenuTimer=0,this.rAF=0,this.initialPosition={top:e.top,left:e.left},this.state={menuItems:[],pendingItems:[],activeSubMenu:null,hasOverflow:!1,subMenuTop:null,subMenuLeft:null,subMenuParentWidth:0,subMenuParentHeight:0,keyboardIndex:-1,mouseIndex:-1}}componentDidMount(){this.initMenu(),this.verifyPosition(),window.addEventListener("resize",this.handleWindowResize),this.rAF=window.requestAnimationFrame(()=>{var e;(e=this.container.current)===null||e===void 0||e.focus();var{onMenuOpened:n}=this.props;n(this)})}componentDidUpdate(e,n){var{actions:i}=this.props,{activeSubMenu:r}=this.state;if(r!==n.activeSubMenu)if(r==null){var o;(o=this.container.current)===null||o===void 0||o.focus()}else this.setActiveSubMenuPosition();if(e.actions!==i&&(this.initMenu(),this.container.current==null||!this.container.current.contains(document.activeElement))){var a;(a=this.container.current)===null||a===void 0||a.focus()}this.verifyPosition()}componentWillUnmount(){this.cancelPromises(),window.removeEventListener("resize",this.handleWindowResize),cancelAnimationFrame(this.rAF)}getKeyboardIndex(){var{options:e}=this.props;if(e.separateKeyboardMouse!==void 0&&e.separateKeyboardMouse){var{keyboardIndex:n}=this.state;return n}return this.getMouseIndex()}setKeyboardIndex(e){var{options:n}=this.props;n.separateKeyboardMouse!==void 0&&n.separateKeyboardMouse?this.setState({keyboardIndex:e}):this.setMouseIndex(e)}getMouseIndex(){var{mouseIndex:e}=this.state;return e}setMouseIndex(e){this.setState({mouseIndex:e})}initMenu(){this.cancelPromises(),cancelAnimationFrame(this.rAF);var{options:e}=this.props,n=e.initialKeyboardIndex;n===void 0&&(n=-1);for(var{actions:i}=this.props,r=j.getMenuItems(i),o=[],a=r.length-1;a>=0;a-=1){var s=r[a];s instanceof Promise?this.initMenuPromise(s):o.push(s)}this.setState({mouseIndex:-1,keyboardIndex:n,activeSubMenu:null,menuItems:j.sortActions(o)})}initMenuPromise(e){var n=H.makeCancelable(e);this.setState(i=>({pendingItems:i.pendingItems.concat(n)})),n.then(i=>{this.setState(r=>{var o=r.pendingItems.indexOf(n);if(o>=0){var a=r.pendingItems.slice();return a.splice(o,1),{menuItems:j.sortActions(r.menuItems.concat(i)),pendingItems:a}}return null})},i=>{H.isCanceled(i)||(this.setState(r=>{var o=r.pendingItems.indexOf(n);if(o>=0){var a=r.pendingItems.slice();return a.splice(o,1),{pendingItems:a}}return null}),_e.error(i))})}cancelPromises(){var{pendingItems:e}=this.state;e.map(n=>n.cancel())}setActiveSubMenuPosition(){if(this.activeSubMenuRef.current!==null){var e=this.activeSubMenuRef.current.getBoundingClientRect();this.setState({subMenuTop:e.top,subMenuLeft:e.right,subMenuParentHeight:e.height,subMenuParentWidth:e.width})}}verifyPosition(){var e,n,i,r,{options:o,updatePosition:a,subMenuParentWidth:s,subMenuParentHeight:l,top:u,left:b}=this.props;if(!(!this.container.current||o.doNotVerifyPosition!=null&&o.doNotVerifyPosition)){var{top:p,left:m}=this.initialPosition,{width:P,height:h}=(e=(n=this.container.current)===null||n===void 0?void 0:n.getBoundingClientRect())!==null&&e!==void 0?e:{width:0,height:0},E=((i=(r=this.container.current)===null||r===void 0?void 0:r.scrollHeight)!==null&&i!==void 0?i:0)>window.innerHeight;h===0||P===0||(p+h>window.innerHeight&&(p-h-l>0?p-=h-l:p=window.innerHeight-h),m+P>window.innerWidth&&(m=m-P-s),(b!==m||u!==p)&&(this.setState({hasOverflow:E}),a(p,m)))}}handleWindowResize(){this.container.current&&this.closeMenu(!0)}handleBlur(e){if(!this.container.current){_e.warn("Container is null!");return}if(!this.container.current.contains(e.relatedTarget)){for(var n=e.relatedTarget,i=!1;n&&!i;)i=n.hasAttribute("data-dh-context-menu"),n=n.parentElement;i||this.closeMenu(!0)}}isEscapeKey(e){var{left:n}=this.props;return e==="Escape"||n<0&&e==="ArrowRight"||e==="ArrowLeft"}handleKeyDown(e){var{menuItems:n}=this.state,i=this.getKeyboardIndex(),r=i,o=!1;if(e.key==="Enter"||e.key===" "){i>=0&&i<n.length&&this.handleMenuItemClick(n[i],e);return}if(e.key==="ArrowRight"?i>=0&&i<=n.length?o=!0:r=0:this.isEscapeKey(e.key)?r=null:e.key==="ArrowUp"||e.shiftKey&&e.key==="Tab"?r=j.getNextMenuItem(r,-1,n):(e.key==="ArrowDown"||e.key==="Tab")&&(r=j.getNextMenuItem(r,1,n)),o){this.openSubMenu(i),e.preventDefault(),e.stopPropagation();return}i!==r&&(r!==null?this.setKeyboardIndex(r):(this.closeMenu(),this.oldFocus instanceof HTMLElement&&this.oldFocus.focus()),e.preventDefault(),e.stopPropagation())}openSubMenu(e){var{menuItems:n,activeSubMenu:i}=this.state,r=n[e].actions?e:null;i!==r&&this.setState({activeSubMenu:r,subMenuTop:null,subMenuLeft:null})}closeMenu(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1,{closeMenu:n,onMenuClosed:i}=this.props;cancelAnimationFrame(this.rAF),this.rAF=window.requestAnimationFrame(()=>{n(e),i(this)})}closeSubMenu(){this.setState({activeSubMenu:null})}handleCloseSubMenu(e){e?this.closeMenu(!0):this.closeSubMenu()}handleMenuItemClick(e,n){n.preventDefault(),n.stopPropagation();var{menuItems:i}=this.state;e!=null&&(e.disabled===void 0||!e.disabled)&&(e.actions!=null?this.openSubMenu(i.indexOf(e)):e.action!=null&&(e.action(n.nativeEvent),this.closeMenu(!0)))}handleMenuItemContextMenu(e,n){n.metaKey||this.handleMenuItemClick(e,n)}handleMenuItemMouseMove(e){var{menuItems:n}=this.state,i=n.indexOf(e);this.setMouseIndex(i),i>=0&&i<n.length&&(e.disabled===void 0||!e.disabled)&&this.openSubMenu(i)}handleMouseLeave(){this.setMouseIndex(-1)}render(){for(var e=[],{top:n,left:i}=this.props,{activeSubMenu:r,hasOverflow:o,keyboardIndex:a,menuItems:s,mouseIndex:l,pendingItems:u,subMenuTop:b,subMenuLeft:p,subMenuParentWidth:m,subMenuParentHeight:P}=this.state,h=0;h<s.length;h+=1){var E=s[h];h>0&&E.group!==s[h-1].group&&e.push(d.jsx("hr",{},"".concat(h,".separator")));var y=d.jsx(_t,{ref:r===h?this.activeSubMenuRef:null,isKeyboardSelected:a===h,isMouseSelected:l===h,menuItem:E,closeMenu:this.handleCloseSubMenu,onMenuItemClick:this.handleMenuItemClick,onMenuItemMouseMove:this.handleMenuItemMouseMove,onMenuItemContextMenu:this.handleMenuItemContextMenu},h);e.push(y)}var O=null;u.length>0&&(O=d.jsx("div",{className:"loading",children:d.jsx(fn,{className:"loading-spinner-vertical-align"})}));var{menuStyle:M,"data-testid":I}=this.props,R=r!==null&&b!==null&&p!==null;return d.jsxs(d.Fragment,{children:[d.jsxs("div",{className:A({"has-overflow":o},"context-menu-container"),style:Un({top:n,left:i},M),ref:this.container,"data-dh-context-menu":!0,onBlur:this.handleBlur,onKeyDown:this.handleKeyDown,onMouseLeave:this.handleMouseLeave,onContextMenu:K.handleContextMenu,role:"menuitem",tabIndex:0,"data-testid":I,children:[e,O]}),R&&r!==null&&b!==null&&p!==null&&d.jsx(K,{actions:s[r].actions||[],closeMenu:this.handleCloseSubMenu,top:b,left:p,updatePosition:(v,T)=>{this.setState({subMenuTop:v,subMenuLeft:T})},subMenuParentWidth:m,subMenuParentHeight:P},"sub-".concat(r))]})}}D(K,"defaultProps",{subMenuParentWidth:0,subMenuParentHeight:0,closeMenu(){},onMenuOpened(){},onMenuClosed(){},options:{},menuStyle:{},"data-testid":void 0});function De(t,e,n){return e=Wn(e),e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function Wn(t){var e=Yn(t,"string");return typeof e=="symbol"?e:String(e)}function Yn(t,e){if(typeof t!="object"||t===null)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var i=n.call(t,e||"default");if(typeof i!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}class br extends c.Component{constructor(e){super(e),De(this,"container",void 0),De(this,"openMenu",void 0),this.handleMenuClose=this.handleMenuClose.bind(this),this.handleContextMenu=this.handleContextMenu.bind(this),this.container=Y.createRef(),this.openMenu=Y.createRef(),this.state={actions:null,left:0,top:0}}componentDidMount(){var e;(e=this.container.current)!==null&&e!==void 0&&e.parentElement&&this.container.current.parentElement.addEventListener("contextmenu",this.handleContextMenu)}componentWillUnmount(){var e;(e=this.container.current)!==null&&e!==void 0&&e.parentElement&&this.container.current.parentElement.removeEventListener("contextmenu",this.handleContextMenu)}handleContextMenu(e){if(this.container.current){var n=this.container.current.getBoundingClientRect(),i=e.clientY-n.top,r=e.clientX-n.left,{actions:o}=this.state;if(o!=null&&e.target===this.container.current){e.preventDefault(),this.setState({actions:null},()=>{var s=document.elementFromPoint(r,i),l=new MouseEvent("contextmenu",{clientX:e.clientX,clientY:e.clientY,bubbles:!0,cancelable:!0});s==null||s.dispatchEvent(l)});return}if(j.isContextActionEvent(e)&&!(e.metaKey||e.ctrlKey)){var a=j.getMenuItems(e.contextActions);a.length!==0&&(e.preventDefault(),this.setState({actions:a,top:i,left:r}))}}}handleMenuClose(e){e===this.openMenu.current&&this.setState({actions:null})}render(){var e=null,{"data-testid":n}=this.props,{actions:i,top:r,left:o}=this.state;return i&&(e=d.jsx(K,{ref:this.openMenu,actions:i,onMenuClosed:this.handleMenuClose,top:r,left:o,updatePosition:(a,s)=>{this.setState({top:a,left:s})},"data-testid":n})),d.jsx("div",{className:A("context-menu-root",{active:i}),ref:this.container,children:e})}}function at(t,e,n){return e=qn(e),e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function qn(t){var e=Gn(t,"string");return typeof e=="symbol"?e:String(e)}function Gn(t,e){if(typeof t!="object"||t===null)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var i=n.call(t,e||"default");if(typeof i!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}class k extends c.Component{static handleEnter(e){var n=e;n.style.height="0"}static handleEntering(e){var n=e;n.style.height="".concat(k.getHeight(n),"px")}static handleExiting(e){var n=e;n.style.height="0"}static handleExit(e){var n=e;n.style.height="".concat(k.getHeight(n),"px")}static getHeight(e){var n=e.scrollWidth-e.clientWidth;return e.scrollHeight-n}constructor(e){super(e),this.handleEntered=this.handleEntered.bind(this)}handleEntered(e){var n=e;n.style.height="";var{autoFocusOnShow:i}=this.props;if(i!==void 0&&i){var r=n.querySelector("input, select, textarea");r!=null&&r.focus()}}render(){var{children:e,className:n,in:i,"data-testid":r}=this.props;return d.jsx(Pt,{in:i,classNames:{enterActive:"collapsing",enterDone:"collapse show",exitActive:"collapsing",exitDone:"collapse"},onEnter:k.handleEnter,onEntering:k.handleEntering,onEntered:this.handleEntered,onExit:k.handleExit,onExiting:k.handleExiting,timeout:350,children:o=>d.jsx("div",{className:A({collapse:o==="exited"},n),"data-testid":r,children:e})})}}at(k,"propTypes",{className:q.string,in:q.bool.isRequired,children:q.node.isRequired,autoFocusOnShow:q.bool,"data-testid":q.string});at(k,"defaultProps",{className:"",autoFocusOnShow:!1,"data-testid":void 0});function Ae(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter(function(r){return Object.getOwnPropertyDescriptor(t,r).enumerable})),n.push.apply(n,i)}return n}function oe(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?Ae(Object(n),!0).forEach(function(i){Hn(t,i,n[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Ae(Object(n)).forEach(function(i){Object.defineProperty(t,i,Object.getOwnPropertyDescriptor(n,i))})}return t}function Hn(t,e,n){return e=Kn(e),e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function Kn(t){var e=zn(t,"string");return typeof e=="symbol"?e:String(e)}function zn(t,e){if(typeof t!="object"||t===null)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var i=n.call(t,e||"default");if(typeof i!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}var lt=c.memo(t=>{var{tab:e,onClose:n,onSelect:i,isActive:r,activeRef:o,index:a,isDraggable:s,contextActions:l}=t,{key:u,isClosable:b=n!=null,title:p,icon:m}=e,P;return m!=null&&(P=Y.isValidElement(m)?m:d.jsx(V,{icon:m})),d.jsx(wt,{draggableId:u,index:a,isDragDisabled:!s,children:(h,E)=>d.jsxs("div",{className:"context-menu-wrapper",ref:r?o:null,children:[d.jsxs("div",oe(oe(oe({ref:h.innerRef},h.draggableProps),h.dragHandleProps),{},{className:A("btn btn-link btn-nav-tab",{active:r},{dragging:E.isDragging}),"data-testid":"btn-nav-tab-".concat(p),role:"tab",tabIndex:0,onAuxClick:y=>{b&&y.button===1&&y.buttons===0&&(n==null||n(u))},onClick:y=>{if(b&&y.button===1&&y.buttons===0){n==null||n(u);return}y.button===0&&y.buttons===0&&(y.target.focus(),i(u))},onKeyPress:y=>{y.key==="Enter"&&i(u)},children:[P,p,b&&d.jsx(U,{kind:"ghost",className:"btn-nav-tab-close",onClick:y=>{n==null||n(u),y.stopPropagation(),y.preventDefault()},icon:hn,tooltip:"Close"})]})),d.jsx(Dt,{actions:l})]})},u)});lt.displayName="NavTab";function Me(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter(function(r){return Object.getOwnPropertyDescriptor(t,r).enumerable})),n.push.apply(n,i)}return n}function Ne(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?Me(Object(n),!0).forEach(function(i){Xn(t,i,n[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Me(Object(n)).forEach(function(i){Object.defineProperty(t,i,Object.getOwnPropertyDescriptor(n,i))})}return t}function Xn(t,e,n){return e=Qn(e),e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function Qn(t){var e=Jn(t,"string");return typeof e=="symbol"?e:String(e)}function Jn(t,e){if(typeof t!="object"||t===null)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var i=n.call(t,e||"default");if(typeof i!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}var Zn=500,Vn=.01,ei=5e-4;function je(t){return t.scrollLeft===0}function Ue(t){return t.scrollLeft+t.clientWidth===t.scrollWidth||t.scrollWidth===0}function ti(t,e,n){var{isClosable:i=!1,key:r}=t,o=[];if(i&&n!=null){o.push({title:"Close",order:10,group:20,action:()=>{n(r)}});for(var a=!0,s=e.length-1;s>0&&e[s].key!==t.key;s-=1)if(e[s].isClosable===!0){a=!1;break}o.push({title:"Close to the Right",order:20,group:20,action:()=>{for(var l=e.length-1;l>0&&e[l].key!==r;l-=1)e[l].isClosable===!0&&n(e[l].key)},disabled:a}),o.push({title:"Close All",order:30,group:20,action:()=>{e.forEach(l=>{l.isClosable===!0&&n(l.key)})}})}return o}function vr(t){var{activeKey:e,tabs:n,onSelect:i,onReorder:r,onClose:o,makeContextActions:a}=t,s=c.useRef(),[l,u]=c.useState(!0),[b,p]=c.useState(!0),[m,P]=c.useState(!0),h=c.useCallback(()=>{s.current!=null&&(s.current.clientWidth<s.current.scrollWidth&&n.length>0?u(!0):u(!1),p(je(s.current)),P(Ue(s.current)))},[n]);st(s.current,h);var E=c.useCallback(f=>{Te.stopDragging(),f.destination&&(r==null||r(f.source.index,f.destination.index))},[r]),y=c.useCallback(()=>{if(s.current!=null){var f=je(s.current);f!==b&&p(f);var g=Ue(s.current);g!==m&&P(g)}},[b,m]),O=c.useRef({cancelClick:!1}),M=c.useCallback(()=>{if(!(s.current==null||O.current.cancelClick))for(var{children:f}=s.current,g=f.length-1;g>=0;g-=1){var w=f[g];if(w.offsetLeft<s.current.scrollLeft-5){w.scrollIntoView({behavior:"smooth",block:"nearest",inline:"start"});return}}},[]),I=c.useCallback(()=>{if(!(s.current==null||O.current.cancelClick))for(var{children:f}=s.current,g=0;g<f.length;g+=1){var w=f[g];if(w.offsetLeft+5>s.current.scrollLeft+s.current.offsetWidth){w.scrollIntoView({behavior:"smooth",block:"nearest",inline:"end"});return}}},[]),R=c.useCallback(function(f,g){var w=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,x=arguments.length>3?arguments[3]:void 0,L=s.current;L!=null&&(O.current.cancelClick=!0,f==="left"?L.scrollLeft=g-w:f==="right"&&(L.scrollLeft=g+w),O.current.rAF=requestAnimationFrame(X=>{var be=x??X,ve=X-be,re=Vn*ve+.5*ei*ve**2;re=Math.min(re,L.scrollWidth),R(f,g,re,be)}))},[]),v=c.useCallback(()=>{var{holdTimer:f,rAF:g}=O.current;f!=null&&(clearTimeout(f),O.current.holdTimer=void 0),g!=null&&(cancelAnimationFrame(g),O.current.rAF=void 0),window.removeEventListener("mouseup",v)},[]);c.useEffect(()=>()=>window.removeEventListener("mouseup",v),[v]);var T=c.useCallback(f=>{s.current!=null&&(O.current.holdTimer=window.setTimeout(R,Zn,f,s.current.scrollLeft)),O.current.cancelClick=!1,window.addEventListener("mouseup",v)},[v,R]),C=c.useCallback(()=>{T("left")},[T]),ne=c.useCallback(()=>{T("right")},[T]);c.useEffect(function(){var g,w=x=>{x.stopPropagation(),x.preventDefault();var L=x.currentTarget,X=Math.abs(x.deltaY)>Math.abs(x.deltaX)?x.deltaY:x.deltaX;L.scrollLeft+=Ot(X,-30,30)};return(g=s.current)===null||g===void 0||g.addEventListener("wheel",w),()=>{var x;(x=s.current)===null||x===void 0||x.removeEventListener("wheel",w)}},[]);var mt=c.useMemo(()=>{var f=new Map;return n.forEach(g=>{var{key:w}=g,x=[()=>ti(g,n,o),()=>{var L;return(L=a==null?void 0:a(g))!==null&&L!==void 0?L:[]}];f.set(w,x)}),f},[a,n,o]),ie=c.useRef(null),yt=n.find(f=>f.key===e),gt=n.map((f,g)=>{var{key:w}=f,x=f===yt;return d.jsx(lt,{tab:f,index:g,isActive:x,activeRef:ie,onSelect:i,onClose:o,isDraggable:r!=null,contextActions:mt.get(w)},w)});return c.useEffect(function(){ie.current!=null&&ie.current.scrollIntoView({block:"nearest",inline:"nearest"})},[e]),d.jsxs("nav",{className:"nav-container",children:[l&&d.jsx(U,{kind:"ghost",icon:d.jsx(V,{icon:mn,transform:"grow-4"}),className:"tab-controls-btn tab-controls-btn-left",tooltip:"Scroll left",onClick:M,onMouseDown:C,disabled:b}),d.jsx(xt,{onDragStart:Te.startDragging,onDragEnd:E,children:d.jsx(St,{droppableId:"droppable-tab-navigation",direction:"horizontal",children:(f,g)=>d.jsxs("div",Ne(Ne({ref:w=>{w!=null&&(s.current=w,f.innerRef(w))}},f.droppableProps),{},{className:A("nav nav-tabs",{dragging:g.draggingFromThisWith}),role:"tablist",onScroll:y,children:[gt,f.placeholder]}))})}),l&&d.jsx(U,{kind:"ghost",icon:d.jsx(V,{icon:yn,transform:"grow-4"}),className:"tab-controls-btn tab-controls-btn-right",tooltip:"Scroll right",onClick:I,onMouseDown:ne,disabled:m})]})}function ni(t,e){var n=At(),i=c.useMemo(()=>new n.CoreClient(t,e),[n,t,e]);return c.useEffect(()=>()=>{i.disconnect()},[i]),i}var ut=c.createContext(null);function Pr(t){var{serverUrl:e,options:n,children:i}=t,r=ni(e,n);return d.jsx(ut.Provider,{value:r,children:i})}function ii(){return ee(ut,"No Client available in useClient. Was code wrapped in ClientBootstrap or ClientContext.Provider?")}var ri={$schema:"http://json-schema.org/draft-07/schema#",title:"Options",type:"object",properties:{"allowed-confusables":{description:'A list of allowed "confusable" Unicode characters to ignore when enforcing `RUF001`, `RUF002`, and `RUF003`.',deprecated:!0,type:["array","null"],items:{type:"string",maxLength:1,minLength:1}},builtins:{description:"A list of builtins to treat as defined references, in addition to the system builtins.",type:["array","null"],items:{type:"string"}},"cache-dir":{description:"A path to the cache directory.\n\nBy default, Ruff stores cache results in a `.ruff_cache` directory in the current project root.\n\nHowever, Ruff will also respect the `RUFF_CACHE_DIR` environment variable, which takes precedence over that default.\n\nThis setting will override even the `RUFF_CACHE_DIR` environment variable, if set.",type:["string","null"]},"dummy-variable-rgx":{description:'A regular expression used to identify "dummy" variables, or those which should be ignored when enforcing (e.g.) unused-variable rules. The default expression matches `_`, `__`, and `_var`, but not `_var_`.',deprecated:!0,type:["string","null"]},exclude:{description:"A list of file patterns to exclude from formatting and linting.\n\nExclusions are based on globs, and can be either:\n\n- Single-path patterns, like `.mypy_cache` (to exclude any directory named `.mypy_cache` in the tree), `foo.py` (to exclude any file named `foo.py`), or `foo_*.py` (to exclude any file matching `foo_*.py` ). - Relative patterns, like `directory/foo.py` (to exclude that specific file) or `directory/*.py` (to exclude any Python files in `directory`). Note that these paths are relative to the project root (e.g., the directory containing your `pyproject.toml`).\n\nFor more information on the glob syntax, refer to the [`globset` documentation](https://docs.rs/globset/latest/globset/#syntax).\n\nNote that you'll typically want to use [`extend-exclude`](#extend-exclude) to modify the excluded paths.",type:["array","null"],items:{type:"string"}},"explicit-preview-rules":{description:"Whether to require exact codes to select preview rules. When enabled, preview rules will not be selected by prefixes — the full code of each preview rule will be required to enable the rule.",deprecated:!0,type:["boolean","null"]},extend:{description:"A path to a local `pyproject.toml` file to merge into this configuration. User home directory and environment variables will be expanded.\n\nTo resolve the current `pyproject.toml` file, Ruff will first resolve this base configuration file, then merge in any properties defined in the current configuration file.",type:["string","null"]},"extend-exclude":{description:"A list of file patterns to omit from formatting and linting, in addition to those specified by [`exclude`](#exclude).\n\nExclusions are based on globs, and can be either:\n\n- Single-path patterns, like `.mypy_cache` (to exclude any directory named `.mypy_cache` in the tree), `foo.py` (to exclude any file named `foo.py`), or `foo_*.py` (to exclude any file matching `foo_*.py` ). - Relative patterns, like `directory/foo.py` (to exclude that specific file) or `directory/*.py` (to exclude any Python files in `directory`). Note that these paths are relative to the project root (e.g., the directory containing your `pyproject.toml`).\n\nFor more information on the glob syntax, refer to the [`globset` documentation](https://docs.rs/globset/latest/globset/#syntax).",type:["array","null"],items:{type:"string"}},"extend-fixable":{description:"A list of rule codes or prefixes to consider fixable, in addition to those specified by [`fixable`](#lint_fixable).",deprecated:!0,type:["array","null"],items:{$ref:"#/definitions/RuleSelector"}},"extend-ignore":{description:"A list of rule codes or prefixes to ignore, in addition to those specified by `ignore`.",deprecated:!0,type:["array","null"],items:{$ref:"#/definitions/RuleSelector"}},"extend-include":{description:"A list of file patterns to include when linting, in addition to those specified by [`include`](#include).\n\nInclusion are based on globs, and should be single-path patterns, like `*.pyw`, to include any file with the `.pyw` extension.\n\nFor more information on the glob syntax, refer to the [`globset` documentation](https://docs.rs/globset/latest/globset/#syntax).",type:["array","null"],items:{type:"string"}},"extend-per-file-ignores":{description:"A list of mappings from file pattern to rule codes or prefixes to exclude, in addition to any rules excluded by [`per-file-ignores`](#lint_per-file-ignores).",deprecated:!0,type:["object","null"],additionalProperties:{type:"array",items:{$ref:"#/definitions/RuleSelector"}}},"extend-safe-fixes":{description:"A list of rule codes or prefixes for which unsafe fixes should be considered safe.",deprecated:!0,type:["array","null"],items:{$ref:"#/definitions/RuleSelector"}},"extend-select":{description:"A list of rule codes or prefixes to enable, in addition to those specified by [`select`](#lint_select).",deprecated:!0,type:["array","null"],items:{$ref:"#/definitions/RuleSelector"}},"extend-unfixable":{description:"A list of rule codes or prefixes to consider non-auto-fixable, in addition to those specified by [`unfixable`](#lint_unfixable).",deprecated:!0,type:["array","null"],items:{$ref:"#/definitions/RuleSelector"}},"extend-unsafe-fixes":{description:"A list of rule codes or prefixes for which safe fixes should be considered unsafe.",deprecated:!0,type:["array","null"],items:{$ref:"#/definitions/RuleSelector"}},external:{description:"A list of rule codes or prefixes that are unsupported by Ruff, but should be preserved when (e.g.) validating `# noqa` directives. Useful for retaining `# noqa` directives that cover plugins not yet implemented by Ruff.",deprecated:!0,type:["array","null"],items:{type:"string"}},fix:{description:"Enable fix behavior by-default when running `ruff` (overridden by the `--fix` and `--no-fix` command-line flags). Only includes automatic fixes unless `--unsafe-fixes` is provided.",type:["boolean","null"]},"fix-only":{description:"Like [`fix`](#fix), but disables reporting on leftover violation. Implies [`fix`](#fix).",type:["boolean","null"]},fixable:{description:"A list of rule codes or prefixes to consider fixable. By default, all rules are considered fixable.",deprecated:!0,type:["array","null"],items:{$ref:"#/definitions/RuleSelector"}},"flake8-annotations":{description:"Options for the `flake8-annotations` plugin.",deprecated:!0,anyOf:[{$ref:"#/definitions/Flake8AnnotationsOptions"},{type:"null"}]},"flake8-bandit":{description:"Options for the `flake8-bandit` plugin.",deprecated:!0,anyOf:[{$ref:"#/definitions/Flake8BanditOptions"},{type:"null"}]},"flake8-boolean-trap":{description:"Options for the `flake8-boolean-trap` plugin.",deprecated:!0,anyOf:[{$ref:"#/definitions/Flake8BooleanTrapOptions"},{type:"null"}]},"flake8-bugbear":{description:"Options for the `flake8-bugbear` plugin.",deprecated:!0,anyOf:[{$ref:"#/definitions/Flake8BugbearOptions"},{type:"null"}]},"flake8-builtins":{description:"Options for the `flake8-builtins` plugin.",deprecated:!0,anyOf:[{$ref:"#/definitions/Flake8BuiltinsOptions"},{type:"null"}]},"flake8-comprehensions":{description:"Options for the `flake8-comprehensions` plugin.",deprecated:!0,anyOf:[{$ref:"#/definitions/Flake8ComprehensionsOptions"},{type:"null"}]},"flake8-copyright":{description:"Options for the `flake8-copyright` plugin.",deprecated:!0,anyOf:[{$ref:"#/definitions/Flake8CopyrightOptions"},{type:"null"}]},"flake8-errmsg":{description:"Options for the `flake8-errmsg` plugin.",deprecated:!0,anyOf:[{$ref:"#/definitions/Flake8ErrMsgOptions"},{type:"null"}]},"flake8-gettext":{description:"Options for the `flake8-gettext` plugin.",deprecated:!0,anyOf:[{$ref:"#/definitions/Flake8GetTextOptions"},{type:"null"}]},"flake8-implicit-str-concat":{description:"Options for the `flake8-implicit-str-concat` plugin.",deprecated:!0,anyOf:[{$ref:"#/definitions/Flake8ImplicitStrConcatOptions"},{type:"null"}]},"flake8-import-conventions":{description:"Options for the `flake8-import-conventions` plugin.",deprecated:!0,anyOf:[{$ref:"#/definitions/Flake8ImportConventionsOptions"},{type:"null"}]},"flake8-pytest-style":{description:"Options for the `flake8-pytest-style` plugin.",deprecated:!0,anyOf:[{$ref:"#/definitions/Flake8PytestStyleOptions"},{type:"null"}]},"flake8-quotes":{description:"Options for the `flake8-quotes` plugin.",deprecated:!0,anyOf:[{$ref:"#/definitions/Flake8QuotesOptions"},{type:"null"}]},"flake8-self":{description:"Options for the `flake8_self` plugin.",deprecated:!0,anyOf:[{$ref:"#/definitions/Flake8SelfOptions"},{type:"null"}]},"flake8-tidy-imports":{description:"Options for the `flake8-tidy-imports` plugin.",deprecated:!0,anyOf:[{$ref:"#/definitions/Flake8TidyImportsOptions"},{type:"null"}]},"flake8-type-checking":{description:"Options for the `flake8-type-checking` plugin.",deprecated:!0,anyOf:[{$ref:"#/definitions/Flake8TypeCheckingOptions"},{type:"null"}]},"flake8-unused-arguments":{description:"Options for the `flake8-unused-arguments` plugin.",deprecated:!0,anyOf:[{$ref:"#/definitions/Flake8UnusedArgumentsOptions"},{type:"null"}]},"force-exclude":{description:"Whether to enforce [`exclude`](#exclude) and [`extend-exclude`](#extend-exclude) patterns, even for paths that are passed to Ruff explicitly. Typically, Ruff will lint any paths passed in directly, even if they would typically be excluded. Setting `force-exclude = true` will cause Ruff to respect these exclusions unequivocally.\n\nThis is useful for [`pre-commit`](https://pre-commit.com/), which explicitly passes all changed files to the [`ruff-pre-commit`](https://github.com/astral-sh/ruff-pre-commit) plugin, regardless of whether they're marked as excluded by Ruff's own settings.",type:["boolean","null"]},format:{description:"Options to configure code formatting.",anyOf:[{$ref:"#/definitions/FormatOptions"},{type:"null"}]},ignore:{description:"A list of rule codes or prefixes to ignore. Prefixes can specify exact rules (like `F841`), entire categories (like `F`), or anything in between.\n\nWhen breaking ties between enabled and disabled rules (via `select` and `ignore`, respectively), more specific prefixes override less specific prefixes.",deprecated:!0,type:["array","null"],items:{$ref:"#/definitions/RuleSelector"}},"ignore-init-module-imports":{description:"Avoid automatically removing unused imports in `__init__.py` files. Such imports will still be flagged, but with a dedicated message suggesting that the import is either added to the module's `__all__` symbol, or re-exported with a redundant alias (e.g., `import os as os`).\n\nThis option is enabled by default, but you can opt-in to removal of imports via an unsafe fix.",deprecated:!0,type:["boolean","null"]},include:{description:"A list of file patterns to include when linting.\n\nInclusion are based on globs, and should be single-path patterns, like `*.pyw`, to include any file with the `.pyw` extension. `pyproject.toml` is included here not for configuration but because we lint whether e.g. the `[project]` matches the schema.\n\nNotebook files (`.ipynb` extension) are included by default on Ruff 0.6.0+.\n\nFor more information on the glob syntax, refer to the [`globset` documentation](https://docs.rs/globset/latest/globset/#syntax).",type:["array","null"],items:{type:"string"}},"indent-width":{description:`The number of spaces per indentation level (tab).
|
|
2
2
|
|
|
3
3
|
Used by the formatter and when enforcing long-line violations (like \`E501\`) to determine the visual width of a tab.
|
|
4
4
|
|
|
@@ -79,4 +79,4 @@ foo, bar, quux = this_is_a_long_line(lion, hippo, lemur, bear) ''' pass \`\`\`
|
|
|
79
79
|
( foo, bar, quux, ) = this_is_a_long_line( lion, hippo, lemur, bear, ) """ pass \`\`\``,anyOf:[{$ref:"#/definitions/DocstringCodeLineWidth"},{type:"null"}]},exclude:{description:"A list of file patterns to exclude from formatting in addition to the files excluded globally (see [`exclude`](#exclude), and [`extend-exclude`](#extend-exclude)).\n\nExclusions are based on globs, and can be either:\n\n- Single-path patterns, like `.mypy_cache` (to exclude any directory named `.mypy_cache` in the tree), `foo.py` (to exclude any file named `foo.py`), or `foo_*.py` (to exclude any file matching `foo_*.py` ). - Relative patterns, like `directory/foo.py` (to exclude that specific file) or `directory/*.py` (to exclude any Python files in `directory`). Note that these paths are relative to the project root (e.g., the directory containing your `pyproject.toml`).\n\nFor more information on the glob syntax, refer to the [`globset` documentation](https://docs.rs/globset/latest/globset/#syntax).",type:["array","null"],items:{type:"string"}},"indent-style":{description:'Whether to use spaces or tabs for indentation.\n\n`indent-style = "space"` (default):\n\n```python def f(): print("Hello") # Spaces indent the `print` statement. ```\n\n`indent-style = "tab"`:\n\n```python def f(): print("Hello") # A tab `\\t` indents the `print` statement. ```\n\nPEP 8 recommends using spaces for [indentation](https://peps.python.org/pep-0008/#indentation). We care about accessibility; if you do not need tabs for accessibility, we do not recommend you use them.\n\nSee [`indent-width`](#indent-width) to configure the number of spaces per indentation and the tab width.',anyOf:[{$ref:"#/definitions/IndentStyle"},{type:"null"}]},"line-ending":{description:"The character Ruff uses at the end of a line.\n\n* `auto`: The newline style is detected automatically on a file per file basis. Files with mixed line endings will be converted to the first detected line ending. Defaults to `\\n` for files that contain no line endings. * `lf`: Line endings will be converted to `\\n`. The default line ending on Unix. * `cr-lf`: Line endings will be converted to `\\r\\n`. The default line ending on Windows. * `native`: Line endings will be converted to `\\n` on Unix and `\\r\\n` on Windows.",anyOf:[{$ref:"#/definitions/LineEnding"},{type:"null"}]},preview:{description:"Whether to enable the unstable preview style formatting.",type:["boolean","null"]},"quote-style":{description:'Configures the preferred quote character for strings. The recommended options are\n\n* `double` (default): Use double quotes `"` * `single`: Use single quotes `\'`\n\nIn compliance with [PEP 8](https://peps.python.org/pep-0008/) and [PEP 257](https://peps.python.org/pep-0257/), Ruff prefers double quotes for triple quoted strings and docstrings even when using `quote-style = "single"`.\n\nRuff deviates from using the configured quotes if doing so prevents the need for escaping quote characters inside the string:\n\n```python a = "a string without any quotes" b = "It\'s monday morning" ```\n\nRuff will change the quotes of the string assigned to `a` to single quotes when using `quote-style = "single"`. However, Ruff uses double quotes for the string assigned to `b` because using single quotes would require escaping the `\'`, which leads to the less readable code: `\'It\\\'s monday morning\'`.\n\nIn addition, Ruff supports the quote style `preserve` for projects that already use a mixture of single and double quotes and can\'t migrate to the `double` or `single` style. The quote style `preserve` leaves the quotes of all strings unchanged.',anyOf:[{$ref:"#/definitions/QuoteStyle"},{type:"null"}]},"skip-magic-trailing-comma":{description:"Ruff uses existing trailing commas as an indication that short lines should be left separate. If this option is set to `true`, the magic trailing comma is ignored.\n\nFor example, Ruff leaves the arguments separate even though collapsing the arguments to a single line doesn't exceed the line length if `skip-magic-trailing-comma = false`:\n\n```python # The arguments remain on separate lines because of the trailing comma after `b` def test( a, b, ): pass ```\n\nSetting `skip-magic-trailing-comma = true` changes the formatting to:\n\n```python # The arguments remain on separate lines because of the trailing comma after `b` def test(a, b): pass ```",type:["boolean","null"]}},additionalProperties:!1},ImportSection:{anyOf:[{$ref:"#/definitions/ImportType"},{type:"string"}]},ImportType:{type:"string",enum:["future","standard-library","third-party","first-party","local-folder"]},IndentStyle:{oneOf:[{description:"Use tabs to indent code.",type:"string",enum:["tab"]},{description:"Use [`IndentWidth`] spaces to indent code.",type:"string",enum:["space"]}]},IndentWidth:{description:"The size of a tab.",type:"integer",format:"uint8",minimum:1},IsortOptions:{type:"object",properties:{"case-sensitive":{description:"Sort imports taking into account case sensitivity.",type:["boolean","null"]},classes:{description:"An override list of tokens to always recognize as a Class for [`order-by-type`](#lint_isort_order-by-type) regardless of casing.",type:["array","null"],items:{type:"string"}},"combine-as-imports":{description:"Combines as imports on the same line. See isort's [`combine-as-imports`](https://pycqa.github.io/isort/docs/configuration/options.html#combine-as-imports) option.",type:["boolean","null"]},constants:{description:"An override list of tokens to always recognize as a CONSTANT for [`order-by-type`](#lint_isort_order-by-type) regardless of casing.",type:["array","null"],items:{type:"string"}},"default-section":{description:"Define a default section for any imports that don't fit into the specified [`section-order`](#lint_isort_section-order).",anyOf:[{$ref:"#/definitions/ImportSection"},{type:"null"}]},"detect-same-package":{description:"Whether to automatically mark imports from within the same package as first-party. For example, when `detect-same-package = true`, then when analyzing files within the `foo` package, any imports from within the `foo` package will be considered first-party.\n\nThis heuristic is often unnecessary when `src` is configured to detect all first-party sources; however, if `src` is _not_ configured, this heuristic can be useful to detect first-party imports from _within_ (but not _across_) first-party packages.",type:["boolean","null"]},"extra-standard-library":{description:"A list of modules to consider standard-library, in addition to those known to Ruff in advance.\n\nSupports glob patterns. For more information on the glob syntax, refer to the [`globset` documentation](https://docs.rs/globset/latest/globset/#syntax).",type:["array","null"],items:{type:"string"}},"force-single-line":{description:"Forces all from imports to appear on their own line.",type:["boolean","null"]},"force-sort-within-sections":{description:"Don't sort straight-style imports (like `import sys`) before from-style imports (like `from itertools import groupby`). Instead, sort the imports by module, independent of import style.",type:["boolean","null"]},"force-to-top":{description:"Force specific imports to the top of their appropriate section.",type:["array","null"],items:{type:"string"}},"force-wrap-aliases":{description:"Force `import from` statements with multiple members and at least one alias (e.g., `import A as B`) to wrap such that every line contains exactly one member. For example, this formatting would be retained, rather than condensing to a single line:\n\n```python from .utils import ( test_directory as test_directory, test_id as test_id ) ```\n\nNote that this setting is only effective when combined with `combine-as-imports = true`. When [`combine-as-imports`](#lint_isort_combine-as-imports) isn't enabled, every aliased `import from` will be given its own line, in which case, wrapping is not necessary.\n\nWhen using the formatter, ensure that [`format.skip-magic-trailing-comma`](#format_skip-magic-trailing-comma) is set to `false` (default) when enabling `force-wrap-aliases` to avoid that the formatter collapses members if they all fit on a single line.",type:["boolean","null"]},"forced-separate":{description:"A list of modules to separate into auxiliary block(s) of imports, in the order specified.",type:["array","null"],items:{type:"string"}},"from-first":{description:"Whether to place `import from` imports before straight imports when sorting.\n\nFor example, by default, imports will be sorted such that straight imports appear before `import from` imports, as in: ```python import os import sys from typing import List ```\n\nSetting `from-first = true` will instead sort such that `import from` imports appear before straight imports, as in: ```python from typing import List import os import sys ```",type:["boolean","null"]},"known-first-party":{description:"A list of modules to consider first-party, regardless of whether they can be identified as such via introspection of the local filesystem.\n\nSupports glob patterns. For more information on the glob syntax, refer to the [`globset` documentation](https://docs.rs/globset/latest/globset/#syntax).",type:["array","null"],items:{type:"string"}},"known-local-folder":{description:"A list of modules to consider being a local folder. Generally, this is reserved for relative imports (`from . import module`).\n\nSupports glob patterns. For more information on the glob syntax, refer to the [`globset` documentation](https://docs.rs/globset/latest/globset/#syntax).",type:["array","null"],items:{type:"string"}},"known-third-party":{description:"A list of modules to consider third-party, regardless of whether they can be identified as such via introspection of the local filesystem.\n\nSupports glob patterns. For more information on the glob syntax, refer to the [`globset` documentation](https://docs.rs/globset/latest/globset/#syntax).",type:["array","null"],items:{type:"string"}},"length-sort":{description:"Sort imports by their string length, such that shorter imports appear before longer imports. For example, by default, imports will be sorted alphabetically, as in: ```python import collections import os ```\n\nSetting `length-sort = true` will instead sort such that shorter imports appear before longer imports, as in: ```python import os import collections ```",type:["boolean","null"]},"length-sort-straight":{description:"Sort straight imports by their string length. Similar to [`length-sort`](#lint_isort_length-sort), but applies only to straight imports and doesn't affect `from` imports.",type:["boolean","null"]},"lines-after-imports":{description:"The number of blank lines to place after imports. Use `-1` for automatic determination.\n\nRuff uses at most one blank line after imports in typing stub files (files with `.pyi` extension) in accordance to the typing style recommendations ([source](https://typing.readthedocs.io/en/latest/source/stubs.html#blank-lines)).\n\nWhen using the formatter, only the values `-1`, `1`, and `2` are compatible because it enforces at least one empty and at most two empty lines after imports.",type:["integer","null"],format:"int"},"lines-between-types":{description:'The number of lines to place between "direct" and `import from` imports.\n\nWhen using the formatter, only the values `0` and `1` are compatible because it preserves up to one empty line after imports in nested blocks.',type:["integer","null"],format:"uint",minimum:0},"no-lines-before":{description:"A list of sections that should _not_ be delineated from the previous section via empty lines.",type:["array","null"],items:{$ref:"#/definitions/ImportSection"}},"no-sections":{description:"Put all imports into the same section bucket.\n\nFor example, rather than separating standard library and third-party imports, as in: ```python import os import sys\n\nimport numpy import pandas ```\n\nSetting `no-sections = true` will instead group all imports into a single section: ```python import numpy import os import pandas import sys ```",type:["boolean","null"]},"order-by-type":{description:"Order imports by type, which is determined by case, in addition to alphabetically.",type:["boolean","null"]},"relative-imports-order":{description:'Whether to place "closer" imports (fewer `.` characters, most local) before "further" imports (more `.` characters, least local), or vice versa.\n\nThe default ("furthest-to-closest") is equivalent to isort\'s [`reverse-relative`](https://pycqa.github.io/isort/docs/configuration/options.html#reverse-relative) default (`reverse-relative = false`); setting this to "closest-to-furthest" is equivalent to isort\'s `reverse-relative = true`.',anyOf:[{$ref:"#/definitions/RelativeImportsOrder"},{type:"null"}]},"required-imports":{description:"Add the specified import line to all files.",type:["array","null"],items:{$ref:"#/definitions/NameImports"}},"section-order":{description:"Override in which order the sections should be output. Can be used to move custom sections.",type:["array","null"],items:{$ref:"#/definitions/ImportSection"}},sections:{description:'A list of mappings from section names to modules.\n\nBy default, imports are categorized according to their type (e.g., `future`, `third-party`, and so on). This setting allows you to group modules into custom sections, to augment or override the built-in sections.\n\nFor example, to group all testing utilities, you could create a `testing` section: ```toml testing = ["pytest", "hypothesis"] ```\n\nThe values in the list are treated as glob patterns. For example, to match all packages in the LangChain ecosystem (`langchain-core`, `langchain-openai`, etc.): ```toml langchain = ["langchain-*"] ```\n\nCustom sections should typically be inserted into the [`section-order`](#lint_isort_section-order) list to ensure that they\'re displayed as a standalone group and in the intended order, as in: ```toml section-order = [ "future", "standard-library", "third-party", "first-party", "local-folder", "testing" ] ```\n\nIf a custom section is omitted from [`section-order`](#lint_isort_section-order), imports in that section will be assigned to the [`default-section`](#lint_isort_default-section) (which defaults to `third-party`).',type:["object","null"],additionalProperties:{type:"array",items:{type:"string"}}},"single-line-exclusions":{description:"One or more modules to exclude from the single line rule.",type:["array","null"],items:{type:"string"}},"split-on-trailing-comma":{description:"If a comma is placed after the last member in a multi-line import, then the imports will never be folded into one line.\n\nSee isort's [`split-on-trailing-comma`](https://pycqa.github.io/isort/docs/configuration/options.html#split-on-trailing-comma) option.\n\nWhen using the formatter, ensure that [`format.skip-magic-trailing-comma`](#format_skip-magic-trailing-comma) is set to `false` (default) when enabling `split-on-trailing-comma` to avoid that the formatter removes the trailing commas.",type:["boolean","null"]},variables:{description:"An override list of tokens to always recognize as a var for [`order-by-type`](#lint_isort_order-by-type) regardless of casing.",type:["array","null"],items:{type:"string"}}},additionalProperties:!1},LineEnding:{oneOf:[{description:"The newline style is detected automatically on a file per file basis. Files with mixed line endings will be converted to the first detected line ending. Defaults to [`LineEnding::Lf`] for a files that contain no line endings.",type:"string",enum:["auto"]},{description:"Line endings will be converted to `\\n` as is common on Unix.",type:"string",enum:["lf"]},{description:"Line endings will be converted to `\\r\\n` as is common on Windows.",type:"string",enum:["cr-lf"]},{description:"Line endings will be converted to `\\n` on Unix and `\\r\\n` on Windows.",type:"string",enum:["native"]}]},LineLength:{description:`The length of a line of text that is considered too long.
|
|
80
80
|
|
|
81
81
|
The allowed range of values is 1..=320`,type:"integer",format:"uint16",maximum:320,minimum:1},LineWidth:{description:"The maximum visual width to which the formatter should try to limit a line.",type:"integer",format:"uint16",minimum:1},LintOptions:{description:"Configures how Ruff checks your code.\n\nOptions specified in the `lint` section take precedence over the deprecated top-level settings.",type:"object",properties:{"allowed-confusables":{description:'A list of allowed "confusable" Unicode characters to ignore when enforcing `RUF001`, `RUF002`, and `RUF003`.',type:["array","null"],items:{type:"string",maxLength:1,minLength:1}},"dummy-variable-rgx":{description:'A regular expression used to identify "dummy" variables, or those which should be ignored when enforcing (e.g.) unused-variable rules. The default expression matches `_`, `__`, and `_var`, but not `_var_`.',type:["string","null"]},exclude:{description:"A list of file patterns to exclude from linting in addition to the files excluded globally (see [`exclude`](#exclude), and [`extend-exclude`](#extend-exclude)).\n\nExclusions are based on globs, and can be either:\n\n- Single-path patterns, like `.mypy_cache` (to exclude any directory named `.mypy_cache` in the tree), `foo.py` (to exclude any file named `foo.py`), or `foo_*.py` (to exclude any file matching `foo_*.py` ). - Relative patterns, like `directory/foo.py` (to exclude that specific file) or `directory/*.py` (to exclude any Python files in `directory`). Note that these paths are relative to the project root (e.g., the directory containing your `pyproject.toml`).\n\nFor more information on the glob syntax, refer to the [`globset` documentation](https://docs.rs/globset/latest/globset/#syntax).",type:["array","null"],items:{type:"string"}},"explicit-preview-rules":{description:"Whether to require exact codes to select preview rules. When enabled, preview rules will not be selected by prefixes — the full code of each preview rule will be required to enable the rule.",type:["boolean","null"]},"extend-fixable":{description:"A list of rule codes or prefixes to consider fixable, in addition to those specified by [`fixable`](#lint_fixable).",type:["array","null"],items:{$ref:"#/definitions/RuleSelector"}},"extend-ignore":{description:"A list of rule codes or prefixes to ignore, in addition to those specified by `ignore`.",deprecated:!0,type:["array","null"],items:{$ref:"#/definitions/RuleSelector"}},"extend-per-file-ignores":{description:"A list of mappings from file pattern to rule codes or prefixes to exclude, in addition to any rules excluded by [`per-file-ignores`](#lint_per-file-ignores).",type:["object","null"],additionalProperties:{type:"array",items:{$ref:"#/definitions/RuleSelector"}}},"extend-safe-fixes":{description:"A list of rule codes or prefixes for which unsafe fixes should be considered safe.",type:["array","null"],items:{$ref:"#/definitions/RuleSelector"}},"extend-select":{description:"A list of rule codes or prefixes to enable, in addition to those specified by [`select`](#lint_select).",type:["array","null"],items:{$ref:"#/definitions/RuleSelector"}},"extend-unfixable":{description:"A list of rule codes or prefixes to consider non-auto-fixable, in addition to those specified by [`unfixable`](#lint_unfixable).",deprecated:!0,type:["array","null"],items:{$ref:"#/definitions/RuleSelector"}},"extend-unsafe-fixes":{description:"A list of rule codes or prefixes for which safe fixes should be considered unsafe.",type:["array","null"],items:{$ref:"#/definitions/RuleSelector"}},external:{description:"A list of rule codes or prefixes that are unsupported by Ruff, but should be preserved when (e.g.) validating `# noqa` directives. Useful for retaining `# noqa` directives that cover plugins not yet implemented by Ruff.",type:["array","null"],items:{type:"string"}},fixable:{description:"A list of rule codes or prefixes to consider fixable. By default, all rules are considered fixable.",type:["array","null"],items:{$ref:"#/definitions/RuleSelector"}},"flake8-annotations":{description:"Options for the `flake8-annotations` plugin.",anyOf:[{$ref:"#/definitions/Flake8AnnotationsOptions"},{type:"null"}]},"flake8-bandit":{description:"Options for the `flake8-bandit` plugin.",anyOf:[{$ref:"#/definitions/Flake8BanditOptions"},{type:"null"}]},"flake8-boolean-trap":{description:"Options for the `flake8-boolean-trap` plugin.",anyOf:[{$ref:"#/definitions/Flake8BooleanTrapOptions"},{type:"null"}]},"flake8-bugbear":{description:"Options for the `flake8-bugbear` plugin.",anyOf:[{$ref:"#/definitions/Flake8BugbearOptions"},{type:"null"}]},"flake8-builtins":{description:"Options for the `flake8-builtins` plugin.",anyOf:[{$ref:"#/definitions/Flake8BuiltinsOptions"},{type:"null"}]},"flake8-comprehensions":{description:"Options for the `flake8-comprehensions` plugin.",anyOf:[{$ref:"#/definitions/Flake8ComprehensionsOptions"},{type:"null"}]},"flake8-copyright":{description:"Options for the `flake8-copyright` plugin.",anyOf:[{$ref:"#/definitions/Flake8CopyrightOptions"},{type:"null"}]},"flake8-errmsg":{description:"Options for the `flake8-errmsg` plugin.",anyOf:[{$ref:"#/definitions/Flake8ErrMsgOptions"},{type:"null"}]},"flake8-gettext":{description:"Options for the `flake8-gettext` plugin.",anyOf:[{$ref:"#/definitions/Flake8GetTextOptions"},{type:"null"}]},"flake8-implicit-str-concat":{description:"Options for the `flake8-implicit-str-concat` plugin.",anyOf:[{$ref:"#/definitions/Flake8ImplicitStrConcatOptions"},{type:"null"}]},"flake8-import-conventions":{description:"Options for the `flake8-import-conventions` plugin.",anyOf:[{$ref:"#/definitions/Flake8ImportConventionsOptions"},{type:"null"}]},"flake8-pytest-style":{description:"Options for the `flake8-pytest-style` plugin.",anyOf:[{$ref:"#/definitions/Flake8PytestStyleOptions"},{type:"null"}]},"flake8-quotes":{description:"Options for the `flake8-quotes` plugin.",anyOf:[{$ref:"#/definitions/Flake8QuotesOptions"},{type:"null"}]},"flake8-self":{description:"Options for the `flake8_self` plugin.",anyOf:[{$ref:"#/definitions/Flake8SelfOptions"},{type:"null"}]},"flake8-tidy-imports":{description:"Options for the `flake8-tidy-imports` plugin.",anyOf:[{$ref:"#/definitions/Flake8TidyImportsOptions"},{type:"null"}]},"flake8-type-checking":{description:"Options for the `flake8-type-checking` plugin.",anyOf:[{$ref:"#/definitions/Flake8TypeCheckingOptions"},{type:"null"}]},"flake8-unused-arguments":{description:"Options for the `flake8-unused-arguments` plugin.",anyOf:[{$ref:"#/definitions/Flake8UnusedArgumentsOptions"},{type:"null"}]},ignore:{description:"A list of rule codes or prefixes to ignore. Prefixes can specify exact rules (like `F841`), entire categories (like `F`), or anything in between.\n\nWhen breaking ties between enabled and disabled rules (via `select` and `ignore`, respectively), more specific prefixes override less specific prefixes.",type:["array","null"],items:{$ref:"#/definitions/RuleSelector"}},"ignore-init-module-imports":{description:"Avoid automatically removing unused imports in `__init__.py` files. Such imports will still be flagged, but with a dedicated message suggesting that the import is either added to the module's `__all__` symbol, or re-exported with a redundant alias (e.g., `import os as os`).\n\nThis option is enabled by default, but you can opt-in to removal of imports via an unsafe fix.",deprecated:!0,type:["boolean","null"]},isort:{description:"Options for the `isort` plugin.",anyOf:[{$ref:"#/definitions/IsortOptions"},{type:"null"}]},"logger-objects":{description:'A list of objects that should be treated equivalently to a `logging.Logger` object.\n\nThis is useful for ensuring proper diagnostics (e.g., to identify `logging` deprecations and other best-practices) for projects that re-export a `logging.Logger` object from a common module.\n\nFor example, if you have a module `logging_setup.py` with the following contents: ```python import logging\n\nlogger = logging.getLogger(__name__) ```\n\nAdding `"logging_setup.logger"` to `logger-objects` will ensure that `logging_setup.logger` is treated as a `logging.Logger` object when imported from other modules (e.g., `from logging_setup import logger`).',type:["array","null"],items:{type:"string"}},mccabe:{description:"Options for the `mccabe` plugin.",anyOf:[{$ref:"#/definitions/McCabeOptions"},{type:"null"}]},"pep8-naming":{description:"Options for the `pep8-naming` plugin.",anyOf:[{$ref:"#/definitions/Pep8NamingOptions"},{type:"null"}]},"per-file-ignores":{description:"A list of mappings from file pattern to rule codes or prefixes to exclude, when considering any matching files. An initial '!' negates the file pattern.",type:["object","null"],additionalProperties:{type:"array",items:{$ref:"#/definitions/RuleSelector"}}},preview:{description:"Whether to enable preview mode. When preview mode is enabled, Ruff will use unstable rules and fixes.",type:["boolean","null"]},pycodestyle:{description:"Options for the `pycodestyle` plugin.",anyOf:[{$ref:"#/definitions/PycodestyleOptions"},{type:"null"}]},pydocstyle:{description:"Options for the `pydocstyle` plugin.",anyOf:[{$ref:"#/definitions/PydocstyleOptions"},{type:"null"}]},pyflakes:{description:"Options for the `pyflakes` plugin.",anyOf:[{$ref:"#/definitions/PyflakesOptions"},{type:"null"}]},pylint:{description:"Options for the `pylint` plugin.",anyOf:[{$ref:"#/definitions/PylintOptions"},{type:"null"}]},pyupgrade:{description:"Options for the `pyupgrade` plugin.",anyOf:[{$ref:"#/definitions/PyUpgradeOptions"},{type:"null"}]},ruff:{description:"Options for the `ruff` plugin",anyOf:[{$ref:"#/definitions/RuffOptions"},{type:"null"}]},select:{description:"A list of rule codes or prefixes to enable. Prefixes can specify exact rules (like `F841`), entire categories (like `F`), or anything in between.\n\nWhen breaking ties between enabled and disabled rules (via `select` and `ignore`, respectively), more specific prefixes override less specific prefixes.",type:["array","null"],items:{$ref:"#/definitions/RuleSelector"}},"task-tags":{description:'A list of task tags to recognize (e.g., "TODO", "FIXME", "XXX").\n\nComments starting with these tags will be ignored by commented-out code detection (`ERA`), and skipped by line-length rules (`E501`) if [`ignore-overlong-task-comments`](#lint_pycodestyle_ignore-overlong-task-comments) is set to `true`.',type:["array","null"],items:{type:"string"}},"typing-modules":{description:"A list of modules whose exports should be treated equivalently to members of the `typing` module.\n\nThis is useful for ensuring proper type annotation inference for projects that re-export `typing` and `typing_extensions` members from a compatibility module. If omitted, any members imported from modules apart from `typing` and `typing_extensions` will be treated as ordinary Python objects.",type:["array","null"],items:{type:"string"}},unfixable:{description:"A list of rule codes or prefixes to consider non-fixable.",type:["array","null"],items:{$ref:"#/definitions/RuleSelector"}}},additionalProperties:!1},McCabeOptions:{type:"object",properties:{"max-complexity":{description:"The maximum McCabe complexity to allow before triggering `C901` errors.",type:["integer","null"],format:"uint",minimum:0}},additionalProperties:!1},NameImports:{type:"string"},OutputFormat:{oneOf:[{type:"string",enum:["concise","full","json","json-lines","junit","grouped","github","gitlab","pylint","rdjson","azure","sarif"]},{deprecated:!0,type:"string",enum:["text"]}]},ParametrizeNameType:{type:"string",enum:["csv","tuple","list"]},ParametrizeValuesRowType:{type:"string",enum:["tuple","list"]},ParametrizeValuesType:{type:"string",enum:["tuple","list"]},Pep8NamingOptions:{type:"object",properties:{"classmethod-decorators":{description:"A list of decorators that, when applied to a method, indicate that the method should be treated as a class method (in addition to the builtin `@classmethod`).\n\nFor example, Ruff will expect that any method decorated by a decorator in this list takes a `cls` argument as its first argument.\n\nExpects to receive a list of fully-qualified names (e.g., `pydantic.validator`, rather than `validator`) or alternatively a plain name which is then matched against the last segment in case the decorator itself consists of a dotted name.",type:["array","null"],items:{type:"string"}},"extend-ignore-names":{description:'Additional names (or patterns) to ignore when considering `pep8-naming` violations, in addition to those included in [`ignore-names`](#lint_pep8-naming_ignore-names).\n\nSupports glob patterns. For example, to ignore all names starting with `test_` or ending with `_test`, you could use `ignore-names = ["test_*", "*_test"]`. For more information on the glob syntax, refer to the [`globset` documentation](https://docs.rs/globset/latest/globset/#syntax).',type:["array","null"],items:{type:"string"}},"ignore-names":{description:'A list of names (or patterns) to ignore when considering `pep8-naming` violations.\n\nSupports glob patterns. For example, to ignore all names starting with `test_` or ending with `_test`, you could use `ignore-names = ["test_*", "*_test"]`. For more information on the glob syntax, refer to the [`globset` documentation](https://docs.rs/globset/latest/globset/#syntax).',type:["array","null"],items:{type:"string"}},"staticmethod-decorators":{description:"A list of decorators that, when applied to a method, indicate that the method should be treated as a static method (in addition to the builtin `@staticmethod`).\n\nFor example, Ruff will expect that any method decorated by a decorator in this list has no `self` or `cls` argument.\n\nExpects to receive a list of fully-qualified names (e.g., `belay.Device.teardown`, rather than `teardown`) or alternatively a plain name which is then matched against the last segment in case the decorator itself consists of a dotted name.",type:["array","null"],items:{type:"string"}}},additionalProperties:!1},PyUpgradeOptions:{type:"object",properties:{"keep-runtime-typing":{description:"Whether to avoid [PEP 585](https://peps.python.org/pep-0585/) (`List[int]` -> `list[int]`) and [PEP 604](https://peps.python.org/pep-0604/) (`Union[str, int]` -> `str | int`) rewrites even if a file imports `from __future__ import annotations`.\n\nThis setting is only applicable when the target Python version is below 3.9 and 3.10 respectively, and is most commonly used when working with libraries like Pydantic and FastAPI, which rely on the ability to parse type annotations at runtime. The use of `from __future__ import annotations` causes Python to treat the type annotations as strings, which typically allows for the use of language features that appear in later Python versions but are not yet supported by the current version (e.g., `str | int`). However, libraries that rely on runtime type annotations will break if the annotations are incompatible with the current Python version.\n\nFor example, while the following is valid Python 3.8 code due to the presence of `from __future__ import annotations`, the use of `str | int` prior to Python 3.10 will cause Pydantic to raise a `TypeError` at runtime:\n\n```python from __future__ import annotations\n\nimport pydantic\n\nclass Foo(pydantic.BaseModel): bar: str | int ```",type:["boolean","null"]}},additionalProperties:!1},PycodestyleOptions:{type:"object",properties:{"ignore-overlong-task-comments":{description:'Whether line-length violations (`E501`) should be triggered for comments starting with [`task-tags`](#lint_task-tags) (by default: "TODO", "FIXME", and "XXX").',type:["boolean","null"]},"max-doc-length":{description:"The maximum line length to allow for [`doc-line-too-long`](https://docs.astral.sh/ruff/rules/doc-line-too-long/) violations within documentation (`W505`), including standalone comments. By default, this is set to `null` which disables reporting violations.\n\nThe length is determined by the number of characters per line, except for lines containing Asian characters or emojis. For these lines, the [unicode width](https://unicode.org/reports/tr11/) of each character is added up to determine the length.\n\nSee the [`doc-line-too-long`](https://docs.astral.sh/ruff/rules/doc-line-too-long/) rule for more information.",anyOf:[{$ref:"#/definitions/LineLength"},{type:"null"}]},"max-line-length":{description:"The maximum line length to allow for [`line-too-long`](https://docs.astral.sh/ruff/rules/line-too-long/) violations. By default, this is set to the value of the [`line-length`](#line-length) option.\n\nUse this option when you want to detect extra-long lines that the formatter can't automatically split by setting `pycodestyle.line-length` to a value larger than [`line-length`](#line-length).\n\n```toml # The formatter wraps lines at a length of 88. line-length = 88\n\n[pycodestyle] # E501 reports lines that exceed the length of 100. max-line-length = 100 ```\n\nThe length is determined by the number of characters per line, except for lines containing East Asian characters or emojis. For these lines, the [unicode width](https://unicode.org/reports/tr11/) of each character is added up to determine the length.\n\nSee the [`line-too-long`](https://docs.astral.sh/ruff/rules/line-too-long/) rule for more information.",anyOf:[{$ref:"#/definitions/LineLength"},{type:"null"}]}},additionalProperties:!1},PydocstyleOptions:{type:"object",properties:{convention:{description:'Whether to use Google-style, NumPy-style conventions, or the [PEP 257](https://peps.python.org/pep-0257/) defaults when analyzing docstring sections.\n\nEnabling a convention will disable all rules that are not included in the specified convention. As such, the intended workflow is to enable a convention and then selectively enable or disable any additional rules on top of it.\n\nFor example, to use Google-style conventions but avoid requiring documentation for every function parameter:\n\n```toml [tool.ruff.lint] # Enable all `pydocstyle` rules, limiting to those that adhere to the # Google convention via `convention = "google"`, below. select = ["D"]\n\n# On top of the Google convention, disable `D417`, which requires # documentation for every function parameter. ignore = ["D417"]\n\n[tool.ruff.lint.pydocstyle] convention = "google" ```\n\nTo enable an additional rule that\'s excluded from the convention, select the desired rule via its fully qualified rule code (e.g., `D400` instead of `D4` or `D40`):\n\n```toml [tool.ruff.lint] # Enable D400 on top of the Google convention. extend-select = ["D400"]\n\n[tool.ruff.lint.pydocstyle] convention = "google" ```',anyOf:[{$ref:"#/definitions/Convention"},{type:"null"}]},"ignore-decorators":{description:"Ignore docstrings for functions or methods decorated with the specified fully-qualified decorators.",type:["array","null"],items:{type:"string"}},"property-decorators":{description:"A list of decorators that, when applied to a method, indicate that the method should be treated as a property (in addition to the builtin `@property` and standard-library `@functools.cached_property`).\n\nFor example, Ruff will expect that any method decorated by a decorator in this list can use a non-imperative summary line.",type:["array","null"],items:{type:"string"}}},additionalProperties:!1},PyflakesOptions:{type:"object",properties:{"extend-generics":{description:'Additional functions or classes to consider generic, such that any subscripts should be treated as type annotation (e.g., `ForeignKey` in `django.db.models.ForeignKey["User"]`.\n\nExpects to receive a list of fully-qualified names (e.g., `django.db.models.ForeignKey`, rather than `ForeignKey`).',type:["array","null"],items:{type:"string"}}},additionalProperties:!1},PylintOptions:{type:"object",properties:{"allow-dunder-method-names":{description:"Dunder methods name to allow, in addition to the default set from the Python standard library (see `PLW3201`).",type:["array","null"],items:{type:"string"},uniqueItems:!0},"allow-magic-value-types":{description:'Constant types to ignore when used as "magic values" (see `PLR2004`).',type:["array","null"],items:{$ref:"#/definitions/ConstantType"}},"max-args":{description:"Maximum number of arguments allowed for a function or method definition (see `PLR0913`).",type:["integer","null"],format:"uint",minimum:0},"max-bool-expr":{description:"Maximum number of Boolean expressions allowed within a single `if` statement (see `PLR0916`).",type:["integer","null"],format:"uint",minimum:0},"max-branches":{description:"Maximum number of branches allowed for a function or method body (see `PLR0912`).",type:["integer","null"],format:"uint",minimum:0},"max-locals":{description:"Maximum number of local variables allowed for a function or method body (see `PLR0914`).",type:["integer","null"],format:"uint",minimum:0},"max-nested-blocks":{description:"Maximum number of nested blocks allowed within a function or method body (see `PLR1702`).",type:["integer","null"],format:"uint",minimum:0},"max-positional-args":{description:"Maximum number of positional arguments allowed for a function or method definition (see `PLR0917`).\n\nIf not specified, defaults to the value of `max-args`.",type:["integer","null"],format:"uint",minimum:0},"max-public-methods":{description:"Maximum number of public methods allowed for a class (see `PLR0904`).",type:["integer","null"],format:"uint",minimum:0},"max-returns":{description:"Maximum number of return statements allowed for a function or method body (see `PLR0911`)",type:["integer","null"],format:"uint",minimum:0},"max-statements":{description:"Maximum number of statements allowed for a function or method body (see `PLR0915`).",type:["integer","null"],format:"uint",minimum:0}},additionalProperties:!1},PythonVersion:{type:"string",enum:["py37","py38","py39","py310","py311","py312","py313"]},Quote:{oneOf:[{description:"Use double quotes.",type:"string",enum:["double"]},{description:"Use single quotes.",type:"string",enum:["single"]}]},QuoteStyle:{type:"string",enum:["single","double","preserve"]},RelativeImportsOrder:{oneOf:[{description:'Place "closer" imports (fewer `.` characters, most local) before "further" imports (more `.` characters, least local).',type:"string",enum:["closest-to-furthest"]},{description:'Place "further" imports (more `.` characters, least local) imports before "closer" imports (fewer `.` characters, most local).',type:"string",enum:["furthest-to-closest"]}]},RequiredVersion:{type:"string"},RuffOptions:{type:"object",properties:{"parenthesize-tuple-in-subscript":{description:"Whether to prefer accessing items keyed by tuples with parentheses around the tuple (see `RUF031`).",type:["boolean","null"]}},additionalProperties:!1},RuleSelector:{type:"string",enum:["A","A0","A00","A001","A002","A003","A004","A005","A006","AIR","AIR0","AIR00","AIR001","ALL","ANN","ANN0","ANN00","ANN001","ANN002","ANN003","ANN1","ANN10","ANN101","ANN102","ANN2","ANN20","ANN201","ANN202","ANN204","ANN205","ANN206","ANN4","ANN40","ANN401","ARG","ARG0","ARG00","ARG001","ARG002","ARG003","ARG004","ARG005","ASYNC","ASYNC1","ASYNC10","ASYNC100","ASYNC105","ASYNC109","ASYNC11","ASYNC110","ASYNC115","ASYNC116","ASYNC2","ASYNC21","ASYNC210","ASYNC22","ASYNC220","ASYNC221","ASYNC222","ASYNC23","ASYNC230","ASYNC25","ASYNC251","B","B0","B00","B002","B003","B004","B005","B006","B007","B008","B009","B01","B010","B011","B012","B013","B014","B015","B016","B017","B018","B019","B02","B020","B021","B022","B023","B024","B025","B026","B027","B028","B029","B03","B030","B031","B032","B033","B034","B035","B039","B9","B90","B901","B904","B905","B909","BLE","BLE0","BLE00","BLE001","C","C4","C40","C400","C401","C402","C403","C404","C405","C406","C408","C409","C41","C410","C411","C413","C414","C415","C416","C417","C418","C419","C42","C420","C9","C90","C901","COM","COM8","COM81","COM812","COM818","COM819","CPY","CPY0","CPY00","CPY001","D","D1","D10","D100","D101","D102","D103","D104","D105","D106","D107","D2","D20","D200","D201","D202","D203","D204","D205","D206","D207","D208","D209","D21","D210","D211","D212","D213","D214","D215","D3","D30","D300","D301","D4","D40","D400","D401","D402","D403","D404","D405","D406","D407","D408","D409","D41","D410","D411","D412","D413","D414","D415","D416","D417","D418","D419","DJ","DJ0","DJ00","DJ001","DJ003","DJ006","DJ007","DJ008","DJ01","DJ012","DJ013","DOC","DOC2","DOC20","DOC201","DOC202","DOC4","DOC40","DOC402","DOC403","DOC5","DOC50","DOC501","DOC502","DTZ","DTZ0","DTZ00","DTZ001","DTZ002","DTZ003","DTZ004","DTZ005","DTZ006","DTZ007","DTZ01","DTZ011","DTZ012","E","E1","E10","E101","E11","E111","E112","E113","E114","E115","E116","E117","E2","E20","E201","E202","E203","E204","E21","E211","E22","E221","E222","E223","E224","E225","E226","E227","E228","E23","E231","E24","E241","E242","E25","E251","E252","E26","E261","E262","E265","E266","E27","E271","E272","E273","E274","E275","E3","E30","E301","E302","E303","E304","E305","E306","E4","E40","E401","E402","E5","E50","E501","E502","E7","E70","E701","E702","E703","E71","E711","E712","E713","E714","E72","E721","E722","E73","E731","E74","E741","E742","E743","E9","E90","E902","E99","E999","EM","EM1","EM10","EM101","EM102","EM103","ERA","ERA0","ERA00","ERA001","EXE","EXE0","EXE00","EXE001","EXE002","EXE003","EXE004","EXE005","F","F4","F40","F401","F402","F403","F404","F405","F406","F407","F5","F50","F501","F502","F503","F504","F505","F506","F507","F508","F509","F52","F521","F522","F523","F524","F525","F54","F541","F6","F60","F601","F602","F62","F621","F622","F63","F631","F632","F633","F634","F7","F70","F701","F702","F704","F706","F707","F72","F722","F8","F81","F811","F82","F821","F822","F823","F84","F841","F842","F9","F90","F901","FA","FA1","FA10","FA100","FA102","FAST","FAST0","FAST00","FAST001","FAST002","FAST003","FBT","FBT0","FBT00","FBT001","FBT002","FBT003","FIX","FIX0","FIX00","FIX001","FIX002","FIX003","FIX004","FLY","FLY0","FLY00","FLY002","FURB","FURB1","FURB10","FURB101","FURB103","FURB105","FURB11","FURB110","FURB113","FURB116","FURB118","FURB12","FURB129","FURB13","FURB131","FURB132","FURB136","FURB14","FURB140","FURB142","FURB145","FURB148","FURB15","FURB152","FURB154","FURB157","FURB16","FURB161","FURB163","FURB164","FURB166","FURB167","FURB168","FURB169","FURB17","FURB171","FURB177","FURB18","FURB180","FURB181","FURB187","FURB19","FURB192","G","G0","G00","G001","G002","G003","G004","G01","G010","G1","G10","G101","G2","G20","G201","G202","I","I0","I00","I001","I002","ICN","ICN0","ICN00","ICN001","ICN002","ICN003","INP","INP0","INP00","INP001","INT","INT0","INT00","INT001","INT002","INT003","ISC","ISC0","ISC00","ISC001","ISC002","ISC003","LOG","LOG0","LOG00","LOG001","LOG002","LOG007","LOG009","N","N8","N80","N801","N802","N803","N804","N805","N806","N807","N81","N811","N812","N813","N814","N815","N816","N817","N818","N9","N99","N999","NPY","NPY0","NPY00","NPY001","NPY002","NPY003","NPY2","NPY20","NPY201","PD","PD0","PD00","PD002","PD003","PD004","PD007","PD008","PD009","PD01","PD010","PD011","PD012","PD013","PD015","PD1","PD10","PD101","PD9","PD90","PD901","PERF","PERF1","PERF10","PERF101","PERF102","PERF2","PERF20","PERF203","PERF4","PERF40","PERF401","PERF402","PERF403","PGH","PGH0","PGH00","PGH003","PGH004","PGH005","PIE","PIE7","PIE79","PIE790","PIE794","PIE796","PIE8","PIE80","PIE800","PIE804","PIE807","PIE808","PIE81","PIE810","PL","PLC","PLC0","PLC01","PLC010","PLC0105","PLC013","PLC0131","PLC0132","PLC02","PLC020","PLC0205","PLC0206","PLC0208","PLC04","PLC041","PLC0414","PLC0415","PLC1","PLC19","PLC190","PLC1901","PLC2","PLC24","PLC240","PLC2401","PLC2403","PLC27","PLC270","PLC2701","PLC28","PLC280","PLC2801","PLC3","PLC30","PLC300","PLC3002","PLE","PLE0","PLE01","PLE010","PLE0100","PLE0101","PLE011","PLE0115","PLE0116","PLE0117","PLE0118","PLE02","PLE023","PLE0237","PLE024","PLE0241","PLE03","PLE030","PLE0302","PLE0303","PLE0304","PLE0305","PLE0307","PLE0308","PLE0309","PLE06","PLE060","PLE0604","PLE0605","PLE064","PLE0643","PLE07","PLE070","PLE0704","PLE1","PLE11","PLE113","PLE1132","PLE114","PLE1141","PLE1142","PLE12","PLE120","PLE1205","PLE1206","PLE13","PLE130","PLE1300","PLE1307","PLE131","PLE1310","PLE15","PLE150","PLE1507","PLE151","PLE1519","PLE152","PLE1520","PLE17","PLE170","PLE1700","PLE2","PLE25","PLE250","PLE2502","PLE251","PLE2510","PLE2512","PLE2513","PLE2514","PLE2515","PLE4","PLE47","PLE470","PLE4703","PLR","PLR0","PLR01","PLR012","PLR0124","PLR013","PLR0133","PLR02","PLR020","PLR0202","PLR0203","PLR0206","PLR04","PLR040","PLR0402","PLR09","PLR090","PLR0904","PLR091","PLR0911","PLR0912","PLR0913","PLR0914","PLR0915","PLR0916","PLR0917","PLR1","PLR17","PLR170","PLR1702","PLR1704","PLR171","PLR1711","PLR1714","PLR172","PLR1722","PLR173","PLR1730","PLR1733","PLR1736","PLR2","PLR20","PLR200","PLR2004","PLR204","PLR2044","PLR5","PLR55","PLR550","PLR5501","PLR6","PLR61","PLR610","PLR6104","PLR62","PLR620","PLR6201","PLR63","PLR630","PLR6301","PLW","PLW0","PLW01","PLW010","PLW0108","PLW012","PLW0120","PLW0127","PLW0128","PLW0129","PLW013","PLW0131","PLW0133","PLW017","PLW0177","PLW02","PLW021","PLW0211","PLW024","PLW0245","PLW04","PLW040","PLW0406","PLW06","PLW060","PLW0602","PLW0603","PLW0604","PLW064","PLW0642","PLW07","PLW071","PLW0711","PLW1","PLW15","PLW150","PLW1501","PLW1508","PLW1509","PLW151","PLW1510","PLW1514","PLW16","PLW164","PLW1641","PLW2","PLW21","PLW210","PLW2101","PLW29","PLW290","PLW2901","PLW3","PLW32","PLW320","PLW3201","PLW33","PLW330","PLW3301","PT","PT0","PT00","PT001","PT002","PT003","PT004","PT005","PT006","PT007","PT008","PT009","PT01","PT010","PT011","PT012","PT013","PT014","PT015","PT016","PT017","PT018","PT019","PT02","PT020","PT021","PT022","PT023","PT024","PT025","PT026","PT027","PTH","PTH1","PTH10","PTH100","PTH101","PTH102","PTH103","PTH104","PTH105","PTH106","PTH107","PTH108","PTH109","PTH11","PTH110","PTH111","PTH112","PTH113","PTH114","PTH115","PTH116","PTH117","PTH118","PTH119","PTH12","PTH120","PTH121","PTH122","PTH123","PTH124","PTH2","PTH20","PTH201","PTH202","PTH203","PTH204","PTH205","PTH206","PTH207","PYI","PYI0","PYI00","PYI001","PYI002","PYI003","PYI004","PYI005","PYI006","PYI007","PYI008","PYI009","PYI01","PYI010","PYI011","PYI012","PYI013","PYI014","PYI015","PYI016","PYI017","PYI018","PYI019","PYI02","PYI020","PYI021","PYI024","PYI025","PYI026","PYI029","PYI03","PYI030","PYI032","PYI033","PYI034","PYI035","PYI036","PYI04","PYI041","PYI042","PYI043","PYI044","PYI045","PYI046","PYI047","PYI048","PYI049","PYI05","PYI050","PYI051","PYI052","PYI053","PYI054","PYI055","PYI056","PYI057","PYI058","PYI059","PYI06","PYI062","PYI063","PYI064","PYI066","Q","Q0","Q00","Q000","Q001","Q002","Q003","Q004","RET","RET5","RET50","RET501","RET502","RET503","RET504","RET505","RET506","RET507","RET508","RSE","RSE1","RSE10","RSE102","RUF","RUF0","RUF00","RUF001","RUF002","RUF003","RUF005","RUF006","RUF007","RUF008","RUF009","RUF01","RUF010","RUF012","RUF013","RUF015","RUF016","RUF017","RUF018","RUF019","RUF02","RUF020","RUF021","RUF022","RUF023","RUF024","RUF026","RUF027","RUF028","RUF029","RUF03","RUF030","RUF031","RUF032","RUF033","RUF034","RUF1","RUF10","RUF100","RUF101","RUF2","RUF20","RUF200","S","S1","S10","S101","S102","S103","S104","S105","S106","S107","S108","S11","S110","S112","S113","S2","S20","S201","S202","S3","S30","S301","S302","S303","S304","S305","S306","S307","S308","S31","S310","S311","S312","S313","S314","S315","S316","S317","S318","S319","S32","S320","S321","S323","S324","S4","S40","S401","S402","S403","S404","S405","S406","S407","S408","S409","S41","S411","S412","S413","S415","S5","S50","S501","S502","S503","S504","S505","S506","S507","S508","S509","S6","S60","S601","S602","S603","S604","S605","S606","S607","S608","S609","S61","S610","S611","S612","S7","S70","S701","S702","SIM","SIM1","SIM10","SIM101","SIM102","SIM103","SIM105","SIM107","SIM108","SIM109","SIM11","SIM110","SIM112","SIM113","SIM114","SIM115","SIM116","SIM117","SIM118","SIM2","SIM20","SIM201","SIM202","SIM208","SIM21","SIM210","SIM211","SIM212","SIM22","SIM220","SIM221","SIM222","SIM223","SIM3","SIM30","SIM300","SIM4","SIM40","SIM401","SIM9","SIM91","SIM910","SIM911","SLF","SLF0","SLF00","SLF001","SLOT","SLOT0","SLOT00","SLOT000","SLOT001","SLOT002","T","T1","T10","T100","T2","T20","T201","T203","TCH","TCH0","TCH00","TCH001","TCH002","TCH003","TCH004","TCH005","TCH01","TCH010","TD","TD0","TD00","TD001","TD002","TD003","TD004","TD005","TD006","TD007","TID","TID2","TID25","TID251","TID252","TID253","TRY","TRY0","TRY00","TRY002","TRY003","TRY004","TRY2","TRY20","TRY201","TRY3","TRY30","TRY300","TRY301","TRY302","TRY4","TRY40","TRY400","TRY401","UP","UP0","UP00","UP001","UP003","UP004","UP005","UP006","UP007","UP008","UP009","UP01","UP010","UP011","UP012","UP013","UP014","UP015","UP017","UP018","UP019","UP02","UP020","UP021","UP022","UP023","UP024","UP025","UP026","UP027","UP028","UP029","UP03","UP030","UP031","UP032","UP033","UP034","UP035","UP036","UP037","UP038","UP039","UP04","UP040","UP041","UP042","UP043","W","W1","W19","W191","W2","W29","W291","W292","W293","W3","W39","W391","W5","W50","W505","W6","W60","W605","YTT","YTT1","YTT10","YTT101","YTT102","YTT103","YTT2","YTT20","YTT201","YTT202","YTT203","YTT204","YTT3","YTT30","YTT301","YTT302","YTT303"]},Strictness:{oneOf:[{description:"Ban imports that extend into the parent module or beyond.",type:"string",enum:["parents"]},{description:"Ban all relative imports.",type:"string",enum:["all"]}]}}};function $e(t,e,n,i,r,o,a){try{var s=t[o](a),l=s.value}catch(u){n(u);return}s.done?e(l):Promise.resolve(l).then(i,r)}function oi(t){return function(){var e=this,n=arguments;return new Promise(function(i,r){var o=t.apply(e,n);function a(l){$e(o,i,r,a,s,"next",l)}function s(l){$e(o,i,r,a,s,"throw",l)}a(void 0)})}}var dt=On.parse("inmemory://dh-config/ruff-settings.json");function si(){var{schemas:t=[]}=Re.json.jsonDefaults.diagnosticsOptions;t.some(e=>e.uri==="json://ruff-schema")||Re.json.jsonDefaults.setDiagnosticsOptions({schemas:[...t,{uri:"json://ruff-schema",fileMatch:[dt.toString()],schema:ri}]})}function ai(){return le.apply(this,arguments)}function le(){return le=oi(function*(){return yield Bt.initRuff(),"v".concat(Lt.version())}),le.apply(this,arguments)}function wr(t){var{text:e,isOpen:n,onClose:i,onSave:r,readOnly:o=!1,defaultSettings:a=$t}=t,[s,l]=c.useState(!1),[u,b]=c.useState(!1),p=c.useRef(),m=c.useMemo(()=>JSON.stringify(a,null,2),[a]),{data:P}=dn(ai),[h]=c.useState(()=>Sn.createModel(e,"json",dt)),E=c.useCallback(()=>{n&&(i(),p.current=void 0,h.dispose())},[n,i,h]),y=c.useCallback(()=>{if(n){try{var v,T,C;r(JSON.parse((v=(T=p.current)===null||T===void 0||(C=T.getModel())===null||C===void 0?void 0:C.getValue())!==null&&v!==void 0?v:""))}catch{}E()}},[n,E,r]),O=c.useCallback(()=>{gn(h),h.setValue(m)},[h,m]),M=c.useCallback(v=>{var T,C;try{JSON.parse(v),l(!0)}catch{l(!1)}b(((T=p.current)===null||T===void 0||(C=T.getModel())===null||C===void 0?void 0:C.getValue())===m)},[m]),I=Mt(M,500,{leading:!0}),R=c.useCallback(v=>{p.current=v,h.onDidChangeContent(()=>{I(h.getValue())}),si(),I(h.getValue())},[I,h]);return n?d.jsxs(bn,{isOpen:n,centered:!0,keyboard:!0,clickOutside:!1,toggle:E,size:"lg",className:"ruff-settings-modal",children:[d.jsxs(vn,{closeButton:!1,children:[d.jsxs("span",{className:"settings-modal-title mr-auto",children:["Ruff ",P," Settings"]}),d.jsx(Et,{href:"https://docs.astral.sh/ruff/settings/",target:"_blank",children:d.jsx(U,{kind:"ghost",onClick:Nt,icon:Pn,children:"Settings Docs"})}),d.jsxs(Tt,{isDisabled:u,onPress:O,children:[d.jsx(Rt,{children:d.jsx(V,{icon:wn})}),d.jsx(cn,{children:"Reset to default"})]})]}),d.jsx(xn,{style:{height:"80vh"},children:d.jsx(jt,{onEditorInitialized:R,settings:{readOnly:o,value:e,language:"json",folding:!0,padding:{bottom:16},lineNumbers:"on",overviewRulerLanes:0,model:h}})}),d.jsx(Ut,{children:o?d.jsx(U,{kind:"secondary","data-dismiss":"modal",onClick:E,children:"Close"}):d.jsxs(d.Fragment,{children:[d.jsx(U,{kind:"secondary","data-dismiss":"modal",onClick:E,children:"Cancel"}),d.jsx(U,{kind:"primary","data-dismiss":"modal",tooltip:s?void 0:"Cannot save invalid JSON",disabled:!s,onClick:y,children:"Save"})]})})]}):null}function Be(t,e,n,i,r,o,a){try{var s=t[o](a),l=s.value}catch(u){n(u);return}s.done?e(l):Promise.resolve(l).then(i,r)}function li(t){return function(){var e=this,n=arguments;return new Promise(function(i,r){var o=t.apply(e,n);function a(l){Be(o,i,r,a,s,"next",l)}function s(l){Be(o,i,r,a,s,"throw",l)}a(void 0)})}}var se=$.module("MessageUtils"),xr="io.deephaven.message.LoginOptions.request",ui="io.deephaven.message.SessionDetails.request",Sr="io.deephaven.broadcast",di="io.deephaven.broadcast.Login",ci="io.deephaven.broadcast.Logout";function ct(t){var e=t;return e!=null&&typeof e.id=="string"&&typeof e.message=="string"}function Or(t){return ct(t)&&t.message===di}function Er(t){return ct(t)&&t.message===ci}function pi(t){var e=t;return e!=null&&typeof e.id=="string"}function fi(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:me(),n=arguments.length>2?arguments[2]:void 0;return{message:t,id:e,payload:n}}function Tr(t,e){return{id:t,payload:e}}function hi(){return window.opener!=null?window.opener:window.parent!=null&&window.parent!==window?window.parent:null}function mi(t){return ue.apply(this,arguments)}function ue(){return ue=li(function*(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:3e4,n=hi();if(n==null)throw new Error("window parent is null, unable to send request.");return new Promise((i,r)=>{var o,a=me(),s=l=>{var{data:u}=l;if(!pi(u)){se.debug("Ignoring non-deephaven response",u);return}if(se.debug("Received message",u),(u==null?void 0:u.id)!==a){se.debug("Ignore message, id doesn't match",u);return}window.clearTimeout(o),window.removeEventListener("message",s),i(u.payload)};window.addEventListener("message",s),o=window.setTimeout(()=>{window.removeEventListener("message",s),r(new Wt("Request timed out"))},e),n.postMessage(fi(t,a),"*")})}),ue.apply(this,arguments)}function yi(t,e,n){return e=gi(e),e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function gi(t){var e=bi(t,"string");return typeof e=="symbol"?e:String(e)}function bi(t,e){if(typeof t!="object"||t===null)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var i=n.call(t,e||"default");if(typeof i!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}class vi extends Error{constructor(){super(...arguments),yi(this,"isNoConsolesError",!0)}}function Pi(t){return t.isNoConsolesError}function We(t,e,n,i,r,o,a){try{var s=t[o](a),l=s.value}catch(u){n(u);return}s.done?e(l):Promise.resolve(l).then(i,r)}function te(t){return function(){var e=this,n=arguments;return new Promise(function(i,r){var o=t.apply(e,n);function a(l){We(o,i,r,a,s,"next",l)}function s(l){We(o,i,r,a,s,"throw",l)}a(void 0)})}}var W=$.module("SessionUtils");function Rr(t,e){return W.info("Starting connection to '".concat(e,"'...")),new t.IdeConnection(e)}function wi(t,e,n){return de.apply(this,arguments)}function de(){return de=te(function*(t,e,n){W.info("Getting console types...");var i=yield e.getConsoleTypes();if(i.length===0)throw new vi("No console types available");W.info("Available types:",i);var r=i[0];W.info("Starting session with type",r);var o=yield e.startSession(r),a={type:r,id:me()};return W.info("Console session established",a),{session:o,config:a,connection:e,details:n,dh:t}}),de.apply(this,arguments)}function Lr(t,e,n){return W.info("createCoreClient",e),new t.CoreClient(e,n)}function xi(t){return t!=null&&typeof t=="object"}function Si(){return ce.apply(this,arguments)}function ce(){return ce=te(function*(){var t=yield mi(ui);if(!xi(t))throw new Error("Unexpected session details response: ".concat(t));return t}),ce.apply(this,arguments)}function Fr(){return pe.apply(this,arguments)}function pe(){return pe=te(function*(){var t=new URLSearchParams(window.location.search);switch(t.get("authProvider")){case"parent":return Si()}return{}}),pe.apply(this,arguments)}function Cr(t,e,n){return fe.apply(this,arguments)}function fe(){return fe=te(function*(t,e,n){var i;try{i=yield wi(t,e,n)}catch(r){if(!Pi(r))throw r}return i}),fe.apply(this,arguments)}function Ye(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter(function(r){return Object.getOwnPropertyDescriptor(t,r).enumerable})),n.push.apply(n,i)}return n}function Oi(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?Ye(Object(n),!0).forEach(function(i){Ei(t,i,n[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Ye(Object(n)).forEach(function(i){Object.defineProperty(t,i,Object.getOwnPropertyDescriptor(n,i))})}return t}function Ei(t,e,n){return e=Ti(e),e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function Ti(t){var e=Ri(t,"string");return typeof e=="symbol"?e:String(e)}function Ri(t,e){if(typeof t!="object"||t===null)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var i=n.call(t,e||"default");if(typeof i!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}var Li=100,ae=()=>{},Fi=Object.freeze({});function Ci(t){var{id:e="default",children:n,emptyDashboard:i,layoutConfig:r,layoutSettings:o=Fi,onLayoutConfigChange:a=ae,onGoldenLayoutChange:s=ae,onLayoutInitialized:l=ae,fallbackComponent:u=Kt,hydrate:b,dehydrate:p,panelWrapper:m}=t,P=c.useRef(null),[h,E]=c.useState(!1),[y,O]=c.useState();c.useEffect(function(){if(!P.current){O(void 0);return}var R=Oi({},Yt.makeDefaultLayout());R.settings===void 0&&(R.settings={}),Object.assign(R.settings,o),R.content=[];var v=new qt(R,P.current),T=()=>{v.off("initialised",T),E(!0)};return v.on("initialised",T),u!=null&&v.setFallbackComponent(u),v.init(),O(v),s(v),()=>{v.destroy()}},[o,u,s,E,O]);var M=c.useMemo(()=>ot(()=>{y!=null&&y.isInitialised&&(y==null||y.updateSize())},Li),[y]);return st(P.current,M),d.jsxs("div",{className:"dashboard-container w-100 h-100",children:[d.jsx("div",{className:"w-100 h-100",ref:P}),h&&y&&d.jsx(Gt.Provider,{value:y,children:d.jsx(Ht,{emptyDashboard:i,id:e,layout:y,layoutConfig:r,onLayoutChange:a,onLayoutInitialized:l,hydrate:b,dehydrate:p,panelWrapper:m,children:n})})]})}var ki=["id","isActive","plugins"];function qe(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter(function(r){return Object.getOwnPropertyDescriptor(t,r).enumerable})),n.push.apply(n,i)}return n}function Ge(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?qe(Object(n),!0).forEach(function(i){Ii(t,i,n[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):qe(Object(n)).forEach(function(i){Object.defineProperty(t,i,Object.getOwnPropertyDescriptor(n,i))})}return t}function Ii(t,e,n){return e=_i(e),e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function _i(t){var e=Di(t,"string");return typeof e=="symbol"?e:String(e)}function Di(t,e){if(typeof t!="object"||t===null)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var i=n.call(t,e||"default");if(typeof i!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function Ai(t,e){if(t==null)return{};var n=Mi(t,e),i,r;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);for(r=0;r<o.length;r++)i=o[r],!(e.indexOf(i)>=0)&&Object.prototype.propertyIsEnumerable.call(t,i)&&(n[i]=t[i])}return n}function Mi(t,e){if(t==null)return{};var n={},i=Object.keys(t),r,o;for(o=0;o<i.length;o++)r=i[o],!(e.indexOf(r)>=0)&&(n[r]=t[r]);return n}function Ni(t){var{id:e,isActive:n,plugins:i}=t,r=Ai(t,ki),[o,a]=c.useState(n),s=Ft(),l=c.useCallback(u=>{s(e===zt?Xt({layoutConfig:u}):Qt(e,{layoutConfig:u}))},[e,s]);return!o&&n&&a(!0),o?d.jsx(Ci,Ge(Ge({id:e,onLayoutConfigChange:l},r),{},{children:i})):d.jsx(ye,{})}function ji(t){var e=[...t.entries()].filter(n=>{var[,i]=n;return Jt(i)||Pe(i)});return e.map(n=>{var[i,r]=n;if(Pe(r)){var{DashboardPlugin:o}=r;return d.jsx(o,{},i)}var{component:a}=r;return d.jsx(a,{},i)})}function kr(){var t=Zt(),e=c.useMemo(()=>ji(t),[t]);return e}var Ir=c.createContext({}),_r=c.createContext({}),Ui=c.createContext(null),$i=c.createContext(null);function He(t,e,n,i,r,o,a){try{var s=t[o](a),l=s.value}catch(u){n(u);return}s.done?e(l):Promise.resolve(l).then(i,r)}function Bi(t){return function(){var e=this,n=arguments;return new Promise(function(i,r){var o=t.apply(e,n);function a(l){He(o,i,r,a,s,"next",l)}function s(l){He(o,i,r,a,s,"throw",l)}a(void 0)})}}var pt=c.createContext(null);function Dr(t){var{children:e}=t,n=ii(),[i,r]=c.useState(),[o,a]=c.useState();c.useEffect(function(){var u=!1;function b(){return p.apply(this,arguments)}function p(){return p=Bi(function*(){try{var m=yield n.getServerConfigValues();u||r(new Map(m))}catch(P){u||a(P)}}),p.apply(this,arguments)}return b(),()=>{u=!0}},[n]);var s=i==null;return s||o!=null?d.jsx(ye,{isLoading:s&&o==null,errorMessage:Vt(o)}):d.jsx(pt.Provider,{value:i,children:e})}function Ar(){return ee(pt,"No server config available in useServerConfig. Was code wrapped in ServerConfigBootstrap or ServerConfigContext.Provider?")}function Ke(t,e,n,i,r,o,a){try{var s=t[o](a),l=s.value}catch(u){n(u);return}s.done?e(l):Promise.resolve(l).then(i,r)}function Wi(t){return function(){var e=this,n=arguments;return new Promise(function(i,r){var o=t.apply(e,n);function a(l){Ke(o,i,r,a,s,"next",l)}function s(l){Ke(o,i,r,a,s,"throw",l)}a(void 0)})}}function ze(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter(function(r){return Object.getOwnPropertyDescriptor(t,r).enumerable})),n.push.apply(n,i)}return n}function Xe(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?ze(Object(n),!0).forEach(function(i){Yi(t,i,n[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):ze(Object(n)).forEach(function(i){Object.defineProperty(t,i,Object.getOwnPropertyDescriptor(n,i))})}return t}function Yi(t,e,n){return e=qi(e),e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function qi(t){var e=Gi(t,"string");return typeof e=="symbol"?e:String(e)}function Gi(t,e){if(typeof t!="object"||t===null)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var i=n.call(t,e||"default");if(typeof i!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function Mr(t){var{dashboards:e,activeDashboard:n,onLayoutInitialized:i,onGoldenLayoutChange:r,plugins:o,emptyDashboard:a=d.jsx(ye,{})}=t,s=en(),l=c.useCallback((u,b)=>{var{metadata:p}=u;try{if(p!=null)return Xe(Xe({fetch:function(){var m=Wi(function*(){return s(p)});function P(){return m.apply(this,arguments)}return P}()},u),{},{localDashboardId:b})}catch{}return tn.hydrate(u,b)},[s]);return d.jsx("div",{className:"tab-content",children:e.map(u=>d.jsx("div",{className:A("tab-pane",{active:u.id===n}),children:d.jsx(Ni,{id:u.id,isActive:u.id===n,emptyDashboard:a,layoutConfig:u.layoutConfig,layoutSettings:u.layoutSettings,onLayoutInitialized:i,onGoldenLayoutChange:r,hydrate:l,plugins:o},u.key)},u.id))})}function Nr(){return ee($i,"No IdeConnection available in useConnection. Was code wrapped in ConnectionContext.Provider?")}function jr(){return ee(Ui,"No user available in useUser. Was code wrapped in UserBootstrap or UserContext.Provider?")}function Qe(t,e,n,i,r,o,a){try{var s=t[o](a),l=s.value}catch(u){n(u);return}s.done?e(l):Promise.resolve(l).then(i,r)}function Hi(t){return function(){var e=this,n=arguments;return new Promise(function(i,r){var o=t.apply(e,n);function a(l){Qe(o,i,r,a,s,"next",l)}function s(l){Qe(o,i,r,a,s,"throw",l)}a(void 0)})}}function F(t,e,n){return e=Ki(e),e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function Ki(t){var e=zi(t,"string");return typeof e=="symbol"?e:String(e)}function zi(t,e){if(typeof t!="object"||t===null)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var i=n.call(t,e||"default");if(typeof i!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}var G=$.module("GrpcFileStorageTable");class z{constructor(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"",i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:n;F(this,"storageService",void 0),F(this,"baseRoot",void 0),F(this,"root",void 0),F(this,"currentSize",0),F(this,"currentViewport",void 0),F(this,"listeners",[]),F(this,"viewportUpdatePromise",void 0),F(this,"currentViewportData",void 0),F(this,"childTables",new Map),this.storageService=e,this.baseRoot=n,this.root=i,i===n&&(this.doRefresh=Ct(this.doRefresh.bind(this),z.REFRESH_DEBOUNCE))}removeBaseRoot(e){return N.removeRoot(this.baseRoot,e)}getViewportData(){var e;return this.viewportUpdatePromise||this.refreshInternal(),(e=this.viewportUpdatePromise)!==null&&e!==void 0?e:Promise.resolve({items:[],offset:0})}getSnapshot(e){throw new Error("Method not implemented.")}get size(){return this.currentSize}setExpanded(e,n){var i=e.split("/"),r=i.shift();if((r===void 0||r==="")&&(r=i.shift()),r===void 0||r==="")throw new Error("Invalid path: ".concat(e));var o=i.join("/");if(n){if(!this.childTables.has(r)){var a=new z(this.storageService,this.baseRoot,"".concat(this.root,"/").concat(r));this.childTables.set(r,a)}if(o){var s=this.childTables.get(r);s==null||s.setExpanded(o,n)}}else if(this.childTables.has(r))if(o){var l=this.childTables.get(r);l==null||l.setExpanded(o,n)}else this.childTables.delete(r);this.currentViewport&&this.refreshInternal()}collapseAll(){this.childTables.clear(),this.currentViewport&&this.refreshInternal()}setSearch(e){throw new Error("Method not implemented.")}setViewport(e){this.currentViewport=e,this.refreshInternal()}setFilters(){throw new Error("Method not implemented.")}setSorts(){throw new Error("Method not implemented.")}setReversed(){throw new Error("Method not implemented.")}close(){this.listeners=[]}onUpdate(e){return this.listeners=[...this.listeners,e],()=>{this.listeners=this.listeners.filter(n=>n!==e)}}doRefresh(e){G.debug2("doRefresh",this.root),e(this.fetchData())}refresh(){var e;G.debug2("refresh",this.root),(e=this.viewportUpdatePromise)===null||e===void 0||e.cancel();var n=new Promise(r=>{this.doRefresh(r)}),i=H.makeCancelable(n.then(r=>{if(this.viewportUpdatePromise!==i)throw new nn;return this.currentViewportData=r,this.sendUpdate(),r}));i.catch(r=>{H.isCanceled(r)||G.error("Error updating viewport",r)}),this.viewportUpdatePromise=i}refreshInternal(){try{this.refresh()}catch(e){H.isCanceled(e)||G.error("Unable to refresh data",e)}}fetchData(){var e=this;return Hi(function*(){var{currentViewport:n}=e;if(!n)throw new Error("No viewport set");for(var i=yield e.storageService.listItems(e.root),r=i.map(p=>({type:p.type,filename:e.removeBaseRoot(p.filename),basename:p.basename,id:e.removeBaseRoot(p.filename),isExpanded:p.type==="directory"?e.childTables.has(p.basename):void 0})).sort((p,m)=>p.type!==m.type?p.type==="directory"?-1:1:p.basename.localeCompare(m.basename)),o=0;o<r.length;o+=1){var a=r[o],{basename:s,filename:l}=a;if(l===e.removeBaseRoot("".concat(e.root,"/").concat(s))&&a.type==="directory"){var u=e.childTables.get(s);if(u!=null){u.setViewport({top:0,bottom:n.bottom-o});var b=yield u.getViewportData();r.splice(o+1,0,...b.items)}}}return e.currentSize=r.length,G.debug2(e.root,"items",r,n),r=r.slice(n.top,n.bottom),{items:r,offset:n.top}})()}sendUpdate(){for(var e,{listeners:n}=this,i=(e=this.currentViewportData)!==null&&e!==void 0?e:{items:[],offset:0},r=0;r<n.length;r+=1)n[r](i)}}F(z,"REFRESH_DEBOUNCE",50);function Je(t,e,n,i,r,o,a){try{var s=t[o](a),l=s.value}catch(u){n(u);return}s.done?e(l):Promise.resolve(l).then(i,r)}function _(t){return function(){var e=this,n=arguments;return new Promise(function(i,r){var o=t.apply(e,n);function a(l){Je(o,i,r,a,s,"next",l)}function s(l){Je(o,i,r,a,s,"throw",l)}a(void 0)})}}function B(t,e,n){return e=Xi(e),e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function Xi(t){var e=Qi(t,"string");return typeof e=="symbol"?e:String(e)}function Qi(t,e){if(typeof t!="object"||t===null)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var i=n.call(t,e||"default");if(typeof i!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}var Ji=$.module("GrpcFileStorage");class ge{constructor(e,n){var i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"";B(this,"dh",void 0),B(this,"storageService",void 0),B(this,"tables",[]),B(this,"root",void 0),B(this,"refreshTables",ot(()=>{this.tables.forEach(r=>r.refresh())},ge.REFRESH_THROTTLE)),this.dh=e,this.storageService=n,this.root=i}removeRoot(e){return N.removeRoot(this.root,e)}addRoot(e){return N.addRoot(this.root,e)}createDirectory(e){var n=this;return _(function*(){return yield n.storageService.createDirectory(n.addRoot(e)),n.refreshTables(),{type:"directory",id:e,filename:e,basename:N.getBaseName(e)}})()}getTable(){var e=this;return _(function*(){var n=new z(e.storageService,e.root);return e.tables.push(n),n})()}saveFile(e){var n=this;return _(function*(){var i=n.dh.storage.FileContents.text(e.content);return yield n.storageService.saveFile(n.addRoot(e.filename),i,!0),n.refreshTables(),e})()}loadFile(e){var n=this;return _(function*(){var i=yield n.storageService.loadFile(n.addRoot(e)),r=yield i.text();return{filename:e,basename:N.getBaseName(e),content:r}})()}copyFile(e,n){var i=this;return _(function*(){var r=yield i.storageService.loadFile(i.addRoot(e));yield i.storageService.saveFile(i.addRoot(n),r,!1),i.refreshTables()})()}deleteFile(e){var n=this;return _(function*(){yield n.storageService.deleteItem(n.addRoot(e)),n.refreshTables()})()}moveFile(e,n){var i=this;return _(function*(){yield i.storageService.moveItem(i.addRoot(e),i.addRoot(n)),i.refreshTables()})()}info(e){var n=this;return _(function*(){var i=yield n.storageService.listItems(n.addRoot(N.getPath(e)),N.getBaseName(e));if(i.length===0)throw new rn;if(i.length>1)throw Ji.error("More than one matching file found, should never happen.",i),new Error("More than one matching file found");var r=i[0];if(!on(r.type))throw new Error("Unexpected file type: ".concat(r.type));return{filename:n.removeRoot(r.filename),basename:r.basename,id:n.removeRoot(r.filename),type:r.type}})()}}B(ge,"REFRESH_THROTTLE",150);function Ze(t,e,n,i,r,o,a){try{var s=t[o](a),l=s.value}catch(u){n(u);return}s.done?e(l):Promise.resolve(l).then(i,r)}function Ve(t){return function(){var e=this,n=arguments;return new Promise(function(i,r){var o=t.apply(e,n);function a(l){Ze(o,i,r,a,s,"next",l)}function s(l){Ze(o,i,r,a,s,"throw",l)}a(void 0)})}}function et(t,e,n){return e=Zi(e),e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function Zi(t){var e=Vi(t,"string");return typeof e=="symbol"?e:String(e)}function Vi(t,e){if(typeof t!="object"||t===null)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var i=n.call(t,e||"default");if(typeof i!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}class Ur{constructor(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";et(this,"storageService",void 0),et(this,"root",void 0),this.storageService=e,this.root=n}getLayouts(){var e=this;return Ve(function*(){var n=yield e.storageService.listItems(e.root,"*.json");return n.map(i=>i.basename)})()}getLayout(e){var n=this;return Ve(function*(){var i=yield n.storageService.loadFile("".concat(n.root,"/").concat(e)),r=yield i.text();return JSON.parse(r)})()}}function er(t){return t.version===2}function tr(t){return Array.isArray(t)}function tt(t,e,n,i,r,o,a){try{var s=t[o](a),l=s.value}catch(u){n(u);return}s.done?e(l):Promise.resolve(l).then(i,r)}function nr(t){return function(){var e=this,n=arguments;return new Promise(function(i,r){var o=t.apply(e,n);function a(l){tt(o,i,r,a,s,"next",l)}function s(l){tt(o,i,r,a,s,"throw",l)}a(void 0)})}}var J=$.module("UserLayoutUtils"),ir={layoutConfig:[{type:"column",content:[{type:"row",height:40,content:[{type:"stack",content:[{type:"react-component",component:we.COMPONENT,title:we.TITLE,isClosable:!1},{type:"react-component",component:xe.COMPONENT,title:xe.TITLE,isClosable:!1}]},{type:"stack",width:25,content:[{type:"react-component",component:Se.COMPONENT,title:Se.TITLE,isClosable:!1},{type:"react-component",component:Oe.COMPONENT,title:Oe.TITLE,isClosable:!1}]}]},{type:"row",content:[{type:"stack",title:"Notebooks",content:[]}]}]}],links:[],filterSets:[],version:2},rr={layoutConfig:[],links:[],filterSets:[],version:2};function ft(t){if(er(t))return t;if(tr(t)){var e=t;return{layoutConfig:e,links:[],filterSets:[],version:2}}throw new Error("Unexpected layout import format: ".concat(t))}function or(t){return he.apply(this,arguments)}function he(){return he=nr(function*(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;try{var n=yield t.getLayouts();if(n.length>0)try{var i=yield t.getLayout(n[0]);return ft(i)}catch(r){J.error("Unable to load layout",n[0],":",r),J.warn("No valid layouts found, falling back to default layout")}}catch(r){J.error("Unable to fetch layout list",r),J.warn("Falling back to default layout")}return e?ir:rr}),he.apply(this,arguments)}function sr(t){var{filterSets:e,layoutConfig:n,links:i,pluginDataMap:r}=t,o={filterSets:e,layoutConfig:n,links:i,pluginDataMap:r,version:2};return o}const ar={exportLayout:sr,getDefaultLayout:or,normalizeLayout:ft};function nt(t,e,n,i,r,o,a){try{var s=t[o](a),l=s.value}catch(u){n(u);return}s.done?e(l):Promise.resolve(l).then(i,r)}function Z(t){return function(){var e=this,n=arguments;return new Promise(function(i,r){var o=t.apply(e,n);function a(l){nt(o,i,r,a,s,"next",l)}function s(l){nt(o,i,r,a,s,"throw",l)}a(void 0)})}}function ht(t,e,n){return e=lr(e),e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function lr(t){var e=ur(t,"string");return typeof e=="symbol"?e:String(e)}function ur(t,e){if(typeof t!="object"||t===null)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var i=n.call(t,e||"default");if(typeof i!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}var it=$.module("LocalWorkspaceStorage");class S{static getBooleanServerConfig(e,n){var i,r;if((e==null||(i=e.get(n))===null||i===void 0?void 0:i.toLowerCase())==="true")return!0;if((e==null||(r=e.get(n))===null||r===void 0?void 0:r.toLowerCase())==="false")return!1}static getJSONServerConfig(e,n){var i=e==null?void 0:e.get(n);if(i!=null)try{return JSON.parse(i)}catch{it.error("Unable to parse JSON server config for key ".concat(n,". Value: ").concat(i));return}}static makeDefaultWorkspaceSettings(e){var n={defaultDateTimeFormat:Ee.DEFAULT_DATETIME_FORMAT_STRING,formatter:[],timeZone:Ee.DEFAULT_TIME_ZONE_ID,showTimeZone:!1,showTSeparator:!0,disableMoveConfirmation:!1,defaultDecimalFormatOptions:{defaultFormatString:sn.DEFAULT_FORMAT_STRING},defaultIntegerFormatOptions:{defaultFormatString:an.DEFAULT_FORMAT_STRING},truncateNumbersWithPound:!1,showEmptyStrings:!0,showNullStrings:!0,showExtraGroupColumn:!0,notebookSettings:{isMinimapEnabled:!1,formatOnSave:!1,python:{linter:{isEnabled:!0}}},webgl:!0,webglEditable:!0,gridDensity:"regular"},i={defaultDateTimeFormat:e==null?void 0:e.get("dateTimeFormat"),formatter:[],timeZone:e==null?void 0:e.get("timeZone"),showTimeZone:S.getBooleanServerConfig(e,"showTimeZone"),showTSeparator:S.getBooleanServerConfig(e,"showTSeparator"),disableMoveConfirmation:S.getBooleanServerConfig(e,"disableMoveConfirmation"),defaultDecimalFormatOptions:(e==null?void 0:e.get("decimalFormat"))!==void 0?{defaultFormatString:e==null?void 0:e.get("decimalFormat")}:void 0,defaultIntegerFormatOptions:(e==null?void 0:e.get("integerFormat"))!==void 0?{defaultFormatString:e==null?void 0:e.get("integerFormat")}:void 0,truncateNumbersWithPound:S.getBooleanServerConfig(e,"truncateNumbersWithPound"),showEmptyStrings:S.getBooleanServerConfig(e,"showEmptyStrings"),showNullStrings:S.getBooleanServerConfig(e,"showNullStrings"),showExtraGroupColumn:S.getBooleanServerConfig(e,"showExtraGroupColumn"),notebookSettings:{isMinimapEnabled:S.getBooleanServerConfig(e,"web.user.notebookSettings.isMinimapEnabled"),formatOnSave:S.getBooleanServerConfig(e,"web.user.notebookSettings.formatOnSave"),python:{linter:{isEnabled:S.getBooleanServerConfig(e,"web.user.notebookSettings.python.linter.isEnabled"),config:S.getJSONServerConfig(e,"web.user.notebookSettings.python.linter.config")}}},webgl:S.getBooleanServerConfig(e,"web.webgl"),webglEditable:S.getBooleanServerConfig(e,"web.webgl.editable")};return kt({},n,i)}static makeWorkspaceData(e,n){return Z(function*(){var{filterSets:i,links:r,layoutConfig:o,pluginDataMap:a={}}=yield ar.getDefaultLayout(e,n==null?void 0:n.isConsoleAvailable);return{settings:{},layoutConfig:o,closed:[{}],links:r,filterSets:i,pluginDataMap:a}})()}static makeDefaultWorkspace(e,n){return Z(function*(){return{data:yield S.makeWorkspaceData(e,n)}})()}constructor(e){ht(this,"layoutStorage",void 0),this.layoutStorage=e}load(e){var n=this;return Z(function*(){try{var i,r=JSON.parse((i=localStorage.getItem(S.STORAGE_KEY))!==null&&i!==void 0?i:"");return r}catch{return it.info("Unable to load workspace data, initializing to default data"),S.makeDefaultWorkspace(n.layoutStorage,e)}})()}save(e){return Z(function*(){return localStorage.setItem(S.STORAGE_KEY,JSON.stringify(e)),e})()}}ht(S,"STORAGE_KEY","deephaven.WorkspaceStorage");export{rr as $,Mr as A,Sr as B,k as C,pi as D,Tr as E,mi as F,Ur as G,jn as H,Ci as I,Ni as J,kr as K,gr as L,_r as M,vr as N,Ui as O,kn as P,Ir as Q,wr as R,ui as S,yr as T,ar as U,$i as V,Dr as W,z as X,er as Y,tr as Z,ir as _,ci as a,ft as a0,or as a1,sr as a2,br as b,Nr as c,Ar as d,jr as e,Fr as f,ji as g,ge as h,S as i,st as j,Pr as k,Cr as l,fi as m,ut as n,di as o,xr as p,vi as q,Rr as r,Lr as s,wi as t,ii as u,hi as v,Or as w,Er as x,ct as y,Pi as z};
|
|
82
|
-
//# sourceMappingURL=LocalWorkspaceStorage-
|
|
82
|
+
//# sourceMappingURL=LocalWorkspaceStorage-B81p8nIF.js.map
|