@deephaven/embed-widget 1.23.0 → 1.23.1-alpha-pivot-builder.5e6a5fd.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-BhL456sh.js → App-BvuWvKlE.js} +2 -2
- package/build/assets/{App-BhL456sh.js.map → App-BvuWvKlE.js.map} +1 -1
- package/build/assets/{Chart-Bct1OTF6.js → Chart-DWgEX7af.js} +2 -2
- package/build/assets/{Chart-Bct1OTF6.js.map → Chart-DWgEX7af.js.map} +1 -1
- package/build/assets/{IrisGrid-C3IJz6nb.js → IrisGrid-DglTgMOp.js} +2 -2
- package/build/assets/{IrisGrid-C3IJz6nb.js.map → IrisGrid-DglTgMOp.js.map} +1 -1
- package/build/assets/{IrisGridThemeProvider-PGSqEwKh.js → IrisGridThemeProvider-CtHzFeLc.js} +2 -2
- package/build/assets/{IrisGridThemeProvider-PGSqEwKh.js.map → IrisGridThemeProvider-CtHzFeLc.js.map} +1 -1
- package/build/assets/{LocalWorkspaceStorage-DblP67AR.js → LocalWorkspaceStorage-BR1VbrKD.js} +2 -2
- package/build/assets/{LocalWorkspaceStorage-DblP67AR.js.map → LocalWorkspaceStorage-BR1VbrKD.js.map} +1 -1
- package/build/assets/{LogPanel-C1_6X3ds.js → LogPanel-CoRvBQjW.js} +3 -3
- package/build/assets/LogPanel-CoRvBQjW.js.map +1 -0
- package/build/assets/{MarkdownEditor-CPmC5it0.js → MarkdownEditor-BNwkOYs0.js} +2 -2
- package/build/assets/{MarkdownEditor-CPmC5it0.js.map → MarkdownEditor-BNwkOYs0.js.map} +1 -1
- package/build/assets/{MarkdownNotebook-BsHvrPUA.js → MarkdownNotebook-C3qGE62a.js} +2 -2
- package/build/assets/{MarkdownNotebook-BsHvrPUA.js.map → MarkdownNotebook-C3qGE62a.js.map} +1 -1
- package/build/assets/{index-CgAoPxrH.js → index-C23Z3kqm.js} +34 -34
- package/build/assets/index-C23Z3kqm.js.map +1 -0
- package/build/assets/{index-DK1KaCOb.js → index-DTgWnYGf.js} +3 -3
- package/build/assets/{index-DK1KaCOb.js.map → index-DTgWnYGf.js.map} +1 -1
- package/build/assets/{index-sIC4DbFu.js → index-aUgTMo-T.js} +3 -3
- package/build/assets/{index-sIC4DbFu.js.map → index-aUgTMo-T.js.map} +1 -1
- package/build/index.html +1 -1
- package/package.json +17 -17
- package/build/assets/LogPanel-C1_6X3ds.js.map +0 -1
- package/build/assets/index-CgAoPxrH.js.map +0 -1
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./Plot-BOusvhev.js","./Plotly-C1DmK1JJ.js","./plotly-XNdqftXi.js","./helpers-BosuxZz1.js","./vendor-Iv4yoqlt.js","./vendor-BSYTbjlr.css"])))=>i.map(i=>d[i]);
|
|
2
|
-
import{ao as Iu,a as H,aO as js,T as Du,X as Mu,Y as ju,V as Au,a4 as ku,O as Nu,z as Lu,a8 as Ru,d as As,G as ks,e as Ns,q as $u,aP as Fu,aH as Hu,aQ as Ls,aR as Uu,aS as Bu,L as Un,ac as Wu,_ as Ku,aT as Rs,u as B,t as $s,Z as zu,aU as Vu,aN as Gu,aJ as Fs,aK as qu,f as Hs,n as Xu,aL as ii,aV as Zu,aW as Yu,aX as eo,aY as Qu,aZ as Ju,a_ as ed,a$ as td,v as nd,k as Us,aF as rd,h as zr,aA as id,b0 as od,b1 as to,aD as ad,b2 as no,b3 as Bs,b4 as sd,au as ld,b5 as ud,b6 as dd,b7 as cd,b8 as hd,b9 as md,ba as pd}from"./index-
|
|
2
|
+
import{ao as Iu,a as H,aO as js,T as Du,X as Mu,Y as ju,V as Au,a4 as ku,O as Nu,z as Lu,a8 as Ru,d as As,G as ks,e as Ns,q as $u,aP as Fu,aH as Hu,aQ as Ls,aR as Uu,aS as Bu,L as Un,ac as Wu,_ as Ku,aT as Rs,u as B,t as $s,Z as zu,aU as Vu,aN as Gu,aJ as Fs,aK as qu,f as Hs,n as Xu,aL as ii,aV as Zu,aW as Yu,aX as eo,aY as Qu,aZ as Ju,a_ as ed,a$ as td,v as nd,k as Us,aF as rd,h as zr,aA as id,b0 as od,b1 as to,aD as ad,b2 as no,b3 as Bs,b4 as sd,au as ld,b5 as ud,b6 as dd,b7 as cd,b8 as hd,b9 as md,ba as pd}from"./index-DTgWnYGf.js";import{r as h,as as Bn,bE as Ir,D as d,bU as fd,J as j,G as U,bV as Ws,bW as oi,H as vd,R as Oi,bX as gd,bG as bd,I as me,C as Pt,bY as yd,aj as Cd,ak as Sd,E as Ks,ar as fn,bZ as wd,b_ as _d,b$ as Ed,c0 as Pd,bR as ai,c1 as x,c2 as ro,bT as pe,L as zs,N as Vs,c3 as Td,bS as Wn,bO as Cn,_ as Od,bp as Le,c4 as xd,an as Id,aH as Dd,bs as io,c5 as Md,c6 as oo,br as rt,c7 as Gs,c8 as jd,bP as nt,bQ as en,c9 as ao,bq as Ad,bN as kd,ca as Nn}from"./vendor-Iv4yoqlt.js";var Nd=Object.freeze([]),yC=new Map,qs=()=>{};function CC(n){return Array.isArray(n)?n:[n]}function SC(){for(var n=arguments.length,e=new Array(n),t=0;t<n;t++)e[t]=arguments[t];return e.filter(r=>r!=null)}function Ld(n,e,t){return(e=Rd(e))in n?Object.defineProperty(n,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):n[e]=t,n}function Rd(n){var e=$d(n,"string");return typeof e=="symbol"?e:e+""}function $d(n,e){if(typeof n!="object"||!n)return n;var t=n[Symbol.toPrimitive];if(t!==void 0){var r=t.call(n,e);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(n)}class so extends Error{constructor(){super(...arguments),Ld(this,"isCanceled",!0)}}function Fd(n,e,t){return(e=Hd(e))in n?Object.defineProperty(n,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):n[e]=t,n}function Hd(n){var e=Ud(n,"string");return typeof e=="symbol"?e:e+""}function Ud(n,e){if(typeof n!="object"||!n)return n;var t=n[Symbol.toPrimitive];if(t!==void 0){var r=t.call(n,e);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(n)}class Bd extends Error{constructor(){super(...arguments),Fd(this,"isClipboardPermissionsDeniedError",!0)}}function Wd(n,e,t){return(e=Kd(e))in n?Object.defineProperty(n,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):n[e]=t,n}function Kd(n){var e=zd(n,"string");return typeof e=="symbol"?e:e+""}function zd(n,e){if(typeof n!="object"||!n)return n;var t=n[Symbol.toPrimitive];if(t!==void 0){var r=t.call(n,e);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(n)}class Vr extends Error{constructor(){super(...arguments),Wd(this,"isClipboardUnavailableError",!0)}}function Vd(n,e,t){return(e=Gd(e))in n?Object.defineProperty(n,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):n[e]=t,n}function Gd(n){var e=qd(n,"string");return typeof e=="symbol"?e:e+""}function qd(n,e){if(typeof n!="object"||!n)return n;var t=n[Symbol.toPrimitive];if(t!==void 0){var r=t.call(n,e);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(n)}class Xs extends Error{constructor(){super(...arguments),Vd(this,"isPermissionUnsupported",!0)}}function lo(n,e,t,r,i,o,a){try{var s=n[o](a),l=s.value}catch(u){return void t(u)}s.done?e(l):Promise.resolve(l).then(r,i)}function Xd(n){return function(){var e=this,t=arguments;return new Promise(function(r,i){var o=n.apply(e,t);function a(l){lo(o,r,i,a,s,"next",l)}function s(l){lo(o,r,i,a,s,"throw",l)}a(void 0)})}}function uo(n){return si.apply(this,arguments)}function si(){return si=Xd(function*(n){try{var e=n;return(yield navigator.permissions.query({name:e})).state}catch(t){throw t instanceof TypeError?new Xs:t}}),si.apply(this,arguments)}function co(n,e,t,r,i,o,a){try{var s=n[o](a),l=s.value}catch(u){return void t(u)}s.done?e(l):Promise.resolve(l).then(r,i)}function Zs(n){return function(){var e=this,t=arguments;return new Promise(function(r,i){var o=n.apply(e,t);function a(l){co(o,r,i,a,s,"next",l)}function s(l){co(o,r,i,a,s,"throw",l)}a(void 0)})}}function Ys(n){return li.apply(this,arguments)}function li(){return li=Zs(function*(n){var e=navigator,t=e.clipboard;if(t!==void 0)try{return yield navigator.clipboard.writeText(n)}catch{}Zd(n)}),li.apply(this,arguments)}function Zd(n){var e=document.activeElement,t=document.createElement("textarea");t.value=n,document.body.appendChild(t),t.focus(),t.select();var r=document.execCommand("copy");if(document.body.removeChild(t),e instanceof HTMLElement&&e.focus(),!r)throw new Error("Unable to execute copy command")}function wC(){return ui.apply(this,arguments)}function ui(){return ui=Zs(function*(){try{var n=navigator,e=n.clipboard;if(e===void 0)throw new Vr;var t=yield uo("clipboard-read");if(t==="granted"){var r=yield e.readText();return r}if(t==="prompt"){try{yield e.readText()}catch{}if(t=yield uo("clipboard-read"),t==="granted"){var i=yield e.readText();return i}}if(t==="prompt"||t==="denied")throw new Bd}catch(o){throw o instanceof Xs?new Vr:o}throw new Vr}),ui.apply(this,arguments)}var In;function rn(n,e,t){return(e=Yd(e))in n?Object.defineProperty(n,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):n[e]=t,n}function Yd(n){var e=Qd(n,"string");return typeof e=="symbol"?e:e+""}function Qd(n,e){if(typeof n!="object"||!n)return n;var t=n[Symbol.toPrimitive];if(t!==void 0){var r=t.call(n,e);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(n)}var Jd="table_",Qs="column_",ec=new Set(["in","not","i","ii","k"]),tc=new Set(["abstract","continue","for","new","switch","assert","default","if","package","synchronized","boolean","do","goto","private","this","break","double","implements","protected","throw","byte","else","import","public","throws","case","enum","instanceof","return","transient","catch","extends","int","short","try","char","final","interface","static","void","class","finally","long","strictfp","volatile","const","float","native","super","while","null","true","false"]),nc=/[^a-zA-Z0-9_$\-+@]/g,rc=/[^A-Za-z0-9_$]/g,ic=/^[a-zA-Z_$][a-zA-Z0-9_$\-+@]*$/,oc=/[^a-zA-Z0-9_]/g;function ac(n){return n.replace(/[ -]/g,"_")}function sc(n){return n.replace(/\s/g,"_")}class gt{}In=gt;rn(gt,"legalize",(n,e,t,r,i,o)=>{var a=e(n.trim());return i&&(ec.has(a)||tc.has(a))&&(a=t+a),a=a.replace(r,""),a?(/^[0-9-]/.test(a)&&(a=t+a),a):t+o});rn(gt,"legalizeTableName",n=>In.legalize(n,sc,Jd,nc,!1,0));rn(gt,"makeVariableName",n=>In.legalizeTableName(n).replace(oc,"_"));rn(gt,"legalizeColumnNames",n=>{var e=[];return n.forEach((t,r)=>{var i=In.legalizeColumnName(t,r);e.includes(i)&&(i=Qs+r),e.push(i)}),e});rn(gt,"legalizeColumnName",function(n){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return In.legalize(n,ac,Qs,rc,!0,e)});rn(gt,"isValidTableName",n=>ic.test(n));rn(gt,"isValidColumnName",n=>In.legalizeColumnName(n)===n);class Js extends CustomEvent{constructor(e,t){super(e,t)}}class Ye{static makeCancelable(e,t){var r=!1,i,o,a=new Promise((s,l)=>{o=l,Promise.resolve(e).then(u=>{r?t&&t(u):(i=u,s(u))}).catch(u=>l(u))});return a.cancel=()=>{r=!0,o(new so),i!=null&&t&&t(i)},a}static isCanceled(e){return e instanceof so}static isTimedOut(e){return e instanceof Iu}static withTimeout(e,t){return new Promise((r,i)=>{setTimeout(()=>{try{r(t())}catch(o){i(o)}},e)})}}function ho(n,e,t){return(e=lc(e))in n?Object.defineProperty(n,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):n[e]=t,n}function lc(n){var e=uc(n,"string");return typeof e=="symbol"?e:e+""}function uc(n,e){if(typeof n!="object"||!n)return n;var t=n[Symbol.toPrimitive];if(t!==void 0){var r=t.call(n,e);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(n)}class Dr{constructor(){ho(this,"pending",[]),ho(this,"resolved",[])}add(e,t){var r=Ye.makeCancelable(e,t);return this.pending.push(r),r.then(()=>{this.resolve(r)},()=>{this.resolve(r)}),r}remove(e){for(var t=0;t<this.pending.length;t+=1)if(this.pending[t]===e){this.pending.splice(t,1);return}}resolve(e){this.remove(e),this.resolved.push(e)}cancel(){for(var e=[...this.pending,...this.resolved],t=0;t<e.length;t+=1)e[t].cancel();this.pending=[],this.resolved=[]}}function _C(n){var e=n;n instanceof CustomEvent&&(e=n.detail);var t="";if(e instanceof Error?t=e.message:e!=null&&(t="".concat(e)),t=t.trim(),t.length>0)return t}function mo(n,e){return mc(n)||hc(n,e)||cc(n,e)||dc()}function dc(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
3
3
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function cc(n,e){if(n){if(typeof n=="string")return po(n,e);var t={}.toString.call(n).slice(8,-1);return t==="Object"&&n.constructor&&(t=n.constructor.name),t==="Map"||t==="Set"?Array.from(n):t==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?po(n,e):void 0}}function po(n,e){(e==null||e>n.length)&&(e=n.length);for(var t=0,r=Array(e);t<e;t++)r[t]=n[t];return r}function hc(n,e){var t=n==null?null:typeof Symbol<"u"&&n[Symbol.iterator]||n["@@iterator"];if(t!=null){var r,i,o,a,s=[],l=!0,u=!1;try{if(o=(t=t.call(n)).next,e!==0)for(;!(l=(r=o.call(t)).done)&&(s.push(r.value),s.length!==e);l=!0);}catch(c){u=!0,i=c}finally{try{if(!l&&t.return!=null&&(a=t.return(),Object(a)!==a))return}finally{if(u)throw i}}return s}}function mc(n){if(Array.isArray(n))return n}class lt{static isValidRange(e){return e!=null&&e.length===2&&Number.isInteger(e[0])&&Number.isInteger(e[1])&&e[0]<=e[1]}static validateRange(e){if(!lt.isValidRange(e))throw new Error("Invalid range! ".concat(e))}static isSelected(e,t){for(var r=0;r<e.length;r+=1){var i=e[r],o=i[0],a=i[1];if(o<=t&&t<=a)return!0}return!1}static selectRange(e,t){for(var r=mo(t,2),i=r[0],o=r[1],a=[...e],s=a.length-1;s>=0;s-=1){var l=a[s],u=l[0],c=l[1];if(u<=i&&o<=c)return a;i<=c&&u<=o&&(i=Math.min(i,u),o=Math.max(o,c),a.splice(s,1))}return a.push([i,o]),a}static deselectRange(e,t){for(var r=mo(t,2),i=r[0],o=r[1],a=[...e],s=a.length-1;s>=0;s-=1){var l=a[s],u=l[0],c=l[1];if(!(o<u||c<i))if(u<i&&o<c){a[s]=[u,i-1],a.splice(s+1,0,[o+1,c]);break}else i<=u&&c<=o?a.splice(s,1):u<i?a[s]=[u,i-1]:a[s]=[o+1,c]}return a}static count(e){return e.reduce((t,r)=>t+(r[1]-r[0]+1),0)}static getItemsInRanges(e,t){return t.reduce((r,i)=>{for(var o=[...r],a=i[0];a<=i[1];a+=1)o.push(e[a]);return o},[])}}function*EC(n,e){for(var t=n;t<=e;++t)yield t}var PC=" ";class pc{static join(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"and";if(e==null||e.length===0)return"";if(e.length===1)return e[0];if(e.length===2)return"".concat(e[0]," ").concat(t," ").concat(e[1]);var r=e.slice(0,e.length-1).join(", "),i=e[e.length-1];return"".concat(r,", ").concat(t," ").concat(i)}static toLower(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;if(e==null){if(t)return"";throw new Error("Null string passed in to TextUtils.toLower")}return e.toLowerCase()}static sort(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;return e<t?r?-1:1:e>t?r?1:-1:0}static pluralize(e,t,r){return e===1?t:r??"".concat(t,"s")}}var Kn;function Bt(n,e,t){return(e=fc(e))in n?Object.defineProperty(n,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):n[e]=t,n}function fc(n){var e=vc(n,"string");return typeof e=="symbol"?e:e+""}function vc(n,e){if(typeof n!="object"||!n)return n;var t=n[Symbol.toPrimitive];if(t!==void 0){var r=t.call(n,e);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(n)}class Fe{static formatElapsedTime(e){if(typeof e!="number"||!Number.isInteger(e))throw new Error("".concat(e," is not a number that can be expressed as a formatted time"));var t=Math.floor(e/3600),r=Math.floor(e%3600/60),i=e%60;return"".concat(t>0?"".concat(t,"h "):"")+"".concat(r>0||t>0?"".concat(r,"m "):"")+"".concat(e>=60?"".concat(i,"s").padStart(3,"0"):"".concat(i,"s"))}static formatTime(e){if(typeof e!="number"||!Number.isInteger(e)||e<0)throw new Error("".concat(e," is not a number that can be expressed as a formatted time"));var t=String(Math.floor(e/(60*60))).padStart(2,"0"),r=e%(60*60),i=String(Math.floor(r/60)).padStart(2,"0"),o=r%60,a=String(Math.ceil(o)).padStart(2,"0");return"".concat(t,":").concat(i,":").concat(a)}static isTimeString(e){return new RegExp(Fe.TIME_PATTERN).test(e)}static parseTime(e){if(e==null||typeof e!="string")throw new Error("".concat(e," is not a valid string"));var t=e.split(":");if(t.length!==3)throw new Error("".concat(e," is not a time string that can be parsed"));return Number(t[0])*60*60+Number(t[1])*60+Number(t[2])}static formatDuration(e){var t=Math.floor(e/3600),r=Math.floor(e%3600/60),i=e%60;return t>0?"".concat(t,"h ").concat(r,"m ").concat(i,"s"):r>0?"".concat(r,"m ").concat(i.toFixed(1),"s"):"".concat(i.toFixed(2),"s")}static formatConvertedDuration(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"ms";if(e==null||t===""||t===0||t==null)return null;var i=1,o=null,a=null;if(r==="ms")i=1e3,o=new Date(e).valueOf(),a=new Date(t).valueOf();else if(r==="ns")i=1e9,o=Number(e),a=Number(t);else return null;var s=(a-o)/i;return this.formatDuration(s)}}Kn=Fe;Bt(Fe,"TIME_PATTERN","([01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9]");Bt(Fe,"MILLIS_PER_SECOND",1e3);Bt(Fe,"NANOS_PER_SECOND",1e9);Bt(Fe,"NANOS_PER_MIN",60*Kn.NANOS_PER_SECOND);Bt(Fe,"NANOS_PER_HOUR",60*Kn.NANOS_PER_MIN);Bt(Fe,"MILLIS_PER_MIN",60*Kn.MILLIS_PER_SECOND);Bt(Fe,"MILLIS_PER_HOUR",60*Kn.MILLIS_PER_MIN);Bt(Fe,"TIME_ZONES",Object.freeze([{label:"Tokyo UTC+9 No DST",value:"Asia/Tokyo"},{label:"Seoul UTC+9 No DST",value:"Asia/Seoul"},{label:"Hong Kong UTC+8 No DST",value:"Asia/Hong_Kong"},{label:"Singapore UTC+8 No DST",value:"Asia/Singapore"},{label:"Kolkata UTC+5:30 No DST",value:"Asia/Kolkata"},{label:"Berlin UTC+1",value:"Europe/Berlin"},{label:"UTC UTC±0 No DST",value:"UTC"},{label:"London UTC±0",value:"Europe/London"},{label:"Sao Paulo UTC-2",value:"America/Sao_Paulo"},{label:"Newfoundland UTC-3:30",value:"America/St_Johns"},{label:"Halifax UTC-4",value:"America/Halifax"},{label:"New York UTC−5",value:"America/New_York"},{label:"Chicago UTC-6",value:"America/Chicago"},{label:"Denver UTC-7",value:"America/Denver"},{label:"Los Angeles UTC-8",value:"America/Los_Angeles"},{label:"Anchorage UTC-9",value:"America/Anchorage"},{label:"Honolulu UTC-10 No DST",value:"Pacific/Honolulu"},{label:"Zurich UTC+1",value:"Europe/Zurich"},{label:"Amsterdam UTC+1",value:"Europe/Amsterdam"},{label:"Taipei UTC+8 No DST",value:"Asia/Taipei"},{label:"Sydney UTC+10",value:"Australia/Sydney"}]));function gc(n,e,t){return(e=bc(e))in n?Object.defineProperty(n,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):n[e]=t,n}function bc(n){var e=yc(n,"string");return typeof e=="symbol"?e:e+""}function yc(n,e){if(typeof n!="object"||!n)return n;var t=n[Symbol.toPrimitive];if(t!==void 0){var r=t.call(n,e);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(n)}class Ln extends Error{constructor(){super(...arguments),gc(this,"isInvalid",!0)}}function el(){var n=h.useRef(!1);return h.useEffect(()=>(n.current=!0,()=>{n.current=!1}),[]),n}function fo(n,e,t,r,i,o,a){try{var s=n[o](a),l=s.value}catch(u){return void t(u)}s.done?e(l):Promise.resolve(l).then(r,i)}function Cc(n){return function(){var e=this,t=arguments;return new Promise(function(r,i){var o=n.apply(e,t);function a(l){fo(o,r,i,a,s,"next",l)}function s(l){fo(o,r,i,a,s,"throw",l)}a(void 0)})}}var Sc=H.module("useAsyncInterval");function wc(n,e){var t=el(),r=h.useRef(0),i=h.useRef(0),o=h.useRef(null),a=h.useCallback(Cc(function*(){var s=Date.now();i.current+=1;var l=o.current==null?e:s-o.current;o.current=s;try{yield n()}catch(m){Sc.error("A tick error occurred:",m)}if(t.current){l+=Date.now()-o.current;var u=Math.max(0,l-e),c=Math.max(0,e-u);r.current=window.setTimeout(a,c)}}),[n,t,e]);h.useEffect(()=>(o.current=null,a(),()=>{window.clearTimeout(r.current)}),[e,a])}function zn(n){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"No value available in context. Was code wrapped in a provider?",t=h.useContext(n);if(t==null)throw new Error(e);return t}function _c(n,e){var t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},r=t.leading,i=r===void 0?!1:r,o=t.trailing,a=o===void 0?!0:o,s=t.maxWait,l=h.useMemo(()=>Bn(n,e,s!=null?{leading:i,trailing:a,maxWait:s}:{leading:i,trailing:a}),[n,e,i,a,s]);return h.useEffect(()=>()=>l.cancel(),[l]),l}function Ec(n){var e=h.useRef();return h.useEffect(function(){e.current=n}),e.current}function Pc(n,e,t){var r=h.useRef(t),i=h.useRef(n);i.current=n;var o=h.useMemo(()=>Ir(function(){return i.current(...arguments)},e,r.current),[e]);return h.useEffect(()=>()=>{var a,s;(a=(s=r.current)===null||s===void 0?void 0:s.flushOnUnmount)!==null&&a!==void 0&&a?o.flush():o.cancel()},[o]),o}function tl(n){var e=h.useRef(null);return h.useEffect(function(){n&&(typeof n=="function"?n(e.current):n.current=e.current)}),e}function Tc(n,e){return Dc(n)||Ic(n,e)||xc(n,e)||Oc()}function Oc(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
4
4
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function xc(n,e){if(n){if(typeof n=="string")return vo(n,e);var t={}.toString.call(n).slice(8,-1);return t==="Object"&&n.constructor&&(t=n.constructor.name),t==="Map"||t==="Set"?Array.from(n):t==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?vo(n,e):void 0}}function vo(n,e){(e==null||e>n.length)&&(e=n.length);for(var t=0,r=Array(e);t<e;t++)r[t]=n[t];return r}function Ic(n,e){var t=n==null?null:typeof Symbol<"u"&&n[Symbol.iterator]||n["@@iterator"];if(t!=null){var r,i,o,a,s=[],l=!0,u=!1;try{if(o=(t=t.call(n)).next,e!==0)for(;!(l=(r=o.call(t)).done)&&(s.push(r.value),s.length!==e);l=!0);}catch(c){u=!0,i=c}finally{try{if(!l&&t.return!=null&&(a=t.return(),Object(a)!==a))return}finally{if(u)throw i}}return s}}function Dc(n){if(Array.isArray(n))return n}var Mc=3500,jc=H.module("useCopyToClipboard");function Ac(){var n=h.useState(!1),e=Tc(n,2),t=e[0],r=e[1],i=h.useRef(null),o=h.useCallback(a=>{Ys(a).then(()=>{r(!0)}).catch(s=>jc.error("Unable to copy ".concat(a),`
|
|
5
5
|
`,s))},[]);return h.useEffect(()=>(i.current&&clearTimeout(i.current),t&&(i.current=setTimeout(()=>{r(!1)},Mc)),()=>{i.current&&clearTimeout(i.current)}),[t]),[t,o]}var kc=["gray-50","gray-75","gray-100","gray-200","gray-300","gray-400","gray-500","gray-600","gray-700","gray-800","gray-900","red-100","red-200","red-300","red-400","red-500","red-600","red-700","red-800","red-900","red-1000","red-1100","red-1200","red-1300","red-1400","orange-100","orange-200","orange-300","orange-400","orange-500","orange-600","orange-700","orange-800","orange-900","orange-1000","orange-1100","orange-1200","orange-1300","orange-1400","yellow-100","yellow-200","yellow-300","yellow-400","yellow-500","yellow-600","yellow-700","yellow-800","yellow-900","yellow-1000","yellow-1100","yellow-1200","yellow-1300","yellow-1400","chartreuse-100","chartreuse-200","chartreuse-300","chartreuse-400","chartreuse-500","chartreuse-600","chartreuse-700","chartreuse-800","chartreuse-900","chartreuse-1000","chartreuse-1100","chartreuse-1200","chartreuse-1300","chartreuse-1400","celery-100","celery-200","celery-300","celery-400","celery-500","celery-600","celery-700","celery-800","celery-900","celery-1000","celery-1100","celery-1200","celery-1300","celery-1400","green-100","green-200","green-300","green-400","green-500","green-600","green-700","green-800","green-900","green-1000","green-1100","green-1200","green-1300","green-1400","seafoam-100","seafoam-200","seafoam-300","seafoam-400","seafoam-500","seafoam-600","seafoam-700","seafoam-800","seafoam-900","seafoam-1000","seafoam-1100","seafoam-1200","seafoam-1300","seafoam-1400","cyan-100","cyan-200","cyan-300","cyan-400","cyan-500","cyan-600","cyan-700","cyan-800","cyan-900","cyan-1000","cyan-1100","cyan-1200","cyan-1300","cyan-1400","blue-100","blue-200","blue-300","blue-400","blue-500","blue-600","blue-700","blue-800","blue-900","blue-1000","blue-1100","blue-1200","blue-1300","blue-1400","indigo-100","indigo-200","indigo-300","indigo-400","indigo-500","indigo-600","indigo-700","indigo-800","indigo-900","indigo-1000","indigo-1100","indigo-1200","indigo-1300","indigo-1400","purple-100","purple-200","purple-300","purple-400","purple-500","purple-600","purple-700","purple-800","purple-900","purple-1000","purple-1100","purple-1200","purple-1300","purple-1400","fuchsia-100","fuchsia-200","fuchsia-300","fuchsia-400","fuchsia-500","fuchsia-600","fuchsia-700","fuchsia-800","fuchsia-900","fuchsia-1000","fuchsia-1100","fuchsia-1200","fuchsia-1300","fuchsia-1400","magenta-100","magenta-200","magenta-300","magenta-400","magenta-500","magenta-600","magenta-700","magenta-800","magenta-900","magenta-1000","magenta-1100","magenta-1200","magenta-1300","magenta-1400","negative","notice","positive","info","accent","accent-100","accent-200","accent-300","accent-400","accent-500","accent-600","accent-700","accent-800","accent-900","accent-1000","accent-1100","accent-1200","accent-1300","accent-1400","bg","content-bg","subdued-content-bg","surface-bg","fg"];function Nc(n){return typeof n=="string"&&kc.includes(n)}function nl(n){return n!=null&&Nc(n)?"var(--dh-color-".concat(n,")"):n}var Lc=["color","UNSAFE_style"];function go(n,e){var t=Object.keys(n);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(n);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(n,i).enumerable})),t.push.apply(t,r)}return t}function ir(n){for(var e=1;e<arguments.length;e++){var t=arguments[e]!=null?arguments[e]:{};e%2?go(Object(t),!0).forEach(function(r){Rc(n,r,t[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(t)):go(Object(t)).forEach(function(r){Object.defineProperty(n,r,Object.getOwnPropertyDescriptor(t,r))})}return n}function Rc(n,e,t){return(e=$c(e))in n?Object.defineProperty(n,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):n[e]=t,n}function $c(n){var e=Fc(n,"string");return typeof e=="symbol"?e:e+""}function Fc(n,e){if(typeof n!="object"||!n)return n;var t=n[Symbol.toPrimitive];if(t!==void 0){var r=t.call(n,e);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(n)}function Hc(n,e){if(n==null)return{};var t,r,i=Uc(n,e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(n);for(r=0;r<o.length;r++)t=o[r],e.indexOf(t)===-1&&{}.propertyIsEnumerable.call(n,t)&&(i[t]=n[t])}return i}function Uc(n,e){if(n==null)return{};var t={};for(var r in n)if({}.hasOwnProperty.call(n,r)){if(e.indexOf(r)!==-1)continue;t[r]=n[r]}return t}var rl=h.forwardRef((n,e)=>{var t=n.color,r=n.UNSAFE_style,i=Hc(n,Lc),o=h.useMemo(()=>ir(ir({},r),{},{color:nl(t)}),[t,r]);return d.jsx(fd,ir(ir({},i),{},{ref:e,UNSAFE_style:o}))});rl.displayName="Text";function bo(n,e){var t=Object.keys(n);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(n);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(n,i).enumerable})),t.push.apply(t,r)}return t}function Mt(n){for(var e=1;e<arguments.length;e++){var t=arguments[e]!=null?arguments[e]:{};e%2?bo(Object(t),!0).forEach(function(r){vn(n,r,t[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(t)):bo(Object(t)).forEach(function(r){Object.defineProperty(n,r,Object.getOwnPropertyDescriptor(t,r))})}return n}function vn(n,e,t){return(e=Bc(e))in n?Object.defineProperty(n,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):n[e]=t,n}function Bc(n){var e=Wc(n,"string");return typeof e=="symbol"?e:e+""}function Wc(n,e){if(typeof n!="object"||!n)return n;var t=n[Symbol.toPrimitive];if(t!==void 0){var r=t.call(n,e);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(n)}var yo="popper",Kc="popper-container",zc={placement:"bottom-end",modifiers:{preventOverflow:{boundariesElement:"scrollParent",fn:(n,e)=>{var t,r,i=(t=Ws.Defaults.modifiers)===null||t===void 0||(t=t.preventOverflow)===null||t===void 0||(r=t.fn)===null||r===void 0?void 0:r.call(t,n,e);return i==null?n:(i.styles.maxHeight="".concat(document.documentElement.clientHeight-n.offsets.popper.top-2*e.padding,"px"),i??n)}},flip:{enabled:!1}}};class Mr extends h.Component{constructor(e){super(e),vn(this,"element",void 0),vn(this,"container",void 0),vn(this,"nodeRef",j.createRef()),vn(this,"rAF",void 0),this.handleEnter=this.handleEnter.bind(this),this.handleExit=this.handleExit.bind(this),this.handleBlur=this.handleBlur.bind(this),this.element=document.createElement("div"),this.updateContainerClassName(e.containerClassName,e.isMaximized),this.container=j.createRef(),this.rAF=0;var t=this.props.isShown;this.state={show:t,popper:null}}componentDidUpdate(e){var t=this.props,r=t.isShown,i=t.containerClassName,o=t.isMaximized,a=this.state.popper;(e.containerClassName!==i||e.isMaximized!==o)&&this.updateContainerClassName(i,o),e.isShown!==r&&(cancelAnimationFrame(this.rAF),this.rAF=window.requestAnimationFrame(()=>{r?this.show():this.hide()})),a&&a.scheduleUpdate()}componentWillUnmount(){this.destroyPopper(!1)}updateContainerClassName(e,t){this.element.className=U(Kc,e,{maximized:t})}getVisibleElement(e){return e==null||e.clientHeight>0||e.clientWidth>0?e:this.getVisibleElement(e.parentElement)}initPopper(){var e,t,r=this.state.popper,i=this.props,o=i.closeOnBlur,a=i.referenceObject;if(!r&&this.container.current!==null){var s=this.props,l=s.options,u=s.keepInParent,c=u?zc:{placement:"auto",modifiers:{preventOverflow:{boundariesElement:"viewport"}}},m=Mt(Mt(Mt({},c),l),{},{modifiers:Mt(Mt(Mt({},c.modifiers),l.modifiers),{},{preventOverflow:Mt(Mt({},(e=c.modifiers)===null||e===void 0?void 0:e.preventOverflow),(t=l.modifiers)===null||t===void 0?void 0:t.preventOverflow)})});document.body.appendChild(this.element);var p=this.getVisibleElement(this.container.current);p==null&&(p=this.container.current);var f=new Ws(a||p,this.element,m);f.scheduleUpdate(),cancelAnimationFrame(this.rAF),this.rAF=window.requestAnimationFrame(()=>{if(o){var v=this.element.querySelector(".".concat(yo));v instanceof HTMLElement&&!v.contains(document.activeElement)&&v.focus()}}),oi.flushSync(()=>{this.setState({popper:f})})}}destroyPopper(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0;cancelAnimationFrame(this.rAF);var t=this.state.popper;t&&(t.destroy(),document.body.contains(this.element)&&document.body.removeChild(this.element),e&&this.setState({popper:null}))}show(){this.initPopper(),oi.flushSync(()=>{this.setState({show:!0})})}hide(){this.setState({show:!1})}scheduleUpdate(){var e=this.state.popper;e&&e.scheduleUpdate()}handleBlur(e){var t=this.props,r=t.closeOnBlur,i=t.onBlur;e.relatedTarget instanceof HTMLElement&&(this.element.contains(e.relatedTarget)||(i==null||i(e),r&&this.hide()))}handleEnter(){var e=this.props.onEntered;e()}handleExit(){var e=this.props.onExited,t=this.state.show;t||this.destroyPopper(),e()}renderContent(){var e=this.props,t=e.className,r=e.children,i=e.timeout,o=e.interactive,a=e.closeOnBlur,s=this.state.show;return d.jsx(js,{isPortal:!0,children:d.jsx(vd,{in:s,timeout:i,classNames:"popper-transition",onEntered:this.handleEnter,onExited:this.handleExit,nodeRef:this.nodeRef,children:d.jsx("div",{ref:this.nodeRef,onClick:l=>{l.stopPropagation()},onKeyDown:l=>{l.key==="Escape"&&this.hide()},className:U(yo,{interactive:o},t),onBlur:this.handleBlur,tabIndex:a?-1:void 0,role:"presentation",children:d.jsxs("div",{className:"popper-content",children:[r,d.jsx("div",{className:"popper-arrow","x-arrow":""})]})})})})}render(){var e=this.state.popper,t=this.props["data-testid"];return d.jsx("div",{className:"popper-parent-container",ref:this.container,style:{display:"none"},"data-testid":t,children:e&&Oi.createPortal(this.renderContent(),this.element)})}}vn(Mr,"defaultProps",{options:{},className:"",containerClassName:"",isMaximized:!1,timeout:Du.transitionMs,onEntered(){},onExited(){},onBlur(){},isShown:!1,interactive:!1,closeOnBlur:!1,keepInParent:!1,referenceObject:null,"data-testid":void 0});var di;function Co(n,e){var t=Object.keys(n);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(n);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(n,i).enumerable})),t.push.apply(t,r)}return t}function Vc(n){for(var e=1;e<arguments.length;e++){var t=arguments[e]!=null?arguments[e]:{};e%2?Co(Object(t),!0).forEach(function(r){ut(n,r,t[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(t)):Co(Object(t)).forEach(function(r){Object.defineProperty(n,r,Object.getOwnPropertyDescriptor(t,r))})}return n}function ut(n,e,t){return(e=Gc(e))in n?Object.defineProperty(n,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):n[e]=t,n}function Gc(n){var e=qc(n,"string");return typeof e=="symbol"?e:e+""}function qc(n,e){if(typeof n!="object"||!n)return n;var t=n[Symbol.toPrimitive];if(t!==void 0){var r=t.call(n,e);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(n)}var Xc=H.module("Tooltip");class le extends h.Component{static handleHidden(){le.shownTooltipCount-=1,le.shownTooltipCount===0&&(le.lastHiddenTime=Date.now())}static handleShown(){le.shownTooltipCount+=1}constructor(e){super(e),ut(this,"container",void 0),ut(this,"popper",void 0),ut(this,"parent",void 0),ut(this,"timer",void 0),this.handleMouseMove=this.handleMouseMove.bind(this),this.handleMouseLeave=this.handleMouseLeave.bind(this),this.handleWindowMouseMove=this.handleWindowMouseMove.bind(this),this.handleWheel=this.handleWheel.bind(this),this.handleTimeout=this.handleTimeout.bind(this),this.handleExited=this.handleExited.bind(this),this.stopShowingTooltip=this.stopShowingTooltip.bind(this),this.container=j.createRef(),this.popper=j.createRef(),this.parent=null,this.timer=null,this.state={isShown:!1}}componentDidMount(){this.startListening();var e=this.props.timeout;e===0&&this.show()}componentDidUpdate(e,t){var r=t.isShown,i=this.state.isShown;i!==r&&(i?le.handleShown():le.handleHidden())}componentWillUnmount(){this.stopListening(),this.stopListeningWindow(),this.stopTimer();var e=this.state.isShown;e&&le.handleHidden()}startListening(){if(!this.container.current||!this.container.current.parentElement){Xc.error("Tooltip doesn't have a container or a parent set!");return}this.parent=this.container.current.parentElement,this.parent.addEventListener("mousemove",this.handleMouseMove),this.parent.addEventListener("mouseleave",this.handleMouseLeave),this.parent.addEventListener("mousedown",this.stopShowingTooltip)}stopListening(){this.parent&&(this.parent.removeEventListener("mousemove",this.handleMouseMove),this.parent.removeEventListener("mouseleave",this.handleMouseLeave),this.parent.removeEventListener("mousedown",this.stopShowingTooltip))}startListeningWindow(){window.addEventListener("mousemove",this.handleWindowMouseMove,!0),window.addEventListener("contextmenu",this.stopShowingTooltip,!0),window.addEventListener("wheel",this.handleWheel)}stopListeningWindow(){window.removeEventListener("mousemove",this.handleWindowMouseMove,!0),window.removeEventListener("contextmenu",this.stopShowingTooltip,!0),window.removeEventListener("wheel",this.handleWheel)}handleMouseMove(){this.startTimer()}handleWheel(){var e=this.state.isShown;this.popper.current&&this.parent&&e&&!this.popper.current.element.matches(":hover")&&!this.parent.matches(":hover")&&(this.stopTimer(),this.hide())}handleMouseLeave(){var e=this.state.isShown;this.stopTimer();var t=this.props.interactive;!t&&e&&this.hide()}handleTimeout(){this.show()}handleWindowMouseMove(e){var t=e.clientX,r=e.clientY,i=this.state.isShown;if(!(!this.popper.current||!this.parent)){var o=this.popper.current.element.getBoundingClientRect(),a=this.parent.getBoundingClientRect();t>=o.left&&t<=o.left+o.width&&r>=o.top&&r<=o.top+o.height?this.handleMouseMove():t>=a.left&&t<=a.left+a.width&&r>=a.top&&r<=a.top+a.height?this.handleMouseMove():i&&(this.stopTimer(),this.hide())}}startTimer(){this.stopTimer();var e=this.props,t=e.timeout,r=e.reshowTimeout,i=t;(le.shownTooltipCount>0||Date.now()-le.lastHiddenTime<le.triggerReshowThreshold)&&(i=r),this.timer=window.setTimeout(this.handleTimeout,i)}stopTimer(){this.timer!=null&&(clearTimeout(this.timer),this.timer=null)}show(){var e=this.state.isShown;if(this.stopTimer(),!e){var t;(t=this.popper.current)===null||t===void 0||t.show(),oi.flushSync(()=>{this.setState({isShown:!0})});var r=this.props.interactive;r&&this.startListeningWindow()}}hide(){var e;(e=this.popper.current)===null||e===void 0||e.hide(),this.stopListeningWindow()}update(){var e;(e=this.popper.current)===null||e===void 0||e.scheduleUpdate()}handleExited(){this.setState({isShown:!1});var e=this.props.onExited;e()}stopShowingTooltip(){var e=this.state.isShown;this.stopTimer(),e&&this.hide()}render(){var e=this.props,t=e.interactive,r=e.children,i=e.referenceObject,o=e.popperClassName,a=e["data-testid"],s=e.onEntered,l=this.state.isShown,u=this.props.options;return u=Vc({placement:"bottom"},u),d.jsx("div",{ref:this.container,style:{display:"none"},"data-testid":a,children:d.jsx(Mr,{className:U(o,"popper-tooltip"),options:u,ref:this.popper,onEntered:s,onExited:this.handleExited,interactive:t,referenceObject:i,children:d.jsxs("div",{className:"tooltip-content",children:[" ",l&&r]})})})}}di=le;ut(le,"defaultTimeout",500);ut(le,"defaultReshowTimeout",100);ut(le,"triggerReshowThreshold",300);ut(le,"shownTooltipCount",0);ut(le,"lastHiddenTime",Date.now());ut(le,"defaultProps",{interactive:!1,options:{},popperClassName:"",reshowTimeout:di.defaultReshowTimeout,timeout:di.defaultTimeout,onEntered:()=>{},onExited:()=>{},"data-testid":void 0});function So(n,e){return Jc(n)||Qc(n,e)||Yc(n,e)||Zc()}function Zc(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
6
6
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Yc(n,e){if(n){if(typeof n=="string")return wo(n,e);var t={}.toString.call(n).slice(8,-1);return t==="Object"&&n.constructor&&(t=n.constructor.name),t==="Map"||t==="Set"?Array.from(n):t==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?wo(n,e):void 0}}function wo(n,e){(e==null||e>n.length)&&(e=n.length);for(var t=0,r=Array(e);t<e;t++)r[t]=n[t];return r}function Qc(n,e){var t=n==null?null:typeof Symbol<"u"&&n[Symbol.iterator]||n["@@iterator"];if(t!=null){var r,i,o,a,s=[],l=!0,u=!1;try{if(o=(t=t.call(n)).next,e!==0)for(;!(l=(r=o.call(t)).done)&&(s.push(r.value),s.length!==e);l=!0);}catch(c){u=!0,i=c}finally{try{if(!l&&t.return!=null&&(a=t.return(),Object(a)!==a))return}finally{if(u)throw i}}return s}}function Jc(n){if(Array.isArray(n))return n}var eh=H.module("ThemeProvider"),xi=h.createContext(null);xi.displayName="ThemeContext";function TC(n){var e=n.themes,t=n.waitForActivation,r=t===void 0?!1:t,i=n.defaultPreloadValues,o=i===void 0?Lu:i,a=n.children,s=h.useMemo(()=>Mu(),[]),l=h.useState(null),u=So(l,2),c=u[0],m=u[1],p=h.useState(ju),f=So(p,2),v=f[0],g=f[1],b=h.useMemo(()=>e==null?null:Au(v,{base:s,custom:e??[]}),[s,v,e]),y=h.useMemo(()=>[...s,...e??[]],[s,e]);return h.useEffect(function(){if(!(b==null||e==null)){ku(o);var S=Nu(o);eh.debug2("updateThemePreloadData:",{active:b.map(_=>_.themeKey),custom:e.map(_=>_.themeKey),preloadStyleContent:S,selectedThemeKey:v}),Ru({themeKey:v,preloadStyleContent:S})}},[b,v,e,o]),h.useEffect(()=>{m({activeThemes:b,selectedThemeKey:v,themes:y,setSelectedThemeKey:g})},[b,v,y]),r&&b==null?null:d.jsxs(d.Fragment,{children:[b==null?null:d.jsx(d.Fragment,{children:b.map(C=>d.jsx("style",{"data-theme-key":C.themeKey,children:C.styleContent},C.themeKey))}),c==null?null:d.jsx(xi.Provider,{value:c,children:d.jsx(js,{children:a})})]})}function il(){return zn(xi,"No ThemeContext value found. Component must be wrapped in a ThemeContext.Provider")}var th=["color","UNSAFE_style"];function _o(n,e){var t=Object.keys(n);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(n);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(n,i).enumerable})),t.push.apply(t,r)}return t}function or(n){for(var e=1;e<arguments.length;e++){var t=arguments[e]!=null?arguments[e]:{};e%2?_o(Object(t),!0).forEach(function(r){nh(n,r,t[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(t)):_o(Object(t)).forEach(function(r){Object.defineProperty(n,r,Object.getOwnPropertyDescriptor(t,r))})}return n}function nh(n,e,t){return(e=rh(e))in n?Object.defineProperty(n,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):n[e]=t,n}function rh(n){var e=ih(n,"string");return typeof e=="symbol"?e:e+""}function ih(n,e){if(typeof n!="object"||!n)return n;var t=n[Symbol.toPrimitive];if(t!==void 0){var r=t.call(n,e);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(n)}function oh(n,e){if(n==null)return{};var t,r,i=ah(n,e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(n);for(r=0;r<o.length;r++)t=o[r],e.indexOf(t)===-1&&{}.propertyIsEnumerable.call(n,t)&&(i[t]=n[t])}return i}function ah(n,e){if(n==null)return{};var t={};for(var r in n)if({}.hasOwnProperty.call(n,r)){if(e.indexOf(r)!==-1)continue;t[r]=n[r]}return t}var ol=h.forwardRef((n,e)=>{var t=n.color,r=n.UNSAFE_style,i=oh(n,th),o=h.useMemo(()=>or(or({},r),{},{color:nl(t)}),[t,r]);return d.jsx(gd,or(or({},i),{},{ref:e,UNSAFE_style:o}))});ol.displayName="Heading";function sh(n){var e=n.children,t=n.className,r=n.style,i=n["data-testid"];return d.jsx("div",{className:U("btn-group",t),style:r,role:"group","data-testid":i,children:e})}var lh=["kind","variant","type","tooltip","icon","disabled","active","onClick","onContextMenu","onMouseDown","onMouseUp","onMouseEnter","onMouseLeave","onKeyDown","className","style","children","tabIndex","data-testid","aria-label"];function Eo(n,e){var t=Object.keys(n);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(n);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(n,i).enumerable})),t.push.apply(t,r)}return t}function Po(n){for(var e=1;e<arguments.length;e++){var t=arguments[e]!=null?arguments[e]:{};e%2?Eo(Object(t),!0).forEach(function(r){uh(n,r,t[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(t)):Eo(Object(t)).forEach(function(r){Object.defineProperty(n,r,Object.getOwnPropertyDescriptor(t,r))})}return n}function uh(n,e,t){return(e=dh(e))in n?Object.defineProperty(n,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):n[e]=t,n}function dh(n){var e=ch(n,"string");return typeof e=="symbol"?e:e+""}function ch(n,e){if(typeof n!="object"||!n)return n;var t=n[Symbol.toPrimitive];if(t!==void 0){var r=t.call(n,e);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(n)}function hh(n,e){if(n==null)return{};var t,r,i=mh(n,e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(n);for(r=0;r<o.length;r++)t=o[r],e.indexOf(t)===-1&&{}.propertyIsEnumerable.call(n,t)&&(i[t]=n[t])}return i}function mh(n,e){if(n==null)return{};var t={};for(var r in n)if({}.hasOwnProperty.call(n,r)){if(e.indexOf(r)!==-1)continue;t[r]=n[r]}return t}function ph(n,e){switch(n){case"primary":return"btn-primary";case"secondary":return"btn-outline-primary";case"tertiary":return"btn-secondary";case"success":return"btn-success";case"danger":return"btn-danger";case"inline":return"btn-inline";case"ghost":return U("btn-link",{"btn-link-icon":e,"btn-link-icon-only":e})}}function fh(n){switch(n){case"group-end":return U("pl-2","pr-3")}}var ne=j.forwardRef((n,e)=>{var t=n.kind,r=n.variant,i=n.type,o=i===void 0?"button":i,a=n.tooltip,s=n.icon,l=n.disabled,u=l===void 0?!1:l,c=n.active,m=n.onClick,p=n.onContextMenu,f=n.onMouseDown,v=n.onMouseUp,g=n.onMouseEnter,b=n.onMouseLeave,y=n.onKeyDown,C=n.className,S=n.style,_=n.children,E=n.tabIndex,D=n["data-testid"],W=n["aria-label"],N=hh(n,lh),I=bd({},"button"),k=I.UNSAFE_className,$;r&&($=fh(r));var ae;s&&(ae=j.isValidElement(s)?s:d.jsx(me,{icon:s}));var A=ae!=null&&_==null,X=ph(t,A),de;a!==void 0&&(de=typeof a=="string"?d.jsx(le,{children:a}):a);var se=W;W===void 0&&A&&a!=null&&typeof a=="string"&&(se=a);var be=d.jsxs("button",Po(Po({"data-testid":D,ref:e,type:o,className:U("btn",X,$,{active:c},C,k),onClick:m,onContextMenu:p,onMouseUp:v,onMouseDown:f,onMouseEnter:g,onMouseLeave:b,onKeyDown:y,style:S,disabled:u,tabIndex:E,"aria-label":se},N),{},{children:[s&&ae,_,a!=null&&!u&&de]}));return u&&a!=null?d.jsxs("span",{className:"btn-disabled-wrapper",children:[be,de]}):be});ne.displayName="Button";function al(n){var e=n.className,t=n.children,r=n["data-testid"];return d.jsx("div",{className:U("modal-footer",e),"data-testid":r,children:t})}function ci(n){var e=n.isOpen,t=n.headerText,r=n.bodyText,i=n.onCancel,o=n.onConfirm,a=n.onDiscard,s=n.onModalDisable,l=n.cancelButtonText,u=l===void 0?"Cancel":l,c=n.confirmButtonText,m=c===void 0?"Okay":c,p=n.discardButtonText,f=p===void 0?"Discard":p,v=n.isConfirmDanger,g=v===void 0?!1:v,b=n.children,y=n["data-testid"],C=h.useRef(null),S=h.useRef(null),_=h.useCallback(()=>{S.current!==null&&S.current.checked&&s&&s(),o()},[o,s]),E=h.useCallback(()=>{var W;(W=C.current)===null||W===void 0||W.focus()},[]),D="";return e&&(D=typeof r=="function"?r():r),d.jsxs(As,{isOpen:e,onOpened:E,children:[d.jsx(ks,{closeButton:!1,children:t}),d.jsx(Ns,{children:D}),d.jsxs(al,{children:[s&&d.jsxs("div",{className:"custom-control custom-checkbox form-group mr-auto",children:[d.jsx("input",{type:"checkbox",className:"custom-control-input",id:"move-confirmation-checkbox",defaultChecked:!1,ref:S,"data-testid":y!==void 0?"".concat(y,"-checkbox-confirm"):void 0}),d.jsx("label",{className:"custom-control-label",htmlFor:"move-confirmation-checkbox",children:"Don't ask me again"})]}),a&&d.jsx(ne,{kind:"secondary",className:"mr-auto","data-dismiss":"modal",onClick:a,"data-testid":y!==void 0?"".concat(y,"-btn-discard"):void 0,children:f}),i&&d.jsx(ne,{kind:"secondary","data-dismiss":"modal",onClick:i,"data-testid":y!==void 0?"".concat(y,"-btn-cancel"):void 0,children:u}),d.jsxs(sh,{children:[d.jsx(ne,{kind:g?"danger":"primary",onClick:_,ref:C,"data-testid":y!==void 0?"".concat(y,"-btn-confirm"):void 0,children:m}),b]})]})]})}function vh(n,e,t){return(e=gh(e))in n?Object.defineProperty(n,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):n[e]=t,n}function gh(n){var e=bh(n,"string");return typeof e=="symbol"?e:e+""}function bh(n,e){if(typeof n!="object"||!n)return n;var t=n[Symbol.toPrimitive];if(t!==void 0){var r=t.call(n,e);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(n)}function Gr(n){return n.then!==void 0}class ge{static disableAllActions(){ge.actionsDisabled=!0}static enableAllActions(){ge.actionsDisabled=!1}static isContextActionEvent(e){return Array.isArray(e.contextActions)}static compareActions(e,t){if(e.group!==t.group){var r,i;return((r=e.group)!==null&&r!==void 0?r:0)>((i=t.group)!==null&&i!==void 0?i:0)?1:-1}if(e.order!==t.order){var o,a;return((o=e.order)!==null&&o!==void 0?o:0)>((a=t.order)!==null&&a!==void 0?a:0)?1:-1}if(e.title!==t.title){var s,l;return((s=e.title)!==null&&s!==void 0?s:"")>((l=t.title)!==null&&l!==void 0?l:"")?1:-1}return e!==t?e>t?1:-1:0}static sortActions(e){if(e==null||!Array.isArray(e))return[];var t=e.slice();return t.sort(ge.compareActions),t}static isMacPlatform(){var e=window.navigator.platform;return e.startsWith("Mac")}static getModifierKey(){return ge.isMacPlatform()?"metaKey":"ctrlKey"}static isModifierKeyDown(e){var t=ge.getModifierKey();return e[t]}static getMenuItems(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0,r=[],i=e;Array.isArray(i)||(i=[i]);for(var o=0;o<i.length;o+=1){var a=i[o],s=void 0;typeof a=="function"?s=a():s=a,s!=null&&(s instanceof Promise?t&&r.push(s):Array.isArray(s)?r=r.concat(s):r.push(s))}return r=r.filter(l=>l.title!==void 0||l.then!=null||l.menuElement),r}static getNextMenuItem(e,t,r){var i=e;i<0&&t<0&&(i=r.length);for(var o=1;o<r.length+1;o+=1){var a=(i+t*o+r.length)%r.length,s=r[a];if(!(s instanceof Promise)&&s.disabled!==!0)return a}return e}}vh(ge,"actionsDisabled",!1);var To=H.module("GlobalContextAction");class yh extends h.Component{constructor(e){super(e),this.handleContextMenu=this.handleContextMenu.bind(this),this.handleKeyDown=this.handleKeyDown.bind(this)}componentDidMount(){document.body.addEventListener("contextmenu",this.handleContextMenu),document.body.addEventListener("keydown",this.handleKeyDown)}componentWillUnmount(){document.body.removeEventListener("contextmenu",this.handleContextMenu),document.body.removeEventListener("keydown",this.handleKeyDown)}handleContextMenu(e){var t=e;t.contextActions==null&&(t.contextActions=[]);var r=this.props.action;r.title==null&&!r.menuElement||(t.contextActions==null&&(t.contextActions=[]),t.contextActions.push(r),To.debug("Received context menu event at global action! Menu items are now: ",t.contextActions))}handleKeyDown(e){var t=this.props.action;if(!ge.actionsDisabled&&t.shortcut!==void 0&&t.shortcut.matchesEvent(e)){var r;To.debug("Global hotkey matched!",e),(r=t.action)===null||r===void 0||r.call(t,e),e.preventDefault(),e.stopPropagation()}}render(){return null}}class Ch extends h.Component{render(){for(var e=this.props,t=e.actions,r=e["data-testid"],i=[],o=0;o<t.length;o+=1){var a=t[o],s=a.shortcut;if(a.title!=null||a.menuElement||s){var l=d.jsx(yh,{action:a,"data-testid":r},"".concat(a.title,".").concat(s==null?void 0:s.id));i.push(l)}}return i}}function sl(n,e,t){return(e=Sh(e))in n?Object.defineProperty(n,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):n[e]=t,n}function Sh(n){var e=wh(n,"string");return typeof e=="symbol"?e:e+""}function wh(n,e){if(typeof n!="object"||!n)return n;var t=n[Symbol.toPrimitive];if(t!==void 0){var r=t.call(n,e);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(n)}var ar=H.module("ContextActions");class ue extends h.Component{static triggerMenu(e,t,r,i){if(i.length!==0){var o=new MouseEvent("contextmenu",{clientX:t,clientY:r,bubbles:!0,cancelable:!0});o.contextActions=i,e.dispatchEvent(o)}}constructor(e){super(e),sl(this,"container",void 0),this.handleContextMenu=this.handleContextMenu.bind(this),this.handleKeyDown=this.handleKeyDown.bind(this),this.container=j.createRef(),this.state={globalActions:[],keyboardActions:[]}}static getDerivedStateFromProps(e){if(e.actions==null||!Array.isArray(e.actions))return{globalActions:[],keyboardActions:[]};var t=e.actions.filter(i=>!Gr(i)&&typeof i!="function"&&i.isGlobal),r=e.actions.filter(i=>!Gr(i)&&typeof i!="function"&&(i.isGlobal===void 0||!i.isGlobal)&&i.shortcut!=null);return{globalActions:t,keyboardActions:r}}componentDidMount(){var e;(e=this.container.current)!==null&&e!==void 0&&e.parentElement&&(this.container.current.parentElement.addEventListener("contextmenu",this.handleContextMenu),this.container.current.parentElement.addEventListener("keydown",this.handleKeyDown))}componentWillUnmount(){var e;(e=this.container.current)!==null&&e!==void 0&&e.parentElement&&(this.container.current.parentElement.removeEventListener("contextmenu",this.handleContextMenu),this.container.current.parentElement.removeEventListener("keydown",this.handleKeyDown))}handleContextMenu(e){var t=this.props.ignoreClassNames,r=t===void 0?[]:t;if(r.length>0){for(var i=e.target,o=function(){var c=i,m=c.classList,p=r.find(f=>m.contains(f));if(p!==void 0)return ar.debug2('Contextmenu event ignored based on the target className "'.concat(p,'"')),{v:void 0};i=i.parentElement},a;i!=null;)if(a=o(),a)return a.v}if(ge.isContextActionEvent(e)||(e.contextActions=[]),!!ge.isContextActionEvent(e)){var s=this.props.actions;if(s!=null){var l=s;Array.isArray(l)&&(l=l.filter(u=>Gr(u)||typeof u=="function"||u.isGlobal===void 0||!u.isGlobal)),e.contextActions=e.contextActions.concat(l)}ar.debug("Received context menu event! Menu items are now: ",e.contextActions)}}handleKeyDown(e){for(var t=this.state.keyboardActions,r=0;r<t.length;r+=1){var i=t[r];if(!ge.actionsDisabled&&i.shortcut!=null&&i.shortcut.matchesEvent(e)){var o;ar.debug("Context hotkey matched!",e),(o=i.action)===null||o===void 0||o.call(i,e),e.stopPropagation(),e.preventDefault(),ar.debug2("Matched hotkey returned false, key event not consumed")}}}render(){var e=this.props["data-testid"],t=this.state.globalActions;return d.jsx("div",{className:"context-actions-listener",ref:this.container,"data-testid":e,children:d.jsx(Ch,{actions:t})})}}sl(ue,"groups",{default:void 0,high:100,medium:5e3,low:1e4,global:1e5,edit:100});var ll=j.forwardRef((n,e)=>{var t,r,i=n.closeMenu,o=n.children,a=n.menuItem,s=n.onMenuItemClick,l=n.onMenuItemMouseMove,u=n.onMenuItemContextMenu,c=n.isKeyboardSelected,m=c===void 0?!1:c,p=n.isMouseSelected,f=p===void 0?!1:p,v=n["data-testid"],g=h.useCallback(A=>{s(a,A)},[a,s]),b=h.useCallback(A=>{l(a,A)},[a,l]),y=h.useCallback(A=>{u(a,A)},[a,u]);function C(A,X,de){if(typeof A.type=="string")return A;var se={menuItem:a,closeMenu:i,isKeyboardSelected:m,isMouseSelected:f,iconElement:X,displayShortcut:de,"data-testid":v};return j.cloneElement(A,{forwardedProps:se})}var S=(t=a.shortcutText)!==null&&t!==void 0?t:(r=a.shortcut)===null||r===void 0?void 0:r.getDisplayText(),_=null;if(a.icon){var E=a.icon;if(j.isValidElement(E))_=E;else{var D;a.iconColor!=null&&(a.disabled===void 0||!a.disabled)&&(D={color:a.iconColor}),_=d.jsx(me,{icon:E,style:D})}}var W=null,N=!!o;a.actions&&(W=d.jsx(me,{icon:$u}));var I=null;if(a.menuElement)I=d.jsx("div",{className:"custom-menu-item",onMouseMove:b,children:C(a.menuElement,_,S)});else{var k,$=a.disabled,ae=a.iconOutline;I=d.jsx("button",{type:"button",className:U("btn-context-menu",{disabled:$},{active:(N||f)&&($===void 0||!$)},{"keyboard-active":m&&($===void 0||!$)}),onClick:g,onMouseMove:b,onContextMenu:y,title:(k=a.description)!==null&&k!==void 0?k:"",children:d.jsxs("div",{className:"btn-context-menu-wrapper",children:[d.jsx("span",{className:U("icon",{outline:ae}),children:_}),d.jsx("span",{className:"title",children:a.title}),S!==void 0&&d.jsx("span",{className:"shortcut",children:S}),W&&d.jsx("span",{className:U("submenu-indicator",{disabled:$}),children:W})]})})}return d.jsxs("div",{className:"context-menu-item",ref:e,"data-testid":v,children:[o,I]})});ll.displayName="ContextMenuItem";function _h(n,e){return Oh(n)||Th(n,e)||Ph(n,e)||Eh()}function Eh(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
7
7
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Ph(n,e){if(n){if(typeof n=="string")return Oo(n,e);var t={}.toString.call(n).slice(8,-1);return t==="Object"&&n.constructor&&(t=n.constructor.name),t==="Map"||t==="Set"?Array.from(n):t==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?Oo(n,e):void 0}}function Oo(n,e){(e==null||e>n.length)&&(e=n.length);for(var t=0,r=Array(e);t<e;t++)r[t]=n[t];return r}function Th(n,e){var t=n==null?null:typeof Symbol<"u"&&n[Symbol.iterator]||n["@@iterator"];if(t!=null){var r,i,o,a,s=[],l=!0,u=!1;try{if(o=(t=t.call(n)).next,e!==0)for(;!(l=(r=o.call(t)).done)&&(s.push(r.value),s.length!==e);l=!0);}catch(c){u=!0,i=c}finally{try{if(!l&&t.return!=null&&(a=t.return(),Object(a)!==a))return}finally{if(u)throw i}}return s}}function Oh(n){if(Array.isArray(n))return n}var ul=j.forwardRef((n,e)=>{var t=n.checked,r=t===void 0?!1:t,i=n.children,o=n.className,a=n.disabled,s=a===void 0?!1:a,l=n.inputClassName,u=n.isInvalid,c=u===void 0?!1:u,m=n.labelClassName,p=n.name,f=n.onChange,v=n["data-testid"],g=h.useState(Pt()),b=_h(g,1),y=b[0],C=tl(e);h.useEffect(function(){C.current&&(C.current.indeterminate=r===null)},[C,r]);var S=h.useCallback(_=>{C.current&&(C.current.indeterminate=r===null),f&&f(_)},[C,r,f]);return d.jsxs("div",{className:U("custom-control custom-checkbox",o),children:[d.jsx("input",{type:"checkbox",ref:C,checked:r??!1,className:U("custom-control-input",l,{"is-invalid":c}),disabled:s,id:y,name:p,onChange:S,"data-testid":v}),d.jsx("label",{className:U("custom-control-label",m),htmlFor:y,children:i})]})});ul.displayName="Checkbox";function Sr(n){return(n==null?void 0:n.WrappedComponent)!==void 0}function dl(n){return Sr(n)&&dl(n.WrappedComponent)?!0:n.prototype!=null&&n.prototype.isReactComponent!=null}function xh(n){return!Sr(n)&&"$$typeof"in n&&n.$$typeof===yd.ForwardRef}function cl(n){return dl(n)||xh(n)}var Ih=["copy","tooltip","children"];function xo(n,e){var t=Object.keys(n);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(n);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(n,i).enumerable})),t.push.apply(t,r)}return t}function Io(n){for(var e=1;e<arguments.length;e++){var t=arguments[e]!=null?arguments[e]:{};e%2?xo(Object(t),!0).forEach(function(r){Dh(n,r,t[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(t)):xo(Object(t)).forEach(function(r){Object.defineProperty(n,r,Object.getOwnPropertyDescriptor(t,r))})}return n}function Dh(n,e,t){return(e=Mh(e))in n?Object.defineProperty(n,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):n[e]=t,n}function Mh(n){var e=jh(n,"string");return typeof e=="symbol"?e:e+""}function jh(n,e){if(typeof n!="object"||!n)return n;var t=n[Symbol.toPrimitive];if(t!==void 0){var r=t.call(n,e);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(n)}function Ah(n,e){return Rh(n)||Lh(n,e)||Nh(n,e)||kh()}function kh(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
8
8
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Nh(n,e){if(n){if(typeof n=="string")return Do(n,e);var t={}.toString.call(n).slice(8,-1);return t==="Object"&&n.constructor&&(t=n.constructor.name),t==="Map"||t==="Set"?Array.from(n):t==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?Do(n,e):void 0}}function Do(n,e){(e==null||e>n.length)&&(e=n.length);for(var t=0,r=Array(e);t<e;t++)r[t]=n[t];return r}function Lh(n,e){var t=n==null?null:typeof Symbol<"u"&&n[Symbol.iterator]||n["@@iterator"];if(t!=null){var r,i,o,a,s=[],l=!0,u=!1;try{if(o=(t=t.call(n)).next,e!==0)for(;!(l=(r=o.call(t)).done)&&(s.push(r.value),s.length!==e);l=!0);}catch(c){u=!0,i=c}finally{try{if(!l&&t.return!=null&&(a=t.return(),Object(a)!==a))return}finally{if(u)throw i}}return s}}function Rh(n){if(Array.isArray(n))return n}function $h(n,e){if(n==null)return{};var t,r,i=Fh(n,e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(n);for(r=0;r<o.length;r++)t=o[r],e.indexOf(t)===-1&&{}.propertyIsEnumerable.call(n,t)&&(i[t]=n[t])}return i}function Fh(n,e){if(n==null)return{};var t={};for(var r in n)if({}.hasOwnProperty.call(n,r)){if(e.indexOf(r)!==-1)continue;t[r]=n[r]}return t}var Mo="Copy";function hl(n){var e=n.copy,t=n.tooltip,r=t===void 0?Mo:t,i=n.children,o=$h(n,Ih),a=Ac(),s=Ah(a,2),l=s[0],u=s[1],c=l?"Copied":r;return d.jsxs(Cd,Io(Io({},o),{},{"aria-label":c,onPress:()=>{u(typeof e=="function"?e():e)},children:[d.jsx(Sd,{UNSAFE_className:i==null?"action-button-icon-with-tooltip":void 0,children:d.jsx(me,{icon:l?Fu:Hu})}),i!=null&&d.jsx(rl,{children:i}),(i==null||c!==Mo)&&d.jsx(le,{children:c})]}))}hl.displayName="CopyButton";function jo(n,e){var t=Object.keys(n);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(n);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(n,i).enumerable})),t.push.apply(t,r)}return t}function Hh(n){for(var e=1;e<arguments.length;e++){var t=arguments[e]!=null?arguments[e]:{};e%2?jo(Object(t),!0).forEach(function(r){Rn(n,r,t[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(t)):jo(Object(t)).forEach(function(r){Object.defineProperty(n,r,Object.getOwnPropertyDescriptor(t,r))})}return n}function Rn(n,e,t){return(e=Uh(e))in n?Object.defineProperty(n,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):n[e]=t,n}function Uh(n){var e=Bh(n,"string");return typeof e=="symbol"?e:e+""}function Bh(n,e){if(typeof n!="object"||!n)return n;var t=n[Symbol.toPrimitive];if(t!==void 0){var r=t.call(n,e);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(n)}class ml extends h.PureComponent{constructor(e){var t;super(e),Rn(this,"container",void 0),Rn(this,"oldFocus",void 0),Rn(this,"rAF",void 0),this.handleKeyDown=this.handleKeyDown.bind(this),this.handleMenuItemClick=this.handleMenuItemClick.bind(this),this.handleMenuItemMouseMove=this.handleMenuItemMouseMove.bind(this),this.handleMouseLeave=this.handleMouseLeave.bind(this),this.handleCloseMenu=this.handleCloseMenu.bind(this),this.container=j.createRef(),this.oldFocus=document.activeElement,this.rAF=0;var r=e.options,i=(t=r.initialKeyboardIndex)!==null&&t!==void 0?t:-1;this.state={menuItems:[],keyboardIndex:i,mouseIndex:-1}}componentDidMount(){this.initMenu(),this.rAF=window.requestAnimationFrame(()=>{var e;(e=this.container.current)===null||e===void 0||e.focus();var t=this.props.onMenuOpened;t(this)})}componentDidUpdate(e){var t=this.props.actions;e.actions!==t&&this.initMenu()}componentWillUnmount(){cancelAnimationFrame(this.rAF)}getKeyboardIndex(){var e=this.props.options;if(e.separateKeyboardMouse!==void 0&&e.separateKeyboardMouse){var t=this.state.keyboardIndex;return t}return this.getMouseIndex()}setKeyboardIndex(e){var t=this.props.options;t.separateKeyboardMouse!==void 0&&t.separateKeyboardMouse?this.setState({keyboardIndex:e}):this.setMouseIndex(e)}getMouseIndex(){var e=this.state.mouseIndex;return e}setMouseIndex(e){this.setState({mouseIndex:e})}initMenu(){cancelAnimationFrame(this.rAF),this.setState({menuItems:[]});var e=this.props.actions,t=ge.getMenuItems(e,!1);t.length>0&&this.setState(r=>({menuItems:ge.sortActions(r.menuItems.concat(t))}))}handleKeyDown(e){var t=this.state.menuItems,r=this.getKeyboardIndex(),i=r;if(e.key==="Enter"||e.key===" "){r!=null&&r>=0&&r<t.length&&this.handleMenuItemClick(t[r],e);return}e.key==="Escape"?i=null:e.key==="ArrowUp"||e.key==="Tab"&&e.shiftKey===!0?i=ge.getNextMenuItem(i??0,-1,t):(e.key==="ArrowDown"||e.key==="Tab"&&e.shiftKey===!1)&&(i=ge.getNextMenuItem(i??0,1,t)),r!==i&&(i!==null?this.setKeyboardIndex(i):(this.closeMenu(),this.oldFocus instanceof HTMLElement&&this.oldFocus.focus()),e.preventDefault(),e.stopPropagation())}closeMenu(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1,t=this.props,r=t.closeMenu,i=t.onMenuClosed;cancelAnimationFrame(this.rAF),this.rAF=window.requestAnimationFrame(()=>{r(e),i(this)})}handleCloseMenu(){this.closeMenu()}handleMenuItemClick(e,t){t.preventDefault(),t.stopPropagation(),e!=null&&(e.disabled===void 0||!e.disabled)&&e.action!=null&&(e.action(t.nativeEvent),this.closeMenu(!0))}handleMenuItemMouseMove(e){var t=this.state.menuItems,r=t.indexOf(e);this.setMouseIndex(r)}handleMouseLeave(){this.setMouseIndex(-1)}render(){for(var e=[],t=this.props["data-testid"],r=this.state,i=r.keyboardIndex,o=r.menuItems,a=r.mouseIndex,s=0;s<o.length;s+=1){var l=o[s];s>0&&l.group!==o[s-1].group&&e.push(d.jsx("hr",{},"".concat(s,".separator")));var u=d.jsx(ll,{isKeyboardSelected:i===s,isMouseSelected:a===s,menuItem:l,closeMenu:this.handleCloseMenu,onMenuItemClick:this.handleMenuItemClick,onMenuItemMouseMove:this.handleMenuItemMouseMove,onMenuItemContextMenu:()=>!1},s);e.push(u)}var c=this.props.menuStyle;return d.jsx("div",{className:"context-menu-container",style:Hh({},c),ref:this.container,onKeyDown:this.handleKeyDown,onMouseLeave:this.handleMouseLeave,role:"menuitem",tabIndex:0,"data-testid":t,children:e})}}Rn(ml,"defaultProps",{closeMenu(){},onMenuOpened(){},onMenuClosed(){},options:{},menuStyle:{},"data-testid":void 0});function Ao(n,e){var t=Object.keys(n);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(n);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(n,i).enumerable})),t.push.apply(t,r)}return t}function ko(n){for(var e=1;e<arguments.length;e++){var t=arguments[e]!=null?arguments[e]:{};e%2?Ao(Object(t),!0).forEach(function(r){gn(n,r,t[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(t)):Ao(Object(t)).forEach(function(r){Object.defineProperty(n,r,Object.getOwnPropertyDescriptor(t,r))})}return n}function gn(n,e,t){return(e=Wh(e))in n?Object.defineProperty(n,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):n[e]=t,n}function Wh(n){var e=Kh(n,"string");return typeof e=="symbol"?e:e+""}function Kh(n,e){if(typeof n!="object"||!n)return n;var t=n[Symbol.toPrimitive];if(t!==void 0){var r=t.call(n,e);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(n)}class jr extends h.PureComponent{constructor(e){super(e),gn(this,"container",void 0),gn(this,"parent",void 0),gn(this,"popper",void 0),gn(this,"isOpen",void 0),this.handleClick=this.handleClick.bind(this),this.handleCloseMenu=this.handleCloseMenu.bind(this),this.handleExited=this.handleExited.bind(this),this.container=j.createRef(),this.parent=null,this.popper=j.createRef(),this.isOpen=!1}componentDidMount(){var e=this.props.isShown;if(e===null){var t;(t=this.container.current)!==null&&t!==void 0&&t.parentElement&&(this.parent=this.container.current.parentElement,this.parent.addEventListener("click",this.handleClick))}else e&&this.openMenu()}componentDidUpdate(e){var t=this.props.isShown;e.isShown!==t&&(t!==null&&t?window.requestAnimationFrame(()=>{this.openMenu()}):this.closeMenu())}componentWillUnmount(){this.parent&&this.parent.removeEventListener("click",this.handleClick)}closeMenu(){var e;(e=this.popper.current)===null||e===void 0||e.hide()}openMenu(){this.popper.current&&!this.isOpen&&(this.popper.current.show(),this.isOpen=!0)}scheduleUpdate(){var e;(e=this.popper.current)===null||e===void 0||e.scheduleUpdate()}handleClick(e){e.preventDefault(),e.stopPropagation(),this.openMenu()}handleCloseMenu(){this.closeMenu()}handleExited(){this.isOpen=!1;var e=this.props.onMenuClosed;e()}render(){var e=this.props,t=e.actions,r=e.onMenuOpened,i=e.popperClassName,o=e["data-testid"],a=this.props.menuStyle,s=this.props,l=s.options,u=s.popperOptions;return u=ko({placement:"bottom"},u),l=ko({separateKeyboardMouse:!0},l),d.jsx("div",{className:"menu-actions-listener",ref:this.container,"data-testid":o,children:d.jsx(Mr,{ref:this.popper,options:u,className:U("menu-popper",i),onExited:this.handleExited,closeOnBlur:!0,interactive:!0,children:d.jsx(ml,{actions:t,closeMenu:this.handleCloseMenu,onMenuOpened:r,options:l,menuStyle:a})})})}}gn(jr,"defaultProps",{isShown:null,onMenuClosed(){},onMenuOpened(){},options:{},popperOptions:{},popperClassName:"",menuStyle:{},"data-testid":void 0});function Nt(n,e,t){return(e=zh(e))in n?Object.defineProperty(n,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):n[e]=t,n}function zh(n){var e=Vh(n,"string");return typeof e=="symbol"?e:e+""}function Vh(n,e){if(typeof n!="object"||!n)return n;var t=n[Symbol.toPrimitive];if(t!==void 0){var r=t.call(n,e);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(n)}var No=H.module("Shortcut"),P=function(n){return n.CTRL="MODIFIER_CTRL",n.CMD="MODIFIER_CMD",n.ALT="MODIFIER_ALT",n.OPTION="MODIFIER_OPTION",n.SHIFT="MODIFIER_SHIFT",n}({}),w=function(n){return n.A="A",n.B="B",n.C="C",n.D="D",n.E="E",n.F="F",n.G="G",n.H="H",n.I="I",n.J="J",n.K="K",n.L="L",n.M="M",n.N="N",n.O="O",n.P="P",n.Q="Q",n.R="R",n.S="S",n.T="T",n.U="U",n.V="V",n.W="W",n.X="X",n.Y="Y",n.Z="Z",n.ZERO="0",n.ONE="1",n.TWO="2",n.THREE="3",n.FOUR="4",n.FIVE="5",n.SIX="6",n.SEVEN="7",n.EIGHT="8",n.NINE="9",n.BACKSPACE="Backspace",n.ESCAPE="Escape",n.ENTER="Enter",n.DELETE="Delete",n.SLASH="/",n.QUESTION_MARK="?",n.BACKSLASH="\\",n.PIPE="|",n.MINUS="-",n.UNDERSCORE="_",n.EQUALS="=",n.PLUS="+",n.BACKTICK="`",n.TILDE="~",n.COMMA=",",n.LEFT_CHEVRON="<",n.PERIOD=".",n.RIGHT_CHEVRON=">",n.SEMICOLON=";",n.COLON=":",n.SINGLE_QUOTE="'",n.DOUBLE_QUOTE='"',n.LEFT_BRACKET="[",n.RIGHT_BRACKET="]",n.LEFT_CURLY="{",n.RIGHT_CURLY="}",n.F1="F1",n.F2="F2",n.F3="F3",n.F4="F4",n.F5="F5",n.F6="F6",n.F7="F7",n.F8="F8",n.F9="F9",n.F10="F10",n.F11="F11",n.F12="F12",n}({}),Gh=new Set([w.ENTER,w.DELETE,w.F1,w.F2,w.F3,w.F4,w.F5,w.F6,w.F7,w.F8,w.F9,w.F10,w.F11,w.F12]);class fe extends Ks{static isAllowedKey(e){return Object.values(w).includes(e)}static isValidKeyState(e){var t=e.keyValue;if(t===null)return!0;if(!fe.isMacPlatform&&e.metaKey||!fe.isAllowedKey(t))return!1;var r=!e.altKey&&!e.ctrlKey&&!e.metaKey&&!e.shiftKey;return!r||Gh.has(t)}static createKeyState(e){var t={altKey:!1,ctrlKey:!1,metaKey:!1,shiftKey:!1,keyValue:e[e.length-1]};return e.forEach(r=>{switch(r){case P.CTRL:t.ctrlKey=!0;break;case P.ALT:case P.OPTION:t.altKey=!0;break;case P.CMD:t.metaKey=!0;break;case P.SHIFT:t.shiftKey=!0;break}}),t}static getKeyStateFromEvent(e){var t=e.key,r=e.keyCode,i="";return t==="Shift"||t==="Meta"||t==="Control"||t==="Alt"?i="":!fe.isAllowedKey(t)&&fe.isAllowedKey(String.fromCharCode(r))?i=String.fromCharCode(r):i=t,{keyValue:i,altKey:e.altKey,ctrlKey:e.ctrlKey,metaKey:e.metaKey,shiftKey:e.shiftKey}}static getWindowsDisplayText(e){var t="";return e.ctrlKey&&(t+="Ctrl+"),e.altKey&&(t+="Alt+"),e.shiftKey&&(t+="Shift+"),e.keyValue===w.ESCAPE?t+="Esc":e.keyValue!==null&&(t+=e.keyValue),t}static getMacDisplayText(e){var t="";switch(e.ctrlKey&&(t+="⌃"),e.altKey&&(t+="⌥"),e.shiftKey&&(t+="⇧"),e.metaKey&&(t+="⌘"),e.keyValue){case w.ENTER:t+="⏎";break;case w.ESCAPE:t+="⎋";break;case w.BACKSPACE:t+="⌫";break;case w.DELETE:t+="⌦";break;case null:break;default:t+=e.keyValue}return t}static doKeyStatesMatch(e,t){var r,i;return((r=e.keyValue)===null||r===void 0?void 0:r.toUpperCase())===((i=t.keyValue)===null||i===void 0?void 0:i.toUpperCase())&&e.altKey===t.altKey&&e.ctrlKey===t.ctrlKey&&e.metaKey===t.metaKey&&e.shiftKey===t.shiftKey}static getDisplayText(e){return e.keyValue===null?"":fe.isMacPlatform?fe.getMacDisplayText(e):fe.getWindowsDisplayText(e)}constructor(e){var t=e.id,r=e.shortcut,i=e.macShortcut,o=e.isEditable,a=o===void 0?!0:o,s=e.name,l=e.tooltip;super(),Nt(this,"id",void 0),Nt(this,"name",void 0),Nt(this,"tooltip",void 0),Nt(this,"isEditable",void 0),Nt(this,"defaultKeyState",void 0),Nt(this,"keyState",void 0),this.id=t,this.name=s,this.tooltip=l,this.isEditable=a;var u=fe.isMacPlatform,c=u?i:r;this.defaultKeyState=fe.createKeyState(c),this.keyState=this.defaultKeyState}getDisplayText(){return fe.getDisplayText(this.keyState)}getKeyState(){return this.keyState}setKeyState(e){fe.isValidKeyState(e)?(No.debug2("Shortcut ".concat(this.id," updated to ").concat(JSON.stringify(e))),this.keyState=e,this.dispatchEvent(new Js("onUpdate",{detail:this}))):No.debug2("Shortcut ".concat(this.id," tried to update to invalid keyState ").concat(JSON.stringify(e)))}getDefaultKeyState(){return this.defaultKeyState}isDefault(){return fe.doKeyStatesMatch(this.getDefaultKeyState(),this.getKeyState())}setToNull(){this.setKeyState(fe.NULL_KEY_STATE)}isNull(){return fe.doKeyStatesMatch(this.keyState,fe.NULL_KEY_STATE)}setToDefault(){this.setKeyState(this.defaultKeyState)}matchesKeyState(e){return fe.doKeyStatesMatch(e,this.keyState)}matchesEvent(e){return this.matchesKeyState(fe.getKeyStateFromEvent(e))}}Nt(fe,"NULL_KEY_STATE",{metaKey:!1,shiftKey:!1,altKey:!1,ctrlKey:!1,keyValue:null});Nt(fe,"isMacPlatform",ge.isMacPlatform());function Lo(n,e,t){return(e=qh(e))in n?Object.defineProperty(n,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):n[e]=t,n}function qh(n){var e=Xh(n,"string");return typeof e=="symbol"?e:e+""}function Xh(n,e){if(typeof n!="object"||!n)return n;var t=n[Symbol.toPrimitive];if(t!==void 0){var r=t.call(n,e);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(n)}var Ro=H.module("ShortcutRegistry");class Zh extends Ks{constructor(){super(...arguments),Lo(this,"shortcutMap",new Map),Lo(this,"shortcutsByCategory",new Map)}createAndAdd(e){var t=new fe(e);return this.add(t)}add(e){var t=this.shortcutMap.get(e.id);if(t)return Ro.warn("Skipping attempt to add duplicate shortcut ID to registry: ".concat(e.id)),t;Ro.debug2("Adding shortcut to registry: ".concat(e.id)),e.addEventListener("onUpdate",o=>{var a=o.detail;return this.dispatchEvent(new Js("onUpdate",{detail:a}))});var r=e.id.split(".")[0];if(this.shortcutMap.set(e.id,e),this.shortcutsByCategory.has(r)){var i;(i=this.shortcutsByCategory.get(r))===null||i===void 0||i.push(e)}else this.shortcutsByCategory.set(r,[e]);return e}get(e){return this.shortcutMap.get(e)}getConflictingShortcuts(e){return Array.from(this.shortcutMap.values()).filter(t=>!t.isNull()&&t.matchesKeyState(e))}}var oe=Object.freeze(new Zh),bn={COPY:oe.createAndAdd({id:"GLOBAL.COPY",name:"Copy",shortcut:[P.CTRL,w.C],macShortcut:[P.CMD,w.C],isEditable:!1}),PASTE:oe.createAndAdd({id:"GLOBAL.PASTE",name:"Paste",shortcut:[P.CTRL,w.V],macShortcut:[P.CMD,w.V],isEditable:!1}),SAVE:oe.createAndAdd({id:"GLOBAL.SAVE",name:"Save",shortcut:[P.CTRL,w.S],macShortcut:[P.CMD,w.S],isEditable:!1}),SELECT_ALL:oe.createAndAdd({id:"GLOBAL.SELECT_ALL",name:"Select All",shortcut:[P.CTRL,w.A],macShortcut:[P.CMD,w.A],isEditable:!1}),REOPEN_CLOSED_PANEL:oe.createAndAdd({id:"GLOBAL.REOPEN_CLOSED_PANEL",name:"Re-open Closed Panel",shortcut:[P.ALT,P.SHIFT,w.T],macShortcut:[P.OPTION,P.SHIFT,w.T],isEditable:!0}),LINKER:oe.createAndAdd({id:"GLOBAL.LINKER",name:"Linker",shortcut:[P.CTRL,w.L],macShortcut:[P.CMD,w.L]}),LINKER_CLOSE:oe.createAndAdd({id:"GLOBAL.LINKER_CLOSE",name:"Close Linker Overlay",shortcut:[w.ESCAPE],macShortcut:[w.ESCAPE],isEditable:!1}),COPY_VERSION_INFO:oe.createAndAdd({id:"GLOBAL.COPY_VERSION_INFO",name:"Copy Version Info",shortcut:[P.CTRL,P.ALT,w.I],macShortcut:[P.CMD,P.SHIFT,w.I],isEditable:!0}),EXPORT_LOGS:oe.createAndAdd({id:"GLOBAL.EXPORT_LOGS",name:"Export Logs",shortcut:[P.CTRL,P.ALT,P.SHIFT,w.L],macShortcut:[P.CMD,P.OPTION,P.SHIFT,w.L],isEditable:!0}),OPEN_DASHBOARD_LIST:oe.createAndAdd({id:"GLOBAL.OPEN_DASHBOARD_LIST",name:"Open Dashboard List",shortcut:[P.ALT,P.SHIFT,w.D],macShortcut:[P.OPTION,P.SHIFT,w.D],isEditable:!0}),NEXT:oe.createAndAdd({id:"GLOBAL.NEXT",name:"Next",shortcut:[w.ENTER],macShortcut:[w.ENTER],isEditable:!1}),PREVIOUS:oe.createAndAdd({id:"GLOBAL.PREVIOUS",name:"Previous",shortcut:[P.SHIFT,w.ENTER],macShortcut:[P.SHIFT,w.ENTER],isEditable:!1}),UNDO:oe.createAndAdd({id:"GLOBAL.UNDO",name:"Undo",shortcut:[P.CTRL,w.Z],macShortcut:[P.CMD,w.Z],isEditable:!1}),REDO:oe.createAndAdd({id:"GLOBAL.REDO",name:"Redo",shortcut:[P.CTRL,P.SHIFT,w.Z],macShortcut:[P.CMD,P.SHIFT,w.Z],isEditable:!1})};function hi(n,e,t){return(e=Yh(e))in n?Object.defineProperty(n,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):n[e]=t,n}function Yh(n){var e=Qh(n,"string");return typeof e=="symbol"?e:e+""}function Qh(n,e){if(typeof n!="object"||!n)return n;var t=n[Symbol.toPrimitive];if(t!==void 0){var r=t.call(n,e);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(n)}class Ar extends h.PureComponent{constructor(e){super(e),hi(this,"inputField",void 0),hi(this,"searchChangeSelection",void 0),this.inputField=j.createRef(),this.searchChangeSelection=j.createRef()}componentDidMount(){this.setInputPaddingRight()}componentDidUpdate(){this.setInputPaddingRight()}focus(){var e;(e=this.inputField.current)===null||e===void 0||e.focus()}select(){var e;(e=this.inputField.current)===null||e===void 0||e.select()}setInputPaddingRight(){var e=this.inputField.current,t=this.searchChangeSelection.current;if(e&&t){var r=t.getBoundingClientRect().width;e.style.paddingRight="".concat(r,"px")}}render(){var e=this.props,t=e.value,r=e.placeholder,i=e.endPlaceholder,o=e.onBlur,a=e.onChange,s=e.className,l=e.disabled,u=e.matchCount,c=e.id,m=e.onKeyDown,p=e["data-testid"],f=e.cursor,v,g=[{action:()=>f==null?void 0:f.next("forward"),shortcut:bn.NEXT},{action:()=>f==null?void 0:f.next("back"),shortcut:bn.PREVIOUS}];return f&&u>1?v=d.jsxs(d.Fragment,{children:[d.jsx(ne,{kind:"ghost",className:"search-change-button",type:"button",onClick:()=>{f.next("back")},icon:Ls,tooltip:"Previous match (".concat(bn.PREVIOUS.getDisplayText(),")")}),d.jsxs("span",{className:"search-change-text",children:[f.index!==void 0&&"".concat(f.index+1," of "),u]}),d.jsx(ne,{kind:"ghost",className:"search-change-button",type:"button",onClick:()=>{f.next("forward")},icon:Uu,tooltip:"Next match (".concat(bn.NEXT.getDisplayText(),")")})]}):v=u>0&&d.jsx("span",{className:"search-match",children:u}),d.jsxs("div",{className:U("search-group",s),children:[d.jsx("input",{type:"search",value:t,onBlur:o,onChange:a,onKeyDown:m,className:"form-control",disabled:l,placeholder:r,ref:this.inputField,id:c,"data-testid":p}),u!=null?d.jsxs(d.Fragment,{children:[d.jsx("div",{className:"search-change-selection",ref:this.searchChangeSelection,children:v}),d.jsx(ue,{actions:g})]}):d.jsxs("span",{className:"search-end-content",children:[(i??"")!==""&&t===""&&d.jsx("span",{className:"search-end-placeholder",children:i}),d.jsx(me,{icon:Bu})]})]})}}hi(Ar,"defaultProps",{placeholder:"Search",className:"",matchCount:null,onKeyDown(){},id:"","data-testid":void 0,cursor:void 0});function pl(n,e,t){return(e=Jh(e))in n?Object.defineProperty(n,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):n[e]=t,n}function Jh(n){var e=em(n,"string");return typeof e=="symbol"?e:e+""}function em(n,e){if(typeof n!="object"||!n)return n;var t=n[Symbol.toPrimitive];if(t!==void 0){var r=t.call(n,e);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(n)}class fl extends h.PureComponent{constructor(e){super(e),pl(this,"searchInput",void 0),this.searchInput=j.createRef(),this.handleChange=this.handleChange.bind(this),this.sendUpdate=Bn(this.sendUpdate.bind(this),e.debounceMs),this.state={value:e.value}}componentDidUpdate(e){var t=this.props.value;e.value!==t&&this.setState({value:t})}focus(){var e;(e=this.searchInput.current)===null||e===void 0||e.focus()}handleChange(e){this.setState({value:e.target.value},this.sendUpdate)}sendUpdate(){var e=this.props.onChange,t=this.state.value;e(t)}render(){var e=this.props,t=e.placeholder,r=e.className,i=e.matchCount,o=e.id,a=e["data-testid"],s=this.state.value;return d.jsx(Ar,{value:s,placeholder:t,onChange:this.handleChange,className:r,matchCount:i,ref:this.searchInput,id:o,"data-testid":a})}}pl(fl,"defaultProps",{placeholder:"Search",className:"",matchCount:null,debounceMs:250,id:"","data-testid":void 0});function vl(n,e,t){return(e=tm(e))in n?Object.defineProperty(n,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):n[e]=t,n}function tm(n){var e=nm(n,"string");return typeof e=="symbol"?e:e+""}function nm(n,e){if(typeof n!="object"||!n)return n;var t=n[Symbol.toPrimitive];if(t!==void 0){var r=t.call(n,e);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(n)}var rm=H.module("ItemListItem");class kr extends h.Component{static handleKeyDown(){return rm.log("ItemListItem.handleKeyDown false"),!1}constructor(e){super(e),vl(this,"itemRef",void 0),this.handleBlur=this.handleBlur.bind(this),this.handleFocus=this.handleFocus.bind(this),this.handleClick=this.handleClick.bind(this),this.handleContextMenu=this.handleContextMenu.bind(this),this.handleDragStart=this.handleDragStart.bind(this),this.handleDrag=this.handleDrag.bind(this),this.handleDragOver=this.handleDragOver.bind(this),this.handleDragEnd=this.handleDragEnd.bind(this),this.handleDrop=this.handleDrop.bind(this),this.handleDoubleClick=this.handleDoubleClick.bind(this),this.handleMouseDown=this.handleMouseDown.bind(this),this.handleMouseMove=this.handleMouseMove.bind(this),this.handleMouseUp=this.handleMouseUp.bind(this),this.itemRef=j.createRef()}handleBlur(e){var t=this.props,r=t.itemIndex,i=t.onBlur;i(r,e)}handleFocus(e){var t=this.props,r=t.itemIndex,i=t.onFocus;i(r,e)}handleClick(e){var t=this.props,r=t.itemIndex,i=t.onClick;i(r,e)}handleContextMenu(e){var t=this.props,r=t.itemIndex,i=t.onContextMenu;i(r,e)}handleDragStart(e){var t=this.props,r=t.itemIndex,i=t.onDragStart;i(r,e)}handleDrag(e){var t=this.props,r=t.itemIndex,i=t.onDrag;i(r,e)}handleDragOver(e){e.preventDefault();var t=this.props,r=t.itemIndex,i=t.onDragOver;i(r,e)}handleDragEnd(e){var t=this.props,r=t.itemIndex,i=t.onDragEnd;i(r,e)}handleDrop(e){var t=this.props,r=t.itemIndex,i=t.onDrop;i(r,e)}handleDoubleClick(e){var t=this.props,r=t.itemIndex,i=t.onDoubleClick;i(r,e)}handleMouseMove(e){var t=this.props,r=t.itemIndex,i=t.onMouseMove;i(r,e)}handleMouseDown(e){var t=this.props,r=t.itemIndex,i=t.onMouseDown;i(r,e)}handleMouseUp(e){var t=this.props,r=t.itemIndex,i=t.onMouseUp;i(r,e)}render(){var e=this.props,t=e.isDraggable,r=e.isFocused,i=e.isSelected,o=e.style,a=e.children,s=e["data-testid"];return d.jsx("div",{className:U("item-list-item",{active:i},{"is-focused":r},{"is-draggable":t}),onKeyDown:kr.handleKeyDown,onContextMenuCapture:this.handleContextMenu,onClick:this.handleClick,onDrag:this.handleDrag,onDragStart:this.handleDragStart,onDragOver:this.handleDragOver,onDragEnd:this.handleDragEnd,onDrop:this.handleDrop,onDoubleClick:this.handleDoubleClick,onMouseDown:this.handleMouseDown,onMouseMove:this.handleMouseMove,onMouseUp:this.handleMouseUp,tabIndex:-1,ref:this.itemRef,role:"listitem",style:o,onFocus:this.handleFocus,onBlur:this.handleBlur,draggable:t,"data-testid":s,children:a})}}vl(kr,"defaultProps",{children:null,isDraggable:!1,isFocused:!1,isSelected:!1,itemIndex:0,"data-testid":void 0,onBlur(){},onClick(){},onContextMenu(){},onDragStart(){},onDrag(){},onDragOver(){},onDragEnd(){},onDrop(){},onDoubleClick(){},onFocus(){},onMouseDown(){},onMouseMove(){},onMouseUp(){},style:{}});var br;function $o(n,e){var t=Object.keys(n);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(n);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(n,i).enumerable})),t.push.apply(t,r)}return t}function Fo(n){for(var e=1;e<arguments.length;e++){var t=arguments[e]!=null?arguments[e]:{};e%2?$o(Object(t),!0).forEach(function(r){it(n,r,t[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(t)):$o(Object(t)).forEach(function(r){Object.defineProperty(n,r,Object.getOwnPropertyDescriptor(t,r))})}return n}function it(n,e,t){return(e=im(e))in n?Object.defineProperty(n,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):n[e]=t,n}function im(n){var e=om(n,"string");return typeof e=="symbol"?e:e+""}function om(n,e){if(typeof n!="object"||!n)return n;var t=n[Symbol.toPrimitive];if(t!==void 0){var r=t.call(n,e);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(n)}var Ho=H.module("ItemList"),Uo=5;class ct extends h.PureComponent{static renderItem(e){var t,r,i=e.item;return d.jsx("div",{className:"item-list-item-content",children:i!=null&&((t=(r=i.displayValue)!==null&&r!==void 0?r:i.value)!==null&&t!==void 0?t:"".concat(i))})}constructor(e){super(e),it(this,"list",void 0),it(this,"listContainer",void 0),it(this,"getItemSelected",fn((i,o)=>lt.isSelected(o,i),{max:ct.CACHE_SIZE})),it(this,"getCachedItem",fn((i,o,a,s,l,u,c,m)=>{var p=u({item:a,itemIndex:i,isFocused:s,isSelected:l,style:c});return d.jsx(kr,{onContextMenu:this.handleItemContextMenu,onDoubleClick:this.handleItemDoubleClick,onMouseDown:this.handleItemMouseDown,onFocus:this.handleItemFocus,onBlur:this.handleItemBlur,disableSelect:m,onMouseMove:this.handleItemMouseMove,onMouseUp:this.handleItemMouseUp,isFocused:s,isSelected:l,itemIndex:i,style:c,children:p},o)},{max:ct.CACHE_SIZE})),it(this,"getOuterElement",fn(i=>{var o=j.forwardRef((a,s)=>d.jsx("div",Fo({ref:s,tabIndex:-1,onKeyDown:i,role:"presentation"},a)));return o.displayName="ItemListOuterElement",o},{max:1e3})),it(this,"getInnerElement",fn(()=>{var i=j.forwardRef((o,a)=>d.jsx("div",Fo({className:"item-list-inner-element",ref:a},o)));return i.displayName="ItemListInnerElement",i},{max:1e3})),it(this,"getItemData",fn((i,o,a)=>({items:i,selectedRanges:o,renderItem:a}),{max:1e3})),this.handleItemBlur=this.handleItemBlur.bind(this),this.handleItemContextMenu=this.handleItemContextMenu.bind(this),this.handleItemFocus=this.handleItemFocus.bind(this),this.handleItemDoubleClick=this.handleItemDoubleClick.bind(this),this.handleItemMouseDown=this.handleItemMouseDown.bind(this),this.handleItemMouseMove=this.handleItemMouseMove.bind(this),this.handleItemMouseUp=this.handleItemMouseUp.bind(this),this.handleItemsRendered=this.handleItemsRendered.bind(this),this.handleWindowMouseUp=this.handleWindowMouseUp.bind(this),this.handleKeyDown=this.handleKeyDown.bind(this),this.handleMouseLeave=this.handleMouseLeave.bind(this),this.handleScroll=this.handleScroll.bind(this),this.handleResize=this.handleResize.bind(this),this.renderInnerElement=this.renderInnerElement.bind(this),this.list=j.createRef(),this.listContainer=j.createRef();var t=e.isStickyBottom,r=e.selectedRanges;this.state={focusIndex:null,mouseDownIndex:null,selectedRanges:r,overscanStartIndex:0,height:null,isDragging:!1,isStuckToBottom:t,scrollOffset:null,mouseX:null,mouseY:null}}componentDidUpdate(e,t){var r=this.props,i=r.selectedRanges,o=r.itemCount,a=this.state,s=a.focusIndex,l=a.isStuckToBottom,u=a.scrollOffset,c=a.height,m=a.selectedRanges;if(l&&!this.isListAtBottom()&&o>0&&this.scrollToBottom(),(u!==t.scrollOffset||c!==t.height)&&this.sendViewportUpdate(),i!==e.selectedRanges&&i!==m)this.setSelectedRanges(i);else if(m!==t.selectedRanges){var p=this.props.onSelectionChange;p(m)}if(s!==t.focusIndex){var f=this.props.onFocusChange;f(s)}}componentWillUnmount(){window.removeEventListener("mouseup",this.handleWindowMouseUp)}focus(){var e;(e=this.listContainer.current)===null||e===void 0||e.focus()}restoreScrollPosition(){var e=this.state.scrollOffset;if(e!=null){var t;(t=this.listContainer.current)===null||t===void 0||t.scrollTo(0,e)}}getElement(e){if(this.listContainer.current==null)return null;var t=this.props.focusSelector,r=this.state.overscanStartIndex,i=this.listContainer.current.querySelectorAll(t),o=e-r;return i[o]}focusItem(e){var t=this.props.disableSelect;if(!t){this.setState({focusIndex:e});var r=this.getElement(e);r instanceof HTMLElement&&r.focus()}}scrollToItem(e){var t=this.getElement(e);t!=null&&t.scrollIntoView({block:"center"})}handleItemContextMenu(e,t){this.setState({focusIndex:e});var r=this.state.selectedRanges,i=lt.isSelected(r,e),o=i||ge.isModifierKeyDown(t);this.toggleSelect(e,t.shiftKey,o,!1)}handleItemDoubleClick(e,t){var r=this.props,i=r.isDoubleClickSelect,o=r.onSelect;i&&this.setState(a=>{var s=a.selectedRanges;return{selectedRanges:lt.selectRange(s,[e,e])}},()=>{o(e,t)})}handleItemMouseDown(e,t){var r=this.state.selectedRanges;if(!(t.target instanceof HTMLElement&&["button","select","input","textarea"].indexOf(t.target.tagName.toLowerCase())!==-1)){if(t.button===2&&r.length===0){this.focusItem(e),this.selectItem(e);return}t.button!=null&&t.button!==0||(this.setState({mouseDownIndex:e,mouseX:t.clientX,mouseY:t.clientY}),window.addEventListener("mouseup",this.handleWindowMouseUp))}}handleItemBlur(e,t){Ho.debug2("item blur",e,t.currentTarget,t.relatedTarget),(!t.relatedTarget||this.listContainer.current&&t.relatedTarget instanceof HTMLElement&&!this.listContainer.current.contains(t.relatedTarget))&&this.setState({focusIndex:null})}handleItemFocus(e,t){Ho.debug2("item focus",e,t.target),this.setState(r=>{var i=r.focusIndex;return i!==e?{focusIndex:e}:null})}handleItemMouseMove(e,t){var r=this.props,i=r.isDragSelect,o=r.isMultiSelect,a=r.disableSelect,s=this.state,l=s.mouseDownIndex,u=s.selectedRanges,c=s.mouseX,m=s.mouseY;if(!(l==null||a)){var p=Math.abs(t.clientX-(c??0)),f=Math.abs(t.clientY-(m??0));p>Uo&&f>Uo&&this.setState({isDragging:!0}),(i||l===e)&&(this.focusItem(e),o?(!i&&!this.getItemSelected(e,u)&&!ge.isModifierKeyDown(t)&&this.deselectAll(),this.selectRange([Math.min(l,e),Math.max(l,e)])):this.toggleSelect(e,t.shiftKey,ge.isModifierKeyDown(t),!1))}}handleItemMouseUp(e,t){var r=this.props,i=r.isDeselectOnClick,o=r.isDoubleClickSelect,a=r.onSelect,s=this.state,l=s.mouseDownIndex,u=s.isDragging;if(!(t.target instanceof HTMLElement&&["button","select","input","textarea"].indexOf(t.target.tagName.toLowerCase())!==-1)){if(l===e&&!u){var c=t.shiftKey,m=ge.isModifierKeyDown(t);this.focusItem(e),this.toggleSelect(e,c,m,i),!o&&!c&&!m&&a(e,t)}this.resetMouseState()}}handleItemsRendered(e){var t=e.overscanStartIndex;this.setState({overscanStartIndex:t})}handleResize(e){var t=e.height;this.setState({height:t})}handleMouseLeave(){this.setState({mouseDownIndex:null})}handleWindowMouseUp(){this.resetMouseState(),window.removeEventListener("mouseup",this.handleWindowMouseUp)}handleKeyDown(e){var t=this.props,r=t.isMultiSelect,i=t.itemCount,o=t.onSelect,a=this.state.focusIndex,s=a;if(e.key==="Enter"||e.key===" "){!r&&s!=null&&this.setState({selectedRanges:[[s,s]]},()=>{s!=null&&o(s,e)});return}if(e.key==="ArrowUp")s!=null&&s>=0?s=Math.max(0,s-1):s=i-1;else if(e.key==="ArrowDown")s!=null&&s>=0?s=Math.min(s+1,i-1):s=0;else return;if(a!==s){e.stopPropagation(),e.preventDefault(),this.focusItem(s);var l=this.state.selectedRanges;if(e.shiftKey&&l.length>0){var u=l[l.length-1];this.selectRange([Math.min(s,u[0]),Math.max(s,u[1])])}else if(this.deselectAll(),s!==null)this.selectItem(s);else{var c;(c=this.listContainer.current)===null||c===void 0||c.focus()}this.scrollIntoView(s)}}handleScroll(e){var t=e.scrollUpdateWasRequested,r=e.scrollOffset;this.setState(i=>{if(t)return{scrollOffset:r};var o=this.props.isStickyBottom,a=i.height,s=o&&this.isListAtBottom({scrollOffset:r,height:a});return{isStuckToBottom:s,scrollOffset:r}})}resetMouseState(){this.setState({mouseDownIndex:null,isDragging:!1})}scrollToBottom(){var e=this.props.itemCount;this.list.current&&this.list.current.scrollToItem(e)}scrollIntoView(e){this.list.current&&this.list.current.scrollToItem(e)}toggleSelect(e,t,r){var i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!0,o=this.props.isMultiSelect,a=this.state.selectedRanges;if(o&&t&&a.length>0){var s=a[a.length-1];this.selectRange([Math.min(s[0],e),Math.max(e,s[1])])}else o&&a.length===1&&a[0][0]===e&&a[0][1]===e?i&&this.deselectItem(e):o&&r?this.getItemSelected(e,a)?i&&this.deselectItem(e):this.selectItem(e):(this.deselectAll(),this.selectItem(e))}deselectAll(){var e=this.props.itemCount;this.deselectRange([0,e])}deselectItem(e){this.deselectRange([e,e])}deselectRange(e){lt.validateRange(e),this.setState(t=>{var r=t.selectedRanges;return{selectedRanges:lt.deselectRange(r,e)}})}selectItem(e){var t=this.props.disableSelect;t||this.selectRange([e,e])}selectRange(e){lt.validateRange(e),this.setState(t=>{var r=t.selectedRanges;return{selectedRanges:lt.selectRange(r,e)}})}setSelectedRanges(e){this.setState({selectedRanges:e})}sendViewportUpdate(){var e=this.state,t=e.scrollOffset,r=e.height;if(t!=null&&r!=null){var i=this.props,o=i.onViewportChange,a=i.rowHeight,s=Math.floor(t/a),l=s+Math.ceil(r/a);o(s,l)}}isListAtBottom(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.state,t=e.scrollOffset,r=e.height;if(r==null||t==null)return!1;var i=this.props,o=i.itemCount,a=i.rowHeight;return t+r>=o*a}renderInnerElement(e){var t=e.index,r=e.style,i=this.props,o=i.items,a=i.offset,s=i.renderItem,l=i.disableSelect,u=this.state,c=u.focusIndex,m=u.selectedRanges;if(t<a||t>=a+o.length)return null;var p=o[t-a];return this.getCachedItem(t,t,p,t===c&&!l,this.getItemSelected(t,m),s,r,l)}render(){var e=this.props,t=e.items,r=e.itemCount,i=e.overscanCount,o=e.renderItem,a=e.rowHeight,s=e["data-testid"],l=this.state,u=l.selectedRanges,c=l.isStuckToBottom;return d.jsx(wd,{className:"item-list-auto-sizer",onResize:this.handleResize,children:m=>{var p=m.width,f=m.height;return d.jsx(_d,{className:"item-list-scroll-pane",height:f,width:p,initialScrollOffset:c?r*a:0,itemCount:r,itemSize:a,itemData:this.getItemData(t,u,o),onScroll:this.handleScroll,onItemsRendered:this.handleItemsRendered,ref:this.list,outerElementType:this.getOuterElement(this.handleKeyDown),outerRef:this.listContainer,innerElementType:this.getInnerElement(),overscanCount:i,"data-testid":s,children:this.renderInnerElement})}})}}br=ct;it(ct,"CACHE_SIZE",1e3);it(ct,"DEFAULT_ROW_HEIGHT",20);it(ct,"DEFAULT_OVERSCAN",10);it(ct,"defaultProps",{offset:0,items:[],rowHeight:br.DEFAULT_ROW_HEIGHT,isDeselectOnClick:!0,isDoubleClickSelect:!1,isDragSelect:!0,isMultiSelect:!1,isStickyBottom:!1,disableSelect:!1,onFocusChange(){},onSelect(){},onSelectionChange(){},onViewportChange(){},overscanCount:br.DEFAULT_OVERSCAN,renderItem:br.renderItem,selectedRanges:[],focusSelector:".item-list-item","data-testid":void 0});var am=H.module("ErrorBoundary");class sm extends h.Component{static getDerivedStateFromError(e){return{error:e}}constructor(e){super(e),this.state={error:void 0}}componentDidCatch(e,t){var r=this.props.onError;am.error("Error caught by ErrorBoundary",e,t),r==null||r(e,t)}render(){var e=this.props,t=e.children,r=e.className,i=e.fallback,o=this.state.error;return o!=null?i??d.jsx("div",{className:r,children:d.jsx(Un,{errorMessage:"".concat(o),isLoading:!1,isLoaded:!1,"data-testid":"error-boundary-loading"})}):t??null}}function lm(n){var e=n.on,t=n.id,r=n.className,i=n.isInvalid,o=n.disabled,a=o===void 0?!1:o,s=n.onClick,l=n["data-testid"];return d.jsx("button",{type:"button",className:U("btn","btn-switch",r,{active:e},{"is-invalid":i}),id:t,onClick:s,disabled:a,"data-testid":l,children:d.jsx("div",{className:"handle"})})}var um=["children","className","isInvalid","onChange","data-testid"];function Bo(n,e){var t=Object.keys(n);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(n);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(n,i).enumerable})),t.push.apply(t,r)}return t}function Wo(n){for(var e=1;e<arguments.length;e++){var t=arguments[e]!=null?arguments[e]:{};e%2?Bo(Object(t),!0).forEach(function(r){dm(n,r,t[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(t)):Bo(Object(t)).forEach(function(r){Object.defineProperty(n,r,Object.getOwnPropertyDescriptor(t,r))})}return n}function dm(n,e,t){return(e=cm(e))in n?Object.defineProperty(n,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):n[e]=t,n}function cm(n){var e=hm(n,"string");return typeof e=="symbol"?e:e+""}function hm(n,e){if(typeof n!="object"||!n)return n;var t=n[Symbol.toPrimitive];if(t!==void 0){var r=t.call(n,e);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(n)}function mm(n,e){if(n==null)return{};var t,r,i=pm(n,e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(n);for(r=0;r<o.length;r++)t=o[r],e.indexOf(t)===-1&&{}.propertyIsEnumerable.call(n,t)&&(i[t]=n[t])}return i}function pm(n,e){if(n==null)return{};var t={};for(var r in n)if({}.hasOwnProperty.call(n,r)){if(e.indexOf(r)!==-1)continue;t[r]=n[r]}return t}var gl=j.forwardRef((n,e)=>{var t=n.children,r=n.className,i=n.isInvalid,o=n.onChange,a=n["data-testid"],s=mm(n,um),l=tl(e),u=h.useCallback(c=>{o(c.target.value)},[o]);return d.jsx("select",Wo(Wo({ref:l,className:U("custom-select",r,{"is-invalid":i}),onChange:u,"data-testid":a},s),{},{children:t}))});gl.displayName="Select";var Ii=j.createContext(new Map);Ii.displayName="XComponentMapContext";var OC=Ii.Provider;function fm(n){var e,t=h.useContext(Ii);return(e=t.get(n))!==null&&e!==void 0?e:n.Original}function Ko(n,e){var t=Object.keys(n);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(n);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(n,i).enumerable})),t.push.apply(t,r)}return t}function qr(n){for(var e=1;e<arguments.length;e++){var t=arguments[e]!=null?arguments[e]:{};e%2?Ko(Object(t),!0).forEach(function(r){vm(n,r,t[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(t)):Ko(Object(t)).forEach(function(r){Object.defineProperty(n,r,Object.getOwnPropertyDescriptor(t,r))})}return n}function vm(n,e,t){return(e=gm(e))in n?Object.defineProperty(n,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):n[e]=t,n}function gm(n){var e=bm(n,"string");return typeof e=="symbol"?e:e+""}function bm(n,e){if(typeof n!="object"||!n)return n;var t=n[Symbol.toPrimitive];if(t!==void 0){var r=t.call(n,e);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(n)}function bl(n){var e,t;function r(i,o){var a=fm(t);return cl(n)?d.jsx(a,qr(qr({},i),{},{ref:o})):d.jsx(a,qr({},i))}return r.displayName="XComponent(".concat((e=n.displayName)!==null&&e!==void 0?e:n.name,")"),t=h.forwardRef(r),t.Original=n,t.isXComponent=!0,t}function ym(){return zn(Wu,"No API available in useApi. Was code wrapped in ApiBootstrap or ApiContext.Provider?")}function yl(n){return typeof n=="object"&&n!=null&&typeof n.type=="string"&&n.name!=null}function Cl(n){return typeof n=="object"&&n!=null&&typeof n.type=="string"&&n.id!=null}function xC(n){return yl(n)||Cl(n)}var Sl=h.createContext(null);Sl.displayName="ObjectFetcherContext";function IC(n){if(Cl(n))return{id:n.id,type:n.type};if(yl(n)){var e;return{name:(e=n.name)!==null&&e!==void 0?e:"",type:n.type}}throw new Error("Invalid descriptor: ".concat(n))}function Cm(n){var e,t;return{type:(e=n.type)!==null&&e!==void 0?e:"",name:(t=n.title)!==null&&t!==void 0?t:n.name,id:n.id}}function DC(){return zn(Sl,"No ObjectFetcher available in useObjectFetcher. Was code wrapped in ObjectFetcherContext.Provider?")}function Di(n,e,t){return(e=Sm(e))in n?Object.defineProperty(n,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):n[e]=t,n}function Sm(n){var e=wm(n,"string");return typeof e=="symbol"?e:e+""}function wm(n,e){if(typeof n!="object"||!n)return n;var t=n[Symbol.toPrimitive];if(t!==void 0){var r=t.call(n,e);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(n)}class Ze{static isValid(e,t){return!0}static isSameFormat(e,t){throw new Error("isSameFormat not implemented")}static makeFormat(e,t,r){return{label:e,formatString:t,type:r}}format(e,t){return""}}Di(Ze,"TYPE_GLOBAL","type-global");Di(Ze,"TYPE_CONTEXT_PRESET","type-context-preset");Di(Ze,"TYPE_CONTEXT_CUSTOM","type-context-custom");function Lt(n,e,t){return(e=_m(e))in n?Object.defineProperty(n,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):n[e]=t,n}function _m(n){var e=Em(n,"string");return typeof e=="symbol"?e:e+""}function Em(n,e){if(typeof n!="object"||!n)return n;var t=n[Symbol.toPrimitive];if(t!==void 0){var r=t.call(n,e);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(n)}var zo=H.module("DateTimeColumnFormatter");class Et extends Ze{static isValid(e,t){if(t.formatString==null)return!1;try{return e.i18n.DateTimeFormat.format(t.formatString,new Date),!0}catch{return!1}}static makeFormat(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:Ze.TYPE_CONTEXT_PRESET;return{label:e,formatString:t,type:r}}static isSameFormat(e,t){return e===t||e!==null&&t!==null&&e.type===t.type&&e.formatString===t.formatString}static makeGlobalFormatStringMap(e,t){var r=t?"'T'":" ",i=e?" z":"";return new Map([["yyyy-MM-dd HH:mm:ss","yyyy-MM-dd".concat(r,"HH:mm:ss").concat(i)],["yyyy-MM-dd HH:mm:ss.SSS","yyyy-MM-dd".concat(r,"HH:mm:ss.SSS").concat(i)],["yyyy-MM-dd HH:mm:ss.SSSSSSSSS","yyyy-MM-dd".concat(r,"HH:mm:ss.SSSSSSSSS").concat(i)]])}static getGlobalFormats(e,t){var r=Et.makeGlobalFormatStringMap(e,t);return[...r.keys()]}static makeFormatStringMap(e,t){var r=t!==void 0&&t?"'T'":" ",i=e!==void 0&&e?" z":"";return new Map([["yyyy-MM-dd","yyyy-MM-dd".concat(i)],["MM-dd-yyyy","MM-dd-yyyy".concat(i)],["HH:mm:ss","HH:mm:ss".concat(i)],["HH:mm:ss.SSS","HH:mm:ss.SSS".concat(i)],["HH:mm:ss.SSSSSSSSS","HH:mm:ss.SSSSSSSSS".concat(i)],["yyyy-MM-dd HH:mm:ss","yyyy-MM-dd".concat(r,"HH:mm:ss").concat(i)],["yyyy-MM-dd HH:mm:ss.SSS","yyyy-MM-dd".concat(r,"HH:mm:ss.SSS").concat(i)],["yyyy-MM-dd HH:mm:ss.SSSSSSSSS","yyyy-MM-dd".concat(r,"HH:mm:ss.SSSSSSSSS").concat(i)]])}static getFormats(e,t){var r=Et.makeFormatStringMap(e,t);return[...r.keys()]}constructor(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=t.timeZone,i=r===void 0?"":r,o=t.showTimeZone,a=o===void 0?!0:o,s=t.showTSeparator,l=s===void 0?!1:s,u=t.defaultDateTimeFormatString,c=u===void 0?Et.DEFAULT_DATETIME_FORMAT_STRING:u;super(),Lt(this,"dh",void 0),Lt(this,"dhTimeZone",void 0),Lt(this,"defaultDateTimeFormatString",void 0),Lt(this,"showTimeZone",void 0),Lt(this,"showTSeparator",void 0),Lt(this,"formatStringMap",void 0);var m=i||Et.DEFAULT_TIME_ZONE_ID;try{this.dhTimeZone=e.i18n.TimeZone.getTimeZone(m)}catch{zo.error("Unsupported time zone id",m),this.dhTimeZone=e.i18n.TimeZone.getTimeZone(Et.DEFAULT_TIME_ZONE_ID)}this.dh=e,this.defaultDateTimeFormatString=c,this.showTimeZone=a,this.showTSeparator=l,this.formatStringMap=Et.makeFormatStringMap(a,l)}getEffectiveFormatString(e){var t;return(t=this.formatStringMap.get(e))!==null&&t!==void 0?t:e}format(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=t.formatString!=null&&t.formatString!==""?t.formatString:this.defaultDateTimeFormatString,i=this.getEffectiveFormatString(r);try{return this.dh.i18n.DateTimeFormat.format(i,e,this.dhTimeZone)}catch{zo.error("Invalid format arguments")}return""}}Lt(Et,"DEFAULT_DATETIME_FORMAT_STRING","yyyy-MM-dd HH:mm:ss.SSS");Lt(Et,"DEFAULT_TIME_ZONE_ID","America/New_York");var xt;function ht(n,e,t){return(e=Pm(e))in n?Object.defineProperty(n,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):n[e]=t,n}function Pm(n){var e=Tm(n,"string");return typeof e=="symbol"?e:e+""}function Tm(n,e){if(typeof n!="object"||!n)return n;var t=n[Symbol.toPrimitive];if(t!==void 0){var r=t.call(n,e);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(n)}var Om=H.module("DecimalColumnFormatter");class ze extends Ze{static isValid(e,t){if(t.formatString==null)return!1;try{return e.i18n.NumberFormat.format(t.formatString,0),!0}catch{return!1}}static makeFormat(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:Ze.TYPE_CONTEXT_PRESET,i=arguments.length>3?arguments[3]:void 0;return{label:e,type:r,formatString:t,multiplier:i}}static makePresetFormat(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"",r=arguments.length>2?arguments[2]:void 0;return ze.makeFormat(e,t,Ze.TYPE_CONTEXT_PRESET,r)}static makeCustomFormat(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"",t=arguments.length>1?arguments[1]:void 0;return ze.makeFormat("Custom Format",e,Ze.TYPE_CONTEXT_CUSTOM,t)}static isSameFormat(e,t){return e===t||e!=null&&t!=null&&e.type===t.type&&e.formatString===t.formatString&&e.multiplier===t.multiplier}constructor(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=t.defaultFormatString,i=r===void 0?ze.DEFAULT_FORMAT_STRING:r;super(),ht(this,"defaultFormatString",void 0),ht(this,"dh",void 0),this.dh=e,this.defaultFormatString=i}format(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=t.formatString!=null&&t.formatString!==""?t.formatString:this.defaultFormatString,i=t.multiplier!=null&&t.multiplier!==0?e*t.multiplier:e;try{return this.dh.i18n.NumberFormat.format(r,i)}catch{Om.error("Invalid format arguments")}return""}}xt=ze;ht(ze,"DEFAULT_FORMAT_STRING","###,##0.0000");ht(ze,"FORMAT_PERCENT",xt.makePresetFormat("Percent","##0.00%"));ht(ze,"FORMAT_BASIS_POINTS",xt.makePresetFormat("Basis Points","###,##0 bp",1e4));ht(ze,"FORMAT_THOUSANDS",xt.makePresetFormat("Thousands","##0.000 k",.001));ht(ze,"FORMAT_MILLIONS",xt.makePresetFormat("Millions","###,##0.000 mm",1e-6));ht(ze,"FORMAT_SCIENTIFIC_NOTATION",xt.makePresetFormat("Scientific Notation","0.0000E0"));ht(ze,"FORMAT_ROUND",xt.makePresetFormat("Round","###,##0"));ht(ze,"FORMAT_ROUND_TWO_DECIMALS",xt.makePresetFormat("0.00","###,##0.00"));ht(ze,"FORMAT_ROUND_FOUR_DECIMALS",xt.makePresetFormat("0.0000","###,##0.0000"));var Nr;function En(n,e,t){return(e=xm(e))in n?Object.defineProperty(n,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):n[e]=t,n}function xm(n){var e=Im(n,"string");return typeof e=="symbol"?e:e+""}function Im(n,e){if(typeof n!="object"||!n)return n;var t=n[Symbol.toPrimitive];if(t!==void 0){var r=t.call(n,e);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(n)}var Dm=H.module("IntegerColumnFormatter");class Tt extends Ze{static isValid(e,t){if(t.formatString==null)return!1;try{return e.i18n.NumberFormat.format(t.formatString,0),!0}catch{return!1}}static makeFormat(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:Ze.TYPE_CONTEXT_PRESET,i=arguments.length>3?arguments[3]:void 0;return{label:e,type:r,formatString:t,multiplier:i}}static makePresetFormat(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"",r=arguments.length>2?arguments[2]:void 0;return Tt.makeFormat(e,t,Ze.TYPE_CONTEXT_PRESET,r)}static makeCustomFormat(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"",t=arguments.length>1?arguments[1]:void 0;return Tt.makeFormat("Custom Format",e,Ze.TYPE_CONTEXT_CUSTOM,t)}static isSameFormat(e,t){return e===t||e!=null&&t!=null&&e.type===t.type&&e.formatString===t.formatString&&e.multiplier===t.multiplier}constructor(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=t.defaultFormatString,i=r===void 0?Tt.DEFAULT_FORMAT_STRING:r;super(),En(this,"dh",void 0),En(this,"defaultFormatString",void 0),this.dh=e,this.defaultFormatString=i}format(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=t.formatString!=null&&t.formatString!==""?t.formatString:this.defaultFormatString,i=t.multiplier!=null&&t.multiplier!==0?e*t.multiplier:e;try{return this.dh.i18n.NumberFormat.format(r,i)}catch{Dm.error("Invalid format arguments")}return""}}Nr=Tt;En(Tt,"DEFAULT_FORMAT_STRING","###,##0");En(Tt,"FORMAT_THOUSANDS",Nr.makePresetFormat("Thousands","##0.000 k",.001));En(Tt,"FORMAT_MILLIONS",Nr.makePresetFormat("Millions","###,##0.000 mm",1e-6));En(Tt,"FORMAT_SCIENTIFIC_NOTATION",Nr.makePresetFormat("Scientific Notation","0.0000E0"));function on(n,e,t){return(e=Mm(e))in n?Object.defineProperty(n,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):n[e]=t,n}function Mm(n){var e=jm(n,"string");return typeof e=="symbol"?e:e+""}function jm(n,e){if(typeof n!="object"||!n)return n;var t=n[Symbol.toPrimitive];if(t!==void 0){var r=t.call(n,e);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(n)}class K{}on(K,"INTEGER","int");on(K,"LONG","long");on(K,"DOUBLE","double");on(K,"BOOLEAN","bool");on(K,"STRING","string");on(K,"DATE_TIME","datetime");on(K,"LOCAL_TIME","localtime");var Am=Object.freeze({}),km=new Map,MC=n=>n.api,jC=n=>n.user,wl=n=>n.storage,_l=n=>wl(n).commandHistoryStorage,Nm=n=>wl(n).fileStorage,Lm=n=>n.defaultWorkspaceSettings,El=n=>{var e=n.workspace;return e},Mi=Ed(n=>{var e,t,r=(e=(t=El(n))===null||t===void 0?void 0:t.data.settings)!==null&&e!==void 0?e:{},i=Lm(n),o=Pd({},i,r,(a,s)=>{if(Array.isArray(a)&&Array.isArray(s))return s});return o}),Rm=n=>Mi(n).timeZone,AC=n=>{var e;return(e=Mi(n).notebookSettings)!==null&&e!==void 0?e:Am},kC=n=>n.activeTool,$m=n=>{var e;return(e=n.plugins)!==null&&e!==void 0?e:km},Fm="SET_ACTIVE_TOOL",Hm="SET_API",NC="SET_COMMAND_HISTORY_STORAGE",LC="SET_FILE_STORAGE",RC="SET_PLUGINS",Um="SET_USER",Bm="SET_WORKSPACE",Wm="SET_DEFAULT_WORKSPACE_SETTINGS",$C="SET_WORKSPACE_STORAGE",Km="SET_SERVER_CONFIG_VALUES";function Vo(n,e){var t=Object.keys(n);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(n);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(n,i).enumerable})),t.push.apply(t,r)}return t}function wt(n){for(var e=1;e<arguments.length;e++){var t=arguments[e]!=null?arguments[e]:{};e%2?Vo(Object(t),!0).forEach(function(r){zm(n,r,t[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(t)):Vo(Object(t)).forEach(function(r){Object.defineProperty(n,r,Object.getOwnPropertyDescriptor(t,r))})}return n}function zm(n,e,t){return(e=Vm(e))in n?Object.defineProperty(n,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):n[e]=t,n}function Vm(n){var e=Gm(n,"string");return typeof e=="symbol"?e:e+""}function Gm(n,e){if(typeof n!="object"||!n)return n;var t=n[Symbol.toPrimitive];if(t!==void 0){var r=t.call(n,e);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(n)}var FC=n=>({type:Um,payload:n}),HC=n=>({type:Hm,payload:n}),Pl=n=>({type:Bm,payload:n}),UC=n=>({type:Wm,payload:n}),qm=n=>(e,t)=>{e(Pl(n));var r=t(),i=r.storage,o=i.workspaceStorage;return o==null?void 0:o.save(n)},Xm=n=>(e,t)=>{var r=t(),i=r.workspace,o=i??{},a=o.data,s=wt(wt({},i),{},{data:wt(wt(wt({},a),n),{},{settings:wt(wt({},a==null?void 0:a.settings),n.settings)})});return e(qm(s))},BC=n=>(e,t)=>{var r=Mi(t()),i=r.notebookSettings,o=wt(wt({},i),n);return e(Zm({notebookSettings:o}))},Zm=n=>e=>e(Xm({settings:n})),WC=n=>({type:Fm,payload:n}),KC=n=>({type:Km,payload:n});function Go(n,e){var t=Object.keys(n);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(n);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(n,i).enumerable})),t.push.apply(t,r)}return t}function qo(n){for(var e=1;e<arguments.length;e++){var t=arguments[e]!=null?arguments[e]:{};e%2?Go(Object(t),!0).forEach(function(r){Ym(n,r,t[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(t)):Go(Object(t)).forEach(function(r){Object.defineProperty(n,r,Object.getOwnPropertyDescriptor(t,r))})}return n}function Ym(n,e,t){return(e=Qm(e))in n?Object.defineProperty(n,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):n[e]=t,n}function Qm(n){var e=Jm(n,"string");return typeof e=="symbol"?e:e+""}function Jm(n,e){if(typeof n!="object"||!n)return n;var t=n[Symbol.toPrimitive];if(t!==void 0){var r=t.call(n,e);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(n)}function ep(n){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;return function(){var r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:e,i=arguments.length>1?arguments[1]:void 0;switch(i==null?void 0:i.type){case n:{var o=i.id,a=i.payload;return t&&ai({payload:a},{payload:r[o]})?r:qo(qo({},r),{},{[o]:a})}default:return r}}}function Xo(n,e){var t=Object.keys(n);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(n);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(n,i).enumerable})),t.push.apply(t,r)}return t}function Zo(n){for(var e=1;e<arguments.length;e++){var t=arguments[e]!=null?arguments[e]:{};e%2?Xo(Object(t),!0).forEach(function(r){mi(n,r,t[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(t)):Xo(Object(t)).forEach(function(r){Object.defineProperty(n,r,Object.getOwnPropertyDescriptor(t,r))})}return n}function mi(n,e,t){return(e=tp(e))in n?Object.defineProperty(n,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):n[e]=t,n}function tp(n){var e=np(n,"string");return typeof e=="symbol"?e:e+""}function np(n,e){if(typeof n!="object"||!n)return n;var t=n[Symbol.toPrimitive];if(t!==void 0){var r=t.call(n,e);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(n)}class rp{constructor(){mi(this,"reducers",{}),mi(this,"listener",null)}register(e,t){var r;this.reducers=Zo(Zo({},this.reducers),{},{[e]:t}),(r=this.listener)===null||r===void 0||r.call(this,this.reducers)}setListener(e){this.listener=e}}var ip=new rp,Tl=h.createContext(null);Tl.displayName="PluginsContext";var Wt=Object.freeze({AUTH_PLUGIN:"AuthPlugin",DASHBOARD_PLUGIN:"DashboardPlugin",ELEMENT_PLUGIN:"ElementPlugin",MIDDLEWARE_PLUGIN:"MiddlewarePlugin",MULTI_PLUGIN:"MultiPlugin",TABLE_PLUGIN:"TablePlugin",THEME_PLUGIN:"ThemePlugin",WIDGET_PLUGIN:"WidgetPlugin"});function op(n){return"DashboardPlugin"in n}function ap(n){return"AuthPlugin"in n}function sp(n){return"TablePlugin"in n}function lp(n){return op(n)||ap(n)||sp(n)}function up(n){return"type"in n&&n.type===Wt.DASHBOARD_PLUGIN}function pi(n){return"type"in n&&n.type===Wt.MIDDLEWARE_PLUGIN}function Vn(n){return"type"in n&&n.type===Wt.WIDGET_PLUGIN}function Ol(n){return Vn(n)&&"dashboardTypes"in n&&n.dashboardTypes!=null}function dp(n){return"type"in n&&n.type===Wt.TABLE_PLUGIN}function cp(n){return"type"in n&&n.type===Wt.AUTH_PLUGIN}function xl(n){return"type"in n&&n.type===Wt.THEME_PLUGIN}function Il(n){return"type"in n&&n.type===Wt.ELEMENT_PLUGIN}function Dl(n){return"type"in n&&n.type===Wt.MULTI_PLUGIN}function fi(n){return up(n)||cp(n)||Il(n)||Dl(n)||dp(n)||xl(n)||Vn(n)||pi(n)}var hp=["metadata"],mp=["metadata"],pp=["Component"],fp=["Component"];function Yo(n,e){var t=Object.keys(n);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(n);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(n,i).enumerable})),t.push.apply(t,r)}return t}function xe(n){for(var e=1;e<arguments.length;e++){var t=arguments[e]!=null?arguments[e]:{};e%2?Yo(Object(t),!0).forEach(function(r){vp(n,r,t[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(t)):Yo(Object(t)).forEach(function(r){Object.defineProperty(n,r,Object.getOwnPropertyDescriptor(t,r))})}return n}function vp(n,e,t){return(e=gp(e))in n?Object.defineProperty(n,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):n[e]=t,n}function gp(n){var e=bp(n,"string");return typeof e=="symbol"?e:e+""}function bp(n,e){if(typeof n!="object"||!n)return n;var t=n[Symbol.toPrimitive];if(t!==void 0){var r=t.call(n,e);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(n)}function Lr(n,e){if(n==null)return{};var t,r,i=yp(n,e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(n);for(r=0;r<o.length;r++)t=o[r],e.indexOf(t)===-1&&{}.propertyIsEnumerable.call(n,t)&&(i[t]=n[t])}return i}function yp(n,e){if(n==null)return{};var t={};for(var r in n)if({}.hasOwnProperty.call(n,r)){if(e.indexOf(r)!==-1)continue;t[r]=n[r]}return t}function Ml(n,e){return _p(n)||wp(n,e)||Sp(n,e)||Cp()}function Cp(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
9
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Sp(n,e){if(n){if(typeof n=="string")return Qo(n,e);var t={}.toString.call(n).slice(8,-1);return t==="Object"&&n.constructor&&(t=n.constructor.name),t==="Map"||t==="Set"?Array.from(n):t==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?Qo(n,e):void 0}}function Qo(n,e){(e==null||e>n.length)&&(e=n.length);for(var t=0,r=Array(e);t<e;t++)r[t]=n[t];return r}function wp(n,e){var t=n==null?null:typeof Symbol<"u"&&n[Symbol.iterator]||n["@@iterator"];if(t!=null){var r,i,o,a,s=[],l=!0,u=!1;try{if(o=(t=t.call(n)).next,e!==0)for(;!(l=(r=o.call(t)).done)&&(s.push(r.value),s.length!==e);l=!0);}catch(c){u=!0,i=c}finally{try{if(!l&&t.return!=null&&(a=t.return(),Object(a)!==a))return}finally{if(u)throw i}}return s}}function _p(n){if(Array.isArray(n))return n}var Ke=H.module("@deephaven/plugin.PluginUtils");function Sn(n){var e,t,r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"Component";return(e=(t=n.displayName)!==null&&t!==void 0?t:n.name)!==null&&e!==void 0?e:r}function Jo(n,e){return n==null||!Vn(n)?!1:[n.supportedTypes].flat().some(t=>t===e)}function zC(n,e){return n==null||!Ol(n)?!1:[n.dashboardTypes].flat().some(t=>t===e)}function Ep(n){var e=d.jsx(me,{icon:Rs});if(!Vn(n))return e;var t=n.icon;return t==null?e:h.isValidElement(t)?t:d.jsx(me,{icon:t})}function VC(n){var e=[...n.entries()].filter(t=>xl(t[1]));return Ke.debug("Getting theme data from plugins",e),e.map(t=>{var r=Ml(t,2),i=r[0],o=r[1],a=Array.isArray(o.themes)?o.themes:[o.themes];return a.map(s=>{var l=s.name,u=s.baseTheme,c=s.styleContent;return{baseThemeKey:"default-".concat(u??"dark"),themeKey:Ku(i,l),name:l,styleContent:c}})}).flat()}function GC(n){var e=[...n.entries()].filter(t=>Il(t[1])&&t[1].mapping!=null);return Ke.debug("Getting element plugin mapping",e),new Map(e.flatMap(t=>{var r=Ml(t,2),i=r[1];return Object.entries(i.mapping)}))}function Pp(n,e){return e.length===0?(Ke.debug("No middleware to chain for component",Sn(n)),n):(Ke.debug("Chaining component middleware",Sn(n),e.map(t=>t.name)),[...e].reverse().reduce((t,r)=>{var i=r.component,o=[r.supportedTypes].flat();function a(s){var l=s.metadata,u=Lr(s,hp);return(l==null?void 0:l.type)!=null&&!o.includes(l.type)?d.jsx(t,xe(xe({},u),{},{metadata:l})):d.jsx(i,xe(xe({},u),{},{metadata:l,Component:t}))}return a.displayName="".concat(r.name,"(").concat(Sn(t),")"),a},n))}function qC(n,e){var t=e.filter(r=>r.panelComponent!=null);return t.length===0?(Ke.debug("No panel middleware to chain for panel component",Sn(n)),n):(Ke.debug("Chaining panel middleware",Sn(n),t.map(r=>r.name)),[...t].reverse().reduce((r,i)=>{var o=i.panelComponent,a=[i.supportedTypes].flat(),s=j.forwardRef((l,u)=>{var c=l.metadata,m=Lr(l,mp),p=u!=null?{ref:u}:{};return(c==null?void 0:c.type)!=null&&!a.includes(c.type)?d.jsx(r,xe(xe(xe({},p),m),{},{metadata:c})):d.jsx(o,xe(xe(xe({},p),m),{},{metadata:c,Component:r}))});return s.displayName="".concat(i.name,"Panel(").concat(Sn(r,"Panel"),")"),s},n))}function XC(n){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"PanelMiddleware",t=j.forwardRef((r,i)=>{var o=r.Component,a=Lr(r,pp),s=n(a),l=s.inject,u=s.wrap,c=o,m=d.jsx(c,xe(xe({ref:i},a),l));return u!=null?u(m):m});return t.displayName=e,t}function ZC(n){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"WidgetMiddleware";function t(r){var i=r.Component,o=Lr(r,fp),a=n(o),s=a.inject,l=a.wrap,u=i,c=d.jsx(u,xe(xe({},o),s));return l!=null?l(c):c}return t.displayName=e,t}function Tp(n){return typeof n=="object"&&n!=null&&n.default!=null&&typeof n.default=="object"}function Op(n){return fi(n)?n:Tp(n)&&fi(n.default)?n.default:lp(n)?n:null}function ea(n,e,t,r){if(n.has(e)){Ke.warn("Plugin '".concat(e,"' is already registered. Skipping duplicate."));return}n.set(e,xe(xe({},t),{},{version:r}))}function YC(n,e,t,r,i,o){i!=null&&(e[i]=t,Ke.debug("Registered plugin '".concat(i,"' in module resolve map")));var a=Op(t);if(a==null){Ke.error("Plugin '".concat(r,"' is missing an exported value."));return}Dl(a)?(Ke.debug("MultiPlugin '".concat(r,"' contains ").concat(a.plugins.length," plugins")),a.plugins.forEach(s=>{if(!fi(s)){Ke.warn("Skipping invalid inner plugin from MultiPlugin '".concat(r,"'"),s);return}var l=typeof s.name=="string"?s.name.trim():"";if(l.length===0){Ke.warn("Skipping unnamed inner plugin from MultiPlugin '".concat(r,"'"),s);return}ea(n,l,s,o)})):ea(n,r,a,o)}function QC(n){var e=new Map;n.forEach(s=>{s.package!=null&&e.set(s.package,s)});var t=new Map;n.forEach(s=>{var l=new Set;s.dependencies!=null&&s.dependencies.forEach(u=>{var c=e.get(u);c!=null?l.add(c):Ke.warn("Plugin '".concat(s.name,"' depends on '").concat(u,"' which is not in the manifest"))}),t.set(s,l)});for(var r=[],i=new Set(n),o=new Set,a=function(){var l=[];if(i.forEach(c=>{var m=t.get(c);if(m==null||m.size===0){l.push(c);return}var p=!0;m.forEach(f=>{o.has(f)||(p=!1)}),p&&l.push(c)}),l.length===0){var u=[...i].map(c=>c.name);return Ke.error("Circular plugin dependency detected among: ".concat(u.join(", "),". Loading remaining plugins together.")),r.push([...i]),1}r.push(l),l.forEach(c=>{i.delete(c),o.add(c)})};i.size>0&&!a(););return r}function xp(n,e){var t;return(t=[...n.values()].find(r=>Ol(r)&&[r.dashboardTypes].flat().some(i=>i===e)))!==null&&t!==void 0?t:null}function Ip(){return zn(Tl,"No Plugins available in usePlugins. This can happen when plugins have not finished loading or if code is not wrapped in PluginsContext.Provider.")}var ta=H.module("@deephaven/plugin.WidgetView");function JC(n){var e=n.fetch,t=n.type,r=Ip(),i=h.useMemo(()=>{var l,u=[];return r.forEach(c=>{if(!(!Vn(c)&&!pi(c))){var m=[c.supportedTypes].flat().includes(t);m&&(pi(c)?u.push(c):(l!=null&&ta.warn("Multiple base plugins for type ".concat(t,". Replacing ").concat(l.name," with ").concat(c.name)),l=c))}}),{basePlugin:l,middleware:u}},[r,t]),o=i.basePlugin,a=i.middleware,s=h.useMemo(()=>o==null?(ta.debug("No base plugin found for widget type ".concat(t)),null):Pp(o.component,a),[o,a,t]);if(s!=null)return d.jsx(s,{fetch:e});throw new Error("Unknown widget type '".concat(t,"'"))}var jl=Object.freeze({openPopouts:[],settings:{hasHeaders:!0,constrainDragToContainer:!0,reorderEnabled:!0,selectionEnabled:!1,popoutWholeStack:!1,blockedPopoutsThrowError:!0,closePopoutsOnUnload:!0,showPopoutIcon:!0,showMaximiseIcon:!0,showCloseIcon:!0,responsiveMode:"onload",tabOverlapAllowance:0,tabControlOffset:10},dimensions:{borderWidth:5,borderGrabWidth:10,minItemHeight:10,minItemWidth:10,headerHeight:20,dragProxyWidth:300,dragProxyHeight:200},labels:{close:"Close",maximise:"Maximize",minimise:"Minimize",popout:"Open in new window",popin:"Pop in",tabDropdown:"Additional tabs",tabNextLabel:"Next",tabPreviousLabel:"Previous"},content:[]});function Al(n){return n.componentName!==void 0}function Dp(n){return n.component!==void 0}var kl=Object.freeze({type:"default",isClosable:!0,isFocusOnShow:!0,reorderEnabled:!0,title:""});const Mp=Object.freeze(Object.defineProperty({__proto__:null,defaultConfig:jl,isGLComponentConfig:Al,isReactComponentConfig:Dp,itemDefaultConfig:kl},Symbol.toStringTag,{value:"Module"}));function yr(n,e,t){return(e=jp(e))in n?Object.defineProperty(n,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):n[e]=t,n}function jp(n){var e=Ap(n,"string");return typeof e=="symbol"?e:e+""}function Ap(n,e){if(typeof n!="object"||!n)return n;var t=n[Symbol.toPrimitive];if(t!==void 0){var r=t.call(n,e);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(n)}class He{constructor(){yr(this,"_mSubscriptions",void 0),yr(this,"off",this.unbind),yr(this,"trigger",this.emit),this._mSubscriptions={},this._mSubscriptions[He.ALL_EVENT]=[]}on(e,t,r){if(typeof t!="function")throw new Error("Tried to listen to event "+e+" with non-function callback "+t);this._mSubscriptions[e]||(this._mSubscriptions[e]=[]),this._mSubscriptions[e].push({fn:t,ctx:r})}emit(e){for(var t=this._mSubscriptions[e],r=arguments.length,i=new Array(r>1?r-1:0),o=1;o<r;o++)i[o-1]=arguments[o];if(t)for(var a=0;a<t.length;a++){var s=t[a].ctx||{};try{t[a].fn.apply(s,i)}catch(m){console.error("Error while emitting event:",m)}}i.unshift(e);for(var l=this._mSubscriptions[He.ALL_EVENT],u=0;u<l.length;u++){var c=l[u].ctx||{};try{l[u].fn.apply(c,i)}catch(m){console.error("Error while emitting event to allEventSubs:",m)}}}unbind(e,t,r){if(!this._mSubscriptions[e])throw new Error("No subscriptions to unsubscribe for event "+e);for(var i=!1,o=0;o<this._mSubscriptions[e].length;o++)(!t||this._mSubscriptions[e][o].fn===t)&&(!r||r===this._mSubscriptions[e][o].ctx)&&(this._mSubscriptions[e].splice(o,1),i=!0);if(i===!1)throw new Error("Nothing to unbind for "+e)}}yr(He,"ALL_EVENT","__all");function at(n,e,t){return(e=kp(e))in n?Object.defineProperty(n,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):n[e]=t,n}function kp(n){var e=Np(n,"string");return typeof e=="symbol"?e:e+""}function Np(n,e){if(typeof n!="object"||!n)return n;var t=n[Symbol.toPrimitive];if(t!==void 0){var r=t.call(n,e);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(n)}class vi extends He{constructor(e,t,r){super(),at(this,"width",void 0),at(this,"height",void 0),at(this,"title",void 0),at(this,"parent",void 0),at(this,"layoutManager",void 0),at(this,"tab",void 0),at(this,"_config",void 0),at(this,"isHidden",!1),at(this,"beforeCloseHandler",void 0),at(this,"_element",x(['<div class="lm_item_container">','<div class="lm_content" tabindex="-1"></div>',"</div>"].join(""))),at(this,"_contentElement",void 0),this.title=Al(e)?e.componentName:"",this.parent=t,this.layoutManager=r,this._config=e,this._contentElement=this._element.find(".lm_content"),this.beforeCloseHandler=null}getElement(){return this._contentElement}hide(){this.emit("hide"),this.isHidden=!0,this._element.hide()}show(){this.emit("show"),this.isHidden=!1,this._element.show(),(this.height!=0||this.width!=0)&&this.emit("shown")}setSize(e,t){for(var r,i,o,a=this.parent,s=null;a&&!a.isColumn&&!a.isRow;){var l;if(s=a,a=a.parent,(l=a)!==null&&l!==void 0&&l.isRoot)return!1}if(!a||!s)return!1;for(var u=a.isColumn?"height":"width",c=u==="height"?t:e,m=((r=this[u])!==null&&r!==void 0?r:0)*(1/(((i=s.config[u])!==null&&i!==void 0?i:0)/100)),p=c/m*100,f=(((o=s.config[u])!==null&&o!==void 0?o:0)-p)/(a.contentItems.length-1),v=0;v<a.contentItems.length;v++)if(a.contentItems[v]===s)a.contentItems[v].config[u]=p;else{var g;a.contentItems[v].config[u]=((g=a.contentItems[v].config[u])!==null&&g!==void 0?g:0)+f}return a.callDownwards("setSize"),!0}close(e){var t,r;this._config.isClosable&&(!((t=(r=this.beforeCloseHandler)===null||r===void 0?void 0:r.call(this,e))!==null&&t!==void 0)||t)&&(this.emit("close"),this.parent.close())}beforeClose(e){this.beforeCloseHandler=e}getState(){return this._config.componentState}getConfig(){return this._config}setState(e){this._config.componentState=e,this.parent.emitBubblingEvent("stateChanged")}setPersistedState(e){this._config.persistedState=e,this.parent.emitBubblingEvent("stateChanged")}setTitle(e){this.parent.setTitle(e)}_$setSize(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;if(e!==this.width||t!==this.height){this.width=e,this.height=t;var r=this._contentElement[0],i=r.offsetWidth-r.clientWidth,o=r.offsetHeight-r.clientHeight;this._contentElement.width(this.width-i).height(this.height-o),this.emit("resize")}}}const Lp=Object.freeze(Object.defineProperty({__proto__:null,Container:vi,ItemContainer:vi},Symbol.toStringTag,{value:"Module"}));function Nl(n){var e=location.hash.match(new RegExp(n+"=([^&]*)"));return e?e[1]:null}function Ll(n){if(window.location.hash)return Nl(n);if(!window.location.search)return null;var e=window.location.search.substr(1).split("&"),t={},r,i;for(i=0;i<e.length;i++)r=e[i].split("="),t[r[0]]=r[1];return t[n]||null}function ji(n){return window.requestAnimationFrame(n)}function Rp(n,e){var t=e.indexOf(n);if(t===-1)throw new Error("Can't remove item from array. Item is not in the array");e.splice(t,1)}function wr(){return Pt()}function $p(n,e){var t=n.replace(/javascript/gi,"javascript").replace(/expression/gi,"expression").replace(/onload/gi,"onload").replace(/script/gi,"script").replace(/onerror/gi,"onerror");return e===!0?t:t.replace(/>/g,">").replace(/</g,"<")}function Ai(n){return x.trim(n.replace(/(<([^>]+)>)/gi,""))}function Ue(n,e,t){return(e=Fp(e))in n?Object.defineProperty(n,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):n[e]=t,n}function Fp(n){var e=Hp(n,"string");return typeof e=="symbol"?e:e+""}function Hp(n,e){if(typeof n!="object"||!n)return n;var t=n[Symbol.toPrimitive];if(t!==void 0){var r=t.call(n,e);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(n)}class Gn extends He{constructor(e,t){var r,i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;super(),Ue(this,"_eElement",void 0),Ue(this,"_oDocument",void 0),Ue(this,"_eBody",void 0),Ue(this,"_root",void 0),Ue(this,"_destroyAfterMouseUp",void 0),Ue(this,"_nDelay",400),Ue(this,"_timeout",void 0),Ue(this,"timeout",void 0),Ue(this,"_nDistance",10),Ue(this,"_nX",0),Ue(this,"_nY",0),Ue(this,"_nOriginalX",0),Ue(this,"_nOriginalY",0),Ue(this,"_bDragging",!1),this._eElement=e,this._oDocument=x(document),this._eBody=x(document.body),this._root=t,this._destroyAfterMouseUp=i,this.onMouseMove=this.onMouseMove.bind(this),this.onMouseUp=this.onMouseUp.bind(this),this.onMouseDown=this.onMouseDown.bind(this),this._startDrag=this._startDrag.bind(this),(r=this._eElement)===null||r===void 0||r.on("mousedown",this.onMouseDown)}destroy(){var e,t;(e=this._eElement)===null||e===void 0||e.unbind("mousedown",this.onMouseDown),(t=this._oDocument)===null||t===void 0||t.unbind("mouseup",this.onMouseUp),this._eElement=void 0,this._oDocument=void 0,this._eBody=void 0,clearTimeout(this._timeout),this._timeout=void 0}onMouseDown(e){if(e.preventDefault(),e.button===0){var t,r,i,o,a=this._getCoordinates(e);this._nOriginalX=(t=a.x)!==null&&t!==void 0?t:0,this._nOriginalY=(r=a.y)!==null&&r!==void 0?r:0,(i=this._oDocument)===null||i===void 0||i.on("mousemove",this.onMouseMove),(o=this._oDocument)===null||o===void 0||o.on("mouseup",this.onMouseUp),this._timeout=window.setTimeout(this._startDrag,this._nDelay)}}onMouseMove(e){if(this._timeout!=null){var t,r;e.preventDefault();var i=this._getCoordinates(e);this._nX=((t=i.x)!==null&&t!==void 0?t:0)-this._nOriginalX,this._nY=((r=i.y)!==null&&r!==void 0?r:0)-this._nOriginalY,this._bDragging===!1&&(Math.abs(this._nX)>this._nDistance||Math.abs(this._nY)>this._nDistance)&&this._startDrag(),this._bDragging&&this.emit("drag",this._nX,this._nY,e)}}onMouseUp(e){if(this._timeout!=null){var t,r,i,o,a;if(clearTimeout(this._timeout),(t=this._oDocument)===null||t===void 0||t.unbind("mousemove",this.onMouseMove),(r=this._oDocument)===null||r===void 0||r.unbind("mouseup",this.onMouseUp),(i=this._oDocument)===null||i===void 0||(i=i.find("iframe"))===null||i===void 0||i.css("pointer-events",""),this._bDragging===!0&&(this._bDragging=!1,this.emit("dragStop",e,this._nOriginalX+this._nX)),(o=this._eBody)===null||o===void 0||o.removeClass("lm_dragging"),(a=this._root)===null||a===void 0||a.childElementContainer.removeClass("lm_dragging"),!(this._eElement instanceof Window)){var s;(s=this._eElement)===null||s===void 0||s.removeClass("lm_dragging")}this._destroyAfterMouseUp&&this.destroy()}}_startDrag(){var e,t,r,i;window.clearTimeout(this._timeout),this._bDragging=!0,(e=this._eBody)===null||e===void 0||e.addClass("lm_dragging"),(t=this._eElement)===null||t===void 0||t.addClass("lm_dragging"),(r=this._root)===null||r===void 0||r.childElementContainer.addClass("lm_dragging"),(i=this._oDocument)===null||i===void 0||(i=i.find("iframe"))===null||i===void 0||i.css("pointer-events","none"),this.emit("dragStart",this._nOriginalX,this._nOriginalY)}_getCoordinates(e){var t,r;return{x:(t=e.pageX)!==null&&t!==void 0?t:0,y:(r=e.pageY)!==null&&r!==void 0?r:0}}}function dn(n,e,t){return(e=Up(e))in n?Object.defineProperty(n,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):n[e]=t,n}function Up(n){var e=Bp(n,"string");return typeof e=="symbol"?e:e+""}function Bp(n,e){if(typeof n!="object"||!n)return n;var t=n[Symbol.toPrimitive];if(t!==void 0){var r=t.call(n,e);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(n)}class Rl{constructor(e,t){dn(this,"_container",void 0),dn(this,"_reactComponent",null),dn(this,"_portalComponent",null),dn(this,"_originalComponentWillUpdate",void 0),dn(this,"_initialState",void 0),dn(this,"_reactClass",void 0),this._reactComponent=null,this._portalComponent=null,this._originalComponentWillUpdate=void 0,this._container=e,this._initialState=t,this._reactClass=this._getReactClass(),this._container.on("open",this._render,this),this._container.on("destroy",this._destroy,this)}_key(){var e=this._container._config.id;if(!e)throw new Error("Cannot mount panel without id");return Array.isArray(e)?e.join(","):e}_render(){var e=this._key();this._portalComponent=Oi.createPortal(this._getReactComponent(),this._container.getElement()[0],e),this._container.layoutManager.addReactChild(e,this._portalComponent)}_gotReactComponent(e){if(e&&(this._reactComponent=e,this._reactComponent instanceof h.Component)){this._originalComponentWillUpdate=this._reactComponent.componentWillUpdate,this._reactComponent.componentWillUpdate=this._onUpdate.bind(this);var t=this._container.getState();t&&this._reactComponent.setState(t)}}_destroy(){this._container.layoutManager.removeReactChild(this._key(),this._portalComponent),this._container.off("open",this._render,this),this._container.off("destroy",this._destroy,this)}_onUpdate(e,t){var r;this._container.setState(t),(r=this._originalComponentWillUpdate)===null||r===void 0||r.call(this._reactComponent,e,t,void 0)}_getReactClass(){var e=this._container._config.component;if(!e)throw new Error("No react component name. type: react-component needs a field `component`");var t=this._container.layoutManager.getComponent(e)||this._container.layoutManager.getFallbackComponent();if(!t)throw new Error('React component "'+e+'" not found. Please register all components with GoldenLayout using `registerComponent(name, component)`');return t}_getReactComponent(){var e={glEventHub:this._container.layoutManager.eventHub,glContainer:this._container,ref:this._gotReactComponent.bind(this)},t=x.extend(e,this._container._config.props);return j.createElement(this._reactClass,t)}}var _r=["settings","hasHeaders","constrainDragToContainer","selectionEnabled","dimensions","borderWidth","minItemHeight","minItemWidth","headerHeight","dragProxyWidth","dragProxyHeight","labels","close","maximise","minimise","popout","content","componentName","componentState","id","width","type","height","isClosable","title","popoutWholeStack","openPopouts","parentId","activeItemIndex","reorderEnabled","borderGrabWidth"],Wp=[!0,!1,"row","column","stack","component","close","maximise","minimise","open in new window"];function ki(n){if(_r.length>36)throw new Error("Too many keys in config minifier map");var e={};return Ni(n,e,"_min"),e}function gi(n){if(_r.length>36)throw new Error("Too many keys in config minifier map");var e={};return Ni(n,e,"_max"),e}function Ni(n,e,t){var r=t==="_min"?Kp:zp;for(var i in n)if(n.hasOwnProperty(i)){var o=Array.isArray(n)?n[Number.parseInt(i,10)]:n[i];if(typeof o=="object"&&o!=null){var a=o instanceof Array?[]:{};if(Array.isArray(e))e[Number.parseInt(i,10)]=a;else{var s=r(i,_r);e[s]=a}Ni(o,a,t)}else{var l=r(o,Wp);if(Array.isArray(e))e[Number.parseInt(i,10)]=l;else{var u=r(i,_r);e[u]=l}}}}function Kp(n,e){if(typeof n=="string"&&n.length===1)return"___"+n;var t=e.indexOf(n);return t===-1?n:t.toString(36)}function zp(n,e){return typeof n=="string"&&n.length===1?e[parseInt(n,36)]:typeof n=="string"&&n.substr(0,3)==="___"?n[3]:n}function Xr(n,e,t){return(e=Vp(e))in n?Object.defineProperty(n,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):n[e]=t,n}function Vp(n){var e=Gp(n,"string");return typeof e=="symbol"?e:e+""}function Gp(n,e){if(typeof n!="object"||!n)return n;var t=n[Symbol.toPrimitive];if(t!==void 0){var r=t.call(n,e);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(n)}class bi{constructor(e,t){Xr(this,"name",void 0),Xr(this,"origin",void 0),Xr(this,"isPropagationStopped",void 0),this.name=e,this.origin=t,this.isPropagationStopped=!1}stopPropagation(){this.isPropagationStopped=!0}}function sr(n,e,t){return(e=qp(e))in n?Object.defineProperty(n,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):n[e]=t,n}function qp(n){var e=Xp(n,"string");return typeof e=="symbol"?e:e+""}function Xp(n,e){if(typeof n!="object"||!n)return n;var t=n[Symbol.toPrimitive];if(t!==void 0){var r=t.call(n,e);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(n)}let $l=class extends He{constructor(e){super(),sr(this,"_layoutManager",void 0),sr(this,"_dontPropagateToParent",void 0),sr(this,"_childEventSource",void 0),sr(this,"_boundOnEventFromChild",void 0),this._layoutManager=e,this._dontPropagateToParent=null,this._childEventSource=null,this.on(He.ALL_EVENT,this._onEventFromThis.bind(this)),this._boundOnEventFromChild=this._onEventFromChild.bind(this),x(window).on("gl_child_event",this._boundOnEventFromChild)}_onEventFromThis(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];this._layoutManager.isSubWindow&&t[0]!==this._dontPropagateToParent&&this._propagateToParent(t),this._propagateToChildren(t),this._dontPropagateToParent=null,this._childEventSource=null}_$onEventFromParent(e){this._dontPropagateToParent=e[0],this.emit.apply(this,e)}_onEventFromChild(e){this._childEventSource=e.originalEvent.__gl,this.emit.apply(this,e.originalEvent.__glArgs)}_propagateToParent(e){var t,r="gl_child_event",i=(t=window.opener)===null||t===void 0?void 0:t.document.createEvent("HTMLEvents");i.initEvent(r,!0,!0),i.eventName=r,i.__glArgs=e,i.__gl=this._layoutManager,window.opener.dispatchEvent(i)}_propagateToChildren(e){for(var t=0;t<this._layoutManager.openPopouts.length;t++){var r=this._layoutManager.openPopouts[t].getGlInstance();r&&r!==this._childEventSource&&r.eventHub._$onEventFromParent(e)}}destroy(){x(window).off("gl_child_event",this._boundOnEventFromChild)}};function Fl(n,e,t){return n.on(e,t),()=>{n.off(e,t)}}function Hl(n){return(e,t)=>Fl(e,n,t)}function Ul(n){return function(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),i=1;i<t;i++)r[i-1]=arguments[i];e.emit(n,...r)}}function Bl(n){return(e,t)=>{var r=h.useRef(null),i=h.useRef(()=>!1);if(r.current!=e||i.current!=t){var o;(o=r.current)===null||o===void 0||o.off(n,i.current),e==null||e.on(n,t)}r.current=e,i.current=t,h.useEffect(()=>()=>{var a;return(a=r.current)===null||a===void 0?void 0:a.off(n,i.current)},[])}}function mt(n){return{listen:Hl(n),emit:Ul(n),useListener:Bl(n)}}const Zp=Object.freeze(Object.defineProperty({__proto__:null,BubblingEvent:bi,DragListener:Gn,EventEmitter:He,EventHub:$l,ReactComponentHandler:Rl,animFrame:ji,filterXss:$p,getHashValue:Nl,getQueryStringParam:Ll,getUniqueId:wr,listenForEvent:Fl,makeEmitFunction:Ul,makeEventFunctions:mt,makeListenFunction:Hl,makeUseListenerFunction:Bl,minifyConfig:ki,removeFromArray:Rp,stripTags:Ai,unminifyConfig:gi},Symbol.toStringTag,{value:"Module"}));function jt(n,e,t){return(e=Yp(e))in n?Object.defineProperty(n,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):n[e]=t,n}function Yp(n){var e=Qp(n,"string");return typeof e=="symbol"?e:e+""}function Qp(n,e){if(typeof n!="object"||!n)return n;var t=n[Symbol.toPrimitive];if(t!==void 0){var r=t.call(n,e);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(n)}class Wl extends He{constructor(e,t,r,i,o){super(),jt(this,"isInitialised",!1),jt(this,"_config",void 0),jt(this,"_dimensions",void 0),jt(this,"_parentId",void 0),jt(this,"_indexInParent",void 0),jt(this,"_layoutManager",void 0),jt(this,"_popoutWindow",null),jt(this,"_id",null),this._config=e,this._dimensions=t,this._parentId=r,this._indexInParent=i,this._layoutManager=o,this._createWindow()}toConfig(){var e,t,r,i,o,a,s,l,u,c,m;if(this.isInitialised===!1)throw new Error("Can't create config, layout not yet initialised");return{dimensions:{width:(e=this.getGlInstance())===null||e===void 0?void 0:e.width,height:(t=this.getGlInstance())===null||t===void 0?void 0:t.height,left:(r=(i=(o=this._popoutWindow)===null||o===void 0?void 0:o.screenX)!==null&&i!==void 0?i:(a=this._popoutWindow)===null||a===void 0?void 0:a.screenLeft)!==null&&r!==void 0?r:0,top:(s=(l=(u=this._popoutWindow)===null||u===void 0?void 0:u.screenY)!==null&&l!==void 0?l:(c=this._popoutWindow)===null||c===void 0?void 0:c.screenTop)!==null&&s!==void 0?s:0},content:(m=this.getGlInstance())===null||m===void 0?void 0:m.toConfig().content,parentId:this._parentId,indexInParent:this._indexInParent}}getGlInstance(){var e;return(e=this._popoutWindow)===null||e===void 0?void 0:e.__glInstance}getWindow(){return this._popoutWindow}close(){if(this.getGlInstance()){var e;(e=this.getGlInstance())===null||e===void 0||e._$closeWindow()}else try{var t;(t=this.getWindow())===null||t===void 0||t.close()}catch{}}popIn(){var e;this._indexInParent;var t=null,r=null;if(this._parentId){var i;if(t=x.extend(!0,{},(i=this.getGlInstance())===null||i===void 0?void 0:i.toConfig()).content[0],r=this._layoutManager.root.getItemsById(this._parentId)[0],!r){var o;((o=this._layoutManager.root.contentItems.length)!==null&&o!==void 0?o:0)>0?r=this._layoutManager.root.contentItems[0]:r=this._layoutManager.root}}t&&((e=r)===null||e===void 0||e.addChild(t,this._indexInParent),this.close())}_createWindow(){var e=this._createUrl(),t=Math.floor(Math.random()*1e6).toString(36),r=this._serializeWindowOptions({width:this._dimensions.width,height:this._dimensions.height,innerWidth:this._dimensions.width,innerHeight:this._dimensions.height,menubar:"no",toolbar:"no",location:"no",personalbar:"no",resizable:"yes",scrollbars:"no",status:"no"});if(this._popoutWindow=window.open(e,t,r),!this._popoutWindow)if(this._layoutManager.config.settings.blockedPopoutsThrowError===!0){var i=new Error("Popout blocked");throw i.type="popoutBlocked",i}else return;x(this._popoutWindow).on("load",this._positionWindow.bind(this)).on("unload beforeunload",this._onClose.bind(this));var o=window.setInterval(()=>{var a;(a=this._popoutWindow)!==null&&a!==void 0&&a.__glInstance&&this._popoutWindow.__glInstance.isInitialised&&(this._onInitialised(),window.clearInterval(o))},10)}_serializeWindowOptions(e){var t=[],r;for(r in e)t.push(r+"="+e[r]);return t.join(",")}_createUrl(){var e={content:this._config},t="gl-window-config-"+wr();e=ki(e);try{localStorage.setItem(t,JSON.stringify(e))}catch(i){throw new Error("Error while writing to localStorage "+i.toString())}var r=document.location.href.split("?");return r.length===1?r[0]+"?gl-window="+t:document.location.href+"&gl-window="+t}_positionWindow(){var e,t;(e=this._popoutWindow)===null||e===void 0||e.moveTo(this._dimensions.left,this._dimensions.top),(t=this._popoutWindow)===null||t===void 0||t.focus()}_onInitialised(){var e;this.isInitialised=!0,(e=this.getGlInstance())===null||e===void 0||e.on("popIn",this.popIn,this),this.emit("initialised")}_onClose(){setTimeout(this.emit.bind(this,"closed"),50)}}function we(n,e,t){return(e=Jp(e))in n?Object.defineProperty(n,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):n[e]=t,n}function Jp(n){var e=ef(n,"string");return typeof e=="symbol"?e:e+""}function ef(n,e){if(typeof n!="object"||!n)return n;var t=n[Symbol.toPrimitive];if(t!==void 0){var r=t.call(n,e);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(n)}class an extends He{constructor(e,t,r,i,o,a){var s,l,u,c,m,p,f,v;if(super(),we(this,"_dragListener",void 0),we(this,"_layoutManager",void 0),we(this,"_contentItem",void 0),we(this,"_originalParent",void 0),we(this,"_area",null),we(this,"_lastValidArea",null),we(this,"_minX",void 0),we(this,"_maxX",void 0),we(this,"_minY",void 0),we(this,"_maxY",void 0),we(this,"_width",void 0),we(this,"_height",void 0),we(this,"_sided",void 0),we(this,"element",void 0),we(this,"childElementContainer",void 0),we(this,"_proxyTab",void 0),this._dragListener=r,this._layoutManager=i,this._contentItem=o,this._originalParent=a,this._dragListener.on("drag",this._onDrag,this),this._dragListener.on("dragStop",this._onDrop,this),this._contentItem.tab&&this._contentItem.tab.element){var g,b;this._layoutManager.tabDropPlaceholder.width((g=this._contentItem.tab.element.outerWidth(!0))!==null&&g!==void 0?g:0),this._layoutManager.tabDropPlaceholder.height((b=this._contentItem.tab.element.outerHeight(!0))!==null&&b!==void 0?b:0)}if(this.element=x(an._template),a&&a._side&&(this._sided=a._sided,this.element.addClass("lm_"+a._side),["right","bottom"].indexOf(a._side.toString())>=0&&this.element.find(".lm_content").after(this.element.find(".lm_header"))),this.element.css({left:e,top:t}),this._proxyTab=this.element.find(".lm_tab"),this._proxyTab.attr("title",Ai((s=this._contentItem.config.title)!==null&&s!==void 0?s:"")),this.element.find(".lm_title").text((l=this._contentItem.config.title)!==null&&l!==void 0?l:""),this.childElementContainer=this.element.find(".lm_content"),this.childElementContainer.append(o.element),this._updateTree(),this._layoutManager._$calculateItemAreas(),x(document.body).append(this.element),this._setDimensions(),!this._contentItem.tab&&this._proxyTab.length){var y,C;this._layoutManager.tabDropPlaceholder.width((y=this._proxyTab.outerWidth(!0))!==null&&y!==void 0?y:0),this._layoutManager.tabDropPlaceholder.height((C=this._proxyTab.outerHeight(!0))!==null&&C!==void 0?C:0)}var S=this._layoutManager.container.offset();this._minX=(u=S==null?void 0:S.left)!==null&&u!==void 0?u:0,this._minY=(c=S==null?void 0:S.top)!==null&&c!==void 0?c:0,this._maxX=((m=this._layoutManager.container.width())!==null&&m!==void 0?m:0)+this._minX,this._maxY=((p=this._layoutManager.container.height())!==null&&p!==void 0?p:0)+this._minY,this._width=(f=this.element.width())!==null&&f!==void 0?f:0,this._height=(v=this.element.height())!==null&&v!==void 0?v:0,this._setDropPosition(e,t),this._layoutManager.emit("itemPickedUp",this._contentItem)}_onDrag(e,t,r){var i,o,a=(i=r.pageX)!==null&&i!==void 0?i:0,s=(o=r.pageY)!==null&&o!==void 0?o:0,l=a>this._minX&&a<this._maxX&&s>this._minY&&s<this._maxY;!l&&this._layoutManager.config.settings.constrainDragToContainer===!0||this._setDropPosition(a,s)}_setDropPosition(e,t){this.element.css({left:e,top:t}),this._area=this._layoutManager._$getArea(e,t),this._area!==null&&(this._lastValidArea=this._area,this._area.contentItem._$highlightDropZone(e,t,this._area))}_onDrop(){var e;(e=this._layoutManager.dropTargetIndicator)===null||e===void 0||e.hide(),this._area!==null?this._area.contentItem._$onDrop(this._contentItem,this._area):this._lastValidArea!==null?this._lastValidArea.contentItem._$onDrop(this._contentItem,this._lastValidArea):this._originalParent?this._originalParent.addChild(this._contentItem):this._contentItem._$destroy(),this._dragListener.off("drag",this._onDrag,this),this._dragListener.off("dragStop",this._onDrop,this),this.element.remove(),this._layoutManager.emit("itemDropped",this._contentItem)}_updateTree(){this._contentItem.parent&&this._contentItem.parent.removeChild(this._contentItem,!0),this._contentItem._$setParent(null)}_setDimensions(){var e=this._layoutManager.config.dimensions,t=e.dragProxyWidth,r=e.dragProxyHeight;this.element.width(t),this.element.height(r),t-=this._sided?e.headerHeight:0,r-=this._sided?0:e.headerHeight,this.childElementContainer.width(t),this.childElementContainer.height(r),this._contentItem.element.width(t),this._contentItem.element.height(r),this._contentItem.callDownwards("_$show"),this._contentItem.callDownwards("setSize")}}we(an,"_template",'<div class="lm_dragProxy"><div class="lm_header"><ul class="lm_tabs"><li class="lm_tab lm_active"><i class="lm_left"></i><span class="lm_title"></span><i class="lm_right"></i></li></ul></div><div class="lm_content"></div></div>');function lr(n,e,t){return(e=tf(e))in n?Object.defineProperty(n,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):n[e]=t,n}function tf(n){var e=nf(n,"string");return typeof e=="symbol"?e:e+""}function nf(n,e){if(typeof n!="object"||!n)return n;var t=n[Symbol.toPrimitive];if(t!==void 0){var r=t.call(n,e);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(n)}class Kl{constructor(e,t,r){lr(this,"_element",void 0),lr(this,"_itemConfig",void 0),lr(this,"_layoutManager",void 0),lr(this,"_dragListener",void 0),this._element=e,this._itemConfig=t,this._layoutManager=r,this._dragListener=this._createDragListener()}_createDragListener(){return this._dragListener=new Gn(this._element,this._layoutManager.root,!0),this._dragListener.on("dragStart",this._onDragStart,this),this._dragListener.on("dragStop",this._createDragListener,this),this._dragListener}_onDragStart(e,t){var r=this._itemConfig;typeof r=="function"&&(r=r());var i=this._layoutManager._$normalizeContentItem(x.extend(!0,{},r));new an(e,t,this._dragListener,this._layoutManager,i,null)}}function ur(n,e,t){return(e=rf(e))in n?Object.defineProperty(n,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):n[e]=t,n}function rf(n){var e=of(n,"string");return typeof e=="symbol"?e:e+""}function of(n,e){if(typeof n!="object"||!n)return n;var t=n[Symbol.toPrimitive];if(t!==void 0){var r=t.call(n,e);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(n)}class zl{constructor(e,t,r){ur(this,"_element",x(window)),ur(this,"_itemConfig",void 0),ur(this,"_layoutManager",void 0),ur(this,"_dragListener",void 0),this._itemConfig=e,this._layoutManager=t,this._createDragListener(r)}_createDragListener(e){this._dragListener&&this._dragListener.destroy(),this._element&&this._layoutManager&&(this._dragListener=new Gn(this._element,this._layoutManager.root,!0),this._dragListener.on("dragStart",this._onDragStart,this),this._dragListener.on("dragStop",this._destroy,this),this._dragListener.onMouseDown(e),this._dragListener._startDrag())}_destroy(){this._dragListener=void 0,this._element=void 0,this._itemConfig=void 0,this._layoutManager=void 0}_onDragStart(e,t){if(!(!this._dragListener||!this._layoutManager)){var r=this._itemConfig;typeof r=="function"&&(r=r());var i=this._layoutManager._$normalizeContentItem(x.extend(!0,{},r));new an(e,t,this._dragListener,this._layoutManager,i,null)}}}function Vl(n,e,t){return(e=af(e))in n?Object.defineProperty(n,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):n[e]=t,n}function af(n){var e=sf(n,"string");return typeof e=="symbol"?e:e+""}function sf(n,e){if(typeof n!="object"||!n)return n;var t=n[Symbol.toPrimitive];if(t!==void 0){var r=t.call(n,e);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(n)}class qn{constructor(){Vl(this,"element",x(qn._template)),x(document.body).append(this.element)}destroy(){this.element.remove()}highlightArea(e){this.element.css({left:e.x1,top:e.y1,width:Math.floor(e.x2-e.x1),height:Math.floor(e.y2-e.y1)}).show()}hide(){this.element.hide()}}Vl(qn,"_template",'<div class="lm_dropTargetIndicator"><div class="lm_inner"></div></div>');function Zr(n,e,t){return(e=lf(e))in n?Object.defineProperty(n,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):n[e]=t,n}function lf(n){var e=uf(n,"string");return typeof e=="symbol"?e:e+""}function uf(n,e){if(typeof n!="object"||!n)return n;var t=n[Symbol.toPrimitive];if(t!==void 0){var r=t.call(n,e);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(n)}class An{constructor(e,t,r,i){Zr(this,"element",void 0),Zr(this,"_header",void 0),Zr(this,"_action",void 0),this._header=e,this.element=x('<li class="'+r+'" title="'+t+'"></li>'),this._header.on("destroy",this._$destroy,this),this._action=i,this.element.on("click",this._action),this._header.controlsContainer.append(this.element)}_$destroy(){this.element.off(),this.element.remove()}}function df(n,e,t){return(e=cf(e))in n?Object.defineProperty(n,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):n[e]=t,n}function cf(n){var e=hf(n,"string");return typeof e=="symbol"?e:e+""}function hf(n,e){if(typeof n!="object"||!n)return n;var t=n[Symbol.toPrimitive];if(t!==void 0){var r=t.call(n,e);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(n)}class Jt extends Error{constructor(e,t){super(),df(this,"node",void 0),this.name="Configuration Error",this.message=e,this.node=t}}const mf=Object.freeze(Object.defineProperty({__proto__:null,ConfigurationError:Jt},Symbol.toStringTag,{value:"Module"}));function pf(n,e){return bf(n)||gf(n,e)||vf(n,e)||ff()}function ff(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
9
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Sp(n,e){if(n){if(typeof n=="string")return Qo(n,e);var t={}.toString.call(n).slice(8,-1);return t==="Object"&&n.constructor&&(t=n.constructor.name),t==="Map"||t==="Set"?Array.from(n):t==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?Qo(n,e):void 0}}function Qo(n,e){(e==null||e>n.length)&&(e=n.length);for(var t=0,r=Array(e);t<e;t++)r[t]=n[t];return r}function wp(n,e){var t=n==null?null:typeof Symbol<"u"&&n[Symbol.iterator]||n["@@iterator"];if(t!=null){var r,i,o,a,s=[],l=!0,u=!1;try{if(o=(t=t.call(n)).next,e!==0)for(;!(l=(r=o.call(t)).done)&&(s.push(r.value),s.length!==e);l=!0);}catch(c){u=!0,i=c}finally{try{if(!l&&t.return!=null&&(a=t.return(),Object(a)!==a))return}finally{if(u)throw i}}return s}}function _p(n){if(Array.isArray(n))return n}var Ke=H.module("@deephaven/plugin.PluginUtils");function Sn(n){var e,t,r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"Component";return(e=(t=n.displayName)!==null&&t!==void 0?t:n.name)!==null&&e!==void 0?e:r}function Jo(n,e){return n==null||!Vn(n)?!1:[n.supportedTypes].flat().some(t=>t===e)}function zC(n,e){return n==null||!Ol(n)?!1:[n.dashboardTypes].flat().some(t=>t===e)}function Ep(n){var e=d.jsx(me,{icon:Rs});if(!Vn(n))return e;var t=n.icon;return t==null?e:h.isValidElement(t)?t:d.jsx(me,{icon:t})}function VC(n){var e=[...n.entries()].filter(t=>xl(t[1]));return Ke.debug("Getting theme data from plugins",e),e.map(t=>{var r=Ml(t,2),i=r[0],o=r[1],a=Array.isArray(o.themes)?o.themes:[o.themes];return a.map(s=>{var l=s.name,u=s.baseTheme,c=s.styleContent;return{baseThemeKey:"default-".concat(u??"dark"),themeKey:Ku(i,l),name:l,styleContent:c}})}).flat()}function GC(n){var e=[...n.entries()].filter(t=>Il(t[1])&&t[1].mapping!=null);return Ke.debug("Getting element plugin mapping",e),new Map(e.flatMap(t=>{var r=Ml(t,2),i=r[1];return Object.entries(i.mapping)}))}function Pp(n,e){return e.length===0?(Ke.debug("No middleware to chain for component",Sn(n)),n):(Ke.debug("Chaining component middleware",Sn(n),e.map(t=>t.name)),[...e].reverse().reduce((t,r)=>{var i=r.component,o=[r.supportedTypes].flat();function a(s){var l=s.metadata,u=Lr(s,hp);return(l==null?void 0:l.type)!=null&&!o.includes(l.type)?d.jsx(t,xe(xe({},u),{},{metadata:l})):d.jsx(i,xe(xe({},u),{},{metadata:l,Component:t}))}return a.displayName="".concat(r.name,"(").concat(Sn(t),")"),a},n))}function qC(n,e){var t=e.filter(r=>r.panelComponent!=null);return t.length===0?(Ke.debug("No panel middleware to chain for panel component",Sn(n)),n):(Ke.debug("Chaining panel middleware",Sn(n),t.map(r=>r.name)),[...t].reverse().reduce((r,i)=>{var o=i.panelComponent,a=[i.supportedTypes].flat(),s=j.forwardRef((l,u)=>{var c=l.metadata,m=Lr(l,mp),p=u!=null?{ref:u}:{};return(c==null?void 0:c.type)!=null&&!a.includes(c.type)?d.jsx(r,xe(xe(xe({},p),m),{},{metadata:c})):d.jsx(o,xe(xe(xe({},p),m),{},{metadata:c,Component:r}))});return s.displayName="".concat(i.name,"Panel(").concat(Sn(r,"Panel"),")"),s},n))}function XC(n){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"PanelMiddleware",t=j.forwardRef((r,i)=>{var o=r.Component,a=Lr(r,pp),s=n(a),l=s.inject,u=s.wrap,c=o,m=d.jsx(c,xe(xe({ref:i},a),l));return u!=null?u(m):m});return t.displayName=e,t}function ZC(n){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"WidgetMiddleware";function t(r){var i=r.Component,o=Lr(r,fp),a=n(o),s=a.inject,l=a.wrap,u=i,c=d.jsx(u,xe(xe({},o),s));return l!=null?l(c):c}return t.displayName=e,t}function Tp(n){return typeof n=="object"&&n!=null&&n.default!=null&&typeof n.default=="object"}function Op(n){return fi(n)?n:Tp(n)&&fi(n.default)?n.default:lp(n)?n:null}function ea(n,e,t,r){if(n.has(e)){Ke.warn("Plugin '".concat(e,"' is already registered. Skipping duplicate."));return}n.set(e,xe(xe({},t),{},{version:r}))}function YC(n,e,t,r,i,o){i!=null&&(e[i]=t,Ke.debug("Registered plugin '".concat(i,"' in module resolve map")));var a=Op(t);if(a==null){Ke.error("Plugin '".concat(r,"' is missing an exported value."));return}Dl(a)?(Ke.debug("MultiPlugin '".concat(r,"' contains ").concat(a.plugins.length," plugins")),a.plugins.forEach(s=>{if(!fi(s)){Ke.warn("Skipping invalid inner plugin from MultiPlugin '".concat(r,"'"),s);return}var l=typeof s.name=="string"?s.name.trim():"";if(l.length===0){Ke.warn("Skipping unnamed inner plugin from MultiPlugin '".concat(r,"'"),s);return}ea(n,l,s,o)})):ea(n,r,a,o)}function QC(n){var e=new Map;n.forEach(s=>{var l;((l=s.loader)===null||l===void 0?void 0:l.package)!=null&&e.set(s.loader.package,s)});var t=new Map;n.forEach(s=>{var l,u=new Set;((l=s.loader)===null||l===void 0?void 0:l.dependencies)!=null&&s.loader.dependencies.forEach(c=>{var m=e.get(c);m!=null?u.add(m):Ke.warn("Plugin '".concat(s.name,"' depends on '").concat(c,"' which is not in the manifest"))}),t.set(s,u)});for(var r=[],i=new Set(n),o=new Set,a=function(){var l=[];if(i.forEach(c=>{var m=t.get(c);if(m==null||m.size===0){l.push(c);return}var p=!0;m.forEach(f=>{o.has(f)||(p=!1)}),p&&l.push(c)}),l.length===0){var u=[...i].map(c=>c.name);return Ke.error("Circular plugin dependency detected among: ".concat(u.join(", "),". Loading remaining plugins together.")),r.push([...i]),1}r.push(l),l.forEach(c=>{i.delete(c),o.add(c)})};i.size>0&&!a(););return r}function xp(n,e){var t;return(t=[...n.values()].find(r=>Ol(r)&&[r.dashboardTypes].flat().some(i=>i===e)))!==null&&t!==void 0?t:null}function Ip(){return zn(Tl,"No Plugins available in usePlugins. This can happen when plugins have not finished loading or if code is not wrapped in PluginsContext.Provider.")}var ta=H.module("@deephaven/plugin.WidgetView");function JC(n){var e=n.fetch,t=n.type,r=Ip(),i=h.useMemo(()=>{var l,u=[];return r.forEach(c=>{if(!(!Vn(c)&&!pi(c))){var m=[c.supportedTypes].flat().includes(t);m&&(pi(c)?u.push(c):(l!=null&&ta.warn("Multiple base plugins for type ".concat(t,". Replacing ").concat(l.name," with ").concat(c.name)),l=c))}}),{basePlugin:l,middleware:u}},[r,t]),o=i.basePlugin,a=i.middleware,s=h.useMemo(()=>o==null?(ta.debug("No base plugin found for widget type ".concat(t)),null):Pp(o.component,a),[o,a,t]);if(s!=null)return d.jsx(s,{fetch:e});throw new Error("Unknown widget type '".concat(t,"'"))}var jl=Object.freeze({openPopouts:[],settings:{hasHeaders:!0,constrainDragToContainer:!0,reorderEnabled:!0,selectionEnabled:!1,popoutWholeStack:!1,blockedPopoutsThrowError:!0,closePopoutsOnUnload:!0,showPopoutIcon:!0,showMaximiseIcon:!0,showCloseIcon:!0,responsiveMode:"onload",tabOverlapAllowance:0,tabControlOffset:10},dimensions:{borderWidth:5,borderGrabWidth:10,minItemHeight:10,minItemWidth:10,headerHeight:20,dragProxyWidth:300,dragProxyHeight:200},labels:{close:"Close",maximise:"Maximize",minimise:"Minimize",popout:"Open in new window",popin:"Pop in",tabDropdown:"Additional tabs",tabNextLabel:"Next",tabPreviousLabel:"Previous"},content:[]});function Al(n){return n.componentName!==void 0}function Dp(n){return n.component!==void 0}var kl=Object.freeze({type:"default",isClosable:!0,isFocusOnShow:!0,reorderEnabled:!0,title:""});const Mp=Object.freeze(Object.defineProperty({__proto__:null,defaultConfig:jl,isGLComponentConfig:Al,isReactComponentConfig:Dp,itemDefaultConfig:kl},Symbol.toStringTag,{value:"Module"}));function yr(n,e,t){return(e=jp(e))in n?Object.defineProperty(n,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):n[e]=t,n}function jp(n){var e=Ap(n,"string");return typeof e=="symbol"?e:e+""}function Ap(n,e){if(typeof n!="object"||!n)return n;var t=n[Symbol.toPrimitive];if(t!==void 0){var r=t.call(n,e);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(n)}class He{constructor(){yr(this,"_mSubscriptions",void 0),yr(this,"off",this.unbind),yr(this,"trigger",this.emit),this._mSubscriptions={},this._mSubscriptions[He.ALL_EVENT]=[]}on(e,t,r){if(typeof t!="function")throw new Error("Tried to listen to event "+e+" with non-function callback "+t);this._mSubscriptions[e]||(this._mSubscriptions[e]=[]),this._mSubscriptions[e].push({fn:t,ctx:r})}emit(e){for(var t=this._mSubscriptions[e],r=arguments.length,i=new Array(r>1?r-1:0),o=1;o<r;o++)i[o-1]=arguments[o];if(t)for(var a=0;a<t.length;a++){var s=t[a].ctx||{};try{t[a].fn.apply(s,i)}catch(m){console.error("Error while emitting event:",m)}}i.unshift(e);for(var l=this._mSubscriptions[He.ALL_EVENT],u=0;u<l.length;u++){var c=l[u].ctx||{};try{l[u].fn.apply(c,i)}catch(m){console.error("Error while emitting event to allEventSubs:",m)}}}unbind(e,t,r){if(!this._mSubscriptions[e])throw new Error("No subscriptions to unsubscribe for event "+e);for(var i=!1,o=0;o<this._mSubscriptions[e].length;o++)(!t||this._mSubscriptions[e][o].fn===t)&&(!r||r===this._mSubscriptions[e][o].ctx)&&(this._mSubscriptions[e].splice(o,1),i=!0);if(i===!1)throw new Error("Nothing to unbind for "+e)}}yr(He,"ALL_EVENT","__all");function at(n,e,t){return(e=kp(e))in n?Object.defineProperty(n,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):n[e]=t,n}function kp(n){var e=Np(n,"string");return typeof e=="symbol"?e:e+""}function Np(n,e){if(typeof n!="object"||!n)return n;var t=n[Symbol.toPrimitive];if(t!==void 0){var r=t.call(n,e);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(n)}class vi extends He{constructor(e,t,r){super(),at(this,"width",void 0),at(this,"height",void 0),at(this,"title",void 0),at(this,"parent",void 0),at(this,"layoutManager",void 0),at(this,"tab",void 0),at(this,"_config",void 0),at(this,"isHidden",!1),at(this,"beforeCloseHandler",void 0),at(this,"_element",x(['<div class="lm_item_container">','<div class="lm_content" tabindex="-1"></div>',"</div>"].join(""))),at(this,"_contentElement",void 0),this.title=Al(e)?e.componentName:"",this.parent=t,this.layoutManager=r,this._config=e,this._contentElement=this._element.find(".lm_content"),this.beforeCloseHandler=null}getElement(){return this._contentElement}hide(){this.emit("hide"),this.isHidden=!0,this._element.hide()}show(){this.emit("show"),this.isHidden=!1,this._element.show(),(this.height!=0||this.width!=0)&&this.emit("shown")}setSize(e,t){for(var r,i,o,a=this.parent,s=null;a&&!a.isColumn&&!a.isRow;){var l;if(s=a,a=a.parent,(l=a)!==null&&l!==void 0&&l.isRoot)return!1}if(!a||!s)return!1;for(var u=a.isColumn?"height":"width",c=u==="height"?t:e,m=((r=this[u])!==null&&r!==void 0?r:0)*(1/(((i=s.config[u])!==null&&i!==void 0?i:0)/100)),p=c/m*100,f=(((o=s.config[u])!==null&&o!==void 0?o:0)-p)/(a.contentItems.length-1),v=0;v<a.contentItems.length;v++)if(a.contentItems[v]===s)a.contentItems[v].config[u]=p;else{var g;a.contentItems[v].config[u]=((g=a.contentItems[v].config[u])!==null&&g!==void 0?g:0)+f}return a.callDownwards("setSize"),!0}close(e){var t,r;this._config.isClosable&&(!((t=(r=this.beforeCloseHandler)===null||r===void 0?void 0:r.call(this,e))!==null&&t!==void 0)||t)&&(this.emit("close"),this.parent.close())}beforeClose(e){this.beforeCloseHandler=e}getState(){return this._config.componentState}getConfig(){return this._config}setState(e){this._config.componentState=e,this.parent.emitBubblingEvent("stateChanged")}setPersistedState(e){this._config.persistedState=e,this.parent.emitBubblingEvent("stateChanged")}setTitle(e){this.parent.setTitle(e)}_$setSize(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;if(e!==this.width||t!==this.height){this.width=e,this.height=t;var r=this._contentElement[0],i=r.offsetWidth-r.clientWidth,o=r.offsetHeight-r.clientHeight;this._contentElement.width(this.width-i).height(this.height-o),this.emit("resize")}}}const Lp=Object.freeze(Object.defineProperty({__proto__:null,Container:vi,ItemContainer:vi},Symbol.toStringTag,{value:"Module"}));function Nl(n){var e=location.hash.match(new RegExp(n+"=([^&]*)"));return e?e[1]:null}function Ll(n){if(window.location.hash)return Nl(n);if(!window.location.search)return null;var e=window.location.search.substr(1).split("&"),t={},r,i;for(i=0;i<e.length;i++)r=e[i].split("="),t[r[0]]=r[1];return t[n]||null}function ji(n){return window.requestAnimationFrame(n)}function Rp(n,e){var t=e.indexOf(n);if(t===-1)throw new Error("Can't remove item from array. Item is not in the array");e.splice(t,1)}function wr(){return Pt()}function $p(n,e){var t=n.replace(/javascript/gi,"javascript").replace(/expression/gi,"expression").replace(/onload/gi,"onload").replace(/script/gi,"script").replace(/onerror/gi,"onerror");return e===!0?t:t.replace(/>/g,">").replace(/</g,"<")}function Ai(n){return x.trim(n.replace(/(<([^>]+)>)/gi,""))}function Ue(n,e,t){return(e=Fp(e))in n?Object.defineProperty(n,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):n[e]=t,n}function Fp(n){var e=Hp(n,"string");return typeof e=="symbol"?e:e+""}function Hp(n,e){if(typeof n!="object"||!n)return n;var t=n[Symbol.toPrimitive];if(t!==void 0){var r=t.call(n,e);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(n)}class Gn extends He{constructor(e,t){var r,i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;super(),Ue(this,"_eElement",void 0),Ue(this,"_oDocument",void 0),Ue(this,"_eBody",void 0),Ue(this,"_root",void 0),Ue(this,"_destroyAfterMouseUp",void 0),Ue(this,"_nDelay",400),Ue(this,"_timeout",void 0),Ue(this,"timeout",void 0),Ue(this,"_nDistance",10),Ue(this,"_nX",0),Ue(this,"_nY",0),Ue(this,"_nOriginalX",0),Ue(this,"_nOriginalY",0),Ue(this,"_bDragging",!1),this._eElement=e,this._oDocument=x(document),this._eBody=x(document.body),this._root=t,this._destroyAfterMouseUp=i,this.onMouseMove=this.onMouseMove.bind(this),this.onMouseUp=this.onMouseUp.bind(this),this.onMouseDown=this.onMouseDown.bind(this),this._startDrag=this._startDrag.bind(this),(r=this._eElement)===null||r===void 0||r.on("mousedown",this.onMouseDown)}destroy(){var e,t;(e=this._eElement)===null||e===void 0||e.unbind("mousedown",this.onMouseDown),(t=this._oDocument)===null||t===void 0||t.unbind("mouseup",this.onMouseUp),this._eElement=void 0,this._oDocument=void 0,this._eBody=void 0,clearTimeout(this._timeout),this._timeout=void 0}onMouseDown(e){if(e.preventDefault(),e.button===0){var t,r,i,o,a=this._getCoordinates(e);this._nOriginalX=(t=a.x)!==null&&t!==void 0?t:0,this._nOriginalY=(r=a.y)!==null&&r!==void 0?r:0,(i=this._oDocument)===null||i===void 0||i.on("mousemove",this.onMouseMove),(o=this._oDocument)===null||o===void 0||o.on("mouseup",this.onMouseUp),this._timeout=window.setTimeout(this._startDrag,this._nDelay)}}onMouseMove(e){if(this._timeout!=null){var t,r;e.preventDefault();var i=this._getCoordinates(e);this._nX=((t=i.x)!==null&&t!==void 0?t:0)-this._nOriginalX,this._nY=((r=i.y)!==null&&r!==void 0?r:0)-this._nOriginalY,this._bDragging===!1&&(Math.abs(this._nX)>this._nDistance||Math.abs(this._nY)>this._nDistance)&&this._startDrag(),this._bDragging&&this.emit("drag",this._nX,this._nY,e)}}onMouseUp(e){if(this._timeout!=null){var t,r,i,o,a;if(clearTimeout(this._timeout),(t=this._oDocument)===null||t===void 0||t.unbind("mousemove",this.onMouseMove),(r=this._oDocument)===null||r===void 0||r.unbind("mouseup",this.onMouseUp),(i=this._oDocument)===null||i===void 0||(i=i.find("iframe"))===null||i===void 0||i.css("pointer-events",""),this._bDragging===!0&&(this._bDragging=!1,this.emit("dragStop",e,this._nOriginalX+this._nX)),(o=this._eBody)===null||o===void 0||o.removeClass("lm_dragging"),(a=this._root)===null||a===void 0||a.childElementContainer.removeClass("lm_dragging"),!(this._eElement instanceof Window)){var s;(s=this._eElement)===null||s===void 0||s.removeClass("lm_dragging")}this._destroyAfterMouseUp&&this.destroy()}}_startDrag(){var e,t,r,i;window.clearTimeout(this._timeout),this._bDragging=!0,(e=this._eBody)===null||e===void 0||e.addClass("lm_dragging"),(t=this._eElement)===null||t===void 0||t.addClass("lm_dragging"),(r=this._root)===null||r===void 0||r.childElementContainer.addClass("lm_dragging"),(i=this._oDocument)===null||i===void 0||(i=i.find("iframe"))===null||i===void 0||i.css("pointer-events","none"),this.emit("dragStart",this._nOriginalX,this._nOriginalY)}_getCoordinates(e){var t,r;return{x:(t=e.pageX)!==null&&t!==void 0?t:0,y:(r=e.pageY)!==null&&r!==void 0?r:0}}}function dn(n,e,t){return(e=Up(e))in n?Object.defineProperty(n,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):n[e]=t,n}function Up(n){var e=Bp(n,"string");return typeof e=="symbol"?e:e+""}function Bp(n,e){if(typeof n!="object"||!n)return n;var t=n[Symbol.toPrimitive];if(t!==void 0){var r=t.call(n,e);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(n)}class Rl{constructor(e,t){dn(this,"_container",void 0),dn(this,"_reactComponent",null),dn(this,"_portalComponent",null),dn(this,"_originalComponentWillUpdate",void 0),dn(this,"_initialState",void 0),dn(this,"_reactClass",void 0),this._reactComponent=null,this._portalComponent=null,this._originalComponentWillUpdate=void 0,this._container=e,this._initialState=t,this._reactClass=this._getReactClass(),this._container.on("open",this._render,this),this._container.on("destroy",this._destroy,this)}_key(){var e=this._container._config.id;if(!e)throw new Error("Cannot mount panel without id");return Array.isArray(e)?e.join(","):e}_render(){var e=this._key();this._portalComponent=Oi.createPortal(this._getReactComponent(),this._container.getElement()[0],e),this._container.layoutManager.addReactChild(e,this._portalComponent)}_gotReactComponent(e){if(e&&(this._reactComponent=e,this._reactComponent instanceof h.Component)){this._originalComponentWillUpdate=this._reactComponent.componentWillUpdate,this._reactComponent.componentWillUpdate=this._onUpdate.bind(this);var t=this._container.getState();t&&this._reactComponent.setState(t)}}_destroy(){this._container.layoutManager.removeReactChild(this._key(),this._portalComponent),this._container.off("open",this._render,this),this._container.off("destroy",this._destroy,this)}_onUpdate(e,t){var r;this._container.setState(t),(r=this._originalComponentWillUpdate)===null||r===void 0||r.call(this._reactComponent,e,t,void 0)}_getReactClass(){var e=this._container._config.component;if(!e)throw new Error("No react component name. type: react-component needs a field `component`");var t=this._container.layoutManager.getComponent(e)||this._container.layoutManager.getFallbackComponent();if(!t)throw new Error('React component "'+e+'" not found. Please register all components with GoldenLayout using `registerComponent(name, component)`');return t}_getReactComponent(){var e={glEventHub:this._container.layoutManager.eventHub,glContainer:this._container,ref:this._gotReactComponent.bind(this)},t=x.extend(e,this._container._config.props);return j.createElement(this._reactClass,t)}}var _r=["settings","hasHeaders","constrainDragToContainer","selectionEnabled","dimensions","borderWidth","minItemHeight","minItemWidth","headerHeight","dragProxyWidth","dragProxyHeight","labels","close","maximise","minimise","popout","content","componentName","componentState","id","width","type","height","isClosable","title","popoutWholeStack","openPopouts","parentId","activeItemIndex","reorderEnabled","borderGrabWidth"],Wp=[!0,!1,"row","column","stack","component","close","maximise","minimise","open in new window"];function ki(n){if(_r.length>36)throw new Error("Too many keys in config minifier map");var e={};return Ni(n,e,"_min"),e}function gi(n){if(_r.length>36)throw new Error("Too many keys in config minifier map");var e={};return Ni(n,e,"_max"),e}function Ni(n,e,t){var r=t==="_min"?Kp:zp;for(var i in n)if(n.hasOwnProperty(i)){var o=Array.isArray(n)?n[Number.parseInt(i,10)]:n[i];if(typeof o=="object"&&o!=null){var a=o instanceof Array?[]:{};if(Array.isArray(e))e[Number.parseInt(i,10)]=a;else{var s=r(i,_r);e[s]=a}Ni(o,a,t)}else{var l=r(o,Wp);if(Array.isArray(e))e[Number.parseInt(i,10)]=l;else{var u=r(i,_r);e[u]=l}}}}function Kp(n,e){if(typeof n=="string"&&n.length===1)return"___"+n;var t=e.indexOf(n);return t===-1?n:t.toString(36)}function zp(n,e){return typeof n=="string"&&n.length===1?e[parseInt(n,36)]:typeof n=="string"&&n.substr(0,3)==="___"?n[3]:n}function Xr(n,e,t){return(e=Vp(e))in n?Object.defineProperty(n,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):n[e]=t,n}function Vp(n){var e=Gp(n,"string");return typeof e=="symbol"?e:e+""}function Gp(n,e){if(typeof n!="object"||!n)return n;var t=n[Symbol.toPrimitive];if(t!==void 0){var r=t.call(n,e);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(n)}class bi{constructor(e,t){Xr(this,"name",void 0),Xr(this,"origin",void 0),Xr(this,"isPropagationStopped",void 0),this.name=e,this.origin=t,this.isPropagationStopped=!1}stopPropagation(){this.isPropagationStopped=!0}}function sr(n,e,t){return(e=qp(e))in n?Object.defineProperty(n,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):n[e]=t,n}function qp(n){var e=Xp(n,"string");return typeof e=="symbol"?e:e+""}function Xp(n,e){if(typeof n!="object"||!n)return n;var t=n[Symbol.toPrimitive];if(t!==void 0){var r=t.call(n,e);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(n)}let $l=class extends He{constructor(e){super(),sr(this,"_layoutManager",void 0),sr(this,"_dontPropagateToParent",void 0),sr(this,"_childEventSource",void 0),sr(this,"_boundOnEventFromChild",void 0),this._layoutManager=e,this._dontPropagateToParent=null,this._childEventSource=null,this.on(He.ALL_EVENT,this._onEventFromThis.bind(this)),this._boundOnEventFromChild=this._onEventFromChild.bind(this),x(window).on("gl_child_event",this._boundOnEventFromChild)}_onEventFromThis(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];this._layoutManager.isSubWindow&&t[0]!==this._dontPropagateToParent&&this._propagateToParent(t),this._propagateToChildren(t),this._dontPropagateToParent=null,this._childEventSource=null}_$onEventFromParent(e){this._dontPropagateToParent=e[0],this.emit.apply(this,e)}_onEventFromChild(e){this._childEventSource=e.originalEvent.__gl,this.emit.apply(this,e.originalEvent.__glArgs)}_propagateToParent(e){var t,r="gl_child_event",i=(t=window.opener)===null||t===void 0?void 0:t.document.createEvent("HTMLEvents");i.initEvent(r,!0,!0),i.eventName=r,i.__glArgs=e,i.__gl=this._layoutManager,window.opener.dispatchEvent(i)}_propagateToChildren(e){for(var t=0;t<this._layoutManager.openPopouts.length;t++){var r=this._layoutManager.openPopouts[t].getGlInstance();r&&r!==this._childEventSource&&r.eventHub._$onEventFromParent(e)}}destroy(){x(window).off("gl_child_event",this._boundOnEventFromChild)}};function Fl(n,e,t){return n.on(e,t),()=>{n.off(e,t)}}function Hl(n){return(e,t)=>Fl(e,n,t)}function Ul(n){return function(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),i=1;i<t;i++)r[i-1]=arguments[i];e.emit(n,...r)}}function Bl(n){return(e,t)=>{var r=h.useRef(null),i=h.useRef(()=>!1);if(r.current!=e||i.current!=t){var o;(o=r.current)===null||o===void 0||o.off(n,i.current),e==null||e.on(n,t)}r.current=e,i.current=t,h.useEffect(()=>()=>{var a;return(a=r.current)===null||a===void 0?void 0:a.off(n,i.current)},[])}}function mt(n){return{listen:Hl(n),emit:Ul(n),useListener:Bl(n)}}const Zp=Object.freeze(Object.defineProperty({__proto__:null,BubblingEvent:bi,DragListener:Gn,EventEmitter:He,EventHub:$l,ReactComponentHandler:Rl,animFrame:ji,filterXss:$p,getHashValue:Nl,getQueryStringParam:Ll,getUniqueId:wr,listenForEvent:Fl,makeEmitFunction:Ul,makeEventFunctions:mt,makeListenFunction:Hl,makeUseListenerFunction:Bl,minifyConfig:ki,removeFromArray:Rp,stripTags:Ai,unminifyConfig:gi},Symbol.toStringTag,{value:"Module"}));function jt(n,e,t){return(e=Yp(e))in n?Object.defineProperty(n,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):n[e]=t,n}function Yp(n){var e=Qp(n,"string");return typeof e=="symbol"?e:e+""}function Qp(n,e){if(typeof n!="object"||!n)return n;var t=n[Symbol.toPrimitive];if(t!==void 0){var r=t.call(n,e);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(n)}class Wl extends He{constructor(e,t,r,i,o){super(),jt(this,"isInitialised",!1),jt(this,"_config",void 0),jt(this,"_dimensions",void 0),jt(this,"_parentId",void 0),jt(this,"_indexInParent",void 0),jt(this,"_layoutManager",void 0),jt(this,"_popoutWindow",null),jt(this,"_id",null),this._config=e,this._dimensions=t,this._parentId=r,this._indexInParent=i,this._layoutManager=o,this._createWindow()}toConfig(){var e,t,r,i,o,a,s,l,u,c,m;if(this.isInitialised===!1)throw new Error("Can't create config, layout not yet initialised");return{dimensions:{width:(e=this.getGlInstance())===null||e===void 0?void 0:e.width,height:(t=this.getGlInstance())===null||t===void 0?void 0:t.height,left:(r=(i=(o=this._popoutWindow)===null||o===void 0?void 0:o.screenX)!==null&&i!==void 0?i:(a=this._popoutWindow)===null||a===void 0?void 0:a.screenLeft)!==null&&r!==void 0?r:0,top:(s=(l=(u=this._popoutWindow)===null||u===void 0?void 0:u.screenY)!==null&&l!==void 0?l:(c=this._popoutWindow)===null||c===void 0?void 0:c.screenTop)!==null&&s!==void 0?s:0},content:(m=this.getGlInstance())===null||m===void 0?void 0:m.toConfig().content,parentId:this._parentId,indexInParent:this._indexInParent}}getGlInstance(){var e;return(e=this._popoutWindow)===null||e===void 0?void 0:e.__glInstance}getWindow(){return this._popoutWindow}close(){if(this.getGlInstance()){var e;(e=this.getGlInstance())===null||e===void 0||e._$closeWindow()}else try{var t;(t=this.getWindow())===null||t===void 0||t.close()}catch{}}popIn(){var e;this._indexInParent;var t=null,r=null;if(this._parentId){var i;if(t=x.extend(!0,{},(i=this.getGlInstance())===null||i===void 0?void 0:i.toConfig()).content[0],r=this._layoutManager.root.getItemsById(this._parentId)[0],!r){var o;((o=this._layoutManager.root.contentItems.length)!==null&&o!==void 0?o:0)>0?r=this._layoutManager.root.contentItems[0]:r=this._layoutManager.root}}t&&((e=r)===null||e===void 0||e.addChild(t,this._indexInParent),this.close())}_createWindow(){var e=this._createUrl(),t=Math.floor(Math.random()*1e6).toString(36),r=this._serializeWindowOptions({width:this._dimensions.width,height:this._dimensions.height,innerWidth:this._dimensions.width,innerHeight:this._dimensions.height,menubar:"no",toolbar:"no",location:"no",personalbar:"no",resizable:"yes",scrollbars:"no",status:"no"});if(this._popoutWindow=window.open(e,t,r),!this._popoutWindow)if(this._layoutManager.config.settings.blockedPopoutsThrowError===!0){var i=new Error("Popout blocked");throw i.type="popoutBlocked",i}else return;x(this._popoutWindow).on("load",this._positionWindow.bind(this)).on("unload beforeunload",this._onClose.bind(this));var o=window.setInterval(()=>{var a;(a=this._popoutWindow)!==null&&a!==void 0&&a.__glInstance&&this._popoutWindow.__glInstance.isInitialised&&(this._onInitialised(),window.clearInterval(o))},10)}_serializeWindowOptions(e){var t=[],r;for(r in e)t.push(r+"="+e[r]);return t.join(",")}_createUrl(){var e={content:this._config},t="gl-window-config-"+wr();e=ki(e);try{localStorage.setItem(t,JSON.stringify(e))}catch(i){throw new Error("Error while writing to localStorage "+i.toString())}var r=document.location.href.split("?");return r.length===1?r[0]+"?gl-window="+t:document.location.href+"&gl-window="+t}_positionWindow(){var e,t;(e=this._popoutWindow)===null||e===void 0||e.moveTo(this._dimensions.left,this._dimensions.top),(t=this._popoutWindow)===null||t===void 0||t.focus()}_onInitialised(){var e;this.isInitialised=!0,(e=this.getGlInstance())===null||e===void 0||e.on("popIn",this.popIn,this),this.emit("initialised")}_onClose(){setTimeout(this.emit.bind(this,"closed"),50)}}function we(n,e,t){return(e=Jp(e))in n?Object.defineProperty(n,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):n[e]=t,n}function Jp(n){var e=ef(n,"string");return typeof e=="symbol"?e:e+""}function ef(n,e){if(typeof n!="object"||!n)return n;var t=n[Symbol.toPrimitive];if(t!==void 0){var r=t.call(n,e);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(n)}class an extends He{constructor(e,t,r,i,o,a){var s,l,u,c,m,p,f,v;if(super(),we(this,"_dragListener",void 0),we(this,"_layoutManager",void 0),we(this,"_contentItem",void 0),we(this,"_originalParent",void 0),we(this,"_area",null),we(this,"_lastValidArea",null),we(this,"_minX",void 0),we(this,"_maxX",void 0),we(this,"_minY",void 0),we(this,"_maxY",void 0),we(this,"_width",void 0),we(this,"_height",void 0),we(this,"_sided",void 0),we(this,"element",void 0),we(this,"childElementContainer",void 0),we(this,"_proxyTab",void 0),this._dragListener=r,this._layoutManager=i,this._contentItem=o,this._originalParent=a,this._dragListener.on("drag",this._onDrag,this),this._dragListener.on("dragStop",this._onDrop,this),this._contentItem.tab&&this._contentItem.tab.element){var g,b;this._layoutManager.tabDropPlaceholder.width((g=this._contentItem.tab.element.outerWidth(!0))!==null&&g!==void 0?g:0),this._layoutManager.tabDropPlaceholder.height((b=this._contentItem.tab.element.outerHeight(!0))!==null&&b!==void 0?b:0)}if(this.element=x(an._template),a&&a._side&&(this._sided=a._sided,this.element.addClass("lm_"+a._side),["right","bottom"].indexOf(a._side.toString())>=0&&this.element.find(".lm_content").after(this.element.find(".lm_header"))),this.element.css({left:e,top:t}),this._proxyTab=this.element.find(".lm_tab"),this._proxyTab.attr("title",Ai((s=this._contentItem.config.title)!==null&&s!==void 0?s:"")),this.element.find(".lm_title").text((l=this._contentItem.config.title)!==null&&l!==void 0?l:""),this.childElementContainer=this.element.find(".lm_content"),this.childElementContainer.append(o.element),this._updateTree(),this._layoutManager._$calculateItemAreas(),x(document.body).append(this.element),this._setDimensions(),!this._contentItem.tab&&this._proxyTab.length){var y,C;this._layoutManager.tabDropPlaceholder.width((y=this._proxyTab.outerWidth(!0))!==null&&y!==void 0?y:0),this._layoutManager.tabDropPlaceholder.height((C=this._proxyTab.outerHeight(!0))!==null&&C!==void 0?C:0)}var S=this._layoutManager.container.offset();this._minX=(u=S==null?void 0:S.left)!==null&&u!==void 0?u:0,this._minY=(c=S==null?void 0:S.top)!==null&&c!==void 0?c:0,this._maxX=((m=this._layoutManager.container.width())!==null&&m!==void 0?m:0)+this._minX,this._maxY=((p=this._layoutManager.container.height())!==null&&p!==void 0?p:0)+this._minY,this._width=(f=this.element.width())!==null&&f!==void 0?f:0,this._height=(v=this.element.height())!==null&&v!==void 0?v:0,this._setDropPosition(e,t),this._layoutManager.emit("itemPickedUp",this._contentItem)}_onDrag(e,t,r){var i,o,a=(i=r.pageX)!==null&&i!==void 0?i:0,s=(o=r.pageY)!==null&&o!==void 0?o:0,l=a>this._minX&&a<this._maxX&&s>this._minY&&s<this._maxY;!l&&this._layoutManager.config.settings.constrainDragToContainer===!0||this._setDropPosition(a,s)}_setDropPosition(e,t){this.element.css({left:e,top:t}),this._area=this._layoutManager._$getArea(e,t),this._area!==null&&(this._lastValidArea=this._area,this._area.contentItem._$highlightDropZone(e,t,this._area))}_onDrop(){var e;(e=this._layoutManager.dropTargetIndicator)===null||e===void 0||e.hide(),this._area!==null?this._area.contentItem._$onDrop(this._contentItem,this._area):this._lastValidArea!==null?this._lastValidArea.contentItem._$onDrop(this._contentItem,this._lastValidArea):this._originalParent?this._originalParent.addChild(this._contentItem):this._contentItem._$destroy(),this._dragListener.off("drag",this._onDrag,this),this._dragListener.off("dragStop",this._onDrop,this),this.element.remove(),this._layoutManager.emit("itemDropped",this._contentItem)}_updateTree(){this._contentItem.parent&&this._contentItem.parent.removeChild(this._contentItem,!0),this._contentItem._$setParent(null)}_setDimensions(){var e=this._layoutManager.config.dimensions,t=e.dragProxyWidth,r=e.dragProxyHeight;this.element.width(t),this.element.height(r),t-=this._sided?e.headerHeight:0,r-=this._sided?0:e.headerHeight,this.childElementContainer.width(t),this.childElementContainer.height(r),this._contentItem.element.width(t),this._contentItem.element.height(r),this._contentItem.callDownwards("_$show"),this._contentItem.callDownwards("setSize")}}we(an,"_template",'<div class="lm_dragProxy"><div class="lm_header"><ul class="lm_tabs"><li class="lm_tab lm_active"><i class="lm_left"></i><span class="lm_title"></span><i class="lm_right"></i></li></ul></div><div class="lm_content"></div></div>');function lr(n,e,t){return(e=tf(e))in n?Object.defineProperty(n,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):n[e]=t,n}function tf(n){var e=nf(n,"string");return typeof e=="symbol"?e:e+""}function nf(n,e){if(typeof n!="object"||!n)return n;var t=n[Symbol.toPrimitive];if(t!==void 0){var r=t.call(n,e);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(n)}class Kl{constructor(e,t,r){lr(this,"_element",void 0),lr(this,"_itemConfig",void 0),lr(this,"_layoutManager",void 0),lr(this,"_dragListener",void 0),this._element=e,this._itemConfig=t,this._layoutManager=r,this._dragListener=this._createDragListener()}_createDragListener(){return this._dragListener=new Gn(this._element,this._layoutManager.root,!0),this._dragListener.on("dragStart",this._onDragStart,this),this._dragListener.on("dragStop",this._createDragListener,this),this._dragListener}_onDragStart(e,t){var r=this._itemConfig;typeof r=="function"&&(r=r());var i=this._layoutManager._$normalizeContentItem(x.extend(!0,{},r));new an(e,t,this._dragListener,this._layoutManager,i,null)}}function ur(n,e,t){return(e=rf(e))in n?Object.defineProperty(n,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):n[e]=t,n}function rf(n){var e=of(n,"string");return typeof e=="symbol"?e:e+""}function of(n,e){if(typeof n!="object"||!n)return n;var t=n[Symbol.toPrimitive];if(t!==void 0){var r=t.call(n,e);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(n)}class zl{constructor(e,t,r){ur(this,"_element",x(window)),ur(this,"_itemConfig",void 0),ur(this,"_layoutManager",void 0),ur(this,"_dragListener",void 0),this._itemConfig=e,this._layoutManager=t,this._createDragListener(r)}_createDragListener(e){this._dragListener&&this._dragListener.destroy(),this._element&&this._layoutManager&&(this._dragListener=new Gn(this._element,this._layoutManager.root,!0),this._dragListener.on("dragStart",this._onDragStart,this),this._dragListener.on("dragStop",this._destroy,this),this._dragListener.onMouseDown(e),this._dragListener._startDrag())}_destroy(){this._dragListener=void 0,this._element=void 0,this._itemConfig=void 0,this._layoutManager=void 0}_onDragStart(e,t){if(!(!this._dragListener||!this._layoutManager)){var r=this._itemConfig;typeof r=="function"&&(r=r());var i=this._layoutManager._$normalizeContentItem(x.extend(!0,{},r));new an(e,t,this._dragListener,this._layoutManager,i,null)}}}function Vl(n,e,t){return(e=af(e))in n?Object.defineProperty(n,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):n[e]=t,n}function af(n){var e=sf(n,"string");return typeof e=="symbol"?e:e+""}function sf(n,e){if(typeof n!="object"||!n)return n;var t=n[Symbol.toPrimitive];if(t!==void 0){var r=t.call(n,e);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(n)}class qn{constructor(){Vl(this,"element",x(qn._template)),x(document.body).append(this.element)}destroy(){this.element.remove()}highlightArea(e){this.element.css({left:e.x1,top:e.y1,width:Math.floor(e.x2-e.x1),height:Math.floor(e.y2-e.y1)}).show()}hide(){this.element.hide()}}Vl(qn,"_template",'<div class="lm_dropTargetIndicator"><div class="lm_inner"></div></div>');function Zr(n,e,t){return(e=lf(e))in n?Object.defineProperty(n,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):n[e]=t,n}function lf(n){var e=uf(n,"string");return typeof e=="symbol"?e:e+""}function uf(n,e){if(typeof n!="object"||!n)return n;var t=n[Symbol.toPrimitive];if(t!==void 0){var r=t.call(n,e);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(n)}class An{constructor(e,t,r,i){Zr(this,"element",void 0),Zr(this,"_header",void 0),Zr(this,"_action",void 0),this._header=e,this.element=x('<li class="'+r+'" title="'+t+'"></li>'),this._header.on("destroy",this._$destroy,this),this._action=i,this.element.on("click",this._action),this._header.controlsContainer.append(this.element)}_$destroy(){this.element.off(),this.element.remove()}}function df(n,e,t){return(e=cf(e))in n?Object.defineProperty(n,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):n[e]=t,n}function cf(n){var e=hf(n,"string");return typeof e=="symbol"?e:e+""}function hf(n,e){if(typeof n!="object"||!n)return n;var t=n[Symbol.toPrimitive];if(t!==void 0){var r=t.call(n,e);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(n)}class Jt extends Error{constructor(e,t){super(),df(this,"node",void 0),this.name="Configuration Error",this.message=e,this.node=t}}const mf=Object.freeze(Object.defineProperty({__proto__:null,ConfigurationError:Jt},Symbol.toStringTag,{value:"Module"}));function pf(n,e){return bf(n)||gf(n,e)||vf(n,e)||ff()}function ff(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
10
10
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function vf(n,e){if(n){if(typeof n=="string")return na(n,e);var t={}.toString.call(n).slice(8,-1);return t==="Object"&&n.constructor&&(t=n.constructor.name),t==="Map"||t==="Set"?Array.from(n):t==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?na(n,e):void 0}}function na(n,e){(e==null||e>n.length)&&(e=n.length);for(var t=0,r=Array(e);t<e;t++)r[t]=n[t];return r}function gf(n,e){var t=n==null?null:typeof Symbol<"u"&&n[Symbol.iterator]||n["@@iterator"];if(t!=null){var r,i,o,a,s=[],l=!0,u=!1;try{if(o=(t=t.call(n)).next,e!==0)for(;!(l=(r=o.call(t)).done)&&(s.push(r.value),s.length!==e);l=!0);}catch(c){u=!0,i=c}finally{try{if(!l&&t.return!=null&&(a=t.return(),Object(a)!==a))return}finally{if(u)throw i}}return s}}function bf(n){if(Array.isArray(n))return n}function Ce(n,e,t){return(e=yf(e))in n?Object.defineProperty(n,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):n[e]=t,n}function yf(n){var e=Cf(n,"string");return typeof e=="symbol"?e:e+""}function Cf(n,e){if(typeof n!="object"||!n)return n;var t=n[Symbol.toPrimitive];if(t!==void 0){var r=t.call(n,e);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(n)}function tn(n){return n.isStack}function ke(n){return n.isComponent}function Gl(n){return n.isRoot}class Pe extends He{constructor(e,t,r,i){super(),Ce(this,"config",void 0),Ce(this,"type",void 0),Ce(this,"contentItems",void 0),Ce(this,"parent",void 0),Ce(this,"layoutManager",void 0),Ce(this,"element",void 0),Ce(this,"childElementContainer",void 0),Ce(this,"componentName",void 0),Ce(this,"isInitialised",!1),Ce(this,"isMaximised",!1),Ce(this,"isRoot",!1),Ce(this,"isRow",!1),Ce(this,"isColumn",!1),Ce(this,"isStack",!1),Ce(this,"isComponent",!1),Ce(this,"tab",void 0),Ce(this,"_pendingEventPropagations",void 0),Ce(this,"_throttledEvents",void 0),this.element=i,this.config=this._extendItemNode(t),this.type=t.type,this.contentItems=[],this.parent=r,this.layoutManager=e,this._pendingEventPropagations={},this._throttledEvents=["stateChanged"],this.on(He.ALL_EVENT,this._propagateEvent,this),t.content&&this._createContentItems(t)}callDownwards(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;r!==!0&&i!==!0&&this[e].apply(this,t);for(var o=0;o<this.contentItems.length;o++)this.contentItems[o].callDownwards(e,t,r);r===!0&&i!==!0&&this[e].apply(this,t)}removeChild(e){var t,r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,i=this.contentItems.indexOf(e);if(i===-1)throw new Error("Can't remove child item. Unknown content item");if(r!==!0&&this.contentItems[i]._$destroy(),this.contentItems.splice(i,1),(t=this.config.content)===null||t===void 0||t.splice(i,1),this.contentItems.length>0)this.callDownwards("setSize");else if(this.type!=="root"&&this.config.isClosable){var o;(o=this.parent)===null||o===void 0||o.removeChild(this)}}addChild(e,t){e=this.layoutManager._$normalizeContentItem(e,this),t===void 0&&(t=this.contentItems.length),this.contentItems.splice(t,0,e),this.config.content===void 0&&(this.config.content=[]),this.config.content.splice(t,0,e.config),e.parent=this,e.parent.isInitialised===!0&&e.isInitialised===!1&&e._$init()}replaceChild(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;t=this.layoutManager._$normalizeContentItem(t);var i=this.contentItems.indexOf(e),o=e.element[0].parentNode;if(i===-1)throw new Error("Can't replace child. oldChild is not child of this");o==null||o.replaceChild(t.element[0],e.element[0]),r===!0&&(e.parent=null,e._$destroy()),this.contentItems[i]=t,t.parent=this,tn(this)&&this.header.tabs[i].setContentItem(t),t.parent.isInitialised===!0&&t.isInitialised===!1&&t._$init(),this.callDownwards("setSize")}remove(){var e;(e=this.parent)===null||e===void 0||e.removeChild(this)}popout(){var e=this.layoutManager.createPopout(this);return this.emitBubblingEvent("stateChanged"),e}toggleMaximise(e){e&&e.preventDefault(),this.isMaximised===!0?this.layoutManager._$minimiseItem(this):this.layoutManager._$maximiseItem(this),this.isMaximised=!this.isMaximised,this.emitBubblingEvent("stateChanged")}select(){this.layoutManager.selectedItem!==this&&(this.layoutManager.selectItem(this,!0),this.element.addClass("lm_selected"))}deselect(){this.layoutManager.selectedItem===this&&(this.layoutManager.selectedItem=null,this.element.removeClass("lm_selected"))}setTitle(e){this.config.title=e,this.emit("titleChanged",e),this.emitBubblingEvent("stateChanged")}hasId(e){if(this.config.id){if(typeof this.config.id=="string")return this.config.id===e;if(this.config.id instanceof Array)return this.config.id.indexOf(e)!==-1}else return!1}addId(e){this.hasId(e)||(this.config.id?typeof this.config.id=="string"?this.config.id=[this.config.id,e]:this.config.id instanceof Array&&this.config.id.push(e):this.config.id=e)}removeId(e){if(!this.hasId(e))throw new Error("Id not found");if(typeof this.config.id=="string")delete this.config.id;else if(this.config.id instanceof Array){var t=this.config.id.indexOf(e);this.config.id.splice(t,1)}}getItemsByFilter(e){var t=[],r=function(o){for(var a=0;a<o.contentItems.length;a++)e(o.contentItems[a])===!0&&t.push(o.contentItems[a]),r(o.contentItems[a])};return r(this),t}getItemsById(e){return this.getItemsByFilter(function(t){return t.config.id instanceof Array?t.config.id.indexOf(e)!==-1:t.config.id===e})}getItemsByType(e){return this._$getItemsByProperty("type",e)}getComponentsByName(e){for(var t=this._$getItemsByProperty("componentName",e),r=[],i=0;i<t.length;i++)r.push(t[i].instance);return r}_$getItemsByProperty(e,t){return this.getItemsByFilter(function(r){return r[e]===t})}_$setParent(e){this.parent=e}_$highlightDropZone(e,t,r){var i;(i=this.layoutManager.dropTargetIndicator)===null||i===void 0||i.highlightArea(r)}_$onDrop(e,t){this.addChild(e)}_$hide(){this._callOnActiveComponents("hide"),this.element.hide(),this.layoutManager.updateSize()}_$show(){this._callOnActiveComponents("show"),this.element.show(),this.layoutManager.updateSize()}_callOnActiveComponents(e){for(var t=this.getItemsByType("stack"),r=null,i=0;i<t.length;i++)r=t[i].getActiveContentItem(),r&&ke(r)&&r.container[e]()}_$destroy(){this.emitBubblingEvent("beforeItemDestroyed"),this.callDownwards("_$destroy",[],!0,!0),this.element.remove(),this.emitBubblingEvent("itemDestroyed")}_$getArea(e){var t,r,i;e=e||this.element;var o=(t=e.offset())!==null&&t!==void 0?t:{left:0,top:0},a=(r=e.width())!==null&&r!==void 0?r:0,s=(i=e.height())!==null&&i!==void 0?i:0;return{x1:o.left,y1:o.top,x2:o.left+a,y2:o.top+s,surface:a*s,contentItem:this,side:""}}_$init(){this.setSize();for(var e=0;e<this.contentItems.length;e++){var t;(t=this.childElementContainer)===null||t===void 0||t.append(this.contentItems[e].element)}this.isInitialised=!0,this.emitBubblingEvent("itemCreated"),this.emitBubblingEvent(this.type+"Created")}emitBubblingEvent(e){var t=new bi(e,this);this.emit(e,t)}_createContentItems(e){var t;if(!(e.content instanceof Array))throw new Jt("content must be an Array",e);for(var r=0;r<e.content.length;r++)t=this.layoutManager.createContentItem(e.content[r],this),this.contentItems.push(t)}_extendItemNode(e){for(var t of Object.entries(kl)){var r=pf(t,2),i=r[0],o=r[1],a=i;e[a]===void 0&&(e[a]=o)}return e}_propagateEvent(e,t){t instanceof bi&&t.isPropagationStopped===!1&&this.isInitialised===!0&&(this.isRoot===!1&&this.parent?this.parent.emit.apply(this.parent,[e,t]):this._scheduleEventPropagationToLayoutManager(e,t))}_scheduleEventPropagationToLayoutManager(e,t){this._throttledEvents.indexOf(e)===-1?this.layoutManager.emit(e,t.origin):this._pendingEventPropagations[e]!==!0&&(this._pendingEventPropagations[e]=!0,ji(this._propagateEventToLayoutManager.bind(this,e,t)))}_propagateEventToLayoutManager(e,t){this._pendingEventPropagations[e]=!1,this.layoutManager.emit(e,t)}}function Sf(n,e){return Pf(n)||Ef(n,e)||_f(n,e)||wf()}function wf(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
11
11
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function _f(n,e){if(n){if(typeof n=="string")return ra(n,e);var t={}.toString.call(n).slice(8,-1);return t==="Object"&&n.constructor&&(t=n.constructor.name),t==="Map"||t==="Set"?Array.from(n):t==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?ra(n,e):void 0}}function ra(n,e){(e==null||e>n.length)&&(e=n.length);for(var t=0,r=Array(e);t<e;t++)r[t]=n[t];return r}function Ef(n,e){var t=n==null?null:typeof Symbol<"u"&&n[Symbol.iterator]||n["@@iterator"];if(t!=null){var r,i,o,a,s=[],l=!0,u=!1;try{if(o=(t=t.call(n)).next,e!==0)for(;!(l=(r=o.call(t)).done)&&(s.push(r.value),s.length!==e);l=!0);}catch(c){u=!0,i=c}finally{try{if(!l&&t.return!=null&&(a=t.return(),Object(a)!==a))return}finally{if(u)throw i}}return s}}function Pf(n){if(Array.isArray(n))return n}function Mn(n,e,t){return(e=Tf(e))in n?Object.defineProperty(n,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):n[e]=t,n}function Tf(n){var e=Of(n,"string");return typeof e=="symbol"?e:e+""}function Of(n,e){if(typeof n!="object"||!n)return n;var t=n[Symbol.toPrimitive];if(t!==void 0){var r=t.call(n,e);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(n)}class ql extends Pe{constructor(e,t,r){var i;Object.entries((i=e.config.settings.defaultComponentConfig)!==null&&i!==void 0?i:{}).forEach(s=>{var l=Sf(s,2),u=l[0],c=l[1];t[u]===void 0&&(t[u]=c)}),super(e,t,r,x()),Mn(this,"config",void 0),Mn(this,"componentName",void 0),Mn(this,"container",void 0),Mn(this,"parent",void 0),Mn(this,"instance",void 0),this.config=t,this.parent=r;var o=e.getComponent(this.config.componentName)||e.getFallbackComponent(),a=x.extend(!0,{},this.config.componentState||{});if(o==null)throw new Jt('Unknown component "'+this.config.componentName+'"');a.componentName=this.config.componentName,this.componentName=this.config.componentName,this.config.title===""&&(this.config.title=this.config.componentName),this.isComponent=!0,this.container=new vi(this.config,this,e),this.instance=new o(this.container,a),this.element=this.container._element}close(){var e;(e=this.parent)===null||e===void 0||e.removeChild(this)}setSize(){this.element.is(":visible")&&this.container._$setSize(this.element.width(),this.element.height())}_$init(){Pe.prototype._$init.call(this),this.container.emit("open")}_$hide(){this.container.hide(),Pe.prototype._$hide.call(this)}_$show(e){this.container.show(),(this.container._config.isFocusOnShow||e)&&this.container._contentElement[0].focus({preventScroll:!0}),Pe.prototype._$show.call(this)}_$destroy(){this.container.emit("destroy",this),Pe.prototype._$destroy.call(this)}_$getArea(){return null}}function Qe(n,e,t){return(e=xf(e))in n?Object.defineProperty(n,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):n[e]=t,n}function xf(n){var e=If(n,"string");return typeof e=="symbol"?e:e+""}function If(n,e){if(typeof n!="object"||!n)return n;var t=n[Symbol.toPrimitive];if(t!==void 0){var r=t.call(n,e);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(n)}class Fn extends Pe{constructor(e,t,r,i){super(t,r,i,x('<div class="lm_item lm_'+(e?"column":"row")+'"></div>')),Qe(this,"isRow",void 0),Qe(this,"isColumn",void 0),Qe(this,"childElementContainer",void 0),Qe(this,"parent",void 0),Qe(this,"_splitter",[]),Qe(this,"_splitterSize",void 0),Qe(this,"_splitterGrabSize",void 0),Qe(this,"_isColumn",void 0),Qe(this,"_dimension",void 0),Qe(this,"_splitterPosition",null),Qe(this,"_splitterMinPosition",null),Qe(this,"_splitterMaxPosition",null),this.parent=i,this.isRow=!e,this.isColumn=e,this.childElementContainer=this.element,this._splitterSize=t.config.dimensions.borderWidth,this._splitterGrabSize=t.config.dimensions.borderGrabWidth,this._isColumn=e,this._dimension=e?"height":"width",this._splitterPosition=null,this._splitterMinPosition=null,this._splitterMaxPosition=null}addChild(e,t,r){var i,o,a,s;if(e=this.layoutManager._$normalizeContentItem(e,this),t===void 0&&(t=this.contentItems.length),this.contentItems.length>0?(s=this._createSplitter(Math.max(0,t-1)).element,t>0?(this.contentItems[t-1].element.after(s),s.after(e.element)):(this.contentItems[0].element.before(s),s.before(e.element))):this.childElementContainer.append(e.element),Pe.prototype.addChild.call(this,e,t),i=1/this.contentItems.length*100,r===!0){this.emitBubblingEvent("stateChanged");return}for(a=0;a<this.contentItems.length;a++)if(this.contentItems[a]===e)e.config[this._dimension]=i;else{var l;o=((l=this.contentItems[a].config[this._dimension])!==null&&l!==void 0?l:0)*(100-i)/100,this.contentItems[a].config[this._dimension]=o}this.callDownwards("setSize"),this.emitBubblingEvent("stateChanged")}removeChild(e,t){var r,i=(r=e.config[this._dimension])!==null&&r!==void 0?r:0,o=this.contentItems.indexOf(e),a=Math.max(o-1,0),s,l;if(o===-1)throw new Error("Can't remove child. ContentItem is not child of this Row or Column");for(this._splitter[a]&&(this._splitter[a]._$destroy(),this._splitter.splice(a,1)),s=0;s<this.contentItems.length;s++)if(this.contentItems[s]!==e){var u;this.contentItems[s].config[this._dimension]=((u=this.contentItems[s].config[this._dimension])!==null&&u!==void 0?u:0)+i/(this.contentItems.length-1)}if(Pe.prototype.removeChild.call(this,e,t),this.contentItems.length===1&&this.config.isClosable===!0){var c;l=this.contentItems[0],this.contentItems=[],(c=this.parent)===null||c===void 0||c.replaceChild(this,l,!0)}else this.callDownwards("setSize"),this.emitBubblingEvent("stateChanged")}replaceChild(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,i=e.config[this._dimension];t.config[this._dimension]=i,super.replaceChild(e,t,r),this.callDownwards("setSize"),this.emitBubblingEvent("stateChanged")}setSize(){this.contentItems.length>0&&(this._calculateRelativeSizes(),this._setAbsoluteSizes()),this.emitBubblingEvent("stateChanged"),this.emit("resize")}_$init(){if(this.isInitialised!==!0){var e;for(Pe.prototype._$init.call(this),e=0;e<this.contentItems.length-1;e++)this.contentItems[e].element.after(this._createSplitter(e).element)}}_setAbsoluteSizes(){var e,t=this._calculateAbsoluteSizes();for(e=0;e<this.contentItems.length;e++)t.additionalPixel-e>0&&t.itemSizes[e]++,this._isColumn?(this.contentItems[e].element.width(t.totalWidth),this.contentItems[e].element.height(t.itemSizes[e])):(this.contentItems[e].element.width(t.itemSizes[e]),this.contentItems[e].element.height(t.totalHeight))}_calculateAbsoluteSizes(){var e,t,r=(this.contentItems.length-1)*this._splitterSize,i=(e=this.element.width())!==null&&e!==void 0?e:0,o=(t=this.element.height())!==null&&t!==void 0?t:0,a=0,s=[];this._isColumn?o-=r:i-=r;for(var l=0;l<this.contentItems.length;l++){var u,c,m=this._isColumn?Math.floor(o*(((u=this.contentItems[l].config.height)!==null&&u!==void 0?u:0)/100)):Math.floor(i*(((c=this.contentItems[l].config.width)!==null&&c!==void 0?c:0)/100));a+=m,s.push(m)}var p=Math.floor((this._isColumn?o:i)-a);return{itemSizes:s,additionalPixel:p,totalWidth:i,totalHeight:o}}_calculateRelativeSizes(){for(var e=0,t=[],r=this._isColumn?"height":"width",i=0;i<this.contentItems.length;i++){var o=this.contentItems[i].config[r];o!=null?e+=o:t.push(this.contentItems[i])}if(Math.round(e)===100){this._respectMinItemWidth();return}if(Math.round(e)<100&&t.length>0){for(var a=0;a<t.length;a++)t[a].config[r]=(100-e)/t.length;this._respectMinItemWidth();return}if(Math.round(e)>100)for(var s=0;s<t.length;s++)t[s].config[r]=50,e+=50;for(var l=0;l<this.contentItems.length;l++){var u;this.contentItems[l].config[r]=((u=this.contentItems[l].config[r])!==null&&u!==void 0?u:0)/e*100}this._respectMinItemWidth()}_respectMinItemWidth(){var e,t=this.layoutManager.config.dimensions&&(e=this.layoutManager.config.dimensions.minItemWidth)!==null&&e!==void 0?e:0,r=[],i=0,o=0,a=0,s=[],l;if(!(this._isColumn||!t||this.contentItems.length<=1)){for(var u=this._calculateAbsoluteSizes(),c=0;c<this.contentItems.length;c++){this.contentItems[c];var m=u.itemSizes[c];m<t?(o+=t-m,l={width:t}):(i+=m-t,l={width:m},r.push(l)),s.push(l)}if(!(o===0||o>i)){var p=o/i;a=o;for(var f=0;f<r.length;f++){l=r[f];var v=Math.round((l.width-t)*p);a-=v,l.width-=v}a!==0&&(s[s.length-1].width-=a);for(var g=0;g<this.contentItems.length;g++)this.contentItems[g].config.width=s[g].width/u.totalWidth*100}}}_createSplitter(e){var t;return t=new Xl(this._isColumn,this._splitterSize,this._splitterGrabSize),t.on("drag",this._onSplitterDrag.bind(this,t),this),t.on("dragStop",this._onSplitterDragStop.bind(this,t),this),t.on("dragStart",this._onSplitterDragStart.bind(this,t),this),this._splitter.splice(e,0,t),t}_getItemsForSplitter(e){var t=this._splitter.indexOf(e);if(t<0)throw new Error("Splitter not found in RowOrColumn");return{before:this.contentItems[t],after:this.contentItems[t+1]}}_getMinimumDimensions(e){for(var t=0,r=0,i=0;i<e.length;++i){var o,a;t=Math.max((o=e[i].minWidth)!==null&&o!==void 0?o:0,t),r=Math.max((a=e[i].minHeight)!==null&&a!==void 0?a:0,r)}return{horizontal:t,vertical:r}}_onSplitterDragStart(e){var t,r,i,o,a=this._getItemsForSplitter(e),s=this.layoutManager.config.dimensions[this._isColumn?"minItemHeight":"minItemWidth"],l=this._getMinimumDimensions((t=a.before.config.content)!==null&&t!==void 0?t:[]),u=this._isColumn?l.vertical:l.horizontal,c=this._getMinimumDimensions((r=a.after.config.content)!==null&&r!==void 0?r:[]),m=this._isColumn?c.vertical:c.horizontal;this._splitterPosition=0,this._splitterMinPosition=-1*(((i=a.before.element[this._dimension]())!==null&&i!==void 0?i:0)-(u||s)),this._splitterMaxPosition=((o=a.after.element[this._dimension]())!==null&&o!==void 0?o:0)-(m||s)}_onSplitterDrag(e,t,r){var i=this._isColumn?r:t;this._splitterMaxPosition==null||this._splitterMinPosition==null||i>this._splitterMinPosition&&i<this._splitterMaxPosition&&(this._splitterPosition=i,e.element.css(this._isColumn?"top":"left",i))}_onSplitterDragStop(e){var t,r,i,o,a,s=this._getItemsForSplitter(e),l=(t=s.before.element[this._dimension]())!==null&&t!==void 0?t:0,u=(r=s.after.element[this._dimension]())!==null&&r!==void 0?r:0,c=(((i=this._splitterPosition)!==null&&i!==void 0?i:0)+l)/(l+u),m=((o=s.before.config[this._dimension])!==null&&o!==void 0?o:0)+((a=s.after.config[this._dimension])!==null&&a!==void 0?a:0);s.before.config[this._dimension]=c*m,s.after.config[this._dimension]=(1-c)*m,e.element.css({top:0,left:0}),ji(this.callDownwards.bind(this,"setSize",void 0,void 0,void 0))}}function ia(n,e){var t=Object.keys(n);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(n);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(n,i).enumerable})),t.push.apply(t,r)}return t}function oa(n){for(var e=1;e<arguments.length;e++){var t=arguments[e]!=null?arguments[e]:{};e%2?ia(Object(t),!0).forEach(function(r){yi(n,r,t[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(t)):ia(Object(t)).forEach(function(r){Object.defineProperty(n,r,Object.getOwnPropertyDescriptor(t,r))})}return n}function yi(n,e,t){return(e=Df(e))in n?Object.defineProperty(n,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):n[e]=t,n}function Df(n){var e=Mf(n,"string");return typeof e=="symbol"?e:e+""}function Mf(n,e){if(typeof n!="object"||!n)return n;var t=n[Symbol.toPrimitive];if(t!==void 0){var r=t.call(n,e);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(n)}class Ci extends Pe{constructor(e,t,r){super(e,oa(oa({},t),{},{type:"root"}),null,x('<div class="lm_goldenlayout lm_item lm_root"></div>')),yi(this,"childElementContainer",void 0),yi(this,"_containerElement",void 0),this.isRoot=!0,this.type="root",this.childElementContainer=this.element,this._containerElement=r,this._containerElement.append(this.element)}addChild(e,t){if(this.contentItems.length>0)throw new Error("Root node can only have a single child");e=this.layoutManager._$normalizeContentItem(e,this),this.childElementContainer.append(e.element),super.addChild(e,t),this.callDownwards("setSize"),this.emitBubblingEvent("stateChanged")}setSize(e,t){var r,i;e=typeof e>"u"?(r=this._containerElement.width())!==null&&r!==void 0?r:0:e,t=typeof t>"u"?(i=this._containerElement.height())!==null&&i!==void 0?i:0:t,this.element.width(e),this.element.height(t),this.contentItems[0]&&(this.contentItems[0].element.width(e),this.contentItems[0].element.height(t))}_$getArea(){var e=super._$getArea();if(e==null)throw new Error("Unable to get root area");return e}_$highlightDropZone(e,t,r){this.layoutManager.tabDropPlaceholder.remove(),super._$highlightDropZone(e,t,r)}_$onDrop(e,t){var r;if(ke(e)&&(r=this.layoutManager.createContentItem({type:"stack",header:e.config.header||{}},this),r._$init(),r.addChild(e),e=r),!this.contentItems.length)this.addChild(e);else{var i=t.side,o=i==="left"||i==="right"?"row":"column",a=i==="left"||i==="right"?"width":"height",s=i==="left"||i==="top",l=this.contentItems[0];if(!(l instanceof Fn)||l.type!=o){var u=this.layoutManager.createContentItem({type:o},this);this.replaceChild(l,u),u.addChild(e,s?0:void 0,!0),u.addChild(l,s?void 0:0,!0),l.config[a]=50,e.config[a]=50,u.callDownwards("setSize")}else{var c,m=l.contentItems[s?0:l.contentItems.length-1];l.addChild(e,s?0:void 0,!0),m.config[a]=((c=m.config[a])!==null&&c!==void 0?c:0)*.5,e.config[a]=m.config[a],l.callDownwards("setSize")}}}}function jf(n,e){return Lf(n)||Nf(n,e)||kf(n,e)||Af()}function Af(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
12
12
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function kf(n,e){if(n){if(typeof n=="string")return aa(n,e);var t={}.toString.call(n).slice(8,-1);return t==="Object"&&n.constructor&&(t=n.constructor.name),t==="Map"||t==="Set"?Array.from(n):t==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?aa(n,e):void 0}}function aa(n,e){(e==null||e>n.length)&&(e=n.length);for(var t=0,r=Array(e);t<e;t++)r[t]=n[t];return r}function Nf(n,e){var t=n==null?null:typeof Symbol<"u"&&n[Symbol.iterator]||n["@@iterator"];if(t!=null){var r,i,o,a,s=[],l=!0,u=!1;try{if(o=(t=t.call(n)).next,e!==0)for(;!(l=(r=o.call(t)).done)&&(s.push(r.value),s.length!==e);l=!0);}catch(c){u=!0,i=c}finally{try{if(!l&&t.return!=null&&(a=t.return(),Object(a)!==a))return}finally{if(u)throw i}}return s}}function Lf(n){if(Array.isArray(n))return n}function sa(n,e){var t=Object.keys(n);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(n);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(n,i).enumerable})),t.push.apply(t,r)}return t}function cn(n){for(var e=1;e<arguments.length;e++){var t=arguments[e]!=null?arguments[e]:{};e%2?sa(Object(t),!0).forEach(function(r){Ge(n,r,t[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(t)):sa(Object(t)).forEach(function(r){Object.defineProperty(n,r,Object.getOwnPropertyDescriptor(t,r))})}return n}function Ge(n,e,t){return(e=Rf(e))in n?Object.defineProperty(n,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):n[e]=t,n}function Rf(n){var e=$f(n,"string");return typeof e=="symbol"?e:e+""}function $f(n,e){if(typeof n!="object"||!n)return n;var t=n[Symbol.toPrimitive];if(t!==void 0){var r=t.call(n,e);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(n)}class Si extends Pe{constructor(e,t,r){var i,o,a,s,l,u,c,m,p;super(e,t,r,x('<div class="lm_item lm_stack"></div>')),Ge(this,"_activeContentItem",null),Ge(this,"_header",void 0),Ge(this,"childElementContainer",x('<div class="lm_items"></div>')),Ge(this,"header",void 0),Ge(this,"parent",void 0),Ge(this,"isStack",!0),Ge(this,"_dropSegment",null),Ge(this,"_contentAreaDimensions",null),Ge(this,"_dropIndex",void 0),Ge(this,"_side",void 0),Ge(this,"_sided",!1),Ge(this,"config",void 0),this.parent=r,this.config=t;var f=e.config;this._side=!1,this._header={show:((i=f.settings)===null||i===void 0?void 0:i.hasHeaders)&&t.hasHeaders!==!1,popout:(o=f.settings)!==null&&o!==void 0&&o.showPopoutIcon?(a=f.labels)===null||a===void 0?void 0:a.popout:void 0,maximise:(s=f.settings)!==null&&s!==void 0&&s.showMaximiseIcon?(l=f.labels)===null||l===void 0?void 0:l.maximise:void 0,close:(u=f.settings)!==null&&u!==void 0&&u.showCloseIcon?(c=f.labels)===null||c===void 0?void 0:c.close:void 0,minimise:(m=(p=f.labels)===null||p===void 0?void 0:p.minimise)!==null&&m!==void 0?m:void 0},f.header&&(this._header=cn(cn({},this._header),f.header)),t.header&&(this._header=cn(cn({},this._header),t.header)),t.content&&t.content[0]&&t.content[0].header&&(this._header=cn(cn({},this._header),t.content[0].header)),this.header=new Ot(e,this),this.element.append(this.header.element),this.element.append(this.childElementContainer),this._setupHeaderPosition(),this._$validateClosability()}setSize(){var e,t,r,i,o,a=this._header.show&&(e=(t=this.layoutManager.config.dimensions)===null||t===void 0?void 0:t.headerHeight)!==null&&e!==void 0?e:0,s=((r=this.element.width())!==null&&r!==void 0?r:0)-(this._sided?a:0),l=((i=this.element.height())!==null&&i!==void 0?i:0)-(this._sided?0:a);for(this.childElementContainer.width(s),this.childElementContainer.height(l),o=0;o<this.contentItems.length;o++)this.contentItems[o].element.width(s).height(l);this.emit("resize"),this.emitBubblingEvent("stateChanged")}_$init(){if(this.isInitialised!==!0){this.header._attachWheelListener(),super._$init();for(var e=0;e<this.contentItems.length;e++)this.header.createTab(this.contentItems[e]),this.contentItems[e]._$hide();if(this.contentItems.length>0){var t=this.contentItems[this.config.activeItemIndex||0];if(!t)throw new Error("Configured activeItemIndex out of bounds");this.setActiveContentItem(t)}}}setActiveContentItem(e,t){if(this.contentItems.indexOf(e)===-1)throw new Error("contentItem is not a child of this stack");this._activeContentItem!==null&&this._activeContentItem._$hide(),this._activeContentItem=e,this.header.setActiveContentItem(e),ke(e)?e._$show(t):e._$show(),this.emit("activeContentItemChanged",e),this.layoutManager.emit("activeContentItemChanged",e),this.emitBubblingEvent("stateChanged")}getActiveContentItem(){return this.header.activeContentItem}addChild(e,t){e=this.layoutManager._$normalizeContentItem(e,this),super.addChild(e,t),this.childElementContainer.append(e.element),this.header.createTab(e,t),this.setActiveContentItem(e),this.callDownwards("setSize"),this._$validateClosability(),this.emitBubblingEvent("stateChanged")}removeChild(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,r=this.contentItems.indexOf(e);super.removeChild(e,t),this.header.removeTab(e),this.header.activeContentItem===e&&(this.contentItems.length>0?this.setActiveContentItem(this.contentItems[Math.max(r-1,0)]):this._activeContentItem=null),this._$validateClosability(),this.emitBubblingEvent("stateChanged")}_$validateClosability(){for(var e=this.header._isClosable(),t=0,r=this.contentItems.length;t<r;t++){var i;if(!e)break;e=(i=this.contentItems[t].config.isClosable)!==null&&i!==void 0?i:!1}this.header._$setClosable(e)}_$destroy(){Pe.prototype._$destroy.call(this),this.header._$destroy()}_$onDrop(e){if(this._dropSegment==="header"){this._resetHeaderDropZone(),this.addChild(e,this._dropIndex);return}if(this._dropSegment==="body"){this.addChild(e);return}var t=this._dropSegment==="top"||this._dropSegment==="bottom",r=this._dropSegment==="left"||this._dropSegment==="right",i=this._dropSegment==="top"||this._dropSegment==="left",o=this.parent instanceof Fn&&(t&&this.parent.isColumn||r&&this.parent.isRow),a=t?"column":"row",s=t?"height":"width";if(ke(e)){var l=this.layoutManager.createContentItem({type:"stack",header:e.config.header||{}},this);l._$init(),l.addChild(e),e=l}if(o){var u,c=this.parent.contentItems.indexOf(this);this.parent.addChild(e,i?c:c+1,!0),this.config[s]=((u=this.config[s])!==null&&u!==void 0?u:0)*.5,e.config[s]=this.config[s],this.parent.callDownwards("setSize")}else{var m,p=this.layoutManager.createContentItem({type:a},this);(m=this.parent)===null||m===void 0||m.replaceChild(this,p),p.addChild(e,i?0:void 0,!0),p.addChild(this,i?void 0:0,!0),this.config[s]=50,e.config[s]=50,p.callDownwards("setSize")}}_$highlightDropZone(e,t){if(this._contentAreaDimensions)for(var r of Object.entries(this._contentAreaDimensions)){var i=jf(r,2),o=i[0],a=i[1],s=a.hoverArea;if(s.x1<e&&s.x2>e&&s.y1<t&&s.y2>t){o==="header"?(this._dropSegment="header",this._highlightHeaderDropZone(e)):(this._resetHeaderDropZone(),this._highlightBodyDropZone(o));return}}}_$getArea(){if(this.element.is(":visible")===!1)return null;var e=super._$getArea(this.header.element),t=super._$getArea(this.childElementContainer);if(e==null||t==null)return null;var r=t.x2-t.x1,i=t.y2-t.y1;return this._contentAreaDimensions={header:{hoverArea:{x1:e.x1,y1:e.y1,x2:e.x2,y2:e.y2},highlightArea:{x1:e.x1,y1:e.y1,x2:e.x2,y2:e.y2}}},this._activeContentItem&&this._activeContentItem.isComponent===!1?e:this.contentItems.length===0?(this._contentAreaDimensions.body={hoverArea:{x1:t.x1,y1:t.y1,x2:t.x2,y2:t.y2},highlightArea:{x1:t.x1,y1:t.y1,x2:t.x2,y2:t.y2}},super._$getArea(this.element)):(this._contentAreaDimensions.left={hoverArea:{x1:t.x1,y1:t.y1,x2:t.x1+r*.25,y2:t.y2},highlightArea:{x1:t.x1,y1:t.y1,x2:t.x1+r*.5,y2:t.y2}},this._contentAreaDimensions.top={hoverArea:{x1:t.x1+r*.25,y1:t.y1,x2:t.x1+r*.75,y2:t.y1+i*.5},highlightArea:{x1:t.x1,y1:t.y1,x2:t.x2,y2:t.y1+i*.5}},this._contentAreaDimensions.right={hoverArea:{x1:t.x1+r*.75,y1:t.y1,x2:t.x2,y2:t.y2},highlightArea:{x1:t.x1+r*.5,y1:t.y1,x2:t.x2,y2:t.y2}},this._contentAreaDimensions.bottom={hoverArea:{x1:t.x1+r*.25,y1:t.y1+i*.5,x2:t.x1+r*.75,y2:t.y2},highlightArea:{x1:t.x1,y1:t.y1+i*.5,x2:t.x2,y2:t.y2}},super._$getArea(this.element))}_highlightHeaderDropZone(e){var t,r,i,o,a,s,l,u,c,m,p,f,v,g,b,y,C=this.header.tabs.length;if(C===0){var S,_,E,D,W,N,I,k,$=this.header.element.offset();(S=this.layoutManager.dropTargetIndicator)===null||S===void 0||S.highlightArea({x1:(_=$==null?void 0:$.left)!==null&&_!==void 0?_:0,x2:((E=$==null?void 0:$.left)!==null&&E!==void 0?E:0)+100,y1:(D=(W=this.header.element.offset())===null||W===void 0?void 0:W.top)!==null&&D!==void 0?D:0,y2:((N=(I=this.header.element.offset())===null||I===void 0?void 0:I.top)!==null&&N!==void 0?N:0)+((k=this.header.element.innerHeight())!==null&&k!==void 0?k:0)});return}var ae=this.header.tabsContainer,A=(t=ae.get(0))===null||t===void 0?void 0:t.getBoundingClientRect(),X=(r=this.layoutManager.tabDropPlaceholder.get(0))===null||r===void 0?void 0:r.getBoundingClientRect();if(!(!A||!X)){e<A.left?e=A.left+1:e>A.right&&(e=A.right-1);var de,se;if(!(X.left<e&&e<X.right)){for(var be=0;be<C;be++){var ye;if(de=this.header.tabs[be].element,se=(ye=de.get(0))===null||ye===void 0?void 0:ye.getBoundingClientRect(),se&&se.left<e&&e<se.right){this._dropIndex=be;break}}if(de&&se&&e<se.left+se.width*.5)de.before(this.layoutManager.tabDropPlaceholder);else if(de){var Te;this._dropIndex=Math.min(((Te=this._dropIndex)!==null&&Te!==void 0?Te:0)+1,C),de.after(this.layoutManager.tabDropPlaceholder)}}var Se=(i=(o=this.layoutManager.tabDropPlaceholder.offset())===null||o===void 0?void 0:o.left)!==null&&i!==void 0?i:0;Se=Math.max(Se,(a=(s=this.header.tabsContainer.offset())===null||s===void 0?void 0:s.left)!==null&&a!==void 0?a:0);var ce=Se+((l=this.layoutManager.tabDropPlaceholder.width())!==null&&l!==void 0?l:0);ce=Math.min(ce,((u=(c=this.header.tabsContainer.offset())===null||c===void 0?void 0:c.left)!==null&&u!==void 0?u:0)+((m=this.header.tabsContainer.innerWidth())!==null&&m!==void 0?m:0)),(p=this.layoutManager.dropTargetIndicator)===null||p===void 0||p.highlightArea({x1:Se,x2:ce,y1:(f=(v=this.header.element.offset())===null||v===void 0?void 0:v.top)!==null&&f!==void 0?f:0,y2:((g=(b=this.header.element.offset())===null||b===void 0?void 0:b.top)!==null&&g!==void 0?g:0)+((y=this.header.element.innerHeight())!==null&&y!==void 0?y:0)})}}_resetHeaderDropZone(){this.layoutManager.tabDropPlaceholder.remove()}_setupHeaderPosition(){var e=["right","left","bottom"].some(r=>r===this._header.show)?this._header.show:void 0;if(this.header.element.toggle(!!this._header.show),!!e&&(this._side=e,this._sided=["right","left"].indexOf(this._side.toString())>=0,this.element.removeClass("lm_left lm_right lm_bottom"),this._side&&this.element.addClass("lm_"+this._side),this.element.find(".lm_header").length&&this.childElementContainer)){var t=["right","bottom"].indexOf(this._side.toString())>=0?"before":"after";this.header.element[t](this.childElementContainer),this.callDownwards("setSize")}}_highlightBodyDropZone(e){var t,r=(t=this._contentAreaDimensions)===null||t===void 0||(t=t[e])===null||t===void 0?void 0:t.highlightArea;if(r){var i;(i=this.layoutManager.dropTargetIndicator)===null||i===void 0||i.highlightArea(r)}this._dropSegment=e}}const Ff=Object.freeze(Object.defineProperty({__proto__:null,AbstractContentItem:Pe,Component:ql,ContentItem:Pe,Root:Ci,RowOrColumn:Fn,Stack:Si,isComponent:ke,isRoot:Gl,isStack:tn},Symbol.toStringTag,{value:"Module"}));function St(n,e,t){return(e=Hf(e))in n?Object.defineProperty(n,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):n[e]=t,n}function Hf(n){var e=Uf(n,"string");return typeof e=="symbol"?e:e+""}function Uf(n,e){if(typeof n!="object"||!n)return n;var t=n[Symbol.toPrimitive];if(t!==void 0){var r=t.call(n,e);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(n)}class Xn{constructor(e,t){var r;St(this,"header",void 0),St(this,"contentItem",void 0),St(this,"element",x(Xn._template)),St(this,"titleElement",void 0),St(this,"closeElement",void 0),St(this,"isActive",!1),St(this,"_layoutManager",void 0),St(this,"_dragListener",void 0),this.header=e,this.contentItem=t,this.titleElement=this.element.find(".lm_title"),this.closeElement=this.element.find(".lm_close_tab"),this.closeElement[t.config.isClosable?"show":"hide"](),this.setTitle(t.config.title),this.contentItem.on("titleChanged",this.setTitle,this),this._layoutManager=this.contentItem.layoutManager,(r=this._layoutManager.config.settings)!==null&&r!==void 0&&r.reorderEnabled&&t.config.reorderEnabled&&(this._dragListener=new Gn(this.element,this._layoutManager.root),this._dragListener.on("dragStart",this._onDragStart,this),this.contentItem.on("destroy",this._dragListener.destroy,this._dragListener)),this._onTabClick=this._onTabClick.bind(this),this._onCloseClick=this._onCloseClick.bind(this),this._onTabContentFocusIn=this._onTabContentFocusIn.bind(this),this._onTabContentFocusOut=this._onTabContentFocusOut.bind(this),this.element.on("click",this._onTabClick),this.element.on("auxclick",this._onTabClick),this.element.on("mouseup",this._onMouseUp),this.contentItem.config.isClosable?(this.closeElement.on("click",this._onCloseClick),this.closeElement.on("mousedown",this._onCloseMousedown)):this.closeElement.remove(),this.contentItem.tab=this,this.contentItem.emit("tab",this),this.contentItem.layoutManager.emit("tabCreated",this),ke(this.contentItem)&&(this.contentItem.container._contentElement.on("focusin",this._onTabContentFocusIn).on("focusout",this._onTabContentFocusOut),this.contentItem.container.tab=this,this.contentItem.container.emit("tab",this))}setTitle(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"";this.titleElement.text(e)}setContentItem(e){var t=this.contentItem;this._dragListener&&(t.off("destroy",this._dragListener.destroy,this._dragListener),e.on("destroy",this._dragListener.destroy,this._dragListener)),t.off("titleChanged",this.setTitle,this),e.on("titleChanged",this.setTitle,this),this.contentItem=e,e.tab=this,this.setTitle(e.config.title)}setActive(e){e!==this.isActive&&(this.isActive=e,e?this.element.addClass("lm_active"):this.element.removeClass("lm_active"))}_$destroy(){this.element.off("click",this._onTabClick),this.element.off("auxclick",this._onTabClick),this.element.off("mouseup",this._onMouseUp),this.closeElement.off("click",this._onCloseClick),ke(this.contentItem)&&this.contentItem.container._contentElement.off(),this._dragListener&&(this.contentItem.off("destroy",this._dragListener.destroy,this._dragListener),this._dragListener.off("dragStart",this._onDragStart),this._dragListener=void 0),this.element.remove()}_onDragStart(e,t){var r;(r=this.contentItem.parent)!==null&&r!==void 0&&r.isMaximised&&this.contentItem.parent.toggleMaximise(),this._dragListener&&new an(e,t,this._dragListener,this._layoutManager,this.contentItem,this.header.parent)}_onTabContentFocusIn(e){ke(this.contentItem)&&(e==null?void 0:e.target)instanceof Element&&this._isInNestedLayout(e.target)||(x(".lm_focusin",this._layoutManager.root.element).removeClass("lm_focusin"),this.element.addClass("lm_focusin"))}_onTabContentFocusOut(){ke(this.contentItem)&&!this.contentItem.container._contentElement[0].contains(document.activeElement)&&this.element.removeClass("lm_focusin")}_onTabClick(e){if(!e||e.button===0){var t,r=this.header.parent.getActiveContentItem();this.contentItem!==r&&ke(this.contentItem)?this.header.parent.setActiveContentItem(this.contentItem):ke(this.contentItem)&&!this._isFocusDirectlyInContainer()&&this.contentItem.container._contentElement.focus(),ke(this.contentItem)&&this.contentItem.container.emit("tabClicked",e),this.header._hideAdditionalTabsDropdown(),(t=this.element.get(0))===null||t===void 0||t.scrollIntoView({inline:"nearest"})}else e.button===1&&this.contentItem.config.isClosable&&this._onCloseClick(e)}_onCloseClick(e){e.stopPropagation(),ke(this.contentItem)?this.contentItem.container.close():this.header.parent.removeChild(this.contentItem)}_onMouseUp(e){e.button===1&&(e.preventDefault(),e.stopPropagation())}_onCloseMousedown(e){e.stopPropagation()}_isInNestedLayout(e){var t=x(e).closest(".lm_goldenlayout")[0],r=this._layoutManager.root.element[0];return t!=null&&t!==r}_isFocusDirectlyInContainer(){if(!ke(this.contentItem))return!1;var e=document.activeElement;return e==null||!this.contentItem.container._contentElement[0].contains(e)?!1:!this._isInNestedLayout(e)}}St(Xn,"_template",['<li class="lm_tab">','<span class="lm_title_before"></span>','<span class="lm_title"></span>','<div class="lm_close_tab" aria-label="Close tab"></div>',"</li>"].join(""));function q(n,e,t){return(e=Bf(e))in n?Object.defineProperty(n,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):n[e]=t,n}function Bf(n){var e=Wf(n,"string");return typeof e=="symbol"?e:e+""}function Wf(n,e){if(typeof n!="object"||!n)return n;var t=n[Symbol.toPrimitive];if(t!==void 0){var r=t.call(n,e);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(n)}class Ot extends He{constructor(e,t){var r,i;super(),q(this,"layoutManager",void 0),q(this,"element",x(Ot._template)),q(this,"tabsContainer",void 0),q(this,"tabDropdownContainer",void 0),q(this,"tabDropdownSearch",void 0),q(this,"tabDropdownList",null),q(this,"controlsContainer",void 0),q(this,"parent",void 0),q(this,"tabs",[]),q(this,"activeContentItem",null),q(this,"closeButton",null),q(this,"tabDropdownButton",null),q(this,"tabNextButton",x(Ot._nextButtonTemplate)),q(this,"tabPreviousButton",x(Ot._previousButtonTemplate)),q(this,"holdTimer",null),q(this,"rAF",null),q(this,"CLICK_TIMEOUT",500),q(this,"START_SPEED",.01),q(this,"ACCELERATION",5e-4),q(this,"PADDING",10),q(this,"SCROLL_LEFT","left"),q(this,"SCROLL_RIGHT","right"),q(this,"isDraggingTab",!1),q(this,"isOverflowing",!1),q(this,"isDropdownShown",!1),q(this,"dropdownKeyIndex",0),q(this,"_lastVisibleTabIndex",-1),q(this,"_tabControlOffset",void 0),this.layoutManager=e,(r=this.layoutManager.config.settings)!==null&&r!==void 0&&r.selectionEnabled&&(this.element.addClass("lm_selectable"),this.element.on("click",this._onHeaderClick.bind(this))),this.tabsContainer=this.element.find(".lm_tabs"),this.tabDropdownContainer=this.element.find(".lm_tabdropdown_list"),this.tabDropdownContainer.hide(),this.tabDropdownSearch=this.element.find(".lm_tabdropdown_search input"),this._handleFilterInput=this._handleFilterInput.bind(this),this._handleFilterKeydown=this._handleFilterKeydown.bind(this),this.tabDropdownSearch.on("input",this._handleFilterInput),this.tabDropdownSearch.on("keydown",this._handleFilterKeydown),this.controlsContainer=this.element.find(".lm_controls"),this.parent=t,this.parent.on("resize",this._updateTabSizes,this),this._handleItemPickedUp=this._handleItemPickedUp.bind(this),this._handleItemDropped=this._handleItemDropped.bind(this),this._handleNextMouseEnter=this._handleNextMouseEnter.bind(this),this._handleNextMouseLeave=this._handleNextMouseLeave.bind(this),this._handlePreviousMouseEnter=this._handlePreviousMouseEnter.bind(this),this._handlePreviousMouseLeave=this._handlePreviousMouseLeave.bind(this),this._handleScrollRepeat=this._handleScrollRepeat.bind(this),this._handleNextButtonMouseDown=this._handleNextButtonMouseDown.bind(this),this._handlePreviousButtonMouseDown=this._handlePreviousButtonMouseDown.bind(this),this._handleScrollButtonMouseDown=this._handleScrollButtonMouseDown.bind(this),this._handleScrollButtonMouseUp=this._handleScrollButtonMouseUp.bind(this),this._handleScrollEvent=this._handleScrollEvent.bind(this),this.tabNextButton.on("mousedown",this._handleNextButtonMouseDown),this.tabPreviousButton.on("mousedown",this._handlePreviousButtonMouseDown),this.tabsContainer.on("scroll",this._handleScrollEvent),this.layoutManager.on("itemPickedUp",this._handleItemPickedUp),this.layoutManager.on("itemDropped",this._handleItemDropped),this.tabsContainer.before(this.tabPreviousButton),this.tabPreviousButton=this.tabPreviousButton.find(">:first-child"),this.tabPreviousButton.hide(),this._showAdditionalTabsDropdown=this._showAdditionalTabsDropdown.bind(this),this._hideAdditionalTabsDropdown=this._hideAdditionalTabsDropdown.bind(this),this._tabControlOffset=(i=this.layoutManager.config.settings)===null||i===void 0?void 0:i.tabControlOffset,this._createControls()}createTab(e,t){for(var r=0;r<this.tabs.length;r++)if(this.tabs[r].contentItem===e)return;var i=new Xn(this,e);if(this.tabs.length===0){this.tabs.push(i),this.tabsContainer.append(i.element);return}t===void 0&&(t=this.tabs.length),t>0?this.tabs[t-1].element.after(i.element):this.tabs[0].element.before(i.element),this.tabs.splice(t,0,i),this._updateTabSizes()}removeTab(e){for(var t=0;t<this.tabs.length;t++)if(this.tabs[t].contentItem===e){this.tabs[t]._$destroy(),this.tabs.splice(t,1);return}throw new Error("contentItem is not controlled by this header")}setActiveContentItem(e){for(var t,r,i,o,a=0;a<this.tabs.length;a++)o=this.tabs[a].contentItem===e,this.tabs[a].setActive(o),o===!0&&(this.activeContentItem=e,this.parent.config.activeItemIndex=a);(t=this.tabs[(i=this.parent.config.activeItemIndex)!==null&&i!==void 0?i:0].element.get(0))===null||t===void 0||(r=t.scrollIntoView)===null||r===void 0||r.call(t,{inline:"nearest"}),this._hideAdditionalTabsDropdown(),this._updateTabSizes(),this.parent.emitBubblingEvent("stateChanged")}position(e){var t=this.parent._header.show;return t&&!this.parent._side&&(t="top"),e!==void 0&&this.parent._header.show!==e&&(this.parent._header.show=e,this.parent._setupHeaderPosition()),t}_attachWheelListener(){var e;(e=this.tabsContainer.get(0))===null||e===void 0||e.addEventListener("wheel",this._handleWheelEvent,{passive:!0})}_detachWheelListener(){var e;(e=this.tabsContainer.get(0))===null||e===void 0||e.removeEventListener("wheel",this._handleWheelEvent)}_handleWheelEvent(e){var t=e.currentTarget;if(t instanceof HTMLElement){var r=Math.abs(e.deltaY)>Math.abs(e.deltaX)?e.deltaY:e.deltaX;if(e.deltaMode===WheelEvent.DOM_DELTA_PAGE){var i;r*=(i=this.tabsContainer.innerWidth())!==null&&i!==void 0?i:1}else e.deltaMode===WheelEvent.DOM_DELTA_LINE&&(r*=100/3);t.scrollLeft+=Math.round(r)}}_handleScrollEvent(){this._checkScrollArrows()}_handleItemPickedUp(){this.isDraggingTab=!0,this.isDropdownShown&&this._hideAdditionalTabsDropdown(),this.controlsContainer.on("mouseenter",this._handleNextMouseEnter),this.tabPreviousButton.on("mouseenter",this._handlePreviousMouseEnter)}_handleItemDropped(){var e;this.isDraggingTab=!1,window.cancelAnimationFrame((e=this.rAF)!==null&&e!==void 0?e:-1),this.rAF=null,this.controlsContainer.off("mouseenter",this._handleNextMouseEnter),this.controlsContainer.off("mouseleave",this._handleNextMouseLeave),this.tabPreviousButton.off("mouseenter",this._handlePreviousMouseEnter),this.tabPreviousButton.off("mouseleave",this._handlePreviousMouseLeave)}_handleNextMouseEnter(){var e;this.controlsContainer.on("mouseleave",this._handleNextMouseLeave),this._handleScrollRepeat(this.SCROLL_RIGHT,(e=this.tabsContainer.scrollLeft())!==null&&e!==void 0?e:0)}_handlePreviousMouseEnter(){var e;this.tabPreviousButton.on("mouseleave",this._handlePreviousMouseLeave),this._handleScrollRepeat(this.SCROLL_LEFT,(e=this.tabsContainer.scrollLeft())!==null&&e!==void 0?e:0)}_handleNextMouseLeave(){var e;window.cancelAnimationFrame((e=this.rAF)!==null&&e!==void 0?e:-1),this.rAF=null,this.controlsContainer.off("mouseleave",this._handleNextMouseLeave)}_handlePreviousMouseLeave(){var e;window.cancelAnimationFrame((e=this.rAF)!==null&&e!==void 0?e:-1),this.rAF=null,this.tabPreviousButton.off("mouseleave",this._handlePreviousMouseLeave)}_handleNextButtonMouseDown(){for(var e,t=0;t<this.tabs.length;t+=1){var r,i,o,a,s;if(((r=(i=this.tabs[t].element.get(0))===null||i===void 0?void 0:i.offsetLeft)!==null&&r!==void 0?r:0)>((o=(a=this.tabsContainer.get(0))===null||a===void 0?void 0:a.offsetWidth)!==null&&o!==void 0?o:0)+((s=this.tabsContainer.scrollLeft())!==null&&s!==void 0?s:0)){e=this.tabs[t].element.get(0);break}}if(e)e.scrollIntoView({behavior:"smooth",inline:"nearest"}),this._handleScrollButtonMouseDown(this.SCROLL_RIGHT);else{var l=this.tabsContainer.get(0);if(l){var u,c;l.scrollLeft=(u=(c=this.tabsContainer.get(0))===null||c===void 0?void 0:c.scrollWidth)!==null&&u!==void 0?u:0}}}_handlePreviousButtonMouseDown(){for(var e,t=this.tabs.length-1;t>=0;t-=1){var r,i,o;if(((r=(i=this.tabs[t].element.get(0))===null||i===void 0?void 0:i.offsetLeft)!==null&&r!==void 0?r:0)<((o=this.tabsContainer.scrollLeft())!==null&&o!==void 0?o:0)){e=this.tabs[t].element.get(0);break}}if(e)e.scrollIntoView({behavior:"smooth",inline:"start"}),this._handleScrollButtonMouseDown(this.SCROLL_LEFT);else{var a=this.tabsContainer.get(0);a&&(a.scrollLeft=0)}}_handleScrollButtonMouseDown(e){this.holdTimer=window.setTimeout(()=>{var t;this._handleScrollRepeat(e,(t=this.tabsContainer.scrollLeft())!==null&&t!==void 0?t:0,100)},this.CLICK_TIMEOUT),window.addEventListener("mouseup",this._handleScrollButtonMouseUp)}_handleScrollButtonMouseUp(){var e,t;clearTimeout((e=this.holdTimer)!==null&&e!==void 0?e:-1),this.holdTimer=null,cancelAnimationFrame((t=this.rAF)!==null&&t!==void 0?t:-1),this.rAF=null,window.removeEventListener("mouseup",this._handleScrollButtonMouseUp)}_checkScrollArrows(){var e,t,r;this.tabsContainer.scrollLeft()===0?this.tabPreviousButton.first().prop("disabled",!0):((e=this.tabsContainer.scrollLeft())!==null&&e!==void 0?e:0)+((t=this.tabsContainer.innerWidth())!==null&&t!==void 0?t:0)===((r=this.tabsContainer.get(0))===null||r===void 0?void 0:r.scrollWidth)?this.tabNextButton.prop("disabled",!0):(this.tabNextButton.prop("disabled",!1),this.tabPreviousButton.first().prop("disabled",!1))}_handleScrollRepeat(e,t){var r,i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,o=arguments.length>3?arguments[3]:void 0,a=this.tabsContainer.get(0);if(a){var s=a.getBoundingClientRect();if(e===this.SCROLL_LEFT){if(this.tabsContainer.scrollLeft(t-i),this.isDraggingTab&&this.parent._highlightHeaderDropZone(s.left-1),this.tabsContainer.scrollLeft()===0){this._checkScrollArrows();return}}else if(e===this.SCROLL_RIGHT){var l,u;if(this.tabsContainer.scrollLeft(t+i),this.isDraggingTab&&this.parent._highlightHeaderDropZone(s.right+1),((l=this.tabsContainer.scrollLeft())!==null&&l!==void 0?l:0)+((u=this.tabsContainer.innerWidth())!==null&&u!==void 0?u:0)===a.scrollWidth){this._checkScrollArrows();return}}window.cancelAnimationFrame((r=this.rAF)!==null&&r!==void 0?r:-1),this.rAF=window.requestAnimationFrame(c=>{var m,p,f=o||c,v=c-f,g=this.START_SPEED*v+.5*this.ACCELERATION*(v*v);g=Math.min(g,(m=(p=this.tabsContainer.get(0))===null||p===void 0?void 0:p.scrollWidth)!==null&&m!==void 0?m:1/0),this._handleScrollRepeat(e,t,g,f)})}}_$setClosable(e){return this.closeButton&&this._isClosable()?(this.closeButton.element[e?"show":"hide"](),!0):!1}_$destroy(){this.emit("destroy",this);for(var e=0;e<this.tabs.length;e++)this.tabs[e]._$destroy();this._detachWheelListener(),this._handleItemDropped(),x(document).off("mouseup",this._hideAdditionalTabsDropdown),this.tabDropdownSearch.off("input",this._handleFilterInput),this.tabDropdownSearch.off("keydown",this._handleFilterKeydown),this.element.remove()}_getHeaderSetting(e){if(e in this.parent._header)return this.parent._header[e]}_createControls(){var e,t,r,i,o;if(o=this.layoutManager.config.labels.tabDropdown,this.layoutManager.config.labels.tabNextLabel,this.layoutManager.config.labels.tabPreviousLabel,this.tabDropdownButton=new An(this,o,"lm_tabdropdown",this._showAdditionalTabsDropdown),this.tabDropdownButton.element.hide(),this.controlsContainer.prepend(this.tabNextButton),this.tabNextButton.hide(),this._getHeaderSetting("popout")&&(t=this._onPopoutClick.bind(this),r=this._getHeaderSetting("popout"),new An(this,r,"lm_popout",t)),this._getHeaderSetting("maximise")){i=this.parent.toggleMaximise.bind(this.parent);var a=this._getHeaderSetting("maximise"),s=this._getHeaderSetting("minimise"),l=new An(this,a,"lm_maximise",i);this.parent.on("maximised",function(){l.element.attr("title",s??"")}),this.parent.on("minimised",function(){l.element.attr("title",a??"")})}this._isClosable()&&(e=this.parent.remove.bind(this.parent),r=this._getHeaderSetting("close"),this.closeButton=new An(this,r,"lm_close",e))}_showAdditionalTabsDropdown(){if(this.isDropdownShown){this._hideAdditionalTabsDropdown();return}this.tabDropdownList=this.tabsContainer.clone(!0).appendTo(this.tabDropdownContainer).children().removeClass("lm_active"),x(document.body).append(this.tabDropdownContainer),this.tabDropdownContainer.show(),this.isDropdownShown=!0,this.element.addClass("lm_dropdown_open"),this.tabDropdownSearch.val("").focus(),this.dropdownKeyIndex=0,this.tabDropdownList.eq(this.dropdownKeyIndex).addClass("lm_keyboard_active"),x(document).on("mousedown",this._hideAdditionalTabsDropdown),this._updateAdditionalTabsDropdown()}_handleFilterKeydown(e){if(e.key==="Escape"){this._hideAdditionalTabsDropdown();return}if(this.dropdownKeyIndex===-1)return;if(e.key==="Enter"||e.key===" "){this._hideAdditionalTabsDropdown(),this.tabs[this.dropdownKeyIndex]._onTabClick();return}function t(s,l,u){if(u==null||u.length<2)return-1;for(var c=(s+l+u.length)%u.length;c!==s;){if(u.eq(c).css("display")!=="none")return c;c=(c+l+u.length)%u.length}return s}if(e.key==="ArrowDown"||e.key==="Tab"&&e.shiftKey===!1){var r,i;e.preventDefault(),(r=this.tabDropdownList)===null||r===void 0||r.eq(this.dropdownKeyIndex).removeClass("lm_keyboard_active"),this.dropdownKeyIndex=t(this.dropdownKeyIndex,1,this.tabDropdownList),(i=this.tabDropdownList)===null||i===void 0||i.eq(this.dropdownKeyIndex).addClass("lm_keyboard_active")}else if(e.key==="ArrowUp"||e.key==="Tab"){var o,a;e.preventDefault(),(o=this.tabDropdownList)===null||o===void 0||o.eq(this.dropdownKeyIndex).removeClass("lm_keyboard_active"),this.dropdownKeyIndex=t(this.dropdownKeyIndex,-1,this.tabDropdownList),(a=this.tabDropdownList)===null||a===void 0||a.eq(this.dropdownKeyIndex).addClass("lm_keyboard_active")}}_handleFilterInput(e){if(this.tabDropdownList!=null){this.tabDropdownList.eq(this.dropdownKeyIndex).removeClass("lm_keyboard_active"),this.dropdownKeyIndex=-1;for(var t=0;t<this.tabDropdownList.length;t++){var r,i;((r=(i=this.tabs[t].contentItem.config.title)===null||i===void 0?void 0:i.toLowerCase().indexOf(e.target.value.toLowerCase()))!==null&&r!==void 0?r:-1)!==-1?(this.tabDropdownList.eq(t).css("display",""),this.dropdownKeyIndex===-1&&(this.dropdownKeyIndex=t)):this.tabDropdownList.eq(t).css("display","none")}this.dropdownKeyIndex!==-1&&this.tabDropdownList.eq(this.dropdownKeyIndex).addClass("lm_keyboard_active")}}_hideAdditionalTabsDropdown(e){var t,r;this.isDropdownShown&&(e&&(t=this.tabDropdownContainer.get(0))!==null&&t!==void 0&&t.contains(e.target)||e&&((r=this.tabDropdownButton)===null||r===void 0?void 0:r.element.get(0))===e.target||(this.element.removeClass("lm_dropdown_open"),this.tabDropdownContainer.hide(),this.isDropdownShown=!1,this.element.append(this.tabDropdownContainer),this.tabDropdownContainer.find(".lm_tabs").remove(),x(document).off("mousedown",this._hideAdditionalTabsDropdown)))}_updateAdditionalTabsDropdown(){var e,t,r,i;if(this.isDropdownShown&&!(!this.tabDropdownList||this.tabDropdownList.length==0)){var o=(e=(t=this.tabDropdownContainer.get(0))===null||t===void 0?void 0:t.scrollHeight)!==null&&e!==void 0?e:0;if(o!==0){var a=this.tabDropdownContainer[0].getBoundingClientRect(),s=(r=x(window).height())!==null&&r!==void 0?r:0,l=(i=x(window).width())!==null&&i!==void 0?i:0;if(this.tabDropdownButton){var u=this.tabDropdownButton.element[0].getBoundingClientRect(),c=o<s-u.bottom,m=!c&&u.bottom>s*.6,p=Math.min(u.left+(m?u.width:0),l-a.width-this.PADDING),f=m?Math.max(u.top-o,this.PADDING):u.bottom,v=s-f-this.PADDING;this.tabDropdownContainer.css({"max-height":v,top:f,left:p})}}}}_isClosable(){return!!(this.parent.config.isClosable&&this.layoutManager.config.settings.showCloseIcon)}_onPopoutClick(){if(this.layoutManager.config.settings.popoutWholeStack===!0)this.parent.popout();else{var e;(e=this.activeContentItem)===null||e===void 0||e.popout()}}_onHeaderClick(e){e.target===this.element[0]&&this.parent.select()}_updateTabSizes(){if(this.tabs.length!==0){var e=this.tabsContainer.get(0);if(this.isDropdownShown&&this._updateAdditionalTabsDropdown(),!!e){if(!this.isOverflowing&&e.scrollWidth>e.clientWidth){var t;(t=this.tabDropdownButton)===null||t===void 0||t.element.show(),this.tabNextButton.show(),this.tabPreviousButton.show(),this.isOverflowing=!0}else if(this.isOverflowing&&e.scrollWidth<=e.clientWidth){var r;(r=this.tabDropdownButton)===null||r===void 0||r.element.hide(),this.tabNextButton.hide(),this.tabPreviousButton.hide(),this.isOverflowing=!1}this.isOverflowing&&this._checkScrollArrows()}}}}q(Ot,"_template",['<div class="lm_header">','<ul class="lm_tabs"></ul>','<ul class="lm_controls"></ul>','<ul class="lm_tabdropdown_list">','<li class="lm_tabdropdown_search"><input type="text" placeholder="Find tab..."></li>',"</ul>","</div>"].join(""));q(Ot,"_previousButtonTemplate",['<ul class="lm_controls">','<li class="lm_tabpreviousbutton"></li>',"</ul>"].join(""));q(Ot,"_nextButtonTemplate",['<li class="lm_tabnextbutton"></li>'].join(""));function jn(n,e,t){return(e=Kf(e))in n?Object.defineProperty(n,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):n[e]=t,n}function Kf(n){var e=zf(n,"string");return typeof e=="symbol"?e:e+""}function zf(n,e){if(typeof n!="object"||!n)return n;var t=n[Symbol.toPrimitive];if(t!==void 0){var r=t.call(n,e);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(n)}class Xl{constructor(e,t,r){jn(this,"_isVertical",void 0),jn(this,"_size",void 0),jn(this,"_grabSize",void 0),jn(this,"_dragListener",void 0),jn(this,"element",void 0),this._isVertical=e,this._size=t,this._grabSize=r<t?t:r,this.element=this._createElement(),this._dragListener=new Gn(this.element)}on(e,t,r){var i;(i=this._dragListener)===null||i===void 0||i.on(e,t,r)}_$destroy(){var e;(e=this._dragListener)===null||e===void 0||e.destroy(),this._dragListener=null,this.element.remove()}_createElement(){var e=x('<div class="lm_drag_handle"></div>'),t=x('<div class="lm_splitter"></div>');t.append(e);var r=this._grabSize-this._size,i=r/2;return this._isVertical?(e.css("top",-i),e.css("height",this._size+r),t.addClass("lm_vertical"),t.height(this._size)):(e.css("left",-i),e.css("width",this._size+r),t.addClass("lm_horizontal"),t.width(this._size)),t}}const Vf=Object.freeze(Object.defineProperty({__proto__:null,BrowserPopout:Wl,DragProxy:an,DragSource:Kl,DragSourceFromEvent:zl,DropTargetIndicator:qn,Header:Ot,HeaderButton:An,Splitter:Xl,Tab:Xn},Symbol.toStringTag,{value:"Module"}));var Gf={config:Mp,container:Lp,controls:Vf,errors:mf,items:Ff,utils:Zp};function la(n,e){var t=Object.keys(n);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(n);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(n,i).enumerable})),t.push.apply(t,r)}return t}function Be(n){for(var e=1;e<arguments.length;e++){var t=arguments[e]!=null?arguments[e]:{};e%2?la(Object(t),!0).forEach(function(r){Y(n,r,t[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(t)):la(Object(t)).forEach(function(r){Object.defineProperty(n,r,Object.getOwnPropertyDescriptor(t,r))})}return n}function Y(n,e,t){return(e=qf(e))in n?Object.defineProperty(n,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):n[e]=t,n}function qf(n){var e=Xf(n,"string");return typeof e=="symbol"?e:e+""}function Xf(n,e){if(typeof n!="object"||!n)return n;var t=n[Symbol.toPrimitive];if(t!==void 0){var r=t.call(n,e);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(n)}var ua=["column","row","stack","component"];class Li extends He{static isLayoutItemConfig(e){return ua.includes(e.type)}static minifyConfig(e){return ki(e)}static unminifyConfig(e){return gi(e)}constructor(e,t){super(),Y(this,"isInitialised",!1),Y(this,"_isFullPage",!1),Y(this,"_resizeTimeoutId",void 0),Y(this,"_components",{"lm-react-component":Rl}),Y(this,"_fallbackComponent",void 0),Y(this,"_itemAreas",[]),Y(this,"_maximisedItem",null),Y(this,"_maximisePlaceholder",x('<div class="lm_maximise_place"></div>')),Y(this,"_creationTimeoutPassed",!1),Y(this,"_subWindowsCreated",!1),Y(this,"_dragSources",[]),Y(this,"_updatingColumnsResponsive",!1),Y(this,"_firstLoad",!0),Y(this,"_reactChildMap",new Map),Y(this,"_reactChildren",null),Y(this,"_initialHeaderHeight",void 0),Y(this,"width",null),Y(this,"height",null),Y(this,"root",void 0),Y(this,"openPopouts",[]),Y(this,"selectedItem",null),Y(this,"isSubWindow",!1),Y(this,"eventHub",new $l(this)),Y(this,"config",void 0),Y(this,"container",void 0),Y(this,"_originalContainer",void 0),Y(this,"dropTargetIndicator",null),Y(this,"tabDropPlaceholder",x('<div class="lm_drop_tab_placeholder"></div>')),this._onResize=this._onResize.bind(this),this._onUnload=this._onUnload.bind(this),this._windowBlur=this._windowBlur.bind(this),this._windowFocus=this._windowFocus.bind(this),this._windowKeydown=this._windowKeydown.bind(this),this.config=this._createConfig(e),this._originalContainer=t,this.container=this._getContainer(),this._initialHeaderHeight=this.config.dimensions.headerHeight,this.isSubWindow&&x("body").css("visibility","hidden")}registerComponent(e,t){if(typeof t!="function"&&(t==null||t.render==null||typeof t.render!="function"))throw new Error("Please register a constructor function");if(this._components[e]!==void 0)throw new Error("Component "+e+" is already registered");this._components[e]=t;var r=()=>{if(this._components[e]===void 0)throw new Error("Component "+e+" is not registered");delete this._components[e]};return r}setFallbackComponent(e){this._fallbackComponent=e}toConfig(e){if(this.isInitialised===!1)throw new Error("Can't create config, layout not yet initialised");if(e&&!(e instanceof Pe))throw new Error("Root must be a ContentItem");var t={settings:Be({},this.config.settings),dimensions:Be({},this.config.dimensions),labels:Be({},this.config.labels),content:[]},r=function(a,s){for(var l in s.config)l!=="content"&&(a[l]=s.config[l]);if(a.componentName==="lm-react-component"&&(a.type="react-component"),s.contentItems.length){a.content=[];for(var u=0;u<s.contentItems.length;u++)a.content[u]={},r(a.content[u],s.contentItems[u])}};e?r(t,{contentItems:[e]}):r(t,this.root),this._$reconcilePopoutWindows(),t.openPopouts=[];for(var i=0;i<this.openPopouts.length;i++)t.openPopouts.push(this.openPopouts[i].toConfig());return t.maximisedItemId=this._maximisedItem?"__glMaximised":void 0,t}getComponent(e){return this._components[e]}getFallbackComponent(){return this._fallbackComponent}init(){if(this._subWindowsCreated===!1&&(this._createSubWindows(),this._subWindowsCreated=!0),document.readyState==="loading"||document.body===null){x(document).ready(this.init.bind(this));return}if(this.isSubWindow===!0&&this._creationTimeoutPassed===!1){setTimeout(this.init.bind(this),7),this._creationTimeoutPassed=!0;return}this.isSubWindow===!0&&this._adjustToWindowMode(),this._setContainer(),this.dropTargetIndicator=new qn,this.updateSize(),this._create(this.config),this._bindEvents(),this.isInitialised=!0,this._adjustColumnsResponsive(),this.emit("initialised")}addReactChild(e,t){this._reactChildMap.set(e,t),this._reactChildren=[...this._reactChildMap.values()],this.emit("reactChildrenChanged")}removeReactChild(e,t){var r=this._reactChildMap.get(e);r===t&&(this._reactChildMap.delete(e),this._reactChildren=[...this._reactChildMap.values()],this.emit("reactChildrenChanged"))}getReactChildren(){return this._reactChildren}enableHeaders(){this.config.settings.hasHeaders=!0,this.config.dimensions.headerHeight=this._initialHeaderHeight,this._findAllStackContainers().forEach(e=>{e._header.show=!0,e.header.element.toggle(!0)}),this.updateSize()}disableHeaders(){this.config.settings.hasHeaders=!1,this.config.dimensions.headerHeight=0,this._findAllStackContainers().forEach(e=>{e._header.show=!1,e.header.element.toggle(!1)}),this.updateSize()}updateSize(e,t){var r,i;if(this.width=(r=e??this.container.width())!==null&&r!==void 0?r:0,this.height=(i=t??this.container.height())!==null&&i!==void 0?i:0,this.isInitialised===!0){if(this.root.callDownwards("setSize",[this.width,this.height]),this._maximisedItem){var o,a;this._maximisedItem.element.width((o=this.container.width())!==null&&o!==void 0?o:0),this._maximisedItem.element.height((a=this.container.height())!==null&&a!==void 0?a:0),this._maximisedItem.callDownwards("setSize")}this._adjustColumnsResponsive()}}destroy(){var e;this.isInitialised===!1||!this.root||(this._onUnload(),x(window).off("resize",this._onResize),x(window).off("unload beforeunload",this._onUnload),x(window).off("blur.lm").off("focus.lm"),x(window).off("keydown",this._windowKeydown),this.root.callDownwards("_$destroy",[],!0),this.root.contentItems=[],this.tabDropPlaceholder.remove(),(e=this.dropTargetIndicator)===null||e===void 0||e.destroy(),this.eventHub.destroy(),this._dragSources.forEach(function(t){t._dragListener.destroy()}),this._dragSources=[])}createContentItem(e,t){var r,i;if(typeof e.type!="string")throw new Jt("Missing parameter 'type'",e);if(e.type==="react-component"&&(e.type="component",e.componentName="lm-react-component"),!Li.isLayoutItemConfig(e))throw i="Unknown type '"+e.type+"'. Valid types are "+ua.join(","),new Jt(i);return e.type==="component"&&!(t instanceof Si)&&t&&!(this.isSubWindow===!0&&t instanceof Ci)&&(e={type:"stack",width:e.width,height:e.height,content:[e]}),e.id=(r=e.id)!==null&&r!==void 0?r:wr(),e.type==="stack"?new Si(this,e,t):e.type==="row"?new Fn(!1,this,e,t):e.type==="column"?new Fn(!0,this,e,t):new ql(this,e,t)}createPopout(e,t,r,i){var o=[],a=e instanceof Pe,s=this;if(a){var l;o=this.toConfig(e).content,r=wr();for(var u=e.parent,c=e;((m=u)===null||m===void 0?void 0:m.contentItems.length)===1&&!u.isRoot;){var m;c=u,u=u.parent}if((l=u)===null||l===void 0||l.addId(r),i==null||Number.isNaN(i)){var p;i=(p=u)===null||p===void 0?void 0:p.contentItems.indexOf(c)}}else e instanceof Array?o=e:o=[e];if(!t&&a){var f,v,g,b=window.screenX||window.screenLeft,y=window.screenY||window.screenTop,C=(f=e.element.offset())!==null&&f!==void 0?f:{left:0,top:0};t={left:b+C.left,top:y+C.top,width:(v=e.element.width())!==null&&v!==void 0?v:0,height:(g=e.element.height())!==null&&g!==void 0?g:0}}if(!t&&!a&&(t={left:window.screenX||window.screenLeft+20,top:window.screenY||window.screenTop+20,width:500,height:309}),a&&e.remove(),!(!t||!r||i===void 0)){var S=new Wl(o,t,r,i,this);return S.on("initialised",function(){s.emit("windowOpened",S)}),S.on("closed",function(){s._$reconcilePopoutWindows()}),this.openPopouts.push(S),S}}createDragSource(e,t){this.config.settings.constrainDragToContainer=!1;var r=new Kl(e,t,this);return this._dragSources.push(r),r}createDragSourceFromEvent(e,t){return this.config.settings.constrainDragToContainer=!1,new zl(e,this,t)}selectItem(e,t){if(this.config.settings.selectionEnabled!==!0)throw new Error("Please set selectionEnabled to true to use this feature");e!==this.selectedItem&&(this.selectedItem!==null&&this.selectedItem.deselect(),e&&t!==!0&&e.select(),this.selectedItem=e,this.emit("selectionChanged",e))}_$maximiseItem(e){var t,r;this._maximisedItem!==null&&this._$minimiseItem(this._maximisedItem),this._maximisedItem=e,this._maximisedItem.addId("__glMaximised"),e.element.addClass("lm_maximised"),e.element.after(this._maximisePlaceholder),this.root.element.prepend(e.element),e.element.width((t=this.container.width())!==null&&t!==void 0?t:0),e.element.height((r=this.container.height())!==null&&r!==void 0?r:0),e.callDownwards("setSize"),this._maximisedItem.emit("maximised"),this.emit("stateChanged")}_$minimiseItem(e){var t;e.element.removeClass("lm_maximised"),e.removeId("__glMaximised"),this._maximisePlaceholder.after(e.element),this._maximisePlaceholder.remove(),(t=e.parent)===null||t===void 0||t.callDownwards("setSize"),this._maximisedItem=null,e.emit("minimised"),this.emit("stateChanged")}_$closeWindow(){window.setTimeout(function(){window.close()},1)}_$getArea(e,t){for(var r=1/0,i=null,o=0;o<this._itemAreas.length;o++){var a=this._itemAreas[o];e>a.x1&&e<a.x2&&t>a.y1&&t<a.y2&&r>a.surface&&(r=a.surface,i=a)}return i}_$createRootItemAreas(){var e=50,t=Be({},this.root._$getArea()),r=[Be(Be({},t),{},{side:"left",x2:t.x1+e}),Be(Be({},t),{},{side:"right",x1:t.x2-e}),Be(Be({},t),{},{side:"top",y2:t.y1+e}),Be(Be({},t),{},{side:"bottom",y1:t.y2-e})];r.forEach(i=>{i.surface=(i.x2-i.x1)*(i.y2-i.y1)}),this._itemAreas.push(...r)}_$calculateItemAreas(){var e=this._getAllContentItems();if(this._itemAreas=[],e.length===1){this._itemAreas.push(this.root._$getArea());return}this._$createRootItemAreas();for(var t=0;t<e.length;t++){var r=e[t];if(tn(r)){var i=r._$getArea();if(i!==null)if(i instanceof Array)this._itemAreas=this._itemAreas.concat(i);else{var o;this._itemAreas.push(i);var a=Be(Be({},i),(o=i.contentItem._contentAreaDimensions)===null||o===void 0?void 0:o.header.highlightArea);a.surface=(a.x2-a.x1)*(a.y2-a.y1),this._itemAreas.push(a)}}}}_$normalizeContentItem(e,t){if(!e)throw new Error("No content item defined");if(typeof e=="function"&&(e=e()),e instanceof Pe)return e;if(x.isPlainObject(e)&&e.type){var r=this.createContentItem(e,t??null);return r.callDownwards("_$init"),r}else throw new Error("Invalid contentItem")}_$reconcilePopoutWindows(){for(var e=[],t=0;t<this.openPopouts.length;t++){var r;((r=this.openPopouts[t].getWindow())===null||r===void 0?void 0:r.closed)===!1?e.push(this.openPopouts[t]):this.emit("windowClosed",this.openPopouts[t])}this.openPopouts.length!==e.length&&(this.emit("stateChanged"),this.openPopouts=e)}_getAllContentItems(){var e=[],t=r=>{if(e.push(r),r.contentItems instanceof Array)for(var i=0;i<r.contentItems.length;i++)t(r.contentItems[i])};return t(this.root),e}_bindEvents(){this._isFullPage&&x(window).resize(this._onResize),x(window).on("unload beforeunload",this._onUnload).on("blur.lm",this._windowBlur).on("focus.lm",this._windowFocus).on("keydown",this._windowKeydown)}_windowBlur(){this.root.element.addClass("lm_window_blur")}_windowFocus(){this.root.element.removeClass("lm_window_blur")}_windowKeydown(e){if(e.key==="Escape"&&this._maximisedItem!==null){var t=document.activeElement;if(t&&(t.tagName==="INPUT"||t.tagName==="TEXTAREA"||t.tagName==="SELECT"||t.isContentEditable))return;this._maximisedItem.toggleMaximise()}}_onResize(){clearTimeout(this._resizeTimeoutId),this._resizeTimeoutId=window.setTimeout(this.updateSize.bind(this),100)}_createConfig(e){var t,r=Ll("gl-window");r&&(this.isSubWindow=!0,e=JSON.parse(localStorage.getItem(r)||"{}"),e=gi(e),localStorage.removeItem(r));var i=x.extend(!0,{},jl,e),o=function(s){for(var l in s){var u=s[l];l!=="props"&&typeof u=="object"&&u!=null?o(u):l==="type"&&u==="react-component"&&(s.type="component",s.componentName="lm-react-component")}};return o(i),((t=i.settings)===null||t===void 0?void 0:t.hasHeaders)===!1&&(i.dimensions.headerHeight=0),i}_adjustToWindowMode(){var e,t=x('<div class="lm_popin" title="'+this.config.labels.popin+'"><div class="lm_icon"></div><div class="lm_bg"></div></div>');t.click(()=>{this.emit("popIn")}),document.title=Ai((e=this.config.content[0].title)!==null&&e!==void 0?e:""),x("head").append(x("body link, body style, template, .gl_keep")),this.container=x("body").html("").css("visibility","visible").append(t),document.body.offsetHeight,window.__glInstance=this}_createSubWindows(){if(this.config.openPopouts)for(var e=0;e<this.config.openPopouts.length;e++){var t=this.config.openPopouts[e];this.createPopout(t.content,t.dimensions,t.parentId,t.indexInParent)}}_getContainer(){var e=this._originalContainer?x(this._originalContainer):x("body");if(e.length===0)throw new Error("GoldenLayout container not found");if(e.length>1)throw new Error("GoldenLayout more than one container element specified");return e}_setContainer(){var e=this._getContainer();e[0]===document.body&&(this._isFullPage=!0,x("html, body").css({height:"100%",margin:0,padding:0,overflow:"hidden"})),this.container=e}_create(e){var t;if(!(e.content instanceof Array))throw e.content===void 0?t="Missing setting 'content' on top level of configuration":t="Configuration parameter 'content' must be an array",new Jt(t,e);if(e.content.length>1)throw t="Top level content can't contain more then one element.",new Jt(t,e);this.root=new Ci(this,{content:e.content},this.container),this.root.callDownwards("_$init"),e.maximisedItemId==="__glMaximised"&&this.root.getItemsById(e.maximisedItemId)[0].toggleMaximise()}_onUnload(){if(this.config.settings.closePopoutsOnUnload===!0)for(var e=0;e<this.openPopouts.length;e++)this.openPopouts[e].close()}_adjustColumnsResponsive(){if(!this._useResponsiveLayout()||this._updatingColumnsResponsive||!this.config.dimensions||!this.config.dimensions.minItemWidth||this.root.contentItems.length===0||!this.root.contentItems[0].isRow){this._firstLoad=!1;return}this._firstLoad=!1;var e=this.root.contentItems[0].contentItems.length;if(!(e<=1)){var t=this.config.dimensions.minItemWidth,r=e*t;if(!(this.width==null||r<=this.width)){this._updatingColumnsResponsive=!0;for(var i=Math.max(Math.floor(this.width/t),1),o=e-i,a=this.root.contentItems[0],s=this._findAllStackContainers()[0],l=0;l<o;l++){var u=a.contentItems[a.contentItems.length-1];this._addChildContentItemsToContainer(s,u)}this._updatingColumnsResponsive=!1}}}_useResponsiveLayout(){return this.config.settings&&(this.config.settings.responsiveMode=="always"||this.config.settings.responsiveMode=="onload"&&this._firstLoad)}_addChildContentItemsToContainer(e,t){t.type==="stack"?t.contentItems.forEach(function(r){e.addChild(r),t.removeChild(r,!0)}):t.contentItems.forEach(r=>{this._addChildContentItemsToContainer(e,r)})}_findAllStackContainers(){var e=[];return this._findAllStackContainersRecursive(e,this.root),e}_findAllStackContainersRecursive(e,t){t.contentItems.forEach(r=>{tn(r)?e.push(r):r.isComponent||this._findAllStackContainersRecursive(e,r)})}}Y(Li,"__lm",Gf);const da={"tab-height":"28px","drag-border-width":"5px"},ca=Object.freeze({tabHeight:parseInt(da["tab-height"],10),dragBorderWidth:parseInt(da["drag-border-width"],10)});function ha(n,e){var t=Object.keys(n);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(n);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(n,i).enumerable})),t.push.apply(t,r)}return t}function yt(n){for(var e=1;e<arguments.length;e++){var t=arguments[e]!=null?arguments[e]:{};e%2?ha(Object(t),!0).forEach(function(r){Zl(n,r,t[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(t)):ha(Object(t)).forEach(function(r){Object.defineProperty(n,r,Object.getOwnPropertyDescriptor(t,r))})}return n}function Zl(n,e,t){return(e=Zf(e))in n?Object.defineProperty(n,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):n[e]=t,n}function Zf(n){var e=Yf(n,"string");return typeof e=="symbol"?e:e+""}function Yf(n,e){if(typeof n!="object"||!n)return n;var t=n[Symbol.toPrimitive];if(t!==void 0){var r=t.call(n,e);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(n)}var At=H.module("LayoutUtils");function Yl(n){return n.componentName!==void 0}function Rt(n){var e=n;return(Yl(n)&&n.componentName==="lm-react-component"||n.type==="react-component")&&e.component!==void 0}function dr(n){return n.focus!==void 0}function ma(n){return n.type==="stack"}class T{static activateTab(e,t){var r=T.getStackForRoot(e,t,!1);if(!r){At.error("Could not find stack for config",t);return}var i=T.getContentItemInStack(r,t);i&&r.setActiveContentItem(i)}static isActiveTab(e,t){var r=T.getStackForRoot(e,t,!1);if(!r)return At.error("Could not find stack for config",t),!1;var i=T.getContentItemInStack(r,t),o=r.getActiveContentItem();return o===i}static addStack(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;if(Gl(e)){var r={type:t?"column":"row"};(e.contentItems==null||e.contentItems.length===0)&&e.addChild(r);var i=e.contentItems[0],o=t?i.isColumn:i.isRow;if(!o){e.removeChild(i,!0),e.addChild(r);var a=document.activeElement;e.contentItems[0].addChild(i),a&&a.focus!=null&&a.focus()}return this.addStack(e.contentItems[0],t)}if(e.contentItems.length<2)return e.addChild({type:"stack"}),e.contentItems[e.contentItems.length-1];var s=e.contentItems[e.contentItems.length-1],l=t?s.isRow:s.isColumn;if(!l){var u,c,m=e.layoutManager.createContentItem({type:t?"row":"column",height:(u=s.config)===null||u===void 0?void 0:u.height,width:(c=s.config)===null||c===void 0?void 0:c.width},e);e.replaceChild(s,m),e.contentItems[e.contentItems.length-1].addChild(s),s=e.contentItems[e.contentItems.length-1]}return this.addStack(s,!t)}static getAllStackContainers(e){return e._findAllStackContainers()}static getFocusedStackIndex(e){return e.findIndex(t=>t.header.tabs.some(r=>r.element[0].classList.contains("lm_focusin")))}static getFocusedStack(e){var t=T.getAllStackContainers(e),r=T.getFocusedStackIndex(t);return t[r]}static getStackById(e,t){var r,i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;if(i&&tn(e)&&e.contentItems.length===0)return e;if(t===((r=e.config)===null||r===void 0?void 0:r.id)){if(tn(e))return e;throw new Error("Item with ID ".concat(t," is not a stack"))}if(e.contentItems==null)return null;for(var o=0;o<e.contentItems.length;o+=1){var a=this.getStackById(e.contentItems[o],t,i);if(a)return a}return null}static getContentItemById(e,t){var r;if(((r=e.config)===null||r===void 0?void 0:r.id)===t)return e;if(e.contentItems==null)return null;for(var i=0;i<e.contentItems.length;i+=1){var o=this.getContentItemById(e.contentItems[i],t);if(o)return o}return null}static getStackForConfig(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;if(r&&tn(e)&&e.contentItems.length===0)return e;if(e.contentItems==null)return null;for(var i=0;i<e.contentItems.length;i+=1){var o=e.contentItems[i];if(o.isComponent&&o.config!=null&&ro(o.config,t))return e;var a=this.getStackForConfig(o,t,r);if(a)return a}return null}static getStackForRoot(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!0,o=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!0,a=this.getStackForConfig(e,t);return!a&&i&&(a=this.getStackForConfig(e,{component:t.component},o)),!a&&r&&(a=this.addStack(e)),a}static getStackForComponentTypes(e,t){for(var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!0,o=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!0,a=0;a<t.length;a+=1){var s=t[a],l=a===t.length-1,u=T.getStackForRoot(e,{component:s},r&&l,i,o);if(u)return u}return null}static getContentItemInStack(e,t){if(!e)return null;for(var r=0;r<e.contentItems.length;r+=1){var i=e.contentItems[r];if(i.isComponent&&i.config!=null&&ro(i.config,t))return i}return null}static dehydrateLayoutConfig(e,t){if(e==null||!e.length)return[];for(var r=[],i=0;i<e.length;i+=1){var o=e[i],a=o.content;if(Rt(o)){var s=t(o.component,o);s!=null?r.push(s):At.debug2('dehydrateLayoutConfig: skipping unmapped component "'.concat(o.component,'"'))}else if(a){var l=yt(yt({},o),{},{content:T.dehydrateLayoutConfig(a,t)});r.push(l)}else r.push(o)}return r}static getTabPoint(e){var t=e.tab;if(t==null)throw new Error("Cannot get tab for panel container ".concat(e));var r=t.element[0].getBoundingClientRect();return[r.left+r.width*.5,r.bottom-8]}static dropLayoutMinorChange(e){for(var t=0;t<e.length;t+=1){var r=e[t],i=r.content;i!==void 0?(ma(r)&&delete r.activeItemIndex,T.dropLayoutMinorChange(i)):Rt(r)&&r.component==="IrisGridPanel"&&r.props.panelState!=null&&(delete r.id,r.props.panelState.irisGridState.sorts=[],r.props.panelState.irisGridState.quickFilters=[],r.props.panelState.gridState.isStuckToBottom=!1,r.props.panelState.gridState.isStuckToRight=!1)}}static isEqual(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,i=T.cloneLayout(e),o=T.cloneLayout(t);return r?(T.dropLayoutMinorChange(i),T.dropLayoutMinorChange(o),ai(i,o)):ai(i,o)}static cloneLayout(e){return JSON.parse(JSON.stringify(e))}static hydrateLayoutConfig(e,t){if(e==null||!e.length)return[];for(var r=[],i=0;i<e.length;i+=1){var o=e[i];if(Rt(o)){var a,s=o.component,l=o.props,u=l===void 0?{}:l;r.push(yt(yt({},o),{},{id:(a=o==null?void 0:o.id)!==null&&a!==void 0?a:Pt(),props:t(s,u)}))}else if(o.content!==void 0){var c=T.hydrateLayoutConfig(o.content,t);ma(o)&&o.activeItemIndex!=null&&o.activeItemIndex>=c.length&&(At.warn("Fixing bad activeItemIndex!",o.activeItemIndex,o),o.activeItemIndex=0),r.push(yt(yt({},o),{},{content:c}))}else r.push(o)}return r}static openComponent(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=e.root,r=e.config,i=e.stack,o=i===void 0?void 0:i,a=e.replaceExisting,s=a===void 0?!0:a,l=e.replaceConfig,u=l===void 0?void 0:l,c=e.createNewStack,m=c===void 0?!1:c,p=e.focusElement,f=p===void 0?void 0:p,v=e.dragEvent,g=v===void 0?void 0:v,b=document.activeElement,y=yt({},r);if(y.id==null&&(y.id=Pt()),g!=null){t==null||t.layoutManager.createDragSourceFromEvent(y,g);return}var C=u||{id:y.id,component:y.component};B(t);var S=o??(m?T.addStack(t):T.getStackForRoot(t,C));B(S);var _=T.getContentItemInStack(S,C);if(f!=null){var E=W=>{At.debug("Component created, focusing element",f),S.off("componentCreated",E);var N=W.origin.element;requestAnimationFrame(()=>{T.focusElement(N[0],f)})};S.on("componentCreated",E)}if(s&&_){var D=S.contentItems.indexOf(_);S.addChild(y,D+1),S.removeChild(_),S.setActiveContentItem(S.contentItems[D])}else S.addChild(y);f==null&&b&&dr(b)&&b.focus()}static openComponentInStack(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,i=document.activeElement,o={id:t.id},a=T.getContentItemInStack(e,o);if(r&&a&&e){var s=e==null?void 0:e.contentItems.indexOf(a);e.addChild(t,s+1),e.removeChild(a),e.setActiveContentItem(e.contentItems[s])}else e==null||e.addChild(t);i&&dr(i)&&i.focus()}static closeComponent(e,t,r){var i=T.getStackForRoot(e,t,!1,!1,!1);if(!i){At.warn("Cannot find stack for component, ignoring close",t);return}var o=T.getContentItemInStack(i,t),a=document.activeElement;o&&(ke(o)?o.container.close(r):i.removeChild(o)),a&&document.contains(a)&&dr(a)&&a.focus()}static renameComponent(e,t,r){var i=T.getStackForRoot(e,t,!1);if(!i){At.error("Could not find stack for config",t);return}var o=T.getContentItemInStack(i,t);o&&o.setTitle(r)}static cloneComponent(e,t){var r=T.getStackForRoot(e,t,!1);if(!r)return At.error("Could not find stack for config",t),null;var i=t.props,o=i===void 0?{}:i,a=T.getPanelComponentState(t),s={type:"react-component",component:t.component,props:yt(yt({},o),{},{panelState:a}),title:"".concat(t.title," Copy"),id:Pt()};return T.openComponentInStack(r,s),s}static getPanelComponentState(e){if(Yl(e)){var t;return(t=e.componentState)===null||t===void 0?void 0:t.panelState}if(Rt(e)){var r;return(r=e.props)===null||r===void 0?void 0:r.panelState}return null}static makeDefaultLayout(){return{dimensions:{headerHeight:ca.tabHeight,borderWidth:ca.dragBorderWidth,borderGrabWidth:10},settings:{showPopoutIcon:!1,showCloseIcon:!1,constrainDragToContainer:!1}}}static getRootFromContainer(e){return e.layoutManager.root}static getComponentConfigFromContainer(e){return e?e.tab!=null&&e.tab.contentItem!=null?e.tab.contentItem.config:e._config:null}static getTitleFromContainer(e){return e!=null&&e.tab!=null&&e.tab.contentItem!=null?e.tab.contentItem.config.title:null}static getTitleFromTab(e){return e!=null&&e.contentItem!=null?e.contentItem.config.title:null}static getIdFromContainer(e){var t=T.getComponentConfigFromContainer(e);return t?t.id:null}static getIdFromPanel(e){var t=e.props.glContainer;return T.getIdFromContainer(t)}static getComponentNameFromPanel(e){var t=e.props.glContainer,r=T.getComponentConfigFromContainer(t);if(r&&Rt(r)){var i;return(i=r.component)!==null&&i!==void 0?i:null}return null}static getComponentName(e){var t,r,i=(t=(r=e.WrappedComponent)===null||r===void 0?void 0:r.displayName)!==null&&t!==void 0?t:e.displayName;if(i==null)throw new Error("Component displayName not defined ".concat(e));return i}static focusElement(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:T.DEFAULT_FOCUS_SELECTOR;if(e==null)return null;var r=e.querySelector(t);return r==null?null:(dr(r)&&r.focus(),r)}static onInitialized(e){return new Promise(t=>{if(e.isInitialised){t();return}var r=()=>{e.off("initialised",r),t()};e.on("initialised",r)})}}Zl(T,"DEFAULT_FOCUS_SELECTOR","input, select, textarea, button");var Qf=j.forwardRef((n,e)=>{var t=T.getComponentNameFromPanel({props:n});return d.jsx("div",{ref:e,className:"panel-placeholder",children:d.jsxs("div",{children:['Component "',t,'" is not registered.']})})});Qf.displayName="PanelPlaceholder";var ee=Object.freeze({FOCUS:"PanelEvent.FOCUS",MOUNT:"PanelEvent.MOUNT",UNMOUNT:"PanelEvent.UNMOUNT",TITLE_CHANGED:"PanelEvent.TITLE_CHANGED",REOPEN:"PanelEvent.REOPEN",REOPEN_LAST:"PanelEvent.REOPEN_LAST",DELETE:"PanelEvent.DELETE",CLONED:"PanelEvent.CLONED",CLOSED:"PanelEvent.CLOSED",OPEN:"PanelEvent.OPEN",CLOSE:"PanelEvent.CLOSE",DRAGGING:"PanelEvent.DRAGGING",DROPPED:"PanelEvent.DROPPED"}),Ri=mt(ee.OPEN),tS=Ri.listen,Jf=Ri.emit,nS=Ri.useListener,$i=mt(ee.CLOSE),rS=$i.listen,pa=$i.emit,iS=$i.useListener,Rr=Object.freeze({CYCLE_TO_NEXT_STACK:"NavigationEvent.CYCLE_TO_NEXT_STACK",CYCLE_TO_PREVIOUS_STACK:"NavigationEvent.CYCLE_TO_PREVIOUS_STACK",CYCLE_TO_NEXT_TAB:"NavigationEvent.CYCLE_TO_NEXT_TAB",CYCLE_TO_PREVIOUS_TAB:"NavigationEvent.CYCLE_TO_PREVIOUS_TAB"}),Fi=mt(Rr.CYCLE_TO_NEXT_STACK),ev=Fi.listen,oS=Fi.emit,aS=Fi.useListener,Hi=mt(Rr.CYCLE_TO_PREVIOUS_STACK),tv=Hi.listen,sS=Hi.emit,lS=Hi.useListener,Ui=mt(Rr.CYCLE_TO_NEXT_TAB),nv=Ui.listen,uS=Ui.emit,dS=Ui.useListener,Bi=mt(Rr.CYCLE_TO_PREVIOUS_TAB),rv=Bi.listen,cS=Bi.emit,hS=Bi.useListener;function fa(n,e){var t=Object.keys(n);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(n);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(n,i).enumerable})),t.push.apply(t,r)}return t}function va(n){for(var e=1;e<arguments.length;e++){var t=arguments[e]!=null?arguments[e]:{};e%2?fa(Object(t),!0).forEach(function(r){_t(n,r,t[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(t)):fa(Object(t)).forEach(function(r){Object.defineProperty(n,r,Object.getOwnPropertyDescriptor(t,r))})}return n}function _t(n,e,t){return(e=iv(e))in n?Object.defineProperty(n,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):n[e]=t,n}function iv(n){var e=ov(n,"string");return typeof e=="symbol"?e:e+""}function ov(n,e){if(typeof n!="object"||!n)return n;var t=n[Symbol.toPrimitive];if(t!==void 0){var r=t.call(n,e);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(n)}var Je=H.module("PanelManager"),Zt=function(n){return n[n.Next=0]="Next",n[n.Previous=1]="Previous",n}(Zt||{});class Ql{constructor(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:(s,l)=>l,r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:(s,l)=>l,i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:new Map,o=arguments.length>4&&arguments[4]!==void 0?arguments[4]:[],a=arguments.length>5&&arguments[5]!==void 0?arguments[5]:()=>{};_t(this,"layout",void 0),_t(this,"hydrateComponent",void 0),_t(this,"dehydrateComponent",void 0),_t(this,"onPanelsUpdated",void 0),_t(this,"closed",void 0),_t(this,"openedMap",void 0),_t(this,"navigationEventListenerRemovers",void 0),this.handleFocus=this.handleFocus.bind(this),this.handleMount=this.handleMount.bind(this),this.handleUnmount=this.handleUnmount.bind(this),this.handleReopen=this.handleReopen.bind(this),this.handleReopenLast=this.handleReopenLast.bind(this),this.handleCycleToNextStack=this.handleCycleToNextStack.bind(this),this.handleCycleToPreviousStack=this.handleCycleToPreviousStack.bind(this),this.handleCycleToNextTab=this.handleCycleToNextTab.bind(this),this.handleCycleToPreviousTab=this.handleCycleToPreviousTab.bind(this),this.handleDeleted=this.handleDeleted.bind(this),this.handleClosed=this.handleClosed.bind(this),this.handleControlClose=this.handleControlClose.bind(this),this.layout=e,this.hydrateComponent=t,this.dehydrateComponent=r,this.onPanelsUpdated=a,this.openedMap=new Map(i),this.closed=[...o],this.navigationEventListenerRemovers=[],this.startListening()}startListening(){var e=this.layout.eventHub;e.on(ee.FOCUS,this.handleFocus),e.on(ee.MOUNT,this.handleMount),e.on(ee.UNMOUNT,this.handleUnmount),e.on(ee.REOPEN,this.handleReopen),e.on(ee.REOPEN_LAST,this.handleReopenLast),e.on(ee.DELETE,this.handleDeleted),e.on(ee.CLOSED,this.handleClosed),e.on(ee.CLOSE,this.handleControlClose),this.navigationEventListenerRemovers.push(ev(e,this.handleCycleToNextStack)),this.navigationEventListenerRemovers.push(tv(e,this.handleCycleToPreviousStack)),this.navigationEventListenerRemovers.push(nv(e,this.handleCycleToNextTab)),this.navigationEventListenerRemovers.push(rv(e,this.handleCycleToPreviousTab))}stopListening(){var e=this.layout.eventHub;e.off(ee.FOCUS,this.handleFocus),e.off(ee.MOUNT,this.handleMount),e.off(ee.UNMOUNT,this.handleUnmount),e.off(ee.REOPEN,this.handleReopen),e.off(ee.REOPEN_LAST,this.handleReopenLast),e.off(ee.DELETE,this.handleDeleted),e.off(ee.CLOSED,this.handleClosed),e.off(ee.CLOSE,this.handleControlClose),this.navigationEventListenerRemovers.forEach(t=>t()),this.navigationEventListenerRemovers=[]}getClosedPanelConfigsOfType(e){return this.closed.filter(t=>t.component===e)}getOpenedPanels(){return Array.from(this.openedMap.values())}getOpenedPanelConfigs(){return this.getOpenedPanels().map(e=>{var t=e.props.glContainer;return T.getComponentConfigFromContainer(t)})}getOpenedPanelConfigsOfType(e){return this.getOpenedPanelConfigs().filter(t=>t!=null&&Rt(t)&&t.component===e)}getOpenedPanelById(e){return this.openedMap.get(e)}getContainerByPanelId(e){var t,r=T.getStackForConfig(this.layout.root,{id:e});return(t=r&&T.getContentItemInStack(r,{id:e}))!==null&&t!==void 0?t:null}getLastUsedPanel(e){for(var t=this.getOpenedPanels(),r=t.length-1;r>=0;r-=1){var i=t[r];if(e==null||e(i))return i}}getLastUsedPanelOfType(e){return this.getLastUsedPanelOfTypes([e])}getLastUsedPanelOfTypes(e){return this.getLastUsedPanel(t=>e.some(r=>Sr(r)&&t instanceof r.WrappedComponent||!Sr(r)&&t instanceof r))}updatePanel(e){var t=T.getIdFromPanel(e);if(t==null){Je.error("updatePanel Panel did not have an ID",e);return}Je.debug2("Updating panel ID ".concat(t," in open panels map")),this.openedMap.delete(t),this.openedMap.set(t,e)}removePanel(e){var t=T.getIdFromPanel(e);if(t==null){Je.error("removePanel Panel did not have an ID",e);return}if(!this.openedMap.has(t)){Je.error("Missing panel ID ".concat(t," in open panels map"));return}if(this.openedMap.get(t)!==e){Je.debug("Panel argument doesn't match the open panels map entry for ".concat(t,", removePanel ignored"));return}Je.debug2("Removing panel ID ".concat(t," from open panels map")),this.openedMap.delete(t)}removeClosedPanelConfig(e){var t=this.closed.findIndex(r=>r===e||r.id!=null&&e.id!=null&&r.id===e.id);t>=0&&this.closed.splice(t,1)}handleFocus(e){Je.debug2("Focus: ",e),this.updatePanel(e)}handleMount(e){Je.debug2("Mount: ",e),this.updatePanel(e),this.sendUpdate()}handleUnmount(e){Je.debug2("Unmount: ",e),this.removePanel(e),this.sendUpdate()}cycleStack(e){var t=T.getAllStackContainers(this.layout);if(!(t.length<=1)){var r=T.getFocusedStackIndex(t);if(r===-1){var i=t[0],o=i.config.activeItemIndex,a=o!=null?i.contentItems[o]:i.contentItems[0];i.setActiveContentItem(a,!0);return}var s=e===Zt.Next?(r+1)%t.length:(r-1+t.length)%t.length,l=t[s],u=l.config.activeItemIndex,c=u!=null?l.contentItems[u]:l.contentItems[0];l.setActiveContentItem(c,!0)}}handleCycleToNextStack(){this.cycleStack(Zt.Next)}handleCycleToPreviousStack(){this.cycleStack(Zt.Previous)}cycleTab(e){var t,r=T.getFocusedStack(this.layout);if(r!==void 0){var i=r.contentItems;if(!(i.length<=1)){var o=(t=r.config.activeItemIndex)!==null&&t!==void 0?t:0,a=e===Zt.Next?(o+1)%i.length:(o-1+i.length)%i.length,s=i[a];r.setActiveContentItem(s,!0)}}}handleCycleToNextTab(){this.cycleTab(Zt.Next)}handleCycleToPreviousTab(){this.cycleTab(Zt.Previous)}handleReopen(e,t){Je.debug2("Reopen:",e,t),this.removeClosedPanelConfig(e);var r=e.component,i=e.props;i=this.hydrateComponent(r,i);var o=va(va({},e),{},{props:i}),a=this.layout.root,s=e.parentStackId===void 0?void 0:T.getStackById(a,e.parentStackId);T.openComponent({root:a,config:o,replaceConfig:t,stack:s??void 0})}handleReopenLast(e){var t;if(this.closed.length!==0){if(e===void 0){this.handleReopen(this.closed[this.closed.length-1]);return}for(var r=(t=T.getStackForConfig(this.layout.root,e.getConfig()))===null||t===void 0?void 0:t.config.id,i=this.closed.length-1;i>=0;i-=1){var o=this.closed[i];if(o.parentStackId===r){this.handleReopen(o);return}}}}handleDeleted(e){Je.debug2("Deleted:",e),this.removeClosedPanelConfig(e),this.sendUpdate()}handleClosed(e,t){Je.debug2("Closed: ",e),this.addClosedPanel(t),this.sendUpdate()}handleControlClose(e){var t={id:e},r=this.layout.root;T.closeComponent(r,t)}addClosedPanel(e){var t=T.getComponentConfigFromContainer(e);if(t&&Rt(t)){var r=this.dehydrateComponent(t.component,t);if(r!=null){var i;r.parentStackId=(i=e.tab)===null||i===void 0?void 0:i.header.parent.config.id,this.closed.push(r)}}}sendUpdate(){var e=this.closed,t=this.openedMap;this.onPanelsUpdated({closed:[...e],openedMap:new Map(t)})}}_t(Ql,"MAX_CLOSED_PANEL_COUNT",100);var av=H.module("PanelErrorBoundary");class sv extends h.Component{constructor(e){super(e),this.state={error:null}}componentDidCatch(e){this.setState({error:e})}componentWillUnmount(){var e=this.props,t=e.glContainer,r=e.glEventHub,i=T.getIdFromContainer(t);av.debug("componentWillUnmount",i),r.emit(ee.CLOSED,i,t)}render(){var e=this.props.children,t=this.state.error;return t!=null?d.jsx("div",{className:"panel-error-boundary",children:d.jsx(Un,{"data-testid":"panel-error-boundary-loading-error",errorMessage:"".concat(t),isLoading:!1,isLoaded:!1})}):e??null}}function ga(n,e){var t=Object.keys(n);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(n);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(n,i).enumerable})),t.push.apply(t,r)}return t}function Er(n){for(var e=1;e<arguments.length;e++){var t=arguments[e]!=null?arguments[e]:{};e%2?ga(Object(t),!0).forEach(function(r){lv(n,r,t[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(t)):ga(Object(t)).forEach(function(r){Object.defineProperty(n,r,Object.getOwnPropertyDescriptor(t,r))})}return n}function lv(n,e,t){return(e=uv(e))in n?Object.defineProperty(n,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):n[e]=t,n}function uv(n){var e=dv(n,"string");return typeof e=="symbol"?e:e+""}function dv(n,e){if(typeof n!="object"||!n)return n;var t=n[Symbol.toPrimitive];if(t!==void 0){var r=t.call(n,e);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(n)}function Jl(n){var e=n.props,t=n.componentState,r=e.metadata,i=e.panelState,o=i===void 0?null:i;t&&(o=t.panelState);var a={};return r!=null&&(a.metadata=r),o!=null&&(a.panelState=o),Er(Er({},n),{},{componentState:null,props:a,type:"react-component"})}function eu(n,e){return Er(Er({},n),{},{localDashboardId:e})}const mS={dehydrate:Jl,hydrate:eu};var tu=j.createContext(void 0);tu.displayName="LayoutManagerContext";var cv=pe.shape({on:pe.func,off:pe.func,isHidden:pe.bool,tab:pe.shape({header:pe.shape({tabs:pe.arrayOf(pe.shape({contentItem:pe.shape({})}))})}),title:pe.string,setTitle:pe.func,close:pe.func}),nu=pe.shape({on:pe.func,off:pe.func,emit:pe.func}),hv=pe.shape({registerComponent:pe.func,root:pe.shape({addChild:pe.func}),on:pe.func,off:pe.func,eventHub:nu}),pS=Object.freeze({Container:cv,EventHub:nu,Layout:hv});function hn(n,e,t){h.useEffect(function(){return n.on(e,t),()=>{n.off(e,t)}},[n,e,t])}var ru="SET_DASHBOARD_DATA";const mv=ep(ru,{},!1),pv={dashboardData:mv};var fv=new Map,iu=Object.freeze({}),vv=Object.freeze([]),fS=zs,vS=Vs,gS=Td,gv=n=>n.dashboardData,Ie=(n,e)=>{var t;return(t=gv(n)[e])!==null&&t!==void 0?t:iu},bS=(n,e)=>{var t;return(t=Ie(n,e).closed)!==null&&t!==void 0?t:vv},yS=(n,e)=>{var t;return(t=Ie(n,e).openedMap)!==null&&t!==void 0?t:fv},ou=(n,e)=>{var t;return(t=Ie(n,e).pluginDataMap)!==null&&t!==void 0?t:iu},CS=(n,e,t)=>ou(n,e)[t];function ba(n,e){var t=Object.keys(n);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(n);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(n,i).enumerable})),t.push.apply(t,r)}return t}function yn(n){for(var e=1;e<arguments.length;e++){var t=arguments[e]!=null?arguments[e]:{};e%2?ba(Object(t),!0).forEach(function(r){bv(n,r,t[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(t)):ba(Object(t)).forEach(function(r){Object.defineProperty(n,r,Object.getOwnPropertyDescriptor(t,r))})}return n}function bv(n,e,t){return(e=yv(e))in n?Object.defineProperty(n,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):n[e]=t,n}function yv(n){var e=Cv(n,"string");return typeof e=="symbol"?e:e+""}function Cv(n,e){if(typeof n!="object"||!n)return n;var t=n[Symbol.toPrimitive];if(t!==void 0){var r=t.call(n,e);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(n)}var au=(n,e)=>({type:ru,id:n,payload:e}),Sv=(n,e)=>(t,r)=>t(au(n,yn(yn({},Ie(r(),n)),e))),SS=(n,e,t)=>(r,i)=>r(au(n,yn(yn({},Ie(i(),n)),{},{pluginDataMap:yn(yn({},ou(i(),n)),{},{[e]:t})})));function wv(n,e){return Tv(n)||Pv(n,e)||Ev(n,e)||_v()}function _v(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
@@ -43,4 +43,4 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
43
43
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function H0(n,e){if(n){if(typeof n=="string")return Cs(n,e);var t={}.toString.call(n).slice(8,-1);return t==="Object"&&n.constructor&&(t=n.constructor.name),t==="Map"||t==="Set"?Array.from(n):t==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?Cs(n,e):void 0}}function Cs(n,e){(e==null||e>n.length)&&(e=n.length);for(var t=0,r=Array(e);t<e;t++)r[t]=n[t];return r}function U0(n,e){var t=n==null?null:typeof Symbol<"u"&&n[Symbol.iterator]||n["@@iterator"];if(t!=null){var r,i,o,a,s=[],l=!0,u=!1;try{if(o=(t=t.call(n)).next,e!==0)for(;!(l=(r=o.call(t)).done)&&(s.push(r.value),s.length!==e);l=!0);}catch(c){u=!0,i=c}finally{try{if(!l&&t.return!=null&&(a=t.return(),Object(a)!==a))return}finally{if(u)throw i}}return s}}function B0(n){if(Array.isArray(n))return n}var Ss=H.module("FileListItemEditor"),W0=()=>Promise.resolve();function K0(n){var e=n.item,t=n.onCancel,r=n.onSubmit,i=n.validate,o=i===void 0?W0:i,a=h.useRef(null),s=h.useState(e.basename),l=ti(s,2),u=l[0],c=l[1],m=h.useState(),p=ti(m,2),f=p[0],v=p[1],g=h.useState(Promise.resolve()),b=ti(g,2),y=b[0],C=b[1],S=h.useCallback(()=>{var I;(I=a.current)===null||I===void 0||I.focus()},[a]),_=h.useCallback(I=>I.stopPropagation(),[]),E=h.useCallback(()=>{y.then(()=>{r(u)}).catch(I=>Ss.info("Unable to validate name",I))},[r,u,y]);h.useEffect(function(){var k=Ye.makeCancelable(o(u));return k.then(()=>v(void 0)).catch($=>{Ye.isCanceled($)||v($)}),C(k),()=>k.cancel()},[o,u]),h.useEffect(function(){S()},[S]);var D=h.useCallback(()=>{Ss.debug2("handleBlur"),E()},[E]),W=h.useCallback(I=>{var k=I.target.value;c(k)},[]),N=h.useCallback(I=>{I.stopPropagation();var k=I.key;switch(k){case"Enter":{E();break}case"Escape":{t();break}}},[t,E]);return d.jsxs("div",{className:"file-list-item-editor",children:[d.jsx("input",{type:"text",className:U("form-control file-list-item-editor-input",{"is-invalid":f}),value:u,ref:a,onBlur:D,onKeyDown:N,onChange:W,onClick:_,onDoubleClick:_,onMouseDown:_}),f&&d.jsx("div",{className:"invalid-feedback",children:"".concat(f)})]})}function ws(n,e){var t=Object.keys(n);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(n);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(n,i).enumerable})),t.push.apply(t,r)}return t}function ni(n){for(var e=1;e<arguments.length;e++){var t=arguments[e]!=null?arguments[e]:{};e%2?ws(Object(t),!0).forEach(function(r){z0(n,r,t[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(t)):ws(Object(t)).forEach(function(r){Object.defineProperty(n,r,Object.getOwnPropertyDescriptor(t,r))})}return n}function z0(n,e,t){return(e=V0(e))in n?Object.defineProperty(n,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):n[e]=t,n}function V0(n){var e=G0(n,"string");return typeof e=="symbol"?e:e+""}function G0(n,e){if(typeof n!="object"||!n)return n;var t=n[Symbol.toPrimitive];if(t!==void 0){var r=t.call(n,e);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(n)}function ri(n,e){return Y0(n)||Z0(n,e)||X0(n,e)||q0()}function q0(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
44
44
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function X0(n,e){if(n){if(typeof n=="string")return _s(n,e);var t={}.toString.call(n).slice(8,-1);return t==="Object"&&n.constructor&&(t=n.constructor.name),t==="Map"||t==="Set"?Array.from(n):t==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?_s(n,e):void 0}}function _s(n,e){(e==null||e>n.length)&&(e=n.length);for(var t=0,r=Array(e);t<e;t++)r[t]=n[t];return r}function Z0(n,e){var t=n==null?null:typeof Symbol<"u"&&n[Symbol.iterator]||n["@@iterator"];if(t!=null){var r,i,o,a,s=[],l=!0,u=!1;try{if(o=(t=t.call(n)).next,e!==0)for(;!(l=(r=o.call(t)).done)&&(s.push(r.value),s.length!==e);l=!0);}catch(c){u=!0,i=c}finally{try{if(!l&&t.return!=null&&(a=t.return(),Object(a)!==a))return}finally{if(u)throw i}}return s}}function Y0(n){if(Array.isArray(n))return n}function Ou(n){var e=n.isMultiSelect,t=e===void 0?!1:e,r=n.focusedPath,i=n.showContextMenu,o=i===void 0?!1:i,a=n.onCreateFile,s=n.onCreateFolder,l=n.onCopy,u=n.onDelete,c=n.onMove,m=n.onRename,p=n.onSelect,f=n.onSelectionChange,v=n.table,g=n.rowHeight,b=g===void 0?Qi:g,y=n.validateRename,C=y===void 0?()=>Promise.resolve():y,S=h.useState(),_=ri(S,2),E=_[0],D=_[1],W=h.useState([]),N=ri(W,2),I=N[0],k=N[1],$=h.useState(),ae=ri($,2),A=ae[0],X=ae[1],de=h.useCallback(M=>{k(M),f==null||f(M)},[f]),se=h.useCallback(M=>{X(M)},[]),be=h.useCallback(()=>{A&&(l==null||l(A))},[A,l]),ye=h.useCallback(()=>{I.length>0&&(u==null||u(I))},[u,I]),Te=h.useCallback(()=>{a==null||a()},[a]),Se=h.useCallback(()=>{A&&(s==null||s(R.getPath(A.filename)))},[A,s]),ce=h.useCallback(()=>{A&&D(A)},[A]),Z=h.useCallback(()=>{D(void 0)},[]),V=h.useCallback(M=>{E&&(m==null||m(E,M),D(void 0))},[m,E]),te=h.useMemo(()=>{if(E)return[];var M=[];return a&&M.push({title:"New File",description:"Create new file",action:Te,group:ue.groups.medium}),s&&M.push({title:"New Folder",description:"Create new folder",action:Se,group:ue.groups.medium}),l&&M.push({title:"Copy File",description:"Copy the selected file",action:be,group:ue.groups.low,disabled:A==null||dt(A)}),u&&I.length>0&&M.push({title:"Delete",description:"Delete",shortcut:ys.FILE_EXPLORER.DELETE,action:ye,group:ue.groups.low}),m&&M.push({title:"Rename",description:"Rename",shortcut:ys.FILE_EXPLORER.RENAME,action:ce,group:ue.groups.low,disabled:A==null}),M},[be,ye,Te,Se,ce,A,l,a,s,u,m,I,E]),G=h.useCallback(M=>(B(E),C(E,M)),[E,C]),Q=h.useCallback(M=>{var Ve=M.item;return E&&E.filename===Ve.filename?d.jsx(Ti,ni(ni({},M),{},{children:d.jsx(K0,{item:Ve,validate:G,onSubmit:V,onCancel:Z})})):d.jsx(Ti,ni({},M))},[Z,V,E,G]);return d.jsxs("div",{className:"file-list-container",children:[v!=null&&d.jsx(R0,{onMove:c,onSelect:p,onSelectionChange:de,onFocusChange:se,renderItem:Q,rowHeight:b,table:v,isMultiSelect:t,focusedPath:r}),o&&d.jsx(ue,{actions:te})]})}Ou.displayName="FileListContainer";function Es(n,e,t){return(e=Q0(e))in n?Object.defineProperty(n,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):n[e]=t,n}function Q0(n){var e=J0(n,"string");return typeof e=="symbol"?e:e+""}function J0(n,e){if(typeof n!="object"||!n)return n;var t=n[Symbol.toPrimitive];if(t!==void 0){var r=t.call(n,e);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(n)}class Cr extends Ln{constructor(e){super("Name already exists"),Es(this,"isExistingFile",!0),Es(this,"info",void 0),this.info=e}}function Ps(n,e,t,r,i,o,a){try{var s=n[o](a),l=s.value}catch(u){return void t(u)}s.done?e(l):Promise.resolve(l).then(r,i)}function Ts(n){return function(){var e=this,t=arguments;return new Promise(function(r,i){var o=n.apply(e,t);function a(l){Ps(o,r,i,a,s,"next",l)}function s(l){Ps(o,r,i,a,s,"throw",l)}a(void 0)})}}function Os(n,e){return rC(n)||nC(n,e)||tC(n,e)||eC()}function eC(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
45
45
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function tC(n,e){if(n){if(typeof n=="string")return xs(n,e);var t={}.toString.call(n).slice(8,-1);return t==="Object"&&n.constructor&&(t=n.constructor.name),t==="Map"||t==="Set"?Array.from(n):t==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?xs(n,e):void 0}}function xs(n,e){(e==null||e>n.length)&&(e=n.length);for(var t=0,r=Array(e);t<e;t++)r[t]=n[t];return r}function nC(n,e){var t=n==null?null:typeof Symbol<"u"&&n[Symbol.iterator]||n["@@iterator"];if(t!=null){var r,i,o,a,s=[],l=!0,u=!1;try{if(o=(t=t.call(n)).next,e!==0)for(;!(l=(r=o.call(t)).done)&&(s.push(r.value),s.length!==e);l=!0);}catch(c){u=!0,i=c}finally{try{if(!l&&t.return!=null&&(a=t.return(),Object(a)!==a))return}finally{if(u)throw i}}return s}}function rC(n){if(Array.isArray(n))return n}var pt=H.module("FileExplorer");function Ji(n){var e=n.storage,t=n.isMultiSelect,r=t===void 0?!1:t,i=n.focusedPath,o=n.onCopy,a=o===void 0?()=>{}:o,s=n.onDelete,l=s===void 0?()=>{}:s,u=n.onRename,c=u===void 0?()=>{}:u,m=n.onCreateFile,p=m===void 0?()=>{}:m,f=n.onCreateFolder,v=f===void 0?()=>{}:f,g=n.onSelect,b=n.onSelectionChange,y=n.rowHeight,C=y===void 0?Qi:y,S=h.useState([]),_=Os(S,2),E=_[0],D=_[1],W=h.useState(),N=Os(W,2),I=N[0],k=N[1];h.useEffect(function(){var te;function G(){return Q.apply(this,arguments)}function Q(){return Q=Ts(function*(){pt.debug("initTable"),te=Ye.makeCancelable(e.getTable(),M=>M.close());try{k(yield te)}catch(M){Ye.isCanceled(M)||pt.error("Unable to initialize table",M)}}),Q.apply(this,arguments)}return G(),()=>{te.cancel()}},[e]);var $=h.useCallback(V=>{Ye.isCanceled(V)||pt.error(V)},[]),ae=h.useCallback(()=>{pt.debug("handleCreateFile"),p()},[p]),A=h.useCallback(()=>{pt.debug("handleCreateFolder"),v()},[v]),X=h.useCallback(V=>{pt.debug("handleCopyFile",V.filename),a(V)},[a]),de=h.useCallback(V=>{pt.debug("handleDelete, pending confirmation",V),D(V)},[]),se=h.useCallback(()=>{pt.debug("handleDeleteConfirm",E),E.forEach(V=>e.deleteFile(dt(V)?R.makePath(V.filename):V.filename)),l(E),D([])},[E,l,e]),be=h.useCallback(()=>{pt.debug("handleDeleteCancel"),D([])},[]),ye=h.useCallback((V,te)=>{var G=R.reducePaths(V.map(Q=>dt(Q)?R.makePath(Q.filename):Q.filename));G.forEach(Q=>{var M=R.isPath(Q)?"".concat(te).concat(R.getBaseName(Q.substring(0,Q.length-1)),"/"):"".concat(te).concat(R.getBaseName(Q));e.moveFile(Q,M).then(()=>{c(Q,M)}).catch($)})},[$,c,e]),Te=h.useCallback((V,te)=>{var G=V.filename,Q=dt(V);Q&&!G.endsWith("/")&&(G="".concat(G,"/"));var M="".concat(R.getParent(G)).concat(te);Q&&!M.endsWith("/")&&(M="".concat(M,"/")),pt.debug2("handleRename",G,M),e.moveFile(G,M).catch($),c(G,M)},[$,c,e]),Se=h.useCallback(function(){var V=Ts(function*(te,G){if(G!==te.basename){R.validateName(G);var Q="".concat(R.getPath(te.filename)).concat(G);try{var M=yield e.info(Q);throw new Cr(M)}catch(Ve){if(!(Ve instanceof Yi))throw Ve}}});return function(te,G){return V.apply(this,arguments)}}(),[e]),ce=E.length>0,Z=h.useMemo(()=>E.length===1?'Are you sure you want to delete "'.concat(E[0].filename,'"?'):"Are you sure you want to delete the selected files?",[E]);return d.jsxs("div",{className:"file-explorer",children:[I&&d.jsx(Ou,{isMultiSelect:r,focusedPath:i,showContextMenu:!0,onCopy:X,onCreateFolder:A,onCreateFile:ae,onMove:ye,onDelete:de,onRename:Te,onSelect:g,onSelectionChange:b,rowHeight:C,table:I,validateRename:Se}),d.jsx(ci,{isOpen:ce,headerText:Z,bodyText:"You cannot undo this action.",onCancel:be,onConfirm:se,confirmButtonText:"Delete"})]})}Ji.displayName="FileExplorer";function Is(n,e,t,r,i,o,a){try{var s=n[o](a),l=s.value}catch(u){return void t(u)}s.done?e(l):Promise.resolve(l).then(r,i)}function iC(n){return function(){var e=this,t=arguments;return new Promise(function(r,i){var o=n.apply(e,t);function a(l){Is(o,r,i,a,s,"next",l)}function s(l){Is(o,r,i,a,s,"throw",l)}a(void 0)})}}function Qt(n,e,t){return(e=oC(e))in n?Object.defineProperty(n,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):n[e]=t,n}function oC(n){var e=aC(n,"string");return typeof e=="symbol"?e:e+""}function aC(n,e){if(typeof n!="object"||!n)return n;var t=n[Symbol.toPrimitive];if(t!==void 0){var r=t.call(n,e);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(n)}var qt=H.module("NewItemModal");class _n extends h.PureComponent{static getValidationMessage(e){return e instanceof Cr&&e.info.type==="directory"?"Error: Cannot overwrite existing directory":"".concat(e)}static handleError(e){Ye.isCanceled(e)||qt.error(e)}constructor(e){super(e),Qt(this,"inputRef",j.createRef()),Qt(this,"cancelableValidatePromise",void 0),Qt(this,"cancelableExistingItemPromise",void 0),Qt(this,"pending",new Dr),Qt(this,"pathMap",new Map),Qt(this,"isInitialLoad",!0),this.handleModalSubmit=this.handleModalSubmit.bind(this),this.handleModalOpened=this.handleModalOpened.bind(this),this.handleSelect=this.handleSelect.bind(this),this.handleChange=this.handleChange.bind(this),this.handleKeyDown=this.handleKeyDown.bind(this),this.handleValidationError=this.handleValidationError.bind(this),this.handleOverwriteCancel=this.handleOverwriteCancel.bind(this),this.handleOverwriteConfirm=this.handleOverwriteConfirm.bind(this),this.handleExtensionChangeCancel=this.handleExtensionChangeCancel.bind(this),this.handleExtensionChangeConfirm=this.handleExtensionChangeConfirm.bind(this),this.handleBreadcrumbSelect=this.handleBreadcrumbSelect.bind(this);var t=e.defaultValue,r=R.hasPath(t)?R.getPath(t):"/";this.state={isSubmitting:!1,path:r,prevExtension:R.getExtension(t),showExtensionChangeModal:!1,showOverwriteModal:!1,value:R.getBaseName(t)}}componentDidUpdate(e,t){var r=this.props.isOpen,i=e.isOpen,o=this.state,a=o.value,s=o.path;!i&&r&&(this.resetValue(),this.isInitialLoad=!0),i&&r&&(!this.isInitialLoad&&(s!==t.path||a!==t.value)&&this.updateValidationStatus(s,a),this.isInitialLoad=!1)}componentWillUnmount(){this.pending.cancel(),this.cancelableValidatePromise&&this.cancelableValidatePromise.cancel(),this.cancelableExistingItemPromise&&this.cancelableExistingItemPromise.cancel()}resetValue(){var e=this.props,t=e.defaultValue,r=R.hasPath(t)?R.getPath(t):"/";this.setState({path:r,value:R.getBaseName(t),validationError:void 0,prevExtension:R.getExtension(t),isSubmitting:!1})}getValidationPromise(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;return this.cancelableValidatePromise&&this.cancelableValidatePromise.cancel(),this.cancelableValidatePromise=Ye.makeCancelable(this.validateName(e,t,r)),this.cancelableValidatePromise}validateName(e,t,r){var i=this;return iC(function*(){R.validateName(t);var o=i.props,a=o.defaultValue,s=o.storage;if(r){var l="".concat(e).concat(t);if(l!==a)try{var u=yield s.info(l);throw new Cr(u)}catch(c){if(!(c instanceof Yi))throw c}}return t})()}updateValidationStatus(e,t){this.getValidationPromise(e,t).then(()=>{this.setState({validationError:void 0})}).catch(this.handleValidationError).catch(_n.handleError)}handleModalOpened(){this.focusRenameInput()}handleModalSubmit(){this.submitModal()}handleChange(e){var t=e.target.value;this.setState({value:t})}handleSelect(e){if(qt.debug("handleSelect",e),e.type==="directory")this.setState({path:R.makePath(e.filename)});else{var t=e.basename,r=R.getPath(e.filename);this.setState({value:t,path:r},()=>{this.focusRenameInput()})}}handleKeyDown(e){var t=e.key;switch(e.stopPropagation(),t){case"Enter":{e.preventDefault(),this.submitModal();break}case"Escape":{e.preventDefault();var r=this.props.onCancel;r();break}}}handleValidationError(e){if(!(e instanceof Ln))throw e;qt.debug("Validation error",e),this.setState({validationError:e})}handleOverwriteCancel(){this.setState({showOverwriteModal:!1,isSubmitting:!1})}handleOverwriteConfirm(){this.setState({showOverwriteModal:!1});var e=this.props.onSubmit,t=this.state,r=t.path,i=t.value;qt.debug("handleOverwriteConfirm",r,i),e("".concat(r).concat(i),!0)}handleExtensionChangeCancel(){qt.debug("handleExtensionChangeCancel"),this.setState(e=>{var t=e.value,r=e.prevExtension,i=R.replaceExtension(t,r);return{showExtensionChangeModal:!1,value:i}}),this.submitModal(!0)}handleExtensionChangeConfirm(){qt.debug("handleExtensionChangeConfirm"),this.setState({showExtensionChangeModal:!1}),this.submitModal(!0)}focusRenameInput(){var e=this.inputRef.current;if(e){var t=this.props.type,r=e.value,i=t==="directory"?r.length:r.lastIndexOf(".");e.focus(),e.setSelectionRange(0,i>0?i:r.length)}}submitModal(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;this.setState(t=>{var r=t.prevExtension,i=t.value,o=t.path,a=this.props,s=a.notifyOnExtensionChange,l=a.type;qt.debug("submitModal",r,i);var u=R.getExtension(i);return s&&!e&&r!==null&&r!==u?{isSubmitting:!1,showExtensionChangeModal:!0,newExtension:u}:(this.getValidationPromise(o,i,!0).then(c=>{var m=this.props.onSubmit;m("".concat(o).concat(i))}).catch(c=>{if(c instanceof Cr&&l!=="directory"&&c.info.type!=="directory"){this.setState({showOverwriteModal:!0});return}throw c}).catch(c=>{throw Ye.isCanceled(c)&&this.setState({isSubmitting:!1}),c}).catch(this.handleValidationError).catch(_n.handleError),{isSubmitting:!0,showExtensionChangeModal:!1,newExtension:void 0})})}handleBreadcrumbSelect(e){this.setState({path:e})}renderPathButtons(e){var t=e.split("/");return t.pop(),t.map((r,i)=>{for(var o="",a=0;a<i;a+=1)o+="".concat(t[a],"/");return o+="".concat(r,"/"),d.jsxs(j.Fragment,{children:[d.jsx(ne,{kind:"ghost",className:"directory-breadcrumbs",onClick:()=>this.handleBreadcrumbSelect(o),"aria-label":i===0?"Home":void 0,icon:i===0?d.jsx(me,{icon:md,transform:"right-1.6"}):void 0,tooltip:i===0?"Home":void 0,children:r}),"/"]},o)})}render(){var e=this.props,t=e.storage,r=e.isOpen,i=e.onCancel,o=e.placeholder,a=e.title,s=e.type,l=this.state,u=l.isSubmitting,c=l.path,m=l.showExtensionChangeModal,p=l.showOverwriteModal,f=l.validationError,v=l.value,g=l.prevExtension,b=l.newExtension,y=s==="directory",C=R.fileExtensionToString(g),S=R.fileExtensionToString(b),_=y?"Create":"Save",E=y?"New folder name":"Save file as";return d.jsxs(d.Fragment,{children:[d.jsxs(As,{isOpen:r,toggle:i,onOpened:this.handleModalOpened,className:"modal-dialog-centered new-file-modal",children:[d.jsx(ks,{toggle:i,children:a}),d.jsx(Ns,{children:d.jsx("form",{children:d.jsxs("div",{className:"d-flex flex-column new-file-modal-content",children:[d.jsxs("div",{className:"flex-grow-0 mb-4",children:[d.jsx("label",{htmlFor:"file-name-input",children:E}),d.jsx("input",{id:"file-name-input",type:"text",autoComplete:"off",autoCapitalize:"none",autoCorrect:"off",spellCheck:"false",className:U("form-control",{"is-invalid":f}),value:v,placeholder:o,ref:this.inputRef,onKeyDown:this.handleKeyDown,onChange:this.handleChange}),f&&d.jsx("div",{className:"invalid-feedback",children:_n.getValidationMessage(f)})]}),d.jsxs("div",{className:"flex-grow-0",children:[d.jsx("label",{children:"Directory: /"}),this.renderPathButtons(c)]}),d.jsx("div",{className:"flex-grow-1 file-explorer-container",children:d.jsx(Ji,{onSelect:this.handleSelect,storage:t,focusedPath:c})})]})})}),d.jsxs(al,{children:[d.jsx(ne,{kind:"secondary",onClick:i,children:"Cancel"}),d.jsx(ne,{kind:"primary",disabled:u,onClick:this.handleModalSubmit,children:_})]})]}),d.jsx(ci,{isOpen:p,headerText:"Confirm overwrite",bodyText:"File with this name already exists, are you sure you want to overwrite it?",onCancel:this.handleOverwriteCancel,onConfirm:this.handleOverwriteConfirm,cancelButtonText:"Cancel",confirmButtonText:"Overwrite"}),d.jsx(ci,{isOpen:m,headerText:"Confirm extension change",bodyText:'Are you sure you want to change extension from "'.concat(C,'" to "').concat(S,'"?'),onCancel:this.handleExtensionChangeCancel,onConfirm:this.handleExtensionChangeConfirm,cancelButtonText:'Keep "'.concat(C,'"'),confirmButtonText:'Use "'.concat(S,'"')})]})}}Qt(_n,"defaultProps",{isOpen:!1,defaultValue:"/",notifyOnExtensionChange:!1,placeholder:"",onSubmit:(n,e)=>{},onCancel:()=>{}});function sC(n){var e=n.createFile,t=n.createFolder,r=n.onSearchChange,i=n.defaultSearchText,o=i===void 0?"":i;return d.jsxs("div",{className:"file-explorer-toolbar",children:[d.jsxs("div",{className:"file-explorer-toolbar-buttons",children:[d.jsx(ne,{kind:"ghost",icon:Bs,tooltip:"New notebook",onClick:e,"aria-label":"New notebook"}),d.jsx(ne,{kind:"ghost",icon:pd,tooltip:"New folder",onClick:t,"aria-label":"New folder"})]}),r&&d.jsx("div",{className:"file-explorer-toolbar-search",children:d.jsx(fl,{value:o,onChange:r,placeholder:"Search by name"})})]})}function Ds(n,e,t,r,i,o,a){try{var s=n[o](a),l=s.value}catch(u){return void t(u)}s.done?e(l):Promise.resolve(l).then(r,i)}function lC(n){return function(){var e=this,t=arguments;return new Promise(function(r,i){var o=n.apply(e,t);function a(l){Ds(o,r,i,a,s,"next",l)}function s(l){Ds(o,r,i,a,s,"throw",l)}a(void 0)})}}function xu(n,e,t){return(e=uC(e))in n?Object.defineProperty(n,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):n[e]=t,n}function uC(n){var e=dC(n,"string");return typeof e=="symbol"?e:e+""}function dC(n,e){if(typeof n!="object"||!n)return n;var t=n[Symbol.toPrimitive];if(t!==void 0){var r=t.call(n,e);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(n)}var Xt=H.module("FileExplorerPanel"),cC=(n,e)=>{var t=Nm(n),r=Hr(n,e.localDashboardId),i=r??{},o=i.session,a=i.config,s=a==null?void 0:a.type;return{fileStorage:t,language:s,session:o}},hC=Wn(cC,null,null,{forwardRef:!0});function mC(n){var e=n;return e!=null&&typeof e.button=="number"}class xn extends j.Component{static handleError(e){Xt.error(e)}static isFocusEvent(e){return mC(e)?e.detail>=2:!0}constructor(e){super(e),this.handleFileSelect=this.handleFileSelect.bind(this),this.handleCopyFile=this.handleCopyFile.bind(this),this.handleCreateFile=this.handleCreateFile.bind(this),this.handleCreateDirectory=this.handleCreateDirectory.bind(this),this.handleCreateDirectoryCancel=this.handleCreateDirectoryCancel.bind(this),this.handleCreateDirectorySubmit=this.handleCreateDirectorySubmit.bind(this),this.handleDelete=this.handleDelete.bind(this),this.handleRename=this.handleRename.bind(this),this.handleSessionOpened=this.handleSessionOpened.bind(this),this.handleSessionClosed=this.handleSessionClosed.bind(this),this.handleShow=this.handleShow.bind(this),this.handleSelectionChange=this.handleSelectionChange.bind(this);var t=e.session,r=e.language;this.state={isShown:!1,language:r,session:t,showCreateFolder:!1,focusedFilePath:"/"}}componentDidMount(){this.isHidden()||this.setState({isShown:!0})}handleCreateFile(){var e=this.props.glEventHub,t=this.state,r=t.session,i=t.language,o={language:i,value:""};Xt.debug("handleCreateFile",r,i,o),e.emit($e.CREATE_NOTEBOOK,r,i,o)}handleCreateDirectory(){this.setState({showCreateFolder:!0})}handleCreateDirectoryCancel(){Xt.debug("handleCreateDirectoryCancel"),this.setState({showCreateFolder:!1})}handleCreateDirectorySubmit(e){Xt.debug("handleCreateDirectorySubmit",e),this.setState({showCreateFolder:!1});var t=this.props.fileStorage;t.createDirectory(e).catch(xn.handleError)}handleCopyFile(e){var t=this;return lC(function*(){var r=t.props.fileStorage;if(dt(e)){Xt.error("Invalid item in handleCopyItem",e);return}var i=yield R.getUniqueCopyFileName(r,e.filename);yield r.copyFile(e.filename,i)})()}handleDelete(e){var t=this.props.glEventHub;e.forEach(r=>{t.emit($e.CLOSE_FILE,{id:r.filename,itemName:r.filename})})}handleSelectionChange(e){var t="/";e.length===1&&(e[0].type==="directory"?t=R.makePath(e[0].filename):t=R.getPath(e[0].filename)),this.setState({focusedFilePath:t})}handleFileSelect(e,t){if(Xt.debug("fileSelect",e),e.type!=="directory"){var r=xn.isFocusEvent(t),i={id:e.filename,itemName:e.filename},o=this.props.glEventHub,a=this.state,s=a.session,l=a.language,u={value:null,language:l};o.emit($e.SELECT_NOTEBOOK,s,l,u,i,r)}}handleRename(e,t){var r=this.props.glEventHub;Xt.debug("handleRename",e,t),r.emit($e.RENAME_FILE,e,t)}handleSessionOpened(e){var t=e.session,r=e.language;this.setState({session:t,language:r})}handleSessionClosed(){this.setState({session:void 0,language:void 0})}handleShow(){this.setState({isShown:!0})}isHidden(){var e=this.props.glContainer,t=e.isHidden;return t}render(){var e=this.props,t=e.fileStorage,r=e.glContainer,i=e.glEventHub,o=this.state,a=o.isShown,s=o.showCreateFolder,l=o.focusedFilePath;return d.jsxs($r,{className:"file-explorer-panel",componentPanel:this,glContainer:r,glEventHub:i,onSessionOpen:this.handleSessionOpened,onSessionClose:this.handleSessionClosed,onShow:this.handleShow,children:[d.jsx(sC,{createFile:this.handleCreateFile,createFolder:this.handleCreateDirectory}),a&&d.jsx(Ji,{isMultiSelect:!0,storage:t,onCopy:this.handleCopyFile,onCreateFile:this.handleCreateFile,onCreateFolder:this.handleCreateDirectory,onDelete:this.handleDelete,onRename:this.handleRename,onSelect:this.handleFileSelect,onSelectionChange:this.handleSelectionChange}),d.jsx(_n,{isOpen:s,type:"directory",title:"Create New Folder",storage:t,onSubmit:this.handleCreateDirectorySubmit,onCancel:this.handleCreateDirectoryCancel,defaultValue:l})]})}}xu(xn,"COMPONENT","FileExplorerPanel");xu(xn,"TITLE","File Explorer");var qS=hC(xn);function Hn(n,e,t){return(e=pC(e))in n?Object.defineProperty(n,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):n[e]=t,n}function pC(n){var e=fC(n,"string");return typeof e=="symbol"?e:e+""}function fC(n,e){if(typeof n!="object"||!n)return n;var t=n[Symbol.toPrimitive];if(t!==void 0){var r=t.call(n,e);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(n)}var Ms=H.module("LogPanel");class Br extends h.PureComponent{constructor(e){super(e),Hn(this,"isBottomVisible",void 0),Hn(this,"logView",void 0),this.handleResize=this.handleResize.bind(this),this.handleShow=this.handleShow.bind(this),this.handleHide=this.handleHide.bind(this),this.handleSessionOpened=this.handleSessionOpened.bind(this),this.handleSessionClosed=this.handleSessionClosed.bind(this),this.isBottomVisible=!0,this.logView=null;var t=this.props.session;this.state={session:t}}handleResize(){this.updateDimensions()}handleShow(){this.updateDimensions(),this.logView&&(this.logView.triggerFindWidget(),this.isBottomVisible&&this.logView.scrollToBottom())}handleHide(){this.logView&&(this.isBottomVisible=this.logView.isBottomVisible())}handleSessionOpened(e){var t=e.session;Ms.debug("Session opened",[t]),this.setState({session:t})}handleSessionClosed(e){Ms.debug("Session closed",e)}updateDimensions(){this.logView&&this.logView.updateDimensions()}render(){var e=this.props,t=e.glContainer,r=e.glEventHub,i=this.state.session;return d.jsxs($r,{componentPanel:this,glContainer:t,glEventHub:r,onResize:this.handleResize,onHide:this.handleHide,onShow:this.handleShow,onSessionOpen:this.handleSessionOpened,onSessionClose:this.handleSessionClosed,children:[i==null&&d.jsx("div",{className:"log-panel-disconnected-message",children:"Waiting for session connection"}),i!=null&&d.jsx(ve,{session:i,ref:o=>{this.logView=o}})]})}}Hn(Br,"defaultProps",{session:null});Hn(Br,"COMPONENT","LogPanel");Hn(Br,"TITLE","Log");var vC=(n,e)=>{var t;return{session:(t=Hr(n,e.localDashboardId))===null||t===void 0?void 0:t.session}},XS=Wn(vC,null,null,{forwardRef:!0})(Br);export{sh as $,le as A,Ye as B,ge as C,ll as D,Nd as E,Fe as F,jr as G,ol as H,ct as I,ne as J,w as K,hl as L,P as M,ul as N,ue as O,Mr as P,Ar as Q,lt as R,fe as S,rl as T,bn as U,ci as V,kc as W,fl as X,kr as Y,al as Z,gl as _,OS as a,rv as a$,xi as a0,TC as a1,lm as a2,Ii as a3,OC as a4,cl as a5,bl as a6,dl as a7,Nc as a8,xh as a9,tu as aA,sv as aB,ee as aC,Wi as aD,Ql as aE,su as aF,jv as aG,ru as aH,mr as aI,Jl as aJ,dg as aK,ug as aL,oS as aM,uS as aN,sS as aO,cS as aP,pa as aQ,bS as aR,Ie as aS,yS as aT,ou as aU,eu as aV,xS as aW,TS as aX,ev as aY,nv as aZ,tv as a_,Sr as aa,fm as ab,Et as ac,ze as ad,Tt as ae,K as af,Ze as ag,Sl as ah,Cl as ai,yl as aj,xC as ak,IC as al,DC as am,VC as an,T as ao,nS as ap,CS as aq,wg as ar,lg as as,sg as at,PS as au,Yr as av,lu as aw,wS as ax,mS as ay,pS as az,gv as b,Hy as b$,rS as b0,tS as b1,pv as b2,au as b3,Sv as b4,fS as b5,vS as b6,gS as b7,IS as b8,aS as b9,lp as bA,sp as bB,Dl as bC,fi as bD,dp as bE,xl as bF,Ol as bG,pi as bH,Vn as bI,Jo as bJ,zC as bK,YC as bL,ea as bM,_C as bN,so as bO,Ag as bP,Gi as bQ,MS as bR,Fg as bS,Hg as bT,Ee as bU,$b as bV,L as bW,Ht as bX,pu as bY,Ne as bZ,Or as b_,dS as ba,lS as bb,hS as bc,_S as bd,DS as be,hn as bf,iS as bg,Hv as bh,Ip as bi,GC as bj,Wt as bk,Tl as bl,JC as bm,Pp as bn,qC as bo,XC as bp,ZC as bq,Ep as br,Op as bs,xp as bt,QC as bu,cp as bv,up as bw,Il as bx,ap as by,op as bz,sm as c,ot as c$,Tu as c0,fu as c1,rb as c2,yu as c3,Gg as c4,Pn as c5,vu as c6,Tn as c7,_y as c8,Pr as c9,Bm as cA,Wm as cB,Km as cC,ip as cD,Js as cE,yC as cF,Ys as cG,$r as cH,US as cI,mt as cJ,vt as cK,WC as cL,FS as cM,kC as cN,HS as cO,$S as cP,BS as cQ,Dr as cR,MC as cS,LS as cT,jC as cU,RS as cV,BC as cW,Nm as cX,AC as cY,Hr as cZ,$e as c_,e0 as ca,ve as cb,_i as cc,mu as cd,wn as ce,Mi as cf,R as cg,Yi as ch,GS as ci,Li as cj,Qf as ck,ES as cl,Xm as cm,VS as cn,XS as co,zS as cp,qS as cq,pc as cr,SC as cs,Hm as ct,Fm as cu,RC as cv,NC as cw,LC as cx,$C as cy,Um as cz,HC as d,_n as d0,dt as d1,Rm as d2,ke as d3,kS as d4,jS as d5,KS as d6,WS as d7,l0 as d8,s0 as d9,NS as da,AS as db,PC as dc,gt as dd,wC as de,Vr as df,Bd as dg,Ln as dh,Jf as e,KC as f,Cm as g,FC as h,Pl as i,UC as j,EC as k,wc as l,zn as m,Ac as n,_c as o,tl as p,el as q,oe as r,SS as s,Ec as t,ym as u,Pc as v,il as w,qs as x,CC as y,nl as z};
|
|
46
|
-
//# sourceMappingURL=LogPanel-
|
|
46
|
+
//# sourceMappingURL=LogPanel-CoRvBQjW.js.map
|