@marimo-team/frontend 0.25.3-dev26 → 0.25.3-dev28

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.
Files changed (97) hide show
  1. package/dist/assets/{CellStatus-O0rU3_5j.js → CellStatus-CfD06qo-.js} +1 -1
  2. package/dist/assets/{ConnectedDataExplorerComponent-TprnxZeJ.js → ConnectedDataExplorerComponent-DMdJT25t.js} +1 -1
  3. package/dist/assets/{ErrorBoundary-BkSCfv3B.js → ErrorBoundary-CnJNKrcX.js} +2 -2
  4. package/dist/assets/{JsonOutput-Dq6MGIMV.js → JsonOutput-CNVvhRHP.js} +3 -3
  5. package/dist/assets/{MarimoErrorOutput-BLtCVffa.js → MarimoErrorOutput-ClUcRTow.js} +1 -1
  6. package/dist/assets/{RenderHTML-PtQ99V0D.js → RenderHTML-D-cBOIod.js} +1 -1
  7. package/dist/assets/{RunButton-B8KRdPZ-.js → RunButton-DshU7w3x.js} +1 -1
  8. package/dist/assets/{add-cell-with-ai-BOBZjUxI.js → add-cell-with-ai-C7D8CWOd.js} +1 -1
  9. package/dist/assets/{add-connection-dialog-DP62zXw2.js → add-connection-dialog-DWzd_jMJ.js} +1 -1
  10. package/dist/assets/{agent-panel-BFul7UiF.js → agent-panel-C5nC7_t7.js} +1 -1
  11. package/dist/assets/{ai-model-dropdown-sTKkdrbX.js → ai-model-dropdown-BHfJ-Lss.js} +1 -1
  12. package/dist/assets/{app-config-button-Bp44UZdD.js → app-config-button-DlGrZ2Ni.js} +1 -1
  13. package/dist/assets/{blob-ykpU69Lk.js → blob-CyjiNaHn.js} +1 -1
  14. package/dist/assets/{cell-editor-B7YlotyH.js → cell-editor-CfcrlmuW.js} +1 -1
  15. package/dist/assets/{cell-link-CmO9D2a2.js → cell-link-CF9EP0SZ.js} +1 -1
  16. package/dist/assets/{cells-BMs-CYDt.js → cells-CDwPlSdp.js} +1 -1
  17. package/dist/assets/{chat-display-Dw8HQAAY.js → chat-display-7HpKaid1.js} +1 -1
  18. package/dist/assets/{chat-panel-DPDZrfoJ.js → chat-panel-BNZZnlZ9.js} +1 -1
  19. package/dist/assets/{chat-ui-BxnFw9Za.js → chat-ui-DP_BiBUt.js} +1 -1
  20. package/dist/assets/{code-visibility-CGVmpSdE.js → code-visibility-BwDOkyau.js} +1 -1
  21. package/dist/assets/{column-preview-BQ4k86Lv.js → column-preview-Cv-kgCIV.js} +1 -1
  22. package/dist/assets/{command-palette-BfxYnBUD.js → command-palette-BUSO0Oc5.js} +1 -1
  23. package/dist/assets/{common-CzWTWhcY.js → common-py6DRg3V.js} +1 -1
  24. package/dist/assets/{components-C-p2nJ78.js → components-Bfaspyl-.js} +1 -1
  25. package/dist/assets/{config-BtRLgrlt.js → config-BHq_PhD6.js} +1 -1
  26. package/dist/assets/{config-CMUeR8Wr.js → config-D-dRq5S4.js} +1 -1
  27. package/dist/assets/{datasource-CEDUN47W.js → datasource-pmZZLcSP.js} +1 -1
  28. package/dist/assets/{dependency-graph-panel-KWuUrABU.js → dependency-graph-panel-Dyz3xfjn.js} +1 -1
  29. package/dist/assets/{documentation-panel-T1wYs9YS.js → documentation-panel-C7kvIGCE.js} +1 -1
  30. package/dist/assets/{download-Bt4rM2gS.js → download-D_fcZeOz.js} +1 -1
  31. package/dist/assets/{edit-page-DIxL37jf.js → edit-page-DUPBKAne.js} +4 -4
  32. package/dist/assets/{error-entries-CQTemuon.js → error-entries-DsT8TWWD.js} +1 -1
  33. package/dist/assets/{error-panel-BmlN965r.js → error-panel-L-k_BipK.js} +1 -1
  34. package/dist/assets/{feedback-button-CO89l9HJ.js → feedback-button-Df_o0zuW.js} +1 -1
  35. package/dist/assets/feedback-button-TiBA_epa.js +1 -0
  36. package/dist/assets/{file-explorer-panel-Bs25Xwng.js → file-explorer-panel-rGhQZF3X.js} +1 -1
  37. package/dist/assets/{file-name-input-DgR3ynbz.js → file-name-input-yNGA-94L.js} +1 -1
  38. package/dist/assets/{floating-outline-kOJ_XOxZ.js → floating-outline-CPpTadCY.js} +1 -1
  39. package/dist/assets/{formats-yZ06h1Pl.js → formats-BkelUASr.js} +1 -1
  40. package/dist/assets/{gallery-page--AiS7R2S.js → gallery-page-OIIqN4HS.js} +1 -1
  41. package/dist/assets/{ganttDiagram-EL5Y4UJY-2n7Ig5Jm.js → ganttDiagram-EL5Y4UJY-CYqkCfFG.js} +1 -1
  42. package/dist/assets/{glide-data-editor-FopeFe04.js → glide-data-editor-DcMt5kAn.js} +1 -1
  43. package/dist/assets/{home-page-DEUEDKZQ.js → home-page-DK_tEqpx.js} +1 -1
  44. package/dist/assets/{hooks-CsCHI0xl.js → hooks-DK7oKfM4.js} +1 -1
  45. package/dist/assets/{index-BXheV3uz.js → index-ByqLD7l_.js} +6 -6
  46. package/dist/assets/{layout-CcQIAduN.js → layout-C57PqzDb.js} +3 -3
  47. package/dist/assets/linear-Bma8J3iM.js +1 -0
  48. package/dist/assets/{logs-panel-Cj-mRfbP.js → logs-panel-GbibvoIL.js} +1 -1
  49. package/dist/assets/{markdown-renderer-Dg2Tj8xg.js → markdown-renderer-DVpG4g2Y.js} +1 -1
  50. package/dist/assets/{mermaid-C4EiVqcd.js → mermaid-D2FUGQeW.js} +2 -2
  51. package/dist/assets/{name-cell-input-DhWcLBL9.js → name-cell-input-DCDJfAiP.js} +1 -1
  52. package/dist/assets/{outline-panel-DCCN7CCz.js → outline-panel-B23tzehc.js} +1 -1
  53. package/dist/assets/{packages-panel-cI3VRnI0.js → packages-panel-CrmQCics.js} +1 -1
  54. package/dist/assets/{panel-accordion-state-CrUAB8rV.js → panel-accordion-state-D-jVlW4Q.js} +1 -1
  55. package/dist/assets/{panels-DeK2CjCU.js → panels-DKlRJYJU.js} +1 -1
  56. package/dist/assets/precisionRound-BxlUs8G4.js +1 -0
  57. package/dist/assets/{process-output-C0AVlTcL.js → process-output-DhdIYvyI.js} +1 -1
  58. package/dist/assets/{quadrantDiagram-AXDQQJYC-yBhCDI7E.js → quadrantDiagram-AXDQQJYC-D9KH5Zge.js} +1 -1
  59. package/dist/assets/react-vega-BTNeboR2.js +189 -0
  60. package/dist/assets/{readonly-code-display-CEGKPKlf.js → readonly-code-display-D2gaiZLE.js} +1 -1
  61. package/dist/assets/{readonly-python-code-kOLuuvuL.js → readonly-python-code-CsSJ2wTV.js} +1 -1
  62. package/dist/assets/{reveal-component-m_Q_Dhsa.js → reveal-component-BrqsPAyq.js} +1 -1
  63. package/dist/assets/{run-page-ZPnT0tT8.js → run-page-BcP3NLly.js} +1 -1
  64. package/dist/assets/{runtime-details-state-DRpKx1d7.js → runtime-details-state-CeS_Nzjx.js} +1 -1
  65. package/dist/assets/{scratchpad-panel-4r5I7_4T.js → scratchpad-panel-BgcSKyRl.js} +1 -1
  66. package/dist/assets/{session-panel-B-fUHivk.js → session-panel-GmgT9Wee.js} +1 -1
  67. package/dist/assets/{snippets-panel-QqliOy2l.js → snippets-panel-B_CKVhYM.js} +1 -1
  68. package/dist/assets/{state-BAKG3nB6.js → state-BW2aGLUH.js} +1 -1
  69. package/dist/assets/{state-BiuybHTd.js → state-Payxmcji.js} +1 -1
  70. package/dist/assets/{terminal-CP30at9D.js → terminal-Mpb1tujO.js} +1 -1
  71. package/dist/assets/{time-MgToa8VM.js → time-DswSXBDk.js} +1 -1
  72. package/dist/assets/tooltip-BsSdc1NQ.js +61 -0
  73. package/dist/assets/{tracing-panel-_OkwL3ST.js → tracing-panel-Ci3Lik1n.js} +2 -2
  74. package/dist/assets/{tracing-Cg6nJ9oa.js → tracing-rz4dtYLA.js} +1 -1
  75. package/dist/assets/{tree-actions-D5U7Yym8.js → tree-actions-Bi2wp_hj.js} +1 -1
  76. package/dist/assets/{useAddCell-C3jdhSc9.js → useAddCell-D5SZ9USq.js} +1 -1
  77. package/dist/assets/{useBoolean-BHCcNH_F.js → useBoolean-Dd06vW7f.js} +1 -1
  78. package/dist/assets/{useCellActionButton-Db-2kvJ0.js → useCellActionButton-DP91E5bD.js} +1 -1
  79. package/dist/assets/{useDeleteCell-D0dwhgwH.js → useDeleteCell-Bo9Jw4f-.js} +1 -1
  80. package/dist/assets/{useDependencyPanelTab-BjQVPzm0.js → useDependencyPanelTab-Dw75bZEs.js} +1 -1
  81. package/dist/assets/{useInstallPackage-B-krIeGp.js → useInstallPackage-EM5qIaUh.js} +1 -1
  82. package/dist/assets/{useNotebookActions-CY_gTNzg.js → useNotebookActions-CSVSrbCO.js} +1 -1
  83. package/dist/assets/{useRunCells-Dyf_vzJl.js → useRunCells-y87fM1aq.js} +1 -1
  84. package/dist/assets/{useSplitCell-DA8ujlOv.js → useSplitCell-CT6wuo-t.js} +1 -1
  85. package/dist/assets/{vega-component-CaZvZfgt.js → vega-component-gJHVkd2n.js} +1 -1
  86. package/dist/assets/{vega-embed-container-DJPNkHPb.js → vega-embed-container-CxuIHhsS.js} +1 -1
  87. package/dist/assets/vega-loader.browser-Bu25TKax.js +6 -0
  88. package/dist/assets/{xychartDiagram-S5SC5T6Z-KbGzG6-u.js → xychartDiagram-S5SC5T6Z-CeRnBS5e.js} +1 -1
  89. package/dist/index.html +28 -28
  90. package/package.json +2 -1
  91. package/src/core/host/protocol.ts +3 -1
  92. package/dist/assets/feedback-button-QWfd9e1X.js +0 -1
  93. package/dist/assets/linear-0eij_aAG.js +0 -1
  94. package/dist/assets/precisionRound-Bq_nmf5u.js +0 -1
  95. package/dist/assets/react-vega-C3rYGtP6.js +0 -189
  96. package/dist/assets/tooltip-mT3CGest.js +0 -61
  97. package/dist/assets/vega-loader.browser-CLRkNgm7.js +0 -6
