@deephaven/embed-widget 1.21.1 → 1.22.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/{App-DxtyfBTg.js → App-DI6zb7uT.js} +2 -2
- package/build/assets/{App-DxtyfBTg.js.map → App-DI6zb7uT.js.map} +1 -1
- package/build/assets/{Chart-CcJpmHOE.js → Chart-DOFFcXSM.js} +2 -2
- package/build/assets/{Chart-CcJpmHOE.js.map → Chart-DOFFcXSM.js.map} +1 -1
- package/build/assets/IrisGrid-C5iTObSQ.js +6 -0
- package/build/assets/IrisGrid-C5iTObSQ.js.map +1 -0
- package/build/assets/IrisGrid-C8fNjOoq.css +1 -0
- package/build/assets/{IrisGridThemeProvider-DlQydMb9.js → IrisGridThemeProvider-cwMdnCFU.js} +2 -2
- package/build/assets/{IrisGridThemeProvider-DlQydMb9.js.map → IrisGridThemeProvider-cwMdnCFU.js.map} +1 -1
- package/build/assets/{LocalWorkspaceStorage-DgevNTWY.js → LocalWorkspaceStorage-BuA3-rnr.js} +2 -2
- package/build/assets/{LocalWorkspaceStorage-DgevNTWY.js.map → LocalWorkspaceStorage-BuA3-rnr.js.map} +1 -1
- package/build/assets/LogPanel-CxdDBEO3.js +22 -0
- package/build/assets/LogPanel-CxdDBEO3.js.map +1 -0
- package/build/assets/LogPanel-D9n6wQ18.css +1 -0
- package/build/assets/{MarkdownEditor-CLR7IgO4.js → MarkdownEditor-NPSx57c-.js} +2 -2
- package/build/assets/{MarkdownEditor-CLR7IgO4.js.map → MarkdownEditor-NPSx57c-.js.map} +1 -1
- package/build/assets/{MarkdownNotebook-BA4E6R1E.js → MarkdownNotebook-DbZMpvaB.js} +2 -2
- package/build/assets/{MarkdownNotebook-BA4E6R1E.js.map → MarkdownNotebook-DbZMpvaB.js.map} +1 -1
- package/build/assets/index-BHLrktnn.js +13 -0
- package/build/assets/index-BHLrktnn.js.map +1 -0
- package/build/assets/{index-KRCjhGUf.js → index-C4Om-rPm.js} +5 -5
- package/build/assets/index-C4Om-rPm.js.map +1 -0
- package/build/assets/{index-pdsbXyQ2.js → index-DiOPQ7Tk.js} +3 -3
- package/build/assets/{index-pdsbXyQ2.js.map → index-DiOPQ7Tk.js.map} +1 -1
- package/build/index.html +2 -2
- package/package.json +9 -9
- package/build/assets/IrisGrid-BIOgeeAe.css +0 -1
- package/build/assets/IrisGrid-BJrsq-sh.js +0 -6
- package/build/assets/IrisGrid-BJrsq-sh.js.map +0 -1
- package/build/assets/LogPanel-C6NnWLhW.js +0 -22
- package/build/assets/LogPanel-C6NnWLhW.js.map +0 -1
- package/build/assets/LogPanel-DDA8ieVC.css +0 -1
- package/build/assets/index-B36kd8zC.js +0 -13
- package/build/assets/index-B36kd8zC.js.map +0 -1
- package/build/assets/index-KRCjhGUf.js.map +0 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import{r as u,J as W,P as ml,D as c,Q as gl,S as yt,T as vl,U as yl,V as bl,W as Pl,C as vn,X as xl,G as $,Y as yn,Z as ra,a0 as Ol,a1 as ia,a2 as Sl,a3 as wl,a4 as Cl,a5 as El,a6 as hr,a7 as Tl,a8 as jl,a9 as aa,aa as Il,ab as kl,ac as _l,ad as Rl,ae as Dl,af as Ll,ag as Yt,ah as Al,ai as oa,aj as bt,ak as Qe,I as ne,al as sa,am as la,an as bn,ao as ua,ap as ca,aq as zt,ar as Ml,as as He,at as da,H as pa,au as fa,av as Fl,aw as Nl,ax as $l,ay as ha,az as Ul,aA as Bl,aB as Wl,aC as Kl,aD as Vl,aE as Hl,aF as Gl,aG as Yl,aH as zl,aI as ql,aJ as Xl,aK as Ql,aL as Jl,aM as Zl,aN as eu,aO as tu,aP as nu,aQ as ru,aR as iu,aS as au,aT as ou,aU as su,aV as lu,aW as uu,aX as ma,aY as cu,aZ as du,a_ as pu,a$ as fu,b0 as hu,b1 as mu,b2 as gu,b3 as vu,b4 as yu,b5 as bu,b6 as Pu,b7 as xu,b8 as Ou,b9 as Su,ba as wu,bb as Cu,bc as Eu,bd as Tu,be as ju,bf as Iu,bg as ku,O as _u,bh as Ru,bi as Du,bj as Lu,bk as Au,bl as Mu,bm as Fu,L as Nu,N as $u,bn as qt,bo as Uu,bp as Bu,bq as mr,br as Wu,bs as Ku,bt as Vu,bu as Hu,R as Gu,bv as Yu,bw as zu,bx as ga,by as qu,bz as Xu}from"./vendor-Dhl2bb-D.js";import{i as va,b as Pn,p as ya,r as ba,a as Y,M as Pa,c as xa,g as xn,L as je,v as Oa,d as On,e as Sn,f as Pt,h as Qu,j as Ju,k as Zu,l as ec,m as tc,n as wn,o as nc,q as rc,s as ic,t as Sa,u as xt,w as ac,T as Xt,C as oc,D as sc,x as lc,y as uc,z as cc,A as dc,B as pc,E as fc,F as hc,G as wa,N as mc,P as gc,S as vc,H as yc,I as bc,J as Pc,K as xc,W as Oc,O as Sc,Q as wc,R as Cc,U as Ec,V as Tc,X as jc,Y as Ic,Z as kc,_ as _c,$ as Rc,a0 as Dc,a1 as Lc,a2 as Ac,a3 as Mc,a4 as Fc,a5 as Nc,a6 as $c,a7 as Uc,a8 as Bc,a9 as Wc,aa as Kc,ab as Vc,ac as Cn,ad as Hc,ae as Ot,af as En,ag as Gc,ah as Ca,ai as Yc,aj as zc,ak as qc,al as Xc,am as Qc,an as Jc}from"./index-pdsbXyQ2.js";import{C as Ea,e as Zc,a as Je,F as ed,f as td,g as nd,D as gr,h as rd,i as id,d as ad,U as St,j as Ta,k as ja,l as od,c as sd,S as ld}from"./LocalWorkspaceStorage-DgevNTWY.js";import{A as Vx,m as Hx,n as Gx,G as Yx,L as zx,o as qx,p as Xx,q as Qx,r as Jx,s as Zx,t as eO,u as tO,b as nO}from"./LocalWorkspaceStorage-DgevNTWY.js";import{k as ud,l as cd,m as dd,n as pd,o as Ge,p as fd,q as hd,t as md,v as gd,w as wt,x as se,y as Ct,z as oe,T as Et,A as Ze,H as Tn,P as Tt,C as ve,B as Ee,D as Ia,F as dt,G as ka,r as Se,M as X,K as re,R as vr,I as Qt,J as Q,L as _a,N as Jt,O as jt,E as Ra,Q as jn,U as It,V as Da,W as vd,X as yd,c as bd,Y as Pd,Z as La,_ as Aa,S as xd,$ as Od,a0 as Sd,a1 as Ma,a2 as wd,a3 as Cd,a4 as Ed,a5 as Fa,a6 as Td,a7 as jd,a8 as Id,a9 as kd,aa as Na,ab as _d,u as Pe,ac as $a,g as Rd,ad as Dd,ae as Ld,af as Ad,ag as Ua,ah as Md,ai as Fd,aj as Nd,ak as $d,al as Ud,am as Bd,an as Ba,ao as Wa,ap as Ka,aq as Va,s as Ha,ar as yr,as as Wd,at as Kd,au as Vd,av as Hd,aw as Gd,ax as Yd,ay as zd,az as qd,aA as Xd,aB as Qd,aC as Jd,aD as Zd,aE as ep,aF as tp,aG as Ga,aH as np,aI as rp,aJ as ip,aK as ap,aL as op,aM as sp,aN as lp,aO as up,aP as cp,aQ as dp,e as pp,b as fp,aR as hp,aS as mp,aT as gp,aU as vp,aV as yp,aW as bp,aX as Pp,aY as xp,aZ as Op,a_ as Sp,a$ as wp,b0 as Cp,b1 as Ep,b2 as Tp,b3 as jp,b4 as Ip,b5 as kp,b6 as Ya,b7 as _p,b8 as Rp,a as Dp,b9 as Lp,ba as Ap,bb as Mp,bc as Fp,bd as Np,be as $p,bf as Up,bg as Bp,bh as Wp,bi as za,bj as qa,bk as Xa,bl as kt,bm as Kp,bn as Vp,bo as Hp,bp as Gp,bq as Yp,br as zp,bs as Qa,bt as Ja,bu as qp,bv as Xp,bw as Zt,bx as Qp,by as Jp,bz as Zp,bA as Za,bB as ef,bC as tf,bD as nf,bE as rf,bF as af,bG as of,bH as sf,bI as lf,bJ as eo,bK as uf,bL as Ye,bM as to,bN as no,bO as cf,bP as ro,bQ as df,bR as pf,bS as io,bT as ao,bU as oo,bV as br,bW as ff,bX as hf,bY as mf,bZ as gf,b_ as vf,b$ as yf,c0 as bf,c1 as Pf,c2 as xf,c3 as Of,c4 as Sf,c5 as wf,c6 as Cf,c7 as Ef,c8 as Tf,c9 as jf,ca as If,cb as kf,cc as _f,cd as Rf,ce as we,cf as Df,cg as Lf}from"./LogPanel-C6NnWLhW.js";import{F as In,C as Af,S as Mf,u as kn,D as Ff,B as Nf,a as $f,b as Uf,c as Bf,d as _n,e as en,I as Wf,f as Kf,T as so,g as Vf,h as Rn,i as Hf,j as Dn,k as lo,l as Gf,m as uo,n as Ln,o as co,p as po,q as Yf,r as zf,s as qf,t as Xf,v as Qf,w as Jf,x as Zf,y as eh,z as th,A as fo,E as nh,G as rh,H as ih,J as ho,K as mo,L as go,M as ah,N as oh,O as sh,P as lh,Q as uh,R as vo,U as ch,V as dh,W as yo,X as ph,Y as Pr,Z as fh,_ as hh,$ as mh,a0 as gh,a1 as vh,a2 as yh,a3 as bh,a4 as Ph,a5 as xh,a6 as Oh,a7 as Sh,a8 as wh,a9 as Ch,aa as Eh,ab as Th,ac as jh,ad as Ih,ae as kh,af as _h,ag as Rh,ah as Dh,ai as bo}from"./index-B36kd8zC.js";import{D as Lh}from"./DownsamplingError--AAvWHv_.js";import{e as ft,c as Ah,d as Mh,a as Fh,f as Nh,b as $h,g as Uh,h as Bh,i as Wh,j as Po,u as Kh,k as Vh,l as Hh,m as Gh,n as Te,o as Yh,p as zh,q as Ve,r as ht,s as xo,t as An,v as et,w as Mn,x as Fn,y as Nn,z as mt,A as Oo,B as tn,C as $n,D as Un,M as Bn,E as So,F as qh,G as nn,H as Xh,I as Qh,J as Jh,K as Zh,L as em,N as tm,O as nm,P as rm,Q as wo,R as im,S as am,T as om,U as sm,V as Co,W as lm,X as um,Y as cm,Z as dm,_ as pm,$ as fm,a0 as Eo,a1 as hm,a2 as mm,a3 as gm,a4 as vm,a5 as ym,a6 as bm,a7 as Pm,a8 as xm,a9 as Om,aa as Sm,ab as Wn,ac as wm,ad as Cm,ae as Em,af as Tm,ag as jm,ah as Im,ai as pt,aj as Kn,ak as Vn,al as km,am as _m,an as To,ao as jo,ap as pe,aq as Rm,ar as Hn,as as xr,at as Io,au as ko,av as Dm,aw as Lm,ax as Am,ay as Mm,az as Fm,aA as Nm,aB as $m,aC as Um,aD as Bm,aE as Wm,aF as Km,aG as Vm,aH as Hm,aI as Gm,aJ as Ym,aK as zm,aL as qm,aM as Xm,aN as Qm,aO as Jm,aP as Zm,aQ as eg,aR as tg,aS as ng,aT as rg,aU as ig,aV as ag,aW as og,aX as sg,aY as lg,aZ as ug,a_ as cg,a$ as _o,b0 as dg,b1 as pg,b2 as fg,b3 as hg,b4 as mg,b5 as gg,b6 as vg,b7 as yg,b8 as bg,b9 as Pg,ba as xg,bb as Og}from"./IrisGridThemeProvider-DlQydMb9.js";import{u as _t}from"./useResizeObserver-jqNW9zvL.js";import{m as Sg,u as Ro}from"./useMergeRef-D_NUR3Rn.js";import"./helpers-BosuxZz1.js";var wg=["children","keepMounted"];function Or(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function Sr(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?Or(Object(n),!0).forEach(function(r){Cg(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Or(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function Cg(t,e,n){return(e=Eg(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function Eg(t){var e=Tg(t,"string");return typeof e=="symbol"?e:e+""}function Tg(t,e){if(typeof t!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var r=n.call(t,e);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function jg(t,e){if(t==null)return{};var n,r,i=Ig(t,e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);for(r=0;r<a.length;r++)n=a[r],e.indexOf(n)===-1&&{}.propertyIsEnumerable.call(t,n)&&(i[n]=t[n])}return i}function Ig(t,e){if(t==null)return{};var n={};for(var r in t)if({}.hasOwnProperty.call(t,r)){if(e.indexOf(r)!==-1)continue;n[r]=t[r]}return n}function kg(t){var{children:e,keepMounted:n=!1}=t,r=jg(t,wg),i=n&&typeof e!="function",a=u.useRef(new Map),o=u.useMemo(()=>{var l=[],d=new Map;return i?(W.Children.forEach(e,p=>{if(!(p==null||p.key==null)){if(typeof p.props.children=="function")throw new Error("DHCTabPanels cannot use keepMounted with an ItemRenderer function as its children");var f=a.current.get(p.key);f==null&&(f=ml({attributes:{style:"display: contents"}})),d.set(p.key,f),l.push(c.jsx(gl,{node:f,children:p.props.children},p.key))}}),a.current=d,l):(a.current=d,l)},[e,i]),s=u.useMemo(()=>{var l=[];return i&&W.Children.forEach(e,d=>{if(d==null||d.key==null){l.push(d);return}var p=a.current.get(d.key);if(p==null){l.push(d);return}l.push(c.jsx(yt,{children:c.jsx(vl,{node:p})},d.key))}),l},[e,i]);return c.jsxs(c.Fragment,{children:[i&&o,c.jsx(yl,Sr(Sr({},r),{},{children:i?s:e}))]})}function wr(t,e,n,r,i,a,o){try{var s=t[a](o),l=s.value}catch(d){return void n(d)}s.done?e(l):Promise.resolve(l).then(r,i)}function _g(t){return function(){var e=this,n=arguments;return new Promise(function(r,i){var a=t.apply(e,n);function o(l){wr(a,r,i,o,s,"next",l)}function s(l){wr(a,r,i,o,s,"throw",l)}o(void 0)})}}var Rg=[["api"],["client"],["dashboardData","*","connection"],["dashboardData","*","sessionWrapper"],["dashboardData","*","openedMap"],["layoutStorage"],["storage"]],Do=10;function Dg(t){var e=new Map;return function(r,i){var a,o=[...(a=e.get(this))!==null&&a!==void 0?a:[],r];if(i===Object(i)&&e.set(i,[...o]),o.shift(),!Lg(o,t))return i instanceof Map?Array.from(i.entries()):i}}function Lg(t,e){for(var n=function(o){if(t.length===e[o].length&&t.every((s,l)=>e[o][l]==="*"||s===e[o][l]))return{v:!0}},r,i=0;i<e.length;i+=1)if(r=n(i),r)return r.v;return!1}function Ag(t){var e,n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:Do,i=Pl({maximumDepth:r});return(e=i(t,Dg(n),2))!==null&&e!==void 0?e:""}function Mg(t){return JSON.stringify(t,null,2)}function Fg(t){var e=t.getFullYear(),n=String(t.getMonth()+1).padStart(2,"0"),r=String(t.getDate()).padStart(2,"0"),i=String(t.getHours()).padStart(2,"0"),a=String(t.getMinutes()).padStart(2,"0"),o=String(t.getSeconds()).padStart(2,"0");return"".concat(e,"-").concat(n,"-").concat(r,"-").concat(i).concat(a).concat(o)}function Ng(t,e,n){return rn.apply(this,arguments)}function rn(){return rn=_g(function*(t,e,n){var r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:Rg,i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:"".concat(Fg(new Date),"_support_logs"),a=arguments.length>5&&arguments[5]!==void 0?arguments[5]:Do,o=new bl,s=o.folder(i);s.file("console.txt",t.getFormattedHistory()),e!=null&&s.file("metadata.json",Mg(e)),n!=null&&s.file("redux.json",Ag(n,r,a));var l=yield o.generateAsync({type:"blob"}),d=document.createElement("a");d.href=URL.createObjectURL(l),d.download="".concat(i,".zip"),d.click()}),rn.apply(this,arguments)}function $g(t,e){return t===0?0:e==="all"||t===e.size?"all":e.size}function Lo(t,e){return t===e?!0:t==="all"||e==="all"||t.size!==e.size?!1:[...t.keys()].every(n=>e.has(n))}function Ao(t,e){return t.isInverted===e.isInverted&&Lo(t.selection,e.selection)}function Mo(t,e,n){if(t==="all")return"all";var r=[...t.keys()];return new Set(r.map(i=>{var a=e(i);if(a===void 0)throw new Error("Could not find item with key ".concat(i));return n(a)}))}function Fo(t,e,n){var r=t==="all"||t.size>e/2,i=t;return r&&(i=t==="all"?new Set:new Set([...ud(0,e-1)].map(n).filter(a=>!t.has(a)))),{selection:i,isInverted:r}}function Ug(t,e){return u.useCallback(function(){var n=t(...arguments);return e(),n},[e,t])}function Bg(t){return u.useCallback(e=>{t(e.target.value)},[t])}function Gn(t,e){return u.useCallback(n=>{typeof t=="function"?t(e(n)):t.current=e(n)},[e,t])}function No(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:va,[e,n]=u.useState(0),[r,i]=u.useState(0),[a,o]=u.useState(0),[s,l]=u.useState(0),d=u.useMemo(()=>new DOMRect(e,r,a,s),[s,a,e,r]),[p,f]=u.useState(null),m=Gn(f,t),h=u.useCallback(g=>{var b,[x]=g,v=(b=x==null?void 0:x.contentRect)!==null&&b!==void 0?b:{x:0,y:0,width:0,height:0};n(v.x),i(v.y),o(v.width),l(v.height)},[]);return _t(p,h),{ref:m,contentRect:d}}function Wg(t){var[e,n]=u.useState(!0);return u.useEffect(()=>{var r=setTimeout(()=>{n(!1)},t);return()=>{clearTimeout(r)}},[t]),e}function Kg(t){var[e,n]=u.useState(t);return u.useEffect(()=>{n(t)},[t]),[e,n]}function Vg(t,e,n,r){var i=u.useRef(0);u.useEffect(()=>{i.current>=n||r&&(i.current+=1,t())},[n,r,...e])}function $o(t,e){var n=u.useRef(t),r=e(n.current,t)?n.current:t;return n.current=r,r}function Hg(t){t.preventDefault()}function Uo(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1,e=u.useMemo(()=>"useSubmitButtonRef-".concat(vn()),[]),n=u.useCallback(a=>{var o;a==null||(o=a.UNSAFE_getDOMNode())===null||o===void 0||o.setAttribute("form",e)},[e]),r=u.useMemo(()=>({id:e,onSubmit:t?void 0:Hg}),[e,t]),i=u.useMemo(()=>({form:e,ref:n}),[e,n]);return{formProps:r,submitButtonProps:i}}function Bo(t,e,n){var{getItem:r,selectedKeys:i,items:a}=t;return u.useMemo(()=>{var{selection:o,isInverted:s}=Fo(i,a.length,n);return{selection:Mo(o,r,e),isInverted:s}},[i,a.length,n,r,e])}function Wo(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:va,n=u.useRef();return u.useEffect(()=>()=>{var r;return(r=n.current)===null||r===void 0?void 0:r.call(n)},[]),u.useCallback(r=>{var i;(i=n.current)===null||i===void 0||i.call(n);var a=e(r);a&&(a.addEventListener("scroll",t),n.current=()=>{a.removeEventListener("scroll",t),n.current=void 0})},[e,t])}function Cr(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function Er(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?Cr(Object(n),!0).forEach(function(r){Gg(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Cr(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function Gg(t,e,n){return(e=Yg(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function Yg(t){var e=zg(t,"string");return typeof e=="symbol"?e:e+""}function zg(t,e){if(typeof t!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var r=n.call(t,e);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function qg(t,e,n,r){var i=arguments.length===4;return u.useCallback(a=>{var o=i?a??r:a;n(Er(Er({},t),{},{[e]:o}))},[n,t,e,i,r])}function tt(t,e){var[n,r]=u.useState(!0),[i,a]=u.useState(t),[o,s]=u.useState(t),[l,d]=u.useState(e);return(t!==o||e!==l)&&(r(!0),s(t),d(e)),u.useEffect(()=>{var p=!1,f=setTimeout(()=>{p||(r(!1),a(t))},e);return()=>{p=!0,clearTimeout(f)}},[t,e]),{isDebouncing:n,value:i}}function Ko(t,e){return u.useCallback(n=>{if(n!=null){var r=e==null?[n]:n.querySelectorAll(e);r.forEach(i=>{Object.entries(t).forEach(a=>{var[o,s]=a;i.setAttribute(o,s)})})}},[t,e])}var Vo={spellCheck:!1};function Xg(t){var e=Ko(Vo,t);return Gn(e,ft)}function Qg(t,e,n){var r=u.useMemo(()=>typeof t=="string"?[t]:t,[t]);u.useEffect(()=>(r.forEach(i=>window.addEventListener(i,e,n)),()=>r.forEach(i=>window.removeEventListener(i,e,n))),[r,e,n])}const Jg=Object.freeze(Object.defineProperty({__proto__:null,SPELLCHECK_FALSE_ATTRIBUTE:Vo,createValidationProps:Ah,defaultGetKey:Mh,extractSpectrumHTMLElement:ft,extractSpectrumLastChildHTMLElement:Fh,findSpectrumComboBoxScrollArea:Nh,findSpectrumPickerScrollArea:$h,findSpectrumPopoverScrollArea:Uh,getPositionOfSelectedItem:Bh,getSelectedItemCountOrAll:$g,identityExtractHTMLElement:Wh,isElementOfType:Po,isSelectionEqual:Lo,isSelectionMaybeInvertedEqual:Ao,mapSelection:Mo,mergeRefs:Sg,optimizeSelection:Fo,useAsyncInterval:cd,useCallbackWithAction:Ug,useChangeEventValueCallback:Bg,useCheckOverflow:Kh,useContentRect:No,useContextOrThrow:dd,useCopyToClipboard:pd,useDebouncedCallback:Ge,useDebouncedValue:tt,useDelay:Wg,useDependentState:Kg,useEffectNTimesWhen:Vg,useFormWithDetachedSubmitButton:Uo,useForwardedRef:fd,useIsEqualMemo:$o,useIsMountedRef:hd,useMappedRef:Gn,useMappedSelection:Bo,useMergeRef:Ro,useOnChange:Vh,useOnScrollOffsetChangeCallback:Hh,useOnScrollRef:Wo,usePopoverOnScrollRef:Gh,usePrevious:md,usePromiseFactory:Te,usePropChangeCallback:qg,useResizeObserver:_t,useSetAttributesCallback:Ko,useSpectrumDisableSpellcheckRef:Xg,useThrottledCallback:gd,useUndoRedo:Yh,useWindowListener:Qg,useWindowedListData:zh},Symbol.toStringTag,{value:"Module"}));var Zg=["aria-label","aria-labelledby","aria-describedby","aria-details","marginX","marginY","width","height","minWidth","minHeight","maxWidth","maxHeight","flex","flexGrow","flexShrink","flexBasis","justifySelf","alignSelf","order","gridArea","gridColumn","gridRow","gridColumnStart","gridColumnEnd","gridRowStart","gridRowEnd","position","zIndex","top","bottom","start","end","left","right","isHidden"];function ev(t,e){if(t==null)return{};var n,r,i=tv(t,e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);for(r=0;r<a.length;r++)n=a[r],e.indexOf(n)===-1&&{}.propertyIsEnumerable.call(t,n)&&(i[n]=t[n])}return i}function tv(t,e){if(t==null)return{};var n={};for(var r in t)if({}.hasOwnProperty.call(t,r)){if(e.indexOf(r)!==-1)continue;n[r]=t[r]}return n}function Ho(t){var{"aria-label":e,"aria-labelledby":n,"aria-describedby":r,"aria-details":i,marginX:a,marginY:o,width:s,height:l,minWidth:d,minHeight:p,maxWidth:f,maxHeight:m,flex:h,flexGrow:g,flexShrink:b,flexBasis:x,justifySelf:v,alignSelf:y,order:O,gridArea:w,gridColumn:P,gridRow:C,gridColumnStart:_,gridColumnEnd:j,gridRowStart:D,gridRowEnd:R,position:N,zIndex:T,top:L,bottom:A,start:B,end:Z,left:K,right:U,isHidden:I}=t,S=ev(t,Zg);return{ariaLabelProps:{"aria-label":e,"aria-labelledby":n,"aria-describedby":r,"aria-details":i},styleProps:{marginX:a,marginY:o,width:s,height:l,minWidth:d,minHeight:p,maxWidth:f,maxHeight:m,flex:h,flexGrow:g,flexShrink:b,flexBasis:x,justifySelf:v,alignSelf:y,order:O,gridArea:w,gridColumn:P,gridRow:C,gridColumnStart:_,gridColumnEnd:j,gridRowStart:D,gridRowEnd:R,position:N,zIndex:T,top:L,bottom:A,start:B,end:Z,left:K,right:U,isHidden:I},componentProps:S}}function Yn(t){var{normalizedItems:e,defaultSelectedKeys:n,disabledKeys:r,selectedKeys:i,onChange:a}=t,o=u.useMemo(()=>Ve(i),[i]),s=u.useMemo(()=>Ve(n),[n]),l=u.useMemo(()=>Ve(r),[r]),d=u.useCallback(p=>{if(a!=null){if(p==="all"){a("all");return}var f=new Set,m=new Set;e.forEach(h=>{var g=String(ht(h));p.has(g)&&(f.add(ht(h)),m.add(g))}),p.forEach(h=>{m.has(String(h))||f.add(h)}),a(f)}},[e,a]);return{selectedStringKeys:o,defaultSelectedStringKeys:s,disabledStringKeys:l,onStringSelectionChange:d}}function nv(){var{selectedThemeKey:t,setSelectedThemeKey:e,themes:n}=wt(),r=u.useCallback(i=>{i!=null&&e("".concat(i))},[e]);return c.jsx(xl,{label:"Pick a color scheme",items:n,selectedKey:t,onSelectionChange:r,children:i=>c.jsx(yt,{children:i.name},i.themeKey)})}function rv(t){var{className:e,style:n}=t;return c.jsx("div",{className:$("dh-logo",e),style:n})}var Tr=Y.module("useExternalTheme");function Go(){var[t,e]=u.useState(()=>{var r=Pn();return{isEnabled:r,isPending:r}}),n=u.useCallback(r=>{var i=ya(r);e({isEnabled:!0,isPending:!1,themeData:i})},[]);return u.useEffect(()=>{if(!t.isEnabled)return;Tr.debug("Requesting external theme data");function r(i){var a=xn();i.source!==window&&i.source!==a||i.data.message===Pa&&xa(i.data.payload)&&n(i.data.payload)}return window.addEventListener("message",r),ba().then(n).catch(i=>{Tr.error(i),e({isEnabled:!0,isPending:!1})}),()=>{window.removeEventListener("message",r)}},[n,t.isEnabled]),t}var Rt=u.createContext(!1);Rt.displayName="FontsLoadedContext";function Yo(t){var{fontClassNames:e=["fira-sans-regular","fira-sans-semibold","fira-mono"],children:n}=t,[r,i]=u.useState(!1);return u.useEffect(function(){document.fonts.ready.then(()=>{i(!0)})},[]),c.jsxs(c.Fragment,{children:[c.jsx(Rt.Provider,{value:r,children:n}),c.jsx("div",{id:"preload-fonts",style:{visibility:"hidden",position:"absolute",top:-1e4},children:e.map(a=>c.jsx("p",{className:a,children:"preload"},a))})]})}function zo(t){var{children:e}=t,n=u.useContext(Rt);return n?c.jsx(c.Fragment,{children:e}):c.jsx(je,{"data-testid":"fonts-loaded-loading"})}var iv=["UNSAFE_className"],av=["forceRerenderKey","ref"];function jr(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function Ir(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?jr(Object(n),!0).forEach(function(r){ov(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):jr(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function ov(t,e,n){return(e=sv(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function sv(t){var e=lv(t,"string");return typeof e=="symbol"?e:e+""}function lv(t,e){if(typeof t!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var r=n.call(t,e);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function kr(t,e){if(t==null)return{};var n,r,i=uv(t,e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);for(r=0;r<a.length;r++)n=a[r],e.indexOf(n)===-1&&{}.propertyIsEnumerable.call(t,n)&&(i[n]=t[n])}return i}function uv(t,e){if(t==null)return{};var n={};for(var r in t)if({}.hasOwnProperty.call(t,r)){if(e.indexOf(r)!==-1)continue;n[r]=t[r]}return n}function qo(t){var{UNSAFE_className:e}=t,n=kr(t,iv),r=xo(n),{forceRerenderKey:i,ref:a}=r,o=kr(r,av);return u.createElement(yn,Ir(Ir({},o),{},{key:i,ref:a,UNSAFE_className:$("dh-combobox","dh-combobox-normalized",e)}))}var cv=["onScroll"];function _r(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function at(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?_r(Object(n),!0).forEach(function(r){dv(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):_r(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function dv(t,e,n){return(e=pv(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function pv(t){var e=fv(t,"string");return typeof e=="symbol"?e:e+""}function fv(t,e){if(typeof t!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var r=n.call(t,e);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function hv(t,e){if(t==null)return{};var n,r,i=mv(t,e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);for(r=0;r<a.length;r++)n=a[r],e.indexOf(n)===-1&&{}.propertyIsEnumerable.call(t,n)&&(i[n]=t[n])}return i}function mv(t,e){if(t==null)return{};var n={};for(var r in t)if({}.hasOwnProperty.call(t,r)){if(e.indexOf(r)!==-1)continue;n[r]=t[r]}return n}function zn(t){var e,n,{ariaLabelProps:r,componentProps:i,styleProps:a}=Ho(t),{onScroll:o=se}=i,s=hv(i,cv),{scale:l}=An(),d=Wo(o,ft),{ref:p,contentRect:f}=No(ft);return c.jsx(ra,at(at({direction:"column",ref:p},a),{},{minHeight:(e=a.minHeight)!==null&&e!==void 0?e:1,UNSAFE_className:$("dh-list-view-wrapper","dh-list-view-wrapper-density-".concat((n=s.density)!==null&&n!==void 0?n:"regular"),"dh-list-view-wrapper-scale-".concat(l),a.UNSAFE_className),children:f.height===0?null:c.jsx(Ol,at(at({ref:d},r),s))}))}var gv=["children","tooltip","selectedKeys","defaultSelectedKeys","disabledKeys","UNSAFE_className","onChange","onScroll","onSelectionChange"];function Rr(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function Dr(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?Rr(Object(n),!0).forEach(function(r){vv(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Rr(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function vv(t,e,n){return(e=yv(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function yv(t){var e=bv(t,"string");return typeof e=="symbol"?e:e+""}function bv(t,e){if(typeof t!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var r=n.call(t,e);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function Pv(t,e){if(t==null)return{};var n,r,i=xv(t,e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);for(r=0;r<a.length;r++)n=a[r],e.indexOf(n)===-1&&{}.propertyIsEnumerable.call(t,n)&&(i[n]=t[n])}return i}function xv(t,e){if(t==null)return{};var n={};for(var r in t)if({}.hasOwnProperty.call(t,r)){if(e.indexOf(r)!==-1)continue;n[r]=t[r]}return n}function Ov(t){var{children:e,tooltip:n=!0,selectedKeys:r,defaultSelectedKeys:i,disabledKeys:a,UNSAFE_className:o,onChange:s,onScroll:l=se,onSelectionChange:d}=t,p=Pv(t,gv),f=u.useMemo(()=>et(n,"bottom"),[n]),m=u.useMemo(()=>Mn(e,f),[e,f]);return c.jsx(zn,Dr(Dr({},p),{},{UNSAFE_className:$("dh-list-view",o),selectedKeys:r,defaultSelectedKeys:i,disabledKeys:a,onScroll:l,onSelectionChange:s??d,children:m}))}var Sv=["normalizedItems","tooltip","selectedKeys","defaultSelectedKeys","disabledKeys","showItemIcons","actions","UNSAFE_className","onChange","onSelectionChange"];function Lr(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function Ar(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?Lr(Object(n),!0).forEach(function(r){wv(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Lr(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function wv(t,e,n){return(e=Cv(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function Cv(t){var e=Ev(t,"string");return typeof e=="symbol"?e:e+""}function Ev(t,e){if(typeof t!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var r=n.call(t,e);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function Tv(t,e){if(t==null)return{};var n,r,i=jv(t,e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);for(r=0;r<a.length;r++)n=a[r],e.indexOf(n)===-1&&{}.propertyIsEnumerable.call(t,n)&&(i[n]=t[n])}return i}function jv(t,e){if(t==null)return{};var n={};for(var r in t)if({}.hasOwnProperty.call(t,r)){if(e.indexOf(r)!==-1)continue;n[r]=t[r]}return n}function Xo(t){var{normalizedItems:e,tooltip:n=!0,selectedKeys:r,defaultSelectedKeys:i,disabledKeys:a,showItemIcons:o,actions:s,UNSAFE_className:l,onChange:d,onSelectionChange:p}=t,f=Tv(t,Sv),m=u.useMemo(()=>et(n,"bottom"),[n]),h=Fn({itemIconSlot:"illustration",showItemDescriptions:!1,showItemIcons:o,tooltipOptions:m,actions:s}),g="".concat(o,"-").concat(m==null?void 0:m.placement),{selectedStringKeys:b,defaultSelectedStringKeys:x,disabledStringKeys:v,onStringSelectionChange:y}=Yn({normalizedItems:e,selectedKeys:r,defaultSelectedKeys:i,disabledKeys:a,onChange:d??p});return u.createElement(zn,Ar(Ar({},f),{},{UNSAFE_className:$("dh-list-view-normalized",l),key:g,items:e,selectedKeys:b,defaultSelectedKeys:x,disabledKeys:v,onSelectionChange:y}),h)}function Mr(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function Fr(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?Mr(Object(n),!0).forEach(function(r){Iv(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Mr(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function Iv(t,e,n){return(e=kv(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function kv(t){var e=_v(t,"string");return typeof e=="symbol"?e:e+""}function _v(t,e){if(typeof t!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var r=n.call(t,e);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function qn(t){return t.replace(/^\.\$/,"")}function Nr(t){var e;if(t.key==null)return null;var n=qn(String(t.key)),r=(e=Oo(t))!==null&&e!==void 0?e:typeof t.props.children=="string"?t.props.children:n;return{kind:"item",key:n,label:r}}function Xn(t){return t.kind==="section"}function Rv(t){var e=[];return t.forEach(n=>{if(Nn(n)){var r=n,i=r.key!=null?qn(String(r.key)):String(e.length),a=[];Ct(r.props.children).forEach(s=>{if(mt(s)){var l=Nr(s);l!=null&&a.push(l)}}),e.push({kind:"section",key:i,title:r.props.title,items:a});return}if(mt(n)){var o=Nr(n);o!=null&&e.push(o)}}),e}function Qo(t){return t.flatMap(e=>Xn(e)?e.items:[e])}function Dv(t,e,n){var r=[];return t.forEach(i=>{if(Xn(i)){var a=i.items.filter(o=>n(o.label,e));a.length>0&&r.push(Fr(Fr({},i),{},{items:a}))}else n(i.label,e)&&r.push(i)}),r}function Lv(t){var e=new Set;return t.forEach(n=>{Xn(n)?n.items.forEach(r=>e.add(r.key)):e.add(n.key)}),e}function Jo(t,e){var n=[];return t.forEach(r=>{if(Nn(r)){var i=r,a=Jo(Ct(i.props.children).filter(s=>s!=null),e);a.length>0&&n.push(u.cloneElement(i,{children:a}));return}if(mt(r)){var o=r;o.key!=null&&e.has(qn(String(o.key)))&&n.push(r)}}),n}function $r(t,e){return t==null?new Set:t==="all"?new Set(e):new Set([...t].map(String))}function Av(t){var{selectedKeys:e,defaultSelectedKeys:n,disabledKeys:r,onChange:i,onSelectionChange:a,allKeys:o}=t,s=u.useMemo(()=>e!==void 0?$r(e,o):void 0,[e,o]),l=u.useCallback(v=>{var y=i??a;y==null||y(v)},[i,a]),d=u.useRef(void 0);d.current===void 0&&(d.current=$r(n,o));var[p,f]=ia(s,d.current,l),m=u.useRef(p);m.current=p;var h=u.useMemo(()=>Ve(r),[r]),g=u.useCallback(v=>{var y=new Set(m.current);y.has(v)?y.delete(v):y.add(v),f(y)},[f]),b=u.useCallback((v,y)=>{if(v==="all"){f(new Set(o));return}var O=new Set(y.map(P=>P.key)),w=new Set([...m.current].filter(P=>!O.has(P)));v.forEach(P=>w.add(String(P))),f(w)},[o,f]),x=u.useMemo(()=>[...p],[p]);return{selectedKeys:p,selectedKeyArray:x,listBoxDisabledKeys:h,toggleKey:g,applyListBoxSelection:b}}function Mv(t){var{allEntries:e,wrappedChildren:n,inputValue:r,defaultInputValue:i,onInputChange:a,onSearchTextChange:o}=t,[s,l]=ia(r,i,a),d=u.useCallback(b=>{l(b),o==null||o(b)},[l,o]),{contains:p}=Sl({sensitivity:"base"}),f=o!=null||s==="",m=u.useMemo(()=>f?e:Dv(e,s,p),[e,s,p,f]),h=u.useMemo(()=>Qo(m),[m]),g=u.useMemo(()=>{if(f)return n;var b=Lv(m);return Jo(n,b)},[n,m,f]);return{searchText:s,setSearchText:d,filteredItems:h,filteredJsxChildren:g}}function Fv(t){return t.replace(/\s+/g,"")}function Nv(t){var{filteredItems:e,allItems:n,shouldFocusWrap:r,overlayState:i,openOverlay:a,closeOverlay:o,isReadOnly:s,isDisabled:l,searchText:d,setSearchText:p,selectedKeys:f,toggleKey:m,allowsCustomValue:h,menuTrigger:g,onKeyDown:b,listBoxContainerRef:x,inputRef:v}=t,[y,O]=u.useState(null),w=u.useCallback(_=>{var j=e.length;j!==0&&O(D=>{var R=D==null?-1:e.findIndex(T=>T.key===D),N;return _==="down"?R===-1?N=0:r?N=(R+1)%j:N=Math.min(R+1,j-1):R===-1?N=j-1:r?N=(R-1+j)%j:N=Math.max(R-1,0),e[N].key})},[e,r]),P=u.useCallback(_=>{if(!l){switch(_.key){case"ArrowDown":_.preventDefault(),i.isOpen?w("down"):a("manual");break;case"ArrowUp":_.preventDefault(),i.isOpen&&w("up");break;case"Enter":{if(!i.isOpen){_.preventDefault(),a("manual");break}var j=y!=null&&e.some(L=>L.key===y);if(!s&&j)_.preventDefault(),m(y);else if(!s&&h&&d.trim()!==""){_.preventDefault();var D=d.trim(),R=n.find(L=>L.label.toLowerCase()===D.toLowerCase());m(R!=null?R.key:D),p("")}else p(""),o();break}case"Escape":i.isOpen&&(_.preventDefault(),o());break;case"Tab":i.isOpen&&o();break;case"Backspace":if(d===""&&!s&&f.size>0){var N=[...f],T=N[N.length-1];T!=null&&m(T)}break}b==null||b(_)}},[l,i,a,o,w,s,y,e,n,h,m,d,p,f,b]),C=u.useRef(!1);return u.useEffect(()=>{C.current&&!i.isOpen&&(h||p(""),O(null)),C.current=i.isOpen},[i.isOpen,p,h]),u.useEffect(()=>{g!=="manual"&&d!==""&&!i.isOpen&&!l&&a("input")},[d]),u.useEffect(()=>{var _=x.current;if(_==null){var j;(j=v.current)===null||j===void 0||j.removeAttribute("aria-activedescendant");return}var D=_.querySelectorAll('[role="option"]'),R=y!=null?"-option-".concat(Fv(y)):null,N;D.forEach(L=>{var A=R!=null&&L.id.endsWith(R);A?(L.setAttribute("data-dh-focused","true"),L.scrollIntoView({block:"nearest"}),N=L.id):L.removeAttribute("data-dh-focused")});var T=v.current;T!=null&&(N!=null?T.setAttribute("aria-activedescendant",N):T.removeAttribute("aria-activedescendant"))},[y,e,v,x]),{handleInputKeyDown:P}}var $v=500;function Uv(t){var{loadingState:e,searchText:n,isOpen:r,menuTrigger:i}=t,[a,o]=u.useState(!1),s=u.useRef(null),l=e==="loading"||e==="filtering",d=u.useRef(n);return u.useEffect(()=>{if(l&&!a){var p=n!==d.current;s.current!==null&&p&&(clearTimeout(s.current),s.current=null),s.current===null&&(s.current=setTimeout(()=>{o(!0)},$v))}else l||(o(!1),s.current!=null&&(clearTimeout(s.current),s.current=null));d.current=n},[l,a,n]),u.useEffect(()=>()=>{s.current!=null&&(clearTimeout(s.current),s.current=null)},[]),a&&(r||i==="manual"||e==="loading")}function Bv(t){var{containerRef:e,isOpen:n,onScroll:r}=t,[i,a]=u.useState(null),o=u.useRef(r);o.current=r,u.useEffect(()=>{if(!n){a(null);return}var s=window.requestAnimationFrame(()=>{var l=e.current;if(l!=null){var d=l.querySelector('[role="listbox"]');a(d??l)}});return()=>{window.cancelAnimationFrame(s)}},[n,e]),u.useEffect(()=>{if(i!=null){var s=l=>{o.current(l)};return i.addEventListener("scroll",s),()=>{i.removeEventListener("scroll",s)}}},[i])}function Wv(t){var{tagKey:e,label:n,isDisabled:r,isReadOnly:i,onRemove:a}=t;return c.jsxs("span",{className:"dh-multi-select-tag",children:[c.jsx("span",{className:"dh-multi-select-tag-label",children:n}),!r&&!i&&c.jsx("button",{type:"button",className:"dh-multi-select-tag-remove",tabIndex:-1,"aria-label":"Remove ".concat(n),onPointerDown:o=>o.preventDefault(),onClick:()=>a(e),children:c.jsx(wl,{})})]})}function Kv(t){var{listBoxRef:e,listBoxId:n,loadingState:r,children:i,selectedKeys:a,disabledKeys:o,onSelectionChange:s,ariaLabel:l,emptyMessage:d}=t;return d!=null?c.jsx("div",{className:"dh-multi-select-empty",children:d}):c.jsx(Cl,{ref:e,id:n,selectionMode:"multiple",selectedKeys:a,onSelectionChange:s,disabledKeys:o,"aria-label":l,isLoading:r==="loadingMore",UNSAFE_style:{maxHeight:"inherit"},children:i})}var Vv=["children","tooltip","selectedKeys","defaultSelectedKeys","disabledKeys","onChange","onSelectionChange","onOpenChange","onScroll","label","description","errorMessage","isRequired","isDisabled","isReadOnly","validationState","isQuiet","labelPosition","labelAlign","necessityIndicator","contextualHelp","inputValue","defaultInputValue","onInputChange","shouldFocusWrap","loadingState","menuTrigger","align","direction","shouldFlip","menuWidth","allowsCustomValue","formValue","validationBehavior","autoFocus","name","id","isHidden","onFocus","onBlur","onFocusChange","onKeyDown","onKeyUp","onSearchTextChange","selectedItemLabels","UNSAFE_className","aria-label","aria-labelledby","aria-describedby","aria-details"];function Ur(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function Br(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?Ur(Object(n),!0).forEach(function(r){Hv(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Ur(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function Hv(t,e,n){return(e=Gv(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function Gv(t){var e=Yv(t,"string");return typeof e=="symbol"?e:e+""}function Yv(t,e){if(typeof t!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var r=n.call(t,e);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function zv(t,e){if(t==null)return{};var n,r,i=qv(t,e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);for(r=0;r<a.length;r++)n=a[r],e.indexOf(n)===-1&&{}.propertyIsEnumerable.call(t,n)&&(i[n]=t[n])}return i}function qv(t,e){if(t==null)return{};var n={};for(var r in t)if({}.hasOwnProperty.call(t,r)){if(e.indexOf(r)!==-1)continue;n[r]=t[r]}return n}function Xv(t){if(t!=null)return typeof t=="number"?"".concat(t,"px"):/^(size|static-size)-/.test(t)?"var(--spectrum-global-dimension-".concat(t,")"):t}function Qv(t,e){var n,r,i,{children:a,tooltip:o=!0,selectedKeys:s,defaultSelectedKeys:l,disabledKeys:d,onChange:p,onSelectionChange:f,onOpenChange:m,onScroll:h=se,label:g,description:b,errorMessage:x,isRequired:v=!1,isDisabled:y=!1,isReadOnly:O=!1,validationState:w,isQuiet:P=!1,labelPosition:C="top",labelAlign:_,necessityIndicator:j,contextualHelp:D,inputValue:R,defaultInputValue:N="",onInputChange:T,shouldFocusWrap:L=!1,loadingState:A,menuTrigger:B="input",align:Z="start",direction:K="bottom",shouldFlip:U=!0,menuWidth:I,allowsCustomValue:S=!1,formValue:k="key",validationBehavior:E="aria",autoFocus:F=!1,name:H,id:le,isHidden:J=!1,onFocus:z,onBlur:ee,onFocusChange:te,onKeyDown:Vs,onKeyUp:Hs,onSearchTextChange:Gs,selectedItemLabels:nt,UNSAFE_className:Ys,"aria-label":zs,"aria-labelledby":qs,"aria-describedby":Xs,"aria-details":Qs}=t,Js=zv(t,Vv),At=u.useRef(void 0),Zs=u.useCallback(M=>{m==null||m(M,At.current)},[m]),G=El({onOpenChange:Zs}),xe=u.useCallback(M=>{At.current=M,G.open()},[G]),Ie=u.useCallback(()=>{At.current=void 0,G.close()},[G]),ir=u.useId(),el="".concat(K," ").concat(Z),fe=u.useRef(null),Me=u.useRef(null),ar=u.useRef(null),Fe=hr(ar),or=u.useRef(null),sr=hr(or),rt=u.useRef(!1),tl=Ro(fe,e),lr=u.useMemo(()=>et(o),[o]),Mt=u.useMemo(()=>Ct(Mn(a,lr)),[a,lr]),Ft=u.useMemo(()=>Rv(Mt),[Mt]),Ne=u.useMemo(()=>Qo(Ft),[Ft]),nl=u.useMemo(()=>Ne.map(M=>M.key),[Ne]),rl=u.useRef(new Map),ur=u.useMemo(()=>{var M=rl.current;return Ne.forEach(q=>M.set(q.key,q.label)),new Map(M)},[Ne]),cr=u.useCallback(M=>{var q,Oe;return(q=(Oe=ur.get(M))!==null&&Oe!==void 0?Oe:nt==null?void 0:nt.get(M))!==null&&q!==void 0?q:M},[ur,nt]),{searchText:Nt,setSearchText:dr,filteredItems:$e,filteredJsxChildren:il}=Mv({allEntries:Ft,wrappedChildren:Mt,inputValue:R,defaultInputValue:N,onInputChange:T,onSearchTextChange:Gs}),al=u.useMemo(()=>{if(!($e.length>0)){if(A==="loading")return"Loading...";if(A!=="loadingMore")return"No results"}},[$e.length,A]),{selectedKeys:pr,selectedKeyArray:$t,listBoxDisabledKeys:ol,toggleKey:Ut,applyListBoxSelection:fr}=Av({selectedKeys:s,defaultSelectedKeys:l,disabledKeys:d,onChange:p,onSelectionChange:f,allKeys:nl}),{handleInputKeyDown:sl}=Nv({filteredItems:$e,allItems:Ne,shouldFocusWrap:L,overlayState:G,openOverlay:xe,closeOverlay:Ie,isReadOnly:O,isDisabled:y,searchText:Nt,setSearchText:dr,selectedKeys:pr,toggleKey:Ut,allowsCustomValue:S,menuTrigger:B,onKeyDown:Vs,listBoxContainerRef:sr,inputRef:Me});Bv({containerRef:sr,isOpen:G.isOpen,onScroll:h});var ll=Uv({loadingState:A,searchText:Nt,isOpen:G.isOpen,menuTrigger:B}),it=u.useCallback(()=>{requestAnimationFrame(()=>{var M;(M=Me.current)===null||M===void 0||M.focus()})},[]),ul=u.useCallback(M=>{Ut(M),it()},[Ut,it]),cl=u.useCallback(M=>{O||(fr(M,$e),it())},[O,fr,$e,it]),dl=u.useCallback(M=>{rt.current||(rt.current=!0,B==="focus"&&!G.isOpen&&!y&&xe("focus"),z==null||z(M),te==null||te(!0))},[z,te,B,G,y,xe]),pl=u.useCallback(M=>{var q=M.relatedTarget;if(q!=null){if(fe.current!=null&&fe.current.contains(q)||Fe.current!=null&&Fe.current.contains(q))return}else{requestAnimationFrame(()=>{var Oe=document.activeElement;Oe!=null&&(fe.current!=null&&fe.current.contains(Oe)||Fe.current!=null&&Fe.current.contains(Oe))||(rt.current=!1,G.isOpen&&Ie(),ee==null||ee(M),te==null||te(!1))});return}rt.current=!1,G.isOpen&&Ie(),ee==null||ee(M),te==null||te(!1)},[ee,te,G,Ie,Fe]),fl=u.useCallback(()=>{var M;y||(G.isOpen||xe("manual"),(M=Me.current)===null||M===void 0||M.focus())},[y,G,xe]),hl=u.useCallback(M=>{var q;M.stopPropagation(),!y&&(G.isOpen?Ie():xe("manual"),(q=Me.current)===null||q===void 0||q.focus())},[y,G,xe,Ie]);return c.jsx(Tl,Br(Br({},Js),{},{label:g,description:b,errorMessage:w==="invalid"?x:void 0,isRequired:v,isDisabled:y,validationState:w,labelPosition:C,labelAlign:_,necessityIndicator:j,contextualHelp:D,wrapperClassName:$("dh-multi-select",Ys),children:c.jsxs("div",{style:J?{display:"none"}:void 0,children:[c.jsx(jl,{within:!0,focusRingClass:"focus-ring",focusClass:"is-focused",children:c.jsxs("div",{ref:tl,id:le,onClick:fl,className:$("dh-multi-select-trigger",{"is-disabled":y,"is-read-only":O,"is-quiet":P,"is-invalid":w==="invalid"}),children:[c.jsxs("div",{className:"dh-multi-select-content",children:[$t.map(M=>c.jsx(Wv,{tagKey:M,label:cr(M),isDisabled:y,isReadOnly:O,onRemove:ul},M)),c.jsx("input",{ref:Me,className:"dh-multi-select-input",value:Nt,onChange:M=>dr(M.target.value),onFocus:dl,onBlur:pl,onKeyDown:sl,onKeyUp:Hs,disabled:y,readOnly:O,autoFocus:F,role:"combobox","aria-haspopup":"listbox","aria-expanded":G.isOpen,"aria-controls":G.isOpen?ir:void 0,"aria-autocomplete":"list","aria-label":zs,"aria-labelledby":qs,"aria-describedby":Xs,"aria-details":Qs})]}),ll&&c.jsx("div",{className:"dh-multi-select-loading-circle",children:c.jsx(aa,{"aria-label":"Loading",isIndeterminate:!0,size:"S"})}),w==="invalid"&&!y&&c.jsx("div",{className:"dh-multi-select-invalid-icon","aria-hidden":"true",children:c.jsx(Il,{})}),c.jsx("div",{className:$("dh-multi-select-chevron",{"is-open":G.isOpen}),onClick:hl,onPointerDown:M=>M.preventDefault(),role:"button",tabIndex:-1,"aria-label":"Toggle dropdown",children:c.jsx(kl,{})})]})}),H!=null&&c.jsx("input",{type:"hidden",name:H,value:k==="text"?$t.map(cr).join(","):$t.join(","),required:E==="native"&&v?!0:void 0}),G.isOpen&&!y&&c.jsx(_l,{ref:ar,triggerRef:fe,state:G,hideArrow:!0,isNonModal:!0,placement:el,shouldFlip:U,shouldCloseOnInteractOutside:M=>{var q;return((q=fe.current)===null||q===void 0?void 0:q.contains(M))!==!0},UNSAFE_style:{width:(n=(r=Xv(I))!==null&&r!==void 0?r:(i=fe.current)===null||i===void 0?void 0:i.offsetWidth)!==null&&n!==void 0?n:void 0},children:c.jsx(Kv,{listBoxRef:or,listBoxId:ir,loadingState:A,selectedKeys:pr,disabledKeys:ol,onSelectionChange:cl,ariaLabel:typeof g=="string"?g:"Options",emptyMessage:al,children:il})})]})}))}var Qn=W.forwardRef(Qv);Qn.displayName="MultiSelect";var Jv=["normalizedItems","showItemIcons","tooltip","selectedKeys","defaultSelectedKeys","disabledKeys","onChange","onSelectionChange"];function Wr(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function Kr(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?Wr(Object(n),!0).forEach(function(r){Zv(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Wr(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function Zv(t,e,n){return(e=ey(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function ey(t){var e=ty(t,"string");return typeof e=="symbol"?e:e+""}function ty(t,e){if(typeof t!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var r=n.call(t,e);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function ny(t,e){if(t==null)return{};var n,r,i=ry(t,e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);for(r=0;r<a.length;r++)n=a[r],e.indexOf(n)===-1&&{}.propertyIsEnumerable.call(t,n)&&(i[n]=t[n])}return i}function ry(t,e){if(t==null)return{};var n={};for(var r in t)if({}.hasOwnProperty.call(t,r)){if(e.indexOf(r)!==-1)continue;n[r]=t[r]}return n}function iy(t){var{normalizedItems:e,showItemIcons:n,tooltip:r=!0,selectedKeys:i,defaultSelectedKeys:a,disabledKeys:o,onChange:s,onSelectionChange:l}=t,d=ny(t,Jv),p=u.useMemo(()=>et(r),[r]),f=Fn({itemIconSlot:"icon",showItemDescriptions:!1,showItemIcons:n,tooltipOptions:p}),m="".concat(n,"-").concat(p==null?void 0:p.placement),h=u.useMemo(()=>e.flatMap(O=>{var w,P;return tn(O)?(w=(P=O.item)===null||P===void 0?void 0:P.items)!==null&&w!==void 0?w:[]:[O]}),[e]),{selectedStringKeys:g,defaultSelectedStringKeys:b,disabledStringKeys:x,onStringSelectionChange:v}=Yn({normalizedItems:h,selectedKeys:i,defaultSelectedKeys:a,disabledKeys:o,onChange:s??l}),y=u.useMemo(()=>e.map(O=>{if(tn(O)){var w,P;return c.jsx(Rl,{title:(w=O.item)===null||w===void 0?void 0:w.title,items:(P=O.item)===null||P===void 0?void 0:P.items,children:f},ht(O))}return f(O)}),[e,f]);return Kr(Kr({},d),{},{children:y,forceRerenderKey:m,selectedKeys:g,defaultSelectedKeys:b,disabledKeys:x,onChange:v})}var ay=["UNSAFE_className"],oy=["forceRerenderKey","children"];function Vr(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function Hr(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?Vr(Object(n),!0).forEach(function(r){sy(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Vr(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function sy(t,e,n){return(e=ly(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function ly(t){var e=uy(t,"string");return typeof e=="symbol"?e:e+""}function uy(t,e){if(typeof t!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var r=n.call(t,e);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function Gr(t,e){if(t==null)return{};var n,r,i=cy(t,e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);for(r=0;r<a.length;r++)n=a[r],e.indexOf(n)===-1&&{}.propertyIsEnumerable.call(t,n)&&(i[n]=t[n])}return i}function cy(t,e){if(t==null)return{};var n={};for(var r in t)if({}.hasOwnProperty.call(t,r)){if(e.indexOf(r)!==-1)continue;n[r]=t[r]}return n}function Zo(t){var{UNSAFE_className:e}=t,n=Gr(t,ay),r=iy(n),{forceRerenderKey:i,children:a}=r,o=Gr(r,oy);return u.createElement(Qn,Hr(Hr({},o),{},{key:i,UNSAFE_className:$("dh-multi-select-normalized",e)}),a)}var dy=["backgroundColor","borderColor","borderStartColor","borderEndColor","borderTopColor","borderBottomColor","borderXColor","borderYColor","UNSAFE_style"];function Yr(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function ot(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?Yr(Object(n),!0).forEach(function(r){py(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Yr(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function py(t,e,n){return(e=fy(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function fy(t){var e=hy(t,"string");return typeof e=="symbol"?e:e+""}function hy(t,e){if(typeof t!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var r=n.call(t,e);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function my(t,e){if(t==null)return{};var n,r,i=gy(t,e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);for(r=0;r<a.length;r++)n=a[r],e.indexOf(n)===-1&&{}.propertyIsEnumerable.call(t,n)&&(i[n]=t[n])}return i}function gy(t,e){if(t==null)return{};var n={};for(var r in t)if({}.hasOwnProperty.call(t,r)){if(e.indexOf(r)!==-1)continue;n[r]=t[r]}return n}var es=u.forwardRef((t,e)=>{var{backgroundColor:n,borderColor:r,borderStartColor:i,borderEndColor:a,borderTopColor:o,borderBottomColor:s,borderXColor:l,borderYColor:d,UNSAFE_style:p}=t,f=my(t,dy),{direction:m}=Dl(),h=u.useMemo(()=>{var g={};return r!==void 0&&(g.borderColor=oe(r)),l!==void 0&&(g.borderLeftColor=oe(l),g.borderRightColor=oe(l)),d!==void 0&&(g.borderTopColor=oe(d),g.borderBottomColor=oe(d)),i!==void 0&&(g[m==="rtl"?"borderRightColor":"borderLeftColor"]=oe(i)),a!==void 0&&(g[m==="rtl"?"borderLeftColor":"borderRightColor"]=oe(a)),o!==void 0&&(g.borderTopColor=oe(o)),s!==void 0&&(g.borderBottomColor=oe(s)),ot(ot({},p),{},{backgroundColor:oe(n)},g)},[n,p,r,i,a,o,s,l,d,m]);return c.jsx(Ll,ot(ot({},f),{},{ref:e,UNSAFE_style:h}))});es.displayName="View";var vy=["children"];function zr(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function qr(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?zr(Object(n),!0).forEach(function(r){yy(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):zr(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function yy(t,e,n){return(e=by(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function by(t){var e=Py(t,"string");return typeof e=="symbol"?e:e+""}function Py(t,e){if(typeof t!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var r=n.call(t,e);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function xy(t,e){if(t==null)return{};var n,r,i=Oy(t,e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);for(r=0;r<a.length;r++)n=a[r],e.indexOf(n)===-1&&{}.propertyIsEnumerable.call(t,n)&&(i[n]=t[n])}return i}function Oy(t,e){if(t==null)return{};var n={};for(var r in t)if({}.hasOwnProperty.call(t,r)){if(e.indexOf(r)!==-1)continue;n[r]=t[r]}return n}function Sy(t){var{children:e}=t,n=xy(t,vy),r=u.useMemo(()=>Ct(e).map(i=>Po(i,Yt)?i:c.jsx(Yt,{value:String(i),children:String(i)},String(i))),[e]);return c.jsx(Al,qr(qr({},n),{},{children:r}))}var wy=["ariaLabel","icon","isQuiet","labelText","children","onOpenChange","tooltip"];function Xr(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function Qr(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?Xr(Object(n),!0).forEach(function(r){Cy(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Xr(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function Cy(t,e,n){return(e=Ey(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function Ey(t){var e=Ty(t,"string");return typeof e=="symbol"?e:e+""}function Ty(t,e){if(typeof t!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var r=n.call(t,e);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function jy(t,e){if(t==null)return{};var n,r,i=Iy(t,e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);for(r=0;r<a.length;r++)n=a[r],e.indexOf(n)===-1&&{}.propertyIsEnumerable.call(t,n)&&(i[n]=t[n])}return i}function Iy(t,e){if(t==null)return{};var n={};for(var r in t)if({}.hasOwnProperty.call(t,r)){if(e.indexOf(r)!==-1)continue;n[r]=t[r]}return n}function ts(t){var{ariaLabel:e,icon:n,isQuiet:r,labelText:i,children:a,onOpenChange:o,tooltip:s}=t,l=jy(t,wy),d=i==null&&s!=null?"action-button-icon-with-tooltip":void 0;return c.jsxs(oa,{type:"popover",onOpenChange:o,children:[c.jsxs(bt,Qr(Qr({},l),{},{"aria-label":e??i,isQuiet:r,children:[c.jsx(Qe,{UNSAFE_className:d,children:c.jsx(ne,{icon:n})}),i==null?null:c.jsx(Et,{children:i}),s==null?null:c.jsx(Ze,{children:s})]})),a]})}function Jr(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function st(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?Jr(Object(n),!0).forEach(function(r){ky(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Jr(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function ky(t,e,n){return(e=_y(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function _y(t){var e=Ry(t,"string");return typeof e=="symbol"?e:e+""}function Ry(t,e){if(typeof t!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var r=n.call(t,e);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function ns(t){var{heading:e,confirmationButtonLabel:n,children:r,onCancel:i,onConfirm:a}=t,{formProps:o,submitButtonProps:s}=Uo();return c.jsxs(sa,{children:[c.jsx(Tn,{level:3,UNSAFE_className:$n.spectrumDialogComponentHeading,children:e}),c.jsx(la,{}),c.jsx(bn,{children:c.jsx(ua,st(st({},o),{},{children:r}))}),c.jsxs(ca,{children:[c.jsx(zt,{variant:"secondary",onPress:i,children:"Cancel"}),c.jsx(zt,st(st({},s),{},{style:"fill",variant:"negative",onPress:a,type:"submit",children:n}))]})]})}function Dy(t){var{ariaLabel:e,heading:n,confirmationButtonLabel:r,isHidden:i,children:a,tooltip:o,onConfirm:s}=t,l=u.useCallback(d=>c.jsx(ns,{heading:n,confirmationButtonLabel:r,onCancel:d,onConfirm:()=>{d(),s()},children:a}),[a,r,n,s]);return c.jsx(ts,{ariaLabel:e,icon:Oa,isHidden:i,isQuiet:!0,height:Un,tooltip:o,children:l})}var Ly=["icon","label","tooltip"];function Zr(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function ei(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?Zr(Object(n),!0).forEach(function(r){Ay(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Zr(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function Ay(t,e,n){return(e=My(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function My(t){var e=Fy(t,"string");return typeof e=="symbol"?e:e+""}function Fy(t,e){if(typeof t!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var r=n.call(t,e);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function Ny(t,e){if(t==null)return{};var n,r,i=$y(t,e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);for(r=0;r<a.length;r++)n=a[r],e.indexOf(n)===-1&&{}.propertyIsEnumerable.call(t,n)&&(i[n]=t[n])}return i}function $y(t,e){if(t==null)return{};var n={};for(var r in t)if({}.hasOwnProperty.call(t,r)){if(e.indexOf(r)!==-1)continue;n[r]=t[r]}return n}function rs(t){var{icon:e,label:n,tooltip:r}=t,i=Ny(t,Ly);return c.jsxs(bt,ei(ei({},i),{},{"aria-label":n,isQuiet:!0,height:Un,children:[c.jsx(Qe,{UNSAFE_className:r==null?void 0:"action-button-icon-with-tooltip",children:c.jsx(ne,{icon:e})}),r==null?null:c.jsx(Ze,{children:r})]}))}rs.displayName="IconActionButton";function ti(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function Uy(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?ti(Object(n),!0).forEach(function(r){ye(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):ti(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function ye(t,e,n){return(e=By(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function By(t){var e=Wy(t,"string");return typeof e=="symbol"?e:e+""}function Wy(t,e){if(typeof t!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var r=n.call(t,e);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}var Ky=100,is=function(t){return t.UP="UP",t.DOWN="DOWN",t}(is||{});class ce extends u.Component{constructor(e){super(e),ye(this,"popper",void 0),ye(this,"cbContainer",void 0),ye(this,"menuContainer",void 0),ye(this,"input",void 0),ye(this,"getCachedFilteredOptions",Ml((r,i)=>r.filter(a=>a.title.toLowerCase().indexOf(i.toLowerCase())>=0),{max:1e3}));var{popperOptions:n}=this.props;n=Uy({placement:"bottom-end",modifiers:{preventOverflow:{enabled:!1}}},n),this.state={title:"",filteredOptions:[],keyboardOptionIndex:0,menuIsOpen:!1,inputWidth:100,invalid:!1,popperOptions:n},this.handleMenuKeyDown=this.handleMenuKeyDown.bind(this),this.handleMenuBlur=this.handleMenuBlur.bind(this),this.handleInputChange=this.handleInputChange.bind(this),this.handleInputKeyDown=this.handleInputKeyDown.bind(this),this.handleInputBlur=this.handleInputBlur.bind(this),this.handelInputFocus=this.handelInputFocus.bind(this),this.handleInputClick=this.handleInputClick.bind(this),this.updateInputValue=He(this.updateInputValue,Ky),this.handleOptionClick=this.handleOptionClick.bind(this),this.handleMenuOpened=this.handleMenuOpened.bind(this),this.handleMenuExited=this.handleMenuExited.bind(this),this.popper=W.createRef(),this.cbContainer=W.createRef(),this.menuContainer=W.createRef(),this.input=W.createRef()}setInputWidth(){this.cbContainer.current&&this.setState({inputWidth:this.cbContainer.current.getBoundingClientRect().width})}getValueAndValidate(e){if(!e)return this.setState({invalid:!1}),{value:e,isValid:!1};var{options:n}=this.props,r=n.filter(i=>i.title.toLowerCase()===e.toLowerCase());return r.length<1?(this.setState({invalid:!0}),{value:e,isValid:!1}):(this.setState({invalid:!1}),{value:r[0].value,isValid:!0})}updateInputValue(e){var{menuIsOpen:n}=this.state,{value:r,isValid:i}=this.getValueAndValidate(e);n&&this.processFilterChange(e),this.fireOnChange(r,i)}fireOnChange(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0,{onChange:r}=this.props;r(e,n)}processFilterChange(e){var n,{options:r}=this.props,{menuIsOpen:i}=this.state,a=e?this.getCachedFilteredOptions(r,e):r,o=a.length===1&&a[0].title===e;if(this.setState({filteredOptions:a,keyboardOptionIndex:0}),o&&i){this.closeMenu();return}(n=this.popper.current)===null||n===void 0||n.scheduleUpdate()}resetValue(){this.setState({title:""}),this.fireOnChange("")}handleResize(){this.setInputWidth()}handleMenuKeyDown(e){var n,{filteredOptions:r,keyboardOptionIndex:i}=this.state,a=r[i];switch(e.key){case"Enter":case"ArrowRight":e.stopPropagation(),e.preventDefault(),a!=null&&(this.setState({title:a.title,invalid:!1}),this.fireOnChange(a.value)),this.closeMenu(),(n=this.input.current)===null||n===void 0||n.focus();break;case"ArrowUp":e.stopPropagation(),e.preventDefault(),this.navigateMenu(ce.MENU_NAVIGATION_DIRECTION.UP);break;case"ArrowDown":e.stopPropagation(),e.preventDefault(),this.navigateMenu(ce.MENU_NAVIGATION_DIRECTION.DOWN);break;case"Tab":if(e.stopPropagation(),e.preventDefault(),e.shiftKey){this.navigateMenu(ce.MENU_NAVIGATION_DIRECTION.UP);break}this.navigateMenu(ce.MENU_NAVIGATION_DIRECTION.DOWN);break;case"Escape":e.preventDefault(),e.stopPropagation(),this.closeMenu();break}}navigateMenu(e){var{filteredOptions:n,keyboardOptionIndex:r}=this.state,i=r;e===ce.MENU_NAVIGATION_DIRECTION.UP?r>0?(i=(i-1)%n.length,this.setState({keyboardOptionIndex:i})):r===0&&(i=n.length-1,this.setState({keyboardOptionIndex:i})):e===ce.MENU_NAVIGATION_DIRECTION.DOWN&&r<n.length&&(i=(i+1)%n.length,this.setState({keyboardOptionIndex:i})),this.scrollOptionIntoView(i)}handleInputKeyDown(e){var{onEnter:n}=this.props,{menuIsOpen:r}=this.state;r?this.handleMenuKeyDown(e):e.key==="Enter"?n():e.key==="Escape"?(this.resetValue(),e.preventDefault(),e.stopPropagation()):e.key==="ArrowRight"||e.key==="ArrowLeft"||e.key==="Tab"||e.key==="Shift"||this.openMenu()}handleInputChange(e){this.setState({title:e.target.value}),this.updateInputValue(e.target.value)}handleOptionClick(e){var n;this.setState({title:e.title,invalid:!1}),this.fireOnChange(e.value),this.closeMenu(),(n=this.input.current)===null||n===void 0||n.focus()}handelInputFocus(){var{menuIsOpen:e}=this.state;e||this.openMenu()}handleInputClick(){var{menuIsOpen:e}=this.state;e||this.openMenu()}handleInputBlur(e){var{menuIsOpen:n}=this.state;n&&e.relatedTarget instanceof Element&&this.popper.current!==null&&this.popper.current.element.contains(e.relatedTarget)||this.closeMenu(!1)}handleMenuBlur(e){e.relatedTarget===this.input.current||e.relatedTarget instanceof Element&&this.popper.current!==null&&this.popper.current.element.contains(e.relatedTarget)||this.closeMenu(!1)}handleMenuOpened(){var e;(e=this.input.current)===null||e===void 0||e.focus()}handleMenuExited(){var{menuIsOpen:e}=this.state;e&&this.setState({menuIsOpen:!1,keyboardOptionIndex:0})}openMenu(){var{title:e}=this.state;this.processFilterChange(e),this.setInputWidth(),this.setState({menuIsOpen:!0}),window.requestAnimationFrame(()=>{var n;(n=this.popper.current)===null||n===void 0||n.show()})}closeMenu(){var e,n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0;if(this.setState({menuIsOpen:!1,keyboardOptionIndex:0}),n){var r;(r=this.input.current)===null||r===void 0||r.focus()}(e=this.popper.current)===null||e===void 0||e.hide()}scrollOptionIntoView(e){if(this.menuContainer.current){var n;(n=this.menuContainer.current.children.item(e))===null||n===void 0||n.scrollIntoView({behavior:"smooth",block:"nearest"})}}renderMenuElement(){var{inputWidth:e}=this.state;return c.jsx("div",{className:$("aci-options"),ref:this.menuContainer,role:"presentation",onKeyDown:this.handleMenuKeyDown,style:{width:e},onBlur:this.handleMenuBlur,children:this.renderOptions()})}renderOptions(){var{noMatchText:e}=this.props,{title:n,filteredOptions:r}=this.state;return n&&r.length===0?c.jsx("div",{className:"no-match",children:e}):r.map((i,a)=>this.renderOption(i,a))}renderOption(e,n){var{keyboardOptionIndex:r}=this.state,i="option-".concat(n,"-").concat(e.value);return c.jsx("button",{type:"button",className:$("aci-option-btn",{"keyboard-active":r===n}),onClick:()=>this.handleOptionClick(e),onFocus:()=>this.setState({keyboardOptionIndex:n}),children:e.title},i)}render(){var{options:e,inputPlaceholder:n,disabled:r,className:i,defaultTitle:a,spellCheck:o,"data-testid":s}=this.props,{title:l,menuIsOpen:d,popperOptions:p,invalid:f}=this.state;return c.jsxs("div",{className:"aci-container",ref:this.cbContainer,children:[c.jsx("input",{value:l||a,className:$("form-control",i,"aci-input",{"is-invalid":f&&!d}),ref:this.input,onChange:this.handleInputChange,placeholder:n||e[0].title,disabled:r,onFocus:this.handelInputFocus,onClick:this.handleInputClick,onBlur:this.handleInputBlur,onKeyDown:this.handleInputKeyDown,spellCheck:o,"data-testid":s}),c.jsx(Tt,{ref:this.popper,options:p,className:$("aci-options-popper interactive"),onEntered:this.handleMenuOpened,onExited:this.handleMenuExited,children:this.renderMenuElement()})]})}}ye(ce,"defaultProps",{onChange(){},inputPlaceholder:"",disabled:!1,className:"",defaultTitle:"",popperOptions:null,spellCheck:!0,onEnter(){},noMatchText:"No matching items found","data-testid":void 0});ye(ce,"MENU_NAVIGATION_DIRECTION",is);function Ue(t){return t.split(`
|
|
2
|
-
`).map(e=>e.trim()).filter(e=>e).join(" ")}function Bt(t,e){return t.trim()
|
|
3
|
-
`.concat(e.trim()))}function Vy(t){var{className:e="",value:n,onChange:r,spellCheck:i=!1,placeholder:a="",disabled:o=!1,delimiter:s="",id:l="","data-testid":d}=t,[p,f]=u.useState(n),[m,h]=u.useState(!1),g=u.useRef(null),b=u.useRef(!1),x=u.useRef(p);x.current=p,u.useEffect(function(){!b.current||!s?f(n):Ue(x.current)!==Ue(n)&&f(Bt(n,s))},[n,s]);function v(){if(g.current){g.current.style.height="0";var _=g.current.scrollHeight+(g.current.offsetHeight-g.current.clientHeight);_>0&&(g.current.style.height="".concat(_,"px"))}}function y(_){var j=_.target.value;m&&(s&&(j=Bt(j,s)),h(!1)),f(j),r(s?Ue(j):j)}function O(){g.current&&(b.current=!0,s&&(f(Bt(p,s)),v()),g.current.scrollLeft=0)}function w(){g.current&&document.activeElement!==g.current&&g.current.focus()}function P(){b.current=!1,s&&(f(Ue(p)),r(Ue(p)))}function C(){h(!0)}return u.useEffect(function(){v()},[p]),c.jsx("textarea",{ref:g,id:l,className:$(e,"auto-resize-textarea form-control"),placeholder:a,value:p,rows:1,onChange:y,onFocus:O,onMouseDown:w,onBlur:P,onPaste:C,spellCheck:i,disabled:o,"data-testid":d})}function as(t){var{blockInteraction:e=!0,children:n,debounceMs:r,isOpen:i=!1}=t,{value:a}=tt(i,r);return c.jsxs(c.Fragment,{children:[e&&i&&c.jsx("div",{className:"modal-backdrop",style:{backgroundColor:"transparent"},"data-testid":"debounced-modal-backdrop"}),W.cloneElement(n,{isOpen:i&&a})]})}function os(t){var{className:e,icon:n,isOpen:r=!1,subtitle:i,title:a}=t;return c.jsx(On,{isOpen:r,className:e,children:c.jsx(Sn,{children:c.jsxs("div",{className:"info-modal",children:[n!=null&&c.jsx("div",{className:"message-icon",children:c.jsx(ne,{icon:n})}),c.jsx("div",{className:"message-header",children:a}),i!=null&&c.jsx("div",{className:"message-content",children:i})]})})})}function ni(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function ri(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?ni(Object(n),!0).forEach(function(r){Hy(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):ni(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function Hy(t,e,n){return(e=Gy(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function Gy(t){var e=Yy(t,"string");return typeof e=="symbol"?e:e+""}function Yy(t,e){if(typeof t!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var r=n.call(t,e);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}var zy=[];function qy(t){var{styleProps:e,selectedItemCount:n,onClearSelection:r}=t;return c.jsx(da,ri(ri({UNSAFE_className:$n.spectrumActionBar},e),{},{isEmphasized:!0,selectedItemCount:n,onClearSelection:r,children:zy}))}function ii(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function Xy(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?ii(Object(n),!0).forEach(function(r){ge(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):ii(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function ge(t,e,n){return(e=Qy(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function Qy(t){var e=Jy(t,"string");return typeof e=="symbol"?e:e+""}function Jy(t,e){if(typeof t!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var r=n.call(t,e);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}var ai=Y.module("ContextMenu");class ze extends u.PureComponent{static handleContextMenu(e){e.metaKey||(e.stopPropagation(),e.preventDefault())}constructor(e){super(e),ge(this,"container",void 0),ge(this,"oldFocus",void 0),ge(this,"activeSubMenuRef",void 0),ge(this,"subMenuTimer",void 0),ge(this,"rAF",void 0),ge(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=W.createRef(),this.oldFocus=document.activeElement,this.activeSubMenuRef=W.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:r}=this.props,{activeSubMenu:i}=this.state;if(i!==n.activeSubMenu)if(i==null){var a;(a=this.container.current)===null||a===void 0||a.focus()}else this.setActiveSubMenuPosition();if(e.actions!==r&&(this.initMenu(),this.container.current==null||!this.container.current.contains(document.activeElement))){var o;(o=this.container.current)===null||o===void 0||o.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:r}=this.props,i=ve.getMenuItems(r),a=[],o=i.length-1;o>=0;o-=1){var s=i[o];s instanceof Promise?this.initMenuPromise(s):a.push(s)}this.setState({mouseIndex:-1,keyboardIndex:n,activeSubMenu:null,menuItems:ve.sortActions(a)})}initMenuPromise(e){var n=Ee.makeCancelable(e);this.setState(r=>({pendingItems:r.pendingItems.concat(n)})),n.then(r=>{this.setState(i=>{var a=i.pendingItems.indexOf(n);if(a>=0){var o=i.pendingItems.slice();return o.splice(a,1),{menuItems:ve.sortActions(i.menuItems.concat(r)),pendingItems:o}}return null})},r=>{Ee.isCanceled(r)||(this.setState(i=>{var a=i.pendingItems.indexOf(n);if(a>=0){var o=i.pendingItems.slice();return o.splice(a,1),{pendingItems:o}}return null}),ai.error(r))})}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,r,i,{options:a,updatePosition:o,subMenuParentWidth:s,subMenuParentHeight:l,top:d,left:p}=this.props;if(!(!this.container.current||a.doNotVerifyPosition!=null&&a.doNotVerifyPosition)){var{top:f,left:m}=this.initialPosition,{width:h,height:g}=(e=(n=this.container.current)===null||n===void 0?void 0:n.getBoundingClientRect())!==null&&e!==void 0?e:{width:0,height:0},b=((r=(i=this.container.current)===null||i===void 0?void 0:i.scrollHeight)!==null&&r!==void 0?r:0)>window.innerHeight;g===0||h===0||(f+g>window.innerHeight&&(f-g-l>0?f-=g-l:f=window.innerHeight-g),m+h>window.innerWidth&&(m=m-h-s),(p!==m||d!==f)&&(this.setState({hasOverflow:b}),o(f,m)))}}handleWindowResize(){this.container.current&&this.closeMenu(!0)}handleBlur(e){if(!this.container.current){ai.warn("Container is null!");return}if(!this.container.current.contains(e.relatedTarget)){for(var n=e.relatedTarget,r=!1;n&&!r;)r=n.hasAttribute("data-dh-context-menu"),n=n.parentElement;r||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,r=this.getKeyboardIndex(),i=r,a=!1;if(e.key==="Enter"||e.key===" "){r>=0&&r<n.length&&this.handleMenuItemClick(n[r],e);return}if(e.key==="ArrowRight"?r>=0&&r<=n.length?a=!0:i=0:this.isEscapeKey(e.key)?i=null:e.key==="ArrowUp"||e.shiftKey&&e.key==="Tab"?i=ve.getNextMenuItem(i,-1,n):(e.key==="ArrowDown"||e.key==="Tab")&&(i=ve.getNextMenuItem(i,1,n)),a){this.openSubMenu(r),e.preventDefault(),e.stopPropagation();return}r!==i&&(i!==null?this.setKeyboardIndex(i):(this.closeMenu(),this.oldFocus instanceof HTMLElement&&this.oldFocus.focus()),e.preventDefault(),e.stopPropagation())}openSubMenu(e){var{menuItems:n,activeSubMenu:r}=this.state,i=n[e].actions?e:null;r!==i&&this.setState({activeSubMenu:i,subMenuTop:null,subMenuLeft:null})}closeMenu(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1,{closeMenu:n,onMenuClosed:r}=this.props;cancelAnimationFrame(this.rAF),this.rAF=window.requestAnimationFrame(()=>{n(e),r(this)})}closeSubMenu(){this.setState({activeSubMenu:null})}handleCloseSubMenu(e){e?this.closeMenu(!0):this.closeSubMenu()}handleMenuItemClick(e,n){n.preventDefault(),n.stopPropagation();var{menuItems:r}=this.state;e!=null&&(e.disabled===void 0||!e.disabled)&&(e.actions!=null?this.openSubMenu(r.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,r=n.indexOf(e);this.setMouseIndex(r),r>=0&&r<n.length&&(e.disabled===void 0||!e.disabled)&&this.openSubMenu(r)}handleMouseLeave(){this.setMouseIndex(-1)}render(){for(var e=[],{top:n,left:r}=this.props,{activeSubMenu:i,hasOverflow:a,keyboardIndex:o,menuItems:s,mouseIndex:l,pendingItems:d,subMenuTop:p,subMenuLeft:f,subMenuParentWidth:m,subMenuParentHeight:h}=this.state,g=0;g<s.length;g+=1){var b=s[g];g>0&&b.group!==s[g-1].group&&e.push(c.jsx("hr",{},"".concat(g,".separator")));var x=c.jsx(Ia,{ref:i===g?this.activeSubMenuRef:null,isKeyboardSelected:o===g,isMouseSelected:l===g,menuItem:b,closeMenu:this.handleCloseSubMenu,onMenuItemClick:this.handleMenuItemClick,onMenuItemMouseMove:this.handleMenuItemMouseMove,onMenuItemContextMenu:this.handleMenuItemContextMenu},g);e.push(x)}var v=null;d.length>0&&(v=c.jsx("div",{className:"loading",children:c.jsx(Pt,{className:"loading-spinner-vertical-align"})}));var{menuStyle:y,"data-testid":O}=this.props,w=i!==null&&p!==null&&f!==null;return c.jsxs(c.Fragment,{children:[c.jsxs("div",{className:$({"has-overflow":a},"context-menu-container"),style:Xy({top:n,left:r},y),ref:this.container,"data-dh-context-menu":!0,onBlur:this.handleBlur,onKeyDown:this.handleKeyDown,onMouseLeave:this.handleMouseLeave,onContextMenu:ze.handleContextMenu,role:"menuitem",tabIndex:0,"data-testid":O,children:[e,v]}),w&&i!==null&&p!==null&&f!==null&&c.jsx(ze,{actions:s[i].actions||[],closeMenu:this.handleCloseSubMenu,top:p,left:f,updatePosition:(P,C)=>{this.setState({subMenuTop:P,subMenuLeft:C})},subMenuParentWidth:m,subMenuParentHeight:h},"sub-".concat(i))]})}}ge(ze,"defaultProps",{subMenuParentWidth:0,subMenuParentHeight:0,closeMenu(){},onMenuOpened(){},onMenuClosed(){},options:{},menuStyle:{},"data-testid":void 0});function oi(t,e,n){return(e=Zy(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function Zy(t){var e=eb(t,"string");return typeof e=="symbol"?e:e+""}function eb(t,e){if(typeof t!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var r=n.call(t,e);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}class ss extends u.Component{constructor(e){super(e),oi(this,"container",void 0),oi(this,"openMenu",void 0),this.handleMenuClose=this.handleMenuClose.bind(this),this.handleContextMenu=this.handleContextMenu.bind(this),this.container=W.createRef(),this.openMenu=W.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(),r=e.clientY-n.top,i=e.clientX-n.left,{actions:a}=this.state;if(a!=null&&e.target===this.container.current){e.preventDefault(),this.setState({actions:null},()=>{var s=document.elementFromPoint(i,r),l=new MouseEvent("contextmenu",{clientX:e.clientX,clientY:e.clientY,bubbles:!0,cancelable:!0});s==null||s.dispatchEvent(l)});return}if(ve.isContextActionEvent(e)&&!(e.metaKey||e.ctrlKey)){var o=ve.getMenuItems(e.contextActions);o.length!==0&&(e.preventDefault(),this.setState({actions:o,top:r,left:i}))}}}handleMenuClose(e){e===this.openMenu.current&&this.setState({actions:null})}render(){var e=null,{"data-testid":n}=this.props,{actions:r,top:i,left:a}=this.state;return r&&(e=c.jsx(ze,{ref:this.openMenu,actions:r,onMenuClosed:this.handleMenuClose,top:i,left:a,updatePosition:(o,s)=>{this.setState({top:o,left:s})},"data-testid":n})),c.jsx("div",{className:$("context-menu-root",{active:r}),ref:this.container,children:e})}}function ls(t,e,n){return(e=tb(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function tb(t){var e=nb(t,"string");return typeof e=="symbol"?e:e+""}function nb(t,e){if(typeof t!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var r=n.call(t,e);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}class qe extends u.Component{static getHeight(e){var n=e.scrollWidth-e.clientWidth;return e.scrollHeight-n}constructor(e){super(e),ls(this,"nodeRef",W.createRef()),this.handleEntered=this.handleEntered.bind(this)}handleEntered(){var e=this.nodeRef.current;if(e){e.style.height="";var{autoFocusOnShow:n}=this.props;if(n!==void 0&&n){var r=e.querySelector("input, select, textarea");r!=null&&r.focus()}}}handleEnter(){var e=this.nodeRef.current;e&&(e.style.height="0")}handleEntering(){var e=this.nodeRef.current;e&&(e.style.height="".concat(qe.getHeight(e),"px"))}handleExiting(){var e=this.nodeRef.current;e&&(e.style.height="0")}handleExit(){var e=this.nodeRef.current;e&&(e.style.height="".concat(qe.getHeight(e),"px"))}render(){var{children:e,className:n,in:r,"data-testid":i}=this.props;return c.jsx(pa,{in:r,classNames:{enterActive:"collapsing",enterDone:"collapse show",exitActive:"collapsing",exitDone:"collapse"},onEnter:this.handleEnter,onEntering:this.handleEntering,onEntered:this.handleEntered,onExit:this.handleExit,onExiting:this.handleExiting,timeout:350,nodeRef:this.nodeRef,children:a=>c.jsx("div",{ref:this.nodeRef,className:$({collapse:a==="exited"},n),"data-testid":i,children:e})})}}ls(qe,"defaultProps",{className:"",autoFocusOnShow:!1,"data-testid":void 0});var rb=Y.module("TimeInput"),ib="([01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9]",ab=["00:00:00","12:34:56","23:59:59"];function si(t){return t!=null?"".concat(t.substring(0,8).replace(/\u2007/g,"0")).concat("00:00:00".substring(t.length)):t}var gt=W.forwardRef((t,e)=>{var{allowValueWrapping:n=!0,className:r="",onChange:i=se,value:a=0,onFocus:o=se,onBlur:s=se,onSelect:l=se,"data-testid":d}=t,[p,f]=u.useState(dt.formatTime(a)),m=u.useRef(a),[h,g]=u.useState(),b=u.useRef(null);u.useImperativeHandle(e,()=>({focus:()=>{var P;(P=b.current)===null||P===void 0||P.focus()},setSelection:P=>{var C;(C=b.current)===null||C===void 0||C.focus(),g(P)}}),[]),u.useEffect(function(){m.current!==a&&(f(dt.formatTime(a)),m.current=a)},[m,a]);function x(P,C,_){var j=P.selectionStart===0?24:60,D=parseInt(_,10)-C;return Number.isNaN(D)?D=0:n?D=(D%j+j)%j:D=Math.min(Math.max(0,D),j-1),"".concat(D).padStart(2,"0")}function v(P,C,_,j,D){return j===0&&D===2&&C===1&&parseInt(_,10)>1?"0".concat(_).concat(P.substring(2)):So(P,C,_)}var y=u.useCallback(P=>{rb.debug("handleChange",P),f(P),m.current=dt.parseTime(si(P)),i(m.current)},[i]),O=u.useCallback(()=>{var P=si(p);P!==p&&f(P),s()},[p,s]),w=u.useCallback(P=>{g(P),l(P)},[l]);return c.jsx(Bn,{ref:b,className:r,example:ab,getNextSegmentValue:x,getPreferredReplacementString:v,onChange:y,onSelect:w,pattern:ib,selection:h,value:p,onFocus:o,onBlur:O,"data-testid":d})});function li(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function ob(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?li(Object(n),!0).forEach(function(r){be(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):li(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function be(t,e,n){return(e=sb(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function sb(t){var e=lb(t,"string");return typeof e=="symbol"?e:e+""}function lb(t,e){if(typeof t!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var r=n.call(t,e);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}var ui=-1,us=function(t){return t.UP="UP",t.DOWN="DOWN",t}(us||{});class ie extends u.Component{constructor(e){super(e),be(this,"csContainer",void 0),be(this,"menuContainer",void 0),be(this,"button",void 0),be(this,"input",void 0);var{value:n,valueToTime:r}=e;this.toggleMenu=this.toggleMenu.bind(this),this.handleMenuKeyDown=this.handleMenuKeyDown.bind(this),this.closeMenu=this.closeMenu.bind(this),this.handleOptionClick=this.handleOptionClick.bind(this),this.handleOptionFocus=this.handleOptionFocus.bind(this),this.handleMenuOpened=this.handleMenuOpened.bind(this),this.handleMenuExited=this.handleMenuExited.bind(this),this.handleCustomInput=this.handleCustomInput.bind(this),this.csContainer=W.createRef(),this.menuContainer=W.createRef(),this.button=W.createRef(),this.input=W.createRef(),this.state={keyboardOptionIndex:0,menuIsOpen:!1,inputWidth:100,customTime:r(n),inputFocused:!1}}getSelectedText(){var{options:e,value:n,placeholder:r}=this.props,{customTime:i}=this.state;if(n===null)return r;for(var a=0;a<e.length;a+=1){var o=e[a];if(o.value===n)return o.title}return dt.formatTime(i)}setInputWidth(){this.csContainer.current&&this.setState({inputWidth:this.csContainer.current.getBoundingClientRect().width})}focus(){var e;(e=this.button.current)===null||e===void 0||e.focus()}updateInputValue(e){var{onChange:n}=this.props;n(e)}handleResize(){this.setInputWidth()}handleMenuKeyDown(e){var n,{keyboardOptionIndex:r,inputFocused:i}=this.state,{options:a}=this.props;switch(e.key){case"Enter":case" ":i?this.updateFromCustom():this.updateInputValue(a[r].value),this.closeMenu(),(n=this.button.current)===null||n===void 0||n.focus(),e.stopPropagation(),e.preventDefault();break;case"Tab":e.shiftKey?this.handleMenuNavigation(ie.MENU_NAVIGATION_DIRECTION.UP):this.handleMenuNavigation(ie.MENU_NAVIGATION_DIRECTION.DOWN),e.stopPropagation(),e.preventDefault();break;case"ArrowUp":this.handleMenuNavigation(ie.MENU_NAVIGATION_DIRECTION.UP),e.stopPropagation(),e.preventDefault();break;case"ArrowDown":this.handleMenuNavigation(ie.MENU_NAVIGATION_DIRECTION.DOWN),e.stopPropagation(),e.preventDefault();break;case"Escape":this.closeMenu();break}}handleMenuNavigation(e){var{keyboardOptionIndex:n,inputFocused:r}=this.state,{options:i}=this.props,a=i.length,o=n;switch(e){case ie.MENU_NAVIGATION_DIRECTION.UP:if(!r&&n===0){this.focusInput();break}else r&&this.focusOption(n);n>0&&!r?(o=(o-1)%a,this.setState({keyboardOptionIndex:o})):n===0&&(o=a-1,this.setState({keyboardOptionIndex:o})),this.scrollOptionIntoView(o);break;case ie.MENU_NAVIGATION_DIRECTION.DOWN:if(!r&&n===a-1){this.focusInput();break}else r&&this.focusOption(n);n<a&&!(r&&n===0)&&(o=(o+1)%a,this.setState({keyboardOptionIndex:o})),this.scrollOptionIntoView(o);break}}handleOptionClick(e){var n=Number(e.currentTarget.value),{options:r,timeToValue:i}=this.props,{customTime:a}=this.state;if(n===ui){var o=i(a);this.updateAndClose(o)}else this.updateAndClose(r[n].value)}updateAndClose(e){var n;this.updateInputValue(e),this.closeMenu(),(n=this.button.current)===null||n===void 0||n.focus()}handleOptionFocus(e){this.setState({keyboardOptionIndex:Number(e.target.value)})}handleMenuOpened(){var e,{options:n,value:r}=this.props,{keyboardOptionIndex:i}=this.state;this.scrollOptionIntoView(i);var a=(e=this.menuContainer.current)===null||e===void 0?void 0:e.querySelector(".cs-option-btn.keyboard-active");if(a instanceof HTMLElement&&a.focus(),r!==null){var o=n.map(s=>s.value).indexOf(r);o<0&&this.focusInput()}}focusInput(){var e;(e=this.input.current)===null||e===void 0||e.focus()}focusOption(e){var n,r=(n=this.menuContainer.current)===null||n===void 0?void 0:n.querySelector(".cs-options");if(r&&r.children!=null){var i=r.children.item(e);i instanceof HTMLElement&&i.focus()}}handleMenuExited(){var{menuIsOpen:e}=this.state;e&&this.setState({menuIsOpen:!1,keyboardOptionIndex:0})}handleCustomInput(e){var{timeToValue:n}=this.props,r=n(e);this.updateInputValue(r),this.setState({customTime:e})}updateFromCustom(){var{timeToValue:e}=this.props,{customTime:n}=this.state,r=e(n);this.updateInputValue(r)}toggleMenu(e){var{menuIsOpen:n}=this.state;n?this.closeMenu():this.openMenu(),e.stopPropagation()}openMenu(){this.updateKeyboardIndex(),this.setInputWidth(),this.setState({menuIsOpen:!0})}closeMenu(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0;if(this.setState({menuIsOpen:!1}),e){var n;(n=this.button.current)===null||n===void 0||n.focus()}}updateKeyboardIndex(){var{options:e,value:n}=this.props;if(n!==null){var r=e.map(i=>i.value).indexOf(n);r>0&&this.setState({keyboardOptionIndex:r})}}scrollOptionIntoView(e){var n,r=(n=this.menuContainer.current)===null||n===void 0?void 0:n.querySelector(".cs-options");if(r&&r.children!=null){var i=r.children.item(e);i instanceof HTMLElement&&i.offsetTop>ie.DROP_DOWN_MENU_HEIGHT?r.scrollTop=i.offsetTop-ie.DROP_DOWN_MENU_HEIGHT:(i instanceof HTMLElement&&i.offsetTop<0||e===0)&&(r.scrollTop=0)}}renderMenuElement(){var{inputWidth:e}=this.state;return c.jsx("div",{className:"cs-menu-container",ref:this.menuContainer,role:"presentation",onKeyDown:this.handleMenuKeyDown,onClick:n=>{n.stopPropagation()},style:{width:e},children:c.jsx("div",{className:"cs-options-container",children:c.jsx("div",{className:"cs-options",children:this.renderOptions()})})})}renderOptions(){for(var{options:e,value:n,icon:r,customText:i}=this.props,{keyboardOptionIndex:a,customTime:o,inputFocused:s}=this.state,l=!1,d=[],p=0;p<e.length;p+=1){var f=e[p],m="option-".concat(p,"-").concat(f.value);l=l||f.value===n,d.push(c.jsxs("button",{type:"button",value:p,className:$("cs-option-btn",{"keyboard-active":a===p&&!s}),onClick:this.handleOptionClick,onFocus:this.handleOptionFocus,children:[f.value===n&&c.jsx(ne,{icon:r,className:"mr-2"}),f.value!==n&&c.jsx("span",{className:"mr-4"}),f.title]},m))}return d.push(c.jsx("hr",{className:"cs-divider"},"option-divider")),d.push(c.jsxs("button",{type:"button",value:ui,className:$("cs-option-btn",{"keyboard-active":s}),onClick:this.handleOptionClick,onFocus:this.handleOptionFocus,children:[!l&&n!==null?c.jsx(ne,{icon:r,className:"mr-2"}):c.jsx("span",{className:"mr-4"}),i]},"option-custom-label")),d.push(c.jsxs("div",{className:"cs-custom-container",children:[c.jsx("span",{className:"mr-2"}),c.jsx(gt,{ref:this.input,onChange:this.handleCustomInput,value:o,onFocus:()=>this.setState({inputFocused:!0}),onBlur:()=>this.setState({inputFocused:!1})},"option-input"),c.jsx("span",{className:"ml-2"})]},"cs-custom-container")),d.push(c.jsx("hr",{className:"mb-2"},"option-end")),d}render(){var{disabled:e,invalid:n,value:r,"data-testid":i}=this.props,{menuIsOpen:a}=this.state,{popperOptions:o}=this.props;return o=ob({placement:"bottom-end",modifiers:{preventOverflow:{enabled:!1}}},o),c.jsx("div",{className:"input-group cs-container context-menu",ref:this.csContainer,"data-testid":i,children:c.jsx("div",{className:$("input-group-append cs-dropdown",{"cs-dropdown-invalid":n}),children:c.jsxs("button",{type:"button",className:$("btn cs-btn form-control",{"cs-btn-invalid":n}),ref:this.button,onClick:this.toggleMenu,disabled:e,children:[c.jsx("span",{className:$({"text-muted":r===null}),children:this.getSelectedText()}),c.jsx("span",{className:"cs-caret"}),c.jsx(ka,{isShown:a,actions:{menuElement:this.renderMenuElement()},popperOptions:o,popperClassName:"CustomTimeSelect",onMenuOpened:this.handleMenuOpened,onMenuClosed:this.handleMenuExited,menuStyle:{maxWidth:"100rem"}})]})})})}}be(ie,"MENU_NAVIGATION_DIRECTION",us);be(ie,"DROP_DOWN_MENU_HEIGHT",125);be(ie,"defaultProps",{onChange(){},value:null,disabled:!1,popperOptions:{},icon:Qu,customText:"Custom",placeholder:"Select a time",valueToTime:t=>t===null?0:Math.round(t/1e3),timeToValue:t=>t*1e3,invalid:!1,"data-testid":void 0});var ub=Y.module("DateInput"),cb="[12][0-9]{3}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])",db=["2000-01-01","2022-12-31"],pb="YYYY-MM-DD",cs=W.forwardRef((t,e)=>{var{className:n="",onChange:r=()=>{},defaultValue:i="",onFocus:a=()=>{},onBlur:o=()=>{},"data-testid":s}=t,[l,d]=u.useState(i),[p,f]=u.useState(),m=u.useCallback(h=>{ub.debug("handleChange",h),d(h),r(h)},[r]);return c.jsx("div",{className:"d-flex flex-row align-items-center",children:c.jsx(Bn,{ref:e,className:$(n),example:db,getNextSegmentValue:qh,onChange:m,onSelect:f,pattern:cb,placeholder:pb,selection:p,value:l,onFocus:a,onBlur:o,"data-testid":s})})});cs.displayName="DateInput";var fb={CYCLE_TO_NEXT_STACK:Se.createAndAdd({id:"NAVIGATION.CYCLE_TO_NEXT_STACK",name:"Cycle To Next Stack",shortcut:[X.CTRL,re.SINGLE_QUOTE],macShortcut:[X.CMD,re.SINGLE_QUOTE],isEditable:!0}),CYCLE_TO_PREVIOUS_STACK:Se.createAndAdd({id:"NAVIGATION.CYCLE_TO_PREVIOUS_STACK",name:"Cycle To Previous Stack",shortcut:[X.CTRL,re.SEMICOLON],macShortcut:[X.CMD,re.SEMICOLON],isEditable:!0}),CYCLE_TO_NEXT_TAB:Se.createAndAdd({id:"NAVIGATION.CYCLE_TO_NEXT_TAB",name:"Cycle To Next Tab",shortcut:[X.CTRL,X.SHIFT,re.DOUBLE_QUOTE],macShortcut:[X.CMD,X.SHIFT,re.SINGLE_QUOTE],isEditable:!0}),CYCLE_TO_PREVIOUS_TAB:Se.createAndAdd({id:"NAVIGATION.CYCLE_TO_PREVIOUS_TAB",name:"Cycle To Previous Tab",shortcut:[X.CTRL,X.SHIFT,re.COLON],macShortcut:[X.CMD,X.SHIFT,re.SEMICOLON],isEditable:!0}),CYCLE_TO_NEXT_DASHBOARD:Se.createAndAdd({id:"NAVIGATION.CYCLE_TO_NEXT_DASHBOARD",name:"Cycle To Next Dashboard",shortcut:[X.CTRL,re.PERIOD],macShortcut:[X.CMD,re.PERIOD],isEditable:!0}),CYCLE_TO_PREVIOUS_DASHBOARD:Se.createAndAdd({id:"NAVIGATION.CYCLE_TO_PREVIOUS_DASHBOARD",name:"Cycle To Previous Dashboard",shortcut:[X.CTRL,re.COMMA],macShortcut:[X.CMD,re.COMMA],isEditable:!0})};function hb(t){var{isInvalid:e=!1,items:n,onAdd:r=()=>{},onDelete:i=()=>{},validate:a=()=>null}=t,[o,s]=u.useState(null),[l,d]=u.useState([]),[p,f]=u.useState(""),m=u.useCallback(O=>{d(O)},[]),h=u.useCallback(()=>{i(vr.getItemsInRanges(n,l)),d([])},[n,l,i]),g=u.useCallback(()=>{if(p!==""){var O=a(p);O==null?(r(p),f("")):s(O)}},[p,r,a]),b=u.useCallback(O=>{var{value:w}=O.target;f(w),s(w===""?null:a(w))},[a]),x=u.useCallback(()=>{d([])},[]),v=u.useCallback(O=>{O.key==="Enter"&&g()},[g]),y=u.useMemo(()=>14+fa(n.length,1,6)*Qt.DEFAULT_ROW_HEIGHT,[n.length]);return c.jsxs("div",{className:$("editable-item-list-container",{"is-invalid":e}),children:[c.jsx("div",{style:{height:y},children:c.jsx(Qt,{itemCount:n.length,items:n.map((O,w)=>({value:O,isSelected:vr.isSelected(l,w)})),offset:0,selectedRanges:l,onSelectionChange:m,isMultiSelect:!0})}),c.jsxs("div",{className:"d-flex flex-row pt-2",children:[c.jsx("div",{className:"d-flex flex-grow-1",children:c.jsx("input",{className:$("form-control",{"is-invalid":o!=null}),placeholder:"Enter value",type:"text",value:p,onChange:b,onFocus:x,onKeyDown:v})}),c.jsxs("div",{className:"d-flex align-items-start mt-1 ml-2",children:[c.jsx(Q,{kind:"ghost",onClick:g,disabled:o!=null||p==="",icon:Ju,tooltip:"Add new item","data-testid":"add-item-button"}),c.jsx(Q,{kind:"ghost",onClick:h,disabled:l.length===0,icon:Oa,tooltip:"Delete selected items","data-testid":"delete-item-button"})]})]})]})}function mb(t){var{message:e,isExpanded:n=!1,type:r="Error",onDismiss:i}=t,[a,o]=u.useState(!1),[s,l]=u.useState(!1),d=u.useRef(null),p=u.useRef(null),f=u.useCallback(()=>{if(!(s||n||p.current==null)){var h=p.current.scrollHeight>p.current.clientHeight;o(h)}},[s,n]),m=Ge(f,100);return _t(d.current,m),u.useLayoutEffect(m,[m]),c.jsxs("div",{className:$("error-view",{expanded:s||n}),ref:d,children:[c.jsxs("div",{className:"error-view-header",children:[c.jsxs("div",{className:"error-view-header-text",children:[c.jsx(ne,{icon:Zu}),c.jsx("span",{children:r})]}),c.jsxs("div",{className:"error-view-buttons",children:[c.jsx(_a,{UNSAFE_className:"error-view-copy-button",tooltip:"Copy error contents",copy:"".concat(r,": ").concat(e).trim()}),(a||s)&&!n&&c.jsx(Q,{kind:"danger",className:"error-view-expand-button",onClick:()=>{l(!s)},icon:s?ec:tc,children:s?"Show Less":"Show More"}),i!=null&&c.jsx(Q,{kind:"danger",className:"error-view-dismiss-button",onClick:i,icon:wn,children:"Dismiss"})]})]}),c.jsx("pre",{className:"error-view-text",ref:p,children:e})]})}function gb(t,e,n){return(e=vb(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function vb(t){var e=yb(t,"string");return typeof e=="symbol"?e:e+""}function yb(t,e){if(typeof t!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var r=n.call(t,e);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}class De extends u.Component{static isParentSelected(e,n){var r=n.get(e);if(r===void 0)return!1;if(typeof r=="boolean")return r;var i=Array.from(r.values()).includes(!0),a=Array.from(r.values()).includes(!1);return i&&a?null:i}constructor(e){super(e),this.toggleMenu=this.toggleMenu.bind(this),this.toggleValueFor=this.toggleValueFor.bind(this),this.selectAll=this.selectAll.bind(this),this.clear=this.clear.bind(this),this.state={menuIsOpen:!1}}toggleMenu(e){e.stopPropagation(),e.preventDefault(),this.setState(n=>{var{menuIsOpen:r}=n;return{menuIsOpen:!r}})}toggleValueFor(e,n){var{valueMap:r,onUpdateValueMap:i}=this.props,a=new Map(r),o=a.get(e);if(o instanceof Map){var s=new Map(o);if(n!=null)s.set(n,o.get(n)!==!0);else{var l=De.isParentSelected(e,a),d=l==null||!l;o.forEach((m,h)=>s.set(h,d))}a.set(e,s)}else a.set(e,o==null||!o);var p=a.get(e);if(n===void 0&&p!==void 0&&typeof p!="boolean"){var f=De.isParentSelected(e,r);f!=null&&f?p.forEach((m,h)=>p.set(h,!1)):p.forEach((m,h)=>p.set(h,!0))}i(a)}setAllValues(e){var{valueMap:n,onUpdateValueMap:r}=this.props,i=new Map;n.forEach((a,o)=>{if(typeof a=="boolean")i.set(o,e);else{var s=new Map;a.forEach((l,d)=>s.set(d,e)),i.set(o,s)}}),r(i)}selectAll(){this.setAllValues(!0)}clear(){this.setAllValues(!1)}renderMenuElement(){var{valueMap:e,"data-testid":n}=this.props;return c.jsxs("div",{className:"hcm-menu-container",children:[Array.from(e.entries()).map(r=>{var[i,a]=r;return c.jsxs("div",{children:[c.jsx(Jt,{className:"hcm-parent",checked:De.isParentSelected(i,e),onChange:()=>this.toggleValueFor(i),children:i}),a!==void 0&&typeof a!="boolean"&&Array.from(a.entries()).map(o=>{var[s,l]=o;return c.jsx(Jt,{className:"hcm-child",checked:l,onChange:()=>this.toggleValueFor(i,s),children:s},s)})]},i)}),c.jsx(Q,{kind:"ghost",onClick:this.selectAll,"data-testid":n!==void 0?"".concat(n,"-btn-select-all"):void 0,children:"Select All"}),c.jsx(Q,{kind:"ghost",onClick:this.clear,"data-testid":n!==void 0?"".concat(n,"-btn-clear"):void 0,children:"Clear"})]})}render(){var{menuText:e,className:n,icon:r,id:i,"data-testid":a}=this.props,{menuIsOpen:o}=this.state;return c.jsxs("button",{type:"button",className:$("btn hcm-btn",n),onClick:this.toggleMenu,id:i,"data-testid":a,children:[c.jsxs("span",{children:[r&&c.jsx(ne,{icon:r,className:"hcm-icon mr-1"}),e]}),c.jsx("span",{className:"cs-caret"}),c.jsx(Tt,{options:{placement:"bottom"},isShown:o,onExited:()=>{this.setState({menuIsOpen:!1})},closeOnBlur:!0,interactive:!0,children:this.renderMenuElement()})]})}}gb(De,"defaultProps",{className:"",icon:null,id:"","data-testid":void 0});function ci(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function Wt(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?ci(Object(n),!0).forEach(function(r){bb(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):ci(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function bb(t,e,n){return(e=Pb(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function Pb(t){var e=xb(t,"string");return typeof e=="symbol"?e:e+""}function xb(t,e){if(typeof t!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var r=n.call(t,e);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}var ds=u.memo(t=>{var{tab:e,onClose:n,onSelect:r,isActive:i,activeRef:a,index:o,isDraggable:s,contextActions:l,renderAfterTabContent:d}=t,{key:p,isClosable:f=n!=null,title:m,icon:h}=e,g;return h!=null&&(g=W.isValidElement(h)?h:c.jsx(ne,{icon:h})),c.jsx(Fl,{draggableId:p,index:o,isDragDisabled:!s,children:(b,x)=>c.jsxs("div",{className:"context-menu-wrapper",ref:i?a:null,children:[c.jsxs("div",Wt(Wt(Wt({ref:b.innerRef},b.draggableProps),b.dragHandleProps),{},{className:$("btn btn-link btn-nav-tab",{active:i},{dragging:x.isDragging}),"data-testid":"btn-nav-tab-".concat(m),role:"tab",tabIndex:0,onAuxClick:v=>{f&&v.button===1&&v.buttons===0&&(n==null||n(p))},onClick:v=>{if(f&&v.button===1&&v.buttons===0){n==null||n(p);return}v.button===0&&v.buttons===0&&(v.target.focus(),r(p))},onKeyPress:v=>{v.key==="Enter"&&r(p)},children:[g,c.jsxs("span",{className:"btn-nav-tab-title",children:[m,c.jsx(Ze,{children:m})]}),d==null?void 0:d(e),f&&c.jsx(Q,{kind:"ghost",className:"btn-nav-tab-close",onClick:v=>{n==null||n(p),v.stopPropagation(),v.preventDefault()},icon:wn,tooltip:"Close"})]})),c.jsx(jt,{actions:l})]})},p)});ds.displayName="NavTab";function ps(t){var{onSelect:e,tabs:n=Ra}=t,[r,i]=u.useState(""),[a,o]=u.useState(0),s=u.useRef(null),l=u.useRef(null),d=u.useRef([]);u.useEffect(()=>{var v;(v=s.current)===null||v===void 0||v.focus()},[]),u.useEffect(()=>{o(0)},[r]),u.useEffect(()=>{if(a>=0&&d.current[a]){var v;(v=d.current[a])===null||v===void 0||v.scrollIntoView({behavior:"auto",block:"nearest"})}},[a]);var p=u.useCallback(v=>{i(v.target.value)},[]),f=u.useCallback(v=>{e(v)},[e]),m=u.useCallback(v=>{v.preventDefault()},[]),h=u.useMemo(()=>n.filter(v=>v.title.toLowerCase().includes(r.toLowerCase())),[r,n]).sort((v,y)=>{var O;return(O=v.title.localeCompare(y.title))!==null&&O!==void 0?O:0}),g=u.useCallback(v=>{if(v.key==="ArrowDown"&&h.length>0)v.preventDefault(),o(O=>O===-1?0:(O+1)%h.length);else if(v.key==="ArrowUp"&&h.length>0)v.preventDefault(),o(O=>O===-1?h.length-1:(O-1+h.length)%h.length);else if(v.key==="Enter"&&h.length>0){v.preventDefault();var y=a>=0?a:0;f(h[y])}else v.key==="Tab"&&v.preventDefault()},[h,a,f]),b=u.useMemo(()=>h.map((v,y)=>{var O;return c.jsx("li",{ref:w=>{d.current[y]=w},onMouseDown:m,children:c.jsxs(Q,{kind:"ghost","data-testid":"dashboard-list-item-".concat((O=v.key)!==null&&O!==void 0?O:"","-button"),onClick:()=>f(v),className:a===y?"focused":"",style:{transition:"none"},children:[v.icon?c.jsx("span",{className:"dashboard-list-item-icon",children:W.isValidElement(v.icon)?v.icon:c.jsx(ne,{icon:v.icon})}):null,v.title]})},v.key)}),[h,f,a,m]),x=u.useMemo(()=>b.length===0?c.jsx("span",{children:"No open dashboard found."}):null,[b]);return c.jsxs("div",{className:"dashboard-list-container d-flex flex-column",children:[c.jsx("div",{className:"dashboard-list-header",children:c.jsx(jn,{value:r,placeholder:"Find open dashboard",endPlaceholder:It.OPEN_DASHBOARD_LIST.getDisplayText(),onChange:p,onKeyDown:g,ref:s})}),c.jsxs("ul",{className:"dashboard-list flex-grow-1",ref:l,children:[x&&c.jsx("li",{className:"dashboard-list-message",children:x}),!x&&b]})]})}function di(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function pi(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?di(Object(n),!0).forEach(function(r){Ob(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):di(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function Ob(t,e,n){return(e=Sb(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function Sb(t){var e=wb(t,"string");return typeof e=="symbol"?e:e+""}function wb(t,e){if(typeof t!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var r=n.call(t,e);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}var Cb=500,Eb=.01,Tb=5e-4;function fi(t){return t.scrollLeft===0}function hi(t){return Math.abs(t.scrollLeft+t.clientWidth-t.scrollWidth)<=1||t.scrollWidth===0}function jb(t,e,n){var{isClosable:r=!1,key:i}=t,a=[];if(r&&n!=null){a.push({title:"Close",order:10,group:20,action:()=>{n(i)}});for(var o=!0,s=e.length-1;s>0&&e[s].key!==t.key;s-=1)if(e[s].isClosable===!0){o=!1;break}a.push({title:"Close to the Right",order:20,group:20,action:()=>{for(var l=e.length-1;l>0&&e[l].key!==i;l-=1)e[l].isClosable===!0&&n(e[l].key)},disabled:o}),a.push({title:"Close All",order:30,group:20,action:()=>{e.forEach(l=>{l.isClosable===!0&&n(l.key)})}})}return a}function Ib(t){var{activeKey:e,tabs:n,onSelect:r,onReorder:i,onClose:a,makeContextActions:o,renderAfterTabContent:s}=t,l=u.useRef(),[d,p]=u.useState(!0),[f,m]=u.useState(!1),[h,g]=u.useState(!0),[b,x]=u.useState(!0),v=u.useCallback(()=>{l.current!=null&&(l.current.clientWidth<l.current.scrollWidth&&n.length>0?p(!0):p(!1),g(fi(l.current)),x(hi(l.current)))},[n]);_t(l.current,v);var y=u.useCallback(I=>{nn.stopDragging(),I.destination&&(i==null||i(I.source.index,I.destination.index))},[i]),O=u.useCallback(()=>{if(l.current!=null){var I=fi(l.current);I!==h&&g(I);var S=hi(l.current);S!==b&&x(S)}},[h,b]),w=u.useRef({cancelClick:!1}),P=u.useCallback(()=>{if(!(l.current==null||w.current.cancelClick))for(var{children:I}=l.current,S=I.length-1;S>=0;S-=1){var k=I[S];if(k.offsetLeft<l.current.scrollLeft-5){k.scrollIntoView({behavior:"smooth",block:"nearest",inline:"start"});return}}},[]),C=u.useCallback(()=>{if(!(l.current==null||w.current.cancelClick))for(var{children:I}=l.current,S=0;S<I.length;S+=1){var k=I[S];if(k.offsetLeft+k.offsetWidth-5>l.current.scrollLeft+l.current.offsetWidth){k.scrollIntoView({behavior:"smooth",block:"nearest",inline:"end"});return}}},[]),_=u.useCallback(function(I,S){var k=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,E=arguments.length>3?arguments[3]:void 0,F=l.current;F!=null&&(w.current.cancelClick=!0,I==="left"?F.scrollLeft=S-k:I==="right"&&(F.scrollLeft=S+k),w.current.rAF=requestAnimationFrame(H=>{var le=E??H,J=H-le,z=Eb*J+.5*Tb*J**2;z=Math.min(z,F.scrollWidth),_(I,S,z,le)}))},[]),j=u.useCallback(()=>{var{holdTimer:I,rAF:S}=w.current;I!=null&&(clearTimeout(I),w.current.holdTimer=void 0),S!=null&&(cancelAnimationFrame(S),w.current.rAF=void 0),window.removeEventListener("mouseup",j)},[]);u.useEffect(()=>()=>window.removeEventListener("mouseup",j),[j]);var D=u.useCallback(I=>{l.current!=null&&(w.current.holdTimer=window.setTimeout(_,Cb,I,l.current.scrollLeft)),w.current.cancelClick=!1,window.addEventListener("mouseup",j)},[j,_]),R=u.useCallback(()=>{D("left")},[D]),N=u.useCallback(()=>{D("right")},[D]);u.useEffect(function(){var S,k=E=>{E.stopPropagation(),E.preventDefault();var F=E.currentTarget,H=Math.abs(E.deltaY)>Math.abs(E.deltaX)?E.deltaY:E.deltaX;F.scrollLeft+=fa(H,-30,30)};return(S=l.current)===null||S===void 0||S.addEventListener("wheel",k),()=>{var E;(E=l.current)===null||E===void 0||E.removeEventListener("wheel",k)}},[]);var T=u.useMemo(()=>{var I=new Map;return n.forEach(S=>{var{key:k}=S,E=[()=>jb(S,n,a),()=>{var F;return(F=o==null?void 0:o(S))!==null&&F!==void 0?F:[]}];I.set(k,E)}),I},[o,n,a]),L=u.useRef(null),A=n.find(I=>I.key===e),B=n.map((I,S)=>{var{key:k}=I,E=I===A;return c.jsx(ds,{tab:I,index:S,isActive:E,activeRef:L,onSelect:r,onClose:a,isDraggable:i!=null,contextActions:T.get(k),renderAfterTabContent:s},k)});u.useEffect(function(){L.current!=null&&L.current.scrollIntoView({block:"nearest",inline:"nearest"})},[e]);var Z=()=>{m(!f)},K=I=>{m(!1),r(I.key)},U=()=>{m(!1)};return c.jsxs("nav",{className:"nav-container",children:[d&&c.jsx(Q,{kind:"ghost",icon:c.jsx(ne,{icon:nc,transform:"grow-4"}),className:"tab-controls-btn tab-controls-btn-left",tooltip:"Scroll left",onClick:P,onMouseDown:R,disabled:h}),c.jsx(Nl,{onDragStart:nn.startDragging,onDragEnd:y,children:c.jsx($l,{droppableId:"droppable-tab-navigation",direction:"horizontal",children:(I,S)=>c.jsxs("div",pi(pi({ref:k=>{k!=null&&(l.current=k,I.innerRef(k))}},I.droppableProps),{},{className:$("nav nav-tabs",{dragging:S.draggingFromThisWith}),role:"tablist",onScroll:O,children:[B,I.placeholder]}))})}),d&&c.jsx(Q,{kind:"ghost",icon:c.jsx(ne,{icon:rc,transform:"grow-4"}),className:"tab-controls-btn tab-controls-btn-right",tooltip:"Scroll right",onClick:C,onMouseDown:N,disabled:b}),c.jsx(Q,{kind:"ghost",icon:c.jsx(ne,{icon:ic,transform:"grow-4"}),className:"btn-dashboard-list-menu btn-show-dashboard-list",tooltip:"Search open dashboards",onClick:Z,disabled:n.length<2,style:{visibility:d?"visible":"hidden",marginLeft:"auto"},children:c.jsx(Tt,{isShown:f,className:"dashboard-list-menu-popper",onExited:U,options:{placement:"bottom-start"},closeOnBlur:!0,interactive:!0,children:c.jsx(ps,{tabs:n,onSelect:K})})}),c.jsx(jt,{actions:[{action:()=>{m(!f)},shortcut:It.OPEN_DASHBOARD_LIST,isGlobal:!0}]})]})}var kb=.025,_b=.9,Rb=.1,Db=.618,mi=80,ke={SIZE:8,DOT_SIZE:2},he=18,Lb=250,Ab=60*1e3,Mb={background:"var(--dh-color-random-area-plot-animation-bg)",foregroundFill:"var(--dh-color-random-area-plot-animation-fg-fill)",foregroundStroke:"var(--dh-color-random-area-plot-animation-fg-stroke)",gridColor:"var(--dh-color-random-area-plot-animation-grid)"};function Fb(){return Sa(Mb)}var fs=W.memo(()=>{var{activeThemes:t}=wt(),e=u.useMemo(Fb,[t]),n=u.useRef(null),r=u.useRef(null),[i,a]=u.useState(!1),o=window.devicePixelRatio,s,l,d,p,f,m=null,h=[];function g(){var T;r.current!=null&&(d=r.current.offsetWidth,p=r.current.offsetHeight),n.current!=null&&(n.current.style.width="".concat(d,"px"),n.current.style.height="".concat(p,"px"),n.current.width=d*o,n.current.height=p*o),(T=s)===null||T===void 0||T.scale(o,o)}function b(){var{foregroundFill:T,foregroundStroke:L}=e,A=document.createElement("canvas");A.width=ke.SIZE,A.height=ke.SIZE;var B=A.getContext("2d");return B!=null&&(B.fillStyle=L,B.fillRect(0,0,ke.DOT_SIZE,ke.DOT_SIZE),B.fillStyle=T,B.fillRect(0,0,ke.SIZE,ke.SIZE)),B==null?void 0:B.createPattern(A,"repeat")}function x(T){var L=Math.random()-.5,A=kb*L;return T<Rb?A=Math.abs(A):T>_b&&(A=-Math.abs(A)),T+A}function v(){for(var T=[],L=Db,A=0;A<d+he;A+=1)L=x(L),T.push(L);return T}function y(){for(;h.length>=d+he;)h.pop();for(;h.length<d+he;)h.push(x(h[h.length-1]))}function O(T,L){L.beginPath(),L.moveTo(-1,p+1),L.lineTo(-1,p*T[0]);for(var A=0;A<T.length;A+=1)L.lineTo(A,p*T[A]);L.lineTo(d+he,p*T[T.length-1]),L.lineTo(d+he,p+1),L.closePath()}function w(T){T.beginPath();for(var L=1;L<d;L+=mi)T.moveTo(L,0),T.lineTo(L,p);for(var A=1;A<p;A+=mi)T.moveTo(0,A),T.lineTo(d,A)}function P(T){m=m??T;var{background:L,foregroundStroke:A,gridColor:B}=e;xt(s),s.fillStyle=L,s.fillRect(0,0,d,p),w(s),s.lineWidth=1,s.strokeStyle=B,s.stroke();var Z=((m??0)-(T??0))/(1e3/he);if(s.translate(Z,0),O(h,s),s.lineWidth=2,s.strokeStyle=A,s.stroke(),s.translate(-Z,0),l!=null&&(s.fillStyle=l),s.fill(),s.setTransform(o,0,0,o,0,0),(T??0)-(m??0)>1e3/he){for(var K=Math.floor(((T??0)-(m??0))/(1e3/he)),U=0;U<K;U+=1)h.shift(),h.push(x(h[h.length-1]));m=T}f!=null&&cancelAnimationFrame(f),f=requestAnimationFrame(P)}var C=He(()=>{f=requestAnimationFrame(T=>{g(),y(),a(!1),P(T)})},Lb,{leading:!0});function _(){a(!0),f!=null&&cancelAnimationFrame(f),f=null,m=null}var j=He(()=>{_()},Ab);function D(){f==null&&(a(!1),g(),y(),f=requestAnimationFrame(P)),j()}function R(){document.hasFocus()&&D()}function N(){f!=null&&cancelAnimationFrame(f),j(),C()}return u.useEffect(()=>{var T;return s=(T=n.current)===null||T===void 0?void 0:T.getContext("2d",{alpha:!1}),g(),h=v(),l=b(),P(),j(),window.addEventListener("resize",N),window.addEventListener("focus",D),window.addEventListener("blur",_),window.addEventListener("mousemove",R),window.addEventListener("keydown",R),()=>{f!=null&&cancelAnimationFrame(f),window.removeEventListener("resize",N),window.removeEventListener("focus",D),window.removeEventListener("blur",_),window.removeEventListener("mousemove",R),window.removeEventListener("keydown",R),j.cancel(),C.cancel()}},[e]),c.jsx("div",{className:"random-area-plot-animation-container",ref:r,children:c.jsx("canvas",{ref:n,className:i?"shade":""})})});function hs(t){var{text:e,placement:n="top-start"}=t,r=u.useMemo(()=>({placement:n}),[n]);return c.jsxs(c.Fragment,{children:[c.jsx(Et,{UNSAFE_className:$n.spectrumEllipsis,children:e??c.jsx(c.Fragment,{children:" "})}),e==null||e===""?null:c.jsx(Ze,{options:r,children:e})]})}var Nb=["scrollRef","getItemDisplayText","getKey"];function gi(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function vi(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?gi(Object(n),!0).forEach(function(r){$b(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):gi(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function $b(t,e,n){return(e=Ub(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function Ub(t){var e=Bb(t,"string");return typeof e=="symbol"?e:e+""}function Bb(t,e){if(typeof t!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var r=n.call(t,e);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function Wb(t,e){if(t==null)return{};var n,r,i=Kb(t,e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);for(r=0;r<a.length;r++)n=a[r],e.indexOf(n)===-1&&{}.propertyIsEnumerable.call(t,n)&&(i[n]=t[n])}return i}function Kb(t,e){if(t==null)return{};var n={};for(var r in t)if({}.hasOwnProperty.call(t,r)){if(e.indexOf(r)!==-1)continue;n[r]=t[r]}return n}function Vb(t){var{scrollRef:e,getItemDisplayText:n,getKey:r}=t,i=Wb(t,Nb),a=u.useCallback(o=>{var s=r(o),l=n(o);return c.jsx(yt,{textValue:l??String(s),children:c.jsx(hs,{text:l})},s)},[n,r]);return c.jsx(yn,vi(vi({},i),{},{ref:e,menuTrigger:"focus",onSelectionChange:i.onSelectionChange,children:a}))}var Hb=500;function Gb(t){var{heading:e,content:n,delayMs:r=Hb}=t,[i,a]=u.useState(!1);return u.useEffect(()=>{window.setTimeout(()=>{a(!0)},r)},[r]),i?c.jsxs(ha,{children:[c.jsx(Qe,{size:"XXL",children:c.jsx(ne,{icon:ac})}),c.jsx(Tn,{children:e}),n==null?null:c.jsx(bn,{children:n})]}):null}const ms={"handle-size":"15px","popover-width":"90px"};var lt=parseInt(ms["handle-size"],10),yi=parseInt(ms["popover-width"],10),ae=24*60*60-1,bi=5*60;function Yb(t){var{startTime:e,endTime:n,onChange:r,isStartModified:i=!1,isEndModified:a=!1,"data-testid":o}=t,[s,l]=u.useState(e),[d,p]=u.useState(n),f=u.useRef(null);u.useEffect(function(){l(e),p(n)},[e,n]);var m=u.useCallback((b,x)=>{var v=b,y=x;v===y&&(y<ae?y+=1:v-=1),l(v),p(y),r({startTime:v,endTime:y})},[l,p,r]),h=u.useCallback(b=>{m(b,d)},[m,d]),g=u.useCallback(b=>{m(s,b)},[m,s]);return c.jsxs("div",{className:"time-slider","data-testid":o,children:[c.jsx(zb,{startTime:s,endTime:d,onStartTimeChange:h,onEndTimeChange:g,isStartModified:i,isEndModified:a}),c.jsxs("div",{className:"track",ref:f,children:[c.jsx(qb,{startTime:s,endTime:d}),c.jsx("div",{className:"ticks",children:Array(24).fill(null).map((b,x)=>c.jsx("div",{className:"tick"},x))}),c.jsx(Pi,{track:f,time:s,setTime:h}),c.jsx(Pi,{track:f,time:d,setTime:g})]}),c.jsxs("div",{className:"tick-labels",children:[c.jsx("div",{className:"tick-label",children:"0:00"}),c.jsx("div",{className:"tick-label-wrapper",children:Array(24).fill(null).map((b,x)=>c.jsx("div",{className:"tick-label",children:"".concat(x+1,":00")},x))})]})]})}function zb(t){var{startTime:e,endTime:n,onStartTimeChange:r,onEndTimeChange:i,isStartModified:a,isEndModified:o,"data-testid":s}=t,l=e>n,[d,p]=u.useState(l?n:e),[f,m]=u.useState(l?e:n),h=u.useRef(null),g=u.useRef(null),b=u.useRef(null),x=u.useRef(null);u.useEffect(function(){p(e>n?n:e),m(e>n?e:n)},[e,n]),u.useEffect(function(){if(b.current!==null){var C;(C=g.current)===null||C===void 0||C.setSelection(b.current)}if(x.current!==null){var _;(_=h.current)===null||_===void 0||_.setSelection(x.current)}},[l]);function v(P){e<=n?r(P):i(P)}function y(P){e<=n?i(P):r(P)}var O=u.useCallback(P=>{b.current=P,x.current=null},[]),w=u.useCallback(P=>{b.current=null,x.current=P},[]);return c.jsxs("div",{className:"time-slider-popovers",children:[c.jsx("div",{className:"flex",style:{flexBasis:"calc(".concat(d/ae*100,"% - ").concat(yi/2,"px)")}}),c.jsxs("div",{className:"handle-popper",children:[c.jsx("label",{className:$({modified:l?o:a}),children:l?"End Time":"Start Time"}),c.jsx(gt,{ref:h,allowValueWrapping:!1,value:d,onChange:v,onSelect:O,"data-testid":s!==void 0?"".concat(s,"-input-1"):void 0})]}),c.jsx("div",{className:"flex-spacer"}),c.jsxs("div",{className:"handle-popper",children:[c.jsx("label",{className:$({modified:l?a:o}),children:l?"Start Time":"End Time"}),c.jsx(gt,{ref:g,allowValueWrapping:!1,value:f,onChange:y,onSelect:w,"data-testid":s!==void 0?"".concat(s,"-input-2"):void 0})]}),c.jsx("div",{className:"flex",style:{flexBasis:"calc(".concat((ae-f)/ae*100,"% - ").concat(yi/2,"px)")}})]})}function qb(t){var{startTime:e,endTime:n,"data-testid":r}=t;return c.jsxs("div",{className:"track-fills","data-testid":r,children:[e>n&&c.jsxs(c.Fragment,{children:[c.jsx("div",{className:"track-fill track-fill-start",style:{transform:"scaleX(".concat(n/ae,")")}}),c.jsx("div",{className:"track-fill track-fill-end",style:{transform:"scaleX(".concat((ae-e)/ae,")")}})]}),e<n&&c.jsx("div",{className:"track-fill track-fill-middle",style:{transform:"translateX(".concat(e/ae*100,"%) scaleX(").concat((n-e)/ae,")")}})]})}function Pi(t){var{track:e,time:n,setTime:r,"data-testid":i}=t,a=u.useMemo(()=>{var m=3600,h=lt/2;return n<m?h=n/m*(lt/2):n>23*m&&(h=lt/2+1/(ae-23*m)*(n-23*m)*(lt/2)),"translateX(calc(".concat(n/ae*100,"% - ").concat(h,"px))")},[n]),o=u.useCallback(m=>{if(!e.current)return 0;var h=e.current.getBoundingClientRect(),g=Math.max(m-h.left,0),b=ae*Math.min(1,g/h.width),x=bi*Math.round(b/bi),v=Math.min(ae,x);return v},[e]),s=u.useCallback(m=>{var{clientX:h}=m;r(o(h))},[r,o]),l=u.useCallback(m=>{var{clientX:h}=m;r(o(h)),window.removeEventListener("mousemove",s),window.removeEventListener("mouseup",l),document.documentElement.classList.remove("drag-pointer-events-none")},[r,o,s]),d=u.useCallback(()=>{window.addEventListener("mousemove",s),window.addEventListener("mouseup",l),document.documentElement.classList.add("drag-pointer-events-none")},[s,l]),p=u.useCallback(()=>{window.removeEventListener("mousemove",s),window.removeEventListener("mouseup",l),document.documentElement.classList.remove("drag-pointer-events-none")},[s,l]),f=u.useCallback(()=>{d()},[d]);return u.useEffect(function(){return()=>{p()}},[p]),c.jsx("div",{className:"handle-track",style:{transform:a},children:c.jsx("button",{className:"handle",type:"button","aria-label":"Change time",onMouseDown:f,"data-testid":i})})}function gs(t){var{buttons:e,isShown:n=!1,classNames:r,message:i,type:a,onClick:o,onDismiss:s,"data-testid":l}=t,d=u.useRef(null),p=e&&e.length!==0;return c.jsx(pa,{in:n,timeout:Xt.transitionMs,classNames:"toast-notification-slide-up",mountOnEnter:!0,unmountOnExit:!0,nodeRef:d,children:c.jsxs("div",{ref:d,className:$("toast-notification",r,a),role:"presentation",onClick:o,onKeyPress:o,"data-testid":l,children:[c.jsx("div",{className:"message-container",children:c.jsx("span",{className:"message",children:i})}),c.jsx(In,{in:p,timeout:Xt.transitionSlowMs,mountOnEnter:!0,unmountOnExit:!0,children:c.jsx("div",{className:"buttons-container",children:e})}),s&&c.jsx(Q,{kind:"ghost",icon:wn,tooltip:"Close notification",className:"my-2",onClick:s})]})})}gs.TYPE=Object.freeze({ERROR:"error"});const Xb=Object.freeze(Object.defineProperty({__proto__:null,ACTION_ICON_HEIGHT:Un,Accordion:Ul,ActionBar:da,ActionButton:bt,ActionButtonDialogTrigger:ts,ActionGroup:Xh,ActionMenu:Qh,AlertDialog:Bl,AutoCompleteInput:ce,AutoResizeTextarea:Vy,Avatar:Wl,Badge:Kl,BasicModal:Da,Breadcrumbs:Vl,BulkActionBar:qy,Button:Q,ButtonGroup:ca,CSS_VAR_EXPRESSION_PREFIX:oc,Calendar:Hl,CardFlip:Af,Checkbox:Jt,CheckboxGroup:Sy,Collapse:qe,ColorEditor:Gl,ColorPicker:Yl,ColorValues:vd,ComboBox:Jh,ComboBoxNormalized:qo,ConfirmActionButton:Dy,ConfirmationDialog:ns,Content:bn,ContextActionUtils:ve,ContextActions:jt,ContextMenuItem:Ia,ContextMenuRoot:ss,ContextualHelp:zl,ContextualHelpTrigger:ql,CopyButton:_a,CustomTimeSelect:ie,DEFAULT_DARK_THEME_KEY:sc,DEFAULT_DARK_THEME_PALETTE:lc,DEFAULT_GET_PREFERRED_REPLACEMENT_STRING:So,DEFAULT_LIGHT_THEME_KEY:uc,DEFAULT_PRELOAD_DATA_VARIABLES:cc,DH_CSS_VAR_NAME_REGEXP:dc,DH_VAR_PREFIX:pc,DashboardList:ps,DateField:Xl,DateInput:cs,DatePicker:Ql,DateRangePicker:Jl,DateTimeInput:Zh,DebouncedModal:as,DebouncedSearchInput:yd,Dialog:sa,DialogContainer:Zl,DialogTrigger:oa,Disclosure:eu,DisclosurePanel:tu,DisclosureTitle:nu,Divider:la,DragUtils:nn,DraggableItemList:em,DropdownMenu:ka,EXTERNAL_THEME_KEY:fc,EditableItemList:hb,ErrorBoundary:bd,ErrorView:mb,FadeTransition:In,Flex:ra,FontBootstrap:Yo,FontsLoaded:zo,FontsLoadedContext:Rt,Footer:ru,Form:ua,GLOBAL_SHORTCUTS:It,Grid:iu,Header:au,Heading:Tn,HierarchicalCheckboxMenu:De,ITEM_EMPTY_STRING_TEXT_VALUE:tm,Icon:Qe,IconActionButton:rs,IllustratedMessage:ha,Image:ou,InfoModal:os,InlineAlert:su,Item:yt,ItemContent:nm,ItemList:Qt,ItemListItem:Pd,ItemTooltip:rm,KEY:re,Keyboard:lu,LIST_VIEW_ROW_HEIGHTS:wo,LabeledValue:uu,Link:ma,ListActionGroup:im,ListActionMenu:am,ListView:Ov,ListViewNormalized:Xo,ListViewWrapper:zn,LoadingOverlay:je,LoadingSpinner:Pt,LogicButton:cu,Logo:rv,MODIFIER:X,MSG_REQUEST_GET_THEME:hc,MSG_REQUEST_SET_THEME:Pa,MaskedInput:Bn,Menu:om,MenuItem:sm,MenuTrigger:du,Meter:pu,Modal:On,ModalBody:Sn,ModalFooter:La,ModalHeader:wa,MultiSelect:Qn,MultiSelectNormalized:Zo,NAVIGATION_SHORTCUTS:fb,NON_WHITESPACE_REGEX:mc,NavTabList:Ib,NumberField:fu,Option:Co,PICKER_ITEM_HEIGHTS:lm,PICKER_TOP_OFFSET:um,PRELOAD_TRANSPARENT_THEME_QUERY_PARAM:gc,Page:cm,Picker:dm,PickerNormalized:pm,Popper:Tt,ProgressBar:hu,ProgressCircle:aa,Radio:mu,RadioGroup:gu,RandomAreaPlotAnimation:fs,RangeCalendar:vu,RangeSlider:yu,SVG_ICON_MANUAL_COLOR_MAP:vc,SearchField:bu,SearchInput:jn,SearchableCombobox:Vb,Section:fm,Select:Aa,SelectValueList:Eo,Shortcut:xd,ShortcutRegistry:Se,SlideTransition:hm,Slider:Pu,SocketedButton:Mf,SpectrumButton:zt,SpectrumCheckbox:Yt,SpectrumComboBox:yn,SpectrumMenu:xu,SplitButtonGroup:Od,Stack:mm,StatusLight:Ou,SubmenuTrigger:Su,Switch:wu,TABLE_ROW_HEIGHT:gm,THEME_CACHE_LOCAL_STORAGE_KEY:yc,THEME_KEY_OVERRIDE_QUERY_PARAM:bc,TMP_CSS_PROP_PREFIX:Pc,TRANSPARENT_PRELOAD_DATA_VARIABLES:xc,TabList:Cu,TabPanels:kg,TableViewEmptyState:Gb,Tabs:Eu,TagGroup:Tu,Text:Et,TextArea:ju,TextField:Iu,TextWithTooltip:hs,ThemeContext:Sd,ThemeExport:Xt,ThemePicker:nv,ThemeProvider:Ma,TimeField:ku,TimeInput:gt,TimeSlider:Yb,ToastContainer:_u,ToastNotification:gs,ToastQueue:Ru,ToggleButton:Du,Tooltip:Ze,UISwitch:wd,View:es,WHITESPACE_REGEX:Oc,Well:Lu,XComponentMapContext:Cd,XComponentMapProvider:Ed,baseStyleProps:Au,calculatePreloadStyleContent:Sc,canHaveRef:Fa,colorValueStyle:oe,createCssVariableResolver:wc,createPreloadStyleElement:Cc,createXComponent:Td,extractDistinctCssVariableExpressions:Ec,fillToLength:vm,getActiveThemes:Tc,getDefaultBaseThemes:jc,getDefaultSelectedThemeKey:Ic,getExpressionRanges:kc,getItemKey:ht,getItemTextValue:Oo,getPositionOfSelectedItemElement:ym,getThemeKey:_c,getThemeKeyOverride:Rc,getThemePreloadData:Dc,isBaseThemeKey:Lc,isClassComponent:jd,isDHColorValue:Id,isExternalThemeData:xa,isExternalThemeEnabled:Pn,isForwardRefComponentType:kd,isItemElement:mt,isItemElementWithDescription:bm,isItemOrSection:Pm,isNormalizedItemsWithKeysList:xm,isNormalizedSection:tn,isPreloadTransparentTheme:Ac,isSectionElement:Nn,isValidColorVar:Mc,isWrappedComponent:Na,itemSelectionToStringSet:Ve,normalizeTooltipOptions:et,overrideSVGFillColors:Fc,parseExternalThemeData:ya,preloadTheme:Nc,replaceSVGFillColor:$c,requestExternalThemeData:ba,resolveCssVariablesInRecord:Sa,resolveCssVariablesInString:Uc,separateSpectrumProps:Ho,setThemePreloadData:Bc,themeDHDefault:Wc,themeDark:Kc,themeLight:Vc,trimTrailingMask:Om,useExternalTheme:Go,useOnChangeTrackUncontrolled:Sm,usePickerItemScale:Wn,usePickerNormalizedProps:xo,usePickerProps:wm,usePickerScrollOnOpen:Cm,useRenderNormalizedItem:Fn,useSpectrumThemeProvider:An,useStaticItemInitialScrollPosition:Em,useStringifiedMultiSelection:Yn,useStringifiedSelection:Tm,useStyleProps:Mu,useTheme:wt,useXComponent:_d,viewStyleProps:Fu,wrapIcon:jm,wrapItemChildren:Mn,wrapPrimitiveWithText:Im},Symbol.toStringTag,{value:"Module"}));var vs=W.memo(t=>{var{children:e,onError:n,widget:r}=t,[i,a]=kn(r);return a!=null?(n==null||n(a),null):i==null?null:c.jsx(Cn.Provider,{value:i,children:e})});vs.displayName="DeferredApiBootstrap";var Dt=u.createContext(null);Dt.displayName="ObjectFetchManagerContext";function ys(t){var[e,n]=u.useState({status:"loading"}),r=u.useContext(Dt);return u.useEffect(()=>{if(r==null){n({error:new Error("No ObjectFetchManager available in context"),status:"error"});return}return n(i=>i.status==="loading"?i:{status:"loading"}),r.subscribe(t,n)},[t,r]),e}function xi(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function Oi(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?xi(Object(n),!0).forEach(function(r){Qb(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):xi(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function Qb(t,e,n){return(e=Jb(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function Jb(t){var e=Zb(t,"string");return typeof e=="symbol"?e:e+""}function Zb(t,e){if(typeof t!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var r=n.call(t,e);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function Si(t,e,n,r,i,a,o){try{var s=t[a](o),l=s.value}catch(d){return void n(d)}s.done?e(l):Promise.resolve(l).then(r,i)}function e0(t){return function(){var e=this,n=arguments;return new Promise(function(r,i){var a=t.apply(e,n);function o(l){Si(a,r,i,o,s,"next",l)}function s(l){Si(a,r,i,o,s,"throw",l)}o(void 0)})}}var ut=Y.module("useWidget");function t0(t){var[e,n]=u.useState(()=>({widget:null,error:null})),r=ys(t),[i,a]=kn(t),o=Pe(),s=i??o;u.useEffect(function(){ut.debug("loadWidget",t);var{status:p}=r;if(p==="error"){n({widget:null,error:r.error});return}if(p==="loading"){n({widget:null,error:null});return}var{fetch:f}=r,m=!1;function h(){return g.apply(this,arguments)}function g(){return g=e0(function*(){try{xt(f);var b=yield f();if(m){ut.debug2("loadWidgetInternal cancelled",t,b),b.close(),"exportedObjects"in b&&b.exportedObjects.forEach(x=>{x.close()});return}ut.debug("loadWidgetInternal done",t,b),n({widget:b,error:null})}catch(x){if(m)return;ut.error("loadWidgetInternal error",t,x),n({widget:null,error:x??new Error("Null error")})}}),g.apply(this,arguments)}return h(),()=>{m=!0}},[t,r]);var l=u.useMemo(()=>{var d;return Oi(Oi({},e),{},{error:(d=e.error)!==null&&d!==void 0?d:a,api:e.widget!=null?s:null})},[e,s,a]);return l}const n0=Object.freeze(Object.defineProperty({__proto__:null,ApiBootstrap:Hc,ApiContext:Cn,ClientBootstrap:Ea,ClientContext:Zc,DeferredApiBootstrap:vs,DeferredApiContext:Ff,ObjectFetchManagerContext:Dt,ObjectFetcherContext:$a,getVariableDescriptor:Rd,isIdVariableDescriptor:Dd,isNameVariableDescriptor:Ld,isVariableDescriptor:Ad,sanitizeVariableDescriptor:Ua,useApi:Pe,useClient:Je,useDeferredApi:kn,useObjectFetch:ys,useObjectFetcher:Md,useWidget:t0},Symbol.toStringTag,{value:"Module"}));function r0(t){return function(n){var{children:r}=n;return c.jsx(Cn.Provider,{value:t,children:r})}}var bs="io.deephaven.message.LoginOptions.request",Ps="io.deephaven.message.SessionDetails.request",xs="io.deephaven.broadcast",Jn="io.deephaven.broadcast.Login",Os="io.deephaven.broadcast.Logout";function Ss(t){return Ot(t)&&t.message===Jn}function ws(t){return Ot(t)&&t.message===Os}function i0(t,e,n){return(e=a0(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function a0(t){var e=o0(t,"string");return typeof e=="symbol"?e:e+""}function o0(t,e){if(typeof t!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var r=n.call(t,e);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}class Cs extends Error{constructor(){super(...arguments),i0(this,"isNoConsolesError",!0)}}function Es(t){return t.isNoConsolesError}function wi(t,e,n,r,i,a,o){try{var s=t[a](o),l=s.value}catch(d){return void n(d)}s.done?e(l):Promise.resolve(l).then(r,i)}function Lt(t){return function(){var e=this,n=arguments;return new Promise(function(r,i){var a=t.apply(e,n);function o(l){wi(a,r,i,o,s,"next",l)}function s(l){wi(a,r,i,o,s,"throw",l)}o(void 0)})}}var Ke=Y.module("SessionUtils");function Ts(t,e,n){return an.apply(this,arguments)}function an(){return an=Lt(function*(t,e,n){Ke.info("Getting console types...");var r=yield e.getConsoleTypes();if(r.length===0)throw new Cs("No console types available");Ke.info("Available types:",r);var i=r[0];Ke.info("Starting session with type",i);var a=yield e.startSession(i),o={type:i,id:vn()};return Ke.info("Console session established",o),{session:a,config:o,connection:e,details:n,dh:t}}),an.apply(this,arguments)}function s0(t,e,n){return Ke.info("createCoreClient",e),new t.CoreClient(e,n)}function l0(t){return t!=null&&typeof t=="object"}function u0(){return on.apply(this,arguments)}function on(){return on=Lt(function*(){var t=yield En(Ps);if(!l0(t))throw new Error("Unexpected session details response: ".concat(t));return t}),on.apply(this,arguments)}function c0(){return sn.apply(this,arguments)}function sn(){return sn=Lt(function*(){var t=new URLSearchParams(window.location.search);switch(t.get("authProvider")){case"parent":return u0()}return{}}),sn.apply(this,arguments)}function d0(t,e,n){return ln.apply(this,arguments)}function ln(){return ln=Lt(function*(t,e,n){var r;try{r=yield Ts(t,e,n)}catch(i){if(!Es(i))throw i}return r}),ln.apply(this,arguments)}const p0=Object.freeze(Object.defineProperty({__proto__:null,BROADCAST_CHANNEL_NAME:xs,BROADCAST_LOGIN_MESSAGE:Jn,BROADCAST_LOGOUT_MESSAGE:Os,BooleanColumnFormatter:Nf,CharColumnFormatter:$f,DateTimeColumnFormatter:Fd,DateUtils:Uf,DecimalColumnFormatter:Nd,DefaultColumnFormatter:Bf,FETCH_TIMEOUT:ed,Formatter:_n,FormatterUtils:en,ITEM_KEY_PREFIX:Wf,IntegerColumnFormatter:$d,LOGIN_OPTIONS_REQUEST:bs,NewTableColumnTypes:Ud,NoConsolesError:Cs,SESSION_DETAILS_REQUEST:Ps,StringColumnFormatter:Kf,TableColumnFormatter:Bd,TableUtils:so,createComboboxFilterArgs:Vf,createCoreClient:s0,createFilterConditionFactory:Rn,createFormatterFromSettings:Hf,createKeyedItemKey:Dn,createNotNullOrEmptyFilterCondition:lo,createOnTableUpdatedHandler:Gf,createSearchTextFilter:uo,createSelectedValuesFilter:Ln,createSessionWrapper:Ts,createShowOnlyEmptyFilterCondition:co,createValueFilter:po,defaultRowDeserializer:Yf,fetchVariableDefinition:td,fetchVariableDefinitionByPredicate:nd,generateEmptyKeyedItems:zf,getColumnFormats:qf,getDateTimeFormatterOptions:Xf,getSessionDetails:c0,getSize:Qf,getWindowParent:xn,isBroadcastLoginMessage:Ss,isBroadcastLogoutMessage:ws,isClosed:Jf,isCustomColumnFormatDefined:Zf,isMessage:Ot,isNoConsolesError:Es,isResponse:Gc,isSortDirection:eh,loadSessionWrapper:d0,makeMessage:Ca,makeResponse:Yc,padFirstAndLastRow:th,requestParentResponse:En},Symbol.toStringTag,{value:"Module"}));function f0(t,e,n){return(e=h0(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function h0(t){var e=m0(t,"string");return typeof e=="symbol"?e:e+""}function m0(t,e){if(typeof t!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var r=n.call(t,e);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}class g0 extends Error{constructor(){super(...arguments),f0(this,"isColumnNameError",!0)}}function v0(t,e,n){return(e=y0(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function y0(t){var e=b0(t,"string");return typeof e=="symbol"?e:e+""}function b0(t,e){if(typeof t!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var r=n.call(t,e);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}class P0 extends Error{constructor(){super(...arguments),v0(this,"isTableDisconnectError",!0)}}var ct=Y.module("useTable"),js=(t,e,n,r)=>{var i=Pe(),[a,o]=u.useState(void 0),[s,l]=u.useState([]),[d,p]=u.useState(null),[f,m]=u.useState(null);u.useEffect(()=>{if(r===void 0){o(t==null?void 0:t.columns),p(null);return}try{o(t==null?void 0:t.findColumns(r)),p(null)}catch(x){ct.error("Column not found",x,r),p(new g0("Invalid columnNames argument"))}},[t,r]),u.useEffect(()=>{if(!a||!t){ct.debug2("Table or column not initialized, skip viewport update.");return}ct.debug2("Setting viewport",e,n),t.setViewport(e,n,a)},[a,t,e,n]);var h=u.useCallback(x=>{var{detail:v}=x;if(!a){ct.error("Columns not initialized.");return}var y=a.map(O=>v.rows.map(w=>w.get(O)));l(y)},[a]),g=u.useCallback(()=>{m(new P0("Table disconnected"))},[]),b=u.useCallback(()=>{m(null)},[]);return pt(t,i.Table.EVENT_UPDATED,h),pt(t,i.Table.EVENT_DISCONNECT,g),pt(t,i.Table.EVENT_RECONNECT,b),{columns:a,data:s,error:f??d}},Is=(t,e,n,r)=>{var i=u.useMemo(()=>[r],[r]),{columns:a=[],data:o=[],error:s}=js(t,e,n,i);return{column:a[0],data:o[0],error:s}};function Ci(t,e,n,r,i,a,o){try{var s=t[a](o),l=s.value}catch(d){return void n(d)}s.done?e(l):Promise.resolve(l).then(r,i)}function x0(t){return function(){var e=this,n=arguments;return new Promise(function(r,i){var a=t.apply(e,n);function o(l){Ci(a,r,i,o,s,"next",l)}function s(l){Ci(a,r,i,o,s,"throw",l)}o(void 0)})}}var de=Y.module("TableInput"),Kt=250;function O0(t){var e,n,{className:r=void 0,columnName:i,settings:a,defaultValue:o=[],isInvalid:s=!1,onChange:l=se,onBlur:d=se,table:p}=t,f=u.useRef(null),m=Pe(),h=u.useMemo(()=>{var S=en.getColumnFormats(a),k=en.getDateTimeFormatterOptions(a),{defaultDecimalFormatOptions:E={},defaultIntegerFormatOptions:F={}}=a;return new _n(m,S,k,E,F)},[m,a]),[g,b]=u.useState(""),[x,v]=u.useState(new Set(o)),[y,O]=u.useState(),w=u.useRef(null),P=Math.min((e=y==null?void 0:y.size)!==null&&e!==void 0?e:0,Kt),{column:C,data:_,error:j}=Is(y,0,Kt-1,i),D=u.useCallback(S=>C?h.getFormattedString(S,C.type,C.name):"".concat(S),[C,h]),[R,N]=u.useMemo(()=>{var S=new Set(x),k=[];if(_==null)return[k,null];if(_.forEach(F=>{var H="".concat(F),le=x.has(H);le&&S.delete(H),k.push({value:H,displayValue:D(F),isSelected:le})}),S.size>0){de.debug2("Selection has items that are missing from the viewport");var E=new Set(x);return Array.from(S).forEach(F=>{E.delete(F)}),[k,E]}return[k,null]},[_,x,D]);u.useEffect(()=>{N!==null&&(v(N),l(Array.from(N)))},[l,N]);var T=u.useCallback(function(){var S=x0(function*(k){try{var E=yield k;de.debug("Table resolved",E),O(E)}catch(F){if(Ee.isCanceled(F))return;de.error(F)}});return function(k){return S.apply(this,arguments)}}(),[]);u.useEffect(()=>{var S=Ee.makeCancelable(p);return T(S),()=>{de.debug2("Cancel table promise"),S.cancel()}},[p,T]);var L=u.useCallback(S=>{var{value:k}=S.target;b(k);var E=R.findIndex(H=>H.displayValue.includes(k));if(E>-1){var F;de.debug2("Found ".concat(k," at index ").concat(E)),(F=w.current)===null||F===void 0||F.scrollIntoView(E)}else de.debug2("".concat(k," not found"))},[R,w]),A=u.useCallback(S=>{if(de.debug("handleSelect",S),S>=R.length){de.error("Invalid index",S);return}var k=R[S].value,E=new Set(x);R[S].isSelected?E.delete(k):E.add(k),v(E),l(Array.from(E))},[l,R,x]),B=u.useCallback(()=>{var S=R.map(E=>E.value),k=new Set(S);v(k),l(S)},[R,l]),Z=u.useCallback(()=>{v(new Set),l([])},[l]),K=u.useCallback(()=>{},[]),U=u.useCallback(S=>{var k,{relatedTarget:E}=S;de.debug("handleChildBlur",E,E instanceof HTMLElement,f.current,(k=f.current)===null||k===void 0?void 0:k.contains(E)),(!E||f.current&&E instanceof HTMLElement&&!f.current.contains(E))&&d()},[d]),I=R.length===0;return c.jsxs("div",{ref:f,className:$("table-input-container d-flex flex-column position-relative",r),children:[c.jsx(jn,{disabled:!!j||I,value:g,placeholder:"Search",onChange:L,className:"mb-2 d-flex",onBlur:U}),c.jsx(Eo,{className:"table-input-list",disabled:y===void 0||I,isInvalid:s,items:I?[{value:"Empty",isSelected:!1}]:R,itemCount:P,offset:0,onSelect:A,onViewportChange:K,ref:w,onBlur:U}),y&&c.jsxs("div",{className:"meta-row",children:[c.jsx("div",{className:"d-flex align-items-center text-muted small",children:y!=null&&y.size>P&&c.jsxs(c.Fragment,{children:["Table is too large, showing the first ",Kt," items."]})}),c.jsxs("div",{children:[c.jsx("button",{type:"button",className:"btn btn-link",onBlur:U,onClick:B,children:"Select All"}),c.jsx("button",{type:"button",className:"btn btn-link mr-a",onBlur:U,onClick:Z,children:"Clear"})]})]}),y==null||j&&c.jsx("div",{className:"h-100 w-100 position-absolute",children:c.jsx(je,{isLoaded:y!=null,isLoading:y==null&&j==null,errorMessage:(n=j==null?void 0:j.message)!==null&&n!==void 0?n:null,"data-testid":"table-input-loading"})})]})}var S0=["table","keyColumn","labelColumn","iconColumn","settings","onChange","onSelectionChange"];function Ei(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function Ti(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?Ei(Object(n),!0).forEach(function(r){w0(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Ei(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function w0(t,e,n){return(e=C0(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function C0(t){var e=E0(t,"string");return typeof e=="symbol"?e:e+""}function E0(t,e){if(typeof t!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var r=n.call(t,e);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function ji(t,e,n,r,i,a,o){try{var s=t[a](o),l=s.value}catch(d){return void n(d)}s.done?e(l):Promise.resolve(l).then(r,i)}function Ii(t){return function(){var e=this,n=arguments;return new Promise(function(r,i){var a=t.apply(e,n);function o(l){ji(a,r,i,o,s,"next",l)}function s(l){ji(a,r,i,o,s,"throw",l)}o(void 0)})}}function T0(t,e){if(t==null)return{};var n,r,i=j0(t,e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);for(r=0;r<a.length;r++)n=a[r],e.indexOf(n)===-1&&{}.propertyIsEnumerable.call(t,n)&&(i[n]=t[n])}return i}function j0(t,e){if(t==null)return{};var n={};for(var r in t)if({}.hasOwnProperty.call(t,r)){if(e.indexOf(r)!==-1)continue;n[r]=t[r]}return n}var I0=Y.module("jsapi-components.useMultiPickerProps");function k0(t){var e,{table:n,keyColumn:r,labelColumn:i,iconColumn:a,settings:o,onChange:s,onSelectionChange:l}=t,d=T0(t,S0),{itemHeight:p}=Wn(),{getFormattedString:f,timeZone:m}=Kn(o),{data:h}=Te(so.copyTableAndApplyFilters,[n]);Vn(h);var g=u.useMemo(()=>h==null?null:km(h,r),[r,h]),b=u.useMemo(()=>h==null||g==null?null:_m(h,g,i),[g,i,h]),x=u.useMemo(()=>b==null?[]:[b.name],[b]),v=To({table:h,iconColumnName:a,keyColumnName:r,labelColumnName:i,formatValue:f}),{onScroll:y,onSearchTextChange:O,viewportData:w}=jo({reuseItemsOnTableResize:!0,table:h,itemHeight:p,deserializeRow:v,searchColumnNames:x,timeZone:m}),P=Pe(),C=pe(),_=u.useMemo(()=>{if(h==null||g==null)return[];var K=[g];if(b!=null&&b!==g&&K.push(b),a!=null)try{var U=h.findColumn(a);K.push(U)}catch{}return K},[h,g,b,a]),j=(e=d.selectedKeys)!==null&&e!==void 0?e:d.defaultSelectedKeys,D=u.useRef(new Set),[R,N]=u.useState(new Map);u.useEffect(()=>{D.current=new Set,N(new Map)},[h]),u.useEffect(function(){if(!(h==null||g==null||j==null||j==="all")){var U=[...j].filter(E=>!D.current.has(String(E)));if(U.length!==0){var I=!1,S=h.findColumn(g.name),k=C.getValueType(S.type);return Ii(function*(){try{var E=[];if(yield Promise.all(U.map(function(){var J=Ii(function*(z){if(!I){var ee=yield h.seekRow(0,S,k,z);ee!==-1&&E.push(ee)}});return function(z){return J.apply(this,arguments)}}())),E.sort((J,z)=>J-z),I||E.length===0)return;var F=P.RangeSet.ofItems(E),H=yield h.createSnapshot({rows:F,columns:_});if(I)return;var le=new Map;H.rows.forEach((J,z)=>{var ee=E[z],te=v(J);le.set(ee,{key:Dn(ee),item:te})}),I||(U.forEach(J=>D.current.add(String(J))),N(J=>{var z=new Map(J);return le.forEach((ee,te)=>z.set(te,ee)),z}))}catch(J){I0.error("Error loading labels for selected keys",J)}})(),()=>{I=!0}}}},[j,h,g,C,P,v,_]);var T=u.useRef(new Map),[L,A]=u.useState(new Map),B=u.useMemo(()=>R.size===0?w.items:w.items.map((K,U)=>{if(K.item==null){var I=R.get(U);if(I!=null)return I}return K}),[w.items,R]);u.useEffect(function(){var U,I=(U=d.selectedKeys)!==null&&U!==void 0?U:d.defaultSelectedKeys,S;I instanceof Array?S=new Set(I.map(String)):I==="all"?S=null:S=new Set;var k=!1;B.forEach(E=>{if(E.item!=null){var F=String(E.item.key),H=E.item.textValue;H!=null&&(S==null||S.has(F))&&T.current.get(F)!==H&&(T.current.set(F,H),k=!0)}}),k&&A(new Map(T.current))},[B,d.selectedKeys,d.defaultSelectedKeys]);var Z=u.useCallback(K=>{var U;(U=s??l)===null||U===void 0||U(K)},[s,l]);return Ti(Ti({},d),{},{normalizedItems:B,selectedItemLabels:L,showItemIcons:a!=null,onChange:Z,onScroll:y,onSearchTextChange:O})}var _0=["onInputChange","onSearchTextChange"];function ki(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function _i(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?ki(Object(n),!0).forEach(function(r){R0(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):ki(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function R0(t,e,n){return(e=D0(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function D0(t){var e=L0(t,"string");return typeof e=="symbol"?e:e+""}function L0(t,e){if(typeof t!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var r=n.call(t,e);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function A0(t,e){if(t==null)return{};var n,r,i=M0(t,e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);for(r=0;r<a.length;r++)n=a[r],e.indexOf(n)===-1&&{}.propertyIsEnumerable.call(t,n)&&(i[n]=t[n])}return i}function M0(t,e){if(t==null)return{};var n={};for(var r in t)if({}.hasOwnProperty.call(t,r)){if(e.indexOf(r)!==-1)continue;n[r]=t[r]}return n}function F0(t){var e=Rm(t),{onInputChange:n,onSearchTextChange:r}=e,i=A0(e,_0),a=u.useRef(!1),o=u.useRef(""),s=u.useCallback(d=>{n==null||n(d),a.current?r(d):(r(""),o.current=d)},[n,r]),l=u.useCallback((d,p)=>{var f;(f=i.onOpenChange)===null||f===void 0||f.call(i,d),d?p==="input"&&r(o.current):r(""),a.current=d},[r,i]);return c.jsx(qo,_i(_i({},i),{},{onInputChange:s,onOpenChange:l}))}var N0=["table","keyColumn","labelColumn","iconColumn","settings"];function Ri(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function Di(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?Ri(Object(n),!0).forEach(function(r){$0(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Ri(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function $0(t,e,n){return(e=U0(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function U0(t){var e=B0(t,"string");return typeof e=="symbol"?e:e+""}function B0(t,e){if(typeof t!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var r=n.call(t,e);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function W0(t,e){if(t==null)return{};var n,r,i=K0(t,e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);for(r=0;r<a.length;r++)n=a[r],e.indexOf(n)===-1&&{}.propertyIsEnumerable.call(t,n)&&(i[n]=t[n])}return i}function K0(t,e){if(t==null)return{};var n={};for(var r in t)if({}.hasOwnProperty.call(t,r)){if(e.indexOf(r)!==-1)continue;n[r]=t[r]}return n}function V0(t){var e,{table:n,keyColumn:r,labelColumn:i,iconColumn:a,settings:o}=t,s=W0(t,N0),{scale:l}=An(),d=wo[(e=s.density)!==null&&e!==void 0?e:"regular"][l],{getFormattedString:p}=Kn(o),f=To({table:n,iconColumnName:a,keyColumnName:r,labelColumnName:i,formatValue:p}),{viewportData:m,onScroll:h}=Hn({reuseItemsOnTableResize:!0,table:n,itemHeight:d,deserializeRow:f});return c.jsx(Xo,Di(Di({},s),{},{normalizedItems:m.items,showItemIcons:a!=null,onScroll:h}))}var H0=["onInputChange","onOpenChange","onSearchTextChange"];function Li(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function Ai(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?Li(Object(n),!0).forEach(function(r){G0(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Li(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function G0(t,e,n){return(e=Y0(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function Y0(t){var e=z0(t,"string");return typeof e=="symbol"?e:e+""}function z0(t,e){if(typeof t!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var r=n.call(t,e);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function q0(t,e){if(t==null)return{};var n,r,i=X0(t,e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);for(r=0;r<a.length;r++)n=a[r],e.indexOf(n)===-1&&{}.propertyIsEnumerable.call(t,n)&&(i[n]=t[n])}return i}function X0(t,e){if(t==null)return{};var n={};for(var r in t)if({}.hasOwnProperty.call(t,r)){if(e.indexOf(r)!==-1)continue;n[r]=t[r]}return n}function Q0(t){var e=k0(t),{onInputChange:n,onOpenChange:r,onSearchTextChange:i}=e,a=q0(e,H0),o=u.useRef(!1),s=u.useRef(""),l=u.useCallback(p=>{n==null||n(p),o.current?i(p):(i(""),s.current=p)},[n,i]),d=u.useCallback(p=>{r==null||r(p),p?s.current!==""&&i(s.current):i(""),o.current=p},[i,r]);return c.jsx(Zo,Ai(Ai({},a),{},{onInputChange:l,onOpenChange:d}))}function J0(t){return typeof t=="object"&&t!=null&&"equals"in t&&typeof t.equals=="function"}function Z0(t){return"".concat(t)}function eP(t){var{column:e,table:n,filter:r=Ra,onChange:i,selectedValue:a,disabled:o,className:s,formatValue:l=Z0,maxSize:d=1e3}=t,p=Pe(),[f,m]=u.useState([]);u.useEffect(()=>{if(n==null){m([]);return}var x=e??n.columns[0];n.applyFilter(r);var v=n.setViewport(0,d,[x]);return v.addEventListener(p.Table.EVENT_UPDATED,y=>{var{detail:O}=y,w=O.rows.map(P=>{var C;return(C=P.get(x))!==null&&C!==void 0?C:null});m(w)}),()=>{v.close()}},[e,p,r,d,n]);var h=u.useMemo(()=>a===void 0?[void 0,...f]:f,[a,f]),g=u.useMemo(()=>h.findIndex(x=>x===a||J0(x)&&x.equals(a)),[a,h]),b=u.useCallback(x=>{var v=parseInt(x,10);i(h[v])},[i,h]);return c.jsx(Aa,{className:s,value:g,onChange:b,disabled:o,children:h.map((x,v)=>c.jsx(Co,{value:v,children:l(x)},"".concat(v)))})}var Mi=Y.module("useBroadcastChannel");function Zn(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:se,e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:xs,n=u.useMemo(()=>new BroadcastChannel(e),[e]);return u.useEffect(()=>()=>{n.close()},[n]),u.useEffect(()=>{function r(i){var{data:a}=i;if(!Ot(a)){Mi.debug("Ignoring non-deephaven message",a);return}Mi.debug("event received",a),t(i)}return n.addEventListener("message",r),()=>{n.removeEventListener("message",r)}},[n,t]),n}function er(t,e){var n=u.useCallback(r=>{Ss(r.data)?t==null||t(r.data):ws(r.data)&&(e==null||e(r.data))},[t,e]);Zn(n)}function tP(t,e,n,r){var i=pe(),[a,o]=u.useState(""),{value:s}=tt(a,n),l=u.useCallback(m=>{o(m.trim())},[]),{data:d,isLoading:p}=Te(i.doesColumnValueExist,[t,e,s,r]),f=p||a!==s?null:d;return{valueTrimmed:a,valueTrimmedDebounced:s,valueExists:f,trimAndUpdateValue:l}}var Fi=Y.module("useDebouncedViewportSearch"),nP=200;function rP(t,e){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:nP,r=pe(),{table:i,applyFiltersAndRefresh:a}=t,o=u.useMemo(()=>He(s=>{if(Fi.debug("Applying debounced searchText '".concat(s,"'")),i!=null){var l=s.trim();if(l===""){a([]);return}var d=i.findColumn(e),p=r.makeFilterValue(d.type,l),f=[d.filter().contains(p)];a(f)}},n),[a,e,n,i,r]);return u.useEffect(()=>()=>{Fi.debug("Cancelling debounced search function"),o.cancel()},[o]),o}var ks=300;function iP(t){var{viewportData:e,columnName:n,shouldSelectAllOnNoSelection:r,mapItemToValue:i}=t,a=pe(),o=Bo(e,i,Dn),{value:s}=tt(o,ks),l=$o(s,Ao);return u.useMemo(()=>Ln(a,n,l.selection,r,l.isInverted),[n,l,r,a])}function aP(t,e,n,r){var i=u.useRef("");return i.current=n,u.useMemo(()=>{var a=t.length>0&&t[0].item==null;return!a&&r!=null&&(i.current===""||r.toLowerCase().includes(i.current.toLowerCase()))?[{key:r,item:{[e]:r}},...t]:t},[r,e,t])}function Ni(t,e,n,r,i,a,o){try{var s=t[a](o),l=s.value}catch(d){return void n(d)}s.done?e(l):Promise.resolve(l).then(r,i)}function oP(t){return function(){var e=this,n=arguments;return new Promise(function(r,i){var a=t.apply(e,n);function o(l){Ni(a,r,i,o,s,"next",l)}function s(l){Ni(a,r,i,o,s,"throw",l)}o(void 0)})}}function sP(t){var{table:e,columnName:n,defaultValue:r,itemHeight:i,topOffset:a=0,value:o}=t;return u.useCallback(oP(function*(){if(e==null||o===""||o===r)return a;var s=e.findColumn(n),l=yield e.seekRow(0,s,"String",o),d=r==null?0:1;return(l+d)*i+a}),[n,r,i,e,a,o])}function lP(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"or",n=pe(),r=u.useMemo(()=>lo(n),[n]);return u.useMemo(()=>Rn(t,r,e),[t,e,r])}function uP(t){var{maybeTable:e,columnName:n,mapItemToValue:r,filterConditionFactories:i=[],trimSearchText:a=!1,timeZone:o}=t,{itemHeight:s}=Wn(),l=pe(),[d,p]=u.useState(""),[f,m]=u.useState(""),h=u.useCallback(S=>{m(a?S.trim():S)},[a]),g=u.useMemo(()=>a?d.trim():d,[d,a]),[b,x]=u.useState(null),[v,y]=u.useState(()=>new Map),{data:O,isLoading:w}=Te(l.doesColumnValueExist,[e,n,f,!1]),{isDebouncing:P}=tt(f,xr),C=P||w?null:O,_=u.useMemo(()=>uo(l,n,f,o),[f,n,l,o]),j=u.useMemo(()=>Ln(l,n,new Set(v.keys()),!1,!0),[n,v,l]),{data:D}=Te(l.createDistinctSortedColumnTable,[e,n,"asc",...i]);Vn(D);var R=Hn({table:D,itemHeight:s,viewportSize:Dm,viewportPadding:Lm}),N=g.length>0&&R.size===0,T=v.has(g),L=Ge(h,xr),A=u.useCallback(S=>{p(S),L(S)},[L]),B=Ge(x,0),Z=u.useCallback(S=>{if(p(""),h(""),x(S),B(null),S!=null){var k=R.viewportData.findItem(S);if(k!=null){var E=r(k);y(F=>{var H=new Map(F);return H.set(E,{value:E}),H})}}},[h,B,R.viewportData,r]),K=u.useCallback(S=>{y(k=>{if(S.size===0)return k;var E=new Map(k);for(var F of S)E.set(F,{value:F});return E})},[]),U=u.useCallback(S=>{y(k=>{if(S==="all")return new Map;var E=new Map(k);for(var F of S)E.delete(F);return E})},[]),I=Io(R.table,_,j);return ko(R,I),u.useMemo(()=>({list:R,hasSearchTextWithZeroResults:N,searchText:d,searchTextExists:C,searchTextIsInSelectedValues:T,selectedKey:b,selectedValueMap:v,onSearchTextChange:A,onSelectKey:Z,onAddValues:K,onRemoveValues:U}),[N,R,K,U,A,Z,d,C,T,b,v])}function $i(t,e,n,r,i,a,o){try{var s=t[a](o),l=s.value}catch(d){return void n(d)}s.done?e(l):Promise.resolve(l).then(r,i)}function cP(t){return function(){var e=this,n=arguments;return new Promise(function(r,i){var a=t.apply(e,n);function o(l){$i(a,r,i,o,s,"next",l)}function s(l){$i(a,r,i,o,s,"throw",l)}o(void 0)})}}function dP(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),r=1;r<e;r++)n[r-1]=arguments[r];var i=u.useCallback(cP(function*(){var d;return(d=t==null?void 0:t.selectDistinct(t.findColumns(n)))!==null&&d!==void 0?d:null}),[t,...n]),{data:a,error:o,isError:s,isLoading:l}=Te(i,[]);return u.useEffect(()=>()=>{a==null||a.close()},[a]),{distinctTable:a,error:o,isError:s,isLoading:l}}function pP(t,e){var n=pe(),r=u.useMemo(()=>co(n,t),[t,n]);return u.useMemo(()=>Rn(e,r),[e,r])}function fP(t,e,n){var r=pe();return u.useMemo(()=>po(r,t,e,n),[t,n,r,e])}const hP=Object.freeze(Object.defineProperty({__proto__:null,ComboBox:F0,DEBOUNCE_MS:ks,ListView:V0,MultiSelect:Q0,Picker:Am,TableDropdown:eP,TableInput:O0,makeApiContextWrapper:r0,useBroadcastChannel:Zn,useBroadcastLoginListener:er,useCheckIfExistsValue:tP,useDebouncedViewportSearch:rP,useDebouncedViewportSelectionFilter:iP,useFilterConditionFactories:Io,useFilteredItemsWithDefaultValue:aP,useFormatter:Kn,useGetItemIndexByValue:Mm,useGetItemPosition:sP,useInitializeViewportData:Fm,useNotNullOrEmptyFilter:lP,usePickerWithSelectedValues:uP,useSearchableViewportData:jo,useSelectDistinctTable:dP,useSetPaddedViewportCallback:Nm,useShowOnlyEmptyFilter:pP,useTable:js,useTableClose:$m,useTableColumn:Is,useTableListener:pt,useTableSize:Um,useTableUtils:pe,useValueFilter:fP,useViewportData:Hn,useViewportFilter:ko,useWidgetClose:Vn},Symbol.toStringTag,{value:"Module"}));function _s(t){var{isEnabled:e,isPending:n,themeData:r}=Go();return u.useMemo(()=>e?n?null:r?[r]:[]:t==null?null:Ba(t),[e,n,r,t])}function mP(t){var{dashboardProps:e,componentName:n,component:r,supportedTypes:i,hydrate:a,dehydrate:o}=t,{id:s,layout:l,registerComponent:d}=e,p=u.useCallback(f=>{var{dragEvent:m,panelId:h=vn(),widget:g}=f,{name:b,type:x}=g,v=x!=null&&(Array.isArray(i)&&i.includes(x)||x===i);if(v){var y={localDashboardId:s,metadata:g};a!=null&&(y=a(y,s));var O={type:"react-component",component:n,props:y,title:b??void 0,id:h},{root:w}=l;Wa.openComponent({root:w,config:O,dragEvent:m})}},[n,a,s,l,i]);fo(d,r,a,o),Ka(l.eventHub,p)}function gP(t,e){var n=Nu(),r=$u(a=>Va(a,t,e)),i=u.useCallback(a=>n(Ha(t,e,a)),[t,e,n]);return[r,i]}const vP=Object.freeze(Object.defineProperty({__proto__:null,BasePanel:yr,CLOSE_DASHBOARD:Wd,CREATE_DASHBOARD:Kd,DEFAULT_DASHBOARD_ID:Vd,DH_ID_PROP:Hd,Dashboard:gr,DashboardIdContext:Gd,DashboardLayout:Yd,DashboardUtils:zd,GLPropTypes:qd,LayoutManagerContext:Xd,LayoutUtils:Wa,LazyDashboard:rd,Panel:yr,PanelErrorBoundary:Qd,PanelEvent:Jd,PanelIdContext:Zd,PanelManager:ep,PersistentStateContext:tp,PersistentStateProvider:Ga,SET_DASHBOARD_DATA:np,TabEvent:rp,assertIsDashboardPluginProps:nh,canHaveRef:Fa,default:gr,dehydrate:ip,emitCloseDashboard:ap,emitCreateDashboard:op,emitCycleToNextStack:sp,emitCycleToNextTab:lp,emitCycleToPreviousStack:up,emitCycleToPreviousTab:cp,emitPanelClose:dp,emitPanelOpen:pp,getAllDashboardsData:fp,getClosedPanelsForDashboard:hp,getDashboardData:mp,getOpenedPanelMapForDashboard:gp,getPluginDataForDashboard:Va,getPluginDataMapForDashboard:vp,hydrate:yp,isDashboardPluginProps:rh,isWrappedComponent:Na,listenForCloseDashboard:bp,listenForCreateDashboard:Pp,listenForCycleToNextStack:xp,listenForCycleToNextTab:Op,listenForCycleToPreviousStack:Sp,listenForCycleToPreviousTab:wp,listenForPanelClose:Cp,listenForPanelOpen:Ep,reducers:Tp,setDashboardData:jp,setDashboardPluginData:Ha,updateDashboardData:Ip,useAppDispatch:kp,useAppSelector:Ya,useAppStore:_p,useCloseDashboardListener:Rp,useCreateDashboardListener:Dp,useCycleToNextStackListener:Lp,useCycleToNextTabListener:Ap,useCycleToPreviousStackListener:Mp,useCycleToPreviousTabListener:Fp,useDashboardId:Np,useDashboardPanel:mP,useDashboardPluginData:gP,useDhId:$p,useLayoutManager:ih,useListener:Up,usePanelCloseListener:Bp,usePanelId:Wp,usePanelOpenListener:Ka,usePanelRegistration:fo,usePersistentState:ho},Symbol.toStringTag,{value:"Module"}));function yP(){var t=za(),e=u.useMemo(()=>qa(t),[t]);return e}const bP=Object.freeze(Object.defineProperty({__proto__:null,PersistentStateProvider:Ga,PluginType:Xa,PluginsContext:kt,WidgetView:Kp,createChainedComponent:Vp,createChainedPanelComponent:Hp,getDashboardPlugins:id,getIconForPlugin:Gp,getPluginModuleValue:Yp,getPluginsElementMap:qa,getThemeDataFromPlugins:Ba,getWidgetDashboardPlugin:zp,groupByDependencyLevel:Qa,isAuthPlugin:Ja,isDashboardPlugin:qp,isElementPlugin:Xp,isLegacyAuthPlugin:Zt,isLegacyDashboardPlugin:Qp,isLegacyPlugin:Jp,isLegacyTablePlugin:Zp,isMultiPlugin:Za,isPlugin:ef,isTablePlugin:tf,isThemePlugin:nf,isWidgetDashboardPlugin:rf,isWidgetMiddlewarePlugin:af,isWidgetPlugin:of,pluginSupportsType:sf,pluginSupportsTypeAsDashboard:lf,processLoadedModule:eo,registerPlugin:uf,useCustomThemes:_s,useDashboardPlugins:ad,usePersistentState:ho,usePlugins:za,usePluginsElementMap:yP},Symbol.toStringTag,{value:"Module"}));function PP(t){if(t==null)return!1;var e=t;return e.Component!==void 0&&typeof e.isAvailable=="function"}var Rs="io.deephaven.auth.AnonymousAuthenticationHandler",xP="io.deephaven.authentication.psk.PskAuthenticationHandler";function Ui(t,e,n){return(e=OP(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function OP(t){var e=SP(t,"string");return typeof e=="symbol"?e:e+""}function SP(t,e){if(typeof t!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var r=n.call(t,e);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}class Ds extends Error{constructor(){super(...arguments),Ui(this,"name","AuthenticationError"),Ui(this,"isAuthenticationError",!0)}}function Bi(t,e,n,r,i,a,o){try{var s=t[a](o),l=s.value}catch(d){return void n(d)}s.done?e(l):Promise.resolve(l).then(r,i)}function wP(t){return function(){var e=this,n=arguments;return new Promise(function(r,i){var a=t.apply(e,n);function o(l){Bi(a,r,i,o,s,"next",l)}function s(l){Bi(a,r,i,o,s,"throw",l)}o(void 0)})}}var Wi=Y.module("AuthPluginBase");function tr(t){var{children:e,getLoginOptions:n}=t,r=Je(),[i,a]=u.useState(),[o,s]=u.useState(!1);return u.useEffect(()=>{var l=!1;function d(){if(l)throw new to("Login canceled.")}function p(){return f.apply(this,arguments)}function f(){return f=wP(function*(){try{var m=yield n();d(),Wi.info("Logging in..."),yield r.login(m),d(),s(!0)}catch(b){if(!l){var h;Wi.error("Unable to login:",b);var g=(h=Ye(b))!==null&&h!==void 0?h:"Unable to login. Verify credentials.";a(new Ds(g)),s(!1)}}}),f.apply(this,arguments)}return p(),()=>{l=!0}},[r,n]),o?c.jsx(c.Fragment,{children:e}):c.jsx(je,{"data-testid":"auth-base-loading",isLoading:i==null,isLoaded:!1,errorMessage:Ye(i)})}var CP={canLogout:!1};function EP(t){var{children:e}=t,n=Pe(),r=u.useCallback(()=>({type:n.CoreClient.LOGIN_TYPE_ANONYMOUS}),[n]);return c.jsx(tr,{getLoginOptions:r,children:c.jsx(St.Provider,{value:CP,children:e})})}var Ls={Component:EP,isAvailable:t=>t.includes(Rs)};function Ki(t,e,n,r,i,a,o){try{var s=t[a](o),l=s.value}catch(d){return void n(d)}s.done?e(l):Promise.resolve(l).then(r,i)}function TP(t){return function(){var e=this,n=arguments;return new Promise(function(r,i){var a=t.apply(e,n);function o(l){Ki(a,r,i,o,s,"next",l)}function s(l){Ki(a,r,i,o,s,"throw",l)}o(void 0)})}}var jP=Y.module("AuthPluginParent"),IP={canLogout:!1};function kP(t){return t!=null&&typeof t.type=="string"}function _P(){return un.apply(this,arguments)}function un(){return un=TP(function*(){jP.info("Logging in by delegating to parent window...");var t=yield En(bs);if(!kP(t))throw new Error("Unexpected login options response: ".concat(t));return t}),un.apply(this,arguments)}function RP(){var t;return(t=new URLSearchParams(window.location.search).get("authProvider"))!==null&&t!==void 0?t:""}function DP(t){var{children:e}=t;return c.jsx(tr,{getLoginOptions:_P,children:c.jsx(St.Provider,{value:IP,children:e})})}var As={Component:DP,isAvailable:()=>xn()!=null&&RP()==="parent"};function Ms(t){var{children:e,errorMessage:n,isLoggingIn:r=!1,onSubmit:i}=t;return c.jsxs("form",{className:"login-form",onSubmit:a=>{a.preventDefault(),a.stopPropagation(),i==null||i(a)},children:[c.jsx("div",{className:"flex-spacer"}),c.jsxs("div",{className:"flex-wrapper",children:[c.jsx("fieldset",{disabled:r,className:"container-fluid",children:e}),c.jsx("div",{className:"form-group d-flex justify-content-end align-items-center mb-0",children:c.jsxs("button",{type:"submit",className:$("btn btn-primary",{"btn-spinner":r},{"btn-cancelable":r}),"data-testid":"btn-login",children:[r&&c.jsxs("span",{children:[c.jsx(Pt,{className:"mr-2 loading-spinner-vertical-align"}),c.jsx("span",{className:"btn-normal-content",children:"Logging in"}),c.jsx("span",{className:"btn-hover-content",children:"Cancel"})]}),!r&&"Login"]})})]}),c.jsx("div",{className:"flex-spacer",children:n!=null&&c.jsx("p",{className:"error-message mb-0",role:"alert",children:"".concat(n)})})]})}function Fs(t){var{children:e,logoPath:n="./logo.png"}=t;return c.jsxs("div",{className:"login-container",children:[c.jsx(fs,{}),c.jsxs("div",{className:"login-box",children:[c.jsx("div",{className:"logo",children:c.jsx("img",{src:n,alt:"Deephaven Data Labs"})}),e,c.jsxs("p",{className:"footer",children:["© 2016-",new Date().getFullYear()," Deephaven Data Labs LLC. Patent Pending."]})]})]})}function Vi(t,e,n,r,i,a,o){try{var s=t[a](o),l=s.value}catch(d){return void n(d)}s.done?e(l):Promise.resolve(l).then(r,i)}function Vt(t){return function(){var e=this,n=arguments;return new Promise(function(r,i){var a=t.apply(e,n);function o(l){Vi(a,r,i,o,s,"next",l)}function s(l){Vi(a,r,i,o,s,"throw",l)}o(void 0)})}}var cn="io.deephaven.authentication.psk.PskAuthenticationHandler",Ns="psk",dn="io.deephaven.web.client.auth.psk.token",Re=Y.module("AuthPluginPsk");function LP(){return new URLSearchParams(window.location.search).get(Ns)}function AP(){Re.debug2("clearWindowToken");var t=new URL(window.location.href);t.searchParams.delete(Ns),window.history.replaceState(null,"",t.href)}function Hi(){var t;return(t=qt.get(dn))!==null&&t!==void 0?t:null}function Ht(t){Re.debug2("Storing token in cookie",t),t!=null?qt.set(dn,t,{secure:!0,sameSite:"strict"}):qt.remove(dn)}function MP(t){var{children:e,logoPath:n}=t,r=Je(),i=u.useRef(null),a=u.useRef(null),[o,s]=u.useState(),[l,d]=u.useState(!1),[p,f]=u.useState(!1),[m,h]=u.useState(!1),[g,b]=u.useState(""),x=u.useCallback(function(){var P=Vt(function*(C){var _=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;Re.info("Logging in..."),h(!0);var j=null;try{if(j=r.login({type:cn,token:C}),a.current=j,yield j,Re.info("Logged in successfully"),a.current!==j)return;Ht(C),f(!0)}catch(N){if(a.current!==j)return;if(d(!0),_){var D;Re.error("Unable to login",N);var R=(D=Ye(N))!==null&&D!==void 0?D:"Unable to login: Verify credentials.";s(new Ds(R))}}h(!1)});return function(C){return P.apply(this,arguments)}}(),[r]),v=u.useCallback(()=>{a.current=null,h(!1)},[]),y=u.useCallback(Vt(function*(){Re.debug("onLogin");var P=Hi();p||m||P==null||x(P,!1)}),[p,m,x]),O=u.useCallback(()=>{Ht(null)},[]);er(y,O),u.useEffect(()=>{var P=!1;function C(){return _.apply(this,arguments)}function _(){return _=Vt(function*(){var j,D=(j=LP())!==null&&j!==void 0?j:Hi();if(AP(),D==null){d(!0);return}h(!0);try{yield r.login({type:cn,token:D}),P||(Ht(D),f(!0),h(!1))}catch{P||(d(!0),h(!1))}}),_.apply(this,arguments)}return C(),()=>{P=!0}},[r]);var w=u.useCallback(()=>{m?v():x(g)},[v,m,x,g]);return u.useEffect(function(){var C;(C=i.current)===null||C===void 0||C.focus()},[i,l]),c.jsxs(c.Fragment,{children:[p&&e,l&&c.jsx(In,{in:!p,mountOnEnter:!0,unmountOnExit:!0,children:c.jsx(Fs,{logoPath:n,children:c.jsx(Ms,{errorMessage:Ye(o),isLoggingIn:m,onSubmit:w,children:c.jsxs("div",{className:"form-group",children:[c.jsx("label",{htmlFor:"auth-psk-token-input",children:"Token"}),c.jsx("input",{id:"auth-psk-token-input",name:"token",className:"input-token form-control",type:"text",autoComplete:"username",autoCapitalize:"none",autoCorrect:"off",spellCheck:"false",ref:i,value:g,onChange:P=>{s(void 0),b(P.target.value)}})]})})})}),c.jsx(je,{"data-testid":"auth-psk-loading",isLoaded:p||l,isLoading:!p&&!l})]})}var $s={Component:MP,isAvailable:t=>t.includes(cn)};function Gi(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function Gt(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?Gi(Object(n),!0).forEach(function(r){FP(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Gi(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function FP(t,e,n){return(e=NP(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function NP(t){var e=$P(t,"string");return typeof e=="symbol"?e:e+""}function $P(t,e){if(typeof t!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var r=n.call(t,e);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}var UP=Y.module("UserUtils");function Us(t,e){return t.get("internal.webClient.appInit.".concat(e))}function Bs(t){var e,n,r,i,a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};function s(x){return Us(t,x)}function l(x,v){var y=s(x);return y==="true"?!0:y==="false"?!1:(y!==void 0&&UP.warn("Unexpected value for ".concat(x,": ").concat(y)),v)}var d=(e=s("name"))!==null&&e!==void 0?e:"",p=(n=s("operateAs"))!==null&&n!==void 0?n:d,f=(r=(i=s("groups"))===null||i===void 0?void 0:i.split(","))!==null&&r!==void 0?r:[],m=l("canCopy",!0),h=l("canDownloadCsv",!0),g=l("canUsePanels",!0),b=l("canLogout",!0);return Gt(Gt({name:d,operateAs:p,groups:f},a),{},{permissions:Gt({canUsePanels:g,canCopy:m,canDownloadCsv:h,canLogout:b},o)})}const BP=Object.freeze(Object.defineProperty({__proto__:null,AUTH_HANDLER_TYPE_ANONYMOUS:Rs,AUTH_HANDLER_TYPE_PSK:xP,AuthPluginAnonymous:Ls,AuthPluginBase:tr,AuthPluginParent:As,AuthPluginPsk:$s,Login:Fs,LoginForm:Ms,UserContext:Ta,UserOverrideContext:ja,UserPermissionsOverrideContext:St,getAppInitValue:Us,getUserFromConfig:Bs,isAuthPlugin:PP},Symbol.toStringTag,{value:"Module"}));function Le(t,e,n){return(e=WP(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function WP(t){var e=KP(t,"string");return typeof e=="symbol"?e:e+""}function KP(t,e){if(typeof t!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var r=n.call(t,e);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}class V extends mo{static get theme(){return V._theme==null&&(V._theme=no()),V._theme}static makeRandomSeries(e){for(var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:100,i=[],a=[],o=[],s=[],l=new Date("2018-06-01"),d=0;d<r;d+=1){var p=new Date(l.getFullYear(),l.getMonth(),l.getDate()+d-r);i.push("".concat(p.getFullYear(),"-").concat(p.getMonth()+1,"-").concat(p.getDate()));var f=(Math.sin(d/r*e)*r/3+Math.cos(d*.2)*r/6+Math.sin(d*.5)*r/10+V.random()*r/5+d*V.smoothing)*n;f=Math.round(f*100)/100,a.push(f),s.push(40+d*V.smoothing),o.push(Math.sin(d/r*e)*r/3+V.random()*r/10+d*V.smoothing)}return{x:i,y:a,s:o,l:s}}static makeScatter(e){return{name:"SCTR",x:e.x,y:e.y,type:"scatter",mode:"markers",hoverinfo:"skip",marker:{size:5}}}static makeArea(e){return{name:"AREA",x:e.x,y:e.s,type:"scatter",mode:"line",fill:"tozeroy",hoverinfo:"all",line:{width:3}}}static makeTrendline(e){return{name:"Trendline <br>R<sup>2</sup> = 0.91",x:e.x,y:e.l,type:"scatter",mode:"line",hoverinfo:"skip",line:{width:3,dash:"dot"}}}static makeErrorBand(e){for(var n=[],r=[],i=0;i<e.y.length;i+=1){var a=e.y[i];n[i]=Math.round((a+18)*100)/100,r[i]=Math.round((a-18)*100)/100}var o=n.concat(r.reverse());return{name:"error",x:e.x.concat(e.x.slice().reverse()),y:o,type:"scatter",mode:"line",hoverinfo:"skip",fill:"toself",line:{width:0,color:V.theme.error_band_line_color,shape:"spline"}}}static makeLine(e){return{name:"LINE",x:e.x,y:e.y,type:"scatter",mode:"line",hoverinfo:"x+y+text+name",line:{width:3}}}static makeRandomData(){var e=V.makeRandomSeries(6),n=V.makeArea(e),r=V.makeTrendline(e),i=V.makeRandomSeries(2),a=V.makeLine(i),o=V.makeErrorBand(i);return[n,r,a,o]}static makeDefaultLayout(e){var n={template:new go(e).makeDefaultTemplate(V.theme)};return n.title={text:"Chart"},n.xaxis={title:{text:"Datestamp"}},n.yaxis={title:{text:"Price"}},n}constructor(e){var{data:n=V.makeRandomData(),layout:r=V.makeDefaultLayout(e),filterFields:i=[]}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};super(e),Le(this,"data",void 0),Le(this,"filterFields",void 0),Le(this,"layout",void 0),this.data=n,this.layout=r,this.filterFields=i}getData(){return this.data}getLayout(){return this.layout}getFilterColumnMap(){for(var e=new Map,n=0;n<this.filterFields.length;n+=1){var r=this.filterFields[n],i="java.lang.String";e.set(r,{name:r,type:i})}return e}isFilterRequired(){return this.filterFields.length>0}setFilter(){this.fireUpdate(this.data)}}Le(V,"random",Math.random.bind(Math));Le(V,"smoothing",1.5);Le(V,"_theme",void 0);const VP=Object.freeze(Object.defineProperty({__proto__:null,Chart:ah,ChartModel:mo,ChartModelFactory:oh,ChartThemeContext:cf,ChartThemeProvider:ro,ChartUtils:go,DownsamplingError:Lh,FigureChartModel:sh,MockChartModel:V,Plot:df,defaultChartTheme:no,isFigureChartModel:lh,isWebGLSupported:uh,useChartTheme:pf},Symbol.toStringTag,{value:"Module"}));function Ws(t){var{children:e}=t,{activeThemes:n}=wt();return u.useEffect(function(){n!=null&&io.initTheme()},[n]),c.jsx(c.Fragment,{children:e})}var HP={$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 u,J as W,P as ml,D as c,Q as gl,S as yt,T as vl,U as yl,V as bl,W as Pl,C as vn,X as xl,G as $,Y as yn,Z as ra,a0 as Ol,a1 as ia,a2 as Sl,a3 as wl,a4 as Cl,a5 as El,a6 as hr,a7 as Tl,a8 as jl,a9 as aa,aa as Il,ab as kl,ac as _l,ad as Rl,ae as Dl,af as Ll,ag as Yt,ah as Al,ai as oa,aj as bt,ak as Qe,I as ne,al as sa,am as la,an as bn,ao as ua,ap as ca,aq as zt,ar as Ml,as as He,at as da,H as pa,au as fa,av as Fl,aw as Nl,ax as $l,ay as ha,az as Ul,aA as Bl,aB as Wl,aC as Kl,aD as Vl,aE as Hl,aF as Gl,aG as Yl,aH as zl,aI as ql,aJ as Xl,aK as Ql,aL as Jl,aM as Zl,aN as eu,aO as tu,aP as nu,aQ as ru,aR as iu,aS as au,aT as ou,aU as su,aV as lu,aW as uu,aX as ma,aY as cu,aZ as du,a_ as pu,a$ as fu,b0 as hu,b1 as mu,b2 as gu,b3 as vu,b4 as yu,b5 as bu,b6 as Pu,b7 as xu,b8 as Ou,b9 as Su,ba as wu,bb as Cu,bc as Eu,bd as Tu,be as ju,bf as Iu,bg as ku,O as _u,bh as Ru,bi as Du,bj as Lu,bk as Au,bl as Mu,bm as Fu,L as Nu,N as $u,bn as qt,bo as Uu,bp as Bu,bq as mr,br as Wu,bs as Ku,bt as Vu,bu as Hu,R as Gu,bv as Yu,bw as zu,bx as ga,by as qu,bz as Xu}from"./vendor-Dhl2bb-D.js";import{i as va,b as Pn,p as ya,r as ba,a as Y,M as Pa,c as xa,g as xn,L as je,v as Oa,d as On,e as Sn,f as Pt,h as Qu,j as Ju,k as Zu,l as ec,m as tc,n as wn,o as nc,q as rc,s as ic,t as Sa,u as xt,w as ac,T as Xt,C as oc,D as sc,x as lc,y as uc,z as cc,A as dc,B as pc,E as fc,F as hc,G as wa,N as mc,P as gc,S as vc,H as yc,I as bc,J as Pc,K as xc,W as Oc,O as Sc,Q as wc,R as Cc,U as Ec,V as Tc,X as jc,Y as Ic,Z as kc,_ as _c,$ as Rc,a0 as Dc,a1 as Lc,a2 as Ac,a3 as Mc,a4 as Fc,a5 as Nc,a6 as $c,a7 as Uc,a8 as Bc,a9 as Wc,aa as Kc,ab as Vc,ac as Cn,ad as Hc,ae as Ot,af as En,ag as Gc,ah as Ca,ai as Yc,aj as zc,ak as qc,al as Xc,am as Qc,an as Jc}from"./index-DiOPQ7Tk.js";import{C as Ea,e as Zc,a as Je,F as ed,f as td,g as nd,D as gr,h as rd,i as id,d as ad,U as St,j as Ta,k as ja,l as od,c as sd,S as ld}from"./LocalWorkspaceStorage-BuA3-rnr.js";import{A as Hx,m as Gx,n as Yx,G as zx,L as qx,o as Xx,p as Qx,q as Jx,r as Zx,s as eO,t as tO,u as nO,b as rO}from"./LocalWorkspaceStorage-BuA3-rnr.js";import{k as ud,l as cd,m as dd,n as pd,o as Ge,p as fd,q as hd,t as md,v as gd,w as wt,x as se,y as Ct,z as oe,T as Et,A as Ze,H as Tn,P as Tt,C as ve,B as Ee,D as Ia,F as dt,G as ka,r as Se,M as X,K as re,R as vr,I as Qt,J as Q,L as _a,N as Jt,O as jt,E as Ra,Q as jn,U as It,V as Da,W as vd,X as yd,c as bd,Y as Pd,Z as La,_ as Aa,S as xd,$ as Od,a0 as Sd,a1 as Ma,a2 as wd,a3 as Cd,a4 as Ed,a5 as Fa,a6 as Td,a7 as jd,a8 as Id,a9 as kd,aa as Na,ab as _d,u as Pe,ac as $a,g as Rd,ad as Dd,ae as Ld,af as Ad,ag as Ua,ah as Md,ai as Fd,aj as Nd,ak as $d,al as Ud,am as Bd,an as Ba,ao as Wa,ap as Ka,aq as Va,s as Ha,ar as yr,as as Wd,at as Kd,au as Vd,av as Hd,aw as Gd,ax as Yd,ay as zd,az as qd,aA as Xd,aB as Qd,aC as Jd,aD as Zd,aE as ep,aF as tp,aG as Ga,aH as np,aI as rp,aJ as ip,aK as ap,aL as op,aM as sp,aN as lp,aO as up,aP as cp,aQ as dp,e as pp,b as fp,aR as hp,aS as mp,aT as gp,aU as vp,aV as yp,aW as bp,aX as Pp,aY as xp,aZ as Op,a_ as Sp,a$ as wp,b0 as Cp,b1 as Ep,b2 as Tp,b3 as jp,b4 as Ip,b5 as kp,b6 as Ya,b7 as _p,b8 as Rp,a as Dp,b9 as Lp,ba as Ap,bb as Mp,bc as Fp,bd as Np,be as $p,bf as Up,bg as Bp,bh as Wp,bi as za,bj as qa,bk as Xa,bl as kt,bm as Kp,bn as Vp,bo as Hp,bp as Gp,bq as Yp,br as zp,bs as Qa,bt as Ja,bu as qp,bv as Xp,bw as Zt,bx as Qp,by as Jp,bz as Zp,bA as Za,bB as ef,bC as tf,bD as nf,bE as rf,bF as af,bG as of,bH as sf,bI as lf,bJ as eo,bK as uf,bL as Ye,bM as to,bN as no,bO as cf,bP as ro,bQ as df,bR as pf,bS as io,bT as ao,bU as oo,bV as br,bW as ff,bX as hf,bY as mf,bZ as gf,b_ as vf,b$ as yf,c0 as bf,c1 as Pf,c2 as xf,c3 as Of,c4 as Sf,c5 as wf,c6 as Cf,c7 as Ef,c8 as Tf,c9 as jf,ca as If,cb as kf,cc as _f,cd as Rf,ce as we,cf as Df,cg as Lf}from"./LogPanel-CxdDBEO3.js";import{F as In,C as Af,S as Mf,u as kn,D as Ff,B as Nf,a as $f,b as Uf,c as Bf,d as _n,e as en,I as Wf,f as Kf,T as so,g as Vf,h as Rn,i as Hf,j as Dn,k as lo,l as Gf,m as uo,n as Ln,o as co,p as po,q as Yf,r as zf,s as qf,t as Xf,v as Qf,w as Jf,x as Zf,y as eh,z as th,A as fo,E as nh,G as rh,H as ih,J as ho,K as mo,L as go,M as ah,N as oh,O as sh,P as lh,Q as uh,R as vo,U as ch,V as dh,W as yo,X as ph,Y as Pr,Z as fh,_ as hh,$ as mh,a0 as gh,a1 as vh,a2 as yh,a3 as bh,a4 as Ph,a5 as xh,a6 as Oh,a7 as Sh,a8 as wh,a9 as Ch,aa as Eh,ab as Th,ac as jh,ad as Ih,ae as kh,af as _h,ag as Rh,ah as Dh,ai as bo}from"./index-BHLrktnn.js";import{D as Lh}from"./DownsamplingError--AAvWHv_.js";import{e as ft,c as Ah,d as Mh,a as Fh,f as Nh,b as $h,g as Uh,h as Bh,i as Wh,j as Po,u as Kh,k as Vh,l as Hh,m as Gh,n as Te,o as Yh,p as zh,q as Ve,r as ht,s as xo,t as An,v as et,w as Mn,x as Fn,y as Nn,z as mt,A as Oo,B as tn,C as $n,D as Un,M as Bn,E as So,F as qh,G as nn,H as Xh,I as Qh,J as Jh,K as Zh,L as em,N as tm,O as nm,P as rm,Q as wo,R as im,S as am,T as om,U as sm,V as Co,W as lm,X as um,Y as cm,Z as dm,_ as pm,$ as fm,a0 as Eo,a1 as hm,a2 as mm,a3 as gm,a4 as vm,a5 as ym,a6 as bm,a7 as Pm,a8 as xm,a9 as Om,aa as Sm,ab as Wn,ac as wm,ad as Cm,ae as Em,af as Tm,ag as jm,ah as Im,ai as pt,aj as Kn,ak as Vn,al as km,am as _m,an as To,ao as jo,ap as pe,aq as Rm,ar as Hn,as as xr,at as Io,au as ko,av as Dm,aw as Lm,ax as Am,ay as Mm,az as Fm,aA as Nm,aB as $m,aC as Um,aD as Bm,aE as Wm,aF as Km,aG as Vm,aH as Hm,aI as Gm,aJ as Ym,aK as zm,aL as qm,aM as Xm,aN as Qm,aO as Jm,aP as Zm,aQ as eg,aR as tg,aS as ng,aT as rg,aU as ig,aV as ag,aW as og,aX as sg,aY as lg,aZ as ug,a_ as cg,a$ as _o,b0 as dg,b1 as pg,b2 as fg,b3 as hg,b4 as mg,b5 as gg,b6 as vg,b7 as yg,b8 as bg,b9 as Pg,ba as xg,bb as Og}from"./IrisGridThemeProvider-cwMdnCFU.js";import{u as _t}from"./useResizeObserver-jqNW9zvL.js";import{m as Sg,u as Ro}from"./useMergeRef-D_NUR3Rn.js";import"./helpers-BosuxZz1.js";var wg=["children","keepMounted"];function Or(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function Sr(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?Or(Object(n),!0).forEach(function(r){Cg(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Or(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function Cg(t,e,n){return(e=Eg(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function Eg(t){var e=Tg(t,"string");return typeof e=="symbol"?e:e+""}function Tg(t,e){if(typeof t!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var r=n.call(t,e);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function jg(t,e){if(t==null)return{};var n,r,i=Ig(t,e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);for(r=0;r<a.length;r++)n=a[r],e.indexOf(n)===-1&&{}.propertyIsEnumerable.call(t,n)&&(i[n]=t[n])}return i}function Ig(t,e){if(t==null)return{};var n={};for(var r in t)if({}.hasOwnProperty.call(t,r)){if(e.indexOf(r)!==-1)continue;n[r]=t[r]}return n}function kg(t){var{children:e,keepMounted:n=!1}=t,r=jg(t,wg),i=n&&typeof e!="function",a=u.useRef(new Map),o=u.useMemo(()=>{var l=[],d=new Map;return i?(W.Children.forEach(e,p=>{if(!(p==null||p.key==null)){if(typeof p.props.children=="function")throw new Error("DHCTabPanels cannot use keepMounted with an ItemRenderer function as its children");var f=a.current.get(p.key);f==null&&(f=ml({attributes:{style:"display: contents"}})),d.set(p.key,f),l.push(c.jsx(gl,{node:f,children:p.props.children},p.key))}}),a.current=d,l):(a.current=d,l)},[e,i]),s=u.useMemo(()=>{var l=[];return i&&W.Children.forEach(e,d=>{if(d==null||d.key==null){l.push(d);return}var p=a.current.get(d.key);if(p==null){l.push(d);return}l.push(c.jsx(yt,{children:c.jsx(vl,{node:p})},d.key))}),l},[e,i]);return c.jsxs(c.Fragment,{children:[i&&o,c.jsx(yl,Sr(Sr({},r),{},{children:i?s:e}))]})}function wr(t,e,n,r,i,a,o){try{var s=t[a](o),l=s.value}catch(d){return void n(d)}s.done?e(l):Promise.resolve(l).then(r,i)}function _g(t){return function(){var e=this,n=arguments;return new Promise(function(r,i){var a=t.apply(e,n);function o(l){wr(a,r,i,o,s,"next",l)}function s(l){wr(a,r,i,o,s,"throw",l)}o(void 0)})}}var Rg=[["api"],["client"],["dashboardData","*","connection"],["dashboardData","*","sessionWrapper"],["dashboardData","*","openedMap"],["layoutStorage"],["storage"]],Do=10;function Dg(t){var e=new Map;return function(r,i){var a,o=[...(a=e.get(this))!==null&&a!==void 0?a:[],r];if(i===Object(i)&&e.set(i,[...o]),o.shift(),!Lg(o,t))return i instanceof Map?Array.from(i.entries()):i}}function Lg(t,e){for(var n=function(o){if(t.length===e[o].length&&t.every((s,l)=>e[o][l]==="*"||s===e[o][l]))return{v:!0}},r,i=0;i<e.length;i+=1)if(r=n(i),r)return r.v;return!1}function Ag(t){var e,n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:Do,i=Pl({maximumDepth:r});return(e=i(t,Dg(n),2))!==null&&e!==void 0?e:""}function Mg(t){return JSON.stringify(t,null,2)}function Fg(t){var e=t.getFullYear(),n=String(t.getMonth()+1).padStart(2,"0"),r=String(t.getDate()).padStart(2,"0"),i=String(t.getHours()).padStart(2,"0"),a=String(t.getMinutes()).padStart(2,"0"),o=String(t.getSeconds()).padStart(2,"0");return"".concat(e,"-").concat(n,"-").concat(r,"-").concat(i).concat(a).concat(o)}function Ng(t,e,n){return rn.apply(this,arguments)}function rn(){return rn=_g(function*(t,e,n){var r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:Rg,i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:"".concat(Fg(new Date),"_support_logs"),a=arguments.length>5&&arguments[5]!==void 0?arguments[5]:Do,o=new bl,s=o.folder(i);s.file("console.txt",t.getFormattedHistory()),e!=null&&s.file("metadata.json",Mg(e)),n!=null&&s.file("redux.json",Ag(n,r,a));var l=yield o.generateAsync({type:"blob"}),d=document.createElement("a");d.href=URL.createObjectURL(l),d.download="".concat(i,".zip"),d.click()}),rn.apply(this,arguments)}function $g(t,e){return t===0?0:e==="all"||t===e.size?"all":e.size}function Lo(t,e){return t===e?!0:t==="all"||e==="all"||t.size!==e.size?!1:[...t.keys()].every(n=>e.has(n))}function Ao(t,e){return t.isInverted===e.isInverted&&Lo(t.selection,e.selection)}function Mo(t,e,n){if(t==="all")return"all";var r=[...t.keys()];return new Set(r.map(i=>{var a=e(i);if(a===void 0)throw new Error("Could not find item with key ".concat(i));return n(a)}))}function Fo(t,e,n){var r=t==="all"||t.size>e/2,i=t;return r&&(i=t==="all"?new Set:new Set([...ud(0,e-1)].map(n).filter(a=>!t.has(a)))),{selection:i,isInverted:r}}function Ug(t,e){return u.useCallback(function(){var n=t(...arguments);return e(),n},[e,t])}function Bg(t){return u.useCallback(e=>{t(e.target.value)},[t])}function Gn(t,e){return u.useCallback(n=>{typeof t=="function"?t(e(n)):t.current=e(n)},[e,t])}function No(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:va,[e,n]=u.useState(0),[r,i]=u.useState(0),[a,o]=u.useState(0),[s,l]=u.useState(0),d=u.useMemo(()=>new DOMRect(e,r,a,s),[s,a,e,r]),[p,f]=u.useState(null),m=Gn(f,t),h=u.useCallback(g=>{var b,[x]=g,v=(b=x==null?void 0:x.contentRect)!==null&&b!==void 0?b:{x:0,y:0,width:0,height:0};n(v.x),i(v.y),o(v.width),l(v.height)},[]);return _t(p,h),{ref:m,contentRect:d}}function Wg(t){var[e,n]=u.useState(!0);return u.useEffect(()=>{var r=setTimeout(()=>{n(!1)},t);return()=>{clearTimeout(r)}},[t]),e}function Kg(t){var[e,n]=u.useState(t);return u.useEffect(()=>{n(t)},[t]),[e,n]}function Vg(t,e,n,r){var i=u.useRef(0);u.useEffect(()=>{i.current>=n||r&&(i.current+=1,t())},[n,r,...e])}function $o(t,e){var n=u.useRef(t),r=e(n.current,t)?n.current:t;return n.current=r,r}function Hg(t){t.preventDefault()}function Uo(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1,e=u.useMemo(()=>"useSubmitButtonRef-".concat(vn()),[]),n=u.useCallback(a=>{var o;a==null||(o=a.UNSAFE_getDOMNode())===null||o===void 0||o.setAttribute("form",e)},[e]),r=u.useMemo(()=>({id:e,onSubmit:t?void 0:Hg}),[e,t]),i=u.useMemo(()=>({form:e,ref:n}),[e,n]);return{formProps:r,submitButtonProps:i}}function Bo(t,e,n){var{getItem:r,selectedKeys:i,items:a}=t;return u.useMemo(()=>{var{selection:o,isInverted:s}=Fo(i,a.length,n);return{selection:Mo(o,r,e),isInverted:s}},[i,a.length,n,r,e])}function Wo(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:va,n=u.useRef();return u.useEffect(()=>()=>{var r;return(r=n.current)===null||r===void 0?void 0:r.call(n)},[]),u.useCallback(r=>{var i;(i=n.current)===null||i===void 0||i.call(n);var a=e(r);a&&(a.addEventListener("scroll",t),n.current=()=>{a.removeEventListener("scroll",t),n.current=void 0})},[e,t])}function Cr(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function Er(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?Cr(Object(n),!0).forEach(function(r){Gg(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Cr(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function Gg(t,e,n){return(e=Yg(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function Yg(t){var e=zg(t,"string");return typeof e=="symbol"?e:e+""}function zg(t,e){if(typeof t!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var r=n.call(t,e);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function qg(t,e,n,r){var i=arguments.length===4;return u.useCallback(a=>{var o=i?a??r:a;n(Er(Er({},t),{},{[e]:o}))},[n,t,e,i,r])}function tt(t,e){var[n,r]=u.useState(!0),[i,a]=u.useState(t),[o,s]=u.useState(t),[l,d]=u.useState(e);return(t!==o||e!==l)&&(r(!0),s(t),d(e)),u.useEffect(()=>{var p=!1,f=setTimeout(()=>{p||(r(!1),a(t))},e);return()=>{p=!0,clearTimeout(f)}},[t,e]),{isDebouncing:n,value:i}}function Ko(t,e){return u.useCallback(n=>{if(n!=null){var r=e==null?[n]:n.querySelectorAll(e);r.forEach(i=>{Object.entries(t).forEach(a=>{var[o,s]=a;i.setAttribute(o,s)})})}},[t,e])}var Vo={spellCheck:!1};function Xg(t){var e=Ko(Vo,t);return Gn(e,ft)}function Qg(t,e,n){var r=u.useMemo(()=>typeof t=="string"?[t]:t,[t]);u.useEffect(()=>(r.forEach(i=>window.addEventListener(i,e,n)),()=>r.forEach(i=>window.removeEventListener(i,e,n))),[r,e,n])}const Jg=Object.freeze(Object.defineProperty({__proto__:null,SPELLCHECK_FALSE_ATTRIBUTE:Vo,createValidationProps:Ah,defaultGetKey:Mh,extractSpectrumHTMLElement:ft,extractSpectrumLastChildHTMLElement:Fh,findSpectrumComboBoxScrollArea:Nh,findSpectrumPickerScrollArea:$h,findSpectrumPopoverScrollArea:Uh,getPositionOfSelectedItem:Bh,getSelectedItemCountOrAll:$g,identityExtractHTMLElement:Wh,isElementOfType:Po,isSelectionEqual:Lo,isSelectionMaybeInvertedEqual:Ao,mapSelection:Mo,mergeRefs:Sg,optimizeSelection:Fo,useAsyncInterval:cd,useCallbackWithAction:Ug,useChangeEventValueCallback:Bg,useCheckOverflow:Kh,useContentRect:No,useContextOrThrow:dd,useCopyToClipboard:pd,useDebouncedCallback:Ge,useDebouncedValue:tt,useDelay:Wg,useDependentState:Kg,useEffectNTimesWhen:Vg,useFormWithDetachedSubmitButton:Uo,useForwardedRef:fd,useIsEqualMemo:$o,useIsMountedRef:hd,useMappedRef:Gn,useMappedSelection:Bo,useMergeRef:Ro,useOnChange:Vh,useOnScrollOffsetChangeCallback:Hh,useOnScrollRef:Wo,usePopoverOnScrollRef:Gh,usePrevious:md,usePromiseFactory:Te,usePropChangeCallback:qg,useResizeObserver:_t,useSetAttributesCallback:Ko,useSpectrumDisableSpellcheckRef:Xg,useThrottledCallback:gd,useUndoRedo:Yh,useWindowListener:Qg,useWindowedListData:zh},Symbol.toStringTag,{value:"Module"}));var Zg=["aria-label","aria-labelledby","aria-describedby","aria-details","marginX","marginY","width","height","minWidth","minHeight","maxWidth","maxHeight","flex","flexGrow","flexShrink","flexBasis","justifySelf","alignSelf","order","gridArea","gridColumn","gridRow","gridColumnStart","gridColumnEnd","gridRowStart","gridRowEnd","position","zIndex","top","bottom","start","end","left","right","isHidden"];function ev(t,e){if(t==null)return{};var n,r,i=tv(t,e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);for(r=0;r<a.length;r++)n=a[r],e.indexOf(n)===-1&&{}.propertyIsEnumerable.call(t,n)&&(i[n]=t[n])}return i}function tv(t,e){if(t==null)return{};var n={};for(var r in t)if({}.hasOwnProperty.call(t,r)){if(e.indexOf(r)!==-1)continue;n[r]=t[r]}return n}function Ho(t){var{"aria-label":e,"aria-labelledby":n,"aria-describedby":r,"aria-details":i,marginX:a,marginY:o,width:s,height:l,minWidth:d,minHeight:p,maxWidth:f,maxHeight:m,flex:h,flexGrow:g,flexShrink:b,flexBasis:x,justifySelf:v,alignSelf:y,order:O,gridArea:w,gridColumn:P,gridRow:C,gridColumnStart:_,gridColumnEnd:j,gridRowStart:D,gridRowEnd:R,position:N,zIndex:T,top:L,bottom:A,start:B,end:Z,left:K,right:U,isHidden:I}=t,S=ev(t,Zg);return{ariaLabelProps:{"aria-label":e,"aria-labelledby":n,"aria-describedby":r,"aria-details":i},styleProps:{marginX:a,marginY:o,width:s,height:l,minWidth:d,minHeight:p,maxWidth:f,maxHeight:m,flex:h,flexGrow:g,flexShrink:b,flexBasis:x,justifySelf:v,alignSelf:y,order:O,gridArea:w,gridColumn:P,gridRow:C,gridColumnStart:_,gridColumnEnd:j,gridRowStart:D,gridRowEnd:R,position:N,zIndex:T,top:L,bottom:A,start:B,end:Z,left:K,right:U,isHidden:I},componentProps:S}}function Yn(t){var{normalizedItems:e,defaultSelectedKeys:n,disabledKeys:r,selectedKeys:i,onChange:a}=t,o=u.useMemo(()=>Ve(i),[i]),s=u.useMemo(()=>Ve(n),[n]),l=u.useMemo(()=>Ve(r),[r]),d=u.useCallback(p=>{if(a!=null){if(p==="all"){a("all");return}var f=new Set,m=new Set;e.forEach(h=>{var g=String(ht(h));p.has(g)&&(f.add(ht(h)),m.add(g))}),p.forEach(h=>{m.has(String(h))||f.add(h)}),a(f)}},[e,a]);return{selectedStringKeys:o,defaultSelectedStringKeys:s,disabledStringKeys:l,onStringSelectionChange:d}}function nv(){var{selectedThemeKey:t,setSelectedThemeKey:e,themes:n}=wt(),r=u.useCallback(i=>{i!=null&&e("".concat(i))},[e]);return c.jsx(xl,{label:"Pick a color scheme",items:n,selectedKey:t,onSelectionChange:r,children:i=>c.jsx(yt,{children:i.name},i.themeKey)})}function rv(t){var{className:e,style:n}=t;return c.jsx("div",{className:$("dh-logo",e),style:n})}var Tr=Y.module("useExternalTheme");function Go(){var[t,e]=u.useState(()=>{var r=Pn();return{isEnabled:r,isPending:r}}),n=u.useCallback(r=>{var i=ya(r);e({isEnabled:!0,isPending:!1,themeData:i})},[]);return u.useEffect(()=>{if(!t.isEnabled)return;Tr.debug("Requesting external theme data");function r(i){var a=xn();i.source!==window&&i.source!==a||i.data.message===Pa&&xa(i.data.payload)&&n(i.data.payload)}return window.addEventListener("message",r),ba().then(n).catch(i=>{Tr.error(i),e({isEnabled:!0,isPending:!1})}),()=>{window.removeEventListener("message",r)}},[n,t.isEnabled]),t}var Rt=u.createContext(!1);Rt.displayName="FontsLoadedContext";function Yo(t){var{fontClassNames:e=["fira-sans-regular","fira-sans-semibold","fira-mono"],children:n}=t,[r,i]=u.useState(!1);return u.useEffect(function(){document.fonts.ready.then(()=>{i(!0)})},[]),c.jsxs(c.Fragment,{children:[c.jsx(Rt.Provider,{value:r,children:n}),c.jsx("div",{id:"preload-fonts",style:{visibility:"hidden",position:"absolute",top:-1e4},children:e.map(a=>c.jsx("p",{className:a,children:"preload"},a))})]})}function zo(t){var{children:e}=t,n=u.useContext(Rt);return n?c.jsx(c.Fragment,{children:e}):c.jsx(je,{"data-testid":"fonts-loaded-loading"})}var iv=["UNSAFE_className"],av=["forceRerenderKey","ref"];function jr(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function Ir(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?jr(Object(n),!0).forEach(function(r){ov(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):jr(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function ov(t,e,n){return(e=sv(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function sv(t){var e=lv(t,"string");return typeof e=="symbol"?e:e+""}function lv(t,e){if(typeof t!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var r=n.call(t,e);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function kr(t,e){if(t==null)return{};var n,r,i=uv(t,e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);for(r=0;r<a.length;r++)n=a[r],e.indexOf(n)===-1&&{}.propertyIsEnumerable.call(t,n)&&(i[n]=t[n])}return i}function uv(t,e){if(t==null)return{};var n={};for(var r in t)if({}.hasOwnProperty.call(t,r)){if(e.indexOf(r)!==-1)continue;n[r]=t[r]}return n}function qo(t){var{UNSAFE_className:e}=t,n=kr(t,iv),r=xo(n),{forceRerenderKey:i,ref:a}=r,o=kr(r,av);return u.createElement(yn,Ir(Ir({},o),{},{key:i,ref:a,UNSAFE_className:$("dh-combobox","dh-combobox-normalized",e)}))}var cv=["onScroll"];function _r(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function at(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?_r(Object(n),!0).forEach(function(r){dv(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):_r(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function dv(t,e,n){return(e=pv(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function pv(t){var e=fv(t,"string");return typeof e=="symbol"?e:e+""}function fv(t,e){if(typeof t!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var r=n.call(t,e);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function hv(t,e){if(t==null)return{};var n,r,i=mv(t,e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);for(r=0;r<a.length;r++)n=a[r],e.indexOf(n)===-1&&{}.propertyIsEnumerable.call(t,n)&&(i[n]=t[n])}return i}function mv(t,e){if(t==null)return{};var n={};for(var r in t)if({}.hasOwnProperty.call(t,r)){if(e.indexOf(r)!==-1)continue;n[r]=t[r]}return n}function zn(t){var e,n,{ariaLabelProps:r,componentProps:i,styleProps:a}=Ho(t),{onScroll:o=se}=i,s=hv(i,cv),{scale:l}=An(),d=Wo(o,ft),{ref:p,contentRect:f}=No(ft);return c.jsx(ra,at(at({direction:"column",ref:p},a),{},{minHeight:(e=a.minHeight)!==null&&e!==void 0?e:1,UNSAFE_className:$("dh-list-view-wrapper","dh-list-view-wrapper-density-".concat((n=s.density)!==null&&n!==void 0?n:"regular"),"dh-list-view-wrapper-scale-".concat(l),a.UNSAFE_className),children:f.height===0?null:c.jsx(Ol,at(at({ref:d},r),s))}))}var gv=["children","tooltip","selectedKeys","defaultSelectedKeys","disabledKeys","UNSAFE_className","onChange","onScroll","onSelectionChange"];function Rr(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function Dr(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?Rr(Object(n),!0).forEach(function(r){vv(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Rr(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function vv(t,e,n){return(e=yv(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function yv(t){var e=bv(t,"string");return typeof e=="symbol"?e:e+""}function bv(t,e){if(typeof t!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var r=n.call(t,e);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function Pv(t,e){if(t==null)return{};var n,r,i=xv(t,e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);for(r=0;r<a.length;r++)n=a[r],e.indexOf(n)===-1&&{}.propertyIsEnumerable.call(t,n)&&(i[n]=t[n])}return i}function xv(t,e){if(t==null)return{};var n={};for(var r in t)if({}.hasOwnProperty.call(t,r)){if(e.indexOf(r)!==-1)continue;n[r]=t[r]}return n}function Ov(t){var{children:e,tooltip:n=!0,selectedKeys:r,defaultSelectedKeys:i,disabledKeys:a,UNSAFE_className:o,onChange:s,onScroll:l=se,onSelectionChange:d}=t,p=Pv(t,gv),f=u.useMemo(()=>et(n,"bottom"),[n]),m=u.useMemo(()=>Mn(e,f),[e,f]);return c.jsx(zn,Dr(Dr({},p),{},{UNSAFE_className:$("dh-list-view",o),selectedKeys:r,defaultSelectedKeys:i,disabledKeys:a,onScroll:l,onSelectionChange:s??d,children:m}))}var Sv=["normalizedItems","tooltip","selectedKeys","defaultSelectedKeys","disabledKeys","showItemIcons","actions","UNSAFE_className","onChange","onSelectionChange"];function Lr(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function Ar(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?Lr(Object(n),!0).forEach(function(r){wv(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Lr(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function wv(t,e,n){return(e=Cv(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function Cv(t){var e=Ev(t,"string");return typeof e=="symbol"?e:e+""}function Ev(t,e){if(typeof t!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var r=n.call(t,e);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function Tv(t,e){if(t==null)return{};var n,r,i=jv(t,e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);for(r=0;r<a.length;r++)n=a[r],e.indexOf(n)===-1&&{}.propertyIsEnumerable.call(t,n)&&(i[n]=t[n])}return i}function jv(t,e){if(t==null)return{};var n={};for(var r in t)if({}.hasOwnProperty.call(t,r)){if(e.indexOf(r)!==-1)continue;n[r]=t[r]}return n}function Xo(t){var{normalizedItems:e,tooltip:n=!0,selectedKeys:r,defaultSelectedKeys:i,disabledKeys:a,showItemIcons:o,actions:s,UNSAFE_className:l,onChange:d,onSelectionChange:p}=t,f=Tv(t,Sv),m=u.useMemo(()=>et(n,"bottom"),[n]),h=Fn({itemIconSlot:"illustration",showItemDescriptions:!1,showItemIcons:o,tooltipOptions:m,actions:s}),g="".concat(o,"-").concat(m==null?void 0:m.placement),{selectedStringKeys:b,defaultSelectedStringKeys:x,disabledStringKeys:v,onStringSelectionChange:y}=Yn({normalizedItems:e,selectedKeys:r,defaultSelectedKeys:i,disabledKeys:a,onChange:d??p});return u.createElement(zn,Ar(Ar({},f),{},{UNSAFE_className:$("dh-list-view-normalized",l),key:g,items:e,selectedKeys:b,defaultSelectedKeys:x,disabledKeys:v,onSelectionChange:y}),h)}function Mr(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function Fr(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?Mr(Object(n),!0).forEach(function(r){Iv(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Mr(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function Iv(t,e,n){return(e=kv(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function kv(t){var e=_v(t,"string");return typeof e=="symbol"?e:e+""}function _v(t,e){if(typeof t!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var r=n.call(t,e);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function qn(t){return t.replace(/^\.\$/,"")}function Nr(t){var e;if(t.key==null)return null;var n=qn(String(t.key)),r=(e=Oo(t))!==null&&e!==void 0?e:typeof t.props.children=="string"?t.props.children:n;return{kind:"item",key:n,label:r}}function Xn(t){return t.kind==="section"}function Rv(t){var e=[];return t.forEach(n=>{if(Nn(n)){var r=n,i=r.key!=null?qn(String(r.key)):String(e.length),a=[];Ct(r.props.children).forEach(s=>{if(mt(s)){var l=Nr(s);l!=null&&a.push(l)}}),e.push({kind:"section",key:i,title:r.props.title,items:a});return}if(mt(n)){var o=Nr(n);o!=null&&e.push(o)}}),e}function Qo(t){return t.flatMap(e=>Xn(e)?e.items:[e])}function Dv(t,e,n){var r=[];return t.forEach(i=>{if(Xn(i)){var a=i.items.filter(o=>n(o.label,e));a.length>0&&r.push(Fr(Fr({},i),{},{items:a}))}else n(i.label,e)&&r.push(i)}),r}function Lv(t){var e=new Set;return t.forEach(n=>{Xn(n)?n.items.forEach(r=>e.add(r.key)):e.add(n.key)}),e}function Jo(t,e){var n=[];return t.forEach(r=>{if(Nn(r)){var i=r,a=Jo(Ct(i.props.children).filter(s=>s!=null),e);a.length>0&&n.push(u.cloneElement(i,{children:a}));return}if(mt(r)){var o=r;o.key!=null&&e.has(qn(String(o.key)))&&n.push(r)}}),n}function $r(t,e){return t==null?new Set:t==="all"?new Set(e):new Set([...t].map(String))}function Av(t){var{selectedKeys:e,defaultSelectedKeys:n,disabledKeys:r,onChange:i,onSelectionChange:a,allKeys:o}=t,s=u.useMemo(()=>e!==void 0?$r(e,o):void 0,[e,o]),l=u.useCallback(v=>{var y=i??a;y==null||y(v)},[i,a]),d=u.useRef(void 0);d.current===void 0&&(d.current=$r(n,o));var[p,f]=ia(s,d.current,l),m=u.useRef(p);m.current=p;var h=u.useMemo(()=>Ve(r),[r]),g=u.useCallback(v=>{var y=new Set(m.current);y.has(v)?y.delete(v):y.add(v),f(y)},[f]),b=u.useCallback((v,y)=>{if(v==="all"){f(new Set(o));return}var O=new Set(y.map(P=>P.key)),w=new Set([...m.current].filter(P=>!O.has(P)));v.forEach(P=>w.add(String(P))),f(w)},[o,f]),x=u.useMemo(()=>[...p],[p]);return{selectedKeys:p,selectedKeyArray:x,listBoxDisabledKeys:h,toggleKey:g,applyListBoxSelection:b}}function Mv(t){var{allEntries:e,wrappedChildren:n,inputValue:r,defaultInputValue:i,onInputChange:a,onSearchTextChange:o}=t,[s,l]=ia(r,i,a),d=u.useCallback(b=>{l(b),o==null||o(b)},[l,o]),{contains:p}=Sl({sensitivity:"base"}),f=o!=null||s==="",m=u.useMemo(()=>f?e:Dv(e,s,p),[e,s,p,f]),h=u.useMemo(()=>Qo(m),[m]),g=u.useMemo(()=>{if(f)return n;var b=Lv(m);return Jo(n,b)},[n,m,f]);return{searchText:s,setSearchText:d,filteredItems:h,filteredJsxChildren:g}}function Fv(t){return t.replace(/\s+/g,"")}function Nv(t){var{filteredItems:e,allItems:n,shouldFocusWrap:r,overlayState:i,openOverlay:a,closeOverlay:o,isReadOnly:s,isDisabled:l,searchText:d,setSearchText:p,selectedKeys:f,toggleKey:m,allowsCustomValue:h,menuTrigger:g,onKeyDown:b,listBoxContainerRef:x,inputRef:v}=t,[y,O]=u.useState(null),w=u.useCallback(_=>{var j=e.length;j!==0&&O(D=>{var R=D==null?-1:e.findIndex(T=>T.key===D),N;return _==="down"?R===-1?N=0:r?N=(R+1)%j:N=Math.min(R+1,j-1):R===-1?N=j-1:r?N=(R-1+j)%j:N=Math.max(R-1,0),e[N].key})},[e,r]),P=u.useCallback(_=>{if(!l){switch(_.key){case"ArrowDown":_.preventDefault(),i.isOpen?w("down"):a("manual");break;case"ArrowUp":_.preventDefault(),i.isOpen&&w("up");break;case"Enter":{if(!i.isOpen){_.preventDefault(),a("manual");break}var j=y!=null&&e.some(L=>L.key===y);if(!s&&j)_.preventDefault(),m(y);else if(!s&&h&&d.trim()!==""){_.preventDefault();var D=d.trim(),R=n.find(L=>L.label.toLowerCase()===D.toLowerCase());m(R!=null?R.key:D),p("")}else p(""),o();break}case"Escape":i.isOpen&&(_.preventDefault(),o());break;case"Tab":i.isOpen&&o();break;case"Backspace":if(d===""&&!s&&f.size>0){var N=[...f],T=N[N.length-1];T!=null&&m(T)}break}b==null||b(_)}},[l,i,a,o,w,s,y,e,n,h,m,d,p,f,b]),C=u.useRef(!1);return u.useEffect(()=>{C.current&&!i.isOpen&&(h||p(""),O(null)),C.current=i.isOpen},[i.isOpen,p,h]),u.useEffect(()=>{g!=="manual"&&d!==""&&!i.isOpen&&!l&&a("input")},[d]),u.useEffect(()=>{var _=x.current;if(_==null){var j;(j=v.current)===null||j===void 0||j.removeAttribute("aria-activedescendant");return}var D=_.querySelectorAll('[role="option"]'),R=y!=null?"-option-".concat(Fv(y)):null,N;D.forEach(L=>{var A=R!=null&&L.id.endsWith(R);A?(L.setAttribute("data-dh-focused","true"),L.scrollIntoView({block:"nearest"}),N=L.id):L.removeAttribute("data-dh-focused")});var T=v.current;T!=null&&(N!=null?T.setAttribute("aria-activedescendant",N):T.removeAttribute("aria-activedescendant"))},[y,e,v,x]),{handleInputKeyDown:P}}var $v=500;function Uv(t){var{loadingState:e,searchText:n,isOpen:r,menuTrigger:i}=t,[a,o]=u.useState(!1),s=u.useRef(null),l=e==="loading"||e==="filtering",d=u.useRef(n);return u.useEffect(()=>{if(l&&!a){var p=n!==d.current;s.current!==null&&p&&(clearTimeout(s.current),s.current=null),s.current===null&&(s.current=setTimeout(()=>{o(!0)},$v))}else l||(o(!1),s.current!=null&&(clearTimeout(s.current),s.current=null));d.current=n},[l,a,n]),u.useEffect(()=>()=>{s.current!=null&&(clearTimeout(s.current),s.current=null)},[]),a&&(r||i==="manual"||e==="loading")}function Bv(t){var{containerRef:e,isOpen:n,onScroll:r}=t,[i,a]=u.useState(null),o=u.useRef(r);o.current=r,u.useEffect(()=>{if(!n){a(null);return}var s=window.requestAnimationFrame(()=>{var l=e.current;if(l!=null){var d=l.querySelector('[role="listbox"]');a(d??l)}});return()=>{window.cancelAnimationFrame(s)}},[n,e]),u.useEffect(()=>{if(i!=null){var s=l=>{o.current(l)};return i.addEventListener("scroll",s),()=>{i.removeEventListener("scroll",s)}}},[i])}function Wv(t){var{tagKey:e,label:n,isDisabled:r,isReadOnly:i,onRemove:a}=t;return c.jsxs("span",{className:"dh-multi-select-tag",children:[c.jsx("span",{className:"dh-multi-select-tag-label",children:n}),!r&&!i&&c.jsx("button",{type:"button",className:"dh-multi-select-tag-remove",tabIndex:-1,"aria-label":"Remove ".concat(n),onPointerDown:o=>o.preventDefault(),onClick:()=>a(e),children:c.jsx(wl,{})})]})}function Kv(t){var{listBoxRef:e,listBoxId:n,loadingState:r,children:i,selectedKeys:a,disabledKeys:o,onSelectionChange:s,ariaLabel:l,emptyMessage:d}=t;return d!=null?c.jsx("div",{className:"dh-multi-select-empty",children:d}):c.jsx(Cl,{ref:e,id:n,selectionMode:"multiple",selectedKeys:a,onSelectionChange:s,disabledKeys:o,"aria-label":l,isLoading:r==="loadingMore",UNSAFE_style:{maxHeight:"inherit"},children:i})}var Vv=["children","tooltip","selectedKeys","defaultSelectedKeys","disabledKeys","onChange","onSelectionChange","onOpenChange","onScroll","label","description","errorMessage","isRequired","isDisabled","isReadOnly","validationState","isQuiet","labelPosition","labelAlign","necessityIndicator","contextualHelp","inputValue","defaultInputValue","onInputChange","shouldFocusWrap","loadingState","menuTrigger","align","direction","shouldFlip","menuWidth","allowsCustomValue","formValue","validationBehavior","autoFocus","name","id","isHidden","onFocus","onBlur","onFocusChange","onKeyDown","onKeyUp","onSearchTextChange","selectedItemLabels","UNSAFE_className","aria-label","aria-labelledby","aria-describedby","aria-details"];function Ur(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function Br(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?Ur(Object(n),!0).forEach(function(r){Hv(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Ur(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function Hv(t,e,n){return(e=Gv(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function Gv(t){var e=Yv(t,"string");return typeof e=="symbol"?e:e+""}function Yv(t,e){if(typeof t!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var r=n.call(t,e);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function zv(t,e){if(t==null)return{};var n,r,i=qv(t,e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);for(r=0;r<a.length;r++)n=a[r],e.indexOf(n)===-1&&{}.propertyIsEnumerable.call(t,n)&&(i[n]=t[n])}return i}function qv(t,e){if(t==null)return{};var n={};for(var r in t)if({}.hasOwnProperty.call(t,r)){if(e.indexOf(r)!==-1)continue;n[r]=t[r]}return n}function Xv(t){if(t!=null)return typeof t=="number"?"".concat(t,"px"):/^(size|static-size)-/.test(t)?"var(--spectrum-global-dimension-".concat(t,")"):t}function Qv(t,e){var n,r,i,{children:a,tooltip:o=!0,selectedKeys:s,defaultSelectedKeys:l,disabledKeys:d,onChange:p,onSelectionChange:f,onOpenChange:m,onScroll:h=se,label:g,description:b,errorMessage:x,isRequired:v=!1,isDisabled:y=!1,isReadOnly:O=!1,validationState:w,isQuiet:P=!1,labelPosition:C="top",labelAlign:_,necessityIndicator:j,contextualHelp:D,inputValue:R,defaultInputValue:N="",onInputChange:T,shouldFocusWrap:L=!1,loadingState:A,menuTrigger:B="input",align:Z="start",direction:K="bottom",shouldFlip:U=!0,menuWidth:I,allowsCustomValue:S=!1,formValue:k="key",validationBehavior:E="aria",autoFocus:F=!1,name:H,id:le,isHidden:J=!1,onFocus:z,onBlur:ee,onFocusChange:te,onKeyDown:Vs,onKeyUp:Hs,onSearchTextChange:Gs,selectedItemLabels:nt,UNSAFE_className:Ys,"aria-label":zs,"aria-labelledby":qs,"aria-describedby":Xs,"aria-details":Qs}=t,Js=zv(t,Vv),At=u.useRef(void 0),Zs=u.useCallback(M=>{m==null||m(M,At.current)},[m]),G=El({onOpenChange:Zs}),xe=u.useCallback(M=>{At.current=M,G.open()},[G]),Ie=u.useCallback(()=>{At.current=void 0,G.close()},[G]),ir=u.useId(),el="".concat(K," ").concat(Z),fe=u.useRef(null),Me=u.useRef(null),ar=u.useRef(null),Fe=hr(ar),or=u.useRef(null),sr=hr(or),rt=u.useRef(!1),tl=Ro(fe,e),lr=u.useMemo(()=>et(o),[o]),Mt=u.useMemo(()=>Ct(Mn(a,lr)),[a,lr]),Ft=u.useMemo(()=>Rv(Mt),[Mt]),Ne=u.useMemo(()=>Qo(Ft),[Ft]),nl=u.useMemo(()=>Ne.map(M=>M.key),[Ne]),rl=u.useRef(new Map),ur=u.useMemo(()=>{var M=rl.current;return Ne.forEach(q=>M.set(q.key,q.label)),new Map(M)},[Ne]),cr=u.useCallback(M=>{var q,Oe;return(q=(Oe=ur.get(M))!==null&&Oe!==void 0?Oe:nt==null?void 0:nt.get(M))!==null&&q!==void 0?q:M},[ur,nt]),{searchText:Nt,setSearchText:dr,filteredItems:$e,filteredJsxChildren:il}=Mv({allEntries:Ft,wrappedChildren:Mt,inputValue:R,defaultInputValue:N,onInputChange:T,onSearchTextChange:Gs}),al=u.useMemo(()=>{if(!($e.length>0)){if(A==="loading")return"Loading...";if(A!=="loadingMore")return"No results"}},[$e.length,A]),{selectedKeys:pr,selectedKeyArray:$t,listBoxDisabledKeys:ol,toggleKey:Ut,applyListBoxSelection:fr}=Av({selectedKeys:s,defaultSelectedKeys:l,disabledKeys:d,onChange:p,onSelectionChange:f,allKeys:nl}),{handleInputKeyDown:sl}=Nv({filteredItems:$e,allItems:Ne,shouldFocusWrap:L,overlayState:G,openOverlay:xe,closeOverlay:Ie,isReadOnly:O,isDisabled:y,searchText:Nt,setSearchText:dr,selectedKeys:pr,toggleKey:Ut,allowsCustomValue:S,menuTrigger:B,onKeyDown:Vs,listBoxContainerRef:sr,inputRef:Me});Bv({containerRef:sr,isOpen:G.isOpen,onScroll:h});var ll=Uv({loadingState:A,searchText:Nt,isOpen:G.isOpen,menuTrigger:B}),it=u.useCallback(()=>{requestAnimationFrame(()=>{var M;(M=Me.current)===null||M===void 0||M.focus()})},[]),ul=u.useCallback(M=>{Ut(M),it()},[Ut,it]),cl=u.useCallback(M=>{O||(fr(M,$e),it())},[O,fr,$e,it]),dl=u.useCallback(M=>{rt.current||(rt.current=!0,B==="focus"&&!G.isOpen&&!y&&xe("focus"),z==null||z(M),te==null||te(!0))},[z,te,B,G,y,xe]),pl=u.useCallback(M=>{var q=M.relatedTarget;if(q!=null){if(fe.current!=null&&fe.current.contains(q)||Fe.current!=null&&Fe.current.contains(q))return}else{requestAnimationFrame(()=>{var Oe=document.activeElement;Oe!=null&&(fe.current!=null&&fe.current.contains(Oe)||Fe.current!=null&&Fe.current.contains(Oe))||(rt.current=!1,G.isOpen&&Ie(),ee==null||ee(M),te==null||te(!1))});return}rt.current=!1,G.isOpen&&Ie(),ee==null||ee(M),te==null||te(!1)},[ee,te,G,Ie,Fe]),fl=u.useCallback(()=>{var M;y||(G.isOpen||xe("manual"),(M=Me.current)===null||M===void 0||M.focus())},[y,G,xe]),hl=u.useCallback(M=>{var q;M.stopPropagation(),!y&&(G.isOpen?Ie():xe("manual"),(q=Me.current)===null||q===void 0||q.focus())},[y,G,xe,Ie]);return c.jsx(Tl,Br(Br({},Js),{},{label:g,description:b,errorMessage:w==="invalid"?x:void 0,isRequired:v,isDisabled:y,validationState:w,labelPosition:C,labelAlign:_,necessityIndicator:j,contextualHelp:D,wrapperClassName:$("dh-multi-select",Ys),children:c.jsxs("div",{style:J?{display:"none"}:void 0,children:[c.jsx(jl,{within:!0,focusRingClass:"focus-ring",focusClass:"is-focused",children:c.jsxs("div",{ref:tl,id:le,onClick:fl,className:$("dh-multi-select-trigger",{"is-disabled":y,"is-read-only":O,"is-quiet":P,"is-invalid":w==="invalid"}),children:[c.jsxs("div",{className:"dh-multi-select-content",children:[$t.map(M=>c.jsx(Wv,{tagKey:M,label:cr(M),isDisabled:y,isReadOnly:O,onRemove:ul},M)),c.jsx("input",{ref:Me,className:"dh-multi-select-input",value:Nt,onChange:M=>dr(M.target.value),onFocus:dl,onBlur:pl,onKeyDown:sl,onKeyUp:Hs,disabled:y,readOnly:O,autoFocus:F,role:"combobox","aria-haspopup":"listbox","aria-expanded":G.isOpen,"aria-controls":G.isOpen?ir:void 0,"aria-autocomplete":"list","aria-label":zs,"aria-labelledby":qs,"aria-describedby":Xs,"aria-details":Qs})]}),ll&&c.jsx("div",{className:"dh-multi-select-loading-circle",children:c.jsx(aa,{"aria-label":"Loading",isIndeterminate:!0,size:"S"})}),w==="invalid"&&!y&&c.jsx("div",{className:"dh-multi-select-invalid-icon","aria-hidden":"true",children:c.jsx(Il,{})}),c.jsx("div",{className:$("dh-multi-select-chevron",{"is-open":G.isOpen}),onClick:hl,onPointerDown:M=>M.preventDefault(),role:"button",tabIndex:-1,"aria-label":"Toggle dropdown",children:c.jsx(kl,{})})]})}),H!=null&&c.jsx("input",{type:"hidden",name:H,value:k==="text"?$t.map(cr).join(","):$t.join(","),required:E==="native"&&v?!0:void 0}),G.isOpen&&!y&&c.jsx(_l,{ref:ar,triggerRef:fe,state:G,hideArrow:!0,isNonModal:!0,placement:el,shouldFlip:U,shouldCloseOnInteractOutside:M=>{var q;return((q=fe.current)===null||q===void 0?void 0:q.contains(M))!==!0},UNSAFE_style:{width:(n=(r=Xv(I))!==null&&r!==void 0?r:(i=fe.current)===null||i===void 0?void 0:i.offsetWidth)!==null&&n!==void 0?n:void 0},children:c.jsx(Kv,{listBoxRef:or,listBoxId:ir,loadingState:A,selectedKeys:pr,disabledKeys:ol,onSelectionChange:cl,ariaLabel:typeof g=="string"?g:"Options",emptyMessage:al,children:il})})]})}))}var Qn=W.forwardRef(Qv);Qn.displayName="MultiSelect";var Jv=["normalizedItems","showItemIcons","tooltip","selectedKeys","defaultSelectedKeys","disabledKeys","onChange","onSelectionChange"];function Wr(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function Kr(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?Wr(Object(n),!0).forEach(function(r){Zv(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Wr(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function Zv(t,e,n){return(e=ey(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function ey(t){var e=ty(t,"string");return typeof e=="symbol"?e:e+""}function ty(t,e){if(typeof t!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var r=n.call(t,e);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function ny(t,e){if(t==null)return{};var n,r,i=ry(t,e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);for(r=0;r<a.length;r++)n=a[r],e.indexOf(n)===-1&&{}.propertyIsEnumerable.call(t,n)&&(i[n]=t[n])}return i}function ry(t,e){if(t==null)return{};var n={};for(var r in t)if({}.hasOwnProperty.call(t,r)){if(e.indexOf(r)!==-1)continue;n[r]=t[r]}return n}function iy(t){var{normalizedItems:e,showItemIcons:n,tooltip:r=!0,selectedKeys:i,defaultSelectedKeys:a,disabledKeys:o,onChange:s,onSelectionChange:l}=t,d=ny(t,Jv),p=u.useMemo(()=>et(r),[r]),f=Fn({itemIconSlot:"icon",showItemDescriptions:!1,showItemIcons:n,tooltipOptions:p}),m="".concat(n,"-").concat(p==null?void 0:p.placement),h=u.useMemo(()=>e.flatMap(O=>{var w,P;return tn(O)?(w=(P=O.item)===null||P===void 0?void 0:P.items)!==null&&w!==void 0?w:[]:[O]}),[e]),{selectedStringKeys:g,defaultSelectedStringKeys:b,disabledStringKeys:x,onStringSelectionChange:v}=Yn({normalizedItems:h,selectedKeys:i,defaultSelectedKeys:a,disabledKeys:o,onChange:s??l}),y=u.useMemo(()=>e.map(O=>{if(tn(O)){var w,P;return c.jsx(Rl,{title:(w=O.item)===null||w===void 0?void 0:w.title,items:(P=O.item)===null||P===void 0?void 0:P.items,children:f},ht(O))}return f(O)}),[e,f]);return Kr(Kr({},d),{},{children:y,forceRerenderKey:m,selectedKeys:g,defaultSelectedKeys:b,disabledKeys:x,onChange:v})}var ay=["UNSAFE_className"],oy=["forceRerenderKey","children"];function Vr(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function Hr(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?Vr(Object(n),!0).forEach(function(r){sy(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Vr(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function sy(t,e,n){return(e=ly(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function ly(t){var e=uy(t,"string");return typeof e=="symbol"?e:e+""}function uy(t,e){if(typeof t!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var r=n.call(t,e);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function Gr(t,e){if(t==null)return{};var n,r,i=cy(t,e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);for(r=0;r<a.length;r++)n=a[r],e.indexOf(n)===-1&&{}.propertyIsEnumerable.call(t,n)&&(i[n]=t[n])}return i}function cy(t,e){if(t==null)return{};var n={};for(var r in t)if({}.hasOwnProperty.call(t,r)){if(e.indexOf(r)!==-1)continue;n[r]=t[r]}return n}function Zo(t){var{UNSAFE_className:e}=t,n=Gr(t,ay),r=iy(n),{forceRerenderKey:i,children:a}=r,o=Gr(r,oy);return u.createElement(Qn,Hr(Hr({},o),{},{key:i,UNSAFE_className:$("dh-multi-select-normalized",e)}),a)}var dy=["backgroundColor","borderColor","borderStartColor","borderEndColor","borderTopColor","borderBottomColor","borderXColor","borderYColor","UNSAFE_style"];function Yr(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function ot(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?Yr(Object(n),!0).forEach(function(r){py(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Yr(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function py(t,e,n){return(e=fy(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function fy(t){var e=hy(t,"string");return typeof e=="symbol"?e:e+""}function hy(t,e){if(typeof t!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var r=n.call(t,e);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function my(t,e){if(t==null)return{};var n,r,i=gy(t,e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);for(r=0;r<a.length;r++)n=a[r],e.indexOf(n)===-1&&{}.propertyIsEnumerable.call(t,n)&&(i[n]=t[n])}return i}function gy(t,e){if(t==null)return{};var n={};for(var r in t)if({}.hasOwnProperty.call(t,r)){if(e.indexOf(r)!==-1)continue;n[r]=t[r]}return n}var es=u.forwardRef((t,e)=>{var{backgroundColor:n,borderColor:r,borderStartColor:i,borderEndColor:a,borderTopColor:o,borderBottomColor:s,borderXColor:l,borderYColor:d,UNSAFE_style:p}=t,f=my(t,dy),{direction:m}=Dl(),h=u.useMemo(()=>{var g={};return r!==void 0&&(g.borderColor=oe(r)),l!==void 0&&(g.borderLeftColor=oe(l),g.borderRightColor=oe(l)),d!==void 0&&(g.borderTopColor=oe(d),g.borderBottomColor=oe(d)),i!==void 0&&(g[m==="rtl"?"borderRightColor":"borderLeftColor"]=oe(i)),a!==void 0&&(g[m==="rtl"?"borderLeftColor":"borderRightColor"]=oe(a)),o!==void 0&&(g.borderTopColor=oe(o)),s!==void 0&&(g.borderBottomColor=oe(s)),ot(ot({},p),{},{backgroundColor:oe(n)},g)},[n,p,r,i,a,o,s,l,d,m]);return c.jsx(Ll,ot(ot({},f),{},{ref:e,UNSAFE_style:h}))});es.displayName="View";var vy=["children"];function zr(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function qr(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?zr(Object(n),!0).forEach(function(r){yy(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):zr(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function yy(t,e,n){return(e=by(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function by(t){var e=Py(t,"string");return typeof e=="symbol"?e:e+""}function Py(t,e){if(typeof t!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var r=n.call(t,e);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function xy(t,e){if(t==null)return{};var n,r,i=Oy(t,e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);for(r=0;r<a.length;r++)n=a[r],e.indexOf(n)===-1&&{}.propertyIsEnumerable.call(t,n)&&(i[n]=t[n])}return i}function Oy(t,e){if(t==null)return{};var n={};for(var r in t)if({}.hasOwnProperty.call(t,r)){if(e.indexOf(r)!==-1)continue;n[r]=t[r]}return n}function Sy(t){var{children:e}=t,n=xy(t,vy),r=u.useMemo(()=>Ct(e).map(i=>Po(i,Yt)?i:c.jsx(Yt,{value:String(i),children:String(i)},String(i))),[e]);return c.jsx(Al,qr(qr({},n),{},{children:r}))}var wy=["ariaLabel","icon","isQuiet","labelText","children","onOpenChange","tooltip"];function Xr(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function Qr(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?Xr(Object(n),!0).forEach(function(r){Cy(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Xr(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function Cy(t,e,n){return(e=Ey(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function Ey(t){var e=Ty(t,"string");return typeof e=="symbol"?e:e+""}function Ty(t,e){if(typeof t!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var r=n.call(t,e);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function jy(t,e){if(t==null)return{};var n,r,i=Iy(t,e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);for(r=0;r<a.length;r++)n=a[r],e.indexOf(n)===-1&&{}.propertyIsEnumerable.call(t,n)&&(i[n]=t[n])}return i}function Iy(t,e){if(t==null)return{};var n={};for(var r in t)if({}.hasOwnProperty.call(t,r)){if(e.indexOf(r)!==-1)continue;n[r]=t[r]}return n}function ts(t){var{ariaLabel:e,icon:n,isQuiet:r,labelText:i,children:a,onOpenChange:o,tooltip:s}=t,l=jy(t,wy),d=i==null&&s!=null?"action-button-icon-with-tooltip":void 0;return c.jsxs(oa,{type:"popover",onOpenChange:o,children:[c.jsxs(bt,Qr(Qr({},l),{},{"aria-label":e??i,isQuiet:r,children:[c.jsx(Qe,{UNSAFE_className:d,children:c.jsx(ne,{icon:n})}),i==null?null:c.jsx(Et,{children:i}),s==null?null:c.jsx(Ze,{children:s})]})),a]})}function Jr(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function st(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?Jr(Object(n),!0).forEach(function(r){ky(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Jr(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function ky(t,e,n){return(e=_y(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function _y(t){var e=Ry(t,"string");return typeof e=="symbol"?e:e+""}function Ry(t,e){if(typeof t!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var r=n.call(t,e);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function ns(t){var{heading:e,confirmationButtonLabel:n,children:r,onCancel:i,onConfirm:a}=t,{formProps:o,submitButtonProps:s}=Uo();return c.jsxs(sa,{children:[c.jsx(Tn,{level:3,UNSAFE_className:$n.spectrumDialogComponentHeading,children:e}),c.jsx(la,{}),c.jsx(bn,{children:c.jsx(ua,st(st({},o),{},{children:r}))}),c.jsxs(ca,{children:[c.jsx(zt,{variant:"secondary",onPress:i,children:"Cancel"}),c.jsx(zt,st(st({},s),{},{style:"fill",variant:"negative",onPress:a,type:"submit",children:n}))]})]})}function Dy(t){var{ariaLabel:e,heading:n,confirmationButtonLabel:r,isHidden:i,children:a,tooltip:o,onConfirm:s}=t,l=u.useCallback(d=>c.jsx(ns,{heading:n,confirmationButtonLabel:r,onCancel:d,onConfirm:()=>{d(),s()},children:a}),[a,r,n,s]);return c.jsx(ts,{ariaLabel:e,icon:Oa,isHidden:i,isQuiet:!0,height:Un,tooltip:o,children:l})}var Ly=["icon","label","tooltip"];function Zr(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function ei(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?Zr(Object(n),!0).forEach(function(r){Ay(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Zr(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function Ay(t,e,n){return(e=My(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function My(t){var e=Fy(t,"string");return typeof e=="symbol"?e:e+""}function Fy(t,e){if(typeof t!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var r=n.call(t,e);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function Ny(t,e){if(t==null)return{};var n,r,i=$y(t,e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);for(r=0;r<a.length;r++)n=a[r],e.indexOf(n)===-1&&{}.propertyIsEnumerable.call(t,n)&&(i[n]=t[n])}return i}function $y(t,e){if(t==null)return{};var n={};for(var r in t)if({}.hasOwnProperty.call(t,r)){if(e.indexOf(r)!==-1)continue;n[r]=t[r]}return n}function rs(t){var{icon:e,label:n,tooltip:r}=t,i=Ny(t,Ly);return c.jsxs(bt,ei(ei({},i),{},{"aria-label":n,isQuiet:!0,height:Un,children:[c.jsx(Qe,{UNSAFE_className:r==null?void 0:"action-button-icon-with-tooltip",children:c.jsx(ne,{icon:e})}),r==null?null:c.jsx(Ze,{children:r})]}))}rs.displayName="IconActionButton";function ti(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function Uy(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?ti(Object(n),!0).forEach(function(r){ye(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):ti(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function ye(t,e,n){return(e=By(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function By(t){var e=Wy(t,"string");return typeof e=="symbol"?e:e+""}function Wy(t,e){if(typeof t!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var r=n.call(t,e);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}var Ky=100,is=function(t){return t.UP="UP",t.DOWN="DOWN",t}(is||{});class ce extends u.Component{constructor(e){super(e),ye(this,"popper",void 0),ye(this,"cbContainer",void 0),ye(this,"menuContainer",void 0),ye(this,"input",void 0),ye(this,"getCachedFilteredOptions",Ml((r,i)=>r.filter(a=>a.title.toLowerCase().indexOf(i.toLowerCase())>=0),{max:1e3}));var{popperOptions:n}=this.props;n=Uy({placement:"bottom-end",modifiers:{preventOverflow:{enabled:!1}}},n),this.state={title:"",filteredOptions:[],keyboardOptionIndex:0,menuIsOpen:!1,inputWidth:100,invalid:!1,popperOptions:n},this.handleMenuKeyDown=this.handleMenuKeyDown.bind(this),this.handleMenuBlur=this.handleMenuBlur.bind(this),this.handleInputChange=this.handleInputChange.bind(this),this.handleInputKeyDown=this.handleInputKeyDown.bind(this),this.handleInputBlur=this.handleInputBlur.bind(this),this.handelInputFocus=this.handelInputFocus.bind(this),this.handleInputClick=this.handleInputClick.bind(this),this.updateInputValue=He(this.updateInputValue,Ky),this.handleOptionClick=this.handleOptionClick.bind(this),this.handleMenuOpened=this.handleMenuOpened.bind(this),this.handleMenuExited=this.handleMenuExited.bind(this),this.popper=W.createRef(),this.cbContainer=W.createRef(),this.menuContainer=W.createRef(),this.input=W.createRef()}setInputWidth(){this.cbContainer.current&&this.setState({inputWidth:this.cbContainer.current.getBoundingClientRect().width})}getValueAndValidate(e){if(!e)return this.setState({invalid:!1}),{value:e,isValid:!1};var{options:n}=this.props,r=n.filter(i=>i.title.toLowerCase()===e.toLowerCase());return r.length<1?(this.setState({invalid:!0}),{value:e,isValid:!1}):(this.setState({invalid:!1}),{value:r[0].value,isValid:!0})}updateInputValue(e){var{menuIsOpen:n}=this.state,{value:r,isValid:i}=this.getValueAndValidate(e);n&&this.processFilterChange(e),this.fireOnChange(r,i)}fireOnChange(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0,{onChange:r}=this.props;r(e,n)}processFilterChange(e){var n,{options:r}=this.props,{menuIsOpen:i}=this.state,a=e?this.getCachedFilteredOptions(r,e):r,o=a.length===1&&a[0].title===e;if(this.setState({filteredOptions:a,keyboardOptionIndex:0}),o&&i){this.closeMenu();return}(n=this.popper.current)===null||n===void 0||n.scheduleUpdate()}resetValue(){this.setState({title:""}),this.fireOnChange("")}handleResize(){this.setInputWidth()}handleMenuKeyDown(e){var n,{filteredOptions:r,keyboardOptionIndex:i}=this.state,a=r[i];switch(e.key){case"Enter":case"ArrowRight":e.stopPropagation(),e.preventDefault(),a!=null&&(this.setState({title:a.title,invalid:!1}),this.fireOnChange(a.value)),this.closeMenu(),(n=this.input.current)===null||n===void 0||n.focus();break;case"ArrowUp":e.stopPropagation(),e.preventDefault(),this.navigateMenu(ce.MENU_NAVIGATION_DIRECTION.UP);break;case"ArrowDown":e.stopPropagation(),e.preventDefault(),this.navigateMenu(ce.MENU_NAVIGATION_DIRECTION.DOWN);break;case"Tab":if(e.stopPropagation(),e.preventDefault(),e.shiftKey){this.navigateMenu(ce.MENU_NAVIGATION_DIRECTION.UP);break}this.navigateMenu(ce.MENU_NAVIGATION_DIRECTION.DOWN);break;case"Escape":e.preventDefault(),e.stopPropagation(),this.closeMenu();break}}navigateMenu(e){var{filteredOptions:n,keyboardOptionIndex:r}=this.state,i=r;e===ce.MENU_NAVIGATION_DIRECTION.UP?r>0?(i=(i-1)%n.length,this.setState({keyboardOptionIndex:i})):r===0&&(i=n.length-1,this.setState({keyboardOptionIndex:i})):e===ce.MENU_NAVIGATION_DIRECTION.DOWN&&r<n.length&&(i=(i+1)%n.length,this.setState({keyboardOptionIndex:i})),this.scrollOptionIntoView(i)}handleInputKeyDown(e){var{onEnter:n}=this.props,{menuIsOpen:r}=this.state;r?this.handleMenuKeyDown(e):e.key==="Enter"?n():e.key==="Escape"?(this.resetValue(),e.preventDefault(),e.stopPropagation()):e.key==="ArrowRight"||e.key==="ArrowLeft"||e.key==="Tab"||e.key==="Shift"||this.openMenu()}handleInputChange(e){this.setState({title:e.target.value}),this.updateInputValue(e.target.value)}handleOptionClick(e){var n;this.setState({title:e.title,invalid:!1}),this.fireOnChange(e.value),this.closeMenu(),(n=this.input.current)===null||n===void 0||n.focus()}handelInputFocus(){var{menuIsOpen:e}=this.state;e||this.openMenu()}handleInputClick(){var{menuIsOpen:e}=this.state;e||this.openMenu()}handleInputBlur(e){var{menuIsOpen:n}=this.state;n&&e.relatedTarget instanceof Element&&this.popper.current!==null&&this.popper.current.element.contains(e.relatedTarget)||this.closeMenu(!1)}handleMenuBlur(e){e.relatedTarget===this.input.current||e.relatedTarget instanceof Element&&this.popper.current!==null&&this.popper.current.element.contains(e.relatedTarget)||this.closeMenu(!1)}handleMenuOpened(){var e;(e=this.input.current)===null||e===void 0||e.focus()}handleMenuExited(){var{menuIsOpen:e}=this.state;e&&this.setState({menuIsOpen:!1,keyboardOptionIndex:0})}openMenu(){var{title:e}=this.state;this.processFilterChange(e),this.setInputWidth(),this.setState({menuIsOpen:!0}),window.requestAnimationFrame(()=>{var n;(n=this.popper.current)===null||n===void 0||n.show()})}closeMenu(){var e,n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0;if(this.setState({menuIsOpen:!1,keyboardOptionIndex:0}),n){var r;(r=this.input.current)===null||r===void 0||r.focus()}(e=this.popper.current)===null||e===void 0||e.hide()}scrollOptionIntoView(e){if(this.menuContainer.current){var n;(n=this.menuContainer.current.children.item(e))===null||n===void 0||n.scrollIntoView({behavior:"smooth",block:"nearest"})}}renderMenuElement(){var{inputWidth:e}=this.state;return c.jsx("div",{className:$("aci-options"),ref:this.menuContainer,role:"presentation",onKeyDown:this.handleMenuKeyDown,style:{width:e},onBlur:this.handleMenuBlur,children:this.renderOptions()})}renderOptions(){var{noMatchText:e}=this.props,{title:n,filteredOptions:r}=this.state;return n&&r.length===0?c.jsx("div",{className:"no-match",children:e}):r.map((i,a)=>this.renderOption(i,a))}renderOption(e,n){var{keyboardOptionIndex:r}=this.state,i="option-".concat(n,"-").concat(e.value);return c.jsx("button",{type:"button",className:$("aci-option-btn",{"keyboard-active":r===n}),onClick:()=>this.handleOptionClick(e),onFocus:()=>this.setState({keyboardOptionIndex:n}),children:e.title},i)}render(){var{options:e,inputPlaceholder:n,disabled:r,className:i,defaultTitle:a,spellCheck:o,"data-testid":s}=this.props,{title:l,menuIsOpen:d,popperOptions:p,invalid:f}=this.state;return c.jsxs("div",{className:"aci-container",ref:this.cbContainer,children:[c.jsx("input",{value:l||a,className:$("form-control",i,"aci-input",{"is-invalid":f&&!d}),ref:this.input,onChange:this.handleInputChange,placeholder:n||e[0].title,disabled:r,onFocus:this.handelInputFocus,onClick:this.handleInputClick,onBlur:this.handleInputBlur,onKeyDown:this.handleInputKeyDown,spellCheck:o,"data-testid":s}),c.jsx(Tt,{ref:this.popper,options:p,className:$("aci-options-popper interactive"),onEntered:this.handleMenuOpened,onExited:this.handleMenuExited,children:this.renderMenuElement()})]})}}ye(ce,"defaultProps",{onChange(){},inputPlaceholder:"",disabled:!1,className:"",defaultTitle:"",popperOptions:null,spellCheck:!0,onEnter(){},noMatchText:"No matching items found","data-testid":void 0});ye(ce,"MENU_NAVIGATION_DIRECTION",is);function Ue(t){return t.split(`
|
|
2
|
+
`).map(e=>e.trim()).filter(e=>e).join(" ")}function Vy(t,e){for(var n=[],r="",i=null,a=0;a<t.length;){var o=t[a];if(i!==null)r+=o,o===i&&(i=null),a+=1;else if(o==='"'||o==="'"){var s=t.indexOf(o,a+1);s!==-1&&(i=o),r+=o,a+=1}else t.startsWith(e,a)?(n.push(r),r="",a+=e.length):(r+=o,a+=1)}return n.push(r),n}function Bt(t,e){return Vy(t.trim(),e).filter(n=>n!=="").join(`
|
|
3
|
+
`.concat(e.trim()))}function Hy(t){var{className:e="",value:n,onChange:r,spellCheck:i=!1,placeholder:a="",disabled:o=!1,delimiter:s="",id:l="","data-testid":d}=t,[p,f]=u.useState(n),[m,h]=u.useState(!1),g=u.useRef(null),b=u.useRef(!1),x=u.useRef(p);x.current=p,u.useEffect(function(){!b.current||!s?f(n):Ue(x.current)!==Ue(n)&&f(Bt(n,s))},[n,s]);function v(){if(g.current){g.current.style.height="0";var _=g.current.scrollHeight+(g.current.offsetHeight-g.current.clientHeight);_>0&&(g.current.style.height="".concat(_,"px"))}}function y(_){var j=_.target.value;m&&(s&&(j=Bt(j,s)),h(!1)),f(j),r(s?Ue(j):j)}function O(){g.current&&(b.current=!0,s&&(f(Bt(p,s)),v()),g.current.scrollLeft=0)}function w(){g.current&&document.activeElement!==g.current&&g.current.focus()}function P(){b.current=!1,s&&(f(Ue(p)),r(Ue(p)))}function C(){h(!0)}return u.useEffect(function(){v()},[p]),c.jsx("textarea",{ref:g,id:l,className:$(e,"auto-resize-textarea form-control"),placeholder:a,value:p,rows:1,onChange:y,onFocus:O,onMouseDown:w,onBlur:P,onPaste:C,spellCheck:i,disabled:o,"data-testid":d})}function as(t){var{blockInteraction:e=!0,children:n,debounceMs:r,isOpen:i=!1}=t,{value:a}=tt(i,r);return c.jsxs(c.Fragment,{children:[e&&i&&c.jsx("div",{className:"modal-backdrop",style:{backgroundColor:"transparent"},"data-testid":"debounced-modal-backdrop"}),W.cloneElement(n,{isOpen:i&&a})]})}function os(t){var{className:e,icon:n,isOpen:r=!1,subtitle:i,title:a}=t;return c.jsx(On,{isOpen:r,className:e,children:c.jsx(Sn,{children:c.jsxs("div",{className:"info-modal",children:[n!=null&&c.jsx("div",{className:"message-icon",children:c.jsx(ne,{icon:n})}),c.jsx("div",{className:"message-header",children:a}),i!=null&&c.jsx("div",{className:"message-content",children:i})]})})})}function ni(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function ri(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?ni(Object(n),!0).forEach(function(r){Gy(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):ni(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function Gy(t,e,n){return(e=Yy(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function Yy(t){var e=zy(t,"string");return typeof e=="symbol"?e:e+""}function zy(t,e){if(typeof t!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var r=n.call(t,e);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}var qy=[];function Xy(t){var{styleProps:e,selectedItemCount:n,onClearSelection:r}=t;return c.jsx(da,ri(ri({UNSAFE_className:$n.spectrumActionBar},e),{},{isEmphasized:!0,selectedItemCount:n,onClearSelection:r,children:qy}))}function ii(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function Qy(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?ii(Object(n),!0).forEach(function(r){ge(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):ii(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function ge(t,e,n){return(e=Jy(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function Jy(t){var e=Zy(t,"string");return typeof e=="symbol"?e:e+""}function Zy(t,e){if(typeof t!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var r=n.call(t,e);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}var ai=Y.module("ContextMenu");class ze extends u.PureComponent{static handleContextMenu(e){e.metaKey||(e.stopPropagation(),e.preventDefault())}constructor(e){super(e),ge(this,"container",void 0),ge(this,"oldFocus",void 0),ge(this,"activeSubMenuRef",void 0),ge(this,"subMenuTimer",void 0),ge(this,"rAF",void 0),ge(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=W.createRef(),this.oldFocus=document.activeElement,this.activeSubMenuRef=W.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:r}=this.props,{activeSubMenu:i}=this.state;if(i!==n.activeSubMenu)if(i==null){var a;(a=this.container.current)===null||a===void 0||a.focus()}else this.setActiveSubMenuPosition();if(e.actions!==r&&(this.initMenu(),this.container.current==null||!this.container.current.contains(document.activeElement))){var o;(o=this.container.current)===null||o===void 0||o.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:r}=this.props,i=ve.getMenuItems(r),a=[],o=i.length-1;o>=0;o-=1){var s=i[o];s instanceof Promise?this.initMenuPromise(s):a.push(s)}this.setState({mouseIndex:-1,keyboardIndex:n,activeSubMenu:null,menuItems:ve.sortActions(a)})}initMenuPromise(e){var n=Ee.makeCancelable(e);this.setState(r=>({pendingItems:r.pendingItems.concat(n)})),n.then(r=>{this.setState(i=>{var a=i.pendingItems.indexOf(n);if(a>=0){var o=i.pendingItems.slice();return o.splice(a,1),{menuItems:ve.sortActions(i.menuItems.concat(r)),pendingItems:o}}return null})},r=>{Ee.isCanceled(r)||(this.setState(i=>{var a=i.pendingItems.indexOf(n);if(a>=0){var o=i.pendingItems.slice();return o.splice(a,1),{pendingItems:o}}return null}),ai.error(r))})}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,r,i,{options:a,updatePosition:o,subMenuParentWidth:s,subMenuParentHeight:l,top:d,left:p}=this.props;if(!(!this.container.current||a.doNotVerifyPosition!=null&&a.doNotVerifyPosition)){var{top:f,left:m}=this.initialPosition,{width:h,height:g}=(e=(n=this.container.current)===null||n===void 0?void 0:n.getBoundingClientRect())!==null&&e!==void 0?e:{width:0,height:0},b=((r=(i=this.container.current)===null||i===void 0?void 0:i.scrollHeight)!==null&&r!==void 0?r:0)>window.innerHeight;g===0||h===0||(f+g>window.innerHeight&&(f-g-l>0?f-=g-l:f=window.innerHeight-g),m+h>window.innerWidth&&(m=m-h-s),(p!==m||d!==f)&&(this.setState({hasOverflow:b}),o(f,m)))}}handleWindowResize(){this.container.current&&this.closeMenu(!0)}handleBlur(e){if(!this.container.current){ai.warn("Container is null!");return}if(!this.container.current.contains(e.relatedTarget)){for(var n=e.relatedTarget,r=!1;n&&!r;)r=n.hasAttribute("data-dh-context-menu"),n=n.parentElement;r||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,r=this.getKeyboardIndex(),i=r,a=!1;if(e.key==="Enter"||e.key===" "){r>=0&&r<n.length&&this.handleMenuItemClick(n[r],e);return}if(e.key==="ArrowRight"?r>=0&&r<=n.length?a=!0:i=0:this.isEscapeKey(e.key)?i=null:e.key==="ArrowUp"||e.shiftKey&&e.key==="Tab"?i=ve.getNextMenuItem(i,-1,n):(e.key==="ArrowDown"||e.key==="Tab")&&(i=ve.getNextMenuItem(i,1,n)),a){this.openSubMenu(r),e.preventDefault(),e.stopPropagation();return}r!==i&&(i!==null?this.setKeyboardIndex(i):(this.closeMenu(),this.oldFocus instanceof HTMLElement&&this.oldFocus.focus()),e.preventDefault(),e.stopPropagation())}openSubMenu(e){var{menuItems:n,activeSubMenu:r}=this.state,i=n[e].actions?e:null;r!==i&&this.setState({activeSubMenu:i,subMenuTop:null,subMenuLeft:null})}closeMenu(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1,{closeMenu:n,onMenuClosed:r}=this.props;cancelAnimationFrame(this.rAF),this.rAF=window.requestAnimationFrame(()=>{n(e),r(this)})}closeSubMenu(){this.setState({activeSubMenu:null})}handleCloseSubMenu(e){e?this.closeMenu(!0):this.closeSubMenu()}handleMenuItemClick(e,n){n.preventDefault(),n.stopPropagation();var{menuItems:r}=this.state;e!=null&&(e.disabled===void 0||!e.disabled)&&(e.actions!=null?this.openSubMenu(r.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,r=n.indexOf(e);this.setMouseIndex(r),r>=0&&r<n.length&&(e.disabled===void 0||!e.disabled)&&this.openSubMenu(r)}handleMouseLeave(){this.setMouseIndex(-1)}render(){for(var e=[],{top:n,left:r}=this.props,{activeSubMenu:i,hasOverflow:a,keyboardIndex:o,menuItems:s,mouseIndex:l,pendingItems:d,subMenuTop:p,subMenuLeft:f,subMenuParentWidth:m,subMenuParentHeight:h}=this.state,g=0;g<s.length;g+=1){var b=s[g];g>0&&b.group!==s[g-1].group&&e.push(c.jsx("hr",{},"".concat(g,".separator")));var x=c.jsx(Ia,{ref:i===g?this.activeSubMenuRef:null,isKeyboardSelected:o===g,isMouseSelected:l===g,menuItem:b,closeMenu:this.handleCloseSubMenu,onMenuItemClick:this.handleMenuItemClick,onMenuItemMouseMove:this.handleMenuItemMouseMove,onMenuItemContextMenu:this.handleMenuItemContextMenu},g);e.push(x)}var v=null;d.length>0&&(v=c.jsx("div",{className:"loading",children:c.jsx(Pt,{className:"loading-spinner-vertical-align"})}));var{menuStyle:y,"data-testid":O}=this.props,w=i!==null&&p!==null&&f!==null;return c.jsxs(c.Fragment,{children:[c.jsxs("div",{className:$({"has-overflow":a},"context-menu-container"),style:Qy({top:n,left:r},y),ref:this.container,"data-dh-context-menu":!0,onBlur:this.handleBlur,onKeyDown:this.handleKeyDown,onMouseLeave:this.handleMouseLeave,onContextMenu:ze.handleContextMenu,role:"menuitem",tabIndex:0,"data-testid":O,children:[e,v]}),w&&i!==null&&p!==null&&f!==null&&c.jsx(ze,{actions:s[i].actions||[],closeMenu:this.handleCloseSubMenu,top:p,left:f,updatePosition:(P,C)=>{this.setState({subMenuTop:P,subMenuLeft:C})},subMenuParentWidth:m,subMenuParentHeight:h},"sub-".concat(i))]})}}ge(ze,"defaultProps",{subMenuParentWidth:0,subMenuParentHeight:0,closeMenu(){},onMenuOpened(){},onMenuClosed(){},options:{},menuStyle:{},"data-testid":void 0});function oi(t,e,n){return(e=eb(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function eb(t){var e=tb(t,"string");return typeof e=="symbol"?e:e+""}function tb(t,e){if(typeof t!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var r=n.call(t,e);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}class ss extends u.Component{constructor(e){super(e),oi(this,"container",void 0),oi(this,"openMenu",void 0),this.handleMenuClose=this.handleMenuClose.bind(this),this.handleContextMenu=this.handleContextMenu.bind(this),this.container=W.createRef(),this.openMenu=W.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(),r=e.clientY-n.top,i=e.clientX-n.left,{actions:a}=this.state;if(a!=null&&e.target===this.container.current){e.preventDefault(),this.setState({actions:null},()=>{var s=document.elementFromPoint(i,r),l=new MouseEvent("contextmenu",{clientX:e.clientX,clientY:e.clientY,bubbles:!0,cancelable:!0});s==null||s.dispatchEvent(l)});return}if(ve.isContextActionEvent(e)&&!(e.metaKey||e.ctrlKey)){var o=ve.getMenuItems(e.contextActions);o.length!==0&&(e.preventDefault(),this.setState({actions:o,top:r,left:i}))}}}handleMenuClose(e){e===this.openMenu.current&&this.setState({actions:null})}render(){var e=null,{"data-testid":n}=this.props,{actions:r,top:i,left:a}=this.state;return r&&(e=c.jsx(ze,{ref:this.openMenu,actions:r,onMenuClosed:this.handleMenuClose,top:i,left:a,updatePosition:(o,s)=>{this.setState({top:o,left:s})},"data-testid":n})),c.jsx("div",{className:$("context-menu-root",{active:r}),ref:this.container,children:e})}}function ls(t,e,n){return(e=nb(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function nb(t){var e=rb(t,"string");return typeof e=="symbol"?e:e+""}function rb(t,e){if(typeof t!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var r=n.call(t,e);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}class qe extends u.Component{static getHeight(e){var n=e.scrollWidth-e.clientWidth;return e.scrollHeight-n}constructor(e){super(e),ls(this,"nodeRef",W.createRef()),this.handleEntered=this.handleEntered.bind(this)}handleEntered(){var e=this.nodeRef.current;if(e){e.style.height="";var{autoFocusOnShow:n}=this.props;if(n!==void 0&&n){var r=e.querySelector("input, select, textarea");r!=null&&r.focus()}}}handleEnter(){var e=this.nodeRef.current;e&&(e.style.height="0")}handleEntering(){var e=this.nodeRef.current;e&&(e.style.height="".concat(qe.getHeight(e),"px"))}handleExiting(){var e=this.nodeRef.current;e&&(e.style.height="0")}handleExit(){var e=this.nodeRef.current;e&&(e.style.height="".concat(qe.getHeight(e),"px"))}render(){var{children:e,className:n,in:r,"data-testid":i}=this.props;return c.jsx(pa,{in:r,classNames:{enterActive:"collapsing",enterDone:"collapse show",exitActive:"collapsing",exitDone:"collapse"},onEnter:this.handleEnter,onEntering:this.handleEntering,onEntered:this.handleEntered,onExit:this.handleExit,onExiting:this.handleExiting,timeout:350,nodeRef:this.nodeRef,children:a=>c.jsx("div",{ref:this.nodeRef,className:$({collapse:a==="exited"},n),"data-testid":i,children:e})})}}ls(qe,"defaultProps",{className:"",autoFocusOnShow:!1,"data-testid":void 0});var ib=Y.module("TimeInput"),ab="([01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9]",ob=["00:00:00","12:34:56","23:59:59"];function si(t){return t!=null?"".concat(t.substring(0,8).replace(/\u2007/g,"0")).concat("00:00:00".substring(t.length)):t}var gt=W.forwardRef((t,e)=>{var{allowValueWrapping:n=!0,className:r="",onChange:i=se,value:a=0,onFocus:o=se,onBlur:s=se,onSelect:l=se,"data-testid":d}=t,[p,f]=u.useState(dt.formatTime(a)),m=u.useRef(a),[h,g]=u.useState(),b=u.useRef(null);u.useImperativeHandle(e,()=>({focus:()=>{var P;(P=b.current)===null||P===void 0||P.focus()},setSelection:P=>{var C;(C=b.current)===null||C===void 0||C.focus(),g(P)}}),[]),u.useEffect(function(){m.current!==a&&(f(dt.formatTime(a)),m.current=a)},[m,a]);function x(P,C,_){var j=P.selectionStart===0?24:60,D=parseInt(_,10)-C;return Number.isNaN(D)?D=0:n?D=(D%j+j)%j:D=Math.min(Math.max(0,D),j-1),"".concat(D).padStart(2,"0")}function v(P,C,_,j,D){return j===0&&D===2&&C===1&&parseInt(_,10)>1?"0".concat(_).concat(P.substring(2)):So(P,C,_)}var y=u.useCallback(P=>{ib.debug("handleChange",P),f(P),m.current=dt.parseTime(si(P)),i(m.current)},[i]),O=u.useCallback(()=>{var P=si(p);P!==p&&f(P),s()},[p,s]),w=u.useCallback(P=>{g(P),l(P)},[l]);return c.jsx(Bn,{ref:b,className:r,example:ob,getNextSegmentValue:x,getPreferredReplacementString:v,onChange:y,onSelect:w,pattern:ab,selection:h,value:p,onFocus:o,onBlur:O,"data-testid":d})});function li(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function sb(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?li(Object(n),!0).forEach(function(r){be(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):li(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function be(t,e,n){return(e=lb(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function lb(t){var e=ub(t,"string");return typeof e=="symbol"?e:e+""}function ub(t,e){if(typeof t!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var r=n.call(t,e);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}var ui=-1,us=function(t){return t.UP="UP",t.DOWN="DOWN",t}(us||{});class ie extends u.Component{constructor(e){super(e),be(this,"csContainer",void 0),be(this,"menuContainer",void 0),be(this,"button",void 0),be(this,"input",void 0);var{value:n,valueToTime:r}=e;this.toggleMenu=this.toggleMenu.bind(this),this.handleMenuKeyDown=this.handleMenuKeyDown.bind(this),this.closeMenu=this.closeMenu.bind(this),this.handleOptionClick=this.handleOptionClick.bind(this),this.handleOptionFocus=this.handleOptionFocus.bind(this),this.handleMenuOpened=this.handleMenuOpened.bind(this),this.handleMenuExited=this.handleMenuExited.bind(this),this.handleCustomInput=this.handleCustomInput.bind(this),this.csContainer=W.createRef(),this.menuContainer=W.createRef(),this.button=W.createRef(),this.input=W.createRef(),this.state={keyboardOptionIndex:0,menuIsOpen:!1,inputWidth:100,customTime:r(n),inputFocused:!1}}getSelectedText(){var{options:e,value:n,placeholder:r}=this.props,{customTime:i}=this.state;if(n===null)return r;for(var a=0;a<e.length;a+=1){var o=e[a];if(o.value===n)return o.title}return dt.formatTime(i)}setInputWidth(){this.csContainer.current&&this.setState({inputWidth:this.csContainer.current.getBoundingClientRect().width})}focus(){var e;(e=this.button.current)===null||e===void 0||e.focus()}updateInputValue(e){var{onChange:n}=this.props;n(e)}handleResize(){this.setInputWidth()}handleMenuKeyDown(e){var n,{keyboardOptionIndex:r,inputFocused:i}=this.state,{options:a}=this.props;switch(e.key){case"Enter":case" ":i?this.updateFromCustom():this.updateInputValue(a[r].value),this.closeMenu(),(n=this.button.current)===null||n===void 0||n.focus(),e.stopPropagation(),e.preventDefault();break;case"Tab":e.shiftKey?this.handleMenuNavigation(ie.MENU_NAVIGATION_DIRECTION.UP):this.handleMenuNavigation(ie.MENU_NAVIGATION_DIRECTION.DOWN),e.stopPropagation(),e.preventDefault();break;case"ArrowUp":this.handleMenuNavigation(ie.MENU_NAVIGATION_DIRECTION.UP),e.stopPropagation(),e.preventDefault();break;case"ArrowDown":this.handleMenuNavigation(ie.MENU_NAVIGATION_DIRECTION.DOWN),e.stopPropagation(),e.preventDefault();break;case"Escape":this.closeMenu();break}}handleMenuNavigation(e){var{keyboardOptionIndex:n,inputFocused:r}=this.state,{options:i}=this.props,a=i.length,o=n;switch(e){case ie.MENU_NAVIGATION_DIRECTION.UP:if(!r&&n===0){this.focusInput();break}else r&&this.focusOption(n);n>0&&!r?(o=(o-1)%a,this.setState({keyboardOptionIndex:o})):n===0&&(o=a-1,this.setState({keyboardOptionIndex:o})),this.scrollOptionIntoView(o);break;case ie.MENU_NAVIGATION_DIRECTION.DOWN:if(!r&&n===a-1){this.focusInput();break}else r&&this.focusOption(n);n<a&&!(r&&n===0)&&(o=(o+1)%a,this.setState({keyboardOptionIndex:o})),this.scrollOptionIntoView(o);break}}handleOptionClick(e){var n=Number(e.currentTarget.value),{options:r,timeToValue:i}=this.props,{customTime:a}=this.state;if(n===ui){var o=i(a);this.updateAndClose(o)}else this.updateAndClose(r[n].value)}updateAndClose(e){var n;this.updateInputValue(e),this.closeMenu(),(n=this.button.current)===null||n===void 0||n.focus()}handleOptionFocus(e){this.setState({keyboardOptionIndex:Number(e.target.value)})}handleMenuOpened(){var e,{options:n,value:r}=this.props,{keyboardOptionIndex:i}=this.state;this.scrollOptionIntoView(i);var a=(e=this.menuContainer.current)===null||e===void 0?void 0:e.querySelector(".cs-option-btn.keyboard-active");if(a instanceof HTMLElement&&a.focus(),r!==null){var o=n.map(s=>s.value).indexOf(r);o<0&&this.focusInput()}}focusInput(){var e;(e=this.input.current)===null||e===void 0||e.focus()}focusOption(e){var n,r=(n=this.menuContainer.current)===null||n===void 0?void 0:n.querySelector(".cs-options");if(r&&r.children!=null){var i=r.children.item(e);i instanceof HTMLElement&&i.focus()}}handleMenuExited(){var{menuIsOpen:e}=this.state;e&&this.setState({menuIsOpen:!1,keyboardOptionIndex:0})}handleCustomInput(e){var{timeToValue:n}=this.props,r=n(e);this.updateInputValue(r),this.setState({customTime:e})}updateFromCustom(){var{timeToValue:e}=this.props,{customTime:n}=this.state,r=e(n);this.updateInputValue(r)}toggleMenu(e){var{menuIsOpen:n}=this.state;n?this.closeMenu():this.openMenu(),e.stopPropagation()}openMenu(){this.updateKeyboardIndex(),this.setInputWidth(),this.setState({menuIsOpen:!0})}closeMenu(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0;if(this.setState({menuIsOpen:!1}),e){var n;(n=this.button.current)===null||n===void 0||n.focus()}}updateKeyboardIndex(){var{options:e,value:n}=this.props;if(n!==null){var r=e.map(i=>i.value).indexOf(n);r>0&&this.setState({keyboardOptionIndex:r})}}scrollOptionIntoView(e){var n,r=(n=this.menuContainer.current)===null||n===void 0?void 0:n.querySelector(".cs-options");if(r&&r.children!=null){var i=r.children.item(e);i instanceof HTMLElement&&i.offsetTop>ie.DROP_DOWN_MENU_HEIGHT?r.scrollTop=i.offsetTop-ie.DROP_DOWN_MENU_HEIGHT:(i instanceof HTMLElement&&i.offsetTop<0||e===0)&&(r.scrollTop=0)}}renderMenuElement(){var{inputWidth:e}=this.state;return c.jsx("div",{className:"cs-menu-container",ref:this.menuContainer,role:"presentation",onKeyDown:this.handleMenuKeyDown,onClick:n=>{n.stopPropagation()},style:{width:e},children:c.jsx("div",{className:"cs-options-container",children:c.jsx("div",{className:"cs-options",children:this.renderOptions()})})})}renderOptions(){for(var{options:e,value:n,icon:r,customText:i}=this.props,{keyboardOptionIndex:a,customTime:o,inputFocused:s}=this.state,l=!1,d=[],p=0;p<e.length;p+=1){var f=e[p],m="option-".concat(p,"-").concat(f.value);l=l||f.value===n,d.push(c.jsxs("button",{type:"button",value:p,className:$("cs-option-btn",{"keyboard-active":a===p&&!s}),onClick:this.handleOptionClick,onFocus:this.handleOptionFocus,children:[f.value===n&&c.jsx(ne,{icon:r,className:"mr-2"}),f.value!==n&&c.jsx("span",{className:"mr-4"}),f.title]},m))}return d.push(c.jsx("hr",{className:"cs-divider"},"option-divider")),d.push(c.jsxs("button",{type:"button",value:ui,className:$("cs-option-btn",{"keyboard-active":s}),onClick:this.handleOptionClick,onFocus:this.handleOptionFocus,children:[!l&&n!==null?c.jsx(ne,{icon:r,className:"mr-2"}):c.jsx("span",{className:"mr-4"}),i]},"option-custom-label")),d.push(c.jsxs("div",{className:"cs-custom-container",children:[c.jsx("span",{className:"mr-2"}),c.jsx(gt,{ref:this.input,onChange:this.handleCustomInput,value:o,onFocus:()=>this.setState({inputFocused:!0}),onBlur:()=>this.setState({inputFocused:!1})},"option-input"),c.jsx("span",{className:"ml-2"})]},"cs-custom-container")),d.push(c.jsx("hr",{className:"mb-2"},"option-end")),d}render(){var{disabled:e,invalid:n,value:r,"data-testid":i}=this.props,{menuIsOpen:a}=this.state,{popperOptions:o}=this.props;return o=sb({placement:"bottom-end",modifiers:{preventOverflow:{enabled:!1}}},o),c.jsx("div",{className:"input-group cs-container context-menu",ref:this.csContainer,"data-testid":i,children:c.jsx("div",{className:$("input-group-append cs-dropdown",{"cs-dropdown-invalid":n}),children:c.jsxs("button",{type:"button",className:$("btn cs-btn form-control",{"cs-btn-invalid":n}),ref:this.button,onClick:this.toggleMenu,disabled:e,children:[c.jsx("span",{className:$({"text-muted":r===null}),children:this.getSelectedText()}),c.jsx("span",{className:"cs-caret"}),c.jsx(ka,{isShown:a,actions:{menuElement:this.renderMenuElement()},popperOptions:o,popperClassName:"CustomTimeSelect",onMenuOpened:this.handleMenuOpened,onMenuClosed:this.handleMenuExited,menuStyle:{maxWidth:"100rem"}})]})})})}}be(ie,"MENU_NAVIGATION_DIRECTION",us);be(ie,"DROP_DOWN_MENU_HEIGHT",125);be(ie,"defaultProps",{onChange(){},value:null,disabled:!1,popperOptions:{},icon:Qu,customText:"Custom",placeholder:"Select a time",valueToTime:t=>t===null?0:Math.round(t/1e3),timeToValue:t=>t*1e3,invalid:!1,"data-testid":void 0});var cb=Y.module("DateInput"),db="[12][0-9]{3}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])",pb=["2000-01-01","2022-12-31"],fb="YYYY-MM-DD",cs=W.forwardRef((t,e)=>{var{className:n="",onChange:r=()=>{},defaultValue:i="",onFocus:a=()=>{},onBlur:o=()=>{},"data-testid":s}=t,[l,d]=u.useState(i),[p,f]=u.useState(),m=u.useCallback(h=>{cb.debug("handleChange",h),d(h),r(h)},[r]);return c.jsx("div",{className:"d-flex flex-row align-items-center",children:c.jsx(Bn,{ref:e,className:$(n),example:pb,getNextSegmentValue:qh,onChange:m,onSelect:f,pattern:db,placeholder:fb,selection:p,value:l,onFocus:a,onBlur:o,"data-testid":s})})});cs.displayName="DateInput";var hb={CYCLE_TO_NEXT_STACK:Se.createAndAdd({id:"NAVIGATION.CYCLE_TO_NEXT_STACK",name:"Cycle To Next Stack",shortcut:[X.CTRL,re.SINGLE_QUOTE],macShortcut:[X.CMD,re.SINGLE_QUOTE],isEditable:!0}),CYCLE_TO_PREVIOUS_STACK:Se.createAndAdd({id:"NAVIGATION.CYCLE_TO_PREVIOUS_STACK",name:"Cycle To Previous Stack",shortcut:[X.CTRL,re.SEMICOLON],macShortcut:[X.CMD,re.SEMICOLON],isEditable:!0}),CYCLE_TO_NEXT_TAB:Se.createAndAdd({id:"NAVIGATION.CYCLE_TO_NEXT_TAB",name:"Cycle To Next Tab",shortcut:[X.CTRL,X.SHIFT,re.DOUBLE_QUOTE],macShortcut:[X.CMD,X.SHIFT,re.SINGLE_QUOTE],isEditable:!0}),CYCLE_TO_PREVIOUS_TAB:Se.createAndAdd({id:"NAVIGATION.CYCLE_TO_PREVIOUS_TAB",name:"Cycle To Previous Tab",shortcut:[X.CTRL,X.SHIFT,re.COLON],macShortcut:[X.CMD,X.SHIFT,re.SEMICOLON],isEditable:!0}),CYCLE_TO_NEXT_DASHBOARD:Se.createAndAdd({id:"NAVIGATION.CYCLE_TO_NEXT_DASHBOARD",name:"Cycle To Next Dashboard",shortcut:[X.CTRL,re.PERIOD],macShortcut:[X.CMD,re.PERIOD],isEditable:!0}),CYCLE_TO_PREVIOUS_DASHBOARD:Se.createAndAdd({id:"NAVIGATION.CYCLE_TO_PREVIOUS_DASHBOARD",name:"Cycle To Previous Dashboard",shortcut:[X.CTRL,re.COMMA],macShortcut:[X.CMD,re.COMMA],isEditable:!0})};function mb(t){var{isInvalid:e=!1,items:n,onAdd:r=()=>{},onDelete:i=()=>{},validate:a=()=>null}=t,[o,s]=u.useState(null),[l,d]=u.useState([]),[p,f]=u.useState(""),m=u.useCallback(O=>{d(O)},[]),h=u.useCallback(()=>{i(vr.getItemsInRanges(n,l)),d([])},[n,l,i]),g=u.useCallback(()=>{if(p!==""){var O=a(p);O==null?(r(p),f("")):s(O)}},[p,r,a]),b=u.useCallback(O=>{var{value:w}=O.target;f(w),s(w===""?null:a(w))},[a]),x=u.useCallback(()=>{d([])},[]),v=u.useCallback(O=>{O.key==="Enter"&&g()},[g]),y=u.useMemo(()=>14+fa(n.length,1,6)*Qt.DEFAULT_ROW_HEIGHT,[n.length]);return c.jsxs("div",{className:$("editable-item-list-container",{"is-invalid":e}),children:[c.jsx("div",{style:{height:y},children:c.jsx(Qt,{itemCount:n.length,items:n.map((O,w)=>({value:O,isSelected:vr.isSelected(l,w)})),offset:0,selectedRanges:l,onSelectionChange:m,isMultiSelect:!0})}),c.jsxs("div",{className:"d-flex flex-row pt-2",children:[c.jsx("div",{className:"d-flex flex-grow-1",children:c.jsx("input",{className:$("form-control",{"is-invalid":o!=null}),placeholder:"Enter value",type:"text",value:p,onChange:b,onFocus:x,onKeyDown:v})}),c.jsxs("div",{className:"d-flex align-items-start mt-1 ml-2",children:[c.jsx(Q,{kind:"ghost",onClick:g,disabled:o!=null||p==="",icon:Ju,tooltip:"Add new item","data-testid":"add-item-button"}),c.jsx(Q,{kind:"ghost",onClick:h,disabled:l.length===0,icon:Oa,tooltip:"Delete selected items","data-testid":"delete-item-button"})]})]})]})}function gb(t){var{message:e,isExpanded:n=!1,type:r="Error",onDismiss:i}=t,[a,o]=u.useState(!1),[s,l]=u.useState(!1),d=u.useRef(null),p=u.useRef(null),f=u.useCallback(()=>{if(!(s||n||p.current==null)){var h=p.current.scrollHeight>p.current.clientHeight;o(h)}},[s,n]),m=Ge(f,100);return _t(d.current,m),u.useLayoutEffect(m,[m]),c.jsxs("div",{className:$("error-view",{expanded:s||n}),ref:d,children:[c.jsxs("div",{className:"error-view-header",children:[c.jsxs("div",{className:"error-view-header-text",children:[c.jsx(ne,{icon:Zu}),c.jsx("span",{children:r})]}),c.jsxs("div",{className:"error-view-buttons",children:[c.jsx(_a,{UNSAFE_className:"error-view-copy-button",tooltip:"Copy error contents",copy:"".concat(r,": ").concat(e).trim()}),(a||s)&&!n&&c.jsx(Q,{kind:"danger",className:"error-view-expand-button",onClick:()=>{l(!s)},icon:s?ec:tc,children:s?"Show Less":"Show More"}),i!=null&&c.jsx(Q,{kind:"danger",className:"error-view-dismiss-button",onClick:i,icon:wn,children:"Dismiss"})]})]}),c.jsx("pre",{className:"error-view-text",ref:p,children:e})]})}function vb(t,e,n){return(e=yb(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function yb(t){var e=bb(t,"string");return typeof e=="symbol"?e:e+""}function bb(t,e){if(typeof t!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var r=n.call(t,e);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}class De extends u.Component{static isParentSelected(e,n){var r=n.get(e);if(r===void 0)return!1;if(typeof r=="boolean")return r;var i=Array.from(r.values()).includes(!0),a=Array.from(r.values()).includes(!1);return i&&a?null:i}constructor(e){super(e),this.toggleMenu=this.toggleMenu.bind(this),this.toggleValueFor=this.toggleValueFor.bind(this),this.selectAll=this.selectAll.bind(this),this.clear=this.clear.bind(this),this.state={menuIsOpen:!1}}toggleMenu(e){e.stopPropagation(),e.preventDefault(),this.setState(n=>{var{menuIsOpen:r}=n;return{menuIsOpen:!r}})}toggleValueFor(e,n){var{valueMap:r,onUpdateValueMap:i}=this.props,a=new Map(r),o=a.get(e);if(o instanceof Map){var s=new Map(o);if(n!=null)s.set(n,o.get(n)!==!0);else{var l=De.isParentSelected(e,a),d=l==null||!l;o.forEach((m,h)=>s.set(h,d))}a.set(e,s)}else a.set(e,o==null||!o);var p=a.get(e);if(n===void 0&&p!==void 0&&typeof p!="boolean"){var f=De.isParentSelected(e,r);f!=null&&f?p.forEach((m,h)=>p.set(h,!1)):p.forEach((m,h)=>p.set(h,!0))}i(a)}setAllValues(e){var{valueMap:n,onUpdateValueMap:r}=this.props,i=new Map;n.forEach((a,o)=>{if(typeof a=="boolean")i.set(o,e);else{var s=new Map;a.forEach((l,d)=>s.set(d,e)),i.set(o,s)}}),r(i)}selectAll(){this.setAllValues(!0)}clear(){this.setAllValues(!1)}renderMenuElement(){var{valueMap:e,"data-testid":n}=this.props;return c.jsxs("div",{className:"hcm-menu-container",children:[Array.from(e.entries()).map(r=>{var[i,a]=r;return c.jsxs("div",{children:[c.jsx(Jt,{className:"hcm-parent",checked:De.isParentSelected(i,e),onChange:()=>this.toggleValueFor(i),children:i}),a!==void 0&&typeof a!="boolean"&&Array.from(a.entries()).map(o=>{var[s,l]=o;return c.jsx(Jt,{className:"hcm-child",checked:l,onChange:()=>this.toggleValueFor(i,s),children:s},s)})]},i)}),c.jsx(Q,{kind:"ghost",onClick:this.selectAll,"data-testid":n!==void 0?"".concat(n,"-btn-select-all"):void 0,children:"Select All"}),c.jsx(Q,{kind:"ghost",onClick:this.clear,"data-testid":n!==void 0?"".concat(n,"-btn-clear"):void 0,children:"Clear"})]})}render(){var{menuText:e,className:n,icon:r,id:i,"data-testid":a}=this.props,{menuIsOpen:o}=this.state;return c.jsxs("button",{type:"button",className:$("btn hcm-btn",n),onClick:this.toggleMenu,id:i,"data-testid":a,children:[c.jsxs("span",{children:[r&&c.jsx(ne,{icon:r,className:"hcm-icon mr-1"}),e]}),c.jsx("span",{className:"cs-caret"}),c.jsx(Tt,{options:{placement:"bottom"},isShown:o,onExited:()=>{this.setState({menuIsOpen:!1})},closeOnBlur:!0,interactive:!0,children:this.renderMenuElement()})]})}}vb(De,"defaultProps",{className:"",icon:null,id:"","data-testid":void 0});function ci(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function Wt(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?ci(Object(n),!0).forEach(function(r){Pb(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):ci(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function Pb(t,e,n){return(e=xb(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function xb(t){var e=Ob(t,"string");return typeof e=="symbol"?e:e+""}function Ob(t,e){if(typeof t!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var r=n.call(t,e);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}var ds=u.memo(t=>{var{tab:e,onClose:n,onSelect:r,isActive:i,activeRef:a,index:o,isDraggable:s,contextActions:l,renderAfterTabContent:d}=t,{key:p,isClosable:f=n!=null,title:m,icon:h}=e,g;return h!=null&&(g=W.isValidElement(h)?h:c.jsx(ne,{icon:h})),c.jsx(Fl,{draggableId:p,index:o,isDragDisabled:!s,children:(b,x)=>c.jsxs("div",{className:"context-menu-wrapper",ref:i?a:null,children:[c.jsxs("div",Wt(Wt(Wt({ref:b.innerRef},b.draggableProps),b.dragHandleProps),{},{className:$("btn btn-link btn-nav-tab",{active:i},{dragging:x.isDragging}),"data-testid":"btn-nav-tab-".concat(m),role:"tab",tabIndex:0,onAuxClick:v=>{f&&v.button===1&&v.buttons===0&&(n==null||n(p))},onClick:v=>{if(f&&v.button===1&&v.buttons===0){n==null||n(p);return}v.button===0&&v.buttons===0&&(v.target.focus(),r(p))},onKeyPress:v=>{v.key==="Enter"&&r(p)},children:[g,c.jsxs("span",{className:"btn-nav-tab-title",children:[m,c.jsx(Ze,{children:m})]}),d==null?void 0:d(e),f&&c.jsx(Q,{kind:"ghost",className:"btn-nav-tab-close",onClick:v=>{n==null||n(p),v.stopPropagation(),v.preventDefault()},icon:wn,tooltip:"Close"})]})),c.jsx(jt,{actions:l})]})},p)});ds.displayName="NavTab";function ps(t){var{onSelect:e,tabs:n=Ra}=t,[r,i]=u.useState(""),[a,o]=u.useState(0),s=u.useRef(null),l=u.useRef(null),d=u.useRef([]);u.useEffect(()=>{var v;(v=s.current)===null||v===void 0||v.focus()},[]),u.useEffect(()=>{o(0)},[r]),u.useEffect(()=>{if(a>=0&&d.current[a]){var v;(v=d.current[a])===null||v===void 0||v.scrollIntoView({behavior:"auto",block:"nearest"})}},[a]);var p=u.useCallback(v=>{i(v.target.value)},[]),f=u.useCallback(v=>{e(v)},[e]),m=u.useCallback(v=>{v.preventDefault()},[]),h=u.useMemo(()=>n.filter(v=>v.title.toLowerCase().includes(r.toLowerCase())),[r,n]).sort((v,y)=>{var O;return(O=v.title.localeCompare(y.title))!==null&&O!==void 0?O:0}),g=u.useCallback(v=>{if(v.key==="ArrowDown"&&h.length>0)v.preventDefault(),o(O=>O===-1?0:(O+1)%h.length);else if(v.key==="ArrowUp"&&h.length>0)v.preventDefault(),o(O=>O===-1?h.length-1:(O-1+h.length)%h.length);else if(v.key==="Enter"&&h.length>0){v.preventDefault();var y=a>=0?a:0;f(h[y])}else v.key==="Tab"&&v.preventDefault()},[h,a,f]),b=u.useMemo(()=>h.map((v,y)=>{var O;return c.jsx("li",{ref:w=>{d.current[y]=w},onMouseDown:m,children:c.jsxs(Q,{kind:"ghost","data-testid":"dashboard-list-item-".concat((O=v.key)!==null&&O!==void 0?O:"","-button"),onClick:()=>f(v),className:a===y?"focused":"",style:{transition:"none"},children:[v.icon?c.jsx("span",{className:"dashboard-list-item-icon",children:W.isValidElement(v.icon)?v.icon:c.jsx(ne,{icon:v.icon})}):null,v.title]})},v.key)}),[h,f,a,m]),x=u.useMemo(()=>b.length===0?c.jsx("span",{children:"No open dashboard found."}):null,[b]);return c.jsxs("div",{className:"dashboard-list-container d-flex flex-column",children:[c.jsx("div",{className:"dashboard-list-header",children:c.jsx(jn,{value:r,placeholder:"Find open dashboard",endPlaceholder:It.OPEN_DASHBOARD_LIST.getDisplayText(),onChange:p,onKeyDown:g,ref:s})}),c.jsxs("ul",{className:"dashboard-list flex-grow-1",ref:l,children:[x&&c.jsx("li",{className:"dashboard-list-message",children:x}),!x&&b]})]})}function di(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function pi(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?di(Object(n),!0).forEach(function(r){Sb(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):di(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function Sb(t,e,n){return(e=wb(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function wb(t){var e=Cb(t,"string");return typeof e=="symbol"?e:e+""}function Cb(t,e){if(typeof t!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var r=n.call(t,e);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}var Eb=500,Tb=.01,jb=5e-4;function fi(t){return t.scrollLeft===0}function hi(t){return Math.abs(t.scrollLeft+t.clientWidth-t.scrollWidth)<=1||t.scrollWidth===0}function Ib(t,e,n){var{isClosable:r=!1,key:i}=t,a=[];if(r&&n!=null){a.push({title:"Close",order:10,group:20,action:()=>{n(i)}});for(var o=!0,s=e.length-1;s>0&&e[s].key!==t.key;s-=1)if(e[s].isClosable===!0){o=!1;break}a.push({title:"Close to the Right",order:20,group:20,action:()=>{for(var l=e.length-1;l>0&&e[l].key!==i;l-=1)e[l].isClosable===!0&&n(e[l].key)},disabled:o}),a.push({title:"Close All",order:30,group:20,action:()=>{e.forEach(l=>{l.isClosable===!0&&n(l.key)})}})}return a}function kb(t){var{activeKey:e,tabs:n,onSelect:r,onReorder:i,onClose:a,makeContextActions:o,renderAfterTabContent:s}=t,l=u.useRef(),[d,p]=u.useState(!0),[f,m]=u.useState(!1),[h,g]=u.useState(!0),[b,x]=u.useState(!0),v=u.useCallback(()=>{l.current!=null&&(l.current.clientWidth<l.current.scrollWidth&&n.length>0?p(!0):p(!1),g(fi(l.current)),x(hi(l.current)))},[n]);_t(l.current,v);var y=u.useCallback(I=>{nn.stopDragging(),I.destination&&(i==null||i(I.source.index,I.destination.index))},[i]),O=u.useCallback(()=>{if(l.current!=null){var I=fi(l.current);I!==h&&g(I);var S=hi(l.current);S!==b&&x(S)}},[h,b]),w=u.useRef({cancelClick:!1}),P=u.useCallback(()=>{if(!(l.current==null||w.current.cancelClick))for(var{children:I}=l.current,S=I.length-1;S>=0;S-=1){var k=I[S];if(k.offsetLeft<l.current.scrollLeft-5){k.scrollIntoView({behavior:"smooth",block:"nearest",inline:"start"});return}}},[]),C=u.useCallback(()=>{if(!(l.current==null||w.current.cancelClick))for(var{children:I}=l.current,S=0;S<I.length;S+=1){var k=I[S];if(k.offsetLeft+k.offsetWidth-5>l.current.scrollLeft+l.current.offsetWidth){k.scrollIntoView({behavior:"smooth",block:"nearest",inline:"end"});return}}},[]),_=u.useCallback(function(I,S){var k=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,E=arguments.length>3?arguments[3]:void 0,F=l.current;F!=null&&(w.current.cancelClick=!0,I==="left"?F.scrollLeft=S-k:I==="right"&&(F.scrollLeft=S+k),w.current.rAF=requestAnimationFrame(H=>{var le=E??H,J=H-le,z=Tb*J+.5*jb*J**2;z=Math.min(z,F.scrollWidth),_(I,S,z,le)}))},[]),j=u.useCallback(()=>{var{holdTimer:I,rAF:S}=w.current;I!=null&&(clearTimeout(I),w.current.holdTimer=void 0),S!=null&&(cancelAnimationFrame(S),w.current.rAF=void 0),window.removeEventListener("mouseup",j)},[]);u.useEffect(()=>()=>window.removeEventListener("mouseup",j),[j]);var D=u.useCallback(I=>{l.current!=null&&(w.current.holdTimer=window.setTimeout(_,Eb,I,l.current.scrollLeft)),w.current.cancelClick=!1,window.addEventListener("mouseup",j)},[j,_]),R=u.useCallback(()=>{D("left")},[D]),N=u.useCallback(()=>{D("right")},[D]);u.useEffect(function(){var S,k=E=>{E.stopPropagation(),E.preventDefault();var F=E.currentTarget,H=Math.abs(E.deltaY)>Math.abs(E.deltaX)?E.deltaY:E.deltaX;F.scrollLeft+=fa(H,-30,30)};return(S=l.current)===null||S===void 0||S.addEventListener("wheel",k),()=>{var E;(E=l.current)===null||E===void 0||E.removeEventListener("wheel",k)}},[]);var T=u.useMemo(()=>{var I=new Map;return n.forEach(S=>{var{key:k}=S,E=[()=>Ib(S,n,a),()=>{var F;return(F=o==null?void 0:o(S))!==null&&F!==void 0?F:[]}];I.set(k,E)}),I},[o,n,a]),L=u.useRef(null),A=n.find(I=>I.key===e),B=n.map((I,S)=>{var{key:k}=I,E=I===A;return c.jsx(ds,{tab:I,index:S,isActive:E,activeRef:L,onSelect:r,onClose:a,isDraggable:i!=null,contextActions:T.get(k),renderAfterTabContent:s},k)});u.useEffect(function(){L.current!=null&&L.current.scrollIntoView({block:"nearest",inline:"nearest"})},[e]);var Z=()=>{m(!f)},K=I=>{m(!1),r(I.key)},U=()=>{m(!1)};return c.jsxs("nav",{className:"nav-container",children:[d&&c.jsx(Q,{kind:"ghost",icon:c.jsx(ne,{icon:nc,transform:"grow-4"}),className:"tab-controls-btn tab-controls-btn-left",tooltip:"Scroll left",onClick:P,onMouseDown:R,disabled:h}),c.jsx(Nl,{onDragStart:nn.startDragging,onDragEnd:y,children:c.jsx($l,{droppableId:"droppable-tab-navigation",direction:"horizontal",children:(I,S)=>c.jsxs("div",pi(pi({ref:k=>{k!=null&&(l.current=k,I.innerRef(k))}},I.droppableProps),{},{className:$("nav nav-tabs",{dragging:S.draggingFromThisWith}),role:"tablist",onScroll:O,children:[B,I.placeholder]}))})}),d&&c.jsx(Q,{kind:"ghost",icon:c.jsx(ne,{icon:rc,transform:"grow-4"}),className:"tab-controls-btn tab-controls-btn-right",tooltip:"Scroll right",onClick:C,onMouseDown:N,disabled:b}),c.jsx(Q,{kind:"ghost",icon:c.jsx(ne,{icon:ic,transform:"grow-4"}),className:"btn-dashboard-list-menu btn-show-dashboard-list",tooltip:"Search open dashboards",onClick:Z,disabled:n.length<2,style:{visibility:d?"visible":"hidden",marginLeft:"auto"},children:c.jsx(Tt,{isShown:f,className:"dashboard-list-menu-popper",onExited:U,options:{placement:"bottom-start"},closeOnBlur:!0,interactive:!0,children:c.jsx(ps,{tabs:n,onSelect:K})})}),c.jsx(jt,{actions:[{action:()=>{m(!f)},shortcut:It.OPEN_DASHBOARD_LIST,isGlobal:!0}]})]})}var _b=.025,Rb=.9,Db=.1,Lb=.618,mi=80,ke={SIZE:8,DOT_SIZE:2},he=18,Ab=250,Mb=60*1e3,Fb={background:"var(--dh-color-random-area-plot-animation-bg)",foregroundFill:"var(--dh-color-random-area-plot-animation-fg-fill)",foregroundStroke:"var(--dh-color-random-area-plot-animation-fg-stroke)",gridColor:"var(--dh-color-random-area-plot-animation-grid)"};function Nb(){return Sa(Fb)}var fs=W.memo(()=>{var{activeThemes:t}=wt(),e=u.useMemo(Nb,[t]),n=u.useRef(null),r=u.useRef(null),[i,a]=u.useState(!1),o=window.devicePixelRatio,s,l,d,p,f,m=null,h=[];function g(){var T;r.current!=null&&(d=r.current.offsetWidth,p=r.current.offsetHeight),n.current!=null&&(n.current.style.width="".concat(d,"px"),n.current.style.height="".concat(p,"px"),n.current.width=d*o,n.current.height=p*o),(T=s)===null||T===void 0||T.scale(o,o)}function b(){var{foregroundFill:T,foregroundStroke:L}=e,A=document.createElement("canvas");A.width=ke.SIZE,A.height=ke.SIZE;var B=A.getContext("2d");return B!=null&&(B.fillStyle=L,B.fillRect(0,0,ke.DOT_SIZE,ke.DOT_SIZE),B.fillStyle=T,B.fillRect(0,0,ke.SIZE,ke.SIZE)),B==null?void 0:B.createPattern(A,"repeat")}function x(T){var L=Math.random()-.5,A=_b*L;return T<Db?A=Math.abs(A):T>Rb&&(A=-Math.abs(A)),T+A}function v(){for(var T=[],L=Lb,A=0;A<d+he;A+=1)L=x(L),T.push(L);return T}function y(){for(;h.length>=d+he;)h.pop();for(;h.length<d+he;)h.push(x(h[h.length-1]))}function O(T,L){L.beginPath(),L.moveTo(-1,p+1),L.lineTo(-1,p*T[0]);for(var A=0;A<T.length;A+=1)L.lineTo(A,p*T[A]);L.lineTo(d+he,p*T[T.length-1]),L.lineTo(d+he,p+1),L.closePath()}function w(T){T.beginPath();for(var L=1;L<d;L+=mi)T.moveTo(L,0),T.lineTo(L,p);for(var A=1;A<p;A+=mi)T.moveTo(0,A),T.lineTo(d,A)}function P(T){m=m??T;var{background:L,foregroundStroke:A,gridColor:B}=e;xt(s),s.fillStyle=L,s.fillRect(0,0,d,p),w(s),s.lineWidth=1,s.strokeStyle=B,s.stroke();var Z=((m??0)-(T??0))/(1e3/he);if(s.translate(Z,0),O(h,s),s.lineWidth=2,s.strokeStyle=A,s.stroke(),s.translate(-Z,0),l!=null&&(s.fillStyle=l),s.fill(),s.setTransform(o,0,0,o,0,0),(T??0)-(m??0)>1e3/he){for(var K=Math.floor(((T??0)-(m??0))/(1e3/he)),U=0;U<K;U+=1)h.shift(),h.push(x(h[h.length-1]));m=T}f!=null&&cancelAnimationFrame(f),f=requestAnimationFrame(P)}var C=He(()=>{f=requestAnimationFrame(T=>{g(),y(),a(!1),P(T)})},Ab,{leading:!0});function _(){a(!0),f!=null&&cancelAnimationFrame(f),f=null,m=null}var j=He(()=>{_()},Mb);function D(){f==null&&(a(!1),g(),y(),f=requestAnimationFrame(P)),j()}function R(){document.hasFocus()&&D()}function N(){f!=null&&cancelAnimationFrame(f),j(),C()}return u.useEffect(()=>{var T;return s=(T=n.current)===null||T===void 0?void 0:T.getContext("2d",{alpha:!1}),g(),h=v(),l=b(),P(),j(),window.addEventListener("resize",N),window.addEventListener("focus",D),window.addEventListener("blur",_),window.addEventListener("mousemove",R),window.addEventListener("keydown",R),()=>{f!=null&&cancelAnimationFrame(f),window.removeEventListener("resize",N),window.removeEventListener("focus",D),window.removeEventListener("blur",_),window.removeEventListener("mousemove",R),window.removeEventListener("keydown",R),j.cancel(),C.cancel()}},[e]),c.jsx("div",{className:"random-area-plot-animation-container",ref:r,children:c.jsx("canvas",{ref:n,className:i?"shade":""})})});function hs(t){var{text:e,placement:n="top-start"}=t,r=u.useMemo(()=>({placement:n}),[n]);return c.jsxs(c.Fragment,{children:[c.jsx(Et,{UNSAFE_className:$n.spectrumEllipsis,children:e??c.jsx(c.Fragment,{children:" "})}),e==null||e===""?null:c.jsx(Ze,{options:r,children:e})]})}var $b=["scrollRef","getItemDisplayText","getKey"];function gi(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function vi(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?gi(Object(n),!0).forEach(function(r){Ub(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):gi(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function Ub(t,e,n){return(e=Bb(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function Bb(t){var e=Wb(t,"string");return typeof e=="symbol"?e:e+""}function Wb(t,e){if(typeof t!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var r=n.call(t,e);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function Kb(t,e){if(t==null)return{};var n,r,i=Vb(t,e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);for(r=0;r<a.length;r++)n=a[r],e.indexOf(n)===-1&&{}.propertyIsEnumerable.call(t,n)&&(i[n]=t[n])}return i}function Vb(t,e){if(t==null)return{};var n={};for(var r in t)if({}.hasOwnProperty.call(t,r)){if(e.indexOf(r)!==-1)continue;n[r]=t[r]}return n}function Hb(t){var{scrollRef:e,getItemDisplayText:n,getKey:r}=t,i=Kb(t,$b),a=u.useCallback(o=>{var s=r(o),l=n(o);return c.jsx(yt,{textValue:l??String(s),children:c.jsx(hs,{text:l})},s)},[n,r]);return c.jsx(yn,vi(vi({},i),{},{ref:e,menuTrigger:"focus",onSelectionChange:i.onSelectionChange,children:a}))}var Gb=500;function Yb(t){var{heading:e,content:n,delayMs:r=Gb}=t,[i,a]=u.useState(!1);return u.useEffect(()=>{window.setTimeout(()=>{a(!0)},r)},[r]),i?c.jsxs(ha,{children:[c.jsx(Qe,{size:"XXL",children:c.jsx(ne,{icon:ac})}),c.jsx(Tn,{children:e}),n==null?null:c.jsx(bn,{children:n})]}):null}const ms={"handle-size":"15px","popover-width":"90px"};var lt=parseInt(ms["handle-size"],10),yi=parseInt(ms["popover-width"],10),ae=24*60*60-1,bi=5*60;function zb(t){var{startTime:e,endTime:n,onChange:r,isStartModified:i=!1,isEndModified:a=!1,"data-testid":o}=t,[s,l]=u.useState(e),[d,p]=u.useState(n),f=u.useRef(null);u.useEffect(function(){l(e),p(n)},[e,n]);var m=u.useCallback((b,x)=>{var v=b,y=x;v===y&&(y<ae?y+=1:v-=1),l(v),p(y),r({startTime:v,endTime:y})},[l,p,r]),h=u.useCallback(b=>{m(b,d)},[m,d]),g=u.useCallback(b=>{m(s,b)},[m,s]);return c.jsxs("div",{className:"time-slider","data-testid":o,children:[c.jsx(qb,{startTime:s,endTime:d,onStartTimeChange:h,onEndTimeChange:g,isStartModified:i,isEndModified:a}),c.jsxs("div",{className:"track",ref:f,children:[c.jsx(Xb,{startTime:s,endTime:d}),c.jsx("div",{className:"ticks",children:Array(24).fill(null).map((b,x)=>c.jsx("div",{className:"tick"},x))}),c.jsx(Pi,{track:f,time:s,setTime:h}),c.jsx(Pi,{track:f,time:d,setTime:g})]}),c.jsxs("div",{className:"tick-labels",children:[c.jsx("div",{className:"tick-label",children:"0:00"}),c.jsx("div",{className:"tick-label-wrapper",children:Array(24).fill(null).map((b,x)=>c.jsx("div",{className:"tick-label",children:"".concat(x+1,":00")},x))})]})]})}function qb(t){var{startTime:e,endTime:n,onStartTimeChange:r,onEndTimeChange:i,isStartModified:a,isEndModified:o,"data-testid":s}=t,l=e>n,[d,p]=u.useState(l?n:e),[f,m]=u.useState(l?e:n),h=u.useRef(null),g=u.useRef(null),b=u.useRef(null),x=u.useRef(null);u.useEffect(function(){p(e>n?n:e),m(e>n?e:n)},[e,n]),u.useEffect(function(){if(b.current!==null){var C;(C=g.current)===null||C===void 0||C.setSelection(b.current)}if(x.current!==null){var _;(_=h.current)===null||_===void 0||_.setSelection(x.current)}},[l]);function v(P){e<=n?r(P):i(P)}function y(P){e<=n?i(P):r(P)}var O=u.useCallback(P=>{b.current=P,x.current=null},[]),w=u.useCallback(P=>{b.current=null,x.current=P},[]);return c.jsxs("div",{className:"time-slider-popovers",children:[c.jsx("div",{className:"flex",style:{flexBasis:"calc(".concat(d/ae*100,"% - ").concat(yi/2,"px)")}}),c.jsxs("div",{className:"handle-popper",children:[c.jsx("label",{className:$({modified:l?o:a}),children:l?"End Time":"Start Time"}),c.jsx(gt,{ref:h,allowValueWrapping:!1,value:d,onChange:v,onSelect:O,"data-testid":s!==void 0?"".concat(s,"-input-1"):void 0})]}),c.jsx("div",{className:"flex-spacer"}),c.jsxs("div",{className:"handle-popper",children:[c.jsx("label",{className:$({modified:l?a:o}),children:l?"Start Time":"End Time"}),c.jsx(gt,{ref:g,allowValueWrapping:!1,value:f,onChange:y,onSelect:w,"data-testid":s!==void 0?"".concat(s,"-input-2"):void 0})]}),c.jsx("div",{className:"flex",style:{flexBasis:"calc(".concat((ae-f)/ae*100,"% - ").concat(yi/2,"px)")}})]})}function Xb(t){var{startTime:e,endTime:n,"data-testid":r}=t;return c.jsxs("div",{className:"track-fills","data-testid":r,children:[e>n&&c.jsxs(c.Fragment,{children:[c.jsx("div",{className:"track-fill track-fill-start",style:{transform:"scaleX(".concat(n/ae,")")}}),c.jsx("div",{className:"track-fill track-fill-end",style:{transform:"scaleX(".concat((ae-e)/ae,")")}})]}),e<n&&c.jsx("div",{className:"track-fill track-fill-middle",style:{transform:"translateX(".concat(e/ae*100,"%) scaleX(").concat((n-e)/ae,")")}})]})}function Pi(t){var{track:e,time:n,setTime:r,"data-testid":i}=t,a=u.useMemo(()=>{var m=3600,h=lt/2;return n<m?h=n/m*(lt/2):n>23*m&&(h=lt/2+1/(ae-23*m)*(n-23*m)*(lt/2)),"translateX(calc(".concat(n/ae*100,"% - ").concat(h,"px))")},[n]),o=u.useCallback(m=>{if(!e.current)return 0;var h=e.current.getBoundingClientRect(),g=Math.max(m-h.left,0),b=ae*Math.min(1,g/h.width),x=bi*Math.round(b/bi),v=Math.min(ae,x);return v},[e]),s=u.useCallback(m=>{var{clientX:h}=m;r(o(h))},[r,o]),l=u.useCallback(m=>{var{clientX:h}=m;r(o(h)),window.removeEventListener("mousemove",s),window.removeEventListener("mouseup",l),document.documentElement.classList.remove("drag-pointer-events-none")},[r,o,s]),d=u.useCallback(()=>{window.addEventListener("mousemove",s),window.addEventListener("mouseup",l),document.documentElement.classList.add("drag-pointer-events-none")},[s,l]),p=u.useCallback(()=>{window.removeEventListener("mousemove",s),window.removeEventListener("mouseup",l),document.documentElement.classList.remove("drag-pointer-events-none")},[s,l]),f=u.useCallback(()=>{d()},[d]);return u.useEffect(function(){return()=>{p()}},[p]),c.jsx("div",{className:"handle-track",style:{transform:a},children:c.jsx("button",{className:"handle",type:"button","aria-label":"Change time",onMouseDown:f,"data-testid":i})})}function gs(t){var{buttons:e,isShown:n=!1,classNames:r,message:i,type:a,onClick:o,onDismiss:s,"data-testid":l}=t,d=u.useRef(null),p=e&&e.length!==0;return c.jsx(pa,{in:n,timeout:Xt.transitionMs,classNames:"toast-notification-slide-up",mountOnEnter:!0,unmountOnExit:!0,nodeRef:d,children:c.jsxs("div",{ref:d,className:$("toast-notification",r,a),role:"presentation",onClick:o,onKeyPress:o,"data-testid":l,children:[c.jsx("div",{className:"message-container",children:c.jsx("span",{className:"message",children:i})}),c.jsx(In,{in:p,timeout:Xt.transitionSlowMs,mountOnEnter:!0,unmountOnExit:!0,children:c.jsx("div",{className:"buttons-container",children:e})}),s&&c.jsx(Q,{kind:"ghost",icon:wn,tooltip:"Close notification",className:"my-2",onClick:s})]})})}gs.TYPE=Object.freeze({ERROR:"error"});const Qb=Object.freeze(Object.defineProperty({__proto__:null,ACTION_ICON_HEIGHT:Un,Accordion:Ul,ActionBar:da,ActionButton:bt,ActionButtonDialogTrigger:ts,ActionGroup:Xh,ActionMenu:Qh,AlertDialog:Bl,AutoCompleteInput:ce,AutoResizeTextarea:Hy,Avatar:Wl,Badge:Kl,BasicModal:Da,Breadcrumbs:Vl,BulkActionBar:Xy,Button:Q,ButtonGroup:ca,CSS_VAR_EXPRESSION_PREFIX:oc,Calendar:Hl,CardFlip:Af,Checkbox:Jt,CheckboxGroup:Sy,Collapse:qe,ColorEditor:Gl,ColorPicker:Yl,ColorValues:vd,ComboBox:Jh,ComboBoxNormalized:qo,ConfirmActionButton:Dy,ConfirmationDialog:ns,Content:bn,ContextActionUtils:ve,ContextActions:jt,ContextMenuItem:Ia,ContextMenuRoot:ss,ContextualHelp:zl,ContextualHelpTrigger:ql,CopyButton:_a,CustomTimeSelect:ie,DEFAULT_DARK_THEME_KEY:sc,DEFAULT_DARK_THEME_PALETTE:lc,DEFAULT_GET_PREFERRED_REPLACEMENT_STRING:So,DEFAULT_LIGHT_THEME_KEY:uc,DEFAULT_PRELOAD_DATA_VARIABLES:cc,DH_CSS_VAR_NAME_REGEXP:dc,DH_VAR_PREFIX:pc,DashboardList:ps,DateField:Xl,DateInput:cs,DatePicker:Ql,DateRangePicker:Jl,DateTimeInput:Zh,DebouncedModal:as,DebouncedSearchInput:yd,Dialog:sa,DialogContainer:Zl,DialogTrigger:oa,Disclosure:eu,DisclosurePanel:tu,DisclosureTitle:nu,Divider:la,DragUtils:nn,DraggableItemList:em,DropdownMenu:ka,EXTERNAL_THEME_KEY:fc,EditableItemList:mb,ErrorBoundary:bd,ErrorView:gb,FadeTransition:In,Flex:ra,FontBootstrap:Yo,FontsLoaded:zo,FontsLoadedContext:Rt,Footer:ru,Form:ua,GLOBAL_SHORTCUTS:It,Grid:iu,Header:au,Heading:Tn,HierarchicalCheckboxMenu:De,ITEM_EMPTY_STRING_TEXT_VALUE:tm,Icon:Qe,IconActionButton:rs,IllustratedMessage:ha,Image:ou,InfoModal:os,InlineAlert:su,Item:yt,ItemContent:nm,ItemList:Qt,ItemListItem:Pd,ItemTooltip:rm,KEY:re,Keyboard:lu,LIST_VIEW_ROW_HEIGHTS:wo,LabeledValue:uu,Link:ma,ListActionGroup:im,ListActionMenu:am,ListView:Ov,ListViewNormalized:Xo,ListViewWrapper:zn,LoadingOverlay:je,LoadingSpinner:Pt,LogicButton:cu,Logo:rv,MODIFIER:X,MSG_REQUEST_GET_THEME:hc,MSG_REQUEST_SET_THEME:Pa,MaskedInput:Bn,Menu:om,MenuItem:sm,MenuTrigger:du,Meter:pu,Modal:On,ModalBody:Sn,ModalFooter:La,ModalHeader:wa,MultiSelect:Qn,MultiSelectNormalized:Zo,NAVIGATION_SHORTCUTS:hb,NON_WHITESPACE_REGEX:mc,NavTabList:kb,NumberField:fu,Option:Co,PICKER_ITEM_HEIGHTS:lm,PICKER_TOP_OFFSET:um,PRELOAD_TRANSPARENT_THEME_QUERY_PARAM:gc,Page:cm,Picker:dm,PickerNormalized:pm,Popper:Tt,ProgressBar:hu,ProgressCircle:aa,Radio:mu,RadioGroup:gu,RandomAreaPlotAnimation:fs,RangeCalendar:vu,RangeSlider:yu,SVG_ICON_MANUAL_COLOR_MAP:vc,SearchField:bu,SearchInput:jn,SearchableCombobox:Hb,Section:fm,Select:Aa,SelectValueList:Eo,Shortcut:xd,ShortcutRegistry:Se,SlideTransition:hm,Slider:Pu,SocketedButton:Mf,SpectrumButton:zt,SpectrumCheckbox:Yt,SpectrumComboBox:yn,SpectrumMenu:xu,SplitButtonGroup:Od,Stack:mm,StatusLight:Ou,SubmenuTrigger:Su,Switch:wu,TABLE_ROW_HEIGHT:gm,THEME_CACHE_LOCAL_STORAGE_KEY:yc,THEME_KEY_OVERRIDE_QUERY_PARAM:bc,TMP_CSS_PROP_PREFIX:Pc,TRANSPARENT_PRELOAD_DATA_VARIABLES:xc,TabList:Cu,TabPanels:kg,TableViewEmptyState:Yb,Tabs:Eu,TagGroup:Tu,Text:Et,TextArea:ju,TextField:Iu,TextWithTooltip:hs,ThemeContext:Sd,ThemeExport:Xt,ThemePicker:nv,ThemeProvider:Ma,TimeField:ku,TimeInput:gt,TimeSlider:zb,ToastContainer:_u,ToastNotification:gs,ToastQueue:Ru,ToggleButton:Du,Tooltip:Ze,UISwitch:wd,View:es,WHITESPACE_REGEX:Oc,Well:Lu,XComponentMapContext:Cd,XComponentMapProvider:Ed,baseStyleProps:Au,calculatePreloadStyleContent:Sc,canHaveRef:Fa,colorValueStyle:oe,createCssVariableResolver:wc,createPreloadStyleElement:Cc,createXComponent:Td,extractDistinctCssVariableExpressions:Ec,fillToLength:vm,getActiveThemes:Tc,getDefaultBaseThemes:jc,getDefaultSelectedThemeKey:Ic,getExpressionRanges:kc,getItemKey:ht,getItemTextValue:Oo,getPositionOfSelectedItemElement:ym,getThemeKey:_c,getThemeKeyOverride:Rc,getThemePreloadData:Dc,isBaseThemeKey:Lc,isClassComponent:jd,isDHColorValue:Id,isExternalThemeData:xa,isExternalThemeEnabled:Pn,isForwardRefComponentType:kd,isItemElement:mt,isItemElementWithDescription:bm,isItemOrSection:Pm,isNormalizedItemsWithKeysList:xm,isNormalizedSection:tn,isPreloadTransparentTheme:Ac,isSectionElement:Nn,isValidColorVar:Mc,isWrappedComponent:Na,itemSelectionToStringSet:Ve,normalizeTooltipOptions:et,overrideSVGFillColors:Fc,parseExternalThemeData:ya,preloadTheme:Nc,replaceSVGFillColor:$c,requestExternalThemeData:ba,resolveCssVariablesInRecord:Sa,resolveCssVariablesInString:Uc,separateSpectrumProps:Ho,setThemePreloadData:Bc,themeDHDefault:Wc,themeDark:Kc,themeLight:Vc,trimTrailingMask:Om,useExternalTheme:Go,useOnChangeTrackUncontrolled:Sm,usePickerItemScale:Wn,usePickerNormalizedProps:xo,usePickerProps:wm,usePickerScrollOnOpen:Cm,useRenderNormalizedItem:Fn,useSpectrumThemeProvider:An,useStaticItemInitialScrollPosition:Em,useStringifiedMultiSelection:Yn,useStringifiedSelection:Tm,useStyleProps:Mu,useTheme:wt,useXComponent:_d,viewStyleProps:Fu,wrapIcon:jm,wrapItemChildren:Mn,wrapPrimitiveWithText:Im},Symbol.toStringTag,{value:"Module"}));var vs=W.memo(t=>{var{children:e,onError:n,widget:r}=t,[i,a]=kn(r);return a!=null?(n==null||n(a),null):i==null?null:c.jsx(Cn.Provider,{value:i,children:e})});vs.displayName="DeferredApiBootstrap";var Dt=u.createContext(null);Dt.displayName="ObjectFetchManagerContext";function ys(t){var[e,n]=u.useState({status:"loading"}),r=u.useContext(Dt);return u.useEffect(()=>{if(r==null){n({error:new Error("No ObjectFetchManager available in context"),status:"error"});return}return n(i=>i.status==="loading"?i:{status:"loading"}),r.subscribe(t,n)},[t,r]),e}function xi(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function Oi(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?xi(Object(n),!0).forEach(function(r){Jb(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):xi(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function Jb(t,e,n){return(e=Zb(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function Zb(t){var e=e0(t,"string");return typeof e=="symbol"?e:e+""}function e0(t,e){if(typeof t!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var r=n.call(t,e);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function Si(t,e,n,r,i,a,o){try{var s=t[a](o),l=s.value}catch(d){return void n(d)}s.done?e(l):Promise.resolve(l).then(r,i)}function t0(t){return function(){var e=this,n=arguments;return new Promise(function(r,i){var a=t.apply(e,n);function o(l){Si(a,r,i,o,s,"next",l)}function s(l){Si(a,r,i,o,s,"throw",l)}o(void 0)})}}var ut=Y.module("useWidget");function n0(t){var[e,n]=u.useState(()=>({widget:null,error:null})),r=ys(t),[i,a]=kn(t),o=Pe(),s=i??o;u.useEffect(function(){ut.debug("loadWidget",t);var{status:p}=r;if(p==="error"){n({widget:null,error:r.error});return}if(p==="loading"){n({widget:null,error:null});return}var{fetch:f}=r,m=!1;function h(){return g.apply(this,arguments)}function g(){return g=t0(function*(){try{xt(f);var b=yield f();if(m){ut.debug2("loadWidgetInternal cancelled",t,b),b.close(),"exportedObjects"in b&&b.exportedObjects.forEach(x=>{x.close()});return}ut.debug("loadWidgetInternal done",t,b),n({widget:b,error:null})}catch(x){if(m)return;ut.error("loadWidgetInternal error",t,x),n({widget:null,error:x??new Error("Null error")})}}),g.apply(this,arguments)}return h(),()=>{m=!0}},[t,r]);var l=u.useMemo(()=>{var d;return Oi(Oi({},e),{},{error:(d=e.error)!==null&&d!==void 0?d:a,api:e.widget!=null?s:null})},[e,s,a]);return l}const r0=Object.freeze(Object.defineProperty({__proto__:null,ApiBootstrap:Hc,ApiContext:Cn,ClientBootstrap:Ea,ClientContext:Zc,DeferredApiBootstrap:vs,DeferredApiContext:Ff,ObjectFetchManagerContext:Dt,ObjectFetcherContext:$a,getVariableDescriptor:Rd,isIdVariableDescriptor:Dd,isNameVariableDescriptor:Ld,isVariableDescriptor:Ad,sanitizeVariableDescriptor:Ua,useApi:Pe,useClient:Je,useDeferredApi:kn,useObjectFetch:ys,useObjectFetcher:Md,useWidget:n0},Symbol.toStringTag,{value:"Module"}));function i0(t){return function(n){var{children:r}=n;return c.jsx(Cn.Provider,{value:t,children:r})}}var bs="io.deephaven.message.LoginOptions.request",Ps="io.deephaven.message.SessionDetails.request",xs="io.deephaven.broadcast",Jn="io.deephaven.broadcast.Login",Os="io.deephaven.broadcast.Logout";function Ss(t){return Ot(t)&&t.message===Jn}function ws(t){return Ot(t)&&t.message===Os}function a0(t,e,n){return(e=o0(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function o0(t){var e=s0(t,"string");return typeof e=="symbol"?e:e+""}function s0(t,e){if(typeof t!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var r=n.call(t,e);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}class Cs extends Error{constructor(){super(...arguments),a0(this,"isNoConsolesError",!0)}}function Es(t){return t.isNoConsolesError}function wi(t,e,n,r,i,a,o){try{var s=t[a](o),l=s.value}catch(d){return void n(d)}s.done?e(l):Promise.resolve(l).then(r,i)}function Lt(t){return function(){var e=this,n=arguments;return new Promise(function(r,i){var a=t.apply(e,n);function o(l){wi(a,r,i,o,s,"next",l)}function s(l){wi(a,r,i,o,s,"throw",l)}o(void 0)})}}var Ke=Y.module("SessionUtils");function Ts(t,e,n){return an.apply(this,arguments)}function an(){return an=Lt(function*(t,e,n){Ke.info("Getting console types...");var r=yield e.getConsoleTypes();if(r.length===0)throw new Cs("No console types available");Ke.info("Available types:",r);var i=r[0];Ke.info("Starting session with type",i);var a=yield e.startSession(i),o={type:i,id:vn()};return Ke.info("Console session established",o),{session:a,config:o,connection:e,details:n,dh:t}}),an.apply(this,arguments)}function l0(t,e,n){return Ke.info("createCoreClient",e),new t.CoreClient(e,n)}function u0(t){return t!=null&&typeof t=="object"}function c0(){return on.apply(this,arguments)}function on(){return on=Lt(function*(){var t=yield En(Ps);if(!u0(t))throw new Error("Unexpected session details response: ".concat(t));return t}),on.apply(this,arguments)}function d0(){return sn.apply(this,arguments)}function sn(){return sn=Lt(function*(){var t=new URLSearchParams(window.location.search);switch(t.get("authProvider")){case"parent":return c0()}return{}}),sn.apply(this,arguments)}function p0(t,e,n){return ln.apply(this,arguments)}function ln(){return ln=Lt(function*(t,e,n){var r;try{r=yield Ts(t,e,n)}catch(i){if(!Es(i))throw i}return r}),ln.apply(this,arguments)}const f0=Object.freeze(Object.defineProperty({__proto__:null,BROADCAST_CHANNEL_NAME:xs,BROADCAST_LOGIN_MESSAGE:Jn,BROADCAST_LOGOUT_MESSAGE:Os,BooleanColumnFormatter:Nf,CharColumnFormatter:$f,DateTimeColumnFormatter:Fd,DateUtils:Uf,DecimalColumnFormatter:Nd,DefaultColumnFormatter:Bf,FETCH_TIMEOUT:ed,Formatter:_n,FormatterUtils:en,ITEM_KEY_PREFIX:Wf,IntegerColumnFormatter:$d,LOGIN_OPTIONS_REQUEST:bs,NewTableColumnTypes:Ud,NoConsolesError:Cs,SESSION_DETAILS_REQUEST:Ps,StringColumnFormatter:Kf,TableColumnFormatter:Bd,TableUtils:so,createComboboxFilterArgs:Vf,createCoreClient:l0,createFilterConditionFactory:Rn,createFormatterFromSettings:Hf,createKeyedItemKey:Dn,createNotNullOrEmptyFilterCondition:lo,createOnTableUpdatedHandler:Gf,createSearchTextFilter:uo,createSelectedValuesFilter:Ln,createSessionWrapper:Ts,createShowOnlyEmptyFilterCondition:co,createValueFilter:po,defaultRowDeserializer:Yf,fetchVariableDefinition:td,fetchVariableDefinitionByPredicate:nd,generateEmptyKeyedItems:zf,getColumnFormats:qf,getDateTimeFormatterOptions:Xf,getSessionDetails:d0,getSize:Qf,getWindowParent:xn,isBroadcastLoginMessage:Ss,isBroadcastLogoutMessage:ws,isClosed:Jf,isCustomColumnFormatDefined:Zf,isMessage:Ot,isNoConsolesError:Es,isResponse:Gc,isSortDirection:eh,loadSessionWrapper:p0,makeMessage:Ca,makeResponse:Yc,padFirstAndLastRow:th,requestParentResponse:En},Symbol.toStringTag,{value:"Module"}));function h0(t,e,n){return(e=m0(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function m0(t){var e=g0(t,"string");return typeof e=="symbol"?e:e+""}function g0(t,e){if(typeof t!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var r=n.call(t,e);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}class v0 extends Error{constructor(){super(...arguments),h0(this,"isColumnNameError",!0)}}function y0(t,e,n){return(e=b0(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function b0(t){var e=P0(t,"string");return typeof e=="symbol"?e:e+""}function P0(t,e){if(typeof t!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var r=n.call(t,e);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}class x0 extends Error{constructor(){super(...arguments),y0(this,"isTableDisconnectError",!0)}}var ct=Y.module("useTable"),js=(t,e,n,r)=>{var i=Pe(),[a,o]=u.useState(void 0),[s,l]=u.useState([]),[d,p]=u.useState(null),[f,m]=u.useState(null);u.useEffect(()=>{if(r===void 0){o(t==null?void 0:t.columns),p(null);return}try{o(t==null?void 0:t.findColumns(r)),p(null)}catch(x){ct.error("Column not found",x,r),p(new v0("Invalid columnNames argument"))}},[t,r]),u.useEffect(()=>{if(!a||!t){ct.debug2("Table or column not initialized, skip viewport update.");return}ct.debug2("Setting viewport",e,n),t.setViewport(e,n,a)},[a,t,e,n]);var h=u.useCallback(x=>{var{detail:v}=x;if(!a){ct.error("Columns not initialized.");return}var y=a.map(O=>v.rows.map(w=>w.get(O)));l(y)},[a]),g=u.useCallback(()=>{m(new x0("Table disconnected"))},[]),b=u.useCallback(()=>{m(null)},[]);return pt(t,i.Table.EVENT_UPDATED,h),pt(t,i.Table.EVENT_DISCONNECT,g),pt(t,i.Table.EVENT_RECONNECT,b),{columns:a,data:s,error:f??d}},Is=(t,e,n,r)=>{var i=u.useMemo(()=>[r],[r]),{columns:a=[],data:o=[],error:s}=js(t,e,n,i);return{column:a[0],data:o[0],error:s}};function Ci(t,e,n,r,i,a,o){try{var s=t[a](o),l=s.value}catch(d){return void n(d)}s.done?e(l):Promise.resolve(l).then(r,i)}function O0(t){return function(){var e=this,n=arguments;return new Promise(function(r,i){var a=t.apply(e,n);function o(l){Ci(a,r,i,o,s,"next",l)}function s(l){Ci(a,r,i,o,s,"throw",l)}o(void 0)})}}var de=Y.module("TableInput"),Kt=250;function S0(t){var e,n,{className:r=void 0,columnName:i,settings:a,defaultValue:o=[],isInvalid:s=!1,onChange:l=se,onBlur:d=se,table:p}=t,f=u.useRef(null),m=Pe(),h=u.useMemo(()=>{var S=en.getColumnFormats(a),k=en.getDateTimeFormatterOptions(a),{defaultDecimalFormatOptions:E={},defaultIntegerFormatOptions:F={}}=a;return new _n(m,S,k,E,F)},[m,a]),[g,b]=u.useState(""),[x,v]=u.useState(new Set(o)),[y,O]=u.useState(),w=u.useRef(null),P=Math.min((e=y==null?void 0:y.size)!==null&&e!==void 0?e:0,Kt),{column:C,data:_,error:j}=Is(y,0,Kt-1,i),D=u.useCallback(S=>C?h.getFormattedString(S,C.type,C.name):"".concat(S),[C,h]),[R,N]=u.useMemo(()=>{var S=new Set(x),k=[];if(_==null)return[k,null];if(_.forEach(F=>{var H="".concat(F),le=x.has(H);le&&S.delete(H),k.push({value:H,displayValue:D(F),isSelected:le})}),S.size>0){de.debug2("Selection has items that are missing from the viewport");var E=new Set(x);return Array.from(S).forEach(F=>{E.delete(F)}),[k,E]}return[k,null]},[_,x,D]);u.useEffect(()=>{N!==null&&(v(N),l(Array.from(N)))},[l,N]);var T=u.useCallback(function(){var S=O0(function*(k){try{var E=yield k;de.debug("Table resolved",E),O(E)}catch(F){if(Ee.isCanceled(F))return;de.error(F)}});return function(k){return S.apply(this,arguments)}}(),[]);u.useEffect(()=>{var S=Ee.makeCancelable(p);return T(S),()=>{de.debug2("Cancel table promise"),S.cancel()}},[p,T]);var L=u.useCallback(S=>{var{value:k}=S.target;b(k);var E=R.findIndex(H=>H.displayValue.includes(k));if(E>-1){var F;de.debug2("Found ".concat(k," at index ").concat(E)),(F=w.current)===null||F===void 0||F.scrollIntoView(E)}else de.debug2("".concat(k," not found"))},[R,w]),A=u.useCallback(S=>{if(de.debug("handleSelect",S),S>=R.length){de.error("Invalid index",S);return}var k=R[S].value,E=new Set(x);R[S].isSelected?E.delete(k):E.add(k),v(E),l(Array.from(E))},[l,R,x]),B=u.useCallback(()=>{var S=R.map(E=>E.value),k=new Set(S);v(k),l(S)},[R,l]),Z=u.useCallback(()=>{v(new Set),l([])},[l]),K=u.useCallback(()=>{},[]),U=u.useCallback(S=>{var k,{relatedTarget:E}=S;de.debug("handleChildBlur",E,E instanceof HTMLElement,f.current,(k=f.current)===null||k===void 0?void 0:k.contains(E)),(!E||f.current&&E instanceof HTMLElement&&!f.current.contains(E))&&d()},[d]),I=R.length===0;return c.jsxs("div",{ref:f,className:$("table-input-container d-flex flex-column position-relative",r),children:[c.jsx(jn,{disabled:!!j||I,value:g,placeholder:"Search",onChange:L,className:"mb-2 d-flex",onBlur:U}),c.jsx(Eo,{className:"table-input-list",disabled:y===void 0||I,isInvalid:s,items:I?[{value:"Empty",isSelected:!1}]:R,itemCount:P,offset:0,onSelect:A,onViewportChange:K,ref:w,onBlur:U}),y&&c.jsxs("div",{className:"meta-row",children:[c.jsx("div",{className:"d-flex align-items-center text-muted small",children:y!=null&&y.size>P&&c.jsxs(c.Fragment,{children:["Table is too large, showing the first ",Kt," items."]})}),c.jsxs("div",{children:[c.jsx("button",{type:"button",className:"btn btn-link",onBlur:U,onClick:B,children:"Select All"}),c.jsx("button",{type:"button",className:"btn btn-link mr-a",onBlur:U,onClick:Z,children:"Clear"})]})]}),y==null||j&&c.jsx("div",{className:"h-100 w-100 position-absolute",children:c.jsx(je,{isLoaded:y!=null,isLoading:y==null&&j==null,errorMessage:(n=j==null?void 0:j.message)!==null&&n!==void 0?n:null,"data-testid":"table-input-loading"})})]})}var w0=["table","keyColumn","labelColumn","iconColumn","settings","onChange","onSelectionChange"];function Ei(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function Ti(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?Ei(Object(n),!0).forEach(function(r){C0(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Ei(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function C0(t,e,n){return(e=E0(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function E0(t){var e=T0(t,"string");return typeof e=="symbol"?e:e+""}function T0(t,e){if(typeof t!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var r=n.call(t,e);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function ji(t,e,n,r,i,a,o){try{var s=t[a](o),l=s.value}catch(d){return void n(d)}s.done?e(l):Promise.resolve(l).then(r,i)}function Ii(t){return function(){var e=this,n=arguments;return new Promise(function(r,i){var a=t.apply(e,n);function o(l){ji(a,r,i,o,s,"next",l)}function s(l){ji(a,r,i,o,s,"throw",l)}o(void 0)})}}function j0(t,e){if(t==null)return{};var n,r,i=I0(t,e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);for(r=0;r<a.length;r++)n=a[r],e.indexOf(n)===-1&&{}.propertyIsEnumerable.call(t,n)&&(i[n]=t[n])}return i}function I0(t,e){if(t==null)return{};var n={};for(var r in t)if({}.hasOwnProperty.call(t,r)){if(e.indexOf(r)!==-1)continue;n[r]=t[r]}return n}var k0=Y.module("jsapi-components.useMultiPickerProps");function _0(t){var e,{table:n,keyColumn:r,labelColumn:i,iconColumn:a,settings:o,onChange:s,onSelectionChange:l}=t,d=j0(t,w0),{itemHeight:p}=Wn(),{getFormattedString:f,timeZone:m}=Kn(o),{data:h}=Te(so.copyTableAndApplyFilters,[n]);Vn(h);var g=u.useMemo(()=>h==null?null:km(h,r),[r,h]),b=u.useMemo(()=>h==null||g==null?null:_m(h,g,i),[g,i,h]),x=u.useMemo(()=>b==null?[]:[b.name],[b]),v=To({table:h,iconColumnName:a,keyColumnName:r,labelColumnName:i,formatValue:f}),{onScroll:y,onSearchTextChange:O,viewportData:w}=jo({reuseItemsOnTableResize:!0,table:h,itemHeight:p,deserializeRow:v,searchColumnNames:x,timeZone:m}),P=Pe(),C=pe(),_=u.useMemo(()=>{if(h==null||g==null)return[];var K=[g];if(b!=null&&b!==g&&K.push(b),a!=null)try{var U=h.findColumn(a);K.push(U)}catch{}return K},[h,g,b,a]),j=(e=d.selectedKeys)!==null&&e!==void 0?e:d.defaultSelectedKeys,D=u.useRef(new Set),[R,N]=u.useState(new Map);u.useEffect(()=>{D.current=new Set,N(new Map)},[h]),u.useEffect(function(){if(!(h==null||g==null||j==null||j==="all")){var U=[...j].filter(E=>!D.current.has(String(E)));if(U.length!==0){var I=!1,S=h.findColumn(g.name),k=C.getValueType(S.type);return Ii(function*(){try{var E=[];if(yield Promise.all(U.map(function(){var J=Ii(function*(z){if(!I){var ee=yield h.seekRow(0,S,k,z);ee!==-1&&E.push(ee)}});return function(z){return J.apply(this,arguments)}}())),E.sort((J,z)=>J-z),I||E.length===0)return;var F=P.RangeSet.ofItems(E),H=yield h.createSnapshot({rows:F,columns:_});if(I)return;var le=new Map;H.rows.forEach((J,z)=>{var ee=E[z],te=v(J);le.set(ee,{key:Dn(ee),item:te})}),I||(U.forEach(J=>D.current.add(String(J))),N(J=>{var z=new Map(J);return le.forEach((ee,te)=>z.set(te,ee)),z}))}catch(J){k0.error("Error loading labels for selected keys",J)}})(),()=>{I=!0}}}},[j,h,g,C,P,v,_]);var T=u.useRef(new Map),[L,A]=u.useState(new Map),B=u.useMemo(()=>R.size===0?w.items:w.items.map((K,U)=>{if(K.item==null){var I=R.get(U);if(I!=null)return I}return K}),[w.items,R]);u.useEffect(function(){var U,I=(U=d.selectedKeys)!==null&&U!==void 0?U:d.defaultSelectedKeys,S;I instanceof Array?S=new Set(I.map(String)):I==="all"?S=null:S=new Set;var k=!1;B.forEach(E=>{if(E.item!=null){var F=String(E.item.key),H=E.item.textValue;H!=null&&(S==null||S.has(F))&&T.current.get(F)!==H&&(T.current.set(F,H),k=!0)}}),k&&A(new Map(T.current))},[B,d.selectedKeys,d.defaultSelectedKeys]);var Z=u.useCallback(K=>{var U;(U=s??l)===null||U===void 0||U(K)},[s,l]);return Ti(Ti({},d),{},{normalizedItems:B,selectedItemLabels:L,showItemIcons:a!=null,onChange:Z,onScroll:y,onSearchTextChange:O})}var R0=["onInputChange","onSearchTextChange"];function ki(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function _i(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?ki(Object(n),!0).forEach(function(r){D0(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):ki(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function D0(t,e,n){return(e=L0(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function L0(t){var e=A0(t,"string");return typeof e=="symbol"?e:e+""}function A0(t,e){if(typeof t!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var r=n.call(t,e);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function M0(t,e){if(t==null)return{};var n,r,i=F0(t,e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);for(r=0;r<a.length;r++)n=a[r],e.indexOf(n)===-1&&{}.propertyIsEnumerable.call(t,n)&&(i[n]=t[n])}return i}function F0(t,e){if(t==null)return{};var n={};for(var r in t)if({}.hasOwnProperty.call(t,r)){if(e.indexOf(r)!==-1)continue;n[r]=t[r]}return n}function N0(t){var e=Rm(t),{onInputChange:n,onSearchTextChange:r}=e,i=M0(e,R0),a=u.useRef(!1),o=u.useRef(""),s=u.useCallback(d=>{n==null||n(d),a.current?r(d):(r(""),o.current=d)},[n,r]),l=u.useCallback((d,p)=>{var f;(f=i.onOpenChange)===null||f===void 0||f.call(i,d),d?p==="input"&&r(o.current):r(""),a.current=d},[r,i]);return c.jsx(qo,_i(_i({},i),{},{onInputChange:s,onOpenChange:l}))}var $0=["table","keyColumn","labelColumn","iconColumn","settings"];function Ri(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function Di(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?Ri(Object(n),!0).forEach(function(r){U0(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Ri(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function U0(t,e,n){return(e=B0(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function B0(t){var e=W0(t,"string");return typeof e=="symbol"?e:e+""}function W0(t,e){if(typeof t!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var r=n.call(t,e);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function K0(t,e){if(t==null)return{};var n,r,i=V0(t,e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);for(r=0;r<a.length;r++)n=a[r],e.indexOf(n)===-1&&{}.propertyIsEnumerable.call(t,n)&&(i[n]=t[n])}return i}function V0(t,e){if(t==null)return{};var n={};for(var r in t)if({}.hasOwnProperty.call(t,r)){if(e.indexOf(r)!==-1)continue;n[r]=t[r]}return n}function H0(t){var e,{table:n,keyColumn:r,labelColumn:i,iconColumn:a,settings:o}=t,s=K0(t,$0),{scale:l}=An(),d=wo[(e=s.density)!==null&&e!==void 0?e:"regular"][l],{getFormattedString:p}=Kn(o),f=To({table:n,iconColumnName:a,keyColumnName:r,labelColumnName:i,formatValue:p}),{viewportData:m,onScroll:h}=Hn({reuseItemsOnTableResize:!0,table:n,itemHeight:d,deserializeRow:f});return c.jsx(Xo,Di(Di({},s),{},{normalizedItems:m.items,showItemIcons:a!=null,onScroll:h}))}var G0=["onInputChange","onOpenChange","onSearchTextChange"];function Li(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function Ai(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?Li(Object(n),!0).forEach(function(r){Y0(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Li(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function Y0(t,e,n){return(e=z0(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function z0(t){var e=q0(t,"string");return typeof e=="symbol"?e:e+""}function q0(t,e){if(typeof t!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var r=n.call(t,e);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function X0(t,e){if(t==null)return{};var n,r,i=Q0(t,e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);for(r=0;r<a.length;r++)n=a[r],e.indexOf(n)===-1&&{}.propertyIsEnumerable.call(t,n)&&(i[n]=t[n])}return i}function Q0(t,e){if(t==null)return{};var n={};for(var r in t)if({}.hasOwnProperty.call(t,r)){if(e.indexOf(r)!==-1)continue;n[r]=t[r]}return n}function J0(t){var e=_0(t),{onInputChange:n,onOpenChange:r,onSearchTextChange:i}=e,a=X0(e,G0),o=u.useRef(!1),s=u.useRef(""),l=u.useCallback(p=>{n==null||n(p),o.current?i(p):(i(""),s.current=p)},[n,i]),d=u.useCallback(p=>{r==null||r(p),p?s.current!==""&&i(s.current):i(""),o.current=p},[i,r]);return c.jsx(Zo,Ai(Ai({},a),{},{onInputChange:l,onOpenChange:d}))}function Z0(t){return typeof t=="object"&&t!=null&&"equals"in t&&typeof t.equals=="function"}function eP(t){return"".concat(t)}function tP(t){var{column:e,table:n,filter:r=Ra,onChange:i,selectedValue:a,disabled:o,className:s,formatValue:l=eP,maxSize:d=1e3}=t,p=Pe(),[f,m]=u.useState([]);u.useEffect(()=>{if(n==null){m([]);return}var x=e??n.columns[0];n.applyFilter(r);var v=n.setViewport(0,d,[x]);return v.addEventListener(p.Table.EVENT_UPDATED,y=>{var{detail:O}=y,w=O.rows.map(P=>{var C;return(C=P.get(x))!==null&&C!==void 0?C:null});m(w)}),()=>{v.close()}},[e,p,r,d,n]);var h=u.useMemo(()=>a===void 0?[void 0,...f]:f,[a,f]),g=u.useMemo(()=>h.findIndex(x=>x===a||Z0(x)&&x.equals(a)),[a,h]),b=u.useCallback(x=>{var v=parseInt(x,10);i(h[v])},[i,h]);return c.jsx(Aa,{className:s,value:g,onChange:b,disabled:o,children:h.map((x,v)=>c.jsx(Co,{value:v,children:l(x)},"".concat(v)))})}var Mi=Y.module("useBroadcastChannel");function Zn(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:se,e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:xs,n=u.useMemo(()=>new BroadcastChannel(e),[e]);return u.useEffect(()=>()=>{n.close()},[n]),u.useEffect(()=>{function r(i){var{data:a}=i;if(!Ot(a)){Mi.debug("Ignoring non-deephaven message",a);return}Mi.debug("event received",a),t(i)}return n.addEventListener("message",r),()=>{n.removeEventListener("message",r)}},[n,t]),n}function er(t,e){var n=u.useCallback(r=>{Ss(r.data)?t==null||t(r.data):ws(r.data)&&(e==null||e(r.data))},[t,e]);Zn(n)}function nP(t,e,n,r){var i=pe(),[a,o]=u.useState(""),{value:s}=tt(a,n),l=u.useCallback(m=>{o(m.trim())},[]),{data:d,isLoading:p}=Te(i.doesColumnValueExist,[t,e,s,r]),f=p||a!==s?null:d;return{valueTrimmed:a,valueTrimmedDebounced:s,valueExists:f,trimAndUpdateValue:l}}var Fi=Y.module("useDebouncedViewportSearch"),rP=200;function iP(t,e){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:rP,r=pe(),{table:i,applyFiltersAndRefresh:a}=t,o=u.useMemo(()=>He(s=>{if(Fi.debug("Applying debounced searchText '".concat(s,"'")),i!=null){var l=s.trim();if(l===""){a([]);return}var d=i.findColumn(e),p=r.makeFilterValue(d.type,l),f=[d.filter().contains(p)];a(f)}},n),[a,e,n,i,r]);return u.useEffect(()=>()=>{Fi.debug("Cancelling debounced search function"),o.cancel()},[o]),o}var ks=300;function aP(t){var{viewportData:e,columnName:n,shouldSelectAllOnNoSelection:r,mapItemToValue:i}=t,a=pe(),o=Bo(e,i,Dn),{value:s}=tt(o,ks),l=$o(s,Ao);return u.useMemo(()=>Ln(a,n,l.selection,r,l.isInverted),[n,l,r,a])}function oP(t,e,n,r){var i=u.useRef("");return i.current=n,u.useMemo(()=>{var a=t.length>0&&t[0].item==null;return!a&&r!=null&&(i.current===""||r.toLowerCase().includes(i.current.toLowerCase()))?[{key:r,item:{[e]:r}},...t]:t},[r,e,t])}function Ni(t,e,n,r,i,a,o){try{var s=t[a](o),l=s.value}catch(d){return void n(d)}s.done?e(l):Promise.resolve(l).then(r,i)}function sP(t){return function(){var e=this,n=arguments;return new Promise(function(r,i){var a=t.apply(e,n);function o(l){Ni(a,r,i,o,s,"next",l)}function s(l){Ni(a,r,i,o,s,"throw",l)}o(void 0)})}}function lP(t){var{table:e,columnName:n,defaultValue:r,itemHeight:i,topOffset:a=0,value:o}=t;return u.useCallback(sP(function*(){if(e==null||o===""||o===r)return a;var s=e.findColumn(n),l=yield e.seekRow(0,s,"String",o),d=r==null?0:1;return(l+d)*i+a}),[n,r,i,e,a,o])}function uP(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"or",n=pe(),r=u.useMemo(()=>lo(n),[n]);return u.useMemo(()=>Rn(t,r,e),[t,e,r])}function cP(t){var{maybeTable:e,columnName:n,mapItemToValue:r,filterConditionFactories:i=[],trimSearchText:a=!1,timeZone:o}=t,{itemHeight:s}=Wn(),l=pe(),[d,p]=u.useState(""),[f,m]=u.useState(""),h=u.useCallback(S=>{m(a?S.trim():S)},[a]),g=u.useMemo(()=>a?d.trim():d,[d,a]),[b,x]=u.useState(null),[v,y]=u.useState(()=>new Map),{data:O,isLoading:w}=Te(l.doesColumnValueExist,[e,n,f,!1]),{isDebouncing:P}=tt(f,xr),C=P||w?null:O,_=u.useMemo(()=>uo(l,n,f,o),[f,n,l,o]),j=u.useMemo(()=>Ln(l,n,new Set(v.keys()),!1,!0),[n,v,l]),{data:D}=Te(l.createDistinctSortedColumnTable,[e,n,"asc",...i]);Vn(D);var R=Hn({table:D,itemHeight:s,viewportSize:Dm,viewportPadding:Lm}),N=g.length>0&&R.size===0,T=v.has(g),L=Ge(h,xr),A=u.useCallback(S=>{p(S),L(S)},[L]),B=Ge(x,0),Z=u.useCallback(S=>{if(p(""),h(""),x(S),B(null),S!=null){var k=R.viewportData.findItem(S);if(k!=null){var E=r(k);y(F=>{var H=new Map(F);return H.set(E,{value:E}),H})}}},[h,B,R.viewportData,r]),K=u.useCallback(S=>{y(k=>{if(S.size===0)return k;var E=new Map(k);for(var F of S)E.set(F,{value:F});return E})},[]),U=u.useCallback(S=>{y(k=>{if(S==="all")return new Map;var E=new Map(k);for(var F of S)E.delete(F);return E})},[]),I=Io(R.table,_,j);return ko(R,I),u.useMemo(()=>({list:R,hasSearchTextWithZeroResults:N,searchText:d,searchTextExists:C,searchTextIsInSelectedValues:T,selectedKey:b,selectedValueMap:v,onSearchTextChange:A,onSelectKey:Z,onAddValues:K,onRemoveValues:U}),[N,R,K,U,A,Z,d,C,T,b,v])}function $i(t,e,n,r,i,a,o){try{var s=t[a](o),l=s.value}catch(d){return void n(d)}s.done?e(l):Promise.resolve(l).then(r,i)}function dP(t){return function(){var e=this,n=arguments;return new Promise(function(r,i){var a=t.apply(e,n);function o(l){$i(a,r,i,o,s,"next",l)}function s(l){$i(a,r,i,o,s,"throw",l)}o(void 0)})}}function pP(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),r=1;r<e;r++)n[r-1]=arguments[r];var i=u.useCallback(dP(function*(){var d;return(d=t==null?void 0:t.selectDistinct(t.findColumns(n)))!==null&&d!==void 0?d:null}),[t,...n]),{data:a,error:o,isError:s,isLoading:l}=Te(i,[]);return u.useEffect(()=>()=>{a==null||a.close()},[a]),{distinctTable:a,error:o,isError:s,isLoading:l}}function fP(t,e){var n=pe(),r=u.useMemo(()=>co(n,t),[t,n]);return u.useMemo(()=>Rn(e,r),[e,r])}function hP(t,e,n){var r=pe();return u.useMemo(()=>po(r,t,e,n),[t,n,r,e])}const mP=Object.freeze(Object.defineProperty({__proto__:null,ComboBox:N0,DEBOUNCE_MS:ks,ListView:H0,MultiSelect:J0,Picker:Am,TableDropdown:tP,TableInput:S0,makeApiContextWrapper:i0,useBroadcastChannel:Zn,useBroadcastLoginListener:er,useCheckIfExistsValue:nP,useDebouncedViewportSearch:iP,useDebouncedViewportSelectionFilter:aP,useFilterConditionFactories:Io,useFilteredItemsWithDefaultValue:oP,useFormatter:Kn,useGetItemIndexByValue:Mm,useGetItemPosition:lP,useInitializeViewportData:Fm,useNotNullOrEmptyFilter:uP,usePickerWithSelectedValues:cP,useSearchableViewportData:jo,useSelectDistinctTable:pP,useSetPaddedViewportCallback:Nm,useShowOnlyEmptyFilter:fP,useTable:js,useTableClose:$m,useTableColumn:Is,useTableListener:pt,useTableSize:Um,useTableUtils:pe,useValueFilter:hP,useViewportData:Hn,useViewportFilter:ko,useWidgetClose:Vn},Symbol.toStringTag,{value:"Module"}));function _s(t){var{isEnabled:e,isPending:n,themeData:r}=Go();return u.useMemo(()=>e?n?null:r?[r]:[]:t==null?null:Ba(t),[e,n,r,t])}function gP(t){var{dashboardProps:e,componentName:n,component:r,supportedTypes:i,hydrate:a,dehydrate:o}=t,{id:s,layout:l,registerComponent:d}=e,p=u.useCallback(f=>{var{dragEvent:m,panelId:h=vn(),widget:g}=f,{name:b,type:x}=g,v=x!=null&&(Array.isArray(i)&&i.includes(x)||x===i);if(v){var y={localDashboardId:s,metadata:g};a!=null&&(y=a(y,s));var O={type:"react-component",component:n,props:y,title:b??void 0,id:h},{root:w}=l;Wa.openComponent({root:w,config:O,dragEvent:m})}},[n,a,s,l,i]);fo(d,r,a,o),Ka(l.eventHub,p)}function vP(t,e){var n=Nu(),r=$u(a=>Va(a,t,e)),i=u.useCallback(a=>n(Ha(t,e,a)),[t,e,n]);return[r,i]}const yP=Object.freeze(Object.defineProperty({__proto__:null,BasePanel:yr,CLOSE_DASHBOARD:Wd,CREATE_DASHBOARD:Kd,DEFAULT_DASHBOARD_ID:Vd,DH_ID_PROP:Hd,Dashboard:gr,DashboardIdContext:Gd,DashboardLayout:Yd,DashboardUtils:zd,GLPropTypes:qd,LayoutManagerContext:Xd,LayoutUtils:Wa,LazyDashboard:rd,Panel:yr,PanelErrorBoundary:Qd,PanelEvent:Jd,PanelIdContext:Zd,PanelManager:ep,PersistentStateContext:tp,PersistentStateProvider:Ga,SET_DASHBOARD_DATA:np,TabEvent:rp,assertIsDashboardPluginProps:nh,canHaveRef:Fa,default:gr,dehydrate:ip,emitCloseDashboard:ap,emitCreateDashboard:op,emitCycleToNextStack:sp,emitCycleToNextTab:lp,emitCycleToPreviousStack:up,emitCycleToPreviousTab:cp,emitPanelClose:dp,emitPanelOpen:pp,getAllDashboardsData:fp,getClosedPanelsForDashboard:hp,getDashboardData:mp,getOpenedPanelMapForDashboard:gp,getPluginDataForDashboard:Va,getPluginDataMapForDashboard:vp,hydrate:yp,isDashboardPluginProps:rh,isWrappedComponent:Na,listenForCloseDashboard:bp,listenForCreateDashboard:Pp,listenForCycleToNextStack:xp,listenForCycleToNextTab:Op,listenForCycleToPreviousStack:Sp,listenForCycleToPreviousTab:wp,listenForPanelClose:Cp,listenForPanelOpen:Ep,reducers:Tp,setDashboardData:jp,setDashboardPluginData:Ha,updateDashboardData:Ip,useAppDispatch:kp,useAppSelector:Ya,useAppStore:_p,useCloseDashboardListener:Rp,useCreateDashboardListener:Dp,useCycleToNextStackListener:Lp,useCycleToNextTabListener:Ap,useCycleToPreviousStackListener:Mp,useCycleToPreviousTabListener:Fp,useDashboardId:Np,useDashboardPanel:gP,useDashboardPluginData:vP,useDhId:$p,useLayoutManager:ih,useListener:Up,usePanelCloseListener:Bp,usePanelId:Wp,usePanelOpenListener:Ka,usePanelRegistration:fo,usePersistentState:ho},Symbol.toStringTag,{value:"Module"}));function bP(){var t=za(),e=u.useMemo(()=>qa(t),[t]);return e}const PP=Object.freeze(Object.defineProperty({__proto__:null,PersistentStateProvider:Ga,PluginType:Xa,PluginsContext:kt,WidgetView:Kp,createChainedComponent:Vp,createChainedPanelComponent:Hp,getDashboardPlugins:id,getIconForPlugin:Gp,getPluginModuleValue:Yp,getPluginsElementMap:qa,getThemeDataFromPlugins:Ba,getWidgetDashboardPlugin:zp,groupByDependencyLevel:Qa,isAuthPlugin:Ja,isDashboardPlugin:qp,isElementPlugin:Xp,isLegacyAuthPlugin:Zt,isLegacyDashboardPlugin:Qp,isLegacyPlugin:Jp,isLegacyTablePlugin:Zp,isMultiPlugin:Za,isPlugin:ef,isTablePlugin:tf,isThemePlugin:nf,isWidgetDashboardPlugin:rf,isWidgetMiddlewarePlugin:af,isWidgetPlugin:of,pluginSupportsType:sf,pluginSupportsTypeAsDashboard:lf,processLoadedModule:eo,registerPlugin:uf,useCustomThemes:_s,useDashboardPlugins:ad,usePersistentState:ho,usePlugins:za,usePluginsElementMap:bP},Symbol.toStringTag,{value:"Module"}));function xP(t){if(t==null)return!1;var e=t;return e.Component!==void 0&&typeof e.isAvailable=="function"}var Rs="io.deephaven.auth.AnonymousAuthenticationHandler",OP="io.deephaven.authentication.psk.PskAuthenticationHandler";function Ui(t,e,n){return(e=SP(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function SP(t){var e=wP(t,"string");return typeof e=="symbol"?e:e+""}function wP(t,e){if(typeof t!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var r=n.call(t,e);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}class Ds extends Error{constructor(){super(...arguments),Ui(this,"name","AuthenticationError"),Ui(this,"isAuthenticationError",!0)}}function Bi(t,e,n,r,i,a,o){try{var s=t[a](o),l=s.value}catch(d){return void n(d)}s.done?e(l):Promise.resolve(l).then(r,i)}function CP(t){return function(){var e=this,n=arguments;return new Promise(function(r,i){var a=t.apply(e,n);function o(l){Bi(a,r,i,o,s,"next",l)}function s(l){Bi(a,r,i,o,s,"throw",l)}o(void 0)})}}var Wi=Y.module("AuthPluginBase");function tr(t){var{children:e,getLoginOptions:n}=t,r=Je(),[i,a]=u.useState(),[o,s]=u.useState(!1);return u.useEffect(()=>{var l=!1;function d(){if(l)throw new to("Login canceled.")}function p(){return f.apply(this,arguments)}function f(){return f=CP(function*(){try{var m=yield n();d(),Wi.info("Logging in..."),yield r.login(m),d(),s(!0)}catch(b){if(!l){var h;Wi.error("Unable to login:",b);var g=(h=Ye(b))!==null&&h!==void 0?h:"Unable to login. Verify credentials.";a(new Ds(g)),s(!1)}}}),f.apply(this,arguments)}return p(),()=>{l=!0}},[r,n]),o?c.jsx(c.Fragment,{children:e}):c.jsx(je,{"data-testid":"auth-base-loading",isLoading:i==null,isLoaded:!1,errorMessage:Ye(i)})}var EP={canLogout:!1};function TP(t){var{children:e}=t,n=Pe(),r=u.useCallback(()=>({type:n.CoreClient.LOGIN_TYPE_ANONYMOUS}),[n]);return c.jsx(tr,{getLoginOptions:r,children:c.jsx(St.Provider,{value:EP,children:e})})}var Ls={Component:TP,isAvailable:t=>t.includes(Rs)};function Ki(t,e,n,r,i,a,o){try{var s=t[a](o),l=s.value}catch(d){return void n(d)}s.done?e(l):Promise.resolve(l).then(r,i)}function jP(t){return function(){var e=this,n=arguments;return new Promise(function(r,i){var a=t.apply(e,n);function o(l){Ki(a,r,i,o,s,"next",l)}function s(l){Ki(a,r,i,o,s,"throw",l)}o(void 0)})}}var IP=Y.module("AuthPluginParent"),kP={canLogout:!1};function _P(t){return t!=null&&typeof t.type=="string"}function RP(){return un.apply(this,arguments)}function un(){return un=jP(function*(){IP.info("Logging in by delegating to parent window...");var t=yield En(bs);if(!_P(t))throw new Error("Unexpected login options response: ".concat(t));return t}),un.apply(this,arguments)}function DP(){var t;return(t=new URLSearchParams(window.location.search).get("authProvider"))!==null&&t!==void 0?t:""}function LP(t){var{children:e}=t;return c.jsx(tr,{getLoginOptions:RP,children:c.jsx(St.Provider,{value:kP,children:e})})}var As={Component:LP,isAvailable:()=>xn()!=null&&DP()==="parent"};function Ms(t){var{children:e,errorMessage:n,isLoggingIn:r=!1,onSubmit:i}=t;return c.jsxs("form",{className:"login-form",onSubmit:a=>{a.preventDefault(),a.stopPropagation(),i==null||i(a)},children:[c.jsx("div",{className:"flex-spacer"}),c.jsxs("div",{className:"flex-wrapper",children:[c.jsx("fieldset",{disabled:r,className:"container-fluid",children:e}),c.jsx("div",{className:"form-group d-flex justify-content-end align-items-center mb-0",children:c.jsxs("button",{type:"submit",className:$("btn btn-primary",{"btn-spinner":r},{"btn-cancelable":r}),"data-testid":"btn-login",children:[r&&c.jsxs("span",{children:[c.jsx(Pt,{className:"mr-2 loading-spinner-vertical-align"}),c.jsx("span",{className:"btn-normal-content",children:"Logging in"}),c.jsx("span",{className:"btn-hover-content",children:"Cancel"})]}),!r&&"Login"]})})]}),c.jsx("div",{className:"flex-spacer",children:n!=null&&c.jsx("p",{className:"error-message mb-0",role:"alert",children:"".concat(n)})})]})}function Fs(t){var{children:e,logoPath:n="./logo.png"}=t;return c.jsxs("div",{className:"login-container",children:[c.jsx(fs,{}),c.jsxs("div",{className:"login-box",children:[c.jsx("div",{className:"logo",children:c.jsx("img",{src:n,alt:"Deephaven Data Labs"})}),e,c.jsxs("p",{className:"footer",children:["© 2016-",new Date().getFullYear()," Deephaven Data Labs LLC. Patent Pending."]})]})]})}function Vi(t,e,n,r,i,a,o){try{var s=t[a](o),l=s.value}catch(d){return void n(d)}s.done?e(l):Promise.resolve(l).then(r,i)}function Vt(t){return function(){var e=this,n=arguments;return new Promise(function(r,i){var a=t.apply(e,n);function o(l){Vi(a,r,i,o,s,"next",l)}function s(l){Vi(a,r,i,o,s,"throw",l)}o(void 0)})}}var cn="io.deephaven.authentication.psk.PskAuthenticationHandler",Ns="psk",dn="io.deephaven.web.client.auth.psk.token",Re=Y.module("AuthPluginPsk");function AP(){return new URLSearchParams(window.location.search).get(Ns)}function MP(){Re.debug2("clearWindowToken");var t=new URL(window.location.href);t.searchParams.delete(Ns),window.history.replaceState(null,"",t.href)}function Hi(){var t;return(t=qt.get(dn))!==null&&t!==void 0?t:null}function Ht(t){Re.debug2("Storing token in cookie",t),t!=null?qt.set(dn,t,{secure:!0,sameSite:"strict"}):qt.remove(dn)}function FP(t){var{children:e,logoPath:n}=t,r=Je(),i=u.useRef(null),a=u.useRef(null),[o,s]=u.useState(),[l,d]=u.useState(!1),[p,f]=u.useState(!1),[m,h]=u.useState(!1),[g,b]=u.useState(""),x=u.useCallback(function(){var P=Vt(function*(C){var _=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;Re.info("Logging in..."),h(!0);var j=null;try{if(j=r.login({type:cn,token:C}),a.current=j,yield j,Re.info("Logged in successfully"),a.current!==j)return;Ht(C),f(!0)}catch(N){if(a.current!==j)return;if(d(!0),_){var D;Re.error("Unable to login",N);var R=(D=Ye(N))!==null&&D!==void 0?D:"Unable to login: Verify credentials.";s(new Ds(R))}}h(!1)});return function(C){return P.apply(this,arguments)}}(),[r]),v=u.useCallback(()=>{a.current=null,h(!1)},[]),y=u.useCallback(Vt(function*(){Re.debug("onLogin");var P=Hi();p||m||P==null||x(P,!1)}),[p,m,x]),O=u.useCallback(()=>{Ht(null)},[]);er(y,O),u.useEffect(()=>{var P=!1;function C(){return _.apply(this,arguments)}function _(){return _=Vt(function*(){var j,D=(j=AP())!==null&&j!==void 0?j:Hi();if(MP(),D==null){d(!0);return}h(!0);try{yield r.login({type:cn,token:D}),P||(Ht(D),f(!0),h(!1))}catch{P||(d(!0),h(!1))}}),_.apply(this,arguments)}return C(),()=>{P=!0}},[r]);var w=u.useCallback(()=>{m?v():x(g)},[v,m,x,g]);return u.useEffect(function(){var C;(C=i.current)===null||C===void 0||C.focus()},[i,l]),c.jsxs(c.Fragment,{children:[p&&e,l&&c.jsx(In,{in:!p,mountOnEnter:!0,unmountOnExit:!0,children:c.jsx(Fs,{logoPath:n,children:c.jsx(Ms,{errorMessage:Ye(o),isLoggingIn:m,onSubmit:w,children:c.jsxs("div",{className:"form-group",children:[c.jsx("label",{htmlFor:"auth-psk-token-input",children:"Token"}),c.jsx("input",{id:"auth-psk-token-input",name:"token",className:"input-token form-control",type:"text",autoComplete:"username",autoCapitalize:"none",autoCorrect:"off",spellCheck:"false",ref:i,value:g,onChange:P=>{s(void 0),b(P.target.value)}})]})})})}),c.jsx(je,{"data-testid":"auth-psk-loading",isLoaded:p||l,isLoading:!p&&!l})]})}var $s={Component:FP,isAvailable:t=>t.includes(cn)};function Gi(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function Gt(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?Gi(Object(n),!0).forEach(function(r){NP(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Gi(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function NP(t,e,n){return(e=$P(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function $P(t){var e=UP(t,"string");return typeof e=="symbol"?e:e+""}function UP(t,e){if(typeof t!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var r=n.call(t,e);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}var BP=Y.module("UserUtils");function Us(t,e){return t.get("internal.webClient.appInit.".concat(e))}function Bs(t){var e,n,r,i,a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};function s(x){return Us(t,x)}function l(x,v){var y=s(x);return y==="true"?!0:y==="false"?!1:(y!==void 0&&BP.warn("Unexpected value for ".concat(x,": ").concat(y)),v)}var d=(e=s("name"))!==null&&e!==void 0?e:"",p=(n=s("operateAs"))!==null&&n!==void 0?n:d,f=(r=(i=s("groups"))===null||i===void 0?void 0:i.split(","))!==null&&r!==void 0?r:[],m=l("canCopy",!0),h=l("canDownloadCsv",!0),g=l("canUsePanels",!0),b=l("canLogout",!0);return Gt(Gt({name:d,operateAs:p,groups:f},a),{},{permissions:Gt({canUsePanels:g,canCopy:m,canDownloadCsv:h,canLogout:b},o)})}const WP=Object.freeze(Object.defineProperty({__proto__:null,AUTH_HANDLER_TYPE_ANONYMOUS:Rs,AUTH_HANDLER_TYPE_PSK:OP,AuthPluginAnonymous:Ls,AuthPluginBase:tr,AuthPluginParent:As,AuthPluginPsk:$s,Login:Fs,LoginForm:Ms,UserContext:Ta,UserOverrideContext:ja,UserPermissionsOverrideContext:St,getAppInitValue:Us,getUserFromConfig:Bs,isAuthPlugin:xP},Symbol.toStringTag,{value:"Module"}));function Le(t,e,n){return(e=KP(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function KP(t){var e=VP(t,"string");return typeof e=="symbol"?e:e+""}function VP(t,e){if(typeof t!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var r=n.call(t,e);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}class V extends mo{static get theme(){return V._theme==null&&(V._theme=no()),V._theme}static makeRandomSeries(e){for(var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:100,i=[],a=[],o=[],s=[],l=new Date("2018-06-01"),d=0;d<r;d+=1){var p=new Date(l.getFullYear(),l.getMonth(),l.getDate()+d-r);i.push("".concat(p.getFullYear(),"-").concat(p.getMonth()+1,"-").concat(p.getDate()));var f=(Math.sin(d/r*e)*r/3+Math.cos(d*.2)*r/6+Math.sin(d*.5)*r/10+V.random()*r/5+d*V.smoothing)*n;f=Math.round(f*100)/100,a.push(f),s.push(40+d*V.smoothing),o.push(Math.sin(d/r*e)*r/3+V.random()*r/10+d*V.smoothing)}return{x:i,y:a,s:o,l:s}}static makeScatter(e){return{name:"SCTR",x:e.x,y:e.y,type:"scatter",mode:"markers",hoverinfo:"skip",marker:{size:5}}}static makeArea(e){return{name:"AREA",x:e.x,y:e.s,type:"scatter",mode:"line",fill:"tozeroy",hoverinfo:"all",line:{width:3}}}static makeTrendline(e){return{name:"Trendline <br>R<sup>2</sup> = 0.91",x:e.x,y:e.l,type:"scatter",mode:"line",hoverinfo:"skip",line:{width:3,dash:"dot"}}}static makeErrorBand(e){for(var n=[],r=[],i=0;i<e.y.length;i+=1){var a=e.y[i];n[i]=Math.round((a+18)*100)/100,r[i]=Math.round((a-18)*100)/100}var o=n.concat(r.reverse());return{name:"error",x:e.x.concat(e.x.slice().reverse()),y:o,type:"scatter",mode:"line",hoverinfo:"skip",fill:"toself",line:{width:0,color:V.theme.error_band_line_color,shape:"spline"}}}static makeLine(e){return{name:"LINE",x:e.x,y:e.y,type:"scatter",mode:"line",hoverinfo:"x+y+text+name",line:{width:3}}}static makeRandomData(){var e=V.makeRandomSeries(6),n=V.makeArea(e),r=V.makeTrendline(e),i=V.makeRandomSeries(2),a=V.makeLine(i),o=V.makeErrorBand(i);return[n,r,a,o]}static makeDefaultLayout(e){var n={template:new go(e).makeDefaultTemplate(V.theme)};return n.title={text:"Chart"},n.xaxis={title:{text:"Datestamp"}},n.yaxis={title:{text:"Price"}},n}constructor(e){var{data:n=V.makeRandomData(),layout:r=V.makeDefaultLayout(e),filterFields:i=[]}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};super(e),Le(this,"data",void 0),Le(this,"filterFields",void 0),Le(this,"layout",void 0),this.data=n,this.layout=r,this.filterFields=i}getData(){return this.data}getLayout(){return this.layout}getFilterColumnMap(){for(var e=new Map,n=0;n<this.filterFields.length;n+=1){var r=this.filterFields[n],i="java.lang.String";e.set(r,{name:r,type:i})}return e}isFilterRequired(){return this.filterFields.length>0}setFilter(){this.fireUpdate(this.data)}}Le(V,"random",Math.random.bind(Math));Le(V,"smoothing",1.5);Le(V,"_theme",void 0);const HP=Object.freeze(Object.defineProperty({__proto__:null,Chart:ah,ChartModel:mo,ChartModelFactory:oh,ChartThemeContext:cf,ChartThemeProvider:ro,ChartUtils:go,DownsamplingError:Lh,FigureChartModel:sh,MockChartModel:V,Plot:df,defaultChartTheme:no,isFigureChartModel:lh,isWebGLSupported:uh,useChartTheme:pf},Symbol.toStringTag,{value:"Module"}));function Ws(t){var{children:e}=t,{activeThemes:n}=wt();return u.useEffect(function(){n!=null&&io.initTheme()},[n]),c.jsx(c.Fragment,{children:e})}var GP={$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).
|
|
4
4
|
|
|
5
5
|
Used by the formatter and when enforcing long-line violations (like \`E501\`) to determine the visual width of a tab.
|
|
6
6
|
|
|
@@ -80,5 +80,5 @@ foo, bar, quux = this_is_a_long_line(lion, hippo, lemur, bear) ''' pass \`\`\`
|
|
|
80
80
|
|
|
81
81
|
( 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.
|
|
82
82
|
|
|
83
|
-
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 Yi(t,e,n,r,i,a,o){try{var s=t[a](o),l=s.value}catch(d){return void n(d)}s.done?e(l):Promise.resolve(l).then(r,i)}function GP(t){return function(){var e=this,n=arguments;return new Promise(function(r,i){var a=t.apply(e,n);function o(l){Yi(a,r,i,o,s,"next",l)}function s(l){Yi(a,r,i,o,s,"throw",l)}o(void 0)})}}var Ks=Bu.parse("inmemory://dh-config/ruff-settings.json");function YP(){var{schemas:t=[]}=mr.json.jsonDefaults.diagnosticsOptions;t.some(e=>e.uri==="json://ruff-schema")||mr.json.jsonDefaults.setDiagnosticsOptions({schemas:[...t,{uri:"json://ruff-schema",fileMatch:[Ks.toString()],schema:HP}]})}function zP(){return pn.apply(this,arguments)}function pn(){return pn=GP(function*(){return yield oo.initRuff(),"v".concat(Wu.version())}),pn.apply(this,arguments)}function qP(t){var{text:e,isOpen:n,onClose:r,onSave:i,readOnly:a=!1,defaultSettings:o=ao}=t,[s,l]=u.useState(!1),[d,p]=u.useState(!1),f=u.useRef(),m=u.useMemo(()=>JSON.stringify(o,null,2),[o]),{data:h}=Te(zP),[g]=u.useState(()=>Uu.createModel(e,"json",Ks)),b=u.useCallback(()=>{n&&(r(),f.current=void 0,g.dispose())},[n,r,g]),x=u.useCallback(()=>{if(n){try{var P,C;i(JSON.parse((P=(C=f.current)===null||C===void 0||(C=C.getModel())===null||C===void 0?void 0:C.getValue())!==null&&P!==void 0?P:""))}catch{}b()}},[n,b,i]),v=u.useCallback(()=>{xt(g),g.setValue(m)},[g,m]),y=u.useCallback(P=>{var C;try{JSON.parse(P),l(!0)}catch{l(!1)}p(((C=f.current)===null||C===void 0||(C=C.getModel())===null||C===void 0?void 0:C.getValue())===m)},[m]),O=Ge(y,500,{leading:!0}),w=u.useCallback(P=>{f.current=P,g.onDidChangeContent(()=>{O(g.getValue())}),YP(),O(g.getValue())},[O,g]);return n?c.jsxs(On,{isOpen:n,centered:!0,keyboard:!0,clickOutside:!1,toggle:b,size:"lg",className:"ruff-settings-modal",children:[c.jsxs(wa,{closeButton:!1,children:[c.jsxs("span",{className:"settings-modal-title mr-auto",children:["Ruff ",h," Settings"]}),c.jsx(ma,{href:"https://docs.astral.sh/ruff/settings/",target:"_blank",children:c.jsx(Q,{kind:"ghost",onClick:se,icon:zc,children:"Settings Docs"})}),c.jsxs(bt,{isDisabled:d,onPress:v,children:[c.jsx(Qe,{children:c.jsx(ne,{icon:qc})}),c.jsx(Et,{children:"Reset to default"})]})]}),c.jsx(Sn,{style:{height:"80vh"},children:c.jsx(vo,{onEditorInitialized:w,settings:{readOnly:a,value:e,language:"json",folding:!0,padding:{bottom:16},lineNumbers:"on",overviewRulerLanes:0,model:g}})}),c.jsx(La,{children:a?c.jsx(Q,{kind:"secondary","data-dismiss":"modal",onClick:b,children:"Close"}):c.jsxs(c.Fragment,{children:[c.jsx(Q,{kind:"secondary","data-dismiss":"modal",onClick:b,children:"Cancel"}),c.jsx(Q,{kind:"primary","data-dismiss":"modal",tooltip:s?void 0:"Cannot save invalid JSON",disabled:!s,onClick:x,children:"Save"})]})})]}):null}const XP=Object.freeze(Object.defineProperty({__proto__:null,Code:ff,CommandHistory:hf,CommandHistoryActions:mf,CommandHistoryItem:gf,CommandHistoryItemTooltip:vf,Console:br,ConsoleConstants:yf,ConsoleHistory:bf,ConsoleHistoryItem:Pf,ConsoleHistoryItemResult:xf,ConsoleHistoryResultErrorMessage:Of,ConsoleHistoryResultInProgress:Sf,ConsoleInput:wf,ConsoleStatusBar:Cf,ConsoleUtils:Ef,Editor:vo,HeapUsage:Tf,LogView:jf,MonacoProviders:oo,MonacoTheme:If,MonacoThemeProvider:Ws,MonacoUtils:io,ObjectIcon:kf,RUFF_DEFAULT_SETTINGS:ao,RuffSettingsModal:qP,SHORTCUTS:_f,ScriptEditor:ch,ScriptEditorUtils:dh,default:br},Symbol.toStringTag,{value:"Module"}));function fn(t,e,n){return(e=QP(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function QP(t){var e=JP(t,"string");return typeof e=="symbol"?e:e+""}function JP(t,e){if(typeof t!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var r=n.call(t,e);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}class Ae{static valueForCell(e,n,r){var i="".concat(e,",").concat(n);return r!==void 0&&r&&(i="(".concat(i,")")),i}constructor(e){fn(this,"dh",void 0),fn(this,"irisGridUtils",void 0),this.dh=e,this.irisGridUtils=new yo(e)}makeColumn(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Ae.DEFAULT_TYPE,r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0;return new this.dh.Column({index:r,name:e,type:n})}makeRollupTableConfig(){return new this.dh.RollupTableConfig}makeColumns(){for(var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:5,n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"",r=[],i=0;i<e;i+=1)r.push(this.makeColumn("".concat(n).concat(i),Ae.DEFAULT_TYPE,i));return r}static makeUserColumnWidths(){for(var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:5,n=new Map,r=0;r<e;r+=1)n.set(r.toString(),100);return n}makeRow(e){var n=new this.dh.Row({index:e,name:"".concat(e)});return n.get=jest.fn(r=>Ae.valueForCell(e,r.index)),n}makeFilter(){return new this.dh.FilterCondition}makeSort(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.makeColumn();return new this.dh.Sort({column:e})}hydrateSort(e,n){return this.irisGridUtils.hydrateDhSort(n,e)}makeTable(){var{columns:e=this.makeColumns(),size:n=1e9,sort:r=[],layoutHints:i={}}=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},a=new this.dh.Table({columns:e,size:n,sort:r});return a.copy=jest.fn(()=>Promise.resolve(a)),a.freeze=jest.fn(()=>Promise.resolve(a)),a.layoutHints=i,a}makeTreeTable(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.makeColumns(),n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:[],i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:1e9,a=arguments.length>4&&arguments[4]!==void 0?arguments[4]:[],o=arguments.length>5?arguments[5]:void 0,s=new this.dh.TreeTable({columns:e,aggregatedColumns:n,groupedColumns:r,size:i,sort:a,layoutHints:o});return s.copy=jest.fn(()=>Promise.resolve(s)),s}static makeInputTable(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],{keys:r,values:i}=[...e,...n].reduce((a,o)=>(e.includes(o)?a.keys.push(o.name):a.values.push(o.name),a),{keys:[],values:[]});return{keys:r,values:i}}makeSubscription(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.makeTable();return new this.dh.TableViewportSubscription({table:e})}makeModel(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.makeTable(),n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null,r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null,{dh:i}=this;return new ph(i,e,n??new _n(i),r)}}fn(Ae,"DEFAULT_TYPE","java.lang.String");const ZP=Object.freeze(Object.defineProperty({__proto__:null,AdvancedSettings:fh,AdvancedSettingsType:hh,AggregationEdit:Bm,AggregationOperation:mh,AggregationUtils:gh,Aggregations:Wm,BarIcon:Km,ChartBuilder:Vm,ColumnHeaderGroup:vh,CustomColumnBuilder:Hm,DownloadServiceWorkerUtils:Gm,FormatColumnWhereIcon:Ym,FormatRowWhereIcon:zm,HistogramIcon:qm,InputEditor:Xm,IrisGrid:Pr,IrisGridCacheUtils:yh,IrisGridCellOverflowMouseHandler:Qm,IrisGridCellRendererUtils:Jm,IrisGridColumnSelectMouseHandler:Zm,IrisGridColumnTooltipMouseHandler:eg,IrisGridContextMenuHandler:tg,IrisGridCopyCellMouseHandler:ng,IrisGridDataSelectMouseHandler:rg,IrisGridFilterMouseHandler:ig,IrisGridMetricCalculator:ag,IrisGridModel:bh,IrisGridModelFactory:Ph,IrisGridPartitionedTableModel:xh,IrisGridPartitionedTableMouseHandler:og,IrisGridRenderer:sg,IrisGridRowTreeMouseHandler:lg,IrisGridSortMouseHandler:ug,IrisGridTableModel:Oh,IrisGridTableModelTemplate:Sh,IrisGridTestUtils:Ae,IrisGridThemeContext:cg,IrisGridThemeProvider:_o,IrisGridTokenMouseHandler:dg,IrisGridTreeTableModel:wh,IrisGridUtils:yo,LineIcon:pg,OptionType:fg,PendingMouseHandler:hg,PieIcon:mg,RollupRows:gg,SHORTCUTS:vg,ScatterIcon:yg,TableCsvExporter:bg,TableSaver:Pg,VisibilityOrderingBuilder:xg,createDefaultIrisGridTheme:Og,default:Pr,isColumnHeaderGroup:Ch,isIrisGridTableModelTemplate:Eh,isIrisGridTreeTableModel:Th,isPanelStateV1:jh,isPanelStateV2:Ih,isPartitionedGridModel:kh,isPartitionedGridModelProvider:_h,isUITreeRow:Rh},Symbol.toStringTag,{value:"Module"}));var nr={react:W,"react-dom":Gu,redux:Hu,"react-redux":Vu,"@adobe/react-spectrum":Ku,"@deephaven/auth-plugins":BP,"@deephaven/chart":VP,"@deephaven/components":Xb,"@deephaven/console":XP,"@deephaven/dashboard":vP,"@deephaven/dashboard-core-plugins":Dh,"@deephaven/icons":Xc,"@deephaven/iris-grid":ZP,"@deephaven/jsapi-bootstrap":n0,"@deephaven/jsapi-components":hP,"@deephaven/jsapi-utils":p0,"@deephaven/log":Y,"@deephaven/plugin":bP,"@deephaven/react-hooks":Jg},ex=zu.createRequires(nr),tx=Yu({requires:ex});function zi(t,e,n,r,i,a,o){try{var s=t[a](o),l=s.value}catch(d){return void n(d)}s.done?e(l):Promise.resolve(l).then(r,i)}function vt(t){return function(){var e=this,n=arguments;return new Promise(function(r,i){var a=t.apply(e,n);function o(l){zi(a,r,i,o,s,"next",l)}function s(l){zi(a,r,i,o,s,"throw",l)}o(void 0)})}}var Ce=Y.module("@deephaven/app-utils.PluginUtils");function nx(t){return hn.apply(this,arguments)}function hn(){return hn=vt(function*(t){var e=yield tx(t);return e}),hn.apply(this,arguments)}function rx(t){return mn.apply(this,arguments)}function mn(){return mn=vt(function*(t){var e=yield fetch(t);if(!e.ok)throw new Error(e.statusText);try{return yield e.json()}catch{throw new Error("Could not be parsed as JSON")}}),mn.apply(this,arguments)}function ix(t){return gn.apply(this,arguments)}function gn(){return gn=vt(function*(t){Ce.debug("Loading plugins...");try{var e=yield rx("".concat(t,"/manifest.json"));if(!Array.isArray(e.plugins))throw new Error("Plugin manifest JSON does not contain plugins array");Ce.debug("Plugin manifest loaded:",e);for(var n=Qa(e.plugins),r=new Map,i=0;i<n.length;i+=1)for(var a=n[i],o=yield Promise.allSettled(a.map(function(){var h=vt(function*(g){var{name:b,main:x,version:v,package:y}=g,O="".concat(t,"/").concat(b,"/").concat(x),w=yield nx(O);return{pluginExports:w,name:b,packageName:y,version:v}});return function(g){return h.apply(this,arguments)}}())),s=0;s<o.length;s+=1){var l=o[s];if(l.status==="fulfilled"){var{pluginExports:d,name:p,packageName:f,version:m}=l.value;eo(r,nr,d,p,f,m)}else Ce.error("Unable to load plugin '".concat(a[s].name,"'"),l.reason)}return Ce.info("Plugins loaded:",r),r}catch(h){return Ce.error("Unable to load plugins:",h),new Map}}),gn.apply(this,arguments)}function ax(t){var e,n;return(e=(n=t.get("AuthHandlers"))===null||n===void 0?void 0:n.split(","))!==null&&e!==void 0?e:[]}function ox(t,e){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:new Map,r=ax(e),i=[...t.entries(),...n.entries()].filter(l=>{var[,d]=l;return Ja(d)||Zt(d)}).map(l=>{var[d,p]=l;return Zt(p)?{type:Xa.AUTH_PLUGIN,name:d,component:p.AuthPlugin.Component,isAvailable:p.AuthPlugin.isAvailable}:p}),a=i.filter(l=>{var{isAvailable:d}=l;return d(r,e)});if(a.length===0)throw new Error("No login plugins found, please register a login plugin for auth handlers: ".concat(r));a.length>1&&Ce.warn("More than one login plugin available, will use the first one: ",a.map(l=>{var{name:d}=l;return d}).join(", "));var{name:o,component:s}=a[0];return Ce.info("Using LoginPlugin",o),s}var sx=ga.createRequires(()=>nr),$x=ga.createRemoteComponent({requires:sx});function qi(t,e,n,r,i,a,o){try{var s=t[a](o),l=s.value}catch(d){return void n(d)}s.done?e(l):Promise.resolve(l).then(r,i)}function lx(t){return function(){var e=this,n=arguments;return new Promise(function(r,i){var a=t.apply(e,n);function o(l){qi(a,r,i,o,s,"next",l)}function s(l){qi(a,r,i,o,s,"throw",l)}o(void 0)})}}function ux(t){var{pluginsUrl:e,getCorePlugins:n,children:r}=t,[i,a]=u.useState(null);return u.useEffect(function(){var s=!1;function l(){return d.apply(this,arguments)}function d(){return d=lx(function*(){var p,f=(p=yield n==null?void 0:n())!==null&&p!==void 0?p:[],m=yield ix(e);if(!s){var h=f.flatMap(g=>Za(g)?g.plugins.map(b=>[b.name,b]):[[g.name,g]]);a(new Map([...h,...m]))}}),d.apply(this,arguments)}return l(),()=>{s=!0}},[e,n]),c.jsx(kt.Provider,{value:i,children:r})}function cx(){var t=Zn();return u.useEffect(function(){t.postMessage(Ca(Jn))},[t]),null}function Xi(t,e,n,r,i,a,o){try{var s=t[a](o),l=s.value}catch(d){return void n(d)}s.done?e(l):Promise.resolve(l).then(r,i)}function dx(t){return function(){var e=this,n=arguments;return new Promise(function(r,i){var a=t.apply(e,n);function o(l){Xi(a,r,i,o,s,"next",l)}function s(l){Xi(a,r,i,o,s,"throw",l)}o(void 0)})}}var px=new Map([["@deephaven/auth-plugins.AuthPluginParent",{AuthPlugin:As}],["@deephaven/auth-plugins.AuthPluginPsk",{AuthPlugin:$s}],["@deephaven/auth-plugins.AuthPluginAnonymous",{AuthPlugin:Ls}]]);function fx(t){var{children:e}=t,n=Je(),r=u.useContext(kt),[i,a]=u.useState(),[o,s]=u.useState();u.useEffect(function(){var f=!1;function m(){return h.apply(this,arguments)}function h(){return h=dx(function*(){try{var g=yield n.getAuthConfigValues();f||a(new Map(g))}catch(b){f||s(b)}}),h.apply(this,arguments)}return m(),()=>{f=!0}},[n]);var l=u.useMemo(()=>{if(!(r==null||i==null))try{return ox(r,i,px)}catch(p){s(p)}},[i,r]),d=l==null||i==null;return d||o!=null?c.jsx(je,{isLoading:d&&o==null,errorMessage:Ye(o),"data-testid":"auth-bootstrap-loading-error"}):c.jsx(l,{authConfigValues:i,children:c.jsxs(c.Fragment,{children:[c.jsx(cx,{}),e]})})}function Qi(t,e,n,r,i,a,o){try{var s=t[a](o),l=s.value}catch(d){return void n(d)}s.done?e(l):Promise.resolve(l).then(r,i)}function Ji(t){return function(){var e=this,n=arguments;return new Promise(function(r,i){var a=t.apply(e,n);function o(l){Qi(a,r,i,o,s,"next",l)}function s(l){Qi(a,r,i,o,s,"throw",l)}o(void 0)})}}var Be=Y.module("@deephaven/app-utils.ConnectionBootstrap");function hx(t){var{children:e}=t,n=Pe(),r=Je(),[i,a]=u.useState(),[o,s]=u.useState(),[l,d]=u.useState("connecting"),p=l==="failed",f=l==="shutdown",m=l==="reconnecting",h=l==="not_connecting";u.useEffect(function(){var y=!1;function O(){return w.apply(this,arguments)}function w(){return w=Ji(function*(){try{var P=yield r.getAsIdeConnection();if(y)return;s(P),d("connected")}catch(C){if(y)return;a(C),d("not_connecting")}}),w.apply(this,arguments)}return O(),()=>{y=!0}},[n,r]),u.useEffect(function(){if(o==null||f)return;function y(w){var{detail:P}=w;Be.info("Disconnect","".concat(JSON.stringify(P))),d("reconnecting")}var O=o.addEventListener(n.IdeConnection.EVENT_DISCONNECT,y);return O},[n,o,f]),u.useEffect(function(){if(o==null||f)return;function y(w){var{detail:P}=w;Be.info("Reconnect","".concat(JSON.stringify(P))),d("connected")}var O=o.addEventListener(n.CoreClient.EVENT_RECONNECT,y);return O},[n,o,f]),u.useEffect(function(){if(o==null)return;function y(w){var{detail:P}=w;Be.info("Shutdown","".concat(JSON.stringify(P))),a("Server shutdown: ".concat(P??"Unknown reason")),d("shutdown")}var O=o.addEventListener(n.IdeConnection.EVENT_SHUTDOWN,y);return O},[n,o]),u.useEffect(function(){if(o==null||f)return;function y(w){var{detail:P}=w;Be.warn("Reconnect authentication failed","".concat(JSON.stringify(P))),a("Reconnect authentication failed: ".concat(P??"Unknown reason")),d("failed")}var O=o.addEventListener(n.CoreClient.EVENT_RECONNECT_AUTH_FAILED,y);return O},[n,o,f]);var g=u.useCallback(function(){var v=Ji(function*(y){if(xt(o,"No connection available to fetch object with"),typeof y=="string")throw new Error("No URI resolvers available in Core");return o.getObject(Ua(y))});return function(y){return v.apply(this,arguments)}}(),[o]),b=u.useMemo(()=>({subscribe:(v,y)=>(y({fetch:()=>g(v),status:"ready"}),()=>{})}),[g]);function x(){Be.info("Refreshing application"),window.location.reload()}return f||l==="connecting"||h?c.jsx(je,{"data-testid":"connection-bootstrap-loading",isLoading:i==null,errorMessage:i!=null?"".concat(i):void 0}):c.jsx(od.Provider,{value:o??null,children:c.jsx($a.Provider,{value:g,children:c.jsxs(Dt.Provider,{value:b,children:[e,c.jsx(as,{isOpen:m,debounceMs:1e3,children:c.jsx(os,{icon:Qc,title:c.jsxs(c.Fragment,{children:[c.jsx(Pt,{})," Attempting to reconnect..."]}),subtitle:"Please check your network connection."})}),c.jsx(Da,{confirmButtonText:"Refresh",onConfirm:x,isOpen:p,headerText:"Authentication failed",bodyText:"Credentials are invalid. Please refresh your browser to try and reconnect."})]})})})}function Ux(t){return new URL(t,"".concat(window.location))}function mx(){var t=new URLSearchParams(window.location.search);return t.get("envoyPrefix")}function gx(){var t=mx();return t!=null?{headers:{"envoy-prefix":t}}:{headers:{}}}function Zi(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function ea(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?Zi(Object(n),!0).forEach(function(r){vx(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Zi(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function vx(t,e,n){return(e=yx(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function yx(t){var e=bx(t,"string");return typeof e=="symbol"?e:e+""}function bx(t,e){if(typeof t!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var r=n.call(t,e);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function Px(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return{action:()=>{Ng(Jc,ea(ea({},t),{},{userAgent:navigator.userAgent}),bo.getState())},shortcut:It.EXPORT_LOGS,isGlobal:e}}function xx(t){var{children:e}=t,n=sd(),r=u.useContext(ja),i=u.useContext(St),a=Bs(n,r,i);return c.jsx(Ta.Provider,{value:a,children:e})}function Ox(t){var{children:e}=t,n=Ya(Rf),r=u.useContext(kt),i=_s(r),a=Pn();return c.jsx(Ma,{themes:i,waitForActivation:a,children:c.jsx(ro,{children:c.jsx(Ws,{children:c.jsx(_o,{density:n.gridDensity,children:e})})})})}function Bx(t){var{fontClassNames:e,pluginsUrl:n,getCorePlugins:r,serverUrl:i,logMetadata:a,children:o}=t,s=u.useMemo(()=>gx(),[]),[l,d]=u.useState(0),p=u.useCallback(()=>{},[]),f=u.useCallback(()=>{requestAnimationFrame(()=>{d(h=>h+1)})},[]);er(p,f);var m=u.useMemo(()=>[Px(a,!0)],[a]);return c.jsxs(qu,{store:bo,children:[c.jsx(Yo,{fontClassNames:e,children:c.jsx(ux,{getCorePlugins:r,pluginsUrl:n,children:c.jsx(Ox,{children:c.jsxs(Ea,{serverUrl:i,options:s,children:[c.jsx(fx,{children:c.jsx(ld,{children:c.jsx(xx,{children:c.jsx(hx,{children:c.jsx(zo,{children:o})})})})}),c.jsx(jt,{actions:m})]},l)})})}),c.jsx(ss,{})]})}function ta(t,e,n,r,i,a,o){try{var s=t[a](o),l=s.value}catch(d){return void n(d)}s.done?e(l):Promise.resolve(l).then(r,i)}function Sx(t){return function(){var e=this,n=arguments;return new Promise(function(r,i){var a=t.apply(e,n);function o(l){ta(a,r,i,o,s,"next",l)}function s(l){ta(a,r,i,o,s,"throw",l)}o(void 0)})}}function ue(t,e,n){return(e=wx(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function wx(t){var e=Cx(t,"string");return typeof e=="symbol"?e:e+""}function Cx(t,e){if(typeof t!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var r=n.call(t,e);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}var We=Y.module("GrpcFileStorageTable");class Xe{constructor(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"",r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:n;ue(this,"storageService",void 0),ue(this,"baseRoot",void 0),ue(this,"root",void 0),ue(this,"currentSize",0),ue(this,"currentViewport",void 0),ue(this,"listeners",[]),ue(this,"viewportUpdatePromise",void 0),ue(this,"currentViewportData",void 0),ue(this,"childTables",new Map),this.storageService=e,this.baseRoot=n,this.root=r,r===n&&(this.doRefresh=He(this.doRefresh.bind(this),Xe.REFRESH_DEBOUNCE))}removeBaseRoot(e){return we.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 r=e.split("/"),i=r.shift();if((i===void 0||i==="")&&(i=r.shift()),i===void 0||i==="")throw new Error("Invalid path: ".concat(e));var a=r.join("/");if(n){if(!this.childTables.has(i)){var o=new Xe(this.storageService,this.baseRoot,"".concat(this.root,"/").concat(i));this.childTables.set(i,o)}if(a){var s=this.childTables.get(i);s==null||s.setExpanded(a,n)}}else if(this.childTables.has(i))if(a){var l=this.childTables.get(i);l==null||l.setExpanded(a,n)}else this.childTables.delete(i);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){We.debug2("doRefresh",this.root),e(this.fetchData())}refresh(){var e;We.debug2("refresh",this.root),(e=this.viewportUpdatePromise)===null||e===void 0||e.cancel();var n=new Promise(i=>{this.doRefresh(i)}),r=Ee.makeCancelable(n.then(i=>{if(this.viewportUpdatePromise!==r)throw new to;return this.currentViewportData=i,this.sendUpdate(),i}));r.catch(i=>{Ee.isCanceled(i)||We.error("Error updating viewport",i)}),this.viewportUpdatePromise=r}refreshInternal(){try{this.refresh()}catch(e){Ee.isCanceled(e)||We.error("Unable to refresh data",e)}}fetchData(){var e=this;return Sx(function*(){var{currentViewport:n}=e;if(!n)throw new Error("No viewport set");for(var r=yield e.storageService.listItems(e.root),i=r.map(f=>({type:f.type,filename:e.removeBaseRoot(f.filename),basename:f.basename,id:e.removeBaseRoot(f.filename),isExpanded:f.type==="directory"?e.childTables.has(f.basename):void 0})).sort((f,m)=>f.type!==m.type?f.type==="directory"?-1:1:f.basename.localeCompare(m.basename)),a=0;a<i.length;a+=1){var o=i[a],{basename:s,filename:l}=o;if(l===e.removeBaseRoot("".concat(e.root,"/").concat(s))&&o.type==="directory"){var d=e.childTables.get(s);if(d!=null){d.setViewport({top:0,bottom:n.bottom-a});var p=yield d.getViewportData();i.splice(a+1,0,...p.items)}}}return e.currentSize=i.length,We.debug2(e.root,"items",i,n),i=i.slice(n.top,n.bottom),{items:i,offset:n.top}})()}sendUpdate(){for(var e,{listeners:n}=this,r=(e=this.currentViewportData)!==null&&e!==void 0?e:{items:[],offset:0},i=0;i<n.length;i+=1)n[i](r)}}ue(Xe,"REFRESH_DEBOUNCE",50);function na(t,e,n,r,i,a,o){try{var s=t[a](o),l=s.value}catch(d){return void n(d)}s.done?e(l):Promise.resolve(l).then(r,i)}function me(t){return function(){var e=this,n=arguments;return new Promise(function(r,i){var a=t.apply(e,n);function o(l){na(a,r,i,o,s,"next",l)}function s(l){na(a,r,i,o,s,"throw",l)}o(void 0)})}}function _e(t,e,n){return(e=Ex(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function Ex(t){var e=Tx(t,"string");return typeof e=="symbol"?e:e+""}function Tx(t,e){if(typeof t!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var r=n.call(t,e);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}var jx=Y.module("GrpcFileStorage");class rr{constructor(e,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"";_e(this,"dh",void 0),_e(this,"storageService",void 0),_e(this,"tables",[]),_e(this,"root",void 0),_e(this,"refreshTables",Xu(()=>{this.tables.forEach(i=>i.refresh())},rr.REFRESH_THROTTLE)),this.dh=e,this.storageService=n,this.root=r}removeRoot(e){return we.removeRoot(this.root,e)}addRoot(e){return we.addRoot(this.root,e)}createDirectory(e){var n=this;return me(function*(){return yield n.storageService.createDirectory(n.addRoot(e)),n.refreshTables(),{type:"directory",id:e,filename:e,basename:we.getBaseName(e)}})()}getTable(){var e=this;return me(function*(){var n=new Xe(e.storageService,e.root);return e.tables.push(n),n})()}saveFile(e){var n=this;return me(function*(){var r=n.dh.storage.FileContents.text(e.content);return yield n.storageService.saveFile(n.addRoot(e.filename),r,!0),n.refreshTables(),e})()}loadFile(e){var n=this;return me(function*(){var r=yield n.storageService.loadFile(n.addRoot(e)),i=yield r.text();return{filename:e,basename:we.getBaseName(e),content:i}})()}copyFile(e,n){var r=this;return me(function*(){var i=yield r.storageService.loadFile(r.addRoot(e));yield r.storageService.saveFile(r.addRoot(n),i,!1),r.refreshTables()})()}deleteFile(e){var n=this;return me(function*(){yield n.storageService.deleteItem(n.addRoot(e)),n.refreshTables()})()}moveFile(e,n){var r=this;return me(function*(){yield r.storageService.moveItem(r.addRoot(e),r.addRoot(n)),r.refreshTables()})()}info(e){var n=this;return me(function*(){var r=yield n.storageService.listItems(n.addRoot(we.getPath(e)),we.getBaseName(e));if(r.length===0)throw new Df;if(r.length>1)throw jx.error("More than one matching file found, should never happen.",r),new Error("More than one matching file found");var i=r[0];if(!Lf(i.type))throw new Error("Unexpected file type: ".concat(i.type));return{filename:n.removeRoot(i.filename),basename:i.basename,id:n.removeRoot(i.filename),type:i.type}})()}}_e(rr,"REFRESH_THROTTLE",150);export{Bx as AppBootstrap,Vx as AppDashboards,fx as AuthBootstrap,hx as ConnectionBootstrap,od as ConnectionContext,Hx as DEFAULT_LAYOUT_CONFIG,Gx as DEFAULT_LAYOUT_CONFIG_NO_CONSOLE,rr as GrpcFileStorage,Xe as GrpcFileStorageTable,Yx as GrpcLayoutStorage,zx as LocalWorkspaceStorage,ux as PluginsBootstrap,$x as RemoteComponent,Ox as ThemeBootstrap,qx as UserLayoutUtils,Px as createExportLogsContextAction,Xx as exportLayout,ax as getAuthHandlers,ox as getAuthPluginComponent,Ux as getBaseUrl,gx as getConnectOptions,Qx as getDefaultLayout,mx as getEnvoyPrefix,Yp as getPluginModuleValue,Jx as isLayoutV1,Zx as isLayoutV2,rx as loadJson,nx as loadModulePlugin,ix as loadModulePlugins,eO as normalizeLayout,tO as useConnection,sd as useServerConfig,nO as useUser};
|
|
84
|
-
//# sourceMappingURL=index-
|
|
83
|
+
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 Yi(t,e,n,r,i,a,o){try{var s=t[a](o),l=s.value}catch(d){return void n(d)}s.done?e(l):Promise.resolve(l).then(r,i)}function YP(t){return function(){var e=this,n=arguments;return new Promise(function(r,i){var a=t.apply(e,n);function o(l){Yi(a,r,i,o,s,"next",l)}function s(l){Yi(a,r,i,o,s,"throw",l)}o(void 0)})}}var Ks=Bu.parse("inmemory://dh-config/ruff-settings.json");function zP(){var{schemas:t=[]}=mr.json.jsonDefaults.diagnosticsOptions;t.some(e=>e.uri==="json://ruff-schema")||mr.json.jsonDefaults.setDiagnosticsOptions({schemas:[...t,{uri:"json://ruff-schema",fileMatch:[Ks.toString()],schema:GP}]})}function qP(){return pn.apply(this,arguments)}function pn(){return pn=YP(function*(){return yield oo.initRuff(),"v".concat(Wu.version())}),pn.apply(this,arguments)}function XP(t){var{text:e,isOpen:n,onClose:r,onSave:i,readOnly:a=!1,defaultSettings:o=ao}=t,[s,l]=u.useState(!1),[d,p]=u.useState(!1),f=u.useRef(),m=u.useMemo(()=>JSON.stringify(o,null,2),[o]),{data:h}=Te(qP),[g]=u.useState(()=>Uu.createModel(e,"json",Ks)),b=u.useCallback(()=>{n&&(r(),f.current=void 0,g.dispose())},[n,r,g]),x=u.useCallback(()=>{if(n){try{var P,C;i(JSON.parse((P=(C=f.current)===null||C===void 0||(C=C.getModel())===null||C===void 0?void 0:C.getValue())!==null&&P!==void 0?P:""))}catch{}b()}},[n,b,i]),v=u.useCallback(()=>{xt(g),g.setValue(m)},[g,m]),y=u.useCallback(P=>{var C;try{JSON.parse(P),l(!0)}catch{l(!1)}p(((C=f.current)===null||C===void 0||(C=C.getModel())===null||C===void 0?void 0:C.getValue())===m)},[m]),O=Ge(y,500,{leading:!0}),w=u.useCallback(P=>{f.current=P,g.onDidChangeContent(()=>{O(g.getValue())}),zP(),O(g.getValue())},[O,g]);return n?c.jsxs(On,{isOpen:n,centered:!0,keyboard:!0,clickOutside:!1,toggle:b,size:"lg",className:"ruff-settings-modal",children:[c.jsxs(wa,{closeButton:!1,children:[c.jsxs("span",{className:"settings-modal-title mr-auto",children:["Ruff ",h," Settings"]}),c.jsx(ma,{href:"https://docs.astral.sh/ruff/settings/",target:"_blank",children:c.jsx(Q,{kind:"ghost",onClick:se,icon:zc,children:"Settings Docs"})}),c.jsxs(bt,{isDisabled:d,onPress:v,children:[c.jsx(Qe,{children:c.jsx(ne,{icon:qc})}),c.jsx(Et,{children:"Reset to default"})]})]}),c.jsx(Sn,{style:{height:"80vh"},children:c.jsx(vo,{onEditorInitialized:w,settings:{readOnly:a,value:e,language:"json",folding:!0,padding:{bottom:16},lineNumbers:"on",overviewRulerLanes:0,model:g}})}),c.jsx(La,{children:a?c.jsx(Q,{kind:"secondary","data-dismiss":"modal",onClick:b,children:"Close"}):c.jsxs(c.Fragment,{children:[c.jsx(Q,{kind:"secondary","data-dismiss":"modal",onClick:b,children:"Cancel"}),c.jsx(Q,{kind:"primary","data-dismiss":"modal",tooltip:s?void 0:"Cannot save invalid JSON",disabled:!s,onClick:x,children:"Save"})]})})]}):null}const QP=Object.freeze(Object.defineProperty({__proto__:null,Code:ff,CommandHistory:hf,CommandHistoryActions:mf,CommandHistoryItem:gf,CommandHistoryItemTooltip:vf,Console:br,ConsoleConstants:yf,ConsoleHistory:bf,ConsoleHistoryItem:Pf,ConsoleHistoryItemResult:xf,ConsoleHistoryResultErrorMessage:Of,ConsoleHistoryResultInProgress:Sf,ConsoleInput:wf,ConsoleStatusBar:Cf,ConsoleUtils:Ef,Editor:vo,HeapUsage:Tf,LogView:jf,MonacoProviders:oo,MonacoTheme:If,MonacoThemeProvider:Ws,MonacoUtils:io,ObjectIcon:kf,RUFF_DEFAULT_SETTINGS:ao,RuffSettingsModal:XP,SHORTCUTS:_f,ScriptEditor:ch,ScriptEditorUtils:dh,default:br},Symbol.toStringTag,{value:"Module"}));function fn(t,e,n){return(e=JP(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function JP(t){var e=ZP(t,"string");return typeof e=="symbol"?e:e+""}function ZP(t,e){if(typeof t!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var r=n.call(t,e);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}class Ae{static valueForCell(e,n,r){var i="".concat(e,",").concat(n);return r!==void 0&&r&&(i="(".concat(i,")")),i}constructor(e){fn(this,"dh",void 0),fn(this,"irisGridUtils",void 0),this.dh=e,this.irisGridUtils=new yo(e)}makeColumn(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Ae.DEFAULT_TYPE,r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0;return new this.dh.Column({index:r,name:e,type:n})}makeRollupTableConfig(){return new this.dh.RollupTableConfig}makeColumns(){for(var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:5,n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"",r=[],i=0;i<e;i+=1)r.push(this.makeColumn("".concat(n).concat(i),Ae.DEFAULT_TYPE,i));return r}static makeUserColumnWidths(){for(var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:5,n=new Map,r=0;r<e;r+=1)n.set(r.toString(),100);return n}makeRow(e){var n=new this.dh.Row({index:e,name:"".concat(e)});return n.get=jest.fn(r=>Ae.valueForCell(e,r.index)),n}makeFilter(){return new this.dh.FilterCondition}makeSort(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.makeColumn();return new this.dh.Sort({column:e})}hydrateSort(e,n){return this.irisGridUtils.hydrateDhSort(n,e)}makeTable(){var{columns:e=this.makeColumns(),size:n=1e9,sort:r=[],layoutHints:i={}}=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},a=new this.dh.Table({columns:e,size:n,sort:r});return a.copy=jest.fn(()=>Promise.resolve(a)),a.freeze=jest.fn(()=>Promise.resolve(a)),a.layoutHints=i,a}makeTreeTable(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.makeColumns(),n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:[],i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:1e9,a=arguments.length>4&&arguments[4]!==void 0?arguments[4]:[],o=arguments.length>5?arguments[5]:void 0,s=new this.dh.TreeTable({columns:e,aggregatedColumns:n,groupedColumns:r,size:i,sort:a,layoutHints:o});return s.copy=jest.fn(()=>Promise.resolve(s)),s}static makeInputTable(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],{keys:r,values:i}=[...e,...n].reduce((a,o)=>(e.includes(o)?a.keys.push(o.name):a.values.push(o.name),a),{keys:[],values:[]});return{keys:r,values:i}}makeSubscription(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.makeTable();return new this.dh.TableViewportSubscription({table:e})}makeModel(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.makeTable(),n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null,r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null,{dh:i}=this;return new ph(i,e,n??new _n(i),r)}}fn(Ae,"DEFAULT_TYPE","java.lang.String");const ex=Object.freeze(Object.defineProperty({__proto__:null,AdvancedSettings:fh,AdvancedSettingsType:hh,AggregationEdit:Bm,AggregationOperation:mh,AggregationUtils:gh,Aggregations:Wm,BarIcon:Km,ChartBuilder:Vm,ColumnHeaderGroup:vh,CustomColumnBuilder:Hm,DownloadServiceWorkerUtils:Gm,FormatColumnWhereIcon:Ym,FormatRowWhereIcon:zm,HistogramIcon:qm,InputEditor:Xm,IrisGrid:Pr,IrisGridCacheUtils:yh,IrisGridCellOverflowMouseHandler:Qm,IrisGridCellRendererUtils:Jm,IrisGridColumnSelectMouseHandler:Zm,IrisGridColumnTooltipMouseHandler:eg,IrisGridContextMenuHandler:tg,IrisGridCopyCellMouseHandler:ng,IrisGridDataSelectMouseHandler:rg,IrisGridFilterMouseHandler:ig,IrisGridMetricCalculator:ag,IrisGridModel:bh,IrisGridModelFactory:Ph,IrisGridPartitionedTableModel:xh,IrisGridPartitionedTableMouseHandler:og,IrisGridRenderer:sg,IrisGridRowTreeMouseHandler:lg,IrisGridSortMouseHandler:ug,IrisGridTableModel:Oh,IrisGridTableModelTemplate:Sh,IrisGridTestUtils:Ae,IrisGridThemeContext:cg,IrisGridThemeProvider:_o,IrisGridTokenMouseHandler:dg,IrisGridTreeTableModel:wh,IrisGridUtils:yo,LineIcon:pg,OptionType:fg,PendingMouseHandler:hg,PieIcon:mg,RollupRows:gg,SHORTCUTS:vg,ScatterIcon:yg,TableCsvExporter:bg,TableSaver:Pg,VisibilityOrderingBuilder:xg,createDefaultIrisGridTheme:Og,default:Pr,isColumnHeaderGroup:Ch,isIrisGridTableModelTemplate:Eh,isIrisGridTreeTableModel:Th,isPanelStateV1:jh,isPanelStateV2:Ih,isPartitionedGridModel:kh,isPartitionedGridModelProvider:_h,isUITreeRow:Rh},Symbol.toStringTag,{value:"Module"}));var nr={react:W,"react-dom":Gu,redux:Hu,"react-redux":Vu,"@adobe/react-spectrum":Ku,"@deephaven/auth-plugins":WP,"@deephaven/chart":HP,"@deephaven/components":Qb,"@deephaven/console":QP,"@deephaven/dashboard":yP,"@deephaven/dashboard-core-plugins":Dh,"@deephaven/icons":Xc,"@deephaven/iris-grid":ex,"@deephaven/jsapi-bootstrap":r0,"@deephaven/jsapi-components":mP,"@deephaven/jsapi-utils":f0,"@deephaven/log":Y,"@deephaven/plugin":PP,"@deephaven/react-hooks":Jg},tx=zu.createRequires(nr),nx=Yu({requires:tx});function zi(t,e,n,r,i,a,o){try{var s=t[a](o),l=s.value}catch(d){return void n(d)}s.done?e(l):Promise.resolve(l).then(r,i)}function vt(t){return function(){var e=this,n=arguments;return new Promise(function(r,i){var a=t.apply(e,n);function o(l){zi(a,r,i,o,s,"next",l)}function s(l){zi(a,r,i,o,s,"throw",l)}o(void 0)})}}var Ce=Y.module("@deephaven/app-utils.PluginUtils");function rx(t){return hn.apply(this,arguments)}function hn(){return hn=vt(function*(t){var e=yield nx(t);return e}),hn.apply(this,arguments)}function ix(t){return mn.apply(this,arguments)}function mn(){return mn=vt(function*(t){var e=yield fetch(t);if(!e.ok)throw new Error(e.statusText);try{return yield e.json()}catch{throw new Error("Could not be parsed as JSON")}}),mn.apply(this,arguments)}function ax(t){return gn.apply(this,arguments)}function gn(){return gn=vt(function*(t){Ce.debug("Loading plugins...");try{var e=yield ix("".concat(t,"/manifest.json"));if(!Array.isArray(e.plugins))throw new Error("Plugin manifest JSON does not contain plugins array");Ce.debug("Plugin manifest loaded:",e);for(var n=Qa(e.plugins),r=new Map,i=0;i<n.length;i+=1)for(var a=n[i],o=yield Promise.allSettled(a.map(function(){var h=vt(function*(g){var{name:b,main:x,version:v,package:y}=g,O="".concat(t,"/").concat(b,"/").concat(x),w=yield rx(O);return{pluginExports:w,name:b,packageName:y,version:v}});return function(g){return h.apply(this,arguments)}}())),s=0;s<o.length;s+=1){var l=o[s];if(l.status==="fulfilled"){var{pluginExports:d,name:p,packageName:f,version:m}=l.value;eo(r,nr,d,p,f,m)}else Ce.error("Unable to load plugin '".concat(a[s].name,"'"),l.reason)}return Ce.info("Plugins loaded:",r),r}catch(h){return Ce.error("Unable to load plugins:",h),new Map}}),gn.apply(this,arguments)}function ox(t){var e,n;return(e=(n=t.get("AuthHandlers"))===null||n===void 0?void 0:n.split(","))!==null&&e!==void 0?e:[]}function sx(t,e){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:new Map,r=ox(e),i=[...t.entries(),...n.entries()].filter(l=>{var[,d]=l;return Ja(d)||Zt(d)}).map(l=>{var[d,p]=l;return Zt(p)?{type:Xa.AUTH_PLUGIN,name:d,component:p.AuthPlugin.Component,isAvailable:p.AuthPlugin.isAvailable}:p}),a=i.filter(l=>{var{isAvailable:d}=l;return d(r,e)});if(a.length===0)throw new Error("No login plugins found, please register a login plugin for auth handlers: ".concat(r));a.length>1&&Ce.warn("More than one login plugin available, will use the first one: ",a.map(l=>{var{name:d}=l;return d}).join(", "));var{name:o,component:s}=a[0];return Ce.info("Using LoginPlugin",o),s}var lx=ga.createRequires(()=>nr),Ux=ga.createRemoteComponent({requires:lx});function qi(t,e,n,r,i,a,o){try{var s=t[a](o),l=s.value}catch(d){return void n(d)}s.done?e(l):Promise.resolve(l).then(r,i)}function ux(t){return function(){var e=this,n=arguments;return new Promise(function(r,i){var a=t.apply(e,n);function o(l){qi(a,r,i,o,s,"next",l)}function s(l){qi(a,r,i,o,s,"throw",l)}o(void 0)})}}function cx(t){var{pluginsUrl:e,getCorePlugins:n,children:r}=t,[i,a]=u.useState(null);return u.useEffect(function(){var s=!1;function l(){return d.apply(this,arguments)}function d(){return d=ux(function*(){var p,f=(p=yield n==null?void 0:n())!==null&&p!==void 0?p:[],m=yield ax(e);if(!s){var h=f.flatMap(g=>Za(g)?g.plugins.map(b=>[b.name,b]):[[g.name,g]]);a(new Map([...h,...m]))}}),d.apply(this,arguments)}return l(),()=>{s=!0}},[e,n]),c.jsx(kt.Provider,{value:i,children:r})}function dx(){var t=Zn();return u.useEffect(function(){t.postMessage(Ca(Jn))},[t]),null}function Xi(t,e,n,r,i,a,o){try{var s=t[a](o),l=s.value}catch(d){return void n(d)}s.done?e(l):Promise.resolve(l).then(r,i)}function px(t){return function(){var e=this,n=arguments;return new Promise(function(r,i){var a=t.apply(e,n);function o(l){Xi(a,r,i,o,s,"next",l)}function s(l){Xi(a,r,i,o,s,"throw",l)}o(void 0)})}}var fx=new Map([["@deephaven/auth-plugins.AuthPluginParent",{AuthPlugin:As}],["@deephaven/auth-plugins.AuthPluginPsk",{AuthPlugin:$s}],["@deephaven/auth-plugins.AuthPluginAnonymous",{AuthPlugin:Ls}]]);function hx(t){var{children:e}=t,n=Je(),r=u.useContext(kt),[i,a]=u.useState(),[o,s]=u.useState();u.useEffect(function(){var f=!1;function m(){return h.apply(this,arguments)}function h(){return h=px(function*(){try{var g=yield n.getAuthConfigValues();f||a(new Map(g))}catch(b){f||s(b)}}),h.apply(this,arguments)}return m(),()=>{f=!0}},[n]);var l=u.useMemo(()=>{if(!(r==null||i==null))try{return sx(r,i,fx)}catch(p){s(p)}},[i,r]),d=l==null||i==null;return d||o!=null?c.jsx(je,{isLoading:d&&o==null,errorMessage:Ye(o),"data-testid":"auth-bootstrap-loading-error"}):c.jsx(l,{authConfigValues:i,children:c.jsxs(c.Fragment,{children:[c.jsx(dx,{}),e]})})}function Qi(t,e,n,r,i,a,o){try{var s=t[a](o),l=s.value}catch(d){return void n(d)}s.done?e(l):Promise.resolve(l).then(r,i)}function Ji(t){return function(){var e=this,n=arguments;return new Promise(function(r,i){var a=t.apply(e,n);function o(l){Qi(a,r,i,o,s,"next",l)}function s(l){Qi(a,r,i,o,s,"throw",l)}o(void 0)})}}var Be=Y.module("@deephaven/app-utils.ConnectionBootstrap");function mx(t){var{children:e}=t,n=Pe(),r=Je(),[i,a]=u.useState(),[o,s]=u.useState(),[l,d]=u.useState("connecting"),p=l==="failed",f=l==="shutdown",m=l==="reconnecting",h=l==="not_connecting";u.useEffect(function(){var y=!1;function O(){return w.apply(this,arguments)}function w(){return w=Ji(function*(){try{var P=yield r.getAsIdeConnection();if(y)return;s(P),d("connected")}catch(C){if(y)return;a(C),d("not_connecting")}}),w.apply(this,arguments)}return O(),()=>{y=!0}},[n,r]),u.useEffect(function(){if(o==null||f)return;function y(w){var{detail:P}=w;Be.info("Disconnect","".concat(JSON.stringify(P))),d("reconnecting")}var O=o.addEventListener(n.IdeConnection.EVENT_DISCONNECT,y);return O},[n,o,f]),u.useEffect(function(){if(o==null||f)return;function y(w){var{detail:P}=w;Be.info("Reconnect","".concat(JSON.stringify(P))),d("connected")}var O=o.addEventListener(n.CoreClient.EVENT_RECONNECT,y);return O},[n,o,f]),u.useEffect(function(){if(o==null)return;function y(w){var{detail:P}=w;Be.info("Shutdown","".concat(JSON.stringify(P))),a("Server shutdown: ".concat(P??"Unknown reason")),d("shutdown")}var O=o.addEventListener(n.IdeConnection.EVENT_SHUTDOWN,y);return O},[n,o]),u.useEffect(function(){if(o==null||f)return;function y(w){var{detail:P}=w;Be.warn("Reconnect authentication failed","".concat(JSON.stringify(P))),a("Reconnect authentication failed: ".concat(P??"Unknown reason")),d("failed")}var O=o.addEventListener(n.CoreClient.EVENT_RECONNECT_AUTH_FAILED,y);return O},[n,o,f]);var g=u.useCallback(function(){var v=Ji(function*(y){if(xt(o,"No connection available to fetch object with"),typeof y=="string")throw new Error("No URI resolvers available in Core");return o.getObject(Ua(y))});return function(y){return v.apply(this,arguments)}}(),[o]),b=u.useMemo(()=>({subscribe:(v,y)=>(y({fetch:()=>g(v),status:"ready"}),()=>{})}),[g]);function x(){Be.info("Refreshing application"),window.location.reload()}return f||l==="connecting"||h?c.jsx(je,{"data-testid":"connection-bootstrap-loading",isLoading:i==null,errorMessage:i!=null?"".concat(i):void 0}):c.jsx(od.Provider,{value:o??null,children:c.jsx($a.Provider,{value:g,children:c.jsxs(Dt.Provider,{value:b,children:[e,c.jsx(as,{isOpen:m,debounceMs:1e3,children:c.jsx(os,{icon:Qc,title:c.jsxs(c.Fragment,{children:[c.jsx(Pt,{})," Attempting to reconnect..."]}),subtitle:"Please check your network connection."})}),c.jsx(Da,{confirmButtonText:"Refresh",onConfirm:x,isOpen:p,headerText:"Authentication failed",bodyText:"Credentials are invalid. Please refresh your browser to try and reconnect."})]})})})}function Bx(t){return new URL(t,"".concat(window.location))}function gx(){var t=new URLSearchParams(window.location.search);return t.get("envoyPrefix")}function vx(){var t=gx();return t!=null?{headers:{"envoy-prefix":t}}:{headers:{}}}function Zi(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function ea(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?Zi(Object(n),!0).forEach(function(r){yx(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Zi(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function yx(t,e,n){return(e=bx(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function bx(t){var e=Px(t,"string");return typeof e=="symbol"?e:e+""}function Px(t,e){if(typeof t!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var r=n.call(t,e);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function xx(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return{action:()=>{Ng(Jc,ea(ea({},t),{},{userAgent:navigator.userAgent}),bo.getState())},shortcut:It.EXPORT_LOGS,isGlobal:e}}function Ox(t){var{children:e}=t,n=sd(),r=u.useContext(ja),i=u.useContext(St),a=Bs(n,r,i);return c.jsx(Ta.Provider,{value:a,children:e})}function Sx(t){var{children:e}=t,n=Ya(Rf),r=u.useContext(kt),i=_s(r),a=Pn();return c.jsx(Ma,{themes:i,waitForActivation:a,children:c.jsx(ro,{children:c.jsx(Ws,{children:c.jsx(_o,{density:n.gridDensity,children:e})})})})}function Wx(t){var{fontClassNames:e,pluginsUrl:n,getCorePlugins:r,serverUrl:i,logMetadata:a,children:o}=t,s=u.useMemo(()=>vx(),[]),[l,d]=u.useState(0),p=u.useCallback(()=>{},[]),f=u.useCallback(()=>{requestAnimationFrame(()=>{d(h=>h+1)})},[]);er(p,f);var m=u.useMemo(()=>[xx(a,!0)],[a]);return c.jsxs(qu,{store:bo,children:[c.jsx(Yo,{fontClassNames:e,children:c.jsx(cx,{getCorePlugins:r,pluginsUrl:n,children:c.jsx(Sx,{children:c.jsxs(Ea,{serverUrl:i,options:s,children:[c.jsx(hx,{children:c.jsx(ld,{children:c.jsx(Ox,{children:c.jsx(mx,{children:c.jsx(zo,{children:o})})})})}),c.jsx(jt,{actions:m})]},l)})})}),c.jsx(ss,{})]})}function ta(t,e,n,r,i,a,o){try{var s=t[a](o),l=s.value}catch(d){return void n(d)}s.done?e(l):Promise.resolve(l).then(r,i)}function wx(t){return function(){var e=this,n=arguments;return new Promise(function(r,i){var a=t.apply(e,n);function o(l){ta(a,r,i,o,s,"next",l)}function s(l){ta(a,r,i,o,s,"throw",l)}o(void 0)})}}function ue(t,e,n){return(e=Cx(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function Cx(t){var e=Ex(t,"string");return typeof e=="symbol"?e:e+""}function Ex(t,e){if(typeof t!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var r=n.call(t,e);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}var We=Y.module("GrpcFileStorageTable");class Xe{constructor(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"",r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:n;ue(this,"storageService",void 0),ue(this,"baseRoot",void 0),ue(this,"root",void 0),ue(this,"currentSize",0),ue(this,"currentViewport",void 0),ue(this,"listeners",[]),ue(this,"viewportUpdatePromise",void 0),ue(this,"currentViewportData",void 0),ue(this,"childTables",new Map),this.storageService=e,this.baseRoot=n,this.root=r,r===n&&(this.doRefresh=He(this.doRefresh.bind(this),Xe.REFRESH_DEBOUNCE))}removeBaseRoot(e){return we.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 r=e.split("/"),i=r.shift();if((i===void 0||i==="")&&(i=r.shift()),i===void 0||i==="")throw new Error("Invalid path: ".concat(e));var a=r.join("/");if(n){if(!this.childTables.has(i)){var o=new Xe(this.storageService,this.baseRoot,"".concat(this.root,"/").concat(i));this.childTables.set(i,o)}if(a){var s=this.childTables.get(i);s==null||s.setExpanded(a,n)}}else if(this.childTables.has(i))if(a){var l=this.childTables.get(i);l==null||l.setExpanded(a,n)}else this.childTables.delete(i);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){We.debug2("doRefresh",this.root),e(this.fetchData())}refresh(){var e;We.debug2("refresh",this.root),(e=this.viewportUpdatePromise)===null||e===void 0||e.cancel();var n=new Promise(i=>{this.doRefresh(i)}),r=Ee.makeCancelable(n.then(i=>{if(this.viewportUpdatePromise!==r)throw new to;return this.currentViewportData=i,this.sendUpdate(),i}));r.catch(i=>{Ee.isCanceled(i)||We.error("Error updating viewport",i)}),this.viewportUpdatePromise=r}refreshInternal(){try{this.refresh()}catch(e){Ee.isCanceled(e)||We.error("Unable to refresh data",e)}}fetchData(){var e=this;return wx(function*(){var{currentViewport:n}=e;if(!n)throw new Error("No viewport set");for(var r=yield e.storageService.listItems(e.root),i=r.map(f=>({type:f.type,filename:e.removeBaseRoot(f.filename),basename:f.basename,id:e.removeBaseRoot(f.filename),isExpanded:f.type==="directory"?e.childTables.has(f.basename):void 0})).sort((f,m)=>f.type!==m.type?f.type==="directory"?-1:1:f.basename.localeCompare(m.basename)),a=0;a<i.length;a+=1){var o=i[a],{basename:s,filename:l}=o;if(l===e.removeBaseRoot("".concat(e.root,"/").concat(s))&&o.type==="directory"){var d=e.childTables.get(s);if(d!=null){d.setViewport({top:0,bottom:n.bottom-a});var p=yield d.getViewportData();i.splice(a+1,0,...p.items)}}}return e.currentSize=i.length,We.debug2(e.root,"items",i,n),i=i.slice(n.top,n.bottom),{items:i,offset:n.top}})()}sendUpdate(){for(var e,{listeners:n}=this,r=(e=this.currentViewportData)!==null&&e!==void 0?e:{items:[],offset:0},i=0;i<n.length;i+=1)n[i](r)}}ue(Xe,"REFRESH_DEBOUNCE",50);function na(t,e,n,r,i,a,o){try{var s=t[a](o),l=s.value}catch(d){return void n(d)}s.done?e(l):Promise.resolve(l).then(r,i)}function me(t){return function(){var e=this,n=arguments;return new Promise(function(r,i){var a=t.apply(e,n);function o(l){na(a,r,i,o,s,"next",l)}function s(l){na(a,r,i,o,s,"throw",l)}o(void 0)})}}function _e(t,e,n){return(e=Tx(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function Tx(t){var e=jx(t,"string");return typeof e=="symbol"?e:e+""}function jx(t,e){if(typeof t!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var r=n.call(t,e);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}var Ix=Y.module("GrpcFileStorage");class rr{constructor(e,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"";_e(this,"dh",void 0),_e(this,"storageService",void 0),_e(this,"tables",[]),_e(this,"root",void 0),_e(this,"refreshTables",Xu(()=>{this.tables.forEach(i=>i.refresh())},rr.REFRESH_THROTTLE)),this.dh=e,this.storageService=n,this.root=r}removeRoot(e){return we.removeRoot(this.root,e)}addRoot(e){return we.addRoot(this.root,e)}createDirectory(e){var n=this;return me(function*(){return yield n.storageService.createDirectory(n.addRoot(e)),n.refreshTables(),{type:"directory",id:e,filename:e,basename:we.getBaseName(e)}})()}getTable(){var e=this;return me(function*(){var n=new Xe(e.storageService,e.root);return e.tables.push(n),n})()}saveFile(e){var n=this;return me(function*(){var r=n.dh.storage.FileContents.text(e.content);return yield n.storageService.saveFile(n.addRoot(e.filename),r,!0),n.refreshTables(),e})()}loadFile(e){var n=this;return me(function*(){var r=yield n.storageService.loadFile(n.addRoot(e)),i=yield r.text();return{filename:e,basename:we.getBaseName(e),content:i}})()}copyFile(e,n){var r=this;return me(function*(){var i=yield r.storageService.loadFile(r.addRoot(e));yield r.storageService.saveFile(r.addRoot(n),i,!1),r.refreshTables()})()}deleteFile(e){var n=this;return me(function*(){yield n.storageService.deleteItem(n.addRoot(e)),n.refreshTables()})()}moveFile(e,n){var r=this;return me(function*(){yield r.storageService.moveItem(r.addRoot(e),r.addRoot(n)),r.refreshTables()})()}info(e){var n=this;return me(function*(){var r=yield n.storageService.listItems(n.addRoot(we.getPath(e)),we.getBaseName(e));if(r.length===0)throw new Df;if(r.length>1)throw Ix.error("More than one matching file found, should never happen.",r),new Error("More than one matching file found");var i=r[0];if(!Lf(i.type))throw new Error("Unexpected file type: ".concat(i.type));return{filename:n.removeRoot(i.filename),basename:i.basename,id:n.removeRoot(i.filename),type:i.type}})()}}_e(rr,"REFRESH_THROTTLE",150);export{Wx as AppBootstrap,Hx as AppDashboards,hx as AuthBootstrap,mx as ConnectionBootstrap,od as ConnectionContext,Gx as DEFAULT_LAYOUT_CONFIG,Yx as DEFAULT_LAYOUT_CONFIG_NO_CONSOLE,rr as GrpcFileStorage,Xe as GrpcFileStorageTable,zx as GrpcLayoutStorage,qx as LocalWorkspaceStorage,cx as PluginsBootstrap,Ux as RemoteComponent,Sx as ThemeBootstrap,Xx as UserLayoutUtils,xx as createExportLogsContextAction,Qx as exportLayout,ox as getAuthHandlers,sx as getAuthPluginComponent,Bx as getBaseUrl,vx as getConnectOptions,Jx as getDefaultLayout,gx as getEnvoyPrefix,Yp as getPluginModuleValue,Zx as isLayoutV1,eO as isLayoutV2,ix as loadJson,rx as loadModulePlugin,ax as loadModulePlugins,tO as normalizeLayout,nO as useConnection,sd as useServerConfig,rO as useUser};
|
|
84
|
+
//# sourceMappingURL=index-C4Om-rPm.js.map
|