streamlit-nightly 1.52.3.dev20260110__py3-none-any.whl → 1.52.3.dev20260112__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 (101) hide show
  1. streamlit/auth_util.py +24 -1
  2. streamlit/static/index.html +1 -1
  3. streamlit/static/manifest.json +295 -295
  4. streamlit/static/static/js/{ErrorOutline.esm.BcqUpfNe.js → ErrorOutline.esm.BjVqd_6R.js} +1 -1
  5. streamlit/static/static/js/{FileDownload.esm.CtJWBuub.js → FileDownload.esm.DJCSsghl.js} +1 -1
  6. streamlit/static/static/js/{FileHelper.D0dQPhOs.js → FileHelper.C---TH7o.js} +5 -5
  7. streamlit/static/static/js/{FormClearHelper.Cm3GDSk6.js → FormClearHelper.C-6BC487.js} +1 -1
  8. streamlit/static/static/js/{InputInstructions.D7Hxdzwv.js → InputInstructions.sxc3InCI.js} +1 -1
  9. streamlit/static/static/js/{Particles.vAUDtAR8.js → Particles.S8yD7iW-.js} +1 -1
  10. streamlit/static/static/js/{ProgressBar.Dp2CGRba.js → ProgressBar.BiYsyZCC.js} +1 -1
  11. streamlit/static/static/js/{StreamlitSyntaxHighlighter.DC0000nJ.js → StreamlitSyntaxHighlighter.9jZF8jX1.js} +1 -1
  12. streamlit/static/static/js/{TableChart.esm.DDVoSKOT.js → TableChart.esm.BdA4Q1rZ.js} +1 -1
  13. streamlit/static/static/js/{Toolbar.CuMH-Gqe.js → Toolbar.B9DaaDfN.js} +1 -1
  14. streamlit/static/static/js/{WidgetLabelHelpIconInline.WAReecol.js → WidgetLabelHelpIconInline.DxODTLS2.js} +1 -1
  15. streamlit/static/static/js/{base-input.BX9Jll5o.js → base-input.Gf1cKuQR.js} +1 -1
  16. streamlit/static/static/js/{checkbox.BzMHUSz1.js → checkbox.CnoNruf3.js} +1 -1
  17. streamlit/static/static/js/{createDownloadLinkElement.CviG5BQx.js → createDownloadLinkElement.B48AepiL.js} +1 -1
  18. streamlit/static/static/js/{data-grid-overlay-editor.Dzo9A4l6.js → data-grid-overlay-editor.Cmdq9aqU.js} +1 -1
  19. streamlit/static/static/js/{downloader.DIDvj0d5.js → downloader.CQLoQdMX.js} +1 -1
  20. streamlit/static/static/js/{embed.C8qeQ38b.js → embed.oKwocwU8.js} +1 -1
  21. streamlit/static/static/js/{es6.Dpcc-U7U.js → es6.BRxlY_y5.js} +2 -2
  22. streamlit/static/static/js/{formatNumber.CPvuaBa8.js → formatNumber.DaagZyZe.js} +1 -1
  23. streamlit/static/static/js/{iconPosition.y0q-Rqem.js → iconPosition.Q3hNvmK4.js} +1 -1
  24. streamlit/static/static/js/{iframeResizer.contentWindow.DblExdXF.js → iframeResizer.contentWindow.B6EBvI9L.js} +1 -1
  25. streamlit/static/static/js/{index.aEeM0ekc.js → index.19_qtO6t.js} +1 -1
  26. streamlit/static/static/js/{index.Bxe7fKbw.js → index.43b777iP.js} +1 -1
  27. streamlit/static/static/js/{index.pgifwCIr.js → index.B03eQZoH.js} +1 -1
  28. streamlit/static/static/js/{index.DRFJgBf-.js → index.B9kZB0o1.js} +1 -1
  29. streamlit/static/static/js/{index.DZEQ0G7H.js → index.BAI9aHCq.js} +1 -1
  30. streamlit/static/static/js/{index.BTHi5W25.js → index.BF23fbfs.js} +1 -1
  31. streamlit/static/static/js/{index.BGufEmCz.js → index.BGBTkulf.js} +1 -1
  32. streamlit/static/static/js/{index.BZBWLU1C.js → index.BRfGUOQ-.js} +5 -5
  33. streamlit/static/static/js/{index.DvQ7-afx.js → index.BVT89mQw.js} +1 -1
  34. streamlit/static/static/js/{index.D42y-GeO.js → index.BXEC4cf3.js} +1 -1
  35. streamlit/static/static/js/{index.DppScppA.js → index.BbSFVZ3p.js} +1 -1
  36. streamlit/static/static/js/{index.BfZdZpv-.js → index.BkSwGJoh.js} +1 -1
  37. streamlit/static/static/js/{index.DB4MbQ40.js → index.BnfTPrHb.js} +1 -1
  38. streamlit/static/static/js/{index.C93QGPyk.js → index.BoX8d5rK.js} +1 -1
  39. streamlit/static/static/js/{index.DmQqT9OM.js → index.Boa0Egng.js} +1 -1
  40. streamlit/static/static/js/{index.B-g6lwYa.js → index.BzwlrgZO.js} +1 -1
  41. streamlit/static/static/js/{index.u2AvcQQT.js → index.C0fSEz-3.js} +1 -1
  42. streamlit/static/static/js/{index.BVN9cI-k.js → index.CCFwVy90.js} +1 -1
  43. streamlit/static/static/js/{index.CcMmNHAq.js → index.CCQ5p_WC.js} +1 -1
  44. streamlit/static/static/js/{index.C26ZOVFL.js → index.CFCBhOfx.js} +1 -1
  45. streamlit/static/static/js/{index.x4j6nnNb.js → index.CIbgt5wY.js} +1 -1
  46. streamlit/static/static/js/{index.BPMqWDef.js → index.CJ4oJe0V.js} +1 -1
  47. streamlit/static/static/js/{index.BXYgO5B8.js → index.CP-hoxJM.js} +1 -1
  48. streamlit/static/static/js/{index.BItU4jMo.js → index.CSfsEKCF.js} +1 -1
  49. streamlit/static/static/js/{index.BWOP7HFT.js → index.CVlg41MB.js} +1 -1
  50. streamlit/static/static/js/{index.CCDejIvL.js → index.CYE7b5Du.js} +1 -1
  51. streamlit/static/static/js/{index.eweE9HKU.js → index.Ca7MUNWJ.js} +1 -1
  52. streamlit/static/static/js/index.CrPjcPY1.js +1 -0
  53. streamlit/static/static/js/{index.B6vCS66f.js → index.CvB9JBqS.js} +5 -5
  54. streamlit/static/static/js/{index.kKkHk9Mc.js → index.CvIqsWy1.js} +1 -1
  55. streamlit/static/static/js/{index.MKI8t7l2.js → index.D1pK_Vw2.js} +1 -1
  56. streamlit/static/static/js/{index.gr6yGiCL.js → index.D6X2coHR.js} +1 -1
  57. streamlit/static/static/js/{index.DaU1ayM7.js → index.DGYHxruh.js} +1 -1
  58. streamlit/static/static/js/{index.Dla9XiNe.js → index.DJ7P09eb.js} +1 -1
  59. streamlit/static/static/js/{index.D69ULFWq.js → index.Dh5SAThV.js} +1 -1
  60. streamlit/static/static/js/{index.pMvzHC7z.js → index.Fu73QtkD.js} +1 -1
  61. streamlit/static/static/js/{index.C1ElSZEy.js → index.KN1VmyYN.js} +1 -1
  62. streamlit/static/static/js/{index.DTK-btqV.js → index.KtjGDGY5.js} +1 -1
  63. streamlit/static/static/js/{index.w2_VrtVw.js → index.OpATzEaW.js} +1 -1
  64. streamlit/static/static/js/{index.C7lwRBvF.js → index.QHnxuesF.js} +1 -1
  65. streamlit/static/static/js/{index.BDb0PRvK.js → index.QTaWooav.js} +1 -1
  66. streamlit/static/static/js/{index.VSsf6tsu.js → index.WXybx2Xq.js} +1 -1
  67. streamlit/static/static/js/{index.B9TG5Ah8.js → index.Xg-Qttib.js} +1 -1
  68. streamlit/static/static/js/{index.B10MmI2m.js → index.j4fnjyHo.js} +1 -1
  69. streamlit/static/static/js/{index.RRAKXgBZ.js → index.na9UBuse.js} +1 -1
  70. streamlit/static/static/js/{index.F-NmmwfK.js → index.pU9mQeVC.js} +1 -1
  71. streamlit/static/static/js/{index.Dr8b3Vn6.js → index.slgxPafU.js} +1 -1
  72. streamlit/static/static/js/{index.wv1DYVsn.js → index.whRT3Vm3.js} +1 -1
  73. streamlit/static/static/js/{input.BoJqOS7a.js → input.CPzINTl-.js} +1 -1
  74. streamlit/static/static/js/{main.B5XmUwmQ.js → main.DSPn8dUe.js} +1 -1
  75. streamlit/static/static/js/{memory.9izgq54V.js → memory.CfD8IGoU.js} +1 -1
  76. streamlit/static/static/js/{number-overlay-editor.PqOGQcLn.js → number-overlay-editor.4Ae0qegV.js} +1 -1
  77. streamlit/static/static/js/{pandasStylerUtils.DUtF2t3R.js → pandasStylerUtils.D2EjZ7k6.js} +1 -1
  78. streamlit/static/static/js/{sandbox.DgKTHPLO.js → sandbox.C6vcPIm0.js} +1 -1
  79. streamlit/static/static/js/{styled-components.D4x8jmOI.js → styled-components.BBmp8buj.js} +1 -1
  80. streamlit/static/static/js/{throttle.DxEHIIp7.js → throttle.BPcPpy-S.js} +1 -1
  81. streamlit/static/static/js/{timepicker.CDks5DWI.js → timepicker.ryzkTs2C.js} +1 -1
  82. streamlit/static/static/js/{toConsumableArray.CvTQRsV-.js → toConsumableArray.Dg1nDaB_.js} +1 -1
  83. streamlit/static/static/js/uniqueId.BFHzT5KQ.js +1 -0
  84. streamlit/static/static/js/{useBasicWidgetState.D6_b0IqA.js → useBasicWidgetState.A4U5lzAm.js} +1 -1
  85. streamlit/static/static/js/{useIntlLocale.Ctz17A7g.js → useIntlLocale.DWJgLlNz.js} +1 -1
  86. streamlit/static/static/js/{useTextInputAutoExpand.PAFB5o1T.js → useTextInputAutoExpand.BrBonw8t.js} +1 -1
  87. streamlit/static/static/js/{useUpdateUiValue.CcTvmGlb.js → useUpdateUiValue.BkOWyNVX.js} +1 -1
  88. streamlit/static/static/js/{useWaveformController.vLi36Ir4.js → useWaveformController.CBlvXlgZ.js} +1 -1
  89. streamlit/static/static/js/{withCalculatedWidth.BtA2jL5-.js → withCalculatedWidth.D4cpOyNe.js} +1 -1
  90. streamlit/static/static/js/{withFullScreenWrapper.CeeoYBpc.js → withFullScreenWrapper.BMim3w94.js} +1 -1
  91. streamlit/user_info.py +6 -4
  92. streamlit/web/server/browser_websocket_handler.py +2 -2
  93. streamlit/web/server/oauth_authlib_routes.py +97 -20
  94. {streamlit_nightly-1.52.3.dev20260110.dist-info → streamlit_nightly-1.52.3.dev20260112.dist-info}/METADATA +1 -1
  95. {streamlit_nightly-1.52.3.dev20260110.dist-info → streamlit_nightly-1.52.3.dev20260112.dist-info}/RECORD +99 -99
  96. streamlit/static/static/js/index.q83b8_8b.js +0 -1
  97. streamlit/static/static/js/uniqueId.RScLN3St.js +0 -1
  98. {streamlit_nightly-1.52.3.dev20260110.data → streamlit_nightly-1.52.3.dev20260112.data}/scripts/streamlit.cmd +0 -0
  99. {streamlit_nightly-1.52.3.dev20260110.dist-info → streamlit_nightly-1.52.3.dev20260112.dist-info}/WHEEL +0 -0
  100. {streamlit_nightly-1.52.3.dev20260110.dist-info → streamlit_nightly-1.52.3.dev20260112.dist-info}/entry_points.txt +0 -0
  101. {streamlit_nightly-1.52.3.dev20260110.dist-info → streamlit_nightly-1.52.3.dev20260112.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.Dzo9A4l6.js","./index.BZBWLU1C.js","../css/index.BUP6fTcR.css","./withFullScreenWrapper.CeeoYBpc.js","./Toolbar.CuMH-Gqe.js","./FormClearHelper.Cm3GDSk6.js","./moment.C7qA8nIE.js","./pandasStylerUtils.DUtF2t3R.js","./numbro.B9_PXfzp.js","./_baseIndexOf.BTknn6Gb.js","./index.8HslT92O.js","./main.B5XmUwmQ.js","./throttle.DxEHIIp7.js","./formatNumber.CPvuaBa8.js","./sprintf.DpPCfzXw.js","./formatMoment.C6Hwn6X5.js","./checkbox.BzMHUSz1.js","./createDownloadLinkElement.CviG5BQx.js","./toConsumableArray.CvTQRsV-.js","./FileDownload.esm.CtJWBuub.js","./_arrayIncludes.B19Iyn2B.js","./number-overlay-editor.PqOGQcLn.js","./es6.Dpcc-U7U.js"])))=>i.map(i=>d[i]);
2
- import{at as Ga,df as ah,dg as lh,cL as gc,dh as sh,di as uh,dj as ch,dk as dh,dl as fh,dm as hh,dn as Xa,dp as pc,aT as gh,aU as ph,r as f,E as Ol,_ as ze,H as Ya,an as mo,bF as mh,dq as vh,aD as zt,dr as bh,O as kr,ds as Os,aR as Pl,K as wh,e as Pe,bG as mc,n as ct,dt as yh,j as Ve,du as Ch,F as jn,ab as en,bh as Sh,ae as xh,dv as kh,dw as Mh,m as vo,b1 as bi,aS as Rh,dx as Ih,dy as Eh,dz as vc,cf as Th,cd as Dh,dA as bc,dB as Oh,dC as Ph,cc as wc,cg as Lh,dD as Fh,cb as _h,dE as Ah,bf as Hh,bg as zh,ci as Vh,dF as $h,Q as Nh,dG as Bh,cj as Wh,dH as Uh,R as Gh,l as Ur,N as Yt,W as Ll,d2 as Xh,dI as rr,d9 as ur,dJ as Oe,dK as Le,c_ as _o,cW as Yh,al as yc,dL as Cc,a4 as jh,cX as qh,cY as Kh,cZ as Zh,d0 as Jh,dM as Qh,dN as eg,bj as ja,cU as tg,a0 as Sc,ay as wa,dO as xc,o as pn,Z as Un,aM as ya,aK as ng,aL as kc,aj as rg,dP as ig,q as og,X as Ps,dQ as ag,dR as lg,k as sg,L as ug,dS as cg,s as Ls}from"./index.BZBWLU1C.js";import{w as dg,E as fg}from"./withFullScreenWrapper.CeeoYBpc.js";import{T as hg,a as mi}from"./Toolbar.CuMH-Gqe.js";import{u as gg}from"./FormClearHelper.Cm3GDSk6.js";import{h as $r}from"./moment.C7qA8nIE.js";import{r as pg,m as Fs,f as ml,c as mg,a as vg}from"./pandasStylerUtils.DUtF2t3R.js";import{n as bg}from"./numbro.B9_PXfzp.js";import{l as qa}from"./index.8HslT92O.js";import{R as wg}from"./main.B5XmUwmQ.js";import{d as Mc,t as yg}from"./throttle.DxEHIIp7.js";import{f as ra}from"./formatNumber.CPvuaBa8.js";import{f as _s}from"./formatMoment.C6Hwn6X5.js";import{L as Cg,a as Sg,S as xg}from"./checkbox.BzMHUSz1.js";import{c as kg}from"./createDownloadLinkElement.CviG5BQx.js";import{_ as Mi,C as Mg}from"./toConsumableArray.CvTQRsV-.js";import{D as Rg,F as Ig}from"./FileDownload.esm.CtJWBuub.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 zn(e,t,n){return n===void 0&&(n=t,t=void 0),n!==void 0&&(n=Ga(n),n=n===n?n:0),t!==void 0&&(t=Ga(t),t=t===t?t:0),Dg(Ga(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&&ah(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(lh(e)&&(gc(e)||typeof e=="string"||typeof e.splice=="function"||sh(e)||uh(e)||ch(e)))return!e.length;var t=dh(e);if(t==_g||t==Ag)return!e.size;if(fh(e))return!hh(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,l=!0,a=[],s=a;if(o>=Bg){var u=Ng(e);if(u)return pc(u);l=!1,i=ph,s=new gh}else s=a;e:for(;++r<o;){var c=e[r],d=c;if(c=c!==0?c:0,l&&d===d){for(var g=s.length;g--;)if(s[g]===d)continue e;a.push(c)}else i(s,d,n)||(s!==a&&s.push(d),a.push(c))}return a}function Ug(e){return e&&e.length?Wg(e):[]}var Rc=f.forwardRef(function(e,t){var n={fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"};return f.createElement(Ol,ze({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"}))});Rc.displayName="Add";var Ic=f.forwardRef(function(e,t){var n={fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"};return f.createElement(Ol,ze({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"}))});Ic.displayName="Search";var Ec=f.forwardRef(function(e,t){var n={fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"};return f.createElement(Ol,ze({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"}))});Ec.displayName="Visibility";function Tc(e="This should not happen"){throw new Error(e)}function Pn(e,t="Assertion failed"){if(!e)return Tc(t)}function lo(e,t){return Tc(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,Fl=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===Vn.Marker||e.kind===Vn.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 Xg(e){return Fg(e,"editor")}function _l(e){return!(e.readonly??!1)}var Vn;(function(e){e.NewRow="new-row",e.Marker="marker"})(Vn||(Vn={}));const aa={shape:"square",size:4,offsetX:-2,offsetY:-2,outline:0};function Ka(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(Ka(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=Ka(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=Ka([...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,l]of n.entries()){const[a,s]=l;if(a<=i&&r<=s){const u=[];a<r&&u.push([a,r]),i<s&&u.push([i,s]),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 Yg=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[,s]=a.split("_");n[s]=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=Yg,jg=e=>e.toUpperCase()===e,qg=e=>t=>e.indexOf(t)===-1,Dc=(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=Dc(t,n);if(!e){const i=typeof Ya=="function"?{default:Ya}:Ya;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,l)=>{const{as:a=e,class:s=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=l,c.className=n.atomic?$s(n.class,c.className||s):$s(c.className||s,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]||"",k=typeof v=="function"?v(o):v;Zg(k,n.name),g[`--${m}`]=`${k}${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 l=Dc(o,["innerRef"]);return r(l,o.innerRef)});return i.displayName=n.name,i.__wyw_meta={className:n.class||t,extends:e},i}}var an=Jg;const Qg=an("div")({name:"ImageOverlayEditorStyle",class:"gdg-i2iowwq",propsAsIs:!1});var Za={},Wi={},Ho={},zo={},Ns;function ep(){return Ns||(Ns=1,(function(e){(function(t,n){n(e,mo(),mh())})(zo,function(t,n,r){Object.defineProperty(t,"__esModule",{value:!0}),t.setHasSupportToCaptureOption=p;var i=l(n),o=l(r);function l(b){return b&&b.__esModule?b:{default:b}}var a=Object.assign||function(b){for(var k=1;k<arguments.length;k++){var E=arguments[k];for(var M in E)Object.prototype.hasOwnProperty.call(E,M)&&(b[M]=E[M])}return b};function s(b,k){var E={};for(var M in b)k.indexOf(M)>=0||Object.prototype.hasOwnProperty.call(b,M)&&(E[M]=b[M]);return E}function u(b,k){if(!(b instanceof k))throw new TypeError("Cannot call a class as a function")}var c=(function(){function b(k,E){for(var M=0;M<E.length;M++){var I=E[M];I.enumerable=I.enumerable||!1,I.configurable=!0,"value"in I&&(I.writable=!0),Object.defineProperty(k,I.key,I)}}return function(k,E,M){return E&&b(k.prototype,E),M&&b(k,M),k}})();function d(b,k){if(!b)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return k&&(typeof k=="object"||typeof k=="function")?k:b}function g(b,k){if(typeof k!="function"&&k!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof k);b.prototype=Object.create(k&&k.prototype,{constructor:{value:b,enumerable:!1,writable:!0,configurable:!0}}),k&&(Object.setPrototypeOf?Object.setPrototypeOf(b,k):b.__proto__=k)}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 k=b.touches[0],E=k.pageX,M=k.pageY;return{x:E,y:M}}var I=b.screenX,D=b.screenY;return{x:I,y:D}}var v=(function(b){g(k,b);function k(){var E;u(this,k);for(var M=arguments.length,I=Array(M),D=0;D<M;D++)I[D]=arguments[D];var S=d(this,(E=k.__proto__||Object.getPrototypeOf(k)).call.apply(E,[this].concat(I)));return S._handleSwipeStart=S._handleSwipeStart.bind(S),S._handleSwipeMove=S._handleSwipeMove.bind(S),S._handleSwipeEnd=S._handleSwipeEnd.bind(S),S._onMouseDown=S._onMouseDown.bind(S),S._onMouseMove=S._onMouseMove.bind(S),S._onMouseUp=S._onMouseUp.bind(S),S._setSwiperRef=S._setSwiperRef.bind(S),S}return c(k,[{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(M){this.props.allowMouseEvents&&(this.mouseDown=!0,document.addEventListener("mouseup",this._onMouseUp),document.addEventListener("mousemove",this._onMouseMove),this._handleSwipeStart(M))}},{key:"_onMouseMove",value:function(M){this.mouseDown&&this._handleSwipeMove(M)}},{key:"_onMouseUp",value:function(M){this.mouseDown=!1,document.removeEventListener("mouseup",this._onMouseUp),document.removeEventListener("mousemove",this._onMouseMove),this._handleSwipeEnd(M)}},{key:"_handleSwipeStart",value:function(M){var I=y(M),D=I.x,S=I.y;this.moveStart={x:D,y:S},this.props.onSwipeStart(M)}},{key:"_handleSwipeMove",value:function(M){if(this.moveStart){var I=y(M),D=I.x,S=I.y,C=D-this.moveStart.x,L=S-this.moveStart.y;this.moving=!0;var T=this.props.onSwipeMove({x:C,y:L},M);T&&M.cancelable&&M.preventDefault(),this.movePosition={deltaX:C,deltaY:L}}}},{key:"_handleSwipeEnd",value:function(M){this.props.onSwipeEnd(M);var I=this.props.tolerance;this.moving&&this.movePosition&&(this.movePosition.deltaX<-I?this.props.onSwipeLeft(1,M):this.movePosition.deltaX>I&&this.props.onSwipeRight(1,M),this.movePosition.deltaY<-I?this.props.onSwipeUp(1,M):this.movePosition.deltaY>I&&this.props.onSwipeDown(1,M)),this.moveStart=null,this.moving=!1,this.movePosition=null}},{key:"_setSwiperRef",value:function(M){this.swiper=M,this.props.innerRef(M)}},{key:"render",value:function(){var M=this.props;M.tagName;var I=M.className,D=M.style,S=M.children;M.allowMouseEvents,M.onSwipeUp,M.onSwipeDown,M.onSwipeLeft,M.onSwipeRight,M.onSwipeStart,M.onSwipeMove,M.onSwipeEnd,M.innerRef,M.tolerance;var C=s(M,["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:I,style:D},C),S)}}]),k})(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 Oc(){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 Pc(){if(Ws)return Ui;Ws=1,Object.defineProperty(Ui,"__esModule",{value:!0}),Ui.default=void 0;var e=t(vh());function t(i){return i&&i.__esModule?i:{default:i}}function n(i,o,l){return o in i?Object.defineProperty(i,o,{value:l,enumerable:!0,configurable:!0,writable:!0}):i[o]=l,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,l){return(0,e.default)({"thumbs-wrapper":!o,"slider-wrapper":o,"axis-horizontal":l==="horizontal","axis-vertical":l!=="horizontal"})},SLIDER:function(o,l){return(0,e.default)({thumbs:!o,slider:o,animated:!l})},ITEM:function(o,l,a){return(0,e.default)({thumb:!o,slide:o,selected:l,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={},Xi={},Us;function tp(){if(Us)return Xi;Us=1,Object.defineProperty(Xi,"__esModule",{value:!0}),Xi.outerWidth=void 0;var e=function(n){var r=n.offsetWidth,i=getComputedStyle(n);return r+=parseInt(i.marginLeft)+parseInt(i.marginRight),r};return Xi.outerWidth=e,Xi}var Yi={},Gs;function Al(){if(Gs)return Yi;Gs=1,Object.defineProperty(Yi,"__esModule",{value:!0}),Yi.default=void 0;var e=function(n,r,i){var o=n===0?n:n+r,l=i==="horizontal"?[o,0,0]:[0,o,0],a="translate3d",s="("+l.join(",")+")";return a+s};return Yi.default=e,Yi}var ji={},Xs;function Lc(){if(Xs)return ji;Xs=1,Object.defineProperty(ji,"__esModule",{value:!0}),ji.default=void 0;var e=function(){return window};return ji.default=e,ji}var Ys;function Fc(){if(Ys)return Gi;Ys=1,Object.defineProperty(Gi,"__esModule",{value:!0}),Gi.default=void 0;var e=s(mo()),t=l(Pc()),n=tp(),r=l(Al()),i=l(Oc()),o=l(Lc());function l(S){return S&&S.__esModule?S:{default:S}}function a(){if(typeof WeakMap!="function")return null;var S=new WeakMap;return a=function(){return S},S}function s(S){if(S&&S.__esModule)return S;if(S===null||u(S)!=="object"&&typeof S!="function")return{default:S};var C=a();if(C&&C.has(S))return C.get(S);var L={},T=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var x in S)if(Object.prototype.hasOwnProperty.call(S,x)){var O=T?Object.getOwnPropertyDescriptor(S,x):null;O&&(O.get||O.set)?Object.defineProperty(L,x,O):L[x]=S[x]}return L.default=S,C&&C.set(S,L),L}function u(S){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?u=function(L){return typeof L}:u=function(L){return L&&typeof Symbol=="function"&&L.constructor===Symbol&&L!==Symbol.prototype?"symbol":typeof L},u(S)}function c(){return c=Object.assign||function(S){for(var C=1;C<arguments.length;C++){var L=arguments[C];for(var T in L)Object.prototype.hasOwnProperty.call(L,T)&&(S[T]=L[T])}return S},c.apply(this,arguments)}function d(S,C){if(!(S instanceof C))throw new TypeError("Cannot call a class as a function")}function g(S,C){for(var L=0;L<C.length;L++){var T=C[L];T.enumerable=T.enumerable||!1,T.configurable=!0,"value"in T&&(T.writable=!0),Object.defineProperty(S,T.key,T)}}function h(S,C,L){return C&&g(S.prototype,C),S}function p(S,C){if(typeof C!="function"&&C!==null)throw new TypeError("Super expression must either be null or a function");S.prototype=Object.create(C&&C.prototype,{constructor:{value:S,writable:!0,configurable:!0}}),C&&m(S,C)}function m(S,C){return m=Object.setPrototypeOf||function(T,x){return T.__proto__=x,T},m(S,C)}function y(S){var C=k();return function(){var T=E(S),x;if(C){var O=E(this).constructor;x=Reflect.construct(T,arguments,O)}else x=T.apply(this,arguments);return v(this,x)}}function v(S,C){return C&&(u(C)==="object"||typeof C=="function")?C:b(S)}function b(S){if(S===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return S}function k(){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 E(S){return E=Object.setPrototypeOf?Object.getPrototypeOf:function(L){return L.__proto__||Object.getPrototypeOf(L)},E(S)}function M(S,C,L){return C in S?Object.defineProperty(S,C,{value:L,enumerable:!0,configurable:!0,writable:!0}):S[C]=L,S}var I=function(C){return C.hasOwnProperty("key")},D=(function(S){p(L,S);var C=y(L);function L(T){var x;return d(this,L),x=C.call(this,T),M(b(x),"itemsWrapperRef",void 0),M(b(x),"itemsListRef",void 0),M(b(x),"thumbsRef",void 0),M(b(x),"setItemsWrapperRef",function(O){x.itemsWrapperRef=O}),M(b(x),"setItemsListRef",function(O){x.itemsListRef=O}),M(b(x),"setThumbsRef",function(O,P){x.thumbsRef||(x.thumbsRef=[]),x.thumbsRef[P]=O}),M(b(x),"updateSizes",function(){if(!(!x.props.children||!x.itemsWrapperRef||!x.thumbsRef)){var O=e.Children.count(x.props.children),P=x.itemsWrapperRef.clientWidth,R=x.props.thumbWidth?x.props.thumbWidth:(0,n.outerWidth)(x.thumbsRef[0]),$=Math.floor(P/R),W=$<O,j=W?O-$:0;x.setState(function(oe,Q){return{itemSize:R,visibleItems:$,firstItem:W?x.getFirstItem(Q.selectedItem):0,lastPosition:j,showArrows:W}})}}),M(b(x),"handleClickItem",function(O,P,R){if(!I(R)||R.key==="Enter"){var $=x.props.onSelectItem;typeof $=="function"&&$(O,P)}}),M(b(x),"onSwipeStart",function(){x.setState({swiping:!0})}),M(b(x),"onSwipeEnd",function(){x.setState({swiping:!1})}),M(b(x),"onSwipeMove",function(O){var P=O.x;if(!x.state.itemSize||!x.itemsWrapperRef||!x.state.visibleItems)return!1;var R=0,$=e.Children.count(x.props.children),W=-(x.state.firstItem*100)/x.state.visibleItems,j=Math.max($-x.state.visibleItems,0),oe=-j*100/x.state.visibleItems;W===R&&P>0&&(P=0),W===oe&&P<0&&(P=0);var Q=x.itemsWrapperRef.clientWidth,re=W+100/(Q/P);return x.itemsListRef&&["WebkitTransform","MozTransform","MsTransform","OTransform","transform","msTransform"].forEach(function(se){x.itemsListRef.style[se]=(0,r.default)(re,"%",x.props.axis)}),!0}),M(b(x),"slideRight",function(O){x.moveTo(x.state.firstItem-(typeof O=="number"?O:1))}),M(b(x),"slideLeft",function(O){x.moveTo(x.state.firstItem+(typeof O=="number"?O:1))}),M(b(x),"moveTo",function(O){O=O<0?0:O,O=O>=x.state.lastPosition?x.state.lastPosition:O,x.setState({firstItem:O})}),x.state={selectedItem:T.selectedItem,swiping:!1,showArrows:!1,firstItem:0,visibleItems:0,lastPosition:0},x}return h(L,[{key:"componentDidMount",value:function(){this.setupThumbs()}},{key:"componentDidUpdate",value:function(x){this.props.selectedItem!==this.state.selectedItem&&this.setState({selectedItem:this.props.selectedItem,firstItem:this.getFirstItem(this.props.selectedItem)}),this.props.children!==x.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(x){var O=x;return x>=this.state.lastPosition&&(O=this.state.lastPosition),x<this.state.firstItem+this.state.visibleItems&&(O=this.state.firstItem),x<this.state.firstItem&&(O=x),O}},{key:"renderItems",value:function(){var x=this;return this.props.children.map(function(O,P){var R=t.default.ITEM(!1,P===x.state.selectedItem),$={key:P,ref:function(j){return x.setThumbsRef(j,P)},className:R,onClick:x.handleClickItem.bind(x,P,x.props.children[P]),onKeyDown:x.handleClickItem.bind(x,P,x.props.children[P]),"aria-label":"".concat(x.props.labels.item," ").concat(P+1),style:{width:x.props.thumbWidth}};return e.default.createElement("li",c({},$,{role:"button",tabIndex:0}),O)})}},{key:"render",value:function(){var x=this;if(!this.props.children)return null;var O=e.Children.count(this.props.children)>1,P=this.state.showArrows&&this.state.firstItem>0,R=this.state.showArrows&&this.state.firstItem<this.state.lastPosition,$={},W=-this.state.firstItem*(this.state.itemSize||0),j=(0,r.default)(W,"px",this.props.axis),oe=this.props.transitionTime+"ms";return $={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(!P),onClick:function(){return x.slideRight()},"aria-label":this.props.labels.leftArrow}),O?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:$,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 x.setItemsListRef(re)},style:$},this.renderItems()),e.default.createElement("button",{type:"button",className:t.default.ARROW_NEXT(!R),onClick:function(){return x.slideLeft()},"aria-label":this.props.labels.rightArrow})))}}]),L})(e.Component);return Gi.default=D,M(D,"displayName","Thumbs"),M(D,"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 _c(){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(Al());function n(s){return s&&s.__esModule?s:{default:s}}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 l=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=l;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 Wn={},Ks;function rp(){if(Ks)return Wn;Ks=1,Object.defineProperty(Wn,"__esModule",{value:!0}),Wn.fadeAnimationHandler=Wn.slideStopSwipingHandler=Wn.slideSwipeAnimationHandler=Wn.slideAnimationHandler=void 0;var e=mo(),t=r(Al()),n=_c();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){l(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 l(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 k=(0,n.getPosition)(m,g),E=(0,t.default)(k,"%",g.axis),M=g.transitionTime+"ms";return p.itemListStyle={WebkitTransform:E,msTransform:E,OTransform:E,transform:E},h.swiping||(p.itemListStyle=o(o({},p.itemListStyle),{},{WebkitTransitionDuration:M,MozTransitionDuration:M,OTransitionDuration:M,transitionDuration:M,msTransitionDuration:M})),p};Wn.slideAnimationHandler=a;var s=function(g,h,p,m){var y={},v=h.axis==="horizontal",b=e.Children.count(h.children),k=0,E=(0,n.getPosition)(p.selectedItem,h),M=h.infiniteLoop?(0,n.getPosition)(b-1,h)-100:(0,n.getPosition)(b-1,h),I=v?g.x:g.y,D=I;E===k&&I>0&&(D=0),E===M&&I<0&&(D=0);var S=E+100/(p.itemSize/D),C=Math.abs(I)>h.swipeScrollTolerance;return h.infiniteLoop&&C&&(p.selectedItem===0&&S>-100?S-=b*100:p.selectedItem===b-1&&S<-b*100&&(S+=b*100)),(!h.preventMovementUntilSwipeScrollTolerance||C||p.swipeMovementStarted)&&(p.swipeMovementStarted||m({swipeMovementStarted:!0}),y.itemListStyle=(0,n.setPosition)(S,h.axis)),C&&!p.cancelClick&&m({cancelClick:!0}),y};Wn.slideSwipeAnimationHandler=s;var u=function(g,h){var p=(0,n.getPosition)(h.selectedItem,g),m=(0,n.setPosition)(p,g.axis);return{itemListStyle:m}};Wn.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 Wn.fadeAnimationHandler=c,Wn}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=s(Oc()),n=s(Pc()),r=s(Fc()),i=s(np()),o=s(Lc()),l=_c(),a=rp();function s(T){return T&&T.__esModule?T:{default:T}}function u(){if(typeof WeakMap!="function")return null;var T=new WeakMap;return u=function(){return T},T}function c(T){if(T&&T.__esModule)return T;if(T===null||d(T)!=="object"&&typeof T!="function")return{default:T};var x=u();if(x&&x.has(T))return x.get(T);var O={},P=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var R in T)if(Object.prototype.hasOwnProperty.call(T,R)){var $=P?Object.getOwnPropertyDescriptor(T,R):null;$&&($.get||$.set)?Object.defineProperty(O,R,$):O[R]=T[R]}return O.default=T,x&&x.set(T,O),O}function d(T){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?d=function(O){return typeof O}:d=function(O){return O&&typeof Symbol=="function"&&O.constructor===Symbol&&O!==Symbol.prototype?"symbol":typeof O},d(T)}function g(){return g=Object.assign||function(T){for(var x=1;x<arguments.length;x++){var O=arguments[x];for(var P in O)Object.prototype.hasOwnProperty.call(O,P)&&(T[P]=O[P])}return T},g.apply(this,arguments)}function h(T,x){var O=Object.keys(T);if(Object.getOwnPropertySymbols){var P=Object.getOwnPropertySymbols(T);x&&(P=P.filter(function(R){return Object.getOwnPropertyDescriptor(T,R).enumerable})),O.push.apply(O,P)}return O}function p(T){for(var x=1;x<arguments.length;x++){var O=arguments[x]!=null?arguments[x]:{};x%2?h(Object(O),!0).forEach(function(P){C(T,P,O[P])}):Object.getOwnPropertyDescriptors?Object.defineProperties(T,Object.getOwnPropertyDescriptors(O)):h(Object(O)).forEach(function(P){Object.defineProperty(T,P,Object.getOwnPropertyDescriptor(O,P))})}return T}function m(T,x){if(!(T instanceof x))throw new TypeError("Cannot call a class as a function")}function y(T,x){for(var O=0;O<x.length;O++){var P=x[O];P.enumerable=P.enumerable||!1,P.configurable=!0,"value"in P&&(P.writable=!0),Object.defineProperty(T,P.key,P)}}function v(T,x,O){return x&&y(T.prototype,x),T}function b(T,x){if(typeof x!="function"&&x!==null)throw new TypeError("Super expression must either be null or a function");T.prototype=Object.create(x&&x.prototype,{constructor:{value:T,writable:!0,configurable:!0}}),x&&k(T,x)}function k(T,x){return k=Object.setPrototypeOf||function(P,R){return P.__proto__=R,P},k(T,x)}function E(T){var x=D();return function(){var P=S(T),R;if(x){var $=S(this).constructor;R=Reflect.construct(P,arguments,$)}else R=P.apply(this,arguments);return M(this,R)}}function M(T,x){return x&&(d(x)==="object"||typeof x=="function")?x:I(T)}function I(T){if(T===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return T}function D(){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 S(T){return S=Object.setPrototypeOf?Object.getPrototypeOf:function(O){return O.__proto__||Object.getPrototypeOf(O)},S(T)}function C(T,x,O){return x in T?Object.defineProperty(T,x,{value:O,enumerable:!0,configurable:!0,writable:!0}):T[x]=O,T}var L=(function(T){b(O,T);var x=E(O);function O(P){var R;m(this,O),R=x.call(this,P),C(I(R),"thumbsRef",void 0),C(I(R),"carouselWrapperRef",void 0),C(I(R),"listRef",void 0),C(I(R),"itemsRef",void 0),C(I(R),"timer",void 0),C(I(R),"animationHandler",void 0),C(I(R),"setThumbsRef",function(W){R.thumbsRef=W}),C(I(R),"setCarouselWrapperRef",function(W){R.carouselWrapperRef=W}),C(I(R),"setListRef",function(W){R.listRef=W}),C(I(R),"setItemsRef",function(W,j){R.itemsRef||(R.itemsRef=[]),R.itemsRef[j]=W}),C(I(R),"autoPlay",function(){e.Children.count(R.props.children)<=1||(R.clearAutoPlay(),R.props.autoPlay&&(R.timer=setTimeout(function(){R.increment()},R.props.interval)))}),C(I(R),"clearAutoPlay",function(){R.timer&&clearTimeout(R.timer)}),C(I(R),"resetAutoPlay",function(){R.clearAutoPlay(),R.autoPlay()}),C(I(R),"stopOnHover",function(){R.setState({isMouseEntered:!0},R.clearAutoPlay)}),C(I(R),"startOnLeave",function(){R.setState({isMouseEntered:!1},R.autoPlay)}),C(I(R),"isFocusWithinTheCarousel",function(){return R.carouselWrapperRef?!!((0,i.default)().activeElement===R.carouselWrapperRef||R.carouselWrapperRef.contains((0,i.default)().activeElement)):!1}),C(I(R),"navigateWithKeyboard",function(W){if(R.isFocusWithinTheCarousel()){var j=R.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?R.increment():se===W.keyCode&&R.decrement()}}),C(I(R),"updateSizes",function(){if(!(!R.state.initialized||!R.itemsRef||R.itemsRef.length===0)){var W=R.props.axis==="horizontal",j=R.itemsRef[0];if(j){var oe=W?j.clientWidth:j.clientHeight;R.setState({itemSize:oe}),R.thumbsRef&&R.thumbsRef.updateSizes()}}}),C(I(R),"setMountState",function(){R.setState({hasMount:!0}),R.updateSizes()}),C(I(R),"handleClickItem",function(W,j){if(e.Children.count(R.props.children)!==0){if(R.state.cancelClick){R.setState({cancelClick:!1});return}R.props.onClickItem(W,j),W!==R.state.selectedItem&&R.setState({selectedItem:W})}}),C(I(R),"handleOnChange",function(W,j){e.Children.count(R.props.children)<=1||R.props.onChange(W,j)}),C(I(R),"handleClickThumb",function(W,j){R.props.onClickThumb(W,j),R.moveTo(W)}),C(I(R),"onSwipeStart",function(W){R.setState({swiping:!0}),R.props.onSwipeStart(W)}),C(I(R),"onSwipeEnd",function(W){R.setState({swiping:!1,cancelClick:!1,swipeMovementStarted:!1}),R.props.onSwipeEnd(W),R.clearAutoPlay(),R.state.autoPlay&&R.autoPlay()}),C(I(R),"onSwipeMove",function(W,j){R.props.onSwipeMove(j);var oe=R.props.swipeAnimationHandler(W,R.props,R.state,R.setState.bind(I(R)));return R.setState(p({},oe)),!!Object.keys(oe).length}),C(I(R),"decrement",function(){var W=arguments.length>0&&arguments[0]!==void 0?arguments[0]:1;R.moveTo(R.state.selectedItem-(typeof W=="number"?W:1))}),C(I(R),"increment",function(){var W=arguments.length>0&&arguments[0]!==void 0?arguments[0]:1;R.moveTo(R.state.selectedItem+(typeof W=="number"?W:1))}),C(I(R),"moveTo",function(W){if(typeof W=="number"){var j=e.Children.count(R.props.children)-1;W<0&&(W=R.props.infiniteLoop?j:0),W>j&&(W=R.props.infiniteLoop?0:j),R.selectItem({selectedItem:W}),R.state.autoPlay&&R.state.isMouseEntered===!1&&R.resetAutoPlay()}}),C(I(R),"onClickNext",function(){R.increment(1)}),C(I(R),"onClickPrev",function(){R.decrement(1)}),C(I(R),"onSwipeForward",function(){R.increment(1),R.props.emulateTouch&&R.setState({cancelClick:!0})}),C(I(R),"onSwipeBackwards",function(){R.decrement(1),R.props.emulateTouch&&R.setState({cancelClick:!0})}),C(I(R),"changeItem",function(W){return function(j){(!(0,l.isKeyboardEvent)(j)||j.key==="Enter")&&R.moveTo(W)}}),C(I(R),"selectItem",function(W){R.setState(p({previousItem:R.state.selectedItem},W),function(){R.setState(R.animationHandler(R.props,R.state))}),R.handleOnChange(W.selectedItem,e.Children.toArray(R.props.children)[W.selectedItem])}),C(I(R),"getInitialImage",function(){var W=R.props.selectedItem,j=R.itemsRef&&R.itemsRef[W],oe=j&&j.getElementsByTagName("img")||[];return oe[0]}),C(I(R),"getVariableItemHeight",function(W){var j=R.itemsRef&&R.itemsRef[W];if(R.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(){R.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 $={initialized:!1,previousItem:P.selectedItem,selectedItem:P.selectedItem,hasMount:!1,isMouseEntered:!1,autoPlay:P.autoPlay,swiping:!1,swipeMovementStarted:!1,cancelClick:!1,itemSize:1,itemListStyle:{},slideStyle:{},selectedStyle:{},prevStyle:{}};return R.animationHandler=typeof P.animationHandler=="function"&&P.animationHandler||P.animationHandler==="fade"&&a.fadeAnimationHandler||a.slideAnimationHandler,R.state=p(p({},$),R.animationHandler(P,$)),R}return v(O,[{key:"componentDidMount",value:function(){this.props.children&&this.setupCarousel()}},{key:"componentDidUpdate",value:function(R,$){!R.children&&this.props.children&&!this.state.initialized&&this.setupCarousel(),!R.autoFocus&&this.props.autoFocus&&this.forceFocus(),$.swiping&&!this.state.swiping&&this.setState(p({},this.props.stopSwipingHandler(this.props,this.state))),(R.selectedItem!==this.props.selectedItem||R.centerMode!==this.props.centerMode)&&(this.updateSizes(),this.moveTo(this.props.selectedItem)),R.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 R=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 $=R.getInitialImage();$&&!$.complete?$.addEventListener("load",R.setMountState):R.setMountState()})}},{key:"destroyCarousel",value:function(){this.state.initialized&&(this.unbindEvents(),this.destroyAutoPlay())}},{key:"setupAutoPlay",value:function(){this.autoPlay();var R=this.carouselWrapperRef;this.props.stopOnHover&&R&&(R.addEventListener("mouseenter",this.stopOnHover),R.addEventListener("mouseleave",this.startOnLeave))}},{key:"destroyAutoPlay",value:function(){this.clearAutoPlay();var R=this.carouselWrapperRef;this.props.stopOnHover&&R&&(R.removeEventListener("mouseenter",this.stopOnHover),R.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 R=this.getInitialImage();R&&R.removeEventListener("load",this.setMountState),this.props.useKeyboardArrows&&(0,i.default)().removeEventListener("keydown",this.navigateWithKeyboard)}},{key:"forceFocus",value:function(){var R;(R=this.carouselWrapperRef)===null||R===void 0||R.focus()}},{key:"renderItems",value:function(R){var $=this;return this.props.children?e.Children.map(this.props.children,function(W,j){var oe=j===$.state.selectedItem,Q=j===$.state.previousItem,re=oe&&$.state.selectedStyle||Q&&$.state.prevStyle||$.state.slideStyle||{};$.props.centerMode&&$.props.axis==="horizontal"&&(re=p(p({},re),{},{minWidth:$.props.centerSlidePercentage+"%"})),$.state.swiping&&$.state.swipeMovementStarted&&(re=p(p({},re),{},{pointerEvents:"none"}));var se={ref:function(de){return $.setItemsRef(de,j)},key:"itemKey"+j+(R?"clone":""),className:n.default.ITEM(!0,j===$.state.selectedItem,j===$.state.previousItem),onClick:$.handleClickItem.bind($,j,W),style:re};return e.default.createElement("li",se,$.props.renderItem(W,{isSelected:j===$.state.selectedItem,isPrevious:j===$.state.previousItem}))}):[]}},{key:"renderControls",value:function(){var R=this,$=this.props,W=$.showIndicators,j=$.labels,oe=$.renderIndicator,Q=$.children;return W?e.default.createElement("ul",{className:"control-dots"},e.Children.map(Q,function(re,se){return oe&&oe(R.changeItem(se),se===R.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 R=this;if(!this.props.children||e.Children.count(this.props.children)===0)return null;var $=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},$?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(F){return R.setListRef(F)},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())}}]),O})(e.default.Component);return Wi.default=L,C(L,"displayName","Carousel"),C(L,"defaultProps",{ariaLabel:void 0,axis:"horizontal",centerSlidePercentage:80,interval:3e3,labels:{leftArrow:"previous slide / item",rightArrow:"next slide / item",item:"slide item"},onClickItem:l.noop,onClickThumb:l.noop,onChange:l.noop,onSwipeStart:function(){},onSwipeEnd:function(){},onSwipeMove:function(){return!1},preventMovementUntilSwipeScrollTolerance:!1,renderArrowPrev:function(x,O,P){return e.default.createElement("button",{type:"button","aria-label":P,className:n.default.ARROW_PREV(!O),onClick:x})},renderArrowNext:function(x,O,P){return e.default.createElement("button",{type:"button","aria-label":P,className:n.default.ARROW_NEXT(!O),onClick:x})},renderIndicator:function(x,O,P,R){return e.default.createElement("li",{className:n.default.DOT(O),onClick:x,onKeyDown:x,value:P,key:P,role:"button",tabIndex:0,"aria-label":"".concat(R," ").concat(P+1)})},renderItem:function(x){return x},renderThumbs:function(x){var O=e.Children.map(x,function(P){var R=P;if(P.type!=="img"&&(R=e.Children.toArray(P.props.children).find(function($){return $.type==="img"})),!!R)return R});return O.filter(function(P){return P}).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"),[]):O},statusFormatter:l.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(Fc());function i(o){return o&&o.__esModule?o:{default:o}}})(Za)),Za}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 l=n,a=s=>{o.current?.call(l,s)};return l.addEventListener(e,a,{passive:r,capture:i}),()=>{l.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 Ac=(e,t,n)=>({x1:e-n/2,y1:t-n/2,x2:e+n/2,y2:t+n/2}),Hc=(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}},zc=(e,t,n)=>Math.min(e,t-n*2),Vc=(e,t,n)=>n.x1<=e&&e<=n.x2&&n.y1<=t&&t<=n.y2,Hl=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 l=f.useRef(Mc(a=>{o.current&&i(a)},n));return f.useLayoutEffect(()=>{o.current&&l.current(()=>e())},t),r}const dp="֑-߿יִ-﷽ﹰ-ﻼ",fp="A-Za-zÀ-ÖØ-öø-ʸ̀-֐ࠀ-῿‎Ⰰ-﬜︀-﹯﻽-￿",hp=new RegExp("^[^"+fp+"]*["+dp+"]");function zl(e){return hp.test(e)?"rtl":"not-rtl"}let Vo;function vl(){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 s=t.current[0];s!==Vr&&(a=typeof a=="function"?a(s):a,a===s)||(s!==Vr&&i({}),r(u=>typeof a=="function"?a(s===Vr?u:s):a),t.current[0]=Vr)},[]),l=f.useCallback(()=>{t.current[0]=Vr,i({})},[]);return[t.current[0]===Vr?n:t.current[0],o,l]}function $c(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 l=o.length>1;return f.createElement(Qg,{"data-testid":"GDG-default-image-overlay-editor"},f.createElement(lp.Carousel,{showArrows:l,showThumbs:!1,swipeable:l,emulateTouch:l,infiniteLoop:l},o.map(a=>{const s=i?.(a)??f.createElement("img",{draggable:!1,src:a});return f.createElement("div",{className:"gdg-centering-container",key:a},s)})),n&&r&&f.createElement("button",{className:"gdg-edit-icon",onClick:r},f.createElement(Hl,null)))};function Nc(){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=Nc();function vp(e){Gr=e}const Bc=/[&<>"']/,bp=new RegExp(Bc.source,"g"),Wc=/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,wp=new RegExp(Wc.source,"g"),yp={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},nu=e=>yp[e];function mn(e,t){if(t){if(Bc.test(e))return e.replace(bp,nu)}else if(Wc.test(e))return e.replace(wp,nu);return e}const Cp=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig;function Uc(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(Uc(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,l,a)=>{let s=!1,u=l;for(;--u>=0&&a[u]==="\\";)s=!s;return s?"|":" |"}),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,l=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:l,tokens:r.inlineTokens(l)};return r.state.inLink=!1,a}return{type:"image",raw:n,href:i,title:o,text:mn(l)}}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.Cmdq9aqU.js","./index.BRfGUOQ-.js","../css/index.BUP6fTcR.css","./withFullScreenWrapper.BMim3w94.js","./Toolbar.B9DaaDfN.js","./FormClearHelper.C-6BC487.js","./moment.C7qA8nIE.js","./pandasStylerUtils.D2EjZ7k6.js","./numbro.B9_PXfzp.js","./_baseIndexOf.BTknn6Gb.js","./index.8HslT92O.js","./main.DSPn8dUe.js","./throttle.BPcPpy-S.js","./formatNumber.DaagZyZe.js","./sprintf.DpPCfzXw.js","./formatMoment.C6Hwn6X5.js","./checkbox.CnoNruf3.js","./createDownloadLinkElement.B48AepiL.js","./toConsumableArray.Dg1nDaB_.js","./FileDownload.esm.DJCSsghl.js","./_arrayIncludes.B19Iyn2B.js","./number-overlay-editor.4Ae0qegV.js","./es6.BRxlY_y5.js"])))=>i.map(i=>d[i]);
2
+ import{at as Ga,df as ah,dg as lh,cL as gc,dh as sh,di as uh,dj as ch,dk as dh,dl as fh,dm as hh,dn as Xa,dp as pc,aT as gh,aU as ph,r as f,E as Ol,_ as ze,H as Ya,an as mo,bF as mh,dq as vh,aD as zt,dr as bh,O as kr,ds as Os,aR as Pl,K as wh,e as Pe,bG as mc,n as ct,dt as yh,j as Ve,du as Ch,F as jn,ab as en,bh as Sh,ae as xh,dv as kh,dw as Mh,m as vo,b1 as bi,aS as Rh,dx as Ih,dy as Eh,dz as vc,cf as Th,cd as Dh,dA as bc,dB as Oh,dC as Ph,cc as wc,cg as Lh,dD as Fh,cb as _h,dE as Ah,bf as Hh,bg as zh,ci as Vh,dF as $h,Q as Nh,dG as Bh,cj as Wh,dH as Uh,R as Gh,l as Ur,N as Yt,W as Ll,d2 as Xh,dI as rr,d9 as ur,dJ as Oe,dK as Le,c_ as _o,cW as Yh,al as yc,dL as Cc,a4 as jh,cX as qh,cY as Kh,cZ as Zh,d0 as Jh,dM as Qh,dN as eg,bj as ja,cU as tg,a0 as Sc,ay as wa,dO as xc,o as pn,Z as Un,aM as ya,aK as ng,aL as kc,aj as rg,dP as ig,q as og,X as Ps,dQ as ag,dR as lg,k as sg,L as ug,dS as cg,s as Ls}from"./index.BRfGUOQ-.js";import{w as dg,E as fg}from"./withFullScreenWrapper.BMim3w94.js";import{T as hg,a as mi}from"./Toolbar.B9DaaDfN.js";import{u as gg}from"./FormClearHelper.C-6BC487.js";import{h as $r}from"./moment.C7qA8nIE.js";import{r as pg,m as Fs,f as ml,c as mg,a as vg}from"./pandasStylerUtils.D2EjZ7k6.js";import{n as bg}from"./numbro.B9_PXfzp.js";import{l as qa}from"./index.8HslT92O.js";import{R as wg}from"./main.DSPn8dUe.js";import{d as Mc,t as yg}from"./throttle.BPcPpy-S.js";import{f as ra}from"./formatNumber.DaagZyZe.js";import{f as _s}from"./formatMoment.C6Hwn6X5.js";import{L as Cg,a as Sg,S as xg}from"./checkbox.CnoNruf3.js";import{c as kg}from"./createDownloadLinkElement.B48AepiL.js";import{_ as Mi,C as Mg}from"./toConsumableArray.Dg1nDaB_.js";import{D as Rg,F as Ig}from"./FileDownload.esm.DJCSsghl.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 zn(e,t,n){return n===void 0&&(n=t,t=void 0),n!==void 0&&(n=Ga(n),n=n===n?n:0),t!==void 0&&(t=Ga(t),t=t===t?t:0),Dg(Ga(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&&ah(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(lh(e)&&(gc(e)||typeof e=="string"||typeof e.splice=="function"||sh(e)||uh(e)||ch(e)))return!e.length;var t=dh(e);if(t==_g||t==Ag)return!e.size;if(fh(e))return!hh(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,l=!0,a=[],s=a;if(o>=Bg){var u=Ng(e);if(u)return pc(u);l=!1,i=ph,s=new gh}else s=a;e:for(;++r<o;){var c=e[r],d=c;if(c=c!==0?c:0,l&&d===d){for(var g=s.length;g--;)if(s[g]===d)continue e;a.push(c)}else i(s,d,n)||(s!==a&&s.push(d),a.push(c))}return a}function Ug(e){return e&&e.length?Wg(e):[]}var Rc=f.forwardRef(function(e,t){var n={fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"};return f.createElement(Ol,ze({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"}))});Rc.displayName="Add";var Ic=f.forwardRef(function(e,t){var n={fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"};return f.createElement(Ol,ze({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"}))});Ic.displayName="Search";var Ec=f.forwardRef(function(e,t){var n={fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"};return f.createElement(Ol,ze({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"}))});Ec.displayName="Visibility";function Tc(e="This should not happen"){throw new Error(e)}function Pn(e,t="Assertion failed"){if(!e)return Tc(t)}function lo(e,t){return Tc(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,Fl=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===Vn.Marker||e.kind===Vn.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 Xg(e){return Fg(e,"editor")}function _l(e){return!(e.readonly??!1)}var Vn;(function(e){e.NewRow="new-row",e.Marker="marker"})(Vn||(Vn={}));const aa={shape:"square",size:4,offsetX:-2,offsetY:-2,outline:0};function Ka(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(Ka(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=Ka(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=Ka([...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,l]of n.entries()){const[a,s]=l;if(a<=i&&r<=s){const u=[];a<r&&u.push([a,r]),i<s&&u.push([i,s]),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 Yg=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[,s]=a.split("_");n[s]=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=Yg,jg=e=>e.toUpperCase()===e,qg=e=>t=>e.indexOf(t)===-1,Dc=(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=Dc(t,n);if(!e){const i=typeof Ya=="function"?{default:Ya}:Ya;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,l)=>{const{as:a=e,class:s=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=l,c.className=n.atomic?$s(n.class,c.className||s):$s(c.className||s,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]||"",k=typeof v=="function"?v(o):v;Zg(k,n.name),g[`--${m}`]=`${k}${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 l=Dc(o,["innerRef"]);return r(l,o.innerRef)});return i.displayName=n.name,i.__wyw_meta={className:n.class||t,extends:e},i}}var an=Jg;const Qg=an("div")({name:"ImageOverlayEditorStyle",class:"gdg-i2iowwq",propsAsIs:!1});var Za={},Wi={},Ho={},zo={},Ns;function ep(){return Ns||(Ns=1,(function(e){(function(t,n){n(e,mo(),mh())})(zo,function(t,n,r){Object.defineProperty(t,"__esModule",{value:!0}),t.setHasSupportToCaptureOption=p;var i=l(n),o=l(r);function l(b){return b&&b.__esModule?b:{default:b}}var a=Object.assign||function(b){for(var k=1;k<arguments.length;k++){var E=arguments[k];for(var M in E)Object.prototype.hasOwnProperty.call(E,M)&&(b[M]=E[M])}return b};function s(b,k){var E={};for(var M in b)k.indexOf(M)>=0||Object.prototype.hasOwnProperty.call(b,M)&&(E[M]=b[M]);return E}function u(b,k){if(!(b instanceof k))throw new TypeError("Cannot call a class as a function")}var c=(function(){function b(k,E){for(var M=0;M<E.length;M++){var I=E[M];I.enumerable=I.enumerable||!1,I.configurable=!0,"value"in I&&(I.writable=!0),Object.defineProperty(k,I.key,I)}}return function(k,E,M){return E&&b(k.prototype,E),M&&b(k,M),k}})();function d(b,k){if(!b)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return k&&(typeof k=="object"||typeof k=="function")?k:b}function g(b,k){if(typeof k!="function"&&k!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof k);b.prototype=Object.create(k&&k.prototype,{constructor:{value:b,enumerable:!1,writable:!0,configurable:!0}}),k&&(Object.setPrototypeOf?Object.setPrototypeOf(b,k):b.__proto__=k)}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 k=b.touches[0],E=k.pageX,M=k.pageY;return{x:E,y:M}}var I=b.screenX,D=b.screenY;return{x:I,y:D}}var v=(function(b){g(k,b);function k(){var E;u(this,k);for(var M=arguments.length,I=Array(M),D=0;D<M;D++)I[D]=arguments[D];var S=d(this,(E=k.__proto__||Object.getPrototypeOf(k)).call.apply(E,[this].concat(I)));return S._handleSwipeStart=S._handleSwipeStart.bind(S),S._handleSwipeMove=S._handleSwipeMove.bind(S),S._handleSwipeEnd=S._handleSwipeEnd.bind(S),S._onMouseDown=S._onMouseDown.bind(S),S._onMouseMove=S._onMouseMove.bind(S),S._onMouseUp=S._onMouseUp.bind(S),S._setSwiperRef=S._setSwiperRef.bind(S),S}return c(k,[{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(M){this.props.allowMouseEvents&&(this.mouseDown=!0,document.addEventListener("mouseup",this._onMouseUp),document.addEventListener("mousemove",this._onMouseMove),this._handleSwipeStart(M))}},{key:"_onMouseMove",value:function(M){this.mouseDown&&this._handleSwipeMove(M)}},{key:"_onMouseUp",value:function(M){this.mouseDown=!1,document.removeEventListener("mouseup",this._onMouseUp),document.removeEventListener("mousemove",this._onMouseMove),this._handleSwipeEnd(M)}},{key:"_handleSwipeStart",value:function(M){var I=y(M),D=I.x,S=I.y;this.moveStart={x:D,y:S},this.props.onSwipeStart(M)}},{key:"_handleSwipeMove",value:function(M){if(this.moveStart){var I=y(M),D=I.x,S=I.y,C=D-this.moveStart.x,L=S-this.moveStart.y;this.moving=!0;var T=this.props.onSwipeMove({x:C,y:L},M);T&&M.cancelable&&M.preventDefault(),this.movePosition={deltaX:C,deltaY:L}}}},{key:"_handleSwipeEnd",value:function(M){this.props.onSwipeEnd(M);var I=this.props.tolerance;this.moving&&this.movePosition&&(this.movePosition.deltaX<-I?this.props.onSwipeLeft(1,M):this.movePosition.deltaX>I&&this.props.onSwipeRight(1,M),this.movePosition.deltaY<-I?this.props.onSwipeUp(1,M):this.movePosition.deltaY>I&&this.props.onSwipeDown(1,M)),this.moveStart=null,this.moving=!1,this.movePosition=null}},{key:"_setSwiperRef",value:function(M){this.swiper=M,this.props.innerRef(M)}},{key:"render",value:function(){var M=this.props;M.tagName;var I=M.className,D=M.style,S=M.children;M.allowMouseEvents,M.onSwipeUp,M.onSwipeDown,M.onSwipeLeft,M.onSwipeRight,M.onSwipeStart,M.onSwipeMove,M.onSwipeEnd,M.innerRef,M.tolerance;var C=s(M,["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:I,style:D},C),S)}}]),k})(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 Oc(){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 Pc(){if(Ws)return Ui;Ws=1,Object.defineProperty(Ui,"__esModule",{value:!0}),Ui.default=void 0;var e=t(vh());function t(i){return i&&i.__esModule?i:{default:i}}function n(i,o,l){return o in i?Object.defineProperty(i,o,{value:l,enumerable:!0,configurable:!0,writable:!0}):i[o]=l,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,l){return(0,e.default)({"thumbs-wrapper":!o,"slider-wrapper":o,"axis-horizontal":l==="horizontal","axis-vertical":l!=="horizontal"})},SLIDER:function(o,l){return(0,e.default)({thumbs:!o,slider:o,animated:!l})},ITEM:function(o,l,a){return(0,e.default)({thumb:!o,slide:o,selected:l,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={},Xi={},Us;function tp(){if(Us)return Xi;Us=1,Object.defineProperty(Xi,"__esModule",{value:!0}),Xi.outerWidth=void 0;var e=function(n){var r=n.offsetWidth,i=getComputedStyle(n);return r+=parseInt(i.marginLeft)+parseInt(i.marginRight),r};return Xi.outerWidth=e,Xi}var Yi={},Gs;function Al(){if(Gs)return Yi;Gs=1,Object.defineProperty(Yi,"__esModule",{value:!0}),Yi.default=void 0;var e=function(n,r,i){var o=n===0?n:n+r,l=i==="horizontal"?[o,0,0]:[0,o,0],a="translate3d",s="("+l.join(",")+")";return a+s};return Yi.default=e,Yi}var ji={},Xs;function Lc(){if(Xs)return ji;Xs=1,Object.defineProperty(ji,"__esModule",{value:!0}),ji.default=void 0;var e=function(){return window};return ji.default=e,ji}var Ys;function Fc(){if(Ys)return Gi;Ys=1,Object.defineProperty(Gi,"__esModule",{value:!0}),Gi.default=void 0;var e=s(mo()),t=l(Pc()),n=tp(),r=l(Al()),i=l(Oc()),o=l(Lc());function l(S){return S&&S.__esModule?S:{default:S}}function a(){if(typeof WeakMap!="function")return null;var S=new WeakMap;return a=function(){return S},S}function s(S){if(S&&S.__esModule)return S;if(S===null||u(S)!=="object"&&typeof S!="function")return{default:S};var C=a();if(C&&C.has(S))return C.get(S);var L={},T=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var x in S)if(Object.prototype.hasOwnProperty.call(S,x)){var O=T?Object.getOwnPropertyDescriptor(S,x):null;O&&(O.get||O.set)?Object.defineProperty(L,x,O):L[x]=S[x]}return L.default=S,C&&C.set(S,L),L}function u(S){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?u=function(L){return typeof L}:u=function(L){return L&&typeof Symbol=="function"&&L.constructor===Symbol&&L!==Symbol.prototype?"symbol":typeof L},u(S)}function c(){return c=Object.assign||function(S){for(var C=1;C<arguments.length;C++){var L=arguments[C];for(var T in L)Object.prototype.hasOwnProperty.call(L,T)&&(S[T]=L[T])}return S},c.apply(this,arguments)}function d(S,C){if(!(S instanceof C))throw new TypeError("Cannot call a class as a function")}function g(S,C){for(var L=0;L<C.length;L++){var T=C[L];T.enumerable=T.enumerable||!1,T.configurable=!0,"value"in T&&(T.writable=!0),Object.defineProperty(S,T.key,T)}}function h(S,C,L){return C&&g(S.prototype,C),S}function p(S,C){if(typeof C!="function"&&C!==null)throw new TypeError("Super expression must either be null or a function");S.prototype=Object.create(C&&C.prototype,{constructor:{value:S,writable:!0,configurable:!0}}),C&&m(S,C)}function m(S,C){return m=Object.setPrototypeOf||function(T,x){return T.__proto__=x,T},m(S,C)}function y(S){var C=k();return function(){var T=E(S),x;if(C){var O=E(this).constructor;x=Reflect.construct(T,arguments,O)}else x=T.apply(this,arguments);return v(this,x)}}function v(S,C){return C&&(u(C)==="object"||typeof C=="function")?C:b(S)}function b(S){if(S===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return S}function k(){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 E(S){return E=Object.setPrototypeOf?Object.getPrototypeOf:function(L){return L.__proto__||Object.getPrototypeOf(L)},E(S)}function M(S,C,L){return C in S?Object.defineProperty(S,C,{value:L,enumerable:!0,configurable:!0,writable:!0}):S[C]=L,S}var I=function(C){return C.hasOwnProperty("key")},D=(function(S){p(L,S);var C=y(L);function L(T){var x;return d(this,L),x=C.call(this,T),M(b(x),"itemsWrapperRef",void 0),M(b(x),"itemsListRef",void 0),M(b(x),"thumbsRef",void 0),M(b(x),"setItemsWrapperRef",function(O){x.itemsWrapperRef=O}),M(b(x),"setItemsListRef",function(O){x.itemsListRef=O}),M(b(x),"setThumbsRef",function(O,P){x.thumbsRef||(x.thumbsRef=[]),x.thumbsRef[P]=O}),M(b(x),"updateSizes",function(){if(!(!x.props.children||!x.itemsWrapperRef||!x.thumbsRef)){var O=e.Children.count(x.props.children),P=x.itemsWrapperRef.clientWidth,R=x.props.thumbWidth?x.props.thumbWidth:(0,n.outerWidth)(x.thumbsRef[0]),$=Math.floor(P/R),W=$<O,j=W?O-$:0;x.setState(function(oe,Q){return{itemSize:R,visibleItems:$,firstItem:W?x.getFirstItem(Q.selectedItem):0,lastPosition:j,showArrows:W}})}}),M(b(x),"handleClickItem",function(O,P,R){if(!I(R)||R.key==="Enter"){var $=x.props.onSelectItem;typeof $=="function"&&$(O,P)}}),M(b(x),"onSwipeStart",function(){x.setState({swiping:!0})}),M(b(x),"onSwipeEnd",function(){x.setState({swiping:!1})}),M(b(x),"onSwipeMove",function(O){var P=O.x;if(!x.state.itemSize||!x.itemsWrapperRef||!x.state.visibleItems)return!1;var R=0,$=e.Children.count(x.props.children),W=-(x.state.firstItem*100)/x.state.visibleItems,j=Math.max($-x.state.visibleItems,0),oe=-j*100/x.state.visibleItems;W===R&&P>0&&(P=0),W===oe&&P<0&&(P=0);var Q=x.itemsWrapperRef.clientWidth,re=W+100/(Q/P);return x.itemsListRef&&["WebkitTransform","MozTransform","MsTransform","OTransform","transform","msTransform"].forEach(function(se){x.itemsListRef.style[se]=(0,r.default)(re,"%",x.props.axis)}),!0}),M(b(x),"slideRight",function(O){x.moveTo(x.state.firstItem-(typeof O=="number"?O:1))}),M(b(x),"slideLeft",function(O){x.moveTo(x.state.firstItem+(typeof O=="number"?O:1))}),M(b(x),"moveTo",function(O){O=O<0?0:O,O=O>=x.state.lastPosition?x.state.lastPosition:O,x.setState({firstItem:O})}),x.state={selectedItem:T.selectedItem,swiping:!1,showArrows:!1,firstItem:0,visibleItems:0,lastPosition:0},x}return h(L,[{key:"componentDidMount",value:function(){this.setupThumbs()}},{key:"componentDidUpdate",value:function(x){this.props.selectedItem!==this.state.selectedItem&&this.setState({selectedItem:this.props.selectedItem,firstItem:this.getFirstItem(this.props.selectedItem)}),this.props.children!==x.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(x){var O=x;return x>=this.state.lastPosition&&(O=this.state.lastPosition),x<this.state.firstItem+this.state.visibleItems&&(O=this.state.firstItem),x<this.state.firstItem&&(O=x),O}},{key:"renderItems",value:function(){var x=this;return this.props.children.map(function(O,P){var R=t.default.ITEM(!1,P===x.state.selectedItem),$={key:P,ref:function(j){return x.setThumbsRef(j,P)},className:R,onClick:x.handleClickItem.bind(x,P,x.props.children[P]),onKeyDown:x.handleClickItem.bind(x,P,x.props.children[P]),"aria-label":"".concat(x.props.labels.item," ").concat(P+1),style:{width:x.props.thumbWidth}};return e.default.createElement("li",c({},$,{role:"button",tabIndex:0}),O)})}},{key:"render",value:function(){var x=this;if(!this.props.children)return null;var O=e.Children.count(this.props.children)>1,P=this.state.showArrows&&this.state.firstItem>0,R=this.state.showArrows&&this.state.firstItem<this.state.lastPosition,$={},W=-this.state.firstItem*(this.state.itemSize||0),j=(0,r.default)(W,"px",this.props.axis),oe=this.props.transitionTime+"ms";return $={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(!P),onClick:function(){return x.slideRight()},"aria-label":this.props.labels.leftArrow}),O?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:$,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 x.setItemsListRef(re)},style:$},this.renderItems()),e.default.createElement("button",{type:"button",className:t.default.ARROW_NEXT(!R),onClick:function(){return x.slideLeft()},"aria-label":this.props.labels.rightArrow})))}}]),L})(e.Component);return Gi.default=D,M(D,"displayName","Thumbs"),M(D,"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 _c(){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(Al());function n(s){return s&&s.__esModule?s:{default:s}}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 l=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=l;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 Wn={},Ks;function rp(){if(Ks)return Wn;Ks=1,Object.defineProperty(Wn,"__esModule",{value:!0}),Wn.fadeAnimationHandler=Wn.slideStopSwipingHandler=Wn.slideSwipeAnimationHandler=Wn.slideAnimationHandler=void 0;var e=mo(),t=r(Al()),n=_c();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){l(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 l(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 k=(0,n.getPosition)(m,g),E=(0,t.default)(k,"%",g.axis),M=g.transitionTime+"ms";return p.itemListStyle={WebkitTransform:E,msTransform:E,OTransform:E,transform:E},h.swiping||(p.itemListStyle=o(o({},p.itemListStyle),{},{WebkitTransitionDuration:M,MozTransitionDuration:M,OTransitionDuration:M,transitionDuration:M,msTransitionDuration:M})),p};Wn.slideAnimationHandler=a;var s=function(g,h,p,m){var y={},v=h.axis==="horizontal",b=e.Children.count(h.children),k=0,E=(0,n.getPosition)(p.selectedItem,h),M=h.infiniteLoop?(0,n.getPosition)(b-1,h)-100:(0,n.getPosition)(b-1,h),I=v?g.x:g.y,D=I;E===k&&I>0&&(D=0),E===M&&I<0&&(D=0);var S=E+100/(p.itemSize/D),C=Math.abs(I)>h.swipeScrollTolerance;return h.infiniteLoop&&C&&(p.selectedItem===0&&S>-100?S-=b*100:p.selectedItem===b-1&&S<-b*100&&(S+=b*100)),(!h.preventMovementUntilSwipeScrollTolerance||C||p.swipeMovementStarted)&&(p.swipeMovementStarted||m({swipeMovementStarted:!0}),y.itemListStyle=(0,n.setPosition)(S,h.axis)),C&&!p.cancelClick&&m({cancelClick:!0}),y};Wn.slideSwipeAnimationHandler=s;var u=function(g,h){var p=(0,n.getPosition)(h.selectedItem,g),m=(0,n.setPosition)(p,g.axis);return{itemListStyle:m}};Wn.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 Wn.fadeAnimationHandler=c,Wn}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=s(Oc()),n=s(Pc()),r=s(Fc()),i=s(np()),o=s(Lc()),l=_c(),a=rp();function s(T){return T&&T.__esModule?T:{default:T}}function u(){if(typeof WeakMap!="function")return null;var T=new WeakMap;return u=function(){return T},T}function c(T){if(T&&T.__esModule)return T;if(T===null||d(T)!=="object"&&typeof T!="function")return{default:T};var x=u();if(x&&x.has(T))return x.get(T);var O={},P=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var R in T)if(Object.prototype.hasOwnProperty.call(T,R)){var $=P?Object.getOwnPropertyDescriptor(T,R):null;$&&($.get||$.set)?Object.defineProperty(O,R,$):O[R]=T[R]}return O.default=T,x&&x.set(T,O),O}function d(T){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?d=function(O){return typeof O}:d=function(O){return O&&typeof Symbol=="function"&&O.constructor===Symbol&&O!==Symbol.prototype?"symbol":typeof O},d(T)}function g(){return g=Object.assign||function(T){for(var x=1;x<arguments.length;x++){var O=arguments[x];for(var P in O)Object.prototype.hasOwnProperty.call(O,P)&&(T[P]=O[P])}return T},g.apply(this,arguments)}function h(T,x){var O=Object.keys(T);if(Object.getOwnPropertySymbols){var P=Object.getOwnPropertySymbols(T);x&&(P=P.filter(function(R){return Object.getOwnPropertyDescriptor(T,R).enumerable})),O.push.apply(O,P)}return O}function p(T){for(var x=1;x<arguments.length;x++){var O=arguments[x]!=null?arguments[x]:{};x%2?h(Object(O),!0).forEach(function(P){C(T,P,O[P])}):Object.getOwnPropertyDescriptors?Object.defineProperties(T,Object.getOwnPropertyDescriptors(O)):h(Object(O)).forEach(function(P){Object.defineProperty(T,P,Object.getOwnPropertyDescriptor(O,P))})}return T}function m(T,x){if(!(T instanceof x))throw new TypeError("Cannot call a class as a function")}function y(T,x){for(var O=0;O<x.length;O++){var P=x[O];P.enumerable=P.enumerable||!1,P.configurable=!0,"value"in P&&(P.writable=!0),Object.defineProperty(T,P.key,P)}}function v(T,x,O){return x&&y(T.prototype,x),T}function b(T,x){if(typeof x!="function"&&x!==null)throw new TypeError("Super expression must either be null or a function");T.prototype=Object.create(x&&x.prototype,{constructor:{value:T,writable:!0,configurable:!0}}),x&&k(T,x)}function k(T,x){return k=Object.setPrototypeOf||function(P,R){return P.__proto__=R,P},k(T,x)}function E(T){var x=D();return function(){var P=S(T),R;if(x){var $=S(this).constructor;R=Reflect.construct(P,arguments,$)}else R=P.apply(this,arguments);return M(this,R)}}function M(T,x){return x&&(d(x)==="object"||typeof x=="function")?x:I(T)}function I(T){if(T===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return T}function D(){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 S(T){return S=Object.setPrototypeOf?Object.getPrototypeOf:function(O){return O.__proto__||Object.getPrototypeOf(O)},S(T)}function C(T,x,O){return x in T?Object.defineProperty(T,x,{value:O,enumerable:!0,configurable:!0,writable:!0}):T[x]=O,T}var L=(function(T){b(O,T);var x=E(O);function O(P){var R;m(this,O),R=x.call(this,P),C(I(R),"thumbsRef",void 0),C(I(R),"carouselWrapperRef",void 0),C(I(R),"listRef",void 0),C(I(R),"itemsRef",void 0),C(I(R),"timer",void 0),C(I(R),"animationHandler",void 0),C(I(R),"setThumbsRef",function(W){R.thumbsRef=W}),C(I(R),"setCarouselWrapperRef",function(W){R.carouselWrapperRef=W}),C(I(R),"setListRef",function(W){R.listRef=W}),C(I(R),"setItemsRef",function(W,j){R.itemsRef||(R.itemsRef=[]),R.itemsRef[j]=W}),C(I(R),"autoPlay",function(){e.Children.count(R.props.children)<=1||(R.clearAutoPlay(),R.props.autoPlay&&(R.timer=setTimeout(function(){R.increment()},R.props.interval)))}),C(I(R),"clearAutoPlay",function(){R.timer&&clearTimeout(R.timer)}),C(I(R),"resetAutoPlay",function(){R.clearAutoPlay(),R.autoPlay()}),C(I(R),"stopOnHover",function(){R.setState({isMouseEntered:!0},R.clearAutoPlay)}),C(I(R),"startOnLeave",function(){R.setState({isMouseEntered:!1},R.autoPlay)}),C(I(R),"isFocusWithinTheCarousel",function(){return R.carouselWrapperRef?!!((0,i.default)().activeElement===R.carouselWrapperRef||R.carouselWrapperRef.contains((0,i.default)().activeElement)):!1}),C(I(R),"navigateWithKeyboard",function(W){if(R.isFocusWithinTheCarousel()){var j=R.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?R.increment():se===W.keyCode&&R.decrement()}}),C(I(R),"updateSizes",function(){if(!(!R.state.initialized||!R.itemsRef||R.itemsRef.length===0)){var W=R.props.axis==="horizontal",j=R.itemsRef[0];if(j){var oe=W?j.clientWidth:j.clientHeight;R.setState({itemSize:oe}),R.thumbsRef&&R.thumbsRef.updateSizes()}}}),C(I(R),"setMountState",function(){R.setState({hasMount:!0}),R.updateSizes()}),C(I(R),"handleClickItem",function(W,j){if(e.Children.count(R.props.children)!==0){if(R.state.cancelClick){R.setState({cancelClick:!1});return}R.props.onClickItem(W,j),W!==R.state.selectedItem&&R.setState({selectedItem:W})}}),C(I(R),"handleOnChange",function(W,j){e.Children.count(R.props.children)<=1||R.props.onChange(W,j)}),C(I(R),"handleClickThumb",function(W,j){R.props.onClickThumb(W,j),R.moveTo(W)}),C(I(R),"onSwipeStart",function(W){R.setState({swiping:!0}),R.props.onSwipeStart(W)}),C(I(R),"onSwipeEnd",function(W){R.setState({swiping:!1,cancelClick:!1,swipeMovementStarted:!1}),R.props.onSwipeEnd(W),R.clearAutoPlay(),R.state.autoPlay&&R.autoPlay()}),C(I(R),"onSwipeMove",function(W,j){R.props.onSwipeMove(j);var oe=R.props.swipeAnimationHandler(W,R.props,R.state,R.setState.bind(I(R)));return R.setState(p({},oe)),!!Object.keys(oe).length}),C(I(R),"decrement",function(){var W=arguments.length>0&&arguments[0]!==void 0?arguments[0]:1;R.moveTo(R.state.selectedItem-(typeof W=="number"?W:1))}),C(I(R),"increment",function(){var W=arguments.length>0&&arguments[0]!==void 0?arguments[0]:1;R.moveTo(R.state.selectedItem+(typeof W=="number"?W:1))}),C(I(R),"moveTo",function(W){if(typeof W=="number"){var j=e.Children.count(R.props.children)-1;W<0&&(W=R.props.infiniteLoop?j:0),W>j&&(W=R.props.infiniteLoop?0:j),R.selectItem({selectedItem:W}),R.state.autoPlay&&R.state.isMouseEntered===!1&&R.resetAutoPlay()}}),C(I(R),"onClickNext",function(){R.increment(1)}),C(I(R),"onClickPrev",function(){R.decrement(1)}),C(I(R),"onSwipeForward",function(){R.increment(1),R.props.emulateTouch&&R.setState({cancelClick:!0})}),C(I(R),"onSwipeBackwards",function(){R.decrement(1),R.props.emulateTouch&&R.setState({cancelClick:!0})}),C(I(R),"changeItem",function(W){return function(j){(!(0,l.isKeyboardEvent)(j)||j.key==="Enter")&&R.moveTo(W)}}),C(I(R),"selectItem",function(W){R.setState(p({previousItem:R.state.selectedItem},W),function(){R.setState(R.animationHandler(R.props,R.state))}),R.handleOnChange(W.selectedItem,e.Children.toArray(R.props.children)[W.selectedItem])}),C(I(R),"getInitialImage",function(){var W=R.props.selectedItem,j=R.itemsRef&&R.itemsRef[W],oe=j&&j.getElementsByTagName("img")||[];return oe[0]}),C(I(R),"getVariableItemHeight",function(W){var j=R.itemsRef&&R.itemsRef[W];if(R.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(){R.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 $={initialized:!1,previousItem:P.selectedItem,selectedItem:P.selectedItem,hasMount:!1,isMouseEntered:!1,autoPlay:P.autoPlay,swiping:!1,swipeMovementStarted:!1,cancelClick:!1,itemSize:1,itemListStyle:{},slideStyle:{},selectedStyle:{},prevStyle:{}};return R.animationHandler=typeof P.animationHandler=="function"&&P.animationHandler||P.animationHandler==="fade"&&a.fadeAnimationHandler||a.slideAnimationHandler,R.state=p(p({},$),R.animationHandler(P,$)),R}return v(O,[{key:"componentDidMount",value:function(){this.props.children&&this.setupCarousel()}},{key:"componentDidUpdate",value:function(R,$){!R.children&&this.props.children&&!this.state.initialized&&this.setupCarousel(),!R.autoFocus&&this.props.autoFocus&&this.forceFocus(),$.swiping&&!this.state.swiping&&this.setState(p({},this.props.stopSwipingHandler(this.props,this.state))),(R.selectedItem!==this.props.selectedItem||R.centerMode!==this.props.centerMode)&&(this.updateSizes(),this.moveTo(this.props.selectedItem)),R.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 R=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 $=R.getInitialImage();$&&!$.complete?$.addEventListener("load",R.setMountState):R.setMountState()})}},{key:"destroyCarousel",value:function(){this.state.initialized&&(this.unbindEvents(),this.destroyAutoPlay())}},{key:"setupAutoPlay",value:function(){this.autoPlay();var R=this.carouselWrapperRef;this.props.stopOnHover&&R&&(R.addEventListener("mouseenter",this.stopOnHover),R.addEventListener("mouseleave",this.startOnLeave))}},{key:"destroyAutoPlay",value:function(){this.clearAutoPlay();var R=this.carouselWrapperRef;this.props.stopOnHover&&R&&(R.removeEventListener("mouseenter",this.stopOnHover),R.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 R=this.getInitialImage();R&&R.removeEventListener("load",this.setMountState),this.props.useKeyboardArrows&&(0,i.default)().removeEventListener("keydown",this.navigateWithKeyboard)}},{key:"forceFocus",value:function(){var R;(R=this.carouselWrapperRef)===null||R===void 0||R.focus()}},{key:"renderItems",value:function(R){var $=this;return this.props.children?e.Children.map(this.props.children,function(W,j){var oe=j===$.state.selectedItem,Q=j===$.state.previousItem,re=oe&&$.state.selectedStyle||Q&&$.state.prevStyle||$.state.slideStyle||{};$.props.centerMode&&$.props.axis==="horizontal"&&(re=p(p({},re),{},{minWidth:$.props.centerSlidePercentage+"%"})),$.state.swiping&&$.state.swipeMovementStarted&&(re=p(p({},re),{},{pointerEvents:"none"}));var se={ref:function(de){return $.setItemsRef(de,j)},key:"itemKey"+j+(R?"clone":""),className:n.default.ITEM(!0,j===$.state.selectedItem,j===$.state.previousItem),onClick:$.handleClickItem.bind($,j,W),style:re};return e.default.createElement("li",se,$.props.renderItem(W,{isSelected:j===$.state.selectedItem,isPrevious:j===$.state.previousItem}))}):[]}},{key:"renderControls",value:function(){var R=this,$=this.props,W=$.showIndicators,j=$.labels,oe=$.renderIndicator,Q=$.children;return W?e.default.createElement("ul",{className:"control-dots"},e.Children.map(Q,function(re,se){return oe&&oe(R.changeItem(se),se===R.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 R=this;if(!this.props.children||e.Children.count(this.props.children)===0)return null;var $=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},$?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(F){return R.setListRef(F)},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())}}]),O})(e.default.Component);return Wi.default=L,C(L,"displayName","Carousel"),C(L,"defaultProps",{ariaLabel:void 0,axis:"horizontal",centerSlidePercentage:80,interval:3e3,labels:{leftArrow:"previous slide / item",rightArrow:"next slide / item",item:"slide item"},onClickItem:l.noop,onClickThumb:l.noop,onChange:l.noop,onSwipeStart:function(){},onSwipeEnd:function(){},onSwipeMove:function(){return!1},preventMovementUntilSwipeScrollTolerance:!1,renderArrowPrev:function(x,O,P){return e.default.createElement("button",{type:"button","aria-label":P,className:n.default.ARROW_PREV(!O),onClick:x})},renderArrowNext:function(x,O,P){return e.default.createElement("button",{type:"button","aria-label":P,className:n.default.ARROW_NEXT(!O),onClick:x})},renderIndicator:function(x,O,P,R){return e.default.createElement("li",{className:n.default.DOT(O),onClick:x,onKeyDown:x,value:P,key:P,role:"button",tabIndex:0,"aria-label":"".concat(R," ").concat(P+1)})},renderItem:function(x){return x},renderThumbs:function(x){var O=e.Children.map(x,function(P){var R=P;if(P.type!=="img"&&(R=e.Children.toArray(P.props.children).find(function($){return $.type==="img"})),!!R)return R});return O.filter(function(P){return P}).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"),[]):O},statusFormatter:l.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(Fc());function i(o){return o&&o.__esModule?o:{default:o}}})(Za)),Za}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 l=n,a=s=>{o.current?.call(l,s)};return l.addEventListener(e,a,{passive:r,capture:i}),()=>{l.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 Ac=(e,t,n)=>({x1:e-n/2,y1:t-n/2,x2:e+n/2,y2:t+n/2}),Hc=(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}},zc=(e,t,n)=>Math.min(e,t-n*2),Vc=(e,t,n)=>n.x1<=e&&e<=n.x2&&n.y1<=t&&t<=n.y2,Hl=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 l=f.useRef(Mc(a=>{o.current&&i(a)},n));return f.useLayoutEffect(()=>{o.current&&l.current(()=>e())},t),r}const dp="֑-߿יִ-﷽ﹰ-ﻼ",fp="A-Za-zÀ-ÖØ-öø-ʸ̀-֐ࠀ-῿‎Ⰰ-﬜︀-﹯﻽-￿",hp=new RegExp("^[^"+fp+"]*["+dp+"]");function zl(e){return hp.test(e)?"rtl":"not-rtl"}let Vo;function vl(){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 s=t.current[0];s!==Vr&&(a=typeof a=="function"?a(s):a,a===s)||(s!==Vr&&i({}),r(u=>typeof a=="function"?a(s===Vr?u:s):a),t.current[0]=Vr)},[]),l=f.useCallback(()=>{t.current[0]=Vr,i({})},[]);return[t.current[0]===Vr?n:t.current[0],o,l]}function $c(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 l=o.length>1;return f.createElement(Qg,{"data-testid":"GDG-default-image-overlay-editor"},f.createElement(lp.Carousel,{showArrows:l,showThumbs:!1,swipeable:l,emulateTouch:l,infiniteLoop:l},o.map(a=>{const s=i?.(a)??f.createElement("img",{draggable:!1,src:a});return f.createElement("div",{className:"gdg-centering-container",key:a},s)})),n&&r&&f.createElement("button",{className:"gdg-edit-icon",onClick:r},f.createElement(Hl,null)))};function Nc(){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=Nc();function vp(e){Gr=e}const Bc=/[&<>"']/,bp=new RegExp(Bc.source,"g"),Wc=/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,wp=new RegExp(Wc.source,"g"),yp={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},nu=e=>yp[e];function mn(e,t){if(t){if(Bc.test(e))return e.replace(bp,nu)}else if(Wc.test(e))return e.replace(wp,nu);return e}const Cp=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig;function Uc(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(Uc(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,l,a)=>{let s=!1,u=l;for(;--u>=0&&a[u]==="\\";)s=!s;return s?"|":" |"}),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,l=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:l,tokens:r.inlineTokens(l)};return r.state.inLink=!1,a}return{type:"image",raw:n,href:i,title:o,text:mn(l)}}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[l]=o;return l.length>=r.length?i.slice(r.length):i}).join(`
4
4
  `)}class Vl{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,l,a,s,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,l)),i=l+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,l))),i=l+1,a===`
172
- `&&(n.push(r),r=[])),o=t.None);break}l++}return i<e.length&&r.push(xu(e.slice(i,e.length))),n.push(r),n.map(a=>a.map(s=>({rawValue:s,formatted:s,format:"string"})))}function ku(e,t,n){const r=$0(e,t),i=a=>{window.navigator.clipboard?.writeText(a)},o=(a,s)=>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([s],{type:"text/html"})})]),!0),l=(a,s)=>{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",s)}catch{o(a,s)||i(a)}};window.navigator.clipboard?.write!==void 0||n?.clipboardData!==void 0?l(r.textPlain,r.textHtml):i(r.textPlain),n?.preventDefault()}function wd(e){return e!==!0}function Mu(e){return typeof e=="string"?e:`${e}px`}const W0=()=>e=>e.innerWidth,U0=()=>e=>e.innerHeight,G0=an("div")({name:"Wrapper",class:"gdg-wmyidgi",propsAsIs:!1,vars:{"wmyidgi-0":[W0()],"wmyidgi-1":[U0()]}}),X0=e=>{const{inWidth:t,inHeight:n,children:r,...i}=e;return f.createElement(G0,{innerHeight:Mu(n),innerWidth:Mu(t),...i},r)},Y0=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 l=!1,a=0;const s=u=>{if(!l){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*Y0;t.current?.scrollBy(i*d,o*d),a=u,n?.()}window.requestAnimationFrame(s)}};return window.requestAnimationFrame(s),()=>{l=!0}},[t,i,o,n])}function K0({rowHeight:e,headerHeight:t,groupHeaderHeight:n,theme:r,overscrollX:i,overscrollY:o,scaleToRem:l,remSize:a}){const[s,u,c,d,g,h]=zt.useMemo(()=>{if(!l||a===16)return[e,t,n,r,i,o];const p=a/16,m=e,y=rd();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,l,r]);return{rowHeight:s,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 l={headerIndex:r.headerIndex,isCollapsed:r.isCollapsed,depth:i,path:o};return r.subGroups!==void 0&&(l.subGroups=r.subGroups.map((a,s)=>t(a,i+1,[...o,s])).sort((a,s)=>a.headerIndex-s.headerIndex)),l}return e.map((r,i)=>t(r,0,[i])).sort((r,i)=>r.headerIndex-i.headerIndex)}function jl(e,t){const n=[];function r(a,s,u=!1){let c=s!==null?s-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:s;r(a.subGroups[d],g,u||a.isCollapsed)}}const i=J0(e.groups);for(let a=0;a<i.length;a++){const s=a<i.length-1?i[a+1].headerIndex:null;r(i[a],s)}let o=0,l=0;for(const a of n)a.contentIndex=l,l+=a.rows,a.rowIndex=o,o+=a.isCollapsed?1:a.rows+1;return n.filter(a=>a.skip===!1).map(a=>{const{skip:s,...u}=a;return u})}function Ml(e,t){if(t===void 0||jl.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:jl(e,t),[e,t]),o=zt.useMemo(()=>i?.reduce((c,d)=>(c[d.rowIndex]=d,c),{}),[i]),l=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]),s=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}=Ml(c,i);return d?e.themeOverride:r?.(c,h,g)},[i,r,e]));return e===void 0?{rowHeight:a,rows:t,rowNumberMapper:s,getRowThemeOverride:u}:{rowHeight:a,rows:l,rowNumberMapper:s,getRowThemeOverride:u}}function ev(e,t){const n=zt.useMemo(()=>e===void 0?void 0:jl(e,t),[e,t]);return{getRowGroupingForPath:Cd,updateRowGroupingByPath:yd,mapper:zt.useCallback(r=>{if(typeof r=="number")return Ml(r,n);const i=Ml(r[1],n);return{...i,originalIndex:[r[0],i.originalIndex]}},[n])}}function yd(e,t,n){const[r,...i]=t;return i[0]===-1?e.map((o,l)=>l===r?{...o,...n}:o):e.map((o,l)=>l===r?{...o,subGroups:yd(o.subGroups??[],i,n)}:o)}function Cd(e,t){const[n,...r]=t;return r[0]===-1?e[n]:Cd(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,l]=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:l}),[r,l,o]),[s,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=(s.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=(s.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:s,setVisibleRegion:u,scrollRef:g}}const rv=f.lazy(async()=>await Pl(()=>import("./data-grid-overlay-editor.Dzo9A4l6.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(),l=f.useRef(null),a=f.useRef(null),[s,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:k,onCellClicked:E,onCellActivated:M,onFillPattern:I,onFinishedEditing:D,coercePasteValue:S,drawHeader:C,drawCell:L,editorBloom:T,onHeaderClicked:x,onColumnProposeMove:O,rangeSelectionColumnSpanning:P=!0,spanRangeBehavior:R="default",onGroupHeaderClicked:$,onCellContextMenu:W,className:j,onHeaderContextMenu:oe,getCellsForSelection:Q,onGroupHeaderContextMenu:re,onGroupHeaderRenamed:se,onCellEdited:ae,onCellsEdited:de,onSearchResultsChanged:fe,searchResults:ue,onSearchValueChange:H,searchValue:F,onKeyDown:Y,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:Fe,onDragStart:Te,onMouseMove:at,onPaste:De,copyHeaders:we=!1,freezeColumns:_e=0,cellActivationBehavior:Re="second-click",rowSelectionMode:Ne="auto",columnSelectionMode:ft="auto",onHeaderMenuClick:ht,onHeaderIndicatorClick:Ye,getGroupDetails:pt,rowGrouping:Nt,onSearchClose:St,onItemHovered:Tt,onSelectionCleared:Bt,showSearch:qt,onVisibleRegionChanged:ln,gridSelection:It,onGridSelectionChange:gt,minColumnWidth:Wt=50,maxColumnWidth:wt=500,maxColumnAutoWidth:sn,provideEditor:Mn,trailingRowOptions:Ee,freezeTrailingRows:mt=0,allowedFillDirections:xt="orthogonal",scrollOffsetX:vn,scrollOffsetY:tn,verticalBorder:nn,onDragOverCell:cn,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:Fn=36,groupHeaderHeight:_n=Fn,theme:Ae,isOutsideClick:dn,renderers:Rn,resizeIndicator:Oi,scrollToActiveCell:Zn=!0,drawFocusRing:ka=!0,portalElementRef:wo}=e,Zr=ka==="no-editor"?i===void 0:ka,$n=typeof e.rowMarkers=="string"?void 0:e.rowMarkers,Sn=$n?.kind??e.rowMarkers??"none",Jr=$n?.width??e.rowMarkerWidth,or=$n?.startIndex??e.rowMarkerStartIndex??1,Qr=$n?.theme??e.rowMarkerTheme,fr=$n?.headerTheme,ei=$n?.headerAlwaysVisible,ti=ve!=="multi"||$n?.headerDisabled===!0,Tr=$n?.checkboxStyle??"square",hr=Math.max(Wt,20),ni=Math.max(wt,hr),Ma=Math.max(sn??ni,hr),Pi=f.useMemo(()=>typeof window>"u"?{fontSize:"16px"}:window.getComputedStyle(document.documentElement),[]),{rows:He,rowNumberMapper:Li,rowHeight:yo,getRowThemeOverride:Dr}=Q0(Nt,b,Di,h),Ra=f.useMemo(()=>Number.parseFloat(Pi.fontSize),[Pi]),{rowHeight:Jn,headerHeight:Fi,groupHeaderHeight:Co,theme:ri,overscrollX:Ia,overscrollY:Ea}=K0({groupHeaderHeight:_n,headerHeight:Fn,overscrollX:rn,overscrollY:En,remSize:Ra,rowHeight:yo,scaleToRem:Kr,theme:Ae}),Qn=Z0(le),gr=Jr??(b>1e4?48:b>1e3?44:b>100?36:32),Tn=Sn!=="none",G=Tn?1:0,_t=Ee!==void 0,ar=Ee?.sticky===!0,[Ta,Or]=f.useState(!1),Da=qt??Ta,ii=f.useCallback(()=>{St!==void 0?St():Or(!1)},[St]),q=f.useMemo(()=>It===void 0?void 0:Bo(It,G),[It,G])??n,V=f.useRef();V.current===void 0&&(V.current=new AbortController),f.useEffect(()=>()=>V?.current.abort(),[]);const[ee,xe]=F0(Q,k,G,V.current,He),Ie=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,R,V.current)),gt!==void 0?(ce.current=Bo(w,-G),gt(ce.current)):r(w)},[gt,ee,G,R]),Xe=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])),un=Cr(L,f.useCallback((w,A)=>L?.({...w,col:w.col-G},A)??!1,[L,G])),Ut=f.useCallback(w=>{if(Fe!==void 0){const A=Fe(Bo(w,-G));return typeof A=="boolean"?A:Bo(A,G)}return!0},[Fe,G]),[Mt,lt,qe]=L0(q,ge,me,he,Ce,Ue,P),st=f.useMemo(()=>cr(rd(),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,He,xe,At[0]-(G===0?0:gr)-At[2],hr,Ma,st,Jt,V.current);Sn!=="none"&&(Lt+=gr);const An=f.useMemo(()=>on.some(w=>w.group!==void 0),[on]),fn=An?Fi+Co:Fi,ai=q.rows.length,lr=Sn==="none"?void 0:ai===0?!1:ai===He?!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 Tf=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?He+1:He,Hn=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,Oa]=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],Df=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:Vn.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?Ee?.hint??"":"",U=bs.current[w];if(U?.trailingRowOptions?.disabled===!0)return Wo;{const J=U?.trailingRowOptions?.hint??z,ie=U?.trailingRowOptions?.addIcon??Ee?.addIcon;return{kind:Vn.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>=_a.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=k([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,Ee?.hint,Ee?.addIcon,bt?.strict,k]),Pa=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:_=>Ha({group:A.name,bounds:_.bounds})}]}),A},[pt,se]),Ro=f.useCallback(w=>{const[A,_]=w.cell,N=tt[A],X=N?.group!==void 0?Pa(N.group)?.overrideTheme:void 0,K=N?.themeOverride,z=Dr?.(_);o({...w,theme:cr(st,X,K,z,w.content.themeOverride)})},[Dr,tt,Pa,st]),li=f.useCallback((w,A,_)=>{if(q.current===void 0)return;const[N,X]=q.current.cell,K=Dn([N,X]);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,X],highlight:_===void 0,forceEditMode:_!==void 0,activation:A})}else K.kind===Z.Boolean&&A.inputType==="keyboard"&&K.readonly!==!0&&(Hn([{location:q.current.cell,value:{...K,data:wd(K.data)}}]),hn.current?.damage([{cell:q.current.cell}]))},[Dn,q,Hn,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]),Xt=f.useCallback((w,A,_="both",N=0,X=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-X,width:Je.width+2*N,height:Je.height+2*X};let hi=0;for(let Ua=0;Ua<_e;Ua++)hi+=on[Ua].width;let Ni=0;const Bi=mt+(ar?1:0);Bi>0&&(Ni=Yr(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+X*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<_e?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,_e,on,gn,ar,Jn]),La=f.useRef(ws),Fa=f.useRef(k);La.current=ws,Fa.current=k;const _a=f.useRef(He);_a.current=He;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 X=pe?.();let K,z=!0;X!==void 0&&(K=await X,K==="top"&&(z=!1),typeof K=="number"&&(z=!1));let U=0;const J=()=>{if(_a.current<=He){U<500&&window.setTimeout(J,U),U=50+U*2;return}const ie=typeof K=="number"?K:z?He: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=Fa.current([w-G,ie]);ye.allowOverlay&&yi(ye)&&ye.readonly!==!0&&A&&window.setTimeout(()=>{La.current(w,ie)},0)};J()},[tt,pe,G,He,Mt]),Io=f.useCallback(async(w,A=!0)=>{const _=et?.();let N,X=!0;_!==void 0&&(N=await _,N==="left"&&(X=!1),typeof N=="number"&&(X=!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:X?tt.length:0;Xt(U-G,w),Mt({cell:[U,w],range:{x:U,y:w,width:1,height:1}},!1,!1,"edit");const J=Fa.current([U-G,w]);J.allowOverlay&&yi(J)&&J.readonly!==!0&&A&&window.setTimeout(()=>{La.current(U,w)},0)};z()},[tt,et,G,Xt,Mt]),si=f.useCallback(w=>{const A=on[w]?.trailingRowOptions?.targetColumn??Ee?.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,Ee?.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),Nn=Nt?.navigationBehavior,Ai=f.useCallback(w=>{const A=ua.value?w.metaKey:w.ctrlKey,_=A&&ve==="multi",[N,X]=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,X],N===0&&Tn){if(_t===!0&&X===He||Sn==="number"||ve==="none")return;const ie=Dn(w.location);if(ie.kind!==Vn.Marker)return;if(Kt!==void 0){const Je=Jt(ie);Pn(Je?.kind===Vn.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(X),Rt=vr.current;if(ve==="multi"&&(w.shiftKey||w.isLongTouch===!0)&&Rt!==void 0&&z.hasIndex(Rt)){const Je=[Math.min(Rt,X),Math.max(Rt,X)+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(X),void 0,!0):(lt(void 0,X,!0),vr.current=X):ye&&z.length===1?lt(Qe.empty(),void 0,A):(lt(Qe.fromSingleSelection(X),void 0,A),vr.current=X)}else if(N>=G&&_t&&X===He){const ie=si(N);mr(ie??N)}else if(U!==N||J!==X){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(Nn==="block"&&_r(X).isGroupHeader)return;const Rt=ar&&X===He,Je=ar&&q!==void 0&&q.current?.cell[1]===He;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(X,J),yt=Math.max(X,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,X],range:{x:N,y:X,width:1,height:1}},!0,A,"click"),vr.current=void 0,o(void 0),xn()}}else if(w.kind==="header")if(Ar.current=[N,X],o(void 0),Tn&&N===0)vr.current=void 0,ui.current=void 0,!ti&&ve==="multi"&&(z.length!==He?lt(Qe.fromSingleSelection([0,He]),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===Gn?Ar.current=[N,X]: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,He,Sn,Dn,Kt,xn,Ne,ft,Jt,_i,lt,si,mr,Nn,_r,ar,Mt,ti,qe,ge,Bt]),Hi=f.useRef(!1),Ar=f.useRef(),Cs=f.useRef(sr),er=f.useRef(),Of=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]),[Aa,Ha]=f.useState(),Ss=f.useCallback(w=>{if(w.kind!==Gn||ne!=="multi")return;const A=ua.value?w.metaKey:w.ctrlKey,[_]=w.location,N=q.columns;if(_<G)return;const X=tt[_];let K=_,z=_;for(let U=_-1;U>=G&&uo(X.group,tt[U].group);U--)K--;for(let U=_+1;U<tt.length&&uo(X.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&&Xe!==void 0){const A=Qt.current.y,_=Qt.current.height;let N=ee({x:w,y:A,width:1,height:Math.min(_,He-A)},V.current.signal);typeof N!="object"&&(N=await N());const X=on[w-G],z=document.createElement("canvas").getContext("2d",{alpha:!1});if(z!==null){z.font=st.baseFontFull;const U=ad(z,st,X,0,N,hr,ni,!1,Jt);Xe?.(X,U.width,w,U.width)}}},[on,ee,ni,st,hr,Xe,G,He,Jt]),[Pf,za]=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(I!==void 0){let U=!1;if(I({fillDestination:{...N,x:N.x-G},patternSource:{..._,x:_.x-G},preventDefault:()=>U=!0}),U)return}let X=ee(_,V.current.signal);typeof X!="object"&&(X=await X());const K=X,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(jc(ie,_))continue;const ye=K[J%_.height][U%_.width];Si(ye)||!yi(ye)||z.push({location:ie,value:{...ye}})}Hn(z),hn.current?.damage(z.map(U=>({cell:U.location})))},[ee,Hn,I,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]),Lf=f.useCallback((w,A)=>{const _=s;if(u(void 0),Oa(void 0),za(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:dd(_.previousSelection.current.range,Fr)}};di(_.previousSelection,ye),ge(ye,!0);return}const[N,X]=w.location,[K,z]=Ar.current??[],U=()=>{ci.current=!0},J=ye=>{const Rt=ye.isTouch||K===N&&z===X;if(Rt&&E?.([N-G,X],{...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)&&(Hn([{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&&X===yt&&X===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 M?.([N-G,X],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===Gn){if(ie<0)return;re?.(ie,{...w,preventDefault:U});return}}w.kind==="cell"?J(w)||Ai(w):w.kind===Gn?$?.(ie,{...w,preventDefault:U}):(w.kind===Sr&&x?.(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&&X===z&&x?.(ie,{...w,preventDefault:U})}if(w.kind===Gn){if(ie<0)return;w.button===0&&N===K&&X===z&&($?.(ie,{...w,preventDefault:U}),ci.current||Ss(w))}w.kind==="cell"&&(w.button===0||w.button===1)&&J(w),Ar.current=void 0},[s,q,G,Fr,di,ge,E,Dn,Jt,Re,_i,Hn,M,li,W,oe,re,Ai,$,x,Eo,Ss]),Ff=f.useCallback(w=>{const A={...w,location:[w.location[0]-G,w.location[1]]};at?.(A),s!==void 0&&w.buttons===0&&(u(void 0),Oa(void 0),za(void 0),Hi.current=!1),za(_=>Hi.current?[w.scrollEdge[0],0]:w.scrollEdge[0]===_?.[0]&&w.scrollEdge[1]===_[1]?_:s===void 0||(er.current?.location[0]??0)<G?void 0:w.scrollEdge)},[s,at,G]),_f=f.useCallback((w,A)=>{ht?.(w-G,A)},[ht,G]),Af=f.useCallback((w,A)=>{Ye?.(w-G,A)},[Ye,G]),fi=q?.current?.cell,Hf=f.useCallback((w,A,_,N,X,K)=>{Lr.current=!1;let z=fi;z!==void 0&&(z=[z[0]-G,z[1]]);const U=_e===0?void 0:{x:0,y:w.y,width:_e,height:w.height},J=[];U!==void 0&&J.push(U),mt>0&&(J.push({x:w.x-G,y:He-mt,width:w.width,height:mt}),_e>0&&J.push({x:0,y:He-mt,width:_e,height:mt}));const ie={x:w.x-G,y:w.y,width:w.width,height:_t&&w.y+w.height>=He?w.height-1:w.height,tx:X,ty:K,extras:{selected:z,freezeRegion:U,freezeRegions:J}};Qt.current=ie,pr(ie),oi([A,_,N]),ln?.(ie,ie.tx,ie.ty,ie.extras)},[fi,G,_t,He,_e,mt,pr,ln]),zf=Cr(O,f.useCallback((w,A)=>O?.(w-G,A-G)!==!1,[O,G])),Vf=Cr(ke,f.useCallback((w,A)=>{ke?.(w-G,A-G),ne!=="none"&&qe(Qe.fromSingleSelection(A),void 0,!0)},[ne,ke,G,qe])),Va=f.useRef(!1),$f=f.useCallback(w=>{if(w.location[0]===0&&G>0){w.preventDefault();return}Te?.({...w,location:[w.location[0]-G,w.location[1]]}),w.defaultPrevented()||(Va.current=!0),u(void 0)},[Te,G]),Nf=f.useCallback(()=>{Va.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 X=_[_.length-1],K=w-X,z=w+N-X-1;return[K,z]},[_r,Ms]),$a=f.useRef(),Na=f.useCallback(w=>{if(!vd(w,$a.current)&&($a.current=w,!(er?.current?.button!==void 0&&er.current.button>=1))){if(w.buttons!==0&&s!==void 0&&er.current?.location[0]===0&&G===1&&ve==="multi"&&s.previousSelection&&!s.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&&s!==void 0&&q.current!==void 0&&!Va.current&&!Hi.current&&(Ue==="rect"||Ue==="multi-rect")){const[A,_]=q.current.cell;let[N,X]=w.location;if(X<0&&(X=Qt.current.y),s.fillHandle===!0&&s.previousSelection?.current!==void 0){const K=s.previousSelection.current.range;X=Math.min(X,_t?He-1:He);const z=$m(K,N,X,xt);Oa(z)}else{if(_t&&_===He)return;if(_t&&X===He)if(w.kind===ca)X--;else return;N=Math.max(N,G);const U=To(_);X=U===void 0?X:zn(X,U[0],U[1]);const J=N-A,ie=X-_,ye={x:J>=0?A:N,y:ie>=0?_:X,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]]})}},[s,G,ve,q,Ue,Tt,lt,_t,He,xt,To,Mt]),Bf=f.useCallback(()=>{const w=$a.current;if(w===void 0)return;const[A,_]=w.scrollEdge;let[N,X]=w.location;const K=Qt.current;A===-1?N=K.extras?.freezeRegion?.x??K.x:A===1&&(N=K.x+K.width),_===-1?X=Math.max(0,K.y):_===1&&(X=Math.min(He-1,K.y+K.height)),N=zn(N,0,tt.length-1),X=zn(X,0,He-1),Na({...w,location:[N,X]})},[tt.length,Na,He]);q0(Pf,Ht,Bf);const Bn=f.useCallback(w=>{if(q.current===void 0)return;const[A,_]=w,[N,X]=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(X)??[0,He-1],Je=Rt+1;if(_!==0)switch(_){case 2:{ie=Je,J=X,Xt(0,ie,"vertical");break}case-2:{J=ye,ie=X+1,Xt(0,J,"vertical");break}case 1:{J<X?(J++,Xt(0,J,"vertical")):(ie=Math.min(Je,ie+1),Xt(0,ie,"vertical"));break}case-1:{ie>X+1?(ie--,Xt(0,ie,"vertical")):(J=Math.max(ye,J-1),Xt(0,J,"vertical"));break}default:lo()}if(A!==0)if(A===2)U=tt.length,z=N,Xt(U-1-G,0,"horizontal");else if(A===-2)z=G,U=N+1,Xt(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},V.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&&Xt(z,0,"horizontal")}ut||(U=Math.min(tt.length,U+1),Xt(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&&Xt(U-G,0,"horizontal")}ut||(z=Math.max(G,z-1),Xt(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,He,Xt,Mt]),Ba=f.useRef(Zn);Ba.current=Zn;const br=f.useCallback((w,A,_,N)=>{const X=gn-(_?0:1);w=zn(w,G,on.length-1+G),A=zn(A,0,X);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),Ba.current&&Xt(w-G,A),!0},[gn,G,on.length,fi,q,Xt,ge,Mt]),Wf=f.useCallback((w,A)=>{i?.cell!==void 0&&w!==void 0&&wi(w)&&(Hn([{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 X=q.current.cell[1]===gn-1&&w!==void 0,K=q.current.cell[0]===tt.length-1&&w!==void 0;let z=!0;if(X&&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(zn(q.current.cell[0]+_,0,tt.length-1),zn(q.current.cell[1]+N,0,gn-1),X,!1)}D?.(w,A)},[i?.cell,xn,q,D,Hn,gn,br,tt.length,mr,Io,pe,et,si]),Uf=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 X=k([_-G,N]);if(!X.allowOverlay&&X.kind!==Z.Boolean)continue;let K;if(X.kind===Z.Custom){const z=Jt(X),U=z?.provideEditor?.({...X,location:[_-G,N]});z?.onDelete!==void 0?K=z.onDelete(X):Xg(U)&&(K=U?.deletedValue?.(X))}else(wi(X)&&X.allowOverlay||X.kind===Z.Boolean)&&(K=Jt(X)?.onDelete?.(X));K!==void 0&&!Si(K)&&wi(K)&&A.push({location:[_,N],value:K})}Hn(A),hn.current?.damage(A.map(_=>({cell:_.location})))},[xn,k,Jt,Hn,G]),zi=i!==void 0,Rs=f.useCallback(w=>{const A=()=>{w.stopPropagation(),w.preventDefault()},_={didMatch:!1},{bounds:N}=w,X=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:He},rangeStack:[]}},!1);else if(rt(z.search,w,_))l?.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:He})}}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,_))X.hasIndex(U)?qe(X.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===He&&_t)window.setTimeout(()=>{const nt=si(U);mr(nt??U)},0);else{const nt={inputType:"keyboard",key:w.key};M?.([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),Bn([-2,-2])):rt(z.selectToLastCell,w,_)?(o(void 0),Bn([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=He-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,_)?Bn([0,1]):rt(z.selectGrowUp,w,_)?Bn([0,-1]):rt(z.selectGrowRight,w,_)?Bn([1,0]):rt(z.selectGrowLeft,w,_)?Bn([-1,0]):rt(z.selectToLastRow,w,_)?Bn([0,2]):rt(z.selectToFirstRow,w,_)?Bn([0,-2]):rt(z.selectToLastColumn,w,_)?Bn([2,0]):rt(z.selectToFirstColumn,w,_)&&Bn([-2,0])),Rt=_.didMatch);if(Nn!==void 0&&Nn!=="normal"&&J!==ie){const nt=Nn==="skip-up"||Nn==="skip"||Nn==="block",yt=Nn==="skip-down"||Nn==="skip"||Nn==="block",Ct=J<ie;if(Ct&&nt){for(;J>=0&&_r(J).isGroupHeader;)J--;J<0&&(J=ie)}else if(!Ct&&yt){for(;J<He&&_r(J).isGroupHeader;)J++;J>=He&&(J=ie)}}const Ke=br(U,J,!1,ye),ut=_.didMatch;return ut&&(Ke||!Rt||Cn)&&A(),ut},[Nn,zi,q,Qn,ne,ve,Ue,G,_r,He,br,ge,Bt,v.length,Ut,Cn,Hr,qe,lt,_t,si,mr,M,li,ks,xs,Bn]),Vi=f.useCallback(w=>{let A=!1;if(Y!==void 0&&Y({...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,X=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(k([_-G,Math.max(0,Math.min(N,He-1))]))){if((!_t||N!==He)&&(X.y>N||N>X.y+X.height||X.x>_||_>X.x+X.width))return;const K={inputType:"keyboard",key:w.key};M?.([_-G,N],K),li(w.bounds,K,w.key),w.stopPropagation(),w.preventDefault()}},[Se,Y,Rs,q,k,G,He,_t,M,li]),Gf=f.useCallback((w,A)=>{const _=w.location[0]-G;if(w.kind==="header"&&oe?.(_,{...w,preventDefault:A}),w.kind===Gn){if(_<0)return;re?.(_,{...w,preventDefault:A})}if(w.kind==="cell"){const[N,X]=w.location;W?.([_,X],{...w,preventDefault:A}),Xp(q,w.location)||br(N,X,!1,!1)}},[q,W,re,oe,G,br]),Wa=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}l++}return i<e.length&&r.push(xu(e.slice(i,e.length))),n.push(r),n.map(a=>a.map(s=>({rawValue:s,formatted:s,format:"string"})))}function ku(e,t,n){const r=$0(e,t),i=a=>{window.navigator.clipboard?.writeText(a)},o=(a,s)=>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([s],{type:"text/html"})})]),!0),l=(a,s)=>{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",s)}catch{o(a,s)||i(a)}};window.navigator.clipboard?.write!==void 0||n?.clipboardData!==void 0?l(r.textPlain,r.textHtml):i(r.textPlain),n?.preventDefault()}function wd(e){return e!==!0}function Mu(e){return typeof e=="string"?e:`${e}px`}const W0=()=>e=>e.innerWidth,U0=()=>e=>e.innerHeight,G0=an("div")({name:"Wrapper",class:"gdg-wmyidgi",propsAsIs:!1,vars:{"wmyidgi-0":[W0()],"wmyidgi-1":[U0()]}}),X0=e=>{const{inWidth:t,inHeight:n,children:r,...i}=e;return f.createElement(G0,{innerHeight:Mu(n),innerWidth:Mu(t),...i},r)},Y0=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 l=!1,a=0;const s=u=>{if(!l){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*Y0;t.current?.scrollBy(i*d,o*d),a=u,n?.()}window.requestAnimationFrame(s)}};return window.requestAnimationFrame(s),()=>{l=!0}},[t,i,o,n])}function K0({rowHeight:e,headerHeight:t,groupHeaderHeight:n,theme:r,overscrollX:i,overscrollY:o,scaleToRem:l,remSize:a}){const[s,u,c,d,g,h]=zt.useMemo(()=>{if(!l||a===16)return[e,t,n,r,i,o];const p=a/16,m=e,y=rd();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,l,r]);return{rowHeight:s,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 l={headerIndex:r.headerIndex,isCollapsed:r.isCollapsed,depth:i,path:o};return r.subGroups!==void 0&&(l.subGroups=r.subGroups.map((a,s)=>t(a,i+1,[...o,s])).sort((a,s)=>a.headerIndex-s.headerIndex)),l}return e.map((r,i)=>t(r,0,[i])).sort((r,i)=>r.headerIndex-i.headerIndex)}function jl(e,t){const n=[];function r(a,s,u=!1){let c=s!==null?s-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:s;r(a.subGroups[d],g,u||a.isCollapsed)}}const i=J0(e.groups);for(let a=0;a<i.length;a++){const s=a<i.length-1?i[a+1].headerIndex:null;r(i[a],s)}let o=0,l=0;for(const a of n)a.contentIndex=l,l+=a.rows,a.rowIndex=o,o+=a.isCollapsed?1:a.rows+1;return n.filter(a=>a.skip===!1).map(a=>{const{skip:s,...u}=a;return u})}function Ml(e,t){if(t===void 0||jl.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:jl(e,t),[e,t]),o=zt.useMemo(()=>i?.reduce((c,d)=>(c[d.rowIndex]=d,c),{}),[i]),l=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]),s=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}=Ml(c,i);return d?e.themeOverride:r?.(c,h,g)},[i,r,e]));return e===void 0?{rowHeight:a,rows:t,rowNumberMapper:s,getRowThemeOverride:u}:{rowHeight:a,rows:l,rowNumberMapper:s,getRowThemeOverride:u}}function ev(e,t){const n=zt.useMemo(()=>e===void 0?void 0:jl(e,t),[e,t]);return{getRowGroupingForPath:Cd,updateRowGroupingByPath:yd,mapper:zt.useCallback(r=>{if(typeof r=="number")return Ml(r,n);const i=Ml(r[1],n);return{...i,originalIndex:[r[0],i.originalIndex]}},[n])}}function yd(e,t,n){const[r,...i]=t;return i[0]===-1?e.map((o,l)=>l===r?{...o,...n}:o):e.map((o,l)=>l===r?{...o,subGroups:yd(o.subGroups??[],i,n)}:o)}function Cd(e,t){const[n,...r]=t;return r[0]===-1?e[n]:Cd(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,l]=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:l}),[r,l,o]),[s,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=(s.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=(s.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:s,setVisibleRegion:u,scrollRef:g}}const rv=f.lazy(async()=>await Pl(()=>import("./data-grid-overlay-editor.Cmdq9aqU.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(),l=f.useRef(null),a=f.useRef(null),[s,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:k,onCellClicked:E,onCellActivated:M,onFillPattern:I,onFinishedEditing:D,coercePasteValue:S,drawHeader:C,drawCell:L,editorBloom:T,onHeaderClicked:x,onColumnProposeMove:O,rangeSelectionColumnSpanning:P=!0,spanRangeBehavior:R="default",onGroupHeaderClicked:$,onCellContextMenu:W,className:j,onHeaderContextMenu:oe,getCellsForSelection:Q,onGroupHeaderContextMenu:re,onGroupHeaderRenamed:se,onCellEdited:ae,onCellsEdited:de,onSearchResultsChanged:fe,searchResults:ue,onSearchValueChange:H,searchValue:F,onKeyDown:Y,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:Fe,onDragStart:Te,onMouseMove:at,onPaste:De,copyHeaders:we=!1,freezeColumns:_e=0,cellActivationBehavior:Re="second-click",rowSelectionMode:Ne="auto",columnSelectionMode:ft="auto",onHeaderMenuClick:ht,onHeaderIndicatorClick:Ye,getGroupDetails:pt,rowGrouping:Nt,onSearchClose:St,onItemHovered:Tt,onSelectionCleared:Bt,showSearch:qt,onVisibleRegionChanged:ln,gridSelection:It,onGridSelectionChange:gt,minColumnWidth:Wt=50,maxColumnWidth:wt=500,maxColumnAutoWidth:sn,provideEditor:Mn,trailingRowOptions:Ee,freezeTrailingRows:mt=0,allowedFillDirections:xt="orthogonal",scrollOffsetX:vn,scrollOffsetY:tn,verticalBorder:nn,onDragOverCell:cn,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:Fn=36,groupHeaderHeight:_n=Fn,theme:Ae,isOutsideClick:dn,renderers:Rn,resizeIndicator:Oi,scrollToActiveCell:Zn=!0,drawFocusRing:ka=!0,portalElementRef:wo}=e,Zr=ka==="no-editor"?i===void 0:ka,$n=typeof e.rowMarkers=="string"?void 0:e.rowMarkers,Sn=$n?.kind??e.rowMarkers??"none",Jr=$n?.width??e.rowMarkerWidth,or=$n?.startIndex??e.rowMarkerStartIndex??1,Qr=$n?.theme??e.rowMarkerTheme,fr=$n?.headerTheme,ei=$n?.headerAlwaysVisible,ti=ve!=="multi"||$n?.headerDisabled===!0,Tr=$n?.checkboxStyle??"square",hr=Math.max(Wt,20),ni=Math.max(wt,hr),Ma=Math.max(sn??ni,hr),Pi=f.useMemo(()=>typeof window>"u"?{fontSize:"16px"}:window.getComputedStyle(document.documentElement),[]),{rows:He,rowNumberMapper:Li,rowHeight:yo,getRowThemeOverride:Dr}=Q0(Nt,b,Di,h),Ra=f.useMemo(()=>Number.parseFloat(Pi.fontSize),[Pi]),{rowHeight:Jn,headerHeight:Fi,groupHeaderHeight:Co,theme:ri,overscrollX:Ia,overscrollY:Ea}=K0({groupHeaderHeight:_n,headerHeight:Fn,overscrollX:rn,overscrollY:En,remSize:Ra,rowHeight:yo,scaleToRem:Kr,theme:Ae}),Qn=Z0(le),gr=Jr??(b>1e4?48:b>1e3?44:b>100?36:32),Tn=Sn!=="none",G=Tn?1:0,_t=Ee!==void 0,ar=Ee?.sticky===!0,[Ta,Or]=f.useState(!1),Da=qt??Ta,ii=f.useCallback(()=>{St!==void 0?St():Or(!1)},[St]),q=f.useMemo(()=>It===void 0?void 0:Bo(It,G),[It,G])??n,V=f.useRef();V.current===void 0&&(V.current=new AbortController),f.useEffect(()=>()=>V?.current.abort(),[]);const[ee,xe]=F0(Q,k,G,V.current,He),Ie=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,R,V.current)),gt!==void 0?(ce.current=Bo(w,-G),gt(ce.current)):r(w)},[gt,ee,G,R]),Xe=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])),un=Cr(L,f.useCallback((w,A)=>L?.({...w,col:w.col-G},A)??!1,[L,G])),Ut=f.useCallback(w=>{if(Fe!==void 0){const A=Fe(Bo(w,-G));return typeof A=="boolean"?A:Bo(A,G)}return!0},[Fe,G]),[Mt,lt,qe]=L0(q,ge,me,he,Ce,Ue,P),st=f.useMemo(()=>cr(rd(),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,He,xe,At[0]-(G===0?0:gr)-At[2],hr,Ma,st,Jt,V.current);Sn!=="none"&&(Lt+=gr);const An=f.useMemo(()=>on.some(w=>w.group!==void 0),[on]),fn=An?Fi+Co:Fi,ai=q.rows.length,lr=Sn==="none"?void 0:ai===0?!1:ai===He?!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 Tf=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?He+1:He,Hn=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,Oa]=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],Df=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:Vn.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?Ee?.hint??"":"",U=bs.current[w];if(U?.trailingRowOptions?.disabled===!0)return Wo;{const J=U?.trailingRowOptions?.hint??z,ie=U?.trailingRowOptions?.addIcon??Ee?.addIcon;return{kind:Vn.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>=_a.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=k([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,Ee?.hint,Ee?.addIcon,bt?.strict,k]),Pa=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:_=>Ha({group:A.name,bounds:_.bounds})}]}),A},[pt,se]),Ro=f.useCallback(w=>{const[A,_]=w.cell,N=tt[A],X=N?.group!==void 0?Pa(N.group)?.overrideTheme:void 0,K=N?.themeOverride,z=Dr?.(_);o({...w,theme:cr(st,X,K,z,w.content.themeOverride)})},[Dr,tt,Pa,st]),li=f.useCallback((w,A,_)=>{if(q.current===void 0)return;const[N,X]=q.current.cell,K=Dn([N,X]);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,X],highlight:_===void 0,forceEditMode:_!==void 0,activation:A})}else K.kind===Z.Boolean&&A.inputType==="keyboard"&&K.readonly!==!0&&(Hn([{location:q.current.cell,value:{...K,data:wd(K.data)}}]),hn.current?.damage([{cell:q.current.cell}]))},[Dn,q,Hn,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]),Xt=f.useCallback((w,A,_="both",N=0,X=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-X,width:Je.width+2*N,height:Je.height+2*X};let hi=0;for(let Ua=0;Ua<_e;Ua++)hi+=on[Ua].width;let Ni=0;const Bi=mt+(ar?1:0);Bi>0&&(Ni=Yr(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+X*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<_e?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,_e,on,gn,ar,Jn]),La=f.useRef(ws),Fa=f.useRef(k);La.current=ws,Fa.current=k;const _a=f.useRef(He);_a.current=He;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 X=pe?.();let K,z=!0;X!==void 0&&(K=await X,K==="top"&&(z=!1),typeof K=="number"&&(z=!1));let U=0;const J=()=>{if(_a.current<=He){U<500&&window.setTimeout(J,U),U=50+U*2;return}const ie=typeof K=="number"?K:z?He: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=Fa.current([w-G,ie]);ye.allowOverlay&&yi(ye)&&ye.readonly!==!0&&A&&window.setTimeout(()=>{La.current(w,ie)},0)};J()},[tt,pe,G,He,Mt]),Io=f.useCallback(async(w,A=!0)=>{const _=et?.();let N,X=!0;_!==void 0&&(N=await _,N==="left"&&(X=!1),typeof N=="number"&&(X=!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:X?tt.length:0;Xt(U-G,w),Mt({cell:[U,w],range:{x:U,y:w,width:1,height:1}},!1,!1,"edit");const J=Fa.current([U-G,w]);J.allowOverlay&&yi(J)&&J.readonly!==!0&&A&&window.setTimeout(()=>{La.current(U,w)},0)};z()},[tt,et,G,Xt,Mt]),si=f.useCallback(w=>{const A=on[w]?.trailingRowOptions?.targetColumn??Ee?.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,Ee?.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),Nn=Nt?.navigationBehavior,Ai=f.useCallback(w=>{const A=ua.value?w.metaKey:w.ctrlKey,_=A&&ve==="multi",[N,X]=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,X],N===0&&Tn){if(_t===!0&&X===He||Sn==="number"||ve==="none")return;const ie=Dn(w.location);if(ie.kind!==Vn.Marker)return;if(Kt!==void 0){const Je=Jt(ie);Pn(Je?.kind===Vn.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(X),Rt=vr.current;if(ve==="multi"&&(w.shiftKey||w.isLongTouch===!0)&&Rt!==void 0&&z.hasIndex(Rt)){const Je=[Math.min(Rt,X),Math.max(Rt,X)+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(X),void 0,!0):(lt(void 0,X,!0),vr.current=X):ye&&z.length===1?lt(Qe.empty(),void 0,A):(lt(Qe.fromSingleSelection(X),void 0,A),vr.current=X)}else if(N>=G&&_t&&X===He){const ie=si(N);mr(ie??N)}else if(U!==N||J!==X){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(Nn==="block"&&_r(X).isGroupHeader)return;const Rt=ar&&X===He,Je=ar&&q!==void 0&&q.current?.cell[1]===He;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(X,J),yt=Math.max(X,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,X],range:{x:N,y:X,width:1,height:1}},!0,A,"click"),vr.current=void 0,o(void 0),xn()}}else if(w.kind==="header")if(Ar.current=[N,X],o(void 0),Tn&&N===0)vr.current=void 0,ui.current=void 0,!ti&&ve==="multi"&&(z.length!==He?lt(Qe.fromSingleSelection([0,He]),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===Gn?Ar.current=[N,X]: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,He,Sn,Dn,Kt,xn,Ne,ft,Jt,_i,lt,si,mr,Nn,_r,ar,Mt,ti,qe,ge,Bt]),Hi=f.useRef(!1),Ar=f.useRef(),Cs=f.useRef(sr),er=f.useRef(),Of=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]),[Aa,Ha]=f.useState(),Ss=f.useCallback(w=>{if(w.kind!==Gn||ne!=="multi")return;const A=ua.value?w.metaKey:w.ctrlKey,[_]=w.location,N=q.columns;if(_<G)return;const X=tt[_];let K=_,z=_;for(let U=_-1;U>=G&&uo(X.group,tt[U].group);U--)K--;for(let U=_+1;U<tt.length&&uo(X.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&&Xe!==void 0){const A=Qt.current.y,_=Qt.current.height;let N=ee({x:w,y:A,width:1,height:Math.min(_,He-A)},V.current.signal);typeof N!="object"&&(N=await N());const X=on[w-G],z=document.createElement("canvas").getContext("2d",{alpha:!1});if(z!==null){z.font=st.baseFontFull;const U=ad(z,st,X,0,N,hr,ni,!1,Jt);Xe?.(X,U.width,w,U.width)}}},[on,ee,ni,st,hr,Xe,G,He,Jt]),[Pf,za]=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(I!==void 0){let U=!1;if(I({fillDestination:{...N,x:N.x-G},patternSource:{..._,x:_.x-G},preventDefault:()=>U=!0}),U)return}let X=ee(_,V.current.signal);typeof X!="object"&&(X=await X());const K=X,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(jc(ie,_))continue;const ye=K[J%_.height][U%_.width];Si(ye)||!yi(ye)||z.push({location:ie,value:{...ye}})}Hn(z),hn.current?.damage(z.map(U=>({cell:U.location})))},[ee,Hn,I,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]),Lf=f.useCallback((w,A)=>{const _=s;if(u(void 0),Oa(void 0),za(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:dd(_.previousSelection.current.range,Fr)}};di(_.previousSelection,ye),ge(ye,!0);return}const[N,X]=w.location,[K,z]=Ar.current??[],U=()=>{ci.current=!0},J=ye=>{const Rt=ye.isTouch||K===N&&z===X;if(Rt&&E?.([N-G,X],{...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)&&(Hn([{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&&X===yt&&X===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 M?.([N-G,X],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===Gn){if(ie<0)return;re?.(ie,{...w,preventDefault:U});return}}w.kind==="cell"?J(w)||Ai(w):w.kind===Gn?$?.(ie,{...w,preventDefault:U}):(w.kind===Sr&&x?.(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&&X===z&&x?.(ie,{...w,preventDefault:U})}if(w.kind===Gn){if(ie<0)return;w.button===0&&N===K&&X===z&&($?.(ie,{...w,preventDefault:U}),ci.current||Ss(w))}w.kind==="cell"&&(w.button===0||w.button===1)&&J(w),Ar.current=void 0},[s,q,G,Fr,di,ge,E,Dn,Jt,Re,_i,Hn,M,li,W,oe,re,Ai,$,x,Eo,Ss]),Ff=f.useCallback(w=>{const A={...w,location:[w.location[0]-G,w.location[1]]};at?.(A),s!==void 0&&w.buttons===0&&(u(void 0),Oa(void 0),za(void 0),Hi.current=!1),za(_=>Hi.current?[w.scrollEdge[0],0]:w.scrollEdge[0]===_?.[0]&&w.scrollEdge[1]===_[1]?_:s===void 0||(er.current?.location[0]??0)<G?void 0:w.scrollEdge)},[s,at,G]),_f=f.useCallback((w,A)=>{ht?.(w-G,A)},[ht,G]),Af=f.useCallback((w,A)=>{Ye?.(w-G,A)},[Ye,G]),fi=q?.current?.cell,Hf=f.useCallback((w,A,_,N,X,K)=>{Lr.current=!1;let z=fi;z!==void 0&&(z=[z[0]-G,z[1]]);const U=_e===0?void 0:{x:0,y:w.y,width:_e,height:w.height},J=[];U!==void 0&&J.push(U),mt>0&&(J.push({x:w.x-G,y:He-mt,width:w.width,height:mt}),_e>0&&J.push({x:0,y:He-mt,width:_e,height:mt}));const ie={x:w.x-G,y:w.y,width:w.width,height:_t&&w.y+w.height>=He?w.height-1:w.height,tx:X,ty:K,extras:{selected:z,freezeRegion:U,freezeRegions:J}};Qt.current=ie,pr(ie),oi([A,_,N]),ln?.(ie,ie.tx,ie.ty,ie.extras)},[fi,G,_t,He,_e,mt,pr,ln]),zf=Cr(O,f.useCallback((w,A)=>O?.(w-G,A-G)!==!1,[O,G])),Vf=Cr(ke,f.useCallback((w,A)=>{ke?.(w-G,A-G),ne!=="none"&&qe(Qe.fromSingleSelection(A),void 0,!0)},[ne,ke,G,qe])),Va=f.useRef(!1),$f=f.useCallback(w=>{if(w.location[0]===0&&G>0){w.preventDefault();return}Te?.({...w,location:[w.location[0]-G,w.location[1]]}),w.defaultPrevented()||(Va.current=!0),u(void 0)},[Te,G]),Nf=f.useCallback(()=>{Va.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 X=_[_.length-1],K=w-X,z=w+N-X-1;return[K,z]},[_r,Ms]),$a=f.useRef(),Na=f.useCallback(w=>{if(!vd(w,$a.current)&&($a.current=w,!(er?.current?.button!==void 0&&er.current.button>=1))){if(w.buttons!==0&&s!==void 0&&er.current?.location[0]===0&&G===1&&ve==="multi"&&s.previousSelection&&!s.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&&s!==void 0&&q.current!==void 0&&!Va.current&&!Hi.current&&(Ue==="rect"||Ue==="multi-rect")){const[A,_]=q.current.cell;let[N,X]=w.location;if(X<0&&(X=Qt.current.y),s.fillHandle===!0&&s.previousSelection?.current!==void 0){const K=s.previousSelection.current.range;X=Math.min(X,_t?He-1:He);const z=$m(K,N,X,xt);Oa(z)}else{if(_t&&_===He)return;if(_t&&X===He)if(w.kind===ca)X--;else return;N=Math.max(N,G);const U=To(_);X=U===void 0?X:zn(X,U[0],U[1]);const J=N-A,ie=X-_,ye={x:J>=0?A:N,y:ie>=0?_:X,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]]})}},[s,G,ve,q,Ue,Tt,lt,_t,He,xt,To,Mt]),Bf=f.useCallback(()=>{const w=$a.current;if(w===void 0)return;const[A,_]=w.scrollEdge;let[N,X]=w.location;const K=Qt.current;A===-1?N=K.extras?.freezeRegion?.x??K.x:A===1&&(N=K.x+K.width),_===-1?X=Math.max(0,K.y):_===1&&(X=Math.min(He-1,K.y+K.height)),N=zn(N,0,tt.length-1),X=zn(X,0,He-1),Na({...w,location:[N,X]})},[tt.length,Na,He]);q0(Pf,Ht,Bf);const Bn=f.useCallback(w=>{if(q.current===void 0)return;const[A,_]=w,[N,X]=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(X)??[0,He-1],Je=Rt+1;if(_!==0)switch(_){case 2:{ie=Je,J=X,Xt(0,ie,"vertical");break}case-2:{J=ye,ie=X+1,Xt(0,J,"vertical");break}case 1:{J<X?(J++,Xt(0,J,"vertical")):(ie=Math.min(Je,ie+1),Xt(0,ie,"vertical"));break}case-1:{ie>X+1?(ie--,Xt(0,ie,"vertical")):(J=Math.max(ye,J-1),Xt(0,J,"vertical"));break}default:lo()}if(A!==0)if(A===2)U=tt.length,z=N,Xt(U-1-G,0,"horizontal");else if(A===-2)z=G,U=N+1,Xt(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},V.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&&Xt(z,0,"horizontal")}ut||(U=Math.min(tt.length,U+1),Xt(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&&Xt(U-G,0,"horizontal")}ut||(z=Math.max(G,z-1),Xt(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,He,Xt,Mt]),Ba=f.useRef(Zn);Ba.current=Zn;const br=f.useCallback((w,A,_,N)=>{const X=gn-(_?0:1);w=zn(w,G,on.length-1+G),A=zn(A,0,X);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),Ba.current&&Xt(w-G,A),!0},[gn,G,on.length,fi,q,Xt,ge,Mt]),Wf=f.useCallback((w,A)=>{i?.cell!==void 0&&w!==void 0&&wi(w)&&(Hn([{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 X=q.current.cell[1]===gn-1&&w!==void 0,K=q.current.cell[0]===tt.length-1&&w!==void 0;let z=!0;if(X&&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(zn(q.current.cell[0]+_,0,tt.length-1),zn(q.current.cell[1]+N,0,gn-1),X,!1)}D?.(w,A)},[i?.cell,xn,q,D,Hn,gn,br,tt.length,mr,Io,pe,et,si]),Uf=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 X=k([_-G,N]);if(!X.allowOverlay&&X.kind!==Z.Boolean)continue;let K;if(X.kind===Z.Custom){const z=Jt(X),U=z?.provideEditor?.({...X,location:[_-G,N]});z?.onDelete!==void 0?K=z.onDelete(X):Xg(U)&&(K=U?.deletedValue?.(X))}else(wi(X)&&X.allowOverlay||X.kind===Z.Boolean)&&(K=Jt(X)?.onDelete?.(X));K!==void 0&&!Si(K)&&wi(K)&&A.push({location:[_,N],value:K})}Hn(A),hn.current?.damage(A.map(_=>({cell:_.location})))},[xn,k,Jt,Hn,G]),zi=i!==void 0,Rs=f.useCallback(w=>{const A=()=>{w.stopPropagation(),w.preventDefault()},_={didMatch:!1},{bounds:N}=w,X=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:He},rangeStack:[]}},!1);else if(rt(z.search,w,_))l?.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:He})}}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,_))X.hasIndex(U)?qe(X.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===He&&_t)window.setTimeout(()=>{const nt=si(U);mr(nt??U)},0);else{const nt={inputType:"keyboard",key:w.key};M?.([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),Bn([-2,-2])):rt(z.selectToLastCell,w,_)?(o(void 0),Bn([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=He-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,_)?Bn([0,1]):rt(z.selectGrowUp,w,_)?Bn([0,-1]):rt(z.selectGrowRight,w,_)?Bn([1,0]):rt(z.selectGrowLeft,w,_)?Bn([-1,0]):rt(z.selectToLastRow,w,_)?Bn([0,2]):rt(z.selectToFirstRow,w,_)?Bn([0,-2]):rt(z.selectToLastColumn,w,_)?Bn([2,0]):rt(z.selectToFirstColumn,w,_)&&Bn([-2,0])),Rt=_.didMatch);if(Nn!==void 0&&Nn!=="normal"&&J!==ie){const nt=Nn==="skip-up"||Nn==="skip"||Nn==="block",yt=Nn==="skip-down"||Nn==="skip"||Nn==="block",Ct=J<ie;if(Ct&&nt){for(;J>=0&&_r(J).isGroupHeader;)J--;J<0&&(J=ie)}else if(!Ct&&yt){for(;J<He&&_r(J).isGroupHeader;)J++;J>=He&&(J=ie)}}const Ke=br(U,J,!1,ye),ut=_.didMatch;return ut&&(Ke||!Rt||Cn)&&A(),ut},[Nn,zi,q,Qn,ne,ve,Ue,G,_r,He,br,ge,Bt,v.length,Ut,Cn,Hr,qe,lt,_t,si,mr,M,li,ks,xs,Bn]),Vi=f.useCallback(w=>{let A=!1;if(Y!==void 0&&Y({...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,X=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(k([_-G,Math.max(0,Math.min(N,He-1))]))){if((!_t||N!==He)&&(X.y>N||N>X.y+X.height||X.x>_||_>X.x+X.width))return;const K={inputType:"keyboard",key:w.key};M?.([_-G,N],K),li(w.bounds,K,w.key),w.stopPropagation(),w.preventDefault()}},[Se,Y,Rs,q,k,G,He,_t,M,li]),Gf=f.useCallback((w,A)=>{const _=w.location[0]-G;if(w.kind==="header"&&oe?.(_,{...w,preventDefault:A}),w.kind===Gn){if(_<0)return;re?.(_,{...w,preventDefault:A})}if(w.kind==="cell"){const[N,X]=w.location;W?.([_,X],{...w,preventDefault:A}),Xp(q,w.location)||br(N,X,!1,!1)}},[q,W,re,oe,G,br]),Wa=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=S?.(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,X=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]),X&&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(De===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(De===!1||typeof De=="function"&&De?.([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>=He)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);Hn(Je),hn.current?.damage(Je.map(Ke=>({cell:Ke.location})))}},[S,Jt,Dn,q,Qn.paste,Ht,tt.length,Hn,gn,De,G,He]);kn("paste",Wa,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,X=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,V.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(X!==void 0&&X.length>0){const U=[...X].map(J=>{const ie=ee({x:G,y:J,width:v.length,height:1},V.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:He},V.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,He,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 Yf=f.useCallback((w,A)=>{if(fe!==void 0){G!==0&&(w=w.map(X=>[X[0]-G,X[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(Xt);Po.current=Xt,f.useLayoutEffect(()=>{Ba.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 jf=f.useMemo(()=>_t===!0&&Ee?.tint===!0?Qe.fromSingleSelection(gn-1):Qe.empty(),[gn,_t,Ee?.tint]),qf=f.useCallback(w=>typeof nn=="boolean"?nn:nn?.(w-G)??!0,[G,nn]),Kf=f.useMemo(()=>{if(Aa===void 0||a.current===null)return null;const{bounds:w,group:A}=Aa,_=a.current.getBoundingClientRect();return f.createElement(O0,{bounds:w,group:A,canvasBounds:_,onClose:()=>Ha(void 0),onFinish:N=>{Ha(void 0),se?.(A,N)}})},[se,Aa]),Zf=Math.min(tt.length,_e+(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 Wa();break}},scrollTo:Xt,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,Wa,G,Xt]);const[Es,Ts]=fi??[],Jf=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"),Xt(A,_))},[ne,xn,Xt,Es,Ts,Mt,qe]),[Qf,eh]=f.useState(!1),Ds=f.useRef(Mc(w=>{eh(w)},5)),th=f.useCallback(()=>{Ds.current(!0),q.current===void 0&&q.columns.length===0&&q.rows.length===0&&s===void 0&&Mt({cell:[G,So],range:{x:G,y:So,width:1,height:1}},!0,!1,"keyboard-select")},[So,q,s,G,Mt]),nh=f.useCallback(()=>{Ds.current(!1)},[]),[rh,ih]=f.useMemo(()=>{let w;const A=bt?.scrollbarWidthOverride??vl(),_=He+(_t?1:0);if(typeof Jn=="number")w=fn+_*Jn;else{let X=0;const K=Math.min(_,10);for(let z=0;z<K;z++)X+=Jn(z);X=Math.floor(X/K),w=fn+_*X}w+=A;const N=tt.reduce((X,K)=>K.width+X,0)+A;return[`${Math.min(1e5,N)}px`,`${Math.min(1e5,w)}px`]},[tt,bt?.scrollbarWidthOverride,Jn,He,_t,fn]),oh=f.useMemo(()=>am(st),[st]);return f.createElement(id.Provider,{value:st},f.createElement(X0,{style:oh,className:j,inWidth:m??rh,inHeight:y??ih},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:Ia,overscrollY:Ea,preventDiagonalScrolling:wn,rightElement:Gt,rightElementProps:yn,smoothScrollX:jr,smoothScrollY:qr,className:j,enableGroups:An,onCanvasFocused:th,onCanvasBlur:nh,canvasRef:a,onContextMenu:Gf,theme:st,cellXOffset:Tf,cellYOffset:So,accessibilityHeight:sr.height,onDragEnd:Nf,columns:tt,nonGrowWidth:Lt,drawHeader:vt,onColumnProposeMove:zf,drawCell:un,disabledRows:jf,freezeColumns:Zf,lockColumns:G,firstColAccessible:G===0,getCellContent:Dn,minColumnWidth:hr,maxColumnWidth:ni,searchInputRef:l,showSearch:Da,onSearchClose:ii,highlightRegions:Df,getCellsForSelection:ee,getGroupDetails:Pa,headerHeight:Fi,isFocused:Qf,groupHeaderHeight:An?Co:0,freezeTrailingRows:mt+(_t&&Ee?.sticky===!0?1:0),hasAppendRow:_t,onColumnResize:Xe,onColumnResizeEnd:Me,onColumnResizeStart:Ze,onCellFocused:Jf,onColumnMoved:Vf,onDragStart:$f,onHeaderMenuClick:_f,onHeaderIndicatorClick:Af,onItemHovered:Na,isFilling:s?.fillHandle===!0,onMouseMove:Ff,onKeyDown:Vi,onKeyUp:te,onMouseDown:Of,onMouseUp:Lf,onDragOverCell:cn,onDrop:$t,onSearchResultsChanged:Yf,onVisibleRegionChanged:Hf,clientSize:At,rowHeight:Jn,searchResults:ue,searchValue:F,onSearchValueChange:H,rows:gn,scrollRef:Ht,selection:q,translateX:sr.tx,translateY:sr.ty,verticalBorder:qf,gridRef:hn,getCellRenderer:Jt,resizeIndicator:Oi}),Kf,i!==void 0&&f.createElement(f.Suspense,{fallback:null},f.createElement(rv,{...i,validateCell:Ie,bloom:T,id:Uf,getCellRenderer:Jt,className:bt?.isSubGrid===!0?"click-outside-ignore":void 0,provideEditor:Mn,imageEditorOverride:g,portalElementRef:wo,onFinishEditing:Wf,markdownDivCreateNode:p,isOutsideClick:dn,customEventTarget:bt?.eventTarget}))))},lv=f.forwardRef(av);function Iu(e){const{cell:t,posX:n,posY:r,bounds:i,theme:o}=e,{width:l,height:a,x:s,y:u}=i,c=t.maxSize??o.checkboxMaxSize,d=Math.floor(i.y+a/2),g=zc(c,a,o.cellVerticalPadding),h=Hc(t.contentAlign??"center",s,l,o.cellHorizontalPadding,g),p=Ac(h,d,g),m=Vc(s+n,u+r,p);return _l(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,_l(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:wd(e.cell.data)}},onPaste:(e,t)=>{let n=ia;return e.toLowerCase()==="true"?n=!0:e.toLowerCase()==="false"?n=!1:e.toLowerCase()==="indeterminate"&&(n=Fl),n===t.data?void 0:{...t,data:n}}};function uv(e,t,n,r,i){if(!n&&t===ia)return;const{ctx:o,hoverAmount:l,theme:a,rect:s,highlighted:u,hoverX:c,hoverY:d,cell:{contentAlign:g}}=e,{x:h,y:p,width:m,height:y}=s;let v=!1;if(i>0){let b=n?1-i+i*l:.4;if(t===ia&&(b*=l),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=an("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=>$c(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:l,y:a,width:s,height:u}=n;let c=l+r.cellHorizontalPadding;const d=[];for(const g of t){if(c>l+s)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)Yn(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=an("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=>$c(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:()=>{}},nl={};function vv(e,t,n,r){const i=Math.ceil(window.devicePixelRatio),o=5,l=n-o*2,a=4,s=n*i,u=r+o,c=r*3,d=(c+o*2)*i,g=`${e},${t},${i},${n}`;if(nl[g]!==void 0)return{el:nl[g],height:s,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=s,p.scale(i,i),nl[g]=h,p.beginPath(),Yn(p,o,o,c,l,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(),Yn(p,o+.5,o+.5,c,l,r),p.strokeStyle=t,p.lineWidth=1,p.stroke(),{el:h,height:s,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:l,row:a}=e,{x:s,width:u}=n,c=r.baseFontFull,d=Bl(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=s+r.cellHorizontalPadding;const b=r.roundingRadius??6,k=vv(r.bgCell,r.drilldownBorder,g,b),E=[];for(const M of t){if(v>s+u)break;const D=Ir(M.text,i,c).width;let S=0;M.img!==void 0&&o.loadOrGetImage(M.img,l,a)!==void 0&&(S=p-8+4);const C=D+S+m*2;E.push({x:v,width:C}),v+=C+y}if(k!==null){const{el:M,height:I,middleWidth:D,sideWidth:S,width:C,dpr:L,padding:T}=k,x=S/L,O=T/L;for(const P of E){const R=Math.floor(P.x),$=Math.floor(P.width),W=$-(x-O)*2;i.imageSmoothingEnabled=!1,i.drawImage(M,0,0,S,I,R-O,h,x,g),W>0&&i.drawImage(M,S,0,D,I,R+(x-O),h,W,g),i.drawImage(M,C-S,0,S,I,R+$-(x-O),h,x,g),i.imageSmoothingEnabled=!0}}i.beginPath();for(const[M,I]of E.entries()){const D=t[M];let S=I.x+m;if(D.img!==void 0){const C=o.loadOrGetImage(D.img,l,a);if(C!==void 0){const L=p-8;let T=0,x=0,O=C.width,P=C.height;O>P?(T+=(O-P)/2,O=P):P>O&&(x+=(P-O)/2,P=O),i.beginPath(),Yn(i,S,h+g/2-L/2,L,L,r.roundingRadius??3),i.save(),i.clip(),i.drawImage(C,T,x,O,P,S,h+g/2-L/2,L,L),i.restore(),S+=L+4}}i.beginPath(),i.fillStyle=r.textBubble,i.fillText(D.text,S,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}}},rl=4;function yv(e,t,n,r){const{rect:i,col:o,row:l,theme:a,ctx:s,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 k=t[b];if(k.length===0)continue;const E=u.loadOrGetImage(k,o,l);if(E!==void 0){m[b]=E;const M=E.width*(p/E.height);y+=M+rl}}if(y===0)return;y-=rl;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 k=b.width*(p/b.height);n>0&&(s.beginPath(),Yn(s,v,d+a.cellVerticalPadding,k,p,n),s.save(),s.clip()),s.drawImage(b,v,d+a.cellVerticalPadding,k,p),n>0&&s.restore(),v+=k+rl}}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:l}=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 s=l.cellHorizontalPadding;a+s*2>=o.width&&(a=o.width-s*2-1);const u=t.skeletonHeight??Math.min(18,o.height-2*l.cellVerticalPadding);Yn(i,o.x+s,o.y+(o.height-u)/2,a,u,l.roundingRadius??3),i.fillStyle=Wr(l.textDark,.1),i.fill()},onPaste:()=>{}},xv=()=>e=>e.targetWidth,Eu=an("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:l,validatedSelection:a}=e,s=t.data,u=t.readonly===!0,[c,d]=f.useState(s===""||r),g=f.useCallback(()=>{d(p=>!p)},[]),h=s?"gdg-ml-6":"";return c?f.createElement(Eu,{targetWidth:o.width-20},f.createElement(Xr,{autoFocus:!0,highlight:!1,validatedSelection:a,value:s,onKeyDown:p=>{p.key==="Enter"&&p.stopPropagation()},onChange:n}),f.createElement("div",{className:`gdg-edit-icon gdg-checkmark-hover ${h}`,onClick:()=>l(t)},f.createElement(up,null))):f.createElement(Eu,{targetWidth:o.width},f.createElement(_p,{contents:s,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(Hl,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:l,validatedSelection:a}=e;return f.createElement(kv,{onFinish:i,targetRect:r,value:n,validatedSelection:a,onChange:s=>t({...n,data:s.target.value}),forceEditMode:l,createNode:o})},onPaste:(e,t)=>e===t.data?void 0:{...t,data:e}},Rv={getAccessibilityString:e=>e.row.toString(),kind:Vn.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:l}=t,a=n.drawHandle?7+(o-7)/2:o/2,s=l/2;if(Math.abs(r-a)<=10&&Math.abs(i-s)<=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:l,rect:a,hoverAmount:s,theme:u}=e,{x:c,y:d,width:g,height:h}=a,p=n?1:r==="checkbox-visible"?.6+.4*s:s;if(r!=="number"&&p>0){l.globalAlpha=p;const m=7*(n?s:1);if(Xl(l,u,n,i?c+m:c,d,i?g-m:g,h,!0,void 0,void 0,u.checkboxMaxSize,"center",o),i){l.globalAlpha=s,l.beginPath();for(const y of[3,6])for(const v of[-5,-1,3])l.rect(c+y,d+h/2+v,2,2);l.fillStyle=u.textLight,l.fill(),l.beginPath()}l.globalAlpha=1}if(r==="number"||r==="both"&&!n){const m=t.toString(),y=u.markerFontFull,v=c+g/2;r==="both"&&s!==0&&(l.globalAlpha=1-s),l.fillStyle=u.textLight,l.font=y,l.fillText(m,v,d+h/2+qn(l,y)),s!==0&&(l.globalAlpha=1)}}const Dv={getAccessibilityString:()=>"",kind:Vn.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:l,spriteManager:a}=e,{x:s,y:u,width:c,height:d}=i;r.beginPath(),r.globalAlpha=o,r.rect(s+1,u+1,c,d-2),r.fillStyle=l.bgHeaderHovered,r.fill(),r.globalAlpha=1,r.beginPath();const g=t!=="";let h=0;if(n!==void 0){const m=d-8,y=s+8/2,v=u+8/2;a.drawSprite(n,"normal",r,y,v,m,l,g?1:o),h=m}else{h=24;const p=12,m=g?p:o*p,y=g?0:(1-o)*p*.5,v=l.cellHorizontalPadding+4;m>0&&(r.moveTo(s+v+y,u+d/2),r.lineTo(s+v+y+m,u+d/2),r.moveTo(s+v+y+m*.5,u+d/2-m*.5),r.lineTo(s+v+y+m*.5,u+d/2+m*.5),r.lineWidth=2,r.strokeStyle=l.bgIconHeader,r.lineCap="round",r.stroke())}r.fillStyle=l.textMedium,r.fillText(t,h+s+l.cellHorizontalPadding+.5,u+d/2+qn(r,l)),r.beginPath()}function Sd(e,t,n,r,i,o,l){e.textBaseline="alphabetic";const a=Pv(e,i,r,t,n?.fullSize??!1);e.beginPath(),Yn(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",l?.("text")}function Pv(e,t,n,r,i){const o=r.cellHorizontalPadding,l=r.cellVerticalPadding;if(i)return{x:t.x+o/2,y:t.y+l/2+1,width:t.width-o,height:t.height-l-1};const a=Ir(n,e,r.baseFontFull,"alphabetic"),s=t.height-l,u=Math.min(s,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 Pl(()=>import("./number-overlay-editor.PqOGQcLn.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:l}=e,{hoverEffect:a,displayData:s,hoverEffectTheme:u}=n;a===!0&&t>0&&Sd(r,i,u,s,o,t,l),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:l}=r;t.beginPath();const a=2.5;let s=i+n.cellHorizontalPadding+a;const u=o+l/2,c=Math.cos(tu(30))*a,d=Math.sin(tu(30))*a;for(let g=0;g<12;g++)t.moveTo(s,u-a),t.lineTo(s,u+a),t.moveTo(s+c,u-d),t.lineTo(s-c,u+d),t.moveTo(s-c,u-d),t.lineTo(s+c,u+d),s+=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(Xr,{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:l,overrideCursor:a}=e,{displayData:s,contentAlign:u,hoverEffect:c,allowWrapping:d,hoverEffectTheme:g}=t;c===!0&&n>0&&Sd(i,l,g,s,o,n,a),nr(e,s,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:l,validatedSelection:a}=e;return f.createElement(kv,{onFinish:i,targetRect:r,value:n,validatedSelection:a,onChange:s=>t({...n,data:s.target.value}),forceEditMode:l,createNode:o})},onPaste:(e,t)=>e===t.data?void 0:{...t,data:e}},Rv={getAccessibilityString:e=>e.row.toString(),kind:Vn.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:l}=t,a=n.drawHandle?7+(o-7)/2:o/2,s=l/2;if(Math.abs(r-a)<=10&&Math.abs(i-s)<=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:l,rect:a,hoverAmount:s,theme:u}=e,{x:c,y:d,width:g,height:h}=a,p=n?1:r==="checkbox-visible"?.6+.4*s:s;if(r!=="number"&&p>0){l.globalAlpha=p;const m=7*(n?s:1);if(Xl(l,u,n,i?c+m:c,d,i?g-m:g,h,!0,void 0,void 0,u.checkboxMaxSize,"center",o),i){l.globalAlpha=s,l.beginPath();for(const y of[3,6])for(const v of[-5,-1,3])l.rect(c+y,d+h/2+v,2,2);l.fillStyle=u.textLight,l.fill(),l.beginPath()}l.globalAlpha=1}if(r==="number"||r==="both"&&!n){const m=t.toString(),y=u.markerFontFull,v=c+g/2;r==="both"&&s!==0&&(l.globalAlpha=1-s),l.fillStyle=u.textLight,l.font=y,l.fillText(m,v,d+h/2+qn(l,y)),s!==0&&(l.globalAlpha=1)}}const Dv={getAccessibilityString:()=>"",kind:Vn.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:l,spriteManager:a}=e,{x:s,y:u,width:c,height:d}=i;r.beginPath(),r.globalAlpha=o,r.rect(s+1,u+1,c,d-2),r.fillStyle=l.bgHeaderHovered,r.fill(),r.globalAlpha=1,r.beginPath();const g=t!=="";let h=0;if(n!==void 0){const m=d-8,y=s+8/2,v=u+8/2;a.drawSprite(n,"normal",r,y,v,m,l,g?1:o),h=m}else{h=24;const p=12,m=g?p:o*p,y=g?0:(1-o)*p*.5,v=l.cellHorizontalPadding+4;m>0&&(r.moveTo(s+v+y,u+d/2),r.lineTo(s+v+y+m,u+d/2),r.moveTo(s+v+y+m*.5,u+d/2-m*.5),r.lineTo(s+v+y+m*.5,u+d/2+m*.5),r.lineWidth=2,r.strokeStyle=l.bgIconHeader,r.lineCap="round",r.stroke())}r.fillStyle=l.textMedium,r.fillText(t,h+s+l.cellHorizontalPadding+.5,u+d/2+qn(r,l)),r.beginPath()}function Sd(e,t,n,r,i,o,l){e.textBaseline="alphabetic";const a=Pv(e,i,r,t,n?.fullSize??!1);e.beginPath(),Yn(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",l?.("text")}function Pv(e,t,n,r,i){const o=r.cellHorizontalPadding,l=r.cellVerticalPadding;if(i)return{x:t.x+o/2,y:t.y+l/2+1,width:t.width-o,height:t.height-l-1};const a=Ir(n,e,r.baseFontFull,"alphabetic"),s=t.height-l,u=Math.min(s,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 Pl(()=>import("./number-overlay-editor.4Ae0qegV.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:l}=e,{hoverEffect:a,displayData:s,hoverEffectTheme:u}=n;a===!0&&t>0&&Sd(r,i,u,s,o,t,l),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:l}=r;t.beginPath();const a=2.5;let s=i+n.cellHorizontalPadding+a;const u=o+l/2,c=Math.cos(tu(30))*a,d=Math.sin(tu(30))*a;for(let g=0;g<12;g++)t.moveTo(s,u-a),t.lineTo(s,u+a),t.moveTo(s+c,u-d),t.lineTo(s-c,u+d),t.moveTo(s-c,u-d),t.lineTo(s+c,u+d),s+=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(Xr,{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:l,overrideCursor:a}=e,{displayData:s,contentAlign:u,hoverEffect:c,allowWrapping:d,hoverEffectTheme:g}=t;c===!0&&n>0&&Sd(i,l,g,s,o,n,a),nr(e,s,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(Xr,{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:l=>r({...i,data:l.target.value})})}}),onPaste:(e,t,n)=>e===t.data?void 0:{...t,data:e,displayData:n.formattedString??t.displayData}},Vv=an("div")({name:"UriOverlayEditorStyle",class:"gdg-u1rrojo",propsAsIs:!1}),$v=e=>{const{uri:t,onChange:n,forceEditMode:r,readonly:i,validatedSelection:o,preview:l}=e,[a,s]=f.useState(!i&&(t===""||r)),u=f.useCallback(()=>{s(!0)},[]);return a?f.createElement(Xr,{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"},l),!i&&f.createElement("div",{className:"gdg-edit-icon",onClick:u},f.createElement(Hl,null)),f.createElement("textarea",{className:"gdg-input",autoFocus:!0}))};function xd(e,t,n,r){let i=n.cellHorizontalPadding;const o=t.height/2-e.actualBoundingBoxAscent/2,l=e.width,a=e.actualBoundingBoxAscent;return r==="right"?i=t.width-l-n.cellHorizontalPadding:r==="center"&&(i=t.width/2-l/2),{x:i,y:o,width:l,height:a}}function Tu(e){const{cell:t,bounds:n,posX:r,posY:i,theme:o}=e,l=t.displayData??t.data;if(t.hoverEffect!==!0||t.onClickUri===void 0)return!1;const a=Jc(l,o.baseFontFull);if(a===void 0)return!1;const s=xd(a,n,o,t.contentAlign);return Br({x:s.x-4,y:s.y-4,width:s.width+8,height:s.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:l,ctx:a}=e,s=t.displayData??t.data,u=t.hoverEffect===!0;if(r!==void 0&&u&&i!==void 0&&o!==void 0){const c=Ir(s,a,n.baseFontFull),d=xd(c,l,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(l.x+g,Math.floor(l.y+b+m+v)+.5),a.lineTo(l.x+g+p,Math.floor(l.y+b+m+v)+.5),a.strokeStyle=n.linkColor,a.stroke(),a.save(),a.fillStyle=e.cellFillColor,nr({...e,rect:{...l,x:l.x-1}},s,t.contentAlign),nr({...e,rect:{...l,x:l.x-2}},s,t.contentAlign),nr({...e,rect:{...l,x:l.x+1}},s,t.contentAlign),nr({...e,rect:{...l,x:l.x+2}},s,t.contentAlign),a.restore()}}a.fillStyle=u?n.linkColor:n.textDark,nr(e,s,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:l=>n({...r,data:l.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],il=[];class Wv extends td{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 l=r.cells[o];if(this.isInWindow(l)){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 l=il.pop()??new Image;let a=!1;const s={img:void 0,cells:[Xn(n,r)],url:t,cancel:()=>{a||(a=!0,il.length<12?il.unshift(l):o||(l.src=""))}},u=new Promise(c=>l.addEventListener("load",()=>c(null)));requestAnimationFrame(async()=>{try{l.src=t,await u,await l.decode();const c=this.cache[i];if(c!==void 0&&!a){c.img=l;for(const d of c.cells)this.loadedLocations.push(Gl(d));o=!0,this.sendLoaded()}}catch{s.cancel()}}),this.cache[i]=s}loadOrGetImage(t,n,r){const i=t,o=this.cache[i];if(o!==void 0){const l=Xn(n,r);return o.cells.includes(l)||o.cells.push(l),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 kd(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((...l)=>{r.current=l,i(),n.current=setTimeout(()=>{r.current&&(e(...r.current),r.current=void 0)},t)},[e,t,i]),cancel:i}}var Qo={exports:{}};var Xv=Qo.exports,Du;function Yv(){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)})(Xv,function(n){var r=!1,i=!1,o=!1,l=!1,a="escape years months weeks days hours minutes seconds milliseconds general".split(" "),s=[{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,F){return F.length>H.length?!1:H.indexOf(F)!==-1}function c(H){for(var F="";H;)F+="0",H-=1;return F}function d(H){for(var F=H.split("").reverse(),Y=0,te=!0;te&&Y<F.length;)Y?F[Y]==="9"?F[Y]="0":(F[Y]=(parseInt(F[Y],10)+1).toString(),te=!1):(parseInt(F[Y],10)<5&&(te=!1),F[Y]="0"),Y+=1;return te&&F.push("1"),F.reverse().join("")}function g(H,F){var Y=D(R(F).sort(),function(le){return le+":"+F[le]}).join(","),te=H+"+"+Y;return g.cache[te]||(g.cache[te]=Intl.NumberFormat(H,F)),g.cache[te]}g.cache={};function h(H,F,Y){var te=F.useToLocaleString,le=F.useGrouping,Se=le&&F.grouping.slice(),pe=F.maximumSignificantDigits,et=F.minimumIntegerDigits||1,ke=F.fractionDigits||0,Dt=F.groupingSeparator,dt=F.decimalSeparator;if(te&&Y){var Ue={minimumIntegerDigits:et,useGrouping:le};if(ke&&(Ue.maximumFractionDigits=ke,Ue.minimumFractionDigits=ke),pe&&H>0&&(Ue.maximumSignificantDigits=pe),o){if(!l){var ne=P({},F);ne.useGrouping=!1,ne.decimalSeparator=".",H=parseFloat(h(H,ne),10)}return g(Y,Ue).format(H)}else{if(!i){var ne=P({},F);ne.useGrouping=!1,ne.decimalSeparator=".",H=parseFloat(h(H,ne),10)}return H.toLocaleString(Y,Ue)}}var ve;pe?ve=H.toPrecision(pe+1):ve=H.toFixed(ke+1);var me,he,Ce,Fe=ve.split("e");Ce=Fe[1]||"",Fe=Fe[0].split("."),he=Fe[1]||"",me=Fe[0]||"";var Te=me.length,at=he.length,De=Te+at,we=me+he;(pe&&De===pe+1||!pe&&at===ke+1)&&(we=d(we),we.length===De+1&&(Te=Te+1),at&&(we=we.slice(0,-1)),me=we.slice(0,Te),he=we.slice(Te)),pe&&(he=he.replace(/0*$/,""));var _e=parseInt(Ce,10);_e>0?he.length<=_e?(he=he+c(_e-he.length),me=me+he,he=""):(me=me+he.slice(0,_e),he=he.slice(_e)):_e<0&&(he=c(Math.abs(_e)-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){Fe=me;for(var Ne;Fe.length;)Se.length&&(Ne=Se.shift()),Re&&(Re=Dt+Re),Re=Fe.slice(-Ne)+Re,Fe=Fe.slice(0,-Ne)}else Re=me;return he&&(Re=Re+dt+he),Re}function p(H,F){return H.label.length>F.label.length?-1:H.label.length<F.label.length?1:0}function m(H,F){var Y=[];return I(R(F),function(te){if(te.slice(0,15)==="_durationLabels"){var le=te.slice(15).toLowerCase();I(R(F[te]),function(Se){Se.slice(0,1)===H&&Y.push({type:le,key:Se,label:F[te][Se]})})}}),Y}function y(H,F,Y){return F===1&&Y===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 k(H){return Object.prototype.toString.call(H)==="[object Object]"}function E(H,F){for(var Y=H.length;Y-=1;)if(F(H[Y]))return H[Y]}function M(H,F){var Y=0,te=H&&H.length||0,le;for(typeof F!="function"&&(le=F,F=function(Se){return Se===le});Y<te;){if(F(H[Y]))return H[Y];Y+=1}}function I(H,F){var Y=0,te=H.length;if(!(!H||!te))for(;Y<te;){if(F(H[Y],Y)===!1)return;Y+=1}}function D(H,F){var Y=0,te=H.length,le=[];if(!H||!te)return le;for(;Y<te;)le[Y]=F(H[Y],Y),Y+=1;return le}function S(H,F){return D(H,function(Y){return Y[F]})}function C(H){var F=[];return I(H,function(Y){Y&&F.push(Y)}),F}function L(H){var F=[];return I(H,function(Y){M(F,Y)||F.push(Y)}),F}function T(H,F){var Y=[];return I(H,function(te){I(F,function(le){te===le&&Y.push(te)})}),L(Y)}function x(H,F){var Y=[];return I(H,function(te,le){if(!F(te))return Y=H.slice(le),!1}),Y}function O(H,F){var Y=H.slice().reverse();return x(Y,F).reverse()}function P(H,F){for(var Y in F)F.hasOwnProperty(Y)&&(H[Y]=F[Y]);return H}function R(H){var F=[];for(var Y in H)H.hasOwnProperty(Y)&&F.push(Y);return F}function $(H,F){var Y=0,te=H.length;if(!H||!te)return!1;for(;Y<te;){if(F(H[Y],Y)===!0)return!0;Y+=1}return!1}function W(H){var F=[];return I(H,function(Y){F=F.concat(Y)}),F}function j(){var H=0;try{H.toLocaleString("i")}catch(F){return F.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 F=!0;return F=F&&H(1,"en",{minimumIntegerDigits:1})==="1",F=F&&H(1,"en",{minimumIntegerDigits:2})==="01",F=F&&H(1,"en",{minimumIntegerDigits:3})==="001",!(!F||(F=F&&H(99.99,"en",{maximumFractionDigits:0,minimumFractionDigits:0})==="100",F=F&&H(99.99,"en",{maximumFractionDigits:1,minimumFractionDigits:1})==="100.0",F=F&&H(99.99,"en",{maximumFractionDigits:2,minimumFractionDigits:2})==="99.99",F=F&&H(99.99,"en",{maximumFractionDigits:3,minimumFractionDigits:3})==="99.990",!F)||(F=F&&H(99.99,"en",{maximumSignificantDigits:1})==="100",F=F&&H(99.99,"en",{maximumSignificantDigits:2})==="100",F=F&&H(99.99,"en",{maximumSignificantDigits:3})==="100",F=F&&H(99.99,"en",{maximumSignificantDigits:4})==="99.99",F=F&&H(99.99,"en",{maximumSignificantDigits:5})==="99.99",!F)||(F=F&&H(1e3,"en",{useGrouping:!0})==="1,000",F=F&&H(1e3,"en",{useGrouping:!1})==="1000",!F))}function re(){var H=[].slice.call(arguments),F={},Y;if(I(H,function(pe,et){if(!et){if(!b(pe))throw"Expected array as the first argument to durationsFormat.";Y=pe}if(typeof pe=="string"||typeof pe=="function"){F.template=pe;return}if(typeof pe=="number"){F.precision=pe;return}k(pe)&&P(F,pe)}),!Y||!Y.length)return[];F.returnMomentTypes=!0;var te=D(Y,function(pe){return pe.format(F)}),le=T(a,L(S(W(te),"type"))),Se=F.largest;return Se&&(le=le.slice(0,Se)),F.returnMomentTypes=!1,F.outputTypes=le,D(Y,function(pe){return pe.format(F)})}function se(){var H=[].slice.call(arguments),F=P({},this.format.defaults),Y=this.asMilliseconds(),te=this.asMonths();typeof this.isValid=="function"&&this.isValid()===!1&&(Y=0,te=0);var le=Y<0,Se=n.duration(Math.abs(Y),"milliseconds"),pe=n.duration(Math.abs(te),"months");I(H,function(B){if(typeof B=="string"||typeof B=="function"){F.template=B;return}if(typeof B=="number"){F.precision=B;return}k(B)&&P(F,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:/.+?/};F.types=a;var Dt=function(B){return M(a,function(Be){return ke[Be].test(B)})},dt=new RegExp(D(a,function(B){return ke[B].source}).join("|"),"g");F.duration=this;var Ue=typeof F.template=="function"?F.template.apply(F):F.template,ne=F.outputTypes,ve=F.returnMomentTypes,me=F.largest,he=[];ne||(b(F.stopTrim)&&(F.stopTrim=F.stopTrim.join("")),F.stopTrim&&I(F.stopTrim.match(dt),function(B){var Be=Dt(B);Be==="escape"||Be==="general"||he.push(Be)}));var Ce=n.localeData();Ce||(Ce={}),I(R(v),function(B){if(typeof v[B]=="function"){Ce[B]||(Ce[B]=v[B]);return}Ce["_"+B]||(Ce["_"+B]=v[B])}),I(R(Ce._durationTimeTemplates),function(B){Ue=Ue.replace("_"+B+"_",Ce._durationTimeTemplates[B])});var Fe=F.userLocale||n.locale(),Te=F.useLeftUnits,at=F.usePlural,De=F.precision,we=F.forceLength,_e=F.useGrouping,Re=F.trunc,Ne=F.useSignificantDigits&&De>0,ft=Ne?F.precision:0,ht=ft,Ye=F.minValue,pt=!1,Nt=F.maxValue,St=!1,Tt=F.useToLocaleString,Bt=F.groupingSeparator,qt=F.decimalSeparator,ln=F.grouping;Tt=Tt&&(r||o);var It=F.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/,sn=/both/,Mn=/mid/,Ee=/^all|[^sm]all/,mt=/final/,xt=me>0||$([Wt,sn,Ee],gt),vn=$([wt,sn,Ee],gt),tn=$([Mn,Ee],gt),nn=$([mt,Ee],gt),cn=D(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=[];Te&&cn.reverse(),I(cn,function(B){if(B.type){($t.type||$t.text)&&Zt.push($t),$t=B;return}Te?$t.text=B.token+$t.text:$t.text+=B.token}),($t.type||$t.text)&&Zt.push($t),Te&&Zt.reverse();var Ge=T(a,L(C(S(Zt,"type"))));if(!Ge.length)return S(Zt,"text").join("");Ge=D(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=M(Zt,function(Gt){return B===Gt.type});return Pt&&Nt&&Kt>Nt&&(St=!0),je&&Ye&&Math.abs(F.duration.as(B))<Ye&&(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:_e,groupingSeparator:Bt,decimalSeparator:qt,grouping:ln,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=Ye,B.decimalValue=0):(B.wholeValue=0,B.decimalValue=0)),B.isSmallest||B.significantDigits&&B.significantDigits-B.wholeValue.toString().length<=0?De<0?B.value=In(B.wholeValue,De):De===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=De,Re?B.value=B.wholeValue+In(B.decimalValue,De):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===""||M(he,B.type)||M(ne,B.type))&&(Ot=!0),B.formattedValue=h(B.value,je,Fe),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=D(Ge,bn),Ge=C(Ge),Ge.length>1){var ir=function(B){return M(Ge,function(Be){return Be.type===B})},Kn=function(B){var Be=ir(B.type);Be&&I(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)})};I(s,Kn)}return bt&&(Ot=!1,ft=ht,Ge=D(Ge,bn),Ge=C(Ge)),ne&&!(St&&!F.trim)?(Ge=D(Ge,function(B){return M(ne,function(Be){return B.type===Be})?B:null}),Ge=C(Ge)):(xt&&(Ge=x(Ge,function(B){return!B.isSmallest&&!B.wholeValue&&!M(he,B.type)})),me&&Ge.length&&(Ge=Ge.slice(0,me)),vn&&Ge.length>1&&(Ge=O(Ge,function(B){return!B.wholeValue&&!M(he,B.type)&&!B.isLargest})),tn&&(Ge=D(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<Ye)&&(Ge=[])),ve?Ge:(I(Zt,function(B){var Be=et[B.type],je=M(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={};I(Ce._durationLabelTypes,function(Gt){var yn=M(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),I(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=D(Zt,function(B){if(!B.type)return B.text;var Be=M(Ge,function(Pt){return Pt.type===B.type});if(!Be)return"";var je="";return Te&&(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===""||M(he,Be.type)||M(ne,Be.type))&&(je+="-",le=!1),B.type==="milliseconds"&&Be.formattedValueMS?je+=Be.formattedValueMS:je+=Be.formattedValue,Te||(je+=B.text),je}),Zt.join("").replace(/(,| |:|\.)*$/,"").replace(/^(,| |:|\.)*/,""))}function ae(){var H=this.duration,F=function(Se){return H._data[Se]},Y=M(this.types,F),te=E(this.types,F);switch(Y){case"milliseconds":return"S __";case"seconds":case"minutes":return"*_MS_";case"hours":return"_HMS_";case"days":if(Y===te)return"d __";case"weeks":return Y===te?"w __":(this.trim===null&&(this.trim="both"),"w __, d __, h __");case"months":if(Y===te)return"M __";case"years":return Y===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,F,Y){return H.toLocaleString(F,Y)};r=j()&&Q(fe),i=r&&oe(fe);var ue=function(H,F,Y){if(typeof window<"u"&&window&&window.Intl&&window.Intl.NumberFormat)return window.Intl.NumberFormat(F,Y).format(H)};return o=Q(ue),l=o&&oe(ue),de(n),de})})(Qo)),Qo.exports}Yv();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 ql(e){return Object.hasOwn(e,"isMissingValue")&&e.isMissingValue}function Rl(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 Il(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 Pe(e)?t||{}:Pe(t)?e||{}:mc(e,t)}function Kl(e){if(Pe(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 Md(e){return typeof e=="string"||e instanceof String?!0:(e instanceof yh&&(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 wh(e)}catch{return JSON.stringify(e,(n,r)=>typeof r=="bigint"?Number(r):r)}}catch{return`[${typeof e}]`}}function Rd(e){if(Pe(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(Pe(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 Id(e){return Pe(e)?"":ot(e.map(t=>typeof t=="string"&&t.includes(",")?t.replace(/,/g," "):t))}function da(e){if(Pe(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(Pe(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 Ed(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(Pe(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=jn("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"}})),Td=({jsonValue:e,theme:t})=>{let n;if(e)try{n=typeof e=="string"?qa.parse(e):qa.parse(qa.stringify(e))}catch{n=void 0}return Pe(n)?Ve(Xr,{highlight:!0,autoFocus:!1,disabled:!0,value:da(e)??"",onChange:()=>{}}):Ve(nb,{"data-testid":"stJsonColumnViewer",children:Ve(wg,{src:n,collapsed:2,theme:Ch(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 Ve(Td,{jsonValue:n.value||n.displayValue,theme:t})},ib=e=>{const t=e.theme,n=e.value;return Ve(Td,{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 Nl(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})},Dd="line_chart",ab="area_chart",Od="bar_chart",lb=e=>new Map(Object.entries({red:e.colors.redColor,blue:e.colors.blueColor,green:e.colors.greenColor,yellow:e.colors.yellowColor,violet:e.colors.violetColor,orange:e.colors.orangeColor,gray:e.colors.grayColor,grey:e.colors.grayColor,primary:e.colors.primary}));function Zl(e,t,n,r){const i=Ti({y_min:null,y_max:null,color:void 0},t.columnTypeOptions),o=lb(r);let l;i.color==="auto"||i.color==="auto-inverse"?l=r.colors.greenColor:l=i.color?o.get(i.color)??i.color:void 0;const a={kind:Z.Custom,allowOverlay:!1,copyData:"",contentAlign:t.contentAlignment,data:{kind:"sparkline-cell",values:[],displayValues:[],graphKind:n,color:l,yAxis:[i.y_min??0,i.y_max??1]}};return{...t,kind:e,typeIcon:e===Dd?":material/show_chart:":e===Od?":material/bar_chart:":":material/area_chart:",sortMode:"default",isEditable:!1,getCell(s){if(Pe(s))return Rl();const u=Kl(s),c=[];let d=[];if(u.length===0)return Rl();let g=Number.MIN_SAFE_INTEGER,h=Number.MAX_SAFE_INTEGER;for(let v=0;v<u.length;v++){const b=fo(u[v]);if(Number.isNaN(b)||Pe(b))return Et(ot(u),`The value cannot be interpreted as a numeric array. ${ot(b)} is not a number.`);b>g&&(g=b),b<h&&(h=b),c.push(b)}let p,m;if(u.length===1){let v;g<=0?v=g===0?1:0:v=g,p=i.y_max??v,m=i.y_min??(g>=0?0:g)}else p=i.y_max??g,m=i.y_min??h;if(Pe(m)||Pe(p)||Number.isNaN(m)||Number.isNaN(p)||m>=p)return Et("Invalid min/max y-axis configuration",`The y_min (${m}) and y_max (${p}) configuration options must be valid numbers.`);c.length>0&&(g>p||h<m)?d=c.map(v=>g-h===0?g>(p||1)?p:m:(p-m)*((v-h)/(g-h))+m):d=c;let y=l;return(i.color==="auto"&&d[0]>d[d.length-1]||i.color==="auto-inverse"&&d[0]<d[d.length-1])&&(y=r.colors.redColor),{...a,copyData:c.join(","),data:{...a.data,values:d,displayValues:c.map(v=>ra(v)),yAxis:[m,p],color:y},isMissingValue:Pe(s)}},getCellValue(s){return s.kind===Z.Loading||s.data?.values===void 0?null:s.data?.values}}}function Pd(e,t){return Zl(Dd,e,"line",t)}Pd.isEditableType=!1;function Ld(e,t){return Zl(Od,e,"bar",t)}Ld.isEditableType=!1;function Fd(e,t){return Zl(ab,e,"area",t)}Fd.isEditableType=!1;function Jl(e,t){const n={kind:Z.Boolean,data:!1,allowOverlay:!1,contentAlign:e.contentAlignment,readonly:!e.isEditable,style:"normal"};return{...e,kind:"checkbox",typeIcon:":material/check_box:",sortMode:"default",themeOverride:{roundingRadius:Math.round(Math.min(en(t.radii.md),en(t.radii.maxCheckbox)))},getCell(r){let i=null;return i=Rd(r),i===void 0?Et(ot(r),"The value cannot be interpreted as boolean."):{...n,data:i,isMissingValue:Pe(i)}},getCellValue(r){return r.data===void 0?null:r.data}}}Jl.isEditableType=!0;function Ou(e,t){return t.startsWith("+")||t.startsWith("-")?e=e.utcOffset(t,!1):e=e.tz(t),e}function Ql(e,t,n,r,i,o,l){const a=Ti({format:n,step:r,timezone:l},t.columnTypeOptions);let s;if(ct(a.timezone))try{s=Ou(Fs(),a.timezone)?.utcOffset()||void 0}catch{}let u;ct(a.min_value)&&(u=Go(a.min_value)||void 0);let c;ct(a.max_value)&&(c=Go(a.max_value)||void 0);const d={kind:Z.Custom,allowOverlay:!0,copyData:"",readonly:!t.isEditable,contentAlign:t.contentAlignment,style:t.isPinned?"faded":"normal",data:{kind:"date-picker-cell",date:void 0,displayDate:"",step:a.step?.toString()||"1",format:i,min:u,max:c}},g=h=>{const p=Go(h);return p===null?!t.isRequired:!(p===void 0||ct(u)&&o(p)<o(u)||ct(c)&&o(p)>o(c))};return{...t,kind:e,typeIcon:e==="date"?":material/calendar_month:":e==="time"?":material/access_time:":":material/calendar_today:",sortMode:"default",validateInput:g,getCell(h,p){if(p===!0){const k=g(h);if(k===!1)return Et(ot(h),"Invalid input.");k instanceof Date&&(h=k)}const m=Go(h);let y="",v="",b=s;if(m===void 0)return Et(ot(h),"The value cannot be interpreted as a datetime object.");if(m!==null){let k=Fs.utc(m);if(!k.isValid())return Et(ot(m),`Invalid moment date. This should never happen. Please report this bug.
178
178
  Error: ${k.toString()}`);if(a.timezone){try{k=Ou(k,a.timezone)}catch(E){return Et(k.toISOString(),`Failed to adjust to the provided timezone: ${a.timezone}.
@@ -184,5 +184,5 @@ Error: ${o}`}const r={kind:Z.Text,data:"",displayData:"",allowOverlay:!0,content
184
184
  40% { opacity: 1; }
185
185
  `]))),G1=function(t,n){var r=t.isFocused,i=t.size,o=t.theme,l=o.colors,a=o.spacing.baseUnit;return Oe({label:"loadingIndicator",display:"flex",transition:"color 150ms",alignSelf:"center",fontSize:i,lineHeight:1,marginRight:i,textAlign:"center",verticalAlign:"middle"},n?{}:{color:r?l.neutral60:l.neutral20,padding:a*2})},ll=function(t){var n=t.delay,r=t.offset;return Le("span",{css:Cc({animation:"".concat(U1," 1s ease-in-out ").concat(n,"ms infinite;"),backgroundColor:"currentColor",borderRadius:"1em",display:"inline-block",marginLeft:r?"1em":void 0,height:"1em",verticalAlign:"top",width:"1em"},"","")})},X1=function(t){var n=t.innerProps,r=t.isRtl,i=t.size,o=i===void 0?4:i,l=rr(t,A1);return Le("div",ze({},jt(Oe(Oe({},l),{},{innerProps:n,isRtl:r,size:o}),"loadingIndicator",{indicator:!0,"loading-indicator":!0}),n),Le(ll,{delay:0,offset:r}),Le(ll,{delay:160,offset:!0}),Le(ll,{delay:320,offset:!r}))},Y1=function(t,n){var r=t.isDisabled,i=t.isFocused,o=t.theme,l=o.colors,a=o.borderRadius,s=o.spacing;return Oe({label:"control",alignItems:"center",cursor:"default",display:"flex",flexWrap:"wrap",justifyContent:"space-between",minHeight:s.controlHeight,outline:"0 !important",position:"relative",transition:"all 100ms"},n?{}:{backgroundColor:r?l.neutral5:l.neutral0,borderColor:r?l.neutral10:i?l.primary:l.neutral20,borderRadius:a,borderStyle:"solid",borderWidth:1,boxShadow:i?"0 0 0 1px ".concat(l.primary):void 0,"&:hover":{borderColor:i?l.primary:l.neutral30}})},j1=function(t){var n=t.children,r=t.isDisabled,i=t.isFocused,o=t.innerRef,l=t.innerProps,a=t.menuIsOpen;return Le("div",ze({ref:o},jt(t,"control",{control:!0,"control--is-disabled":r,"control--is-focused":i,"control--menu-is-open":a}),l,{"aria-disabled":r||void 0}),n)},q1=j1,K1=["data"],Z1=function(t,n){var r=t.theme.spacing;return n?{}:{paddingBottom:r.baseUnit*2,paddingTop:r.baseUnit*2}},J1=function(t){var n=t.children,r=t.cx,i=t.getStyles,o=t.getClassNames,l=t.Heading,a=t.headingProps,s=t.innerProps,u=t.label,c=t.theme,d=t.selectProps;return Le("div",ze({},jt(t,"group",{group:!0}),s),Le(l,ze({},a,{selectProps:d,theme:c,getStyles:i,getClassNames:o,cx:r}),u),Le("div",null,n))},Q1=function(t,n){var r=t.theme,i=r.colors,o=r.spacing;return Oe({label:"group",cursor:"default",display:"block"},n?{}:{color:i.neutral40,fontSize:"75%",fontWeight:500,marginBottom:"0.25em",paddingLeft:o.baseUnit*3,paddingRight:o.baseUnit*3,textTransform:"uppercase"})},ew=function(t){var n=Zd(t);n.data;var r=rr(n,K1);return Le("div",ze({},jt(t,"groupHeading",{"group-heading":!0}),r))},tw=J1,nw=["innerRef","isDisabled","isHidden","inputClassName"],rw=function(t,n){var r=t.isDisabled,i=t.value,o=t.theme,l=o.spacing,a=o.colors;return Oe(Oe({visibility:r?"hidden":"visible",transform:i?"translateZ(0)":""},iw),n?{}:{margin:l.baseUnit/2,paddingBottom:l.baseUnit/2,paddingTop:l.baseUnit/2,color:a.neutral80})},lf={gridArea:"1 / 2",font:"inherit",minWidth:"2px",border:0,margin:0,outline:0,padding:0},iw={flex:"1 1 auto",display:"inline-grid",gridArea:"1 / 1 / 2 / 3",gridTemplateColumns:"0 min-content","&:after":Oe({content:'attr(data-value) " "',visibility:"hidden",whiteSpace:"pre"},lf)},ow=function(t){return Oe({label:"input",color:"inherit",background:0,opacity:t?0:1,width:"100%"},lf)},aw=function(t){var n=t.cx,r=t.value,i=Zd(t),o=i.innerRef,l=i.isDisabled,a=i.isHidden,s=i.inputClassName,u=rr(i,nw);return Le("div",ze({},jt(t,"input",{"input-container":!0}),{"data-value":r||""}),Le("input",ze({className:n({input:!0},s),ref:o,style:ow(a),disabled:l},u)))},lw=aw,sw=function(t,n){var r=t.theme,i=r.spacing,o=r.borderRadius,l=r.colors;return Oe({label:"multiValue",display:"flex",minWidth:0},n?{}:{backgroundColor:l.neutral10,borderRadius:o/2,margin:i.baseUnit/2})},uw=function(t,n){var r=t.theme,i=r.borderRadius,o=r.colors,l=t.cropWithEllipsis;return Oe({overflow:"hidden",textOverflow:l||l===void 0?"ellipsis":void 0,whiteSpace:"nowrap"},n?{}:{borderRadius:i/2,color:o.neutral80,fontSize:"85%",padding:3,paddingLeft:6})},cw=function(t,n){var r=t.theme,i=r.spacing,o=r.borderRadius,l=r.colors,a=t.isFocused;return Oe({alignItems:"center",display:"flex"},n?{}:{borderRadius:o/2,backgroundColor:a?l.dangerLight:void 0,paddingLeft:i.baseUnit,paddingRight:i.baseUnit,":hover":{backgroundColor:l.dangerLight,color:l.danger}})},sf=function(t){var n=t.children,r=t.innerProps;return Le("div",r,n)},dw=sf,fw=sf;function hw(e){var t=e.children,n=e.innerProps;return Le("div",ze({role:"button"},n),t||Le(ds,{size:14}))}var gw=function(t){var n=t.children,r=t.components,i=t.data,o=t.innerProps,l=t.isDisabled,a=t.removeProps,s=t.selectProps,u=r.Container,c=r.Label,d=r.Remove;return Le(u,{data:i,innerProps:Oe(Oe({},jt(t,"multiValue",{"multi-value":!0,"multi-value--is-disabled":l})),o),selectProps:s},Le(c,{data:i,innerProps:Oe({},jt(t,"multiValueLabel",{"multi-value__label":!0})),selectProps:s},n),Le(d,{data:i,innerProps:Oe(Oe({},jt(t,"multiValueRemove",{"multi-value__remove":!0})),{},{"aria-label":"Remove ".concat(n||"option")},a),selectProps:s}))},pw=gw,mw=function(t,n){var r=t.isDisabled,i=t.isFocused,o=t.isSelected,l=t.theme,a=l.spacing,s=l.colors;return Oe({label:"option",cursor:"default",display:"block",fontSize:"inherit",width:"100%",userSelect:"none",WebkitTapHighlightColor:"rgba(0, 0, 0, 0)"},n?{}:{backgroundColor:o?s.primary:i?s.primary25:"transparent",color:r?s.neutral20:o?s.neutral0:"inherit",padding:"".concat(a.baseUnit*2,"px ").concat(a.baseUnit*3,"px"),":active":{backgroundColor:r?void 0:o?s.primary:s.primary50}})},vw=function(t){var n=t.children,r=t.isDisabled,i=t.isFocused,o=t.isSelected,l=t.innerRef,a=t.innerProps;return Le("div",ze({},jt(t,"option",{option:!0,"option--is-disabled":r,"option--is-focused":i,"option--is-selected":o}),{ref:l,"aria-disabled":r},a),n)},bw=vw,ww=function(t,n){var r=t.theme,i=r.spacing,o=r.colors;return Oe({label:"placeholder",gridArea:"1 / 1 / 2 / 3"},n?{}:{color:o.neutral50,marginLeft:i.baseUnit/2,marginRight:i.baseUnit/2})},yw=function(t){var n=t.children,r=t.innerProps;return Le("div",ze({},jt(t,"placeholder",{placeholder:!0}),r),n)},Cw=yw,Sw=function(t,n){var r=t.isDisabled,i=t.theme,o=i.spacing,l=i.colors;return Oe({label:"singleValue",gridArea:"1 / 1 / 2 / 3",maxWidth:"100%",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},n?{}:{color:r?l.neutral40:l.neutral80,marginLeft:o.baseUnit/2,marginRight:o.baseUnit/2})},xw=function(t){var n=t.children,r=t.isDisabled,i=t.innerProps;return Le("div",ze({},jt(t,"singleValue",{"single-value":!0,"single-value--is-disabled":r}),i),n)},kw=xw,fs={ClearIndicator:N1,Control:q1,DropdownIndicator:V1,DownChevron:of,CrossIcon:ds,Group:tw,GroupHeading:ew,IndicatorsContainer:F1,IndicatorSeparator:W1,Input:lw,LoadingIndicator:X1,Menu:y1,MenuList:S1,MenuPortal:E1,LoadingMessage:R1,NoOptionsMessage:M1,MultiValue:pw,MultiValueContainer:dw,MultiValueLabel:fw,MultiValueRemove:hw,Option:bw,Placeholder:Cw,SelectContainer:D1,SingleValue:kw,ValueContainer:P1},Mw=function(t){return Oe(Oe({},fs),t.components)},Yu=Number.isNaN||function(t){return typeof t=="number"&&t!==t};function Rw(e,t){return!!(e===t||Yu(e)&&Yu(t))}function Iw(e,t){if(e.length!==t.length)return!1;for(var n=0;n<e.length;n++)if(!Rw(e[n],t[n]))return!1;return!0}function Ew(e,t){t===void 0&&(t=Iw);var n=null;function r(){for(var i=[],o=0;o<arguments.length;o++)i[o]=arguments[o];if(n&&n.lastThis===this&&t(i,n.lastArgs))return n.lastResult;var l=e.apply(this,i);return n={lastResult:l,lastArgs:i,lastThis:this},l}return r.clear=function(){n=null},r}var Tw={name:"7pg0cj-a11yText",styles:"label:a11yText;z-index:9999;border:0;clip:rect(1px, 1px, 1px, 1px);height:1px;width:1px;position:absolute;overflow:hidden;padding:0;white-space:nowrap"},Dw=function(t){return Le("span",ze({css:Tw},t))},ju=Dw,Ow={guidance:function(t){var n=t.isSearchable,r=t.isMulti,i=t.tabSelectsValue,o=t.context,l=t.isInitialFocus;switch(o){case"menu":return"Use Up and Down to choose options, press Enter to select the currently focused option, press Escape to exit the menu".concat(i?", press Tab to select the option and exit the menu":"",".");case"input":return l?"".concat(t["aria-label"]||"Select"," is focused ").concat(n?",type to refine list":"",", press Down to open the menu, ").concat(r?" press left to focus selected values":""):"";case"value":return"Use left and right to toggle between focused values, press Backspace to remove the currently focused value";default:return""}},onChange:function(t){var n=t.action,r=t.label,i=r===void 0?"":r,o=t.labels,l=t.isDisabled;switch(n){case"deselect-option":case"pop-value":case"remove-value":return"option ".concat(i,", deselected.");case"clear":return"All selected options have been cleared.";case"initial-input-focus":return"option".concat(o.length>1?"s":""," ").concat(o.join(","),", selected.");case"select-option":return l?"option ".concat(i," is disabled. Select another option."):"option ".concat(i,", selected.");default:return""}},onFocus:function(t){var n=t.context,r=t.focused,i=t.options,o=t.label,l=o===void 0?"":o,a=t.selectValue,s=t.isDisabled,u=t.isSelected,c=t.isAppleDevice,d=function(m,y){return m&&m.length?"".concat(m.indexOf(y)+1," of ").concat(m.length):""};if(n==="value"&&a)return"value ".concat(l," focused, ").concat(d(a,r),".");if(n==="menu"&&c){var g=s?" disabled":"",h="".concat(u?" selected":"").concat(g);return"".concat(l).concat(h,", ").concat(d(i,r),".")}return""},onFilter:function(t){var n=t.inputValue,r=t.resultsMessage;return"".concat(r).concat(n?" for search term "+n:"",".")}},Pw=function(t){var n=t.ariaSelection,r=t.focusedOption,i=t.focusedValue,o=t.focusableOptions,l=t.isFocused,a=t.selectValue,s=t.selectProps,u=t.id,c=t.isAppleDevice,d=s.ariaLiveMessages,g=s.getOptionLabel,h=s.inputValue,p=s.isMulti,m=s.isOptionDisabled,y=s.isSearchable,v=s.menuIsOpen,b=s.options,k=s.screenReaderStatus,E=s.tabSelectsValue,M=s.isLoading,I=s["aria-label"],D=s["aria-live"],S=f.useMemo(function(){return Oe(Oe({},Ow),d||{})},[d]),C=f.useMemo(function(){var R="";if(n&&S.onChange){var $=n.option,W=n.options,j=n.removedValue,oe=n.removedValues,Q=n.value,re=function(F){return Array.isArray(F)?null:F},se=j||$||re(Q),ae=se?g(se):"",de=W||oe||void 0,fe=de?de.map(g):[],ue=Oe({isDisabled:se&&m(se,a),label:ae,labels:fe},n);R=S.onChange(ue)}return R},[n,S,m,a,g]),L=f.useMemo(function(){var R="",$=r||i,W=!!(r&&a&&a.includes(r));if($&&S.onFocus){var j={focused:$,label:g($),isDisabled:m($,a),isSelected:W,options:o,context:$===r?"menu":"value",selectValue:a,isAppleDevice:c};R=S.onFocus(j)}return R},[r,i,g,m,S,o,a,c]),T=f.useMemo(function(){var R="";if(v&&b.length&&!M&&S.onFilter){var $=k({count:o.length});R=S.onFilter({inputValue:h,resultsMessage:$})}return R},[o,h,v,S,b,k,M]),x=n?.action==="initial-input-focus",O=f.useMemo(function(){var R="";if(S.guidance){var $=i?"value":v?"menu":"input";R=S.guidance({"aria-label":I,context:$,isDisabled:r&&m(r,a),isMulti:p,isSearchable:y,tabSelectsValue:E,isInitialFocus:x})}return R},[I,r,i,p,m,y,v,S,a,E,x]),P=Le(f.Fragment,null,Le("span",{id:"aria-selection"},C),Le("span",{id:"aria-focused"},L),Le("span",{id:"aria-results"},T),Le("span",{id:"aria-guidance"},O));return Le(f.Fragment,null,Le(ju,{id:u},x&&P),Le(ju,{"aria-live":D,"aria-atomic":"false","aria-relevant":"additions text",role:"log"},l&&!x&&P))},Lw=Pw,Dl=[{base:"A",letters:"AⒶAÀÁÂẦẤẪẨÃĀĂẰẮẴẲȦǠÄǞẢÅǺǍȀȂẠẬẶḀĄȺⱯ"},{base:"AA",letters:"Ꜳ"},{base:"AE",letters:"ÆǼǢ"},{base:"AO",letters:"Ꜵ"},{base:"AU",letters:"Ꜷ"},{base:"AV",letters:"ꜸꜺ"},{base:"AY",letters:"Ꜽ"},{base:"B",letters:"BⒷBḂḄḆɃƂƁ"},{base:"C",letters:"CⒸCĆĈĊČÇḈƇȻꜾ"},{base:"D",letters:"DⒹDḊĎḌḐḒḎĐƋƊƉꝹ"},{base:"DZ",letters:"DZDŽ"},{base:"Dz",letters:"DzDž"},{base:"E",letters:"EⒺEÈÉÊỀẾỄỂẼĒḔḖĔĖËẺĚȄȆẸỆȨḜĘḘḚƐƎ"},{base:"F",letters:"FⒻFḞƑꝻ"},{base:"G",letters:"GⒼGǴĜḠĞĠǦĢǤƓꞠꝽꝾ"},{base:"H",letters:"HⒽHĤḢḦȞḤḨḪĦⱧⱵꞍ"},{base:"I",letters:"IⒾIÌÍÎĨĪĬİÏḮỈǏȈȊỊĮḬƗ"},{base:"J",letters:"JⒿJĴɈ"},{base:"K",letters:"KⓀKḰǨḲĶḴƘⱩꝀꝂꝄꞢ"},{base:"L",letters:"LⓁLĿĹĽḶḸĻḼḺŁȽⱢⱠꝈꝆꞀ"},{base:"LJ",letters:"LJ"},{base:"Lj",letters:"Lj"},{base:"M",letters:"MⓂMḾṀṂⱮƜ"},{base:"N",letters:"NⓃNǸŃÑṄŇṆŅṊṈȠƝꞐꞤ"},{base:"NJ",letters:"NJ"},{base:"Nj",letters:"Nj"},{base:"O",letters:"OⓄOÒÓÔỒỐỖỔÕṌȬṎŌṐṒŎȮȰÖȪỎŐǑȌȎƠỜỚỠỞỢỌỘǪǬØǾƆƟꝊꝌ"},{base:"OI",letters:"Ƣ"},{base:"OO",letters:"Ꝏ"},{base:"OU",letters:"Ȣ"},{base:"P",letters:"PⓅPṔṖƤⱣꝐꝒꝔ"},{base:"Q",letters:"QⓆQꝖꝘɊ"},{base:"R",letters:"RⓇRŔṘŘȐȒṚṜŖṞɌⱤꝚꞦꞂ"},{base:"S",letters:"SⓈSẞŚṤŜṠŠṦṢṨȘŞⱾꞨꞄ"},{base:"T",letters:"TⓉTṪŤṬȚŢṰṮŦƬƮȾꞆ"},{base:"TZ",letters:"Ꜩ"},{base:"U",letters:"UⓊUÙÚÛŨṸŪṺŬÜǛǗǕǙỦŮŰǓȔȖƯỪỨỮỬỰỤṲŲṶṴɄ"},{base:"V",letters:"VⓋVṼṾƲꝞɅ"},{base:"VY",letters:"Ꝡ"},{base:"W",letters:"WⓌWẀẂŴẆẄẈⱲ"},{base:"X",letters:"XⓍXẊẌ"},{base:"Y",letters:"YⓎYỲÝŶỸȲẎŸỶỴƳɎỾ"},{base:"Z",letters:"ZⓏZŹẐŻŽẒẔƵȤⱿⱫꝢ"},{base:"a",letters:"aⓐaẚàáâầấẫẩãāăằắẵẳȧǡäǟảåǻǎȁȃạậặḁąⱥɐ"},{base:"aa",letters:"ꜳ"},{base:"ae",letters:"æǽǣ"},{base:"ao",letters:"ꜵ"},{base:"au",letters:"ꜷ"},{base:"av",letters:"ꜹꜻ"},{base:"ay",letters:"ꜽ"},{base:"b",letters:"bⓑbḃḅḇƀƃɓ"},{base:"c",letters:"cⓒcćĉċčçḉƈȼꜿↄ"},{base:"d",letters:"dⓓdḋďḍḑḓḏđƌɖɗꝺ"},{base:"dz",letters:"dzdž"},{base:"e",letters:"eⓔeèéêềếễểẽēḕḗĕėëẻěȅȇẹệȩḝęḙḛɇɛǝ"},{base:"f",letters:"fⓕfḟƒꝼ"},{base:"g",letters:"gⓖgǵĝḡğġǧģǥɠꞡᵹꝿ"},{base:"h",letters:"hⓗhĥḣḧȟḥḩḫẖħⱨⱶɥ"},{base:"hv",letters:"ƕ"},{base:"i",letters:"iⓘiìíîĩīĭïḯỉǐȉȋịįḭɨı"},{base:"j",letters:"jⓙjĵǰɉ"},{base:"k",letters:"kⓚkḱǩḳķḵƙⱪꝁꝃꝅꞣ"},{base:"l",letters:"lⓛlŀĺľḷḹļḽḻſłƚɫⱡꝉꞁꝇ"},{base:"lj",letters:"lj"},{base:"m",letters:"mⓜmḿṁṃɱɯ"},{base:"n",letters:"nⓝnǹńñṅňṇņṋṉƞɲʼnꞑꞥ"},{base:"nj",letters:"nj"},{base:"o",letters:"oⓞoòóôồốỗổõṍȭṏōṑṓŏȯȱöȫỏőǒȍȏơờớỡởợọộǫǭøǿɔꝋꝍɵ"},{base:"oi",letters:"ƣ"},{base:"ou",letters:"ȣ"},{base:"oo",letters:"ꝏ"},{base:"p",letters:"pⓟpṕṗƥᵽꝑꝓꝕ"},{base:"q",letters:"qⓠqɋꝗꝙ"},{base:"r",letters:"rⓡrŕṙřȑȓṛṝŗṟɍɽꝛꞧꞃ"},{base:"s",letters:"sⓢsßśṥŝṡšṧṣṩșşȿꞩꞅẛ"},{base:"t",letters:"tⓣtṫẗťṭțţṱṯŧƭʈⱦꞇ"},{base:"tz",letters:"ꜩ"},{base:"u",letters:"uⓤuùúûũṹūṻŭüǜǘǖǚủůűǔȕȗưừứữửựụṳųṷṵʉ"},{base:"v",letters:"vⓥvṽṿʋꝟʌ"},{base:"vy",letters:"ꝡ"},{base:"w",letters:"wⓦwẁẃŵẇẅẘẉⱳ"},{base:"x",letters:"xⓧxẋẍ"},{base:"y",letters:"yⓨyỳýŷỹȳẏÿỷẙỵƴɏỿ"},{base:"z",letters:"zⓩzźẑżžẓẕƶȥɀⱬꝣ"}],Fw=new RegExp("["+Dl.map(function(e){return e.letters}).join("")+"]","g"),uf={};for(var sl=0;sl<Dl.length;sl++)for(var ul=Dl[sl],cl=0;cl<ul.letters.length;cl++)uf[ul.letters[cl]]=ul.base;var cf=function(t){return t.replace(Fw,function(n){return uf[n]})},_w=Ew(cf),qu=function(t){return t.replace(/^\s+|\s+$/g,"")},Aw=function(t){return"".concat(t.label," ").concat(t.value)},Hw=function(t){return function(n,r){if(n.data.__isNew__)return!0;var i=Oe({ignoreCase:!0,ignoreAccents:!0,stringify:Aw,trim:!0,matchFrom:"any"},t),o=i.ignoreCase,l=i.ignoreAccents,a=i.stringify,s=i.trim,u=i.matchFrom,c=s?qu(r):r,d=s?qu(a(n)):a(n);return o&&(c=c.toLowerCase(),d=d.toLowerCase()),l&&(c=_w(c),d=cf(d)),u==="start"?d.substr(0,c.length)===c:d.indexOf(c)>-1}},zw=["innerRef"];function Vw(e){var t=e.innerRef,n=rr(e,zw),r=f1(n,"onExited","in","enter","exit","appear");return Le("input",ze({ref:t},r,{css:Cc({label:"dummyInput",background:0,border:0,caretColor:"transparent",fontSize:"inherit",gridArea:"1 / 1 / 2 / 3",outline:0,padding:0,width:1,color:"transparent",left:-100,opacity:0,position:"relative",transform:"scale(.01)"},"","")}))}var $w=function(t){t.cancelable&&t.preventDefault(),t.stopPropagation()};function Nw(e){var t=e.isEnabled,n=e.onBottomArrive,r=e.onBottomLeave,i=e.onTopArrive,o=e.onTopLeave,l=f.useRef(!1),a=f.useRef(!1),s=f.useRef(0),u=f.useRef(null),c=f.useCallback(function(y,v){if(u.current!==null){var b=u.current,k=b.scrollTop,E=b.scrollHeight,M=b.clientHeight,I=u.current,D=v>0,S=E-M-k,C=!1;S>v&&l.current&&(r&&r(y),l.current=!1),D&&a.current&&(o&&o(y),a.current=!1),D&&v>S?(n&&!l.current&&n(y),I.scrollTop=E,C=!0,l.current=!0):!D&&-v>k&&(i&&!a.current&&i(y),I.scrollTop=0,C=!0,a.current=!0),C&&$w(y)}},[n,r,i,o]),d=f.useCallback(function(y){c(y,y.deltaY)},[c]),g=f.useCallback(function(y){s.current=y.changedTouches[0].clientY},[]),h=f.useCallback(function(y){var v=s.current-y.changedTouches[0].clientY;c(y,v)},[c]),p=f.useCallback(function(y){if(y){var v=u1?{passive:!1}:!1;y.addEventListener("wheel",d,v),y.addEventListener("touchstart",g,v),y.addEventListener("touchmove",h,v)}},[h,g,d]),m=f.useCallback(function(y){y&&(y.removeEventListener("wheel",d,!1),y.removeEventListener("touchstart",g,!1),y.removeEventListener("touchmove",h,!1))},[h,g,d]);return f.useEffect(function(){if(t){var y=u.current;return p(y),function(){m(y)}}},[t,p,m]),function(y){u.current=y}}var Ku=["boxSizing","height","overflow","paddingRight","position"],Zu={boxSizing:"border-box",overflow:"hidden",position:"relative",height:"100%"};function Ju(e){e.cancelable&&e.preventDefault()}function Qu(e){e.stopPropagation()}function ec(){var e=this.scrollTop,t=this.scrollHeight,n=e+this.offsetHeight;e===0?this.scrollTop=1:n===t&&(this.scrollTop=e-1)}function tc(){return"ontouchstart"in window||navigator.maxTouchPoints}var nc=!!(typeof window<"u"&&window.document&&window.document.createElement),eo=0,vi={capture:!1,passive:!1};function Bw(e){var t=e.isEnabled,n=e.accountForScrollbars,r=n===void 0?!0:n,i=f.useRef({}),o=f.useRef(null),l=f.useCallback(function(s){if(nc){var u=document.body,c=u&&u.style;if(r&&Ku.forEach(function(p){var m=c&&c[p];i.current[p]=m}),r&&eo<1){var d=parseInt(i.current.paddingRight,10)||0,g=document.body?document.body.clientWidth:0,h=window.innerWidth-g+d||0;Object.keys(Zu).forEach(function(p){var m=Zu[p];c&&(c[p]=m)}),c&&(c.paddingRight="".concat(h,"px"))}u&&tc()&&(u.addEventListener("touchmove",Ju,vi),s&&(s.addEventListener("touchstart",ec,vi),s.addEventListener("touchmove",Qu,vi))),eo+=1}},[r]),a=f.useCallback(function(s){if(nc){var u=document.body,c=u&&u.style;eo=Math.max(eo-1,0),r&&eo<1&&Ku.forEach(function(d){var g=i.current[d];c&&(c[d]=g)}),u&&tc()&&(u.removeEventListener("touchmove",Ju,vi),s&&(s.removeEventListener("touchstart",ec,vi),s.removeEventListener("touchmove",Qu,vi)))}},[r]);return f.useEffect(function(){if(t){var s=o.current;return l(s),function(){a(s)}}},[t,l,a]),function(s){o.current=s}}var Ww=function(t){var n=t.target;return n.ownerDocument.activeElement&&n.ownerDocument.activeElement.blur()},Uw={name:"1kfdb0e",styles:"position:fixed;left:0;bottom:0;right:0;top:0"};function Gw(e){var t=e.children,n=e.lockEnabled,r=e.captureEnabled,i=r===void 0?!0:r,o=e.onBottomArrive,l=e.onBottomLeave,a=e.onTopArrive,s=e.onTopLeave,u=Nw({isEnabled:i,onBottomArrive:o,onBottomLeave:l,onTopArrive:a,onTopLeave:s}),c=Bw({isEnabled:n}),d=function(h){u(h),c(h)};return Le(f.Fragment,null,n&&Le("div",{onClick:Ww,css:Uw}),t(d))}var Xw={name:"1a0ro4n-requiredInput",styles:"label:requiredInput;opacity:0;pointer-events:none;position:absolute;bottom:0;left:0;right:0;width:100%"},Yw=function(t){var n=t.name,r=t.onFocus;return Le("input",{required:!0,name:n,tabIndex:-1,"aria-hidden":"true",onFocus:r,css:Xw,value:"",onChange:function(){}})},jw=Yw;function hs(e){var t;return typeof window<"u"&&window.navigator!=null?e.test(((t=window.navigator.userAgentData)===null||t===void 0?void 0:t.platform)||window.navigator.platform):!1}function qw(){return hs(/^iPhone/i)}function df(){return hs(/^Mac/i)}function Kw(){return hs(/^iPad/i)||df()&&navigator.maxTouchPoints>1}function Zw(){return qw()||Kw()}function Jw(){return df()||Zw()}var Qw=function(t){return t.label},ff=function(t){return t.label},hf=function(t){return t.value},ey=function(t){return!!t.isDisabled},ty={clearIndicator:$1,container:T1,control:Y1,dropdownIndicator:z1,group:Z1,groupHeading:Q1,indicatorsContainer:L1,indicatorSeparator:B1,input:rw,loadingIndicator:G1,loadingMessage:k1,menu:v1,menuList:C1,menuPortal:I1,multiValue:sw,multiValueLabel:uw,multiValueRemove:cw,noOptionsMessage:x1,option:mw,placeholder:ww,singleValue:Sw,valueContainer:O1},ny={primary:"#2684FF",primary75:"#4C9AFF",primary50:"#B2D4FF",primary25:"#DEEBFF",danger:"#DE350B",dangerLight:"#FFBDAD",neutral0:"hsl(0, 0%, 100%)",neutral5:"hsl(0, 0%, 95%)",neutral10:"hsl(0, 0%, 90%)",neutral20:"hsl(0, 0%, 80%)",neutral30:"hsl(0, 0%, 70%)",neutral40:"hsl(0, 0%, 60%)",neutral50:"hsl(0, 0%, 50%)",neutral60:"hsl(0, 0%, 40%)",neutral70:"hsl(0, 0%, 30%)",neutral80:"hsl(0, 0%, 20%)",neutral90:"hsl(0, 0%, 10%)"},ry=4,gf=4,iy=38,oy=gf*2,ay={baseUnit:gf,controlHeight:iy,menuGutter:oy},dl={borderRadius:ry,colors:ny,spacing:ay},ly={"aria-live":"polite",backspaceRemovesValue:!0,blurInputOnSelect:Gu(),captureMenuScroll:!Gu(),classNames:{},closeMenuOnSelect:!0,closeMenuOnScroll:!1,components:{},controlShouldRenderValue:!0,escapeClearsValue:!1,filterOption:Hw(),formatGroupLabel:Qw,getOptionLabel:ff,getOptionValue:hf,isDisabled:!1,isLoading:!1,isMulti:!1,isRtl:!1,isSearchable:!0,isOptionDisabled:ey,loadingMessage:function(){return"Loading..."},maxMenuHeight:300,minMenuHeight:140,menuIsOpen:!1,menuPlacement:"bottom",menuPosition:"absolute",menuShouldBlockScroll:!1,menuShouldScrollIntoView:!l1(),noOptionsMessage:function(){return"No options"},openMenuOnFocus:!1,openMenuOnClick:!0,options:[],pageSize:5,placeholder:"Select...",screenReaderStatus:function(t){var n=t.count;return"".concat(n," result").concat(n!==1?"s":""," available")},styles:{},tabIndex:0,tabSelectsValue:!0,unstyled:!1};function rc(e,t,n,r){var i=vf(e,t,n),o=bf(e,t,n),l=mf(e,t),a=ba(e,t);return{type:"option",data:t,isDisabled:i,isSelected:o,label:l,value:a,index:r}}function ta(e,t){return e.options.map(function(n,r){if("options"in n){var i=n.options.map(function(l,a){return rc(e,l,t,a)}).filter(function(l){return oc(e,l)});return i.length>0?{type:"group",data:n,options:i,index:r}:void 0}var o=rc(e,n,t,r);return oc(e,o)?o:void 0}).filter(c1)}function pf(e){return e.reduce(function(t,n){return n.type==="group"?t.push.apply(t,Mi(n.options.map(function(r){return r.data}))):t.push(n.data),t},[])}function ic(e,t){return e.reduce(function(n,r){return r.type==="group"?n.push.apply(n,Mi(r.options.map(function(i){return{data:i.data,id:"".concat(t,"-").concat(r.index,"-").concat(i.index)}}))):n.push({data:r.data,id:"".concat(t,"-").concat(r.index)}),n},[])}function sy(e,t){return pf(ta(e,t))}function oc(e,t){var n=e.inputValue,r=n===void 0?"":n,i=t.data,o=t.isSelected,l=t.label,a=t.value;return(!yf(e)||!o)&&wf(e,{label:l,value:a,data:i},r)}function uy(e,t){var n=e.focusedValue,r=e.selectValue,i=r.indexOf(n);if(i>-1){var o=t.indexOf(n);if(o>-1)return n;if(i<t.length)return t[i]}return null}function cy(e,t){var n=e.focusedOption;return n&&t.indexOf(n)>-1?n:t[0]}var fl=function(t,n){var r,i=(r=t.find(function(o){return o.data===n}))===null||r===void 0?void 0:r.id;return i||null},mf=function(t,n){return t.getOptionLabel(n)},ba=function(t,n){return t.getOptionValue(n)};function vf(e,t,n){return typeof e.isOptionDisabled=="function"?e.isOptionDisabled(t,n):!1}function bf(e,t,n){if(n.indexOf(t)>-1)return!0;if(typeof e.isOptionSelected=="function")return e.isOptionSelected(t,n);var r=ba(e,t);return n.some(function(i){return ba(e,i)===r})}function wf(e,t,n){return e.filterOption?e.filterOption(t,n):!0}var yf=function(t){var n=t.hideSelectedOptions,r=t.isMulti;return n===void 0?r:n},dy=1,gs=(function(e){qh(n,e);var t=Kh(n);function n(r){var i;if(Zh(this,n),i=t.call(this,r),i.state={ariaSelection:null,focusedOption:null,focusedOptionId:null,focusableOptionsWithIds:[],focusedValue:null,inputIsHidden:!1,isFocused:!1,selectValue:[],clearFocusValueOnUpdate:!1,prevWasFocused:!1,inputIsHiddenAfterUpdate:void 0,prevProps:void 0,instancePrefix:""},i.blockOptionHover=!1,i.isComposing=!1,i.commonProps=void 0,i.initialTouchX=0,i.initialTouchY=0,i.openAfterFocus=!1,i.scrollToFocusedOptionOnUpdate=!1,i.userIsDragging=void 0,i.isAppleDevice=Jw(),i.controlRef=null,i.getControlRef=function(s){i.controlRef=s},i.focusedOptionRef=null,i.getFocusedOptionRef=function(s){i.focusedOptionRef=s},i.menuListRef=null,i.getMenuListRef=function(s){i.menuListRef=s},i.inputRef=null,i.getInputRef=function(s){i.inputRef=s},i.focus=i.focusInput,i.blur=i.blurInput,i.onChange=function(s,u){var c=i.props,d=c.onChange,g=c.name;u.name=g,i.ariaOnChange(s,u),d(s,u)},i.setValue=function(s,u,c){var d=i.props,g=d.closeMenuOnSelect,h=d.isMulti,p=d.inputValue;i.onInputChange("",{action:"set-value",prevInputValue:p}),g&&(i.setState({inputIsHiddenAfterUpdate:!h}),i.onMenuClose()),i.setState({clearFocusValueOnUpdate:!0}),i.onChange(s,{action:u,option:c})},i.selectOption=function(s){var u=i.props,c=u.blurInputOnSelect,d=u.isMulti,g=u.name,h=i.state.selectValue,p=d&&i.isOptionSelected(s,h),m=i.isOptionDisabled(s,h);if(p){var y=i.getOptionValue(s);i.setValue(h.filter(function(v){return i.getOptionValue(v)!==y}),"deselect-option",s)}else if(!m)d?i.setValue([].concat(Mi(h),[s]),"select-option",s):i.setValue(s,"select-option");else{i.ariaOnChange(s,{action:"select-option",option:s,name:g});return}c&&i.blurInput()},i.removeValue=function(s){var u=i.props.isMulti,c=i.state.selectValue,d=i.getOptionValue(s),g=c.filter(function(p){return i.getOptionValue(p)!==d}),h=to(u,g,g[0]||null);i.onChange(h,{action:"remove-value",removedValue:s}),i.focusInput()},i.clearValue=function(){var s=i.state.selectValue;i.onChange(to(i.props.isMulti,[],null),{action:"clear",removedValues:s})},i.popValue=function(){var s=i.props.isMulti,u=i.state.selectValue,c=u[u.length-1],d=u.slice(0,u.length-1),g=to(s,d,d[0]||null);c&&i.onChange(g,{action:"pop-value",removedValue:c})},i.getFocusedOptionId=function(s){return fl(i.state.focusableOptionsWithIds,s)},i.getFocusableOptionsWithIds=function(){return ic(ta(i.props,i.state.selectValue),i.getElementId("option"))},i.getValue=function(){return i.state.selectValue},i.cx=function(){for(var s=arguments.length,u=new Array(s),c=0;c<s;c++)u[c]=arguments[c];return n1.apply(void 0,[i.props.classNamePrefix].concat(u))},i.getOptionLabel=function(s){return mf(i.props,s)},i.getOptionValue=function(s){return ba(i.props,s)},i.getStyles=function(s,u){var c=i.props.unstyled,d=ty[s](u,c);d.boxSizing="border-box";var g=i.props.styles[s];return g?g(d,u):d},i.getClassNames=function(s,u){var c,d;return(c=(d=i.props.classNames)[s])===null||c===void 0?void 0:c.call(d,u)},i.getElementId=function(s){return"".concat(i.state.instancePrefix,"-").concat(s)},i.getComponents=function(){return Mw(i.props)},i.buildCategorizedOptions=function(){return ta(i.props,i.state.selectValue)},i.getCategorizedOptions=function(){return i.props.menuIsOpen?i.buildCategorizedOptions():[]},i.buildFocusableOptions=function(){return pf(i.buildCategorizedOptions())},i.getFocusableOptions=function(){return i.props.menuIsOpen?i.buildFocusableOptions():[]},i.ariaOnChange=function(s,u){i.setState({ariaSelection:Oe({value:s},u)})},i.onMenuMouseDown=function(s){s.button===0&&(s.stopPropagation(),s.preventDefault(),i.focusInput())},i.onMenuMouseMove=function(s){i.blockOptionHover=!1},i.onControlMouseDown=function(s){if(!s.defaultPrevented){var u=i.props.openMenuOnClick;i.state.isFocused?i.props.menuIsOpen?s.target.tagName!=="INPUT"&&s.target.tagName!=="TEXTAREA"&&i.onMenuClose():u&&i.openMenu("first"):(u&&(i.openAfterFocus=!0),i.focusInput()),s.target.tagName!=="INPUT"&&s.target.tagName!=="TEXTAREA"&&s.preventDefault()}},i.onDropdownIndicatorMouseDown=function(s){if(!(s&&s.type==="mousedown"&&s.button!==0)&&!i.props.isDisabled){var u=i.props,c=u.isMulti,d=u.menuIsOpen;i.focusInput(),d?(i.setState({inputIsHiddenAfterUpdate:!c}),i.onMenuClose()):i.openMenu("first"),s.preventDefault()}},i.onClearIndicatorMouseDown=function(s){s&&s.type==="mousedown"&&s.button!==0||(i.clearValue(),s.preventDefault(),i.openAfterFocus=!1,s.type==="touchend"?i.focusInput():setTimeout(function(){return i.focusInput()}))},i.onScroll=function(s){typeof i.props.closeMenuOnScroll=="boolean"?s.target instanceof HTMLElement&&xa(s.target)&&i.props.onMenuClose():typeof i.props.closeMenuOnScroll=="function"&&i.props.closeMenuOnScroll(s)&&i.props.onMenuClose()},i.onCompositionStart=function(){i.isComposing=!0},i.onCompositionEnd=function(){i.isComposing=!1},i.onTouchStart=function(s){var u=s.touches,c=u&&u.item(0);c&&(i.initialTouchX=c.clientX,i.initialTouchY=c.clientY,i.userIsDragging=!1)},i.onTouchMove=function(s){var u=s.touches,c=u&&u.item(0);if(c){var d=Math.abs(c.clientX-i.initialTouchX),g=Math.abs(c.clientY-i.initialTouchY),h=5;i.userIsDragging=d>h||g>h}},i.onTouchEnd=function(s){i.userIsDragging||(i.controlRef&&!i.controlRef.contains(s.target)&&i.menuListRef&&!i.menuListRef.contains(s.target)&&i.blurInput(),i.initialTouchX=0,i.initialTouchY=0)},i.onControlTouchEnd=function(s){i.userIsDragging||i.onControlMouseDown(s)},i.onClearIndicatorTouchEnd=function(s){i.userIsDragging||i.onClearIndicatorMouseDown(s)},i.onDropdownIndicatorTouchEnd=function(s){i.userIsDragging||i.onDropdownIndicatorMouseDown(s)},i.handleInputChange=function(s){var u=i.props.inputValue,c=s.currentTarget.value;i.setState({inputIsHiddenAfterUpdate:!1}),i.onInputChange(c,{action:"input-change",prevInputValue:u}),i.props.menuIsOpen||i.onMenuOpen()},i.onInputFocus=function(s){i.props.onFocus&&i.props.onFocus(s),i.setState({inputIsHiddenAfterUpdate:!1,isFocused:!0}),(i.openAfterFocus||i.props.openMenuOnFocus)&&i.openMenu("first"),i.openAfterFocus=!1},i.onInputBlur=function(s){var u=i.props.inputValue;if(i.menuListRef&&i.menuListRef.contains(document.activeElement)){i.inputRef.focus();return}i.props.onBlur&&i.props.onBlur(s),i.onInputChange("",{action:"input-blur",prevInputValue:u}),i.onMenuClose(),i.setState({focusedValue:null,isFocused:!1})},i.onOptionHover=function(s){if(!(i.blockOptionHover||i.state.focusedOption===s)){var u=i.getFocusableOptions(),c=u.indexOf(s);i.setState({focusedOption:s,focusedOptionId:c>-1?i.getFocusedOptionId(s):null})}},i.shouldHideSelectedOptions=function(){return yf(i.props)},i.onValueInputFocus=function(s){s.preventDefault(),s.stopPropagation(),i.focus()},i.onKeyDown=function(s){var u=i.props,c=u.isMulti,d=u.backspaceRemovesValue,g=u.escapeClearsValue,h=u.inputValue,p=u.isClearable,m=u.isDisabled,y=u.menuIsOpen,v=u.onKeyDown,b=u.tabSelectsValue,k=u.openMenuOnFocus,E=i.state,M=E.focusedOption,I=E.focusedValue,D=E.selectValue;if(!m&&!(typeof v=="function"&&(v(s),s.defaultPrevented))){switch(i.blockOptionHover=!0,s.key){case"ArrowLeft":if(!c||h)return;i.focusValue("previous");break;case"ArrowRight":if(!c||h)return;i.focusValue("next");break;case"Delete":case"Backspace":if(h)return;if(I)i.removeValue(I);else{if(!d)return;c?i.popValue():p&&i.clearValue()}break;case"Tab":if(i.isComposing||s.shiftKey||!y||!b||!M||k&&i.isOptionSelected(M,D))return;i.selectOption(M);break;case"Enter":if(s.keyCode===229)break;if(y){if(!M||i.isComposing)return;i.selectOption(M);break}return;case"Escape":y?(i.setState({inputIsHiddenAfterUpdate:!1}),i.onInputChange("",{action:"menu-close",prevInputValue:h}),i.onMenuClose()):p&&g&&i.clearValue();break;case" ":if(h)return;if(!y){i.openMenu("first");break}if(!M)return;i.selectOption(M);break;case"ArrowUp":y?i.focusOption("up"):i.openMenu("last");break;case"ArrowDown":y?i.focusOption("down"):i.openMenu("first");break;case"PageUp":if(!y)return;i.focusOption("pageup");break;case"PageDown":if(!y)return;i.focusOption("pagedown");break;case"Home":if(!y)return;i.focusOption("first");break;case"End":if(!y)return;i.focusOption("last");break;default:return}s.preventDefault()}},i.state.instancePrefix="react-select-"+(i.props.instanceId||++dy),i.state.selectValue=ma(r.value),r.menuIsOpen&&i.state.selectValue.length){var o=i.getFocusableOptionsWithIds(),l=i.buildFocusableOptions(),a=l.indexOf(i.state.selectValue[0]);i.state.focusableOptionsWithIds=o,i.state.focusedOption=l[a],i.state.focusedOptionId=fl(o,l[a])}return i}return Jh(n,[{key:"componentDidMount",value:function(){this.startListeningComposition(),this.startListeningToTouch(),this.props.closeMenuOnScroll&&document&&document.addEventListener&&document.addEventListener("scroll",this.onScroll,!0),this.props.autoFocus&&this.focusInput(),this.props.menuIsOpen&&this.state.focusedOption&&this.menuListRef&&this.focusedOptionRef&&Uu(this.menuListRef,this.focusedOptionRef)}},{key:"componentDidUpdate",value:function(i){var o=this.props,l=o.isDisabled,a=o.menuIsOpen,s=this.state.isFocused;(s&&!l&&i.isDisabled||s&&a&&!i.menuIsOpen)&&this.focusInput(),s&&l&&!i.isDisabled?this.setState({isFocused:!1},this.onMenuClose):!s&&!l&&i.isDisabled&&this.inputRef===document.activeElement&&this.setState({isFocused:!0}),this.menuListRef&&this.focusedOptionRef&&this.scrollToFocusedOptionOnUpdate&&(Uu(this.menuListRef,this.focusedOptionRef),this.scrollToFocusedOptionOnUpdate=!1)}},{key:"componentWillUnmount",value:function(){this.stopListeningComposition(),this.stopListeningToTouch(),document.removeEventListener("scroll",this.onScroll,!0)}},{key:"onMenuOpen",value:function(){this.props.onMenuOpen()}},{key:"onMenuClose",value:function(){this.onInputChange("",{action:"menu-close",prevInputValue:this.props.inputValue}),this.props.onMenuClose()}},{key:"onInputChange",value:function(i,o){this.props.onInputChange(i,o)}},{key:"focusInput",value:function(){this.inputRef&&this.inputRef.focus()}},{key:"blurInput",value:function(){this.inputRef&&this.inputRef.blur()}},{key:"openMenu",value:function(i){var o=this,l=this.state,a=l.selectValue,s=l.isFocused,u=this.buildFocusableOptions(),c=i==="first"?0:u.length-1;if(!this.props.isMulti){var d=u.indexOf(a[0]);d>-1&&(c=d)}this.scrollToFocusedOptionOnUpdate=!(s&&this.menuListRef),this.setState({inputIsHiddenAfterUpdate:!1,focusedValue:null,focusedOption:u[c],focusedOptionId:this.getFocusedOptionId(u[c])},function(){return o.onMenuOpen()})}},{key:"focusValue",value:function(i){var o=this.state,l=o.selectValue,a=o.focusedValue;if(this.props.isMulti){this.setState({focusedOption:null});var s=l.indexOf(a);a||(s=-1);var u=l.length-1,c=-1;if(l.length){switch(i){case"previous":s===0?c=0:s===-1?c=u:c=s-1;break;case"next":s>-1&&s<u&&(c=s+1);break}this.setState({inputIsHidden:c!==-1,focusedValue:l[c]})}}}},{key:"focusOption",value:function(){var i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"first",o=this.props.pageSize,l=this.state.focusedOption,a=this.getFocusableOptions();if(a.length){var s=0,u=a.indexOf(l);l||(u=-1),i==="up"?s=u>0?u-1:a.length-1:i==="down"?s=(u+1)%a.length:i==="pageup"?(s=u-o,s<0&&(s=0)):i==="pagedown"?(s=u+o,s>a.length-1&&(s=a.length-1)):i==="last"&&(s=a.length-1),this.scrollToFocusedOptionOnUpdate=!0,this.setState({focusedOption:a[s],focusedValue:null,focusedOptionId:this.getFocusedOptionId(a[s])})}}},{key:"getTheme",value:(function(){return this.props.theme?typeof this.props.theme=="function"?this.props.theme(dl):Oe(Oe({},dl),this.props.theme):dl})},{key:"getCommonProps",value:function(){var i=this.clearValue,o=this.cx,l=this.getStyles,a=this.getClassNames,s=this.getValue,u=this.selectOption,c=this.setValue,d=this.props,g=d.isMulti,h=d.isRtl,p=d.options,m=this.hasValue();return{clearValue:i,cx:o,getStyles:l,getClassNames:a,getValue:s,hasValue:m,isMulti:g,isRtl:h,options:p,selectOption:u,selectProps:d,setValue:c,theme:this.getTheme()}}},{key:"hasValue",value:function(){var i=this.state.selectValue;return i.length>0}},{key:"hasOptions",value:function(){return!!this.getFocusableOptions().length}},{key:"isClearable",value:function(){var i=this.props,o=i.isClearable,l=i.isMulti;return o===void 0?l:o}},{key:"isOptionDisabled",value:function(i,o){return vf(this.props,i,o)}},{key:"isOptionSelected",value:function(i,o){return bf(this.props,i,o)}},{key:"filterOption",value:function(i,o){return wf(this.props,i,o)}},{key:"formatOptionLabel",value:function(i,o){if(typeof this.props.formatOptionLabel=="function"){var l=this.props.inputValue,a=this.state.selectValue;return this.props.formatOptionLabel(i,{context:o,inputValue:l,selectValue:a})}else return this.getOptionLabel(i)}},{key:"formatGroupLabel",value:function(i){return this.props.formatGroupLabel(i)}},{key:"startListeningComposition",value:(function(){document&&document.addEventListener&&(document.addEventListener("compositionstart",this.onCompositionStart,!1),document.addEventListener("compositionend",this.onCompositionEnd,!1))})},{key:"stopListeningComposition",value:function(){document&&document.removeEventListener&&(document.removeEventListener("compositionstart",this.onCompositionStart),document.removeEventListener("compositionend",this.onCompositionEnd))}},{key:"startListeningToTouch",value:(function(){document&&document.addEventListener&&(document.addEventListener("touchstart",this.onTouchStart,!1),document.addEventListener("touchmove",this.onTouchMove,!1),document.addEventListener("touchend",this.onTouchEnd,!1))})},{key:"stopListeningToTouch",value:function(){document&&document.removeEventListener&&(document.removeEventListener("touchstart",this.onTouchStart),document.removeEventListener("touchmove",this.onTouchMove),document.removeEventListener("touchend",this.onTouchEnd))}},{key:"renderInput",value:(function(){var i=this.props,o=i.isDisabled,l=i.isSearchable,a=i.inputId,s=i.inputValue,u=i.tabIndex,c=i.form,d=i.menuIsOpen,g=i.required,h=this.getComponents(),p=h.Input,m=this.state,y=m.inputIsHidden,v=m.ariaSelection,b=this.commonProps,k=a||this.getElementId("input"),E=Oe(Oe(Oe({"aria-autocomplete":"list","aria-expanded":d,"aria-haspopup":!0,"aria-errormessage":this.props["aria-errormessage"],"aria-invalid":this.props["aria-invalid"],"aria-label":this.props["aria-label"],"aria-labelledby":this.props["aria-labelledby"],"aria-required":g,role:"combobox","aria-activedescendant":this.isAppleDevice?void 0:this.state.focusedOptionId||""},d&&{"aria-controls":this.getElementId("listbox")}),!l&&{"aria-readonly":!0}),this.hasValue()?v?.action==="initial-input-focus"&&{"aria-describedby":this.getElementId("live-region")}:{"aria-describedby":this.getElementId("placeholder")});return l?f.createElement(p,ze({},b,{autoCapitalize:"none",autoComplete:"off",autoCorrect:"off",id:k,innerRef:this.getInputRef,isDisabled:o,isHidden:y,onBlur:this.onInputBlur,onChange:this.handleInputChange,onFocus:this.onInputFocus,spellCheck:"false",tabIndex:u,form:c,type:"text",value:s},E)):f.createElement(Vw,ze({id:k,innerRef:this.getInputRef,onBlur:this.onInputBlur,onChange:pa,onFocus:this.onInputFocus,disabled:o,tabIndex:u,inputMode:"none",form:c,value:""},E))})},{key:"renderPlaceholderOrValue",value:function(){var i=this,o=this.getComponents(),l=o.MultiValue,a=o.MultiValueContainer,s=o.MultiValueLabel,u=o.MultiValueRemove,c=o.SingleValue,d=o.Placeholder,g=this.commonProps,h=this.props,p=h.controlShouldRenderValue,m=h.isDisabled,y=h.isMulti,v=h.inputValue,b=h.placeholder,k=this.state,E=k.selectValue,M=k.focusedValue,I=k.isFocused;if(!this.hasValue()||!p)return v?null:f.createElement(d,ze({},g,{key:"placeholder",isDisabled:m,isFocused:I,innerProps:{id:this.getElementId("placeholder")}}),b);if(y)return E.map(function(S,C){var L=S===M,T="".concat(i.getOptionLabel(S),"-").concat(i.getOptionValue(S));return f.createElement(l,ze({},g,{components:{Container:a,Label:s,Remove:u},isFocused:L,isDisabled:m,key:T,index:C,removeProps:{onClick:function(){return i.removeValue(S)},onTouchEnd:function(){return i.removeValue(S)},onMouseDown:function(O){O.preventDefault()}},data:S}),i.formatOptionLabel(S,"value"))});if(v)return null;var D=E[0];return f.createElement(c,ze({},g,{data:D,isDisabled:m}),this.formatOptionLabel(D,"value"))}},{key:"renderClearIndicator",value:function(){var i=this.getComponents(),o=i.ClearIndicator,l=this.commonProps,a=this.props,s=a.isDisabled,u=a.isLoading,c=this.state.isFocused;if(!this.isClearable()||!o||s||!this.hasValue()||u)return null;var d={onMouseDown:this.onClearIndicatorMouseDown,onTouchEnd:this.onClearIndicatorTouchEnd,"aria-hidden":"true"};return f.createElement(o,ze({},l,{innerProps:d,isFocused:c}))}},{key:"renderLoadingIndicator",value:function(){var i=this.getComponents(),o=i.LoadingIndicator,l=this.commonProps,a=this.props,s=a.isDisabled,u=a.isLoading,c=this.state.isFocused;if(!o||!u)return null;var d={"aria-hidden":"true"};return f.createElement(o,ze({},l,{innerProps:d,isDisabled:s,isFocused:c}))}},{key:"renderIndicatorSeparator",value:function(){var i=this.getComponents(),o=i.DropdownIndicator,l=i.IndicatorSeparator;if(!o||!l)return null;var a=this.commonProps,s=this.props.isDisabled,u=this.state.isFocused;return f.createElement(l,ze({},a,{isDisabled:s,isFocused:u}))}},{key:"renderDropdownIndicator",value:function(){var i=this.getComponents(),o=i.DropdownIndicator;if(!o)return null;var l=this.commonProps,a=this.props.isDisabled,s=this.state.isFocused,u={onMouseDown:this.onDropdownIndicatorMouseDown,onTouchEnd:this.onDropdownIndicatorTouchEnd,"aria-hidden":"true"};return f.createElement(o,ze({},l,{innerProps:u,isDisabled:a,isFocused:s}))}},{key:"renderMenu",value:function(){var i=this,o=this.getComponents(),l=o.Group,a=o.GroupHeading,s=o.Menu,u=o.MenuList,c=o.MenuPortal,d=o.LoadingMessage,g=o.NoOptionsMessage,h=o.Option,p=this.commonProps,m=this.state.focusedOption,y=this.props,v=y.captureMenuScroll,b=y.inputValue,k=y.isLoading,E=y.loadingMessage,M=y.minMenuHeight,I=y.maxMenuHeight,D=y.menuIsOpen,S=y.menuPlacement,C=y.menuPosition,L=y.menuPortalTarget,T=y.menuShouldBlockScroll,x=y.menuShouldScrollIntoView,O=y.noOptionsMessage,P=y.onMenuScrollToTop,R=y.onMenuScrollToBottom;if(!D)return null;var $=function(ae,de){var fe=ae.type,ue=ae.data,H=ae.isDisabled,F=ae.isSelected,Y=ae.label,te=ae.value,le=m===ue,Se=H?void 0:function(){return i.onOptionHover(ue)},pe=H?void 0:function(){return i.selectOption(ue)},et="".concat(i.getElementId("option"),"-").concat(de),ke={id:et,onClick:pe,onMouseMove:Se,onMouseOver:Se,tabIndex:-1,role:"option","aria-selected":i.isAppleDevice?void 0:F};return f.createElement(h,ze({},p,{innerProps:ke,data:ue,isDisabled:H,isSelected:F,key:et,label:Y,type:fe,value:te,isFocused:le,innerRef:le?i.getFocusedOptionRef:void 0}),i.formatOptionLabel(ae.data,"menu"))},W;if(this.hasOptions())W=this.getCategorizedOptions().map(function(se){if(se.type==="group"){var ae=se.data,de=se.options,fe=se.index,ue="".concat(i.getElementId("group"),"-").concat(fe),H="".concat(ue,"-heading");return f.createElement(l,ze({},p,{key:ue,data:ae,options:de,Heading:a,headingProps:{id:H,data:se.data},label:i.formatGroupLabel(se.data)}),se.options.map(function(F){return $(F,"".concat(fe,"-").concat(F.index))}))}else if(se.type==="option")return $(se,"".concat(se.index))});else if(k){var j=E({inputValue:b});if(j===null)return null;W=f.createElement(d,p,j)}else{var oe=O({inputValue:b});if(oe===null)return null;W=f.createElement(g,p,oe)}var Q={minMenuHeight:M,maxMenuHeight:I,menuPlacement:S,menuPosition:C,menuShouldScrollIntoView:x},re=f.createElement(b1,ze({},p,Q),function(se){var ae=se.ref,de=se.placerProps,fe=de.placement,ue=de.maxHeight;return f.createElement(s,ze({},p,Q,{innerRef:ae,innerProps:{onMouseDown:i.onMenuMouseDown,onMouseMove:i.onMenuMouseMove},isLoading:k,placement:fe}),f.createElement(Gw,{captureEnabled:v,onTopArrive:P,onBottomArrive:R,lockEnabled:T},function(H){return f.createElement(u,ze({},p,{innerRef:function(Y){i.getMenuListRef(Y),H(Y)},innerProps:{role:"listbox","aria-multiselectable":p.isMulti,id:i.getElementId("listbox")},isLoading:k,maxHeight:ue,focusedOption:m}),W)}))});return L||C==="fixed"?f.createElement(c,ze({},p,{appendTo:L,controlElement:this.controlRef,menuPlacement:S,menuPosition:C}),re):re}},{key:"renderFormField",value:function(){var i=this,o=this.props,l=o.delimiter,a=o.isDisabled,s=o.isMulti,u=o.name,c=o.required,d=this.state.selectValue;if(c&&!this.hasValue()&&!a)return f.createElement(jw,{name:u,onFocus:this.onValueInputFocus});if(!(!u||a))if(s)if(l){var g=d.map(function(m){return i.getOptionValue(m)}).join(l);return f.createElement("input",{name:u,type:"hidden",value:g})}else{var h=d.length>0?d.map(function(m,y){return f.createElement("input",{key:"i-".concat(y),name:u,type:"hidden",value:i.getOptionValue(m)})}):f.createElement("input",{name:u,type:"hidden",value:""});return f.createElement("div",null,h)}else{var p=d[0]?this.getOptionValue(d[0]):"";return f.createElement("input",{name:u,type:"hidden",value:p})}}},{key:"renderLiveRegion",value:function(){var i=this.commonProps,o=this.state,l=o.ariaSelection,a=o.focusedOption,s=o.focusedValue,u=o.isFocused,c=o.selectValue,d=this.getFocusableOptions();return f.createElement(Lw,ze({},i,{id:this.getElementId("live-region"),ariaSelection:l,focusedOption:a,focusedValue:s,isFocused:u,selectValue:c,focusableOptions:d,isAppleDevice:this.isAppleDevice}))}},{key:"render",value:function(){var i=this.getComponents(),o=i.Control,l=i.IndicatorsContainer,a=i.SelectContainer,s=i.ValueContainer,u=this.props,c=u.className,d=u.id,g=u.isDisabled,h=u.menuIsOpen,p=this.state.isFocused,m=this.commonProps=this.getCommonProps();return f.createElement(a,ze({},m,{className:c,innerProps:{id:d,onKeyDown:this.onKeyDown},isDisabled:g,isFocused:p}),this.renderLiveRegion(),f.createElement(o,ze({},m,{innerRef:this.getControlRef,innerProps:{onMouseDown:this.onControlMouseDown,onTouchEnd:this.onControlTouchEnd},isDisabled:g,isFocused:p,menuIsOpen:h}),f.createElement(s,ze({},m,{isDisabled:g}),this.renderPlaceholderOrValue(),this.renderInput()),f.createElement(l,ze({},m,{isDisabled:g}),this.renderClearIndicator(),this.renderLoadingIndicator(),this.renderIndicatorSeparator(),this.renderDropdownIndicator())),this.renderMenu(),this.renderFormField())}}],[{key:"getDerivedStateFromProps",value:function(i,o){var l=o.prevProps,a=o.clearFocusValueOnUpdate,s=o.inputIsHiddenAfterUpdate,u=o.ariaSelection,c=o.isFocused,d=o.prevWasFocused,g=o.instancePrefix,h=i.options,p=i.value,m=i.menuIsOpen,y=i.inputValue,v=i.isMulti,b=ma(p),k={};if(l&&(p!==l.value||h!==l.options||m!==l.menuIsOpen||y!==l.inputValue)){var E=m?sy(i,b):[],M=m?ic(ta(i,b),"".concat(g,"-option")):[],I=a?uy(o,b):null,D=cy(o,E),S=fl(M,D);k={selectValue:b,focusedOption:D,focusedOptionId:S,focusableOptionsWithIds:M,focusedValue:I,clearFocusValueOnUpdate:!1}}var C=s!=null&&i!==l?{inputIsHidden:s,inputIsHiddenAfterUpdate:void 0}:{},L=u,T=c&&d;return c&&!T&&(L={value:to(v,b,b[0]||null),options:b,action:"initial-input-focus"},T=!d),u?.action==="initial-input-focus"&&(L=null),Oe(Oe(Oe({},k),C),{},{prevProps:i,ariaSelection:L,prevWasFocused:T})}}]),n})(f.Component);gs.defaultProps=ly;var fy=f.forwardRef(function(e,t){var n=Gd(e);return f.createElement(gs,ze({ref:t},n))}),Cf=fy;const hy=e=>{const{Menu:t}=fs,{children:n,...r}=e;return f.createElement(t,{...r},n)},gy=an("div")({name:"Wrap",class:"gdg-wghi2zc",propsAsIs:!1}),py=an("div")({name:"PortalWrap",class:"gdg-p13nj8j0",propsAsIs:!1}),my=an("div")({name:"ReadOnlyWrap",class:"gdg-r6sia3g",propsAsIs:!1}),vy=e=>{const{value:t,onFinishedEditing:n,initialValue:r,portalElementRef:i}=e,{allowedValues:o,value:l}=t.data,[a,s]=f.useState(l),[u,c]=f.useState(r??""),d=od(),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(my,null,f.createElement(Xr,{highlight:!0,autoFocus:!1,disabled:!0,value:a??"",onChange:()=>{}})):f.createElement(gy,null,f.createElement(Cf,{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(py,null,f.createElement(hy,{className:"click-outside-ignore",...h}))},options:g,onChange:async h=>{h!==null&&(s(h.value),await new Promise(p=>window.requestAnimationFrame(p)),n({...t,data:{...t.data,value:h.value}}))}}))},by={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,l=t.data.allowedValues.find(s=>typeof s=="string"||s===null||s===void 0?s===o:s.value===o),a=typeof l=="string"?l:l?.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:vy,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 wy(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],l=i*t;return e.replace(n,`${Number(l.toPrecision(3))}${o}`)}return e}const yy={marginRight:8},Cy={display:"flex",alignItems:"center",flexGrow:1},Sy={kind:Z.Custom,isMatch:e=>e.data.kind==="range-cell",draw:(e,t)=>{const{ctx:n,theme:r,rect:i}=e,{min:o,max:l,value:a,label:s,measureLabel:u,color:c}=t.data,d=i.x+r.cellHorizontalPadding,g=i.y+i.height/2,h=l-o,p=(a-o)/h,m=`${wy(r.baseFontStyle,.9)} ${r.fontFamily}`,v=Bl(n,m)/2;n.save();let b=0;s!==void 0&&(n.font=m,b=Ir(u??s,n,m).width+r.cellHorizontalPadding);const k=i.width-r.cellHorizontalPadding*2-b;if(k>=v){const E=n.createLinearGradient(d,g,d+k,g),M=c??r.accentColor;E.addColorStop(0,M),E.addColorStop(p,M),E.addColorStop(p,r.bgBubble),E.addColorStop(1,r.bgBubble),n.beginPath(),n.fillStyle=E,$u(n,d,g-v/2,k,v,v/2),n.fill(),n.beginPath(),$u(n,d+.5,g-v/2+.5,k-1,v-1,(v-1)/2),n.strokeStyle=r.accentLight,n.lineWidth=1,n.stroke()}return s!==void 0&&(n.textAlign="right",n.fillStyle=r.textDark,n.fillText(s,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(),l=t.step.toString(),a=s=>{e.onChange({...e.value,data:{...t,value:Number(s.target.value)}})};return f.createElement("label",{style:Cy},f.createElement("input",{style:yy,type:"range",value:r,min:i,max:o,step:l,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}}},xy=an("input")({name:"StyledInputBox",class:"gdg-s1wtovjx",propsAsIs:!1}),hl=(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}`)}},ky=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,l=t.min instanceof Date?hl(n,t.min,o):t.min,a=t.max instanceof Date?hl(n,t.max,o):t.max,s=hl(n,t.date,o);return e.value.readonly?zt.createElement(Xr,{highlight:!0,autoFocus:!1,disabled:!0,value:r??"",onChange:()=>{}}):zt.createElement(xy,{"data-testid":"date-picker-cell",required:!0,type:n,defaultValue:s,min:l,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)}})}})},My={kind:Z.Custom,isMatch:e=>e.data.kind==="date-picker-cell",draw:(e,t)=>{const{displayDate:n}=t.data;return Nl(e,n,t.contentAlign),!0},measure:(e,t,n)=>{const{displayDate:r}=t.data;return e.measureText(r).width+n.cellHorizontalPadding*2},provideEditor:()=>({editor:ky}),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)}}};var Ry=["allowCreateWhileLoading","createOptionPosition","formatCreateLabel","isValidNewOption","getNewOptionData","onCreateOption","options","onChange"],ac=function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"",n=arguments.length>1?arguments[1]:void 0,r=arguments.length>2?arguments[2]:void 0,i=String(t).toLowerCase(),o=String(r.getOptionValue(n)).toLowerCase(),l=String(r.getOptionLabel(n)).toLowerCase();return o===i||l===i},gl={formatCreateLabel:function(t){return'Create "'.concat(t,'"')},isValidNewOption:function(t,n,r,i){return!(!t||n.some(function(o){return ac(t,o,i)})||r.some(function(o){return ac(t,o,i)}))},getNewOptionData:function(t,n){return{label:n,value:t,__isNew__:!0}}};function Iy(e){var t=e.allowCreateWhileLoading,n=t===void 0?!1:t,r=e.createOptionPosition,i=r===void 0?"last":r,o=e.formatCreateLabel,l=o===void 0?gl.formatCreateLabel:o,a=e.isValidNewOption,s=a===void 0?gl.isValidNewOption:a,u=e.getNewOptionData,c=u===void 0?gl.getNewOptionData:u,d=e.onCreateOption,g=e.options,h=g===void 0?[]:g,p=e.onChange,m=rr(e,Ry),y=m.getOptionValue,v=y===void 0?hf:y,b=m.getOptionLabel,k=b===void 0?ff:b,E=m.inputValue,M=m.isLoading,I=m.isMulti,D=m.value,S=m.name,C=f.useMemo(function(){return s(E,ma(D),h,{getOptionValue:v,getOptionLabel:k})?c(E,l(E)):void 0},[l,c,k,v,E,s,h,D]),L=f.useMemo(function(){return(n||!M)&&C?i==="first"?[C].concat(Mi(h)):[].concat(Mi(h),[C]):h},[n,i,M,C,h]),T=f.useCallback(function(x,O){if(O.action!=="select-option")return p(x,O);var P=Array.isArray(x)?x:[x];if(P[P.length-1]===C){if(d)d(E);else{var R=c(E,E),$={action:"create-option",name:S,option:R};p(to(I,[].concat(Mi(ma(D)),[R]),R),$)}return}p(x,O)},[c,E,I,S,C,d,p,D]);return Oe(Oe({},m),{},{options:L,onChange:T})}var Ey=f.forwardRef(function(e,t){var n=Gd(e),r=Iy(n);return f.createElement(gs,ze({ref:t},r))}),Ty=Ey;const ps="__value",Dy=new RegExp(`^${ps}\\d+__`),Oy=an("div")({name:"Wrap",class:"gdg-w1i61rz",propsAsIs:!1}),Py=an("div")({name:"PortalWrap",class:"gdg-phbadu4",propsAsIs:!1}),na=e=>e.map(t=>typeof t=="string"||t===null||t===void 0?{value:t,label:t??"",color:void 0}:{value:t.value,label:t.label??t.value??"",color:t.color??void 0}),Sf=(e,t,n)=>e==null?[]:e.map((r,i)=>{const o=n?`${ps}${i}__`:"",l=t.find(a=>a.value===r);return l?{...l,value:`${o}${l.value}`}:{value:`${o}${r}`,label:r}}),Ly=e=>{const{Menu:t}=fs,{children:n,...r}=e;return f.createElement(t,{...r},n)},Fy=e=>{const{value:t,initialValue:n,onChange:r,onFinishedEditing:i,portalElementRef:o}=e,{options:l,values:a,allowCreation:s,allowDuplicates:u}=t.data,c=od(),[d,g]=f.useState(a),[h,p]=f.useState(!0),[m,y]=f.useState(n??""),v=f.useMemo(()=>na(l??[]),[l]),b=s&&u&&v.length===0,k=f.useCallback(S=>{h&&S.stopPropagation()},[h]),E={control:(S,C)=>({...S,border:0,boxShadow:"none",backgroundColor:c.bgCell,pointerEvents:C.isDisabled?"auto":S.pointerEvents,cursor:C.isDisabled?"default":S.cursor}),valueContainer:S=>({...S,flexWrap:S.flexWrap??"wrap",overflowX:"auto",overflowY:"hidden"}),menu:S=>({...S,backgroundColor:c.bgCell}),option:(S,C)=>({...S,fontSize:c.editorFontSize,fontFamily:c.fontFamily,color:c.textDark,...C.isFocused?{backgroundColor:c.accentLight,cursor:"pointer"}:{},":active":{...S[":active"],color:c.accentFg,backgroundColor:c.accentColor}}),input:(S,{isDisabled:C})=>C?{display:"none"}:{...S,fontSize:c.editorFontSize,fontFamily:c.fontFamily,color:c.textDark},placeholder:S=>({...S,fontSize:c.editorFontSize,fontFamily:c.fontFamily,color:c.textLight}),noOptionsMessage:S=>({...S,fontSize:c.editorFontSize,fontFamily:c.fontFamily,color:c.textLight}),clearIndicator:S=>({...S,color:c.textLight,":hover":{color:c.textDark,cursor:"pointer"}}),multiValue:(S,{data:C})=>({...S,backgroundColor:C.color??c.bgBubble,borderRadius:`${c.roundingRadius??c.bubbleHeight/2}px`,flexShrink:0,whiteSpace:"nowrap"}),multiValueLabel:(S,{data:C,isDisabled:L})=>({...S,paddingRight:L?c.bubblePadding:0,paddingLeft:c.bubblePadding,paddingTop:0,paddingBottom:0,color:C.color?wl(C.color)>.5?"black":"white":c.textBubble,fontSize:c.editorFontSize,fontFamily:c.fontFamily,justifyContent:"center",alignItems:"center",display:"flex",height:c.bubbleHeight,whiteSpace:"nowrap"}),multiValueRemove:(S,{data:C,isDisabled:L,isFocused:T})=>L?{display:"none"}:{...S,color:C.color?wl(C.color)>.5?"black":"white":c.textBubble,backgroundColor:void 0,borderRadius:T?`${c.roundingRadius??c.bubbleHeight/2}px`:void 0,":hover":{cursor:"pointer"}}},M=f.useCallback(S=>{const C=S.map(L=>u&&L.startsWith(ps)?L.replace(new RegExp(Dy),""):L);g(C),r({...t,data:{...t.data,values:C}})},[t,r,u]),I=S=>{switch(S.key){case"Enter":case"Tab":if(!m){i(t,[0,1]);return}u&&s&&(y(""),M([...d??[],m]),p(!1),S.preventDefault())}},D=s?Ty:Cf;return f.createElement(Oy,{onKeyDown:k,"data-testid":"multi-select-cell"},f.createElement(D,{className:"gdg-multi-select",isMulti:!0,isDisabled:t.readonly,isClearable:!0,isSearchable:!0,inputValue:m,onInputChange:y,options:v,placeholder:t.readonly?"":s?"Add...":void 0,noOptionsMessage:S=>s&&u&&S.inputValue?`Create "${S.inputValue}"`:void 0,menuIsOpen:t.readonly?!1:h,onMenuOpen:()=>p(!0),onMenuClose:()=>p(!1),value:Sf(d,v,u),onKeyDown:t.readonly?void 0:I,menuPlacement:"auto",menuPortalTarget:o?.current??document.getElementById("portal"),autoFocus:!0,openMenuOnFocus:!0,openMenuOnClick:!0,closeMenuOnSelect:!0,backspaceRemovesValue:!0,escapeClearsValue:!1,styles:E,components:{DropdownIndicator:()=>null,IndicatorSeparator:()=>null,Menu:S=>b?null:f.createElement(Py,null,f.createElement(Ly,{className:"click-outside-ignore",...S}))},onChange:async S=>{S!==null&&M(S.map(C=>C.value))}}))},_y={kind:Z.Custom,isMatch:e=>e.data.kind==="multi-select-cell",draw:(e,t)=>{const{ctx:n,theme:r,rect:i,highlighted:o}=e,{values:l,options:a}=t.data;if(l==null)return!0;const s=na(a??[]),u={x:i.x+r.cellHorizontalPadding,y:i.y+r.cellVerticalPadding,width:i.width-2*r.cellHorizontalPadding,height:i.height-2*r.cellVerticalPadding},c=Math.max(1,Math.floor(u.height/(r.bubbleHeight+r.bubblePadding)));let{x:d}=u,g=1,h=c===1?u.y+(u.height-r.bubbleHeight)/2:u.y+(u.height-c*r.bubbleHeight-(c-1)*r.bubblePadding)/2;for(const p of l){const m=s.find(M=>M.value===p),y=m?.color??(o?r.bgBubbleSelected:r.bgBubble),v=m?.label??p,k=Ir(v,n).width+r.bubblePadding*2,E=r.bubbleHeight/2;if(d!==u.x&&d+k>u.x+u.width&&g<c&&(g++,h+=r.bubbleHeight+r.bubblePadding,d=u.x),n.fillStyle=y,n.beginPath(),Yn(n,d,h,k,r.bubbleHeight,r.roundingRadius??r.bubbleHeight/2),n.fill(),n.fillStyle=m?.color?wl(y)>.5?"#000000":"#ffffff":r.textBubble,n.fillText(v,d+r.bubblePadding,h+E+qn(n,r)),d+=k+r.bubbleMargin,d>u.x+u.width+r.cellHorizontalPadding&&g>=c)break}return!0},measure:(e,t,n)=>{const{values:r,options:i}=t.data;if(!r)return n.cellHorizontalPadding*2;const o=Sf(r,na(i??[]),t.data.allowDuplicates).map(a=>a.label??a.value),l=o.reduce((a,s)=>e.measureText(s).width+a+n.bubblePadding*2+n.bubbleMargin,0);return o.length===0?n.cellHorizontalPadding*2:l+2*n.cellHorizontalPadding-n.bubbleMargin},provideEditor:()=>({editor:Fy,disablePadding:!0,deletedValue:e=>({...e,copyData:"",data:{...e.data,values:[]}})}),onPaste:(e,t)=>{if(!e||!e.trim())return{...t,values:[]};let n=e.split(",").map(r=>r.trim());if(t.allowDuplicates||(n=n.filter((r,i)=>n.indexOf(r)===i)),!t.allowCreation){const r=na(t.options??[]);n=n.filter(i=>r.find(o=>o.value===i))}if(n.length!==0)return{...t,values:n}}},Ay="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 Hy=(e,t)=>{const{cell:n,theme:r,ctx:i}=e;Nl({...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 zy(e,t){const n=f.useCallback((i,o)=>{const{cell:l,theme:a,ctx:s,rect:u}=i,c=i.col;if(Ri(l))lc(s,u,a);else if(ql(l)&&c<e.length){const d=e[c],g=t??Ay;["checkbox","line_chart","bar_chart","progress"].includes(d.kind)?o():Hy(i,g),d.isRequired&&d.isEditable&&lc(s,u,a);return}o()},[e,t]),r=f.useMemo(()=>[zb,by,Sy,My,_y,...hb],[]);return{drawCell:n,customRenderers:r}}function Vy(){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:Qh(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:eg(e.colors.bgColor,e.colors.secondaryBg,.3),headerIcons:n}},[e])}const $y=Ll.getLogger("useDataEditor");function Ny({columns:e,canAddRows:t,canDeleteRows:n,editingState:r,getCellContent:i,getOriginalIndex:o,refreshCells:l,updateNumRows:a,syncEditState:s,clearSelection:u}){const c=f.useCallback(([y,v],b)=>{const k=e[y];if(!k.isEditable)return;const E=k.indexNumber,M=r.current.getOriginalRowIndex(o(v)),I=i([y,v]),D=k.getCellValue(I),S=k.getCellValue(b);if(!Ri(I)&&S===D)return;const C=k.getCell(S,!0);Ri(C)?$y.warn(`Not applying the cell edit since it causes this error:
186
186
  ${C.data}`):(r.current.setCell(E,M,{...C,lastUpdated:performance.now()}),s())},[e,r,o,i,s]),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(),s())},[d,s,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(),s(),!1}if(y.current?.range){const v=[],b=y.current.range;for(let k=b.y;k<b.y+b.height;k++)for(let E=b.x;E<b.x+b.width;E++){const M=e[E];M.isEditable&&!M.isRequired&&(v.push({cell:[E,k]}),c([E,k],M.getCell(null)))}return v.length>0&&(s(),l(v)),!1}return!0},[e,r,n,l,o,s,c,u,a]),p=f.useCallback((y,v)=>{const[b,k]=y,E=[];for(let M=0;M<v.length;M++){const I=v[M];if(M+k>=r.current.getNumRows()){if(!t)break;d()}for(let D=0;D<I.length;D++){const S=I[D],C=M+k,L=D+b;if(L>=e.length)break;const T=e[L];if(T.isEditable){const x=T.getCell(S,!0);if(ct(x)&&!Ri(x)){const O=T.indexNumber,P=r.current.getOriginalRowIndex(o(C)),R=T.getCellValue(i([L,C]));T.getCellValue(x)!==R&&(r.current.setCell(O,P,{...x,lastUpdated:performance.now()}),E.push({cell:[L,C]}))}}}E.length>0&&(s(),l(E))}return!1},[e,r,t,o,i,d,s,l]),m=f.useCallback((y,v)=>{const b=y[0];if(b>=e.length)return!0;const k=e[b];if(k.validateInput){const E=k.validateInput(k.getCellValue(v));return E===!0||E===!1?E:k.getCell(E)}return!0},[e]);return{onCellEdited:c,onPaste:p,onRowAppended:g,onDelete:h,validateCell:m}}const xf=",",no='"',By='"',kf=`
187
- `,Wy="\uFEFF",Uy=new RegExp(`[${[xf,no,kf].join("")}]`),sc=Ll.getLogger("useDataExporter");function uc(e){return e.map(t=>Gy(t)).join(xf)+kf}function Gy(e){if(Pe(e))return"";const t=ot(e);return Uy.test(t)?`${no}${t.replace(new RegExp(no,"g"),By+no)}${no}`:t}async function cc(e,t,n,r){const i=new TextEncoder;await e.write(i.encode(Wy));const o=n.map(l=>l.name);await e.write(i.encode(uc(o)));for(let l=0;l<r;l++){const a=[];n.forEach((s,u,c)=>{a.push(s.getCellValue(t([u,l])))}),await e.write(i.encode(uc(a)))}await e.close()}function Xy(e,t,n,r){return{exportToCsv:f.useCallback(async()=>{const l=`${new Date().toISOString().slice(0,16).replace(":","-")}_export.csv`;try{const u=await(await(await Pl(()=>import("./es6.Dpcc-U7U.js").then(c=>c.a),__vite__mapDeps([22,1,2]),import.meta.url)).showSaveFilePicker({suggestedName:l,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 s="";const u=new WritableStream({write:h=>{s+=new TextDecoder("utf-8").decode(h)},close:async()=>{}});await cc(u.getWriter(),e,t,n);const c=new Blob([s],{type:"text/csv;charset=utf-8;"}),d=URL.createObjectURL(c),g=kg({enforceDownloadInNewTab:r,url:d,filename:l});g.style.display="none",document.body.appendChild(g),g.click(),document.body.removeChild(g),URL.revokeObjectURL(d)}catch(s){sc.error("Failed to export data as CSV",s)}}},[t,n,e,r])}}function Yy(e,t,n,r){return{getCellContent:f.useCallback(([o,l])=>{if(o>t.length-1)return Et("Column index out of bounds","This error should never happen. Please report this bug.");if(l>n-1)return Et("Row index out of bounds","This error should never happen. Please report this bug.");try{const a=t[o],s=a.indexNumber,u=r.current.getOriginalRowIndex(l),c=r.current.isAddedRow(u);if(a.isEditable||c){const h=r.current.getCell(s,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=${s}; row=${u}`)}const d=e.getCell(u,s),g=vg(e,u,s);return wb(a,d,g,e.styler?.cssStyles)}catch(a){return Et("Error during cell creation",`This error should never happen. Please report this bug.
187
+ `,Wy="\uFEFF",Uy=new RegExp(`[${[xf,no,kf].join("")}]`),sc=Ll.getLogger("useDataExporter");function uc(e){return e.map(t=>Gy(t)).join(xf)+kf}function Gy(e){if(Pe(e))return"";const t=ot(e);return Uy.test(t)?`${no}${t.replace(new RegExp(no,"g"),By+no)}${no}`:t}async function cc(e,t,n,r){const i=new TextEncoder;await e.write(i.encode(Wy));const o=n.map(l=>l.name);await e.write(i.encode(uc(o)));for(let l=0;l<r;l++){const a=[];n.forEach((s,u,c)=>{a.push(s.getCellValue(t([u,l])))}),await e.write(i.encode(uc(a)))}await e.close()}function Xy(e,t,n,r){return{exportToCsv:f.useCallback(async()=>{const l=`${new Date().toISOString().slice(0,16).replace(":","-")}_export.csv`;try{const u=await(await(await Pl(()=>import("./es6.BRxlY_y5.js").then(c=>c.a),__vite__mapDeps([22,1,2]),import.meta.url)).showSaveFilePicker({suggestedName:l,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 s="";const u=new WritableStream({write:h=>{s+=new TextDecoder("utf-8").decode(h)},close:async()=>{}});await cc(u.getWriter(),e,t,n);const c=new Blob([s],{type:"text/csv;charset=utf-8;"}),d=URL.createObjectURL(c),g=kg({enforceDownloadInNewTab:r,url:d,filename:l});g.style.display="none",document.body.appendChild(g),g.click(),document.body.removeChild(g),URL.revokeObjectURL(d)}catch(s){sc.error("Failed to export data as CSV",s)}}},[t,n,e,r])}}function Yy(e,t,n,r){return{getCellContent:f.useCallback(([o,l])=>{if(o>t.length-1)return Et("Column index out of bounds","This error should never happen. Please report this bug.");if(l>n-1)return Et("Row index out of bounds","This error should never happen. Please report this bug.");try{const a=t[o],s=a.indexNumber,u=r.current.getOriginalRowIndex(l),c=r.current.isAddedRow(u);if(a.isEditable||c){const h=r.current.getCell(s,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=${s}; row=${u}`)}const d=e.getCell(u,s),g=vg(e,u,s);return wb(a,d,g,e.styler?.cssStyles)}catch(a){return Et("Error during cell creation",`This error should never happen. Please report this bug.
188
188
  Error: ${a}`)}},[t,n,e,r])}}function jy(e){const[t,n]=f.useState(void 0),r=f.useCallback(o=>{if(o.kind!=="cell")n(void 0);else{const[,l]=o.location;n(l)}},[n]);return{getRowThemeOverride:f.useCallback(o=>{if(o===t)return{bgCell:e.bgRowHovered,bgCellMedium:e.bgRowHovered}},[e.bgRowHovered,t]),onItemHovered:r}}function qy(e,t,n,r,i){const[o,l]=f.useState({columns:Qe.empty(),rows:Qe.empty(),current:void 0}),a=!t&&!n&&(e.selectionMode.includes(Yt.SelectionMode.MULTI_ROW)||e.selectionMode.includes(Yt.SelectionMode.SINGLE_ROW)),s=a&&e.selectionMode.includes(Yt.SelectionMode.MULTI_ROW),u=!t&&!n&&(e.selectionMode.includes(Yt.SelectionMode.SINGLE_COLUMN)||e.selectionMode.includes(Yt.SelectionMode.MULTI_COLUMN)),c=u&&e.selectionMode.includes(Yt.SelectionMode.MULTI_COLUMN),d=!t&&!n&&(e.selectionMode.includes(Yt.SelectionMode.SINGLE_CELL)||e.selectionMode.includes(Yt.SelectionMode.MULTI_CELL)),g=d&&e.selectionMode.includes(Yt.SelectionMode.MULTI_CELL),h=o.rows.length>0,p=o.columns.length>0,m=o.current!==void 0,y=f.useCallback(b=>{const k=!ja(b.rows.toArray(),o.rows.toArray()),E=!ja(b.columns.toArray(),o.columns.toArray()),M=!ja(b.current,o.current),I=a&&k||u&&E||d&&M;let D=b;if(E&&D.columns.length>=0){let S=D.columns;r.forEach((C,L)=>{C.isIndex&&(S=S.remove(L))}),S.length<D.columns.length&&(D={...D,columns:S})}l(D),I&&i(D,d)},[o,a,u,d,i,r]),v=f.useCallback((b=!1,k=!1)=>{const E={columns:k?o.columns:Qe.empty(),rows:b?o.rows:Qe.empty(),current:void 0};l(E),(!b&&a||!k&&u||d)&&i(E,d)},[o,a,u,d,i]);return{gridSelection:o,isRowSelectionActivated:a,isMultiRowSelectionActivated:s,isColumnSelectionActivated:u,isMultiColumnSelectionActivated:c,isCellSelectionActivated:d,isMultiCellSelectionActivated:g,isRowSelected:h,isColumnSelected:p,isCellSelected:m,clearSelection:v,processSelectionChange:y}}function Ky(e,t,n,r,i,o,l,a,s,u,c){const d=e.rowHeight??t.defaultRowHeight,g=r?2:1,h=e.editingMode===Yt.EditingMode.DYNAMIC||e.editingMode===Yt.EditingMode.ADD_ONLY?1:0,p=n+h,m=al({numRows:p,rowHeight:d,theme:t,numHeaderRows:g}),y=xb(e,s),v=Cb(s,c),b=Sb(s),k=v?Math.max(1,Math.min(n,3)):1,E=al({numRows:k,rowHeight:d,theme:t}),M=1e4;let I=Math.max(m,E),D=Math.min(I,t.defaultTableHeight);if(v&&u&&u>0)I=Math.max(u,I);else if(b){const W=Math.ceil(M/d),j=Math.min(p,W),oe=al({numRows:j,rowHeight:d,theme:t,numHeaderRows:g})+1;D=Math.max(oe,E),I=Math.max(D,I)}else y&&(D=Math.max(y,E),I=Math.max(D,I));o&&(D=Math.min(D,o),I=Math.min(I,o),y||(D=I));const S=t.minColumnWidth+2*t.tableBorderWidth,C=Math.max(i,S);let L,T=C;const x=Bd(e,a),O=Wd(e,a),P=yb(a);x?L=C:O?(L=Math.min(Math.max(O,S),C),T=Math.min(Math.max(O,T),C)):P&&(L=void 0);const[R,$]=f.useState({width:L||"100%",height:v?"100%":D});return f.useLayoutEffect(()=>{x&&R.width==="100%"&&$(W=>({...W,width:C}))},[C]),f.useLayoutEffect(()=>{$(W=>({...W,width:L||"100%"}))},[L]),f.useLayoutEffect(()=>{$(W=>({...W,height:v?"100%":D}))},[D,n,u,v,c]),f.useLayoutEffect(()=>{if(l){const W=x||ct(O)&&O>0;$({width:W?T:"100%",height:I})}else $({width:L||"100%",height:D})},[l]),{minHeight:E,maxHeight:I,minWidth:S,maxWidth:T,rowHeight:d,resizableSize:R,setResizableSize:$}}const Zy=600,Jy="⚠️ Please fill out this cell.";function Qy(e,t,n=[]){const[r,i]=f.useState(),o=f.useRef(null),l=f.useCallback(s=>{if(clearTimeout(o.current),o.current=0,i(void 0),(s.kind==="header"||s.kind==="cell")&&s.location){const u=s.location[0],c=s.location[1];let d;if(u<0||u>=e.length||n.includes(c))return;const g=e[u];if(s.kind==="header"&&ct(g))d=g.help;else if(s.kind==="cell"){const h=t([u,c]);Ri(h)?d=h.errorDetails:g.isRequired&&g.isEditable&&ql(h)?d=Jy:Kv(h)&&(d=h.tooltip)}d&&(o.current=setTimeout(()=>{d&&i({content:d,left:s.bounds.x+s.bounds.width/2,top:s.bounds.y})},Zy))}},[e,t,i,o,n]),a=f.useCallback(()=>{i(void 0)},[i]);return{tooltip:r,clearTooltip:a,onItemHovered:l}}function Nr(e){return e.isIndex?ea:Pe(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,l,a)=>{const s={};o.forEach((u,c)=>{const d=n.get(c);d&&(s[Nr(d)]=d.getCellValue(u))}),r.edited_rows[l]=s}),this.addedRows.forEach(o=>{const l={};let a=!1;o.forEach((s,u,c)=>{const d=n.get(u);if(d){const g=d.getCellValue(s);d.isRequired&&d.isEditable&&ql(s)&&(a=!0),ct(g)&&(l[Nr(d)]=g)}}),a||r.added_rows.push(l)}),r.deleted_rows=this.deletedRows,JSON.stringify(r,(o,l)=>l===void 0?null:l)}fromJson(t,n){this.editedCells=new Map,this.addedRows=[],this.deletedRows=[];const r=JSON.parse(t),i=new Map;n.forEach(l=>{i.set(l.indexNumber,l)});const o=new Map;n.forEach(l=>{o.set(Nr(l),l)}),Object.keys(r.edited_rows).forEach(l=>{const a=Number(l),s=r.edited_rows[l];Object.keys(s).forEach(u=>{const c=s[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(l=>{const a=new Map;n.forEach(s=>{a.set(s.indexNumber,s.getCell(null))}),Object.keys(l).forEach(s=>{const u=l[s],c=o.get(s);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(!(Pe(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 Mf=150;function eC({element:e,widgetMgr:t,fragmentId:n,originalNumRows:r,originalColumns:i}){const{READ_ONLY:o}=Yt.EditingMode,l=f.useRef(new Ko(r)),[a,s]=f.useState(l.current.getNumRows());tg(()=>{l.current=new Ko(r),s(l.current.getNumRows())},[r]);const u=f.useCallback(()=>{l.current=new Ko(r),s(l.current.getNumRows())},[r]),c=f.useCallback(()=>{s(y=>{const v=l.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&&(l.current.fromJson(y,i),s(l.current.getNumRows()))},[]);const d=f.useCallback(()=>{if(!t)return;const y=l.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}=kd(d,Mf),h=f.useCallback((y,v)=>(b,k)=>{if(!t)return;const E={selection:{rows:[],columns:[],cells:[]}};if(E.selection.rows=b.rows.toArray().map(D=>v(D)),E.selection.columns=b.columns.toArray().map(D=>Nr(y[D])),k&&b.current){const{cell:D,range:S}=b.current;if(S)for(let C=S.y;C<S.y+S.height;C++)for(let L=S.x;L<S.x+S.width;L++)y[L].isIndex||E.selection.cells.push([v(C),Nr(y[L])]);else if(D){const[C,L]=D;y[C].isIndex||E.selection.cells.push([v(L),Nr(y[C])])}}const M=JSON.stringify(E),I=t.getStringValue({id:e.id,formId:e.formId});(I===void 0||I!==M)&&t.setStringValue({id:e.id,formId:e.formId},M,{fromUi:!0},n)},[e.id,e.formId,t,n]),p=f.useCallback(({columns:y,isRowSelectionActivated:v,isColumnSelectionActivated:b,isCellSelectionActivated:k,isMultiCellSelectionActivated:E})=>{if(!v&&!b&&!k||!t)return;const M=t.getStringValue({id:e.id,formId:e.formId});if(!M)return;const I=y.map(T=>Nr(T)),D=JSON.parse(M);let S=Qe.empty(),C=Qe.empty(),L;if(D.selection?.rows?.forEach(T=>{S=S.add(T)}),D.selection?.columns?.forEach(T=>{C=C.add(I.indexOf(T))}),k&&!E){const[T,x]=D.selection?.cells?.[0]??[];T!==void 0&&x!==void 0&&(L=[I.indexOf(x),T])}if(S.length>0||C.length>0||L!==void 0)return{rows:S,columns:C,current:L?{cell:L,range:{x:L[0],y:L[1],width:1,height:1},rangeStack:[]}:void 0}},[t,e.id,e.formId]),m=f.useCallback(()=>{u()},[u]);return{editingState:l,numRows:a,resetEditingState:u,updateNumRows:c,syncEditState:g,createSyncSelectionState:h,onFormCleared:m,loadInitialSelectionState:p}}const Rf=jn("div",{target:"e1gsdy3y0"})(({theme:e})=>({paddingTop:e.spacing.xs,paddingBottom:e.spacing.xs})),xr=jn("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}}})),If=jn("div",{target:"e1gsdy3y2"})(({theme:e})=>({height:e.sizes.borderWidth,backgroundColor:e.colors.borderColor,marginTop:e.spacing.xs,marginBottom:e.spacing.xs})),tC=jn("div",{target:"e1gsdy3y3"})(({theme:e})=>({display:"flex",alignItems:"center",padding:`${e.spacing.sm} ${e.spacing.sm}`,cursor:"default",gap:e.spacing.twoXS})),nC=jn("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"})),rC=jn("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"})),iC=jn("span",{target:"e1gsdy3y6"})(({theme:e})=>({whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",flexGrow:1,margin:`0 ${e.spacing.xs}`,fontSize:e.fontSizes.twoSm,maxWidth:"4rem"})),oC=jn("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:"}],aC={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 lC({columnKind:e,isOpen:t,onMouseEnter:n,onMouseLeave:r,onChangeFormat:i,onCloseMenu:o,children:l}){const a=Ur(),{colors:s,fontSizes:u,radii:c,fontWeights:d}=a,g=aC[e]||[];return g.length===0?Ve(Sc,{}):Ve(ya,{triggerType:xc.hover,returnFocus:!0,autoFocus:!0,focusLock:!0,isOpen:t,onMouseEnter:n,onMouseLeave:r,ignoreBoundary:!0,content:Ve(Rf,{role:"menu",children:g.map(h=>pn(xr,{onClick:()=>{i(h.format),o()},role:"menuitem",children:[Ve(Un,{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)?s.bgColor:s.secondaryBg,color:s.bodyText,fontSize:u.sm,fontWeight:d.normal,paddingTop:"0 !important",paddingBottom:"0 !important",paddingLeft:"0 !important",paddingRight:"0 !important"}}},children:l})}const sC=f.memo(lC);function uC({top:e,left:t,isColumnPinned:n,onPinColumn:r,onUnpinColumn:i,onCloseMenu:o,onSortColumn:l,onHideColumn:a,column:s,onChangeFormat:u,onAutosize:c}){const d=Ur(),[g,h]=f.useState(!1),{colors:p,fontSizes:m,radii:y,fontWeights:v}=d,{isCopied:b,copyToClipboard:k}=ng();f.useEffect(()=>{function I(D){D.preventDefault()}return document.addEventListener("wheel",I,{passive:!1}),document.addEventListener("touchmove",I,{passive:!1}),()=>{document.removeEventListener("wheel",I),document.removeEventListener("touchmove",I)}},[]);const E=f.useCallback(()=>{o()},[o]),M=f.useCallback(()=>{k(s.title)},[s.title,k]);return Ve(ya,{autoFocus:!0,"aria-label":"Dataframe column menu",content:pn(Rf,{children:[pn(tC,{children:[Ve(nC,{title:s.kind,children:Ve(Un,{size:"base",iconValue:s.typeIcon||":material/notes:"})}),pn(rC,{title:s.title,children:[Ve(iC,{children:s.title}),Ve(oC,{onClick:M,title:"Copy column name","aria-label":"Copy column name",children:Ve(Un,{size:"sm",iconValue:b?":material/check:":":material/content_copy:"})})]})]}),l&&pn(Sc,{children:[pn(xr,{onClick:()=>{l("asc"),E()},role:"menuitem",children:[Ve(Un,{size:"base",iconValue:":material/arrow_upward:"}),"Sort ascending"]}),pn(xr,{onClick:()=>{l("desc"),E()},role:"menuitem",children:[Ve(Un,{size:"base",iconValue:":material/arrow_downward:"}),"Sort descending"]}),Ve(If,{})]}),u&&Ve(sC,{columnKind:s.kind,isOpen:g,onMouseEnter:()=>h(!0),onMouseLeave:()=>h(!1),onChangeFormat:u,onCloseMenu:E,children:pn(xr,{onMouseEnter:()=>h(!0),onMouseLeave:()=>h(!1),isActive:g,hasSubmenu:!0,children:[pn("div",{children:[Ve(Un,{size:"base",iconValue:":material/format_list_numbered:"}),"Format"]}),Ve(Un,{size:"base",iconValue:":material/chevron_right:"})]})}),c&&pn(xr,{onClick:()=>{c(),E()},children:[Ve(Un,{size:"base",iconValue:":material/arrows_outward:"}),"Autosize"]}),n&&pn(xr,{onClick:()=>{i(),E()},children:[Ve(Un,{size:"base",iconValue:":material/keep_off:"}),"Unpin column"]}),!n&&pn(xr,{onClick:()=>{r(),E()},children:[Ve(Un,{size:"base",iconValue:":material/keep:"}),"Pin column"]}),a&&pn(xr,{onClick:()=>{a(),E()},children:[Ve(Un,{size:"base",iconValue:":material/visibility_off:"}),"Hide column"]})]}),placement:wa.bottomRight,accessibilityType:kc.menu,showArrow:!1,popoverMargin:en("0.375rem"),onClickOutside:g?void 0:E,onEsc:E,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:Ve("div",{"data-testid":"stDataFrameColumnMenuTarget",style:{position:"fixed",top:e,left:t,visibility:"hidden",transform:"unset"}})})}const cC=f.memo(uC),dC="(index)";function pl(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 Ve(xg,{isIndeterminate:n,checked:t,onChange:o=>{r(o.target.checked)},"aria-label":e,checkmarkType:Sg.default,labelPlacement:Cg.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:l,$isIndeterminate:a})=>{const s=l||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&&(l||a)?rg(i):"",borderLeftWidth:i.sizes.borderWidth,borderRightWidth:i.sizes.borderWidth,borderTopWidth:i.sizes.borderWidth,borderBottomWidth:i.sizes.borderWidth,borderLeftColor:s,borderRightColor:s,borderTopColor:s,borderBottomColor:s}}},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})},fC=({columns:e,columnOrder:t,setColumnOrder:n,hideColumn:r,showColumn:i,children:o,isOpen:l,onClose:a})=>{const s=Ur(),u=h=>!(h.isHidden===!0||pl(h,t)),c=e.every(u),d=e.some(u)&&!c,g=h=>{e.forEach(p=>{const m=pl(p,t);h?(i(p.id),m&&n(y=>[...y,p.id])):r(p.id)})};return Ve(ya,{triggerType:xc.click,placement:wa.bottomRight,autoFocus:!0,focusLock:!0,content:()=>pn("div",{style:{paddingTop:s.spacing.sm,paddingBottom:s.spacing.sm,maxHeight:s.sizes.maxDropdownHeight,overflow:"auto"},children:[Ve(fc,{label:"Select all",isIndeterminate:d,initialValue:c,onChange:h=>{g(h)}}),Ve(If,{}),Ve("div",{children:e.map(h=>{const p=pl(h,t);return Ve(fc,{label:!h.title&&h.isIndex?dC: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:l,onClickOutside:a,onClick:()=>l?a():void 0,onEsc:a,ignoreBoundary:!1,overrides:{Body:{props:{"data-testid":"stDataFrameColumnVisibilityMenu"},style:{borderTopLeftRadius:s.radii.default,borderTopRightRadius:s.radii.default,borderBottomLeftRadius:s.radii.default,borderBottomRightRadius:s.radii.default,paddingTop:"0 !important",paddingBottom:"0 !important",paddingLeft:"0 !important",paddingRight:"0 !important",backgroundColor:"transparent",border:`${s.sizes.borderWidth} solid ${s.colors.borderColor}`}},Inner:{style:{backgroundColor:vo(s)?s.colors.bgColor:s.colors.secondaryBg,color:s.colors.bodyText,fontSize:s.fontSizes.sm,fontWeight:s.fontWeights.normal,minWidth:s.sizes.minMenuWidth,maxWidth:`calc(${s.sizes.minMenuWidth} * 2)`,maxHeight:s.sizes.maxDropdownHeight,overflow:"auto",paddingTop:"0 !important",paddingBottom:"0 !important",paddingLeft:"0 !important",paddingRight:"0 !important"}}},children:Ve("div",{children:o})})},hC=f.memo(fC),hc=jn("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 gC({top:e,left:t,content:n,clearTooltip:r}){const[i,o]=f.useState(!0),l=Ur(),{colors:a,fontSizes:s,radii:u,fontWeights:c}=l,d=f.useCallback(()=>{o(!1),r()},[r,o]);return Ve(ya,{content:Ve(ig,{"data-testid":"stDataFrameTooltipContent",children:Ve(og,{style:{fontSize:s.sm},source:n,allowHTML:!1})}),placement:wa.top,accessibilityType:kc.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(l)?a.bgColor:a.secondaryBg,color:a.bodyText,fontSize:s.sm,fontWeight:c.normal,paddingTop:"0 !important",paddingBottom:"0 !important",paddingLeft:"0 !important",paddingRight:"0 !important"}}},isOpen:i,children:Ve("div",{"data-testid":"stDataFrameTooltipTarget",style:{position:"fixed",top:e,left:t}})})}const pC=f.memo(gC),mC=15e4,vC="0.5rem";function bC({element:e,data:t,disabled:n,widgetMgr:r,disableFullscreenMode:i,fragmentId:o,customToolbarActions:l,widthConfig:a,heightConfig:s}){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:k,elementRef:E}=sg(),M=Vy(),{getRowThemeOverride:I,onItemHovered:D}=jy(M),{enforceDownloadInNewTab:S=!1}=f.useContext(ug),[C,L]=f.useState(!0),[T,x]=f.useState(!1),[O,P]=f.useState(!1),[R,$]=f.useState(!1),[W,j]=f.useState(),[oe,Q]=f.useState(!1),re=f.useCallback(()=>Q(Ae=>!Ae),[]),se=f.useCallback(()=>Q(!1),[]),ae=f.useMemo(()=>window.matchMedia&&window.matchMedia("(pointer: coarse)").matches,[]);Pe(e.editingMode)&&(e.editingMode=Yt.EditingMode.READ_ONLY);const{READ_ONLY:de,DYNAMIC:fe,ADD_ONLY:ue,DELETE_ONLY:H}=Yt.EditingMode,F=t.dimensions,Y=Math.max(0,F.numDataRows),te=Y===0&&!((e.editingMode===fe||e.editingMode===ue)&&F.numDataColumns>0),le=Y>mC,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}=Rb(e,t,n,ke,a),{editingState:ve,numRows:me,updateNumRows:he,syncEditState:Ce,createSyncSelectionState:Fe,onFormCleared:Te,loadInitialSelectionState:at}=eC({element:e,widgetMgr:r,fragmentId:o,originalNumRows:Y,originalColumns:dt}),{getCellContent:De}=Yy(t,dt,me,ve),{columns:we,sortColumn:_e,getOriginalIndex:Re,getCellContent:Ne}=_b(Y,dt,De),ft=f.useMemo(()=>Fe(we,Re),[Fe,we,Re]),{debouncedCallback:ht}=kd(ft,Mf),{gridSelection:Ye,isRowSelectionActivated:pt,isMultiRowSelectionActivated:Nt,isColumnSelectionActivated:St,isMultiColumnSelectionActivated:Tt,isCellSelectionActivated:Bt,isMultiCellSelectionActivated:qt,isRowSelected:ln,isColumnSelected:It,isCellSelected:gt,clearSelection:Wt,processSelectionChange:wt}=qy(e,te,n,we,ht);f.useEffect(()=>{Bt||Wt(!0,!0)},[u]);const sn=f.useCallback(Ae=>{v.current?.updateCells(Ae)},[]);f.useEffect(()=>{const Ae=at({columns:we,isRowSelectionActivated:pt,isColumnSelectionActivated:St,isCellSelectionActivated:Bt,isMultiCellSelectionActivated:qt});Ae&&wt(Ae)},[]);const{exportToCsv:Mn}=Xy(Ne,we,me,S),{onCellEdited:Ee,onPaste:mt,onRowAppended:xt,onDelete:vn,validateCell:tn}=Ny({columns:we,canAddRows:pe,canDeleteRows:et,editingState:ve,getCellContent:Ne,getOriginalIndex:Re,refreshCells:sn,updateNumRows:he,syncEditState:Ce,clearSelection:Wt}),nn=f.useMemo(()=>te?[0]:pe?[me]:[],[te,pe,me]),{tooltip:cn,clearTooltip:$t,onItemHovered:Zt}=Qy(we,Ne,nn),{drawCell:Ge,customRenderers:kt}=zy(we,e.placeholder??void 0),{provideEditor:In}=Hb(),Ot=f.useCallback(Ae=>({...Ae,hasMenu:!te}),[te]),bt=f.useMemo(()=>we.map(Ae=>Ot(Il(Ae))),[we,Ot]),{columns:bn,onColumnResize:ir}=Tb(bt),Kn=t.dimensions.numHeaderRows>1,{minHeight:B,maxHeight:Be,minWidth:je,maxWidth:Pt,rowHeight:Kt,resizableSize:rn,setResizableSize:En}=Ky(e,M,me,Kn,g||0,h,u,a,s,k,m),wn=f.useCallback(([Ae,dn])=>({...Zv(!0,!1),displayData:"empty",contentAlign:"center",allowOverlay:!1,themeOverride:{textDark:M.glideTheme.textLight},span:[0,Math.max(we.length-1,0)]}),[we,M.glideTheme.textLight]),Gt=f.useCallback(()=>{Te(),Wt()},[Te,Wt]);gg({element:e,widgetMgr:r,onFormCleared:Gt});const{pinColumn:yn,unpinColumn:Cn,freezeColumns:jr}=Ib(we,te,g||0,M.minColumnWidth,Wt,ne),{changeColumnFormat:qr}=gb(ne),{hideColumn:Kr,showColumn:Di}=Ab(Wt,ne),{onColumnMoved:Fn}=Eb(we,jr,yn,Cn,Dt);f.useEffect(()=>{let Ae;const dn=requestAnimationFrame(()=>{Ae=setTimeout(()=>{if(E.current&&v.current){const Rn=E.current?.querySelector(".dvn-stack")?.getBoundingClientRect();Rn&&(P(Rn.height>E.current.clientHeight),$(Rn.width>E.current.clientWidth))}},0)});return()=>{cancelAnimationFrame(dn),Ae&&clearTimeout(Ae)}},[rn,me,bn,E]),f.useEffect(()=>{Ue.length==we.length&&Q(!1)},[Ue.length,we.length]);const _n=!!(p||a?.useContent&&!m);return pn(hc,{className:"stDataFrame","data-testid":"stDataFrame",ref:E,isInHorizontalLayout:p,minHeight:B,disableResize:_n,onPointerDown:Ae=>{if(E.current){const dn=E.current.getBoundingClientRect(),Rn=(b||Math.round(en(vC)))+1;R&&dn.height-Rn<Ae.clientY-dn.top&&Ae.stopPropagation(),O&&dn.width-Rn<Ae.clientX-dn.left&&Ae.stopPropagation()}},onBlur:Ae=>{!C&&!ae&&!Ae.currentTarget.contains(Ae.relatedTarget)&&!Bt&&Wt(!0,!0)},children:[pn(hg,{isFullScreen:u,disableFullscreenMode:i,locked:ln&&!pt||gt||ae&&C||oe,onExpand:c,onCollapse:d,target:hc,children:[l?.map(Ae=>Ae),(pt&&ln||St&&It||Bt&&gt)&&Ve(mi,{label:"Clear selection",icon:Mg,onClick:()=>{Wt(),$t()}}),et&&ln&&Ve(mi,{label:"Delete row(s)",icon:Rg,onClick:()=>{vn&&(vn(Ye),$t())}}),pe&&!ln&&Ve(mi,{label:"Add row",icon:Rc,onClick:()=>{xt&&(L(!0),xt(),$t(),v.current?.scrollTo(0,me,"vertical"))}}),!te&&Ue.length>we.length&&Ve(hC,{columns:Ue,columnOrder:ke,setColumnOrder:Dt,hideColumn:Kr,showColumn:Di,isOpen:oe,onClose:se,children:Ve(mi,{label:"Show/hide columns",icon:Ec,onClick:re})}),!le&&!te&&Ve(mi,{label:"Download as CSV",icon:Ig,onClick:Mn}),!te&&Ve(mi,{label:"Search",icon:Ic,onClick:()=>{T?x(!1):(L(!0),x(!0)),$t()}})]}),Ve(cg,{"data-testid":"stDataFrameResizable",ref:y,defaultSize:rn,style:{border:`${M.tableBorderWidth}px solid ${M.glideTheme.borderColor}`,borderRadius:`${M.tableBorderRadius}`},minHeight:B,maxHeight:Be,minWidth:je,maxWidth:_n?void 0:Pt,size:rn,enable:{top:!1,right:!1,bottom:!1,left:!1,topRight:!1,bottomRight:!_n,bottomLeft:!1,topLeft:!1},grid:[1,Kt],snapGap:Kt/3,onResizeStop:(Ae,dn,Rn,Oi)=>{if(y.current){const Zn=2*M.tableBorderWidth;En({width:y.current.size.width,height:Be-y.current.size.height===Zn?y.current.size.height+Zn:y.current.size.height})}},children:Ve(Gv,{className:"stDataFrameGlideDataEditor","data-testid":"stDataFrameGlideDataEditor",ref:v,columns:bn,rows:te?1:me,minColumnWidth:M.minColumnWidth,maxColumnWidth:M.maxColumnWidth,maxColumnAutoWidth:M.maxColumnAutoWidth,rowHeight:Kt,headerHeight:M.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:Fn,onItemHovered:Ae=>{D?.(Ae),Zt?.(Ae)},keybindings:{downFill:!0,...Bt||le?{selectAll:!1}:{}},onKeyDown:Ae=>{(Ae.ctrlKey||Ae.metaKey)&&Ae.key==="f"&&(x(dn=>!dn),Ae.stopPropagation(),Ae.preventDefault())},showSearch:T,searchResults:T?void 0:[],onSearchClose:()=>{x(!1),$t()},onHeaderClicked:(Ae,dn)=>{!Se||St||(T&&x(!1),pt&&ln?Wt():Wt(!0,!0),_e(Ae,"auto"))},gridSelection:Ye,onGridSelectionChange:Ae=>{(C||ae)&&(wt(Ae),cn!==void 0&&$t(),j(void 0),Q(!1))},theme:M.glideTheme,getRowThemeOverride:I,onMouseMove:Ae=>{Ae.kind==="out-of-bounds"&&C?L(!1):Ae.kind!=="out-of-bounds"&&!C&&L(!0)},fixedShadowX:!0,fixedShadowY:!0,experimental:{scrollbarWidthOverride:0,paddingBottom:R?-b:void 0,paddingRight:O?-b:void 0},provideEditor:In,drawCell:Ge,customRenderers:kt,imageEditorOverride:fb,headerIcons:M.headerIcons,validateCell:tn,onHeaderMenuClick:(Ae,dn)=>{oe||j({columnIdx:Ae,headerBounds:dn})},onPaste:!1,...pt&&{rowMarkers:{kind:"checkbox-visible",checkboxStyle:"square",theme:{bgCell:M.glideTheme.bgHeader,bgCellMedium:M.glideTheme.bgHeader,textMedium:M.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:Ee,onPaste:mt,onDelete:vn},...pe&&{trailingRowOptions:{sticky:!1,tint:!0},onRowAppended:xt,onHeaderClicked:void 0},...et&&{rowMarkers:{kind:"checkbox",checkboxStyle:"square",theme:{bgCell:M.glideTheme.bgHeader,bgCellMedium:M.glideTheme.bgHeader}},rowSelectionMode:"multi",rowSelect:n?"none":"multi"}})}),cn?.content&&Ve(pC,{top:cn.top,left:cn.left,content:cn.content,clearTooltip:$t}),W&&yc.createPortal(Ve(cC,{top:W.headerBounds.y+W.headerBounds.height,left:W.headerBounds.x+W.headerBounds.width,column:dt[W.columnIdx],onCloseMenu:()=>j(void 0),onSortColumn:Se?Ae=>{T&&x(!1),Wt(!(pt&&ln),!0),_e(W.columnIdx,Ae,!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:Ae=>{qr(dt[W.columnIdx].id,Ae),setTimeout(()=>{v.current?.remeasureColumns(Qe.fromSingleSelection(W.columnIdx))},100)},onAutosize:()=>{v.current?.remeasureColumns(Qe.fromSingleSelection(W.columnIdx))}}),document.querySelector("#portal"))]})}const wC=dg(bC),Ef=f.memo(wC),yC=({data:e,height:t,width:n,customToolbarActions:r})=>Ve(Ef,{element:new Yt({useContainerWidth:!0,editingMode:Yt.EditingMode.READ_ONLY,disabled:!0,data:void 0,styler:null,width:void 0,height:t??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}),zC=Object.freeze(Object.defineProperty({__proto__:null,ReadOnlyGrid:yC,default:Ef},Symbol.toStringTag,{value:"Module"}));export{E0 as C,yC as R,id as T,Si as a,Xg as b,zC as c,wi as i,am as m,an as s};