@@ -0,0 +1,61 @@
1
+ import{g as e}from"./useEventListener-D9cftcHj.js";import{t}from"./objects-snlMn4yk.js";import{G as n,K as r,M as i,a,c as o,o as s}from"./vega-loader.browser-Bu25TKax.js";var c=Uint8Array.of(65,82,82,79,87,49),l={V1:0,V2:1,V3:2,V4:3,V5:4},u={NONE:0,Schema:1,DictionaryBatch:2,RecordBatch:3,Tensor:4,SparseTensor:5},d={Dictionary:-1,NONE:0,Null:1,Int:2,Float:3,Binary:4,Utf8:5,Bool:6,Decimal:7,Date:8,Time:9,Timestamp:10,Interval:11,List:12,Struct:13,Union:14,FixedSizeBinary:15,FixedSizeList:16,Map:17,Duration:18,LargeBinary:19,LargeUtf8:20,LargeList:21,RunEndEncoded:22,BinaryView:23,Utf8View:24,ListView:25,LargeListView:26},f={HALF:0,SINGLE:1,DOUBLE:2},p={DAY:0,MILLISECOND:1},m={SECOND:0,MILLISECOND:1,MICROSECOND:2,NANOSECOND:3},h={YEAR_MONTH:0,DAY_TIME:1,MONTH_DAY_NANO:2},g={Sparse:0,Dense:1},ee=Uint8Array,te=Uint16Array,ne=Uint32Array,re=BigUint64Array,ie=Int8Array,ae=Int16Array,_=Int32Array,v=BigInt64Array,oe=Float32Array,y=Float64Array;function se(e,t){let n=Math.log2(e)-3;return(t?[ie,ae,_,v]:[ee,te,ne,re])[n]}Object.getPrototypeOf(Int8Array);function b(e,t){let n=0,r=e.length;if(r<=2147483648)do{let i=n+r>>>1;e[i]<=t?n=i+1:r=i}while(n<r);else do{let i=Math.trunc((n+r)/2);e[i]<=t?n=i+1:r=i}while(n<r);return n}function x(e,t,n){if(t(e))return e;throw Error(n(e))}function S(e,t,n){return t=Array.isArray(t)?t:Object.values(t),x(e,e=>t.includes(e),n??(()=>`${e} must be one of ${t}`))}function ce(e,t){for(let[n,r]of Object.entries(e))if(r===t)return n;return`<Unknown>`}var C=e=>`Unsupported data type: "${ce(d,e)}" (id ${e})`,le=(e,t,n=!0,r=null)=>({name:e,type:t,nullable:n,metadata:r});function ue(e){return Object.hasOwn(e,`name`)&&de(e.type)}function de(e){return typeof e?.typeId==`number`}function w(e,t=``,n=!0){return ue(e)?e:le(t,x(e,de,()=>`Data type expected.`),n)}var fe=(e,t,n=!1,r=-1)=>({typeId:d.Dictionary,id:r,dictionary:e,indices:t||me(),ordered:n}),pe=(e=32,t=!0)=>({typeId:d.Int,bitWidth:S(e,[8,16,32,64]),signed:t,values:se(e,t)}),me=()=>pe(32),he=(e=2)=>({typeId:d.Float,precision:S(e,f),values:[te,oe,y][e]}),ge=()=>({typeId:d.Binary,offsets:_}),_e=()=>({typeId:d.Utf8,offsets:_}),ve=(e,t,n=128)=>({typeId:d.Decimal,precision:e,scale:t,bitWidth:S(n,[128,256]),values:re}),ye=e=>({typeId:d.Date,unit:S(e,p),values:e===p.DAY?_:v}),be=(e=m.MILLISECOND,t=32)=>({typeId:d.Time,unit:S(e,m),bitWidth:S(t,[32,64]),values:t===32?_:v}),xe=(e=m.MILLISECOND,t=null)=>({typeId:d.Timestamp,unit:S(e,m),timezone:t,values:v}),Se=(e=h.MONTH_DAY_NANO)=>({typeId:d.Interval,unit:S(e,h),values:e===h.MONTH_DAY_NANO?void 0:_}),Ce=e=>({typeId:d.List,children:[w(e)],offsets:_}),we=e=>({typeId:d.Struct,children:Array.isArray(e)&&ue(e[0])?e:Object.entries(e).map(([e,t])=>le(e,t))}),Te=(e,t,n,r)=>(n??=t.map((e,t)=>t),{typeId:d.Union,mode:S(e,g),typeIds:n,typeMap:n.reduce((e,t,n)=>(e[t]=n,e),{}),children:t.map((e,t)=>w(e,`_${t}`)),typeIdForValue:r,offsets:_}),Ee=e=>({typeId:d.FixedSizeBinary,stride:e}),De=(e,t)=>({typeId:d.FixedSizeList,stride:t,children:[w(e)]}),Oe=(e,t)=>({typeId:d.Map,keysSorted:e,children:[t],offsets:_}),ke=(e=m.MILLISECOND)=>({typeId:d.Duration,unit:S(e,m),values:v}),Ae=()=>({typeId:d.LargeBinary,offsets:v}),je=()=>({typeId:d.LargeUtf8,offsets:v}),Me=e=>({typeId:d.LargeList,children:[w(e)],offsets:v}),Ne=(e,t)=>({typeId:d.RunEndEncoded,children:[x(w(e,`run_ends`),e=>e.type.typeId===d.Int,()=>`Run-ends must have an integer type.`),w(t,`values`)]}),Pe=e=>({typeId:d.ListView,children:[w(e,`value`)],offsets:_}),Fe=e=>({typeId:d.LargeListView,children:[w(e,`value`)],offsets:v}),T=new y(2).buffer;new v(T),new ne(T),new _(T),new ee(T);function E(e){if(e>2**53-1||e<-(2**53-1))throw Error(`BigInt exceeds integer number representation: ${e}`);return Number(e)}function D(e,t){return Number(e/t)+Number(e%t)/Number(t)}var O=e=>BigInt.asUintN(64,e);function Ie(e,t){let n=t<<1,r;return BigInt.asIntN(64,e[n+1])<0?(r=O(~e[n])|O(~e[n+1])<<64n,r=-(r+1n)):r=e[n]|e[n+1]<<64n,r}function Le(e,t){let n=t<<2,r;return BigInt.asIntN(64,e[n+3])<0?(r=O(~e[n])|O(~e[n+1])<<64n|O(~e[n+2])<<128n|O(~e[n+3])<<192n,r=-(r+1n)):r=e[n]|e[n+1]<<64n|e[n+2]<<128n|e[n+3]<<192n,r}var Re=new TextDecoder(`utf-8`);new TextEncoder;function k(e){return Re.decode(e)}function ze(e,t){return!!(e[t>>3]&1<<t%8)}function A(e,t){let n=t+F(e,t),r=n-F(e,n),i=P(e,r);return(t,a,o=null)=>{if(t<i){let i=P(e,r+t);if(i)return a(e,n+i)}return o}}function j(e,t){return t}function M(e,t){return!!Be(e,t)}function Be(e,t){return N(e,t)<<24>>24}function N(e,t){return e[t]}function P(e,t){return Ve(e,t)<<16>>16}function Ve(e,t){return e[t]|e[t+1]<<8}function F(e,t){return e[t]|e[t+1]<<8|e[t+2]<<16|e[t+3]<<24}function He(e,t){return F(e,t)>>>0}function I(e,t){return E(BigInt.asIntN(64,BigInt(He(e,t))+(BigInt(He(e,t+4))<<32n)))}function L(e,t){let n=t+F(e,t),r=F(e,n);return n+=4,k(e.subarray(n,n+r))}function R(e,t,n,r){if(!t)return[];let i=t+F(e,t);return Array.from({length:F(e,i)},(t,a)=>r(e,i+4+a*n))}var z=Symbol(`rowIndex`);function B(e,t){class n{constructor(e){this[z]=e}toJSON(){return We(e,t,this[z])}}let r=n.prototype;for(let n=0;n<e.length;++n){if(Object.hasOwn(r,e[n]))continue;let i=t[n];Object.defineProperty(r,e[n],{get(){return i.at(this[z])},enumerable:!0})}return e=>new n(e)}function Ue(e,t){return n=>We(e,t,n)}function We(e,t,n){let r={};for(let i=0;i<e.length;++i)r[e[i]]=t[i].at(n);return r}function Ge(e){return e instanceof H}var V=class{static ArrayType=null;constructor({length:e,nullCount:t,type:n,validity:r,values:i,offsets:a,sizes:o,children:s}){this.length=e,this.nullCount=t,this.type=n,this.validity=r,this.values=i,this.offsets=a,this.sizes=o,this.children=s,(!t||!this.validity)&&(this.at=e=>this.value(e))}get[Symbol.toStringTag](){return`Batch`}at(e){return this.isValid(e)?this.value(e):null}isValid(e){return ze(this.validity,e)}value(e){return this.values[e]}slice(e,t){let n=t-e,r=Array(n);for(let t=0;t<n;++t)r[t]=this.at(e+t);return r}*[Symbol.iterator](){for(let e=0;e<this.length;++e)yield this.at(e)}},H=class extends V{constructor(e){super(e);let{length:t,values:n}=this;this.values=n.subarray(0,t)}slice(e,t){return this.nullCount?super.slice(e,t):this.values.subarray(e,t)}[Symbol.iterator](){return this.nullCount?super[Symbol.iterator]():this.values[Symbol.iterator]()}},U=class extends V{static ArrayType=y},W=class extends V{static ArrayType=Array},Ke=class extends W{value(e){return null}},G=class extends U{value(e){return E(this.values[e])}},qe=class extends U{value(e){let t=this.values[e],n=(t&31744)>>10,r=(t&1023)/1024,i=(-1)**((t&32768)>>15);switch(n){case 31:return i*(r?NaN:1/0);case 0:return i*(r?6103515625e-14*r:0)}return i*2**(n-15)*(1+r)}},Je=class extends W{value(e){return ze(this.values,e)}},Ye=class extends V{constructor(e){super(e);let{bitWidth:t,scale:n}=this.type;this.decimal=t===128?Ie:Le,this.scale=10n**BigInt(n)}},Xe=class extends Ye{static ArrayType=y;value(e){return D(this.decimal(this.values,e),this.scale)}},Ze=class extends Ye{static ArrayType=Array;value(e){return this.decimal(this.values,e)}},Qe=class extends W{constructor(e){super(e),this.source=e}value(e){return new Date(this.source.value(e))}},$e=class extends U{value(e){return 864e5*this.values[e]}},et=G,tt=class extends G{value(e){return super.value(e)*1e3}},nt=G,rt=class extends G{value(e){return D(this.values[e],1000n)}},it=class extends G{value(e){return D(this.values[e],1000000n)}},at=class extends W{value(e){return this.values.subarray(e<<1,e+1<<1)}},ot=class extends W{value(e){let t=this.values,n=e<<4;return Float64Array.of(F(t,n),F(t,n+4),I(t,n+8))}},st=({values:e,offsets:t},n)=>e.subarray(t[n],t[n+1]),ct=({values:e,offsets:t},n)=>e.subarray(E(t[n]),E(t[n+1])),lt=class extends W{value(e){return st(this,e)}},ut=class extends W{value(e){return ct(this,e)}},dt=class extends W{value(e){return k(st(this,e))}},ft=class extends W{value(e){return k(ct(this,e))}},pt=class extends W{value(e){let t=this.offsets;return this.children[0].slice(t[e],t[e+1])}},mt=class extends W{value(e){let t=this.offsets;return this.children[0].slice(E(t[e]),E(t[e+1]))}},ht=class extends W{value(e){let t=this.offsets[e],n=t+this.sizes[e];return this.children[0].slice(t,n)}},gt=class extends W{value(e){let t=this.offsets[e],n=t+this.sizes[e];return this.children[0].slice(E(t),E(n))}},_t=class extends W{constructor(e){super(e),this.stride=this.type.stride}},vt=class extends _t{value(e){let{stride:t,values:n}=this;return n.subarray(e*t,(e+1)*t)}},yt=class extends _t{value(e){let{children:t,stride:n}=this;return t[0].slice(e*n,(e+1)*n)}};function bt({children:e,offsets:t},n){let[r,i]=e[0].children,a=t[n],o=t[n+1],s=[];for(let e=a;e<o;++e)s.push([r.at(e),i.at(e)]);return s}var xt=class extends W{value(e){return bt(this,e)}},St=class extends W{value(e){return new Map(bt(this,e))}},Ct=class extends W{constructor({typeIds:e,...t}){super(t),this.typeIds=e,this.typeMap=this.type.typeMap}value(e,t=e){let{typeIds:n,children:r,typeMap:i}=this;return r[i[n[e]]].at(t)}},wt=class extends Ct{value(e){return super.value(e,this.offsets[e])}},Tt=class extends W{constructor(e,t=Ue){super(e),this.names=this.type.children.map(e=>e.name),this.factory=t(this.names,this.children)}value(e){return this.factory(e)}},Et=class extends Tt{constructor(e){super(e,B)}},Dt=class extends W{value(e){let[{values:t},n]=this.children;return n.at(b(t,e))}},Ot=class extends W{setDictionary(e){return this.dictionary=e,this.cache=e.cache(),this}value(e){return this.cache[this.key(e)]}key(e){return this.values[e]}},kt=class extends W{constructor({data:e,...t}){super(t),this.data=e}view(e){let{values:t,data:n}=this,r=e<<4,i=r+4,a=t,o=F(a,r);return o>12&&(i=F(a,r+12),a=n[F(a,r+8)]),a.subarray(i,i+o)}},At=class extends kt{value(e){return this.view(e)}},jt=class extends kt{value(e){return k(this.view(e))}};function Mt(e){let t=[];return{add(e){return t.push(e),this},clear:()=>t=[],done:()=>new Nt(t,e)}}var Nt=class{constructor(e,t=e[0]?.type){this.type=t,this.length=e.reduce((e,t)=>e+t.length,0),this.nullCount=e.reduce((e,t)=>e+t.nullCount,0),this.data=e;let n=e.length,r=new Int32Array(n+1);if(n===1){let[t]=e;r[1]=t.length,this.at=e=>t.at(e)}else for(let t=0,i=0;t<n;++t)r[t+1]=i+=e[t].length;this.offsets=r}get[Symbol.toStringTag](){return`Column`}[Symbol.iterator](){let e=this.data;return e.length===1?e[0][Symbol.iterator]():Pt(e)}at(e){let{data:t,offsets:n}=this,r=b(n,e)-1;return t[r]?.at(e-n[r])}get(e){return this.at(e)}toArray(){let{length:e,nullCount:t,data:n}=this,r=!t&&Ge(n[0]),i=n.length;if(r&&i===1)return n[0].values;let a=new(!i||t>0?Array:n[0].constructor.ArrayType??n[0].values.constructor)(e);return r?Ft(a,n):It(a,n)}cache(){return this._cache??=this.toArray()}};function*Pt(e){for(let t=0;t<e.length;++t){let n=e[t][Symbol.iterator]();for(let e=n.next();!e.done;e=n.next())yield e.value}}function Ft(e,t){for(let n=0,r=0;n<t.length;++n){let{values:i}=t[n];e.set(i,r),r+=i.length}return e}function It(e,t){let n=-1;for(let r=0;r<t.length;++r){let i=t[r];for(let t=0;t<i.length;++t)e[++n]=i.at(t)}return e}var Lt=class e{constructor(e,t,n=!1){let r=e.fields.map(e=>e.name);this.schema=e,this.names=r,this.children=t,this.factory=n?B:Ue;let i=[];this.getFactory=e=>i[e]??(i[e]=this.factory(r,t.map(t=>t.data[e])))}get[Symbol.toStringTag](){return`Table`}get numCols(){return this.names.length}get numRows(){return this.children[0]?.length??0}getChildAt(e){return this.children[e]}getChild(e){let t=this.names.findIndex(t=>t===e);return t>-1?this.children[t]:void 0}selectAt(t,n=[]){let{children:r,factory:i,schema:a}=this,{fields:o}=a;return new e({...a,fields:t.map((e,t)=>Rt(o[e],n[t]))},t.map(e=>r[e]),i===B)}select(e,t){let n=this.names,r=e.map(e=>n.indexOf(e));return this.selectAt(r,t)}toColumns(){let{children:e,names:t}=this,n={};return t.forEach((t,r)=>n[t]=e[r]?.toArray()??[]),n}toArray(){let{children:e,getFactory:t,numRows:n}=this,r=e[0]?.data??[],i=Array(n);for(let e=0,n=-1;e<r.length;++e){let a=t(e);for(let t=0;t<r[e].length;++t)i[++n]=a(t)}return i}*[Symbol.iterator](){let{children:e,getFactory:t}=this,n=e[0]?.data??[];for(let e=0;e<n.length;++e){let r=t(e);for(let t=0;t<n[e].length;++t)yield r(t)}}at(e){let{children:t,getFactory:n,numRows:r}=this;if(e<0||e>=r)return null;let[{offsets:i}]=t,a=b(i,e)-1;return n(a)(e-i[a])}get(e){return this.at(e)}};function Rt(e,t){return t!=null&&t!==e.name?{...e,name:t}:e}function zt(e,t={}){let{typeId:n,bitWidth:r,precision:i,unit:a}=e,{useBigInt:o,useDate:s,useDecimalBigInt:c,useMap:l,useProxy:u}=t;switch(n){case d.Null:return Ke;case d.Bool:return Je;case d.Int:case d.Time:case d.Duration:return o||r<64?H:G;case d.Float:return i?H:qe;case d.Date:return Bt(a===p.DAY?$e:et,s&&Qe);case d.Timestamp:return Bt(a===m.SECOND?tt:a===m.MILLISECOND?nt:a===m.MICROSECOND?rt:it,s&&Qe);case d.Decimal:return c?Ze:Xe;case d.Interval:return a===h.DAY_TIME?at:a===h.YEAR_MONTH?H:ot;case d.FixedSizeBinary:return vt;case d.Utf8:return dt;case d.LargeUtf8:return ft;case d.Binary:return lt;case d.LargeBinary:return ut;case d.BinaryView:return At;case d.Utf8View:return jt;case d.List:return pt;case d.LargeList:return mt;case d.Map:return l?St:xt;case d.ListView:return ht;case d.LargeListView:return gt;case d.FixedSizeList:return yt;case d.Struct:return u?Et:Tt;case d.RunEndEncoded:return Dt;case d.Dictionary:return Ot;case d.Union:return e.mode?wt:Ct}throw Error(C(n))}function Bt(e,t){return t?class extends t{constructor(t){super(new e(t))}}:e}function Vt(e,t){return{offset:I(e,t),metadataLength:F(e,t+8),bodyLength:I(e,t+16)}}function Ht(e,t){return R(e,t,24,Vt)}function Ut(e,t,n){let r=A(e,t);if(r(10,j,0))throw Error(`Record batch compression not implemented`);let i=n<l.V4?8:0;return{length:r(4,I,0),nodes:R(e,r(6,j),16,(e,t)=>({length:I(e,t),nullCount:I(e,t+8)})),regions:R(e,r(8,j),16+i,(e,t)=>({offset:I(e,t+i),length:I(e,t+i+8)})),variadic:R(e,r(12,j),8,I)}}function Wt(e,t,n){let r=A(e,t);return{id:r(4,I,0),data:r(6,(e,t)=>Ut(e,t,n)),isDelta:r(8,M,!1)}}function Gt(e,t,n,r){S(n,d,C);let i=A(e,t);switch(n){case d.Binary:return ge();case d.Utf8:return _e();case d.LargeBinary:return Ae();case d.LargeUtf8:return je();case d.List:return Ce(r[0]);case d.ListView:return Pe(r[0]);case d.LargeList:return Me(r[0]);case d.LargeListView:return Fe(r[0]);case d.Struct:return we(r);case d.RunEndEncoded:return Ne(r[0],r[1]);case d.Int:return pe(i(4,F,0),i(6,M,!1));case d.Float:return he(i(4,P,f.HALF));case d.Decimal:return ve(i(4,F,0),i(6,F,0),i(8,F,128));case d.Date:return ye(i(4,P,p.MILLISECOND));case d.Time:return be(i(4,P,m.MILLISECOND),i(6,F,32));case d.Timestamp:return xe(i(4,P,m.SECOND),i(6,L));case d.Interval:return Se(i(4,P,h.YEAR_MONTH));case d.Duration:return ke(i(4,P,m.MILLISECOND));case d.FixedSizeBinary:return Ee(i(4,F,0));case d.FixedSizeList:return De(r[0],i(4,F,0));case d.Map:return Oe(i(4,M,!1),r[0]);case d.Union:return Te(i(4,P,g.Sparse),r,R(e,i(6,j),4,F))}return{typeId:n}}function K(e,t){let n=R(e,t,4,(e,t)=>{let n=A(e,t);return[n(4,L),n(6,L)]});return n.length?new Map(n):null}function Kt(e,t,n){let r=A(e,t);return{version:n,endianness:r(4,P,0),fields:r(6,qt,[]),metadata:r(8,K)}}function qt(e,t){return R(e,t,4,Jt)}function Jt(e,t){let n=A(e,t),r=n(8,N,d.NONE),i=n(10,j,0),a=n(12,Xt),o=Gt(e,i,r,n(14,(e,t)=>Yt(e,t)));return a&&(a.dictionary=o,o=a),{name:n(4,L),type:o,nullable:n(6,M,!1),metadata:n(16,K)}}function Yt(e,t){let n=R(e,t,4,Jt);return n.length?n:null}function Xt(e,t){if(!t)return null;let n=A(e,t);return fe(null,n(6,Zt,me()),n(8,M,!1),n(4,I,0))}function Zt(e,t){return Gt(e,t,d.Int)}var Qt=(e,t)=>`Expected to read ${e} metadata bytes, but only read ${t}.`,$t=(e,t)=>`Expected to read ${e} bytes for message body, but only read ${t}.`,en=e=>`Unsupported message type: ${e} (${ce(u,e)})`;function q(e,t){let n=F(e,t)||0;if(t+=4,n===-1&&(n=F(e,t)||0,t+=4),n===0)return null;let r=e.subarray(t,t+=n);if(r.byteLength<n)throw Error(Qt(n,r.byteLength));let i=A(r,0),a=i(4,P,l.V1),o=i(6,N,u.NONE),s=i(8,j,0),c=i(10,I,0),d;if(s){let n=o===u.Schema?Kt:o===u.DictionaryBatch?Wt:o===u.RecordBatch?Ut:null;if(!n)throw Error(en(o));if(d=n(r,s,a),c>0){let n=e.subarray(t,t+=c);if(n.byteLength<c)throw Error($t(c,n.byteLength));d.body=n}}return{version:a,type:o,index:t,content:d}}function tn(e){let t=e instanceof ArrayBuffer?new Uint8Array(e):e;return t instanceof Uint8Array&&nn(t)?an(t):rn(t)}function nn(e){if(!e||e.length<4)return!1;for(let t=0;t<6;++t)if(c[t]!==e[t])return!1;return!0}function rn(e){let t=[e].flat(),n,r=[],i=[];for(let e of t){if(!(e instanceof Uint8Array))throw Error(`IPC data batch was not a Uint8Array.`);let t=0;for(;;){let a=q(e,t);if(a===null)break;if(t=a.index,a.content)switch(a.type){case u.Schema:n||=a.content;break;case u.RecordBatch:r.push(a.content);break;case u.DictionaryBatch:i.push(a.content)}}}return{schema:n,dictionaries:i,records:r,metadata:null}}function an(e){let t=e.byteLength-(c.length+4),n=A(e,t-F(e,t)),r=n(4,P,l.V1),i=n(8,Ht,[]),a=n(10,Ht,[]);return{schema:n(6,(e,t)=>Kt(e,t,r)),dictionaries:i.map(({offset:t})=>q(e,t).content),records:a.map(({offset:t})=>q(e,t).content),metadata:n(12,K)}}function J(e,t){return on(tn(e),t)}function on(e,t={}){let{schema:n={fields:[]},dictionaries:r,records:i}=e,{version:a,fields:o}=n,s=new Map,c=cn(t,a,s),l=new Map;sn(n,e=>{let t=e.type;t.typeId===d.Dictionary&&l.set(t.id,t.dictionary)});let u=new Map;for(let e of r){let{id:t,data:n,isDelta:r,body:i}=e,a=l.get(t),o=Y(a,c({...n,body:i}));if(u.has(t)){let e=u.get(t);r||e.clear(),e.add(o)}else{if(r)throw Error(`Delta update can not be first dictionary batch.`);u.set(t,Mt(a).add(o))}}u.forEach((e,t)=>s.set(t,e.done()));let f=o.map(e=>Mt(e.type));for(let e of i){let t=c(e);o.forEach((e,n)=>f[n].add(Y(e.type,t)))}return new Lt(n,f.map(e=>e.done()),t.useProxy)}function sn(e,t){e.fields.forEach(function e(n){t(n),n.type.dictionary?.children?.forEach(e),n.type.children?.forEach(e)})}function cn(e,t,n){let r={version:t,options:e,dictionary:e=>n.get(e)};return e=>{let{length:t,nodes:n,regions:i,variadic:a,body:o}=e,s=-1,c=-1,l=-1;return{...r,length:t,node:()=>n[++s],buffer:e=>{let{length:t,offset:n}=i[++c];return e?new e(o.buffer,o.byteOffset+n,t/e.BYTES_PER_ELEMENT):o.subarray(n,n+t)},variadic:()=>a[++l],visit(e){return e.map(e=>Y(e.type,this))}}}}function Y(e,t){let{typeId:n}=e,{length:r,options:i,node:a,buffer:o,variadic:s,version:c}=t,u=zt(e,i);if(n===d.Null)return new u({length:r,nullCount:r,type:e});let f={...a(),type:e};switch(n){case d.Bool:case d.Int:case d.Time:case d.Duration:case d.Float:case d.Decimal:case d.Date:case d.Timestamp:case d.Interval:case d.FixedSizeBinary:return new u({...f,validity:o(),values:o(e.values)});case d.Utf8:case d.LargeUtf8:case d.Binary:case d.LargeBinary:return new u({...f,validity:o(),offsets:o(e.offsets),values:o()});case d.BinaryView:case d.Utf8View:return new u({...f,validity:o(),values:o(),data:Array.from({length:s()},()=>o())});case d.List:case d.LargeList:case d.Map:return new u({...f,validity:o(),offsets:o(e.offsets),children:t.visit(e.children)});case d.ListView:case d.LargeListView:return new u({...f,validity:o(),offsets:o(e.offsets),sizes:o(e.offsets),children:t.visit(e.children)});case d.FixedSizeList:case d.Struct:return new u({...f,validity:o(),children:t.visit(e.children)});case d.RunEndEncoded:return new u({...f,children:t.visit(e.children)});case d.Dictionary:{let{id:n,indices:r}=e;return new u({...f,validity:o(),values:o(r.values)}).setDictionary(t.dictionary(n))}case d.Union:return c<l.V5&&o(),new u({...f,typeIds:o(ie),offsets:e.mode===g.Sparse?null:o(e.offsets),children:t.visit(e.children)});default:throw Error(C(n))}}new Uint16Array(new Uint8Array([1,0]).buffer)[0];function X(e,t){let n=new Map;return(...r)=>{let i=t(...r);if(n.has(i))return n.get(i);let a=e(...r).finally(()=>{n.delete(i)});return n.set(i,a),a}}function Z(e,t){return s(e,t)}function ln(){return a()}var Q=o;function un(){let e=dn(ln()),t=e=>JSON.stringify(e);return{load:X(e.load.bind(e),t),sanitize:X(e.sanitize.bind(e),t),http:X(e.http.bind(e),t),file:X(e.file.bind(e),t)}}function dn(e){return{...e,async load(t,n){return t.endsWith(`.arrow`)?J(await fn(t),{useProxy:!1}).toArray():e.load(t,n)}}}var fn=X(e=>fetch(e).then(e=>e.arrayBuffer()),e=>e),pn=Q.integer,$=Q.number,mn=Q.date,hn=Q.boolean,gn=()=>{let e=e=>e===`inf`||e===`+inf`?1/0:e===`-inf`?-1/0:$(e);return Q.integer=e,Q.number=e,()=>{Q.integer=pn,Q.number=$}},_n=()=>(Q.integer=e=>{if(e===``)return``;if(e===`-inf`||e===`inf`)return e;function t(e){let t=pn(e);return Number.isNaN(t)?e:t}let n=Number.parseInt(e,10);if(Number.isNaN(n))return e;if(!(Math.abs(n)>2**53-1))return t(e);try{return BigInt(e)}catch{return t(e)}},Q.number=e=>{if(e===`-inf`||e===`inf`)return e;let t=$(e);return Number.isNaN(t)?e:t},()=>{Q.integer=pn,Q.number=$}),vn=()=>(Q.date=t=>{if(t===``)return``;if(t==null)return null;if(!/^\d{4}-\d{2}-\d{2}(T[\d.:]+(Z|[+-]\d{2}:?\d{2})?)?$/.test(t))return t;try{let e=new Date(t);return Number.isNaN(e.getTime())?t:e}catch{return e.warn(`Failed to parse date: ${t}`),t}},()=>{Q.date=mn});Q.boolean=e=>e===`True`||e!==`False`&&hn(e);var yn=un();async function bn(e,n,r={}){let{handleBigIntAndNumberLike:i=!1,replacePeriod:a=!1}=r;if(e.endsWith(`.arrow`)||n?.type===`arrow`)return J(await fn(e),{useProxy:!0,useDate:!0,useBigInt:i}).toArray();let o=[vn];i?o.push(_n):o.push(gn);let s=[];try{let r=await yn.load(e);if(!n){if(typeof r==`string`)try{JSON.parse(r),n={type:`json`}}catch{n={type:`csv`,parse:`auto`}}typeof r==`object`&&(n={type:`json`})}let i=n?.type===`csv`;i&&typeof r==`string`&&(r=Sn(r)),i&&typeof r==`string`&&a&&(r=Cn(r));let c=n?.parse||`auto`;return typeof c==`object`&&(c=t.mapValues(c,e=>e===`time`?`string`:e===`datetime`?`date`:e)),s=o.map(e=>e()),i?Z(r,{...n,parse:c}):Z(r,n)}finally{s.forEach(e=>e())}}function xn(e,t=!0){let n=[vn];t&&n.push(_n);let r=n.map(e=>e()),i=Z(e,{type:`csv`,parse:`auto`});return r.forEach(e=>e()),i}function Sn(e){return e?.includes(`,`)?wn(e,e=>{let t=new Set;return e.map(e=>{let n=En(e,t);return t.add(n),n})}):e}function Cn(e){return e?.includes(`.`)?wn(e,e=>e.map(e=>e.replaceAll(`.`,`․`))):e}function wn(e,t){let n=e.split(`
2
+ `);return n[0]=t(n[0].split(`,`)).join(`,`),n.join(`
3
+ `)}var Tn=`​`;function En(e,t){let n=e,r=1;for(;t.has(n);)n=`${e}${Tn.repeat(r)}`,r++;return n}var Dn={version:`1.1.0`};function On(e,t,a,o){if(r(e))return`[${e.map(e=>t(i(e)?e:An(e,a))).join(`, `)}]`;if(n(e)){let r=``,{title:i,image:s,...c}=e;i&&(r+=`<h2>${t(i)}</h2>`),s&&(r+=`<img src="${new URL(t(s),o||location.href).href}">`);let l=Object.keys(c);if(l.length>0){r+=`<table>`;for(let e of l){let i=c[e];i!==void 0&&(n(i)&&(i=An(i,a)),r+=`<tr><td class="key">${t(e)}</td><td class="value">${t(i)}</td></tr>`)}r+=`</table>`}return r||`{}`}return t(e)}function kn(e){let t=[];return function(n,r){if(typeof r!=`object`||!r)return r;let i=t.indexOf(this)+1;return t.length=i,t.length>e?`[Object]`:t.indexOf(r)>=0?`[Circular]`:(t.push(r),r)}}function An(e,t){return JSON.stringify(e,kn(t))}var jn=`#vg-tooltip-element {
4
+ visibility: hidden;
5
+ padding: 8px;
6
+ position: fixed;
7
+ z-index: 1000;
8
+ font-family: sans-serif;
9
+ font-size: 11px;
10
+ border-radius: 3px;
11
+ box-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
12
+ white-space: pre-line;
13
+ }
14
+ #vg-tooltip-element.visible {
15
+ visibility: visible;
16
+ }
17
+ #vg-tooltip-element h2 {
18
+ margin-top: 0;
19
+ margin-bottom: 10px;
20
+ font-size: 13px;
21
+ }
22
+ #vg-tooltip-element table {
23
+ border-spacing: 0;
24
+ }
25
+ #vg-tooltip-element table tr {
26
+ border: none;
27
+ }
28
+ #vg-tooltip-element table tr td {
29
+ overflow: hidden;
30
+ text-overflow: ellipsis;
31
+ padding-top: 2px;
32
+ padding-bottom: 2px;
33
+ vertical-align: text-top;
34
+ }
35
+ #vg-tooltip-element table tr td.key {
36
+ color: #808080;
37
+ max-width: 150px;
38
+ text-align: right;
39
+ padding-right: 4px;
40
+ }
41
+ #vg-tooltip-element table tr td.value {
42
+ display: block;
43
+ max-width: 300px;
44
+ max-height: 7em;
45
+ text-align: left;
46
+ }
47
+ #vg-tooltip-element {
48
+ /* The default theme is the light theme. */
49
+ background-color: rgba(255, 255, 255, 0.95);
50
+ border: 1px solid #d9d9d9;
51
+ color: black;
52
+ }
53
+ #vg-tooltip-element.dark-theme {
54
+ background-color: rgba(32, 32, 32, 0.9);
55
+ border: 1px solid #f5f5f5;
56
+ color: white;
57
+ }
58
+ #vg-tooltip-element.dark-theme td.key {
59
+ color: #bfbfbf;
60
+ }
61
+ `,Mn=`vg-tooltip-element`,Nn={offsetX:10,offsetY:10,id:Mn,styleId:`vega-tooltip-style`,theme:`light`,disableDefaultStyle:!1,sanitize:Pn,maxDepth:2,formatTooltip:On,baseURL:``,anchor:`cursor`,position:[`top`,`bottom`,`left`,`right`,`top-left`,`top-right`,`bottom-left`,`bottom-right`]};function Pn(e){return String(e).replace(/&/g,`&amp;`).replace(/</g,`&lt;`)}function Fn(e){if(!/^[A-Za-z]+[-:.\w]*$/.test(e))throw Error(`Invalid HTML ID`);return jn.toString().replaceAll(Mn,e)}function In(e,t,{offsetX:n,offsetY:r}){let i=zn({x1:e.clientX,x2:e.clientX,y1:e.clientY,y2:e.clientY},t,n,r);for(let e of[`bottom-right`,`bottom-left`,`top-right`,`top-left`])if(Bn(i[e],t))return i[e];return i[`top-left`]}function Ln(e,t,n,r,i){let{position:a,offsetX:o,offsetY:s}=i,c=e._el.getBoundingClientRect(),l=e._origin,u=zn(Rn(c,l,n),r,o,s),d=Array.isArray(a)?a:[a];for(let e of d)if(Bn(u[e],r)&&!Vn(t,u[e],r))return u[e];return In(t,r,i)}function Rn(e,t,n){let r=n.isVoronoi?n.datum.bounds:n.bounds,i=e.left+t[0]+r.x1,a=e.top+t[1]+r.y1,o=n;for(;o.mark.group;)o=o.mark.group,i+=o.x??0,a+=o.y??0;let s=r.x2-r.x1,c=r.y2-r.y1;return{x1:i,x2:i+s,y1:a,y2:a+c}}function zn(e,t,n,r){let i=(e.x1+e.x2)/2,a=(e.y1+e.y2)/2,o=e.x1-t.width-n,s=i-t.width/2,c=e.x2+n,l=e.y1-t.height-r,u=a-t.height/2,d=e.y2+r;return{top:{x:s,y:l},bottom:{x:s,y:d},left:{x:o,y:u},right:{x:c,y:u},"top-left":{x:o,y:l},"top-right":{x:c,y:l},"bottom-left":{x:o,y:d},"bottom-right":{x:c,y:d}}}function Bn(e,t){return e.x>=0&&e.y>=0&&e.x+t.width<=window.innerWidth&&e.y+t.height<=window.innerHeight}function Vn(e,t,n){return e.clientX>=t.x&&e.clientX<=t.x+n.width&&e.clientY>=t.y&&e.clientY<=t.y+n.height}var Hn=class{call;options;el;constructor(e){this.options={...Nn,...e};let t=this.options.id;if(this.el=null,this.call=this.tooltipHandler.bind(this),!this.options.disableDefaultStyle&&!document.getElementById(this.options.styleId)){let e=document.createElement(`style`);e.setAttribute(`id`,this.options.styleId),e.innerHTML=Fn(t);let n=document.head;n.childNodes.length>0?n.insertBefore(e,n.childNodes[0]):n.appendChild(e)}}tooltipHandler(e,t,n,r){if(this.el=document.getElementById(this.options.id),this.el||(this.el=document.createElement(`div`),this.el.setAttribute(`id`,this.options.id),this.el.classList.add(`vg-tooltip`),(document.fullscreenElement??document.body).appendChild(this.el)),r==null||r===``){this.el.classList.remove(`visible`,`${this.options.theme}-theme`);return}this.el.innerHTML=this.options.formatTooltip(r,this.options.sanitize,this.options.maxDepth,this.options.baseURL),this.el.classList.add(`visible`,`${this.options.theme}-theme`);let{x:i,y:a}=this.options.anchor===`mark`?Ln(e,t,n,this.el.getBoundingClientRect(),this.options):In(t,this.el.getBoundingClientRect(),this.options);this.el.style.top=`${a}px`,this.el.style.left=`${i}px`}};Dn.version;var Un=new Hn;export{un as a,yn as i,xn as n,J as o,bn as r,Un as t};
@@ -1,2 +1,2 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./tracing-Cg6nJ9oa.js","./rolldown-runtime-B0Z9INg1.js","./useEvent-Dfcbgjhg.js","./react-DVplv7_D.js","./compiler-runtime-BrajqUja.js","./cells-BMs-CYDt.js","./react-dom-_LrxgvjW.js","./schemas-ChRqMOTL.js","./config-BtRLgrlt.js","./useEventListener-D9cftcHj.js","./objects-snlMn4yk.js","./invariant-Ci2dTZ72.js","./utils-B4K466FK.js","./session-DqoWmb7X.js","./Deferred-CrTnjj37.js","./debounce-aFmHgJZY.js","./isObject-BCaOs5rp.js","./now-Cmx0b_zA.js","./isSymbol-oX0TOjjx.js","./config-CA1V-wjh.js","./_baseMerge-CQpUq7ep.js","./isArrayLikeObject-DnwgSs_Z.js","./cn-ldLVeaqm.js","./clsx-DB0hHKMi.js","./jsx-runtime-B74pBk57.js","./fullscreen-B9tHcfpV.js","./dist-iaThVDkA.js","./menu-items-BrwnTgyK.js","./use-restore-focus-BxEGwIbk.js","./circle-DXf-VWZG.js","./createLucideIcon-DfJ2oMlA.js","./select-DTBn5eTb.js","./button-COI-NGrx.js","./check-BQNapYaf.js","./useNumberFormatter-D7O_26UI.js","./I18nProvider-Cg2I_s1_.js","./toast-BGzLGnvw.js","./tooltip-C9TuY18o.js","./paths-bkIFVj8h.js","./useLifecycle-Mq4gc5kS.js","./toDate-DOj9Q6uC.js","./database-zap-B_PMVg8T.js","./write-secret-modal-DzKAInL2.js","./alert-dialog-BaPGzeOK.js","./input-BoBxR50a.js","./numbers-Mk3-CcoU.js","./once-Haz_uxEL.js","./arrays-BqUx5USx.js","./useDebounce-B_ccBZTp.js","./use-toast-Wu434mLr.js","./requests-lt0JK8Jt.js","./uuid-k9DpjH68.js","./plus-C5silF6g.js","./trash-2-DcgaW8fn.js","./preload-helper-uBIymjUX.js","./dist-Cny7_yZb.js","./dist-DBMV4gqt.js","./capabilities-BJvf-MD4.js","./cjs-C49f7GXV.js","./createReducer-DgRODTW6.js","./dist-qhAY4L2r.js","./marked.esm-B_3iMIUq.js","./strings-B2vv-ENv.js","./dist-BOfh4hMd.js","./badge-crT3E0Rm.js","./dist-LSsCJjA3.js","./dist-1tmpVXyz.js","./dist-DtH-7lot.js","./dist-BmExfiwX.js","./dist-DusFODSa.js","./stex-Dc5bKD4z.js","./useTheme-n8Dj1zH7.js","./useAsyncData-C7aJJz0Y.js","./purify.es--06brOip.js","./cells-0PFKL3SH.css","./chevron-right-eAtVhbNZ.js","./circle-check-BCurAHEb.js","./circle-play-CYIb0qT6.js","./CellStatus-O0rU3_5j.js","./ban-YzvUro5I.js","./ellipsis-63DyBLHQ.js","./refresh-cw-Qw1f8Jhy.js","./workflow-cw-0b9g5.js","./useDateFormatter-DA-62E-Y.js","./en-US-Buu61juQ.js","./multi-icon-DL465pPF.js","./multi-icon-D129IBvu.css","./CellStatus-2Psjnl5F.css","./react-vega-C3rYGtP6.js","./vega-loader.browser-CLRkNgm7.js","./precisionRound-Bq_nmf5u.js","./defaultLocale-CNPGWpMu.js","./defaultLocale-D5bOh7g6.js","./linear-0eij_aAG.js","./init-ZlXS9mIS.js","./cubic-DELhj3Tx.js","./ordinal-BdBDtYTt.js","./time-MgToa8VM.js","./range-EplFIxc7.js","./path-BCdg30Y0.js","./math-Bi_r_ZWc.js","./arc-Yxk2k_uq.js","./array-BifhSqXX.js","./step-CqgdNM3U.js","./line-io_go0HI.js","./colors-Cg5Vh3br.js","./treemap-BfjIY-m6.js","./cell-link-CmO9D2a2.js","./react-resizable-panels.browser.esm-Dbe0MrFr.js","./bundle.esm-D3tw5rqW.js","./empty-state-BaCKb7o3.js","./panel-context-C2QXpKfx.js","./clear-button-p6YcvzLy.js","./runs-BLp5jezv.js"])))=>i.map(i=>d[i]);
2
- import{a as e}from"./rolldown-runtime-B0Z9INg1.js";import{t}from"./react-DVplv7_D.js";import{t as n}from"./compiler-runtime-BrajqUja.js";import{t as r}from"./jsx-runtime-B74pBk57.js";import{t as i}from"./spinner-DyNE-o8o.js";import{t as a}from"./preload-helper-uBIymjUX.js";var o=n(),s=e(t(),1),c=r(),l=s.lazy(()=>a(()=>import(`./tracing-Cg6nJ9oa.js`).then(e=>({default:e.Tracing})),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113]),import.meta.url)),u=()=>{let e=(0,o.c)(1),t;return e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t=(0,c.jsx)(s.Suspense,{fallback:(0,c.jsx)(d,{}),children:(0,c.jsx)(l,{})}),e[0]=t):t=e[0],t},d=()=>{let e=(0,o.c)(1),t;return e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t=(0,c.jsx)(`div`,{className:`flex flex-col items-center justify-center h-full`,children:(0,c.jsx)(i,{})}),e[0]=t):t=e[0],t};export{u as default};
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./tracing-rz4dtYLA.js","./rolldown-runtime-B0Z9INg1.js","./useEvent-Dfcbgjhg.js","./react-DVplv7_D.js","./compiler-runtime-BrajqUja.js","./cells-CDwPlSdp.js","./react-dom-_LrxgvjW.js","./schemas-ChRqMOTL.js","./config-BHq_PhD6.js","./useEventListener-D9cftcHj.js","./objects-snlMn4yk.js","./invariant-Ci2dTZ72.js","./utils-B4K466FK.js","./session-DqoWmb7X.js","./Deferred-CrTnjj37.js","./debounce-aFmHgJZY.js","./isObject-BCaOs5rp.js","./now-Cmx0b_zA.js","./isSymbol-oX0TOjjx.js","./config-CA1V-wjh.js","./_baseMerge-CQpUq7ep.js","./isArrayLikeObject-DnwgSs_Z.js","./cn-ldLVeaqm.js","./clsx-DB0hHKMi.js","./jsx-runtime-B74pBk57.js","./fullscreen-B9tHcfpV.js","./dist-iaThVDkA.js","./menu-items-BrwnTgyK.js","./use-restore-focus-BxEGwIbk.js","./circle-DXf-VWZG.js","./createLucideIcon-DfJ2oMlA.js","./select-DTBn5eTb.js","./button-COI-NGrx.js","./check-BQNapYaf.js","./useNumberFormatter-D7O_26UI.js","./I18nProvider-Cg2I_s1_.js","./toast-BGzLGnvw.js","./tooltip-C9TuY18o.js","./paths-bkIFVj8h.js","./useLifecycle-Mq4gc5kS.js","./toDate-DOj9Q6uC.js","./database-zap-B_PMVg8T.js","./write-secret-modal-DzKAInL2.js","./alert-dialog-BaPGzeOK.js","./input-BoBxR50a.js","./numbers-Mk3-CcoU.js","./once-Haz_uxEL.js","./arrays-BqUx5USx.js","./useDebounce-B_ccBZTp.js","./use-toast-Wu434mLr.js","./requests-lt0JK8Jt.js","./uuid-k9DpjH68.js","./plus-C5silF6g.js","./trash-2-DcgaW8fn.js","./preload-helper-uBIymjUX.js","./dist-Cny7_yZb.js","./dist-DBMV4gqt.js","./capabilities-BJvf-MD4.js","./cjs-C49f7GXV.js","./createReducer-DgRODTW6.js","./dist-qhAY4L2r.js","./marked.esm-B_3iMIUq.js","./strings-B2vv-ENv.js","./dist-BOfh4hMd.js","./badge-crT3E0Rm.js","./dist-LSsCJjA3.js","./dist-1tmpVXyz.js","./dist-DtH-7lot.js","./dist-BmExfiwX.js","./dist-DusFODSa.js","./stex-Dc5bKD4z.js","./useTheme-n8Dj1zH7.js","./useAsyncData-C7aJJz0Y.js","./purify.es--06brOip.js","./cells-0PFKL3SH.css","./chevron-right-eAtVhbNZ.js","./circle-check-BCurAHEb.js","./circle-play-CYIb0qT6.js","./CellStatus-CfD06qo-.js","./ban-YzvUro5I.js","./ellipsis-63DyBLHQ.js","./refresh-cw-Qw1f8Jhy.js","./workflow-cw-0b9g5.js","./useDateFormatter-DA-62E-Y.js","./en-US-Buu61juQ.js","./multi-icon-DL465pPF.js","./multi-icon-D129IBvu.css","./CellStatus-2Psjnl5F.css","./react-vega-BTNeboR2.js","./vega-loader.browser-Bu25TKax.js","./precisionRound-BxlUs8G4.js","./defaultLocale-CNPGWpMu.js","./defaultLocale-D5bOh7g6.js","./linear-Bma8J3iM.js","./init-ZlXS9mIS.js","./cubic-DELhj3Tx.js","./ordinal-BdBDtYTt.js","./time-DswSXBDk.js","./range-EplFIxc7.js","./path-BCdg30Y0.js","./math-Bi_r_ZWc.js","./arc-Yxk2k_uq.js","./array-BifhSqXX.js","./step-CqgdNM3U.js","./line-io_go0HI.js","./colors-Cg5Vh3br.js","./treemap-BfjIY-m6.js","./cell-link-CF9EP0SZ.js","./react-resizable-panels.browser.esm-Dbe0MrFr.js","./bundle.esm-D3tw5rqW.js","./empty-state-BaCKb7o3.js","./panel-context-C2QXpKfx.js","./clear-button-p6YcvzLy.js","./runs-BLp5jezv.js"])))=>i.map(i=>d[i]);
2
+ import{a as e}from"./rolldown-runtime-B0Z9INg1.js";import{t}from"./react-DVplv7_D.js";import{t as n}from"./compiler-runtime-BrajqUja.js";import{t as r}from"./jsx-runtime-B74pBk57.js";import{t as i}from"./spinner-DyNE-o8o.js";import{t as a}from"./preload-helper-uBIymjUX.js";var o=n(),s=e(t(),1),c=r(),l=s.lazy(()=>a(()=>import(`./tracing-rz4dtYLA.js`).then(e=>({default:e.Tracing})),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113]),import.meta.url)),u=()=>{let e=(0,o.c)(1),t;return e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t=(0,c.jsx)(s.Suspense,{fallback:(0,c.jsx)(d,{}),children:(0,c.jsx)(l,{})}),e[0]=t):t=e[0],t},d=()=>{let e=(0,o.c)(1),t;return e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t=(0,c.jsx)(`div`,{className:`flex flex-col items-center justify-center h-full`,children:(0,c.jsx)(i,{})}),e[0]=t):t=e[0],t};export{u as default};
@@ -1 +1 @@
1
- import{a as e}from"./rolldown-runtime-B0Z9INg1.js";import{f as t,l as n,u as r}from"./useEvent-Dfcbgjhg.js";import{t as i}from"./react-DVplv7_D.js";import{M as a,dr as o,oo as s,q as c}from"./cells-BMs-CYDt.js";import{t as l}from"./compiler-runtime-BrajqUja.js";import{t as u}from"./cn-ldLVeaqm.js";import{t as d}from"./jsx-runtime-B74pBk57.js";import{t as f}from"./tooltip-C9TuY18o.js";import{t as p}from"./createLucideIcon-DfJ2oMlA.js";import{o as m}from"./paths-bkIFVj8h.js";import{a as h}from"./useNumberFormatter-D7O_26UI.js";import{t as g}from"./chevron-right-eAtVhbNZ.js";import{t as _}from"./circle-check-BCurAHEb.js";import{t as v}from"./circle-play-CYIb0qT6.js";import{r as y}from"./useTheme-n8Dj1zH7.js";import{n as b}from"./CellStatus-O0rU3_5j.js";import{r as x,t as S}from"./react-vega-C3rYGtP6.js";import{t as C}from"./cell-link-CmO9D2a2.js";import{n as w,r as T,t as E}from"./react-resizable-panels.browser.esm-Dbe0MrFr.js";import{t as D}from"./bundle.esm-D3tw5rqW.js";import{t as O}from"./empty-state-BaCKb7o3.js";import{r as k}from"./panel-context-C2QXpKfx.js";import{t as A}from"./clear-button-p6YcvzLy.js";import{n as j,t as M}from"./runs-BLp5jezv.js";var N=p(`circle-ellipsis`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`M17 12h.01`,key:`1m0b6t`}],[`path`,{d:`M12 12h.01`,key:`1mp3jc`}],[`path`,{d:`M7 12h.01`,key:`eqddd0`}]]),P=e(i(),1),F=l(),I=`hoveredCellId`,L=`cellHover`,R=`cellNum`,z=`cell`,B=`startTimestamp`,V=`endTimestamp`,H=`status`;function U(e,t,n,r){let i=`hoursminutessecondsmilliseconds`;return{$schema:`https://vega.github.io/schema/vega-lite/v6.json`,background:r===`dark`?`black`:void 0,mark:{type:`bar`,cornerRadius:2},params:[{name:I,bind:{element:`#${t}`}},{name:L,select:{type:`point`,on:`mouseover`,fields:[z],clear:`mouseout`}}],height:{step:n===`sideBySide`?26:21},encoding:{y:{field:R,scale:{paddingInner:.2},sort:{field:`sortPriority`},title:`cell`,axis:n===`sideBySide`?null:void 0},x:{field:B,type:`temporal`,axis:{orient:`top`,title:null}},x2:{field:V,type:`temporal`},tooltip:[{field:B,type:`temporal`,timeUnit:i,title:`Start`},{field:V,type:`temporal`,timeUnit:i,title:`End`}],size:{value:{expr:`${I} == toString(datum.${z}) ? 19.5 : 18`}},color:{field:H,scale:{domain:[`success`,`error`],range:[`#37BE5F`,`red`]},legend:null}},data:{values:e},transform:[{calculate:`datum.${H} === 'queued' ? 9999999999999 : datum.${B}`,as:`sortPriority`}],config:{view:{stroke:`transparent`}}}}function W(e){try{let t=new Date(e*1e3);return`${t.getFullYear()}-${String(t.getMonth()+1).padStart(2,`0`)}-${String(t.getDate()).padStart(2,`0`)} ${String(t.getHours()).padStart(2,`0`)}:${String(t.getMinutes()).padStart(2,`0`)}:${String(t.getSeconds()).padStart(2,`0`)}.${String(t.getMilliseconds()).padStart(3,`0`)}`}catch{return``}}var G=d(),K=t(new Map),q=()=>{let e=(0,F.c)(34),{runIds:t,runMap:r}=n(M),i=n(K),{clearRuns:a}=j(),{theme:o}=y(),[s,c]=(0,P.useState)(`above`),l=k(),u;e[0]===s?u=e[1]:(u=()=>{c(s===`above`?`sideBySide`:`above`)},e[0]=s,e[1]=u);let d=u;if(t.length===0){let t;return e[2]===Symbol.for(`react.memo_cache_sentinel`)?(t=(0,G.jsx)(O,{title:`No traces`,description:(0,G.jsx)(`span`,{children:`Cells that have ran will appear here.`}),icon:(0,G.jsx)(m,{})}),e[2]=t):t=e[2],t}let f;e[3]===Symbol.for(`react.memo_cache_sentinel`)?(f=(0,G.jsx)(`label`,{htmlFor:`chartPosition`,className:`text-xs`,children:`Inline chart`}),e[3]=f):f=e[3];let p=s===`sideBySide`,h;e[4]!==p||e[5]!==d?(h=(0,G.jsxs)(`div`,{className:`flex flex-row gap-1 items-center`,children:[f,(0,G.jsx)(`input`,{type:`checkbox`,name:`chartPosition`,"data-testid":`chartPosition`,onClick:d,defaultChecked:p,className:`h-3 cursor-pointer`})]}),e[4]=p,e[5]=d,e[6]=h):h=e[6];let g;e[7]===a?g=e[8]:(g=(0,G.jsx)(A,{dataTestId:`clear-traces-button`,onClick:a}),e[7]=a,e[8]=g);let _;e[9]!==h||e[10]!==g?(_=(0,G.jsxs)(`div`,{className:`flex flex-row justify-start gap-3`,children:[h,g]}),e[9]=h,e[10]=g,e[11]=_):_=e[11];let v;if(e[12]!==s||e[13]!==i||e[14]!==t||e[15]!==r||e[16]!==o){let n;e[18]!==s||e[19]!==i||e[20]!==r||e[21]!==o?(n=(e,t)=>{let n=r.get(e);return n?(0,G.jsx)(J,{run:n,isExpanded:i.get(n.runId),isMostRecentRun:t===0,chartPosition:s,theme:o},n.runId):null},e[18]=s,e[19]=i,e[20]=r,e[21]=o,e[22]=n):n=e[22],v=t.map(n),e[12]=s,e[13]=i,e[14]=t,e[15]=r,e[16]=o,e[17]=v}else v=e[17];let b;e[23]===v?b=e[24]:(b=(0,G.jsx)(`div`,{className:`flex flex-col gap-3`,children:v}),e[23]=v,e[24]=b);let x;e[25]!==_||e[26]!==b?(x=(0,G.jsxs)(`div`,{className:`py-1 px-2 overflow-y-scroll h-full`,children:[_,b]}),e[25]=_,e[26]=b,e[27]=x):x=e[27];let S=x;if(l===`sidebar`)return S;let C;e[28]===S?C=e[29]:(C=(0,G.jsx)(E,{defaultSize:50,minSize:30,maxSize:80,children:S}),e[28]=S,e[29]=C);let D;e[30]===Symbol.for(`react.memo_cache_sentinel`)?(D=(0,G.jsx)(T,{className:`w-1 bg-border hover:bg-primary/50 transition-colors`}),e[30]=D):D=e[30];let N;e[31]===Symbol.for(`react.memo_cache_sentinel`)?(N=(0,G.jsx)(E,{defaultSize:50,children:(0,G.jsx)(`div`,{})}),e[31]=N):N=e[31];let I;return e[32]===C?I=e[33]:(I=(0,G.jsxs)(w,{direction:`horizontal`,className:`h-full`,children:[C,D,N]}),e[32]=C,e[33]=I),I},J=e=>{let t=(0,F.c)(22),{run:n,isMostRecentRun:i,chartPosition:a,isExpanded:o,theme:s}=e,l=o,u=r(K);l??=i;let d;t[0]!==l||t[1]!==n.runId||t[2]!==u?(d=()=>{u(e=>{let t=new Map(e);return t.set(n.runId,!l),t})},t[0]=l,t[1]=n.runId,t[2]=u,t[3]=d):d=t[3];let f=d,p=l?h:g,m;t[4]===p?m=t[5]:(m=(0,G.jsx)(p,{height:16,className:`inline`}),t[4]=p,t[5]=m);let _=m,v;t[6]===n.runStartTime?v=t[7]:(v=c(n.runStartTime),t[6]=n.runStartTime,t[7]=v);let y;t[8]!==_||t[9]!==f||t[10]!==v?(y=(0,G.jsxs)(`span`,{className:`text-sm cursor-pointer`,onClick:f,children:[`Run - `,v,_]}),t[8]=_,t[9]=f,t[10]=v,t[11]=y):y=t[11];let b=y;if(!l){let e;t[12]===b?e=t[13]:(e=(0,G.jsx)(`pre`,{className:`font-mono font-semibold`,children:b}),t[12]=b,t[13]=e);let r;return t[14]!==n.runId||t[15]!==e?(r=(0,G.jsx)(`div`,{className:`flex flex-col`,children:e},n.runId),t[14]=n.runId,t[15]=e,t[16]=r):r=t[16],r}let x;return t[17]!==a||t[18]!==n||t[19]!==s||t[20]!==b?(x=(0,G.jsx)(Y,{run:n,chartPosition:a,theme:s,title:b},n.runId),t[17]=a,t[18]=n,t[19]=s,t[20]=b,t[21]=x):x=t[21],x},Y=e=>{let t=(0,F.c)(40),{run:n,chartPosition:r,theme:i,title:s}=e,[c,l]=(0,P.useState)(),u=(0,P.useRef)(null),{ref:d,width:f}=D(),p=f===void 0?300:f,m=a(),h,g;if(t[0]!==m||t[1]!==r||t[2]!==n.cellRuns||t[3]!==n.runId||t[4]!==i){let e=[...n.cellRuns.values()].map(e=>{let t=e.elapsedTime??0;return{cell:e.cellId,cellNum:m.inOrderIds.indexOf(e.cellId),startTimestamp:W(e.startTime),endTimestamp:W(e.startTime+t),elapsedTime:o(t*1e3),status:e.status}});h=`hiddenInputElement-${n.runId}`,g=x(U(e,h,r,i)),t[0]=m,t[1]=r,t[2]=n.cellRuns,t[3]=n.runId,t[4]=i,t[5]=h,t[6]=g}else h=t[5],g=t[6];let _=g.spec,v=i===`dark`?`dark`:void 0,y=p-50,b=r===`above`?120:100,C;t[7]!==v||t[8]!==y||t[9]!==b?(C={theme:v,width:y,height:b,actions:!1,mode:`vega`,renderer:`canvas`},t[7]=v,t[8]=y,t[9]=b,t[10]=C):C=t[10];let w;t[11]!==C||t[12]!==_?(w={ref:u,spec:_,options:C},t[11]=C,t[12]=_,t[13]=w):w=t[13];let T=S(w),E;t[14]===T?.view?E=t[15]:(E=()=>{let e=[{signalName:L,handler:(e,t)=>{let n=t.cell?.[0]??void 0;l(n??null)}}];return e.forEach(e=>{let{signalName:t,handler:n}=e;T?.view.addSignalListener(t,n)}),()=>{e.forEach(e=>{let{signalName:t,handler:n}=e;T?.view.removeSignalListener(t,n)})}},t[14]=T?.view,t[15]=E);let O;t[16]===T?O=t[17]:(O=[T],t[16]=T,t[17]=O),(0,P.useEffect)(E,O);let k;t[18]!==h||t[19]!==c||t[20]!==n?(k=(0,G.jsx)(X,{run:n,hoveredCellId:c,hiddenInputElementId:h}),t[18]=h,t[19]=c,t[20]=n,t[21]=k):k=t[21];let A=k,j=r===`sideBySide`?`-mt-0.5 flex-1`:``,M;t[22]===Symbol.for(`react.memo_cache_sentinel`)?(M=(0,G.jsx)(P.Suspense,{children:(0,G.jsx)(`div`,{ref:u})}),t[22]=M):M=t[22];let N;t[23]!==d||t[24]!==j?(N=(0,G.jsx)(`div`,{className:j,ref:d,children:M}),t[23]=d,t[24]=j,t[25]=N):N=t[25];let I=N;if(r===`above`){let e;t[26]!==I||t[27]!==s||t[28]!==A?(e=(0,G.jsxs)(`pre`,{className:`font-mono font-semibold`,children:[s,I,A]}),t[26]=I,t[27]=s,t[28]=A,t[29]=e):e=t[29];let r;return t[30]!==n.runId||t[31]!==e?(r=(0,G.jsx)(`div`,{className:`flex flex-col`,children:e},n.runId),t[30]=n.runId,t[31]=e,t[32]=r):r=t[32],r}let R;t[33]!==s||t[34]!==A?(R=(0,G.jsxs)(`pre`,{className:`font-mono font-semibold`,children:[s,A]}),t[33]=s,t[34]=A,t[35]=R):R=t[35];let z;return t[36]!==I||t[37]!==n.runId||t[38]!==R?(z=(0,G.jsxs)(`div`,{className:`flex flex-row`,children:[R,I]},n.runId),t[36]=I,t[37]=n.runId,t[38]=R,t[39]=z):z=t[39],z},X=e=>{let t=(0,F.c)(12),{run:n,hoveredCellId:r,hiddenInputElementId:i}=e,a=(0,P.useRef)(null),o;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(o=e=>{a.current&&(a.current.value=String(e),a.current.dispatchEvent(new Event(`input`,{bubbles:!0})))},t[0]=o):o=t[0];let s=o,c=r||``,l;t[1]!==i||t[2]!==c?(l=(0,G.jsx)(`input`,{type:`text`,id:i,defaultValue:c,hidden:!0,ref:a}),t[1]=i,t[2]=c,t[3]=l):l=t[3];let u;t[4]===n.cellRuns?u=t[5]:(u=[...n.cellRuns.values()],t[4]=n.cellRuns,t[5]=u);let d;t[6]!==r||t[7]!==u?(d=u.map(e=>(0,G.jsx)(Q,{cellRun:e,hovered:e.cellId===r,dispatchHoverEvent:s},e.cellId)),t[6]=r,t[7]=u,t[8]=d):d=t[8];let f;return t[9]!==l||t[10]!==d?(f=(0,G.jsxs)(`div`,{className:`text-xs mt-0.5 ml-3 flex flex-col gap-0.5`,children:[l,d]}),t[9]=l,t[10]=d,t[11]=f):f=t[11],f},Z={success:(0,G.jsx)(_,{color:`green`,size:14}),running:(0,G.jsx)(v,{color:`var(--blue-10)`,size:14}),error:(0,G.jsx)(s,{color:`red`,size:14}),queued:(0,G.jsx)(N,{color:`grey`,size:14})},Q=e=>{let t=(0,F.c)(39),{cellRun:n,hovered:r,dispatchHoverEvent:i}=e,a;t[0]===n.elapsedTime?a=t[1]:(a=n.elapsedTime?o(n.elapsedTime*1e3):`-`,t[0]=n.elapsedTime,t[1]=a);let s=a,l;t[2]!==n.elapsedTime||t[3]!==s?(l=n.elapsedTime?(0,G.jsxs)(`span`,{children:[`This cell took `,(0,G.jsx)(b,{elapsedTime:s}),` to run`]}):(0,G.jsx)(`span`,{children:`This cell has not been run`}),t[2]=n.elapsedTime,t[3]=s,t[4]=l):l=t[4];let d=l,p;t[5]!==n.cellId||t[6]!==i?(p=()=>{i(n.cellId)},t[5]=n.cellId,t[6]=i,t[7]=p):p=t[7];let m=p,h;t[8]===i?h=t[9]:(h=()=>{i(null)},t[8]=i,t[9]=h);let g=h,_=r&&`bg-(--gray-3) opacity-100`,v;t[10]===_?v=t[11]:(v=u(`flex flex-row gap-2 py-1 px-1 opacity-70 hover:bg-(--gray-3) hover:opacity-100`,_),t[10]=_,t[11]=v);let y;t[12]===n.startTime?y=t[13]:(y=c(n.startTime),t[12]=n.startTime,t[13]=y);let x;t[14]===y?x=t[15]:(x=(0,G.jsxs)(`span`,{className:`text-(--gray-10) dark:text-(--gray-11)`,children:[`[`,y,`]`]}),t[14]=y,t[15]=x);let S;t[16]===n.cellId?S=t[17]:(S=(0,G.jsxs)(`span`,{className:`text-(--gray-10) w-16 overflow-hidden`,children:[`(`,(0,G.jsx)(C,{cellId:n.cellId}),`)`]}),t[16]=n.cellId,t[17]=S);let w;t[18]===n.code?w=t[19]:(w=(0,G.jsx)(`span`,{className:`w-40 truncate -ml-1`,children:n.code}),t[18]=n.code,t[19]=w);let T;t[20]===s?T=t[21]:(T=(0,G.jsx)(`span`,{className:`text-(--gray-10) dark:text-(--gray-11)`,children:s}),t[20]=s,t[21]=T);let E;t[22]!==d||t[23]!==T?(E=(0,G.jsx)(f,{content:d,children:T}),t[22]=d,t[23]=T,t[24]=E):E=t[24];let D=Z[n.status],O;t[25]!==n.status||t[26]!==D?(O=(0,G.jsx)(f,{content:n.status,children:D}),t[25]=n.status,t[26]=D,t[27]=O):O=t[27];let k;t[28]!==E||t[29]!==O?(k=(0,G.jsxs)(`div`,{className:`flex flex-row gap-1 w-16 justify-end -ml-2`,children:[E,O]}),t[28]=E,t[29]=O,t[30]=k):k=t[30];let A;return t[31]!==m||t[32]!==g||t[33]!==w||t[34]!==k||t[35]!==v||t[36]!==x||t[37]!==S?(A=(0,G.jsxs)(`div`,{className:v,onMouseEnter:m,onMouseLeave:g,children:[x,S,w,k]}),t[31]=m,t[32]=g,t[33]=w,t[34]=k,t[35]=v,t[36]=x,t[37]=S,t[38]=A):A=t[38],A};export{q as Tracing};
1
+ import{a as e}from"./rolldown-runtime-B0Z9INg1.js";import{f as t,l as n,u as r}from"./useEvent-Dfcbgjhg.js";import{t as i}from"./react-DVplv7_D.js";import{M as a,dr as o,oo as s,q as c}from"./cells-CDwPlSdp.js";import{t as l}from"./compiler-runtime-BrajqUja.js";import{t as u}from"./cn-ldLVeaqm.js";import{t as d}from"./jsx-runtime-B74pBk57.js";import{t as f}from"./tooltip-C9TuY18o.js";import{t as p}from"./createLucideIcon-DfJ2oMlA.js";import{o as m}from"./paths-bkIFVj8h.js";import{a as h}from"./useNumberFormatter-D7O_26UI.js";import{t as g}from"./chevron-right-eAtVhbNZ.js";import{t as _}from"./circle-check-BCurAHEb.js";import{t as v}from"./circle-play-CYIb0qT6.js";import{r as y}from"./useTheme-n8Dj1zH7.js";import{n as b}from"./CellStatus-CfD06qo-.js";import{r as x,t as S}from"./react-vega-BTNeboR2.js";import{t as C}from"./cell-link-CF9EP0SZ.js";import{n as w,r as T,t as E}from"./react-resizable-panels.browser.esm-Dbe0MrFr.js";import{t as D}from"./bundle.esm-D3tw5rqW.js";import{t as O}from"./empty-state-BaCKb7o3.js";import{r as k}from"./panel-context-C2QXpKfx.js";import{t as A}from"./clear-button-p6YcvzLy.js";import{n as j,t as M}from"./runs-BLp5jezv.js";var N=p(`circle-ellipsis`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`M17 12h.01`,key:`1m0b6t`}],[`path`,{d:`M12 12h.01`,key:`1mp3jc`}],[`path`,{d:`M7 12h.01`,key:`eqddd0`}]]),P=e(i(),1),F=l(),I=`hoveredCellId`,L=`cellHover`,R=`cellNum`,z=`cell`,B=`startTimestamp`,V=`endTimestamp`,H=`status`;function U(e,t,n,r){let i=`hoursminutessecondsmilliseconds`;return{$schema:`https://vega.github.io/schema/vega-lite/v6.json`,background:r===`dark`?`black`:void 0,mark:{type:`bar`,cornerRadius:2},params:[{name:I,bind:{element:`#${t}`}},{name:L,select:{type:`point`,on:`mouseover`,fields:[z],clear:`mouseout`}}],height:{step:n===`sideBySide`?26:21},encoding:{y:{field:R,scale:{paddingInner:.2},sort:{field:`sortPriority`},title:`cell`,axis:n===`sideBySide`?null:void 0},x:{field:B,type:`temporal`,axis:{orient:`top`,title:null}},x2:{field:V,type:`temporal`},tooltip:[{field:B,type:`temporal`,timeUnit:i,title:`Start`},{field:V,type:`temporal`,timeUnit:i,title:`End`}],size:{value:{expr:`${I} == toString(datum.${z}) ? 19.5 : 18`}},color:{field:H,scale:{domain:[`success`,`error`],range:[`#37BE5F`,`red`]},legend:null}},data:{values:e},transform:[{calculate:`datum.${H} === 'queued' ? 9999999999999 : datum.${B}`,as:`sortPriority`}],config:{view:{stroke:`transparent`}}}}function W(e){try{let t=new Date(e*1e3);return`${t.getFullYear()}-${String(t.getMonth()+1).padStart(2,`0`)}-${String(t.getDate()).padStart(2,`0`)} ${String(t.getHours()).padStart(2,`0`)}:${String(t.getMinutes()).padStart(2,`0`)}:${String(t.getSeconds()).padStart(2,`0`)}.${String(t.getMilliseconds()).padStart(3,`0`)}`}catch{return``}}var G=d(),K=t(new Map),q=()=>{let e=(0,F.c)(34),{runIds:t,runMap:r}=n(M),i=n(K),{clearRuns:a}=j(),{theme:o}=y(),[s,c]=(0,P.useState)(`above`),l=k(),u;e[0]===s?u=e[1]:(u=()=>{c(s===`above`?`sideBySide`:`above`)},e[0]=s,e[1]=u);let d=u;if(t.length===0){let t;return e[2]===Symbol.for(`react.memo_cache_sentinel`)?(t=(0,G.jsx)(O,{title:`No traces`,description:(0,G.jsx)(`span`,{children:`Cells that have ran will appear here.`}),icon:(0,G.jsx)(m,{})}),e[2]=t):t=e[2],t}let f;e[3]===Symbol.for(`react.memo_cache_sentinel`)?(f=(0,G.jsx)(`label`,{htmlFor:`chartPosition`,className:`text-xs`,children:`Inline chart`}),e[3]=f):f=e[3];let p=s===`sideBySide`,h;e[4]!==p||e[5]!==d?(h=(0,G.jsxs)(`div`,{className:`flex flex-row gap-1 items-center`,children:[f,(0,G.jsx)(`input`,{type:`checkbox`,name:`chartPosition`,"data-testid":`chartPosition`,onClick:d,defaultChecked:p,className:`h-3 cursor-pointer`})]}),e[4]=p,e[5]=d,e[6]=h):h=e[6];let g;e[7]===a?g=e[8]:(g=(0,G.jsx)(A,{dataTestId:`clear-traces-button`,onClick:a}),e[7]=a,e[8]=g);let _;e[9]!==h||e[10]!==g?(_=(0,G.jsxs)(`div`,{className:`flex flex-row justify-start gap-3`,children:[h,g]}),e[9]=h,e[10]=g,e[11]=_):_=e[11];let v;if(e[12]!==s||e[13]!==i||e[14]!==t||e[15]!==r||e[16]!==o){let n;e[18]!==s||e[19]!==i||e[20]!==r||e[21]!==o?(n=(e,t)=>{let n=r.get(e);return n?(0,G.jsx)(J,{run:n,isExpanded:i.get(n.runId),isMostRecentRun:t===0,chartPosition:s,theme:o},n.runId):null},e[18]=s,e[19]=i,e[20]=r,e[21]=o,e[22]=n):n=e[22],v=t.map(n),e[12]=s,e[13]=i,e[14]=t,e[15]=r,e[16]=o,e[17]=v}else v=e[17];let b;e[23]===v?b=e[24]:(b=(0,G.jsx)(`div`,{className:`flex flex-col gap-3`,children:v}),e[23]=v,e[24]=b);let x;e[25]!==_||e[26]!==b?(x=(0,G.jsxs)(`div`,{className:`py-1 px-2 overflow-y-scroll h-full`,children:[_,b]}),e[25]=_,e[26]=b,e[27]=x):x=e[27];let S=x;if(l===`sidebar`)return S;let C;e[28]===S?C=e[29]:(C=(0,G.jsx)(E,{defaultSize:50,minSize:30,maxSize:80,children:S}),e[28]=S,e[29]=C);let D;e[30]===Symbol.for(`react.memo_cache_sentinel`)?(D=(0,G.jsx)(T,{className:`w-1 bg-border hover:bg-primary/50 transition-colors`}),e[30]=D):D=e[30];let N;e[31]===Symbol.for(`react.memo_cache_sentinel`)?(N=(0,G.jsx)(E,{defaultSize:50,children:(0,G.jsx)(`div`,{})}),e[31]=N):N=e[31];let I;return e[32]===C?I=e[33]:(I=(0,G.jsxs)(w,{direction:`horizontal`,className:`h-full`,children:[C,D,N]}),e[32]=C,e[33]=I),I},J=e=>{let t=(0,F.c)(22),{run:n,isMostRecentRun:i,chartPosition:a,isExpanded:o,theme:s}=e,l=o,u=r(K);l??=i;let d;t[0]!==l||t[1]!==n.runId||t[2]!==u?(d=()=>{u(e=>{let t=new Map(e);return t.set(n.runId,!l),t})},t[0]=l,t[1]=n.runId,t[2]=u,t[3]=d):d=t[3];let f=d,p=l?h:g,m;t[4]===p?m=t[5]:(m=(0,G.jsx)(p,{height:16,className:`inline`}),t[4]=p,t[5]=m);let _=m,v;t[6]===n.runStartTime?v=t[7]:(v=c(n.runStartTime),t[6]=n.runStartTime,t[7]=v);let y;t[8]!==_||t[9]!==f||t[10]!==v?(y=(0,G.jsxs)(`span`,{className:`text-sm cursor-pointer`,onClick:f,children:[`Run - `,v,_]}),t[8]=_,t[9]=f,t[10]=v,t[11]=y):y=t[11];let b=y;if(!l){let e;t[12]===b?e=t[13]:(e=(0,G.jsx)(`pre`,{className:`font-mono font-semibold`,children:b}),t[12]=b,t[13]=e);let r;return t[14]!==n.runId||t[15]!==e?(r=(0,G.jsx)(`div`,{className:`flex flex-col`,children:e},n.runId),t[14]=n.runId,t[15]=e,t[16]=r):r=t[16],r}let x;return t[17]!==a||t[18]!==n||t[19]!==s||t[20]!==b?(x=(0,G.jsx)(Y,{run:n,chartPosition:a,theme:s,title:b},n.runId),t[17]=a,t[18]=n,t[19]=s,t[20]=b,t[21]=x):x=t[21],x},Y=e=>{let t=(0,F.c)(40),{run:n,chartPosition:r,theme:i,title:s}=e,[c,l]=(0,P.useState)(),u=(0,P.useRef)(null),{ref:d,width:f}=D(),p=f===void 0?300:f,m=a(),h,g;if(t[0]!==m||t[1]!==r||t[2]!==n.cellRuns||t[3]!==n.runId||t[4]!==i){let e=[...n.cellRuns.values()].map(e=>{let t=e.elapsedTime??0;return{cell:e.cellId,cellNum:m.inOrderIds.indexOf(e.cellId),startTimestamp:W(e.startTime),endTimestamp:W(e.startTime+t),elapsedTime:o(t*1e3),status:e.status}});h=`hiddenInputElement-${n.runId}`,g=x(U(e,h,r,i)),t[0]=m,t[1]=r,t[2]=n.cellRuns,t[3]=n.runId,t[4]=i,t[5]=h,t[6]=g}else h=t[5],g=t[6];let _=g.spec,v=i===`dark`?`dark`:void 0,y=p-50,b=r===`above`?120:100,C;t[7]!==v||t[8]!==y||t[9]!==b?(C={theme:v,width:y,height:b,actions:!1,mode:`vega`,renderer:`canvas`},t[7]=v,t[8]=y,t[9]=b,t[10]=C):C=t[10];let w;t[11]!==C||t[12]!==_?(w={ref:u,spec:_,options:C},t[11]=C,t[12]=_,t[13]=w):w=t[13];let T=S(w),E;t[14]===T?.view?E=t[15]:(E=()=>{let e=[{signalName:L,handler:(e,t)=>{let n=t.cell?.[0]??void 0;l(n??null)}}];return e.forEach(e=>{let{signalName:t,handler:n}=e;T?.view.addSignalListener(t,n)}),()=>{e.forEach(e=>{let{signalName:t,handler:n}=e;T?.view.removeSignalListener(t,n)})}},t[14]=T?.view,t[15]=E);let O;t[16]===T?O=t[17]:(O=[T],t[16]=T,t[17]=O),(0,P.useEffect)(E,O);let k;t[18]!==h||t[19]!==c||t[20]!==n?(k=(0,G.jsx)(X,{run:n,hoveredCellId:c,hiddenInputElementId:h}),t[18]=h,t[19]=c,t[20]=n,t[21]=k):k=t[21];let A=k,j=r===`sideBySide`?`-mt-0.5 flex-1`:``,M;t[22]===Symbol.for(`react.memo_cache_sentinel`)?(M=(0,G.jsx)(P.Suspense,{children:(0,G.jsx)(`div`,{ref:u})}),t[22]=M):M=t[22];let N;t[23]!==d||t[24]!==j?(N=(0,G.jsx)(`div`,{className:j,ref:d,children:M}),t[23]=d,t[24]=j,t[25]=N):N=t[25];let I=N;if(r===`above`){let e;t[26]!==I||t[27]!==s||t[28]!==A?(e=(0,G.jsxs)(`pre`,{className:`font-mono font-semibold`,children:[s,I,A]}),t[26]=I,t[27]=s,t[28]=A,t[29]=e):e=t[29];let r;return t[30]!==n.runId||t[31]!==e?(r=(0,G.jsx)(`div`,{className:`flex flex-col`,children:e},n.runId),t[30]=n.runId,t[31]=e,t[32]=r):r=t[32],r}let R;t[33]!==s||t[34]!==A?(R=(0,G.jsxs)(`pre`,{className:`font-mono font-semibold`,children:[s,A]}),t[33]=s,t[34]=A,t[35]=R):R=t[35];let z;return t[36]!==I||t[37]!==n.runId||t[38]!==R?(z=(0,G.jsxs)(`div`,{className:`flex flex-row`,children:[R,I]},n.runId),t[36]=I,t[37]=n.runId,t[38]=R,t[39]=z):z=t[39],z},X=e=>{let t=(0,F.c)(12),{run:n,hoveredCellId:r,hiddenInputElementId:i}=e,a=(0,P.useRef)(null),o;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(o=e=>{a.current&&(a.current.value=String(e),a.current.dispatchEvent(new Event(`input`,{bubbles:!0})))},t[0]=o):o=t[0];let s=o,c=r||``,l;t[1]!==i||t[2]!==c?(l=(0,G.jsx)(`input`,{type:`text`,id:i,defaultValue:c,hidden:!0,ref:a}),t[1]=i,t[2]=c,t[3]=l):l=t[3];let u;t[4]===n.cellRuns?u=t[5]:(u=[...n.cellRuns.values()],t[4]=n.cellRuns,t[5]=u);let d;t[6]!==r||t[7]!==u?(d=u.map(e=>(0,G.jsx)(Q,{cellRun:e,hovered:e.cellId===r,dispatchHoverEvent:s},e.cellId)),t[6]=r,t[7]=u,t[8]=d):d=t[8];let f;return t[9]!==l||t[10]!==d?(f=(0,G.jsxs)(`div`,{className:`text-xs mt-0.5 ml-3 flex flex-col gap-0.5`,children:[l,d]}),t[9]=l,t[10]=d,t[11]=f):f=t[11],f},Z={success:(0,G.jsx)(_,{color:`green`,size:14}),running:(0,G.jsx)(v,{color:`var(--blue-10)`,size:14}),error:(0,G.jsx)(s,{color:`red`,size:14}),queued:(0,G.jsx)(N,{color:`grey`,size:14})},Q=e=>{let t=(0,F.c)(39),{cellRun:n,hovered:r,dispatchHoverEvent:i}=e,a;t[0]===n.elapsedTime?a=t[1]:(a=n.elapsedTime?o(n.elapsedTime*1e3):`-`,t[0]=n.elapsedTime,t[1]=a);let s=a,l;t[2]!==n.elapsedTime||t[3]!==s?(l=n.elapsedTime?(0,G.jsxs)(`span`,{children:[`This cell took `,(0,G.jsx)(b,{elapsedTime:s}),` to run`]}):(0,G.jsx)(`span`,{children:`This cell has not been run`}),t[2]=n.elapsedTime,t[3]=s,t[4]=l):l=t[4];let d=l,p;t[5]!==n.cellId||t[6]!==i?(p=()=>{i(n.cellId)},t[5]=n.cellId,t[6]=i,t[7]=p):p=t[7];let m=p,h;t[8]===i?h=t[9]:(h=()=>{i(null)},t[8]=i,t[9]=h);let g=h,_=r&&`bg-(--gray-3) opacity-100`,v;t[10]===_?v=t[11]:(v=u(`flex flex-row gap-2 py-1 px-1 opacity-70 hover:bg-(--gray-3) hover:opacity-100`,_),t[10]=_,t[11]=v);let y;t[12]===n.startTime?y=t[13]:(y=c(n.startTime),t[12]=n.startTime,t[13]=y);let x;t[14]===y?x=t[15]:(x=(0,G.jsxs)(`span`,{className:`text-(--gray-10) dark:text-(--gray-11)`,children:[`[`,y,`]`]}),t[14]=y,t[15]=x);let S;t[16]===n.cellId?S=t[17]:(S=(0,G.jsxs)(`span`,{className:`text-(--gray-10) w-16 overflow-hidden`,children:[`(`,(0,G.jsx)(C,{cellId:n.cellId}),`)`]}),t[16]=n.cellId,t[17]=S);let w;t[18]===n.code?w=t[19]:(w=(0,G.jsx)(`span`,{className:`w-40 truncate -ml-1`,children:n.code}),t[18]=n.code,t[19]=w);let T;t[20]===s?T=t[21]:(T=(0,G.jsx)(`span`,{className:`text-(--gray-10) dark:text-(--gray-11)`,children:s}),t[20]=s,t[21]=T);let E;t[22]!==d||t[23]!==T?(E=(0,G.jsx)(f,{content:d,children:T}),t[22]=d,t[23]=T,t[24]=E):E=t[24];let D=Z[n.status],O;t[25]!==n.status||t[26]!==D?(O=(0,G.jsx)(f,{content:n.status,children:D}),t[25]=n.status,t[26]=D,t[27]=O):O=t[27];let k;t[28]!==E||t[29]!==O?(k=(0,G.jsxs)(`div`,{className:`flex flex-row gap-1 w-16 justify-end -ml-2`,children:[E,O]}),t[28]=E,t[29]=O,t[30]=k):k=t[30];let A;return t[31]!==m||t[32]!==g||t[33]!==w||t[34]!==k||t[35]!==v||t[36]!==x||t[37]!==S?(A=(0,G.jsxs)(`div`,{className:v,onMouseEnter:m,onMouseLeave:g,children:[x,S,w,k]}),t[31]=m,t[32]=g,t[33]=w,t[34]=k,t[35]=v,t[36]=x,t[37]=S,t[38]=A):A=t[38],A};export{q as Tracing};
@@ -1 +1 @@
1
- import{a as e}from"./rolldown-runtime-B0Z9INg1.js";import{t}from"./react-DVplv7_D.js";import{ro as n}from"./cells-BMs-CYDt.js";import{t as r}from"./compiler-runtime-BrajqUja.js";import{g as i}from"./useEventListener-D9cftcHj.js";import{t as a}from"./cn-ldLVeaqm.js";import{t as o}from"./jsx-runtime-B74pBk57.js";import{t as s}from"./tooltip-C9TuY18o.js";import{t as c}from"./button-COI-NGrx.js";import{t as l}from"./createLucideIcon-DfJ2oMlA.js";import{t as u}from"./chevron-right-eAtVhbNZ.js";import{n as d,t as f}from"./eye-off-CxVozGAC.js";import{t as p}from"./refresh-cw-Qw1f8Jhy.js";var m=l(`chevrons-down-up`,[[`path`,{d:`m7 20 5-5 5 5`,key:`13a0gw`}],[`path`,{d:`m7 4 5 5 5-5`,key:`1kwcof`}]]),h={keyBy(e,t){let n=new Map,r=new Set;for(let i of e){let e=t(i);n.has(e)&&r.add(e),n.set(e,i)}return r.size>0&&i.trace(`Duplicate keys: ${[...r].join(`, `)}`),n},collect(e,t,n){return h.mapValues(h.keyBy(e,t),n)},filterMap(e,t){let n=new Map;for(let[r,i]of e)t(i,r)&&n.set(r,i);return n},mapValues(e,t){let n=new Map;for(let[r,i]of e)n.set(r,t(i,r));return n}},g=r(),_=e(t(),1),v=o(),y=e=>{let t=(0,g.c)(5),{isExpanded:n,className:r}=e,i=n&&`rotate-90`,o;t[0]!==r||t[1]!==i?(o=a(`shrink-0 transition-transform`,i,r),t[0]=r,t[1]=i,t[2]=o):o=t[2];let s;return t[3]===o?s=t[4]:(s=(0,v.jsx)(u,{className:o}),t[3]=o,t[4]=s),s},b=({onClick:e,tooltip:t=`Refresh`,className:n,iconClassName:r})=>{let[i,o]=(0,_.useState)(!1),l=(0,v.jsx)(c,{variant:`text`,size:`xs`,className:n,onClick:async t=>{o(!0);let n=new Promise(e=>setTimeout(e,500));try{await Promise.all([e(t),n])}finally{o(!1)}},children:(0,v.jsx)(p,{className:a(`h-4 w-4`,r,i&&`animate-[spin_0.5s]`)})});return(0,v.jsx)(s,{content:t,children:l})},x=e=>{let t=(0,g.c)(15),{isVisible:r,onToggle:i,showTooltip:o,hideTooltip:l,size:u,className:d,iconClassName:p,"data-testid":m}=e,h=u===void 0?`xs`:u,_=r?n:f,y=r?l:o,b=r&&`text-primary`,x;t[0]!==p||t[1]!==b?(x=a(`h-4 w-4`,b,p),t[0]=p,t[1]=b,t[2]=x):x=t[2];let S;t[3]!==_||t[4]!==x?(S=(0,v.jsx)(_,{className:x}),t[3]=_,t[4]=x,t[5]=S):S=t[5];let C;t[6]!==d||t[7]!==m||t[8]!==i||t[9]!==h||t[10]!==S?(C=(0,v.jsx)(c,{"data-testid":m,variant:`text`,size:h,className:d,onClick:i,children:S}),t[6]=d,t[7]=m,t[8]=i,t[9]=h,t[10]=S,t[11]=C):C=t[11];let w;return t[12]!==y||t[13]!==C?(w=(0,v.jsx)(s,{content:y,children:C}),t[12]=y,t[13]=C,t[14]=w):w=t[14],w},S=_.forwardRef((e,t)=>{let n=(0,g.c)(15),r,i,o;n[0]===e?(r=n[1],i=n[2],o=n[3]):({className:r,iconClassName:i,...o}=e,n[0]=e,n[1]=r,n[2]=i,n[3]=o);let s;n[4]===r?s=n[5]:(s=a(`mb-0 opacity-0 group-hover:opacity-100 transition-opacity`,r),n[4]=r,n[5]=s);let l;n[6]===i?l=n[7]:(l=a(`w-4 h-4`,i),n[6]=i,n[7]=l);let u;n[8]===l?u=n[9]:(u=(0,v.jsx)(d,{className:l}),n[8]=l,n[9]=u);let f;return n[10]!==o||n[11]!==t||n[12]!==s||n[13]!==u?(f=(0,v.jsx)(c,{ref:t,variant:`text`,tabIndex:-1,size:`xs`,className:s,"aria-label":`More options`,...o,children:u}),n[10]=o,n[11]=t,n[12]=s,n[13]=u,n[14]=f):f=n[14],f});S.displayName=`MoreActionsButton`;var C=`h-3.5 w-3.5 mr-2`;export{x as a,y as i,S as n,h as o,b as r,m as s,C as t};
1
+ import{a as e}from"./rolldown-runtime-B0Z9INg1.js";import{t}from"./react-DVplv7_D.js";import{ro as n}from"./cells-CDwPlSdp.js";import{t as r}from"./compiler-runtime-BrajqUja.js";import{g as i}from"./useEventListener-D9cftcHj.js";import{t as a}from"./cn-ldLVeaqm.js";import{t as o}from"./jsx-runtime-B74pBk57.js";import{t as s}from"./tooltip-C9TuY18o.js";import{t as c}from"./button-COI-NGrx.js";import{t as l}from"./createLucideIcon-DfJ2oMlA.js";import{t as u}from"./chevron-right-eAtVhbNZ.js";import{n as d,t as f}from"./eye-off-CxVozGAC.js";import{t as p}from"./refresh-cw-Qw1f8Jhy.js";var m=l(`chevrons-down-up`,[[`path`,{d:`m7 20 5-5 5 5`,key:`13a0gw`}],[`path`,{d:`m7 4 5 5 5-5`,key:`1kwcof`}]]),h={keyBy(e,t){let n=new Map,r=new Set;for(let i of e){let e=t(i);n.has(e)&&r.add(e),n.set(e,i)}return r.size>0&&i.trace(`Duplicate keys: ${[...r].join(`, `)}`),n},collect(e,t,n){return h.mapValues(h.keyBy(e,t),n)},filterMap(e,t){let n=new Map;for(let[r,i]of e)t(i,r)&&n.set(r,i);return n},mapValues(e,t){let n=new Map;for(let[r,i]of e)n.set(r,t(i,r));return n}},g=r(),_=e(t(),1),v=o(),y=e=>{let t=(0,g.c)(5),{isExpanded:n,className:r}=e,i=n&&`rotate-90`,o;t[0]!==r||t[1]!==i?(o=a(`shrink-0 transition-transform`,i,r),t[0]=r,t[1]=i,t[2]=o):o=t[2];let s;return t[3]===o?s=t[4]:(s=(0,v.jsx)(u,{className:o}),t[3]=o,t[4]=s),s},b=({onClick:e,tooltip:t=`Refresh`,className:n,iconClassName:r})=>{let[i,o]=(0,_.useState)(!1),l=(0,v.jsx)(c,{variant:`text`,size:`xs`,className:n,onClick:async t=>{o(!0);let n=new Promise(e=>setTimeout(e,500));try{await Promise.all([e(t),n])}finally{o(!1)}},children:(0,v.jsx)(p,{className:a(`h-4 w-4`,r,i&&`animate-[spin_0.5s]`)})});return(0,v.jsx)(s,{content:t,children:l})},x=e=>{let t=(0,g.c)(15),{isVisible:r,onToggle:i,showTooltip:o,hideTooltip:l,size:u,className:d,iconClassName:p,"data-testid":m}=e,h=u===void 0?`xs`:u,_=r?n:f,y=r?l:o,b=r&&`text-primary`,x;t[0]!==p||t[1]!==b?(x=a(`h-4 w-4`,b,p),t[0]=p,t[1]=b,t[2]=x):x=t[2];let S;t[3]!==_||t[4]!==x?(S=(0,v.jsx)(_,{className:x}),t[3]=_,t[4]=x,t[5]=S):S=t[5];let C;t[6]!==d||t[7]!==m||t[8]!==i||t[9]!==h||t[10]!==S?(C=(0,v.jsx)(c,{"data-testid":m,variant:`text`,size:h,className:d,onClick:i,children:S}),t[6]=d,t[7]=m,t[8]=i,t[9]=h,t[10]=S,t[11]=C):C=t[11];let w;return t[12]!==y||t[13]!==C?(w=(0,v.jsx)(s,{content:y,children:C}),t[12]=y,t[13]=C,t[14]=w):w=t[14],w},S=_.forwardRef((e,t)=>{let n=(0,g.c)(15),r,i,o;n[0]===e?(r=n[1],i=n[2],o=n[3]):({className:r,iconClassName:i,...o}=e,n[0]=e,n[1]=r,n[2]=i,n[3]=o);let s;n[4]===r?s=n[5]:(s=a(`mb-0 opacity-0 group-hover:opacity-100 transition-opacity`,r),n[4]=r,n[5]=s);let l;n[6]===i?l=n[7]:(l=a(`w-4 h-4`,i),n[6]=i,n[7]=l);let u;n[8]===l?u=n[9]:(u=(0,v.jsx)(d,{className:l}),n[8]=l,n[9]=u);let f;return n[10]!==o||n[11]!==t||n[12]!==s||n[13]!==u?(f=(0,v.jsx)(c,{ref:t,variant:`text`,tabIndex:-1,size:`xs`,className:s,"aria-label":`More options`,...o,children:u}),n[10]=o,n[11]=t,n[12]=s,n[13]=u,n[14]=f):f=n[14],f});S.displayName=`MoreActionsButton`;var C=`h-3.5 w-3.5 mr-2`;export{x as a,y as i,S as n,h as o,b as r,m as s,C as t};
@@ -1 +1 @@
1
- import{l as e}from"./useEvent-Dfcbgjhg.js";import{D as t,Rt as n,zt as r}from"./cells-BMs-CYDt.js";import{t as i}from"./compiler-runtime-BrajqUja.js";import{s as a}from"./config-CA1V-wjh.js";var o=i();function s(){let i=(0,o.c)(4),s=e(a),c=n(),{createNewCell:l}=t(),u;return i[0]!==s||i[1]!==l||i[2]!==c?(u=e=>{e.includes(`alt`)&&r({autoInstantiate:s,createNewCell:l,fromCellId:c}),l({code:e,before:!1,cellId:c??`__end__`})},i[0]=s,i[1]=l,i[2]=c,i[3]=u):u=i[3],u}export{s as t};
1
+ import{l as e}from"./useEvent-Dfcbgjhg.js";import{D as t,Rt as n,zt as r}from"./cells-CDwPlSdp.js";import{t as i}from"./compiler-runtime-BrajqUja.js";import{s as a}from"./config-CA1V-wjh.js";var o=i();function s(){let i=(0,o.c)(4),s=e(a),c=n(),{createNewCell:l}=t(),u;return i[0]!==s||i[1]!==l||i[2]!==c?(u=e=>{e.includes(`alt`)&&r({autoInstantiate:s,createNewCell:l,fromCellId:c}),l({code:e,before:!1,cellId:c??`__end__`})},i[0]=s,i[1]=l,i[2]=c,i[3]=u):u=i[3],u}export{s as t};
@@ -1 +1 @@
1
- import{a as e}from"./rolldown-runtime-B0Z9INg1.js";import{t}from"./react-DVplv7_D.js";import{P as n}from"./config-BtRLgrlt.js";import{t as r}from"./compiler-runtime-BrajqUja.js";import{f as i,g as a}from"./useEventListener-D9cftcHj.js";import{i as o}from"./utils-B4K466FK.js";import{t as s}from"./createLucideIcon-DfJ2oMlA.js";var c=s(`case-sensitive`,[[`path`,{d:`m2 16 4.039-9.69a.5.5 0 0 1 .923 0L11 16`,key:`d5nyq2`}],[`path`,{d:`M22 9v7`,key:`pvm9v3`}],[`path`,{d:`M3.304 13h6.392`,key:`1q3zxz`}],[`circle`,{cx:`18.5`,cy:`12.5`,r:`3.5`,key:`z97x68`}]]),l=e(t(),1),u=e=>{let t=null,n=async()=>(t||=e(),t);return{preload:n,Component:l.lazy(()=>n())}},d=typeof window<`u`&&window.parent!==window;function f(){new URLSearchParams(window.location.search).has(o.vscode)&&(!d||n()||(a.log(`[vscode] Registering VS Code bindings`),m(),p(),h(),g()))}function p(){window.addEventListener(`copy`,()=>{_({command:`copy`,text:window.getSelection()?.toString()??``})}),window.addEventListener(`cut`,()=>{let e=window.getSelection()?.toString()??``;i()&&document.execCommand(`insertText`,!1,``),_({command:`cut`,text:e})}),window.addEventListener(`message`,async e=>{try{let t=e.data,n=i();if(t.command===`paste`){if(a.log(`[vscode] Received paste mac=${n}`,t),n){let e=document.activeElement;if(!e){a.warn(`[vscode] No active element to paste into`),document.execCommand(`insertText`,!1,t.text);return}let n=new DataTransfer;n.setData(`text/plain`,t.text),e.dispatchEvent(new ClipboardEvent(`paste`,{clipboardData:n}))}else a.log(`[vscode] Not pasting on mac`);return}}catch(e){a.error(`Error in paste message handler`,e)}})}function m(){document.addEventListener(`keydown`,e=>{if((e.ctrlKey||e.metaKey)&&e.key===`c`){let e=window.getSelection()?.toString()??``;a.log(`[vscode] Sending copy`,e),_({command:`copy`,text:e});return}if((e.ctrlKey||e.metaKey)&&e.key===`x`){let e=window.getSelection()?.toString()??``;i()&&document.execCommand(`insertText`,!1,``),a.log(`[vscode] Sending cut`,e),_({command:`cut`,text:e});return}if((e.ctrlKey||e.metaKey)&&e.key===`v`){a.log(`[vscode] Sending paste`),_({command:`paste`});return}})}function h(){document.addEventListener(`click`,e=>{let t=e.target;if(t.tagName!==`A`)return;let n=t.getAttribute(`href`);n&&(n.startsWith(`http://`)||n.startsWith(`https://`))&&(e.preventDefault(),_({command:`external_link`,url:n}))})}function g(){document.addEventListener(`contextmenu`,e=>{e.preventDefault(),_({command:`context_menu`})})}function _(e){window.parent?.postMessage(e,`*`)}var v={width:void 0,height:void 0};function y(e){let{ref:t,box:n=`content-box`,skip:r}=e,i=(0,l.useRef)({...v}),a=(0,l.useRef)(void 0);a.current=e.onResize,(0,l.useEffect)(()=>{if(!t.current||r||typeof window>`u`||!(`ResizeObserver`in window))return;let e=new ResizeObserver(([e])=>{let t=n===`border-box`?`borderBoxSize`:n===`device-pixel-content-box`?`devicePixelContentBoxSize`:`contentBoxSize`,r=b(e,t,`inlineSize`),o=b(e,t,`blockSize`);if(i.current.width!==r||i.current.height!==o){let e={width:r,height:o};i.current.width=r,i.current.height=o,a.current&&a.current(e)}});return e.observe(t.current,{box:n}),()=>{e.disconnect()}},[n,t,r])}function b(e,t,n){return e[t]?Array.isArray(e[t])?e[t][0][n]:e[t][n]:t===`contentBoxSize`?e.contentRect[n===`inlineSize`?`width`:`height`]:void 0}var x=r();function S(e){let t=(0,x.c)(6),[n,r]=(0,l.useState)(e),i;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(i=e=>{e?.stopPropagation?.(),r(!0)},t[0]=i):i=t[0];let a;t[1]===Symbol.for(`react.memo_cache_sentinel`)?(a=e=>{e?.stopPropagation?.(),r(!1)},t[1]=a):a=t[1];let o;t[2]===Symbol.for(`react.memo_cache_sentinel`)?(o=e=>{e?.stopPropagation?.(),r(C)},t[2]=o):o=t[2];let s;t[3]===Symbol.for(`react.memo_cache_sentinel`)?(s={setTrue:i,setFalse:a,toggle:o},t[3]=s):s=t[3];let c;return t[4]===n?c=t[5]:(c=[n,s],t[4]=n,t[5]=c),c}function C(e){return!e}export{u as a,_ as i,y as n,c as o,f as r,S as t};
1
+ import{a as e}from"./rolldown-runtime-B0Z9INg1.js";import{t}from"./react-DVplv7_D.js";import{P as n}from"./config-BHq_PhD6.js";import{t as r}from"./compiler-runtime-BrajqUja.js";import{f as i,g as a}from"./useEventListener-D9cftcHj.js";import{i as o}from"./utils-B4K466FK.js";import{t as s}from"./createLucideIcon-DfJ2oMlA.js";var c=s(`case-sensitive`,[[`path`,{d:`m2 16 4.039-9.69a.5.5 0 0 1 .923 0L11 16`,key:`d5nyq2`}],[`path`,{d:`M22 9v7`,key:`pvm9v3`}],[`path`,{d:`M3.304 13h6.392`,key:`1q3zxz`}],[`circle`,{cx:`18.5`,cy:`12.5`,r:`3.5`,key:`z97x68`}]]),l=e(t(),1),u=e=>{let t=null,n=async()=>(t||=e(),t);return{preload:n,Component:l.lazy(()=>n())}},d=typeof window<`u`&&window.parent!==window;function f(){new URLSearchParams(window.location.search).has(o.vscode)&&(!d||n()||(a.log(`[vscode] Registering VS Code bindings`),m(),p(),h(),g()))}function p(){window.addEventListener(`copy`,()=>{_({command:`copy`,text:window.getSelection()?.toString()??``})}),window.addEventListener(`cut`,()=>{let e=window.getSelection()?.toString()??``;i()&&document.execCommand(`insertText`,!1,``),_({command:`cut`,text:e})}),window.addEventListener(`message`,async e=>{try{let t=e.data,n=i();if(t.command===`paste`){if(a.log(`[vscode] Received paste mac=${n}`,t),n){let e=document.activeElement;if(!e){a.warn(`[vscode] No active element to paste into`),document.execCommand(`insertText`,!1,t.text);return}let n=new DataTransfer;n.setData(`text/plain`,t.text),e.dispatchEvent(new ClipboardEvent(`paste`,{clipboardData:n}))}else a.log(`[vscode] Not pasting on mac`);return}}catch(e){a.error(`Error in paste message handler`,e)}})}function m(){document.addEventListener(`keydown`,e=>{if((e.ctrlKey||e.metaKey)&&e.key===`c`){let e=window.getSelection()?.toString()??``;a.log(`[vscode] Sending copy`,e),_({command:`copy`,text:e});return}if((e.ctrlKey||e.metaKey)&&e.key===`x`){let e=window.getSelection()?.toString()??``;i()&&document.execCommand(`insertText`,!1,``),a.log(`[vscode] Sending cut`,e),_({command:`cut`,text:e});return}if((e.ctrlKey||e.metaKey)&&e.key===`v`){a.log(`[vscode] Sending paste`),_({command:`paste`});return}})}function h(){document.addEventListener(`click`,e=>{let t=e.target;if(t.tagName!==`A`)return;let n=t.getAttribute(`href`);n&&(n.startsWith(`http://`)||n.startsWith(`https://`))&&(e.preventDefault(),_({command:`external_link`,url:n}))})}function g(){document.addEventListener(`contextmenu`,e=>{e.preventDefault(),_({command:`context_menu`})})}function _(e){window.parent?.postMessage(e,`*`)}var v={width:void 0,height:void 0};function y(e){let{ref:t,box:n=`content-box`,skip:r}=e,i=(0,l.useRef)({...v}),a=(0,l.useRef)(void 0);a.current=e.onResize,(0,l.useEffect)(()=>{if(!t.current||r||typeof window>`u`||!(`ResizeObserver`in window))return;let e=new ResizeObserver(([e])=>{let t=n===`border-box`?`borderBoxSize`:n===`device-pixel-content-box`?`devicePixelContentBoxSize`:`contentBoxSize`,r=b(e,t,`inlineSize`),o=b(e,t,`blockSize`);if(i.current.width!==r||i.current.height!==o){let e={width:r,height:o};i.current.width=r,i.current.height=o,a.current&&a.current(e)}});return e.observe(t.current,{box:n}),()=>{e.disconnect()}},[n,t,r])}function b(e,t,n){return e[t]?Array.isArray(e[t])?e[t][0][n]:e[t][n]:t===`contentBoxSize`?e.contentRect[n===`inlineSize`?`width`:`height`]:void 0}var x=r();function S(e){let t=(0,x.c)(6),[n,r]=(0,l.useState)(e),i;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(i=e=>{e?.stopPropagation?.(),r(!0)},t[0]=i):i=t[0];let a;t[1]===Symbol.for(`react.memo_cache_sentinel`)?(a=e=>{e?.stopPropagation?.(),r(!1)},t[1]=a):a=t[1];let o;t[2]===Symbol.for(`react.memo_cache_sentinel`)?(o=e=>{e?.stopPropagation?.(),r(C)},t[2]=o):o=t[2];let s;t[3]===Symbol.for(`react.memo_cache_sentinel`)?(s={setTrue:i,setFalse:a,toggle:o},t[3]=s):s=t[3];let c;return t[4]===n?c=t[5]:(c=[n,s],t[4]=n,t[5]=c),c}function C(e){return!e}export{u as a,_ as i,y as n,c as o,f as r,S as t};
@@ -1 +1 @@
1
- import{l as e,u as t}from"./useEvent-Dfcbgjhg.js";import{Bt as n,Co as ee,D as te,ii as ne,io as re,oo as ie,qa as ae,ri as oe,ro as se,so as r,v as ce,vi as le,vt as i}from"./cells-BMs-CYDt.js";import{t as a}from"./compiler-runtime-BrajqUja.js";import{o as ue,r as de,s as fe}from"./config-CA1V-wjh.js";import{m as pe}from"./session-DqoWmb7X.js";import{t as o}from"./jsx-runtime-B74pBk57.js";import{d as me}from"./select-DTBn5eTb.js";import{i as he,p as ge}from"./download-Bt4rM2gS.js";import{t as s}from"./createLucideIcon-DfJ2oMlA.js";import{i as _e}from"./paths-bkIFVj8h.js";import{a as ve,i as c}from"./useNumberFormatter-D7O_26UI.js";import{t as ye}from"./chevron-right-eAtVhbNZ.js";import{t as be}from"./code-xml-SQaZqvcO.js";import{t as xe}from"./eye-off-CxVozGAC.js";import{t as Se}from"./image-wZvTj8WY.js";import{b as Ce}from"./write-secret-modal-DzKAInL2.js";import{t as we}from"./link-NuFVR7G9.js";import{i as Te,t as Ee}from"./useDeleteCell-D0dwhgwH.js";import{Qt as De,Yt as Oe,tn as ke}from"./input-BoBxR50a.js";import{t as Ae}from"./trash-2-DcgaW8fn.js";import{n as je}from"./copy-D8O_CYCG.js";import{t as Me}from"./use-toast-Wu434mLr.js";import{r as Ne}from"./requests-lt0JK8Jt.js";import{i as Pe}from"./useRunCells-Dyf_vzJl.js";import{n as Fe}from"./state-BiuybHTd.js";import{n as Ie,t as Le}from"./icons-CiZ_8zS-.js";import{n as l}from"./name-cell-input-DhWcLBL9.js";import{t as u}from"./multi-icon-DL465pPF.js";import{t as Re}from"./useSplitCell-DA8ujlOv.js";var d=s(`chevrons-down`,[[`path`,{d:`m7 6 5 5 5-5`,key:`1lc07p`}],[`path`,{d:`m7 13 5 5 5-5`,key:`1d48rs`}]]),f=s(`chevrons-up`,[[`path`,{d:`m17 11-5-5-5 5`,key:`e8nh98`}],[`path`,{d:`m17 18-5-5-5 5`,key:`2avn1x`}]]),p=s(`scissors`,[[`circle`,{cx:`6`,cy:`6`,r:`3`,key:`1lh9wr`}],[`path`,{d:`M8.12 8.12 12 12`,key:`1alkpv`}],[`path`,{d:`M20 4 8.12 15.88`,key:`xgtan2`}],[`circle`,{cx:`6`,cy:`18`,r:`3`,key:`fqmcym`}],[`path`,{d:`M14.8 14.8 20 20`,key:`ptml3r`}]]),ze=s(`text-cursor-input`,[[`path`,{d:`M12 20h-1a2 2 0 0 1-2-2 2 2 0 0 1-2 2H6`,key:`1528k5`}],[`path`,{d:`M13 8h7a2 2 0 0 1 2 2v4a2 2 0 0 1-2 2h-7`,key:`13ksps`}],[`path`,{d:`M5 16H4a2 2 0 0 1-2-2v-4a2 2 0 0 1 2-2h1`,key:`1n9rhb`}],[`path`,{d:`M6 4h1a2 2 0 0 1 2 2 2 2 0 0 1 2-2h1`,key:`1mj8rg`}],[`path`,{d:`M9 6v12`,key:`velyjx`}]]),m=s(`zap-off`,[[`path`,{d:`M10.513 4.856 13.12 2.17a.5.5 0 0 1 .86.46l-1.377 4.317`,key:`193nxd`}],[`path`,{d:`M15.656 10H20a1 1 0 0 1 .78 1.63l-1.72 1.773`,key:`27a7lr`}],[`path`,{d:`M16.273 16.273 10.88 21.83a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14H4a1 1 0 0 1-.78-1.63l4.507-4.643`,key:`1e0qe9`}],[`path`,{d:`m2 2 20 20`,key:`1ooewy`}]]),h=s(`zap`,[[`path`,{d:`M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z`,key:`1xq2db`}]]),Be=a();function Ve(e){let t=new URL(window.location.href);return t.hash=`scrollTo=${encodeURIComponent(e)}`,t.toString()}function g(e){let t=e.match(/scrollTo=([^&]+)/)?.[1];return t?decodeURIComponent(t.split(`&`)[0]):null}function _(e){return e!==`_`&&!!(e&&e.trim().length>0)}var v=o();function y(a){let o=(0,Be.c)(47),{cell:s,closePopover:g}=a,{createNewCell:y,updateCellConfig:b,updateCellName:x,moveCell:S,sendToTop:C,sendToBottom:w,addColumnBreakpoint:T,clearCellOutput:E,markUntouched:D}=te(),O=Re(),k=Pe(s?.cellId),A=!e(ce),j=Ee(),{openModal:M}=Ce(),N=t(Fe),P=e(de),F=e(fe),Ge=e(pe),I=e(ue),{saveCellConfig:L}=Ne();if(!s||Ge){let e;return o[0]===Symbol.for(`react.memo_cache_sentinel`)?(e=[],o[0]=e):e=o[0],e}let{cellId:R,config:z,getEditorView:B,name:V,hasOutput:H,hasConsoleOutput:U,status:W}=s,G;o[1]!==R||o[2]!==z.disabled||o[3]!==L||o[4]!==b?(G=async()=>{let e={disabled:!z.disabled};await L({configs:{[R]:e}}),b({cellId:R,config:e})},o[1]=R,o[2]=z.disabled,o[3]=L,o[4]=b,o[5]=G):G=o[5];let K=G,q;o[6]!==R||o[7]!==z.hide_code||o[8]!==B||o[9]!==L||o[10]!==b?(q=async()=>{let e={hide_code:!z.hide_code};await L({configs:{[R]:e}}),b({cellId:R,config:e});let t=B();t&&(e.hide_code?t.contentDOM.blur():t.focus())},o[6]=R,o[7]=z.hide_code,o[8]=B,o[9]=L,o[10]=b,o[11]=q):q=o[11];let J=q,Y=R===ee,X;o[12]===Symbol.for(`react.memo_cache_sentinel`)?(X=(0,v.jsx)(Te,{size:13,strokeWidth:1.5}),o[12]=X):X=o[12];let Z=W===`running`||W===`queued`||W===`disabled-transitively`||z.disabled,Q;o[13]===k?Q=o[14]:(Q=()=>k(),o[13]=k,o[14]=Q);let $;return o[15]!==T||o[16]!==P||o[17]!==I||o[18]!==F||o[19]!==A||o[20]!==R||o[21]!==E||o[22]!==g||o[23]!==z.disabled||o[24]!==z.hide_code||o[25]!==y||o[26]!==j||o[27]!==B||o[28]!==U||o[29]!==H||o[30]!==Y||o[31]!==D||o[32]!==S||o[33]!==V||o[34]!==M||o[35]!==L||o[36]!==w||o[37]!==C||o[38]!==N||o[39]!==O||o[40]!==Z||o[41]!==Q||o[42]!==K||o[43]!==J||o[44]!==b||o[45]!==x?($=[[{icon:X,label:`Run cell`,hotkey:`cell.run`,hidden:Z,redundant:!0,handle:Q},{icon:(0,v.jsx)(ae,{size:13,strokeWidth:1.5}),label:`Refactor with AI`,hidden:!P,handle:()=>{N(e=>e?.cellId===R?null:{cellId:R})},hotkey:`cell.aiCompletion`},{icon:(0,v.jsx)(p,{size:13,strokeWidth:1.5}),label:`Split`,hotkey:`cell.splitCell`,handle:()=>O({cellId:R})},{icon:(0,v.jsx)(be,{size:13,strokeWidth:1.5}),label:`Format`,hotkey:`cell.format`,handle:()=>{let e=B();e&&le({[R]:e})}},{icon:z.hide_code?(0,v.jsx)(se,{size:13,strokeWidth:1.5}):(0,v.jsx)(xe,{size:13,strokeWidth:1.5}),label:z.hide_code?`Show code`:`Hide code`,handle:J,hotkey:`cell.hideCode`},{icon:z.disabled?(0,v.jsx)(m,{size:13,strokeWidth:1.5}):(0,v.jsx)(h,{size:13,strokeWidth:1.5}),label:z.disabled?`Enable execution`:`Disable execution`,handle:K,hidden:Y}],[{icon:(0,v.jsx)(Le,{}),label:`Convert to Markdown`,hotkey:`cell.viewAsMarkdown`,handle:async()=>{let e=B();e&&(n({autoInstantiate:F,createNewCell:y}),i(e,{language:`markdown`,keepCodeAsIs:!1}),z.hide_code||(await L({configs:{[R]:{hide_code:!0}}}),b({cellId:R,config:{hide_code:!0}}),D({cellId:R})))},hidden:Y},oe(B())===`sql`?{icon:(0,v.jsx)(Ie,{}),label:`View as Python`,hotkey:`cell.viewAsSQL`,handle:()=>{let e=B();e&&ne(e,`python`,{force:!0})},hidden:Y}:{icon:(0,v.jsx)(_e,{size:13,strokeWidth:1.5}),label:`Convert to SQL`,hotkey:`cell.viewAsSQL`,handle:()=>{let e=B();e&&(n({autoInstantiate:F,createNewCell:y}),i(e,{language:`sql`,keepCodeAsIs:!1}))},hidden:Y}],[{icon:(0,v.jsxs)(u,{children:[(0,v.jsx)(r,{size:13,strokeWidth:1.5}),(0,v.jsx)(c,{size:8,strokeWidth:2})]}),label:`Create cell above`,hotkey:`cell.createAbove`,handle:()=>y({cellId:R,before:!0}),hidden:Y,redundant:!0},{icon:(0,v.jsxs)(u,{children:[(0,v.jsx)(r,{size:13,strokeWidth:1.5}),(0,v.jsx)(ve,{size:8,strokeWidth:2})]}),label:`Create cell below`,hotkey:`cell.createBelow`,handle:()=>y({cellId:R,before:!1}),redundant:!0},{icon:(0,v.jsx)(c,{size:13,strokeWidth:1.5}),label:`Move cell up`,hotkey:`cell.moveUp`,handle:()=>S({cellId:R,before:!0}),hidden:Y},{icon:(0,v.jsx)(ve,{size:13,strokeWidth:1.5}),label:`Move cell down`,hotkey:`cell.moveDown`,handle:()=>S({cellId:R,before:!1}),hidden:Y},{icon:(0,v.jsx)(ge,{size:13,strokeWidth:1.5}),label:`Move cell left`,hotkey:`cell.moveLeft`,handle:()=>S({cellId:R,direction:`left`}),hidden:I!==`columns`||Y},{icon:(0,v.jsx)(ye,{size:13,strokeWidth:1.5}),label:`Move cell right`,hotkey:`cell.moveRight`,handle:()=>S({cellId:R,direction:`right`}),hidden:I!==`columns`||Y},{icon:(0,v.jsx)(f,{size:13,strokeWidth:1.5}),label:`Send to top`,hotkey:`cell.sendToTop`,handle:()=>C({cellId:R,scroll:!1}),hidden:Y},{icon:(0,v.jsx)(d,{size:13,strokeWidth:1.5}),label:`Send to bottom`,hotkey:`cell.sendToBottom`,handle:()=>w({cellId:R,scroll:!1}),hidden:Y},{icon:(0,v.jsx)(re,{size:13,strokeWidth:1.5}),label:`Break into new column`,hotkey:`cell.addColumnBreakpoint`,handle:()=>T({cellId:R}),hidden:I!==`columns`||Y}],[{icon:(0,v.jsx)(Se,{size:13,strokeWidth:1.5}),label:`Export output as PNG`,hidden:!H,handle:()=>he(R,`result`)},{icon:(0,v.jsx)(ie,{size:13,strokeWidth:1.5}),label:`Clear output`,hidden:!(H||U),handle:()=>{E({cellId:R})}}],[{icon:(0,v.jsx)(ze,{size:13,strokeWidth:1.5}),label:`Name`,disableClick:!0,handle:We,handleHeadless:()=>{M((0,v.jsxs)(Oe,{children:[(0,v.jsx)(De,{children:(0,v.jsx)(ke,{children:`Rename cell`})}),(0,v.jsxs)(`div`,{className:`flex items-center justify-between`,children:[(0,v.jsx)(me,{htmlFor:`cell-name`,children:`Cell name`}),(0,v.jsx)(l,{placeholder:`cell name`,value:V,onKeyDown:e=>{e.key===`Enter`&&(e.preventDefault(),e.stopPropagation(),M(null))},onChange:e=>x({cellId:R,name:e})})]})]}))},rightElement:(0,v.jsx)(l,{placeholder:`cell name`,value:V,onChange:e=>x({cellId:R,name:e}),onEnterKey:()=>g?.()}),hidden:Y},{icon:(0,v.jsx)(we,{size:13,strokeWidth:1.5}),label:`Copy link to cell`,disabled:!_(V),tooltip:_(V)?void 0:`Only named cells can be linked to`,handle:async()=>{await je(Ve(V)),Me({description:`Link copied to clipboard`})}}],[{label:`Delete`,hidden:!A,variant:`danger`,icon:(0,v.jsx)(Ae,{size:13,strokeWidth:1.5}),handle:()=>{j({cellId:R})}}]].map(Ue).filter(He),o[15]=T,o[16]=P,o[17]=I,o[18]=F,o[19]=A,o[20]=R,o[21]=E,o[22]=g,o[23]=z.disabled,o[24]=z.hide_code,o[25]=y,o[26]=j,o[27]=B,o[28]=U,o[29]=H,o[30]=Y,o[31]=D,o[32]=S,o[33]=V,o[34]=M,o[35]=L,o[36]=w,o[37]=C,o[38]=N,o[39]=O,o[40]=Z,o[41]=Q,o[42]=K,o[43]=J,o[44]=b,o[45]=x,o[46]=$):$=o[46],$}function He(e){return e.length>0}function Ue(e){return e.filter(b)}function b(e){return!e.hidden}function We(e){e?.stopPropagation(),e?.preventDefault()}export{p as a,m as i,g as n,f as o,h as r,d as s,y as t};
1
+ import{l as e,u as t}from"./useEvent-Dfcbgjhg.js";import{Bt as n,Co as ee,D as te,ii as ne,io as re,oo as ie,qa as ae,ri as oe,ro as se,so as r,v as ce,vi as le,vt as i}from"./cells-CDwPlSdp.js";import{t as a}from"./compiler-runtime-BrajqUja.js";import{o as ue,r as de,s as fe}from"./config-CA1V-wjh.js";import{m as pe}from"./session-DqoWmb7X.js";import{t as o}from"./jsx-runtime-B74pBk57.js";import{d as me}from"./select-DTBn5eTb.js";import{i as he,p as ge}from"./download-D_fcZeOz.js";import{t as s}from"./createLucideIcon-DfJ2oMlA.js";import{i as _e}from"./paths-bkIFVj8h.js";import{a as ve,i as c}from"./useNumberFormatter-D7O_26UI.js";import{t as ye}from"./chevron-right-eAtVhbNZ.js";import{t as be}from"./code-xml-SQaZqvcO.js";import{t as xe}from"./eye-off-CxVozGAC.js";import{t as Se}from"./image-wZvTj8WY.js";import{b as Ce}from"./write-secret-modal-DzKAInL2.js";import{t as we}from"./link-NuFVR7G9.js";import{i as Te,t as Ee}from"./useDeleteCell-Bo9Jw4f-.js";import{Qt as De,Yt as Oe,tn as ke}from"./input-BoBxR50a.js";import{t as Ae}from"./trash-2-DcgaW8fn.js";import{n as je}from"./copy-D8O_CYCG.js";import{t as Me}from"./use-toast-Wu434mLr.js";import{r as Ne}from"./requests-lt0JK8Jt.js";import{i as Pe}from"./useRunCells-y87fM1aq.js";import{n as Fe}from"./state-Payxmcji.js";import{n as Ie,t as Le}from"./icons-CiZ_8zS-.js";import{n as l}from"./name-cell-input-DCDJfAiP.js";import{t as u}from"./multi-icon-DL465pPF.js";import{t as Re}from"./useSplitCell-CT6wuo-t.js";var d=s(`chevrons-down`,[[`path`,{d:`m7 6 5 5 5-5`,key:`1lc07p`}],[`path`,{d:`m7 13 5 5 5-5`,key:`1d48rs`}]]),f=s(`chevrons-up`,[[`path`,{d:`m17 11-5-5-5 5`,key:`e8nh98`}],[`path`,{d:`m17 18-5-5-5 5`,key:`2avn1x`}]]),p=s(`scissors`,[[`circle`,{cx:`6`,cy:`6`,r:`3`,key:`1lh9wr`}],[`path`,{d:`M8.12 8.12 12 12`,key:`1alkpv`}],[`path`,{d:`M20 4 8.12 15.88`,key:`xgtan2`}],[`circle`,{cx:`6`,cy:`18`,r:`3`,key:`fqmcym`}],[`path`,{d:`M14.8 14.8 20 20`,key:`ptml3r`}]]),ze=s(`text-cursor-input`,[[`path`,{d:`M12 20h-1a2 2 0 0 1-2-2 2 2 0 0 1-2 2H6`,key:`1528k5`}],[`path`,{d:`M13 8h7a2 2 0 0 1 2 2v4a2 2 0 0 1-2 2h-7`,key:`13ksps`}],[`path`,{d:`M5 16H4a2 2 0 0 1-2-2v-4a2 2 0 0 1 2-2h1`,key:`1n9rhb`}],[`path`,{d:`M6 4h1a2 2 0 0 1 2 2 2 2 0 0 1 2-2h1`,key:`1mj8rg`}],[`path`,{d:`M9 6v12`,key:`velyjx`}]]),m=s(`zap-off`,[[`path`,{d:`M10.513 4.856 13.12 2.17a.5.5 0 0 1 .86.46l-1.377 4.317`,key:`193nxd`}],[`path`,{d:`M15.656 10H20a1 1 0 0 1 .78 1.63l-1.72 1.773`,key:`27a7lr`}],[`path`,{d:`M16.273 16.273 10.88 21.83a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14H4a1 1 0 0 1-.78-1.63l4.507-4.643`,key:`1e0qe9`}],[`path`,{d:`m2 2 20 20`,key:`1ooewy`}]]),h=s(`zap`,[[`path`,{d:`M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z`,key:`1xq2db`}]]),Be=a();function Ve(e){let t=new URL(window.location.href);return t.hash=`scrollTo=${encodeURIComponent(e)}`,t.toString()}function g(e){let t=e.match(/scrollTo=([^&]+)/)?.[1];return t?decodeURIComponent(t.split(`&`)[0]):null}function _(e){return e!==`_`&&!!(e&&e.trim().length>0)}var v=o();function y(a){let o=(0,Be.c)(47),{cell:s,closePopover:g}=a,{createNewCell:y,updateCellConfig:b,updateCellName:x,moveCell:S,sendToTop:C,sendToBottom:w,addColumnBreakpoint:T,clearCellOutput:E,markUntouched:D}=te(),O=Re(),k=Pe(s?.cellId),A=!e(ce),j=Ee(),{openModal:M}=Ce(),N=t(Fe),P=e(de),F=e(fe),Ge=e(pe),I=e(ue),{saveCellConfig:L}=Ne();if(!s||Ge){let e;return o[0]===Symbol.for(`react.memo_cache_sentinel`)?(e=[],o[0]=e):e=o[0],e}let{cellId:R,config:z,getEditorView:B,name:V,hasOutput:H,hasConsoleOutput:U,status:W}=s,G;o[1]!==R||o[2]!==z.disabled||o[3]!==L||o[4]!==b?(G=async()=>{let e={disabled:!z.disabled};await L({configs:{[R]:e}}),b({cellId:R,config:e})},o[1]=R,o[2]=z.disabled,o[3]=L,o[4]=b,o[5]=G):G=o[5];let K=G,q;o[6]!==R||o[7]!==z.hide_code||o[8]!==B||o[9]!==L||o[10]!==b?(q=async()=>{let e={hide_code:!z.hide_code};await L({configs:{[R]:e}}),b({cellId:R,config:e});let t=B();t&&(e.hide_code?t.contentDOM.blur():t.focus())},o[6]=R,o[7]=z.hide_code,o[8]=B,o[9]=L,o[10]=b,o[11]=q):q=o[11];let J=q,Y=R===ee,X;o[12]===Symbol.for(`react.memo_cache_sentinel`)?(X=(0,v.jsx)(Te,{size:13,strokeWidth:1.5}),o[12]=X):X=o[12];let Z=W===`running`||W===`queued`||W===`disabled-transitively`||z.disabled,Q;o[13]===k?Q=o[14]:(Q=()=>k(),o[13]=k,o[14]=Q);let $;return o[15]!==T||o[16]!==P||o[17]!==I||o[18]!==F||o[19]!==A||o[20]!==R||o[21]!==E||o[22]!==g||o[23]!==z.disabled||o[24]!==z.hide_code||o[25]!==y||o[26]!==j||o[27]!==B||o[28]!==U||o[29]!==H||o[30]!==Y||o[31]!==D||o[32]!==S||o[33]!==V||o[34]!==M||o[35]!==L||o[36]!==w||o[37]!==C||o[38]!==N||o[39]!==O||o[40]!==Z||o[41]!==Q||o[42]!==K||o[43]!==J||o[44]!==b||o[45]!==x?($=[[{icon:X,label:`Run cell`,hotkey:`cell.run`,hidden:Z,redundant:!0,handle:Q},{icon:(0,v.jsx)(ae,{size:13,strokeWidth:1.5}),label:`Refactor with AI`,hidden:!P,handle:()=>{N(e=>e?.cellId===R?null:{cellId:R})},hotkey:`cell.aiCompletion`},{icon:(0,v.jsx)(p,{size:13,strokeWidth:1.5}),label:`Split`,hotkey:`cell.splitCell`,handle:()=>O({cellId:R})},{icon:(0,v.jsx)(be,{size:13,strokeWidth:1.5}),label:`Format`,hotkey:`cell.format`,handle:()=>{let e=B();e&&le({[R]:e})}},{icon:z.hide_code?(0,v.jsx)(se,{size:13,strokeWidth:1.5}):(0,v.jsx)(xe,{size:13,strokeWidth:1.5}),label:z.hide_code?`Show code`:`Hide code`,handle:J,hotkey:`cell.hideCode`},{icon:z.disabled?(0,v.jsx)(m,{size:13,strokeWidth:1.5}):(0,v.jsx)(h,{size:13,strokeWidth:1.5}),label:z.disabled?`Enable execution`:`Disable execution`,handle:K,hidden:Y}],[{icon:(0,v.jsx)(Le,{}),label:`Convert to Markdown`,hotkey:`cell.viewAsMarkdown`,handle:async()=>{let e=B();e&&(n({autoInstantiate:F,createNewCell:y}),i(e,{language:`markdown`,keepCodeAsIs:!1}),z.hide_code||(await L({configs:{[R]:{hide_code:!0}}}),b({cellId:R,config:{hide_code:!0}}),D({cellId:R})))},hidden:Y},oe(B())===`sql`?{icon:(0,v.jsx)(Ie,{}),label:`View as Python`,hotkey:`cell.viewAsSQL`,handle:()=>{let e=B();e&&ne(e,`python`,{force:!0})},hidden:Y}:{icon:(0,v.jsx)(_e,{size:13,strokeWidth:1.5}),label:`Convert to SQL`,hotkey:`cell.viewAsSQL`,handle:()=>{let e=B();e&&(n({autoInstantiate:F,createNewCell:y}),i(e,{language:`sql`,keepCodeAsIs:!1}))},hidden:Y}],[{icon:(0,v.jsxs)(u,{children:[(0,v.jsx)(r,{size:13,strokeWidth:1.5}),(0,v.jsx)(c,{size:8,strokeWidth:2})]}),label:`Create cell above`,hotkey:`cell.createAbove`,handle:()=>y({cellId:R,before:!0}),hidden:Y,redundant:!0},{icon:(0,v.jsxs)(u,{children:[(0,v.jsx)(r,{size:13,strokeWidth:1.5}),(0,v.jsx)(ve,{size:8,strokeWidth:2})]}),label:`Create cell below`,hotkey:`cell.createBelow`,handle:()=>y({cellId:R,before:!1}),redundant:!0},{icon:(0,v.jsx)(c,{size:13,strokeWidth:1.5}),label:`Move cell up`,hotkey:`cell.moveUp`,handle:()=>S({cellId:R,before:!0}),hidden:Y},{icon:(0,v.jsx)(ve,{size:13,strokeWidth:1.5}),label:`Move cell down`,hotkey:`cell.moveDown`,handle:()=>S({cellId:R,before:!1}),hidden:Y},{icon:(0,v.jsx)(ge,{size:13,strokeWidth:1.5}),label:`Move cell left`,hotkey:`cell.moveLeft`,handle:()=>S({cellId:R,direction:`left`}),hidden:I!==`columns`||Y},{icon:(0,v.jsx)(ye,{size:13,strokeWidth:1.5}),label:`Move cell right`,hotkey:`cell.moveRight`,handle:()=>S({cellId:R,direction:`right`}),hidden:I!==`columns`||Y},{icon:(0,v.jsx)(f,{size:13,strokeWidth:1.5}),label:`Send to top`,hotkey:`cell.sendToTop`,handle:()=>C({cellId:R,scroll:!1}),hidden:Y},{icon:(0,v.jsx)(d,{size:13,strokeWidth:1.5}),label:`Send to bottom`,hotkey:`cell.sendToBottom`,handle:()=>w({cellId:R,scroll:!1}),hidden:Y},{icon:(0,v.jsx)(re,{size:13,strokeWidth:1.5}),label:`Break into new column`,hotkey:`cell.addColumnBreakpoint`,handle:()=>T({cellId:R}),hidden:I!==`columns`||Y}],[{icon:(0,v.jsx)(Se,{size:13,strokeWidth:1.5}),label:`Export output as PNG`,hidden:!H,handle:()=>he(R,`result`)},{icon:(0,v.jsx)(ie,{size:13,strokeWidth:1.5}),label:`Clear output`,hidden:!(H||U),handle:()=>{E({cellId:R})}}],[{icon:(0,v.jsx)(ze,{size:13,strokeWidth:1.5}),label:`Name`,disableClick:!0,handle:We,handleHeadless:()=>{M((0,v.jsxs)(Oe,{children:[(0,v.jsx)(De,{children:(0,v.jsx)(ke,{children:`Rename cell`})}),(0,v.jsxs)(`div`,{className:`flex items-center justify-between`,children:[(0,v.jsx)(me,{htmlFor:`cell-name`,children:`Cell name`}),(0,v.jsx)(l,{placeholder:`cell name`,value:V,onKeyDown:e=>{e.key===`Enter`&&(e.preventDefault(),e.stopPropagation(),M(null))},onChange:e=>x({cellId:R,name:e})})]})]}))},rightElement:(0,v.jsx)(l,{placeholder:`cell name`,value:V,onChange:e=>x({cellId:R,name:e}),onEnterKey:()=>g?.()}),hidden:Y},{icon:(0,v.jsx)(we,{size:13,strokeWidth:1.5}),label:`Copy link to cell`,disabled:!_(V),tooltip:_(V)?void 0:`Only named cells can be linked to`,handle:async()=>{await je(Ve(V)),Me({description:`Link copied to clipboard`})}}],[{label:`Delete`,hidden:!A,variant:`danger`,icon:(0,v.jsx)(Ae,{size:13,strokeWidth:1.5}),handle:()=>{j({cellId:R})}}]].map(Ue).filter(He),o[15]=T,o[16]=P,o[17]=I,o[18]=F,o[19]=A,o[20]=R,o[21]=E,o[22]=g,o[23]=z.disabled,o[24]=z.hide_code,o[25]=y,o[26]=j,o[27]=B,o[28]=U,o[29]=H,o[30]=Y,o[31]=D,o[32]=S,o[33]=V,o[34]=M,o[35]=L,o[36]=w,o[37]=C,o[38]=N,o[39]=O,o[40]=Z,o[41]=Q,o[42]=K,o[43]=J,o[44]=b,o[45]=x,o[46]=$):$=o[46],$}function He(e){return e.length>0}function Ue(e){return e.filter(b)}function b(e){return!e.hidden}function We(e){e?.stopPropagation(),e?.preventDefault()}export{p as a,m as i,g as n,f as o,h as r,d as s,y as t};
@@ -1 +1 @@
1
- import{r as e,t}from"./useEvent-Dfcbgjhg.js";import{D as n,b as r,v as i}from"./cells-BMs-CYDt.js";import{t as a}from"./compiler-runtime-BrajqUja.js";import{t as o}from"./useEventListener-D9cftcHj.js";import{t as s}from"./jsx-runtime-B74pBk57.js";import{t as c}from"./button-COI-NGrx.js";import{t as l}from"./createLucideIcon-DfJ2oMlA.js";import{t as u}from"./use-toast-Wu434mLr.js";import{r as d}from"./requests-lt0JK8Jt.js";import{n as f}from"./renderShortcut-C1JwYcqW.js";var p=l(`play`,[[`path`,{d:`M5 5a2 2 0 0 1 3.008-1.728l11.997 6.998a2 2 0 0 1 .003 3.458l-12 7A2 2 0 0 1 5 19z`,key:`10ikf1`}]]),m=a(),h=s(),g=e=>{let t=(0,m.c)(7),n;t[0]===e?n=t[1]:(n=t=>{(t.ctrlKey||t.metaKey)&&t.key===`z`&&(t.preventDefault(),t.stopPropagation(),e.onClick?.(t))},t[0]=e,t[1]=n);let r;t[2]===Symbol.for(`react.memo_cache_sentinel`)?(r={capture:!0},t[2]=r):r=t[2],o(window,`keydown`,n,r);let i=e.children??`Undo`,a;t[3]===Symbol.for(`react.memo_cache_sentinel`)?(a=(0,h.jsx)(f,{className:`ml-2`,shortcut:`cmd-z`}),t[3]=a):a=t[3];let s;return t[4]!==i||t[5]!==e?(s=(0,h.jsxs)(c,{"data-testid":`undo-button`,size:`sm`,variant:`outline`,...e,children:[i,` `,a]}),t[4]=i,t[5]=e,t[6]=s):s=t[6],s};function _(){let a=(0,m.c)(4),{deleteCell:o,undoDeleteCell:s}=n(),{sendDeleteCell:c}=d(),l;return a[0]!==o||a[1]!==c||a[2]!==s?(l=t=>{if(e.get(i))return;let{cellId:n}=t,a=(e.get(r).cellData[n]?.code??``).trim()===``;if(o({cellId:n}),c({cellId:n}).catch(()=>{s()}),!a){let{dismiss:e}=u({title:`Cell deleted`,description:`You can bring it back by clicking undo or through the command palette.`,action:(0,h.jsx)(g,{"data-testid":`undo-delete-button`,onClick:()=>{s(),t()}})}),t=e}},a[0]=o,a[1]=c,a[2]=s,a[3]=l):l=a[3],t(l)}function v(){let r=(0,m.c)(4),{deleteCell:a,undoDeleteCell:o}=n(),{sendDeleteCell:s}=d(),c;return r[0]!==a||r[1]!==s||r[2]!==o?(c=async t=>{if(e.get(i))return;let{cellIds:n}=t;for(let e of n)await s({cellId:e}).then(()=>{a({cellId:e})});let{dismiss:r}=u({title:`Cells deleted`,action:(0,h.jsx)(g,{"data-testid":`undo-delete-button`,onClick:()=>{for(let e of n)o();c()}})}),c=r},r[0]=a,r[1]=s,r[2]=o,r[3]=c):c=r[3],t(c)}export{p as i,v as n,g as r,_ as t};
1
+ import{r as e,t}from"./useEvent-Dfcbgjhg.js";import{D as n,b as r,v as i}from"./cells-CDwPlSdp.js";import{t as a}from"./compiler-runtime-BrajqUja.js";import{t as o}from"./useEventListener-D9cftcHj.js";import{t as s}from"./jsx-runtime-B74pBk57.js";import{t as c}from"./button-COI-NGrx.js";import{t as l}from"./createLucideIcon-DfJ2oMlA.js";import{t as u}from"./use-toast-Wu434mLr.js";import{r as d}from"./requests-lt0JK8Jt.js";import{n as f}from"./renderShortcut-C1JwYcqW.js";var p=l(`play`,[[`path`,{d:`M5 5a2 2 0 0 1 3.008-1.728l11.997 6.998a2 2 0 0 1 .003 3.458l-12 7A2 2 0 0 1 5 19z`,key:`10ikf1`}]]),m=a(),h=s(),g=e=>{let t=(0,m.c)(7),n;t[0]===e?n=t[1]:(n=t=>{(t.ctrlKey||t.metaKey)&&t.key===`z`&&(t.preventDefault(),t.stopPropagation(),e.onClick?.(t))},t[0]=e,t[1]=n);let r;t[2]===Symbol.for(`react.memo_cache_sentinel`)?(r={capture:!0},t[2]=r):r=t[2],o(window,`keydown`,n,r);let i=e.children??`Undo`,a;t[3]===Symbol.for(`react.memo_cache_sentinel`)?(a=(0,h.jsx)(f,{className:`ml-2`,shortcut:`cmd-z`}),t[3]=a):a=t[3];let s;return t[4]!==i||t[5]!==e?(s=(0,h.jsxs)(c,{"data-testid":`undo-button`,size:`sm`,variant:`outline`,...e,children:[i,` `,a]}),t[4]=i,t[5]=e,t[6]=s):s=t[6],s};function _(){let a=(0,m.c)(4),{deleteCell:o,undoDeleteCell:s}=n(),{sendDeleteCell:c}=d(),l;return a[0]!==o||a[1]!==c||a[2]!==s?(l=t=>{if(e.get(i))return;let{cellId:n}=t,a=(e.get(r).cellData[n]?.code??``).trim()===``;if(o({cellId:n}),c({cellId:n}).catch(()=>{s()}),!a){let{dismiss:e}=u({title:`Cell deleted`,description:`You can bring it back by clicking undo or through the command palette.`,action:(0,h.jsx)(g,{"data-testid":`undo-delete-button`,onClick:()=>{s(),t()}})}),t=e}},a[0]=o,a[1]=c,a[2]=s,a[3]=l):l=a[3],t(l)}function v(){let r=(0,m.c)(4),{deleteCell:a,undoDeleteCell:o}=n(),{sendDeleteCell:s}=d(),c;return r[0]!==a||r[1]!==s||r[2]!==o?(c=async t=>{if(e.get(i))return;let{cellIds:n}=t;for(let e of n)await s({cellId:e}).then(()=>{a({cellId:e})});let{dismiss:r}=u({title:`Cells deleted`,action:(0,h.jsx)(g,{"data-testid":`undo-delete-button`,onClick:()=>{for(let e of n)o();c()}})}),c=r},r[0]=a,r[1]=s,r[2]=o,r[3]=c):c=r[3],t(c)}export{p as i,v as n,g as r,_ as t};
@@ -1 +1 @@
1
- import{a as e}from"./rolldown-runtime-B0Z9INg1.js";import{c as t,f as n,l as r,t as i,u as a}from"./useEvent-Dfcbgjhg.js";import{t as o}from"./react-DVplv7_D.js";import{Cn as s,Fn as c,K as ee,Pt as l,_n as u,cn as d,dn as f,fn as p,gn as m,hn as h,mn as g,un as _,yn as v}from"./cells-BMs-CYDt.js";import{t as y}from"./compiler-runtime-BrajqUja.js";import{t as b}from"./cn-ldLVeaqm.js";import{t as x}from"./jsx-runtime-B74pBk57.js";import{t as te}from"./use-restore-focus-BxEGwIbk.js";import{a as ne,n as re,o as ie,t as ae}from"./tooltip-C9TuY18o.js";import{t as oe}from"./useCellActionButton-Db-2kvJ0.js";import{a as se,i as ce}from"./renderShortcut-C1JwYcqW.js";var S=y(),C=e(o(),1),w=x(),T=C.memo(C.forwardRef((e,t)=>{let n=(0,S.c)(39),{children:r,showTooltip:a,...o}=e,l=a===void 0||a,[y,x]=(0,C.useState)(!1),T;n[0]===Symbol.for(`react.memo_cache_sentinel`)?(T=()=>x(!1),n[0]=T):T=n[0];let E=T,D=(0,C.useRef)(null),j=oe({cell:o,closePopover:E}).map(O).filter(k),M=te(),N;n[1]===Symbol.for(`react.memo_cache_sentinel`)?(N=()=>{ee(()=>{D.current&&D.current.scrollIntoView({behavior:`auto`,block:`nearest`})})},n[1]=N):N=n[1];let P=i(N),F;n[2]===P?F=n[3]:(F=e=>{x(t=>{let n=typeof e==`function`?e(t):e;return n&&P(),n})},n[2]=P,n[3]=F);let I=i(F),L;n[4]===I?L=n[5]:(L=()=>({toggle:()=>I(A)}),n[4]=I,n[5]=L),(0,C.useImperativeHandle)(t,L);let R=_,z=p,B=c(o.cellId),V;n[6]===B?V=n[7]:(V=(0,w.jsx)(m,{placeholder:`Search actions...`,className:`h-6 m-1`,...B}),n[6]=B,n[7]=V);let H=s,U;n[8]===Symbol.for(`react.memo_cache_sentinel`)?(U=(0,w.jsx)(g,{children:`No results`}),n[8]=U):U=n[8];let W=j.map((e,t)=>(0,w.jsxs)(C.Fragment,{children:[(0,w.jsx)(h,{children:e.map(e=>{let t=(0,w.jsxs)(`div`,{className:`flex items-center flex-1`,children:[e.icon&&(0,w.jsx)(`div`,{className:`mr-2 w-5 text-muted-foreground`,children:e.icon}),(0,w.jsx)(`div`,{className:`flex-1`,children:e.label}),(0,w.jsxs)(`div`,{className:`shrink-0 text-sm`,children:[e.hotkey&&ce(e.hotkey),e.rightElement]})]});return e.tooltip&&(t=(0,w.jsx)(ae,{content:e.tooltip,delayDuration:100,children:t})),(0,w.jsx)(u,{className:b(e.disabled&&`opacity-50!`),onSelect:()=>{e.disableClick||e.disabled||(e.handle(),x(!1))},variant:e.variant,children:t},e.label)})},t),t<j.length-1&&(0,w.jsx)(v,{})]},t)),G;n[9]!==H||n[10]!==U||n[11]!==W?(G=(0,w.jsxs)(H,{children:[U,W]}),n[9]=H,n[10]=U,n[11]=W,n[12]=G):G=n[12];let K;n[13]!==z||n[14]!==G||n[15]!==V?(K=(0,w.jsxs)(z,{children:[V,G]}),n[13]=z,n[14]=G,n[15]=V,n[16]=K):K=n[16];let q;n[17]!==R||n[18]!==M||n[19]!==K?(q=(0,w.jsx)(R,{className:`w-[300px] p-0 pt-1 overflow-auto`,scrollable:!0,...M,children:K}),n[17]=R,n[18]=M,n[19]=K,n[20]=q):q=n[20];let J=q;if(!l){let e;n[21]===r?e=n[22]:(e=(0,w.jsx)(f,{asChild:!0,children:r}),n[21]=r,n[22]=e);let t;return n[23]!==J||n[24]!==I||n[25]!==y||n[26]!==e?(t=(0,w.jsxs)(d,{open:y,onOpenChange:I,children:[e,J]}),n[23]=J,n[24]=I,n[25]=y,n[26]=e,n[27]=t):t=n[27],t}let Y;n[28]===Symbol.for(`react.memo_cache_sentinel`)?(Y=(0,w.jsx)(re,{tabIndex:-1,children:se(`cell.cellActions`)}),n[28]=Y):Y=n[28];let X=!y&&Y,Z;n[29]===r?Z=n[30]:(Z=(0,w.jsx)(ie,{ref:D,children:(0,w.jsx)(f,{className:`flex`,children:r})}),n[29]=r,n[30]=Z);let Q;n[31]!==X||n[32]!==Z?(Q=(0,w.jsxs)(ne,{delayDuration:200,disableHoverableContent:!0,children:[X,Z]}),n[31]=X,n[32]=Z,n[33]=Q):Q=n[33];let $;return n[34]!==J||n[35]!==I||n[36]!==y||n[37]!==Q?($=(0,w.jsxs)(d,{open:y,onOpenChange:I,children:[Q,J]}),n[34]=J,n[35]=I,n[36]=y,n[37]=Q,n[38]=$):$=n[38],$})),E=C.memo(e=>{let t=(0,S.c)(5),{children:n,cellId:i}=e,a;t[0]===i?a=t[1]:(a=l(i),t[0]=i,t[1]=a);let o=r(a);if(!o)return null;let s;return t[2]!==n||t[3]!==o?(s=(0,w.jsx)(T,{showTooltip:!1,...o,children:n}),t[2]=n,t[3]=o,t[4]=s):s=t[4],s});E.displayName=`ConnectionCellActionsDropdown`;function D(e){return!e.redundant}function O(e){return e.filter(D)}function k(e){return e.length>0}function A(e){return!e}var j=n(`minimap`);function M(){let e=(0,S.c)(3),[n,r]=t(j),i;return e[0]!==n||e[1]!==r?(i={dependencyPanelTab:n,setDependencyPanelTab:r},e[0]=n,e[1]=r,e[2]=i):i=e[2],i}function N(){return a(j)}export{E as i,N as n,T as r,M as t};
1
+ import{a as e}from"./rolldown-runtime-B0Z9INg1.js";import{c as t,f as n,l as r,t as i,u as a}from"./useEvent-Dfcbgjhg.js";import{t as o}from"./react-DVplv7_D.js";import{Cn as s,Fn as c,K as ee,Pt as l,_n as u,cn as d,dn as f,fn as p,gn as m,hn as h,mn as g,un as _,yn as v}from"./cells-CDwPlSdp.js";import{t as y}from"./compiler-runtime-BrajqUja.js";import{t as b}from"./cn-ldLVeaqm.js";import{t as x}from"./jsx-runtime-B74pBk57.js";import{t as te}from"./use-restore-focus-BxEGwIbk.js";import{a as ne,n as re,o as ie,t as ae}from"./tooltip-C9TuY18o.js";import{t as oe}from"./useCellActionButton-DP91E5bD.js";import{a as se,i as ce}from"./renderShortcut-C1JwYcqW.js";var S=y(),C=e(o(),1),w=x(),T=C.memo(C.forwardRef((e,t)=>{let n=(0,S.c)(39),{children:r,showTooltip:a,...o}=e,l=a===void 0||a,[y,x]=(0,C.useState)(!1),T;n[0]===Symbol.for(`react.memo_cache_sentinel`)?(T=()=>x(!1),n[0]=T):T=n[0];let E=T,D=(0,C.useRef)(null),j=oe({cell:o,closePopover:E}).map(O).filter(k),M=te(),N;n[1]===Symbol.for(`react.memo_cache_sentinel`)?(N=()=>{ee(()=>{D.current&&D.current.scrollIntoView({behavior:`auto`,block:`nearest`})})},n[1]=N):N=n[1];let P=i(N),F;n[2]===P?F=n[3]:(F=e=>{x(t=>{let n=typeof e==`function`?e(t):e;return n&&P(),n})},n[2]=P,n[3]=F);let I=i(F),L;n[4]===I?L=n[5]:(L=()=>({toggle:()=>I(A)}),n[4]=I,n[5]=L),(0,C.useImperativeHandle)(t,L);let R=_,z=p,B=c(o.cellId),V;n[6]===B?V=n[7]:(V=(0,w.jsx)(m,{placeholder:`Search actions...`,className:`h-6 m-1`,...B}),n[6]=B,n[7]=V);let H=s,U;n[8]===Symbol.for(`react.memo_cache_sentinel`)?(U=(0,w.jsx)(g,{children:`No results`}),n[8]=U):U=n[8];let W=j.map((e,t)=>(0,w.jsxs)(C.Fragment,{children:[(0,w.jsx)(h,{children:e.map(e=>{let t=(0,w.jsxs)(`div`,{className:`flex items-center flex-1`,children:[e.icon&&(0,w.jsx)(`div`,{className:`mr-2 w-5 text-muted-foreground`,children:e.icon}),(0,w.jsx)(`div`,{className:`flex-1`,children:e.label}),(0,w.jsxs)(`div`,{className:`shrink-0 text-sm`,children:[e.hotkey&&ce(e.hotkey),e.rightElement]})]});return e.tooltip&&(t=(0,w.jsx)(ae,{content:e.tooltip,delayDuration:100,children:t})),(0,w.jsx)(u,{className:b(e.disabled&&`opacity-50!`),onSelect:()=>{e.disableClick||e.disabled||(e.handle(),x(!1))},variant:e.variant,children:t},e.label)})},t),t<j.length-1&&(0,w.jsx)(v,{})]},t)),G;n[9]!==H||n[10]!==U||n[11]!==W?(G=(0,w.jsxs)(H,{children:[U,W]}),n[9]=H,n[10]=U,n[11]=W,n[12]=G):G=n[12];let K;n[13]!==z||n[14]!==G||n[15]!==V?(K=(0,w.jsxs)(z,{children:[V,G]}),n[13]=z,n[14]=G,n[15]=V,n[16]=K):K=n[16];let q;n[17]!==R||n[18]!==M||n[19]!==K?(q=(0,w.jsx)(R,{className:`w-[300px] p-0 pt-1 overflow-auto`,scrollable:!0,...M,children:K}),n[17]=R,n[18]=M,n[19]=K,n[20]=q):q=n[20];let J=q;if(!l){let e;n[21]===r?e=n[22]:(e=(0,w.jsx)(f,{asChild:!0,children:r}),n[21]=r,n[22]=e);let t;return n[23]!==J||n[24]!==I||n[25]!==y||n[26]!==e?(t=(0,w.jsxs)(d,{open:y,onOpenChange:I,children:[e,J]}),n[23]=J,n[24]=I,n[25]=y,n[26]=e,n[27]=t):t=n[27],t}let Y;n[28]===Symbol.for(`react.memo_cache_sentinel`)?(Y=(0,w.jsx)(re,{tabIndex:-1,children:se(`cell.cellActions`)}),n[28]=Y):Y=n[28];let X=!y&&Y,Z;n[29]===r?Z=n[30]:(Z=(0,w.jsx)(ie,{ref:D,children:(0,w.jsx)(f,{className:`flex`,children:r})}),n[29]=r,n[30]=Z);let Q;n[31]!==X||n[32]!==Z?(Q=(0,w.jsxs)(ne,{delayDuration:200,disableHoverableContent:!0,children:[X,Z]}),n[31]=X,n[32]=Z,n[33]=Q):Q=n[33];let $;return n[34]!==J||n[35]!==I||n[36]!==y||n[37]!==Q?($=(0,w.jsxs)(d,{open:y,onOpenChange:I,children:[Q,J]}),n[34]=J,n[35]=I,n[36]=y,n[37]=Q,n[38]=$):$=n[38],$})),E=C.memo(e=>{let t=(0,S.c)(5),{children:n,cellId:i}=e,a;t[0]===i?a=t[1]:(a=l(i),t[0]=i,t[1]=a);let o=r(a);if(!o)return null;let s;return t[2]!==n||t[3]!==o?(s=(0,w.jsx)(T,{showTooltip:!1,...o,children:n}),t[2]=n,t[3]=o,t[4]=s):s=t[4],s});E.displayName=`ConnectionCellActionsDropdown`;function D(e){return!e.redundant}function O(e){return e.filter(D)}function k(e){return e.length>0}function A(e){return!e}var j=n(`minimap`);function M(){let e=(0,S.c)(3),[n,r]=t(j),i;return e[0]!==n||e[1]!==r?(i={dependencyPanelTab:n,setDependencyPanelTab:r},e[0]=n,e[1]=r,e[2]=i):i=e[2],i}function N(){return a(j)}export{E as i,N as n,T as r,M as t};
@@ -1 +1 @@
1
- import{a as e}from"./rolldown-runtime-B0Z9INg1.js";import{f as t,u as n}from"./useEvent-Dfcbgjhg.js";import{t as r}from"./react-DVplv7_D.js";import{E as i,v as a}from"./config-BtRLgrlt.js";import{t as o}from"./compiler-runtime-BrajqUja.js";import{g as s}from"./useEventListener-D9cftcHj.js";import{t as c}from"./jsx-runtime-B74pBk57.js";import{o as l}from"./alert-dialog-BaPGzeOK.js";import{n as u}from"./toast-BGzLGnvw.js";import{b as d}from"./write-secret-modal-DzKAInL2.js";import{t as f}from"./use-toast-Wu434mLr.js";import{r as p}from"./requests-lt0JK8Jt.js";import{t as m}from"./kbd-pdKBv96t.js";var h=e(r(),1),g=o();function _(){try{window.location.reload()}catch(e){s.error(`Failed to reload page`,e),f({title:`Failed to reload page`,description:`Please refresh the page manually.`})}}var v=t(null),y=`packages-install-input`,b=()=>{requestAnimationFrame(()=>{let e=document.getElementById(y);e&&e.focus()})},x=e=>{e.openApplication(`packages`),b()},S=c();function C(){let e=(0,g.c)(4),{openConfirm:t}=d(),r=n(a),{sendRestart:o}=p(),s;return e[0]!==t||e[1]!==o||e[2]!==r?(s=()=>{t({title:`Restart Kernel`,description:`This will restart the Python kernel. You'll lose all data that's in memory. You will also lose any unsaved changes, so make sure to save your work before restarting.`,variant:`destructive`,confirmAction:(0,S.jsx)(l,{onClick:async()=>{r({state:i.CLOSING}),await o(),_()},"aria-label":`Confirm Restart`,children:`Restart`})})},e[0]=t,e[1]=o,e[2]=r,e[3]=s):s=e[3],s}var w=`Your dependency changes are saved. Restart the kernel to use the updated environment. Restarting clears in-memory variables.`,T=()=>{let e=(0,g.c)(2),t=C(),n;return e[0]===t?n=e[1]:(n=(0,S.jsx)(u,{altText:`Restart the kernel to use the updated dependencies`,onClick:t,children:`Restart Kernel`}),e[0]=t,e[1]=n),n},E=()=>{f({title:`Changes saved — restart required`,description:w,duration:1/0,action:(0,S.jsx)(T,{})})},D=()=>{f({title:`Sandbox environment synced`,description:(0,S.jsx)(`div`,{className:`text-xs text-muted-foreground`,children:`Some Python packages may require a kernel restart to see changes.`})})},O=(e,t)=>{let n=Array.isArray(e)?e:[e];f(t?{title:n.length>1?`Failed to add packages`:`Failed to add package`,description:t,variant:`danger`}:{title:n.length>1?`Packages added`:`Package added`,description:(0,S.jsxs)(`div`,{children:[(0,S.jsxs)(`div`,{children:[n.length>1?`The packages `:`The package `,n.map((e,t)=>(0,S.jsxs)(`span`,{children:[t>0&&`, `,(0,S.jsx)(m,{className:`inline`,children:e})]},e)),` `,`and `,n.length>1?`their`:`its`,` dependencies have been added to your environment.`]}),(0,S.jsx)(`div`,{className:`text-xs text-muted-foreground mt-1`,children:`Some Python packages may require a kernel restart to see changes.`})]})})},k=(e,t)=>{f(t?{title:`Failed to upgrade package`,description:t,variant:`danger`}:{title:`Package upgraded`,description:(0,S.jsxs)(`div`,{children:[(0,S.jsxs)(`div`,{children:[`The package `,(0,S.jsx)(m,{className:`inline`,children:e}),` has been upgraded.`]}),(0,S.jsx)(`div`,{className:`text-xs text-muted-foreground mt-1`,children:`Some Python packages may require a kernel restart to see changes.`})]})})},A=(e,t)=>{f(t?{title:`Failed to remove package`,description:t,variant:`danger`}:{title:`Package removed`,description:(0,S.jsxs)(`div`,{children:[(0,S.jsxs)(`div`,{children:[`The package `,(0,S.jsx)(m,{className:`inline`,children:e}),` has been removed from your environment.`]}),(0,S.jsx)(`div`,{className:`text-xs text-muted-foreground mt-1`,children:`Some Python packages may require a kernel restart to see changes.`})]})})};function j(){let[e,t]=(0,h.useState)(!1),{addPackage:n}=p();return{loading:e,handleInstallPackages:async(e,r)=>{t(!0);try{let t=await n({package:e.join(` `)});t.restartRequired?E():t.success?(O(e),r?.()):O(e,t.error)}catch(e){s.error(e)}finally{t(!1)}}}}export{D as a,y as c,v as d,_ as f,A as i,b as l,w as n,k as o,E as r,C as s,j as t,x as u};
1
+ import{a as e}from"./rolldown-runtime-B0Z9INg1.js";import{f as t,u as n}from"./useEvent-Dfcbgjhg.js";import{t as r}from"./react-DVplv7_D.js";import{E as i,v as a}from"./config-BHq_PhD6.js";import{t as o}from"./compiler-runtime-BrajqUja.js";import{g as s}from"./useEventListener-D9cftcHj.js";import{t as c}from"./jsx-runtime-B74pBk57.js";import{o as l}from"./alert-dialog-BaPGzeOK.js";import{n as u}from"./toast-BGzLGnvw.js";import{b as d}from"./write-secret-modal-DzKAInL2.js";import{t as f}from"./use-toast-Wu434mLr.js";import{r as p}from"./requests-lt0JK8Jt.js";import{t as m}from"./kbd-pdKBv96t.js";var h=e(r(),1),g=o();function _(){try{window.location.reload()}catch(e){s.error(`Failed to reload page`,e),f({title:`Failed to reload page`,description:`Please refresh the page manually.`})}}var v=t(null),y=`packages-install-input`,b=()=>{requestAnimationFrame(()=>{let e=document.getElementById(y);e&&e.focus()})},x=e=>{e.openApplication(`packages`),b()},S=c();function C(){let e=(0,g.c)(4),{openConfirm:t}=d(),r=n(a),{sendRestart:o}=p(),s;return e[0]!==t||e[1]!==o||e[2]!==r?(s=()=>{t({title:`Restart Kernel`,description:`This will restart the Python kernel. You'll lose all data that's in memory. You will also lose any unsaved changes, so make sure to save your work before restarting.`,variant:`destructive`,confirmAction:(0,S.jsx)(l,{onClick:async()=>{r({state:i.CLOSING}),await o(),_()},"aria-label":`Confirm Restart`,children:`Restart`})})},e[0]=t,e[1]=o,e[2]=r,e[3]=s):s=e[3],s}var w=`Your dependency changes are saved. Restart the kernel to use the updated environment. Restarting clears in-memory variables.`,T=()=>{let e=(0,g.c)(2),t=C(),n;return e[0]===t?n=e[1]:(n=(0,S.jsx)(u,{altText:`Restart the kernel to use the updated dependencies`,onClick:t,children:`Restart Kernel`}),e[0]=t,e[1]=n),n},E=()=>{f({title:`Changes saved — restart required`,description:w,duration:1/0,action:(0,S.jsx)(T,{})})},D=()=>{f({title:`Sandbox environment synced`,description:(0,S.jsx)(`div`,{className:`text-xs text-muted-foreground`,children:`Some Python packages may require a kernel restart to see changes.`})})},O=(e,t)=>{let n=Array.isArray(e)?e:[e];f(t?{title:n.length>1?`Failed to add packages`:`Failed to add package`,description:t,variant:`danger`}:{title:n.length>1?`Packages added`:`Package added`,description:(0,S.jsxs)(`div`,{children:[(0,S.jsxs)(`div`,{children:[n.length>1?`The packages `:`The package `,n.map((e,t)=>(0,S.jsxs)(`span`,{children:[t>0&&`, `,(0,S.jsx)(m,{className:`inline`,children:e})]},e)),` `,`and `,n.length>1?`their`:`its`,` dependencies have been added to your environment.`]}),(0,S.jsx)(`div`,{className:`text-xs text-muted-foreground mt-1`,children:`Some Python packages may require a kernel restart to see changes.`})]})})},k=(e,t)=>{f(t?{title:`Failed to upgrade package`,description:t,variant:`danger`}:{title:`Package upgraded`,description:(0,S.jsxs)(`div`,{children:[(0,S.jsxs)(`div`,{children:[`The package `,(0,S.jsx)(m,{className:`inline`,children:e}),` has been upgraded.`]}),(0,S.jsx)(`div`,{className:`text-xs text-muted-foreground mt-1`,children:`Some Python packages may require a kernel restart to see changes.`})]})})},A=(e,t)=>{f(t?{title:`Failed to remove package`,description:t,variant:`danger`}:{title:`Package removed`,description:(0,S.jsxs)(`div`,{children:[(0,S.jsxs)(`div`,{children:[`The package `,(0,S.jsx)(m,{className:`inline`,children:e}),` has been removed from your environment.`]}),(0,S.jsx)(`div`,{className:`text-xs text-muted-foreground mt-1`,children:`Some Python packages may require a kernel restart to see changes.`})]})})};function j(){let[e,t]=(0,h.useState)(!1),{addPackage:n}=p();return{loading:e,handleInstallPackages:async(e,r)=>{t(!0);try{let t=await n({package:e.join(` `)});t.restartRequired?E():t.success?(O(e),r?.()):O(e,t.error)}catch(e){s.error(e)}finally{t(!1)}}}}export{D as a,y as c,v as d,_ as f,A as i,b as l,w as n,k as o,E as r,C as s,j as t,x as u};