streamlit-nightly 1.53.2.dev20260203__py3-none-any.whl → 1.54.1.dev20260204__py3-none-any.whl

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 (127) hide show
  1. streamlit/elements/arrow.py +66 -26
  2. streamlit/elements/lib/built_in_chart_utils.py +1 -1
  3. streamlit/elements/lib/column_config_utils.py +4 -4
  4. streamlit/elements/lib/options_selector_utils.py +4 -0
  5. streamlit/elements/lib/pandas_styler_utils.py +22 -22
  6. streamlit/elements/widgets/button_group.py +221 -86
  7. streamlit/elements/widgets/data_editor.py +9 -9
  8. streamlit/elements/widgets/radio.py +8 -4
  9. streamlit/hello/dataframe_demo.py +1 -1
  10. streamlit/proto/ArrowData_pb2.py +5 -3
  11. streamlit/proto/ArrowData_pb2.pyi +44 -4
  12. streamlit/proto/ArrowNamedDataSet_pb2.py +4 -4
  13. streamlit/proto/ArrowNamedDataSet_pb2.pyi +3 -3
  14. streamlit/proto/ArrowVegaLiteChart_pb2.py +4 -4
  15. streamlit/proto/ArrowVegaLiteChart_pb2.pyi +3 -3
  16. streamlit/proto/ButtonGroup_pb2.py +8 -8
  17. streamlit/proto/ButtonGroup_pb2.pyi +9 -7
  18. streamlit/proto/Dataframe_pb2.py +31 -0
  19. streamlit/proto/{Arrow_pb2.pyi → Dataframe_pb2.pyi} +39 -102
  20. streamlit/proto/Element_pb2.py +5 -4
  21. streamlit/proto/Element_pb2.pyi +11 -10
  22. streamlit/proto/Table_pb2.py +29 -0
  23. streamlit/proto/Table_pb2.pyi +83 -0
  24. streamlit/static/index.html +1 -1
  25. streamlit/static/manifest.json +308 -308
  26. streamlit/static/static/js/{ErrorOutline.esm.C9uHPmIj.js → ErrorOutline.esm.DWBqsdHn.js} +1 -1
  27. streamlit/static/static/js/{FileDownload.esm.D-YPxF3t.js → FileDownload.esm.D5koxJhf.js} +1 -1
  28. streamlit/static/static/js/{FileHelper.DQSH0zYW.js → FileHelper.kJKftfu4.js} +5 -5
  29. streamlit/static/static/js/{FormClearHelper.DQoXcOWo.js → FormClearHelper.CyGGPn10.js} +1 -1
  30. streamlit/static/static/js/{InputInstructions.C7VMyGT7.js → InputInstructions.oezYb8Lm.js} +1 -1
  31. streamlit/static/static/js/{Particles.BdQSRZde.js → Particles.BIpBmEwi.js} +1 -1
  32. streamlit/static/static/js/{ProgressBar.DNF_pWKr.js → ProgressBar.BRAS_FJc.js} +1 -1
  33. streamlit/static/static/js/{StreamlitSyntaxHighlighter.Cys9Bt18.js → StreamlitSyntaxHighlighter.c2qcx-xG.js} +1 -1
  34. streamlit/static/static/js/{TableChart.esm.B9SMgSK4.js → TableChart.esm.BuemQLVW.js} +1 -1
  35. streamlit/static/static/js/{Toolbar.BXfC9Z-W.js → Toolbar.mUe2Nmta.js} +1 -1
  36. streamlit/static/static/js/{WidgetLabelHelpIconInline.gkreC55g.js → WidgetLabelHelpIconInline.if89y2mu.js} +1 -1
  37. streamlit/static/static/js/{base-input.iB32RS3w.js → base-input.AJ4KxBTh.js} +1 -1
  38. streamlit/static/static/js/{checkbox.Bqz68SYq.js → checkbox.GY4JoJkM.js} +1 -1
  39. streamlit/static/static/js/{createDownloadLinkElement.YxVC9Qur.js → createDownloadLinkElement.BWJh90jh.js} +1 -1
  40. streamlit/static/static/js/{data-grid-overlay-editor.sBsdk5Xg.js → data-grid-overlay-editor.C9AINtRf.js} +1 -1
  41. streamlit/static/static/js/{downloader.Bzxqt3AW.js → downloader.BZY8OE4f.js} +1 -1
  42. streamlit/static/static/js/{embed.CDzakah3.js → embed.BjO7Ez0y.js} +1 -1
  43. streamlit/static/static/js/{es6.CxCc4bfn.js → es6.eb5oR8iN.js} +2 -2
  44. streamlit/static/static/js/{formatNumber.L8T7D36k.js → formatNumber.CCeQsvJQ.js} +1 -1
  45. streamlit/static/static/js/{iconPosition.C47DkA-1.js → iconPosition.D6eEnKvO.js} +1 -1
  46. streamlit/static/static/js/{iframeResizer.contentWindow.uEFLXEg3.js → iframeResizer.contentWindow.DTsWJRTo.js} +1 -1
  47. streamlit/static/static/js/{index.C6dhwBSe.js → index.B6l4FdUv.js} +1 -1
  48. streamlit/static/static/js/{index.BV_YgIHe.js → index.B7H2q9vo.js} +2 -2
  49. streamlit/static/static/js/{index.DjgdCvlK.js → index.BDdmrM58.js} +1 -1
  50. streamlit/static/static/js/{index.CAbQaUvi.js → index.BMbQnwRD.js} +1 -1
  51. streamlit/static/static/js/{index.CCLteRW6.js → index.BQ5MOzHu.js} +1 -1
  52. streamlit/static/static/js/{index.CzwJzgQs.js → index.BSgo_bkv.js} +1 -1
  53. streamlit/static/static/js/{index.B60AZFRh.js → index.BU5M9DsN.js} +1 -1
  54. streamlit/static/static/js/{index.BVTW_o-a.js → index.BYIxnU34.js} +1 -1
  55. streamlit/static/static/js/{index.DqhZqWYB.js → index.BZL2hIBz.js} +1 -1
  56. streamlit/static/static/js/{index.CAbafj7s.js → index.BZVrJlnq.js} +1 -1
  57. streamlit/static/static/js/{index.Ck0ZkOfK.js → index.Bd7QK46M.js} +1 -1
  58. streamlit/static/static/js/{index.BzdcdLDK.js → index.BfHA_i34.js} +1 -1
  59. streamlit/static/static/js/{index.kBgXO7Vv.js → index.Bgry-Ek_.js} +1 -1
  60. streamlit/static/static/js/{index.aZRhdEuX.js → index.Bi25zaXA.js} +1 -1
  61. streamlit/static/static/js/{index.QXukCzoh.js → index.Bj3M1xBC.js} +1 -1
  62. streamlit/static/static/js/{index.Bnwh8oZr.js → index.Bjrvlqx5.js} +6 -6
  63. streamlit/static/static/js/{index.h2N-W51I.js → index.BnOSeM5K.js} +1 -1
  64. streamlit/static/static/js/index.BoL6J1jK.js +2 -0
  65. streamlit/static/static/js/{index.BwvxzVOo.js → index.BoORyxOa.js} +1 -1
  66. streamlit/static/static/js/{index.Ba8L-ulI.js → index.Bpd7GPeH.js} +1 -1
  67. streamlit/static/static/js/{index.BG4RxMOI.js → index.BpeJX018.js} +1 -1
  68. streamlit/static/static/js/index.BriH7JVk.js +2 -0
  69. streamlit/static/static/js/{index.DO55kRo5.js → index.BwkeObMo.js} +1 -1
  70. streamlit/static/static/js/{index.C1d2QjTR.js → index.C0o85qmd.js} +1 -1
  71. streamlit/static/static/js/{index.D7L9gHlE.js → index.C7_wNJTH.js} +1 -1
  72. streamlit/static/static/js/{index.BwTkGOAy.js → index.CGZP_w9b.js} +1 -1
  73. streamlit/static/static/js/{index.CjBDVb1a.js → index.CGw52-0-.js} +1 -1
  74. streamlit/static/static/js/{index.D_cvtSlg.js → index.CUvtJj0a.js} +1 -1
  75. streamlit/static/static/js/{index.Dtbj_oyb.js → index.Cfx1ZHWt.js} +1 -1
  76. streamlit/static/static/js/{index.BvHsyiyy.js → index.Chl2kALe.js} +1 -1
  77. streamlit/static/static/js/index.Crlx_wdE.js +1 -0
  78. streamlit/static/static/js/{index.B_LfkwqU.js → index.D9A-8ebQ.js} +1 -1
  79. streamlit/static/static/js/{index.BHyzKS4e.js → index.DBIoNOen.js} +7 -7
  80. streamlit/static/static/js/{index.DgqmsDCJ.js → index.DMKTAe4F.js} +1 -1
  81. streamlit/static/static/js/{index.DEKnCsY-.js → index.DNrpqKVt.js} +1 -1
  82. streamlit/static/static/js/{index.BsrhCS7f.js → index.DSRvF_8e.js} +1 -1
  83. streamlit/static/static/js/{index.DN_oudQl.js → index.DhB1m_xG.js} +1 -1
  84. streamlit/static/static/js/{index.XJY9qZ6a.js → index.DiES30vM.js} +1 -1
  85. streamlit/static/static/js/{index.DHrByikW.js → index.DlJ4Y1xc.js} +1 -1
  86. streamlit/static/static/js/{index.C5-TpWis.js → index.J61yByUR.js} +1 -1
  87. streamlit/static/static/js/{index.iUHLeAvv.js → index.JxDTXE8N.js} +1 -1
  88. streamlit/static/static/js/{index.C1uZrWog.js → index.KGr28TP8.js} +1 -1
  89. streamlit/static/static/js/{index.BuJPJSD7.js → index.Pgm3rRpH.js} +1 -1
  90. streamlit/static/static/js/{index.fUsWkW8E.js → index.XzcYOc9I.js} +1 -1
  91. streamlit/static/static/js/{index.CQ713nQM.js → index.Z_u7ZS4h.js} +1 -1
  92. streamlit/static/static/js/{index.D-9VyyiA.js → index.hDg7x0Tp.js} +1 -1
  93. streamlit/static/static/js/{index.D2R3Co5f.js → index.k7p0hmaU.js} +1 -1
  94. streamlit/static/static/js/{index.Bh5BZaHG.js → index.syoxWolF.js} +1 -1
  95. streamlit/static/static/js/{index.kEL0HsUR.js → index.xZ651bTg.js} +1 -1
  96. streamlit/static/static/js/{input.BCHJn1Cw.js → input.C-PwAMG6.js} +1 -1
  97. streamlit/static/static/js/{main.23ZP6f1E.js → main.fMmyxXOf.js} +1 -1
  98. streamlit/static/static/js/{memory.D8f8Q4mO.js → memory.BG__eDEj.js} +1 -1
  99. streamlit/static/static/js/{number-overlay-editor.ZWvSpjJ5.js → number-overlay-editor.C0n-91sR.js} +1 -1
  100. streamlit/static/static/js/{pandasStylerUtils.DlZ2GBs_.js → pandasStylerUtils.BqWaUzvh.js} +1 -1
  101. streamlit/static/static/js/{sandbox.BH6D3KL9.js → sandbox.CHhc-txg.js} +1 -1
  102. streamlit/static/static/js/{sprintfjs.CtrdaGLQ.js → sprintfjs.BlFBKfMf.js} +1 -1
  103. streamlit/static/static/js/{styled-components.iD1HRMLc.js → styled-components.D5uOQqN2.js} +1 -1
  104. streamlit/static/static/js/{throttle.DR7d9vp_.js → throttle.DlZC3xNA.js} +1 -1
  105. streamlit/static/static/js/{timepicker.Bd34xjcG.js → timepicker._TfRUaDL.js} +1 -1
  106. streamlit/static/static/js/{toConsumableArray.BDTTq1c5.js → toConsumableArray.CZW4AmuW.js} +1 -1
  107. streamlit/static/static/js/uniqueId.CTTDAAaF.js +1 -0
  108. streamlit/static/static/js/{useBasicWidgetState.BXKaD8DQ.js → useBasicWidgetState.Bx27912z.js} +1 -1
  109. streamlit/static/static/js/{useIntlLocale.CysOvegI.js → useIntlLocale.DsOvysl7.js} +1 -1
  110. streamlit/static/static/js/{useTextInputAutoExpand.CVd5Hf2S.js → useTextInputAutoExpand.C9g8px1W.js} +1 -1
  111. streamlit/static/static/js/{useUpdateUiValue.CIUgfO8X.js → useUpdateUiValue.fF-Cntkp.js} +1 -1
  112. streamlit/static/static/js/{useWaveformController.CDLqlnLv.js → useWaveformController.C5EtFoJE.js} +1 -1
  113. streamlit/static/static/js/{withCalculatedWidth.Ce1Zblb2.js → withCalculatedWidth.CcvaXQb0.js} +1 -1
  114. streamlit/static/static/js/{withFullScreenWrapper.DBm7N75M.js → withFullScreenWrapper.DP61hzLF.js} +1 -1
  115. streamlit/testing/v1/element_tree.py +20 -15
  116. streamlit/web/server/routes.py +14 -0
  117. streamlit/web/server/server.py +4 -0
  118. {streamlit_nightly-1.53.2.dev20260203.dist-info → streamlit_nightly-1.54.1.dev20260204.dist-info}/METADATA +1 -1
  119. {streamlit_nightly-1.53.2.dev20260203.dist-info → streamlit_nightly-1.54.1.dev20260204.dist-info}/RECORD +122 -120
  120. streamlit/proto/Arrow_pb2.py +0 -34
  121. streamlit/static/static/js/index.B3zULhHv.js +0 -1
  122. streamlit/static/static/js/index.BrZtYm2A.js +0 -2
  123. streamlit/static/static/js/index.CcBYyLfq.js +0 -2
  124. streamlit/static/static/js/uniqueId.Bd_Iuzvc.js +0 -1
  125. {streamlit_nightly-1.53.2.dev20260203.dist-info → streamlit_nightly-1.54.1.dev20260204.dist-info}/WHEEL +0 -0
  126. {streamlit_nightly-1.53.2.dev20260203.dist-info → streamlit_nightly-1.54.1.dev20260204.dist-info}/entry_points.txt +0 -0
  127. {streamlit_nightly-1.53.2.dev20260203.dist-info → streamlit_nightly-1.54.1.dev20260204.dist-info}/top_level.txt +0 -0
@@ -1,5 +1,5 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./data-grid-overlay-editor.sBsdk5Xg.js","./index.BHyzKS4e.js","../css/index.C8MrxwGF.css","./withFullScreenWrapper.DBm7N75M.js","./Toolbar.BXfC9Z-W.js","./FormClearHelper.DQoXcOWo.js","./moment.C7qA8nIE.js","./pandasStylerUtils.DlZ2GBs_.js","./numbro.B9_PXfzp.js","./_baseIndexOf.BTknn6Gb.js","./index.8HslT92O.js","./main.23ZP6f1E.js","./throttle.DR7d9vp_.js","./toConsumableArray.BDTTq1c5.js","./formatNumber.L8T7D36k.js","./sprintfjs.CtrdaGLQ.js","./formatMoment.C6Hwn6X5.js","./checkbox.Bqz68SYq.js","./createDownloadLinkElement.YxVC9Qur.js","./FileDownload.esm.D-YPxF3t.js","./_arrayIncludes.B19Iyn2B.js","./number-overlay-editor.ZWvSpjJ5.js","./es6.CxCc4bfn.js"])))=>i.map(i=>d[i]);
2
- import{at as Ya,dh as lh,di as sh,cO as gc,dj as uh,dk as ch,dl as dh,dm as fh,dn as hh,dp as gh,dq as Xa,dr as pc,a_ as ph,a$ as mh,r as f,E as Pl,_ as Ve,G as ja,an as mo,bH as vh,ds as bh,aD as zt,dt as wh,N as kr,du as Os,aR as Ll,J as yh,e as Ee,bI as mc,n as ct,dv as Ch,j as Ie,dw as Sh,z as Fn,dx as rr,db as ur,dy as Le,dz as Fe,d0 as _o,cY as xh,al as vc,dA as bc,a3 as kh,cZ as Mh,c_ as Rh,c$ as Ih,d2 as Eh,bx as wc,ac as en,bA as Th,af as Dh,dB as Oh,dC as Ph,m as vo,b8 as bi,dD as Lh,aS as Fh,dE as _h,dF as yc,ci as Ah,cg as Hh,dG as Cc,dH as zh,dI as Vh,cf as Sc,cj as $h,dJ as Nh,ce as Bh,dK as Wh,by as Uh,bz as Gh,cl as Yh,dL as Xh,O as jh,dM as qh,cm as Kh,dN as Zh,Q as Jh,l as Ur,M as Xt,V as Fl,d4 as Qh,dO as eg,dP as tg,bC as qa,bW as ng,$ as xc,ay as wa,dQ as kc,o as pn,Y as Gn,aM as ya,aK as rg,aL as Mc,dR as ig,q as og,W as Ps,dS as ag,dT as lg,k as sg,L as ug,dU as cg,s as Ls}from"./index.BHyzKS4e.js";import{w as dg,E as fg}from"./withFullScreenWrapper.DBm7N75M.js";import{T as hg,a as mi}from"./Toolbar.BXfC9Z-W.js";import{u as gg}from"./FormClearHelper.DQoXcOWo.js";import{h as $r}from"./moment.C7qA8nIE.js";import{r as pg,m as Fs,f as vl,c as mg,a as vg}from"./pandasStylerUtils.DlZ2GBs_.js";import{n as bg}from"./numbro.B9_PXfzp.js";import{l as Ka}from"./index.8HslT92O.js";import{R as wg}from"./main.23ZP6f1E.js";import{d as Rc,t as yg}from"./throttle.DR7d9vp_.js";import{_ as Mi,C as Cg}from"./toConsumableArray.BDTTq1c5.js";import{f as ra}from"./formatNumber.L8T7D36k.js";import{f as _s}from"./formatMoment.C6Hwn6X5.js";import{L as Sg,a as xg,S as kg}from"./checkbox.Bqz68SYq.js";import{c as Mg}from"./createDownloadLinkElement.YxVC9Qur.js";import{D as Rg,F as Ig}from"./FileDownload.esm.D-YPxF3t.js";import{a as Eg}from"./_arrayIncludes.B19Iyn2B.js";function Tg(){}function Dg(e,t,n){return e===e&&(n!==void 0&&(e=e<=n?e:n),t!==void 0&&(e=e>=t?e:t)),e}function Vn(e,t,n){return n===void 0&&(n=t,t=void 0),n!==void 0&&(n=Ya(n),n=n===n?n:0),t!==void 0&&(t=Ya(t),t=t===t?t:0),Dg(Ya(e),t,n)}var Og=Object.prototype,Pg=Og.hasOwnProperty;function Lg(e,t){return e!=null&&Pg.call(e,t)}function Fg(e,t){return e!=null&&lh(e,t,Lg)}var _g="[object Map]",Ag="[object Set]",Hg=Object.prototype,zg=Hg.hasOwnProperty;function Vg(e){if(e==null)return!0;if(sh(e)&&(gc(e)||typeof e=="string"||typeof e.splice=="function"||uh(e)||ch(e)||dh(e)))return!e.length;var t=fh(e);if(t==_g||t==Ag)return!e.size;if(hh(e))return!gh(e).length;for(var n in e)if(zg.call(e,n))return!1;return!0}var $g=1/0,Ng=Xa&&1/pc(new Xa([,-0]))[1]==$g?function(e){return new Xa(e)}:Tg,Bg=200;function Wg(e,t,n){var r=-1,i=Eg,o=e.length,s=!0,a=[],l=a;if(o>=Bg){var u=Ng(e);if(u)return pc(u);s=!1,i=mh,l=new ph}else l=a;e:for(;++r<o;){var c=e[r],d=c;if(c=c!==0?c:0,s&&d===d){for(var g=l.length;g--;)if(l[g]===d)continue e;a.push(c)}else i(l,d,n)||(l!==a&&l.push(d),a.push(c))}return a}function Ug(e){return e&&e.length?Wg(e):[]}var Ic=f.forwardRef(function(e,t){var n={fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"};return f.createElement(Pl,Ve({iconAttrs:n,iconVerticalAlign:"middle",iconViewBox:"0 0 24 24"},e,{ref:t}),f.createElement("path",{fill:"none",d:"M0 0h24v24H0V0z"}),f.createElement("path",{d:"M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z"}))});Ic.displayName="Add";var Ec=f.forwardRef(function(e,t){var n={fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"};return f.createElement(Pl,Ve({iconAttrs:n,iconVerticalAlign:"middle",iconViewBox:"0 0 24 24"},e,{ref:t}),f.createElement("path",{fill:"none",d:"M0 0h24v24H0V0z"}),f.createElement("path",{d:"M15.5 14h-.79l-.28-.27A6.471 6.471 0 0016 9.5 6.5 6.5 0 109.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19l-4.99-5zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14z"}))});Ec.displayName="Search";var Tc=f.forwardRef(function(e,t){var n={fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"};return f.createElement(Pl,Ve({iconAttrs:n,iconVerticalAlign:"middle",iconViewBox:"0 0 24 24"},e,{ref:t}),f.createElement("path",{fill:"none",d:"M0 0h24v24H0V0z"}),f.createElement("path",{d:"M12 6a9.77 9.77 0 018.82 5.5C19.17 14.87 15.79 17 12 17s-7.17-2.13-8.82-5.5A9.77 9.77 0 0112 6m0-2C7 4 2.73 7.11 1 11.5 2.73 15.89 7 19 12 19s9.27-3.11 11-7.5C21.27 7.11 17 4 12 4zm0 5a2.5 2.5 0 010 5 2.5 2.5 0 010-5m0-2c-2.48 0-4.5 2.02-4.5 4.5S9.52 16 12 16s4.5-2.02 4.5-4.5S14.48 7 12 7z"}))});Tc.displayName="Visibility";function Dc(e="This should not happen"){throw new Error(e)}function Pn(e,t="Assertion failed"){if(!e)return Dc(t)}function lo(e,t){return Dc(t??"Hell froze over")}function Gg(e,t){try{return e()}catch{return t}}const As=Object.prototype.hasOwnProperty;function Ii(e,t){let n,r;if(e===t)return!0;if(e&&t&&(n=e.constructor)===t.constructor){if(n===Date)return e.getTime()===t.getTime();if(n===RegExp)return e.toString()===t.toString();if(n===Array){if((r=e.length)===t.length)for(;r--&&Ii(e[r],t[r]););return r===-1}if(!n||typeof e=="object"){r=0;for(n in e)if(As.call(e,n)&&++r&&!As.call(t,n)||!(n in t)||!Ii(e[n],t[n]))return!1;return Object.keys(t).length===r}}return e!==e&&t!==t}const ia=null,_l=void 0;var Z;(function(e){e.Uri="uri",e.Text="text",e.Image="image",e.RowID="row-id",e.Number="number",e.Bubble="bubble",e.Boolean="boolean",e.Loading="loading",e.Markdown="markdown",e.Drilldown="drilldown",e.Protected="protected",e.Custom="custom"})(Z||(Z={}));var Hs;(function(e){e.HeaderRowID="headerRowID",e.HeaderCode="headerCode",e.HeaderNumber="headerNumber",e.HeaderString="headerString",e.HeaderBoolean="headerBoolean",e.HeaderAudioUri="headerAudioUri",e.HeaderVideoUri="headerVideoUri",e.HeaderEmoji="headerEmoji",e.HeaderImage="headerImage",e.HeaderUri="headerUri",e.HeaderPhone="headerPhone",e.HeaderMarkdown="headerMarkdown",e.HeaderDate="headerDate",e.HeaderTime="headerTime",e.HeaderEmail="headerEmail",e.HeaderReference="headerReference",e.HeaderIfThenElse="headerIfThenElse",e.HeaderSingleValue="headerSingleValue",e.HeaderLookup="headerLookup",e.HeaderTextTemplate="headerTextTemplate",e.HeaderMath="headerMath",e.HeaderRollup="headerRollup",e.HeaderJoinStrings="headerJoinStrings",e.HeaderSplitString="headerSplitString",e.HeaderGeoDistance="headerGeoDistance",e.HeaderArray="headerArray",e.RowOwnerOverlay="rowOwnerOverlay",e.ProtectedColumnOverlay="protectedColumnOverlay"})(Hs||(Hs={}));var oa;(function(e){e.Triangle="triangle",e.Dots="dots"})(oa||(oa={}));function Ao(e){return"width"in e&&typeof e.width=="number"}async function zs(e){return typeof e=="object"?e:await e()}function wi(e){return!(e.kind===Z.Loading||e.kind===Z.Bubble||e.kind===Z.RowID||e.kind===Z.Protected||e.kind===Z.Drilldown)}function Si(e){return e.kind===$n.Marker||e.kind===$n.NewRow}function yi(e){if(!wi(e)||e.kind===Z.Image)return!1;switch(e.kind){case Z.Text:case Z.Number:case Z.Markdown:case Z.Uri:case Z.Custom:case Z.Boolean:return e.readonly!==!0;default:lo(e,"A cell was passed with an invalid kind")}}function Yg(e){return Fg(e,"editor")}function Al(e){return!(e.readonly??!1)}var $n;(function(e){e.NewRow="new-row",e.Marker="marker"})($n||($n={}));const aa={shape:"square",size:4,offsetX:-2,offsetY:-2,outline:0};function Za(e){if(e.length===0)return[];const t=[...e],n=[];t.sort(function(r,i){return r[0]-i[0]}),n.push([...t[0]]);for(const r of t.slice(1)){const i=n[n.length-1];i[1]<r[0]?n.push([...r]):i[1]<r[1]&&(i[1]=r[1])}return n}let Vs;class Qe{items;constructor(t){this.items=t}static create=t=>new Qe(Za(t));static empty=()=>Vs??(Vs=new Qe([]));static fromSingleSelection=t=>Qe.empty().add(t);static fromArray=t=>{if(t.length===0)return Qe.empty();const n=t.map(i=>[i,i+1]),r=Za(n);return new Qe(r)};offset(t){if(t===0)return this;const n=this.items.map(r=>[r[0]+t,r[1]+t]);return new Qe(n)}add(t){const n=typeof t=="number"?[t,t+1]:t,r=Za([...this.items,n]);return new Qe(r)}remove(t){const n=[...this.items],r=typeof t=="number"?t:t[0],i=typeof t=="number"?t+1:t[1];for(const[o,s]of n.entries()){const[a,l]=s;if(a<=i&&r<=l){const u=[];a<r&&u.push([a,r]),i<l&&u.push([i,l]),n.splice(o,1,...u)}}return new Qe(n)}first(){if(this.items.length!==0)return this.items[0][0]}last(){if(this.items.length!==0)return this.items.slice(-1)[0][1]-1}hasIndex(t){for(let n=0;n<this.items.length;n++){const[r,i]=this.items[n];if(t>=r&&t<i)return!0}return!1}hasAll(t){for(let n=t[0];n<t[1];n++)if(!this.hasIndex(n))return!1;return!0}some(t){for(const n of this)if(t(n))return!0;return!1}equals(t){if(t===this)return!0;if(t.items.length!==this.items.length)return!1;for(let n=0;n<this.items.length;n++){const r=t.items[n],i=this.items[n];if(r[0]!==i[0]||r[1]!==i[1])return!1}return!0}toArray(){const t=[];for(const[n,r]of this.items)for(let i=n;i<r;i++)t.push(i);return t}get length(){let t=0;for(const[n,r]of this.items)t+=r-n;return t}*[Symbol.iterator](){for(const[t,n]of this.items)for(let r=t;r<n;r++)yield r}}var Xg=function(){const t=Array.prototype.slice.call(arguments).filter(Boolean),n={},r=[];t.forEach(o=>{(o?o.split(" "):[]).forEach(a=>{if(a.startsWith("atm_")){const[,l]=a.split("_");n[l]=a}else r.push(a)})});const i=[];for(const o in n)Object.prototype.hasOwnProperty.call(n,o)&&i.push(n[o]);return i.push(...r),i.join(" ")},$s=Xg,jg=e=>e.toUpperCase()===e,qg=e=>t=>e.indexOf(t)===-1,Oc=(e,t)=>{const n={};return Object.keys(e).filter(qg(t)).forEach(r=>{n[r]=e[r]}),n};function Kg(e,t,n){const r=Oc(t,n);if(!e){const i=typeof ja=="function"?{default:ja}:ja;Object.keys(r).forEach(o=>{i.default(o)||delete r[o]})}return r}var Zg=(e,t)=>{};function Jg(e){let t="";return n=>{const r=(o,s)=>{const{as:a=e,class:l=t}=o,u=n.propsAsIs===void 0?!(typeof a=="string"&&a.indexOf("-")===-1&&!jg(a[0])):n.propsAsIs,c=Kg(u,o,["as","class"]);c.ref=s,c.className=n.atomic?$s(n.class,c.className||l):$s(c.className||l,n.class);const{vars:d}=n;if(d){const g={};for(const m in d){const y=d[m],v=y[0],b=y[1]||"",x=typeof v=="function"?v(o):v;Zg(x,n.name),g[`--${m}`]=`${x}${b}`}const h=c.style||{},p=Object.keys(h);p.length>0&&p.forEach(m=>{g[m]=h[m]}),c.style=g}return e.__wyw_meta&&e!==a?(c.as=a,f.createElement(e,c)):f.createElement(a,c)},i=f.forwardRef?f.forwardRef(r):(o=>{const s=Oc(o,["innerRef"]);return r(s,o.innerRef)});return i.displayName=n.name,i.__wyw_meta={className:n.class||t,extends:e},i}}var dn=Jg;const Qg=dn("div")({name:"ImageOverlayEditorStyle",class:"gdg-i2iowwq",propsAsIs:!1});var Ja={},Wi={},Ho={},zo={},Ns;function ep(){return Ns||(Ns=1,(function(e){(function(t,n){n(e,mo(),vh())})(zo,function(t,n,r){Object.defineProperty(t,"__esModule",{value:!0}),t.setHasSupportToCaptureOption=p;var i=s(n),o=s(r);function s(b){return b&&b.__esModule?b:{default:b}}var a=Object.assign||function(b){for(var x=1;x<arguments.length;x++){var T=arguments[x];for(var k in T)Object.prototype.hasOwnProperty.call(T,k)&&(b[k]=T[k])}return b};function l(b,x){var T={};for(var k in b)x.indexOf(k)>=0||Object.prototype.hasOwnProperty.call(b,k)&&(T[k]=b[k]);return T}function u(b,x){if(!(b instanceof x))throw new TypeError("Cannot call a class as a function")}var c=(function(){function b(x,T){for(var k=0;k<T.length;k++){var R=T[k];R.enumerable=R.enumerable||!1,R.configurable=!0,"value"in R&&(R.writable=!0),Object.defineProperty(x,R.key,R)}}return function(x,T,k){return T&&b(x.prototype,T),k&&b(x,k),x}})();function d(b,x){if(!b)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return x&&(typeof x=="object"||typeof x=="function")?x:b}function g(b,x){if(typeof x!="function"&&x!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof x);b.prototype=Object.create(x&&x.prototype,{constructor:{value:b,enumerable:!1,writable:!0,configurable:!0}}),x&&(Object.setPrototypeOf?Object.setPrototypeOf(b,x):b.__proto__=x)}var h=!1;function p(b){h=b}try{addEventListener("test",null,Object.defineProperty({},"capture",{get:function(){p(!0)}}))}catch{}function m(){var b=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{capture:!0};return h?b:b.capture}function y(b){if("touches"in b){var x=b.touches[0],T=x.pageX,k=x.pageY;return{x:T,y:k}}var R=b.screenX,P=b.screenY;return{x:R,y:P}}var v=(function(b){g(x,b);function x(){var T;u(this,x);for(var k=arguments.length,R=Array(k),P=0;P<k;P++)R[P]=arguments[P];var I=d(this,(T=x.__proto__||Object.getPrototypeOf(x)).call.apply(T,[this].concat(R)));return I._handleSwipeStart=I._handleSwipeStart.bind(I),I._handleSwipeMove=I._handleSwipeMove.bind(I),I._handleSwipeEnd=I._handleSwipeEnd.bind(I),I._onMouseDown=I._onMouseDown.bind(I),I._onMouseMove=I._onMouseMove.bind(I),I._onMouseUp=I._onMouseUp.bind(I),I._setSwiperRef=I._setSwiperRef.bind(I),I}return c(x,[{key:"componentDidMount",value:function(){this.swiper&&this.swiper.addEventListener("touchmove",this._handleSwipeMove,m({capture:!0,passive:!1}))}},{key:"componentWillUnmount",value:function(){this.swiper&&this.swiper.removeEventListener("touchmove",this._handleSwipeMove,m({capture:!0,passive:!1}))}},{key:"_onMouseDown",value:function(k){this.props.allowMouseEvents&&(this.mouseDown=!0,document.addEventListener("mouseup",this._onMouseUp),document.addEventListener("mousemove",this._onMouseMove),this._handleSwipeStart(k))}},{key:"_onMouseMove",value:function(k){this.mouseDown&&this._handleSwipeMove(k)}},{key:"_onMouseUp",value:function(k){this.mouseDown=!1,document.removeEventListener("mouseup",this._onMouseUp),document.removeEventListener("mousemove",this._onMouseMove),this._handleSwipeEnd(k)}},{key:"_handleSwipeStart",value:function(k){var R=y(k),P=R.x,I=R.y;this.moveStart={x:P,y:I},this.props.onSwipeStart(k)}},{key:"_handleSwipeMove",value:function(k){if(this.moveStart){var R=y(k),P=R.x,I=R.y,C=P-this.moveStart.x,F=I-this.moveStart.y;this.moving=!0;var D=this.props.onSwipeMove({x:C,y:F},k);D&&k.cancelable&&k.preventDefault(),this.movePosition={deltaX:C,deltaY:F}}}},{key:"_handleSwipeEnd",value:function(k){this.props.onSwipeEnd(k);var R=this.props.tolerance;this.moving&&this.movePosition&&(this.movePosition.deltaX<-R?this.props.onSwipeLeft(1,k):this.movePosition.deltaX>R&&this.props.onSwipeRight(1,k),this.movePosition.deltaY<-R?this.props.onSwipeUp(1,k):this.movePosition.deltaY>R&&this.props.onSwipeDown(1,k)),this.moveStart=null,this.moving=!1,this.movePosition=null}},{key:"_setSwiperRef",value:function(k){this.swiper=k,this.props.innerRef(k)}},{key:"render",value:function(){var k=this.props;k.tagName;var R=k.className,P=k.style,I=k.children;k.allowMouseEvents,k.onSwipeUp,k.onSwipeDown,k.onSwipeLeft,k.onSwipeRight,k.onSwipeStart,k.onSwipeMove,k.onSwipeEnd,k.innerRef,k.tolerance;var C=l(k,["tagName","className","style","children","allowMouseEvents","onSwipeUp","onSwipeDown","onSwipeLeft","onSwipeRight","onSwipeStart","onSwipeMove","onSwipeEnd","innerRef","tolerance"]);return i.default.createElement(this.props.tagName,a({ref:this._setSwiperRef,onMouseDown:this._onMouseDown,onTouchStart:this._handleSwipeStart,onTouchEnd:this._handleSwipeEnd,className:R,style:P},C),I)}}]),x})(n.Component);v.displayName="ReactSwipe",v.propTypes={tagName:o.default.string,className:o.default.string,style:o.default.object,children:o.default.node,allowMouseEvents:o.default.bool,onSwipeUp:o.default.func,onSwipeDown:o.default.func,onSwipeLeft:o.default.func,onSwipeRight:o.default.func,onSwipeStart:o.default.func,onSwipeMove:o.default.func,onSwipeEnd:o.default.func,innerRef:o.default.func,tolerance:o.default.number.isRequired},v.defaultProps={tagName:"div",allowMouseEvents:!1,onSwipeUp:function(){},onSwipeDown:function(){},onSwipeLeft:function(){},onSwipeRight:function(){},onSwipeStart:function(){},onSwipeMove:function(){},onSwipeEnd:function(){},innerRef:function(){},tolerance:0},t.default=v})})(zo)),zo}var Bs;function Pc(){return Bs||(Bs=1,(function(e){(function(t,n){n(e,ep())})(Ho,function(t,n){Object.defineProperty(t,"__esModule",{value:!0});var r=i(n);function i(o){return o&&o.__esModule?o:{default:o}}t.default=r.default})})(Ho)),Ho}var Ui={},Ws;function Lc(){if(Ws)return Ui;Ws=1,Object.defineProperty(Ui,"__esModule",{value:!0}),Ui.default=void 0;var e=t(bh());function t(i){return i&&i.__esModule?i:{default:i}}function n(i,o,s){return o in i?Object.defineProperty(i,o,{value:s,enumerable:!0,configurable:!0,writable:!0}):i[o]=s,i}var r={ROOT:function(o){return(0,e.default)(n({"carousel-root":!0},o||"",!!o))},CAROUSEL:function(o){return(0,e.default)({carousel:!0,"carousel-slider":o})},WRAPPER:function(o,s){return(0,e.default)({"thumbs-wrapper":!o,"slider-wrapper":o,"axis-horizontal":s==="horizontal","axis-vertical":s!=="horizontal"})},SLIDER:function(o,s){return(0,e.default)({thumbs:!o,slider:o,animated:!s})},ITEM:function(o,s,a){return(0,e.default)({thumb:!o,slide:o,selected:s,previous:a})},ARROW_PREV:function(o){return(0,e.default)({"control-arrow control-prev":!0,"control-disabled":o})},ARROW_NEXT:function(o){return(0,e.default)({"control-arrow control-next":!0,"control-disabled":o})},DOT:function(o){return(0,e.default)({dot:!0,selected:o})}};return Ui.default=r,Ui}var Gi={},Yi={},Us;function tp(){if(Us)return Yi;Us=1,Object.defineProperty(Yi,"__esModule",{value:!0}),Yi.outerWidth=void 0;var e=function(n){var r=n.offsetWidth,i=getComputedStyle(n);return r+=parseInt(i.marginLeft)+parseInt(i.marginRight),r};return Yi.outerWidth=e,Yi}var Xi={},Gs;function Hl(){if(Gs)return Xi;Gs=1,Object.defineProperty(Xi,"__esModule",{value:!0}),Xi.default=void 0;var e=function(n,r,i){var o=n===0?n:n+r,s=i==="horizontal"?[o,0,0]:[0,o,0],a="translate3d",l="("+s.join(",")+")";return a+l};return Xi.default=e,Xi}var ji={},Ys;function Fc(){if(Ys)return ji;Ys=1,Object.defineProperty(ji,"__esModule",{value:!0}),ji.default=void 0;var e=function(){return window};return ji.default=e,ji}var Xs;function _c(){if(Xs)return Gi;Xs=1,Object.defineProperty(Gi,"__esModule",{value:!0}),Gi.default=void 0;var e=l(mo()),t=s(Lc()),n=tp(),r=s(Hl()),i=s(Pc()),o=s(Fc());function s(I){return I&&I.__esModule?I:{default:I}}function a(){if(typeof WeakMap!="function")return null;var I=new WeakMap;return a=function(){return I},I}function l(I){if(I&&I.__esModule)return I;if(I===null||u(I)!=="object"&&typeof I!="function")return{default:I};var C=a();if(C&&C.has(I))return C.get(I);var F={},D=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var S in I)if(Object.prototype.hasOwnProperty.call(I,S)){var E=D?Object.getOwnPropertyDescriptor(I,S):null;E&&(E.get||E.set)?Object.defineProperty(F,S,E):F[S]=I[S]}return F.default=I,C&&C.set(I,F),F}function u(I){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?u=function(F){return typeof F}:u=function(F){return F&&typeof Symbol=="function"&&F.constructor===Symbol&&F!==Symbol.prototype?"symbol":typeof F},u(I)}function c(){return c=Object.assign||function(I){for(var C=1;C<arguments.length;C++){var F=arguments[C];for(var D in F)Object.prototype.hasOwnProperty.call(F,D)&&(I[D]=F[D])}return I},c.apply(this,arguments)}function d(I,C){if(!(I instanceof C))throw new TypeError("Cannot call a class as a function")}function g(I,C){for(var F=0;F<C.length;F++){var D=C[F];D.enumerable=D.enumerable||!1,D.configurable=!0,"value"in D&&(D.writable=!0),Object.defineProperty(I,D.key,D)}}function h(I,C,F){return C&&g(I.prototype,C),I}function p(I,C){if(typeof C!="function"&&C!==null)throw new TypeError("Super expression must either be null or a function");I.prototype=Object.create(C&&C.prototype,{constructor:{value:I,writable:!0,configurable:!0}}),C&&m(I,C)}function m(I,C){return m=Object.setPrototypeOf||function(D,S){return D.__proto__=S,D},m(I,C)}function y(I){var C=x();return function(){var D=T(I),S;if(C){var E=T(this).constructor;S=Reflect.construct(D,arguments,E)}else S=D.apply(this,arguments);return v(this,S)}}function v(I,C){return C&&(u(C)==="object"||typeof C=="function")?C:b(I)}function b(I){if(I===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return I}function x(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}function T(I){return T=Object.setPrototypeOf?Object.getPrototypeOf:function(F){return F.__proto__||Object.getPrototypeOf(F)},T(I)}function k(I,C,F){return C in I?Object.defineProperty(I,C,{value:F,enumerable:!0,configurable:!0,writable:!0}):I[C]=F,I}var R=function(C){return C.hasOwnProperty("key")},P=(function(I){p(F,I);var C=y(F);function F(D){var S;return d(this,F),S=C.call(this,D),k(b(S),"itemsWrapperRef",void 0),k(b(S),"itemsListRef",void 0),k(b(S),"thumbsRef",void 0),k(b(S),"setItemsWrapperRef",function(E){S.itemsWrapperRef=E}),k(b(S),"setItemsListRef",function(E){S.itemsListRef=E}),k(b(S),"setThumbsRef",function(E,O){S.thumbsRef||(S.thumbsRef=[]),S.thumbsRef[O]=E}),k(b(S),"updateSizes",function(){if(!(!S.props.children||!S.itemsWrapperRef||!S.thumbsRef)){var E=e.Children.count(S.props.children),O=S.itemsWrapperRef.clientWidth,M=S.props.thumbWidth?S.props.thumbWidth:(0,n.outerWidth)(S.thumbsRef[0]),V=Math.floor(O/M),W=V<E,j=W?E-V:0;S.setState(function(oe,Q){return{itemSize:M,visibleItems:V,firstItem:W?S.getFirstItem(Q.selectedItem):0,lastPosition:j,showArrows:W}})}}),k(b(S),"handleClickItem",function(E,O,M){if(!R(M)||M.key==="Enter"){var V=S.props.onSelectItem;typeof V=="function"&&V(E,O)}}),k(b(S),"onSwipeStart",function(){S.setState({swiping:!0})}),k(b(S),"onSwipeEnd",function(){S.setState({swiping:!1})}),k(b(S),"onSwipeMove",function(E){var O=E.x;if(!S.state.itemSize||!S.itemsWrapperRef||!S.state.visibleItems)return!1;var M=0,V=e.Children.count(S.props.children),W=-(S.state.firstItem*100)/S.state.visibleItems,j=Math.max(V-S.state.visibleItems,0),oe=-j*100/S.state.visibleItems;W===M&&O>0&&(O=0),W===oe&&O<0&&(O=0);var Q=S.itemsWrapperRef.clientWidth,re=W+100/(Q/O);return S.itemsListRef&&["WebkitTransform","MozTransform","MsTransform","OTransform","transform","msTransform"].forEach(function(se){S.itemsListRef.style[se]=(0,r.default)(re,"%",S.props.axis)}),!0}),k(b(S),"slideRight",function(E){S.moveTo(S.state.firstItem-(typeof E=="number"?E:1))}),k(b(S),"slideLeft",function(E){S.moveTo(S.state.firstItem+(typeof E=="number"?E:1))}),k(b(S),"moveTo",function(E){E=E<0?0:E,E=E>=S.state.lastPosition?S.state.lastPosition:E,S.setState({firstItem:E})}),S.state={selectedItem:D.selectedItem,swiping:!1,showArrows:!1,firstItem:0,visibleItems:0,lastPosition:0},S}return h(F,[{key:"componentDidMount",value:function(){this.setupThumbs()}},{key:"componentDidUpdate",value:function(S){this.props.selectedItem!==this.state.selectedItem&&this.setState({selectedItem:this.props.selectedItem,firstItem:this.getFirstItem(this.props.selectedItem)}),this.props.children!==S.children&&this.updateSizes()}},{key:"componentWillUnmount",value:function(){this.destroyThumbs()}},{key:"setupThumbs",value:function(){(0,o.default)().addEventListener("resize",this.updateSizes),(0,o.default)().addEventListener("DOMContentLoaded",this.updateSizes),this.updateSizes()}},{key:"destroyThumbs",value:function(){(0,o.default)().removeEventListener("resize",this.updateSizes),(0,o.default)().removeEventListener("DOMContentLoaded",this.updateSizes)}},{key:"getFirstItem",value:function(S){var E=S;return S>=this.state.lastPosition&&(E=this.state.lastPosition),S<this.state.firstItem+this.state.visibleItems&&(E=this.state.firstItem),S<this.state.firstItem&&(E=S),E}},{key:"renderItems",value:function(){var S=this;return this.props.children.map(function(E,O){var M=t.default.ITEM(!1,O===S.state.selectedItem),V={key:O,ref:function(j){return S.setThumbsRef(j,O)},className:M,onClick:S.handleClickItem.bind(S,O,S.props.children[O]),onKeyDown:S.handleClickItem.bind(S,O,S.props.children[O]),"aria-label":"".concat(S.props.labels.item," ").concat(O+1),style:{width:S.props.thumbWidth}};return e.default.createElement("li",c({},V,{role:"button",tabIndex:0}),E)})}},{key:"render",value:function(){var S=this;if(!this.props.children)return null;var E=e.Children.count(this.props.children)>1,O=this.state.showArrows&&this.state.firstItem>0,M=this.state.showArrows&&this.state.firstItem<this.state.lastPosition,V={},W=-this.state.firstItem*(this.state.itemSize||0),j=(0,r.default)(W,"px",this.props.axis),oe=this.props.transitionTime+"ms";return V={WebkitTransform:j,MozTransform:j,MsTransform:j,OTransform:j,transform:j,msTransform:j,WebkitTransitionDuration:oe,MozTransitionDuration:oe,MsTransitionDuration:oe,OTransitionDuration:oe,transitionDuration:oe,msTransitionDuration:oe},e.default.createElement("div",{className:t.default.CAROUSEL(!1)},e.default.createElement("div",{className:t.default.WRAPPER(!1),ref:this.setItemsWrapperRef},e.default.createElement("button",{type:"button",className:t.default.ARROW_PREV(!O),onClick:function(){return S.slideRight()},"aria-label":this.props.labels.leftArrow}),E?e.default.createElement(i.default,{tagName:"ul",className:t.default.SLIDER(!1,this.state.swiping),onSwipeLeft:this.slideLeft,onSwipeRight:this.slideRight,onSwipeMove:this.onSwipeMove,onSwipeStart:this.onSwipeStart,onSwipeEnd:this.onSwipeEnd,style:V,innerRef:this.setItemsListRef,allowMouseEvents:this.props.emulateTouch},this.renderItems()):e.default.createElement("ul",{className:t.default.SLIDER(!1,this.state.swiping),ref:function(re){return S.setItemsListRef(re)},style:V},this.renderItems()),e.default.createElement("button",{type:"button",className:t.default.ARROW_NEXT(!M),onClick:function(){return S.slideLeft()},"aria-label":this.props.labels.rightArrow})))}}]),F})(e.Component);return Gi.default=P,k(P,"displayName","Thumbs"),k(P,"defaultProps",{axis:"horizontal",labels:{leftArrow:"previous slide / item",rightArrow:"next slide / item",item:"slide item"},selectedItem:0,thumbWidth:80,transitionTime:350}),Gi}var qi={},js;function np(){if(js)return qi;js=1,Object.defineProperty(qi,"__esModule",{value:!0}),qi.default=void 0;var e=function(){return document};return qi.default=e,qi}var On={},qs;function Ac(){if(qs)return On;qs=1,Object.defineProperty(On,"__esModule",{value:!0}),On.setPosition=On.getPosition=On.isKeyboardEvent=On.defaultStatusFormatter=On.noop=void 0;var e=mo(),t=n(Hl());function n(l){return l&&l.__esModule?l:{default:l}}var r=function(){};On.noop=r;var i=function(u,c){return"".concat(u," of ").concat(c)};On.defaultStatusFormatter=i;var o=function(u){return u?u.hasOwnProperty("key"):!1};On.isKeyboardEvent=o;var s=function(u,c){if(c.infiniteLoop&&++u,u===0)return 0;var d=e.Children.count(c.children);if(c.centerMode&&c.axis==="horizontal"){var g=-u*c.centerSlidePercentage,h=d-1;return u&&(u!==h||c.infiniteLoop)?g+=(100-c.centerSlidePercentage)/2:u===h&&(g+=100-c.centerSlidePercentage),g}return-u*100};On.getPosition=s;var a=function(u,c){var d={};return["WebkitTransform","MozTransform","MsTransform","OTransform","transform","msTransform"].forEach(function(g){d[g]=(0,t.default)(u,"%",c)}),d};return On.setPosition=a,On}var Un={},Ks;function rp(){if(Ks)return Un;Ks=1,Object.defineProperty(Un,"__esModule",{value:!0}),Un.fadeAnimationHandler=Un.slideStopSwipingHandler=Un.slideSwipeAnimationHandler=Un.slideAnimationHandler=void 0;var e=mo(),t=r(Hl()),n=Ac();function r(d){return d&&d.__esModule?d:{default:d}}function i(d,g){var h=Object.keys(d);if(Object.getOwnPropertySymbols){var p=Object.getOwnPropertySymbols(d);g&&(p=p.filter(function(m){return Object.getOwnPropertyDescriptor(d,m).enumerable})),h.push.apply(h,p)}return h}function o(d){for(var g=1;g<arguments.length;g++){var h=arguments[g]!=null?arguments[g]:{};g%2?i(Object(h),!0).forEach(function(p){s(d,p,h[p])}):Object.getOwnPropertyDescriptors?Object.defineProperties(d,Object.getOwnPropertyDescriptors(h)):i(Object(h)).forEach(function(p){Object.defineProperty(d,p,Object.getOwnPropertyDescriptor(h,p))})}return d}function s(d,g,h){return g in d?Object.defineProperty(d,g,{value:h,enumerable:!0,configurable:!0,writable:!0}):d[g]=h,d}var a=function(g,h){var p={},m=h.selectedItem,y=m,v=e.Children.count(g.children)-1,b=g.infiniteLoop&&(m<0||m>v);if(b)return y<0?g.centerMode&&g.centerSlidePercentage&&g.axis==="horizontal"?p.itemListStyle=(0,n.setPosition)(-(v+2)*g.centerSlidePercentage-(100-g.centerSlidePercentage)/2,g.axis):p.itemListStyle=(0,n.setPosition)(-(v+2)*100,g.axis):y>v&&(p.itemListStyle=(0,n.setPosition)(0,g.axis)),p;var x=(0,n.getPosition)(m,g),T=(0,t.default)(x,"%",g.axis),k=g.transitionTime+"ms";return p.itemListStyle={WebkitTransform:T,msTransform:T,OTransform:T,transform:T},h.swiping||(p.itemListStyle=o(o({},p.itemListStyle),{},{WebkitTransitionDuration:k,MozTransitionDuration:k,OTransitionDuration:k,transitionDuration:k,msTransitionDuration:k})),p};Un.slideAnimationHandler=a;var l=function(g,h,p,m){var y={},v=h.axis==="horizontal",b=e.Children.count(h.children),x=0,T=(0,n.getPosition)(p.selectedItem,h),k=h.infiniteLoop?(0,n.getPosition)(b-1,h)-100:(0,n.getPosition)(b-1,h),R=v?g.x:g.y,P=R;T===x&&R>0&&(P=0),T===k&&R<0&&(P=0);var I=T+100/(p.itemSize/P),C=Math.abs(R)>h.swipeScrollTolerance;return h.infiniteLoop&&C&&(p.selectedItem===0&&I>-100?I-=b*100:p.selectedItem===b-1&&I<-b*100&&(I+=b*100)),(!h.preventMovementUntilSwipeScrollTolerance||C||p.swipeMovementStarted)&&(p.swipeMovementStarted||m({swipeMovementStarted:!0}),y.itemListStyle=(0,n.setPosition)(I,h.axis)),C&&!p.cancelClick&&m({cancelClick:!0}),y};Un.slideSwipeAnimationHandler=l;var u=function(g,h){var p=(0,n.getPosition)(h.selectedItem,g),m=(0,n.setPosition)(p,g.axis);return{itemListStyle:m}};Un.slideStopSwipingHandler=u;var c=function(g,h){var p=g.transitionTime+"ms",m="ease-in-out",y={position:"absolute",display:"block",zIndex:-2,minHeight:"100%",opacity:0,top:0,right:0,left:0,bottom:0,transitionTimingFunction:m,msTransitionTimingFunction:m,MozTransitionTimingFunction:m,WebkitTransitionTimingFunction:m,OTransitionTimingFunction:m};return h.swiping||(y=o(o({},y),{},{WebkitTransitionDuration:p,MozTransitionDuration:p,OTransitionDuration:p,transitionDuration:p,msTransitionDuration:p})),{slideStyle:y,selectedStyle:o(o({},y),{},{opacity:1,position:"relative"}),prevStyle:o({},y)}};return Un.fadeAnimationHandler=c,Un}var Zs;function ip(){if(Zs)return Wi;Zs=1,Object.defineProperty(Wi,"__esModule",{value:!0}),Wi.default=void 0;var e=c(mo()),t=l(Pc()),n=l(Lc()),r=l(_c()),i=l(np()),o=l(Fc()),s=Ac(),a=rp();function l(D){return D&&D.__esModule?D:{default:D}}function u(){if(typeof WeakMap!="function")return null;var D=new WeakMap;return u=function(){return D},D}function c(D){if(D&&D.__esModule)return D;if(D===null||d(D)!=="object"&&typeof D!="function")return{default:D};var S=u();if(S&&S.has(D))return S.get(D);var E={},O=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var M in D)if(Object.prototype.hasOwnProperty.call(D,M)){var V=O?Object.getOwnPropertyDescriptor(D,M):null;V&&(V.get||V.set)?Object.defineProperty(E,M,V):E[M]=D[M]}return E.default=D,S&&S.set(D,E),E}function d(D){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?d=function(E){return typeof E}:d=function(E){return E&&typeof Symbol=="function"&&E.constructor===Symbol&&E!==Symbol.prototype?"symbol":typeof E},d(D)}function g(){return g=Object.assign||function(D){for(var S=1;S<arguments.length;S++){var E=arguments[S];for(var O in E)Object.prototype.hasOwnProperty.call(E,O)&&(D[O]=E[O])}return D},g.apply(this,arguments)}function h(D,S){var E=Object.keys(D);if(Object.getOwnPropertySymbols){var O=Object.getOwnPropertySymbols(D);S&&(O=O.filter(function(M){return Object.getOwnPropertyDescriptor(D,M).enumerable})),E.push.apply(E,O)}return E}function p(D){for(var S=1;S<arguments.length;S++){var E=arguments[S]!=null?arguments[S]:{};S%2?h(Object(E),!0).forEach(function(O){C(D,O,E[O])}):Object.getOwnPropertyDescriptors?Object.defineProperties(D,Object.getOwnPropertyDescriptors(E)):h(Object(E)).forEach(function(O){Object.defineProperty(D,O,Object.getOwnPropertyDescriptor(E,O))})}return D}function m(D,S){if(!(D instanceof S))throw new TypeError("Cannot call a class as a function")}function y(D,S){for(var E=0;E<S.length;E++){var O=S[E];O.enumerable=O.enumerable||!1,O.configurable=!0,"value"in O&&(O.writable=!0),Object.defineProperty(D,O.key,O)}}function v(D,S,E){return S&&y(D.prototype,S),D}function b(D,S){if(typeof S!="function"&&S!==null)throw new TypeError("Super expression must either be null or a function");D.prototype=Object.create(S&&S.prototype,{constructor:{value:D,writable:!0,configurable:!0}}),S&&x(D,S)}function x(D,S){return x=Object.setPrototypeOf||function(O,M){return O.__proto__=M,O},x(D,S)}function T(D){var S=P();return function(){var O=I(D),M;if(S){var V=I(this).constructor;M=Reflect.construct(O,arguments,V)}else M=O.apply(this,arguments);return k(this,M)}}function k(D,S){return S&&(d(S)==="object"||typeof S=="function")?S:R(D)}function R(D){if(D===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return D}function P(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}function I(D){return I=Object.setPrototypeOf?Object.getPrototypeOf:function(E){return E.__proto__||Object.getPrototypeOf(E)},I(D)}function C(D,S,E){return S in D?Object.defineProperty(D,S,{value:E,enumerable:!0,configurable:!0,writable:!0}):D[S]=E,D}var F=(function(D){b(E,D);var S=T(E);function E(O){var M;m(this,E),M=S.call(this,O),C(R(M),"thumbsRef",void 0),C(R(M),"carouselWrapperRef",void 0),C(R(M),"listRef",void 0),C(R(M),"itemsRef",void 0),C(R(M),"timer",void 0),C(R(M),"animationHandler",void 0),C(R(M),"setThumbsRef",function(W){M.thumbsRef=W}),C(R(M),"setCarouselWrapperRef",function(W){M.carouselWrapperRef=W}),C(R(M),"setListRef",function(W){M.listRef=W}),C(R(M),"setItemsRef",function(W,j){M.itemsRef||(M.itemsRef=[]),M.itemsRef[j]=W}),C(R(M),"autoPlay",function(){e.Children.count(M.props.children)<=1||(M.clearAutoPlay(),M.props.autoPlay&&(M.timer=setTimeout(function(){M.increment()},M.props.interval)))}),C(R(M),"clearAutoPlay",function(){M.timer&&clearTimeout(M.timer)}),C(R(M),"resetAutoPlay",function(){M.clearAutoPlay(),M.autoPlay()}),C(R(M),"stopOnHover",function(){M.setState({isMouseEntered:!0},M.clearAutoPlay)}),C(R(M),"startOnLeave",function(){M.setState({isMouseEntered:!1},M.autoPlay)}),C(R(M),"isFocusWithinTheCarousel",function(){return M.carouselWrapperRef?!!((0,i.default)().activeElement===M.carouselWrapperRef||M.carouselWrapperRef.contains((0,i.default)().activeElement)):!1}),C(R(M),"navigateWithKeyboard",function(W){if(M.isFocusWithinTheCarousel()){var j=M.props.axis,oe=j==="horizontal",Q={ArrowUp:38,ArrowRight:39,ArrowDown:40,ArrowLeft:37},re=oe?Q.ArrowRight:Q.ArrowDown,se=oe?Q.ArrowLeft:Q.ArrowUp;re===W.keyCode?M.increment():se===W.keyCode&&M.decrement()}}),C(R(M),"updateSizes",function(){if(!(!M.state.initialized||!M.itemsRef||M.itemsRef.length===0)){var W=M.props.axis==="horizontal",j=M.itemsRef[0];if(j){var oe=W?j.clientWidth:j.clientHeight;M.setState({itemSize:oe}),M.thumbsRef&&M.thumbsRef.updateSizes()}}}),C(R(M),"setMountState",function(){M.setState({hasMount:!0}),M.updateSizes()}),C(R(M),"handleClickItem",function(W,j){if(e.Children.count(M.props.children)!==0){if(M.state.cancelClick){M.setState({cancelClick:!1});return}M.props.onClickItem(W,j),W!==M.state.selectedItem&&M.setState({selectedItem:W})}}),C(R(M),"handleOnChange",function(W,j){e.Children.count(M.props.children)<=1||M.props.onChange(W,j)}),C(R(M),"handleClickThumb",function(W,j){M.props.onClickThumb(W,j),M.moveTo(W)}),C(R(M),"onSwipeStart",function(W){M.setState({swiping:!0}),M.props.onSwipeStart(W)}),C(R(M),"onSwipeEnd",function(W){M.setState({swiping:!1,cancelClick:!1,swipeMovementStarted:!1}),M.props.onSwipeEnd(W),M.clearAutoPlay(),M.state.autoPlay&&M.autoPlay()}),C(R(M),"onSwipeMove",function(W,j){M.props.onSwipeMove(j);var oe=M.props.swipeAnimationHandler(W,M.props,M.state,M.setState.bind(R(M)));return M.setState(p({},oe)),!!Object.keys(oe).length}),C(R(M),"decrement",function(){var W=arguments.length>0&&arguments[0]!==void 0?arguments[0]:1;M.moveTo(M.state.selectedItem-(typeof W=="number"?W:1))}),C(R(M),"increment",function(){var W=arguments.length>0&&arguments[0]!==void 0?arguments[0]:1;M.moveTo(M.state.selectedItem+(typeof W=="number"?W:1))}),C(R(M),"moveTo",function(W){if(typeof W=="number"){var j=e.Children.count(M.props.children)-1;W<0&&(W=M.props.infiniteLoop?j:0),W>j&&(W=M.props.infiniteLoop?0:j),M.selectItem({selectedItem:W}),M.state.autoPlay&&M.state.isMouseEntered===!1&&M.resetAutoPlay()}}),C(R(M),"onClickNext",function(){M.increment(1)}),C(R(M),"onClickPrev",function(){M.decrement(1)}),C(R(M),"onSwipeForward",function(){M.increment(1),M.props.emulateTouch&&M.setState({cancelClick:!0})}),C(R(M),"onSwipeBackwards",function(){M.decrement(1),M.props.emulateTouch&&M.setState({cancelClick:!0})}),C(R(M),"changeItem",function(W){return function(j){(!(0,s.isKeyboardEvent)(j)||j.key==="Enter")&&M.moveTo(W)}}),C(R(M),"selectItem",function(W){M.setState(p({previousItem:M.state.selectedItem},W),function(){M.setState(M.animationHandler(M.props,M.state))}),M.handleOnChange(W.selectedItem,e.Children.toArray(M.props.children)[W.selectedItem])}),C(R(M),"getInitialImage",function(){var W=M.props.selectedItem,j=M.itemsRef&&M.itemsRef[W],oe=j&&j.getElementsByTagName("img")||[];return oe[0]}),C(R(M),"getVariableItemHeight",function(W){var j=M.itemsRef&&M.itemsRef[W];if(M.state.hasMount&&j&&j.children.length){var oe=j.children[0].getElementsByTagName("img")||[];if(oe.length>0){var Q=oe[0];if(!Q.complete){var re=function de(){M.forceUpdate(),Q.removeEventListener("load",de)};Q.addEventListener("load",re)}}var se=oe[0]||j.children[0],ae=se.clientHeight;return ae>0?ae:null}return null});var V={initialized:!1,previousItem:O.selectedItem,selectedItem:O.selectedItem,hasMount:!1,isMouseEntered:!1,autoPlay:O.autoPlay,swiping:!1,swipeMovementStarted:!1,cancelClick:!1,itemSize:1,itemListStyle:{},slideStyle:{},selectedStyle:{},prevStyle:{}};return M.animationHandler=typeof O.animationHandler=="function"&&O.animationHandler||O.animationHandler==="fade"&&a.fadeAnimationHandler||a.slideAnimationHandler,M.state=p(p({},V),M.animationHandler(O,V)),M}return v(E,[{key:"componentDidMount",value:function(){this.props.children&&this.setupCarousel()}},{key:"componentDidUpdate",value:function(M,V){!M.children&&this.props.children&&!this.state.initialized&&this.setupCarousel(),!M.autoFocus&&this.props.autoFocus&&this.forceFocus(),V.swiping&&!this.state.swiping&&this.setState(p({},this.props.stopSwipingHandler(this.props,this.state))),(M.selectedItem!==this.props.selectedItem||M.centerMode!==this.props.centerMode)&&(this.updateSizes(),this.moveTo(this.props.selectedItem)),M.autoPlay!==this.props.autoPlay&&(this.props.autoPlay?this.setupAutoPlay():this.destroyAutoPlay(),this.setState({autoPlay:this.props.autoPlay}))}},{key:"componentWillUnmount",value:function(){this.destroyCarousel()}},{key:"setupCarousel",value:function(){var M=this;this.bindEvents(),this.state.autoPlay&&e.Children.count(this.props.children)>1&&this.setupAutoPlay(),this.props.autoFocus&&this.forceFocus(),this.setState({initialized:!0},function(){var V=M.getInitialImage();V&&!V.complete?V.addEventListener("load",M.setMountState):M.setMountState()})}},{key:"destroyCarousel",value:function(){this.state.initialized&&(this.unbindEvents(),this.destroyAutoPlay())}},{key:"setupAutoPlay",value:function(){this.autoPlay();var M=this.carouselWrapperRef;this.props.stopOnHover&&M&&(M.addEventListener("mouseenter",this.stopOnHover),M.addEventListener("mouseleave",this.startOnLeave))}},{key:"destroyAutoPlay",value:function(){this.clearAutoPlay();var M=this.carouselWrapperRef;this.props.stopOnHover&&M&&(M.removeEventListener("mouseenter",this.stopOnHover),M.removeEventListener("mouseleave",this.startOnLeave))}},{key:"bindEvents",value:function(){(0,o.default)().addEventListener("resize",this.updateSizes),(0,o.default)().addEventListener("DOMContentLoaded",this.updateSizes),this.props.useKeyboardArrows&&(0,i.default)().addEventListener("keydown",this.navigateWithKeyboard)}},{key:"unbindEvents",value:function(){(0,o.default)().removeEventListener("resize",this.updateSizes),(0,o.default)().removeEventListener("DOMContentLoaded",this.updateSizes);var M=this.getInitialImage();M&&M.removeEventListener("load",this.setMountState),this.props.useKeyboardArrows&&(0,i.default)().removeEventListener("keydown",this.navigateWithKeyboard)}},{key:"forceFocus",value:function(){var M;(M=this.carouselWrapperRef)===null||M===void 0||M.focus()}},{key:"renderItems",value:function(M){var V=this;return this.props.children?e.Children.map(this.props.children,function(W,j){var oe=j===V.state.selectedItem,Q=j===V.state.previousItem,re=oe&&V.state.selectedStyle||Q&&V.state.prevStyle||V.state.slideStyle||{};V.props.centerMode&&V.props.axis==="horizontal"&&(re=p(p({},re),{},{minWidth:V.props.centerSlidePercentage+"%"})),V.state.swiping&&V.state.swipeMovementStarted&&(re=p(p({},re),{},{pointerEvents:"none"}));var se={ref:function(de){return V.setItemsRef(de,j)},key:"itemKey"+j+(M?"clone":""),className:n.default.ITEM(!0,j===V.state.selectedItem,j===V.state.previousItem),onClick:V.handleClickItem.bind(V,j,W),style:re};return e.default.createElement("li",se,V.props.renderItem(W,{isSelected:j===V.state.selectedItem,isPrevious:j===V.state.previousItem}))}):[]}},{key:"renderControls",value:function(){var M=this,V=this.props,W=V.showIndicators,j=V.labels,oe=V.renderIndicator,Q=V.children;return W?e.default.createElement("ul",{className:"control-dots"},e.Children.map(Q,function(re,se){return oe&&oe(M.changeItem(se),se===M.state.selectedItem,se,j.item)})):null}},{key:"renderStatus",value:function(){return this.props.showStatus?e.default.createElement("p",{className:"carousel-status"},this.props.statusFormatter(this.state.selectedItem+1,e.Children.count(this.props.children))):null}},{key:"renderThumbs",value:function(){return!this.props.showThumbs||!this.props.children||e.Children.count(this.props.children)===0?null:e.default.createElement(r.default,{ref:this.setThumbsRef,onSelectItem:this.handleClickThumb,selectedItem:this.state.selectedItem,transitionTime:this.props.transitionTime,thumbWidth:this.props.thumbWidth,labels:this.props.labels,emulateTouch:this.props.emulateTouch},this.props.renderThumbs(this.props.children))}},{key:"render",value:function(){var M=this;if(!this.props.children||e.Children.count(this.props.children)===0)return null;var V=this.props.swipeable&&e.Children.count(this.props.children)>1,W=this.props.axis==="horizontal",j=this.props.showArrows&&e.Children.count(this.props.children)>1,oe=j&&(this.state.selectedItem>0||this.props.infiniteLoop)||!1,Q=j&&(this.state.selectedItem<e.Children.count(this.props.children)-1||this.props.infiniteLoop)||!1,re=this.renderItems(!0),se=re.shift(),ae=re.pop(),de={className:n.default.SLIDER(!0,this.state.swiping),onSwipeMove:this.onSwipeMove,onSwipeStart:this.onSwipeStart,onSwipeEnd:this.onSwipeEnd,style:this.state.itemListStyle,tolerance:this.props.swipeScrollTolerance},fe={};if(W){if(de.onSwipeLeft=this.onSwipeForward,de.onSwipeRight=this.onSwipeBackwards,this.props.dynamicHeight){var ue=this.getVariableItemHeight(this.state.selectedItem);fe.height=ue||"auto"}}else de.onSwipeUp=this.props.verticalSwipe==="natural"?this.onSwipeBackwards:this.onSwipeForward,de.onSwipeDown=this.props.verticalSwipe==="natural"?this.onSwipeForward:this.onSwipeBackwards,de.style=p(p({},de.style),{},{height:this.state.itemSize}),fe.height=this.state.itemSize;return e.default.createElement("div",{"aria-label":this.props.ariaLabel,className:n.default.ROOT(this.props.className),ref:this.setCarouselWrapperRef,tabIndex:this.props.useKeyboardArrows?0:void 0},e.default.createElement("div",{className:n.default.CAROUSEL(!0),style:{width:this.props.width}},this.renderControls(),this.props.renderArrowPrev(this.onClickPrev,oe,this.props.labels.leftArrow),e.default.createElement("div",{className:n.default.WRAPPER(!0,this.props.axis),style:fe},V?e.default.createElement(t.default,g({tagName:"ul",innerRef:this.setListRef},de,{allowMouseEvents:this.props.emulateTouch}),this.props.infiniteLoop&&ae,this.renderItems(),this.props.infiniteLoop&&se):e.default.createElement("ul",{className:n.default.SLIDER(!0,this.state.swiping),ref:function(L){return M.setListRef(L)},style:this.state.itemListStyle||{}},this.props.infiniteLoop&&ae,this.renderItems(),this.props.infiniteLoop&&se)),this.props.renderArrowNext(this.onClickNext,Q,this.props.labels.rightArrow),this.renderStatus()),this.renderThumbs())}}]),E})(e.default.Component);return Wi.default=F,C(F,"displayName","Carousel"),C(F,"defaultProps",{ariaLabel:void 0,axis:"horizontal",centerSlidePercentage:80,interval:3e3,labels:{leftArrow:"previous slide / item",rightArrow:"next slide / item",item:"slide item"},onClickItem:s.noop,onClickThumb:s.noop,onChange:s.noop,onSwipeStart:function(){},onSwipeEnd:function(){},onSwipeMove:function(){return!1},preventMovementUntilSwipeScrollTolerance:!1,renderArrowPrev:function(S,E,O){return e.default.createElement("button",{type:"button","aria-label":O,className:n.default.ARROW_PREV(!E),onClick:S})},renderArrowNext:function(S,E,O){return e.default.createElement("button",{type:"button","aria-label":O,className:n.default.ARROW_NEXT(!E),onClick:S})},renderIndicator:function(S,E,O,M){return e.default.createElement("li",{className:n.default.DOT(E),onClick:S,onKeyDown:S,value:O,key:O,role:"button",tabIndex:0,"aria-label":"".concat(M," ").concat(O+1)})},renderItem:function(S){return S},renderThumbs:function(S){var E=e.Children.map(S,function(O){var M=O;if(O.type!=="img"&&(M=e.Children.toArray(O.props.children).find(function(V){return V.type==="img"})),!!M)return M});return E.filter(function(O){return O}).length===0?(console.warn("No images found! Can't build the thumb list without images. If you don't need thumbs, set showThumbs={false} in the Carousel. Note that it's not possible to get images rendered inside custom components. More info at https://github.com/leandrowd/react-responsive-carousel/blob/master/TROUBLESHOOTING.md"),[]):E},statusFormatter:s.defaultStatusFormatter,selectedItem:0,showArrows:!0,showIndicators:!0,showStatus:!0,showThumbs:!0,stopOnHover:!0,swipeScrollTolerance:5,swipeable:!0,transitionTime:350,verticalSwipe:"standard",width:"100%",animationHandler:"slide",swipeAnimationHandler:a.slideSwipeAnimationHandler,stopSwipingHandler:a.slideStopSwipingHandler}),Wi}var Js={},Qs;function op(){return Qs||(Qs=1),Js}var eu;function ap(){return eu||(eu=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"Carousel",{enumerable:!0,get:function(){return t.default}}),Object.defineProperty(e,"CarouselProps",{enumerable:!0,get:function(){return n.CarouselProps}}),Object.defineProperty(e,"Thumbs",{enumerable:!0,get:function(){return r.default}});var t=i(ip()),n=op(),r=i(_c());function i(o){return o&&o.__esModule?o:{default:o}}})(Ja)),Ja}var lp=ap();function kn(e,t,n,r,i=!1){const o=f.useRef();o.current=t,f.useEffect(()=>{if(n===null||n.addEventListener===void 0)return;const s=n,a=l=>{o.current?.call(s,l)};return s.addEventListener(e,a,{passive:r,capture:i}),()=>{s.removeEventListener(e,a,{capture:i})}},[e,n,r,i])}function Cr(e,t){return e===void 0?void 0:t}const sp=Math.PI;function tu(e){return e*sp/180}const Hc=(e,t,n)=>({x1:e-n/2,y1:t-n/2,x2:e+n/2,y2:t+n/2}),zc=(e,t,n,r,i)=>{switch(e){case"left":return Math.floor(t)+r+i/2;case"center":return Math.floor(t+n/2);case"right":return Math.floor(t+n)-r-i/2}},Vc=(e,t,n)=>Math.min(e,t-n*2),$c=(e,t,n)=>n.x1<=e&&e<=n.x2&&n.y1<=t&&t<=n.y2,zl=e=>{const t=e.fgColor??"currentColor";return f.createElement("svg",{viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},f.createElement("path",{d:"M12.7073 7.05029C7.87391 11.8837 10.4544 9.30322 6.03024 13.7273C5.77392 13.9836 5.58981 14.3071 5.50189 14.6587L4.52521 18.5655C4.38789 19.1148 4.88543 19.6123 5.43472 19.475L9.34146 18.4983C9.69313 18.4104 10.0143 18.2286 10.2706 17.9722L16.9499 11.2929",stroke:t,strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",fill:"none",vectorEffect:"non-scaling-stroke"}),f.createElement("path",{d:"M20.4854 4.92901L19.0712 3.5148C18.2901 2.73375 17.0238 2.73375 16.2428 3.5148L14.475 5.28257C15.5326 7.71912 16.4736 8.6278 18.7176 9.52521L20.4854 7.75744C21.2665 6.97639 21.2665 5.71006 20.4854 4.92901Z",stroke:t,strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",fill:"none",vectorEffect:"non-scaling-stroke"}))},up=e=>{const t=e.fgColor??"currentColor";return f.createElement("svg",{viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},f.createElement("path",{d:"M19 6L10.3802 17L5.34071 11.8758",vectorEffect:"non-scaling-stroke",stroke:t,strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}))};function cp(e,t,n){const[r,i]=f.useState(e),o=f.useRef(!0);f.useEffect(()=>()=>{o.current=!1},[]);const s=f.useRef(Rc(a=>{o.current&&i(a)},n));return f.useLayoutEffect(()=>{o.current&&s.current(()=>e())},t),r}const dp="֑-߿יִ-﷽ﹰ-ﻼ",fp="A-Za-zÀ-ÖØ-öø-ʸ̀-֐ࠀ-῿‎Ⰰ-﬜︀-﹯﻽-￿",hp=new RegExp("^[^"+fp+"]*["+dp+"]");function Vl(e){return hp.test(e)?"rtl":"not-rtl"}let Vo;function bl(){if(typeof document>"u")return 0;if(Vo!==void 0)return Vo;const e=document.createElement("p");e.style.width="100%",e.style.height="200px";const t=document.createElement("div");t.id="testScrollbar",t.style.position="absolute",t.style.top="0px",t.style.left="0px",t.style.visibility="hidden",t.style.width="200px",t.style.height="150px",t.style.overflow="hidden",t.append(e),document.body.append(t);const n=e.offsetWidth;t.style.overflow="scroll";let r=e.offsetWidth;return n===r&&(r=t.clientWidth),t.remove(),Vo=n-r,Vo}const Vr=Symbol();function gp(e){const t=f.useRef([Vr,e]);t.current[1]!==e&&(t.current[0]=e),t.current[1]=e;const[n,r]=f.useState(e),[,i]=f.useState(),o=f.useCallback(a=>{const l=t.current[0];l!==Vr&&(a=typeof a=="function"?a(l):a,a===l)||(l!==Vr&&i({}),r(u=>typeof a=="function"?a(l===Vr?u:l):a),t.current[0]=Vr)},[]),s=f.useCallback(()=>{t.current[0]=Vr,i({})},[]);return[t.current[0]===Vr?n:t.current[0],o,s]}function Nc(e){if(e.length===0)return"";let t=0,n=0;for(const r of e){if(n+=r.length,n>1e4)break;t++}return e.slice(0,t).join(", ")}function pp(e){const t=f.useRef(e);return Ii(e,t.current)||(t.current=e),t.current}const mp=e=>{const{urls:t,canWrite:n,onEditClick:r,renderImage:i}=e,o=t.filter(a=>a!=="");if(o.length===0)return null;const s=o.length>1;return f.createElement(Qg,{"data-testid":"GDG-default-image-overlay-editor"},f.createElement(lp.Carousel,{showArrows:s,showThumbs:!1,swipeable:s,emulateTouch:s,infiniteLoop:s},o.map(a=>{const l=i?.(a)??f.createElement("img",{draggable:!1,src:a});return f.createElement("div",{className:"gdg-centering-container",key:a},l)})),n&&r&&f.createElement("button",{className:"gdg-edit-icon",onClick:r},f.createElement(zl,null)))};function Bc(){return{async:!1,baseUrl:null,breaks:!1,extensions:null,gfm:!0,headerIds:!0,headerPrefix:"",highlight:null,hooks:null,langPrefix:"language-",mangle:!0,pedantic:!1,renderer:null,sanitize:!1,sanitizer:null,silent:!1,smartypants:!1,tokenizer:null,walkTokens:null,xhtml:!1}}let Gr=Bc();function vp(e){Gr=e}const Wc=/[&<>"']/,bp=new RegExp(Wc.source,"g"),Uc=/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,wp=new RegExp(Uc.source,"g"),yp={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},nu=e=>yp[e];function mn(e,t){if(t){if(Wc.test(e))return e.replace(bp,nu)}else if(Uc.test(e))return e.replace(wp,nu);return e}const Cp=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig;function Gc(e){return e.replace(Cp,(t,n)=>(n=n.toLowerCase(),n==="colon"?":":n.charAt(0)==="#"?n.charAt(1)==="x"?String.fromCharCode(parseInt(n.substring(2),16)):String.fromCharCode(+n.substring(1)):""))}const Sp=/(^|[^\[])\^/g;function Ft(e,t){e=typeof e=="string"?e:e.source,t=t||"";const n={replace:(r,i)=>(i=i.source||i,i=i.replace(Sp,"$1"),e=e.replace(r,i),n),getRegex:()=>new RegExp(e,t)};return n}const xp=/[^\w:]/g,kp=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;function ru(e,t,n){if(e){let r;try{r=decodeURIComponent(Gc(n)).replace(xp,"").toLowerCase()}catch{return null}if(r.indexOf("javascript:")===0||r.indexOf("vbscript:")===0||r.indexOf("data:")===0)return null}t&&!kp.test(n)&&(n=Ep(t,n));try{n=encodeURI(n).replace(/%25/g,"%")}catch{return null}return n}const $o={},Mp=/^[^:]+:\/*[^/]*$/,Rp=/^([^:]+:)[\s\S]*$/,Ip=/^([^:]+:\/*[^/]*)[\s\S]*$/;function Ep(e,t){$o[" "+e]||(Mp.test(e)?$o[" "+e]=e+"/":$o[" "+e]=Zo(e,"/",!0)),e=$o[" "+e];const n=e.indexOf(":")===-1;return t.substring(0,2)==="//"?n?t:e.replace(Rp,"$1")+t:t.charAt(0)==="/"?n?t:e.replace(Ip,"$1")+t:e+t}const la={exec:function(){}};function iu(e,t){const n=e.replace(/\|/g,(o,s,a)=>{let l=!1,u=s;for(;--u>=0&&a[u]==="\\";)l=!l;return l?"|":" |"}),r=n.split(/ \|/);let i=0;if(r[0].trim()||r.shift(),r.length>0&&!r[r.length-1].trim()&&r.pop(),r.length>t)r.splice(t);else for(;r.length<t;)r.push("");for(;i<r.length;i++)r[i]=r[i].trim().replace(/\\\|/g,"|");return r}function Zo(e,t,n){const r=e.length;if(r===0)return"";let i=0;for(;i<r;){const o=e.charAt(r-i-1);if(o===t&&!n)i++;else if(o!==t&&n)i++;else break}return e.slice(0,r-i)}function Tp(e,t){if(e.indexOf(t[1])===-1)return-1;const n=e.length;let r=0,i=0;for(;i<n;i++)if(e[i]==="\\")i++;else if(e[i]===t[0])r++;else if(e[i]===t[1]&&(r--,r<0))return i;return-1}function Dp(e){e&&e.sanitize&&!e.silent&&console.warn("marked(): sanitize and sanitizer parameters are deprecated since version 0.7.0, should not be used and will be removed in the future. Read more here: https://marked.js.org/#/USING_ADVANCED.md#options")}function ou(e,t){if(t<1)return"";let n="";for(;t>1;)t&1&&(n+=e),t>>=1,e+=e;return n+e}function au(e,t,n,r){const i=t.href,o=t.title?mn(t.title):null,s=e[1].replace(/\\([\[\]])/g,"$1");if(e[0].charAt(0)!=="!"){r.state.inLink=!0;const a={type:"link",raw:n,href:i,title:o,text:s,tokens:r.inlineTokens(s)};return r.state.inLink=!1,a}return{type:"image",raw:n,href:i,title:o,text:mn(s)}}function Op(e,t){const n=e.match(/^(\s+)(?:```)/);if(n===null)return t;const r=n[1];return t.split(`
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./data-grid-overlay-editor.C9AINtRf.js","./index.DBIoNOen.js","../css/index.C8MrxwGF.css","./withFullScreenWrapper.DP61hzLF.js","./Toolbar.mUe2Nmta.js","./FormClearHelper.CyGGPn10.js","./moment.C7qA8nIE.js","./pandasStylerUtils.BqWaUzvh.js","./numbro.B9_PXfzp.js","./_baseIndexOf.BTknn6Gb.js","./index.8HslT92O.js","./main.fMmyxXOf.js","./throttle.DlZC3xNA.js","./toConsumableArray.CZW4AmuW.js","./formatNumber.CCeQsvJQ.js","./sprintfjs.BlFBKfMf.js","./formatMoment.C6Hwn6X5.js","./checkbox.GY4JoJkM.js","./createDownloadLinkElement.BWJh90jh.js","./FileDownload.esm.D5koxJhf.js","./_arrayIncludes.B19Iyn2B.js","./number-overlay-editor.C0n-91sR.js","./es6.eb5oR8iN.js"])))=>i.map(i=>d[i]);
2
+ import{at as Ya,dh as lh,di as sh,cO as gc,dj as uh,dk as ch,dl as dh,dm as fh,dn as hh,dp as gh,dq as Xa,dr as pc,a_ as ph,a$ as mh,r as f,E as Pl,_ as Ve,G as ja,an as mo,bH as vh,ds as bh,aD as zt,dt as wh,N as kr,du as Os,aR as Ll,J as yh,e as Ee,bI as mc,n as ct,dv as Ch,j as Ie,dw as Sh,z as Fn,dx as rr,db as ur,dy as Le,dz as Fe,d0 as _o,cY as xh,al as vc,dA as bc,a3 as kh,cZ as Mh,c_ as Rh,c$ as Ih,d2 as Eh,bx as wc,ac as en,bA as Th,af as Dh,dB as Oh,dC as Ph,m as vo,b8 as bi,dD as Lh,aS as Fh,dE as _h,dF as yc,ci as Ah,cg as Hh,dG as Cc,dH as zh,dI as Vh,cf as Sc,cj as $h,dJ as Nh,ce as Bh,dK as Wh,by as Uh,bz as Gh,cl as Yh,dL as Xh,O as jh,dM as qh,cm as Kh,dN as Zh,Q as Jh,l as Ur,dO as Xt,V as Fl,d4 as Qh,dP as eg,dQ as tg,bC as qa,bW as ng,$ as xc,ay as wa,dR as kc,o as pn,Y as Gn,aM as ya,aK as rg,aL as Mc,dS as ig,q as og,W as Ps,dT as ag,dU as lg,k as sg,L as ug,dV as cg,s as Ls}from"./index.DBIoNOen.js";import{w as dg,E as fg}from"./withFullScreenWrapper.DP61hzLF.js";import{T as hg,a as mi}from"./Toolbar.mUe2Nmta.js";import{u as gg}from"./FormClearHelper.CyGGPn10.js";import{h as $r}from"./moment.C7qA8nIE.js";import{r as pg,m as Fs,f as vl,c as mg,a as vg}from"./pandasStylerUtils.BqWaUzvh.js";import{n as bg}from"./numbro.B9_PXfzp.js";import{l as Ka}from"./index.8HslT92O.js";import{R as wg}from"./main.fMmyxXOf.js";import{d as Rc,t as yg}from"./throttle.DlZC3xNA.js";import{_ as Mi,C as Cg}from"./toConsumableArray.CZW4AmuW.js";import{f as ra}from"./formatNumber.CCeQsvJQ.js";import{f as _s}from"./formatMoment.C6Hwn6X5.js";import{L as Sg,a as xg,S as kg}from"./checkbox.GY4JoJkM.js";import{c as Mg}from"./createDownloadLinkElement.BWJh90jh.js";import{D as Rg,F as Ig}from"./FileDownload.esm.D5koxJhf.js";import{a as Eg}from"./_arrayIncludes.B19Iyn2B.js";function Tg(){}function Dg(e,t,n){return e===e&&(n!==void 0&&(e=e<=n?e:n),t!==void 0&&(e=e>=t?e:t)),e}function Vn(e,t,n){return n===void 0&&(n=t,t=void 0),n!==void 0&&(n=Ya(n),n=n===n?n:0),t!==void 0&&(t=Ya(t),t=t===t?t:0),Dg(Ya(e),t,n)}var Og=Object.prototype,Pg=Og.hasOwnProperty;function Lg(e,t){return e!=null&&Pg.call(e,t)}function Fg(e,t){return e!=null&&lh(e,t,Lg)}var _g="[object Map]",Ag="[object Set]",Hg=Object.prototype,zg=Hg.hasOwnProperty;function Vg(e){if(e==null)return!0;if(sh(e)&&(gc(e)||typeof e=="string"||typeof e.splice=="function"||uh(e)||ch(e)||dh(e)))return!e.length;var t=fh(e);if(t==_g||t==Ag)return!e.size;if(hh(e))return!gh(e).length;for(var n in e)if(zg.call(e,n))return!1;return!0}var $g=1/0,Ng=Xa&&1/pc(new Xa([,-0]))[1]==$g?function(e){return new Xa(e)}:Tg,Bg=200;function Wg(e,t,n){var r=-1,i=Eg,o=e.length,s=!0,a=[],l=a;if(o>=Bg){var u=Ng(e);if(u)return pc(u);s=!1,i=mh,l=new ph}else l=a;e:for(;++r<o;){var c=e[r],d=c;if(c=c!==0?c:0,s&&d===d){for(var g=l.length;g--;)if(l[g]===d)continue e;a.push(c)}else i(l,d,n)||(l!==a&&l.push(d),a.push(c))}return a}function Ug(e){return e&&e.length?Wg(e):[]}var Ic=f.forwardRef(function(e,t){var n={fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"};return f.createElement(Pl,Ve({iconAttrs:n,iconVerticalAlign:"middle",iconViewBox:"0 0 24 24"},e,{ref:t}),f.createElement("path",{fill:"none",d:"M0 0h24v24H0V0z"}),f.createElement("path",{d:"M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z"}))});Ic.displayName="Add";var Ec=f.forwardRef(function(e,t){var n={fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"};return f.createElement(Pl,Ve({iconAttrs:n,iconVerticalAlign:"middle",iconViewBox:"0 0 24 24"},e,{ref:t}),f.createElement("path",{fill:"none",d:"M0 0h24v24H0V0z"}),f.createElement("path",{d:"M15.5 14h-.79l-.28-.27A6.471 6.471 0 0016 9.5 6.5 6.5 0 109.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19l-4.99-5zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14z"}))});Ec.displayName="Search";var Tc=f.forwardRef(function(e,t){var n={fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"};return f.createElement(Pl,Ve({iconAttrs:n,iconVerticalAlign:"middle",iconViewBox:"0 0 24 24"},e,{ref:t}),f.createElement("path",{fill:"none",d:"M0 0h24v24H0V0z"}),f.createElement("path",{d:"M12 6a9.77 9.77 0 018.82 5.5C19.17 14.87 15.79 17 12 17s-7.17-2.13-8.82-5.5A9.77 9.77 0 0112 6m0-2C7 4 2.73 7.11 1 11.5 2.73 15.89 7 19 12 19s9.27-3.11 11-7.5C21.27 7.11 17 4 12 4zm0 5a2.5 2.5 0 010 5 2.5 2.5 0 010-5m0-2c-2.48 0-4.5 2.02-4.5 4.5S9.52 16 12 16s4.5-2.02 4.5-4.5S14.48 7 12 7z"}))});Tc.displayName="Visibility";function Dc(e="This should not happen"){throw new Error(e)}function Pn(e,t="Assertion failed"){if(!e)return Dc(t)}function lo(e,t){return Dc(t??"Hell froze over")}function Gg(e,t){try{return e()}catch{return t}}const As=Object.prototype.hasOwnProperty;function Ii(e,t){let n,r;if(e===t)return!0;if(e&&t&&(n=e.constructor)===t.constructor){if(n===Date)return e.getTime()===t.getTime();if(n===RegExp)return e.toString()===t.toString();if(n===Array){if((r=e.length)===t.length)for(;r--&&Ii(e[r],t[r]););return r===-1}if(!n||typeof e=="object"){r=0;for(n in e)if(As.call(e,n)&&++r&&!As.call(t,n)||!(n in t)||!Ii(e[n],t[n]))return!1;return Object.keys(t).length===r}}return e!==e&&t!==t}const ia=null,_l=void 0;var Z;(function(e){e.Uri="uri",e.Text="text",e.Image="image",e.RowID="row-id",e.Number="number",e.Bubble="bubble",e.Boolean="boolean",e.Loading="loading",e.Markdown="markdown",e.Drilldown="drilldown",e.Protected="protected",e.Custom="custom"})(Z||(Z={}));var Hs;(function(e){e.HeaderRowID="headerRowID",e.HeaderCode="headerCode",e.HeaderNumber="headerNumber",e.HeaderString="headerString",e.HeaderBoolean="headerBoolean",e.HeaderAudioUri="headerAudioUri",e.HeaderVideoUri="headerVideoUri",e.HeaderEmoji="headerEmoji",e.HeaderImage="headerImage",e.HeaderUri="headerUri",e.HeaderPhone="headerPhone",e.HeaderMarkdown="headerMarkdown",e.HeaderDate="headerDate",e.HeaderTime="headerTime",e.HeaderEmail="headerEmail",e.HeaderReference="headerReference",e.HeaderIfThenElse="headerIfThenElse",e.HeaderSingleValue="headerSingleValue",e.HeaderLookup="headerLookup",e.HeaderTextTemplate="headerTextTemplate",e.HeaderMath="headerMath",e.HeaderRollup="headerRollup",e.HeaderJoinStrings="headerJoinStrings",e.HeaderSplitString="headerSplitString",e.HeaderGeoDistance="headerGeoDistance",e.HeaderArray="headerArray",e.RowOwnerOverlay="rowOwnerOverlay",e.ProtectedColumnOverlay="protectedColumnOverlay"})(Hs||(Hs={}));var oa;(function(e){e.Triangle="triangle",e.Dots="dots"})(oa||(oa={}));function Ao(e){return"width"in e&&typeof e.width=="number"}async function zs(e){return typeof e=="object"?e:await e()}function wi(e){return!(e.kind===Z.Loading||e.kind===Z.Bubble||e.kind===Z.RowID||e.kind===Z.Protected||e.kind===Z.Drilldown)}function Si(e){return e.kind===$n.Marker||e.kind===$n.NewRow}function yi(e){if(!wi(e)||e.kind===Z.Image)return!1;switch(e.kind){case Z.Text:case Z.Number:case Z.Markdown:case Z.Uri:case Z.Custom:case Z.Boolean:return e.readonly!==!0;default:lo(e,"A cell was passed with an invalid kind")}}function Yg(e){return Fg(e,"editor")}function Al(e){return!(e.readonly??!1)}var $n;(function(e){e.NewRow="new-row",e.Marker="marker"})($n||($n={}));const aa={shape:"square",size:4,offsetX:-2,offsetY:-2,outline:0};function Za(e){if(e.length===0)return[];const t=[...e],n=[];t.sort(function(r,i){return r[0]-i[0]}),n.push([...t[0]]);for(const r of t.slice(1)){const i=n[n.length-1];i[1]<r[0]?n.push([...r]):i[1]<r[1]&&(i[1]=r[1])}return n}let Vs;class Qe{items;constructor(t){this.items=t}static create=t=>new Qe(Za(t));static empty=()=>Vs??(Vs=new Qe([]));static fromSingleSelection=t=>Qe.empty().add(t);static fromArray=t=>{if(t.length===0)return Qe.empty();const n=t.map(i=>[i,i+1]),r=Za(n);return new Qe(r)};offset(t){if(t===0)return this;const n=this.items.map(r=>[r[0]+t,r[1]+t]);return new Qe(n)}add(t){const n=typeof t=="number"?[t,t+1]:t,r=Za([...this.items,n]);return new Qe(r)}remove(t){const n=[...this.items],r=typeof t=="number"?t:t[0],i=typeof t=="number"?t+1:t[1];for(const[o,s]of n.entries()){const[a,l]=s;if(a<=i&&r<=l){const u=[];a<r&&u.push([a,r]),i<l&&u.push([i,l]),n.splice(o,1,...u)}}return new Qe(n)}first(){if(this.items.length!==0)return this.items[0][0]}last(){if(this.items.length!==0)return this.items.slice(-1)[0][1]-1}hasIndex(t){for(let n=0;n<this.items.length;n++){const[r,i]=this.items[n];if(t>=r&&t<i)return!0}return!1}hasAll(t){for(let n=t[0];n<t[1];n++)if(!this.hasIndex(n))return!1;return!0}some(t){for(const n of this)if(t(n))return!0;return!1}equals(t){if(t===this)return!0;if(t.items.length!==this.items.length)return!1;for(let n=0;n<this.items.length;n++){const r=t.items[n],i=this.items[n];if(r[0]!==i[0]||r[1]!==i[1])return!1}return!0}toArray(){const t=[];for(const[n,r]of this.items)for(let i=n;i<r;i++)t.push(i);return t}get length(){let t=0;for(const[n,r]of this.items)t+=r-n;return t}*[Symbol.iterator](){for(const[t,n]of this.items)for(let r=t;r<n;r++)yield r}}var Xg=function(){const t=Array.prototype.slice.call(arguments).filter(Boolean),n={},r=[];t.forEach(o=>{(o?o.split(" "):[]).forEach(a=>{if(a.startsWith("atm_")){const[,l]=a.split("_");n[l]=a}else r.push(a)})});const i=[];for(const o in n)Object.prototype.hasOwnProperty.call(n,o)&&i.push(n[o]);return i.push(...r),i.join(" ")},$s=Xg,jg=e=>e.toUpperCase()===e,qg=e=>t=>e.indexOf(t)===-1,Oc=(e,t)=>{const n={};return Object.keys(e).filter(qg(t)).forEach(r=>{n[r]=e[r]}),n};function Kg(e,t,n){const r=Oc(t,n);if(!e){const i=typeof ja=="function"?{default:ja}:ja;Object.keys(r).forEach(o=>{i.default(o)||delete r[o]})}return r}var Zg=(e,t)=>{};function Jg(e){let t="";return n=>{const r=(o,s)=>{const{as:a=e,class:l=t}=o,u=n.propsAsIs===void 0?!(typeof a=="string"&&a.indexOf("-")===-1&&!jg(a[0])):n.propsAsIs,c=Kg(u,o,["as","class"]);c.ref=s,c.className=n.atomic?$s(n.class,c.className||l):$s(c.className||l,n.class);const{vars:d}=n;if(d){const g={};for(const m in d){const y=d[m],v=y[0],b=y[1]||"",x=typeof v=="function"?v(o):v;Zg(x,n.name),g[`--${m}`]=`${x}${b}`}const h=c.style||{},p=Object.keys(h);p.length>0&&p.forEach(m=>{g[m]=h[m]}),c.style=g}return e.__wyw_meta&&e!==a?(c.as=a,f.createElement(e,c)):f.createElement(a,c)},i=f.forwardRef?f.forwardRef(r):(o=>{const s=Oc(o,["innerRef"]);return r(s,o.innerRef)});return i.displayName=n.name,i.__wyw_meta={className:n.class||t,extends:e},i}}var dn=Jg;const Qg=dn("div")({name:"ImageOverlayEditorStyle",class:"gdg-i2iowwq",propsAsIs:!1});var Ja={},Wi={},Ho={},zo={},Ns;function ep(){return Ns||(Ns=1,(function(e){(function(t,n){n(e,mo(),vh())})(zo,function(t,n,r){Object.defineProperty(t,"__esModule",{value:!0}),t.setHasSupportToCaptureOption=p;var i=s(n),o=s(r);function s(b){return b&&b.__esModule?b:{default:b}}var a=Object.assign||function(b){for(var x=1;x<arguments.length;x++){var T=arguments[x];for(var k in T)Object.prototype.hasOwnProperty.call(T,k)&&(b[k]=T[k])}return b};function l(b,x){var T={};for(var k in b)x.indexOf(k)>=0||Object.prototype.hasOwnProperty.call(b,k)&&(T[k]=b[k]);return T}function u(b,x){if(!(b instanceof x))throw new TypeError("Cannot call a class as a function")}var c=(function(){function b(x,T){for(var k=0;k<T.length;k++){var R=T[k];R.enumerable=R.enumerable||!1,R.configurable=!0,"value"in R&&(R.writable=!0),Object.defineProperty(x,R.key,R)}}return function(x,T,k){return T&&b(x.prototype,T),k&&b(x,k),x}})();function d(b,x){if(!b)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return x&&(typeof x=="object"||typeof x=="function")?x:b}function g(b,x){if(typeof x!="function"&&x!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof x);b.prototype=Object.create(x&&x.prototype,{constructor:{value:b,enumerable:!1,writable:!0,configurable:!0}}),x&&(Object.setPrototypeOf?Object.setPrototypeOf(b,x):b.__proto__=x)}var h=!1;function p(b){h=b}try{addEventListener("test",null,Object.defineProperty({},"capture",{get:function(){p(!0)}}))}catch{}function m(){var b=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{capture:!0};return h?b:b.capture}function y(b){if("touches"in b){var x=b.touches[0],T=x.pageX,k=x.pageY;return{x:T,y:k}}var R=b.screenX,P=b.screenY;return{x:R,y:P}}var v=(function(b){g(x,b);function x(){var T;u(this,x);for(var k=arguments.length,R=Array(k),P=0;P<k;P++)R[P]=arguments[P];var I=d(this,(T=x.__proto__||Object.getPrototypeOf(x)).call.apply(T,[this].concat(R)));return I._handleSwipeStart=I._handleSwipeStart.bind(I),I._handleSwipeMove=I._handleSwipeMove.bind(I),I._handleSwipeEnd=I._handleSwipeEnd.bind(I),I._onMouseDown=I._onMouseDown.bind(I),I._onMouseMove=I._onMouseMove.bind(I),I._onMouseUp=I._onMouseUp.bind(I),I._setSwiperRef=I._setSwiperRef.bind(I),I}return c(x,[{key:"componentDidMount",value:function(){this.swiper&&this.swiper.addEventListener("touchmove",this._handleSwipeMove,m({capture:!0,passive:!1}))}},{key:"componentWillUnmount",value:function(){this.swiper&&this.swiper.removeEventListener("touchmove",this._handleSwipeMove,m({capture:!0,passive:!1}))}},{key:"_onMouseDown",value:function(k){this.props.allowMouseEvents&&(this.mouseDown=!0,document.addEventListener("mouseup",this._onMouseUp),document.addEventListener("mousemove",this._onMouseMove),this._handleSwipeStart(k))}},{key:"_onMouseMove",value:function(k){this.mouseDown&&this._handleSwipeMove(k)}},{key:"_onMouseUp",value:function(k){this.mouseDown=!1,document.removeEventListener("mouseup",this._onMouseUp),document.removeEventListener("mousemove",this._onMouseMove),this._handleSwipeEnd(k)}},{key:"_handleSwipeStart",value:function(k){var R=y(k),P=R.x,I=R.y;this.moveStart={x:P,y:I},this.props.onSwipeStart(k)}},{key:"_handleSwipeMove",value:function(k){if(this.moveStart){var R=y(k),P=R.x,I=R.y,C=P-this.moveStart.x,F=I-this.moveStart.y;this.moving=!0;var D=this.props.onSwipeMove({x:C,y:F},k);D&&k.cancelable&&k.preventDefault(),this.movePosition={deltaX:C,deltaY:F}}}},{key:"_handleSwipeEnd",value:function(k){this.props.onSwipeEnd(k);var R=this.props.tolerance;this.moving&&this.movePosition&&(this.movePosition.deltaX<-R?this.props.onSwipeLeft(1,k):this.movePosition.deltaX>R&&this.props.onSwipeRight(1,k),this.movePosition.deltaY<-R?this.props.onSwipeUp(1,k):this.movePosition.deltaY>R&&this.props.onSwipeDown(1,k)),this.moveStart=null,this.moving=!1,this.movePosition=null}},{key:"_setSwiperRef",value:function(k){this.swiper=k,this.props.innerRef(k)}},{key:"render",value:function(){var k=this.props;k.tagName;var R=k.className,P=k.style,I=k.children;k.allowMouseEvents,k.onSwipeUp,k.onSwipeDown,k.onSwipeLeft,k.onSwipeRight,k.onSwipeStart,k.onSwipeMove,k.onSwipeEnd,k.innerRef,k.tolerance;var C=l(k,["tagName","className","style","children","allowMouseEvents","onSwipeUp","onSwipeDown","onSwipeLeft","onSwipeRight","onSwipeStart","onSwipeMove","onSwipeEnd","innerRef","tolerance"]);return i.default.createElement(this.props.tagName,a({ref:this._setSwiperRef,onMouseDown:this._onMouseDown,onTouchStart:this._handleSwipeStart,onTouchEnd:this._handleSwipeEnd,className:R,style:P},C),I)}}]),x})(n.Component);v.displayName="ReactSwipe",v.propTypes={tagName:o.default.string,className:o.default.string,style:o.default.object,children:o.default.node,allowMouseEvents:o.default.bool,onSwipeUp:o.default.func,onSwipeDown:o.default.func,onSwipeLeft:o.default.func,onSwipeRight:o.default.func,onSwipeStart:o.default.func,onSwipeMove:o.default.func,onSwipeEnd:o.default.func,innerRef:o.default.func,tolerance:o.default.number.isRequired},v.defaultProps={tagName:"div",allowMouseEvents:!1,onSwipeUp:function(){},onSwipeDown:function(){},onSwipeLeft:function(){},onSwipeRight:function(){},onSwipeStart:function(){},onSwipeMove:function(){},onSwipeEnd:function(){},innerRef:function(){},tolerance:0},t.default=v})})(zo)),zo}var Bs;function Pc(){return Bs||(Bs=1,(function(e){(function(t,n){n(e,ep())})(Ho,function(t,n){Object.defineProperty(t,"__esModule",{value:!0});var r=i(n);function i(o){return o&&o.__esModule?o:{default:o}}t.default=r.default})})(Ho)),Ho}var Ui={},Ws;function Lc(){if(Ws)return Ui;Ws=1,Object.defineProperty(Ui,"__esModule",{value:!0}),Ui.default=void 0;var e=t(bh());function t(i){return i&&i.__esModule?i:{default:i}}function n(i,o,s){return o in i?Object.defineProperty(i,o,{value:s,enumerable:!0,configurable:!0,writable:!0}):i[o]=s,i}var r={ROOT:function(o){return(0,e.default)(n({"carousel-root":!0},o||"",!!o))},CAROUSEL:function(o){return(0,e.default)({carousel:!0,"carousel-slider":o})},WRAPPER:function(o,s){return(0,e.default)({"thumbs-wrapper":!o,"slider-wrapper":o,"axis-horizontal":s==="horizontal","axis-vertical":s!=="horizontal"})},SLIDER:function(o,s){return(0,e.default)({thumbs:!o,slider:o,animated:!s})},ITEM:function(o,s,a){return(0,e.default)({thumb:!o,slide:o,selected:s,previous:a})},ARROW_PREV:function(o){return(0,e.default)({"control-arrow control-prev":!0,"control-disabled":o})},ARROW_NEXT:function(o){return(0,e.default)({"control-arrow control-next":!0,"control-disabled":o})},DOT:function(o){return(0,e.default)({dot:!0,selected:o})}};return Ui.default=r,Ui}var Gi={},Yi={},Us;function tp(){if(Us)return Yi;Us=1,Object.defineProperty(Yi,"__esModule",{value:!0}),Yi.outerWidth=void 0;var e=function(n){var r=n.offsetWidth,i=getComputedStyle(n);return r+=parseInt(i.marginLeft)+parseInt(i.marginRight),r};return Yi.outerWidth=e,Yi}var Xi={},Gs;function Hl(){if(Gs)return Xi;Gs=1,Object.defineProperty(Xi,"__esModule",{value:!0}),Xi.default=void 0;var e=function(n,r,i){var o=n===0?n:n+r,s=i==="horizontal"?[o,0,0]:[0,o,0],a="translate3d",l="("+s.join(",")+")";return a+l};return Xi.default=e,Xi}var ji={},Ys;function Fc(){if(Ys)return ji;Ys=1,Object.defineProperty(ji,"__esModule",{value:!0}),ji.default=void 0;var e=function(){return window};return ji.default=e,ji}var Xs;function _c(){if(Xs)return Gi;Xs=1,Object.defineProperty(Gi,"__esModule",{value:!0}),Gi.default=void 0;var e=l(mo()),t=s(Lc()),n=tp(),r=s(Hl()),i=s(Pc()),o=s(Fc());function s(I){return I&&I.__esModule?I:{default:I}}function a(){if(typeof WeakMap!="function")return null;var I=new WeakMap;return a=function(){return I},I}function l(I){if(I&&I.__esModule)return I;if(I===null||u(I)!=="object"&&typeof I!="function")return{default:I};var C=a();if(C&&C.has(I))return C.get(I);var F={},D=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var S in I)if(Object.prototype.hasOwnProperty.call(I,S)){var E=D?Object.getOwnPropertyDescriptor(I,S):null;E&&(E.get||E.set)?Object.defineProperty(F,S,E):F[S]=I[S]}return F.default=I,C&&C.set(I,F),F}function u(I){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?u=function(F){return typeof F}:u=function(F){return F&&typeof Symbol=="function"&&F.constructor===Symbol&&F!==Symbol.prototype?"symbol":typeof F},u(I)}function c(){return c=Object.assign||function(I){for(var C=1;C<arguments.length;C++){var F=arguments[C];for(var D in F)Object.prototype.hasOwnProperty.call(F,D)&&(I[D]=F[D])}return I},c.apply(this,arguments)}function d(I,C){if(!(I instanceof C))throw new TypeError("Cannot call a class as a function")}function g(I,C){for(var F=0;F<C.length;F++){var D=C[F];D.enumerable=D.enumerable||!1,D.configurable=!0,"value"in D&&(D.writable=!0),Object.defineProperty(I,D.key,D)}}function h(I,C,F){return C&&g(I.prototype,C),I}function p(I,C){if(typeof C!="function"&&C!==null)throw new TypeError("Super expression must either be null or a function");I.prototype=Object.create(C&&C.prototype,{constructor:{value:I,writable:!0,configurable:!0}}),C&&m(I,C)}function m(I,C){return m=Object.setPrototypeOf||function(D,S){return D.__proto__=S,D},m(I,C)}function y(I){var C=x();return function(){var D=T(I),S;if(C){var E=T(this).constructor;S=Reflect.construct(D,arguments,E)}else S=D.apply(this,arguments);return v(this,S)}}function v(I,C){return C&&(u(C)==="object"||typeof C=="function")?C:b(I)}function b(I){if(I===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return I}function x(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}function T(I){return T=Object.setPrototypeOf?Object.getPrototypeOf:function(F){return F.__proto__||Object.getPrototypeOf(F)},T(I)}function k(I,C,F){return C in I?Object.defineProperty(I,C,{value:F,enumerable:!0,configurable:!0,writable:!0}):I[C]=F,I}var R=function(C){return C.hasOwnProperty("key")},P=(function(I){p(F,I);var C=y(F);function F(D){var S;return d(this,F),S=C.call(this,D),k(b(S),"itemsWrapperRef",void 0),k(b(S),"itemsListRef",void 0),k(b(S),"thumbsRef",void 0),k(b(S),"setItemsWrapperRef",function(E){S.itemsWrapperRef=E}),k(b(S),"setItemsListRef",function(E){S.itemsListRef=E}),k(b(S),"setThumbsRef",function(E,O){S.thumbsRef||(S.thumbsRef=[]),S.thumbsRef[O]=E}),k(b(S),"updateSizes",function(){if(!(!S.props.children||!S.itemsWrapperRef||!S.thumbsRef)){var E=e.Children.count(S.props.children),O=S.itemsWrapperRef.clientWidth,M=S.props.thumbWidth?S.props.thumbWidth:(0,n.outerWidth)(S.thumbsRef[0]),V=Math.floor(O/M),W=V<E,j=W?E-V:0;S.setState(function(oe,Q){return{itemSize:M,visibleItems:V,firstItem:W?S.getFirstItem(Q.selectedItem):0,lastPosition:j,showArrows:W}})}}),k(b(S),"handleClickItem",function(E,O,M){if(!R(M)||M.key==="Enter"){var V=S.props.onSelectItem;typeof V=="function"&&V(E,O)}}),k(b(S),"onSwipeStart",function(){S.setState({swiping:!0})}),k(b(S),"onSwipeEnd",function(){S.setState({swiping:!1})}),k(b(S),"onSwipeMove",function(E){var O=E.x;if(!S.state.itemSize||!S.itemsWrapperRef||!S.state.visibleItems)return!1;var M=0,V=e.Children.count(S.props.children),W=-(S.state.firstItem*100)/S.state.visibleItems,j=Math.max(V-S.state.visibleItems,0),oe=-j*100/S.state.visibleItems;W===M&&O>0&&(O=0),W===oe&&O<0&&(O=0);var Q=S.itemsWrapperRef.clientWidth,re=W+100/(Q/O);return S.itemsListRef&&["WebkitTransform","MozTransform","MsTransform","OTransform","transform","msTransform"].forEach(function(se){S.itemsListRef.style[se]=(0,r.default)(re,"%",S.props.axis)}),!0}),k(b(S),"slideRight",function(E){S.moveTo(S.state.firstItem-(typeof E=="number"?E:1))}),k(b(S),"slideLeft",function(E){S.moveTo(S.state.firstItem+(typeof E=="number"?E:1))}),k(b(S),"moveTo",function(E){E=E<0?0:E,E=E>=S.state.lastPosition?S.state.lastPosition:E,S.setState({firstItem:E})}),S.state={selectedItem:D.selectedItem,swiping:!1,showArrows:!1,firstItem:0,visibleItems:0,lastPosition:0},S}return h(F,[{key:"componentDidMount",value:function(){this.setupThumbs()}},{key:"componentDidUpdate",value:function(S){this.props.selectedItem!==this.state.selectedItem&&this.setState({selectedItem:this.props.selectedItem,firstItem:this.getFirstItem(this.props.selectedItem)}),this.props.children!==S.children&&this.updateSizes()}},{key:"componentWillUnmount",value:function(){this.destroyThumbs()}},{key:"setupThumbs",value:function(){(0,o.default)().addEventListener("resize",this.updateSizes),(0,o.default)().addEventListener("DOMContentLoaded",this.updateSizes),this.updateSizes()}},{key:"destroyThumbs",value:function(){(0,o.default)().removeEventListener("resize",this.updateSizes),(0,o.default)().removeEventListener("DOMContentLoaded",this.updateSizes)}},{key:"getFirstItem",value:function(S){var E=S;return S>=this.state.lastPosition&&(E=this.state.lastPosition),S<this.state.firstItem+this.state.visibleItems&&(E=this.state.firstItem),S<this.state.firstItem&&(E=S),E}},{key:"renderItems",value:function(){var S=this;return this.props.children.map(function(E,O){var M=t.default.ITEM(!1,O===S.state.selectedItem),V={key:O,ref:function(j){return S.setThumbsRef(j,O)},className:M,onClick:S.handleClickItem.bind(S,O,S.props.children[O]),onKeyDown:S.handleClickItem.bind(S,O,S.props.children[O]),"aria-label":"".concat(S.props.labels.item," ").concat(O+1),style:{width:S.props.thumbWidth}};return e.default.createElement("li",c({},V,{role:"button",tabIndex:0}),E)})}},{key:"render",value:function(){var S=this;if(!this.props.children)return null;var E=e.Children.count(this.props.children)>1,O=this.state.showArrows&&this.state.firstItem>0,M=this.state.showArrows&&this.state.firstItem<this.state.lastPosition,V={},W=-this.state.firstItem*(this.state.itemSize||0),j=(0,r.default)(W,"px",this.props.axis),oe=this.props.transitionTime+"ms";return V={WebkitTransform:j,MozTransform:j,MsTransform:j,OTransform:j,transform:j,msTransform:j,WebkitTransitionDuration:oe,MozTransitionDuration:oe,MsTransitionDuration:oe,OTransitionDuration:oe,transitionDuration:oe,msTransitionDuration:oe},e.default.createElement("div",{className:t.default.CAROUSEL(!1)},e.default.createElement("div",{className:t.default.WRAPPER(!1),ref:this.setItemsWrapperRef},e.default.createElement("button",{type:"button",className:t.default.ARROW_PREV(!O),onClick:function(){return S.slideRight()},"aria-label":this.props.labels.leftArrow}),E?e.default.createElement(i.default,{tagName:"ul",className:t.default.SLIDER(!1,this.state.swiping),onSwipeLeft:this.slideLeft,onSwipeRight:this.slideRight,onSwipeMove:this.onSwipeMove,onSwipeStart:this.onSwipeStart,onSwipeEnd:this.onSwipeEnd,style:V,innerRef:this.setItemsListRef,allowMouseEvents:this.props.emulateTouch},this.renderItems()):e.default.createElement("ul",{className:t.default.SLIDER(!1,this.state.swiping),ref:function(re){return S.setItemsListRef(re)},style:V},this.renderItems()),e.default.createElement("button",{type:"button",className:t.default.ARROW_NEXT(!M),onClick:function(){return S.slideLeft()},"aria-label":this.props.labels.rightArrow})))}}]),F})(e.Component);return Gi.default=P,k(P,"displayName","Thumbs"),k(P,"defaultProps",{axis:"horizontal",labels:{leftArrow:"previous slide / item",rightArrow:"next slide / item",item:"slide item"},selectedItem:0,thumbWidth:80,transitionTime:350}),Gi}var qi={},js;function np(){if(js)return qi;js=1,Object.defineProperty(qi,"__esModule",{value:!0}),qi.default=void 0;var e=function(){return document};return qi.default=e,qi}var On={},qs;function Ac(){if(qs)return On;qs=1,Object.defineProperty(On,"__esModule",{value:!0}),On.setPosition=On.getPosition=On.isKeyboardEvent=On.defaultStatusFormatter=On.noop=void 0;var e=mo(),t=n(Hl());function n(l){return l&&l.__esModule?l:{default:l}}var r=function(){};On.noop=r;var i=function(u,c){return"".concat(u," of ").concat(c)};On.defaultStatusFormatter=i;var o=function(u){return u?u.hasOwnProperty("key"):!1};On.isKeyboardEvent=o;var s=function(u,c){if(c.infiniteLoop&&++u,u===0)return 0;var d=e.Children.count(c.children);if(c.centerMode&&c.axis==="horizontal"){var g=-u*c.centerSlidePercentage,h=d-1;return u&&(u!==h||c.infiniteLoop)?g+=(100-c.centerSlidePercentage)/2:u===h&&(g+=100-c.centerSlidePercentage),g}return-u*100};On.getPosition=s;var a=function(u,c){var d={};return["WebkitTransform","MozTransform","MsTransform","OTransform","transform","msTransform"].forEach(function(g){d[g]=(0,t.default)(u,"%",c)}),d};return On.setPosition=a,On}var Un={},Ks;function rp(){if(Ks)return Un;Ks=1,Object.defineProperty(Un,"__esModule",{value:!0}),Un.fadeAnimationHandler=Un.slideStopSwipingHandler=Un.slideSwipeAnimationHandler=Un.slideAnimationHandler=void 0;var e=mo(),t=r(Hl()),n=Ac();function r(d){return d&&d.__esModule?d:{default:d}}function i(d,g){var h=Object.keys(d);if(Object.getOwnPropertySymbols){var p=Object.getOwnPropertySymbols(d);g&&(p=p.filter(function(m){return Object.getOwnPropertyDescriptor(d,m).enumerable})),h.push.apply(h,p)}return h}function o(d){for(var g=1;g<arguments.length;g++){var h=arguments[g]!=null?arguments[g]:{};g%2?i(Object(h),!0).forEach(function(p){s(d,p,h[p])}):Object.getOwnPropertyDescriptors?Object.defineProperties(d,Object.getOwnPropertyDescriptors(h)):i(Object(h)).forEach(function(p){Object.defineProperty(d,p,Object.getOwnPropertyDescriptor(h,p))})}return d}function s(d,g,h){return g in d?Object.defineProperty(d,g,{value:h,enumerable:!0,configurable:!0,writable:!0}):d[g]=h,d}var a=function(g,h){var p={},m=h.selectedItem,y=m,v=e.Children.count(g.children)-1,b=g.infiniteLoop&&(m<0||m>v);if(b)return y<0?g.centerMode&&g.centerSlidePercentage&&g.axis==="horizontal"?p.itemListStyle=(0,n.setPosition)(-(v+2)*g.centerSlidePercentage-(100-g.centerSlidePercentage)/2,g.axis):p.itemListStyle=(0,n.setPosition)(-(v+2)*100,g.axis):y>v&&(p.itemListStyle=(0,n.setPosition)(0,g.axis)),p;var x=(0,n.getPosition)(m,g),T=(0,t.default)(x,"%",g.axis),k=g.transitionTime+"ms";return p.itemListStyle={WebkitTransform:T,msTransform:T,OTransform:T,transform:T},h.swiping||(p.itemListStyle=o(o({},p.itemListStyle),{},{WebkitTransitionDuration:k,MozTransitionDuration:k,OTransitionDuration:k,transitionDuration:k,msTransitionDuration:k})),p};Un.slideAnimationHandler=a;var l=function(g,h,p,m){var y={},v=h.axis==="horizontal",b=e.Children.count(h.children),x=0,T=(0,n.getPosition)(p.selectedItem,h),k=h.infiniteLoop?(0,n.getPosition)(b-1,h)-100:(0,n.getPosition)(b-1,h),R=v?g.x:g.y,P=R;T===x&&R>0&&(P=0),T===k&&R<0&&(P=0);var I=T+100/(p.itemSize/P),C=Math.abs(R)>h.swipeScrollTolerance;return h.infiniteLoop&&C&&(p.selectedItem===0&&I>-100?I-=b*100:p.selectedItem===b-1&&I<-b*100&&(I+=b*100)),(!h.preventMovementUntilSwipeScrollTolerance||C||p.swipeMovementStarted)&&(p.swipeMovementStarted||m({swipeMovementStarted:!0}),y.itemListStyle=(0,n.setPosition)(I,h.axis)),C&&!p.cancelClick&&m({cancelClick:!0}),y};Un.slideSwipeAnimationHandler=l;var u=function(g,h){var p=(0,n.getPosition)(h.selectedItem,g),m=(0,n.setPosition)(p,g.axis);return{itemListStyle:m}};Un.slideStopSwipingHandler=u;var c=function(g,h){var p=g.transitionTime+"ms",m="ease-in-out",y={position:"absolute",display:"block",zIndex:-2,minHeight:"100%",opacity:0,top:0,right:0,left:0,bottom:0,transitionTimingFunction:m,msTransitionTimingFunction:m,MozTransitionTimingFunction:m,WebkitTransitionTimingFunction:m,OTransitionTimingFunction:m};return h.swiping||(y=o(o({},y),{},{WebkitTransitionDuration:p,MozTransitionDuration:p,OTransitionDuration:p,transitionDuration:p,msTransitionDuration:p})),{slideStyle:y,selectedStyle:o(o({},y),{},{opacity:1,position:"relative"}),prevStyle:o({},y)}};return Un.fadeAnimationHandler=c,Un}var Zs;function ip(){if(Zs)return Wi;Zs=1,Object.defineProperty(Wi,"__esModule",{value:!0}),Wi.default=void 0;var e=c(mo()),t=l(Pc()),n=l(Lc()),r=l(_c()),i=l(np()),o=l(Fc()),s=Ac(),a=rp();function l(D){return D&&D.__esModule?D:{default:D}}function u(){if(typeof WeakMap!="function")return null;var D=new WeakMap;return u=function(){return D},D}function c(D){if(D&&D.__esModule)return D;if(D===null||d(D)!=="object"&&typeof D!="function")return{default:D};var S=u();if(S&&S.has(D))return S.get(D);var E={},O=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var M in D)if(Object.prototype.hasOwnProperty.call(D,M)){var V=O?Object.getOwnPropertyDescriptor(D,M):null;V&&(V.get||V.set)?Object.defineProperty(E,M,V):E[M]=D[M]}return E.default=D,S&&S.set(D,E),E}function d(D){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?d=function(E){return typeof E}:d=function(E){return E&&typeof Symbol=="function"&&E.constructor===Symbol&&E!==Symbol.prototype?"symbol":typeof E},d(D)}function g(){return g=Object.assign||function(D){for(var S=1;S<arguments.length;S++){var E=arguments[S];for(var O in E)Object.prototype.hasOwnProperty.call(E,O)&&(D[O]=E[O])}return D},g.apply(this,arguments)}function h(D,S){var E=Object.keys(D);if(Object.getOwnPropertySymbols){var O=Object.getOwnPropertySymbols(D);S&&(O=O.filter(function(M){return Object.getOwnPropertyDescriptor(D,M).enumerable})),E.push.apply(E,O)}return E}function p(D){for(var S=1;S<arguments.length;S++){var E=arguments[S]!=null?arguments[S]:{};S%2?h(Object(E),!0).forEach(function(O){C(D,O,E[O])}):Object.getOwnPropertyDescriptors?Object.defineProperties(D,Object.getOwnPropertyDescriptors(E)):h(Object(E)).forEach(function(O){Object.defineProperty(D,O,Object.getOwnPropertyDescriptor(E,O))})}return D}function m(D,S){if(!(D instanceof S))throw new TypeError("Cannot call a class as a function")}function y(D,S){for(var E=0;E<S.length;E++){var O=S[E];O.enumerable=O.enumerable||!1,O.configurable=!0,"value"in O&&(O.writable=!0),Object.defineProperty(D,O.key,O)}}function v(D,S,E){return S&&y(D.prototype,S),D}function b(D,S){if(typeof S!="function"&&S!==null)throw new TypeError("Super expression must either be null or a function");D.prototype=Object.create(S&&S.prototype,{constructor:{value:D,writable:!0,configurable:!0}}),S&&x(D,S)}function x(D,S){return x=Object.setPrototypeOf||function(O,M){return O.__proto__=M,O},x(D,S)}function T(D){var S=P();return function(){var O=I(D),M;if(S){var V=I(this).constructor;M=Reflect.construct(O,arguments,V)}else M=O.apply(this,arguments);return k(this,M)}}function k(D,S){return S&&(d(S)==="object"||typeof S=="function")?S:R(D)}function R(D){if(D===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return D}function P(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}function I(D){return I=Object.setPrototypeOf?Object.getPrototypeOf:function(E){return E.__proto__||Object.getPrototypeOf(E)},I(D)}function C(D,S,E){return S in D?Object.defineProperty(D,S,{value:E,enumerable:!0,configurable:!0,writable:!0}):D[S]=E,D}var F=(function(D){b(E,D);var S=T(E);function E(O){var M;m(this,E),M=S.call(this,O),C(R(M),"thumbsRef",void 0),C(R(M),"carouselWrapperRef",void 0),C(R(M),"listRef",void 0),C(R(M),"itemsRef",void 0),C(R(M),"timer",void 0),C(R(M),"animationHandler",void 0),C(R(M),"setThumbsRef",function(W){M.thumbsRef=W}),C(R(M),"setCarouselWrapperRef",function(W){M.carouselWrapperRef=W}),C(R(M),"setListRef",function(W){M.listRef=W}),C(R(M),"setItemsRef",function(W,j){M.itemsRef||(M.itemsRef=[]),M.itemsRef[j]=W}),C(R(M),"autoPlay",function(){e.Children.count(M.props.children)<=1||(M.clearAutoPlay(),M.props.autoPlay&&(M.timer=setTimeout(function(){M.increment()},M.props.interval)))}),C(R(M),"clearAutoPlay",function(){M.timer&&clearTimeout(M.timer)}),C(R(M),"resetAutoPlay",function(){M.clearAutoPlay(),M.autoPlay()}),C(R(M),"stopOnHover",function(){M.setState({isMouseEntered:!0},M.clearAutoPlay)}),C(R(M),"startOnLeave",function(){M.setState({isMouseEntered:!1},M.autoPlay)}),C(R(M),"isFocusWithinTheCarousel",function(){return M.carouselWrapperRef?!!((0,i.default)().activeElement===M.carouselWrapperRef||M.carouselWrapperRef.contains((0,i.default)().activeElement)):!1}),C(R(M),"navigateWithKeyboard",function(W){if(M.isFocusWithinTheCarousel()){var j=M.props.axis,oe=j==="horizontal",Q={ArrowUp:38,ArrowRight:39,ArrowDown:40,ArrowLeft:37},re=oe?Q.ArrowRight:Q.ArrowDown,se=oe?Q.ArrowLeft:Q.ArrowUp;re===W.keyCode?M.increment():se===W.keyCode&&M.decrement()}}),C(R(M),"updateSizes",function(){if(!(!M.state.initialized||!M.itemsRef||M.itemsRef.length===0)){var W=M.props.axis==="horizontal",j=M.itemsRef[0];if(j){var oe=W?j.clientWidth:j.clientHeight;M.setState({itemSize:oe}),M.thumbsRef&&M.thumbsRef.updateSizes()}}}),C(R(M),"setMountState",function(){M.setState({hasMount:!0}),M.updateSizes()}),C(R(M),"handleClickItem",function(W,j){if(e.Children.count(M.props.children)!==0){if(M.state.cancelClick){M.setState({cancelClick:!1});return}M.props.onClickItem(W,j),W!==M.state.selectedItem&&M.setState({selectedItem:W})}}),C(R(M),"handleOnChange",function(W,j){e.Children.count(M.props.children)<=1||M.props.onChange(W,j)}),C(R(M),"handleClickThumb",function(W,j){M.props.onClickThumb(W,j),M.moveTo(W)}),C(R(M),"onSwipeStart",function(W){M.setState({swiping:!0}),M.props.onSwipeStart(W)}),C(R(M),"onSwipeEnd",function(W){M.setState({swiping:!1,cancelClick:!1,swipeMovementStarted:!1}),M.props.onSwipeEnd(W),M.clearAutoPlay(),M.state.autoPlay&&M.autoPlay()}),C(R(M),"onSwipeMove",function(W,j){M.props.onSwipeMove(j);var oe=M.props.swipeAnimationHandler(W,M.props,M.state,M.setState.bind(R(M)));return M.setState(p({},oe)),!!Object.keys(oe).length}),C(R(M),"decrement",function(){var W=arguments.length>0&&arguments[0]!==void 0?arguments[0]:1;M.moveTo(M.state.selectedItem-(typeof W=="number"?W:1))}),C(R(M),"increment",function(){var W=arguments.length>0&&arguments[0]!==void 0?arguments[0]:1;M.moveTo(M.state.selectedItem+(typeof W=="number"?W:1))}),C(R(M),"moveTo",function(W){if(typeof W=="number"){var j=e.Children.count(M.props.children)-1;W<0&&(W=M.props.infiniteLoop?j:0),W>j&&(W=M.props.infiniteLoop?0:j),M.selectItem({selectedItem:W}),M.state.autoPlay&&M.state.isMouseEntered===!1&&M.resetAutoPlay()}}),C(R(M),"onClickNext",function(){M.increment(1)}),C(R(M),"onClickPrev",function(){M.decrement(1)}),C(R(M),"onSwipeForward",function(){M.increment(1),M.props.emulateTouch&&M.setState({cancelClick:!0})}),C(R(M),"onSwipeBackwards",function(){M.decrement(1),M.props.emulateTouch&&M.setState({cancelClick:!0})}),C(R(M),"changeItem",function(W){return function(j){(!(0,s.isKeyboardEvent)(j)||j.key==="Enter")&&M.moveTo(W)}}),C(R(M),"selectItem",function(W){M.setState(p({previousItem:M.state.selectedItem},W),function(){M.setState(M.animationHandler(M.props,M.state))}),M.handleOnChange(W.selectedItem,e.Children.toArray(M.props.children)[W.selectedItem])}),C(R(M),"getInitialImage",function(){var W=M.props.selectedItem,j=M.itemsRef&&M.itemsRef[W],oe=j&&j.getElementsByTagName("img")||[];return oe[0]}),C(R(M),"getVariableItemHeight",function(W){var j=M.itemsRef&&M.itemsRef[W];if(M.state.hasMount&&j&&j.children.length){var oe=j.children[0].getElementsByTagName("img")||[];if(oe.length>0){var Q=oe[0];if(!Q.complete){var re=function de(){M.forceUpdate(),Q.removeEventListener("load",de)};Q.addEventListener("load",re)}}var se=oe[0]||j.children[0],ae=se.clientHeight;return ae>0?ae:null}return null});var V={initialized:!1,previousItem:O.selectedItem,selectedItem:O.selectedItem,hasMount:!1,isMouseEntered:!1,autoPlay:O.autoPlay,swiping:!1,swipeMovementStarted:!1,cancelClick:!1,itemSize:1,itemListStyle:{},slideStyle:{},selectedStyle:{},prevStyle:{}};return M.animationHandler=typeof O.animationHandler=="function"&&O.animationHandler||O.animationHandler==="fade"&&a.fadeAnimationHandler||a.slideAnimationHandler,M.state=p(p({},V),M.animationHandler(O,V)),M}return v(E,[{key:"componentDidMount",value:function(){this.props.children&&this.setupCarousel()}},{key:"componentDidUpdate",value:function(M,V){!M.children&&this.props.children&&!this.state.initialized&&this.setupCarousel(),!M.autoFocus&&this.props.autoFocus&&this.forceFocus(),V.swiping&&!this.state.swiping&&this.setState(p({},this.props.stopSwipingHandler(this.props,this.state))),(M.selectedItem!==this.props.selectedItem||M.centerMode!==this.props.centerMode)&&(this.updateSizes(),this.moveTo(this.props.selectedItem)),M.autoPlay!==this.props.autoPlay&&(this.props.autoPlay?this.setupAutoPlay():this.destroyAutoPlay(),this.setState({autoPlay:this.props.autoPlay}))}},{key:"componentWillUnmount",value:function(){this.destroyCarousel()}},{key:"setupCarousel",value:function(){var M=this;this.bindEvents(),this.state.autoPlay&&e.Children.count(this.props.children)>1&&this.setupAutoPlay(),this.props.autoFocus&&this.forceFocus(),this.setState({initialized:!0},function(){var V=M.getInitialImage();V&&!V.complete?V.addEventListener("load",M.setMountState):M.setMountState()})}},{key:"destroyCarousel",value:function(){this.state.initialized&&(this.unbindEvents(),this.destroyAutoPlay())}},{key:"setupAutoPlay",value:function(){this.autoPlay();var M=this.carouselWrapperRef;this.props.stopOnHover&&M&&(M.addEventListener("mouseenter",this.stopOnHover),M.addEventListener("mouseleave",this.startOnLeave))}},{key:"destroyAutoPlay",value:function(){this.clearAutoPlay();var M=this.carouselWrapperRef;this.props.stopOnHover&&M&&(M.removeEventListener("mouseenter",this.stopOnHover),M.removeEventListener("mouseleave",this.startOnLeave))}},{key:"bindEvents",value:function(){(0,o.default)().addEventListener("resize",this.updateSizes),(0,o.default)().addEventListener("DOMContentLoaded",this.updateSizes),this.props.useKeyboardArrows&&(0,i.default)().addEventListener("keydown",this.navigateWithKeyboard)}},{key:"unbindEvents",value:function(){(0,o.default)().removeEventListener("resize",this.updateSizes),(0,o.default)().removeEventListener("DOMContentLoaded",this.updateSizes);var M=this.getInitialImage();M&&M.removeEventListener("load",this.setMountState),this.props.useKeyboardArrows&&(0,i.default)().removeEventListener("keydown",this.navigateWithKeyboard)}},{key:"forceFocus",value:function(){var M;(M=this.carouselWrapperRef)===null||M===void 0||M.focus()}},{key:"renderItems",value:function(M){var V=this;return this.props.children?e.Children.map(this.props.children,function(W,j){var oe=j===V.state.selectedItem,Q=j===V.state.previousItem,re=oe&&V.state.selectedStyle||Q&&V.state.prevStyle||V.state.slideStyle||{};V.props.centerMode&&V.props.axis==="horizontal"&&(re=p(p({},re),{},{minWidth:V.props.centerSlidePercentage+"%"})),V.state.swiping&&V.state.swipeMovementStarted&&(re=p(p({},re),{},{pointerEvents:"none"}));var se={ref:function(de){return V.setItemsRef(de,j)},key:"itemKey"+j+(M?"clone":""),className:n.default.ITEM(!0,j===V.state.selectedItem,j===V.state.previousItem),onClick:V.handleClickItem.bind(V,j,W),style:re};return e.default.createElement("li",se,V.props.renderItem(W,{isSelected:j===V.state.selectedItem,isPrevious:j===V.state.previousItem}))}):[]}},{key:"renderControls",value:function(){var M=this,V=this.props,W=V.showIndicators,j=V.labels,oe=V.renderIndicator,Q=V.children;return W?e.default.createElement("ul",{className:"control-dots"},e.Children.map(Q,function(re,se){return oe&&oe(M.changeItem(se),se===M.state.selectedItem,se,j.item)})):null}},{key:"renderStatus",value:function(){return this.props.showStatus?e.default.createElement("p",{className:"carousel-status"},this.props.statusFormatter(this.state.selectedItem+1,e.Children.count(this.props.children))):null}},{key:"renderThumbs",value:function(){return!this.props.showThumbs||!this.props.children||e.Children.count(this.props.children)===0?null:e.default.createElement(r.default,{ref:this.setThumbsRef,onSelectItem:this.handleClickThumb,selectedItem:this.state.selectedItem,transitionTime:this.props.transitionTime,thumbWidth:this.props.thumbWidth,labels:this.props.labels,emulateTouch:this.props.emulateTouch},this.props.renderThumbs(this.props.children))}},{key:"render",value:function(){var M=this;if(!this.props.children||e.Children.count(this.props.children)===0)return null;var V=this.props.swipeable&&e.Children.count(this.props.children)>1,W=this.props.axis==="horizontal",j=this.props.showArrows&&e.Children.count(this.props.children)>1,oe=j&&(this.state.selectedItem>0||this.props.infiniteLoop)||!1,Q=j&&(this.state.selectedItem<e.Children.count(this.props.children)-1||this.props.infiniteLoop)||!1,re=this.renderItems(!0),se=re.shift(),ae=re.pop(),de={className:n.default.SLIDER(!0,this.state.swiping),onSwipeMove:this.onSwipeMove,onSwipeStart:this.onSwipeStart,onSwipeEnd:this.onSwipeEnd,style:this.state.itemListStyle,tolerance:this.props.swipeScrollTolerance},fe={};if(W){if(de.onSwipeLeft=this.onSwipeForward,de.onSwipeRight=this.onSwipeBackwards,this.props.dynamicHeight){var ue=this.getVariableItemHeight(this.state.selectedItem);fe.height=ue||"auto"}}else de.onSwipeUp=this.props.verticalSwipe==="natural"?this.onSwipeBackwards:this.onSwipeForward,de.onSwipeDown=this.props.verticalSwipe==="natural"?this.onSwipeForward:this.onSwipeBackwards,de.style=p(p({},de.style),{},{height:this.state.itemSize}),fe.height=this.state.itemSize;return e.default.createElement("div",{"aria-label":this.props.ariaLabel,className:n.default.ROOT(this.props.className),ref:this.setCarouselWrapperRef,tabIndex:this.props.useKeyboardArrows?0:void 0},e.default.createElement("div",{className:n.default.CAROUSEL(!0),style:{width:this.props.width}},this.renderControls(),this.props.renderArrowPrev(this.onClickPrev,oe,this.props.labels.leftArrow),e.default.createElement("div",{className:n.default.WRAPPER(!0,this.props.axis),style:fe},V?e.default.createElement(t.default,g({tagName:"ul",innerRef:this.setListRef},de,{allowMouseEvents:this.props.emulateTouch}),this.props.infiniteLoop&&ae,this.renderItems(),this.props.infiniteLoop&&se):e.default.createElement("ul",{className:n.default.SLIDER(!0,this.state.swiping),ref:function(L){return M.setListRef(L)},style:this.state.itemListStyle||{}},this.props.infiniteLoop&&ae,this.renderItems(),this.props.infiniteLoop&&se)),this.props.renderArrowNext(this.onClickNext,Q,this.props.labels.rightArrow),this.renderStatus()),this.renderThumbs())}}]),E})(e.default.Component);return Wi.default=F,C(F,"displayName","Carousel"),C(F,"defaultProps",{ariaLabel:void 0,axis:"horizontal",centerSlidePercentage:80,interval:3e3,labels:{leftArrow:"previous slide / item",rightArrow:"next slide / item",item:"slide item"},onClickItem:s.noop,onClickThumb:s.noop,onChange:s.noop,onSwipeStart:function(){},onSwipeEnd:function(){},onSwipeMove:function(){return!1},preventMovementUntilSwipeScrollTolerance:!1,renderArrowPrev:function(S,E,O){return e.default.createElement("button",{type:"button","aria-label":O,className:n.default.ARROW_PREV(!E),onClick:S})},renderArrowNext:function(S,E,O){return e.default.createElement("button",{type:"button","aria-label":O,className:n.default.ARROW_NEXT(!E),onClick:S})},renderIndicator:function(S,E,O,M){return e.default.createElement("li",{className:n.default.DOT(E),onClick:S,onKeyDown:S,value:O,key:O,role:"button",tabIndex:0,"aria-label":"".concat(M," ").concat(O+1)})},renderItem:function(S){return S},renderThumbs:function(S){var E=e.Children.map(S,function(O){var M=O;if(O.type!=="img"&&(M=e.Children.toArray(O.props.children).find(function(V){return V.type==="img"})),!!M)return M});return E.filter(function(O){return O}).length===0?(console.warn("No images found! Can't build the thumb list without images. If you don't need thumbs, set showThumbs={false} in the Carousel. Note that it's not possible to get images rendered inside custom components. More info at https://github.com/leandrowd/react-responsive-carousel/blob/master/TROUBLESHOOTING.md"),[]):E},statusFormatter:s.defaultStatusFormatter,selectedItem:0,showArrows:!0,showIndicators:!0,showStatus:!0,showThumbs:!0,stopOnHover:!0,swipeScrollTolerance:5,swipeable:!0,transitionTime:350,verticalSwipe:"standard",width:"100%",animationHandler:"slide",swipeAnimationHandler:a.slideSwipeAnimationHandler,stopSwipingHandler:a.slideStopSwipingHandler}),Wi}var Js={},Qs;function op(){return Qs||(Qs=1),Js}var eu;function ap(){return eu||(eu=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"Carousel",{enumerable:!0,get:function(){return t.default}}),Object.defineProperty(e,"CarouselProps",{enumerable:!0,get:function(){return n.CarouselProps}}),Object.defineProperty(e,"Thumbs",{enumerable:!0,get:function(){return r.default}});var t=i(ip()),n=op(),r=i(_c());function i(o){return o&&o.__esModule?o:{default:o}}})(Ja)),Ja}var lp=ap();function kn(e,t,n,r,i=!1){const o=f.useRef();o.current=t,f.useEffect(()=>{if(n===null||n.addEventListener===void 0)return;const s=n,a=l=>{o.current?.call(s,l)};return s.addEventListener(e,a,{passive:r,capture:i}),()=>{s.removeEventListener(e,a,{capture:i})}},[e,n,r,i])}function Cr(e,t){return e===void 0?void 0:t}const sp=Math.PI;function tu(e){return e*sp/180}const Hc=(e,t,n)=>({x1:e-n/2,y1:t-n/2,x2:e+n/2,y2:t+n/2}),zc=(e,t,n,r,i)=>{switch(e){case"left":return Math.floor(t)+r+i/2;case"center":return Math.floor(t+n/2);case"right":return Math.floor(t+n)-r-i/2}},Vc=(e,t,n)=>Math.min(e,t-n*2),$c=(e,t,n)=>n.x1<=e&&e<=n.x2&&n.y1<=t&&t<=n.y2,zl=e=>{const t=e.fgColor??"currentColor";return f.createElement("svg",{viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},f.createElement("path",{d:"M12.7073 7.05029C7.87391 11.8837 10.4544 9.30322 6.03024 13.7273C5.77392 13.9836 5.58981 14.3071 5.50189 14.6587L4.52521 18.5655C4.38789 19.1148 4.88543 19.6123 5.43472 19.475L9.34146 18.4983C9.69313 18.4104 10.0143 18.2286 10.2706 17.9722L16.9499 11.2929",stroke:t,strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",fill:"none",vectorEffect:"non-scaling-stroke"}),f.createElement("path",{d:"M20.4854 4.92901L19.0712 3.5148C18.2901 2.73375 17.0238 2.73375 16.2428 3.5148L14.475 5.28257C15.5326 7.71912 16.4736 8.6278 18.7176 9.52521L20.4854 7.75744C21.2665 6.97639 21.2665 5.71006 20.4854 4.92901Z",stroke:t,strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",fill:"none",vectorEffect:"non-scaling-stroke"}))},up=e=>{const t=e.fgColor??"currentColor";return f.createElement("svg",{viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},f.createElement("path",{d:"M19 6L10.3802 17L5.34071 11.8758",vectorEffect:"non-scaling-stroke",stroke:t,strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}))};function cp(e,t,n){const[r,i]=f.useState(e),o=f.useRef(!0);f.useEffect(()=>()=>{o.current=!1},[]);const s=f.useRef(Rc(a=>{o.current&&i(a)},n));return f.useLayoutEffect(()=>{o.current&&s.current(()=>e())},t),r}const dp="֑-߿יִ-﷽ﹰ-ﻼ",fp="A-Za-zÀ-ÖØ-öø-ʸ̀-֐ࠀ-῿‎Ⰰ-﬜︀-﹯﻽-￿",hp=new RegExp("^[^"+fp+"]*["+dp+"]");function Vl(e){return hp.test(e)?"rtl":"not-rtl"}let Vo;function bl(){if(typeof document>"u")return 0;if(Vo!==void 0)return Vo;const e=document.createElement("p");e.style.width="100%",e.style.height="200px";const t=document.createElement("div");t.id="testScrollbar",t.style.position="absolute",t.style.top="0px",t.style.left="0px",t.style.visibility="hidden",t.style.width="200px",t.style.height="150px",t.style.overflow="hidden",t.append(e),document.body.append(t);const n=e.offsetWidth;t.style.overflow="scroll";let r=e.offsetWidth;return n===r&&(r=t.clientWidth),t.remove(),Vo=n-r,Vo}const Vr=Symbol();function gp(e){const t=f.useRef([Vr,e]);t.current[1]!==e&&(t.current[0]=e),t.current[1]=e;const[n,r]=f.useState(e),[,i]=f.useState(),o=f.useCallback(a=>{const l=t.current[0];l!==Vr&&(a=typeof a=="function"?a(l):a,a===l)||(l!==Vr&&i({}),r(u=>typeof a=="function"?a(l===Vr?u:l):a),t.current[0]=Vr)},[]),s=f.useCallback(()=>{t.current[0]=Vr,i({})},[]);return[t.current[0]===Vr?n:t.current[0],o,s]}function Nc(e){if(e.length===0)return"";let t=0,n=0;for(const r of e){if(n+=r.length,n>1e4)break;t++}return e.slice(0,t).join(", ")}function pp(e){const t=f.useRef(e);return Ii(e,t.current)||(t.current=e),t.current}const mp=e=>{const{urls:t,canWrite:n,onEditClick:r,renderImage:i}=e,o=t.filter(a=>a!=="");if(o.length===0)return null;const s=o.length>1;return f.createElement(Qg,{"data-testid":"GDG-default-image-overlay-editor"},f.createElement(lp.Carousel,{showArrows:s,showThumbs:!1,swipeable:s,emulateTouch:s,infiniteLoop:s},o.map(a=>{const l=i?.(a)??f.createElement("img",{draggable:!1,src:a});return f.createElement("div",{className:"gdg-centering-container",key:a},l)})),n&&r&&f.createElement("button",{className:"gdg-edit-icon",onClick:r},f.createElement(zl,null)))};function Bc(){return{async:!1,baseUrl:null,breaks:!1,extensions:null,gfm:!0,headerIds:!0,headerPrefix:"",highlight:null,hooks:null,langPrefix:"language-",mangle:!0,pedantic:!1,renderer:null,sanitize:!1,sanitizer:null,silent:!1,smartypants:!1,tokenizer:null,walkTokens:null,xhtml:!1}}let Gr=Bc();function vp(e){Gr=e}const Wc=/[&<>"']/,bp=new RegExp(Wc.source,"g"),Uc=/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,wp=new RegExp(Uc.source,"g"),yp={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},nu=e=>yp[e];function mn(e,t){if(t){if(Wc.test(e))return e.replace(bp,nu)}else if(Uc.test(e))return e.replace(wp,nu);return e}const Cp=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig;function Gc(e){return e.replace(Cp,(t,n)=>(n=n.toLowerCase(),n==="colon"?":":n.charAt(0)==="#"?n.charAt(1)==="x"?String.fromCharCode(parseInt(n.substring(2),16)):String.fromCharCode(+n.substring(1)):""))}const Sp=/(^|[^\[])\^/g;function Ft(e,t){e=typeof e=="string"?e:e.source,t=t||"";const n={replace:(r,i)=>(i=i.source||i,i=i.replace(Sp,"$1"),e=e.replace(r,i),n),getRegex:()=>new RegExp(e,t)};return n}const xp=/[^\w:]/g,kp=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;function ru(e,t,n){if(e){let r;try{r=decodeURIComponent(Gc(n)).replace(xp,"").toLowerCase()}catch{return null}if(r.indexOf("javascript:")===0||r.indexOf("vbscript:")===0||r.indexOf("data:")===0)return null}t&&!kp.test(n)&&(n=Ep(t,n));try{n=encodeURI(n).replace(/%25/g,"%")}catch{return null}return n}const $o={},Mp=/^[^:]+:\/*[^/]*$/,Rp=/^([^:]+:)[\s\S]*$/,Ip=/^([^:]+:\/*[^/]*)[\s\S]*$/;function Ep(e,t){$o[" "+e]||(Mp.test(e)?$o[" "+e]=e+"/":$o[" "+e]=Zo(e,"/",!0)),e=$o[" "+e];const n=e.indexOf(":")===-1;return t.substring(0,2)==="//"?n?t:e.replace(Rp,"$1")+t:t.charAt(0)==="/"?n?t:e.replace(Ip,"$1")+t:e+t}const la={exec:function(){}};function iu(e,t){const n=e.replace(/\|/g,(o,s,a)=>{let l=!1,u=s;for(;--u>=0&&a[u]==="\\";)l=!l;return l?"|":" |"}),r=n.split(/ \|/);let i=0;if(r[0].trim()||r.shift(),r.length>0&&!r[r.length-1].trim()&&r.pop(),r.length>t)r.splice(t);else for(;r.length<t;)r.push("");for(;i<r.length;i++)r[i]=r[i].trim().replace(/\\\|/g,"|");return r}function Zo(e,t,n){const r=e.length;if(r===0)return"";let i=0;for(;i<r;){const o=e.charAt(r-i-1);if(o===t&&!n)i++;else if(o!==t&&n)i++;else break}return e.slice(0,r-i)}function Tp(e,t){if(e.indexOf(t[1])===-1)return-1;const n=e.length;let r=0,i=0;for(;i<n;i++)if(e[i]==="\\")i++;else if(e[i]===t[0])r++;else if(e[i]===t[1]&&(r--,r<0))return i;return-1}function Dp(e){e&&e.sanitize&&!e.silent&&console.warn("marked(): sanitize and sanitizer parameters are deprecated since version 0.7.0, should not be used and will be removed in the future. Read more here: https://marked.js.org/#/USING_ADVANCED.md#options")}function ou(e,t){if(t<1)return"";let n="";for(;t>1;)t&1&&(n+=e),t>>=1,e+=e;return n+e}function au(e,t,n,r){const i=t.href,o=t.title?mn(t.title):null,s=e[1].replace(/\\([\[\]])/g,"$1");if(e[0].charAt(0)!=="!"){r.state.inLink=!0;const a={type:"link",raw:n,href:i,title:o,text:s,tokens:r.inlineTokens(s)};return r.state.inLink=!1,a}return{type:"image",raw:n,href:i,title:o,text:mn(s)}}function Op(e,t){const n=e.match(/^(\s+)(?:```)/);if(n===null)return t;const r=n[1];return t.split(`
3
3
  `).map(i=>{const o=i.match(/^\s+/);if(o===null)return i;const[s]=o;return s.length>=r.length?i.slice(r.length):i}).join(`
4
4
  `)}class $l{constructor(t){this.options=t||Gr}space(t){const n=this.rules.block.newline.exec(t);if(n&&n[0].length>0)return{type:"space",raw:n[0]}}code(t){const n=this.rules.block.code.exec(t);if(n){const r=n[0].replace(/^ {1,4}/gm,"");return{type:"code",raw:n[0],codeBlockStyle:"indented",text:this.options.pedantic?r:Zo(r,`
5
5
  `)}}}fences(t){const n=this.rules.block.fences.exec(t);if(n){const r=n[0],i=Op(r,n[3]||"");return{type:"code",raw:r,lang:n[2]?n[2].trim().replace(this.rules.inline._escapes,"$1"):n[2],text:i}}}heading(t){const n=this.rules.block.heading.exec(t);if(n){let r=n[2].trim();if(/#$/.test(r)){const i=Zo(r,"#");(this.options.pedantic||!i||/ $/.test(i))&&(r=i.trim())}return{type:"heading",raw:n[0],depth:n[1].length,text:r,tokens:this.lexer.inline(r)}}}hr(t){const n=this.rules.block.hr.exec(t);if(n)return{type:"hr",raw:n[0]}}blockquote(t){const n=this.rules.block.blockquote.exec(t);if(n){const r=n[0].replace(/^ *>[ \t]?/gm,""),i=this.lexer.state.top;this.lexer.state.top=!0;const o=this.lexer.blockTokens(r);return this.lexer.state.top=i,{type:"blockquote",raw:n[0],tokens:o,text:r}}}list(t){let n=this.rules.block.list.exec(t);if(n){let r,i,o,s,a,l,u,c,d,g,h,p,m=n[1].trim();const y=m.length>1,v={type:"list",raw:"",ordered:y,start:y?+m.slice(0,-1):"",loose:!1,items:[]};m=y?`\\d{1,9}\\${m.slice(-1)}`:`\\${m}`,this.options.pedantic&&(m=y?m:"[*+-]");const b=new RegExp(`^( {0,3}${m})((?:[ ][^\\n]*)?(?:\\n|$))`);for(;t&&(p=!1,!(!(n=b.exec(t))||this.rules.block.hr.test(t)));){if(r=n[0],t=t.substring(r.length),c=n[2].split(`
@@ -169,10 +169,10 @@ Please report this to https://github.com/markedjs/marked.`,e){const i="<p>An err
169
169
  `?(r.push(e.slice(i,s)),i=s+1,a===`
170
170
  `&&(n.push(r),r=[])):a==='"'&&(o=t.inString);break;case t.inString:a==='"'&&(o=t.inStringPostQuote);break;case t.inStringPostQuote:a==='"'?o=t.inString:((a===" "||a===`
171
171
  `)&&(r.push(xu(e.slice(i,s))),i=s+1,a===`
172
- `&&(n.push(r),r=[])),o=t.None);break}s++}return i<e.length&&r.push(xu(e.slice(i,e.length))),n.push(r),n.map(a=>a.map(l=>({rawValue:l,formatted:l,format:"string"})))}function ku(e,t,n){const r=$0(e,t),i=a=>{window.navigator.clipboard?.writeText(a)},o=(a,l)=>window.navigator.clipboard?.write===void 0?!1:(window.navigator.clipboard.write([new ClipboardItem({"text/plain":new Blob([a],{type:"text/plain"}),"text/html":new Blob([l],{type:"text/html"})})]),!0),s=(a,l)=>{try{if(n===void 0||n.clipboardData===null)throw new Error("No clipboard data");n?.clipboardData?.setData("text/plain",a),n?.clipboardData?.setData("text/html",l)}catch{o(a,l)||i(a)}};window.navigator.clipboard?.write!==void 0||n?.clipboardData!==void 0?s(r.textPlain,r.textHtml):i(r.textPlain),n?.preventDefault()}function yd(e){return e!==!0}function Mu(e){return typeof e=="string"?e:`${e}px`}const W0=()=>e=>e.innerWidth,U0=()=>e=>e.innerHeight,G0=dn("div")({name:"Wrapper",class:"gdg-wmyidgi",propsAsIs:!1,vars:{"wmyidgi-0":[W0()],"wmyidgi-1":[U0()]}}),Y0=e=>{const{inWidth:t,inHeight:n,children:r,...i}=e;return f.createElement(G0,{innerHeight:Mu(n),innerWidth:Mu(t),...i},r)},X0=2,j0=1300;function q0(e,t,n){const r=zt.useRef(0),[i,o]=e??[0,0];zt.useEffect(()=>{if(i===0&&o===0){r.current=0;return}let s=!1,a=0;const l=u=>{if(!s){if(a===0)a=u;else{const c=u-a;r.current=Math.min(1,r.current+c/j0);const d=r.current**1.618*c*X0;t.current?.scrollBy(i*d,o*d),a=u,n?.()}window.requestAnimationFrame(l)}};return window.requestAnimationFrame(l),()=>{s=!0}},[t,i,o,n])}function K0({rowHeight:e,headerHeight:t,groupHeaderHeight:n,theme:r,overscrollX:i,overscrollY:o,scaleToRem:s,remSize:a}){const[l,u,c,d,g,h]=zt.useMemo(()=>{if(!s||a===16)return[e,t,n,r,i,o];const p=a/16,m=e,y=id();return[typeof m=="number"?m*p:v=>Math.ceil(m(v)*p),Math.ceil(t*p),Math.ceil(n*p),{...r,headerIconSize:(r?.headerIconSize??y.headerIconSize)*p,cellHorizontalPadding:(r?.cellHorizontalPadding??y.cellHorizontalPadding)*p,cellVerticalPadding:(r?.cellVerticalPadding??y.cellVerticalPadding)*p},Math.ceil((i??0)*p),Math.ceil((o??0)*p)]},[n,t,i,o,a,e,s,r]);return{rowHeight:l,headerHeight:u,groupHeaderHeight:c,theme:d,overscrollX:g,overscrollY:h}}const yr={downFill:!1,rightFill:!1,clear:!0,closeOverlay:!0,acceptOverlayDown:!0,acceptOverlayUp:!0,acceptOverlayLeft:!0,acceptOverlayRight:!0,copy:!0,paste:!0,cut:!0,search:!1,delete:!0,activateCell:!0,scrollToSelectedCell:!0,goToFirstCell:!0,goToFirstColumn:!0,goToFirstRow:!0,goToLastCell:!0,goToLastColumn:!0,goToLastRow:!0,goToNextPage:!0,goToPreviousPage:!0,selectToFirstCell:!0,selectToFirstColumn:!0,selectToFirstRow:!0,selectToLastCell:!0,selectToLastColumn:!0,selectToLastRow:!0,selectAll:!0,selectRow:!0,selectColumn:!0,goUpCell:!0,goRightCell:!0,goDownCell:!0,goLeftCell:!0,goUpCellRetainSelection:!0,goRightCellRetainSelection:!0,goDownCellRetainSelection:!0,goLeftCellRetainSelection:!0,selectGrowUp:!0,selectGrowRight:!0,selectGrowDown:!0,selectGrowLeft:!0};function it(e,t){return e===!0?t:e===!1?"":e}function Ru(e){const t=ua.value;return{activateCell:it(e.activateCell," |Enter|shift+Enter"),clear:it(e.clear,"any+Escape"),closeOverlay:it(e.closeOverlay,"any+Escape"),acceptOverlayDown:it(e.acceptOverlayDown,"Enter"),acceptOverlayUp:it(e.acceptOverlayUp,"shift+Enter"),acceptOverlayLeft:it(e.acceptOverlayLeft,"shift+Tab"),acceptOverlayRight:it(e.acceptOverlayRight,"Tab"),copy:e.copy,cut:e.cut,delete:it(e.delete,t?"Backspace|Delete":"Delete"),downFill:it(e.downFill,"primary+_68"),scrollToSelectedCell:it(e.scrollToSelectedCell,"primary+Enter"),goDownCell:it(e.goDownCell,"ArrowDown"),goDownCellRetainSelection:it(e.goDownCellRetainSelection,"alt+ArrowDown"),goLeftCell:it(e.goLeftCell,"ArrowLeft|shift+Tab"),goLeftCellRetainSelection:it(e.goLeftCellRetainSelection,"alt+ArrowLeft"),goRightCell:it(e.goRightCell,"ArrowRight|Tab"),goRightCellRetainSelection:it(e.goRightCellRetainSelection,"alt+ArrowRight"),goUpCell:it(e.goUpCell,"ArrowUp"),goUpCellRetainSelection:it(e.goUpCellRetainSelection,"alt+ArrowUp"),goToFirstCell:it(e.goToFirstCell,"primary+Home"),goToFirstColumn:it(e.goToFirstColumn,"Home|primary+ArrowLeft"),goToFirstRow:it(e.goToFirstRow,"primary+ArrowUp"),goToLastCell:it(e.goToLastCell,"primary+End"),goToLastColumn:it(e.goToLastColumn,"End|primary+ArrowRight"),goToLastRow:it(e.goToLastRow,"primary+ArrowDown"),goToNextPage:it(e.goToNextPage,"PageDown"),goToPreviousPage:it(e.goToPreviousPage,"PageUp"),paste:e.paste,rightFill:it(e.rightFill,"primary+_82"),search:it(e.search,"primary+f"),selectAll:it(e.selectAll,"primary+a"),selectColumn:it(e.selectColumn,"ctrl+ "),selectGrowDown:it(e.selectGrowDown,"shift+ArrowDown"),selectGrowLeft:it(e.selectGrowLeft,"shift+ArrowLeft"),selectGrowRight:it(e.selectGrowRight,"shift+ArrowRight"),selectGrowUp:it(e.selectGrowUp,"shift+ArrowUp"),selectRow:it(e.selectRow,"shift+ "),selectToFirstCell:it(e.selectToFirstCell,"primary+shift+Home"),selectToFirstColumn:it(e.selectToFirstColumn,"primary+shift+ArrowLeft"),selectToFirstRow:it(e.selectToFirstRow,"primary+shift+ArrowUp"),selectToLastCell:it(e.selectToLastCell,"primary+shift+End"),selectToLastColumn:it(e.selectToLastColumn,"primary+shift+ArrowRight"),selectToLastRow:it(e.selectToLastRow,"primary+shift+ArrowDown")}}function Z0(e){const t=pp(e);return zt.useMemo(()=>{if(t===void 0)return Ru(yr);const n={...t,goToNextPage:t?.goToNextPage??t?.pageDown??yr.goToNextPage,goToPreviousPage:t?.goToPreviousPage??t?.pageUp??yr.goToPreviousPage,goToFirstCell:t?.goToFirstCell??t?.first??yr.goToFirstCell,goToLastCell:t?.goToLastCell??t?.last??yr.goToLastCell,selectToFirstCell:t?.selectToFirstCell??t?.first??yr.selectToFirstCell,selectToLastCell:t?.selectToLastCell??t?.last??yr.selectToLastCell};return Ru({...yr,...n})},[t])}function J0(e){function t(r,i,o){if(typeof r=="number")return{headerIndex:r,isCollapsed:!1,depth:i,path:o};const s={headerIndex:r.headerIndex,isCollapsed:r.isCollapsed,depth:i,path:o};return r.subGroups!==void 0&&(s.subGroups=r.subGroups.map((a,l)=>t(a,i+1,[...o,l])).sort((a,l)=>a.headerIndex-l.headerIndex)),s}return e.map((r,i)=>t(r,0,[i])).sort((r,i)=>r.headerIndex-i.headerIndex)}function ql(e,t){const n=[];function r(a,l,u=!1){let c=l!==null?l-a.headerIndex:t-a.headerIndex;if(a.subGroups!==void 0&&(c=a.subGroups[0].headerIndex-a.headerIndex),c--,n.push({rowIndex:-1,headerIndex:a.headerIndex,contentIndex:-1,skip:u,isCollapsed:a.isCollapsed,depth:a.depth,path:a.path,rows:c}),a.subGroups)for(let d=0;d<a.subGroups.length;d++){const g=d<a.subGroups.length-1?a.subGroups[d+1].headerIndex:l;r(a.subGroups[d],g,u||a.isCollapsed)}}const i=J0(e.groups);for(let a=0;a<i.length;a++){const l=a<i.length-1?i[a+1].headerIndex:null;r(i[a],l)}let o=0,s=0;for(const a of n)a.contentIndex=s,s+=a.rows,a.rowIndex=o,o+=a.isCollapsed?1:a.rows+1;return n.filter(a=>a.skip===!1).map(a=>{const{skip:l,...u}=a;return u})}function Rl(e,t){if(t===void 0||ql.length===0)return{path:[e],originalIndex:e,isGroupHeader:!1,groupIndex:e,contentIndex:e,groupRows:-1};let n=e;for(const r of t){if(n===0)return{path:[...r.path,-1],originalIndex:r.headerIndex,isGroupHeader:!0,groupIndex:-1,contentIndex:-1,groupRows:r.rows};if(r.isCollapsed)n--;else{if(n<=r.rows)return{path:[...r.path,n-1],originalIndex:r.headerIndex+n,isGroupHeader:!1,groupIndex:n-1,contentIndex:r.contentIndex+n-1,groupRows:r.rows};n=n-r.rows-1}}return{path:[e],originalIndex:e,isGroupHeader:!1,groupIndex:e,contentIndex:e,groupRows:-1}}function Q0(e,t,n,r){const i=zt.useMemo(()=>e===void 0?void 0:ql(e,t),[e,t]),o=zt.useMemo(()=>i?.reduce((c,d)=>(c[d.rowIndex]=d,c),{}),[i]),s=zt.useMemo(()=>i===void 0?t:i.reduce((c,d)=>c+(d.isCollapsed?1:d.rows+1),0),[i,t]),a=zt.useMemo(()=>e===void 0||typeof n=="number"&&e.height===n?n:c=>o?.[c]?e.height:typeof n=="number"?n:n(c),[o,e,n]),l=zt.useCallback(c=>{if(i===void 0)return c;let d=c;for(const g of i){if(d===0)return;if(d--,!g.isCollapsed){if(d<g.rows)return g.contentIndex+d;d-=g.rows}}return c},[i]),u=Cr(r??e?.themeOverride,zt.useCallback(c=>{if(e===void 0)return r?.(c,c,c);if(r===void 0&&e?.themeOverride===void 0)return;const{isGroupHeader:d,contentIndex:g,groupIndex:h}=Rl(c,i);return d?e.themeOverride:r?.(c,h,g)},[i,r,e]));return e===void 0?{rowHeight:a,rows:t,rowNumberMapper:l,getRowThemeOverride:u}:{rowHeight:a,rows:s,rowNumberMapper:l,getRowThemeOverride:u}}function ev(e,t){const n=zt.useMemo(()=>e===void 0?void 0:ql(e,t),[e,t]);return{getRowGroupingForPath:Sd,updateRowGroupingByPath:Cd,mapper:zt.useCallback(r=>{if(typeof r=="number")return Rl(r,n);const i=Rl(r[1],n);return{...i,originalIndex:[r[0],i.originalIndex]}},[n])}}function Cd(e,t,n){const[r,...i]=t;return i[0]===-1?e.map((o,s)=>s===r?{...o,...n}:o):e.map((o,s)=>s===r?{...o,subGroups:Cd(o.subGroups??[],i,n)}:o)}function Sd(e,t){const[n,...r]=t;return r[0]===-1?e[n]:Sd(e[n].subGroups??[],r)}function tv(e,t){const[n]=f.useState(()=>({value:e,callback:t,facade:{get current(){return n.value},set current(r){const i=n.value;i!==r&&(n.value=r,n.callback(r,i))}}}));return n.callback=t,n.facade}function nv(e,t,n,r,i){const[o,s]=f.useMemo(()=>[t!==void 0&&typeof n=="number"?Math.floor(t/n):0,t!==void 0&&typeof n=="number"?-(t%n):0],[t,n]),a=f.useMemo(()=>({x:r.current.x,y:o,width:r.current.width??1,height:r.current.height??1,ty:s}),[r,s,o]),[l,u,c]=gp(a),d=f.useRef(i);d.current=i;const g=tv(null,m=>{m!==null&&t!==void 0?m.scrollTop=t:m!==null&&e!==void 0&&(m.scrollLeft=e)}),h=(l.height??1)>1;f.useLayoutEffect(()=>{if(t!==void 0&&g.current!==null&&h){if(g.current.scrollTop===t)return;g.current.scrollTop=t,g.current.scrollTop!==t&&c(),d.current()}},[t,h,c,g]);const p=(l.width??1)>1;return f.useLayoutEffect(()=>{if(e!==void 0&&g.current!==null&&p){if(g.current.scrollLeft===e)return;g.current.scrollLeft=e,g.current.scrollLeft!==e&&c(),d.current()}},[e,p,c,g]),{visibleRegion:l,setVisibleRegion:u,scrollRef:g}}const rv=f.lazy(async()=>await Ll(()=>import("./data-grid-overlay-editor.sBsdk5Xg.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20]),import.meta.url));let iv=0;function ov(e){return Ug(Os(Os(e).filter(t=>t.span!==void 0).map(t=>kr((t.span?.[0]??0)+1,(t.span?.[1]??0)+1))))}function Bo(e,t){return e===void 0||t===0||e.columns.length===0&&e.current===void 0?e:{current:e.current===void 0?void 0:{cell:[e.current.cell[0]+t,e.current.cell[1]],range:{...e.current.range,x:e.current.range.x+t},rangeStack:e.current.rangeStack.map(n=>({...n,x:n.x+t}))},rows:e.rows,columns:e.columns.offset(t)}}const Wo={kind:Z.Loading,allowOverlay:!1},Uo={columns:Qe.empty(),rows:Qe.empty(),current:void 0},av=(e,t)=>{const[n,r]=f.useState(Uo),[i,o]=f.useState(),s=f.useRef(null),a=f.useRef(null),[l,u]=f.useState(),c=f.useRef(),d=typeof window>"u"?null:window,{imageEditorOverride:g,getRowThemeOverride:h,markdownDivCreateNode:p,width:m,height:y,columns:v,rows:b,getCellContent:x,onCellClicked:T,onCellActivated:k,onFillPattern:R,onFinishedEditing:P,coercePasteValue:I,drawHeader:C,drawCell:F,editorBloom:D,onHeaderClicked:S,onColumnProposeMove:E,rangeSelectionColumnSpanning:O=!0,spanRangeBehavior:M="default",onGroupHeaderClicked:V,onCellContextMenu:W,className:j,onHeaderContextMenu:oe,getCellsForSelection:Q,onGroupHeaderContextMenu:re,onGroupHeaderRenamed:se,onCellEdited:ae,onCellsEdited:de,onSearchResultsChanged:fe,searchResults:ue,onSearchValueChange:H,searchValue:L,onKeyDown:X,onKeyUp:te,keybindings:le,editOnType:Se=!0,onRowAppended:pe,onColumnAppended:et,onColumnMoved:ke,validateCell:Dt,highlightRegions:dt,rangeSelect:Ue="rect",columnSelect:ne="multi",rowSelect:ve="multi",rangeSelectionBlending:me="exclusive",columnSelectionBlending:he="exclusive",rowSelectionBlending:Ce="exclusive",onDelete:_e,onDragStart:Oe,onMouseMove:at,onPaste:Pe,copyHeaders:we=!1,freezeColumns:Ae=0,cellActivationBehavior:Re="second-click",rowSelectionMode:Ne="auto",columnSelectionMode:ft="auto",onHeaderMenuClick:ht,onHeaderIndicatorClick:Xe,getGroupDetails:pt,rowGrouping:Nt,onSearchClose:St,onItemHovered:Tt,onSelectionCleared:Bt,showSearch:qt,onVisibleRegionChanged:an,gridSelection:It,onGridSelectionChange:gt,minColumnWidth:Wt=50,maxColumnWidth:wt=500,maxColumnAutoWidth:ln,provideEditor:Mn,trailingRowOptions:De,freezeTrailingRows:mt=0,allowedFillDirections:xt="orthogonal",scrollOffsetX:vn,scrollOffsetY:tn,verticalBorder:nn,onDragOverCell:un,onDrop:$t,onColumnResize:Zt,onColumnResizeEnd:Ge,onColumnResizeStart:kt,customRenderers:In,fillHandle:Ot,experimental:bt,fixedShadowX:bn,fixedShadowY:ir,headerIcons:Kn,imageWindowLoader:B,initialSize:Be,isDraggable:je,onDragLeave:Pt,onRowMoved:Kt,overscrollX:rn,overscrollY:En,preventDiagonalScrolling:wn,rightElement:Gt,rightElementProps:yn,trapFocus:Cn=!1,smoothScrollX:jr,smoothScrollY:qr,scaleToRem:Kr=!1,rowHeight:Di=34,headerHeight:_n=36,groupHeaderHeight:An=_n,theme:He,isOutsideClick:cn,renderers:Rn,resizeIndicator:Oi,scrollToActiveCell:Zn=!0,drawFocusRing:Ma=!0,portalElementRef:wo}=e,Zr=Ma==="no-editor"?i===void 0:Ma,Nn=typeof e.rowMarkers=="string"?void 0:e.rowMarkers,Sn=Nn?.kind??e.rowMarkers??"none",Jr=Nn?.width??e.rowMarkerWidth,or=Nn?.startIndex??e.rowMarkerStartIndex??1,Qr=Nn?.theme??e.rowMarkerTheme,fr=Nn?.headerTheme,ei=Nn?.headerAlwaysVisible,ti=ve!=="multi"||Nn?.headerDisabled===!0,Tr=Nn?.checkboxStyle??"square",hr=Math.max(Wt,20),ni=Math.max(wt,hr),Ra=Math.max(ln??ni,hr),Pi=f.useMemo(()=>typeof window>"u"?{fontSize:"16px"}:window.getComputedStyle(document.documentElement),[]),{rows:ze,rowNumberMapper:Li,rowHeight:yo,getRowThemeOverride:Dr}=Q0(Nt,b,Di,h),Ia=f.useMemo(()=>Number.parseFloat(Pi.fontSize),[Pi]),{rowHeight:Jn,headerHeight:Fi,groupHeaderHeight:Co,theme:ri,overscrollX:Ea,overscrollY:Ta}=K0({groupHeaderHeight:An,headerHeight:_n,overscrollX:rn,overscrollY:En,remSize:Ia,rowHeight:yo,scaleToRem:Kr,theme:He}),Qn=Z0(le),gr=Jr??(b>1e4?48:b>1e3?44:b>100?36:32),Tn=Sn!=="none",G=Tn?1:0,_t=De!==void 0,ar=De?.sticky===!0,[Da,Or]=f.useState(!1),Oa=qt??Da,ii=f.useCallback(()=>{St!==void 0?St():Or(!1)},[St]),q=f.useMemo(()=>It===void 0?void 0:Bo(It,G),[It,G])??n,$=f.useRef();$.current===void 0&&($.current=new AbortController),f.useEffect(()=>()=>$?.current.abort(),[]);const[ee,xe]=F0(Q,x,G,$.current,ze),Te=f.useCallback((w,A,_)=>{if(Dt===void 0)return!0;const N=[w[0]-G,w[1]];return Dt?.(N,A,_)},[G,Dt]),ce=f.useRef(It),ge=f.useCallback((w,A)=>{A&&(w=N0(w,ee,G,M,$.current)),gt!==void 0?(ce.current=Bo(w,-G),gt(ce.current)):r(w)},[gt,ee,G,M]),Ye=Cr(Zt,f.useCallback((w,A,_,N)=>{Zt?.(v[_-G],A,_-G,N)},[Zt,G,v])),Me=Cr(Ge,f.useCallback((w,A,_,N)=>{Ge?.(v[_-G],A,_-G,N)},[Ge,G,v])),Ze=Cr(kt,f.useCallback((w,A,_,N)=>{kt?.(v[_-G],A,_-G,N)},[kt,G,v])),vt=Cr(C,f.useCallback((w,A)=>C?.({...w,columnIndex:w.columnIndex-G},A)??!1,[C,G])),sn=Cr(F,f.useCallback((w,A)=>F?.({...w,col:w.col-G},A)??!1,[F,G])),Ut=f.useCallback(w=>{if(_e!==void 0){const A=_e(Bo(w,-G));return typeof A=="boolean"?A:Bo(A,G)}return!0},[_e,G]),[Mt,lt,qe]=L0(q,ge,me,he,Ce,Ue,O),st=f.useMemo(()=>cr(id(),ri),[ri]),[At,oi]=f.useState([0,0,0]),Pr=f.useMemo(()=>{if(Rn===void 0)return{};const w={};for(const A of Rn)w[A.kind]=A;return w},[Rn]),Jt=f.useCallback(w=>w.kind!==Z.Custom?Pr[w.kind]:In?.find(A=>A.isMatch(w)),[In,Pr]);let{sizedColumns:on,nonGrowWidth:Lt}=sm(v,ze,xe,At[0]-(G===0?0:gr)-At[2],hr,Ra,st,Jt,$.current);Sn!=="none"&&(Lt+=gr);const Hn=f.useMemo(()=>on.some(w=>w.group!==void 0),[on]),fn=Hn?Fi+Co:Fi,ai=q.rows.length,lr=Sn==="none"?void 0:ai===0?!1:ai===ze?!0:void 0,tt=f.useMemo(()=>Sn==="none"?on:[{title:"",width:gr,icon:void 0,hasMenu:!1,style:"normal",themeOverride:Qr,rowMarker:Tr,rowMarkerChecked:lr,headerRowMarkerTheme:fr,headerRowMarkerAlwaysVisible:ei,headerRowMarkerDisabled:ti},...on],[Sn,on,gr,Qr,Tr,lr,fr,ei,ti]),Qt=f.useRef({height:1,width:1,x:0,y:0}),Lr=f.useRef(!1),{setVisibleRegion:pr,visibleRegion:sr,scrollRef:Ht}=nv(vn,tn,Jn,Qt,()=>Lr.current=!0);Qt.current=sr;const Df=sr.x+G,So=sr.y,hn=f.useRef(null),xn=f.useCallback(w=>{w===!0?hn.current?.focus():window.requestAnimationFrame(()=>{hn.current?.focus()})},[]),gn=_t?ze+1:ze,zn=f.useCallback(w=>{const A=G===0?w:w.map(N=>({...N,location:[N.location[0]-G,N.location[1]]})),_=de?.(A);if(_!==!0)for(const N of A)ae?.(N.location,N.value);return _},[ae,de,G]),[Fr,Pa]=f.useState(),xo=q.current!==void 0&&q.current.range.width*q.current.range.height>1?q.current.range:void 0,vs=Zr?q.current?.cell:void 0,ko=vs?.[0],Mo=vs?.[1],Of=f.useMemo(()=>{if((dt===void 0||dt.length===0)&&(xo??ko??Mo??Fr)===void 0)return;const w=[];if(dt!==void 0)for(const A of dt){const _=tt.length-A.range.x-G;_>0&&w.push({color:A.color,range:{...A.range,x:A.range.x+G,width:Math.min(_,A.range.width)},style:A.style})}return Fr!==void 0&&w.push({color:Wr(st.accentColor,0),range:Fr,style:"dashed"}),xo!==void 0&&w.push({color:Wr(st.accentColor,.5),range:xo,style:"solid-outline"}),ko!==void 0&&Mo!==void 0&&w.push({color:st.accentColor,range:{x:ko,y:Mo,width:1,height:1},style:"solid-outline"}),w.length>0?w:void 0},[Fr,xo,ko,Mo,dt,tt.length,st.accentColor,G]),bs=f.useRef(tt);bs.current=tt;const Dn=f.useCallback(([w,A],_=!1)=>{const N=_t&&A===gn-1;if(w===0&&Tn){if(N)return Wo;const K=Li(A);return K===void 0?Wo:{kind:$n.Marker,allowOverlay:!1,checkboxStyle:Tr,checked:q?.rows.hasIndex(A)===!0,markerKind:Sn==="clickable-number"?"number":Sn,row:or+K,drawHandle:Kt!==void 0,cursor:Sn==="clickable-number"?"pointer":void 0}}else if(N){const z=w===G?De?.hint??"":"",U=bs.current[w];if(U?.trailingRowOptions?.disabled===!0)return Wo;{const J=U?.trailingRowOptions?.hint??z,ie=U?.trailingRowOptions?.addIcon??De?.addIcon;return{kind:$n.NewRow,hint:J,allowOverlay:!1,icon:ie}}}else{const K=w-G;if(_||bt?.strict===!0){const U=Qt.current,J=U.x>K||K>U.x+U.width||U.y>A||A>U.y+U.height||A>=Aa.current,ie=K===U.extras?.selected?.[0]&&A===U.extras?.selected[1];let ye=!1;if(U.extras?.freezeRegions!==void 0){for(const Rt of U.extras.freezeRegions)if(Br(Rt,K,A)){ye=!0;break}}if(J&&!ie&&!ye)return Wo}let z=x([K,A]);return G!==0&&z.span!==void 0&&(z={...z,span:[z.span[0]+G,z.span[1]+G]}),z}},[_t,gn,Tn,Li,Tr,q?.rows,Sn,or,Kt,G,De?.hint,De?.addIcon,bt?.strict,x]),La=f.useCallback(w=>{let A=pt?.(w)??{name:w};return se!==void 0&&w!==""&&(A={icon:A.icon,name:A.name,overrideTheme:A.overrideTheme,actions:[...A.actions??[],{title:"Rename",icon:"renameIcon",onClick:_=>za({group:A.name,bounds:_.bounds})}]}),A},[pt,se]),Ro=f.useCallback(w=>{const[A,_]=w.cell,N=tt[A],Y=N?.group!==void 0?La(N.group)?.overrideTheme:void 0,K=N?.themeOverride,z=Dr?.(_);o({...w,theme:cr(st,Y,K,z,w.content.themeOverride)})},[Dr,tt,La,st]),li=f.useCallback((w,A,_)=>{if(q.current===void 0)return;const[N,Y]=q.current.cell,K=Dn([N,Y]);if(K.kind!==Z.Boolean&&K.allowOverlay){let z=K;if(_!==void 0)switch(z.kind){case Z.Number:{const U=Gg(()=>_==="-"?-0:Number.parseFloat(_),0);z={...z,data:Number.isNaN(U)?0:U};break}case Z.Text:case Z.Markdown:case Z.Uri:z={...z,data:_};break}Ro({target:w,content:z,initialValue:_,cell:[N,Y],highlight:_===void 0,forceEditMode:_!==void 0,activation:A})}else K.kind===Z.Boolean&&A.inputType==="keyboard"&&K.readonly!==!0&&(zn([{location:q.current.cell,value:{...K,data:yd(K.data)}}]),hn.current?.damage([{cell:q.current.cell}]))},[Dn,q,zn,Ro]),ws=f.useCallback((w,A)=>{const _=hn.current?.getBounds(w,A);if(_===void 0||Ht.current===null)return;const N=Dn([w,A]);N.allowOverlay&&Ro({target:_,content:N,initialValue:void 0,highlight:!0,cell:[w,A],forceEditMode:!0,activation:{inputType:"keyboard",key:"Enter"}})},[Dn,Ht,Ro]),Yt=f.useCallback((w,A,_="both",N=0,Y=0,K=void 0)=>{if(Ht.current!==null){const z=hn.current,U=a.current,J=typeof w!="number"?w.unit==="cell"?w.amount:void 0:w,ie=typeof A!="number"?A.unit==="cell"?A.amount:void 0:A,ye=typeof w!="number"&&w.unit==="px"?w.amount:void 0,Rt=typeof A!="number"&&A.unit==="px"?A.amount:void 0;if(z!==null&&U!==null){let Je={x:0,y:0,width:0,height:0},Ke=0,ut=0;if((J!==void 0||ie!==void 0)&&(Je=z.getBounds((J??0)+G,ie??0)??Je,Je.width===0||Je.height===0))return;const nt=U.getBoundingClientRect(),yt=nt.width/U.offsetWidth;if(ye!==void 0&&(Je={...Je,x:ye-nt.left-Ht.current.scrollLeft,width:1}),Rt!==void 0&&(Je={...Je,y:Rt+nt.top-Ht.current.scrollTop,height:1}),Je!==void 0){const Ct={x:Je.x-N,y:Je.y-Y,width:Je.width+2*N,height:Je.height+2*Y};let hi=0;for(let Ga=0;Ga<Ae;Ga++)hi+=on[Ga].width;let Ni=0;const Bi=mt+(ar?1:0);Bi>0&&(Ni=Xr(gn,Bi,Jn));let tr=hi*yt+nt.left+G*gr*yt,gi=nt.right,zr=nt.top+fn*yt,pi=nt.bottom-Ni*yt;const Lo=Je.width+N*2;switch(K?.hAlign){case"start":gi=tr+Lo;break;case"end":tr=gi-Lo;break;case"center":tr=Math.floor((tr+gi)/2)-Lo/2,gi=tr+Lo;break}const Fo=Je.height+Y*2;switch(K?.vAlign){case"start":pi=zr+Fo;break;case"end":zr=pi-Fo;break;case"center":zr=Math.floor((zr+pi)/2)-Fo/2,pi=zr+Fo;break}tr>Ct.x?Ke=Ct.x-tr:gi<Ct.x+Ct.width&&(Ke=Ct.x+Ct.width-gi),zr>Ct.y?ut=Ct.y-zr:pi<Ct.y+Ct.height&&(ut=Ct.y+Ct.height-pi),_==="vertical"||typeof w=="number"&&w<Ae?Ke=0:(_==="horizontal"||typeof A=="number"&&A>=gn-Bi)&&(ut=0),(Ke!==0||ut!==0)&&(yt!==1&&(Ke/=yt,ut/=yt),Ht.current.scrollTo({left:Ke+Ht.current.scrollLeft,top:ut+Ht.current.scrollTop,behavior:K?.behavior??"auto"}))}}}},[G,mt,gr,Ht,fn,Ae,on,gn,ar,Jn]),Fa=f.useRef(ws),_a=f.useRef(x);Fa.current=ws,_a.current=x;const Aa=f.useRef(ze);Aa.current=ze;const ys=f.useRef(tt.length);ys.current=tt.length;const mr=f.useCallback(async(w,A=!0,_)=>{if(tt[w]?.trailingRowOptions?.disabled===!0)return;const Y=pe?.();let K,z=!0;Y!==void 0&&(K=await Y,K==="top"&&(z=!1),typeof K=="number"&&(z=!1));let U=0;const J=()=>{if(Aa.current<=ze){U<500&&window.setTimeout(J,U),U=50+U*2;return}const ie=typeof K=="number"?K:z?ze:0;Po.current(w-G,ie,"both",0,0,_?{behavior:_}:void 0),Mt({cell:[w,ie],range:{x:w,y:ie,width:1,height:1}},!1,!1,"edit");const ye=_a.current([w-G,ie]);ye.allowOverlay&&yi(ye)&&ye.readonly!==!0&&A&&window.setTimeout(()=>{Fa.current(w,ie)},0)};J()},[tt,pe,G,ze,Mt]),Io=f.useCallback(async(w,A=!0)=>{const _=et?.();let N,Y=!0;_!==void 0&&(N=await _,N==="left"&&(Y=!1),typeof N=="number"&&(Y=!1));let K=0;const z=()=>{if(ys.current<=tt.length){K<500&&window.setTimeout(z,K),K=50+K*2;return}const U=typeof N=="number"?N:Y?tt.length:0;Yt(U-G,w),Mt({cell:[U,w],range:{x:U,y:w,width:1,height:1}},!1,!1,"edit");const J=_a.current([U-G,w]);J.allowOverlay&&yi(J)&&J.readonly!==!0&&A&&window.setTimeout(()=>{Fa.current(U,w)},0)};z()},[tt,et,G,Yt,Mt]),si=f.useCallback(w=>{const A=on[w]?.trailingRowOptions?.targetColumn??De?.targetColumn;if(typeof A=="number")return A+(Tn?1:0);if(typeof A=="object"){const _=v.indexOf(A);if(_>=0)return _+(Tn?1:0)}},[on,v,Tn,De?.targetColumn]),vr=f.useRef(),ui=f.useRef(),_i=f.useCallback((w,A)=>{const[_,N]=A;return cr(st,tt[_]?.themeOverride,Dr?.(N),w.themeOverride)},[Dr,tt,st]),{mapper:_r}=ev(Nt,b),Bn=Nt?.navigationBehavior,Ai=f.useCallback(w=>{const A=ua.value?w.metaKey:w.ctrlKey,_=A&&ve==="multi",[N,Y]=w.location,K=q.columns,z=q.rows,[U,J]=q.current?.cell??[];if(w.kind==="cell"){if(ui.current=void 0,Ar.current=[N,Y],N===0&&Tn){if(_t===!0&&Y===ze||Sn==="number"||ve==="none")return;const ie=Dn(w.location);if(ie.kind!==$n.Marker)return;if(Kt!==void 0){const Je=Jt(ie);Pn(Je?.kind===$n.Marker);const Ke=Je?.onClick?.({...w,cell:ie,posX:w.localEventX,posY:w.localEventY,bounds:w.bounds,theme:_i(ie,w.location),preventDefault:()=>{}});if(Ke===void 0||Ke.checked===ie.checked)return}o(void 0),xn();const ye=z.hasIndex(Y),Rt=vr.current;if(ve==="multi"&&(w.shiftKey||w.isLongTouch===!0)&&Rt!==void 0&&z.hasIndex(Rt)){const Je=[Math.min(Rt,Y),Math.max(Rt,Y)+1];_||Ne==="multi"?lt(void 0,Je,!0):lt(Qe.fromSingleSelection(Je),void 0,_)}else ve==="multi"&&(_||w.isTouch||Ne==="multi")?ye?lt(z.remove(Y),void 0,!0):(lt(void 0,Y,!0),vr.current=Y):ye&&z.length===1?lt(Qe.empty(),void 0,A):(lt(Qe.fromSingleSelection(Y),void 0,A),vr.current=Y)}else if(N>=G&&_t&&Y===ze){const ie=si(N);mr(ie??N)}else if(U!==N||J!==Y){const ie=Dn(w.location),ye=Jt(ie);if(ye?.onSelect!==void 0){let Ke=!1;if(ye.onSelect({...w,cell:ie,posX:w.localEventX,posY:w.localEventY,bounds:w.bounds,preventDefault:()=>Ke=!0,theme:_i(ie,w.location)}),Ke)return}if(Bn==="block"&&_r(Y).isGroupHeader)return;const Rt=ar&&Y===ze,Je=ar&&q!==void 0&&q.current?.cell[1]===ze;if((w.shiftKey||w.isLongTouch===!0)&&U!==void 0&&J!==void 0&&q.current!==void 0&&!Je){if(Rt)return;const Ke=Math.min(N,U),ut=Math.max(N,U),nt=Math.min(Y,J),yt=Math.max(Y,J);Mt({...q.current,range:{x:Ke,y:nt,width:ut-Ke+1,height:yt-nt+1}},!0,A,"click"),vr.current=void 0,xn()}else Mt({cell:[N,Y],range:{x:N,y:Y,width:1,height:1}},!0,A,"click"),vr.current=void 0,o(void 0),xn()}}else if(w.kind==="header")if(Ar.current=[N,Y],o(void 0),Tn&&N===0)vr.current=void 0,ui.current=void 0,!ti&&ve==="multi"&&(z.length!==ze?lt(Qe.fromSingleSelection([0,ze]),void 0,A):lt(Qe.empty(),void 0,A),xn());else{const ie=ui.current;if(ne==="multi"&&(w.shiftKey||w.isLongTouch===!0)&&ie!==void 0&&K.hasIndex(ie)){const ye=[Math.min(ie,N),Math.max(ie,N)+1];A||w.isTouch||ft==="multi"?qe(void 0,ye,A):qe(Qe.fromSingleSelection(ye),void 0,A)}else ne==="multi"&&(A||w.isTouch||ft==="multi")?(K.hasIndex(N)?qe(K.remove(N),void 0,A):qe(void 0,N,A),ui.current=N):ne!=="none"&&(K.hasIndex(N)?qe(K.remove(N),void 0,A):qe(Qe.fromSingleSelection(N),void 0,A),ui.current=N);vr.current=void 0,xn()}else w.kind===Yn?Ar.current=[N,Y]:w.kind===ca&&!w.isMaybeScrollbar&&(ge(Uo,!1),o(void 0),xn(),Bt?.(),vr.current=void 0,ui.current=void 0)},[ve,ne,q,Tn,G,_t,ze,Sn,Dn,Kt,xn,Ne,ft,Jt,_i,lt,si,mr,Bn,_r,ar,Mt,ti,qe,ge,Bt]),Hi=f.useRef(!1),Ar=f.useRef(),Cs=f.useRef(sr),er=f.useRef(),Pf=f.useCallback(w=>{if(ci.current=!1,Cs.current=Qt.current,w.button!==0&&w.button!==1){er.current=void 0;return}const A=performance.now();er.current={button:w.button,time:A,location:w.location},w?.kind==="header"&&(Hi.current=!0);const _=w.kind==="cell"&&w.isFillHandle;!_&&w.kind!=="cell"&&w.isEdge||(u({previousSelection:q,fillHandle:_}),Ar.current=void 0,!w.isTouch&&w.button===0&&!_?Ai(w):!w.isTouch&&w.button===1&&(Ar.current=w.location))},[q,Ai]),[Ha,za]=f.useState(),Ss=f.useCallback(w=>{if(w.kind!==Yn||ne!=="multi")return;const A=ua.value?w.metaKey:w.ctrlKey,[_]=w.location,N=q.columns;if(_<G)return;const Y=tt[_];let K=_,z=_;for(let U=_-1;U>=G&&uo(Y.group,tt[U].group);U--)K--;for(let U=_+1;U<tt.length&&uo(Y.group,tt[U].group);U++)z++;if(xn(),A||w.isTouch||ft==="multi")if(N.hasAll([K,z+1])){let U=N;for(let J=K;J<=z;J++)U=U.remove(J);qe(U,void 0,A)}else qe(void 0,[K,z+1],A);else qe(Qe.fromSingleSelection([K,z+1]),void 0,A)},[ne,xn,q.columns,tt,G,qe,ft]),ci=f.useRef(!1),Eo=f.useCallback(async w=>{if(ee!==void 0&&Ye!==void 0){const A=Qt.current.y,_=Qt.current.height;let N=ee({x:w,y:A,width:1,height:Math.min(_,ze-A)},$.current.signal);typeof N!="object"&&(N=await N());const Y=on[w-G],z=document.createElement("canvas").getContext("2d",{alpha:!1});if(z!==null){z.font=st.baseFontFull;const U=ld(z,st,Y,0,N,hr,ni,!1,Jt);Ye?.(Y,U.width,w,U.width)}}},[on,ee,ni,st,hr,Ye,G,ze,Jt]),[Lf,Va]=f.useState(),di=f.useCallback(async(w,A)=>{const _=w.current?.range;if(_===void 0||ee===void 0||A.current===void 0)return;const N=A.current.range;if(R!==void 0){let U=!1;if(R({fillDestination:{...N,x:N.x-G},patternSource:{..._,x:_.x-G},preventDefault:()=>U=!0}),U)return}let Y=ee(_,$.current.signal);typeof Y!="object"&&(Y=await Y());const K=Y,z=[];for(let U=0;U<N.width;U++)for(let J=0;J<N.height;J++){const ie=[N.x+U,N.y+J];if(qc(ie,_))continue;const ye=K[J%_.height][U%_.width];Si(ye)||!yi(ye)||z.push({location:ie,value:{...ye}})}zn(z),hn.current?.damage(z.map(U=>({cell:U.location})))},[ee,zn,R,G]),xs=f.useCallback(()=>{if(q.current===void 0||q.current.range.width<=1)return;const w={...q,current:{...q.current,range:{...q.current.range,width:1}}};di(w,q)},[di,q]),ks=f.useCallback(()=>{if(q.current===void 0||q.current.range.height<=1)return;const w={...q,current:{...q.current,range:{...q.current.range,height:1}}};di(w,q)},[di,q]),Ff=f.useCallback((w,A)=>{const _=l;if(u(void 0),Pa(void 0),Va(void 0),Hi.current=!1,A)return;if(_?.fillHandle===!0&&q.current!==void 0&&_.previousSelection?.current!==void 0){if(Fr===void 0)return;const ye={...q,current:{...q.current,range:fd(_.previousSelection.current.range,Fr)}};di(_.previousSelection,ye),ge(ye,!0);return}const[N,Y]=w.location,[K,z]=Ar.current??[],U=()=>{ci.current=!0},J=ye=>{const Rt=ye.isTouch||K===N&&z===Y;if(Rt&&T?.([N-G,Y],{...ye,preventDefault:U}),ye.button===1)return!ci.current;if(!ci.current){const Je=Dn(w.location),Ke=Jt(Je);if(Ke!==void 0&&Ke.onClick!==void 0&&Rt){const nt=Ke.onClick({...ye,cell:Je,posX:ye.localEventX,posY:ye.localEventY,bounds:ye.bounds,theme:_i(Je,w.location),preventDefault:U});nt!==void 0&&!Si(nt)&&wi(nt)&&(zn([{location:ye.location,value:nt}]),hn.current?.damage([{cell:ye.location}]))}if(ci.current||q.current===void 0)return!1;let ut=!1;switch(Je.activationBehaviorOverride??Re){case"double-click":case"second-click":{if(_?.previousSelection?.current?.cell===void 0)break;const[nt,yt]=q.current.cell,[Ct,hi]=_.previousSelection.current.cell;ut=N===nt&&N===Ct&&Y===yt&&Y===hi&&(ye.isDoubleClick===!0||Re==="second-click");break}case"single-click":{ut=!0;break}}if(ut){const yt={inputType:"pointer",pointerActivation:ye.isDoubleClick===!0?"double-click":Je.activationBehaviorOverride??Re,pointerType:ye.isTouch?"touch":"mouse"};return k?.([N-G,Y],yt),li(ye.bounds,yt),!0}}return!1},ie=w.location[0]-G;if(w.isTouch){const ye=Qt.current,Rt=Cs.current;if(ye.x!==Rt.x||ye.y!==Rt.y)return;if(w.isLongTouch===!0){if(w.kind==="cell"&&io(q.current?.cell,w.location)){W?.([ie,w.location[1]],{...w,preventDefault:U});return}else if(w.kind==="header"&&q.columns.hasIndex(N)){oe?.(ie,{...w,preventDefault:U});return}else if(w.kind===Yn){if(ie<0)return;re?.(ie,{...w,preventDefault:U});return}}w.kind==="cell"?J(w)||Ai(w):w.kind===Yn?V?.(ie,{...w,preventDefault:U}):(w.kind===Sr&&S?.(ie,{...w,preventDefault:U}),Ai(w));return}if(w.kind==="header"){if(ie<0)return;w.isEdge?w.isDoubleClick===!0&&Eo(N):w.button===0&&N===K&&Y===z&&S?.(ie,{...w,preventDefault:U})}if(w.kind===Yn){if(ie<0)return;w.button===0&&N===K&&Y===z&&(V?.(ie,{...w,preventDefault:U}),ci.current||Ss(w))}w.kind==="cell"&&(w.button===0||w.button===1)&&J(w),Ar.current=void 0},[l,q,G,Fr,di,ge,T,Dn,Jt,Re,_i,zn,k,li,W,oe,re,Ai,V,S,Eo,Ss]),_f=f.useCallback(w=>{const A={...w,location:[w.location[0]-G,w.location[1]]};at?.(A),l!==void 0&&w.buttons===0&&(u(void 0),Pa(void 0),Va(void 0),Hi.current=!1),Va(_=>Hi.current?[w.scrollEdge[0],0]:w.scrollEdge[0]===_?.[0]&&w.scrollEdge[1]===_[1]?_:l===void 0||(er.current?.location[0]??0)<G?void 0:w.scrollEdge)},[l,at,G]),Af=f.useCallback((w,A)=>{ht?.(w-G,A)},[ht,G]),Hf=f.useCallback((w,A)=>{Xe?.(w-G,A)},[Xe,G]),fi=q?.current?.cell,zf=f.useCallback((w,A,_,N,Y,K)=>{Lr.current=!1;let z=fi;z!==void 0&&(z=[z[0]-G,z[1]]);const U=Ae===0?void 0:{x:0,y:w.y,width:Ae,height:w.height},J=[];U!==void 0&&J.push(U),mt>0&&(J.push({x:w.x-G,y:ze-mt,width:w.width,height:mt}),Ae>0&&J.push({x:0,y:ze-mt,width:Ae,height:mt}));const ie={x:w.x-G,y:w.y,width:w.width,height:_t&&w.y+w.height>=ze?w.height-1:w.height,tx:Y,ty:K,extras:{selected:z,freezeRegion:U,freezeRegions:J}};Qt.current=ie,pr(ie),oi([A,_,N]),an?.(ie,ie.tx,ie.ty,ie.extras)},[fi,G,_t,ze,Ae,mt,pr,an]),Vf=Cr(E,f.useCallback((w,A)=>E?.(w-G,A-G)!==!1,[E,G])),$f=Cr(ke,f.useCallback((w,A)=>{ke?.(w-G,A-G),ne!=="none"&&qe(Qe.fromSingleSelection(A),void 0,!0)},[ne,ke,G,qe])),$a=f.useRef(!1),Nf=f.useCallback(w=>{if(w.location[0]===0&&G>0){w.preventDefault();return}Oe?.({...w,location:[w.location[0]-G,w.location[1]]}),w.defaultPrevented()||($a.current=!0),u(void 0)},[Oe,G]),Bf=f.useCallback(()=>{$a.current=!1},[]),Ms=Nt?.selectionBehavior,To=f.useCallback(w=>{if(Ms!=="block-spanning")return;const{isGroupHeader:A,path:_,groupRows:N}=_r(w);if(A)return[w,w];const Y=_[_.length-1],K=w-Y,z=w+N-Y-1;return[K,z]},[_r,Ms]),Na=f.useRef(),Ba=f.useCallback(w=>{if(!bd(w,Na.current)&&(Na.current=w,!(er?.current?.button!==void 0&&er.current.button>=1))){if(w.buttons!==0&&l!==void 0&&er.current?.location[0]===0&&G===1&&ve==="multi"&&l.previousSelection&&!l.previousSelection.rows.hasIndex(er.current.location[1])&&q.rows.hasIndex(er.current.location[1])){const A=Math.min(er.current.location[1],w.location[1]),_=Math.max(er.current.location[1],w.location[1])+1;lt(Qe.fromSingleSelection([A,_]),void 0,!1)}else if(w.buttons!==0&&l!==void 0&&q.current!==void 0&&!$a.current&&!Hi.current&&(Ue==="rect"||Ue==="multi-rect")){const[A,_]=q.current.cell;let[N,Y]=w.location;if(Y<0&&(Y=Qt.current.y),l.fillHandle===!0&&l.previousSelection?.current!==void 0){const K=l.previousSelection.current.range;Y=Math.min(Y,_t?ze-1:ze);const z=$m(K,N,Y,xt);Pa(z)}else{if(_t&&_===ze)return;if(_t&&Y===ze)if(w.kind===ca)Y--;else return;N=Math.max(N,G);const U=To(_);Y=U===void 0?Y:Vn(Y,U[0],U[1]);const J=N-A,ie=Y-_,ye={x:J>=0?A:N,y:ie>=0?_:Y,width:Math.abs(J)+1,height:Math.abs(ie)+1};Mt({...q.current,range:ye},!0,!1,"drag")}}Tt?.({...w,location:[w.location[0]-G,w.location[1]]})}},[l,G,ve,q,Ue,Tt,lt,_t,ze,xt,To,Mt]),Wf=f.useCallback(()=>{const w=Na.current;if(w===void 0)return;const[A,_]=w.scrollEdge;let[N,Y]=w.location;const K=Qt.current;A===-1?N=K.extras?.freezeRegion?.x??K.x:A===1&&(N=K.x+K.width),_===-1?Y=Math.max(0,K.y):_===1&&(Y=Math.min(ze-1,K.y+K.height)),N=Vn(N,0,tt.length-1),Y=Vn(Y,0,ze-1),Ba({...w,location:[N,Y]})},[tt.length,Ba,ze]);q0(Lf,Ht,Wf);const Wn=f.useCallback(w=>{if(q.current===void 0)return;const[A,_]=w,[N,Y]=q.current.cell,K=q.current.range;let z=K.x,U=K.x+K.width,J=K.y,ie=K.y+K.height;const[ye,Rt]=To(Y)??[0,ze-1],Je=Rt+1;if(_!==0)switch(_){case 2:{ie=Je,J=Y,Yt(0,ie,"vertical");break}case-2:{J=ye,ie=Y+1,Yt(0,J,"vertical");break}case 1:{J<Y?(J++,Yt(0,J,"vertical")):(ie=Math.min(Je,ie+1),Yt(0,ie,"vertical"));break}case-1:{ie>Y+1?(ie--,Yt(0,ie,"vertical")):(J=Math.max(ye,J-1),Yt(0,J,"vertical"));break}default:lo()}if(A!==0)if(A===2)U=tt.length,z=N,Yt(U-1-G,0,"horizontal");else if(A===-2)z=G,U=N+1,Yt(z-G,0,"horizontal");else{let Ke=[];if(ee!==void 0){const ut=ee({x:z,y:J,width:U-z-G,height:ie-J},$.current.signal);typeof ut=="object"&&(Ke=ov(ut))}if(A===1){let ut=!1;if(z<N){if(Ke.length>0){const nt=kr(z+1,N+1).find(yt=>!Ke.includes(yt-G));nt!==void 0&&(z=nt,ut=!0)}else z++,ut=!0;ut&&Yt(z,0,"horizontal")}ut||(U=Math.min(tt.length,U+1),Yt(U-1-G,0,"horizontal"))}else if(A===-1){let ut=!1;if(U>N+1){if(Ke.length>0){const nt=kr(U-1,N,-1).find(yt=>!Ke.includes(yt-G));nt!==void 0&&(U=nt,ut=!0)}else U--,ut=!0;ut&&Yt(U-G,0,"horizontal")}ut||(z=Math.max(G,z-1),Yt(z-G,0,"horizontal"))}else lo()}Mt({cell:q.current.cell,range:{x:z,y:J,width:U-z,height:ie-J}},!0,!1,"keyboard-select")},[ee,To,q,tt.length,G,ze,Yt,Mt]),Wa=f.useRef(Zn);Wa.current=Zn;const br=f.useCallback((w,A,_,N)=>{const Y=gn-(_?0:1);w=Vn(w,G,on.length-1+G),A=Vn(A,0,Y);const K=fi?.[0],z=fi?.[1];if(w===K&&A===z)return!1;if(N&&q.current!==void 0){const U=[...q.current.rangeStack];(q.current.range.width>1||q.current.range.height>1)&&U.push(q.current.range),ge({...q,current:{cell:[w,A],range:{x:w,y:A,width:1,height:1},rangeStack:U}},!0)}else Mt({cell:[w,A],range:{x:w,y:A,width:1,height:1}},!0,!1,"keyboard-nav");return c.current!==void 0&&c.current[0]===w&&c.current[1]===A&&(c.current=void 0),Wa.current&&Yt(w-G,A),!0},[gn,G,on.length,fi,q,Yt,ge,Mt]),Uf=f.useCallback((w,A)=>{i?.cell!==void 0&&w!==void 0&&wi(w)&&(zn([{location:i.cell,value:w}]),window.requestAnimationFrame(()=>{hn.current?.damage([{cell:i.cell}])})),xn(!0),o(void 0);const[_,N]=A;if(q.current!==void 0&&(_!==0||N!==0)){const Y=q.current.cell[1]===gn-1&&w!==void 0,K=q.current.cell[0]===tt.length-1&&w!==void 0;let z=!0;if(Y&&N===1&&pe!==void 0){z=!1;const U=q.current.cell[0]+_,J=si(U);mr(J??U,!1)}if(K&&_===1&&et!==void 0){z=!1;const U=q.current.cell[1]+N;Io(U,!1)}z&&br(Vn(q.current.cell[0]+_,0,tt.length-1),Vn(q.current.cell[1]+N,0,gn-1),Y,!1)}P?.(w,A)},[i?.cell,xn,q,P,zn,gn,br,tt.length,mr,Io,pe,et,si]),Gf=f.useMemo(()=>`gdg-overlay-${iv++}`,[]),Hr=f.useCallback(w=>{xn();const A=[];for(let _=w.x;_<w.x+w.width;_++)for(let N=w.y;N<w.y+w.height;N++){const Y=x([_-G,N]);if(!Y.allowOverlay&&Y.kind!==Z.Boolean)continue;let K;if(Y.kind===Z.Custom){const z=Jt(Y),U=z?.provideEditor?.({...Y,location:[_-G,N]});z?.onDelete!==void 0?K=z.onDelete(Y):Yg(U)&&(K=U?.deletedValue?.(Y))}else(wi(Y)&&Y.allowOverlay||Y.kind===Z.Boolean)&&(K=Jt(Y)?.onDelete?.(Y));K!==void 0&&!Si(K)&&wi(K)&&A.push({location:[_,N],value:K})}zn(A),hn.current?.damage(A.map(_=>({cell:_.location})))},[xn,x,Jt,zn,G]),zi=i!==void 0,Rs=f.useCallback(w=>{const A=()=>{w.stopPropagation(),w.preventDefault()},_={didMatch:!1},{bounds:N}=w,Y=q.columns,K=q.rows,z=Qn;if(!zi&&rt(z.clear,w,_))ge(Uo,!1),Bt?.();else if(!zi&&rt(z.selectAll,w,_))ge({columns:Qe.empty(),rows:Qe.empty(),current:{cell:q.current?.cell??[G,0],range:{x:G,y:0,width:v.length,height:ze},rangeStack:[]}},!1);else if(rt(z.search,w,_))s?.current?.focus({preventScroll:!0}),Or(!0);else if(rt(z.delete,w,_)){const nt=Ut?.(q)??!0;if(nt!==!1){const yt=nt===!0?q:nt;if(yt.current!==void 0){Hr(yt.current.range);for(const Ct of yt.current.rangeStack)Hr(Ct)}for(const Ct of yt.rows)Hr({x:G,y:Ct,width:v.length,height:1});for(const Ct of yt.columns)Hr({x:Ct,y:0,width:1,height:ze})}}if(_.didMatch)return A(),!0;if(q.current===void 0)return!1;let[U,J]=q.current.cell;const[,ie]=q.current.cell;let ye=!1,Rt=!1;if(rt(z.scrollToSelectedCell,w,_))Po.current(U-G,J);else if(ne!=="none"&&rt(z.selectColumn,w,_))Y.hasIndex(U)?qe(Y.remove(U),void 0,!0):ne==="single"?qe(Qe.fromSingleSelection(U),void 0,!0):qe(void 0,U,!0);else if(ve!=="none"&&rt(z.selectRow,w,_))K.hasIndex(J)?lt(K.remove(J),void 0,!0):ve==="single"?lt(Qe.fromSingleSelection(J),void 0,!0):lt(void 0,J,!0);else if(!zi&&N!==void 0&&rt(z.activateCell,w,_))if(J===ze&&_t)window.setTimeout(()=>{const nt=si(U);mr(nt??U)},0);else{const nt={inputType:"keyboard",key:w.key};k?.([U-G,J],nt),li(N,nt)}else q.current.range.height>1&&rt(z.downFill,w,_)?ks():q.current.range.width>1&&rt(z.rightFill,w,_)?xs():rt(z.goToNextPage,w,_)?J+=Math.max(1,Qt.current.height-4):rt(z.goToPreviousPage,w,_)?J-=Math.max(1,Qt.current.height-4):rt(z.goToFirstCell,w,_)?(o(void 0),J=0,U=0):rt(z.goToLastCell,w,_)?(o(void 0),J=Number.MAX_SAFE_INTEGER,U=Number.MAX_SAFE_INTEGER):rt(z.selectToFirstCell,w,_)?(o(void 0),Wn([-2,-2])):rt(z.selectToLastCell,w,_)?(o(void 0),Wn([2,2])):zi?(rt(z.closeOverlay,w,_)&&o(void 0),rt(z.acceptOverlayDown,w,_)&&(o(void 0),J++),rt(z.acceptOverlayUp,w,_)&&(o(void 0),J--),rt(z.acceptOverlayLeft,w,_)&&(o(void 0),U--),rt(z.acceptOverlayRight,w,_)&&(o(void 0),U++)):(rt(z.goDownCell,w,_)?J+=1:rt(z.goUpCell,w,_)?J-=1:rt(z.goRightCell,w,_)?U+=1:rt(z.goLeftCell,w,_)?U-=1:rt(z.goDownCellRetainSelection,w,_)?(J+=1,ye=!0):rt(z.goUpCellRetainSelection,w,_)?(J-=1,ye=!0):rt(z.goRightCellRetainSelection,w,_)?(U+=1,ye=!0):rt(z.goLeftCellRetainSelection,w,_)?(U-=1,ye=!0):rt(z.goToLastRow,w,_)?J=ze-1:rt(z.goToFirstRow,w,_)?J=Number.MIN_SAFE_INTEGER:rt(z.goToLastColumn,w,_)?U=Number.MAX_SAFE_INTEGER:rt(z.goToFirstColumn,w,_)?U=Number.MIN_SAFE_INTEGER:(Ue==="rect"||Ue==="multi-rect")&&(rt(z.selectGrowDown,w,_)?Wn([0,1]):rt(z.selectGrowUp,w,_)?Wn([0,-1]):rt(z.selectGrowRight,w,_)?Wn([1,0]):rt(z.selectGrowLeft,w,_)?Wn([-1,0]):rt(z.selectToLastRow,w,_)?Wn([0,2]):rt(z.selectToFirstRow,w,_)?Wn([0,-2]):rt(z.selectToLastColumn,w,_)?Wn([2,0]):rt(z.selectToFirstColumn,w,_)&&Wn([-2,0])),Rt=_.didMatch);if(Bn!==void 0&&Bn!=="normal"&&J!==ie){const nt=Bn==="skip-up"||Bn==="skip"||Bn==="block",yt=Bn==="skip-down"||Bn==="skip"||Bn==="block",Ct=J<ie;if(Ct&&nt){for(;J>=0&&_r(J).isGroupHeader;)J--;J<0&&(J=ie)}else if(!Ct&&yt){for(;J<ze&&_r(J).isGroupHeader;)J++;J>=ze&&(J=ie)}}const Ke=br(U,J,!1,ye),ut=_.didMatch;return ut&&(Ke||!Rt||Cn)&&A(),ut},[Bn,zi,q,Qn,ne,ve,Ue,G,_r,ze,br,ge,Bt,v.length,Ut,Cn,Hr,qe,lt,_t,si,mr,k,li,ks,xs,Wn]),Vi=f.useCallback(w=>{let A=!1;if(X!==void 0&&X({...w,...w.location&&{location:[w.location[0]-G,w.location[1]]},cancel:()=>{A=!0}}),A||Rs(w)||q.current===void 0)return;const[_,N]=q.current.cell,Y=Qt.current;if(Se&&!w.metaKey&&!w.ctrlKey&&q.current!==void 0&&w.key.length===1&&/[\p{L}\p{M}\p{N}\p{S}\p{P}]/u.test(w.key)&&w.bounds!==void 0&&yi(x([_-G,Math.max(0,Math.min(N,ze-1))]))){if((!_t||N!==ze)&&(Y.y>N||N>Y.y+Y.height||Y.x>_||_>Y.x+Y.width))return;const K={inputType:"keyboard",key:w.key};k?.([_-G,N],K),li(w.bounds,K,w.key),w.stopPropagation(),w.preventDefault()}},[Se,X,Rs,q,x,G,ze,_t,k,li]),Yf=f.useCallback((w,A)=>{const _=w.location[0]-G;if(w.kind==="header"&&oe?.(_,{...w,preventDefault:A}),w.kind===Yn){if(_<0)return;re?.(_,{...w,preventDefault:A})}if(w.kind==="cell"){const[N,Y]=w.location;W?.([_,Y],{...w,preventDefault:A}),Yp(q,w.location)||br(N,Y,!1,!1)}},[q,W,re,oe,G,br]),Ua=f.useCallback(async w=>{if(!Qn.paste)return;function A(z,U,J,ie){const ye=typeof J=="object"?J?.join(`
172
+ `&&(n.push(r),r=[])),o=t.None);break}s++}return i<e.length&&r.push(xu(e.slice(i,e.length))),n.push(r),n.map(a=>a.map(l=>({rawValue:l,formatted:l,format:"string"})))}function ku(e,t,n){const r=$0(e,t),i=a=>{window.navigator.clipboard?.writeText(a)},o=(a,l)=>window.navigator.clipboard?.write===void 0?!1:(window.navigator.clipboard.write([new ClipboardItem({"text/plain":new Blob([a],{type:"text/plain"}),"text/html":new Blob([l],{type:"text/html"})})]),!0),s=(a,l)=>{try{if(n===void 0||n.clipboardData===null)throw new Error("No clipboard data");n?.clipboardData?.setData("text/plain",a),n?.clipboardData?.setData("text/html",l)}catch{o(a,l)||i(a)}};window.navigator.clipboard?.write!==void 0||n?.clipboardData!==void 0?s(r.textPlain,r.textHtml):i(r.textPlain),n?.preventDefault()}function yd(e){return e!==!0}function Mu(e){return typeof e=="string"?e:`${e}px`}const W0=()=>e=>e.innerWidth,U0=()=>e=>e.innerHeight,G0=dn("div")({name:"Wrapper",class:"gdg-wmyidgi",propsAsIs:!1,vars:{"wmyidgi-0":[W0()],"wmyidgi-1":[U0()]}}),Y0=e=>{const{inWidth:t,inHeight:n,children:r,...i}=e;return f.createElement(G0,{innerHeight:Mu(n),innerWidth:Mu(t),...i},r)},X0=2,j0=1300;function q0(e,t,n){const r=zt.useRef(0),[i,o]=e??[0,0];zt.useEffect(()=>{if(i===0&&o===0){r.current=0;return}let s=!1,a=0;const l=u=>{if(!s){if(a===0)a=u;else{const c=u-a;r.current=Math.min(1,r.current+c/j0);const d=r.current**1.618*c*X0;t.current?.scrollBy(i*d,o*d),a=u,n?.()}window.requestAnimationFrame(l)}};return window.requestAnimationFrame(l),()=>{s=!0}},[t,i,o,n])}function K0({rowHeight:e,headerHeight:t,groupHeaderHeight:n,theme:r,overscrollX:i,overscrollY:o,scaleToRem:s,remSize:a}){const[l,u,c,d,g,h]=zt.useMemo(()=>{if(!s||a===16)return[e,t,n,r,i,o];const p=a/16,m=e,y=id();return[typeof m=="number"?m*p:v=>Math.ceil(m(v)*p),Math.ceil(t*p),Math.ceil(n*p),{...r,headerIconSize:(r?.headerIconSize??y.headerIconSize)*p,cellHorizontalPadding:(r?.cellHorizontalPadding??y.cellHorizontalPadding)*p,cellVerticalPadding:(r?.cellVerticalPadding??y.cellVerticalPadding)*p},Math.ceil((i??0)*p),Math.ceil((o??0)*p)]},[n,t,i,o,a,e,s,r]);return{rowHeight:l,headerHeight:u,groupHeaderHeight:c,theme:d,overscrollX:g,overscrollY:h}}const yr={downFill:!1,rightFill:!1,clear:!0,closeOverlay:!0,acceptOverlayDown:!0,acceptOverlayUp:!0,acceptOverlayLeft:!0,acceptOverlayRight:!0,copy:!0,paste:!0,cut:!0,search:!1,delete:!0,activateCell:!0,scrollToSelectedCell:!0,goToFirstCell:!0,goToFirstColumn:!0,goToFirstRow:!0,goToLastCell:!0,goToLastColumn:!0,goToLastRow:!0,goToNextPage:!0,goToPreviousPage:!0,selectToFirstCell:!0,selectToFirstColumn:!0,selectToFirstRow:!0,selectToLastCell:!0,selectToLastColumn:!0,selectToLastRow:!0,selectAll:!0,selectRow:!0,selectColumn:!0,goUpCell:!0,goRightCell:!0,goDownCell:!0,goLeftCell:!0,goUpCellRetainSelection:!0,goRightCellRetainSelection:!0,goDownCellRetainSelection:!0,goLeftCellRetainSelection:!0,selectGrowUp:!0,selectGrowRight:!0,selectGrowDown:!0,selectGrowLeft:!0};function it(e,t){return e===!0?t:e===!1?"":e}function Ru(e){const t=ua.value;return{activateCell:it(e.activateCell," |Enter|shift+Enter"),clear:it(e.clear,"any+Escape"),closeOverlay:it(e.closeOverlay,"any+Escape"),acceptOverlayDown:it(e.acceptOverlayDown,"Enter"),acceptOverlayUp:it(e.acceptOverlayUp,"shift+Enter"),acceptOverlayLeft:it(e.acceptOverlayLeft,"shift+Tab"),acceptOverlayRight:it(e.acceptOverlayRight,"Tab"),copy:e.copy,cut:e.cut,delete:it(e.delete,t?"Backspace|Delete":"Delete"),downFill:it(e.downFill,"primary+_68"),scrollToSelectedCell:it(e.scrollToSelectedCell,"primary+Enter"),goDownCell:it(e.goDownCell,"ArrowDown"),goDownCellRetainSelection:it(e.goDownCellRetainSelection,"alt+ArrowDown"),goLeftCell:it(e.goLeftCell,"ArrowLeft|shift+Tab"),goLeftCellRetainSelection:it(e.goLeftCellRetainSelection,"alt+ArrowLeft"),goRightCell:it(e.goRightCell,"ArrowRight|Tab"),goRightCellRetainSelection:it(e.goRightCellRetainSelection,"alt+ArrowRight"),goUpCell:it(e.goUpCell,"ArrowUp"),goUpCellRetainSelection:it(e.goUpCellRetainSelection,"alt+ArrowUp"),goToFirstCell:it(e.goToFirstCell,"primary+Home"),goToFirstColumn:it(e.goToFirstColumn,"Home|primary+ArrowLeft"),goToFirstRow:it(e.goToFirstRow,"primary+ArrowUp"),goToLastCell:it(e.goToLastCell,"primary+End"),goToLastColumn:it(e.goToLastColumn,"End|primary+ArrowRight"),goToLastRow:it(e.goToLastRow,"primary+ArrowDown"),goToNextPage:it(e.goToNextPage,"PageDown"),goToPreviousPage:it(e.goToPreviousPage,"PageUp"),paste:e.paste,rightFill:it(e.rightFill,"primary+_82"),search:it(e.search,"primary+f"),selectAll:it(e.selectAll,"primary+a"),selectColumn:it(e.selectColumn,"ctrl+ "),selectGrowDown:it(e.selectGrowDown,"shift+ArrowDown"),selectGrowLeft:it(e.selectGrowLeft,"shift+ArrowLeft"),selectGrowRight:it(e.selectGrowRight,"shift+ArrowRight"),selectGrowUp:it(e.selectGrowUp,"shift+ArrowUp"),selectRow:it(e.selectRow,"shift+ "),selectToFirstCell:it(e.selectToFirstCell,"primary+shift+Home"),selectToFirstColumn:it(e.selectToFirstColumn,"primary+shift+ArrowLeft"),selectToFirstRow:it(e.selectToFirstRow,"primary+shift+ArrowUp"),selectToLastCell:it(e.selectToLastCell,"primary+shift+End"),selectToLastColumn:it(e.selectToLastColumn,"primary+shift+ArrowRight"),selectToLastRow:it(e.selectToLastRow,"primary+shift+ArrowDown")}}function Z0(e){const t=pp(e);return zt.useMemo(()=>{if(t===void 0)return Ru(yr);const n={...t,goToNextPage:t?.goToNextPage??t?.pageDown??yr.goToNextPage,goToPreviousPage:t?.goToPreviousPage??t?.pageUp??yr.goToPreviousPage,goToFirstCell:t?.goToFirstCell??t?.first??yr.goToFirstCell,goToLastCell:t?.goToLastCell??t?.last??yr.goToLastCell,selectToFirstCell:t?.selectToFirstCell??t?.first??yr.selectToFirstCell,selectToLastCell:t?.selectToLastCell??t?.last??yr.selectToLastCell};return Ru({...yr,...n})},[t])}function J0(e){function t(r,i,o){if(typeof r=="number")return{headerIndex:r,isCollapsed:!1,depth:i,path:o};const s={headerIndex:r.headerIndex,isCollapsed:r.isCollapsed,depth:i,path:o};return r.subGroups!==void 0&&(s.subGroups=r.subGroups.map((a,l)=>t(a,i+1,[...o,l])).sort((a,l)=>a.headerIndex-l.headerIndex)),s}return e.map((r,i)=>t(r,0,[i])).sort((r,i)=>r.headerIndex-i.headerIndex)}function ql(e,t){const n=[];function r(a,l,u=!1){let c=l!==null?l-a.headerIndex:t-a.headerIndex;if(a.subGroups!==void 0&&(c=a.subGroups[0].headerIndex-a.headerIndex),c--,n.push({rowIndex:-1,headerIndex:a.headerIndex,contentIndex:-1,skip:u,isCollapsed:a.isCollapsed,depth:a.depth,path:a.path,rows:c}),a.subGroups)for(let d=0;d<a.subGroups.length;d++){const g=d<a.subGroups.length-1?a.subGroups[d+1].headerIndex:l;r(a.subGroups[d],g,u||a.isCollapsed)}}const i=J0(e.groups);for(let a=0;a<i.length;a++){const l=a<i.length-1?i[a+1].headerIndex:null;r(i[a],l)}let o=0,s=0;for(const a of n)a.contentIndex=s,s+=a.rows,a.rowIndex=o,o+=a.isCollapsed?1:a.rows+1;return n.filter(a=>a.skip===!1).map(a=>{const{skip:l,...u}=a;return u})}function Rl(e,t){if(t===void 0||ql.length===0)return{path:[e],originalIndex:e,isGroupHeader:!1,groupIndex:e,contentIndex:e,groupRows:-1};let n=e;for(const r of t){if(n===0)return{path:[...r.path,-1],originalIndex:r.headerIndex,isGroupHeader:!0,groupIndex:-1,contentIndex:-1,groupRows:r.rows};if(r.isCollapsed)n--;else{if(n<=r.rows)return{path:[...r.path,n-1],originalIndex:r.headerIndex+n,isGroupHeader:!1,groupIndex:n-1,contentIndex:r.contentIndex+n-1,groupRows:r.rows};n=n-r.rows-1}}return{path:[e],originalIndex:e,isGroupHeader:!1,groupIndex:e,contentIndex:e,groupRows:-1}}function Q0(e,t,n,r){const i=zt.useMemo(()=>e===void 0?void 0:ql(e,t),[e,t]),o=zt.useMemo(()=>i?.reduce((c,d)=>(c[d.rowIndex]=d,c),{}),[i]),s=zt.useMemo(()=>i===void 0?t:i.reduce((c,d)=>c+(d.isCollapsed?1:d.rows+1),0),[i,t]),a=zt.useMemo(()=>e===void 0||typeof n=="number"&&e.height===n?n:c=>o?.[c]?e.height:typeof n=="number"?n:n(c),[o,e,n]),l=zt.useCallback(c=>{if(i===void 0)return c;let d=c;for(const g of i){if(d===0)return;if(d--,!g.isCollapsed){if(d<g.rows)return g.contentIndex+d;d-=g.rows}}return c},[i]),u=Cr(r??e?.themeOverride,zt.useCallback(c=>{if(e===void 0)return r?.(c,c,c);if(r===void 0&&e?.themeOverride===void 0)return;const{isGroupHeader:d,contentIndex:g,groupIndex:h}=Rl(c,i);return d?e.themeOverride:r?.(c,h,g)},[i,r,e]));return e===void 0?{rowHeight:a,rows:t,rowNumberMapper:l,getRowThemeOverride:u}:{rowHeight:a,rows:s,rowNumberMapper:l,getRowThemeOverride:u}}function ev(e,t){const n=zt.useMemo(()=>e===void 0?void 0:ql(e,t),[e,t]);return{getRowGroupingForPath:Sd,updateRowGroupingByPath:Cd,mapper:zt.useCallback(r=>{if(typeof r=="number")return Rl(r,n);const i=Rl(r[1],n);return{...i,originalIndex:[r[0],i.originalIndex]}},[n])}}function Cd(e,t,n){const[r,...i]=t;return i[0]===-1?e.map((o,s)=>s===r?{...o,...n}:o):e.map((o,s)=>s===r?{...o,subGroups:Cd(o.subGroups??[],i,n)}:o)}function Sd(e,t){const[n,...r]=t;return r[0]===-1?e[n]:Sd(e[n].subGroups??[],r)}function tv(e,t){const[n]=f.useState(()=>({value:e,callback:t,facade:{get current(){return n.value},set current(r){const i=n.value;i!==r&&(n.value=r,n.callback(r,i))}}}));return n.callback=t,n.facade}function nv(e,t,n,r,i){const[o,s]=f.useMemo(()=>[t!==void 0&&typeof n=="number"?Math.floor(t/n):0,t!==void 0&&typeof n=="number"?-(t%n):0],[t,n]),a=f.useMemo(()=>({x:r.current.x,y:o,width:r.current.width??1,height:r.current.height??1,ty:s}),[r,s,o]),[l,u,c]=gp(a),d=f.useRef(i);d.current=i;const g=tv(null,m=>{m!==null&&t!==void 0?m.scrollTop=t:m!==null&&e!==void 0&&(m.scrollLeft=e)}),h=(l.height??1)>1;f.useLayoutEffect(()=>{if(t!==void 0&&g.current!==null&&h){if(g.current.scrollTop===t)return;g.current.scrollTop=t,g.current.scrollTop!==t&&c(),d.current()}},[t,h,c,g]);const p=(l.width??1)>1;return f.useLayoutEffect(()=>{if(e!==void 0&&g.current!==null&&p){if(g.current.scrollLeft===e)return;g.current.scrollLeft=e,g.current.scrollLeft!==e&&c(),d.current()}},[e,p,c,g]),{visibleRegion:l,setVisibleRegion:u,scrollRef:g}}const rv=f.lazy(async()=>await Ll(()=>import("./data-grid-overlay-editor.C9AINtRf.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20]),import.meta.url));let iv=0;function ov(e){return Ug(Os(Os(e).filter(t=>t.span!==void 0).map(t=>kr((t.span?.[0]??0)+1,(t.span?.[1]??0)+1))))}function Bo(e,t){return e===void 0||t===0||e.columns.length===0&&e.current===void 0?e:{current:e.current===void 0?void 0:{cell:[e.current.cell[0]+t,e.current.cell[1]],range:{...e.current.range,x:e.current.range.x+t},rangeStack:e.current.rangeStack.map(n=>({...n,x:n.x+t}))},rows:e.rows,columns:e.columns.offset(t)}}const Wo={kind:Z.Loading,allowOverlay:!1},Uo={columns:Qe.empty(),rows:Qe.empty(),current:void 0},av=(e,t)=>{const[n,r]=f.useState(Uo),[i,o]=f.useState(),s=f.useRef(null),a=f.useRef(null),[l,u]=f.useState(),c=f.useRef(),d=typeof window>"u"?null:window,{imageEditorOverride:g,getRowThemeOverride:h,markdownDivCreateNode:p,width:m,height:y,columns:v,rows:b,getCellContent:x,onCellClicked:T,onCellActivated:k,onFillPattern:R,onFinishedEditing:P,coercePasteValue:I,drawHeader:C,drawCell:F,editorBloom:D,onHeaderClicked:S,onColumnProposeMove:E,rangeSelectionColumnSpanning:O=!0,spanRangeBehavior:M="default",onGroupHeaderClicked:V,onCellContextMenu:W,className:j,onHeaderContextMenu:oe,getCellsForSelection:Q,onGroupHeaderContextMenu:re,onGroupHeaderRenamed:se,onCellEdited:ae,onCellsEdited:de,onSearchResultsChanged:fe,searchResults:ue,onSearchValueChange:H,searchValue:L,onKeyDown:X,onKeyUp:te,keybindings:le,editOnType:Se=!0,onRowAppended:pe,onColumnAppended:et,onColumnMoved:ke,validateCell:Dt,highlightRegions:dt,rangeSelect:Ue="rect",columnSelect:ne="multi",rowSelect:ve="multi",rangeSelectionBlending:me="exclusive",columnSelectionBlending:he="exclusive",rowSelectionBlending:Ce="exclusive",onDelete:_e,onDragStart:Oe,onMouseMove:at,onPaste:Pe,copyHeaders:we=!1,freezeColumns:Ae=0,cellActivationBehavior:Re="second-click",rowSelectionMode:Ne="auto",columnSelectionMode:ft="auto",onHeaderMenuClick:ht,onHeaderIndicatorClick:Xe,getGroupDetails:pt,rowGrouping:Nt,onSearchClose:St,onItemHovered:Tt,onSelectionCleared:Bt,showSearch:qt,onVisibleRegionChanged:an,gridSelection:It,onGridSelectionChange:gt,minColumnWidth:Wt=50,maxColumnWidth:wt=500,maxColumnAutoWidth:ln,provideEditor:Mn,trailingRowOptions:De,freezeTrailingRows:mt=0,allowedFillDirections:xt="orthogonal",scrollOffsetX:vn,scrollOffsetY:tn,verticalBorder:nn,onDragOverCell:un,onDrop:$t,onColumnResize:Zt,onColumnResizeEnd:Ge,onColumnResizeStart:kt,customRenderers:In,fillHandle:Ot,experimental:bt,fixedShadowX:bn,fixedShadowY:ir,headerIcons:Kn,imageWindowLoader:B,initialSize:Be,isDraggable:je,onDragLeave:Pt,onRowMoved:Kt,overscrollX:rn,overscrollY:En,preventDiagonalScrolling:wn,rightElement:Gt,rightElementProps:yn,trapFocus:Cn=!1,smoothScrollX:jr,smoothScrollY:qr,scaleToRem:Kr=!1,rowHeight:Di=34,headerHeight:_n=36,groupHeaderHeight:An=_n,theme:He,isOutsideClick:cn,renderers:Rn,resizeIndicator:Oi,scrollToActiveCell:Zn=!0,drawFocusRing:Ma=!0,portalElementRef:wo}=e,Zr=Ma==="no-editor"?i===void 0:Ma,Nn=typeof e.rowMarkers=="string"?void 0:e.rowMarkers,Sn=Nn?.kind??e.rowMarkers??"none",Jr=Nn?.width??e.rowMarkerWidth,or=Nn?.startIndex??e.rowMarkerStartIndex??1,Qr=Nn?.theme??e.rowMarkerTheme,fr=Nn?.headerTheme,ei=Nn?.headerAlwaysVisible,ti=ve!=="multi"||Nn?.headerDisabled===!0,Tr=Nn?.checkboxStyle??"square",hr=Math.max(Wt,20),ni=Math.max(wt,hr),Ra=Math.max(ln??ni,hr),Pi=f.useMemo(()=>typeof window>"u"?{fontSize:"16px"}:window.getComputedStyle(document.documentElement),[]),{rows:ze,rowNumberMapper:Li,rowHeight:yo,getRowThemeOverride:Dr}=Q0(Nt,b,Di,h),Ia=f.useMemo(()=>Number.parseFloat(Pi.fontSize),[Pi]),{rowHeight:Jn,headerHeight:Fi,groupHeaderHeight:Co,theme:ri,overscrollX:Ea,overscrollY:Ta}=K0({groupHeaderHeight:An,headerHeight:_n,overscrollX:rn,overscrollY:En,remSize:Ia,rowHeight:yo,scaleToRem:Kr,theme:He}),Qn=Z0(le),gr=Jr??(b>1e4?48:b>1e3?44:b>100?36:32),Tn=Sn!=="none",G=Tn?1:0,_t=De!==void 0,ar=De?.sticky===!0,[Da,Or]=f.useState(!1),Oa=qt??Da,ii=f.useCallback(()=>{St!==void 0?St():Or(!1)},[St]),q=f.useMemo(()=>It===void 0?void 0:Bo(It,G),[It,G])??n,$=f.useRef();$.current===void 0&&($.current=new AbortController),f.useEffect(()=>()=>$?.current.abort(),[]);const[ee,xe]=F0(Q,x,G,$.current,ze),Te=f.useCallback((w,A,_)=>{if(Dt===void 0)return!0;const N=[w[0]-G,w[1]];return Dt?.(N,A,_)},[G,Dt]),ce=f.useRef(It),ge=f.useCallback((w,A)=>{A&&(w=N0(w,ee,G,M,$.current)),gt!==void 0?(ce.current=Bo(w,-G),gt(ce.current)):r(w)},[gt,ee,G,M]),Ye=Cr(Zt,f.useCallback((w,A,_,N)=>{Zt?.(v[_-G],A,_-G,N)},[Zt,G,v])),Me=Cr(Ge,f.useCallback((w,A,_,N)=>{Ge?.(v[_-G],A,_-G,N)},[Ge,G,v])),Ze=Cr(kt,f.useCallback((w,A,_,N)=>{kt?.(v[_-G],A,_-G,N)},[kt,G,v])),vt=Cr(C,f.useCallback((w,A)=>C?.({...w,columnIndex:w.columnIndex-G},A)??!1,[C,G])),sn=Cr(F,f.useCallback((w,A)=>F?.({...w,col:w.col-G},A)??!1,[F,G])),Ut=f.useCallback(w=>{if(_e!==void 0){const A=_e(Bo(w,-G));return typeof A=="boolean"?A:Bo(A,G)}return!0},[_e,G]),[Mt,lt,qe]=L0(q,ge,me,he,Ce,Ue,O),st=f.useMemo(()=>cr(id(),ri),[ri]),[At,oi]=f.useState([0,0,0]),Pr=f.useMemo(()=>{if(Rn===void 0)return{};const w={};for(const A of Rn)w[A.kind]=A;return w},[Rn]),Jt=f.useCallback(w=>w.kind!==Z.Custom?Pr[w.kind]:In?.find(A=>A.isMatch(w)),[In,Pr]);let{sizedColumns:on,nonGrowWidth:Lt}=sm(v,ze,xe,At[0]-(G===0?0:gr)-At[2],hr,Ra,st,Jt,$.current);Sn!=="none"&&(Lt+=gr);const Hn=f.useMemo(()=>on.some(w=>w.group!==void 0),[on]),fn=Hn?Fi+Co:Fi,ai=q.rows.length,lr=Sn==="none"?void 0:ai===0?!1:ai===ze?!0:void 0,tt=f.useMemo(()=>Sn==="none"?on:[{title:"",width:gr,icon:void 0,hasMenu:!1,style:"normal",themeOverride:Qr,rowMarker:Tr,rowMarkerChecked:lr,headerRowMarkerTheme:fr,headerRowMarkerAlwaysVisible:ei,headerRowMarkerDisabled:ti},...on],[Sn,on,gr,Qr,Tr,lr,fr,ei,ti]),Qt=f.useRef({height:1,width:1,x:0,y:0}),Lr=f.useRef(!1),{setVisibleRegion:pr,visibleRegion:sr,scrollRef:Ht}=nv(vn,tn,Jn,Qt,()=>Lr.current=!0);Qt.current=sr;const Df=sr.x+G,So=sr.y,hn=f.useRef(null),xn=f.useCallback(w=>{w===!0?hn.current?.focus():window.requestAnimationFrame(()=>{hn.current?.focus()})},[]),gn=_t?ze+1:ze,zn=f.useCallback(w=>{const A=G===0?w:w.map(N=>({...N,location:[N.location[0]-G,N.location[1]]})),_=de?.(A);if(_!==!0)for(const N of A)ae?.(N.location,N.value);return _},[ae,de,G]),[Fr,Pa]=f.useState(),xo=q.current!==void 0&&q.current.range.width*q.current.range.height>1?q.current.range:void 0,vs=Zr?q.current?.cell:void 0,ko=vs?.[0],Mo=vs?.[1],Of=f.useMemo(()=>{if((dt===void 0||dt.length===0)&&(xo??ko??Mo??Fr)===void 0)return;const w=[];if(dt!==void 0)for(const A of dt){const _=tt.length-A.range.x-G;_>0&&w.push({color:A.color,range:{...A.range,x:A.range.x+G,width:Math.min(_,A.range.width)},style:A.style})}return Fr!==void 0&&w.push({color:Wr(st.accentColor,0),range:Fr,style:"dashed"}),xo!==void 0&&w.push({color:Wr(st.accentColor,.5),range:xo,style:"solid-outline"}),ko!==void 0&&Mo!==void 0&&w.push({color:st.accentColor,range:{x:ko,y:Mo,width:1,height:1},style:"solid-outline"}),w.length>0?w:void 0},[Fr,xo,ko,Mo,dt,tt.length,st.accentColor,G]),bs=f.useRef(tt);bs.current=tt;const Dn=f.useCallback(([w,A],_=!1)=>{const N=_t&&A===gn-1;if(w===0&&Tn){if(N)return Wo;const K=Li(A);return K===void 0?Wo:{kind:$n.Marker,allowOverlay:!1,checkboxStyle:Tr,checked:q?.rows.hasIndex(A)===!0,markerKind:Sn==="clickable-number"?"number":Sn,row:or+K,drawHandle:Kt!==void 0,cursor:Sn==="clickable-number"?"pointer":void 0}}else if(N){const z=w===G?De?.hint??"":"",U=bs.current[w];if(U?.trailingRowOptions?.disabled===!0)return Wo;{const J=U?.trailingRowOptions?.hint??z,ie=U?.trailingRowOptions?.addIcon??De?.addIcon;return{kind:$n.NewRow,hint:J,allowOverlay:!1,icon:ie}}}else{const K=w-G;if(_||bt?.strict===!0){const U=Qt.current,J=U.x>K||K>U.x+U.width||U.y>A||A>U.y+U.height||A>=Aa.current,ie=K===U.extras?.selected?.[0]&&A===U.extras?.selected[1];let ye=!1;if(U.extras?.freezeRegions!==void 0){for(const Rt of U.extras.freezeRegions)if(Br(Rt,K,A)){ye=!0;break}}if(J&&!ie&&!ye)return Wo}let z=x([K,A]);return G!==0&&z.span!==void 0&&(z={...z,span:[z.span[0]+G,z.span[1]+G]}),z}},[_t,gn,Tn,Li,Tr,q?.rows,Sn,or,Kt,G,De?.hint,De?.addIcon,bt?.strict,x]),La=f.useCallback(w=>{let A=pt?.(w)??{name:w};return se!==void 0&&w!==""&&(A={icon:A.icon,name:A.name,overrideTheme:A.overrideTheme,actions:[...A.actions??[],{title:"Rename",icon:"renameIcon",onClick:_=>za({group:A.name,bounds:_.bounds})}]}),A},[pt,se]),Ro=f.useCallback(w=>{const[A,_]=w.cell,N=tt[A],Y=N?.group!==void 0?La(N.group)?.overrideTheme:void 0,K=N?.themeOverride,z=Dr?.(_);o({...w,theme:cr(st,Y,K,z,w.content.themeOverride)})},[Dr,tt,La,st]),li=f.useCallback((w,A,_)=>{if(q.current===void 0)return;const[N,Y]=q.current.cell,K=Dn([N,Y]);if(K.kind!==Z.Boolean&&K.allowOverlay){let z=K;if(_!==void 0)switch(z.kind){case Z.Number:{const U=Gg(()=>_==="-"?-0:Number.parseFloat(_),0);z={...z,data:Number.isNaN(U)?0:U};break}case Z.Text:case Z.Markdown:case Z.Uri:z={...z,data:_};break}Ro({target:w,content:z,initialValue:_,cell:[N,Y],highlight:_===void 0,forceEditMode:_!==void 0,activation:A})}else K.kind===Z.Boolean&&A.inputType==="keyboard"&&K.readonly!==!0&&(zn([{location:q.current.cell,value:{...K,data:yd(K.data)}}]),hn.current?.damage([{cell:q.current.cell}]))},[Dn,q,zn,Ro]),ws=f.useCallback((w,A)=>{const _=hn.current?.getBounds(w,A);if(_===void 0||Ht.current===null)return;const N=Dn([w,A]);N.allowOverlay&&Ro({target:_,content:N,initialValue:void 0,highlight:!0,cell:[w,A],forceEditMode:!0,activation:{inputType:"keyboard",key:"Enter"}})},[Dn,Ht,Ro]),Yt=f.useCallback((w,A,_="both",N=0,Y=0,K=void 0)=>{if(Ht.current!==null){const z=hn.current,U=a.current,J=typeof w!="number"?w.unit==="cell"?w.amount:void 0:w,ie=typeof A!="number"?A.unit==="cell"?A.amount:void 0:A,ye=typeof w!="number"&&w.unit==="px"?w.amount:void 0,Rt=typeof A!="number"&&A.unit==="px"?A.amount:void 0;if(z!==null&&U!==null){let Je={x:0,y:0,width:0,height:0},Ke=0,ut=0;if((J!==void 0||ie!==void 0)&&(Je=z.getBounds((J??0)+G,ie??0)??Je,Je.width===0||Je.height===0))return;const nt=U.getBoundingClientRect(),yt=nt.width/U.offsetWidth;if(ye!==void 0&&(Je={...Je,x:ye-nt.left-Ht.current.scrollLeft,width:1}),Rt!==void 0&&(Je={...Je,y:Rt+nt.top-Ht.current.scrollTop,height:1}),Je!==void 0){const Ct={x:Je.x-N,y:Je.y-Y,width:Je.width+2*N,height:Je.height+2*Y};let hi=0;for(let Ga=0;Ga<Ae;Ga++)hi+=on[Ga].width;let Ni=0;const Bi=mt+(ar?1:0);Bi>0&&(Ni=Xr(gn,Bi,Jn));let tr=hi*yt+nt.left+G*gr*yt,gi=nt.right,zr=nt.top+fn*yt,pi=nt.bottom-Ni*yt;const Lo=Je.width+N*2;switch(K?.hAlign){case"start":gi=tr+Lo;break;case"end":tr=gi-Lo;break;case"center":tr=Math.floor((tr+gi)/2)-Lo/2,gi=tr+Lo;break}const Fo=Je.height+Y*2;switch(K?.vAlign){case"start":pi=zr+Fo;break;case"end":zr=pi-Fo;break;case"center":zr=Math.floor((zr+pi)/2)-Fo/2,pi=zr+Fo;break}tr>Ct.x?Ke=Ct.x-tr:gi<Ct.x+Ct.width&&(Ke=Ct.x+Ct.width-gi),zr>Ct.y?ut=Ct.y-zr:pi<Ct.y+Ct.height&&(ut=Ct.y+Ct.height-pi),_==="vertical"||typeof w=="number"&&w<Ae?Ke=0:(_==="horizontal"||typeof A=="number"&&A>=gn-Bi)&&(ut=0),(Ke!==0||ut!==0)&&(yt!==1&&(Ke/=yt,ut/=yt),Ht.current.scrollTo({left:Ke+Ht.current.scrollLeft,top:ut+Ht.current.scrollTop,behavior:K?.behavior??"auto"}))}}}},[G,mt,gr,Ht,fn,Ae,on,gn,ar,Jn]),Fa=f.useRef(ws),_a=f.useRef(x);Fa.current=ws,_a.current=x;const Aa=f.useRef(ze);Aa.current=ze;const ys=f.useRef(tt.length);ys.current=tt.length;const mr=f.useCallback(async(w,A=!0,_)=>{if(tt[w]?.trailingRowOptions?.disabled===!0)return;const Y=pe?.();let K,z=!0;Y!==void 0&&(K=await Y,K==="top"&&(z=!1),typeof K=="number"&&(z=!1));let U=0;const J=()=>{if(Aa.current<=ze){U<500&&window.setTimeout(J,U),U=50+U*2;return}const ie=typeof K=="number"?K:z?ze:0;Po.current(w-G,ie,"both",0,0,_?{behavior:_}:void 0),Mt({cell:[w,ie],range:{x:w,y:ie,width:1,height:1}},!1,!1,"edit");const ye=_a.current([w-G,ie]);ye.allowOverlay&&yi(ye)&&ye.readonly!==!0&&A&&window.setTimeout(()=>{Fa.current(w,ie)},0)};J()},[tt,pe,G,ze,Mt]),Io=f.useCallback(async(w,A=!0)=>{const _=et?.();let N,Y=!0;_!==void 0&&(N=await _,N==="left"&&(Y=!1),typeof N=="number"&&(Y=!1));let K=0;const z=()=>{if(ys.current<=tt.length){K<500&&window.setTimeout(z,K),K=50+K*2;return}const U=typeof N=="number"?N:Y?tt.length:0;Yt(U-G,w),Mt({cell:[U,w],range:{x:U,y:w,width:1,height:1}},!1,!1,"edit");const J=_a.current([U-G,w]);J.allowOverlay&&yi(J)&&J.readonly!==!0&&A&&window.setTimeout(()=>{Fa.current(U,w)},0)};z()},[tt,et,G,Yt,Mt]),si=f.useCallback(w=>{const A=on[w]?.trailingRowOptions?.targetColumn??De?.targetColumn;if(typeof A=="number")return A+(Tn?1:0);if(typeof A=="object"){const _=v.indexOf(A);if(_>=0)return _+(Tn?1:0)}},[on,v,Tn,De?.targetColumn]),vr=f.useRef(),ui=f.useRef(),_i=f.useCallback((w,A)=>{const[_,N]=A;return cr(st,tt[_]?.themeOverride,Dr?.(N),w.themeOverride)},[Dr,tt,st]),{mapper:_r}=ev(Nt,b),Bn=Nt?.navigationBehavior,Ai=f.useCallback(w=>{const A=ua.value?w.metaKey:w.ctrlKey,_=A&&ve==="multi",[N,Y]=w.location,K=q.columns,z=q.rows,[U,J]=q.current?.cell??[];if(w.kind==="cell"){if(ui.current=void 0,Ar.current=[N,Y],N===0&&Tn){if(_t===!0&&Y===ze||Sn==="number"||ve==="none")return;const ie=Dn(w.location);if(ie.kind!==$n.Marker)return;if(Kt!==void 0){const Je=Jt(ie);Pn(Je?.kind===$n.Marker);const Ke=Je?.onClick?.({...w,cell:ie,posX:w.localEventX,posY:w.localEventY,bounds:w.bounds,theme:_i(ie,w.location),preventDefault:()=>{}});if(Ke===void 0||Ke.checked===ie.checked)return}o(void 0),xn();const ye=z.hasIndex(Y),Rt=vr.current;if(ve==="multi"&&(w.shiftKey||w.isLongTouch===!0)&&Rt!==void 0&&z.hasIndex(Rt)){const Je=[Math.min(Rt,Y),Math.max(Rt,Y)+1];_||Ne==="multi"?lt(void 0,Je,!0):lt(Qe.fromSingleSelection(Je),void 0,_)}else ve==="multi"&&(_||w.isTouch||Ne==="multi")?ye?lt(z.remove(Y),void 0,!0):(lt(void 0,Y,!0),vr.current=Y):ye&&z.length===1?lt(Qe.empty(),void 0,A):(lt(Qe.fromSingleSelection(Y),void 0,A),vr.current=Y)}else if(N>=G&&_t&&Y===ze){const ie=si(N);mr(ie??N)}else if(U!==N||J!==Y){const ie=Dn(w.location),ye=Jt(ie);if(ye?.onSelect!==void 0){let Ke=!1;if(ye.onSelect({...w,cell:ie,posX:w.localEventX,posY:w.localEventY,bounds:w.bounds,preventDefault:()=>Ke=!0,theme:_i(ie,w.location)}),Ke)return}if(Bn==="block"&&_r(Y).isGroupHeader)return;const Rt=ar&&Y===ze,Je=ar&&q!==void 0&&q.current?.cell[1]===ze;if((w.shiftKey||w.isLongTouch===!0)&&U!==void 0&&J!==void 0&&q.current!==void 0&&!Je){if(Rt)return;const Ke=Math.min(N,U),ut=Math.max(N,U),nt=Math.min(Y,J),yt=Math.max(Y,J);Mt({...q.current,range:{x:Ke,y:nt,width:ut-Ke+1,height:yt-nt+1}},!0,A,"click"),vr.current=void 0,xn()}else Mt({cell:[N,Y],range:{x:N,y:Y,width:1,height:1}},!0,A,"click"),vr.current=void 0,o(void 0),xn()}}else if(w.kind==="header")if(Ar.current=[N,Y],o(void 0),Tn&&N===0)vr.current=void 0,ui.current=void 0,!ti&&ve==="multi"&&(z.length!==ze?lt(Qe.fromSingleSelection([0,ze]),void 0,A):lt(Qe.empty(),void 0,A),xn());else{const ie=ui.current;if(ne==="multi"&&(w.shiftKey||w.isLongTouch===!0)&&ie!==void 0&&K.hasIndex(ie)){const ye=[Math.min(ie,N),Math.max(ie,N)+1];A||w.isTouch||ft==="multi"?qe(void 0,ye,A):qe(Qe.fromSingleSelection(ye),void 0,A)}else ne==="multi"&&(A||w.isTouch||ft==="multi")?(K.hasIndex(N)?qe(K.remove(N),void 0,A):qe(void 0,N,A),ui.current=N):ne!=="none"&&(K.hasIndex(N)?qe(K.remove(N),void 0,A):qe(Qe.fromSingleSelection(N),void 0,A),ui.current=N);vr.current=void 0,xn()}else w.kind===Yn?Ar.current=[N,Y]:w.kind===ca&&!w.isMaybeScrollbar&&(ge(Uo,!1),o(void 0),xn(),Bt?.(),vr.current=void 0,ui.current=void 0)},[ve,ne,q,Tn,G,_t,ze,Sn,Dn,Kt,xn,Ne,ft,Jt,_i,lt,si,mr,Bn,_r,ar,Mt,ti,qe,ge,Bt]),Hi=f.useRef(!1),Ar=f.useRef(),Cs=f.useRef(sr),er=f.useRef(),Pf=f.useCallback(w=>{if(ci.current=!1,Cs.current=Qt.current,w.button!==0&&w.button!==1){er.current=void 0;return}const A=performance.now();er.current={button:w.button,time:A,location:w.location},w?.kind==="header"&&(Hi.current=!0);const _=w.kind==="cell"&&w.isFillHandle;!_&&w.kind!=="cell"&&w.isEdge||(u({previousSelection:q,fillHandle:_}),Ar.current=void 0,!w.isTouch&&w.button===0&&!_?Ai(w):!w.isTouch&&w.button===1&&(Ar.current=w.location))},[q,Ai]),[Ha,za]=f.useState(),Ss=f.useCallback(w=>{if(w.kind!==Yn||ne!=="multi")return;const A=ua.value?w.metaKey:w.ctrlKey,[_]=w.location,N=q.columns;if(_<G)return;const Y=tt[_];let K=_,z=_;for(let U=_-1;U>=G&&uo(Y.group,tt[U].group);U--)K--;for(let U=_+1;U<tt.length&&uo(Y.group,tt[U].group);U++)z++;if(xn(),A||w.isTouch||ft==="multi")if(N.hasAll([K,z+1])){let U=N;for(let J=K;J<=z;J++)U=U.remove(J);qe(U,void 0,A)}else qe(void 0,[K,z+1],A);else qe(Qe.fromSingleSelection([K,z+1]),void 0,A)},[ne,xn,q.columns,tt,G,qe,ft]),ci=f.useRef(!1),Eo=f.useCallback(async w=>{if(ee!==void 0&&Ye!==void 0){const A=Qt.current.y,_=Qt.current.height;let N=ee({x:w,y:A,width:1,height:Math.min(_,ze-A)},$.current.signal);typeof N!="object"&&(N=await N());const Y=on[w-G],z=document.createElement("canvas").getContext("2d",{alpha:!1});if(z!==null){z.font=st.baseFontFull;const U=ld(z,st,Y,0,N,hr,ni,!1,Jt);Ye?.(Y,U.width,w,U.width)}}},[on,ee,ni,st,hr,Ye,G,ze,Jt]),[Lf,Va]=f.useState(),di=f.useCallback(async(w,A)=>{const _=w.current?.range;if(_===void 0||ee===void 0||A.current===void 0)return;const N=A.current.range;if(R!==void 0){let U=!1;if(R({fillDestination:{...N,x:N.x-G},patternSource:{..._,x:_.x-G},preventDefault:()=>U=!0}),U)return}let Y=ee(_,$.current.signal);typeof Y!="object"&&(Y=await Y());const K=Y,z=[];for(let U=0;U<N.width;U++)for(let J=0;J<N.height;J++){const ie=[N.x+U,N.y+J];if(qc(ie,_))continue;const ye=K[J%_.height][U%_.width];Si(ye)||!yi(ye)||z.push({location:ie,value:{...ye}})}zn(z),hn.current?.damage(z.map(U=>({cell:U.location})))},[ee,zn,R,G]),xs=f.useCallback(()=>{if(q.current===void 0||q.current.range.width<=1)return;const w={...q,current:{...q.current,range:{...q.current.range,width:1}}};di(w,q)},[di,q]),ks=f.useCallback(()=>{if(q.current===void 0||q.current.range.height<=1)return;const w={...q,current:{...q.current,range:{...q.current.range,height:1}}};di(w,q)},[di,q]),Ff=f.useCallback((w,A)=>{const _=l;if(u(void 0),Pa(void 0),Va(void 0),Hi.current=!1,A)return;if(_?.fillHandle===!0&&q.current!==void 0&&_.previousSelection?.current!==void 0){if(Fr===void 0)return;const ye={...q,current:{...q.current,range:fd(_.previousSelection.current.range,Fr)}};di(_.previousSelection,ye),ge(ye,!0);return}const[N,Y]=w.location,[K,z]=Ar.current??[],U=()=>{ci.current=!0},J=ye=>{const Rt=ye.isTouch||K===N&&z===Y;if(Rt&&T?.([N-G,Y],{...ye,preventDefault:U}),ye.button===1)return!ci.current;if(!ci.current){const Je=Dn(w.location),Ke=Jt(Je);if(Ke!==void 0&&Ke.onClick!==void 0&&Rt){const nt=Ke.onClick({...ye,cell:Je,posX:ye.localEventX,posY:ye.localEventY,bounds:ye.bounds,theme:_i(Je,w.location),preventDefault:U});nt!==void 0&&!Si(nt)&&wi(nt)&&(zn([{location:ye.location,value:nt}]),hn.current?.damage([{cell:ye.location}]))}if(ci.current||q.current===void 0)return!1;let ut=!1;switch(Je.activationBehaviorOverride??Re){case"double-click":case"second-click":{if(_?.previousSelection?.current?.cell===void 0)break;const[nt,yt]=q.current.cell,[Ct,hi]=_.previousSelection.current.cell;ut=N===nt&&N===Ct&&Y===yt&&Y===hi&&(ye.isDoubleClick===!0||Re==="second-click");break}case"single-click":{ut=!0;break}}if(ut){const yt={inputType:"pointer",pointerActivation:ye.isDoubleClick===!0?"double-click":Je.activationBehaviorOverride??Re,pointerType:ye.isTouch?"touch":"mouse"};return k?.([N-G,Y],yt),li(ye.bounds,yt),!0}}return!1},ie=w.location[0]-G;if(w.isTouch){const ye=Qt.current,Rt=Cs.current;if(ye.x!==Rt.x||ye.y!==Rt.y)return;if(w.isLongTouch===!0){if(w.kind==="cell"&&io(q.current?.cell,w.location)){W?.([ie,w.location[1]],{...w,preventDefault:U});return}else if(w.kind==="header"&&q.columns.hasIndex(N)){oe?.(ie,{...w,preventDefault:U});return}else if(w.kind===Yn){if(ie<0)return;re?.(ie,{...w,preventDefault:U});return}}w.kind==="cell"?J(w)||Ai(w):w.kind===Yn?V?.(ie,{...w,preventDefault:U}):(w.kind===Sr&&S?.(ie,{...w,preventDefault:U}),Ai(w));return}if(w.kind==="header"){if(ie<0)return;w.isEdge?w.isDoubleClick===!0&&Eo(N):w.button===0&&N===K&&Y===z&&S?.(ie,{...w,preventDefault:U})}if(w.kind===Yn){if(ie<0)return;w.button===0&&N===K&&Y===z&&(V?.(ie,{...w,preventDefault:U}),ci.current||Ss(w))}w.kind==="cell"&&(w.button===0||w.button===1)&&J(w),Ar.current=void 0},[l,q,G,Fr,di,ge,T,Dn,Jt,Re,_i,zn,k,li,W,oe,re,Ai,V,S,Eo,Ss]),_f=f.useCallback(w=>{const A={...w,location:[w.location[0]-G,w.location[1]]};at?.(A),l!==void 0&&w.buttons===0&&(u(void 0),Pa(void 0),Va(void 0),Hi.current=!1),Va(_=>Hi.current?[w.scrollEdge[0],0]:w.scrollEdge[0]===_?.[0]&&w.scrollEdge[1]===_[1]?_:l===void 0||(er.current?.location[0]??0)<G?void 0:w.scrollEdge)},[l,at,G]),Af=f.useCallback((w,A)=>{ht?.(w-G,A)},[ht,G]),Hf=f.useCallback((w,A)=>{Xe?.(w-G,A)},[Xe,G]),fi=q?.current?.cell,zf=f.useCallback((w,A,_,N,Y,K)=>{Lr.current=!1;let z=fi;z!==void 0&&(z=[z[0]-G,z[1]]);const U=Ae===0?void 0:{x:0,y:w.y,width:Ae,height:w.height},J=[];U!==void 0&&J.push(U),mt>0&&(J.push({x:w.x-G,y:ze-mt,width:w.width,height:mt}),Ae>0&&J.push({x:0,y:ze-mt,width:Ae,height:mt}));const ie={x:w.x-G,y:w.y,width:w.width,height:_t&&w.y+w.height>=ze?w.height-1:w.height,tx:Y,ty:K,extras:{selected:z,freezeRegion:U,freezeRegions:J}};Qt.current=ie,pr(ie),oi([A,_,N]),an?.(ie,ie.tx,ie.ty,ie.extras)},[fi,G,_t,ze,Ae,mt,pr,an]),Vf=Cr(E,f.useCallback((w,A)=>E?.(w-G,A-G)!==!1,[E,G])),$f=Cr(ke,f.useCallback((w,A)=>{ke?.(w-G,A-G),ne!=="none"&&qe(Qe.fromSingleSelection(A),void 0,!0)},[ne,ke,G,qe])),$a=f.useRef(!1),Nf=f.useCallback(w=>{if(w.location[0]===0&&G>0){w.preventDefault();return}Oe?.({...w,location:[w.location[0]-G,w.location[1]]}),w.defaultPrevented()||($a.current=!0),u(void 0)},[Oe,G]),Bf=f.useCallback(()=>{$a.current=!1},[]),Ms=Nt?.selectionBehavior,To=f.useCallback(w=>{if(Ms!=="block-spanning")return;const{isGroupHeader:A,path:_,groupRows:N}=_r(w);if(A)return[w,w];const Y=_[_.length-1],K=w-Y,z=w+N-Y-1;return[K,z]},[_r,Ms]),Na=f.useRef(),Ba=f.useCallback(w=>{if(!bd(w,Na.current)&&(Na.current=w,!(er?.current?.button!==void 0&&er.current.button>=1))){if(w.buttons!==0&&l!==void 0&&er.current?.location[0]===0&&G===1&&ve==="multi"&&l.previousSelection&&!l.previousSelection.rows.hasIndex(er.current.location[1])&&q.rows.hasIndex(er.current.location[1])){const A=Math.min(er.current.location[1],w.location[1]),_=Math.max(er.current.location[1],w.location[1])+1;lt(Qe.fromSingleSelection([A,_]),void 0,!1)}else if(w.buttons!==0&&l!==void 0&&q.current!==void 0&&!$a.current&&!Hi.current&&(Ue==="rect"||Ue==="multi-rect")){const[A,_]=q.current.cell;let[N,Y]=w.location;if(Y<0&&(Y=Qt.current.y),l.fillHandle===!0&&l.previousSelection?.current!==void 0){const K=l.previousSelection.current.range;Y=Math.min(Y,_t?ze-1:ze);const z=$m(K,N,Y,xt);Pa(z)}else{if(_t&&_===ze)return;if(_t&&Y===ze)if(w.kind===ca)Y--;else return;N=Math.max(N,G);const U=To(_);Y=U===void 0?Y:Vn(Y,U[0],U[1]);const J=N-A,ie=Y-_,ye={x:J>=0?A:N,y:ie>=0?_:Y,width:Math.abs(J)+1,height:Math.abs(ie)+1};Mt({...q.current,range:ye},!0,!1,"drag")}}Tt?.({...w,location:[w.location[0]-G,w.location[1]]})}},[l,G,ve,q,Ue,Tt,lt,_t,ze,xt,To,Mt]),Wf=f.useCallback(()=>{const w=Na.current;if(w===void 0)return;const[A,_]=w.scrollEdge;let[N,Y]=w.location;const K=Qt.current;A===-1?N=K.extras?.freezeRegion?.x??K.x:A===1&&(N=K.x+K.width),_===-1?Y=Math.max(0,K.y):_===1&&(Y=Math.min(ze-1,K.y+K.height)),N=Vn(N,0,tt.length-1),Y=Vn(Y,0,ze-1),Ba({...w,location:[N,Y]})},[tt.length,Ba,ze]);q0(Lf,Ht,Wf);const Wn=f.useCallback(w=>{if(q.current===void 0)return;const[A,_]=w,[N,Y]=q.current.cell,K=q.current.range;let z=K.x,U=K.x+K.width,J=K.y,ie=K.y+K.height;const[ye,Rt]=To(Y)??[0,ze-1],Je=Rt+1;if(_!==0)switch(_){case 2:{ie=Je,J=Y,Yt(0,ie,"vertical");break}case-2:{J=ye,ie=Y+1,Yt(0,J,"vertical");break}case 1:{J<Y?(J++,Yt(0,J,"vertical")):(ie=Math.min(Je,ie+1),Yt(0,ie,"vertical"));break}case-1:{ie>Y+1?(ie--,Yt(0,ie,"vertical")):(J=Math.max(ye,J-1),Yt(0,J,"vertical"));break}default:lo()}if(A!==0)if(A===2)U=tt.length,z=N,Yt(U-1-G,0,"horizontal");else if(A===-2)z=G,U=N+1,Yt(z-G,0,"horizontal");else{let Ke=[];if(ee!==void 0){const ut=ee({x:z,y:J,width:U-z-G,height:ie-J},$.current.signal);typeof ut=="object"&&(Ke=ov(ut))}if(A===1){let ut=!1;if(z<N){if(Ke.length>0){const nt=kr(z+1,N+1).find(yt=>!Ke.includes(yt-G));nt!==void 0&&(z=nt,ut=!0)}else z++,ut=!0;ut&&Yt(z,0,"horizontal")}ut||(U=Math.min(tt.length,U+1),Yt(U-1-G,0,"horizontal"))}else if(A===-1){let ut=!1;if(U>N+1){if(Ke.length>0){const nt=kr(U-1,N,-1).find(yt=>!Ke.includes(yt-G));nt!==void 0&&(U=nt,ut=!0)}else U--,ut=!0;ut&&Yt(U-G,0,"horizontal")}ut||(z=Math.max(G,z-1),Yt(z-G,0,"horizontal"))}else lo()}Mt({cell:q.current.cell,range:{x:z,y:J,width:U-z,height:ie-J}},!0,!1,"keyboard-select")},[ee,To,q,tt.length,G,ze,Yt,Mt]),Wa=f.useRef(Zn);Wa.current=Zn;const br=f.useCallback((w,A,_,N)=>{const Y=gn-(_?0:1);w=Vn(w,G,on.length-1+G),A=Vn(A,0,Y);const K=fi?.[0],z=fi?.[1];if(w===K&&A===z)return!1;if(N&&q.current!==void 0){const U=[...q.current.rangeStack];(q.current.range.width>1||q.current.range.height>1)&&U.push(q.current.range),ge({...q,current:{cell:[w,A],range:{x:w,y:A,width:1,height:1},rangeStack:U}},!0)}else Mt({cell:[w,A],range:{x:w,y:A,width:1,height:1}},!0,!1,"keyboard-nav");return c.current!==void 0&&c.current[0]===w&&c.current[1]===A&&(c.current=void 0),Wa.current&&Yt(w-G,A),!0},[gn,G,on.length,fi,q,Yt,ge,Mt]),Uf=f.useCallback((w,A)=>{i?.cell!==void 0&&w!==void 0&&wi(w)&&(zn([{location:i.cell,value:w}]),window.requestAnimationFrame(()=>{hn.current?.damage([{cell:i.cell}])})),xn(!0),o(void 0);const[_,N]=A;if(q.current!==void 0&&(_!==0||N!==0)){const Y=q.current.cell[1]===gn-1&&w!==void 0,K=q.current.cell[0]===tt.length-1&&w!==void 0;let z=!0;if(Y&&N===1&&pe!==void 0){z=!1;const U=q.current.cell[0]+_,J=si(U);mr(J??U,!1)}if(K&&_===1&&et!==void 0){z=!1;const U=q.current.cell[1]+N;Io(U,!1)}z&&br(Vn(q.current.cell[0]+_,0,tt.length-1),Vn(q.current.cell[1]+N,0,gn-1),Y,!1)}P?.(w,A)},[i?.cell,xn,q,P,zn,gn,br,tt.length,mr,Io,pe,et,si]),Gf=f.useMemo(()=>`gdg-overlay-${iv++}`,[]),Hr=f.useCallback(w=>{xn();const A=[];for(let _=w.x;_<w.x+w.width;_++)for(let N=w.y;N<w.y+w.height;N++){const Y=x([_-G,N]);if(!Y.allowOverlay&&Y.kind!==Z.Boolean)continue;let K;if(Y.kind===Z.Custom){const z=Jt(Y),U=z?.provideEditor?.({...Y,location:[_-G,N]});z?.onDelete!==void 0?K=z.onDelete(Y):Yg(U)&&(K=U?.deletedValue?.(Y))}else(wi(Y)&&Y.allowOverlay||Y.kind===Z.Boolean)&&(K=Jt(Y)?.onDelete?.(Y));K!==void 0&&!Si(K)&&wi(K)&&A.push({location:[_,N],value:K})}zn(A),hn.current?.damage(A.map(_=>({cell:_.location})))},[xn,x,Jt,zn,G]),zi=i!==void 0,Rs=f.useCallback(w=>{const A=()=>{w.stopPropagation(),w.preventDefault()},_={didMatch:!1},{bounds:N}=w,Y=q.columns,K=q.rows,z=Qn;if(!zi&&rt(z.clear,w,_))ge(Uo,!1),Bt?.();else if(!zi&&rt(z.selectAll,w,_))ge({columns:Qe.empty(),rows:Qe.empty(),current:{cell:q.current?.cell??[G,0],range:{x:G,y:0,width:v.length,height:ze},rangeStack:[]}},!1);else if(rt(z.search,w,_))s?.current?.focus({preventScroll:!0}),Or(!0);else if(rt(z.delete,w,_)){const nt=Ut?.(q)??!0;if(nt!==!1){const yt=nt===!0?q:nt;if(yt.current!==void 0){Hr(yt.current.range);for(const Ct of yt.current.rangeStack)Hr(Ct)}for(const Ct of yt.rows)Hr({x:G,y:Ct,width:v.length,height:1});for(const Ct of yt.columns)Hr({x:Ct,y:0,width:1,height:ze})}}if(_.didMatch)return A(),!0;if(q.current===void 0)return!1;let[U,J]=q.current.cell;const[,ie]=q.current.cell;let ye=!1,Rt=!1;if(rt(z.scrollToSelectedCell,w,_))Po.current(U-G,J);else if(ne!=="none"&&rt(z.selectColumn,w,_))Y.hasIndex(U)?qe(Y.remove(U),void 0,!0):ne==="single"?qe(Qe.fromSingleSelection(U),void 0,!0):qe(void 0,U,!0);else if(ve!=="none"&&rt(z.selectRow,w,_))K.hasIndex(J)?lt(K.remove(J),void 0,!0):ve==="single"?lt(Qe.fromSingleSelection(J),void 0,!0):lt(void 0,J,!0);else if(!zi&&N!==void 0&&rt(z.activateCell,w,_))if(J===ze&&_t)window.setTimeout(()=>{const nt=si(U);mr(nt??U)},0);else{const nt={inputType:"keyboard",key:w.key};k?.([U-G,J],nt),li(N,nt)}else q.current.range.height>1&&rt(z.downFill,w,_)?ks():q.current.range.width>1&&rt(z.rightFill,w,_)?xs():rt(z.goToNextPage,w,_)?J+=Math.max(1,Qt.current.height-4):rt(z.goToPreviousPage,w,_)?J-=Math.max(1,Qt.current.height-4):rt(z.goToFirstCell,w,_)?(o(void 0),J=0,U=0):rt(z.goToLastCell,w,_)?(o(void 0),J=Number.MAX_SAFE_INTEGER,U=Number.MAX_SAFE_INTEGER):rt(z.selectToFirstCell,w,_)?(o(void 0),Wn([-2,-2])):rt(z.selectToLastCell,w,_)?(o(void 0),Wn([2,2])):zi?(rt(z.closeOverlay,w,_)&&o(void 0),rt(z.acceptOverlayDown,w,_)&&(o(void 0),J++),rt(z.acceptOverlayUp,w,_)&&(o(void 0),J--),rt(z.acceptOverlayLeft,w,_)&&(o(void 0),U--),rt(z.acceptOverlayRight,w,_)&&(o(void 0),U++)):(rt(z.goDownCell,w,_)?J+=1:rt(z.goUpCell,w,_)?J-=1:rt(z.goRightCell,w,_)?U+=1:rt(z.goLeftCell,w,_)?U-=1:rt(z.goDownCellRetainSelection,w,_)?(J+=1,ye=!0):rt(z.goUpCellRetainSelection,w,_)?(J-=1,ye=!0):rt(z.goRightCellRetainSelection,w,_)?(U+=1,ye=!0):rt(z.goLeftCellRetainSelection,w,_)?(U-=1,ye=!0):rt(z.goToLastRow,w,_)?J=ze-1:rt(z.goToFirstRow,w,_)?J=Number.MIN_SAFE_INTEGER:rt(z.goToLastColumn,w,_)?U=Number.MAX_SAFE_INTEGER:rt(z.goToFirstColumn,w,_)?U=Number.MIN_SAFE_INTEGER:(Ue==="rect"||Ue==="multi-rect")&&(rt(z.selectGrowDown,w,_)?Wn([0,1]):rt(z.selectGrowUp,w,_)?Wn([0,-1]):rt(z.selectGrowRight,w,_)?Wn([1,0]):rt(z.selectGrowLeft,w,_)?Wn([-1,0]):rt(z.selectToLastRow,w,_)?Wn([0,2]):rt(z.selectToFirstRow,w,_)?Wn([0,-2]):rt(z.selectToLastColumn,w,_)?Wn([2,0]):rt(z.selectToFirstColumn,w,_)&&Wn([-2,0])),Rt=_.didMatch);if(Bn!==void 0&&Bn!=="normal"&&J!==ie){const nt=Bn==="skip-up"||Bn==="skip"||Bn==="block",yt=Bn==="skip-down"||Bn==="skip"||Bn==="block",Ct=J<ie;if(Ct&&nt){for(;J>=0&&_r(J).isGroupHeader;)J--;J<0&&(J=ie)}else if(!Ct&&yt){for(;J<ze&&_r(J).isGroupHeader;)J++;J>=ze&&(J=ie)}}const Ke=br(U,J,!1,ye),ut=_.didMatch;return ut&&(Ke||!Rt||Cn)&&A(),ut},[Bn,zi,q,Qn,ne,ve,Ue,G,_r,ze,br,ge,Bt,v.length,Ut,Cn,Hr,qe,lt,_t,si,mr,k,li,ks,xs,Wn]),Vi=f.useCallback(w=>{let A=!1;if(X!==void 0&&X({...w,...w.location&&{location:[w.location[0]-G,w.location[1]]},cancel:()=>{A=!0}}),A||Rs(w)||q.current===void 0)return;const[_,N]=q.current.cell,Y=Qt.current;if(Se&&!w.metaKey&&!w.ctrlKey&&q.current!==void 0&&w.key.length===1&&/[\p{L}\p{M}\p{N}\p{S}\p{P}]/u.test(w.key)&&w.bounds!==void 0&&yi(x([_-G,Math.max(0,Math.min(N,ze-1))]))){if((!_t||N!==ze)&&(Y.y>N||N>Y.y+Y.height||Y.x>_||_>Y.x+Y.width))return;const K={inputType:"keyboard",key:w.key};k?.([_-G,N],K),li(w.bounds,K,w.key),w.stopPropagation(),w.preventDefault()}},[Se,X,Rs,q,x,G,ze,_t,k,li]),Yf=f.useCallback((w,A)=>{const _=w.location[0]-G;if(w.kind==="header"&&oe?.(_,{...w,preventDefault:A}),w.kind===Yn){if(_<0)return;re?.(_,{...w,preventDefault:A})}if(w.kind==="cell"){const[N,Y]=w.location;W?.([_,Y],{...w,preventDefault:A}),Yp(q,w.location)||br(N,Y,!1,!1)}},[q,W,re,oe,G,br]),Ua=f.useCallback(async w=>{if(!Qn.paste)return;function A(z,U,J,ie){const ye=typeof J=="object"?J?.join(`
173
173
  `)??"":J?.toString()??"";if(!Si(z)&&yi(z)&&z.readonly!==!0){const Rt=I?.(ye,z);if(Rt!==void 0&&wi(Rt))return{location:U,value:Rt};const Je=Jt(z);if(Je===void 0)return;if(Je.kind===Z.Custom){Pn(z.kind===Z.Custom);const Ke=Je.onPaste?.(ye,z.data);return Ke===void 0?void 0:{location:U,value:{...z,data:Ke}}}else{const Ke=Je.onPaste?.(ye,z,{formatted:ie,formattedString:typeof ie=="string"?ie:ie?.join(`
174
174
  `),rawValue:J});return Ke===void 0?void 0:(Pn(Ke.kind===z.kind),{location:U,value:Ke})}}}const _=q.columns,N=q.rows,Y=Ht.current?.contains(document.activeElement)===!0||a.current?.contains(document.activeElement)===!0;let K;if(q.current!==void 0?K=[q.current.range.x,q.current.range.y]:_.length===1?K=[_.first()??0,0]:N.length===1&&(K=[G,N.first()??0]),Y&&K!==void 0){let z,U;const J="text/plain",ie="text/html";if(navigator.clipboard.read!==void 0){const Ke=await navigator.clipboard.read();for(const ut of Ke){if(ut.types.includes(ie)){const yt=await(await ut.getType(ie)).text(),Ct=Su(yt);if(Ct!==void 0){z=Ct;break}}ut.types.includes(J)&&(U=await(await ut.getType(J)).text())}}else if(navigator.clipboard.readText!==void 0)U=await navigator.clipboard.readText();else if(w!==void 0&&w?.clipboardData!==null){if(w.clipboardData.types.includes(ie)){const Ke=w.clipboardData.getData(ie);z=Su(Ke)}z===void 0&&w.clipboardData.types.includes(J)&&(U=w.clipboardData.getData(J))}else return;const[ye,Rt]=K,Je=[];do{if(Pe===void 0){const Ke=Dn(K),ut=U??z?.map(yt=>yt.map(Ct=>Ct.rawValue).join(" ")).join(" ")??"",nt=A(Ke,K,ut,void 0);nt!==void 0&&Je.push(nt);break}if(z===void 0){if(U===void 0)return;z=B0(U)}if(Pe===!1||typeof Pe=="function"&&Pe?.([K[0]-G,K[1]],z.map(Ke=>Ke.map(ut=>ut.rawValue?.toString()??"")))!==!0)return;for(const[Ke,ut]of z.entries()){if(Ke+Rt>=ze)break;for(const[nt,yt]of ut.entries()){const Ct=[nt+ye,Ke+Rt],[hi,Ni]=Ct;if(hi>=tt.length||Ni>=gn)continue;const Bi=Dn(Ct),tr=A(Bi,Ct,yt.rawValue,yt.formatted);tr!==void 0&&Je.push(tr)}}}while(!1);zn(Je),hn.current?.damage(Je.map(Ke=>({cell:Ke.location})))}},[I,Jt,Dn,q,Qn.paste,Ht,tt.length,zn,gn,Pe,G,ze]);kn("paste",Ua,d,!1,!0);const $i=f.useCallback(async(w,A)=>{if(!Qn.copy)return;const _=A===!0||Ht.current?.contains(document.activeElement)===!0||a.current?.contains(document.activeElement)===!0,N=q.columns,Y=q.rows,K=(z,U)=>{if(!we)ku(z,U,w);else{const J=U.map(ie=>({kind:Z.Text,data:v[ie].title,displayData:v[ie].title,allowOverlay:!1}));ku([J,...z],U,w)}};if(_&&ee!==void 0){if(q.current!==void 0){let z=ee(q.current.range,$.current.signal);typeof z!="object"&&(z=await z()),K(z,kr(q.current.range.x-G,q.current.range.x+q.current.range.width-G))}else if(Y!==void 0&&Y.length>0){const U=[...Y].map(J=>{const ie=ee({x:G,y:J,width:v.length,height:1},$.current.signal);return typeof ie=="object"?ie[0]:ie().then(ye=>ye[0])});if(U.some(J=>J instanceof Promise)){const J=await Promise.all(U);K(J,kr(v.length))}else K(U,kr(v.length))}else if(N.length>0){const z=[],U=[];for(const J of N){let ie=ee({x:J,y:0,width:1,height:ze},$.current.signal);typeof ie!="object"&&(ie=await ie()),z.push(ie),U.push(J-G)}if(z.length===1)K(z[0],U);else{const J=z.reduce((ie,ye)=>ie.map((Rt,Je)=>[...Rt,...ye[Je]]));K(J,U)}}}},[v,ee,q,Qn.copy,G,Ht,ze,we]);kn("copy",$i,d,!1,!1);const Xf=f.useCallback(async w=>{if(!(!Qn.cut||!(Ht.current?.contains(document.activeElement)===!0||a.current?.contains(document.activeElement)===!0))&&(await $i(w),q.current!==void 0)){let _={current:{cell:q.current.cell,range:q.current.range,rangeStack:[]},rows:Qe.empty(),columns:Qe.empty()};const N=Ut?.(_);if(N===!1||(_=N===!0?_:N,_.current===void 0))return;Hr(_.current.range)}},[Hr,q,Qn.cut,$i,Ht,Ut]);kn("cut",Xf,d,!1,!1);const jf=f.useCallback((w,A)=>{if(fe!==void 0){G!==0&&(w=w.map(Y=>[Y[0]-G,Y[1]])),fe(w,A);return}if(w.length===0||A===-1)return;const[_,N]=w[A];c.current!==void 0&&c.current[0]===_&&c.current[1]===N||(c.current=[_,N],br(_,N,!1,!1))},[fe,G,br]),[Do,Oo]=It?.current?.cell??[],Po=f.useRef(Yt);Po.current=Yt,f.useLayoutEffect(()=>{Wa.current&&!Lr.current&&Do!==void 0&&Oo!==void 0&&(Do!==ce.current?.current?.cell[0]||Oo!==ce.current?.current?.cell[1])&&Po.current(Do,Oo),Lr.current=!1},[Do,Oo]);const Is=q.current!==void 0&&(q.current.cell[0]>=tt.length||q.current.cell[1]>=gn);f.useLayoutEffect(()=>{Is&&ge(Uo,!1)},[Is,ge]);const qf=f.useMemo(()=>_t===!0&&De?.tint===!0?Qe.fromSingleSelection(gn-1):Qe.empty(),[gn,_t,De?.tint]),Kf=f.useCallback(w=>typeof nn=="boolean"?nn:nn?.(w-G)??!0,[G,nn]),Zf=f.useMemo(()=>{if(Ha===void 0||a.current===null)return null;const{bounds:w,group:A}=Ha,_=a.current.getBoundingClientRect();return f.createElement(O0,{bounds:w,group:A,canvasBounds:_,onClose:()=>za(void 0),onFinish:N=>{za(void 0),se?.(A,N)}})},[se,Ha]),Jf=Math.min(tt.length,Ae+(Tn?1:0));f.useImperativeHandle(t,()=>({appendRow:(w,A)=>mr(w+G,A),appendColumn:(w,A)=>Io(w,A),updateCells:w=>(G!==0&&(w=w.map(A=>({cell:[A.cell[0]+G,A.cell[1]]}))),hn.current?.damage(w)),getBounds:(w,A)=>{if(!(a?.current===null||Ht?.current===null)){if(w===void 0&&A===void 0){const _=a.current.getBoundingClientRect(),N=_.width/Ht.current.clientWidth;return{x:_.x-Ht.current.scrollLeft*N,y:_.y-Ht.current.scrollTop*N,width:Ht.current.scrollWidth*N,height:Ht.current.scrollHeight*N}}return hn.current?.getBounds((w??0)+G,A)}},focus:()=>hn.current?.focus(),emit:async w=>{switch(w){case"delete":Vi({bounds:void 0,cancel:()=>{},stopPropagation:()=>{},preventDefault:()=>{},ctrlKey:!1,key:"Delete",keyCode:46,metaKey:!1,shiftKey:!1,altKey:!1,rawEvent:void 0,location:void 0});break;case"fill-right":Vi({bounds:void 0,cancel:()=>{},stopPropagation:()=>{},preventDefault:()=>{},ctrlKey:!0,key:"r",keyCode:82,metaKey:!1,shiftKey:!1,altKey:!1,rawEvent:void 0,location:void 0});break;case"fill-down":Vi({bounds:void 0,cancel:()=>{},stopPropagation:()=>{},preventDefault:()=>{},ctrlKey:!0,key:"d",keyCode:68,metaKey:!1,shiftKey:!1,altKey:!1,rawEvent:void 0,location:void 0});break;case"copy":await $i(void 0,!0);break;case"paste":await Ua();break}},scrollTo:Yt,remeasureColumns:w=>{for(const A of w)Eo(A+G)},getMouseArgsForPosition:(w,A,_)=>{if(hn?.current===null)return;const N=hn.current.getMouseArgsForPosition(w,A,_);if(N!==void 0)return{...N,location:[N.location[0]-G,N.location[1]]}}}),[mr,Io,Eo,Ht,$i,Vi,Ua,G,Yt]);const[Es,Ts]=fi??[],Qf=f.useCallback(w=>{const[A,_]=w;if(_===-1){ne!=="none"&&(qe(Qe.fromSingleSelection(A),void 0,!1),xn());return}Es===A&&Ts===_||(Mt({cell:w,range:{x:A,y:_,width:1,height:1}},!0,!1,"keyboard-nav"),Yt(A,_))},[ne,xn,Yt,Es,Ts,Mt,qe]),[eh,th]=f.useState(!1),Ds=f.useRef(Rc(w=>{th(w)},5)),nh=f.useCallback(()=>{Ds.current(!0),q.current===void 0&&q.columns.length===0&&q.rows.length===0&&l===void 0&&Mt({cell:[G,So],range:{x:G,y:So,width:1,height:1}},!0,!1,"keyboard-select")},[So,q,l,G,Mt]),rh=f.useCallback(()=>{Ds.current(!1)},[]),[ih,oh]=f.useMemo(()=>{let w;const A=bt?.scrollbarWidthOverride??bl(),_=ze+(_t?1:0);if(typeof Jn=="number")w=fn+_*Jn;else{let Y=0;const K=Math.min(_,10);for(let z=0;z<K;z++)Y+=Jn(z);Y=Math.floor(Y/K),w=fn+_*Y}w+=A;const N=tt.reduce((Y,K)=>K.width+Y,0)+A;return[`${Math.min(1e5,N)}px`,`${Math.min(1e5,w)}px`]},[tt,bt?.scrollbarWidthOverride,Jn,ze,_t,fn]),ah=f.useMemo(()=>am(st),[st]);return f.createElement(od.Provider,{value:st},f.createElement(Y0,{style:ah,className:j,inWidth:m??ih,inHeight:y??oh},f.createElement(I0,{fillHandle:Ot,drawFocusRing:Zr,experimental:bt,fixedShadowX:bn,fixedShadowY:ir,getRowThemeOverride:Dr,headerIcons:Kn,imageWindowLoader:B,initialSize:Be,isDraggable:je,onDragLeave:Pt,onRowMoved:Kt,overscrollX:Ea,overscrollY:Ta,preventDiagonalScrolling:wn,rightElement:Gt,rightElementProps:yn,smoothScrollX:jr,smoothScrollY:qr,className:j,enableGroups:Hn,onCanvasFocused:nh,onCanvasBlur:rh,canvasRef:a,onContextMenu:Yf,theme:st,cellXOffset:Df,cellYOffset:So,accessibilityHeight:sr.height,onDragEnd:Bf,columns:tt,nonGrowWidth:Lt,drawHeader:vt,onColumnProposeMove:Vf,drawCell:sn,disabledRows:qf,freezeColumns:Jf,lockColumns:G,firstColAccessible:G===0,getCellContent:Dn,minColumnWidth:hr,maxColumnWidth:ni,searchInputRef:s,showSearch:Oa,onSearchClose:ii,highlightRegions:Of,getCellsForSelection:ee,getGroupDetails:La,headerHeight:Fi,isFocused:eh,groupHeaderHeight:Hn?Co:0,freezeTrailingRows:mt+(_t&&De?.sticky===!0?1:0),hasAppendRow:_t,onColumnResize:Ye,onColumnResizeEnd:Me,onColumnResizeStart:Ze,onCellFocused:Qf,onColumnMoved:$f,onDragStart:Nf,onHeaderMenuClick:Af,onHeaderIndicatorClick:Hf,onItemHovered:Ba,isFilling:l?.fillHandle===!0,onMouseMove:_f,onKeyDown:Vi,onKeyUp:te,onMouseDown:Pf,onMouseUp:Ff,onDragOverCell:un,onDrop:$t,onSearchResultsChanged:jf,onVisibleRegionChanged:zf,clientSize:At,rowHeight:Jn,searchResults:ue,searchValue:L,onSearchValueChange:H,rows:gn,scrollRef:Ht,selection:q,translateX:sr.tx,translateY:sr.ty,verticalBorder:Kf,gridRef:hn,getCellRenderer:Jt,resizeIndicator:Oi}),Zf,i!==void 0&&f.createElement(f.Suspense,{fallback:null},f.createElement(rv,{...i,validateCell:Te,bloom:D,id:Gf,getCellRenderer:Jt,className:bt?.isSubGrid===!0?"click-outside-ignore":void 0,provideEditor:Mn,imageEditorOverride:g,portalElementRef:wo,onFinishEditing:Uf,markdownDivCreateNode:p,isOutsideClick:cn,customEventTarget:bt?.eventTarget}))))},lv=f.forwardRef(av);function Iu(e){const{cell:t,posX:n,posY:r,bounds:i,theme:o}=e,{width:s,height:a,x:l,y:u}=i,c=t.maxSize??o.checkboxMaxSize,d=Math.floor(i.y+a/2),g=Vc(c,a,o.cellVerticalPadding),h=zc(t.contentAlign??"center",l,s,o.cellHorizontalPadding,g),p=Hc(h,d,g),m=$c(l+n,u+r,p);return Al(t)&&m}const sv={getAccessibilityString:e=>e.data?.toString()??"false",kind:Z.Boolean,needsHover:!0,useLabel:!1,needsHoverPosition:!0,measure:()=>50,draw:e=>uv(e,e.cell.data,Al(e.cell),e.cell.maxSize??e.theme.checkboxMaxSize,e.cell.hoverEffectIntensity??.35),onDelete:e=>({...e,data:!1}),onSelect:e=>{Iu(e)&&e.preventDefault()},onClick:e=>{if(Iu(e))return{...e.cell,data:yd(e.cell.data)}},onPaste:(e,t)=>{let n=ia;return e.toLowerCase()==="true"?n=!0:e.toLowerCase()==="false"?n=!1:e.toLowerCase()==="indeterminate"&&(n=_l),n===t.data?void 0:{...t,data:n}}};function uv(e,t,n,r,i){if(!n&&t===ia)return;const{ctx:o,hoverAmount:s,theme:a,rect:l,highlighted:u,hoverX:c,hoverY:d,cell:{contentAlign:g}}=e,{x:h,y:p,width:m,height:y}=l;let v=!1;if(i>0){let b=n?1-i+i*s:.4;if(t===ia&&(b*=s),b===0)return;b<1&&(v=!0,o.globalAlpha=b)}Xl(o,a,t,h,p,m,y,u,c,d,r,g),v&&(o.globalAlpha=1)}const cv=dn("div")({name:"BubblesOverlayEditorStyle",class:"gdg-b1ygi5by",propsAsIs:!1}),dv=e=>{const{bubbles:t}=e;return f.createElement(cv,null,t.map((n,r)=>f.createElement("div",{key:r,className:"boe-bubble"},n)),f.createElement("textarea",{className:"gdg-input",autoFocus:!0}))},fv={getAccessibilityString:e=>Nc(e.data),kind:Z.Bubble,needsHover:!1,useLabel:!1,needsHoverPosition:!1,measure:(e,t,n)=>{const r=t.data.reduce((i,o)=>e.measureText(o).width+i+n.bubblePadding*2+n.bubbleMargin,0);return t.data.length===0?n.cellHorizontalPadding*2:r+2*n.cellHorizontalPadding-n.bubbleMargin},draw:e=>hv(e,e.cell.data),provideEditor:()=>e=>{const{value:t}=e;return f.createElement(dv,{bubbles:t.data})},onPaste:()=>{}};function hv(e,t){const{rect:n,theme:r,ctx:i,highlighted:o}=e,{x:s,y:a,width:l,height:u}=n;let c=s+r.cellHorizontalPadding;const d=[];for(const g of t){if(c>s+l)break;const h=Ir(g,i,r.baseFontFull).width;d.push({x:c,width:h}),c+=h+r.bubblePadding*2+r.bubbleMargin}i.beginPath();for(const g of d)jn(i,g.x,a+(u-r.bubbleHeight)/2,g.width+r.bubblePadding*2,r.bubbleHeight,r.roundingRadius??r.bubbleHeight/2);i.fillStyle=o?r.bgBubbleSelected:r.bgBubble,i.fill();for(const[g,h]of d.entries())i.beginPath(),i.fillStyle=r.textBubble,i.fillText(t[g],h.x+r.bubblePadding,a+u/2+qn(i,r))}const gv=dn("div")({name:"DrilldownOverlayEditorStyle",class:"gdg-d4zsq0x",propsAsIs:!1}),pv=e=>{const{drilldowns:t}=e;return f.createElement(gv,null,t.map((n,r)=>f.createElement("div",{key:r,className:"doe-bubble"},n.img!==void 0&&f.createElement("img",{src:n.img}),f.createElement("div",null,n.text))))},mv={getAccessibilityString:e=>Nc(e.data.map(t=>t.text)),kind:Z.Drilldown,needsHover:!1,useLabel:!1,needsHoverPosition:!1,measure:(e,t,n)=>t.data.reduce((r,i)=>e.measureText(i.text).width+r+n.bubblePadding*2+n.bubbleMargin+(i.img!==void 0?18:0),0)+2*n.cellHorizontalPadding-4,draw:e=>bv(e,e.cell.data),provideEditor:()=>e=>{const{value:t}=e;return f.createElement(pv,{drilldowns:t.data})},onPaste:()=>{}},rl={};function vv(e,t,n,r){const i=Math.ceil(window.devicePixelRatio),o=5,s=n-o*2,a=4,l=n*i,u=r+o,c=r*3,d=(c+o*2)*i,g=`${e},${t},${i},${n}`;if(rl[g]!==void 0)return{el:rl[g],height:l,width:d,middleWidth:a*i,sideWidth:u*i,padding:o*i,dpr:i};const h=document.createElement("canvas"),p=h.getContext("2d");return p===null?null:(h.width=d,h.height=l,p.scale(i,i),rl[g]=h,p.beginPath(),jn(p,o,o,c,s,r),p.shadowColor="rgba(24, 25, 34, 0.4)",p.shadowBlur=1,p.fillStyle=e,p.fill(),p.shadowColor="rgba(24, 25, 34, 0.3)",p.shadowOffsetY=1,p.shadowBlur=5,p.fillStyle=e,p.fill(),p.shadowOffsetY=0,p.shadowBlur=0,p.shadowBlur=0,p.beginPath(),jn(p,o+.5,o+.5,c,s,r),p.strokeStyle=t,p.lineWidth=1,p.stroke(),{el:h,height:l,width:d,sideWidth:u*i,middleWidth:r*i,padding:o*i,dpr:i})}function bv(e,t){const{rect:n,theme:r,ctx:i,imageLoader:o,col:s,row:a}=e,{x:l,width:u}=n,c=r.baseFontFull,d=Wl(i,c),g=Math.min(n.height,Math.max(16,Math.ceil(d*r.lineHeight)*2)),h=Math.floor(n.y+(n.height-g)/2),p=g-10,m=r.bubblePadding,y=r.bubbleMargin;let v=l+r.cellHorizontalPadding;const b=r.roundingRadius??6,x=vv(r.bgCell,r.drilldownBorder,g,b),T=[];for(const k of t){if(v>l+u)break;const P=Ir(k.text,i,c).width;let I=0;k.img!==void 0&&o.loadOrGetImage(k.img,s,a)!==void 0&&(I=p-8+4);const C=P+I+m*2;T.push({x:v,width:C}),v+=C+y}if(x!==null){const{el:k,height:R,middleWidth:P,sideWidth:I,width:C,dpr:F,padding:D}=x,S=I/F,E=D/F;for(const O of T){const M=Math.floor(O.x),V=Math.floor(O.width),W=V-(S-E)*2;i.imageSmoothingEnabled=!1,i.drawImage(k,0,0,I,R,M-E,h,S,g),W>0&&i.drawImage(k,I,0,P,R,M+(S-E),h,W,g),i.drawImage(k,C-I,0,I,R,M+V-(S-E),h,S,g),i.imageSmoothingEnabled=!0}}i.beginPath();for(const[k,R]of T.entries()){const P=t[k];let I=R.x+m;if(P.img!==void 0){const C=o.loadOrGetImage(P.img,s,a);if(C!==void 0){const F=p-8;let D=0,S=0,E=C.width,O=C.height;E>O?(D+=(E-O)/2,E=O):O>E&&(S+=(O-E)/2,O=E),i.beginPath(),jn(i,I,h+g/2-F/2,F,F,r.roundingRadius??3),i.save(),i.clip(),i.drawImage(C,D,S,E,O,I,h+g/2-F/2,F,F),i.restore(),I+=F+4}}i.beginPath(),i.fillStyle=r.textBubble,i.fillText(P.text,I,h+g/2+qn(i,r))}}const wv={getAccessibilityString:e=>e.data.join(", "),kind:Z.Image,needsHover:!1,useLabel:!1,needsHoverPosition:!1,draw:e=>yv(e,e.cell.displayData??e.cell.data,e.cell.rounding??e.theme.roundingRadius??4,e.cell.contentAlign),measure:(e,t)=>t.data.length*50,onDelete:e=>({...e,data:[]}),provideEditor:()=>e=>{const{value:t,onFinishedEditing:n,imageEditorOverride:r}=e,i=r??mp;return f.createElement(i,{urls:t.data,canWrite:t.readonly!==!0,onCancel:n,onChange:o=>{n({...t,data:[o]})}})},onPaste:(e,t)=>{e=e.trim();const r=e.split(",").map(i=>{try{return new URL(i),i}catch{return}}).filter(i=>i!==void 0);if(!(r.length===t.data.length&&r.every((i,o)=>i===t.data[o])))return{...t,data:r}}},il=4;function yv(e,t,n,r){const{rect:i,col:o,row:s,theme:a,ctx:l,imageLoader:u}=e,{x:c,y:d,height:g,width:h}=i,p=g-a.cellVerticalPadding*2,m=[];let y=0;for(let b=0;b<t.length;b++){const x=t[b];if(x.length===0)continue;const T=u.loadOrGetImage(x,o,s);if(T!==void 0){m[b]=T;const k=T.width*(p/T.height);y+=k+il}}if(y===0)return;y-=il;let v=c+a.cellHorizontalPadding;r==="right"?v=Math.floor(c+h-a.cellHorizontalPadding-y):r==="center"&&(v=Math.floor(c+h/2-y/2));for(const b of m){if(b===void 0)continue;const x=b.width*(p/b.height);n>0&&(l.beginPath(),jn(l,v,d+a.cellVerticalPadding,x,p,n),l.save(),l.clip()),l.drawImage(b,v,d+a.cellVerticalPadding,x,p),n>0&&l.restore(),v+=x+il}}function Cv(e,t){let n=e*49632+t*325176;return n^=n<<13,n^=n>>17,n^=n<<5,n/4294967295*2}const Sv={getAccessibilityString:()=>"",kind:Z.Loading,needsHover:!1,useLabel:!1,needsHoverPosition:!1,measure:()=>120,draw:e=>{const{cell:t,col:n,row:r,ctx:i,rect:o,theme:s}=e;if(t.skeletonWidth===void 0||t.skeletonWidth===0)return;let a=t.skeletonWidth;t.skeletonWidthVariability!==void 0&&t.skeletonWidthVariability>0&&(a+=Math.round(Cv(n,r)*t.skeletonWidthVariability));const l=s.cellHorizontalPadding;a+l*2>=o.width&&(a=o.width-l*2-1);const u=t.skeletonHeight??Math.min(18,o.height-2*s.cellVerticalPadding);jn(i,o.x+l,o.y+(o.height-u)/2,a,u,s.roundingRadius??3),i.fillStyle=Wr(s.textDark,.1),i.fill()},onPaste:()=>{}},xv=()=>e=>e.targetWidth,Eu=dn("div")({name:"MarkdownOverlayEditorStyle",class:"gdg-m1pnx84e",propsAsIs:!1,vars:{"m1pnx84e-0":[xv(),"px"]}}),kv=e=>{const{value:t,onChange:n,forceEditMode:r,createNode:i,targetRect:o,onFinish:s,validatedSelection:a}=e,l=t.data,u=t.readonly===!0,[c,d]=f.useState(l===""||r),g=f.useCallback(()=>{d(p=>!p)},[]),h=l?"gdg-ml-6":"";return c?f.createElement(Eu,{targetWidth:o.width-20},f.createElement(Yr,{autoFocus:!0,highlight:!1,validatedSelection:a,value:l,onKeyDown:p=>{p.key==="Enter"&&p.stopPropagation()},onChange:n}),f.createElement("div",{className:`gdg-edit-icon gdg-checkmark-hover ${h}`,onClick:()=>s(t)},f.createElement(up,null))):f.createElement(Eu,{targetWidth:o.width},f.createElement(_p,{contents:l,createNode:i}),!u&&f.createElement(f.Fragment,null,f.createElement("div",{className:"spacer"}),f.createElement("div",{className:`gdg-edit-icon gdg-edit-hover ${h}`,onClick:g},f.createElement(zl,null))),f.createElement("textarea",{className:"gdg-md-edit-textarea gdg-input",autoFocus:!0}))},Mv={getAccessibilityString:e=>e.data?.toString()??"",kind:Z.Markdown,needsHover:!1,needsHoverPosition:!1,drawPrep:bo,measure:(e,t,n)=>{const r=t.data.split(`
175
- `)[0];return e.measureText(r).width+2*n.cellHorizontalPadding},draw:e=>nr(e,e.cell.data,e.cell.contentAlign),onDelete:e=>({...e,data:""}),provideEditor:()=>e=>{const{onChange:t,value:n,target:r,onFinishedEditing:i,markdownDivCreateNode:o,forceEditMode:s,validatedSelection:a}=e;return f.createElement(kv,{onFinish:i,targetRect:r,value:n,validatedSelection:a,onChange:l=>t({...n,data:l.target.value}),forceEditMode:s,createNode:o})},onPaste:(e,t)=>e===t.data?void 0:{...t,data:e}},Rv={getAccessibilityString:e=>e.row.toString(),kind:$n.Marker,needsHover:!0,needsHoverPosition:!1,drawPrep:Iv,measure:()=>44,draw:e=>Tv(e,e.cell.row,e.cell.checked,e.cell.markerKind,e.cell.drawHandle,e.cell.checkboxStyle),onClick:e=>{const{bounds:t,cell:n,posX:r,posY:i}=e,{width:o,height:s}=t,a=n.drawHandle?7+(o-7)/2:o/2,l=s/2;if(Math.abs(r-a)<=10&&Math.abs(i-l)<=10)return{...n,checked:!n.checked}},onPaste:()=>{}};function Iv(e,t){const{ctx:n,theme:r}=e,i=r.markerFontFull,o=t??{};return o?.font!==i&&(n.font=i,o.font=i),o.deprep=Ev,n.textAlign="center",o}function Ev(e){const{ctx:t}=e;t.textAlign="start"}function Tv(e,t,n,r,i,o){const{ctx:s,rect:a,hoverAmount:l,theme:u}=e,{x:c,y:d,width:g,height:h}=a,p=n?1:r==="checkbox-visible"?.6+.4*l:l;if(r!=="number"&&p>0){s.globalAlpha=p;const m=7*(n?l:1);if(Xl(s,u,n,i?c+m:c,d,i?g-m:g,h,!0,void 0,void 0,u.checkboxMaxSize,"center",o),i){s.globalAlpha=l,s.beginPath();for(const y of[3,6])for(const v of[-5,-1,3])s.rect(c+y,d+h/2+v,2,2);s.fillStyle=u.textLight,s.fill(),s.beginPath()}s.globalAlpha=1}if(r==="number"||r==="both"&&!n){const m=t.toString(),y=u.markerFontFull,v=c+g/2;r==="both"&&l!==0&&(s.globalAlpha=1-l),s.fillStyle=u.textLight,s.font=y,s.fillText(m,v,d+h/2+qn(s,y)),l!==0&&(s.globalAlpha=1)}}const Dv={getAccessibilityString:()=>"",kind:$n.NewRow,needsHover:!0,needsHoverPosition:!1,measure:()=>200,draw:e=>Ov(e,e.cell.hint,e.cell.icon),onPaste:()=>{}};function Ov(e,t,n){const{ctx:r,rect:i,hoverAmount:o,theme:s,spriteManager:a}=e,{x:l,y:u,width:c,height:d}=i;r.beginPath(),r.globalAlpha=o,r.rect(l+1,u+1,c,d-2),r.fillStyle=s.bgHeaderHovered,r.fill(),r.globalAlpha=1,r.beginPath();const g=t!=="";let h=0;if(n!==void 0){const m=d-8,y=l+8/2,v=u+8/2;a.drawSprite(n,"normal",r,y,v,m,s,g?1:o),h=m}else{h=24;const p=12,m=g?p:o*p,y=g?0:(1-o)*p*.5,v=s.cellHorizontalPadding+4;m>0&&(r.moveTo(l+v+y,u+d/2),r.lineTo(l+v+y+m,u+d/2),r.moveTo(l+v+y+m*.5,u+d/2-m*.5),r.lineTo(l+v+y+m*.5,u+d/2+m*.5),r.lineWidth=2,r.strokeStyle=s.bgIconHeader,r.lineCap="round",r.stroke())}r.fillStyle=s.textMedium,r.fillText(t,h+l+s.cellHorizontalPadding+.5,u+d/2+qn(r,s)),r.beginPath()}function xd(e,t,n,r,i,o,s){e.textBaseline="alphabetic";const a=Pv(e,i,r,t,n?.fullSize??!1);e.beginPath(),jn(e,a.x,a.y,a.width,a.height,t.roundingRadius??4),e.globalAlpha=o,e.fillStyle=n?.bgColor??Wr(t.textDark,.1),e.fill(),e.globalAlpha=1,e.fillStyle=t.textDark,e.textBaseline="middle",s?.("text")}function Pv(e,t,n,r,i){const o=r.cellHorizontalPadding,s=r.cellVerticalPadding;if(i)return{x:t.x+o/2,y:t.y+s/2+1,width:t.width-o,height:t.height-s-1};const a=Ir(n,e,r.baseFontFull,"alphabetic"),l=t.height-s,u=Math.min(l,a.actualBoundingBoxAscent*2.5);return{x:t.x+o/2,y:t.y+(t.height-u)/2+1,width:a.width+o*3,height:u-1}}const Lv=f.lazy(async()=>await Ll(()=>import("./number-overlay-editor.ZWvSpjJ5.js"),__vite__mapDeps([21,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20]),import.meta.url)),Fv={getAccessibilityString:e=>e.data?.toString()??"",kind:Z.Number,needsHover:e=>e.hoverEffect===!0,needsHoverPosition:!1,useLabel:!0,drawPrep:bo,draw:e=>{const{hoverAmount:t,cell:n,ctx:r,theme:i,rect:o,overrideCursor:s}=e,{hoverEffect:a,displayData:l,hoverEffectTheme:u}=n;a===!0&&t>0&&xd(r,i,u,l,o,t,s),nr(e,e.cell.displayData,e.cell.contentAlign)},measure:(e,t,n)=>e.measureText(t.displayData).width+n.cellHorizontalPadding*2,onDelete:e=>({...e,data:void 0}),provideEditor:()=>e=>{const{isHighlighted:t,onChange:n,value:r,validatedSelection:i}=e;return f.createElement(f.Suspense,{fallback:null},f.createElement(Lv,{highlight:t,disabled:r.readonly===!0,value:r.data,fixedDecimals:r.fixedDecimals,allowNegative:r.allowNegative,thousandSeparator:r.thousandSeparator,decimalSeparator:r.decimalSeparator,validatedSelection:i,onChange:o=>n({...r,data:Number.isNaN(o.floatValue??0)?0:o.floatValue})}))},onPaste:(e,t,n)=>{const r=typeof n.rawValue=="number"?n.rawValue:Number.parseFloat(typeof n.rawValue=="string"?n.rawValue:e);if(!(Number.isNaN(r)||t.data===r))return{...t,data:r,displayData:n.formattedString??t.displayData}}},_v={getAccessibilityString:()=>"",measure:()=>108,kind:Z.Protected,needsHover:!1,needsHoverPosition:!1,draw:Av,onPaste:()=>{}};function Av(e){const{ctx:t,theme:n,rect:r}=e,{x:i,y:o,height:s}=r;t.beginPath();const a=2.5;let l=i+n.cellHorizontalPadding+a;const u=o+s/2,c=Math.cos(tu(30))*a,d=Math.sin(tu(30))*a;for(let g=0;g<12;g++)t.moveTo(l,u-a),t.lineTo(l,u+a),t.moveTo(l+c,u-d),t.lineTo(l-c,u+d),t.moveTo(l-c,u-d),t.lineTo(l+c,u+d),l+=8;t.lineWidth=1.1,t.lineCap="square",t.strokeStyle=n.textLight,t.stroke()}const Hv={getAccessibilityString:e=>e.data?.toString()??"",kind:Z.RowID,needsHover:!1,needsHoverPosition:!1,drawPrep:(e,t)=>bo(e,t,e.theme.textLight),draw:e=>nr(e,e.cell.data,e.cell.contentAlign),measure:(e,t,n)=>e.measureText(t.data).width+n.cellHorizontalPadding*2,provideEditor:()=>e=>{const{isHighlighted:t,onChange:n,value:r,validatedSelection:i}=e;return zt.createElement(Yr,{highlight:t,autoFocus:r.readonly!==!0,disabled:r.readonly!==!1,value:r.data,validatedSelection:i,onChange:o=>n({...r,data:o.target.value})})},onPaste:()=>{}},zv={getAccessibilityString:e=>e.data?.toString()??"",kind:Z.Text,needsHover:e=>e.hoverEffect===!0,needsHoverPosition:!1,drawPrep:bo,useLabel:!0,draw:e=>{const{cell:t,hoverAmount:n,hyperWrapping:r,ctx:i,rect:o,theme:s,overrideCursor:a}=e,{displayData:l,contentAlign:u,hoverEffect:c,allowWrapping:d,hoverEffectTheme:g}=t;c===!0&&n>0&&xd(i,s,g,l,o,n,a),nr(e,l,u,d,r)},measure:(e,t,n)=>{const r=t.displayData.split(`
175
+ `)[0];return e.measureText(r).width+2*n.cellHorizontalPadding},draw:e=>nr(e,e.cell.data,e.cell.contentAlign),onDelete:e=>({...e,data:""}),provideEditor:()=>e=>{const{onChange:t,value:n,target:r,onFinishedEditing:i,markdownDivCreateNode:o,forceEditMode:s,validatedSelection:a}=e;return f.createElement(kv,{onFinish:i,targetRect:r,value:n,validatedSelection:a,onChange:l=>t({...n,data:l.target.value}),forceEditMode:s,createNode:o})},onPaste:(e,t)=>e===t.data?void 0:{...t,data:e}},Rv={getAccessibilityString:e=>e.row.toString(),kind:$n.Marker,needsHover:!0,needsHoverPosition:!1,drawPrep:Iv,measure:()=>44,draw:e=>Tv(e,e.cell.row,e.cell.checked,e.cell.markerKind,e.cell.drawHandle,e.cell.checkboxStyle),onClick:e=>{const{bounds:t,cell:n,posX:r,posY:i}=e,{width:o,height:s}=t,a=n.drawHandle?7+(o-7)/2:o/2,l=s/2;if(Math.abs(r-a)<=10&&Math.abs(i-l)<=10)return{...n,checked:!n.checked}},onPaste:()=>{}};function Iv(e,t){const{ctx:n,theme:r}=e,i=r.markerFontFull,o=t??{};return o?.font!==i&&(n.font=i,o.font=i),o.deprep=Ev,n.textAlign="center",o}function Ev(e){const{ctx:t}=e;t.textAlign="start"}function Tv(e,t,n,r,i,o){const{ctx:s,rect:a,hoverAmount:l,theme:u}=e,{x:c,y:d,width:g,height:h}=a,p=n?1:r==="checkbox-visible"?.6+.4*l:l;if(r!=="number"&&p>0){s.globalAlpha=p;const m=7*(n?l:1);if(Xl(s,u,n,i?c+m:c,d,i?g-m:g,h,!0,void 0,void 0,u.checkboxMaxSize,"center",o),i){s.globalAlpha=l,s.beginPath();for(const y of[3,6])for(const v of[-5,-1,3])s.rect(c+y,d+h/2+v,2,2);s.fillStyle=u.textLight,s.fill(),s.beginPath()}s.globalAlpha=1}if(r==="number"||r==="both"&&!n){const m=t.toString(),y=u.markerFontFull,v=c+g/2;r==="both"&&l!==0&&(s.globalAlpha=1-l),s.fillStyle=u.textLight,s.font=y,s.fillText(m,v,d+h/2+qn(s,y)),l!==0&&(s.globalAlpha=1)}}const Dv={getAccessibilityString:()=>"",kind:$n.NewRow,needsHover:!0,needsHoverPosition:!1,measure:()=>200,draw:e=>Ov(e,e.cell.hint,e.cell.icon),onPaste:()=>{}};function Ov(e,t,n){const{ctx:r,rect:i,hoverAmount:o,theme:s,spriteManager:a}=e,{x:l,y:u,width:c,height:d}=i;r.beginPath(),r.globalAlpha=o,r.rect(l+1,u+1,c,d-2),r.fillStyle=s.bgHeaderHovered,r.fill(),r.globalAlpha=1,r.beginPath();const g=t!=="";let h=0;if(n!==void 0){const m=d-8,y=l+8/2,v=u+8/2;a.drawSprite(n,"normal",r,y,v,m,s,g?1:o),h=m}else{h=24;const p=12,m=g?p:o*p,y=g?0:(1-o)*p*.5,v=s.cellHorizontalPadding+4;m>0&&(r.moveTo(l+v+y,u+d/2),r.lineTo(l+v+y+m,u+d/2),r.moveTo(l+v+y+m*.5,u+d/2-m*.5),r.lineTo(l+v+y+m*.5,u+d/2+m*.5),r.lineWidth=2,r.strokeStyle=s.bgIconHeader,r.lineCap="round",r.stroke())}r.fillStyle=s.textMedium,r.fillText(t,h+l+s.cellHorizontalPadding+.5,u+d/2+qn(r,s)),r.beginPath()}function xd(e,t,n,r,i,o,s){e.textBaseline="alphabetic";const a=Pv(e,i,r,t,n?.fullSize??!1);e.beginPath(),jn(e,a.x,a.y,a.width,a.height,t.roundingRadius??4),e.globalAlpha=o,e.fillStyle=n?.bgColor??Wr(t.textDark,.1),e.fill(),e.globalAlpha=1,e.fillStyle=t.textDark,e.textBaseline="middle",s?.("text")}function Pv(e,t,n,r,i){const o=r.cellHorizontalPadding,s=r.cellVerticalPadding;if(i)return{x:t.x+o/2,y:t.y+s/2+1,width:t.width-o,height:t.height-s-1};const a=Ir(n,e,r.baseFontFull,"alphabetic"),l=t.height-s,u=Math.min(l,a.actualBoundingBoxAscent*2.5);return{x:t.x+o/2,y:t.y+(t.height-u)/2+1,width:a.width+o*3,height:u-1}}const Lv=f.lazy(async()=>await Ll(()=>import("./number-overlay-editor.C0n-91sR.js"),__vite__mapDeps([21,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20]),import.meta.url)),Fv={getAccessibilityString:e=>e.data?.toString()??"",kind:Z.Number,needsHover:e=>e.hoverEffect===!0,needsHoverPosition:!1,useLabel:!0,drawPrep:bo,draw:e=>{const{hoverAmount:t,cell:n,ctx:r,theme:i,rect:o,overrideCursor:s}=e,{hoverEffect:a,displayData:l,hoverEffectTheme:u}=n;a===!0&&t>0&&xd(r,i,u,l,o,t,s),nr(e,e.cell.displayData,e.cell.contentAlign)},measure:(e,t,n)=>e.measureText(t.displayData).width+n.cellHorizontalPadding*2,onDelete:e=>({...e,data:void 0}),provideEditor:()=>e=>{const{isHighlighted:t,onChange:n,value:r,validatedSelection:i}=e;return f.createElement(f.Suspense,{fallback:null},f.createElement(Lv,{highlight:t,disabled:r.readonly===!0,value:r.data,fixedDecimals:r.fixedDecimals,allowNegative:r.allowNegative,thousandSeparator:r.thousandSeparator,decimalSeparator:r.decimalSeparator,validatedSelection:i,onChange:o=>n({...r,data:Number.isNaN(o.floatValue??0)?0:o.floatValue})}))},onPaste:(e,t,n)=>{const r=typeof n.rawValue=="number"?n.rawValue:Number.parseFloat(typeof n.rawValue=="string"?n.rawValue:e);if(!(Number.isNaN(r)||t.data===r))return{...t,data:r,displayData:n.formattedString??t.displayData}}},_v={getAccessibilityString:()=>"",measure:()=>108,kind:Z.Protected,needsHover:!1,needsHoverPosition:!1,draw:Av,onPaste:()=>{}};function Av(e){const{ctx:t,theme:n,rect:r}=e,{x:i,y:o,height:s}=r;t.beginPath();const a=2.5;let l=i+n.cellHorizontalPadding+a;const u=o+s/2,c=Math.cos(tu(30))*a,d=Math.sin(tu(30))*a;for(let g=0;g<12;g++)t.moveTo(l,u-a),t.lineTo(l,u+a),t.moveTo(l+c,u-d),t.lineTo(l-c,u+d),t.moveTo(l-c,u-d),t.lineTo(l+c,u+d),l+=8;t.lineWidth=1.1,t.lineCap="square",t.strokeStyle=n.textLight,t.stroke()}const Hv={getAccessibilityString:e=>e.data?.toString()??"",kind:Z.RowID,needsHover:!1,needsHoverPosition:!1,drawPrep:(e,t)=>bo(e,t,e.theme.textLight),draw:e=>nr(e,e.cell.data,e.cell.contentAlign),measure:(e,t,n)=>e.measureText(t.data).width+n.cellHorizontalPadding*2,provideEditor:()=>e=>{const{isHighlighted:t,onChange:n,value:r,validatedSelection:i}=e;return zt.createElement(Yr,{highlight:t,autoFocus:r.readonly!==!0,disabled:r.readonly!==!1,value:r.data,validatedSelection:i,onChange:o=>n({...r,data:o.target.value})})},onPaste:()=>{}},zv={getAccessibilityString:e=>e.data?.toString()??"",kind:Z.Text,needsHover:e=>e.hoverEffect===!0,needsHoverPosition:!1,drawPrep:bo,useLabel:!0,draw:e=>{const{cell:t,hoverAmount:n,hyperWrapping:r,ctx:i,rect:o,theme:s,overrideCursor:a}=e,{displayData:l,contentAlign:u,hoverEffect:c,allowWrapping:d,hoverEffectTheme:g}=t;c===!0&&n>0&&xd(i,s,g,l,o,n,a),nr(e,l,u,d,r)},measure:(e,t,n)=>{const r=t.displayData.split(`
176
176
  `,t.allowWrapping===!0?void 0:1);let i=0;for(const o of r)i=Math.max(i,e.measureText(o).width);return i+2*n.cellHorizontalPadding},onDelete:e=>({...e,data:""}),provideEditor:e=>({disablePadding:e.allowWrapping===!0,editor:t=>{const{isHighlighted:n,onChange:r,value:i,validatedSelection:o}=t;return f.createElement(Yr,{style:e.allowWrapping===!0?{padding:"3px 8.5px"}:void 0,highlight:n,autoFocus:i.readonly!==!0,disabled:i.readonly===!0,altNewline:!0,value:i.data,validatedSelection:o,onChange:s=>r({...i,data:s.target.value})})}}),onPaste:(e,t,n)=>e===t.data?void 0:{...t,data:e,displayData:n.formattedString??t.displayData}},Vv=dn("div")({name:"UriOverlayEditorStyle",class:"gdg-u1rrojo",propsAsIs:!1}),$v=e=>{const{uri:t,onChange:n,forceEditMode:r,readonly:i,validatedSelection:o,preview:s}=e,[a,l]=f.useState(!i&&(t===""||r)),u=f.useCallback(()=>{l(!0)},[]);return a?f.createElement(Yr,{validatedSelection:o,highlight:!0,autoFocus:!0,value:t,onChange:n}):f.createElement(Vv,null,f.createElement("a",{className:"gdg-link-area",href:t,target:"_blank",rel:"noopener noreferrer"},s),!i&&f.createElement("div",{className:"gdg-edit-icon",onClick:u},f.createElement(zl,null)),f.createElement("textarea",{className:"gdg-input",autoFocus:!0}))};function kd(e,t,n,r){let i=n.cellHorizontalPadding;const o=t.height/2-e.actualBoundingBoxAscent/2,s=e.width,a=e.actualBoundingBoxAscent;return r==="right"?i=t.width-s-n.cellHorizontalPadding:r==="center"&&(i=t.width/2-s/2),{x:i,y:o,width:s,height:a}}function Tu(e){const{cell:t,bounds:n,posX:r,posY:i,theme:o}=e,s=t.displayData??t.data;if(t.hoverEffect!==!0||t.onClickUri===void 0)return!1;const a=Qc(s,o.baseFontFull);if(a===void 0)return!1;const l=kd(a,n,o,t.contentAlign);return Br({x:l.x-4,y:l.y-4,width:l.width+8,height:l.height+8},r,i)}const Nv={getAccessibilityString:e=>e.data?.toString()??"",kind:Z.Uri,needsHover:e=>e.hoverEffect===!0,needsHoverPosition:!0,useLabel:!0,drawPrep:bo,draw:e=>{const{cell:t,theme:n,overrideCursor:r,hoverX:i,hoverY:o,rect:s,ctx:a}=e,l=t.displayData??t.data,u=t.hoverEffect===!0;if(r!==void 0&&u&&i!==void 0&&o!==void 0){const c=Ir(l,a,n.baseFontFull),d=kd(c,s,n,t.contentAlign),{x:g,y:h,width:p,height:m}=d;if(i>=g-4&&i<=g-4+p+8&&o>=h-4&&o<=h-4+m+8){const y=qn(a,n.baseFontFull);r("pointer");const v=5,b=h-y;a.beginPath(),a.moveTo(s.x+g,Math.floor(s.y+b+m+v)+.5),a.lineTo(s.x+g+p,Math.floor(s.y+b+m+v)+.5),a.strokeStyle=n.linkColor,a.stroke(),a.save(),a.fillStyle=e.cellFillColor,nr({...e,rect:{...s,x:s.x-1}},l,t.contentAlign),nr({...e,rect:{...s,x:s.x-2}},l,t.contentAlign),nr({...e,rect:{...s,x:s.x+1}},l,t.contentAlign),nr({...e,rect:{...s,x:s.x+2}},l,t.contentAlign),a.restore()}}a.fillStyle=u?n.linkColor:n.textDark,nr(e,l,t.contentAlign)},onSelect:e=>{Tu(e)&&e.preventDefault()},onClick:e=>{const{cell:t}=e;Tu(e)&&t.onClickUri?.(e)},measure:(e,t,n)=>e.measureText(t.displayData??t.data).width+n.cellHorizontalPadding*2,onDelete:e=>({...e,data:""}),provideEditor:e=>t=>{const{onChange:n,value:r,forceEditMode:i,validatedSelection:o}=t;return f.createElement($v,{forceEditMode:r.readonly!==!0&&(i||e.hoverEffect===!0&&e.onClickUri!==void 0),uri:r.data,preview:r.displayData??r.data,validatedSelection:o,readonly:r.readonly===!0,onChange:s=>n({...r,data:s.target.value})})},onPaste:(e,t,n)=>e===t.data?void 0:{...t,data:e,displayData:n.formattedString??t.displayData}},Bv=[Rv,Dv,sv,fv,mv,wv,Sv,Mv,Fv,_v,Hv,zv,Nv],ol=[];class Wv extends nd{imageLoaded=()=>{};loadedLocations=[];cache={};setCallback(t){this.imageLoaded=t}sendLoaded=yg(()=>{this.imageLoaded(new ao(this.loadedLocations)),this.loadedLocations=[]},20);clearOutOfWindow=()=>{const t=Object.keys(this.cache);for(const n of t){const r=this.cache[n];let i=!1;for(let o=0;o<r.cells.length;o++){const s=r.cells[o];if(this.isInWindow(s)){i=!0;break}}i?r.cells=r.cells.filter(this.isInWindow):(r.cancel(),delete this.cache[n])}};loadImage(t,n,r,i){let o=!1;const s=ol.pop()??new Image;let a=!1;const l={img:void 0,cells:[Xn(n,r)],url:t,cancel:()=>{a||(a=!0,ol.length<12?ol.unshift(s):o||(s.src=""))}},u=new Promise(c=>s.addEventListener("load",()=>c(null)));requestAnimationFrame(async()=>{try{s.src=t,await u,await s.decode();const c=this.cache[i];if(c!==void 0&&!a){c.img=s;for(const d of c.cells)this.loadedLocations.push(Yl(d));o=!0,this.sendLoaded()}}catch{l.cancel()}}),this.cache[i]=l}loadOrGetImage(t,n,r){const i=t,o=this.cache[i];if(o!==void 0){const s=Xn(n,r);return o.cells.includes(s)||o.cells.push(s),o.img}else this.loadImage(t,n,r,i)}}const Uv=(e,t)=>{const n=f.useMemo(()=>({...Hm,...e.headerIcons}),[e.headerIcons]),r=f.useMemo(()=>e.renderers??Bv,[e.renderers]),i=f.useMemo(()=>e.imageWindowLoader??new Wv,[e.imageWindowLoader]);return f.createElement(lv,{...e,renderers:r,headerIcons:n,ref:t,imageWindowLoader:i})},Gv=f.forwardRef(Uv);function Md(e,t){const n=f.useRef(null),r=f.useRef(),i=f.useCallback(()=>{n.current&&(clearTimeout(n.current),n.current=null)},[]);return f.useEffect(()=>i,[i]),{debouncedCallback:f.useCallback((...s)=>{r.current=s,i(),n.current=setTimeout(()=>{r.current&&(e(...r.current),r.current=void 0)},t)},[e,t,i]),cancel:i}}var Qo={exports:{}};var Yv=Qo.exports,Du;function Xv(){return Du||(Du=1,(function(e,t){(function(n,r){try{e.exports=r(pg)}catch{e.exports=r}n&&(n.momentDurationFormatSetup=n.moment?r(n.moment):r)})(Yv,function(n){var r=!1,i=!1,o=!1,s=!1,a="escape years months weeks days hours minutes seconds milliseconds general".split(" "),l=[{type:"seconds",targets:[{type:"minutes",value:60},{type:"hours",value:3600},{type:"days",value:86400},{type:"weeks",value:604800},{type:"months",value:2678400},{type:"years",value:31536e3}]},{type:"minutes",targets:[{type:"hours",value:60},{type:"days",value:1440},{type:"weeks",value:10080},{type:"months",value:44640},{type:"years",value:525600}]},{type:"hours",targets:[{type:"days",value:24},{type:"weeks",value:168},{type:"months",value:744},{type:"years",value:8760}]},{type:"days",targets:[{type:"weeks",value:7},{type:"months",value:31},{type:"years",value:365}]},{type:"months",targets:[{type:"years",value:12}]}];function u(H,L){return L.length>H.length?!1:H.indexOf(L)!==-1}function c(H){for(var L="";H;)L+="0",H-=1;return L}function d(H){for(var L=H.split("").reverse(),X=0,te=!0;te&&X<L.length;)X?L[X]==="9"?L[X]="0":(L[X]=(parseInt(L[X],10)+1).toString(),te=!1):(parseInt(L[X],10)<5&&(te=!1),L[X]="0"),X+=1;return te&&L.push("1"),L.reverse().join("")}function g(H,L){var X=P(M(L).sort(),function(le){return le+":"+L[le]}).join(","),te=H+"+"+X;return g.cache[te]||(g.cache[te]=Intl.NumberFormat(H,L)),g.cache[te]}g.cache={};function h(H,L,X){var te=L.useToLocaleString,le=L.useGrouping,Se=le&&L.grouping.slice(),pe=L.maximumSignificantDigits,et=L.minimumIntegerDigits||1,ke=L.fractionDigits||0,Dt=L.groupingSeparator,dt=L.decimalSeparator;if(te&&X){var Ue={minimumIntegerDigits:et,useGrouping:le};if(ke&&(Ue.maximumFractionDigits=ke,Ue.minimumFractionDigits=ke),pe&&H>0&&(Ue.maximumSignificantDigits=pe),o){if(!s){var ne=O({},L);ne.useGrouping=!1,ne.decimalSeparator=".",H=parseFloat(h(H,ne),10)}return g(X,Ue).format(H)}else{if(!i){var ne=O({},L);ne.useGrouping=!1,ne.decimalSeparator=".",H=parseFloat(h(H,ne),10)}return H.toLocaleString(X,Ue)}}var ve;pe?ve=H.toPrecision(pe+1):ve=H.toFixed(ke+1);var me,he,Ce,_e=ve.split("e");Ce=_e[1]||"",_e=_e[0].split("."),he=_e[1]||"",me=_e[0]||"";var Oe=me.length,at=he.length,Pe=Oe+at,we=me+he;(pe&&Pe===pe+1||!pe&&at===ke+1)&&(we=d(we),we.length===Pe+1&&(Oe=Oe+1),at&&(we=we.slice(0,-1)),me=we.slice(0,Oe),he=we.slice(Oe)),pe&&(he=he.replace(/0*$/,""));var Ae=parseInt(Ce,10);Ae>0?he.length<=Ae?(he=he+c(Ae-he.length),me=me+he,he=""):(me=me+he.slice(0,Ae),he=he.slice(Ae)):Ae<0&&(he=c(Math.abs(Ae)-me.length)+me+he,me="0"),pe||(he=he.slice(0,ke),he.length<ke&&(he=he+c(ke-he.length)),me.length<et&&(me=c(et-me.length)+me));var Re="";if(le){_e=me;for(var Ne;_e.length;)Se.length&&(Ne=Se.shift()),Re&&(Re=Dt+Re),Re=_e.slice(-Ne)+Re,_e=_e.slice(0,-Ne)}else Re=me;return he&&(Re=Re+dt+he),Re}function p(H,L){return H.label.length>L.label.length?-1:H.label.length<L.label.length?1:0}function m(H,L){var X=[];return R(M(L),function(te){if(te.slice(0,15)==="_durationLabels"){var le=te.slice(15).toLowerCase();R(M(L[te]),function(Se){Se.slice(0,1)===H&&X.push({type:le,key:Se,label:L[te][Se]})})}}),X}function y(H,L,X){return L===1&&X===null?H:H+H}var v={durationLabelsStandard:{S:"millisecond",SS:"milliseconds",s:"second",ss:"seconds",m:"minute",mm:"minutes",h:"hour",hh:"hours",d:"day",dd:"days",w:"week",ww:"weeks",M:"month",MM:"months",y:"year",yy:"years"},durationLabelsShort:{S:"msec",SS:"msecs",s:"sec",ss:"secs",m:"min",mm:"mins",h:"hr",hh:"hrs",d:"dy",dd:"dys",w:"wk",ww:"wks",M:"mo",MM:"mos",y:"yr",yy:"yrs"},durationTimeTemplates:{HMS:"h:mm:ss",HM:"h:mm",MS:"m:ss"},durationLabelTypes:[{type:"standard",string:"__"},{type:"short",string:"_"}],durationPluralKey:y};function b(H){return Object.prototype.toString.call(H)==="[object Array]"}function x(H){return Object.prototype.toString.call(H)==="[object Object]"}function T(H,L){for(var X=H.length;X-=1;)if(L(H[X]))return H[X]}function k(H,L){var X=0,te=H&&H.length||0,le;for(typeof L!="function"&&(le=L,L=function(Se){return Se===le});X<te;){if(L(H[X]))return H[X];X+=1}}function R(H,L){var X=0,te=H.length;if(!(!H||!te))for(;X<te;){if(L(H[X],X)===!1)return;X+=1}}function P(H,L){var X=0,te=H.length,le=[];if(!H||!te)return le;for(;X<te;)le[X]=L(H[X],X),X+=1;return le}function I(H,L){return P(H,function(X){return X[L]})}function C(H){var L=[];return R(H,function(X){X&&L.push(X)}),L}function F(H){var L=[];return R(H,function(X){k(L,X)||L.push(X)}),L}function D(H,L){var X=[];return R(H,function(te){R(L,function(le){te===le&&X.push(te)})}),F(X)}function S(H,L){var X=[];return R(H,function(te,le){if(!L(te))return X=H.slice(le),!1}),X}function E(H,L){var X=H.slice().reverse();return S(X,L).reverse()}function O(H,L){for(var X in L)L.hasOwnProperty(X)&&(H[X]=L[X]);return H}function M(H){var L=[];for(var X in H)H.hasOwnProperty(X)&&L.push(X);return L}function V(H,L){var X=0,te=H.length;if(!H||!te)return!1;for(;X<te;){if(L(H[X],X)===!0)return!0;X+=1}return!1}function W(H){var L=[];return R(H,function(X){L=L.concat(X)}),L}function j(){var H=0;try{H.toLocaleString("i")}catch(L){return L.name==="RangeError"}return!1}function oe(H){return H(3.55,"en",{useGrouping:!1,minimumIntegerDigits:1,minimumFractionDigits:1,maximumFractionDigits:1})==="3.6"}function Q(H){var L=!0;return L=L&&H(1,"en",{minimumIntegerDigits:1})==="1",L=L&&H(1,"en",{minimumIntegerDigits:2})==="01",L=L&&H(1,"en",{minimumIntegerDigits:3})==="001",!(!L||(L=L&&H(99.99,"en",{maximumFractionDigits:0,minimumFractionDigits:0})==="100",L=L&&H(99.99,"en",{maximumFractionDigits:1,minimumFractionDigits:1})==="100.0",L=L&&H(99.99,"en",{maximumFractionDigits:2,minimumFractionDigits:2})==="99.99",L=L&&H(99.99,"en",{maximumFractionDigits:3,minimumFractionDigits:3})==="99.990",!L)||(L=L&&H(99.99,"en",{maximumSignificantDigits:1})==="100",L=L&&H(99.99,"en",{maximumSignificantDigits:2})==="100",L=L&&H(99.99,"en",{maximumSignificantDigits:3})==="100",L=L&&H(99.99,"en",{maximumSignificantDigits:4})==="99.99",L=L&&H(99.99,"en",{maximumSignificantDigits:5})==="99.99",!L)||(L=L&&H(1e3,"en",{useGrouping:!0})==="1,000",L=L&&H(1e3,"en",{useGrouping:!1})==="1000",!L))}function re(){var H=[].slice.call(arguments),L={},X;if(R(H,function(pe,et){if(!et){if(!b(pe))throw"Expected array as the first argument to durationsFormat.";X=pe}if(typeof pe=="string"||typeof pe=="function"){L.template=pe;return}if(typeof pe=="number"){L.precision=pe;return}x(pe)&&O(L,pe)}),!X||!X.length)return[];L.returnMomentTypes=!0;var te=P(X,function(pe){return pe.format(L)}),le=D(a,F(I(W(te),"type"))),Se=L.largest;return Se&&(le=le.slice(0,Se)),L.returnMomentTypes=!1,L.outputTypes=le,P(X,function(pe){return pe.format(L)})}function se(){var H=[].slice.call(arguments),L=O({},this.format.defaults),X=this.asMilliseconds(),te=this.asMonths();typeof this.isValid=="function"&&this.isValid()===!1&&(X=0,te=0);var le=X<0,Se=n.duration(Math.abs(X),"milliseconds"),pe=n.duration(Math.abs(te),"months");R(H,function(B){if(typeof B=="string"||typeof B=="function"){L.template=B;return}if(typeof B=="number"){L.precision=B;return}x(B)&&O(L,B)});var et={years:"y",months:"M",weeks:"w",days:"d",hours:"h",minutes:"m",seconds:"s",milliseconds:"S"},ke={escape:/\[(.+?)\]/,years:/\*?[Yy]+/,months:/\*?M+/,weeks:/\*?[Ww]+/,days:/\*?[Dd]+/,hours:/\*?[Hh]+/,minutes:/\*?m+/,seconds:/\*?s+/,milliseconds:/\*?S+/,general:/.+?/};L.types=a;var Dt=function(B){return k(a,function(Be){return ke[Be].test(B)})},dt=new RegExp(P(a,function(B){return ke[B].source}).join("|"),"g");L.duration=this;var Ue=typeof L.template=="function"?L.template.apply(L):L.template,ne=L.outputTypes,ve=L.returnMomentTypes,me=L.largest,he=[];ne||(b(L.stopTrim)&&(L.stopTrim=L.stopTrim.join("")),L.stopTrim&&R(L.stopTrim.match(dt),function(B){var Be=Dt(B);Be==="escape"||Be==="general"||he.push(Be)}));var Ce=n.localeData();Ce||(Ce={}),R(M(v),function(B){if(typeof v[B]=="function"){Ce[B]||(Ce[B]=v[B]);return}Ce["_"+B]||(Ce["_"+B]=v[B])}),R(M(Ce._durationTimeTemplates),function(B){Ue=Ue.replace("_"+B+"_",Ce._durationTimeTemplates[B])});var _e=L.userLocale||n.locale(),Oe=L.useLeftUnits,at=L.usePlural,Pe=L.precision,we=L.forceLength,Ae=L.useGrouping,Re=L.trunc,Ne=L.useSignificantDigits&&Pe>0,ft=Ne?L.precision:0,ht=ft,Xe=L.minValue,pt=!1,Nt=L.maxValue,St=!1,Tt=L.useToLocaleString,Bt=L.groupingSeparator,qt=L.decimalSeparator,an=L.grouping;Tt=Tt&&(r||o);var It=L.trim;b(It)&&(It=It.join(" ")),It===null&&(me||Nt||Ne)&&(It="all"),(It===null||It===!0||It==="left"||It==="right")&&(It="large"),It===!1&&(It="");var gt=function(B){return B.test(It)},Wt=/large/,wt=/small/,ln=/both/,Mn=/mid/,De=/^all|[^sm]all/,mt=/final/,xt=me>0||V([Wt,ln,De],gt),vn=V([wt,ln,De],gt),tn=V([Mn,De],gt),nn=V([mt,De],gt),un=P(Ue.match(dt),function(B,Be){var je=Dt(B);return B.slice(0,1)==="*"&&(B=B.slice(1),je!=="escape"&&je!=="general"&&he.push(je)),{index:Be,length:B.length,text:"",token:je==="escape"?B.replace(ke.escape,"$1"):B,type:je==="escape"||je==="general"?null:je}}),$t={index:0,length:0,token:"",text:"",type:null},Zt=[];Oe&&un.reverse(),R(un,function(B){if(B.type){($t.type||$t.text)&&Zt.push($t),$t=B;return}Oe?$t.text=B.token+$t.text:$t.text+=B.token}),($t.type||$t.text)&&Zt.push($t),Oe&&Zt.reverse();var Ge=D(a,F(C(I(Zt,"type"))));if(!Ge.length)return I(Zt,"text").join("");Ge=P(Ge,function(B,Be){var je=Be+1===Ge.length,Pt=!Be,Kt;B==="years"||B==="months"?Kt=pe.as(B):Kt=Se.as(B);var rn=Math.floor(Kt),En=Kt-rn,wn=k(Zt,function(Gt){return B===Gt.type});return Pt&&Nt&&Kt>Nt&&(St=!0),je&&Xe&&Math.abs(L.duration.as(B))<Xe&&(pt=!0),Pt&&we===null&&wn.length>1&&(we=!0),Se.subtract(rn,B),pe.subtract(rn,B),{rawValue:Kt,wholeValue:rn,decimalValue:je?En:0,isSmallest:je,isLargest:Pt,type:B,tokenLength:wn.length}});var kt=Re?Math.floor:Math.round,In=function(B,Be){var je=Math.pow(10,Be);return kt(B*je)/je},Ot=!1,bt=!1,bn=function(B,Be){var je={useGrouping:Ae,groupingSeparator:Bt,decimalSeparator:qt,grouping:an,useToLocaleString:Tt};return Ne&&(ft<=0?(B.rawValue=0,B.wholeValue=0,B.decimalValue=0):(je.maximumSignificantDigits=ft,B.significantDigits=ft)),St&&!bt&&(B.isLargest?(B.wholeValue=Nt,B.decimalValue=0):(B.wholeValue=0,B.decimalValue=0)),pt&&!bt&&(B.isSmallest?(B.wholeValue=Xe,B.decimalValue=0):(B.wholeValue=0,B.decimalValue=0)),B.isSmallest||B.significantDigits&&B.significantDigits-B.wholeValue.toString().length<=0?Pe<0?B.value=In(B.wholeValue,Pe):Pe===0?B.value=kt(B.wholeValue+B.decimalValue):Ne?(Re?B.value=In(B.rawValue,ft-B.wholeValue.toString().length):B.value=B.rawValue,B.wholeValue&&(ft-=B.wholeValue.toString().length)):(je.fractionDigits=Pe,Re?B.value=B.wholeValue+In(B.decimalValue,Pe):B.value=B.wholeValue+B.decimalValue):Ne&&B.wholeValue?(B.value=Math.round(In(B.wholeValue,B.significantDigits-B.wholeValue.toString().length)),ft-=B.wholeValue.toString().length):B.value=B.wholeValue,B.tokenLength>1&&(we||Ot)&&(je.minimumIntegerDigits=B.tokenLength,bt&&je.maximumSignificantDigits<B.tokenLength&&delete je.maximumSignificantDigits),!Ot&&(B.value>0||It===""||k(he,B.type)||k(ne,B.type))&&(Ot=!0),B.formattedValue=h(B.value,je,_e),je.useGrouping=!1,je.decimalSeparator=".",B.formattedValueEn=h(B.value,je,"en"),B.tokenLength===2&&B.type==="milliseconds"&&(B.formattedValueMS=h(B.value,{minimumIntegerDigits:3,useGrouping:!1},"en").slice(0,2)),B};if(Ge=P(Ge,bn),Ge=C(Ge),Ge.length>1){var ir=function(B){return k(Ge,function(Be){return Be.type===B})},Kn=function(B){var Be=ir(B.type);Be&&R(B.targets,function(je){var Pt=ir(je.type);Pt&&parseInt(Be.formattedValueEn,10)===je.value&&(Be.rawValue=0,Be.wholeValue=0,Be.decimalValue=0,Pt.rawValue+=1,Pt.wholeValue+=1,Pt.decimalValue=0,Pt.formattedValueEn=Pt.wholeValue.toString(),bt=!0)})};R(l,Kn)}return bt&&(Ot=!1,ft=ht,Ge=P(Ge,bn),Ge=C(Ge)),ne&&!(St&&!L.trim)?(Ge=P(Ge,function(B){return k(ne,function(Be){return B.type===Be})?B:null}),Ge=C(Ge)):(xt&&(Ge=S(Ge,function(B){return!B.isSmallest&&!B.wholeValue&&!k(he,B.type)})),me&&Ge.length&&(Ge=Ge.slice(0,me)),vn&&Ge.length>1&&(Ge=E(Ge,function(B){return!B.wholeValue&&!k(he,B.type)&&!B.isLargest})),tn&&(Ge=P(Ge,function(B,Be){return Be>0&&Be<Ge.length-1&&!B.wholeValue?null:B}),Ge=C(Ge)),nn&&Ge.length===1&&!Ge[0].wholeValue&&!(!Re&&Ge[0].isSmallest&&Ge[0].rawValue<Xe)&&(Ge=[])),ve?Ge:(R(Zt,function(B){var Be=et[B.type],je=k(Ge,function(Gt){return Gt.type===B.type});if(!(!Be||!je)){var Pt=je.formattedValueEn.split(".");Pt[0]=parseInt(Pt[0],10),Pt[1]?Pt[1]=parseFloat("0."+Pt[1],10):Pt[1]=null;var Kt=Ce.durationPluralKey(Be,Pt[0],Pt[1]),rn=m(Be,Ce),En=!1,wn={};R(Ce._durationLabelTypes,function(Gt){var yn=k(rn,function(Cn){return Cn.type===Gt.type&&Cn.key===Kt});yn&&(wn[yn.type]=yn.label,u(B.text,Gt.string)&&(B.text=B.text.replace(Gt.string,yn.label),En=!0))}),at&&!En&&(rn.sort(p),R(rn,function(Gt){if(wn[Gt.type]===Gt.label)return u(B.text,Gt.label)?!1:void 0;if(u(B.text,Gt.label))return B.text=B.text.replace(Gt.label,wn[Gt.type]),!1}))}}),Zt=P(Zt,function(B){if(!B.type)return B.text;var Be=k(Ge,function(Pt){return Pt.type===B.type});if(!Be)return"";var je="";return Oe&&(je+=B.text),(le&&St||!le&&pt)&&(je+="< ",St=!1,pt=!1),(le&&pt||!le&&St)&&(je+="> ",St=!1,pt=!1),le&&(Be.value>0||It===""||k(he,Be.type)||k(ne,Be.type))&&(je+="-",le=!1),B.type==="milliseconds"&&Be.formattedValueMS?je+=Be.formattedValueMS:je+=Be.formattedValue,Oe||(je+=B.text),je}),Zt.join("").replace(/(,| |:|\.)*$/,"").replace(/^(,| |:|\.)*/,""))}function ae(){var H=this.duration,L=function(Se){return H._data[Se]},X=k(this.types,L),te=T(this.types,L);switch(X){case"milliseconds":return"S __";case"seconds":case"minutes":return"*_MS_";case"hours":return"_HMS_";case"days":if(X===te)return"d __";case"weeks":return X===te?"w __":(this.trim===null&&(this.trim="both"),"w __, d __, h __");case"months":if(X===te)return"M __";case"years":return X===te?"y __":(this.trim===null&&(this.trim="both"),"y __, M __, d __");default:return this.trim===null&&(this.trim="both"),"y __, d __, h __, m __, s __"}}function de(H){if(!H)throw"Moment Duration Format init cannot find moment instance.";H.duration.format=re,H.duration.fn.format=se,H.duration.fn.format.defaults={trim:null,stopTrim:null,largest:null,maxValue:null,minValue:null,precision:0,trunc:!1,forceLength:null,userLocale:null,usePlural:!0,useLeftUnits:!1,useGrouping:!0,useSignificantDigits:!1,template:ae,useToLocaleString:!0,groupingSeparator:",",decimalSeparator:".",grouping:[3]},H.updateLocale("en",v)}var fe=function(H,L,X){return H.toLocaleString(L,X)};r=j()&&Q(fe),i=r&&oe(fe);var ue=function(H,L,X){if(typeof window<"u"&&window&&window.Intl&&window.Intl.NumberFormat)return window.Intl.NumberFormat(L,X).format(H)};return o=Q(ue),s=o&&oe(ue),de(n),de})})(Qo)),Qo.exports}Xv();const jv=["true","t","yes","y","on","1"],qv=["false","f","no","n","off","0"];function Et(e,t=""){return{kind:Z.Text,readonly:!0,allowOverlay:!0,data:e,displayData:e,errorDetails:t,isError:!0,style:"faded"}}function Ri(e){return Object.hasOwn(e,"isError")&&e.isError}function Kv(e){return Object.hasOwn(e,"tooltip")&&e.tooltip!==""}function Kl(e){return Object.hasOwn(e,"isMissingValue")&&e.isMissingValue}function Il(e=!1){return e?{kind:Z.Loading,allowOverlay:!1,isMissingValue:!0,copyData:""}:{kind:Z.Loading,allowOverlay:!1,copyData:""}}function Zv(e,t){const n=t?"faded":"normal";return{kind:Z.Text,data:"",displayData:"",allowOverlay:!0,readonly:e,style:n}}function El(e){return{id:e.id,title:e.title,hasMenu:!1,menuIcon:"dots",themeOverride:e.themeOverride,icon:e.icon,group:e.group,...e.isStretched&&!e.isPinned&&{grow:1},...e.width&&{width:e.width}}}function Ti(e,t){return Ee(e)?t||{}:Ee(t)?e||{}:mc(e,t)}function Zl(e){if(Ee(e))return[];if(typeof e=="number"||typeof e=="boolean")return[e];if(typeof e=="string"){if(e==="")return[];if(e.trim().startsWith("[")&&e.trim().endsWith("]"))try{return JSON.parse(e)}catch{return[e]}else return e.split(",")}try{const t=JSON.parse(JSON.stringify(e,(n,r)=>typeof r=="bigint"?Number(r):r));return Array.isArray(t)?t.map(n=>["string","number","boolean","null"].includes(typeof n)?n:ot(n)):[ot(t)]}catch{return[ot(e)]}}function Rd(e){return typeof e=="string"||e instanceof String?!0:(e instanceof Ch&&(e=Array.from(e)),Array.isArray(e)&&e.every(t=>typeof t=="string"||t instanceof String))}function Jv(e){return e?.startsWith("{")&&e.endsWith("}")}function ot(e){try{try{return yh(e)}catch{return JSON.stringify(e,(n,r)=>typeof r=="bigint"?Number(r):r)}}catch{return`[${typeof e}]`}}function Id(e){if(Ee(e))return null;if(typeof e=="boolean")return e;const t=ot(e).toLowerCase().trim();if(t==="")return null;if(jv.includes(t))return!0;if(qv.includes(t))return!1}function fo(e){if(Ee(e))return null;if(Array.isArray(e))return NaN;if(typeof e=="string"){if(e.trim().length===0)return null;try{const t=bg.unformat(e.trim());if(ct(t))return t}catch{}}else if(e instanceof Int32Array)return Number(e[0]);return Number(e)}function Ed(e){return Ee(e)?"":ot(e.map(t=>typeof t=="string"&&t.includes(",")?t.replace(/,/g," "):t))}function da(e){if(Ee(e))return"";if(typeof e=="string")return e;try{return JSON.stringify(e,(t,n)=>typeof n=="bigint"?Number(n):n)}catch{return ot(e)}}function Go(e){if(Ee(e))return null;if(e instanceof Date)return isNaN(e.getTime())?void 0:e;if(typeof e=="string"&&e.trim().length===0)return null;try{const t=Number(e);if(!isNaN(t)){let n=t;t>=10**18?n=t/1e3**3:t>=10**15?n=t/1e3**2:t>=10**12&&(n=t/1e3);const r=$r.unix(n).utc();if(r.isValid())return r.toDate()}if(typeof e=="string"){const n=$r.utc(e);if(n.isValid())return n.toDate();const r=$r.utc(e,[$r.HTML5_FMT.TIME_MS,$r.HTML5_FMT.TIME_SECONDS,$r.HTML5_FMT.TIME]);if(r.isValid())return r.toDate()}}catch{return}}function Td(e){if(e%1===0)return 0;let t=e.toString();return t.indexOf("e")!==-1&&(t=e.toLocaleString("fullwide",{useGrouping:!1,maximumFractionDigits:20})),t.indexOf(".")===-1?0:t.split(".")[1].length}function Qv(e,t){if(!Number.isFinite(e))return e;if(t<=0)return Math.trunc(e);const n=10**t,r=e*n,i=Number.EPSILON*Math.abs(r)*10;return Math.trunc(r+Math.sign(r)*i)/n}const eb=new RegExp(/(\r\n|\n|\r)/gm);function ho(e){return e.indexOf(`
177
177
  `)!==-1?e.replace(eb," "):e}function tb(e,t){if(Ee(t))return"";try{const n=t.match(e);return n?.[1]!==void 0?decodeURIComponent(n[1].replace(/\+/g,"%20")):t}catch{return t}}const nb=Fn("div",{target:"ee5ryew0"})(({theme:e})=>({overflowY:"auto",padding:e.spacing.sm,".react-json-view .copy-icon svg":{fontSize:"0.9em !important",marginRight:`${e.spacing.threeXS} !important`,verticalAlign:"middle !important"}})),Dd=({jsonValue:e,theme:t})=>{let n;if(e)try{n=typeof e=="string"?Ka.parse(e):Ka.parse(Ka.stringify(e))}catch{n=void 0}return Ee(n)?Ie(Yr,{highlight:!0,autoFocus:!1,disabled:!0,value:da(e)??"",onChange:()=>{}}):Ie(nb,{"data-testid":"stJsonColumnViewer",children:Ie(wg,{src:n,collapsed:2,theme:Sh(t.bgCell)>.5?"rjv-default":"monokai",displayDataTypes:!1,displayObjectSize:!1,name:!1,enableClipboard:!0,style:{fontFamily:t.fontFamily,fontSize:t.baseFontStyle,backgroundColor:t.bgCell,whiteSpace:"pre-wrap"}})})},rb=e=>{const t=e.theme,n=e.value.data;return Ie(Dd,{jsonValue:n.value||n.displayValue,theme:t})},ib=e=>{const t=e.theme,n=e.value;return Ie(Dd,{jsonValue:n.data,theme:t})},ob={kind:Z.Custom,isMatch:e=>e.data.kind==="json-cell",draw:(e,t)=>{const{value:n,displayValue:r}=t.data;return Bl(e,r??da(n)??"",t.contentAlign),!0},measure:(e,t,n)=>{const{value:r,displayValue:i}=t.data,o=i??da(r)??"";return(o?e.measureText(o).width:0)+n.cellHorizontalPadding*2},provideEditor:()=>({editor:rb})};var ab=["defaultInputValue","defaultMenuIsOpen","defaultValue","inputValue","menuIsOpen","onChange","onInputChange","onMenuClose","onMenuOpen","value"];function Od(e){var t=e.defaultInputValue,n=t===void 0?"":t,r=e.defaultMenuIsOpen,i=r===void 0?!1:r,o=e.defaultValue,s=o===void 0?null:o,a=e.inputValue,l=e.menuIsOpen,u=e.onChange,c=e.onInputChange,d=e.onMenuClose,g=e.onMenuOpen,h=e.value,p=rr(e,ab),m=f.useState(a!==void 0?a:n),y=ur(m,2),v=y[0],b=y[1],x=f.useState(l!==void 0?l:i),T=ur(x,2),k=T[0],R=T[1],P=f.useState(h!==void 0?h:s),I=ur(P,2),C=I[0],F=I[1],D=f.useCallback(function(j,oe){typeof u=="function"&&u(j,oe),F(j)},[u]),S=f.useCallback(function(j,oe){var Q;typeof c=="function"&&(Q=c(j,oe)),b(Q!==void 0?Q:j)},[c]),E=f.useCallback(function(){typeof g=="function"&&g(),R(!0)},[g]),O=f.useCallback(function(){typeof d=="function"&&d(),R(!1)},[d]),M=a!==void 0?a:v,V=l!==void 0?l:k,W=h!==void 0?h:C;return Le(Le({},p),{},{inputValue:M,menuIsOpen:V,onChange:D,onInputChange:S,onMenuClose:O,onMenuOpen:E,value:W})}function lb(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}const sb=Math.min,ub=Math.max,fa=Math.round,Yo=Math.floor,ha=e=>({x:e,y:e});function cb(e){const{x:t,y:n,width:r,height:i}=e;return{width:r,height:i,top:n,left:t,right:t+r,bottom:n+i,x:t,y:n}}function Sa(){return typeof window<"u"}function Pd(e){return Fd(e)?(e.nodeName||"").toLowerCase():"#document"}function dr(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Ld(e){var t;return(t=(Fd(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function Fd(e){return Sa()?e instanceof Node||e instanceof dr(e).Node:!1}function db(e){return Sa()?e instanceof Element||e instanceof dr(e).Element:!1}function Jl(e){return Sa()?e instanceof HTMLElement||e instanceof dr(e).HTMLElement:!1}function Ou(e){return!Sa()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof dr(e).ShadowRoot}function _d(e){const{overflow:t,overflowX:n,overflowY:r,display:i}=Ql(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!["inline","contents"].includes(i)}function fb(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function hb(e){return["html","body","#document"].includes(Pd(e))}function Ql(e){return dr(e).getComputedStyle(e)}function gb(e){if(Pd(e)==="html")return e;const t=e.assignedSlot||e.parentNode||Ou(e)&&e.host||Ld(e);return Ou(t)?t.host:t}function Ad(e){const t=gb(e);return hb(t)?e.ownerDocument?e.ownerDocument.body:e.body:Jl(t)&&_d(t)?t:Ad(t)}function ga(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const i=Ad(e),o=i===((r=e.ownerDocument)==null?void 0:r.body),s=dr(i);if(o){const a=Tl(s);return t.concat(s,s.visualViewport||[],_d(i)?i:[],a&&n?ga(a):[])}return t.concat(i,ga(i,[],n))}function Tl(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function pb(e){const t=Ql(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const i=Jl(e),o=i?e.offsetWidth:n,s=i?e.offsetHeight:r,a=fa(n)!==o||fa(r)!==s;return a&&(n=o,r=s),{width:n,height:r,$:a}}function es(e){return db(e)?e:e.contextElement}function Pu(e){const t=es(e);if(!Jl(t))return ha(1);const n=t.getBoundingClientRect(),{width:r,height:i,$:o}=pb(t);let s=(o?fa(n.width):n.width)/r,a=(o?fa(n.height):n.height)/i;return(!s||!Number.isFinite(s))&&(s=1),(!a||!Number.isFinite(a))&&(a=1),{x:s,y:a}}const mb=ha(0);function vb(e){const t=dr(e);return!fb()||!t.visualViewport?mb:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function bb(e,t,n){return!1}function Lu(e,t,n,r){t===void 0&&(t=!1);const i=e.getBoundingClientRect(),o=es(e);let s=ha(1);t&&(s=Pu(e));const a=bb()?vb(o):ha(0);let l=(i.left+a.x)/s.x,u=(i.top+a.y)/s.y,c=i.width/s.x,d=i.height/s.y;if(o){const g=dr(o),h=r;let p=g,m=Tl(p);for(;m&&r&&h!==p;){const y=Pu(m),v=m.getBoundingClientRect(),b=Ql(m),x=v.left+(m.clientLeft+parseFloat(b.paddingLeft))*y.x,T=v.top+(m.clientTop+parseFloat(b.paddingTop))*y.y;l*=y.x,u*=y.y,c*=y.x,d*=y.y,l+=x,u+=T,p=dr(m),m=Tl(p)}}return cb({width:c,height:d,x:l,y:u})}function wb(e,t){let n=null,r;const i=Ld(e);function o(){var a;clearTimeout(r),(a=n)==null||a.disconnect(),n=null}function s(a,l){a===void 0&&(a=!1),l===void 0&&(l=1),o();const{left:u,top:c,width:d,height:g}=e.getBoundingClientRect();if(a||t(),!d||!g)return;const h=Yo(c),p=Yo(i.clientWidth-(u+d)),m=Yo(i.clientHeight-(c+g)),y=Yo(u),b={rootMargin:-h+"px "+-p+"px "+-m+"px "+-y+"px",threshold:ub(0,sb(1,l))||1};let x=!0;function T(k){const R=k[0].intersectionRatio;if(R!==l){if(!x)return s();R?s(!1,R):r=setTimeout(()=>{s(!1,1e-7)},1e3)}x=!1}try{n=new IntersectionObserver(T,{...b,root:i.ownerDocument})}catch{n=new IntersectionObserver(T,b)}n.observe(e)}return s(!0),o}function yb(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:i=!0,ancestorResize:o=!0,elementResize:s=typeof ResizeObserver=="function",layoutShift:a=typeof IntersectionObserver=="function",animationFrame:l=!1}=r,u=es(e),c=i||o?[...u?ga(u):[],...ga(t)]:[];c.forEach(v=>{i&&v.addEventListener("scroll",n,{passive:!0}),o&&v.addEventListener("resize",n)});const d=u&&a?wb(u,n):null;let g=-1,h=null;s&&(h=new ResizeObserver(v=>{let[b]=v;b&&b.target===u&&h&&(h.unobserve(t),cancelAnimationFrame(g),g=requestAnimationFrame(()=>{var x;(x=h)==null||x.observe(t)})),n()}),u&&!l&&h.observe(u),h.observe(t));let p,m=l?Lu(e):null;l&&y();function y(){const v=Lu(e);m&&(v.x!==m.x||v.y!==m.y||v.width!==m.width||v.height!==m.height)&&n(),m=v,p=requestAnimationFrame(y)}return n(),()=>{var v;c.forEach(b=>{i&&b.removeEventListener("scroll",n),o&&b.removeEventListener("resize",n)}),d?.(),(v=h)==null||v.disconnect(),h=null,l&&cancelAnimationFrame(p)}}var Dl=f.useLayoutEffect,Cb=["className","clearValue","cx","getStyles","getClassNames","getValue","hasValue","isMulti","isRtl","options","selectOption","selectProps","setValue","theme"],pa=function(){};function Sb(e,t){return t?t[0]==="-"?e+t:e+"__"+t:e}function xb(e,t){for(var n=arguments.length,r=new Array(n>2?n-2:0),i=2;i<n;i++)r[i-2]=arguments[i];var o=[].concat(r);if(t&&e)for(var s in t)t.hasOwnProperty(s)&&t[s]&&o.push("".concat(Sb(e,s)));return o.filter(function(a){return a}).map(function(a){return String(a).trim()}).join(" ")}var ma=function(t){return Pb(t)?t.filter(Boolean):xh(t)==="object"&&t!==null?[t]:[]},Hd=function(t){t.className,t.clearValue,t.cx,t.getStyles,t.getClassNames,t.getValue,t.hasValue,t.isMulti,t.isRtl,t.options,t.selectOption,t.selectProps,t.setValue,t.theme;var n=rr(t,Cb);return Le({},n)},jt=function(t,n,r){var i=t.cx,o=t.getStyles,s=t.getClassNames,a=t.className;return{css:o(n,t),className:i(r??{},s(n,t),a)}};function xa(e){return[document.documentElement,document.body,window].indexOf(e)>-1}function kb(e){return xa(e)?window.innerHeight:e.clientHeight}function zd(e){return xa(e)?window.pageYOffset:e.scrollTop}function va(e,t){if(xa(e)){window.scrollTo(0,t);return}e.scrollTop=t}function Mb(e){var t=getComputedStyle(e),n=t.position==="absolute",r=/(auto|scroll)/;if(t.position==="fixed")return document.documentElement;for(var i=e;i=i.parentElement;)if(t=getComputedStyle(i),!(n&&t.position==="static")&&r.test(t.overflow+t.overflowY+t.overflowX))return i;return document.documentElement}function Rb(e,t,n,r){return n*((e=e/r-1)*e*e+1)+t}function Xo(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:200,r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:pa,i=zd(e),o=t-i,s=10,a=0;function l(){a+=s;var u=Rb(a,i,o,n);va(e,u),a<n?window.requestAnimationFrame(l):r(e)}l()}function Fu(e,t){var n=e.getBoundingClientRect(),r=t.getBoundingClientRect(),i=t.offsetHeight/3;r.bottom+i>n.bottom?va(e,Math.min(t.offsetTop+t.clientHeight-e.offsetHeight+i,e.scrollHeight)):r.top-i<n.top&&va(e,Math.max(t.offsetTop-i,0))}function Ib(e){var t=e.getBoundingClientRect();return{bottom:t.bottom,height:t.height,left:t.left,right:t.right,top:t.top,width:t.width}}function _u(){try{return document.createEvent("TouchEvent"),!0}catch{return!1}}function Eb(){try{return/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)}catch{return!1}}var Vd=!1,Tb={get passive(){return Vd=!0}},jo=typeof window<"u"?window:{};jo.addEventListener&&jo.removeEventListener&&(jo.addEventListener("p",pa,Tb),jo.removeEventListener("p",pa,!1));var Db=Vd;function Ob(e){return e!=null}function Pb(e){return Array.isArray(e)}function to(e,t,n){return e?t:n}var Lb=function(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];var o=Object.entries(t).filter(function(s){var a=ur(s,1),l=a[0];return!r.includes(l)});return o.reduce(function(s,a){var l=ur(a,2),u=l[0],c=l[1];return s[u]=c,s},{})},Fb=["children","innerProps"],_b=["children","innerProps"];function Ab(e){var t=e.maxHeight,n=e.menuEl,r=e.minHeight,i=e.placement,o=e.shouldScroll,s=e.isFixedPosition,a=e.controlHeight,l=Mb(n),u={placement:"bottom",maxHeight:t};if(!n||!n.offsetParent)return u;var c=l.getBoundingClientRect(),d=c.height,g=n.getBoundingClientRect(),h=g.bottom,p=g.height,m=g.top,y=n.offsetParent.getBoundingClientRect(),v=y.top,b=s?window.innerHeight:kb(l),x=zd(l),T=parseInt(getComputedStyle(n).marginBottom,10),k=parseInt(getComputedStyle(n).marginTop,10),R=v-k,P=b-m,I=R+x,C=d-x-m,F=h-b+x+T,D=x+m-k,S=160;switch(i){case"auto":case"bottom":if(P>=p)return{placement:"bottom",maxHeight:t};if(C>=p&&!s)return o&&Xo(l,F,S),{placement:"bottom",maxHeight:t};if(!s&&C>=r||s&&P>=r){o&&Xo(l,F,S);var E=s?P-T:C-T;return{placement:"bottom",maxHeight:E}}if(i==="auto"||s){var O=t,M=s?R:I;return M>=r&&(O=Math.min(M-T-a,t)),{placement:"top",maxHeight:O}}if(i==="bottom")return o&&va(l,F),{placement:"bottom",maxHeight:t};break;case"top":if(R>=p)return{placement:"top",maxHeight:t};if(I>=p&&!s)return o&&Xo(l,D,S),{placement:"top",maxHeight:t};if(!s&&I>=r||s&&R>=r){var V=t;return(!s&&I>=r||s&&R>=r)&&(V=s?R-k:I-k),o&&Xo(l,D,S),{placement:"top",maxHeight:V}}return{placement:"bottom",maxHeight:t};default:throw new Error('Invalid placement provided "'.concat(i,'".'))}return u}function Hb(e){var t={bottom:"top",top:"bottom"};return e?t[e]:"bottom"}var $d=function(t){return t==="auto"?"bottom":t},zb=function(t,n){var r,i=t.placement,o=t.theme,s=o.borderRadius,a=o.spacing,l=o.colors;return Le((r={label:"menu"},_o(r,Hb(i),"100%"),_o(r,"position","absolute"),_o(r,"width","100%"),_o(r,"zIndex",1),r),n?{}:{backgroundColor:l.neutral0,borderRadius:s,boxShadow:"0 0 0 1px hsla(0, 0%, 0%, 0.1), 0 4px 11px hsla(0, 0%, 0%, 0.1)",marginBottom:a.menuGutter,marginTop:a.menuGutter})},Nd=f.createContext(null),Vb=function(t){var n=t.children,r=t.minMenuHeight,i=t.maxMenuHeight,o=t.menuPlacement,s=t.menuPosition,a=t.menuShouldScrollIntoView,l=t.theme,u=f.useContext(Nd)||{},c=u.setPortalPlacement,d=f.useRef(null),g=f.useState(i),h=ur(g,2),p=h[0],m=h[1],y=f.useState(null),v=ur(y,2),b=v[0],x=v[1],T=l.spacing.controlHeight;return Dl(function(){var k=d.current;if(k){var R=s==="fixed",P=a&&!R,I=Ab({maxHeight:i,menuEl:k,minHeight:r,placement:o,shouldScroll:P,isFixedPosition:R,controlHeight:T});m(I.maxHeight),x(I.placement),c?.(I.placement)}},[i,o,s,a,r,c,T]),n({ref:d,placerProps:Le(Le({},t),{},{placement:b||$d(o),maxHeight:p})})},$b=function(t){var n=t.children,r=t.innerRef,i=t.innerProps;return Fe("div",Ve({},jt(t,"menu",{menu:!0}),{ref:r},i),n)},Nb=$b,Bb=function(t,n){var r=t.maxHeight,i=t.theme.spacing.baseUnit;return Le({maxHeight:r,overflowY:"auto",position:"relative",WebkitOverflowScrolling:"touch"},n?{}:{paddingBottom:i,paddingTop:i})},Wb=function(t){var n=t.children,r=t.innerProps,i=t.innerRef,o=t.isMulti;return Fe("div",Ve({},jt(t,"menuList",{"menu-list":!0,"menu-list--is-multi":o}),{ref:i},r),n)},Bd=function(t,n){var r=t.theme,i=r.spacing.baseUnit,o=r.colors;return Le({textAlign:"center"},n?{}:{color:o.neutral40,padding:"".concat(i*2,"px ").concat(i*3,"px")})},Ub=Bd,Gb=Bd,Yb=function(t){var n=t.children,r=n===void 0?"No options":n,i=t.innerProps,o=rr(t,Fb);return Fe("div",Ve({},jt(Le(Le({},o),{},{children:r,innerProps:i}),"noOptionsMessage",{"menu-notice":!0,"menu-notice--no-options":!0}),i),r)},Xb=function(t){var n=t.children,r=n===void 0?"Loading...":n,i=t.innerProps,o=rr(t,_b);return Fe("div",Ve({},jt(Le(Le({},o),{},{children:r,innerProps:i}),"loadingMessage",{"menu-notice":!0,"menu-notice--loading":!0}),i),r)},jb=function(t){var n=t.rect,r=t.offset,i=t.position;return{left:n.left,position:i,top:r,width:n.width,zIndex:1}},qb=function(t){var n=t.appendTo,r=t.children,i=t.controlElement,o=t.innerProps,s=t.menuPlacement,a=t.menuPosition,l=f.useRef(null),u=f.useRef(null),c=f.useState($d(s)),d=ur(c,2),g=d[0],h=d[1],p=f.useMemo(function(){return{setPortalPlacement:h}},[]),m=f.useState(null),y=ur(m,2),v=y[0],b=y[1],x=f.useCallback(function(){if(i){var P=Ib(i),I=a==="fixed"?0:window.pageYOffset,C=P[g]+I;(C!==v?.offset||P.left!==v?.rect.left||P.width!==v?.rect.width)&&b({offset:C,rect:P})}},[i,a,g,v?.offset,v?.rect.left,v?.rect.width]);Dl(function(){x()},[x]);var T=f.useCallback(function(){typeof u.current=="function"&&(u.current(),u.current=null),i&&l.current&&(u.current=yb(i,l.current,x,{elementResize:"ResizeObserver"in window}))},[i,x]);Dl(function(){T()},[T]);var k=f.useCallback(function(P){l.current=P,T()},[T]);if(!n&&a!=="fixed"||!v)return null;var R=Fe("div",Ve({ref:k},jt(Le(Le({},t),{},{offset:v.offset,position:a,rect:v.rect}),"menuPortal",{"menu-portal":!0}),o),r);return Fe(Nd.Provider,{value:p},n?vc.createPortal(R,n):R)},Kb=function(t){var n=t.isDisabled,r=t.isRtl;return{label:"container",direction:r?"rtl":void 0,pointerEvents:n?"none":void 0,position:"relative"}},Zb=function(t){var n=t.children,r=t.innerProps,i=t.isDisabled,o=t.isRtl;return Fe("div",Ve({},jt(t,"container",{"--is-disabled":i,"--is-rtl":o}),r),n)},Jb=function(t,n){var r=t.theme.spacing,i=t.isMulti,o=t.hasValue,s=t.selectProps.controlShouldRenderValue;return Le({alignItems:"center",display:i&&o&&s?"flex":"grid",flex:1,flexWrap:"wrap",WebkitOverflowScrolling:"touch",position:"relative",overflow:"hidden"},n?{}:{padding:"".concat(r.baseUnit/2,"px ").concat(r.baseUnit*2,"px")})},Qb=function(t){var n=t.children,r=t.innerProps,i=t.isMulti,o=t.hasValue;return Fe("div",Ve({},jt(t,"valueContainer",{"value-container":!0,"value-container--is-multi":i,"value-container--has-value":o}),r),n)},e1=function(){return{alignItems:"center",alignSelf:"stretch",display:"flex",flexShrink:0}},t1=function(t){var n=t.children,r=t.innerProps;return Fe("div",Ve({},jt(t,"indicatorsContainer",{indicators:!0}),r),n)},Au,n1=["size"],r1=["innerProps","isRtl","size"],i1={name:"8mmkcg",styles:"display:inline-block;fill:currentColor;line-height:1;stroke:currentColor;stroke-width:0"},Wd=function(t){var n=t.size,r=rr(t,n1);return Fe("svg",Ve({height:n,width:n,viewBox:"0 0 20 20","aria-hidden":"true",focusable:"false",css:i1},r))},ts=function(t){return Fe(Wd,Ve({size:20},t),Fe("path",{d:"M14.348 14.849c-0.469 0.469-1.229 0.469-1.697 0l-2.651-3.030-2.651 3.029c-0.469 0.469-1.229 0.469-1.697 0-0.469-0.469-0.469-1.229 0-1.697l2.758-3.15-2.759-3.152c-0.469-0.469-0.469-1.228 0-1.697s1.228-0.469 1.697 0l2.652 3.031 2.651-3.031c0.469-0.469 1.228-0.469 1.697 0s0.469 1.229 0 1.697l-2.758 3.152 2.758 3.15c0.469 0.469 0.469 1.229 0 1.698z"}))},Ud=function(t){return Fe(Wd,Ve({size:20},t),Fe("path",{d:"M4.516 7.548c0.436-0.446 1.043-0.481 1.576 0l3.908 3.747 3.908-3.747c0.533-0.481 1.141-0.446 1.574 0 0.436 0.445 0.408 1.197 0 1.615-0.406 0.418-4.695 4.502-4.695 4.502-0.217 0.223-0.502 0.335-0.787 0.335s-0.57-0.112-0.789-0.335c0 0-4.287-4.084-4.695-4.502s-0.436-1.17 0-1.615z"}))},Gd=function(t,n){var r=t.isFocused,i=t.theme,o=i.spacing.baseUnit,s=i.colors;return Le({label:"indicatorContainer",display:"flex",transition:"color 150ms"},n?{}:{color:r?s.neutral60:s.neutral20,padding:o*2,":hover":{color:r?s.neutral80:s.neutral40}})},o1=Gd,a1=function(t){var n=t.children,r=t.innerProps;return Fe("div",Ve({},jt(t,"dropdownIndicator",{indicator:!0,"dropdown-indicator":!0}),r),n||Fe(Ud,null))},l1=Gd,s1=function(t){var n=t.children,r=t.innerProps;return Fe("div",Ve({},jt(t,"clearIndicator",{indicator:!0,"clear-indicator":!0}),r),n||Fe(ts,null))},u1=function(t,n){var r=t.isDisabled,i=t.theme,o=i.spacing.baseUnit,s=i.colors;return Le({label:"indicatorSeparator",alignSelf:"stretch",width:1},n?{}:{backgroundColor:r?s.neutral10:s.neutral20,marginBottom:o*2,marginTop:o*2})},c1=function(t){var n=t.innerProps;return Fe("span",Ve({},n,jt(t,"indicatorSeparator",{"indicator-separator":!0})))},d1=kh(Au||(Au=lb([`
178
178
  0%, 80%, 100% { opacity: 0; }
@@ -184,5 +184,5 @@ Error: ${T}`)}y=_s(x,n,e)}return{...d,copyData:y,isMissingValue:Ee(m),data:{...d
184
184
  Error: ${l}`}let r=!1,i=t.display_text,o;if(!Ee(i)){if(i.startsWith(":material/")&&Dh(i))i=Oh(i).icon,r=!0;else if(i.includes("(")&&i.includes(")"))try{o=new RegExp(i,"us")}catch{o=void 0}}const s={kind:Z.Uri,readonly:!e.isEditable,allowOverlay:!r,contentAlign:e.contentAlignment??(r?"center":void 0),style:"normal",hoverEffect:!0,data:"",displayData:"",copyData:"",...r&&{themeOverride:{fontFamily:Ph.iconFont,linkColor:void 0}}},a=l=>{if(Ee(l))return!e.isRequired;const u=ot(l);return!(t.max_chars&&u.length>t.max_chars||n instanceof RegExp&&n.test(u)===!1)};return{...e,kind:"link",typeIcon:":material/link:",sortMode:"default",validateInput:a,getCell(l,u){if(Ee(l))return{...s,data:null,isMissingValue:!0,onClickUri:()=>{},themeOverride:void 0};const c=l;if(typeof n=="string")return Et(ot(c),n);if(u&&a(c)===!1)return Et(ot(c),"Invalid input.");let d="";return c&&(o!==void 0?d=tb(o,c):d=i||c),{...s,data:c,displayData:d,isMissingValue:Ee(c),onClickUri:g=>{window.open(c.startsWith("www.")?`https://${c}`:c,"_blank","noopener,noreferrer"),g.preventDefault()},copyData:c}},getCellValue(l){return Ee(l.data)?null:l.data}}}mf.isEditableType=!0;function ds(e){const t={kind:Z.Custom,readonly:!e.isEditable,allowOverlay:!0,contentAlign:e.contentAlignment,style:"normal",copyData:"",data:{kind:"multi-select-cell",values:[],options:void 0,allowCreation:!0,allowDuplicates:!0}};return{...e,kind:"list",sortMode:"default",typeIcon:":material/list:",getCell(n){if(Ee(n))return{...t,data:{...t.data,values:null},isMissingValue:!0,copyData:""};const r=Zl(n);return{...t,data:{...t.data,values:r},copyData:Ed(r),...e.isEditable&&!Rd(n)&&{readonly:!0,isError:!0,errorDetails:"Editing of arrays with non-string values is not supported. Please disable editing or convert all values to strings."}}},getCellValue(n){return Ee(n.data?.values)?null:n.data.values}}}ds.isEditableType=!0;const qw=(e,t)=>{if(Ee(e))return[];const n=t.colors.chartCategoricalColors,r=vo(t);let i=0;return e.filter(o=>o!==null&&o!=="").map(o=>{if(typeof o=="string")return{value:ot(o).trim(),label:void 0,color:void 0};let s;o.color==="auto"?(s=bi(n[i%n.length],r?.7:.6),i+=1):o.color&&(s=Lh(o.color,t));const a=s?Fh(s,t.colors.bgColor):void 0;return{value:ot(o.value).trim(),label:o.label??void 0,color:a}})};function vf(e,t){const n=Ti({options:[],accept_new_options:!1},e.columnTypeOptions),r=qw(n.options,t),i=new Set(r.map(s=>s.value)),o={kind:Z.Custom,readonly:!e.isEditable,allowOverlay:!0,contentAlign:e.contentAlignment,style:e.isIndex?"faded":"normal",data:{kind:"multi-select-cell",values:[],options:r,allowCreation:n.accept_new_options??!1,allowDuplicates:!1},copyData:""};return{...e,kind:"multiselect",sortMode:"default",typeIcon:":material/checklist:",getCell(s,a){if(Ee(s))return{...o,data:{...o.data,values:null},isMissingValue:!0,copyData:""};let l=Zl(s);return l=l.map(u=>ot(u).trim()),a&&l.length>0&&n.accept_new_options===!1&&(l=l.filter(u=>i.has(u)),l.length===0)?Et(ot(s),"The values could not be matched with the configured options."):{...o,data:{...o.data,values:l},copyData:Ed(l),...e.isEditable&&!Rd(s)&&{readonly:!0,isError:!0,errorDetails:"Editing of arrays with non-string values is not supported. Please disable editing or convert all values to strings."}}},getCellValue(s){return Ee(s.data?.values)?null:s.data.values}}}vf.isEditableType=!0;function fs(e){const t=Ti({step:yc(e.arrowType)?1:void 0,min_value:_h(e.arrowType)?0:void 0},e.columnTypeOptions),n=!t.format&&(Ah(e.arrowType)||Hh(e.arrowType)),r=Ee(t.min_value)||t.min_value<0,i=ct(t.step)&&!Number.isNaN(t.step)?Td(t.step):void 0,o={kind:Z.Number,data:void 0,displayData:"",readonly:!e.isEditable,allowOverlay:!0,contentAlign:e.contentAlignment||n?"left":"right",style:e.isPinned?"faded":"normal",allowNegative:r,fixedDecimals:i,thousandSeparator:""},s=a=>{let l=fo(a);if(Ee(l))return!e.isRequired;if(Number.isNaN(l))return!1;let u=!1;return ct(t.max_value)&&l>t.max_value&&(l=t.max_value,u=!0),ct(t.min_value)&&l<t.min_value?!1:u?l:!0};return{...e,kind:"number",sortMode:"smart",typeIcon:":material/tag:",validateInput:s,getCell(a,l){if(l===!0){const d=s(a);if(d===!1)return Et(ot(a),"Invalid input.");typeof d=="number"&&(a=d)}let u=fo(a),c="";if(ct(u)){if(Number.isNaN(u))return Et(ot(a),"The value cannot be interpreted as a number.");if(ct(i)&&(u=Qv(u,i)),Number.isInteger(u)&&!Number.isSafeInteger(u))return Et(ot(a),"The value is larger than the maximum supported integer values in number columns (2^53).");try{n?c=vl(u,e.arrowType):c=ra(u,t.format,i)}catch(d){return Et(ot(u),ct(t.format)?`Failed to format the number based on the provided format configuration: (${t.format}). Error: ${d}`:`Failed to format the number. Error: ${d}`)}}return{...o,data:u,displayData:c,isMissingValue:Ee(u),copyData:Ee(u)?"":ot(u)}},getCellValue(a){return a.data===void 0?null:a.data}}}fs.isEditableType=!0;function go(e){const t={kind:Z.Text,data:"",displayData:"",allowOverlay:!0,contentAlign:e.contentAlignment,allowWrapping:e.isWrappingAllowed,readonly:!0,style:e.isPinned?"faded":"normal"};return{...e,kind:"object",sortMode:"default",typeIcon:":material/data_object:",isEditable:!1,getCell(n){try{const r=ct(n)?ot(n):null,i=ct(r)?ho(r):"";return{...t,data:r,displayData:i,isMissingValue:Ee(n)}}catch(r){return Et(ot(n),`The value cannot be interpreted as a string. Error: ${r}`)}},getCellValue(n){return n.data===void 0?null:n.data}}}go.isEditableType=!1;function bf(e,t){const n=yc(e.arrowType),r=Ti({min_value:0,max_value:n?100:1,format:n?"%3d%%":"percent",step:n?1:void 0,color:void 0},e.columnTypeOptions),i=Ee(r.step)||Number.isNaN(r.step)?void 0:Td(r.step);let o;try{o=ra(r.max_value,r.format,i)}catch{o=ot(r.max_value)}const s={kind:Z.Custom,allowOverlay:!1,copyData:"",contentAlign:e.contentAlignment,readonly:!0,data:{kind:"range-cell",min:r.min_value,max:r.max_value,step:r.step??.01,value:r.min_value,label:String(r.min_value),measureLabel:o}};return{...e,kind:"progress",sortMode:"smart",typeIcon:":material/commit:",isEditable:!1,getCell(a){if(Ee(a))return Il();if(Ee(r.min_value)||Ee(r.max_value)||Number.isNaN(r.min_value)||Number.isNaN(r.max_value)||r.min_value>=r.max_value)return Et("Invalid min/max parameters",`The min_value (${r.min_value}) and max_value (${r.max_value}) parameters must be valid numbers.`);if(ct(r.step)&&Number.isNaN(r.step))return Et("Invalid step parameter",`The step parameter (${r.step}) must be a valid number.`);const l=fo(a);if(Number.isNaN(l)||Ee(l))return Et(ot(a),"The value cannot be interpreted as a number.");if(Number.isInteger(l)&&!Number.isSafeInteger(l))return Et(ot(a),"The value is larger than the maximum supported integer values in number columns (2^53).");let u="";try{u=ra(l,r.format,i)}catch(g){return Et(ot(l),ct(r.format)?`Failed to format the number based on the provided format configuration: (${r.format}). Error: ${g}`:`Failed to format the number. Error: ${g}`)}const c=Math.min(r.max_value,Math.max(r.min_value,l));let d;if(r.color==="auto"||r.color==="auto-inverse"){const g=r.max_value-r.min_value,p=(g===0?0:(c-r.min_value)/g)>.5;r.color==="auto"?d=p?t?.colors.greenColor:t?.colors.redColor:d=p?t?.colors.redColor:t?.colors.greenColor}else r.color&&(d=wc(r.color,t));return{...s,isMissingValue:Ee(a),copyData:String(l),data:{...s.data,value:c,label:u,measureLabel:u.length>o.length?u:o,color:d}}},getCellValue(a){return a.kind===Z.Loading||a.data?.value===void 0?null:a.data?.value}}}bf.isEditableType=!1;const Kw=e=>Ee(e)?[]:e.filter(t=>ct(t)&&t!=="").map(t=>{if(typeof t=="object"&&"value"in t){const r=ot(t.value).trim();return{value:r,label:t.label??r}}const n=ot(t).trim();return{value:n,label:n}});function hs(e){let t="string";const n=Ti({options:Cc(e.arrowType)?[!0,!1]:e.arrowType.categoricalOptions??[]},e.columnTypeOptions),r=l=>typeof l=="object"&&l!==null&&"value"in l,i=l=>r(l)?typeof l.value:typeof l,o=new Set(n.options.map(i));o.size===1&&(o.has("number")||o.has("bigint")?t="number":o.has("boolean")&&(t="boolean"));const s=Kw(n.options),a={kind:Z.Custom,allowOverlay:!0,copyData:"",contentAlign:e.contentAlignment,readonly:!e.isEditable,style:e.isPinned?"faded":"normal",data:{kind:"dropdown-cell",allowedValues:[...e.isRequired!==!0?[null]:[],...s],value:""}};return{...e,kind:"selectbox",sortMode:"default",typeIcon:":material/arrow_drop_down_circle:",getCell(l,u){let c=null;return ct(l)&&l!==""&&(c=ot(l)),u&&!a.data.allowedValues.some(g=>g===null?c===null:typeof g=="string"?g===c:typeof g=="object"&&"value"in g?g.value===c:!1)?Et(ot(c),"The value is not part of the allowed options."):{...a,isMissingValue:c===null,copyData:c||"",data:{...a.data,value:c}}},getCellValue(l){return Ee(l.data?.value)||l.data?.value===""?null:t==="number"?fo(l.data?.value)??null:t==="boolean"?Id(l.data?.value)??null:l.data?.value}}}hs.isEditableType=!0;function gs(e){const t=e.columnTypeOptions||{};let n;if(t.validate)try{n=new RegExp(t.validate,"us")}catch(o){n=`Invalid validate regex: ${t.validate}.
185
185
  Error: ${o}`}const r={kind:Z.Text,data:"",displayData:"",allowOverlay:!0,contentAlign:e.contentAlignment,allowWrapping:e.isWrappingAllowed,readonly:!e.isEditable,style:e.isPinned?"faded":"normal"},i=o=>{if(Ee(o))return!e.isRequired;let s=ot(o),a=!1;return t.max_chars&&s.length>t.max_chars&&(s=s.slice(0,t.max_chars),a=!0),n instanceof RegExp&&n.test(s)===!1?!1:a?s:!0};return{...e,kind:"text",sortMode:"default",typeIcon:":material/notes:",validateInput:i,getCell(o,s){if(typeof n=="string")return Et(ot(o),n);if(s){const a=i(o);if(a===!1)return Et(ot(o),"Invalid input.");typeof a=="string"&&(o=a)}try{const a=ct(o)?ot(o):null,l=ct(a)?ho(a):"";return{...r,isMissingValue:Ee(a),data:a,displayData:l}}catch(a){return Et("Incompatible value",`The value cannot be interpreted as string. Error: ${a}`)}},getCellValue(o){return o.data===void 0?null:o.data}}}gs.isEditableType=!0;const Ju=Fn("img",{target:"e16b5pc80"})({maxWidth:"100%",maxHeight:"37.5rem",objectFit:"scale-down"}),Zw=({urls:e})=>{const t=e&&e.length>0?e[0]:"";return t.startsWith("http")?Ie("a",{href:t,target:"_blank",rel:"noreferrer noopener",children:Ie(Ju,{src:t})}):Ie(Ju,{src:t})},Qu=new Map(Object.entries({object:go,text:gs,checkbox:as,selectbox:hs,list:ds,multiselect:vf,number:fs,link:mf,datetime:ss,date:cs,time:us,line_chart:df,bar_chart:ff,area_chart:hf,image:gf,progress:bf,json:pf})),Jw=[ob,Xw],po=({columnId:e,columnConfigMapping:t,updatedProps:n})=>{const r=new Map(t),i=r.get(e),o={...i||{},...n||{}};return(i?.type_config||n?.type_config)&&(o.type_config={...i?.type_config||{},...n?.type_config||{}}),r.set(e,o),r};function Qw(e){return{changeColumnFormat:f.useCallback((n,r)=>{e(i=>po({columnId:n,columnConfigMapping:i,updatedProps:{type_config:{format:r}}}))},[e])}}function hl(e,t,n){if(!n.includes(t))return;const r=new RegExp(`${e}[,\\s].*{(?:[^}]*[\\s;]{1})?${t}:\\s*([^;}]+)[;]?.*}`,"gm");n=n.replace(/{/g," {");const i=r.exec(n);if(i)return i[1].trim()}function ey(e,t,n){const r={};if(!n.includes(t))return e;const i=hl(t,"color",n);i&&(r.textDark=i,(e.kind===Z.Bubble||e.kind===Z.Custom&&e.data?.kind==="multi-select-cell")&&(r.textBubble=i),e.kind===Z.Uri&&(r.linkColor=i));const o=hl(t,"background-color",n);o&&(r.bgCell=o),o==="yellow"&&i===void 0&&(r.textDark="#31333F");const s=hl(t,"font-weight",n);return s&&(r.baseFontStyle=`${s} ${Zh.sm}`),r?{...e,themeOverride:r}:e}function ty(e){return Bh(e)||Wh(e)?gs:Uh(e)?ss:Sc(e)?us:Gh(e)?cs:Yh(e)||Xh(e)?go:Cc(e)?as:jh(e)?fs:qh(e)?hs:Kh(e)?ds:go}function wf(e){const t=e.length>0?e[e.length-1]:"",n=e.length>1?e.slice(0,-1).filter(r=>r!=="").join(" / "):void 0;return{title:t,group:n}}function ps(e){return{group:void 0,isEditable:!1,isIndex:!1,isPinned:!1,isHidden:!1,isStretched:!1,...e}}function ny(e,t){const n=e.columnNames.map(a=>a[t]),{title:r,group:i}=wf(n),o=e.columnTypes[t];let s=!0;return Nh(o)&&(s=!1),ps({id:`_index-${t}`,indexNumber:t,name:r,title:r,group:i,isEditable:s,arrowType:o,isIndex:!0,isPinned:!0})}function ry(e,t){const n=e.columnNames.map(s=>s[t]),{title:r,group:i}=wf(n),o=e.columnTypes[t];return ps({id:`_column-${r}-${t}`,indexNumber:t,name:r,isEditable:!0,title:r,arrowType:o,group:i})}function yf(){return ps({id:"_empty-index",indexNumber:0,title:"",name:"",isEditable:!1,isIndex:!0,isPinned:!0,arrowType:{type:Jh.INDEX,arrowField:new zh("",new Vh,!0),pandasType:void 0}})}function ec(e){const t=[],{dimensions:n}=e,r=n.numIndexColumns,i=n.numDataColumns;if(r===0&&i===0)return t.push(yf()),t;for(let o=0;o<r;o++)t.push(ny(e,o));for(let o=0;o<i;o++)t.push(ry(e,o+r));return t}function iy(e,t,n,r=void 0){let i;if(e.kind==="object"||e.kind==="json")i=e.getCell(ct(t.content)?ho(vl(t.content,t.contentType)):null);else if(["time","date","datetime"].includes(e.kind)&&ct(t.content)&&(typeof t.content=="number"||typeof t.content=="bigint")){let o;Sc(t.contentType)&&ct(t.field?.type?.unit)?o=mg(t.content,t.field):o=$r.utc(Number(t.content)).toDate(),i=e.getCell(o)}else if($h(t.contentType)){const o=Ee(t.content)?null:vl(t.content,t.contentType);i=e.getCell(o)}else i=e.getCell(t.content);if(Ri(i))return i;if(!e.isEditable){if(n&&ct(n?.displayContent)){const o=ho(n.displayContent);i.kind===Z.Text?i={...i,displayData:o}:i.kind===Z.Number&&Ee(e.columnTypeOptions?.format)?i={...i,displayData:o}:i.kind===Z.Uri&&Ee(e.columnTypeOptions?.display_text)?i={...i,displayData:o}:i.kind===Z.Custom&&i.data?.kind==="date-picker-cell"&&Ee(e.columnTypeOptions?.format)&&(i={...i,data:{...i.data,displayDate:o}})}r&&n?.cssId&&(i=ey(i,n.cssId,r))}return i}function Cf(e){return e?.useStretch??!1}function Sf(e){if(e?.pixelWidth)return e.pixelWidth}function oy(e){return e?.useContent??!1}function ay(e,t){return t?!1:e?.useStretch??!1}function ly(e){return e?.useContent??!1}function sy(e){if(e?.pixelHeight)return e.pixelHeight}function gl({numRows:e,rowHeight:t,theme:n,numHeaderRows:r=1}){return e*t+r*n.defaultHeaderHeight+2*n.tableBorderWidth}const na="_index",tc="_pos:",nc={small:75,medium:200,large:400},xf=Fl.getLogger("useColumnLoader");function uy(e){if(!Ee(e)){if(typeof e=="number")return e;if(e in nc)return nc[e]}}const qo=(e,t)=>Qh(e,t,(r,i)=>{if(gc(i))return i});function rc(e,t){if(!t)return e;let n={};return e.isIndex&&t.has(na)&&(n=qo(n,t.get(na)??{})),t.has(`${tc}${e.indexNumber}`)&&(n=qo(n,t.get(`${tc}${e.indexNumber}`)??{})),t.has(e.name)&&e.name!==na&&(n=qo(n,t.get(e.name)??{})),t.has(e.id)&&(n=qo(n,t.get(e.id)??{})),Vg(n)?e:mc({...e},{title:n.label,width:uy(n.width),isEditable:ct(n.disabled)?!n.disabled:void 0,isHidden:n.hidden,isPinned:n.pinned,isRequired:n.required,columnTypeOptions:n.type_config,contentAlignment:n.alignment,defaultValue:n.default,help:n.help})}function cy(e){if(!e)return new Map;try{return new Map(Object.entries(JSON.parse(e)))}catch(t){return xf.error(t),new Map}}function ic(e){const t=e.columnTypeOptions?.type;let n;return ct(t)&&(Qu.has(t)?n=Qu.get(t):xf.warn(`Unknown column type configured in column configuration: ${t}`)),Ee(n)&&(n=ty(e.arrowType)),n}function dy(e,t,n,r,i){const o=Ur(),s=f.useMemo(()=>cy(e.columns),[e.columns]),[a,l]=f.useState(s);f.useEffect(()=>{l(s)},[s]);const u=f.useMemo(()=>Cf(i),[i]),c=f.useMemo(()=>Sf(i),[i]),d=u||ct(c)&&c>0,g=ct(e.rowHeight)&&e.rowHeight>en("4rem"),h=f.useMemo(()=>ec(t).map(m=>{let y={...m,...rc(m,a),isStretched:d};const v=ic(y);return(e.editingMode===Xt.EditingMode.READ_ONLY||n||v.isEditableType===!1)&&(y={...y,isEditable:!1}),e.editingMode!==Xt.EditingMode.READ_ONLY&&y.isEditable==!0&&(y={...y,icon:"editable"},y.isRequired&&e.editingMode===Xt.EditingMode.DYNAMIC&&(y={...y,isHidden:!1})),v(y,o)}),[t,a,d,e.editingMode,n,o]);return{columns:f.useMemo(()=>{const m=ec(t).map(x=>{let T={...x,...rc(x,a),isStretched:d,isWrappingAllowed:g};const k=ic(T);return(e.editingMode===Xt.EditingMode.READ_ONLY||n||k.isEditableType===!1)&&(T={...T,isEditable:!1}),e.editingMode!==Xt.EditingMode.READ_ONLY&&T.isEditable==!0&&(T={...T,icon:"editable"},T.isRequired&&e.editingMode===Xt.EditingMode.DYNAMIC&&(T={...T,isHidden:!1})),k(T,o)}).filter(x=>!x.isHidden),y=[],v=[];r?.length?(m.forEach(x=>{x.isIndex&&!r.includes(x.name)&&!r.includes(x.id)&&x.isPinned!==!1&&y.push(x)}),r.forEach(x=>{const T=m.find(k=>k.name===x||k.id===x);T&&(T.isPinned?y.push(T):v.push(T))})):m.forEach(x=>{x.isPinned?y.push(x):v.push(x)});const b=[...y,...v];return b.length>0?b:[go(yf())]},[t,a,g,d,n,e.editingMode,r,o]),allColumns:h,setColumnConfigMapping:l}}function fy(e,t,n,r,i,o){const s=f.useMemo(()=>e.filter(c=>c.isPinned).reduce((c,d)=>c+(d.width??r*2),0)>n*.6,[e,n,r]),a=t||s?0:e.filter(c=>c.isPinned).length,l=f.useCallback(c=>{o(d=>po({columnId:c,columnConfigMapping:d,updatedProps:{pinned:!1}})),i(!0,!1)},[i,o]);return{pinColumn:f.useCallback(c=>{o(d=>po({columnId:c,columnConfigMapping:d,updatedProps:{pinned:!0}})),i(!0,!1)},[i,o]),unpinColumn:l,freezeColumns:a}}function hy(e,t,n,r,i){return{onColumnMoved:f.useCallback((s,a)=>{const l=[...e],[u]=l.splice(s,1);l.splice(a,0,u),a<t&&!u.isPinned?n(u.id):a>=t&&u.isPinned&&r(u.id),i(l.map(c=>c.id))},[e,t,n,r,i])}}function gy(e){const[t,n]=f.useState(()=>new Map),r=f.useCallback((o,s,a,l)=>{o.id&&n(new Map(t).set(o.id,l))},[t]);return{columns:f.useMemo(()=>e.map(o=>o.id&&t.has(o.id)&&t.get(o.id)!==void 0?{...o,width:t.get(o.id),grow:0}:o),[e,t]),onColumnResize:r}}function py(e){switch(e.kind){case Z.Number:return e.data?.toString()??"";case Z.Boolean:return e.data?.toString()??"";case Z.Markdown:case Z.RowID:case Z.Text:case Z.Uri:return e.data??"";case Z.Bubble:case Z.Image:return e.data.join("");case Z.Drilldown:return e.data.map(t=>t.text).join("");case Z.Protected:case Z.Loading:return"";case Z.Custom:return e.copyData}}function oc(e){if(typeof e=="number")return e;if(e.length>0){const t=Number(e);isNaN(t)||(e=t)}return e}function my(e,t){return e=oc(e),t=oc(t),typeof e=="string"&&typeof t=="string"?e.localeCompare(t):typeof e=="number"&&typeof t=="number"?e===t?0:e>t?1:-1:e==t?0:e>t?1:-1}function vy(e,t){return e>t?1:e===t?0:-1}function by(e){const{sort:t,rows:n,getCellContent:r}=e,i=f.useMemo(()=>t===void 0?[]:Array.isArray(t)?t:[t],[t]),o=f.useMemo(()=>i.map(u=>{const c=e.columns.findIndex(d=>u.column===d||d.id!==void 0&&u.column.id===d.id);return c===-1?void 0:c}),[i,e.columns]),s=f.useMemo(()=>{const u=i.map((d,g)=>({sort:d,col:o[g]})).filter(d=>d.col!==void 0);if(u.length===0)return;const c=u.map(()=>new Array(n));for(let d=0;d<u.length;d++){const{col:g}=u[d],h=[g,0];for(let p=0;p<n;p++)h[1]=p,c[d][p]=py(r(h))}return kr(n).sort((d,g)=>{for(let h=0;h<u.length;h++){const{sort:p}=u[h],m=c[h][d],y=c[h][g];let v;if(p.mode==="raw"?v=vy(m,y):p.mode==="smart"?v=my(m,y):v=m.localeCompare(y),v!==0)return(p.direction??"asc")==="desc"&&(v=-v),v}return 0})},[r,n,i,o]),a=f.useCallback(u=>s===void 0?u:s[u],[s]),l=f.useCallback(([u,c])=>s===void 0?r([u,c]):(c=s[c],r([u,c])),[r,s]);return s===void 0?{getCellContent:e.getCellContent,getOriginalIndex:a}:{getOriginalIndex:a,getCellContent:l}}function wy(e,t){return t===void 0?e:e.map(n=>n.id===t.column.id?{...n,title:t.direction==="asc"?`↑ ${n.title}`:`↓ ${n.title}`}:n)}function yy(e,t,n){const[r,i]=f.useState(),{getCellContent:o,getOriginalIndex:s}=by({columns:t.map(u=>El(u)),getCellContent:n,rows:e,sort:r}),a=f.useMemo(()=>wy(t,r),[t,r]),l=f.useCallback((u,c,d)=>{const g=a[u];let h;c==="auto"?(h="asc",r?.column.id===g.id&&(r.direction==="asc"?h="desc":h=void 0)):h=c,h===void 0||d&&h===r?.direction?i(void 0):i({column:El(g),direction:h,mode:g.sortMode})},[r,a]);return{columns:a,sortColumn:l,getOriginalIndex:s,getCellContent:o}}function Cy(e,t){const n=f.useCallback(i=>{t(o=>po({columnId:i,columnConfigMapping:o,updatedProps:{hidden:!0}})),e(!0,!1)},[e,t]),r=f.useCallback(i=>{t(o=>po({columnId:i,columnConfigMapping:o,updatedProps:{hidden:!1}})),e(!0,!1)},[e,t]);return{hideColumn:n,showColumn:r}}function Sy(){return{provideEditor:f.useCallback(t=>{if(t.kind===Z.Text&&t.readonly&&Jv(t.data))return{editor:ib}},[])}}const xy={kind:Z.Custom,isMatch:e=>e.data.kind==="sparkline-cell",needsHover:!0,needsHoverPosition:!0,draw:(e,t)=>{const{ctx:n,theme:r,rect:i,hoverAmount:o,hoverX:s}=e;let{values:a,yAxis:l,color:u,graphKind:c="area",displayValues:d,hideAxis:g}=t.data;const[h,p]=l;if(a.length===0)return!0;a=a.map(R=>Math.min(1,Math.max(0,(R-h)/(p-h))));const m=r.cellHorizontalPadding,y=m+i.x,v=i.y+3,b=i.height-6,x=i.width-m*2,T=p-h,k=p<=0?v:h>=0?v+b:v+b*(p/T);if(!g&&h<=0&&p>=0&&(n.beginPath(),n.moveTo(y,k),n.lineTo(y+x,k),n.globalAlpha=.4,n.lineWidth=1,n.strokeStyle=r.textLight,n.stroke(),n.globalAlpha=1),c==="bar"){n.beginPath();const R=2,P=(a.length-1)*R,I=(x-P)/a.length;let C=y;for(const F of a){const D=v+b-F*b;n.moveTo(C,k),n.lineTo(C+I,k),n.lineTo(C+I,D),n.lineTo(C,D),C+=I+R}n.fillStyle=t.data.color??r.accentColor,n.fill()}else{a.length===1&&(a=[a[0],a[0]],d&&(d=[d[0],d[0]])),n.beginPath();const R=(i.width-16)/(a.length-1),P=a.map((C,F)=>({x:y+R*F,y:v+b-C*b}));n.moveTo(P[0].x,P[0].y);let I=0;if(P.length>2)for(I=1;I<P.length-2;I++){const C=(P[I].x+P[I+1].x)/2,F=(P[I].y+P[I+1].y)/2;n.quadraticCurveTo(P[I].x,P[I].y,C,F)}if(n.quadraticCurveTo(P[I].x,P[I].y,P[I+1].x,P[I+1].y),n.strokeStyle=u??r.accentColor,n.lineWidth=1+o*.5,n.stroke(),n.lineTo(i.x+i.width-m,k),n.lineTo(i.x+m,k),n.closePath(),c==="area"){n.globalAlpha=.2+.2*o;const C=n.createLinearGradient(0,v,0,v+b*1.4);C.addColorStop(0,u??r.accentColor);const[F,D,S]=so(u??r.accentColor);C.addColorStop(1,`rgba(${F}, ${D}, ${S}, 0)`),n.fillStyle=C,n.fill(),n.globalAlpha=1}if(s!==void 0&&(c==="line"||c==="area")&&d!==void 0){n.beginPath();const C=Math.min(a.length-1,Math.max(0,Math.round((s-m)/R)));n.moveTo(y+C*R,i.y+1),n.lineTo(y+C*R,i.y+i.height),n.lineWidth=1,n.strokeStyle=r.textLight,n.stroke(),n.save(),n.font=`8px ${r.fontFamily}`,n.fillStyle=r.textMedium,n.textBaseline="top",n.fillText(d[C],y,i.y+r.cellVerticalPadding),n.restore()}}return!0},provideEditor:()=>{},onPaste:(e,t)=>t};function ac(e,t,n,r,i,o){if(!(r<=0||i<=0)){if(typeof o=="number"&&o<=0){e.rect(t,n,r,i);return}typeof o=="number"&&(o={tl:o,tr:o,br:o,bl:o}),o={tl:Math.min(o.tl,i/2,r/2),tr:Math.min(o.tr,i/2,r/2),bl:Math.min(o.bl,i/2,r/2),br:Math.min(o.br,i/2,r/2)},o.tl=Math.max(0,o.tl),o.tr=Math.max(0,o.tr),o.br=Math.max(0,o.br),o.bl=Math.max(0,o.bl),e.moveTo(t+o.tl,n),e.arcTo(t+r,n,t+r,n+o.tr,o.tr),e.arcTo(t+r,n+i,t+r-o.br,n+i,o.br),e.arcTo(t,n+i,t,n+i-o.bl,o.bl),e.arcTo(t,n,t+o.tl,n,o.tl)}}const ky=e=>{const{Menu:t}=ka,{children:n,...r}=e;return f.createElement(t,{...r},n)},My=dn("div")({name:"Wrap",class:"gdg-wghi2zc",propsAsIs:!1}),Ry=dn("div")({name:"PortalWrap",class:"gdg-p13nj8j0",propsAsIs:!1}),Iy=dn("div")({name:"ReadOnlyWrap",class:"gdg-r6sia3g",propsAsIs:!1}),Ey=e=>{const{value:t,onFinishedEditing:n,initialValue:r,portalElementRef:i}=e,{allowedValues:o,value:s}=t.data,[a,l]=f.useState(s),[u,c]=f.useState(r??""),d=ad(),g=f.useMemo(()=>o.map(h=>typeof h=="string"||h===null||h===void 0?{value:h,label:h?.toString()??""}:h),[o]);return t.readonly?f.createElement(Iy,null,f.createElement(Yr,{highlight:!0,autoFocus:!1,disabled:!0,value:a??"",onChange:()=>{}})):f.createElement(My,null,f.createElement(lf,{className:"glide-select",inputValue:u,onInputChange:c,menuPlacement:"auto",value:g.find(h=>h.value===a),styles:{control:h=>({...h,border:0,boxShadow:"none"}),option:(h,{isFocused:p})=>({...h,fontSize:d.editorFontSize,fontFamily:d.fontFamily,cursor:p?"pointer":void 0,paddingLeft:d.cellHorizontalPadding,paddingRight:d.cellHorizontalPadding,":active":{...h[":active"],color:d.accentFg},":empty::after":{content:'"&nbsp;"',visibility:"hidden"}})},theme:h=>({...h,colors:{...h.colors,neutral0:d.bgCell,neutral5:d.bgCell,neutral10:d.bgCell,neutral20:d.bgCellMedium,neutral30:d.bgCellMedium,neutral40:d.bgCellMedium,neutral50:d.textLight,neutral60:d.textMedium,neutral70:d.textMedium,neutral80:d.textDark,neutral90:d.textDark,neutral100:d.textDark,primary:d.accentColor,primary75:d.accentColor,primary50:d.accentColor,primary25:d.accentLight}}),menuPortalTarget:i?.current??document.getElementById("portal"),autoFocus:!0,openMenuOnFocus:!0,components:{DropdownIndicator:()=>null,IndicatorSeparator:()=>null,Menu:h=>f.createElement(Ry,null,f.createElement(ky,{className:"click-outside-ignore",...h}))},options:g,onChange:async h=>{h!==null&&(l(h.value),await new Promise(p=>window.requestAnimationFrame(p)),n({...t,data:{...t.data,value:h.value}}))}}))},Ty={kind:Z.Custom,isMatch:e=>e.data.kind==="dropdown-cell",draw:(e,t)=>{const{ctx:n,theme:r,rect:i}=e,{value:o}=t.data,s=t.data.allowedValues.find(l=>typeof l=="string"||l===null||l===void 0?l===o:l.value===o),a=typeof s=="string"?s:s?.label??"";return a&&(n.fillStyle=r.textDark,n.fillText(a,i.x+r.cellHorizontalPadding,i.y+i.height/2+qn(n,r))),!0},measure:(e,t,n)=>{const{value:r}=t.data;return(r?e.measureText(r).width:0)+n.cellHorizontalPadding*2},provideEditor:()=>({editor:Ey,disablePadding:!0,deletedValue:e=>({...e,copyData:"",data:{...e.data,value:""}})}),onPaste:(e,t)=>({...t,value:t.allowedValues.some(n=>n==null?!1:typeof n=="string"?n===e:n.value===e)?e:t.value})};function Dy(e,t){const n=/(\d+\.?\d*)\s*(px|rem|em|%|pt)/,r=e.match(n);if(r){const i=parseFloat(r[1]),o=r[2],s=i*t;return e.replace(n,`${Number(s.toPrecision(3))}${o}`)}return e}const Oy={marginRight:8},Py={display:"flex",alignItems:"center",flexGrow:1},Ly={kind:Z.Custom,isMatch:e=>e.data.kind==="range-cell",draw:(e,t)=>{const{ctx:n,theme:r,rect:i}=e,{min:o,max:s,value:a,label:l,measureLabel:u,color:c}=t.data,d=i.x+r.cellHorizontalPadding,g=i.y+i.height/2,h=s-o,p=(a-o)/h,m=`${Dy(r.baseFontStyle,.9)} ${r.fontFamily}`,v=Wl(n,m)/2;n.save();let b=0;l!==void 0&&(n.font=m,b=Ir(u??l,n,m).width+r.cellHorizontalPadding);const x=i.width-r.cellHorizontalPadding*2-b;if(x>=v){const T=n.createLinearGradient(d,g,d+x,g),k=c??r.accentColor;T.addColorStop(0,k),T.addColorStop(p,k),T.addColorStop(p,r.bgBubble),T.addColorStop(1,r.bgBubble),n.beginPath(),n.fillStyle=T,ac(n,d,g-v/2,x,v,v/2),n.fill(),n.beginPath(),ac(n,d+.5,g-v/2+.5,x-1,v-1,(v-1)/2),n.strokeStyle=r.accentLight,n.lineWidth=1,n.stroke()}return l!==void 0&&(n.textAlign="right",n.fillStyle=r.textDark,n.fillText(l,i.x+i.width-r.cellHorizontalPadding,g+qn(n,m))),n.restore(),!0},provideEditor:()=>e=>{const{data:t,readonly:n}=e.value,r=t.value.toString(),i=t.min.toString(),o=t.max.toString(),s=t.step.toString(),a=l=>{e.onChange({...e.value,data:{...t,value:Number(l.target.value)}})};return f.createElement("label",{style:Py},f.createElement("input",{style:Oy,type:"range",value:r,min:i,max:o,step:s,onChange:a,disabled:n}),r)},onPaste:(e,t)=>{let n=Number.parseFloat(e);return n=Number.isNaN(n)?t.value:Math.max(t.min,Math.min(t.max,n)),{...t,value:n}}},Fy=dn("input")({name:"StyledInputBox",class:"gdg-s1wtovjx",propsAsIs:!1}),pl=(e,t,n)=>{if(t==null)return"";n&&(t=new Date(t.getTime()+n));const r=t.toISOString();switch(e){case"date":return r.split("T")[0];case"datetime-local":return r.replace("Z","");case"time":return r.split("T")[1].replace("Z","");default:throw new Error(`Unknown date kind ${e}`)}},_y=e=>{const t=e.value.data,{format:n,displayDate:r}=t,i=t.step!==void 0&&!Number.isNaN(Number(t.step))?Number(t.step):void 0,o=t.timezoneOffset?t.timezoneOffset*60*1e3:0,s=t.min instanceof Date?pl(n,t.min,o):t.min,a=t.max instanceof Date?pl(n,t.max,o):t.max,l=pl(n,t.date,o);return e.value.readonly?zt.createElement(Yr,{highlight:!0,autoFocus:!1,disabled:!0,value:r??"",onChange:()=>{}}):zt.createElement(Fy,{"data-testid":"date-picker-cell",required:!0,type:n,defaultValue:l,min:s,max:a,step:i,autoFocus:!0,onChange:u=>{isNaN(u.target.valueAsNumber)?e.onChange({...e.value,data:{...e.value.data,date:void 0}}):e.onChange({...e.value,data:{...e.value.data,date:new Date(u.target.valueAsNumber-o)}})}})},Ay={kind:Z.Custom,isMatch:e=>e.data.kind==="date-picker-cell",draw:(e,t)=>{const{displayDate:n}=t.data;return Bl(e,n,t.contentAlign),!0},measure:(e,t,n)=>{const{displayDate:r}=t.data;return e.measureText(r).width+n.cellHorizontalPadding*2},provideEditor:()=>({editor:_y}),onPaste:(e,t)=>{let n=NaN;return e&&(n=Number(e).valueOf(),Number.isNaN(n)&&(n=Date.parse(e),t.format==="time"&&Number.isNaN(n)&&(n=Date.parse(`1970-01-01T${e}Z`)))),{...t,date:Number.isNaN(n)?void 0:new Date(n)}}},Hy="None";function lc(e,t,n){e.save(),e.beginPath(),e.moveTo(t.x+t.width-n.cellHorizontalPadding,t.y+1),e.lineTo(t.x+t.width,t.y+1),e.lineTo(t.x+t.width,t.y+1+n.cellHorizontalPadding),e.fillStyle=n.accentColor,e.fill(),e.restore()}const zy=(e,t)=>{const{cell:n,theme:r,ctx:i}=e;Bl({...e,theme:{...r,textDark:r.textLight,headerFontFull:`${r.headerFontStyle} ${r.fontFamily}`,baseFontFull:`${r.baseFontStyle} ${r.fontFamily}`,markerFontFull:`${r.markerFontStyle} ${r.fontFamily}`}},t,n.contentAlign),i.fillStyle=r.textDark};function Vy(e,t){const n=f.useCallback((i,o)=>{const{cell:s,theme:a,ctx:l,rect:u}=i,c=i.col;if(Ri(s))lc(l,u,a);else if(Kl(s)&&c<e.length){const d=e[c],g=t??Hy;["checkbox","line_chart","bar_chart","progress"].includes(d.kind)?o():zy(i,g),d.isRequired&&d.isEditable&&lc(l,u,a);return}o()},[e,t]),r=f.useMemo(()=>[xy,Ty,Ly,Ay,...Jw],[]);return{drawCell:n,customRenderers:r}}function $y(){const e=Ur();return f.useMemo(()=>{const n={editable:i=>`<svg xmlns="http://www.w3.org/2000/svg" height="40" viewBox="0 96 960 960" width="40" fill="${i.bgColor}"><path d="m800.641 679.743-64.384-64.384 29-29q7.156-6.948 17.642-6.948 10.485 0 17.742 6.948l29 29q6.948 7.464 6.948 17.95 0 10.486-6.948 17.434l-29 29Zm-310.64 246.256v-64.383l210.82-210.821 64.384 64.384-210.821 210.82h-64.383Zm-360-204.872v-50.254h289.743v50.254H130.001Zm0-162.564v-50.255h454.615v50.255H130.001Zm0-162.307v-50.255h454.615v50.255H130.001Z"/></svg>`};return{glideTheme:{accentColor:e.colors.primary,accentFg:e.colors.white,accentLight:bi(e.colors.primary,.9),borderColor:e.colors.dataframeBorderColor,horizontalBorderColor:e.colors.dataframeBorderColor,fontFamily:e.genericFonts.bodyFont,bgSearchResult:bi(e.colors.primary,.9),resizeIndicatorColor:e.colors.primary,bgIconHeader:e.colors.fadedText60,fgIconHeader:e.colors.white,bgHeader:e.colors.dataframeHeaderBackgroundColor,bgHeaderHasFocus:bi(e.colors.darkenedBgMix100,.9),bgHeaderHovered:bi(e.colors.darkenedBgMix100,.9),textHeader:e.colors.fadedText60,textHeaderSelected:e.colors.white,textGroupHeader:e.colors.fadedText60,headerIconSize:Math.round(en("1.125rem")),headerFontStyle:`${e.fontWeights.normal} ${en(e.fontSizes.sm)}px`,baseFontStyle:`${e.fontWeights.normal} ${en(e.fontSizes.sm)}px`,editorFontSize:e.fontSizes.sm,textDark:e.colors.bodyText,textMedium:bi(e.colors.bodyText,.2),textLight:e.colors.fadedText40,bgCell:e.colors.bgColor,bgCellMedium:e.colors.bgColor,cellHorizontalPadding:Math.round(en(e.spacing.sm)),cellVerticalPadding:Math.round(en("0.1875rem")),textBubble:e.colors.fadedText60,bgBubble:e.colors.secondaryBg,bgBubbleSelected:eg(e.colors.secondaryBg,.1),bubbleHeight:Math.round(en("1.25rem")),bubblePadding:Math.round(en(e.spacing.sm)),bubbleMargin:Math.round(en(e.spacing.twoXS)),linkColor:e.colors.link,drilldownBorder:e.colors.darkenedBgMix25,checkboxMaxSize:Math.round(en(e.sizes.checkbox))},tableBorderRadius:e.radii.default,tableBorderWidth:parseInt(e.sizes.borderWidth),defaultTableHeight:Math.round(en("25rem")),minColumnWidth:Math.round(en("3.125rem")),maxColumnWidth:Math.round(en("62.5rem")),maxColumnAutoWidth:Math.round(en("31.25rem")),defaultRowHeight:Math.round(en("2.1875rem")),defaultHeaderHeight:Math.round(en("2.1875rem")),bgRowHovered:tg(e.colors.bgColor,e.colors.secondaryBg,.3),headerIcons:n}},[e])}const Ny=Fl.getLogger("useDataEditor");function By({columns:e,canAddRows:t,canDeleteRows:n,editingState:r,getCellContent:i,getOriginalIndex:o,refreshCells:s,updateNumRows:a,syncEditState:l,clearSelection:u}){const c=f.useCallback(([y,v],b)=>{const x=e[y];if(!x.isEditable)return;const T=x.indexNumber,k=r.current.getOriginalRowIndex(o(v)),R=i([y,v]),P=x.getCellValue(R),I=x.getCellValue(b);if(!Ri(R)&&I===P)return;const C=x.getCell(I,!0);Ri(C)?Ny.warn(`Not applying the cell edit since it causes this error:
186
186
  ${C.data}`):(r.current.setCell(T,k,{...C,lastUpdated:performance.now()}),l())},[e,r,o,i,l]),d=f.useCallback(()=>{if(!t)return;const y=new Map;e.forEach(v=>{y.set(v.indexNumber,v.getCell(v.defaultValue))}),r.current.addRow(y),a()},[e,r,t,a]),g=f.useCallback(()=>{t&&(d(),l())},[d,l,t]),h=f.useCallback(y=>{if(y.rows.length>0){if(!n)return!0;const v=y.rows.toArray().map(b=>r.current.getOriginalRowIndex(o(b)));return r.current.deleteRows(v),a(),u(),l(),!1}if(y.current?.range){const v=[],b=y.current.range;for(let x=b.y;x<b.y+b.height;x++)for(let T=b.x;T<b.x+b.width;T++){const k=e[T];k.isEditable&&!k.isRequired&&(v.push({cell:[T,x]}),c([T,x],k.getCell(null)))}return v.length>0&&(l(),s(v)),!1}return!0},[e,r,n,s,o,l,c,u,a]),p=f.useCallback((y,v)=>{const[b,x]=y,T=[];for(let k=0;k<v.length;k++){const R=v[k];if(k+x>=r.current.getNumRows()){if(!t)break;d()}for(let P=0;P<R.length;P++){const I=R[P],C=k+x,F=P+b;if(F>=e.length)break;const D=e[F];if(D.isEditable){const S=D.getCell(I,!0);if(ct(S)&&!Ri(S)){const E=D.indexNumber,O=r.current.getOriginalRowIndex(o(C)),M=D.getCellValue(i([F,C]));D.getCellValue(S)!==M&&(r.current.setCell(E,O,{...S,lastUpdated:performance.now()}),T.push({cell:[F,C]}))}}}T.length>0&&(l(),s(T))}return!1},[e,r,t,o,i,d,l,s]),m=f.useCallback((y,v)=>{const b=y[0];if(b>=e.length)return!0;const x=e[b];if(x.validateInput){const T=x.validateInput(x.getCellValue(v));return T===!0||T===!1?T:x.getCell(T)}return!0},[e]);return{onCellEdited:c,onPaste:p,onRowAppended:g,onDelete:h,validateCell:m}}const kf=",",no='"',Wy='"',Mf=`
187
- `,Uy="\uFEFF",Gy=new RegExp(`[${[kf,no,Mf].join("")}]`),sc=Fl.getLogger("useDataExporter");function uc(e){return e.map(t=>Yy(t)).join(kf)+Mf}function Yy(e){if(Ee(e))return"";const t=ot(e);return Gy.test(t)?`${no}${t.replace(new RegExp(no,"g"),Wy+no)}${no}`:t}async function cc(e,t,n,r){const i=new TextEncoder;await e.write(i.encode(Uy));const o=n.map(s=>s.name);await e.write(i.encode(uc(o)));for(let s=0;s<r;s++){const a=[];n.forEach((l,u,c)=>{a.push(l.getCellValue(t([u,s])))}),await e.write(i.encode(uc(a)))}await e.close()}function Xy(e,t,n,r){return{exportToCsv:f.useCallback(async()=>{const s=`${new Date().toISOString().slice(0,16).replace(":","-")}_export.csv`;try{const u=await(await(await Ll(()=>import("./es6.CxCc4bfn.js").then(c=>c.a),__vite__mapDeps([22,1,2]),import.meta.url)).showSaveFilePicker({suggestedName:s,types:[{accept:{"text/csv":[".csv"]}}],excludeAcceptAllOption:!1})).createWritable();await cc(u,e,t,n)}catch(a){if(a instanceof Error&&a.name==="AbortError")return;try{sc.warn("Failed to export data as CSV with FileSystem API, trying fallback method",a);let l="";const u=new WritableStream({write:h=>{l+=new TextDecoder("utf-8").decode(h)},close:async()=>{}});await cc(u.getWriter(),e,t,n);const c=new Blob([l],{type:"text/csv;charset=utf-8;"}),d=URL.createObjectURL(c),g=Mg({enforceDownloadInNewTab:r,url:d,filename:s});g.style.display="none",document.body.appendChild(g),g.click(),document.body.removeChild(g),URL.revokeObjectURL(d)}catch(l){sc.error("Failed to export data as CSV",l)}}},[t,n,e,r])}}function jy(e,t,n,r){return{getCellContent:f.useCallback(([o,s])=>{if(o>t.length-1)return Et("Column index out of bounds","This error should never happen. Please report this bug.");if(s>n-1)return Et("Row index out of bounds","This error should never happen. Please report this bug.");try{const a=t[o],l=a.indexNumber,u=r.current.getOriginalRowIndex(s),c=r.current.isAddedRow(u);if(a.isEditable||c){const h=r.current.getCell(l,u);if(ct(h))return{...a.getCell(a.getCellValue(h),!1),lastUpdated:h.lastUpdated};if(c)return Et("Error during cell creation",`This error should never happen. Please report this bug. No cell found for an added row: col=${l}; row=${u}`)}const d=e.getCell(u,l),g=vg(e,u,l);return iy(a,d,g,e.styler?.cssStyles)}catch(a){return Et("Error during cell creation",`This error should never happen. Please report this bug.
188
- Error: ${a}`)}},[t,n,e,r])}}function qy(e){const[t,n]=f.useState(void 0),r=f.useCallback(o=>{if(o.kind!=="cell")n(void 0);else{const[,s]=o.location;n(s)}},[n]);return{getRowThemeOverride:f.useCallback(o=>{if(o===t)return{bgCell:e.bgRowHovered,bgCellMedium:e.bgRowHovered}},[e.bgRowHovered,t]),onItemHovered:r}}function Ky(e,t,n,r,i){const[o,s]=f.useState({columns:Qe.empty(),rows:Qe.empty(),current:void 0}),a=!t&&!n&&(e.selectionMode.includes(Xt.SelectionMode.MULTI_ROW)||e.selectionMode.includes(Xt.SelectionMode.SINGLE_ROW)),l=a&&e.selectionMode.includes(Xt.SelectionMode.MULTI_ROW),u=!t&&!n&&(e.selectionMode.includes(Xt.SelectionMode.SINGLE_COLUMN)||e.selectionMode.includes(Xt.SelectionMode.MULTI_COLUMN)),c=u&&e.selectionMode.includes(Xt.SelectionMode.MULTI_COLUMN),d=!t&&!n&&(e.selectionMode.includes(Xt.SelectionMode.SINGLE_CELL)||e.selectionMode.includes(Xt.SelectionMode.MULTI_CELL)),g=d&&e.selectionMode.includes(Xt.SelectionMode.MULTI_CELL),h=o.rows.length>0,p=o.columns.length>0,m=o.current!==void 0,y=f.useCallback(b=>{const x=!qa(b.rows.toArray(),o.rows.toArray()),T=!qa(b.columns.toArray(),o.columns.toArray()),k=!qa(b.current,o.current),R=a&&x||u&&T||d&&k;let P=b;if(T&&P.columns.length>=0){let I=P.columns;r.forEach((C,F)=>{C.isIndex&&(I=I.remove(F))}),I.length<P.columns.length&&(P={...P,columns:I})}s(P),R&&i(P,d)},[o,a,u,d,i,r]),v=f.useCallback((b=!1,x=!1)=>{const T={columns:x?o.columns:Qe.empty(),rows:b?o.rows:Qe.empty(),current:void 0};s(T),(!b&&a||!x&&u||d)&&i(T,d)},[o,a,u,d,i]);return{gridSelection:o,isRowSelectionActivated:a,isMultiRowSelectionActivated:l,isColumnSelectionActivated:u,isMultiColumnSelectionActivated:c,isCellSelectionActivated:d,isMultiCellSelectionActivated:g,isRowSelected:h,isColumnSelected:p,isCellSelected:m,clearSelection:v,processSelectionChange:y}}function Zy(e,t,n,r,i,o,s,a,l,u,c){const d=e.rowHeight??t.defaultRowHeight,g=r?2:1,h=e.editingMode===Xt.EditingMode.DYNAMIC||e.editingMode===Xt.EditingMode.ADD_ONLY?1:0,p=n+h,m=gl({numRows:p,rowHeight:d,theme:t,numHeaderRows:g}),y=sy(l),v=ay(l,c),b=ly(l),x=v?Math.max(1,Math.min(n,3)):1,T=gl({numRows:x,rowHeight:d,theme:t}),k=1e4;let R=Math.max(m,T),P=Math.min(R,t.defaultTableHeight);if(v&&u&&u>0)R=Math.max(u,R);else if(b){const W=Math.ceil(k/d),j=Math.min(p,W),oe=gl({numRows:j,rowHeight:d,theme:t,numHeaderRows:g})+1;P=Math.max(oe,T),R=Math.max(P,R)}else y&&(P=Math.max(y,T),R=Math.max(P,R));o&&(P=Math.min(P,o),R=Math.min(R,o),y||(P=R));const I=t.minColumnWidth+2*t.tableBorderWidth,C=Math.max(i,I);let F,D=C;const S=Cf(a),E=Sf(a),O=oy(a);S?F=C:E?(F=Math.min(Math.max(E,I),C),D=Math.min(Math.max(E,D),C)):O&&(F=void 0);const[M,V]=f.useState({width:F||"100%",height:v?"100%":P});return f.useLayoutEffect(()=>{S&&M.width==="100%"&&V(W=>({...W,width:C}))},[C]),f.useLayoutEffect(()=>{V(W=>({...W,width:F||"100%"}))},[F]),f.useLayoutEffect(()=>{V(W=>({...W,height:v?"100%":P}))},[P,n,u,v,c]),f.useLayoutEffect(()=>{if(s){const W=S||ct(E)&&E>0;V({width:W?D:"100%",height:R})}else V({width:F||"100%",height:P})},[s]),{minHeight:T,maxHeight:R,minWidth:I,maxWidth:D,rowHeight:d,resizableSize:M,setResizableSize:V}}const Jy=600,Qy="⚠️ Please fill out this cell.";function eC(e,t,n=[]){const[r,i]=f.useState(),o=f.useRef(null),s=f.useCallback(l=>{if(clearTimeout(o.current),o.current=0,i(void 0),(l.kind==="header"||l.kind==="cell")&&l.location){const u=l.location[0],c=l.location[1];let d;if(u<0||u>=e.length||n.includes(c))return;const g=e[u];if(l.kind==="header"&&ct(g))d=g.help;else if(l.kind==="cell"){const h=t([u,c]);Ri(h)?d=h.errorDetails:g.isRequired&&g.isEditable&&Kl(h)?d=Qy:Kv(h)&&(d=h.tooltip)}d&&(o.current=setTimeout(()=>{d&&i({content:d,left:l.bounds.x+l.bounds.width/2,top:l.bounds.y})},Jy))}},[e,t,i,o,n]),a=f.useCallback(()=>{i(void 0)},[i]);return{tooltip:r,clearTooltip:a,onItemHovered:s}}function Nr(e){return e.isIndex?na:Ee(e.name)?"":e.name}class Ko{constructor(t){this.editedCells=new Map,this.addedRows=[],this.deletedRows=[],this.numRows=0,this.numRows=t}toJson(t){const n=new Map;t.forEach(o=>{n.set(o.indexNumber,o)});const r={edited_rows:{},added_rows:[],deleted_rows:[]};return this.editedCells.forEach((o,s,a)=>{const l={};o.forEach((u,c)=>{const d=n.get(c);d&&(l[Nr(d)]=d.getCellValue(u))}),r.edited_rows[s]=l}),this.addedRows.forEach(o=>{const s={};let a=!1;o.forEach((l,u,c)=>{const d=n.get(u);if(d){const g=d.getCellValue(l);d.isRequired&&d.isEditable&&Kl(l)&&(a=!0),ct(g)&&(s[Nr(d)]=g)}}),a||r.added_rows.push(s)}),r.deleted_rows=this.deletedRows,JSON.stringify(r,(o,s)=>s===void 0?null:s)}fromJson(t,n){this.editedCells=new Map,this.addedRows=[],this.deletedRows=[];const r=JSON.parse(t),i=new Map;n.forEach(s=>{i.set(s.indexNumber,s)});const o=new Map;n.forEach(s=>{o.set(Nr(s),s)}),Object.keys(r.edited_rows).forEach(s=>{const a=Number(s),l=r.edited_rows[s];Object.keys(l).forEach(u=>{const c=l[u],d=o.get(u);if(d){const g=d.getCell(c);g&&(this.editedCells.has(a)||this.editedCells.set(a,new Map),this.editedCells.get(a)?.set(d.indexNumber,g))}})}),r.added_rows.forEach(s=>{const a=new Map;n.forEach(l=>{a.set(l.indexNumber,l.getCell(null))}),Object.keys(s).forEach(l=>{const u=s[l],c=o.get(l);if(c){const d=c.getCell(u);d&&a.set(c.indexNumber,d)}}),this.addedRows.push(a)}),this.deletedRows=r.deleted_rows}isAddedRow(t){return t>=this.numRows}getCell(t,n){if(this.isAddedRow(n))return this.addedRows[n-this.numRows].get(t);const r=this.editedCells.get(n);if(r!==void 0)return r.get(t)}setCell(t,n,r){if(this.isAddedRow(n)){if(n-this.numRows>=this.addedRows.length)return;this.addedRows[n-this.numRows].set(t,r)}else this.editedCells.get(n)===void 0&&this.editedCells.set(n,new Map),this.editedCells.get(n).set(t,r)}addRow(t){this.addedRows.push(t)}deleteRows(t){t.sort((n,r)=>r-n).forEach(n=>{this.deleteRow(n)})}deleteRow(t){if(!(Ee(t)||t<0)){if(this.isAddedRow(t)){this.addedRows.splice(t-this.numRows,1);return}this.deletedRows.includes(t)||(this.deletedRows.push(t),this.deletedRows=this.deletedRows.sort((n,r)=>n-r)),this.editedCells.delete(t)}}getOriginalRowIndex(t){let n=t;for(let r=0;r<this.deletedRows.length&&!(this.deletedRows[r]>n);r++)n+=1;return n}getNumRows(){return this.numRows+this.addedRows.length-this.deletedRows.length}}const Rf=150;function tC({element:e,widgetMgr:t,fragmentId:n,originalNumRows:r,originalColumns:i}){const{READ_ONLY:o}=Xt.EditingMode,s=f.useRef(new Ko(r)),[a,l]=f.useState(s.current.getNumRows());ng(()=>{s.current=new Ko(r),l(s.current.getNumRows())},[r]);const u=f.useCallback(()=>{s.current=new Ko(r),l(s.current.getNumRows())},[r]),c=f.useCallback(()=>{l(y=>{const v=s.current.getNumRows();return y!==v?v:y})},[]);f.useEffect(()=>{if(e.editingMode===o||!t)return;const y=t.getStringValue({id:e.id,formId:e.formId});y&&(s.current.fromJson(y,i),l(s.current.getNumRows()))},[]);const d=f.useCallback(()=>{if(!t)return;const y=s.current.toJson(i);let v=t.getStringValue({id:e.id,formId:e.formId});v===void 0&&(v=new Ko(0).toJson([])),y!==v&&t.setStringValue({id:e.id,formId:e.formId},y,{fromUi:!0},n)},[i,e.id,e.formId,t,n]),{debouncedCallback:g}=Md(d,Rf),h=f.useCallback((y,v)=>(b,x)=>{if(!t)return;const T={selection:{rows:[],columns:[],cells:[]}};if(T.selection.rows=b.rows.toArray().map(P=>v(P)),T.selection.columns=b.columns.toArray().map(P=>Nr(y[P])),x&&b.current){const{cell:P,range:I}=b.current;if(I)for(let C=I.y;C<I.y+I.height;C++)for(let F=I.x;F<I.x+I.width;F++)y[F].isIndex||T.selection.cells.push([v(C),Nr(y[F])]);else if(P){const[C,F]=P;y[C].isIndex||T.selection.cells.push([v(F),Nr(y[C])])}}const k=JSON.stringify(T),R=t.getStringValue({id:e.id,formId:e.formId});(R===void 0||R!==k)&&t.setStringValue({id:e.id,formId:e.formId},k,{fromUi:!0},n)},[e.id,e.formId,t,n]),p=f.useCallback(({columns:y,isRowSelectionActivated:v,isColumnSelectionActivated:b,isCellSelectionActivated:x,isMultiCellSelectionActivated:T})=>{if(!v&&!b&&!x||!t)return;const k=t.getStringValue({id:e.id,formId:e.formId});if(!k)return;const R=y.map(D=>Nr(D)),P=JSON.parse(k);let I=Qe.empty(),C=Qe.empty(),F;if(P.selection?.rows?.forEach(D=>{I=I.add(D)}),P.selection?.columns?.forEach(D=>{C=C.add(R.indexOf(D))}),x&&!T){const[D,S]=P.selection?.cells?.[0]??[];D!==void 0&&S!==void 0&&(F=[R.indexOf(S),D])}if(I.length>0||C.length>0||F!==void 0)return{rows:I,columns:C,current:F?{cell:F,range:{x:F[0],y:F[1],width:1,height:1},rangeStack:[]}:void 0}},[t,e.id,e.formId]),m=f.useCallback(()=>{u()},[u]);return{editingState:s,numRows:a,resetEditingState:u,updateNumRows:c,syncEditState:g,createSyncSelectionState:h,onFormCleared:m,loadInitialSelectionState:p}}const If=Fn("div",{target:"e1gsdy3y0"})(({theme:e})=>({paddingTop:e.spacing.xs,paddingBottom:e.spacing.xs})),xr=Fn("div",{target:"e1gsdy3y1"})(({theme:e,isActive:t,hasSubmenu:n})=>({display:"flex",alignItems:"center",justifyContent:"flex-start",gap:e.spacing.sm,paddingLeft:e.spacing.sm,paddingRight:e.spacing.sm,paddingTop:e.spacing.twoXS,paddingBottom:e.spacing.twoXS,cursor:"pointer",backgroundColor:t?e.colors.darkenedBgMix15:void 0,"&:hover":{backgroundColor:e.colors.darkenedBgMix15},minWidth:e.sizes.minMenuWidth,...n&&{justifyContent:"space-between","& > :first-of-type":{display:"flex",alignItems:"center",gap:e.spacing.sm}}})),Ef=Fn("div",{target:"e1gsdy3y2"})(({theme:e})=>({height:e.sizes.borderWidth,backgroundColor:e.colors.borderColor,marginTop:e.spacing.xs,marginBottom:e.spacing.xs})),nC=Fn("div",{target:"e1gsdy3y3"})(({theme:e})=>({display:"flex",alignItems:"center",padding:`${e.spacing.sm} ${e.spacing.sm}`,cursor:"default",gap:e.spacing.twoXS})),rC=Fn("div",{target:"e1gsdy3y4"})(({theme:e})=>({display:"flex",alignItems:"center",justifyContent:"center",padding:e.spacing.twoXS,border:`${e.sizes.borderWidth} solid ${e.colors.borderColor}`,borderRadius:e.radii.md,backgroundColor:"transparent",color:e.colors.bodyText,height:"fit-content"})),iC=Fn("div",{target:"e1gsdy3y5"})(({theme:e})=>({display:"flex",alignItems:"center",flexGrow:1,padding:`${e.spacing.threeXS} ${e.spacing.threeXS}`,border:`${e.sizes.borderWidth} solid ${e.colors.borderColor}`,borderRadius:e.radii.md,backgroundColor:e.colors.secondaryBg,minWidth:0,overflow:"hidden"})),oC=Fn("span",{target:"e1gsdy3y6"})(({theme:e})=>({whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",flexGrow:1,margin:`0 ${e.spacing.xs}`,fontSize:e.fontSizes.twoSm,maxWidth:"4rem"})),aC=Fn("button",{target:"e1gsdy3y7"})(({theme:e})=>({background:"none",border:"none",padding:e.spacing.twoXS,cursor:"pointer",color:e.colors.bodyText,display:"flex",alignItems:"center",justifyContent:"center",borderRadius:e.radii.md,transition:"background-color 0.2s ease","&:hover":{backgroundColor:e.colors.fadedText05},"&:active":{backgroundColor:e.colors.fadedText10}})),dc=[{format:"",label:"Automatic",icon:":material/123:"},{format:"localized",label:"Localized",icon:":material/translate:"},{format:"plain",label:"Plain",icon:":material/speed_1_75:"},{format:"compact",label:"Compact",icon:":material/1k:"},{format:"dollar",label:"Dollar",icon:":material/attach_money:"},{format:"euro",label:"Euro",icon:":material/euro:"},{format:"yen",label:"Yen",icon:":material/currency_yen:"},{format:"percent",label:"Percent",icon:":material/percent:"},{format:"scientific",label:"Scientific",icon:":material/experiment:"},{format:"accounting",label:"Accounting",icon:":material/finance_chip:"}],lC={number:dc,progress:dc,datetime:[{format:"",label:"Automatic",icon:":material/schedule:"},{format:"localized",label:"Localized",icon:":material/translate:"},{format:"distance",label:"Distance",icon:":material/search_activity:"},{format:"calendar",label:"Calendar",icon:":material/today:"}],date:[{format:"",label:"Automatic",icon:":material/schedule:"},{format:"localized",label:"Localized",icon:":material/translate:"},{format:"distance",label:"Distance",icon:":material/search_activity:"}],time:[{format:"",label:"Automatic",icon:":material/schedule:"},{format:"localized",label:"Localized",icon:":material/translate:"}]};function sC({columnKind:e,isOpen:t,onMouseEnter:n,onMouseLeave:r,onChangeFormat:i,onCloseMenu:o,children:s}){const a=Ur(),{colors:l,fontSizes:u,radii:c,fontWeights:d}=a,g=lC[e]||[];return g.length===0?Ie(xc,{}):Ie(ya,{triggerType:kc.hover,returnFocus:!0,autoFocus:!0,focusLock:!0,isOpen:t,onMouseEnter:n,onMouseLeave:r,ignoreBoundary:!0,content:Ie(If,{role:"menu",children:g.map(h=>pn(xr,{onClick:()=>{i(h.format),o()},role:"menuitem",children:[Ie(Gn,{size:"base",iconValue:h.icon}),h.label]},h.format))}),placement:wa.right,showArrow:!1,popoverMargin:2,overrides:{Body:{props:{"data-testid":"stDataFrameColumnFormattingMenu"},style:{borderTopLeftRadius:c.default,borderTopRightRadius:c.default,borderBottomLeftRadius:c.default,borderBottomRightRadius:c.default,paddingTop:"0 !important",paddingBottom:"0 !important",paddingLeft:"0 !important",paddingRight:"0 !important",backgroundColor:"transparent",border:`${a.sizes.borderWidth} solid ${a.colors.borderColor}`}},Inner:{style:{backgroundColor:vo(a)?l.bgColor:l.secondaryBg,color:l.bodyText,fontSize:u.sm,fontWeight:d.normal,paddingTop:"0 !important",paddingBottom:"0 !important",paddingLeft:"0 !important",paddingRight:"0 !important"}}},children:s})}const uC=f.memo(sC);function cC({top:e,left:t,isColumnPinned:n,onPinColumn:r,onUnpinColumn:i,onCloseMenu:o,onSortColumn:s,onHideColumn:a,column:l,onChangeFormat:u,onAutosize:c}){const d=Ur(),[g,h]=f.useState(!1),{colors:p,fontSizes:m,radii:y,fontWeights:v}=d,{isCopied:b,copyToClipboard:x}=rg();f.useEffect(()=>{function R(P){P.preventDefault()}return document.addEventListener("wheel",R,{passive:!1}),document.addEventListener("touchmove",R,{passive:!1}),()=>{document.removeEventListener("wheel",R),document.removeEventListener("touchmove",R)}},[]);const T=f.useCallback(()=>{o()},[o]),k=f.useCallback(()=>{x(l.title)},[l.title,x]);return Ie(ya,{autoFocus:!0,"aria-label":"Dataframe column menu",content:pn(If,{children:[pn(nC,{children:[Ie(rC,{title:l.kind,children:Ie(Gn,{size:"base",iconValue:l.typeIcon||":material/notes:"})}),pn(iC,{title:l.title,children:[Ie(oC,{children:l.title}),Ie(aC,{onClick:k,title:"Copy column name","aria-label":"Copy column name",children:Ie(Gn,{size:"sm",iconValue:b?":material/check:":":material/content_copy:"})})]})]}),s&&pn(xc,{children:[pn(xr,{onClick:()=>{s("asc"),T()},role:"menuitem",children:[Ie(Gn,{size:"base",iconValue:":material/arrow_upward:"}),"Sort ascending"]}),pn(xr,{onClick:()=>{s("desc"),T()},role:"menuitem",children:[Ie(Gn,{size:"base",iconValue:":material/arrow_downward:"}),"Sort descending"]}),Ie(Ef,{})]}),u&&Ie(uC,{columnKind:l.kind,isOpen:g,onMouseEnter:()=>h(!0),onMouseLeave:()=>h(!1),onChangeFormat:u,onCloseMenu:T,children:pn(xr,{onMouseEnter:()=>h(!0),onMouseLeave:()=>h(!1),isActive:g,hasSubmenu:!0,children:[pn("div",{children:[Ie(Gn,{size:"base",iconValue:":material/format_list_numbered:"}),"Format"]}),Ie(Gn,{size:"base",iconValue:":material/chevron_right:"})]})}),c&&pn(xr,{onClick:()=>{c(),T()},children:[Ie(Gn,{size:"base",iconValue:":material/arrows_outward:"}),"Autosize"]}),n&&pn(xr,{onClick:()=>{i(),T()},children:[Ie(Gn,{size:"base",iconValue:":material/keep_off:"}),"Unpin column"]}),!n&&pn(xr,{onClick:()=>{r(),T()},children:[Ie(Gn,{size:"base",iconValue:":material/keep:"}),"Pin column"]}),a&&pn(xr,{onClick:()=>{a(),T()},children:[Ie(Gn,{size:"base",iconValue:":material/visibility_off:"}),"Hide column"]})]}),placement:wa.bottomRight,accessibilityType:Mc.menu,showArrow:!1,popoverMargin:en("0.375rem"),onClickOutside:g?void 0:T,onEsc:T,overrides:{Body:{props:{"data-testid":"stDataFrameColumnMenu"},style:{paddingTop:"0 !important",paddingBottom:"0 !important",paddingLeft:"0 !important",paddingRight:"0 !important",backgroundColor:"transparent"}},Inner:{style:{border:`${d.sizes.borderWidth} solid ${d.colors.borderColor}`,backgroundColor:vo(d)?p.bgColor:p.secondaryBg,color:p.bodyText,fontSize:m.sm,fontWeight:v.normal,borderTopLeftRadius:y.default,borderTopRightRadius:y.default,borderBottomLeftRadius:y.default,borderBottomRightRadius:y.default,overflow:"auto",paddingTop:"0 !important",paddingBottom:"0 !important",paddingLeft:"0 !important",paddingRight:"0 !important"}}},isOpen:!0,children:Ie("div",{"data-testid":"stDataFrameColumnMenuTarget",style:{position:"fixed",top:e,left:t,visibility:"hidden",transform:"unset"}})})}const dC=f.memo(cC),fC="(index)";function ml(e,t){return!t.length||e.isIndex?!1:!t.includes(e.id)&&!t.includes(e.name)}const fc=({label:e,initialValue:t,isIndeterminate:n,onChange:r})=>{const i=Ur();return Ie(kg,{isIndeterminate:n,checked:t,onChange:o=>{r(o.target.checked)},"aria-label":e,checkmarkType:xg.default,labelPlacement:Sg.right,overrides:{Root:{style:({$isFocusVisible:o})=>({marginBottom:i.spacing.none,marginTop:i.spacing.none,paddingLeft:i.spacing.md,paddingRight:i.spacing.md,paddingTop:i.spacing.twoXS,paddingBottom:i.spacing.twoXS,backgroundColor:o?i.colors.darkenedBgMix25:"",display:"flex",alignItems:"start"})},Checkmark:{style:({$isFocusVisible:o,$checked:s,$isIndeterminate:a})=>{const l=s||a?i.colors.primary:i.colors.borderColor;return{outline:0,width:i.sizes.checkbox,height:i.sizes.checkbox,marginTop:i.spacing.twoXS,marginLeft:0,marginBottom:0,boxShadow:o&&(s||a)?i.shadows.focusRing:"",borderLeftWidth:i.sizes.borderWidth,borderRightWidth:i.sizes.borderWidth,borderTopWidth:i.sizes.borderWidth,borderBottomWidth:i.sizes.borderWidth,borderLeftColor:l,borderRightColor:l,borderTopColor:l,borderBottomColor:l}}},Label:{style:{lineHeight:i.lineHeights.small,paddingLeft:i.spacing.sm,position:"relative",color:i.colors.bodyText,fontSize:i.fontSizes.sm,fontWeight:i.fontWeights.normal}}},children:e})},hC=({columns:e,columnOrder:t,setColumnOrder:n,hideColumn:r,showColumn:i,children:o,isOpen:s,onClose:a})=>{const l=Ur(),u=h=>!(h.isHidden===!0||ml(h,t)),c=e.every(u),d=e.some(u)&&!c,g=h=>{e.forEach(p=>{const m=ml(p,t);h?(i(p.id),m&&n(y=>[...y,p.id])):r(p.id)})};return Ie(ya,{triggerType:kc.click,placement:wa.bottomRight,autoFocus:!0,focusLock:!0,content:()=>pn("div",{style:{paddingTop:l.spacing.sm,paddingBottom:l.spacing.sm,maxHeight:l.sizes.maxDropdownHeight,overflow:"auto"},children:[Ie(fc,{label:"Select all",isIndeterminate:d,initialValue:c,onChange:h=>{g(h)}}),Ie(Ef,{}),Ie("div",{children:e.map(h=>{const p=ml(h,t);return Ie(fc,{label:!h.title&&h.isIndex?fC:h.title,initialValue:!(h.isHidden===!0||p),onChange:m=>{m?(i(h.id),p&&n(y=>[...y,h.id])):r(h.id)}},h.id)})})]}),isOpen:s,onClickOutside:a,onClick:()=>s?a():void 0,onEsc:a,ignoreBoundary:!1,overrides:{Body:{props:{"data-testid":"stDataFrameColumnVisibilityMenu"},style:{borderTopLeftRadius:l.radii.default,borderTopRightRadius:l.radii.default,borderBottomLeftRadius:l.radii.default,borderBottomRightRadius:l.radii.default,paddingTop:"0 !important",paddingBottom:"0 !important",paddingLeft:"0 !important",paddingRight:"0 !important",backgroundColor:"transparent",border:`${l.sizes.borderWidth} solid ${l.colors.borderColor}`}},Inner:{style:{backgroundColor:vo(l)?l.colors.bgColor:l.colors.secondaryBg,color:l.colors.bodyText,fontSize:l.fontSizes.sm,fontWeight:l.fontWeights.normal,minWidth:l.sizes.minMenuWidth,maxWidth:`calc(${l.sizes.minMenuWidth} * 2)`,maxHeight:l.sizes.maxDropdownHeight,overflow:"auto",paddingTop:"0 !important",paddingBottom:"0 !important",paddingLeft:"0 !important",paddingRight:"0 !important"}}},children:Ie("div",{children:o})})},gC=f.memo(hC),hc=Fn("div",{target:"elmgoi00"})(({theme:e,disableResize:t,minHeight:n})=>({position:"relative",display:t?"flex":"inline-block",height:"100%","& .stDataFrameGlideDataEditor":{height:"100%",minWidth:"100%",minHeight:n,borderRadius:e.radii.default},"& .dvn-scroller":{overflowX:"auto !important",overflowY:"auto !important"},"& .gdg-search-bar":{maxWidth:"19rem",width:"80%",minWidth:"6rem",top:e.spacing.sm,right:e.spacing.sm,padding:e.spacing.sm,borderRadius:e.radii.default,"& .gdg-search-status":{paddingTop:e.spacing.twoXS,fontSize:e.fontSizes.twoSm},"& .gdg-search-progress":{display:"none"},"& input":{width:"100%"},"& button":{width:e.iconSizes.xl,height:e.iconSizes.xl,"& .button-icon":{width:e.iconSizes.base,height:e.iconSizes.base}}}}));function pC({top:e,left:t,content:n,clearTooltip:r}){const[i,o]=f.useState(!0),s=Ur(),{colors:a,fontSizes:l,radii:u,fontWeights:c}=s,d=f.useCallback(()=>{o(!1),r()},[r,o]);return Ie(ya,{content:Ie(ig,{"data-testid":"stDataFrameTooltipContent",children:Ie(og,{style:{fontSize:l.sm},source:n,allowHTML:!1})}),placement:wa.top,accessibilityType:Mc.tooltip,showArrow:!1,popoverMargin:5,onClickOutside:d,onEsc:d,overrides:{Body:{style:{borderTopLeftRadius:u.default,borderTopRightRadius:u.default,borderBottomLeftRadius:u.default,borderBottomRightRadius:u.default,paddingTop:"0 !important",paddingBottom:"0 !important",paddingLeft:"0 !important",paddingRight:"0 !important",backgroundColor:"transparent"}},Inner:{style:{backgroundColor:vo(s)?a.bgColor:a.secondaryBg,color:a.bodyText,fontSize:l.sm,fontWeight:c.normal,paddingTop:"0 !important",paddingBottom:"0 !important",paddingLeft:"0 !important",paddingRight:"0 !important"}}},isOpen:i,children:Ie("div",{"data-testid":"stDataFrameTooltipTarget",style:{position:"fixed",top:e,left:t}})})}const mC=f.memo(pC),vC=15e4,bC="0.5rem";function wC({element:e,data:t,disabled:n,widgetMgr:r,disableFullscreenMode:i,fragmentId:o,customToolbarActions:s,widthConfig:a,heightConfig:l}){const{expanded:u,expand:c,collapse:d,width:g,height:h}=Ps(fg),{isInHorizontalLayout:p,isInRoot:m}=Ps(ag),y=f.useRef(null),v=f.useRef(null),b=lg(),{height:x,elementRef:T}=sg(),k=$y(),{getRowThemeOverride:R,onItemHovered:P}=qy(k),{enforceDownloadInNewTab:I=!1}=f.useContext(ug),[C,F]=f.useState(!0),[D,S]=f.useState(!1),[E,O]=f.useState(!1),[M,V]=f.useState(!1),[W,j]=f.useState(),[oe,Q]=f.useState(!1),re=f.useCallback(()=>Q(He=>!He),[]),se=f.useCallback(()=>Q(!1),[]),ae=f.useMemo(()=>window.matchMedia&&window.matchMedia("(pointer: coarse)").matches,[]);Ee(e.editingMode)&&(e.editingMode=Xt.EditingMode.READ_ONLY);const{READ_ONLY:de,DYNAMIC:fe,ADD_ONLY:ue,DELETE_ONLY:H}=Xt.EditingMode,L=t.dimensions,X=Math.max(0,L.numDataRows),te=X===0&&!((e.editingMode===fe||e.editingMode===ue)&&L.numDataColumns>0),le=X>vC,Se=!le&&!te&&e.editingMode!==fe&&e.editingMode!==ue,pe=!te&&(e.editingMode===fe||e.editingMode===ue)&&!n,et=!te&&(e.editingMode===fe||e.editingMode===H)&&!n,[ke,Dt]=f.useState(e.columnOrder);f.useEffect(()=>{Dt(e.columnOrder)},[e.columnOrder.join(",")]);const{columns:dt,allColumns:Ue,setColumnConfigMapping:ne}=dy(e,t,n,ke,a),{editingState:ve,numRows:me,updateNumRows:he,syncEditState:Ce,createSyncSelectionState:_e,onFormCleared:Oe,loadInitialSelectionState:at}=tC({element:e,widgetMgr:r,fragmentId:o,originalNumRows:X,originalColumns:dt}),{getCellContent:Pe}=jy(t,dt,me,ve),{columns:we,sortColumn:Ae,getOriginalIndex:Re,getCellContent:Ne}=yy(X,dt,Pe),ft=f.useMemo(()=>_e(we,Re),[_e,we,Re]),{debouncedCallback:ht}=Md(ft,Rf),{gridSelection:Xe,isRowSelectionActivated:pt,isMultiRowSelectionActivated:Nt,isColumnSelectionActivated:St,isMultiColumnSelectionActivated:Tt,isCellSelectionActivated:Bt,isMultiCellSelectionActivated:qt,isRowSelected:an,isColumnSelected:It,isCellSelected:gt,clearSelection:Wt,processSelectionChange:wt}=Ky(e,te,n,we,ht);f.useEffect(()=>{Bt||Wt(!0,!0)},[u]);const ln=f.useCallback(He=>{v.current?.updateCells(He)},[]);f.useEffect(()=>{const He=at({columns:we,isRowSelectionActivated:pt,isColumnSelectionActivated:St,isCellSelectionActivated:Bt,isMultiCellSelectionActivated:qt});He&&wt(He)},[]);const{exportToCsv:Mn}=Xy(Ne,we,me,I),{onCellEdited:De,onPaste:mt,onRowAppended:xt,onDelete:vn,validateCell:tn}=By({columns:we,canAddRows:pe,canDeleteRows:et,editingState:ve,getCellContent:Ne,getOriginalIndex:Re,refreshCells:ln,updateNumRows:he,syncEditState:Ce,clearSelection:Wt}),nn=f.useMemo(()=>te?[0]:pe?[me]:[],[te,pe,me]),{tooltip:un,clearTooltip:$t,onItemHovered:Zt}=eC(we,Ne,nn),{drawCell:Ge,customRenderers:kt}=Vy(we,e.placeholder??void 0),{provideEditor:In}=Sy(),Ot=f.useCallback(He=>({...He,hasMenu:!te}),[te]),bt=f.useMemo(()=>we.map(He=>Ot(El(He))),[we,Ot]),{columns:bn,onColumnResize:ir}=gy(bt),Kn=t.dimensions.numHeaderRows>1,{minHeight:B,maxHeight:Be,minWidth:je,maxWidth:Pt,rowHeight:Kt,resizableSize:rn,setResizableSize:En}=Zy(e,k,me,Kn,g||0,h,u,a,l,x,m),wn=f.useCallback(([He,cn])=>({...Zv(!0,!1),displayData:"empty",contentAlign:"center",allowOverlay:!1,themeOverride:{textDark:k.glideTheme.textLight},span:[0,Math.max(we.length-1,0)]}),[we,k.glideTheme.textLight]),Gt=f.useCallback(()=>{Oe(),Wt()},[Oe,Wt]);gg({element:e,widgetMgr:r,onFormCleared:Gt});const{pinColumn:yn,unpinColumn:Cn,freezeColumns:jr}=fy(we,te,g||0,k.minColumnWidth,Wt,ne),{changeColumnFormat:qr}=Qw(ne),{hideColumn:Kr,showColumn:Di}=Cy(Wt,ne),{onColumnMoved:_n}=hy(we,jr,yn,Cn,Dt);f.useEffect(()=>{let He;const cn=requestAnimationFrame(()=>{He=setTimeout(()=>{if(T.current&&v.current){const Rn=T.current?.querySelector(".dvn-stack")?.getBoundingClientRect();Rn&&(O(Rn.height>T.current.clientHeight),V(Rn.width>T.current.clientWidth))}},0)});return()=>{cancelAnimationFrame(cn),He&&clearTimeout(He)}},[rn,me,bn,T]),f.useEffect(()=>{Ue.length==we.length&&Q(!1)},[Ue.length,we.length]);const An=!!(p||a?.useContent&&!m);return pn(hc,{className:"stDataFrame","data-testid":"stDataFrame",ref:T,isInHorizontalLayout:p,minHeight:B,disableResize:An,onPointerDown:He=>{if(T.current){const cn=T.current.getBoundingClientRect(),Rn=(b||Math.round(en(bC)))+1;M&&cn.height-Rn<He.clientY-cn.top&&He.stopPropagation(),E&&cn.width-Rn<He.clientX-cn.left&&He.stopPropagation()}},onBlur:He=>{!C&&!ae&&!He.currentTarget.contains(He.relatedTarget)&&!Bt&&Wt(!0,!0)},children:[pn(hg,{isFullScreen:u,disableFullscreenMode:i,locked:an&&!pt||gt||ae&&C||oe,onExpand:c,onCollapse:d,target:hc,children:[s?.map(He=>He),(pt&&an||St&&It||Bt&&gt)&&Ie(mi,{label:"Clear selection",icon:Cg,onClick:()=>{Wt(),$t()}}),et&&an&&Ie(mi,{label:"Delete row(s)",icon:Rg,onClick:()=>{vn&&(vn(Xe),$t())}}),pe&&!an&&Ie(mi,{label:"Add row",icon:Ic,onClick:()=>{xt&&(F(!0),xt(),$t(),v.current?.scrollTo(0,me,"vertical"))}}),!te&&Ue.length>we.length&&Ie(gC,{columns:Ue,columnOrder:ke,setColumnOrder:Dt,hideColumn:Kr,showColumn:Di,isOpen:oe,onClose:se,children:Ie(mi,{label:"Show/hide columns",icon:Tc,onClick:re})}),!le&&!te&&Ie(mi,{label:"Download as CSV",icon:Ig,onClick:Mn}),!te&&Ie(mi,{label:"Search",icon:Ec,onClick:()=>{D?S(!1):(F(!0),S(!0)),$t()}})]}),Ie(cg,{"data-testid":"stDataFrameResizable",ref:y,defaultSize:rn,style:{border:`${k.tableBorderWidth}px solid ${k.glideTheme.borderColor}`,borderRadius:`${k.tableBorderRadius}`},minHeight:B,maxHeight:Be,minWidth:je,maxWidth:An?void 0:Pt,size:rn,enable:{top:!1,right:!1,bottom:!1,left:!1,topRight:!1,bottomRight:!An,bottomLeft:!1,topLeft:!1},grid:[1,Kt],snapGap:Kt/3,onResizeStop:(He,cn,Rn,Oi)=>{if(y.current){const Zn=2*k.tableBorderWidth;En({width:y.current.size.width,height:Be-y.current.size.height===Zn?y.current.size.height+Zn:y.current.size.height})}},children:Ie(Gv,{className:"stDataFrameGlideDataEditor","data-testid":"stDataFrameGlideDataEditor",ref:v,columns:bn,rows:te?1:me,minColumnWidth:k.minColumnWidth,maxColumnWidth:k.maxColumnWidth,maxColumnAutoWidth:k.maxColumnAutoWidth,rowHeight:Kt,headerHeight:k.defaultHeaderHeight,getCellContent:te?wn:Ne,onColumnResize:ae?void 0:ir,resizeIndicator:"header",freezeColumns:jr,smoothScrollX:!0,smoothScrollY:!0,verticalBorder:!0,getCellsForSelection:!0,rowMarkers:"none",rangeSelect:ae?"cell":"rect",columnSelect:"none",rowSelect:"none",onColumnMoved:St?void 0:_n,onItemHovered:He=>{P?.(He),Zt?.(He)},keybindings:{downFill:!0,...Bt||le?{selectAll:!1}:{}},onKeyDown:He=>{(He.ctrlKey||He.metaKey)&&He.key==="f"&&(S(cn=>!cn),He.stopPropagation(),He.preventDefault())},showSearch:D,searchResults:D?void 0:[],onSearchClose:()=>{S(!1),$t()},onHeaderClicked:(He,cn)=>{!Se||St||(D&&S(!1),pt&&an?Wt():Wt(!0,!0),Ae(He,"auto"))},gridSelection:Xe,onGridSelectionChange:He=>{(C||ae)&&(wt(He),un!==void 0&&$t(),j(void 0),Q(!1))},theme:k.glideTheme,getRowThemeOverride:R,onMouseMove:He=>{He.kind==="out-of-bounds"&&C?F(!1):He.kind!=="out-of-bounds"&&!C&&F(!0)},fixedShadowX:!0,fixedShadowY:!0,experimental:{scrollbarWidthOverride:0,paddingBottom:M?-b:void 0,paddingRight:E?-b:void 0},provideEditor:In,drawCell:Ge,customRenderers:kt,imageEditorOverride:Zw,headerIcons:k.headerIcons,validateCell:tn,onHeaderMenuClick:(He,cn)=>{oe||j({columnIdx:He,headerBounds:cn})},onPaste:!1,...pt&&{rowMarkers:{kind:"checkbox-visible",checkboxStyle:"square",theme:{bgCell:k.glideTheme.bgHeader,bgCellMedium:k.glideTheme.bgHeader,textMedium:k.glideTheme.textLight}},rowSelectionMode:Nt?"multi":"auto",rowSelect:n?"none":Nt?"multi":"single",rowSelectionBlending:"additive",rangeSelectionBlending:"additive"},...St&&{columnSelect:n?"none":Tt?"multi":"single",columnSelectionBlending:"additive",columnSelectionMode:Tt?"multi":"auto",rangeSelectionBlending:"additive"},...Bt&&{rangeSelect:qt?"rect":"cell",rangeSelectionBlending:"additive"},...!te&&e.editingMode!==de&&!n&&{fillHandle:!ae,onCellEdited:De,onPaste:mt,onDelete:vn},...pe&&{trailingRowOptions:{sticky:!1,tint:!0},onRowAppended:xt,onHeaderClicked:void 0},...et&&{rowMarkers:{kind:"checkbox",checkboxStyle:"square",theme:{bgCell:k.glideTheme.bgHeader,bgCellMedium:k.glideTheme.bgHeader}},rowSelectionMode:"multi",rowSelect:n?"none":"multi"}})}),un?.content&&Ie(mC,{top:un.top,left:un.left,content:un.content,clearTooltip:$t}),W&&vc.createPortal(Ie(dC,{top:W.headerBounds.y+W.headerBounds.height,left:W.headerBounds.x+W.headerBounds.width,column:dt[W.columnIdx],onCloseMenu:()=>j(void 0),onSortColumn:Se?He=>{D&&S(!1),Wt(!(pt&&an),!0),Ae(W.columnIdx,He,!0)}:void 0,isColumnPinned:dt[W.columnIdx].isPinned,onUnpinColumn:()=>{Cn(dt[W.columnIdx].id)},onPinColumn:()=>{yn(dt[W.columnIdx].id)},onHideColumn:()=>{Kr(dt[W.columnIdx].id)},onChangeFormat:He=>{qr(dt[W.columnIdx].id,He),setTimeout(()=>{v.current?.remeasureColumns(Qe.fromSingleSelection(W.columnIdx))},100)},onAutosize:()=>{v.current?.remeasureColumns(Qe.fromSingleSelection(W.columnIdx))}}),document.querySelector("#portal"))]})}const yC=dg(wC),Tf=f.memo(yC),CC=({data:e,height:t,width:n,customToolbarActions:r})=>Ie(Tf,{element:new Xt({editingMode:Xt.EditingMode.READ_ONLY,disabled:!0,data:void 0,styler:null,id:"",columns:"",formId:"",columnOrder:[],selectionMode:[]}),data:e,widgetMgr:void 0,disabled:!0,fragmentId:void 0,disableFullscreenMode:!0,customToolbarActions:r,widthConfig:n??new Ls.WidthConfig({useStretch:!0}),heightConfig:t?new Ls.HeightConfig({pixelHeight:t}):void 0}),VC=Object.freeze(Object.defineProperty({__proto__:null,ReadOnlyGrid:CC,default:Tf},Symbol.toStringTag,{value:"Module"}));export{E0 as C,CC as R,od as T,Si as a,Yg as b,VC as c,wi as i,am as m,dn as s};
187
+ `,Uy="\uFEFF",Gy=new RegExp(`[${[kf,no,Mf].join("")}]`),sc=Fl.getLogger("useDataExporter");function uc(e){return e.map(t=>Yy(t)).join(kf)+Mf}function Yy(e){if(Ee(e))return"";const t=ot(e);return Gy.test(t)?`${no}${t.replace(new RegExp(no,"g"),Wy+no)}${no}`:t}async function cc(e,t,n,r){const i=new TextEncoder;await e.write(i.encode(Uy));const o=n.map(s=>s.name);await e.write(i.encode(uc(o)));for(let s=0;s<r;s++){const a=[];n.forEach((l,u,c)=>{a.push(l.getCellValue(t([u,s])))}),await e.write(i.encode(uc(a)))}await e.close()}function Xy(e,t,n,r){return{exportToCsv:f.useCallback(async()=>{const s=`${new Date().toISOString().slice(0,16).replace(":","-")}_export.csv`;try{const u=await(await(await Ll(()=>import("./es6.eb5oR8iN.js").then(c=>c.a),__vite__mapDeps([22,1,2]),import.meta.url)).showSaveFilePicker({suggestedName:s,types:[{accept:{"text/csv":[".csv"]}}],excludeAcceptAllOption:!1})).createWritable();await cc(u,e,t,n)}catch(a){if(a instanceof Error&&a.name==="AbortError")return;try{sc.warn("Failed to export data as CSV with FileSystem API, trying fallback method",a);let l="";const u=new WritableStream({write:h=>{l+=new TextDecoder("utf-8").decode(h)},close:async()=>{}});await cc(u.getWriter(),e,t,n);const c=new Blob([l],{type:"text/csv;charset=utf-8;"}),d=URL.createObjectURL(c),g=Mg({enforceDownloadInNewTab:r,url:d,filename:s});g.style.display="none",document.body.appendChild(g),g.click(),document.body.removeChild(g),URL.revokeObjectURL(d)}catch(l){sc.error("Failed to export data as CSV",l)}}},[t,n,e,r])}}function jy(e,t,n,r){return{getCellContent:f.useCallback(([o,s])=>{if(o>t.length-1)return Et("Column index out of bounds","This error should never happen. Please report this bug.");if(s>n-1)return Et("Row index out of bounds","This error should never happen. Please report this bug.");try{const a=t[o],l=a.indexNumber,u=r.current.getOriginalRowIndex(s),c=r.current.isAddedRow(u);if(a.isEditable||c){const h=r.current.getCell(l,u);if(ct(h))return{...a.getCell(a.getCellValue(h),!1),lastUpdated:h.lastUpdated};if(c)return Et("Error during cell creation",`This error should never happen. Please report this bug. No cell found for an added row: col=${l}; row=${u}`)}const d=e.getCell(u,l),g=vg(e,u,l);return iy(a,d,g,e.styler?.cssStyles)}catch(a){return Et("Error during cell creation",`This error should never happen. Please report this bug.
188
+ Error: ${a}`)}},[t,n,e,r])}}function qy(e){const[t,n]=f.useState(void 0),r=f.useCallback(o=>{if(o.kind!=="cell")n(void 0);else{const[,s]=o.location;n(s)}},[n]);return{getRowThemeOverride:f.useCallback(o=>{if(o===t)return{bgCell:e.bgRowHovered,bgCellMedium:e.bgRowHovered}},[e.bgRowHovered,t]),onItemHovered:r}}function Ky(e,t,n,r,i){const[o,s]=f.useState({columns:Qe.empty(),rows:Qe.empty(),current:void 0}),a=!t&&!n&&(e.selectionMode.includes(Xt.SelectionMode.MULTI_ROW)||e.selectionMode.includes(Xt.SelectionMode.SINGLE_ROW)),l=a&&e.selectionMode.includes(Xt.SelectionMode.MULTI_ROW),u=!t&&!n&&(e.selectionMode.includes(Xt.SelectionMode.SINGLE_COLUMN)||e.selectionMode.includes(Xt.SelectionMode.MULTI_COLUMN)),c=u&&e.selectionMode.includes(Xt.SelectionMode.MULTI_COLUMN),d=!t&&!n&&(e.selectionMode.includes(Xt.SelectionMode.SINGLE_CELL)||e.selectionMode.includes(Xt.SelectionMode.MULTI_CELL)),g=d&&e.selectionMode.includes(Xt.SelectionMode.MULTI_CELL),h=o.rows.length>0,p=o.columns.length>0,m=o.current!==void 0,y=f.useCallback(b=>{const x=!qa(b.rows.toArray(),o.rows.toArray()),T=!qa(b.columns.toArray(),o.columns.toArray()),k=!qa(b.current,o.current),R=a&&x||u&&T||d&&k;let P=b;if(T&&P.columns.length>=0){let I=P.columns;r.forEach((C,F)=>{C.isIndex&&(I=I.remove(F))}),I.length<P.columns.length&&(P={...P,columns:I})}s(P),R&&i(P,d)},[o,a,u,d,i,r]),v=f.useCallback((b=!1,x=!1)=>{const T={columns:x?o.columns:Qe.empty(),rows:b?o.rows:Qe.empty(),current:void 0};s(T),(!b&&a||!x&&u||d)&&i(T,d)},[o,a,u,d,i]);return{gridSelection:o,isRowSelectionActivated:a,isMultiRowSelectionActivated:l,isColumnSelectionActivated:u,isMultiColumnSelectionActivated:c,isCellSelectionActivated:d,isMultiCellSelectionActivated:g,isRowSelected:h,isColumnSelected:p,isCellSelected:m,clearSelection:v,processSelectionChange:y}}function Zy(e,t,n,r,i,o,s,a,l,u,c){const d=e.rowHeight??t.defaultRowHeight,g=r?2:1,h=e.editingMode===Xt.EditingMode.DYNAMIC||e.editingMode===Xt.EditingMode.ADD_ONLY?1:0,p=n+h,m=gl({numRows:p,rowHeight:d,theme:t,numHeaderRows:g}),y=sy(l),v=ay(l,c),b=ly(l),x=v?Math.max(1,Math.min(n,3)):1,T=gl({numRows:x,rowHeight:d,theme:t}),k=1e4;let R=Math.max(m,T),P=Math.min(R,t.defaultTableHeight);if(v&&u&&u>0)R=Math.max(u,R);else if(b){const W=Math.ceil(k/d),j=Math.min(p,W),oe=gl({numRows:j,rowHeight:d,theme:t,numHeaderRows:g})+1;P=Math.max(oe,T),R=Math.max(P,R)}else y&&(P=Math.max(y,T),R=Math.max(P,R));o&&(P=Math.min(P,o),R=Math.min(R,o),y||(P=R));const I=t.minColumnWidth+2*t.tableBorderWidth,C=Math.max(i,I);let F,D=C;const S=Cf(a),E=Sf(a),O=oy(a);S?F=C:E?(F=Math.min(Math.max(E,I),C),D=Math.min(Math.max(E,D),C)):O&&(F=void 0);const[M,V]=f.useState({width:F||"100%",height:v?"100%":P});return f.useLayoutEffect(()=>{S&&M.width==="100%"&&V(W=>({...W,width:C}))},[C]),f.useLayoutEffect(()=>{V(W=>({...W,width:F||"100%"}))},[F]),f.useLayoutEffect(()=>{V(W=>({...W,height:v?"100%":P}))},[P,n,u,v,c]),f.useLayoutEffect(()=>{if(s){const W=S||ct(E)&&E>0;V({width:W?D:"100%",height:R})}else V({width:F||"100%",height:P})},[s]),{minHeight:T,maxHeight:R,minWidth:I,maxWidth:D,rowHeight:d,resizableSize:M,setResizableSize:V}}const Jy=600,Qy="⚠️ Please fill out this cell.";function eC(e,t,n=[]){const[r,i]=f.useState(),o=f.useRef(null),s=f.useCallback(l=>{if(clearTimeout(o.current),o.current=0,i(void 0),(l.kind==="header"||l.kind==="cell")&&l.location){const u=l.location[0],c=l.location[1];let d;if(u<0||u>=e.length||n.includes(c))return;const g=e[u];if(l.kind==="header"&&ct(g))d=g.help;else if(l.kind==="cell"){const h=t([u,c]);Ri(h)?d=h.errorDetails:g.isRequired&&g.isEditable&&Kl(h)?d=Qy:Kv(h)&&(d=h.tooltip)}d&&(o.current=setTimeout(()=>{d&&i({content:d,left:l.bounds.x+l.bounds.width/2,top:l.bounds.y})},Jy))}},[e,t,i,o,n]),a=f.useCallback(()=>{i(void 0)},[i]);return{tooltip:r,clearTooltip:a,onItemHovered:s}}function Nr(e){return e.isIndex?na:Ee(e.name)?"":e.name}class Ko{constructor(t){this.editedCells=new Map,this.addedRows=[],this.deletedRows=[],this.numRows=0,this.numRows=t}toJson(t){const n=new Map;t.forEach(o=>{n.set(o.indexNumber,o)});const r={edited_rows:{},added_rows:[],deleted_rows:[]};return this.editedCells.forEach((o,s,a)=>{const l={};o.forEach((u,c)=>{const d=n.get(c);d&&(l[Nr(d)]=d.getCellValue(u))}),r.edited_rows[s]=l}),this.addedRows.forEach(o=>{const s={};let a=!1;o.forEach((l,u,c)=>{const d=n.get(u);if(d){const g=d.getCellValue(l);d.isRequired&&d.isEditable&&Kl(l)&&(a=!0),ct(g)&&(s[Nr(d)]=g)}}),a||r.added_rows.push(s)}),r.deleted_rows=this.deletedRows,JSON.stringify(r,(o,s)=>s===void 0?null:s)}fromJson(t,n){this.editedCells=new Map,this.addedRows=[],this.deletedRows=[];const r=JSON.parse(t),i=new Map;n.forEach(s=>{i.set(s.indexNumber,s)});const o=new Map;n.forEach(s=>{o.set(Nr(s),s)}),Object.keys(r.edited_rows).forEach(s=>{const a=Number(s),l=r.edited_rows[s];Object.keys(l).forEach(u=>{const c=l[u],d=o.get(u);if(d){const g=d.getCell(c);g&&(this.editedCells.has(a)||this.editedCells.set(a,new Map),this.editedCells.get(a)?.set(d.indexNumber,g))}})}),r.added_rows.forEach(s=>{const a=new Map;n.forEach(l=>{a.set(l.indexNumber,l.getCell(null))}),Object.keys(s).forEach(l=>{const u=s[l],c=o.get(l);if(c){const d=c.getCell(u);d&&a.set(c.indexNumber,d)}}),this.addedRows.push(a)}),this.deletedRows=r.deleted_rows}isAddedRow(t){return t>=this.numRows}getCell(t,n){if(this.isAddedRow(n))return this.addedRows[n-this.numRows].get(t);const r=this.editedCells.get(n);if(r!==void 0)return r.get(t)}setCell(t,n,r){if(this.isAddedRow(n)){if(n-this.numRows>=this.addedRows.length)return;this.addedRows[n-this.numRows].set(t,r)}else this.editedCells.get(n)===void 0&&this.editedCells.set(n,new Map),this.editedCells.get(n).set(t,r)}addRow(t){this.addedRows.push(t)}deleteRows(t){t.sort((n,r)=>r-n).forEach(n=>{this.deleteRow(n)})}deleteRow(t){if(!(Ee(t)||t<0)){if(this.isAddedRow(t)){this.addedRows.splice(t-this.numRows,1);return}this.deletedRows.includes(t)||(this.deletedRows.push(t),this.deletedRows=this.deletedRows.sort((n,r)=>n-r)),this.editedCells.delete(t)}}getOriginalRowIndex(t){let n=t;for(let r=0;r<this.deletedRows.length&&!(this.deletedRows[r]>n);r++)n+=1;return n}getNumRows(){return this.numRows+this.addedRows.length-this.deletedRows.length}}const Rf=150;function tC({element:e,widgetMgr:t,fragmentId:n,originalNumRows:r,originalColumns:i}){const{READ_ONLY:o}=Xt.EditingMode,s=f.useRef(new Ko(r)),[a,l]=f.useState(s.current.getNumRows());ng(()=>{s.current=new Ko(r),l(s.current.getNumRows())},[r]);const u=f.useCallback(()=>{s.current=new Ko(r),l(s.current.getNumRows())},[r]),c=f.useCallback(()=>{l(y=>{const v=s.current.getNumRows();return y!==v?v:y})},[]);f.useEffect(()=>{if(e.editingMode===o||!t)return;const y=t.getStringValue({id:e.id,formId:e.formId});y&&(s.current.fromJson(y,i),l(s.current.getNumRows()))},[]);const d=f.useCallback(()=>{if(!t)return;const y=s.current.toJson(i);let v=t.getStringValue({id:e.id,formId:e.formId});v===void 0&&(v=new Ko(0).toJson([])),y!==v&&t.setStringValue({id:e.id,formId:e.formId},y,{fromUi:!0},n)},[i,e.id,e.formId,t,n]),{debouncedCallback:g}=Md(d,Rf),h=f.useCallback((y,v)=>(b,x)=>{if(!t)return;const T={selection:{rows:[],columns:[],cells:[]}};if(T.selection.rows=b.rows.toArray().map(P=>v(P)),T.selection.columns=b.columns.toArray().map(P=>Nr(y[P])),x&&b.current){const{cell:P,range:I}=b.current;if(I)for(let C=I.y;C<I.y+I.height;C++)for(let F=I.x;F<I.x+I.width;F++)y[F].isIndex||T.selection.cells.push([v(C),Nr(y[F])]);else if(P){const[C,F]=P;y[C].isIndex||T.selection.cells.push([v(F),Nr(y[C])])}}const k=JSON.stringify(T),R=t.getStringValue({id:e.id,formId:e.formId});(R===void 0||R!==k)&&t.setStringValue({id:e.id,formId:e.formId},k,{fromUi:!0},n)},[e.id,e.formId,t,n]),p=f.useCallback(({columns:y,isRowSelectionActivated:v,isColumnSelectionActivated:b,isCellSelectionActivated:x,isMultiCellSelectionActivated:T})=>{if(!v&&!b&&!x||!t)return;const k=t.getStringValue({id:e.id,formId:e.formId});if(!k)return;const R=y.map(D=>Nr(D)),P=JSON.parse(k);let I=Qe.empty(),C=Qe.empty(),F;if(P.selection?.rows?.forEach(D=>{I=I.add(D)}),P.selection?.columns?.forEach(D=>{C=C.add(R.indexOf(D))}),x&&!T){const[D,S]=P.selection?.cells?.[0]??[];D!==void 0&&S!==void 0&&(F=[R.indexOf(S),D])}if(I.length>0||C.length>0||F!==void 0)return{rows:I,columns:C,current:F?{cell:F,range:{x:F[0],y:F[1],width:1,height:1},rangeStack:[]}:void 0}},[t,e.id,e.formId]),m=f.useCallback(()=>{u()},[u]);return{editingState:s,numRows:a,resetEditingState:u,updateNumRows:c,syncEditState:g,createSyncSelectionState:h,onFormCleared:m,loadInitialSelectionState:p}}const If=Fn("div",{target:"e1gsdy3y0"})(({theme:e})=>({paddingTop:e.spacing.xs,paddingBottom:e.spacing.xs})),xr=Fn("div",{target:"e1gsdy3y1"})(({theme:e,isActive:t,hasSubmenu:n})=>({display:"flex",alignItems:"center",justifyContent:"flex-start",gap:e.spacing.sm,paddingLeft:e.spacing.sm,paddingRight:e.spacing.sm,paddingTop:e.spacing.twoXS,paddingBottom:e.spacing.twoXS,cursor:"pointer",backgroundColor:t?e.colors.darkenedBgMix15:void 0,"&:hover":{backgroundColor:e.colors.darkenedBgMix15},minWidth:e.sizes.minMenuWidth,...n&&{justifyContent:"space-between","& > :first-of-type":{display:"flex",alignItems:"center",gap:e.spacing.sm}}})),Ef=Fn("div",{target:"e1gsdy3y2"})(({theme:e})=>({height:e.sizes.borderWidth,backgroundColor:e.colors.borderColor,marginTop:e.spacing.xs,marginBottom:e.spacing.xs})),nC=Fn("div",{target:"e1gsdy3y3"})(({theme:e})=>({display:"flex",alignItems:"center",padding:`${e.spacing.sm} ${e.spacing.sm}`,cursor:"default",gap:e.spacing.twoXS})),rC=Fn("div",{target:"e1gsdy3y4"})(({theme:e})=>({display:"flex",alignItems:"center",justifyContent:"center",padding:e.spacing.twoXS,border:`${e.sizes.borderWidth} solid ${e.colors.borderColor}`,borderRadius:e.radii.md,backgroundColor:"transparent",color:e.colors.bodyText,height:"fit-content"})),iC=Fn("div",{target:"e1gsdy3y5"})(({theme:e})=>({display:"flex",alignItems:"center",flexGrow:1,padding:`${e.spacing.threeXS} ${e.spacing.threeXS}`,border:`${e.sizes.borderWidth} solid ${e.colors.borderColor}`,borderRadius:e.radii.md,backgroundColor:e.colors.secondaryBg,minWidth:0,overflow:"hidden"})),oC=Fn("span",{target:"e1gsdy3y6"})(({theme:e})=>({whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",flexGrow:1,margin:`0 ${e.spacing.xs}`,fontSize:e.fontSizes.twoSm,maxWidth:"4rem"})),aC=Fn("button",{target:"e1gsdy3y7"})(({theme:e})=>({background:"none",border:"none",padding:e.spacing.twoXS,cursor:"pointer",color:e.colors.bodyText,display:"flex",alignItems:"center",justifyContent:"center",borderRadius:e.radii.md,transition:"background-color 0.2s ease","&:hover":{backgroundColor:e.colors.fadedText05},"&:active":{backgroundColor:e.colors.fadedText10}})),dc=[{format:"",label:"Automatic",icon:":material/123:"},{format:"localized",label:"Localized",icon:":material/translate:"},{format:"plain",label:"Plain",icon:":material/speed_1_75:"},{format:"compact",label:"Compact",icon:":material/1k:"},{format:"dollar",label:"Dollar",icon:":material/attach_money:"},{format:"euro",label:"Euro",icon:":material/euro:"},{format:"yen",label:"Yen",icon:":material/currency_yen:"},{format:"percent",label:"Percent",icon:":material/percent:"},{format:"scientific",label:"Scientific",icon:":material/experiment:"},{format:"accounting",label:"Accounting",icon:":material/finance_chip:"}],lC={number:dc,progress:dc,datetime:[{format:"",label:"Automatic",icon:":material/schedule:"},{format:"localized",label:"Localized",icon:":material/translate:"},{format:"distance",label:"Distance",icon:":material/search_activity:"},{format:"calendar",label:"Calendar",icon:":material/today:"}],date:[{format:"",label:"Automatic",icon:":material/schedule:"},{format:"localized",label:"Localized",icon:":material/translate:"},{format:"distance",label:"Distance",icon:":material/search_activity:"}],time:[{format:"",label:"Automatic",icon:":material/schedule:"},{format:"localized",label:"Localized",icon:":material/translate:"}]};function sC({columnKind:e,isOpen:t,onMouseEnter:n,onMouseLeave:r,onChangeFormat:i,onCloseMenu:o,children:s}){const a=Ur(),{colors:l,fontSizes:u,radii:c,fontWeights:d}=a,g=lC[e]||[];return g.length===0?Ie(xc,{}):Ie(ya,{triggerType:kc.hover,returnFocus:!0,autoFocus:!0,focusLock:!0,isOpen:t,onMouseEnter:n,onMouseLeave:r,ignoreBoundary:!0,content:Ie(If,{role:"menu",children:g.map(h=>pn(xr,{onClick:()=>{i(h.format),o()},role:"menuitem",children:[Ie(Gn,{size:"base",iconValue:h.icon}),h.label]},h.format))}),placement:wa.right,showArrow:!1,popoverMargin:2,overrides:{Body:{props:{"data-testid":"stDataFrameColumnFormattingMenu"},style:{borderTopLeftRadius:c.default,borderTopRightRadius:c.default,borderBottomLeftRadius:c.default,borderBottomRightRadius:c.default,paddingTop:"0 !important",paddingBottom:"0 !important",paddingLeft:"0 !important",paddingRight:"0 !important",backgroundColor:"transparent",border:`${a.sizes.borderWidth} solid ${a.colors.borderColor}`}},Inner:{style:{backgroundColor:vo(a)?l.bgColor:l.secondaryBg,color:l.bodyText,fontSize:u.sm,fontWeight:d.normal,paddingTop:"0 !important",paddingBottom:"0 !important",paddingLeft:"0 !important",paddingRight:"0 !important"}}},children:s})}const uC=f.memo(sC);function cC({top:e,left:t,isColumnPinned:n,onPinColumn:r,onUnpinColumn:i,onCloseMenu:o,onSortColumn:s,onHideColumn:a,column:l,onChangeFormat:u,onAutosize:c}){const d=Ur(),[g,h]=f.useState(!1),{colors:p,fontSizes:m,radii:y,fontWeights:v}=d,{isCopied:b,copyToClipboard:x}=rg();f.useEffect(()=>{function R(P){P.preventDefault()}return document.addEventListener("wheel",R,{passive:!1}),document.addEventListener("touchmove",R,{passive:!1}),()=>{document.removeEventListener("wheel",R),document.removeEventListener("touchmove",R)}},[]);const T=f.useCallback(()=>{o()},[o]),k=f.useCallback(()=>{x(l.title)},[l.title,x]);return Ie(ya,{autoFocus:!0,"aria-label":"Dataframe column menu",content:pn(If,{children:[pn(nC,{children:[Ie(rC,{title:l.kind,children:Ie(Gn,{size:"base",iconValue:l.typeIcon||":material/notes:"})}),pn(iC,{title:l.title,children:[Ie(oC,{children:l.title}),Ie(aC,{onClick:k,title:"Copy column name","aria-label":"Copy column name",children:Ie(Gn,{size:"sm",iconValue:b?":material/check:":":material/content_copy:"})})]})]}),s&&pn(xc,{children:[pn(xr,{onClick:()=>{s("asc"),T()},role:"menuitem",children:[Ie(Gn,{size:"base",iconValue:":material/arrow_upward:"}),"Sort ascending"]}),pn(xr,{onClick:()=>{s("desc"),T()},role:"menuitem",children:[Ie(Gn,{size:"base",iconValue:":material/arrow_downward:"}),"Sort descending"]}),Ie(Ef,{})]}),u&&Ie(uC,{columnKind:l.kind,isOpen:g,onMouseEnter:()=>h(!0),onMouseLeave:()=>h(!1),onChangeFormat:u,onCloseMenu:T,children:pn(xr,{onMouseEnter:()=>h(!0),onMouseLeave:()=>h(!1),isActive:g,hasSubmenu:!0,children:[pn("div",{children:[Ie(Gn,{size:"base",iconValue:":material/format_list_numbered:"}),"Format"]}),Ie(Gn,{size:"base",iconValue:":material/chevron_right:"})]})}),c&&pn(xr,{onClick:()=>{c(),T()},children:[Ie(Gn,{size:"base",iconValue:":material/arrows_outward:"}),"Autosize"]}),n&&pn(xr,{onClick:()=>{i(),T()},children:[Ie(Gn,{size:"base",iconValue:":material/keep_off:"}),"Unpin column"]}),!n&&pn(xr,{onClick:()=>{r(),T()},children:[Ie(Gn,{size:"base",iconValue:":material/keep:"}),"Pin column"]}),a&&pn(xr,{onClick:()=>{a(),T()},children:[Ie(Gn,{size:"base",iconValue:":material/visibility_off:"}),"Hide column"]})]}),placement:wa.bottomRight,accessibilityType:Mc.menu,showArrow:!1,popoverMargin:en("0.375rem"),onClickOutside:g?void 0:T,onEsc:T,overrides:{Body:{props:{"data-testid":"stDataFrameColumnMenu"},style:{paddingTop:"0 !important",paddingBottom:"0 !important",paddingLeft:"0 !important",paddingRight:"0 !important",backgroundColor:"transparent"}},Inner:{style:{border:`${d.sizes.borderWidth} solid ${d.colors.borderColor}`,backgroundColor:vo(d)?p.bgColor:p.secondaryBg,color:p.bodyText,fontSize:m.sm,fontWeight:v.normal,borderTopLeftRadius:y.default,borderTopRightRadius:y.default,borderBottomLeftRadius:y.default,borderBottomRightRadius:y.default,overflow:"auto",paddingTop:"0 !important",paddingBottom:"0 !important",paddingLeft:"0 !important",paddingRight:"0 !important"}}},isOpen:!0,children:Ie("div",{"data-testid":"stDataFrameColumnMenuTarget",style:{position:"fixed",top:e,left:t,visibility:"hidden",transform:"unset"}})})}const dC=f.memo(cC),fC="(index)";function ml(e,t){return!t.length||e.isIndex?!1:!t.includes(e.id)&&!t.includes(e.name)}const fc=({label:e,initialValue:t,isIndeterminate:n,onChange:r})=>{const i=Ur();return Ie(kg,{isIndeterminate:n,checked:t,onChange:o=>{r(o.target.checked)},"aria-label":e,checkmarkType:xg.default,labelPlacement:Sg.right,overrides:{Root:{style:({$isFocusVisible:o})=>({marginBottom:i.spacing.none,marginTop:i.spacing.none,paddingLeft:i.spacing.md,paddingRight:i.spacing.md,paddingTop:i.spacing.twoXS,paddingBottom:i.spacing.twoXS,backgroundColor:o?i.colors.darkenedBgMix25:"",display:"flex",alignItems:"start"})},Checkmark:{style:({$isFocusVisible:o,$checked:s,$isIndeterminate:a})=>{const l=s||a?i.colors.primary:i.colors.borderColor;return{outline:0,width:i.sizes.checkbox,height:i.sizes.checkbox,marginTop:i.spacing.twoXS,marginLeft:0,marginBottom:0,boxShadow:o&&(s||a)?i.shadows.focusRing:"",borderLeftWidth:i.sizes.borderWidth,borderRightWidth:i.sizes.borderWidth,borderTopWidth:i.sizes.borderWidth,borderBottomWidth:i.sizes.borderWidth,borderLeftColor:l,borderRightColor:l,borderTopColor:l,borderBottomColor:l}}},Label:{style:{lineHeight:i.lineHeights.small,paddingLeft:i.spacing.sm,position:"relative",color:i.colors.bodyText,fontSize:i.fontSizes.sm,fontWeight:i.fontWeights.normal}}},children:e})},hC=({columns:e,columnOrder:t,setColumnOrder:n,hideColumn:r,showColumn:i,children:o,isOpen:s,onClose:a})=>{const l=Ur(),u=h=>!(h.isHidden===!0||ml(h,t)),c=e.every(u),d=e.some(u)&&!c,g=h=>{e.forEach(p=>{const m=ml(p,t);h?(i(p.id),m&&n(y=>[...y,p.id])):r(p.id)})};return Ie(ya,{triggerType:kc.click,placement:wa.bottomRight,autoFocus:!0,focusLock:!0,content:()=>pn("div",{style:{paddingTop:l.spacing.sm,paddingBottom:l.spacing.sm,maxHeight:l.sizes.maxDropdownHeight,overflow:"auto"},children:[Ie(fc,{label:"Select all",isIndeterminate:d,initialValue:c,onChange:h=>{g(h)}}),Ie(Ef,{}),Ie("div",{children:e.map(h=>{const p=ml(h,t);return Ie(fc,{label:!h.title&&h.isIndex?fC:h.title,initialValue:!(h.isHidden===!0||p),onChange:m=>{m?(i(h.id),p&&n(y=>[...y,h.id])):r(h.id)}},h.id)})})]}),isOpen:s,onClickOutside:a,onClick:()=>s?a():void 0,onEsc:a,ignoreBoundary:!1,overrides:{Body:{props:{"data-testid":"stDataFrameColumnVisibilityMenu"},style:{borderTopLeftRadius:l.radii.default,borderTopRightRadius:l.radii.default,borderBottomLeftRadius:l.radii.default,borderBottomRightRadius:l.radii.default,paddingTop:"0 !important",paddingBottom:"0 !important",paddingLeft:"0 !important",paddingRight:"0 !important",backgroundColor:"transparent",border:`${l.sizes.borderWidth} solid ${l.colors.borderColor}`}},Inner:{style:{backgroundColor:vo(l)?l.colors.bgColor:l.colors.secondaryBg,color:l.colors.bodyText,fontSize:l.fontSizes.sm,fontWeight:l.fontWeights.normal,minWidth:l.sizes.minMenuWidth,maxWidth:`calc(${l.sizes.minMenuWidth} * 2)`,maxHeight:l.sizes.maxDropdownHeight,overflow:"auto",paddingTop:"0 !important",paddingBottom:"0 !important",paddingLeft:"0 !important",paddingRight:"0 !important"}}},children:Ie("div",{children:o})})},gC=f.memo(hC),hc=Fn("div",{target:"elmgoi00"})(({theme:e,disableResize:t,minHeight:n})=>({position:"relative",display:t?"flex":"inline-block",height:"100%","& .stDataFrameGlideDataEditor":{height:"100%",minWidth:"100%",minHeight:n,borderRadius:e.radii.default},"& .dvn-scroller":{overflowX:"auto !important",overflowY:"auto !important"},"& .gdg-search-bar":{maxWidth:"19rem",width:"80%",minWidth:"6rem",top:e.spacing.sm,right:e.spacing.sm,padding:e.spacing.sm,borderRadius:e.radii.default,"& .gdg-search-status":{paddingTop:e.spacing.twoXS,fontSize:e.fontSizes.twoSm},"& .gdg-search-progress":{display:"none"},"& input":{width:"100%"},"& button":{width:e.iconSizes.xl,height:e.iconSizes.xl,"& .button-icon":{width:e.iconSizes.base,height:e.iconSizes.base}}}}));function pC({top:e,left:t,content:n,clearTooltip:r}){const[i,o]=f.useState(!0),s=Ur(),{colors:a,fontSizes:l,radii:u,fontWeights:c}=s,d=f.useCallback(()=>{o(!1),r()},[r,o]);return Ie(ya,{content:Ie(ig,{"data-testid":"stDataFrameTooltipContent",children:Ie(og,{style:{fontSize:l.sm},source:n,allowHTML:!1})}),placement:wa.top,accessibilityType:Mc.tooltip,showArrow:!1,popoverMargin:5,onClickOutside:d,onEsc:d,overrides:{Body:{style:{borderTopLeftRadius:u.default,borderTopRightRadius:u.default,borderBottomLeftRadius:u.default,borderBottomRightRadius:u.default,paddingTop:"0 !important",paddingBottom:"0 !important",paddingLeft:"0 !important",paddingRight:"0 !important",backgroundColor:"transparent"}},Inner:{style:{backgroundColor:vo(s)?a.bgColor:a.secondaryBg,color:a.bodyText,fontSize:l.sm,fontWeight:c.normal,paddingTop:"0 !important",paddingBottom:"0 !important",paddingLeft:"0 !important",paddingRight:"0 !important"}}},isOpen:i,children:Ie("div",{"data-testid":"stDataFrameTooltipTarget",style:{position:"fixed",top:e,left:t}})})}const mC=f.memo(pC),vC=15e4,bC="0.5rem";function wC({element:e,data:t,disabled:n,widgetMgr:r,disableFullscreenMode:i,fragmentId:o,customToolbarActions:s,widthConfig:a,heightConfig:l}){const{expanded:u,expand:c,collapse:d,width:g,height:h}=Ps(fg),{isInHorizontalLayout:p,isInRoot:m}=Ps(ag),y=f.useRef(null),v=f.useRef(null),b=lg(),{height:x,elementRef:T}=sg(),k=$y(),{getRowThemeOverride:R,onItemHovered:P}=qy(k),{enforceDownloadInNewTab:I=!1}=f.useContext(ug),[C,F]=f.useState(!0),[D,S]=f.useState(!1),[E,O]=f.useState(!1),[M,V]=f.useState(!1),[W,j]=f.useState(),[oe,Q]=f.useState(!1),re=f.useCallback(()=>Q(He=>!He),[]),se=f.useCallback(()=>Q(!1),[]),ae=f.useMemo(()=>window.matchMedia&&window.matchMedia("(pointer: coarse)").matches,[]);Ee(e.editingMode)&&(e.editingMode=Xt.EditingMode.READ_ONLY);const{READ_ONLY:de,DYNAMIC:fe,ADD_ONLY:ue,DELETE_ONLY:H}=Xt.EditingMode,L=t.dimensions,X=Math.max(0,L.numDataRows),te=X===0&&!((e.editingMode===fe||e.editingMode===ue)&&L.numDataColumns>0),le=X>vC,Se=!le&&!te&&e.editingMode!==fe&&e.editingMode!==ue,pe=!te&&(e.editingMode===fe||e.editingMode===ue)&&!n,et=!te&&(e.editingMode===fe||e.editingMode===H)&&!n,[ke,Dt]=f.useState(e.columnOrder);f.useEffect(()=>{Dt(e.columnOrder)},[e.columnOrder.join(",")]);const{columns:dt,allColumns:Ue,setColumnConfigMapping:ne}=dy(e,t,n,ke,a),{editingState:ve,numRows:me,updateNumRows:he,syncEditState:Ce,createSyncSelectionState:_e,onFormCleared:Oe,loadInitialSelectionState:at}=tC({element:e,widgetMgr:r,fragmentId:o,originalNumRows:X,originalColumns:dt}),{getCellContent:Pe}=jy(t,dt,me,ve),{columns:we,sortColumn:Ae,getOriginalIndex:Re,getCellContent:Ne}=yy(X,dt,Pe),ft=f.useMemo(()=>_e(we,Re),[_e,we,Re]),{debouncedCallback:ht}=Md(ft,Rf),{gridSelection:Xe,isRowSelectionActivated:pt,isMultiRowSelectionActivated:Nt,isColumnSelectionActivated:St,isMultiColumnSelectionActivated:Tt,isCellSelectionActivated:Bt,isMultiCellSelectionActivated:qt,isRowSelected:an,isColumnSelected:It,isCellSelected:gt,clearSelection:Wt,processSelectionChange:wt}=Ky(e,te,n,we,ht);f.useEffect(()=>{Bt||Wt(!0,!0)},[u]);const ln=f.useCallback(He=>{v.current?.updateCells(He)},[]);f.useEffect(()=>{const He=at({columns:we,isRowSelectionActivated:pt,isColumnSelectionActivated:St,isCellSelectionActivated:Bt,isMultiCellSelectionActivated:qt});He&&wt(He)},[]);const{exportToCsv:Mn}=Xy(Ne,we,me,I),{onCellEdited:De,onPaste:mt,onRowAppended:xt,onDelete:vn,validateCell:tn}=By({columns:we,canAddRows:pe,canDeleteRows:et,editingState:ve,getCellContent:Ne,getOriginalIndex:Re,refreshCells:ln,updateNumRows:he,syncEditState:Ce,clearSelection:Wt}),nn=f.useMemo(()=>te?[0]:pe?[me]:[],[te,pe,me]),{tooltip:un,clearTooltip:$t,onItemHovered:Zt}=eC(we,Ne,nn),{drawCell:Ge,customRenderers:kt}=Vy(we,e.placeholder??void 0),{provideEditor:In}=Sy(),Ot=f.useCallback(He=>({...He,hasMenu:!te}),[te]),bt=f.useMemo(()=>we.map(He=>Ot(El(He))),[we,Ot]),{columns:bn,onColumnResize:ir}=gy(bt),Kn=t.dimensions.numHeaderRows>1,{minHeight:B,maxHeight:Be,minWidth:je,maxWidth:Pt,rowHeight:Kt,resizableSize:rn,setResizableSize:En}=Zy(e,k,me,Kn,g||0,h,u,a,l,x,m),wn=f.useCallback(([He,cn])=>({...Zv(!0,!1),displayData:"empty",contentAlign:"center",allowOverlay:!1,themeOverride:{textDark:k.glideTheme.textLight},span:[0,Math.max(we.length-1,0)]}),[we,k.glideTheme.textLight]),Gt=f.useCallback(()=>{Oe(),Wt()},[Oe,Wt]);gg({element:e,widgetMgr:r,onFormCleared:Gt});const{pinColumn:yn,unpinColumn:Cn,freezeColumns:jr}=fy(we,te,g||0,k.minColumnWidth,Wt,ne),{changeColumnFormat:qr}=Qw(ne),{hideColumn:Kr,showColumn:Di}=Cy(Wt,ne),{onColumnMoved:_n}=hy(we,jr,yn,Cn,Dt);f.useEffect(()=>{let He;const cn=requestAnimationFrame(()=>{He=setTimeout(()=>{if(T.current&&v.current){const Rn=T.current?.querySelector(".dvn-stack")?.getBoundingClientRect();Rn&&(O(Rn.height>T.current.clientHeight),V(Rn.width>T.current.clientWidth))}},0)});return()=>{cancelAnimationFrame(cn),He&&clearTimeout(He)}},[rn,me,bn,T]),f.useEffect(()=>{Ue.length==we.length&&Q(!1)},[Ue.length,we.length]);const An=!!(p||a?.useContent&&!m);return pn(hc,{className:"stDataFrame","data-testid":"stDataFrame",ref:T,isInHorizontalLayout:p,minHeight:B,disableResize:An,onPointerDown:He=>{if(T.current){const cn=T.current.getBoundingClientRect(),Rn=(b||Math.round(en(bC)))+1;M&&cn.height-Rn<He.clientY-cn.top&&He.stopPropagation(),E&&cn.width-Rn<He.clientX-cn.left&&He.stopPropagation()}},onBlur:He=>{!C&&!ae&&!He.currentTarget.contains(He.relatedTarget)&&!Bt&&Wt(!0,!0)},children:[pn(hg,{isFullScreen:u,disableFullscreenMode:i,locked:an&&!pt||gt||ae&&C||oe,onExpand:c,onCollapse:d,target:hc,children:[s?.map(He=>He),(pt&&an||St&&It||Bt&&gt)&&Ie(mi,{label:"Clear selection",icon:Cg,onClick:()=>{Wt(),$t()}}),et&&an&&Ie(mi,{label:"Delete row(s)",icon:Rg,onClick:()=>{vn&&(vn(Xe),$t())}}),pe&&!an&&Ie(mi,{label:"Add row",icon:Ic,onClick:()=>{xt&&(F(!0),xt(),$t(),v.current?.scrollTo(0,me,"vertical"))}}),!te&&Ue.length>we.length&&Ie(gC,{columns:Ue,columnOrder:ke,setColumnOrder:Dt,hideColumn:Kr,showColumn:Di,isOpen:oe,onClose:se,children:Ie(mi,{label:"Show/hide columns",icon:Tc,onClick:re})}),!le&&!te&&Ie(mi,{label:"Download as CSV",icon:Ig,onClick:Mn}),!te&&Ie(mi,{label:"Search",icon:Ec,onClick:()=>{D?S(!1):(F(!0),S(!0)),$t()}})]}),Ie(cg,{"data-testid":"stDataFrameResizable",ref:y,defaultSize:rn,style:{border:`${k.tableBorderWidth}px solid ${k.glideTheme.borderColor}`,borderRadius:`${k.tableBorderRadius}`},minHeight:B,maxHeight:Be,minWidth:je,maxWidth:An?void 0:Pt,size:rn,enable:{top:!1,right:!1,bottom:!1,left:!1,topRight:!1,bottomRight:!An,bottomLeft:!1,topLeft:!1},grid:[1,Kt],snapGap:Kt/3,onResizeStop:(He,cn,Rn,Oi)=>{if(y.current){const Zn=2*k.tableBorderWidth;En({width:y.current.size.width,height:Be-y.current.size.height===Zn?y.current.size.height+Zn:y.current.size.height})}},children:Ie(Gv,{className:"stDataFrameGlideDataEditor","data-testid":"stDataFrameGlideDataEditor",ref:v,columns:bn,rows:te?1:me,minColumnWidth:k.minColumnWidth,maxColumnWidth:k.maxColumnWidth,maxColumnAutoWidth:k.maxColumnAutoWidth,rowHeight:Kt,headerHeight:k.defaultHeaderHeight,getCellContent:te?wn:Ne,onColumnResize:ae?void 0:ir,resizeIndicator:"header",freezeColumns:jr,smoothScrollX:!0,smoothScrollY:!0,verticalBorder:!0,getCellsForSelection:!0,rowMarkers:"none",rangeSelect:ae?"cell":"rect",columnSelect:"none",rowSelect:"none",onColumnMoved:St?void 0:_n,onItemHovered:He=>{P?.(He),Zt?.(He)},keybindings:{downFill:!0,...Bt||le?{selectAll:!1}:{}},onKeyDown:He=>{(He.ctrlKey||He.metaKey)&&He.key==="f"&&(S(cn=>!cn),He.stopPropagation(),He.preventDefault())},showSearch:D,searchResults:D?void 0:[],onSearchClose:()=>{S(!1),$t()},onHeaderClicked:(He,cn)=>{!Se||St||(D&&S(!1),pt&&an?Wt():Wt(!0,!0),Ae(He,"auto"))},gridSelection:Xe,onGridSelectionChange:He=>{(C||ae)&&(wt(He),un!==void 0&&$t(),j(void 0),Q(!1))},theme:k.glideTheme,getRowThemeOverride:R,onMouseMove:He=>{He.kind==="out-of-bounds"&&C?F(!1):He.kind!=="out-of-bounds"&&!C&&F(!0)},fixedShadowX:!0,fixedShadowY:!0,experimental:{scrollbarWidthOverride:0,paddingBottom:M?-b:void 0,paddingRight:E?-b:void 0},provideEditor:In,drawCell:Ge,customRenderers:kt,imageEditorOverride:Zw,headerIcons:k.headerIcons,validateCell:tn,onHeaderMenuClick:(He,cn)=>{oe||j({columnIdx:He,headerBounds:cn})},onPaste:!1,...pt&&{rowMarkers:{kind:"checkbox-visible",checkboxStyle:"square",theme:{bgCell:k.glideTheme.bgHeader,bgCellMedium:k.glideTheme.bgHeader,textMedium:k.glideTheme.textLight}},rowSelectionMode:Nt?"multi":"auto",rowSelect:n?"none":Nt?"multi":"single",rowSelectionBlending:"additive",rangeSelectionBlending:"additive"},...St&&{columnSelect:n?"none":Tt?"multi":"single",columnSelectionBlending:"additive",columnSelectionMode:Tt?"multi":"auto",rangeSelectionBlending:"additive"},...Bt&&{rangeSelect:qt?"rect":"cell",rangeSelectionBlending:"additive"},...!te&&e.editingMode!==de&&!n&&{fillHandle:!ae,onCellEdited:De,onPaste:mt,onDelete:vn},...pe&&{trailingRowOptions:{sticky:!1,tint:!0},onRowAppended:xt,onHeaderClicked:void 0},...et&&{rowMarkers:{kind:"checkbox",checkboxStyle:"square",theme:{bgCell:k.glideTheme.bgHeader,bgCellMedium:k.glideTheme.bgHeader}},rowSelectionMode:"multi",rowSelect:n?"none":"multi"}})}),un?.content&&Ie(mC,{top:un.top,left:un.left,content:un.content,clearTooltip:$t}),W&&vc.createPortal(Ie(dC,{top:W.headerBounds.y+W.headerBounds.height,left:W.headerBounds.x+W.headerBounds.width,column:dt[W.columnIdx],onCloseMenu:()=>j(void 0),onSortColumn:Se?He=>{D&&S(!1),Wt(!(pt&&an),!0),Ae(W.columnIdx,He,!0)}:void 0,isColumnPinned:dt[W.columnIdx].isPinned,onUnpinColumn:()=>{Cn(dt[W.columnIdx].id)},onPinColumn:()=>{yn(dt[W.columnIdx].id)},onHideColumn:()=>{Kr(dt[W.columnIdx].id)},onChangeFormat:He=>{qr(dt[W.columnIdx].id,He),setTimeout(()=>{v.current?.remeasureColumns(Qe.fromSingleSelection(W.columnIdx))},100)},onAutosize:()=>{v.current?.remeasureColumns(Qe.fromSingleSelection(W.columnIdx))}}),document.querySelector("#portal"))]})}const yC=dg(wC),Tf=f.memo(yC),CC=({data:e,height:t,width:n,customToolbarActions:r})=>Ie(Tf,{element:new Xt({editingMode:Xt.EditingMode.READ_ONLY,disabled:!0,arrowData:null,id:"",columns:"",formId:"",columnOrder:[],selectionMode:[]}),data:e,widgetMgr:void 0,disabled:!0,fragmentId:void 0,disableFullscreenMode:!0,customToolbarActions:r,widthConfig:n??new Ls.WidthConfig({useStretch:!0}),heightConfig:t?new Ls.HeightConfig({pixelHeight:t}):void 0}),VC=Object.freeze(Object.defineProperty({__proto__:null,ReadOnlyGrid:CC,default:Tf},Symbol.toStringTag,{value:"Module"}));export{E0 as C,CC as R,od as T,Si as a,Yg as b,VC as c,wi as i,am as m,dn as s};