@deephaven/embed-widget 1.27.5-alpha-nodehttp2-config.98bcfa9.0 → 1.27.5
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-DOESWEUF.js → App-DpFZVKW0.js} +2 -2
- package/build/assets/{App-DOESWEUF.js.map → App-DpFZVKW0.js.map} +1 -1
- package/build/assets/{Chart-DmcCDc-c.js → Chart-CMewz4ut.js} +2 -2
- package/build/assets/{Chart-DmcCDc-c.js.map → Chart-CMewz4ut.js.map} +1 -1
- package/build/assets/{IrisGrid-Dzd0M9me.js → IrisGrid-BTQO2FKh.js} +2 -2
- package/build/assets/{IrisGrid-Dzd0M9me.js.map → IrisGrid-BTQO2FKh.js.map} +1 -1
- package/build/assets/{IrisGridContextProvider-zFxc60Zv.js → IrisGridContextProvider-mmPftO0y.js} +2 -2
- package/build/assets/{IrisGridContextProvider-zFxc60Zv.js.map → IrisGridContextProvider-mmPftO0y.js.map} +1 -1
- package/build/assets/{LocalWorkspaceStorage-CCu3NemC.js → LocalWorkspaceStorage-PbIrCUTk.js} +2 -2
- package/build/assets/{LocalWorkspaceStorage-CCu3NemC.js.map → LocalWorkspaceStorage-PbIrCUTk.js.map} +1 -1
- package/build/assets/{LogPanel-BimVGFyP.js → LogPanel-CRnqBXMk.js} +2 -2
- package/build/assets/{LogPanel-BimVGFyP.js.map → LogPanel-CRnqBXMk.js.map} +1 -1
- package/build/assets/{MarkdownEditor-BAZeiABk.js → MarkdownEditor-q9JAU2dT.js} +2 -2
- package/build/assets/{MarkdownEditor-BAZeiABk.js.map → MarkdownEditor-q9JAU2dT.js.map} +1 -1
- package/build/assets/{MarkdownNotebook-DemcxR9c.js → MarkdownNotebook-DJ5UznBB.js} +2 -2
- package/build/assets/{MarkdownNotebook-DemcxR9c.js.map → MarkdownNotebook-DJ5UznBB.js.map} +1 -1
- package/build/assets/{index-BjSQKZTV.js → index-CFSS7Jfr.js} +3 -3
- package/build/assets/{index-BjSQKZTV.js.map → index-CFSS7Jfr.js.map} +1 -1
- package/build/assets/{index-CmPSnKiC.js → index-DngJxiRM.js} +2 -2
- package/build/assets/{index-CmPSnKiC.js.map → index-DngJxiRM.js.map} +1 -1
- package/build/assets/{index-CSLN5Pl6.js → index-Vs51b__V.js} +6 -6
- package/build/assets/{index-CSLN5Pl6.js.map → index-Vs51b__V.js.map} +1 -1
- package/build/index.html +2 -2
- package/package.json +17 -17
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./Plot-CGXK1vWp.js","./Plotly-BGfu4vLW.js","./plotly-OIrYaxcG.js","./helpers-BosuxZz1.js","./vendor-yMTyZX60.js","./vendor-BSYTbjlr.css"])))=>i.map(i=>d[i]);
|
|
2
|
-
import{ao as Mu,a as B,aO as As,T as ju,X as Au,Y as ku,V as Nu,a4 as Lu,O as Ru,z as $u,a8 as Fu,d as ks,G as Ns,e as Ls,q as Hu,aP as Uu,aH as Bu,aQ as Rs,aR as Wu,aS as Ku,L as Kn,ac as zu,_ as Vu,aT as $s,u as W,t as Fs,Z as Gu,aU as Xu,aN as qu,aJ as Hs,aK as Zu,f as Us,n as Yu,aL as ai,aV as Ju,aW as Qu,aX as to,aY as ed,aZ as td,a_ as nd,a$ as rd,v as id,k as Bs,aF as od,h as Gr,aA as ad,b0 as sd,b1 as no,aD as ld,b2 as ro,b3 as Ws,b4 as ud,au as dd,b5 as cd,b6 as hd,b7 as md,b8 as pd,b9 as fd,ba as vd}from"./index-
|
|
2
|
+
import{ao as Mu,a as B,aO as As,T as ju,X as Au,Y as ku,V as Nu,a4 as Lu,O as Ru,z as $u,a8 as Fu,d as ks,G as Ns,e as Ls,q as Hu,aP as Uu,aH as Bu,aQ as Rs,aR as Wu,aS as Ku,L as Kn,ac as zu,_ as Vu,aT as $s,u as W,t as Fs,Z as Gu,aU as Xu,aN as qu,aJ as Hs,aK as Zu,f as Us,n as Yu,aL as ai,aV as Ju,aW as Qu,aX as to,aY as ed,aZ as td,a_ as nd,a$ as rd,v as id,k as Bs,aF as od,h as Gr,aA as ad,b0 as sd,b1 as no,aD as ld,b2 as ro,b3 as Ws,b4 as ud,au as dd,b5 as cd,b6 as hd,b7 as md,b8 as pd,b9 as fd,ba as vd}from"./index-CFSS7Jfr.js";import{r as m,ag as zn,bt as Mr,D as c,bJ as gd,J as k,G as U,bK as Ks,bL as si,H as bd,R as xi,bM as yd,bN as Sd,bv as Cd,I as me,C as Pt,bO as _d,a7 as wd,a8 as Ed,E as zs,af as vn,bP as Pd,bQ as Td,bR as Od,bS as Id,bG as li,bT as O,bU as io,bI as pe,L as Vs,N as Gs,bV as xd,bH as Vn,bD as _n,_ as Dd,be as Re,bW as Md,ab as jd,av as Ad,bh as oo,bX as kd,bY as ao,bg as rt,bZ as Xs,b_ as Nd,bE as nt,bF as tn,b$ as so,bf as Ld,bC as Rd,c0 as Fn}from"./vendor-yMTyZX60.js";var $d=Object.freeze([]),ES=new Map,qs=()=>{};function PS(n){return Array.isArray(n)?n:[n]}function TS(){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 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 lo extends Error{constructor(){super(...arguments),Fd(this,"isCanceled",!0)}}function Bd(n,e,t){return(e=Wd(e))in n?Object.defineProperty(n,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):n[e]=t,n}function Wd(n){var e=Kd(n,"string");return typeof e=="symbol"?e:e+""}function Kd(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 zd extends Error{constructor(){super(...arguments),Bd(this,"isClipboardPermissionsDeniedError",!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=Xd(n,"string");return typeof e=="symbol"?e:e+""}function Xd(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 Xr extends Error{constructor(){super(...arguments),Vd(this,"isClipboardUnavailableError",!0)}}function qd(n,e,t){return(e=Zd(e))in n?Object.defineProperty(n,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):n[e]=t,n}function Zd(n){var e=Yd(n,"string");return typeof e=="symbol"?e:e+""}function Yd(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 Zs extends Error{constructor(){super(...arguments),qd(this,"isPermissionUnsupported",!0)}}function uo(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 Jd(n){return function(){var e=this,t=arguments;return new Promise(function(r,i){var o=n.apply(e,t);function a(l){uo(o,r,i,a,s,"next",l)}function s(l){uo(o,r,i,a,s,"throw",l)}a(void 0)})}}function co(n){return ui.apply(this,arguments)}function ui(){return ui=Jd(function*(n){try{var e=n;return(yield navigator.permissions.query({name:e})).state}catch(t){throw t instanceof TypeError?new Zs:t}}),ui.apply(this,arguments)}function ho(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 Ys(n){return function(){var e=this,t=arguments;return new Promise(function(r,i){var o=n.apply(e,t);function a(l){ho(o,r,i,a,s,"next",l)}function s(l){ho(o,r,i,a,s,"throw",l)}a(void 0)})}}function Js(n){return di.apply(this,arguments)}function di(){return di=Ys(function*(n){var e=navigator,t=e.clipboard;if(t!==void 0)try{return yield navigator.clipboard.writeText(n)}catch{}Qd(n)}),di.apply(this,arguments)}function Qd(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 OS(){return ci.apply(this,arguments)}function ci(){return ci=Ys(function*(){try{var n=navigator,e=n.clipboard;if(e===void 0)throw new Xr;var t=yield co("clipboard-read");if(t==="granted"){var r=yield e.readText();return r}if(t==="prompt"){try{yield e.readText()}catch{}if(t=yield co("clipboard-read"),t==="granted"){var i=yield e.readText();return i}}if(t==="prompt"||t==="denied")throw new zd}catch(o){throw o instanceof Zs?new Xr:o}throw new Xr}),ci.apply(this,arguments)}var Mn;function on(n,e,t){return(e=ec(e))in n?Object.defineProperty(n,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):n[e]=t,n}function ec(n){var e=tc(n,"string");return typeof e=="symbol"?e:e+""}function tc(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 nc="table_",Qs="column_",rc=new Set(["in","not","i","ii","k"]),ic=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"]),oc=/[^a-zA-Z0-9_$\-+@]/g,ac=/[^A-Za-z0-9_$]/g,sc=/^[a-zA-Z_$][a-zA-Z0-9_$\-+@]*$/,lc=/[^a-zA-Z0-9_]/g;function uc(n){return n.replace(/[ -]/g,"_")}function dc(n){return n.replace(/\s/g,"_")}class gt{}Mn=gt;on(gt,"legalize",(n,e,t,r,i,o)=>{var a=e(n.trim());return i&&(rc.has(a)||ic.has(a))&&(a=t+a),a=a.replace(r,""),a?(/^[0-9-]/.test(a)&&(a=t+a),a):t+o});on(gt,"legalizeTableName",n=>Mn.legalize(n,dc,nc,oc,!1,0));on(gt,"makeVariableName",n=>Mn.legalizeTableName(n).replace(lc,"_"));on(gt,"legalizeColumnNames",n=>{var e=[];return n.forEach((t,r)=>{var i=Mn.legalizeColumnName(t,r);e.includes(i)&&(i=Qs+r),e.push(i)}),e});on(gt,"legalizeColumnName",function(n){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return Mn.legalize(n,uc,Qs,ac,!0,e)});on(gt,"isValidTableName",n=>sc.test(n));on(gt,"isValidColumnName",n=>Mn.legalizeColumnName(n)===n);class el extends CustomEvent{constructor(e,t){super(e,t)}}class Je{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 lo),i!=null&&t&&t(i)},a}static isCanceled(e){return e instanceof lo}static isTimedOut(e){return e instanceof Mu}static withTimeout(e,t){return new Promise((r,i)=>{setTimeout(()=>{try{r(t())}catch(o){i(o)}},e)})}}function mo(n,e,t){return(e=cc(e))in n?Object.defineProperty(n,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):n[e]=t,n}function cc(n){var e=hc(n,"string");return typeof e=="symbol"?e:e+""}function hc(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{constructor(){mo(this,"pending",[]),mo(this,"resolved",[])}add(e,t){var r=Je.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 IS(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 po(n,e){return vc(n)||fc(n,e)||pc(n,e)||mc()}function mc(){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 pc(n,e){if(n){if(typeof n=="string")return fo(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)?fo(n,e):void 0}}function fo(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 fc(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(d){u=!0,i=d}finally{try{if(!l&&t.return!=null&&(a=t.return(),Object(a)!==a))return}finally{if(u)throw i}}return s}}function vc(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=po(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],d=l[1];if(u<=i&&o<=d)return a;i<=d&&u<=o&&(i=Math.min(i,u),o=Math.max(o,d),a.splice(s,1))}return a.push([i,o]),a}static deselectRange(e,t){for(var r=po(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],d=l[1];if(!(o<u||d<i))if(u<i&&o<d){a[s]=[u,i-1],a.splice(s+1,0,[o+1,d]);break}else i<=u&&d<=o?a.splice(s,1):u<i?a[s]=[u,i-1]:a[s]=[o+1,d]}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*xS(n,e){for(var t=n;t<=e;++t)yield t}var DS=" ";class gc{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 Gn;function Wt(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 He{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(He.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)}}Gn=He;Wt(He,"TIME_PATTERN","([01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9]");Wt(He,"MILLIS_PER_SECOND",1e3);Wt(He,"NANOS_PER_SECOND",1e9);Wt(He,"NANOS_PER_MIN",60*Gn.NANOS_PER_SECOND);Wt(He,"NANOS_PER_HOUR",60*Gn.NANOS_PER_MIN);Wt(He,"MILLIS_PER_MIN",60*Gn.MILLIS_PER_SECOND);Wt(He,"MILLIS_PER_HOUR",60*Gn.MILLIS_PER_MIN);Wt(He,"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 Sc(n,e,t){return(e=Cc(e))in n?Object.defineProperty(n,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):n[e]=t,n}function Cc(n){var e=_c(n,"string");return typeof e=="symbol"?e:e+""}function _c(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 Hn extends Error{constructor(){super(...arguments),Sc(this,"isInvalid",!0)}}function tl(){var n=m.useRef(!1);return m.useEffect(()=>(n.current=!0,()=>{n.current=!1}),[]),n}function vo(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 wc(n){return function(){var e=this,t=arguments;return new Promise(function(r,i){var o=n.apply(e,t);function a(l){vo(o,r,i,a,s,"next",l)}function s(l){vo(o,r,i,a,s,"throw",l)}a(void 0)})}}var Ec=B.module("useAsyncInterval");function Pc(n,e){var t=tl(),r=m.useRef(0),i=m.useRef(0),o=m.useRef(null),a=m.useCallback(wc(function*(){var s=Date.now();i.current+=1;var l=o.current==null?e:s-o.current;o.current=s;try{yield n()}catch(h){Ec.error("A tick error occurred:",h)}if(t.current){l+=Date.now()-o.current;var u=Math.max(0,l-e),d=Math.max(0,e-u);r.current=window.setTimeout(a,d)}}),[n,t,e]);m.useEffect(()=>(o.current=null,a(),()=>{window.clearTimeout(r.current)}),[e,a])}function Xn(n){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"No value available in context. Was code wrapped in a provider?",t=m.useContext(n);if(t==null)throw new Error(e);return t}function Tc(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=m.useMemo(()=>zn(n,e,s!=null?{leading:i,trailing:a,maxWait:s}:{leading:i,trailing:a}),[n,e,i,a,s]);return m.useEffect(()=>()=>l.cancel(),[l]),l}function Oc(n){var e=m.useRef();return m.useEffect(function(){e.current=n}),e.current}function Ic(n,e,t){var r=m.useRef(t),i=m.useRef(n);i.current=n;var o=m.useMemo(()=>Mr(function(){return i.current(...arguments)},e,r.current),[e]);return m.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 nl(n){var e=m.useRef(null);return m.useEffect(function(){n&&(typeof n=="function"?n(e.current):n.current=e.current)}),e}function xc(n,e){return Ac(n)||jc(n,e)||Mc(n,e)||Dc()}function Dc(){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 Mc(n,e){if(n){if(typeof n=="string")return go(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)?go(n,e):void 0}}function go(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 jc(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(d){u=!0,i=d}finally{try{if(!l&&t.return!=null&&(a=t.return(),Object(a)!==a))return}finally{if(u)throw i}}return s}}function Ac(n){if(Array.isArray(n))return n}var kc=3500,Nc=B.module("useCopyToClipboard");function Lc(){var n=m.useState(!1),e=xc(n,2),t=e[0],r=e[1],i=m.useRef(null),o=m.useCallback(a=>{Js(a).then(()=>{r(!0)}).catch(s=>Nc.error("Unable to copy ".concat(a),`
|
|
5
5
|
`,s))},[]);return m.useEffect(()=>(i.current&&clearTimeout(i.current),t&&(i.current=setTimeout(()=>{r(!1)},kc)),()=>{i.current&&clearTimeout(i.current)}),[t]),[t,o]}var Rc=["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 $c(n){return typeof n=="string"&&Rc.includes(n)}function rl(n){return n!=null&&$c(n)?"var(--dh-color-".concat(n,")"):n}var Fc=["color","UNSAFE_style"];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 ar(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){Hc(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 Hc(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=Bc(n,"string");return typeof e=="symbol"?e:e+""}function Bc(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 Wc(n,e){if(n==null)return{};var t,r,i=Kc(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 Kc(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 il=m.forwardRef((n,e)=>{var t=n.color,r=n.UNSAFE_style,i=Wc(n,Fc),o=m.useMemo(()=>ar(ar({},r),{},{color:rl(t)}),[t,r]);return c.jsx(gd,ar(ar({},i),{},{ref:e,UNSAFE_style:o}))});il.displayName="Text";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 jt(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){gn(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 gn(n,e,t){return(e=zc(e))in n?Object.defineProperty(n,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):n[e]=t,n}function zc(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)}var So="popper",Gc="popper-container",Xc={placement:"bottom-end",modifiers:{preventOverflow:{boundariesElement:"scrollParent",fn:(n,e)=>{var t,r,i=(t=Ks.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 Ar extends m.Component{constructor(e){super(e),gn(this,"element",void 0),gn(this,"container",void 0),gn(this,"nodeRef",k.createRef()),gn(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=k.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(Gc,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,d=u?Xc:{placement:"auto",modifiers:{preventOverflow:{boundariesElement:"viewport"}}},h=jt(jt(jt({},d),l),{},{modifiers:jt(jt(jt({},d.modifiers),l.modifiers),{},{preventOverflow:jt(jt({},(e=d.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 Ks(a||p,this.element,h);f.scheduleUpdate(),cancelAnimationFrame(this.rAF),this.rAF=window.requestAnimationFrame(()=>{if(o){var v=this.element.querySelector(".".concat(So));v instanceof HTMLElement&&!v.contains(document.activeElement)&&v.focus()}}),si.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(),si.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=e.containPortals,l=this.state.show,u=s?c.jsx(yd,{getContainer:()=>this.element,children:r}):r;return c.jsx(As,{isPortal:!0,children:c.jsx(bd,{in:l,timeout:i,classNames:"popper-transition",onEntered:this.handleEnter,onExited:this.handleExit,nodeRef:this.nodeRef,children:c.jsx("div",{ref:this.nodeRef,onClick:d=>{d.stopPropagation()},onKeyDown:d=>{d.key==="Escape"&&this.hide()},className:U(So,{interactive:o},t),onBlur:this.handleBlur,tabIndex:a?-1:void 0,role:"presentation",children:c.jsxs("div",{className:U("popper-content",{"popper-content--contain-portals":s}),children:[u,c.jsx("div",{className:"popper-arrow","x-arrow":""})]})})})})}render(){var e=this.state.popper,t=this.props["data-testid"];return c.jsx("div",{className:"popper-parent-container",ref:this.container,style:{display:"none"},"data-testid":t,children:e&&xi.createPortal(this.renderContent(),this.element)})}}gn(Ar,"defaultProps",{options:{},className:"",containerClassName:"",isMaximized:!1,timeout:ju.transitionMs,onEntered(){},onExited(){},onBlur(){},isShown:!1,interactive:!1,closeOnBlur:!1,keepInParent:!1,containPortals:!1,referenceObject:null,"data-testid":void 0});var hi;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 qc(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=Zc(e))in n?Object.defineProperty(n,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):n[e]=t,n}function Zc(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)}var Jc=B.module("Tooltip");class ue extends m.Component{static handleHidden(){ue.shownTooltipCount-=1,ue.shownTooltipCount===0&&(ue.lastHiddenTime=Date.now())}static handleShown(){ue.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=k.createRef(),this.popper=k.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?ue.handleShown():ue.handleHidden())}componentWillUnmount(){this.stopListening(),this.stopListeningWindow(),this.stopTimer();var e=this.state.isShown;e&&ue.handleHidden()}startListening(){if(!this.container.current||!this.container.current.parentElement){Jc.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;(ue.shownTooltipCount>0||Date.now()-ue.lastHiddenTime<ue.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(),si.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=qc({placement:"bottom"},u),c.jsx("div",{ref:this.container,style:{display:"none"},"data-testid":a,children:c.jsx(Ar,{className:U(o,"popper-tooltip"),options:u,ref:this.popper,onEntered:s,onExited:this.handleExited,interactive:t,referenceObject:i,children:c.jsxs("div",{className:"tooltip-content",children:[" ",l&&r]})})})}}hi=ue;ut(ue,"defaultTimeout",500);ut(ue,"defaultReshowTimeout",100);ut(ue,"triggerReshowThreshold",300);ut(ue,"shownTooltipCount",0);ut(ue,"lastHiddenTime",Date.now());ut(ue,"defaultProps",{interactive:!1,options:{},popperClassName:"",reshowTimeout:hi.defaultReshowTimeout,timeout:hi.defaultTimeout,onEntered:()=>{},onExited:()=>{},"data-testid":void 0});function _o(n,e){return nh(n)||th(n,e)||eh(n,e)||Qc()}function Qc(){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 z0(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 V0(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(d){u=!0,i=d}finally{try{if(!l&&t.return!=null&&(a=t.return(),Object(a)!==a))return}finally{if(u)throw i}}return s}}function G0(n){if(Array.isArray(n))return n}var _s=B.module("FileListItemEditor"),X0=()=>Promise.resolve();function q0(n){var e=n.item,t=n.onCancel,r=n.onSubmit,i=n.validate,o=i===void 0?X0:i,a=m.useRef(null),s=m.useState(e.basename),l=ri(s,2),u=l[0],d=l[1],h=m.useState(),p=ri(h,2),f=p[0],v=p[1],g=m.useState(Promise.resolve()),b=ri(g,2),y=b[0],S=b[1],C=m.useCallback(()=>{var x;(x=a.current)===null||x===void 0||x.focus()},[a]),_=m.useCallback(x=>x.stopPropagation(),[]),w=m.useCallback(()=>{y.then(()=>{r(u)}).catch(x=>_s.info("Unable to validate name",x))},[r,u,y]);m.useEffect(function(){var j=Je.makeCancelable(o(u));return j.then(()=>v(void 0)).catch(L=>{Je.isCanceled(L)||v(L)}),S(j),()=>j.cancel()},[o,u]),m.useEffect(function(){C()},[C]);var D=m.useCallback(()=>{_s.debug2("handleBlur"),w()},[w]),F=m.useCallback(x=>{var j=x.target.value;d(j)},[]),N=m.useCallback(x=>{x.stopPropagation();var j=x.key;switch(j){case"Enter":{w();break}case"Escape":{t();break}}},[t,w]);return c.jsxs("div",{className:"file-list-item-editor",children:[c.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:F,onClick:_,onDoubleClick:_,onMouseDown:_}),f&&c.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 ii(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=Y0(e))in n?Object.defineProperty(n,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):n[e]=t,n}function Y0(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)}function oi(n,e){return nS(n)||tS(n,e)||eS(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 eS(n,e){if(n){if(typeof n=="string")return Es(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)?Es(n,e):void 0}}function Es(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 tS(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(d){u=!0,i=d}finally{try{if(!l&&t.return!=null&&(a=t.return(),Object(a)!==a))return}finally{if(u)throw i}}return s}}function nS(n){if(Array.isArray(n))return n}function xu(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,d=n.onMove,h=n.onRename,p=n.onSelect,f=n.onSelectionChange,v=n.table,g=n.rowHeight,b=g===void 0?Qi:g,y=n.validateRename,S=y===void 0?()=>Promise.resolve():y,C=m.useState(),_=oi(C,2),w=_[0],D=_[1],F=m.useState([]),N=oi(F,2),x=N[0],j=N[1],L=m.useState(),re=oi(L,2),A=re[0],X=re[1],ie=m.useCallback(M=>{j(M),f==null||f(M)},[f]),oe=m.useCallback(M=>{X(M)},[]),be=m.useCallback(()=>{A&&(l==null||l(A))},[A,l]),ye=m.useCallback(()=>{x.length>0&&(u==null||u(x))},[u,x]),Oe=m.useCallback(()=>{a==null||a()},[a]),we=m.useCallback(()=>{A&&(s==null||s($.getPath(A.filename)))},[A,s]),ce=m.useCallback(()=>{A&&D(A)},[A]),Z=m.useCallback(()=>{D(void 0)},[]),V=m.useCallback(M=>{w&&(h==null||h(w,M),D(void 0))},[h,w]),te=m.useMemo(()=>{if(w)return[];var M=[];return a&&M.push({title:"New File",description:"Create new file",action:Oe,group:de.groups.medium}),s&&M.push({title:"New Folder",description:"Create new folder",action:we,group:de.groups.medium}),l&&M.push({title:"Copy File",description:"Copy the selected file",action:be,group:de.groups.low,disabled:A==null||dt(A)}),u&&x.length>0&&M.push({title:"Delete",description:"Delete",shortcut:Ss.FILE_EXPLORER.DELETE,action:ye,group:de.groups.low}),h&&M.push({title:"Rename",description:"Rename",shortcut:Ss.FILE_EXPLORER.RENAME,action:ce,group:de.groups.low,disabled:A==null}),M},[be,ye,Oe,we,ce,A,l,a,s,u,h,x,w]),G=m.useCallback(M=>(W(w),S(w,M)),[w,S]),J=m.useCallback(M=>{var Xe=M.item;return w&&w.filename===Xe.filename?c.jsx(Ii,ii(ii({},M),{},{children:c.jsx(q0,{item:Xe,validate:G,onSubmit:V,onCancel:Z})})):c.jsx(Ii,ii({},M))},[Z,V,w,G]);return c.jsxs("div",{className:"file-list-container",children:[v!=null&&c.jsx(B0,{onMove:d,onSelect:p,onSelectionChange:ie,onFocusChange:oe,renderItem:J,rowHeight:b,table:v,isMultiSelect:t,focusedPath:r}),o&&c.jsx(de,{actions:te})]})}xu.displayName="FileListContainer";function Ps(n,e,t){return(e=rS(e))in n?Object.defineProperty(n,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):n[e]=t,n}function rS(n){var e=iS(n,"string");return typeof e=="symbol"?e:e+""}function iS(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 _r extends Hn{constructor(e){super("Name already exists"),Ps(this,"isExistingFile",!0),Ps(this,"info",void 0),this.info=e}}function Ts(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 Os(n){return function(){var e=this,t=arguments;return new Promise(function(r,i){var o=n.apply(e,t);function a(l){Ts(o,r,i,a,s,"next",l)}function s(l){Ts(o,r,i,a,s,"throw",l)}a(void 0)})}}function Is(n,e){return lS(n)||sS(n,e)||aS(n,e)||oS()}function oS(){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 aS(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 sS(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(d){u=!0,i=d}finally{try{if(!l&&t.return!=null&&(a=t.return(),Object(a)!==a))return}finally{if(u)throw i}}return s}}function lS(n){if(Array.isArray(n))return n}var pt=B.module("FileExplorer");function eo(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,d=u===void 0?()=>{}:u,h=n.onCreateFile,p=h===void 0?()=>{}:h,f=n.onCreateFolder,v=f===void 0?()=>{}:f,g=n.onSelect,b=n.onSelectionChange,y=n.rowHeight,S=y===void 0?Qi:y,C=m.useState([]),_=Is(C,2),w=_[0],D=_[1],F=m.useState(),N=Is(F,2),x=N[0],j=N[1];m.useEffect(function(){var te;function G(){return J.apply(this,arguments)}function J(){return J=Os(function*(){pt.debug("initTable"),te=Je.makeCancelable(e.getTable(),M=>M.close());try{j(yield te)}catch(M){Je.isCanceled(M)||pt.error("Unable to initialize table",M)}}),J.apply(this,arguments)}return G(),()=>{te.cancel()}},[e]);var L=m.useCallback(V=>{Je.isCanceled(V)||pt.error(V)},[]),re=m.useCallback(()=>{pt.debug("handleCreateFile"),p()},[p]),A=m.useCallback(()=>{pt.debug("handleCreateFolder"),v()},[v]),X=m.useCallback(V=>{pt.debug("handleCopyFile",V.filename),a(V)},[a]),ie=m.useCallback(V=>{pt.debug("handleDelete, pending confirmation",V),D(V)},[]),oe=m.useCallback(()=>{pt.debug("handleDeleteConfirm",w),w.forEach(V=>e.deleteFile(dt(V)?$.makePath(V.filename):V.filename)),l(w),D([])},[w,l,e]),be=m.useCallback(()=>{pt.debug("handleDeleteCancel"),D([])},[]),ye=m.useCallback((V,te)=>{var G=$.reducePaths(V.map(J=>dt(J)?$.makePath(J.filename):J.filename));G.forEach(J=>{var M=$.isPath(J)?"".concat(te).concat($.getBaseName(J.substring(0,J.length-1)),"/"):"".concat(te).concat($.getBaseName(J));e.moveFile(J,M).then(()=>{d(J,M)}).catch(L)})},[L,d,e]),Oe=m.useCallback((V,te)=>{var G=V.filename,J=dt(V);J&&!G.endsWith("/")&&(G="".concat(G,"/"));var M="".concat($.getParent(G)).concat(te);J&&!M.endsWith("/")&&(M="".concat(M,"/")),pt.debug2("handleRename",G,M),e.moveFile(G,M).catch(L),d(G,M)},[L,d,e]),we=m.useCallback(function(){var V=Os(function*(te,G){if(G!==te.basename){$.validateName(G);var J="".concat($.getPath(te.filename)).concat(G);try{var M=yield e.info(J);throw new _r(M)}catch(Xe){if(!(Xe instanceof Ji))throw Xe}}});return function(te,G){return V.apply(this,arguments)}}(),[e]),ce=w.length>0,Z=m.useMemo(()=>w.length===1?'Are you sure you want to delete "'.concat(w[0].filename,'"?'):"Are you sure you want to delete the selected files?",[w]);return c.jsxs("div",{className:"file-explorer",children:[x&&c.jsx(xu,{isMultiSelect:r,focusedPath:i,showContextMenu:!0,onCopy:X,onCreateFolder:A,onCreateFile:re,onMove:ye,onDelete:ie,onRename:Oe,onSelect:g,onSelectionChange:b,rowHeight:S,table:x,validateRename:we}),c.jsx(mi,{isOpen:ce,headerText:Z,bodyText:"You cannot undo this action.",onCancel:be,onConfirm:oe,confirmButtonText:"Delete"})]})}eo.displayName="FileExplorer";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 uS(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 Qt(n,e,t){return(e=dS(e))in n?Object.defineProperty(n,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):n[e]=t,n}function dS(n){var e=cS(n,"string");return typeof e=="symbol"?e:e+""}function cS(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=B.module("NewItemModal");class Pn extends m.PureComponent{static getValidationMessage(e){return e instanceof _r&&e.info.type==="directory"?"Error: Cannot overwrite existing directory":"".concat(e)}static handleError(e){Je.isCanceled(e)||qt.error(e)}constructor(e){super(e),Qt(this,"inputRef",k.createRef()),Qt(this,"cancelableValidatePromise",void 0),Qt(this,"cancelableExistingItemPromise",void 0),Qt(this,"pending",new jr),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=$.hasPath(t)?$.getPath(t):"/";this.state={isSubmitting:!1,path:r,prevExtension:$.getExtension(t),showExtensionChangeModal:!1,showOverwriteModal:!1,value:$.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=$.hasPath(t)?$.getPath(t):"/";this.setState({path:r,value:$.getBaseName(t),validationError:void 0,prevExtension:$.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=Je.makeCancelable(this.validateName(e,t,r)),this.cancelableValidatePromise}validateName(e,t,r){var i=this;return uS(function*(){$.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 _r(u)}catch(d){if(!(d instanceof Ji))throw d}}return t})()}updateValidationStatus(e,t){this.getValidationPromise(e,t).then(()=>{this.setState({validationError:void 0})}).catch(this.handleValidationError).catch(Pn.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:$.makePath(e.filename)});else{var t=e.basename,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 Hn))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=$.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=$.getExtension(i);return s&&!e&&r!==null&&r!==u?{isSubmitting:!1,showExtensionChangeModal:!0,newExtension:u}:(this.getValidationPromise(o,i,!0).then(d=>{var h=this.props.onSubmit;h("".concat(o).concat(i))}).catch(d=>{if(d instanceof _r&&l!=="directory"&&d.info.type!=="directory"){this.setState({showOverwriteModal:!0});return}throw d}).catch(d=>{throw Je.isCanceled(d)&&this.setState({isSubmitting:!1}),d}).catch(this.handleValidationError).catch(Pn.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,"/"),c.jsxs(k.Fragment,{children:[c.jsx(ne,{kind:"ghost",className:"directory-breadcrumbs",onClick:()=>this.handleBreadcrumbSelect(o),"aria-label":i===0?"Home":void 0,icon:i===0?c.jsx(me,{icon:fd,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,d=l.path,h=l.showExtensionChangeModal,p=l.showOverwriteModal,f=l.validationError,v=l.value,g=l.prevExtension,b=l.newExtension,y=s==="directory",S=$.fileExtensionToString(g),C=$.fileExtensionToString(b),_=y?"Create":"Save",w=y?"New folder name":"Save file as";return c.jsxs(c.Fragment,{children:[c.jsxs(ks,{isOpen:r,toggle:i,onOpened:this.handleModalOpened,className:"modal-dialog-centered new-file-modal",children:[c.jsx(Ns,{toggle:i,children:a}),c.jsx(Ls,{children:c.jsx("form",{children:c.jsxs("div",{className:"d-flex flex-column new-file-modal-content",children:[c.jsxs("div",{className:"flex-grow-0 mb-4",children:[c.jsx("label",{htmlFor:"file-name-input",children:w}),c.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&&c.jsx("div",{className:"invalid-feedback",children:Pn.getValidationMessage(f)})]}),c.jsxs("div",{className:"flex-grow-0",children:[c.jsx("label",{children:"Directory: /"}),this.renderPathButtons(d)]}),c.jsx("div",{className:"flex-grow-1 file-explorer-container",children:c.jsx(eo,{onSelect:this.handleSelect,storage:t,focusedPath:d})})]})})}),c.jsxs(sl,{children:[c.jsx(ne,{kind:"secondary",onClick:i,children:"Cancel"}),c.jsx(ne,{kind:"primary",disabled:u,onClick:this.handleModalSubmit,children:_})]})]}),c.jsx(mi,{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"}),c.jsx(mi,{isOpen:h,headerText:"Confirm extension change",bodyText:'Are you sure you want to change extension from "'.concat(S,'" to "').concat(C,'"?'),onCancel:this.handleExtensionChangeCancel,onConfirm:this.handleExtensionChangeConfirm,cancelButtonText:'Keep "'.concat(S,'"'),confirmButtonText:'Use "'.concat(C,'"')})]})}}Qt(Pn,"defaultProps",{isOpen:!1,defaultValue:"/",notifyOnExtensionChange:!1,placeholder:"",onSubmit:(n,e)=>{},onCancel:()=>{}});function hS(n){var e=n.createFile,t=n.createFolder,r=n.onSearchChange,i=n.defaultSearchText,o=i===void 0?"":i;return c.jsxs("div",{className:"file-explorer-toolbar",children:[c.jsxs("div",{className:"file-explorer-toolbar-buttons",children:[c.jsx(ne,{kind:"ghost",icon:Ws,tooltip:"New notebook",onClick:e,"aria-label":"New notebook"}),c.jsx(ne,{kind:"ghost",icon:vd,tooltip:"New folder",onClick:t,"aria-label":"New folder"})]}),r&&c.jsx("div",{className:"file-explorer-toolbar-search",children:c.jsx(vl,{value:o,onChange:r,placeholder:"Search by name"})})]})}function Ms(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 mS(n){return function(){var e=this,t=arguments;return new Promise(function(r,i){var o=n.apply(e,t);function a(l){Ms(o,r,i,a,s,"next",l)}function s(l){Ms(o,r,i,a,s,"throw",l)}a(void 0)})}}function Du(n,e,t){return(e=pS(e))in n?Object.defineProperty(n,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):n[e]=t,n}function pS(n){var e=fS(n,"string");return typeof e=="symbol"?e:e+""}function fS(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 Zt=B.module("FileExplorerPanel"),vS=(n,e)=>{var t=$m(n),r=Br(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}},gS=Vn(vS,null,null,{forwardRef:!0});function bS(n){var e=n;return e!=null&&typeof e.button=="number"}class Dn extends k.Component{static handleError(e){Zt.error(e)}static isFocusEvent(e){return bS(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:""};Zt.debug("handleCreateFile",r,i,o),e.emit(Fe.CREATE_NOTEBOOK,r,i,o)}handleCreateDirectory(){this.setState({showCreateFolder:!0})}handleCreateDirectoryCancel(){Zt.debug("handleCreateDirectoryCancel"),this.setState({showCreateFolder:!1})}handleCreateDirectorySubmit(e){Zt.debug("handleCreateDirectorySubmit",e),this.setState({showCreateFolder:!1});var t=this.props.fileStorage;t.createDirectory(e).catch(Dn.handleError)}handleCopyFile(e){var t=this;return mS(function*(){var r=t.props.fileStorage;if(dt(e)){Zt.error("Invalid item in handleCopyItem",e);return}var i=yield $.getUniqueCopyFileName(r,e.filename);yield r.copyFile(e.filename,i)})()}handleDelete(e){var t=this.props.glEventHub;e.forEach(r=>{t.emit(Fe.CLOSE_FILE,{id:r.filename,itemName:r.filename})})}handleSelectionChange(e){var t="/";e.length===1&&(e[0].type==="directory"?t=$.makePath(e[0].filename):t=$.getPath(e[0].filename)),this.setState({focusedFilePath:t})}handleFileSelect(e,t){if(Zt.debug("fileSelect",e),e.type!=="directory"){var r=Dn.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(Fe.SELECT_NOTEBOOK,s,l,u,i,r)}}handleRename(e,t){var r=this.props.glEventHub;Zt.debug("handleRename",e,t),r.emit(Fe.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 c.jsxs(Hr,{className:"file-explorer-panel",componentPanel:this,glContainer:r,glEventHub:i,onSessionOpen:this.handleSessionOpened,onSessionClose:this.handleSessionClosed,onShow:this.handleShow,children:[c.jsx(hS,{createFile:this.handleCreateFile,createFolder:this.handleCreateDirectory}),a&&c.jsx(eo,{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}),c.jsx(Pn,{isOpen:s,type:"directory",title:"Create New Folder",storage:t,onSubmit:this.handleCreateDirectorySubmit,onCancel:this.handleCreateDirectoryCancel,defaultValue:l})]})}}Du(Dn,"COMPONENT","FileExplorerPanel");Du(Dn,"TITLE","File Explorer");var QC=gS(Dn);function Wn(n,e,t){return(e=yS(e))in n?Object.defineProperty(n,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):n[e]=t,n}function yS(n){var e=SS(n,"string");return typeof e=="symbol"?e:e+""}function SS(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 js=B.module("LogPanel");class Kr extends m.PureComponent{constructor(e){super(e),Wn(this,"isBottomVisible",void 0),Wn(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;js.debug("Session opened",[t]),this.setState({session:t})}handleSessionClosed(e){js.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 c.jsxs(Hr,{componentPanel:this,glContainer:t,glEventHub:r,onResize:this.handleResize,onHide:this.handleHide,onShow:this.handleShow,onSessionOpen:this.handleSessionOpened,onSessionClose:this.handleSessionClosed,children:[i==null&&c.jsx("div",{className:"log-panel-disconnected-message",children:"Waiting for session connection"}),i!=null&&c.jsx(ve,{session:i,ref:o=>{this.logView=o}})]})}}Wn(Kr,"defaultProps",{session:null});Wn(Kr,"COMPONENT","LogPanel");Wn(Kr,"TITLE","Log");var CS=(n,e)=>{var t;return{session:(t=Br(n,e.localDashboardId))===null||t===void 0?void 0:t.session}},e_=Vn(CS,null,null,{forwardRef:!0})(Kr);export{dh as $,ue as A,Je as B,ge as C,ul as D,$d as E,He as F,kr as G,al as H,ct as I,ne as J,E as K,ml as L,P as M,dl as N,de as O,Ar as P,Nr as Q,lt as R,fe as S,il as T,yn as U,mi as V,Rc as W,vl as X,Lr as Y,sl as Z,bl as _,jC as a,lv as a$,Di as a0,MS as a1,cm as a2,Mi as a3,jS as a4,hl as a5,yl as a6,cl as a7,$c as a8,Mh as a9,ru as aA,hv as aB,ee as aC,Ki as aD,eu as aE,uu as aF,Rv as aG,ou as aH,fr as aI,tu as aJ,fg as aK,pg as aL,dC as aM,pC as aN,hC as aO,vC as aP,fa as aQ,wC as aR,De as aS,EC as aT,su as aU,nu as aV,AC as aW,MC as aX,ov as aY,sv as aZ,av as a_,wr as aa,bm as ab,Et as ac,Ge as ad,Tt as ae,K as af,Ye as ag,_l as ah,Cl as ai,Sl as aj,AS as ak,kS as al,NS as am,YS as an,T as ao,sC as ap,PC as aq,Og as ar,mg as as,hg as at,DC as au,Qr as av,du as aw,OC as ax,bC as ay,yC as az,_v as b,zy as b$,lC as b0,aC as b1,yv as b2,lu as b3,Tv as b4,SC as b5,CC as b6,_C as b7,kC as b8,cC as b9,cp as bA,dp as bB,Ml as bC,gi as bD,mp as bE,xl as bF,Il as bG,vi as bH,qn as bI,ea as bJ,ZS as bK,nC as bL,ta as bM,IS as bN,lo as bO,$g as bP,Xi as bQ,LC as bR,Kg as bS,zg as bT,Te as bU,Wb as bV,R as bW,Ut as bX,vu as bY,Le as bZ,xr as b_,fC as ba,mC as bb,gC as bc,IC as bd,NC as be,mn as bf,uC as bg,zv as bh,jp as bi,JS as bj,Kt as bk,Ol as bl,iC as bm,Ip as bn,QS as bo,eC as bp,tC as bq,Op as br,Dp as bs,Mp as bt,rC as bu,pp as bv,hp as bw,Dl as bx,up as by,lp as bz,dm as c,ot as c$,Iu as c0,gu as c1,lb as c2,Cu as c3,Jg as c4,On as c5,bu as c6,In as c7,Iy as c8,Or as c9,zm as cA,Vm as cB,Gm as cC,sp as cD,el as cE,ES as cF,Js as cG,Hr as cH,VC as cI,mt as cJ,vt as cK,XS as cL,KC as cM,FS as cN,zC as cO,WC as cP,GC as cQ,jr as cR,LS as cS,UC as cT,RS as cU,BC as cV,GS as cW,$m as cX,$S as cY,Br as cZ,Fe as c_,o0 as ca,ve as cb,Pi as cc,fu as cd,En as ce,Ai as cf,$ as cg,Ji as ch,JC as ci,Ri as cj,rv as ck,xC as cl,Jm as cm,YC as cn,e_ as co,ZC as cp,QC as cq,gc as cr,TS as cs,Wm as ct,Bm as cu,BS as cv,HS as cw,US as cx,WS as cy,Km as cz,zS as d,Pn as d0,dt as d1,Hm as d2,Ne as d3,FC as d4,RC as d5,qC as d6,XC as d7,m0 as d8,h0 as d9,HC as da,$C as db,DS as dc,gt as dd,OS as de,Xr as df,zd as dg,Hn as dh,iv as e,qS as f,wm as g,KS as h,Tl as i,VS as j,xS as k,Pc as l,Xn as m,Lc as n,Tc as o,nl as p,tl as q,le as r,TC as s,Oc as t,_m as u,Ic as v,ol as w,qs as x,rl as y,PS as z};
|
|
46
|
-
//# sourceMappingURL=LogPanel-
|
|
46
|
+
//# sourceMappingURL=LogPanel-CRnqBXMk.js.map
|