@stlite/desktop 0.81.6 → 0.82.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (74) hide show
  1. package/build/assets/{FileDownload.esm-Bpf_IJaz.js → FileDownload.esm-Bzb3HjS9.js} +1 -1
  2. package/build/assets/{FileHelper-BEtUZCB8.js → FileHelper-BNpeYRlH.js} +1 -1
  3. package/build/assets/{FormClearHelper--a7FEpt-.js → FormClearHelper-DxeY-rII.js} +1 -1
  4. package/build/assets/{Hooks-2PqJRMDp.js → Hooks-BOkao1bO.js} +1 -1
  5. package/build/assets/{InputInstructions-GAhfSEnF.js → InputInstructions-DuxSO2sS.js} +1 -1
  6. package/build/assets/{ProgressBar-Col3VLE4.js → ProgressBar-xr2SnNK1.js} +1 -1
  7. package/build/assets/{RenderInPortalIfExists-qnP8SYNG.js → RenderInPortalIfExists-D-C7LcEp.js} +1 -1
  8. package/build/assets/{Toolbar-Ce_uRMJw.js → Toolbar-CJ0mD5An.js} +1 -1
  9. package/build/assets/{base-input-BHEia47e.js → base-input-NsRtpzFx.js} +1 -1
  10. package/build/assets/{checkbox-Cddx6i3F.js → checkbox-Dj0lswiB.js} +1 -1
  11. package/build/assets/{createSuper-RDzkTe3c.js → createSuper-Ipqc67nc.js} +1 -1
  12. package/build/assets/{data-grid-overlay-editor-D6T-ER_q.js → data-grid-overlay-editor-BDv7jlce.js} +1 -1
  13. package/build/assets/{downloader-DaEpMxPx.js → downloader-CaOAUbUF.js} +1 -1
  14. package/build/assets/{es6-CcuZyssh.js → es6-BZHzmZtr.js} +2 -2
  15. package/build/assets/{iframeResizer.contentWindow-DHS7Pu0i.js → iframeResizer.contentWindow-CHGlD-N9.js} +1 -1
  16. package/build/assets/{index-CyYl-5F4.js → index-7fVMC6lw.js} +1 -1
  17. package/build/assets/{index-DW287fpb.js → index-B-LSEdUZ.js} +1 -1
  18. package/build/assets/{index-C-2rT3oM.js → index-B-ykjfbX.js} +1 -1
  19. package/build/assets/{index-DHl89CCF.js → index-B4X2D_eW.js} +1 -1
  20. package/build/assets/{index-D07bwkWY.js → index-BTv0oYZW.js} +1 -1
  21. package/build/assets/{index-BXlqmLSw.js → index-BfXMsSNA.js} +5 -5
  22. package/build/assets/{index-7eIEqW6S.js → index-BtnOdn6v.js} +1 -1
  23. package/build/assets/{index-CreZOv_n.js → index-BwTtx5nh.js} +1 -1
  24. package/build/assets/{index-DpOOTQ4a.js → index-By6Q65Pf.js} +1 -1
  25. package/build/assets/{index-C7q_Bsxr.js → index-C7CxGGAJ.js} +1 -1
  26. package/build/assets/{index-LZMzKd6i.js → index-CA7xtrC9.js} +1 -1
  27. package/build/assets/{index-qnESYKH3.js → index-CHhIqZol.js} +1 -1
  28. package/build/assets/{index-qZBF_Zup.js → index-CRx6-P3W.js} +1 -1
  29. package/build/assets/{index-BWOzAKM3.js → index-CTC0h65f.js} +1 -1
  30. package/build/assets/{index-85lABG_-.js → index-CUa9G_2w.js} +1 -1
  31. package/build/assets/{index-LZAWp2JT.js → index-Ck_7L8T4.js} +1 -1
  32. package/build/assets/{index-BSeIgN9k.js → index-Cns8y39_.js} +1 -1
  33. package/build/assets/{index-vdtOYA7b.js → index-CnyprtY_.js} +1 -1
  34. package/build/assets/{index-DN8Z5yj8.js → index-CoJDuQ5Y.js} +1 -1
  35. package/build/assets/{index-Pc9U3GV3.js → index-Cp10Db30.js} +1 -1
  36. package/build/assets/{index-qBaGcpp3.js → index-Cyc3gr_v.js} +1 -1
  37. package/build/assets/{index-YQk3COsD.js → index-D1dbR74e.js} +1 -1
  38. package/build/assets/{index-C4IBAvYi.js → index-D9Fv1oGe.js} +1 -1
  39. package/build/assets/{index-BQjJjeMH.js → index-D9ZJ5ysG.js} +1 -1
  40. package/build/assets/{index-Oz9-OY6E.js → index-DJZ72tug.js} +1 -1
  41. package/build/assets/{index-C2JTCZRI.js → index-DMVOLuV0.js} +1 -1
  42. package/build/assets/{index-VB1U8aCl.js → index-DX_vgtQT.js} +1 -1
  43. package/build/assets/{index-CZyeXUIr.js → index-DbTxB5ik.js} +1 -1
  44. package/build/assets/{index-DF2Bv2Iu.js → index-DeRs-vXN.js} +1 -1
  45. package/build/assets/{index-ma8H1oet.js → index-DhYvQko1.js} +1 -1
  46. package/build/assets/{index-CngYL5q1.js → index-Dk-OPVLJ.js} +1 -1
  47. package/build/assets/{index-CunpKDCO.js → index-DrIrAYez.js} +1 -1
  48. package/build/assets/{index-CvsR1I3L.js → index-DvUGK7b6.js} +1 -1
  49. package/build/assets/{index-DcrwU5E6.js → index-GJHR2pBi.js} +1 -1
  50. package/build/assets/{index-NYCOzVlX.js → index-OxGwEg3m.js} +12 -12
  51. package/build/assets/{index-BimHN13b.js → index-SCb8nZ6H.js} +1 -1
  52. package/build/assets/{index-DDA7JyBJ.js → index-zPhSbuEH.js} +1 -1
  53. package/build/assets/{inherits-DMADb7u9.js → inherits-BbfuKc-R.js} +1 -1
  54. package/build/assets/{input-DdxVQNZ7.js → input-CkptI290.js} +1 -1
  55. package/build/assets/{memory-_2PWlQG6.js → memory-BDEJOdDh.js} +1 -1
  56. package/build/assets/{mergeWith-THRzgcPq.js → mergeWith-D2cULMN8.js} +1 -1
  57. package/build/assets/{number-overlay-editor-D5Yhw2y2.js → number-overlay-editor-cmVGLaYJ.js} +1 -1
  58. package/build/assets/{sandbox-D8Np0x1K.js → sandbox-VVt-VWM8.js} +1 -1
  59. package/build/assets/{slicedToArray-CiQSSrYz.js → slicedToArray-HZKHLTaA.js} +1 -1
  60. package/build/assets/{textarea-r4-zB_B9.js → textarea-Cy6EVtfz.js} +1 -1
  61. package/build/assets/{timepicker-Dz1EXIQj.js → timepicker-DQlSkM-Q.js} +1 -1
  62. package/build/assets/{uniqueId-C8rYCZew.js → uniqueId-Dka3DuQQ.js} +1 -1
  63. package/build/assets/{useBasicWidgetState-vUy8Wspy.js → useBasicWidgetState-Bm5AJWX7.js} +1 -1
  64. package/build/assets/{useOnInputChange-Cl7V3cFN.js → useOnInputChange-C3lvbUNp.js} +1 -1
  65. package/build/assets/{withFullScreenWrapper-D7Ouz6kJ.js → withFullScreenWrapper-CEJUxUJC.js} +1 -1
  66. package/build/assets/{worker-BlovaCIP.js → worker-eTai8nRu.js} +1 -1
  67. package/build/index.html +1 -1
  68. package/build/pyodide/pyodide-lock.json +1 -1
  69. package/build/pyodide/pyodide.asm.js +1 -1
  70. package/build/pyodide/pyodide.asm.wasm +0 -0
  71. package/build/pyodide/pyodide.mjs +3 -3
  72. package/build/pyodide/python_stdlib.zip +0 -0
  73. package/package.json +6 -6
  74. package/wheels/streamlit-1.44.1-cp312-none-any.whl +0 -0
@@ -1,5 +1,5 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/data-grid-overlay-editor-D6T-ER_q.js","assets/index-NYCOzVlX.js","assets/index.5L7agjmb.css","assets/FormClearHelper--a7FEpt-.js","assets/withFullScreenWrapper-D7Ouz6kJ.js","assets/Toolbar-Ce_uRMJw.js","assets/checkbox-Cddx6i3F.js","assets/mergeWith-THRzgcPq.js","assets/sprintf-D7DtBTRn.js","assets/createDownloadLinkElement-DZMwyjvU.js","assets/slicedToArray-CiQSSrYz.js","assets/inherits-DMADb7u9.js","assets/createSuper-RDzkTe3c.js","assets/FileDownload.esm-Bpf_IJaz.js","assets/number-overlay-editor-D5Yhw2y2.js","assets/es6-CcuZyssh.js"])))=>i.map(i=>d[i]);
2
- import{r as p,E as ps,_ as Xe,d as Ay,g as mo,R as ne,i as gs,e as fi,f as Hy,h as Fy,m as _y,n as Ph,o as Ah,p as Ny,q as Hh,s as By,t as Vy,v as $y,w as Wy,x as jy,y as Uy,a as ao,z as ms,c as kr,A as Zo,j as Oe,B as xl,C as Cl,T as Fh,D as kl,F as vo,G as $n,H as _h,I as Sl,J as Yy,K as Gy,L as $e,M as Nh,N as gt,O as pi,Q as Jo,S as vs,U as Ky,V as Xy,W as qy,X as Bh,Y as Zy,Z as Vh,$ as Jy,a0 as Qy,a1 as bs,a2 as $h,a3 as Wh,a4 as ex,a5 as tx,a6 as nx,a7 as ox,a8 as rx,a9 as ix,aa as lx,ab as ax,ac as sx,ad as jh,ae as cx,af as ux,ag as dx,ah as hx,ai as fx,aj as px,ak as gx,al as mx,am as vx,an as bx,ao as wx,ap as yx,aq as xx,ar as En,l as ws,as as gi,at as bo,au as Cx,av as kx,aw as Sx,ax as Mx,ay as Rx,az as Ex,aA as Ml,aB as mi,aC as $t,aD as Ix,aE as Tx,aF as Ox,aG as Dx,aH as Qo,aI as Rt,aJ as xn,aK as Uh,aL as Yh,aM as Rl,aN as zx,aO as Gh,aP as Kh,aQ as Lx,aR as ys,aS as Px,aT as Ax,aU as Xh,aV as Hx,aW as qh,aX as Fx,aY as Zh,aZ as _x,a_ as Nx,a$ as Bx,b as Jh,b0 as xs,b1 as Vx,b2 as $x,b3 as Cs,b4 as Wx,b5 as jx,b6 as Ux,b7 as Yx,__tla as Gx}from"./index-NYCOzVlX.js";import{u as Kx}from"./FormClearHelper--a7FEpt-.js";import{w as Xx,u as qx,E as Zx}from"./withFullScreenWrapper-D7Ouz6kJ.js";import{T as Jx,a as Sr}from"./Toolbar-Ce_uRMJw.js";import{S as Qx,L as eC,a as tC}from"./checkbox-Cddx6i3F.js";import{m as nC}from"./mergeWith-THRzgcPq.js";import{s as oC}from"./sprintf-D7DtBTRn.js";import{c as rC}from"./createDownloadLinkElement-DZMwyjvU.js";import{_ as wo,C as iC}from"./slicedToArray-CiQSSrYz.js";import{_ as lC,a as aC,b as sC}from"./inherits-DMADb7u9.js";import{_ as cC}from"./createSuper-RDzkTe3c.js";import{D as uC,F as dC}from"./FileDownload.esm-Bpf_IJaz.js";let ks,El,Lo,Ss,Qh,Po,Ms,sn,hC=Promise.all([(()=>{try{return Gx}catch{}})()]).then(async()=>{var ef=Object.defineProperty,tf=(e,t,n)=>t in e?ef(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,dt=(e,t,n)=>tf(e,typeof t!="symbol"?t+"":t,n),Rs=p.forwardRef(function(e,t){var n={fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"};return p.createElement(ps,Xe({iconAttrs:n,iconVerticalAlign:"middle",iconViewBox:"0 0 24 24"},e,{ref:t}),p.createElement("path",{fill:"none",d:"M0 0h24v24H0V0z"}),p.createElement("path",{d:"M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z"}))});Rs.displayName="Add";var Es=p.forwardRef(function(e,t){var n={fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"};return p.createElement(ps,Xe({iconAttrs:n,iconVerticalAlign:"middle",iconViewBox:"0 0 24 24"},e,{ref:t}),p.createElement("path",{fill:"none",d:"M0 0h24v24H0V0z"}),p.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"}))});Es.displayName="Search";var Is=p.forwardRef(function(e,t){var n={fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"};return p.createElement(ps,Xe({iconAttrs:n,iconVerticalAlign:"middle",iconViewBox:"0 0 24 24"},e,{ref:t}),p.createElement("path",{fill:"none",d:"M0 0h24v24H0V0z"}),p.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"}))});Is.displayName="Visibility";function Ts(e="This should not happen"){throw new Error(e)}function zn(e,t="Assertion failed"){if(!e)return Ts(t)}function Mr(e,t){return Ts(t??"Hell froze over")}function nf(e,t){try{return e()}catch{return t}}const Os=Object.prototype.hasOwnProperty;function er(e,t){let n,o;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((o=e.length)===t.length)for(;o--&&er(e[o],t[o]););return o===-1}if(!n||typeof e=="object"){o=0;for(n in e)if(Os.call(e,n)&&++o&&!Os.call(t,n)||!(n in t)||!er(e[n],t[n]))return!1;return Object.keys(t).length===o}}return e!==e&&t!==t}var Tl,Ds;function of(){if(Ds)return Tl;Ds=1;var e=Object.prototype,t=e.hasOwnProperty;function n(o,r){return o!=null&&t.call(o,r)}return Tl=n,Tl}var Ol,zs;function rf(){if(zs)return Ol;zs=1;var e=of(),t=Ay();function n(o,r){return o!=null&&t(o,r,e)}return Ol=n,Ol}var lf=rf();const af=mo(lf),vi=null,Dl=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 Ls;(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"})(Ls||(Ls={}));var bi;(function(e){e.Triangle="triangle",e.Dots="dots"})(bi||(bi={}));function wi(e){return"width"in e&&typeof e.width=="number"}async function Ps(e){return typeof e=="object"?e:await e()}Po=function(e){return!(e.kind===Z.Loading||e.kind===Z.Bubble||e.kind===Z.RowID||e.kind===Z.Protected||e.kind===Z.Drilldown)},Lo=function(e){return e.kind===Fn.Marker||e.kind===Fn.NewRow};function Rr(e){if(!Po(e)||e.kind===Z.Image)return!1;if(e.kind===Z.Text||e.kind===Z.Number||e.kind===Z.Markdown||e.kind===Z.Uri||e.kind===Z.Custom||e.kind===Z.Boolean)return e.readonly!==!0;Mr(e,"A cell was passed with an invalid kind")}Ss=function(e){return af(e,"editor")};function zl(e){return!(e.readonly??!1)}var Fn;(function(e){e.NewRow="new-row",e.Marker="marker"})(Fn||(Fn={}));function sf(e){if(e.length===0)return[];const t=[...e],n=[];t.sort(function(o,r){return o[0]-r[0]}),n.push([...t[0]]);for(const o of t.slice(1)){const r=n[n.length-1];r[1]<o[0]?n.push([...o]):r[1]<o[1]&&(r[1]=o[1])}return n}let As;const Er=class Il{constructor(t){dt(this,"items"),this.items=t}offset(t){if(t===0)return this;const n=this.items.map(o=>[o[0]+t,o[1]+t]);return new Il(n)}add(t){const n=typeof t=="number"?[t,t+1]:t,o=sf([...this.items,n]);return new Il(o)}remove(t){const n=[...this.items],o=typeof t=="number"?t:t[0],r=typeof t=="number"?t+1:t[1];for(const[i,l]of n.entries()){const[s,a]=l;if(s<=r&&o<=a){const c=[];s<o&&c.push([s,o]),r<a&&c.push([r,a]),n.splice(i,1,...c)}}return new Il(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[o,r]=this.items[n];if(t>=o&&t<r)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 o=t.items[n],r=this.items[n];if(o[0]!==r[0]||o[1]!==r[1])return!1}return!0}toArray(){const t=[];for(const[n,o]of this.items)for(let r=n;r<o;r++)t.push(r);return t}get length(){let t=0;for(const[n,o]of this.items)t+=o-n;return t}*[Symbol.iterator](){for(const[t,n]of this.items)for(let o=t;o<n;o++)yield o}};dt(Er,"empty",()=>As??(As=new Er([]))),dt(Er,"fromSingleSelection",e=>Er.empty().add(e));let mt=Er;var cf=function(){const e=Array.prototype.slice.call(arguments).filter(Boolean),t={},n=[];e.forEach(r=>{(r?r.split(" "):[]).forEach(i=>{if(i.startsWith("atm_")){const[,l]=i.split("_");t[l]=i}else n.push(i)})});const o=[];for(const r in t)Object.prototype.hasOwnProperty.call(t,r)&&o.push(t[r]);return o.push(...n),o.join(" ")},Hs=cf,uf=e=>e.toUpperCase()===e,df=e=>t=>e.indexOf(t)===-1,Fs=(e,t)=>{const n={};return Object.keys(e).filter(df(t)).forEach(o=>{n[o]=e[o]}),n};function hf(e,t,n){const o=Fs(t,n);if(!e){const r=typeof gs=="function"?{default:gs}:gs;Object.keys(o).forEach(i=>{r.default(i)||delete o[i]})}return o}var ff=(e,t)=>{};function pf(e){let t="";return n=>{const o=(i,l)=>{const{as:s=e,class:a=t}=i,c=n.propsAsIs===void 0?!(typeof s=="string"&&s.indexOf("-")===-1&&!uf(s[0])):n.propsAsIs,u=hf(c,i,["as","class"]);u.ref=l,u.className=n.atomic?Hs(n.class,u.className||a):Hs(u.className||a,n.class);const{vars:d}=n;if(d){const f={};for(const m in d){const b=d[m],y=b[0],v=b[1]||"",I=typeof y=="function"?y(i):y;ff(I,n.name),f[`--${m}`]=`${I}${v}`}const h=u.style||{},g=Object.keys(h);g.length>0&&g.forEach(m=>{f[m]=h[m]}),u.style=f}return e.__linaria&&e!==s?(u.as=s,ne.createElement(e,u)):ne.createElement(s,u)},r=ne.forwardRef?ne.forwardRef(o):i=>{const l=Fs(i,["innerRef"]);return o(l,i.innerRef)};return r.displayName=n.name,r.__linaria={className:n.class||t,extends:e},r}}sn=pf;const gf=sn("div")({name:"ImageOverlayEditorStyle",class:"gdg-i2iowwq",propsAsIs:!1});var _s={},Ir={},Ll={},Pl={},Ns;function mf(){return Ns||(Ns=1,function(e){(function(t,n){n(e,fi(),Hy())})(Pl,function(t,n,o){Object.defineProperty(t,"__esModule",{value:!0}),t.setHasSupportToCaptureOption=g;var r=l(n),i=l(o);function l(v){return v&&v.__esModule?v:{default:v}}var s=Object.assign||function(v){for(var I=1;I<arguments.length;I++){var T=arguments[I];for(var k in T)Object.prototype.hasOwnProperty.call(T,k)&&(v[k]=T[k])}return v};function a(v,I){var T={};for(var k in v)I.indexOf(k)>=0||Object.prototype.hasOwnProperty.call(v,k)&&(T[k]=v[k]);return T}function c(v,I){if(!(v instanceof I))throw new TypeError("Cannot call a class as a function")}var u=function(){function v(I,T){for(var k=0;k<T.length;k++){var x=T[k];x.enumerable=x.enumerable||!1,x.configurable=!0,"value"in x&&(x.writable=!0),Object.defineProperty(I,x.key,x)}}return function(I,T,k){return T&&v(I.prototype,T),k&&v(I,k),I}}();function d(v,I){if(!v)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return I&&(typeof I=="object"||typeof I=="function")?I:v}function f(v,I){if(typeof I!="function"&&I!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof I);v.prototype=Object.create(I&&I.prototype,{constructor:{value:v,enumerable:!1,writable:!0,configurable:!0}}),I&&(Object.setPrototypeOf?Object.setPrototypeOf(v,I):v.__proto__=I)}var h=!1;function g(v){h=v}try{addEventListener("test",null,Object.defineProperty({},"capture",{get:function(){g(!0)}}))}catch{}function m(){var v=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{capture:!0};return h?v:v.capture}function b(v){if("touches"in v){var I=v.touches[0],T=I.pageX,k=I.pageY;return{x:T,y:k}}var x=v.screenX,L=v.screenY;return{x,y:L}}var y=function(v){f(I,v);function I(){var T;c(this,I);for(var k=arguments.length,x=Array(k),L=0;L<k;L++)x[L]=arguments[L];var O=d(this,(T=I.__proto__||Object.getPrototypeOf(I)).call.apply(T,[this].concat(x)));return O._handleSwipeStart=O._handleSwipeStart.bind(O),O._handleSwipeMove=O._handleSwipeMove.bind(O),O._handleSwipeEnd=O._handleSwipeEnd.bind(O),O._onMouseDown=O._onMouseDown.bind(O),O._onMouseMove=O._onMouseMove.bind(O),O._onMouseUp=O._onMouseUp.bind(O),O._setSwiperRef=O._setSwiperRef.bind(O),O}return u(I,[{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(T){this.props.allowMouseEvents&&(this.mouseDown=!0,document.addEventListener("mouseup",this._onMouseUp),document.addEventListener("mousemove",this._onMouseMove),this._handleSwipeStart(T))}},{key:"_onMouseMove",value:function(T){this.mouseDown&&this._handleSwipeMove(T)}},{key:"_onMouseUp",value:function(T){this.mouseDown=!1,document.removeEventListener("mouseup",this._onMouseUp),document.removeEventListener("mousemove",this._onMouseMove),this._handleSwipeEnd(T)}},{key:"_handleSwipeStart",value:function(T){var k=b(T),x=k.x,L=k.y;this.moveStart={x,y:L},this.props.onSwipeStart(T)}},{key:"_handleSwipeMove",value:function(T){if(this.moveStart){var k=b(T),x=k.x,L=k.y,O=x-this.moveStart.x,R=L-this.moveStart.y;this.moving=!0;var P=this.props.onSwipeMove({x:O,y:R},T);P&&T.cancelable&&T.preventDefault(),this.movePosition={deltaX:O,deltaY:R}}}},{key:"_handleSwipeEnd",value:function(T){this.props.onSwipeEnd(T);var k=this.props.tolerance;this.moving&&this.movePosition&&(this.movePosition.deltaX<-k?this.props.onSwipeLeft(1,T):this.movePosition.deltaX>k&&this.props.onSwipeRight(1,T),this.movePosition.deltaY<-k?this.props.onSwipeUp(1,T):this.movePosition.deltaY>k&&this.props.onSwipeDown(1,T)),this.moveStart=null,this.moving=!1,this.movePosition=null}},{key:"_setSwiperRef",value:function(T){this.swiper=T,this.props.innerRef(T)}},{key:"render",value:function(){var T=this.props;T.tagName;var k=T.className,x=T.style,L=T.children;T.allowMouseEvents,T.onSwipeUp,T.onSwipeDown,T.onSwipeLeft,T.onSwipeRight,T.onSwipeStart,T.onSwipeMove,T.onSwipeEnd,T.innerRef,T.tolerance;var O=a(T,["tagName","className","style","children","allowMouseEvents","onSwipeUp","onSwipeDown","onSwipeLeft","onSwipeRight","onSwipeStart","onSwipeMove","onSwipeEnd","innerRef","tolerance"]);return r.default.createElement(this.props.tagName,s({ref:this._setSwiperRef,onMouseDown:this._onMouseDown,onTouchStart:this._handleSwipeStart,onTouchEnd:this._handleSwipeEnd,className:k,style:x},O),L)}}]),I}(n.Component);y.displayName="ReactSwipe",y.propTypes={tagName:i.default.string,className:i.default.string,style:i.default.object,children:i.default.node,allowMouseEvents:i.default.bool,onSwipeUp:i.default.func,onSwipeDown:i.default.func,onSwipeLeft:i.default.func,onSwipeRight:i.default.func,onSwipeStart:i.default.func,onSwipeMove:i.default.func,onSwipeEnd:i.default.func,innerRef:i.default.func,tolerance:i.default.number.isRequired},y.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=y})}(Pl)),Pl}var Bs;function Vs(){return Bs||(Bs=1,function(e){(function(t,n){n(e,mf())})(Ll,function(t,n){Object.defineProperty(t,"__esModule",{value:!0});var o=r(n);function r(i){return i&&i.__esModule?i:{default:i}}t.default=o.default})}(Ll)),Ll}var Tr={},$s;function Ws(){if($s)return Tr;$s=1,Object.defineProperty(Tr,"__esModule",{value:!0}),Tr.default=void 0;var e=t(Fy());function t(r){return r&&r.__esModule?r:{default:r}}function n(r,i,l){return i in r?Object.defineProperty(r,i,{value:l,enumerable:!0,configurable:!0,writable:!0}):r[i]=l,r}var o={ROOT:function(r){return(0,e.default)(n({"carousel-root":!0},r||"",!!r))},CAROUSEL:function(r){return(0,e.default)({carousel:!0,"carousel-slider":r})},WRAPPER:function(r,i){return(0,e.default)({"thumbs-wrapper":!r,"slider-wrapper":r,"axis-horizontal":i==="horizontal","axis-vertical":i!=="horizontal"})},SLIDER:function(r,i){return(0,e.default)({thumbs:!r,slider:r,animated:!i})},ITEM:function(r,i,l){return(0,e.default)({thumb:!r,slide:r,selected:i,previous:l})},ARROW_PREV:function(r){return(0,e.default)({"control-arrow control-prev":!0,"control-disabled":r})},ARROW_NEXT:function(r){return(0,e.default)({"control-arrow control-next":!0,"control-disabled":r})},DOT:function(r){return(0,e.default)({dot:!0,selected:r})}};return Tr.default=o,Tr}var Or={},Dr={},js;function vf(){if(js)return Dr;js=1,Object.defineProperty(Dr,"__esModule",{value:!0}),Dr.outerWidth=void 0;var e=function(t){var n=t.offsetWidth,o=getComputedStyle(t);return n+=parseInt(o.marginLeft)+parseInt(o.marginRight),n};return Dr.outerWidth=e,Dr}var zr={},Us;function Al(){if(Us)return zr;Us=1,Object.defineProperty(zr,"__esModule",{value:!0}),zr.default=void 0;var e=function(t,n,o){var r=t===0?t:t+n,i=o==="horizontal"?[r,0,0]:[0,r,0],l="translate3d",s="("+i.join(",")+")";return l+s};return zr.default=e,zr}var Lr={},Ys;function Gs(){if(Ys)return Lr;Ys=1,Object.defineProperty(Lr,"__esModule",{value:!0}),Lr.default=void 0;var e=function(){return window};return Lr.default=e,Lr}var Ks;function Xs(){if(Ks)return Or;Ks=1,Object.defineProperty(Or,"__esModule",{value:!0}),Or.default=void 0;var e=a(fi()),t=l(Ws()),n=vf(),o=l(Al()),r=l(Vs()),i=l(Gs());function l(O){return O&&O.__esModule?O:{default:O}}function s(){if(typeof WeakMap!="function")return null;var O=new WeakMap;return s=function(){return O},O}function a(O){if(O&&O.__esModule)return O;if(O===null||c(O)!=="object"&&typeof O!="function")return{default:O};var R=s();if(R&&R.has(O))return R.get(O);var P={},M=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var S in O)if(Object.prototype.hasOwnProperty.call(O,S)){var E=M?Object.getOwnPropertyDescriptor(O,S):null;E&&(E.get||E.set)?Object.defineProperty(P,S,E):P[S]=O[S]}return P.default=O,R&&R.set(O,P),P}function c(O){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?c=function(R){return typeof R}:c=function(R){return R&&typeof Symbol=="function"&&R.constructor===Symbol&&R!==Symbol.prototype?"symbol":typeof R},c(O)}function u(){return u=Object.assign||function(O){for(var R=1;R<arguments.length;R++){var P=arguments[R];for(var M in P)Object.prototype.hasOwnProperty.call(P,M)&&(O[M]=P[M])}return O},u.apply(this,arguments)}function d(O,R){if(!(O instanceof R))throw new TypeError("Cannot call a class as a function")}function f(O,R){for(var P=0;P<R.length;P++){var M=R[P];M.enumerable=M.enumerable||!1,M.configurable=!0,"value"in M&&(M.writable=!0),Object.defineProperty(O,M.key,M)}}function h(O,R,P){return R&&f(O.prototype,R),O}function g(O,R){if(typeof R!="function"&&R!==null)throw new TypeError("Super expression must either be null or a function");O.prototype=Object.create(R&&R.prototype,{constructor:{value:O,writable:!0,configurable:!0}}),R&&m(O,R)}function m(O,R){return m=Object.setPrototypeOf||function(P,M){return P.__proto__=M,P},m(O,R)}function b(O){var R=I();return function(){var P=T(O),M;if(R){var S=T(this).constructor;M=Reflect.construct(P,arguments,S)}else M=P.apply(this,arguments);return y(this,M)}}function y(O,R){return R&&(c(R)==="object"||typeof R=="function")?R:v(O)}function v(O){if(O===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return O}function I(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}function T(O){return T=Object.setPrototypeOf?Object.getPrototypeOf:function(R){return R.__proto__||Object.getPrototypeOf(R)},T(O)}function k(O,R,P){return R in O?Object.defineProperty(O,R,{value:P,enumerable:!0,configurable:!0,writable:!0}):O[R]=P,O}var x=function(O){return O.hasOwnProperty("key")},L=function(O){g(P,O);var R=b(P);function P(M){var S;return d(this,P),S=R.call(this,M),k(v(S),"itemsWrapperRef",void 0),k(v(S),"itemsListRef",void 0),k(v(S),"thumbsRef",void 0),k(v(S),"setItemsWrapperRef",function(E){S.itemsWrapperRef=E}),k(v(S),"setItemsListRef",function(E){S.itemsListRef=E}),k(v(S),"setThumbsRef",function(E,D){S.thumbsRef||(S.thumbsRef=[]),S.thumbsRef[D]=E}),k(v(S),"updateSizes",function(){if(!(!S.props.children||!S.itemsWrapperRef||!S.thumbsRef)){var E=e.Children.count(S.props.children),D=S.itemsWrapperRef.clientWidth,C=S.props.thumbWidth?S.props.thumbWidth:(0,n.outerWidth)(S.thumbsRef[0]),G=Math.floor(D/C),B=G<E,J=B?E-G:0;S.setState(function(se,re){return{itemSize:C,visibleItems:G,firstItem:B?S.getFirstItem(re.selectedItem):0,lastPosition:J,showArrows:B}})}}),k(v(S),"handleClickItem",function(E,D,C){if(!x(C)||C.key==="Enter"){var G=S.props.onSelectItem;typeof G=="function"&&G(E,D)}}),k(v(S),"onSwipeStart",function(){S.setState({swiping:!0})}),k(v(S),"onSwipeEnd",function(){S.setState({swiping:!1})}),k(v(S),"onSwipeMove",function(E){var D=E.x;if(!S.state.itemSize||!S.itemsWrapperRef||!S.state.visibleItems)return!1;var C=0,G=e.Children.count(S.props.children),B=-(S.state.firstItem*100)/S.state.visibleItems,J=Math.max(G-S.state.visibleItems,0),se=-J*100/S.state.visibleItems;B===C&&D>0&&(D=0),B===se&&D<0&&(D=0);var re=S.itemsWrapperRef.clientWidth,U=B+100/(re/D);return S.itemsListRef&&["WebkitTransform","MozTransform","MsTransform","OTransform","transform","msTransform"].forEach(function(ie){S.itemsListRef.style[ie]=(0,o.default)(U,"%",S.props.axis)}),!0}),k(v(S),"slideRight",function(E){S.moveTo(S.state.firstItem-(typeof E=="number"?E:1))}),k(v(S),"slideLeft",function(E){S.moveTo(S.state.firstItem+(typeof E=="number"?E:1))}),k(v(S),"moveTo",function(E){E=E<0?0:E,E=E>=S.state.lastPosition?S.state.lastPosition:E,S.setState({firstItem:E})}),S.state={selectedItem:M.selectedItem,swiping:!1,showArrows:!1,firstItem:0,visibleItems:0,lastPosition:0},S}return h(P,[{key:"componentDidMount",value:function(){this.setupThumbs()}},{key:"componentDidUpdate",value:function(M){this.props.selectedItem!==this.state.selectedItem&&this.setState({selectedItem:this.props.selectedItem,firstItem:this.getFirstItem(this.props.selectedItem)}),this.props.children!==M.children&&this.updateSizes()}},{key:"componentWillUnmount",value:function(){this.destroyThumbs()}},{key:"setupThumbs",value:function(){(0,i.default)().addEventListener("resize",this.updateSizes),(0,i.default)().addEventListener("DOMContentLoaded",this.updateSizes),this.updateSizes()}},{key:"destroyThumbs",value:function(){(0,i.default)().removeEventListener("resize",this.updateSizes),(0,i.default)().removeEventListener("DOMContentLoaded",this.updateSizes)}},{key:"getFirstItem",value:function(M){var S=M;return M>=this.state.lastPosition&&(S=this.state.lastPosition),M<this.state.firstItem+this.state.visibleItems&&(S=this.state.firstItem),M<this.state.firstItem&&(S=M),S}},{key:"renderItems",value:function(){var M=this;return this.props.children.map(function(S,E){var D=t.default.ITEM(!1,E===M.state.selectedItem),C={key:E,ref:function(G){return M.setThumbsRef(G,E)},className:D,onClick:M.handleClickItem.bind(M,E,M.props.children[E]),onKeyDown:M.handleClickItem.bind(M,E,M.props.children[E]),"aria-label":"".concat(M.props.labels.item," ").concat(E+1),style:{width:M.props.thumbWidth}};return e.default.createElement("li",u({},C,{role:"button",tabIndex:0}),S)})}},{key:"render",value:function(){var M=this;if(!this.props.children)return null;var S=e.Children.count(this.props.children)>1,E=this.state.showArrows&&this.state.firstItem>0,D=this.state.showArrows&&this.state.firstItem<this.state.lastPosition,C={},G=-this.state.firstItem*(this.state.itemSize||0),B=(0,o.default)(G,"px",this.props.axis),J=this.props.transitionTime+"ms";return C={WebkitTransform:B,MozTransform:B,MsTransform:B,OTransform:B,transform:B,msTransform:B,WebkitTransitionDuration:J,MozTransitionDuration:J,MsTransitionDuration:J,OTransitionDuration:J,transitionDuration:J,msTransitionDuration:J},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(!E),onClick:function(){return M.slideRight()},"aria-label":this.props.labels.leftArrow}),S?e.default.createElement(r.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:C,innerRef:this.setItemsListRef,allowMouseEvents:this.props.emulateTouch},this.renderItems()):e.default.createElement("ul",{className:t.default.SLIDER(!1,this.state.swiping),ref:function(se){return M.setItemsListRef(se)},style:C},this.renderItems()),e.default.createElement("button",{type:"button",className:t.default.ARROW_NEXT(!D),onClick:function(){return M.slideLeft()},"aria-label":this.props.labels.rightArrow})))}}]),P}(e.Component);return Or.default=L,k(L,"displayName","Thumbs"),k(L,"defaultProps",{axis:"horizontal",labels:{leftArrow:"previous slide / item",rightArrow:"next slide / item",item:"slide item"},selectedItem:0,thumbWidth:80,transitionTime:350}),Or}var Pr={},qs;function bf(){if(qs)return Pr;qs=1,Object.defineProperty(Pr,"__esModule",{value:!0}),Pr.default=void 0;var e=function(){return document};return Pr.default=e,Pr}var Ln={},Zs;function Js(){if(Zs)return Ln;Zs=1,Object.defineProperty(Ln,"__esModule",{value:!0}),Ln.setPosition=Ln.getPosition=Ln.isKeyboardEvent=Ln.defaultStatusFormatter=Ln.noop=void 0;var e=fi(),t=n(Al());function n(a){return a&&a.__esModule?a:{default:a}}var o=function(){};Ln.noop=o;var r=function(a,c){return"".concat(a," of ").concat(c)};Ln.defaultStatusFormatter=r;var i=function(a){return a?a.hasOwnProperty("key"):!1};Ln.isKeyboardEvent=i;var l=function(a,c){if(c.infiniteLoop&&++a,a===0)return 0;var u=e.Children.count(c.children);if(c.centerMode&&c.axis==="horizontal"){var d=-a*c.centerSlidePercentage,f=u-1;return a&&(a!==f||c.infiniteLoop)?d+=(100-c.centerSlidePercentage)/2:a===f&&(d+=100-c.centerSlidePercentage),d}return-a*100};Ln.getPosition=l;var s=function(a,c){var u={};return["WebkitTransform","MozTransform","MsTransform","OTransform","transform","msTransform"].forEach(function(d){u[d]=(0,t.default)(a,"%",c)}),u};return Ln.setPosition=s,Ln}var Wn={},Qs;function wf(){if(Qs)return Wn;Qs=1,Object.defineProperty(Wn,"__esModule",{value:!0}),Wn.fadeAnimationHandler=Wn.slideStopSwipingHandler=Wn.slideSwipeAnimationHandler=Wn.slideAnimationHandler=void 0;var e=fi(),t=o(Al()),n=Js();function o(d){return d&&d.__esModule?d:{default:d}}function r(d,f){var h=Object.keys(d);if(Object.getOwnPropertySymbols){var g=Object.getOwnPropertySymbols(d);f&&(g=g.filter(function(m){return Object.getOwnPropertyDescriptor(d,m).enumerable})),h.push.apply(h,g)}return h}function i(d){for(var f=1;f<arguments.length;f++){var h=arguments[f]!=null?arguments[f]:{};f%2?r(Object(h),!0).forEach(function(g){l(d,g,h[g])}):Object.getOwnPropertyDescriptors?Object.defineProperties(d,Object.getOwnPropertyDescriptors(h)):r(Object(h)).forEach(function(g){Object.defineProperty(d,g,Object.getOwnPropertyDescriptor(h,g))})}return d}function l(d,f,h){return f in d?Object.defineProperty(d,f,{value:h,enumerable:!0,configurable:!0,writable:!0}):d[f]=h,d}var s=function(d,f){var h={},g=f.selectedItem,m=g,b=e.Children.count(d.children)-1,y=d.infiniteLoop&&(g<0||g>b);if(y)return m<0?d.centerMode&&d.centerSlidePercentage&&d.axis==="horizontal"?h.itemListStyle=(0,n.setPosition)(-(b+2)*d.centerSlidePercentage-(100-d.centerSlidePercentage)/2,d.axis):h.itemListStyle=(0,n.setPosition)(-(b+2)*100,d.axis):m>b&&(h.itemListStyle=(0,n.setPosition)(0,d.axis)),h;var v=(0,n.getPosition)(g,d),I=(0,t.default)(v,"%",d.axis),T=d.transitionTime+"ms";return h.itemListStyle={WebkitTransform:I,msTransform:I,OTransform:I,transform:I},f.swiping||(h.itemListStyle=i(i({},h.itemListStyle),{},{WebkitTransitionDuration:T,MozTransitionDuration:T,OTransitionDuration:T,transitionDuration:T,msTransitionDuration:T})),h};Wn.slideAnimationHandler=s;var a=function(d,f,h,g){var m={},b=f.axis==="horizontal",y=e.Children.count(f.children),v=0,I=(0,n.getPosition)(h.selectedItem,f),T=f.infiniteLoop?(0,n.getPosition)(y-1,f)-100:(0,n.getPosition)(y-1,f),k=b?d.x:d.y,x=k;I===v&&k>0&&(x=0),I===T&&k<0&&(x=0);var L=I+100/(h.itemSize/x),O=Math.abs(k)>f.swipeScrollTolerance;return f.infiniteLoop&&O&&(h.selectedItem===0&&L>-100?L-=y*100:h.selectedItem===y-1&&L<-y*100&&(L+=y*100)),(!f.preventMovementUntilSwipeScrollTolerance||O||h.swipeMovementStarted)&&(h.swipeMovementStarted||g({swipeMovementStarted:!0}),m.itemListStyle=(0,n.setPosition)(L,f.axis)),O&&!h.cancelClick&&g({cancelClick:!0}),m};Wn.slideSwipeAnimationHandler=a;var c=function(d,f){var h=(0,n.getPosition)(f.selectedItem,d),g=(0,n.setPosition)(h,d.axis);return{itemListStyle:g}};Wn.slideStopSwipingHandler=c;var u=function(d,f){var h=d.transitionTime+"ms",g="ease-in-out",m={position:"absolute",display:"block",zIndex:-2,minHeight:"100%",opacity:0,top:0,right:0,left:0,bottom:0,transitionTimingFunction:g,msTransitionTimingFunction:g,MozTransitionTimingFunction:g,WebkitTransitionTimingFunction:g,OTransitionTimingFunction:g};return f.swiping||(m=i(i({},m),{},{WebkitTransitionDuration:h,MozTransitionDuration:h,OTransitionDuration:h,transitionDuration:h,msTransitionDuration:h})),{slideStyle:m,selectedStyle:i(i({},m),{},{opacity:1,position:"relative"}),prevStyle:i({},m)}};return Wn.fadeAnimationHandler=u,Wn}var ec;function yf(){if(ec)return Ir;ec=1,Object.defineProperty(Ir,"__esModule",{value:!0}),Ir.default=void 0;var e=u(fi()),t=a(Vs()),n=a(Ws()),o=a(Xs()),r=a(bf()),i=a(Gs()),l=Js(),s=wf();function a(M){return M&&M.__esModule?M:{default:M}}function c(){if(typeof WeakMap!="function")return null;var M=new WeakMap;return c=function(){return M},M}function u(M){if(M&&M.__esModule)return M;if(M===null||d(M)!=="object"&&typeof M!="function")return{default:M};var S=c();if(S&&S.has(M))return S.get(M);var E={},D=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var C in M)if(Object.prototype.hasOwnProperty.call(M,C)){var G=D?Object.getOwnPropertyDescriptor(M,C):null;G&&(G.get||G.set)?Object.defineProperty(E,C,G):E[C]=M[C]}return E.default=M,S&&S.set(M,E),E}function d(M){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?d=function(S){return typeof S}:d=function(S){return S&&typeof Symbol=="function"&&S.constructor===Symbol&&S!==Symbol.prototype?"symbol":typeof S},d(M)}function f(){return f=Object.assign||function(M){for(var S=1;S<arguments.length;S++){var E=arguments[S];for(var D in E)Object.prototype.hasOwnProperty.call(E,D)&&(M[D]=E[D])}return M},f.apply(this,arguments)}function h(M,S){var E=Object.keys(M);if(Object.getOwnPropertySymbols){var D=Object.getOwnPropertySymbols(M);S&&(D=D.filter(function(C){return Object.getOwnPropertyDescriptor(M,C).enumerable})),E.push.apply(E,D)}return E}function g(M){for(var S=1;S<arguments.length;S++){var E=arguments[S]!=null?arguments[S]:{};S%2?h(Object(E),!0).forEach(function(D){R(M,D,E[D])}):Object.getOwnPropertyDescriptors?Object.defineProperties(M,Object.getOwnPropertyDescriptors(E)):h(Object(E)).forEach(function(D){Object.defineProperty(M,D,Object.getOwnPropertyDescriptor(E,D))})}return M}function m(M,S){if(!(M instanceof S))throw new TypeError("Cannot call a class as a function")}function b(M,S){for(var E=0;E<S.length;E++){var D=S[E];D.enumerable=D.enumerable||!1,D.configurable=!0,"value"in D&&(D.writable=!0),Object.defineProperty(M,D.key,D)}}function y(M,S,E){return S&&b(M.prototype,S),M}function v(M,S){if(typeof S!="function"&&S!==null)throw new TypeError("Super expression must either be null or a function");M.prototype=Object.create(S&&S.prototype,{constructor:{value:M,writable:!0,configurable:!0}}),S&&I(M,S)}function I(M,S){return I=Object.setPrototypeOf||function(E,D){return E.__proto__=D,E},I(M,S)}function T(M){var S=L();return function(){var E=O(M),D;if(S){var C=O(this).constructor;D=Reflect.construct(E,arguments,C)}else D=E.apply(this,arguments);return k(this,D)}}function k(M,S){return S&&(d(S)==="object"||typeof S=="function")?S:x(M)}function x(M){if(M===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return M}function L(){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 O(M){return O=Object.setPrototypeOf?Object.getPrototypeOf:function(S){return S.__proto__||Object.getPrototypeOf(S)},O(M)}function R(M,S,E){return S in M?Object.defineProperty(M,S,{value:E,enumerable:!0,configurable:!0,writable:!0}):M[S]=E,M}var P=function(M){v(E,M);var S=T(E);function E(D){var C;m(this,E),C=S.call(this,D),R(x(C),"thumbsRef",void 0),R(x(C),"carouselWrapperRef",void 0),R(x(C),"listRef",void 0),R(x(C),"itemsRef",void 0),R(x(C),"timer",void 0),R(x(C),"animationHandler",void 0),R(x(C),"setThumbsRef",function(B){C.thumbsRef=B}),R(x(C),"setCarouselWrapperRef",function(B){C.carouselWrapperRef=B}),R(x(C),"setListRef",function(B){C.listRef=B}),R(x(C),"setItemsRef",function(B,J){C.itemsRef||(C.itemsRef=[]),C.itemsRef[J]=B}),R(x(C),"autoPlay",function(){e.Children.count(C.props.children)<=1||(C.clearAutoPlay(),C.props.autoPlay&&(C.timer=setTimeout(function(){C.increment()},C.props.interval)))}),R(x(C),"clearAutoPlay",function(){C.timer&&clearTimeout(C.timer)}),R(x(C),"resetAutoPlay",function(){C.clearAutoPlay(),C.autoPlay()}),R(x(C),"stopOnHover",function(){C.setState({isMouseEntered:!0},C.clearAutoPlay)}),R(x(C),"startOnLeave",function(){C.setState({isMouseEntered:!1},C.autoPlay)}),R(x(C),"isFocusWithinTheCarousel",function(){return C.carouselWrapperRef?!!((0,r.default)().activeElement===C.carouselWrapperRef||C.carouselWrapperRef.contains((0,r.default)().activeElement)):!1}),R(x(C),"navigateWithKeyboard",function(B){if(C.isFocusWithinTheCarousel()){var J=C.props.axis,se=J==="horizontal",re={ArrowUp:38,ArrowRight:39,ArrowDown:40,ArrowLeft:37},U=se?re.ArrowRight:re.ArrowDown,ie=se?re.ArrowLeft:re.ArrowUp;U===B.keyCode?C.increment():ie===B.keyCode&&C.decrement()}}),R(x(C),"updateSizes",function(){if(!(!C.state.initialized||!C.itemsRef||C.itemsRef.length===0)){var B=C.props.axis==="horizontal",J=C.itemsRef[0];if(J){var se=B?J.clientWidth:J.clientHeight;C.setState({itemSize:se}),C.thumbsRef&&C.thumbsRef.updateSizes()}}}),R(x(C),"setMountState",function(){C.setState({hasMount:!0}),C.updateSizes()}),R(x(C),"handleClickItem",function(B,J){if(e.Children.count(C.props.children)!==0){if(C.state.cancelClick){C.setState({cancelClick:!1});return}C.props.onClickItem(B,J),B!==C.state.selectedItem&&C.setState({selectedItem:B})}}),R(x(C),"handleOnChange",function(B,J){e.Children.count(C.props.children)<=1||C.props.onChange(B,J)}),R(x(C),"handleClickThumb",function(B,J){C.props.onClickThumb(B,J),C.moveTo(B)}),R(x(C),"onSwipeStart",function(B){C.setState({swiping:!0}),C.props.onSwipeStart(B)}),R(x(C),"onSwipeEnd",function(B){C.setState({swiping:!1,cancelClick:!1,swipeMovementStarted:!1}),C.props.onSwipeEnd(B),C.clearAutoPlay(),C.state.autoPlay&&C.autoPlay()}),R(x(C),"onSwipeMove",function(B,J){C.props.onSwipeMove(J);var se=C.props.swipeAnimationHandler(B,C.props,C.state,C.setState.bind(x(C)));return C.setState(g({},se)),!!Object.keys(se).length}),R(x(C),"decrement",function(){var B=arguments.length>0&&arguments[0]!==void 0?arguments[0]:1;C.moveTo(C.state.selectedItem-(typeof B=="number"?B:1))}),R(x(C),"increment",function(){var B=arguments.length>0&&arguments[0]!==void 0?arguments[0]:1;C.moveTo(C.state.selectedItem+(typeof B=="number"?B:1))}),R(x(C),"moveTo",function(B){if(typeof B=="number"){var J=e.Children.count(C.props.children)-1;B<0&&(B=C.props.infiniteLoop?J:0),B>J&&(B=C.props.infiniteLoop?0:J),C.selectItem({selectedItem:B}),C.state.autoPlay&&C.state.isMouseEntered===!1&&C.resetAutoPlay()}}),R(x(C),"onClickNext",function(){C.increment(1)}),R(x(C),"onClickPrev",function(){C.decrement(1)}),R(x(C),"onSwipeForward",function(){C.increment(1),C.props.emulateTouch&&C.setState({cancelClick:!0})}),R(x(C),"onSwipeBackwards",function(){C.decrement(1),C.props.emulateTouch&&C.setState({cancelClick:!0})}),R(x(C),"changeItem",function(B){return function(J){(!(0,l.isKeyboardEvent)(J)||J.key==="Enter")&&C.moveTo(B)}}),R(x(C),"selectItem",function(B){C.setState(g({previousItem:C.state.selectedItem},B),function(){C.setState(C.animationHandler(C.props,C.state))}),C.handleOnChange(B.selectedItem,e.Children.toArray(C.props.children)[B.selectedItem])}),R(x(C),"getInitialImage",function(){var B=C.props.selectedItem,J=C.itemsRef&&C.itemsRef[B],se=J&&J.getElementsByTagName("img")||[];return se[0]}),R(x(C),"getVariableItemHeight",function(B){var J=C.itemsRef&&C.itemsRef[B];if(C.state.hasMount&&J&&J.children.length){var se=J.children[0].getElementsByTagName("img")||[];if(se.length>0){var re=se[0];if(!re.complete){var U=function he(){C.forceUpdate(),re.removeEventListener("load",he)};re.addEventListener("load",U)}}var ie=se[0]||J.children[0],ce=ie.clientHeight;return ce>0?ce:null}return null});var G={initialized:!1,previousItem:D.selectedItem,selectedItem:D.selectedItem,hasMount:!1,isMouseEntered:!1,autoPlay:D.autoPlay,swiping:!1,swipeMovementStarted:!1,cancelClick:!1,itemSize:1,itemListStyle:{},slideStyle:{},selectedStyle:{},prevStyle:{}};return C.animationHandler=typeof D.animationHandler=="function"&&D.animationHandler||D.animationHandler==="fade"&&s.fadeAnimationHandler||s.slideAnimationHandler,C.state=g(g({},G),C.animationHandler(D,G)),C}return y(E,[{key:"componentDidMount",value:function(){this.props.children&&this.setupCarousel()}},{key:"componentDidUpdate",value:function(D,C){!D.children&&this.props.children&&!this.state.initialized&&this.setupCarousel(),!D.autoFocus&&this.props.autoFocus&&this.forceFocus(),C.swiping&&!this.state.swiping&&this.setState(g({},this.props.stopSwipingHandler(this.props,this.state))),(D.selectedItem!==this.props.selectedItem||D.centerMode!==this.props.centerMode)&&(this.updateSizes(),this.moveTo(this.props.selectedItem)),D.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 D=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 C=D.getInitialImage();C&&!C.complete?C.addEventListener("load",D.setMountState):D.setMountState()})}},{key:"destroyCarousel",value:function(){this.state.initialized&&(this.unbindEvents(),this.destroyAutoPlay())}},{key:"setupAutoPlay",value:function(){this.autoPlay();var D=this.carouselWrapperRef;this.props.stopOnHover&&D&&(D.addEventListener("mouseenter",this.stopOnHover),D.addEventListener("mouseleave",this.startOnLeave))}},{key:"destroyAutoPlay",value:function(){this.clearAutoPlay();var D=this.carouselWrapperRef;this.props.stopOnHover&&D&&(D.removeEventListener("mouseenter",this.stopOnHover),D.removeEventListener("mouseleave",this.startOnLeave))}},{key:"bindEvents",value:function(){(0,i.default)().addEventListener("resize",this.updateSizes),(0,i.default)().addEventListener("DOMContentLoaded",this.updateSizes),this.props.useKeyboardArrows&&(0,r.default)().addEventListener("keydown",this.navigateWithKeyboard)}},{key:"unbindEvents",value:function(){(0,i.default)().removeEventListener("resize",this.updateSizes),(0,i.default)().removeEventListener("DOMContentLoaded",this.updateSizes);var D=this.getInitialImage();D&&D.removeEventListener("load",this.setMountState),this.props.useKeyboardArrows&&(0,r.default)().removeEventListener("keydown",this.navigateWithKeyboard)}},{key:"forceFocus",value:function(){var D;(D=this.carouselWrapperRef)===null||D===void 0||D.focus()}},{key:"renderItems",value:function(D){var C=this;return this.props.children?e.Children.map(this.props.children,function(G,B){var J=B===C.state.selectedItem,se=B===C.state.previousItem,re=J&&C.state.selectedStyle||se&&C.state.prevStyle||C.state.slideStyle||{};C.props.centerMode&&C.props.axis==="horizontal"&&(re=g(g({},re),{},{minWidth:C.props.centerSlidePercentage+"%"})),C.state.swiping&&C.state.swipeMovementStarted&&(re=g(g({},re),{},{pointerEvents:"none"}));var U={ref:function(ie){return C.setItemsRef(ie,B)},key:"itemKey"+B+(D?"clone":""),className:n.default.ITEM(!0,B===C.state.selectedItem,B===C.state.previousItem),onClick:C.handleClickItem.bind(C,B,G),style:re};return e.default.createElement("li",U,C.props.renderItem(G,{isSelected:B===C.state.selectedItem,isPrevious:B===C.state.previousItem}))}):[]}},{key:"renderControls",value:function(){var D=this,C=this.props,G=C.showIndicators,B=C.labels,J=C.renderIndicator,se=C.children;return G?e.default.createElement("ul",{className:"control-dots"},e.Children.map(se,function(re,U){return J&&J(D.changeItem(U),U===D.state.selectedItem,U,B.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(o.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 D=this;if(!this.props.children||e.Children.count(this.props.children)===0)return null;var C=this.props.swipeable&&e.Children.count(this.props.children)>1,G=this.props.axis==="horizontal",B=this.props.showArrows&&e.Children.count(this.props.children)>1,J=B&&(this.state.selectedItem>0||this.props.infiniteLoop)||!1,se=B&&(this.state.selectedItem<e.Children.count(this.props.children)-1||this.props.infiniteLoop)||!1,re=this.renderItems(!0),U=re.shift(),ie=re.pop(),ce={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},he={};if(G){if(ce.onSwipeLeft=this.onSwipeForward,ce.onSwipeRight=this.onSwipeBackwards,this.props.dynamicHeight){var pe=this.getVariableItemHeight(this.state.selectedItem);he.height=pe||"auto"}}else ce.onSwipeUp=this.props.verticalSwipe==="natural"?this.onSwipeBackwards:this.onSwipeForward,ce.onSwipeDown=this.props.verticalSwipe==="natural"?this.onSwipeForward:this.onSwipeBackwards,ce.style=g(g({},ce.style),{},{height:this.state.itemSize}),he.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,J,this.props.labels.leftArrow),e.default.createElement("div",{className:n.default.WRAPPER(!0,this.props.axis),style:he},C?e.default.createElement(t.default,f({tagName:"ul",innerRef:this.setListRef},ce,{allowMouseEvents:this.props.emulateTouch}),this.props.infiniteLoop&&ie,this.renderItems(),this.props.infiniteLoop&&U):e.default.createElement("ul",{className:n.default.SLIDER(!0,this.state.swiping),ref:function(Q){return D.setListRef(Q)},style:this.state.itemListStyle||{}},this.props.infiniteLoop&&ie,this.renderItems(),this.props.infiniteLoop&&U)),this.props.renderArrowNext(this.onClickNext,se,this.props.labels.rightArrow),this.renderStatus()),this.renderThumbs())}}]),E}(e.default.Component);return Ir.default=P,R(P,"displayName","Carousel"),R(P,"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(M,S,E){return e.default.createElement("button",{type:"button","aria-label":E,className:n.default.ARROW_PREV(!S),onClick:M})},renderArrowNext:function(M,S,E){return e.default.createElement("button",{type:"button","aria-label":E,className:n.default.ARROW_NEXT(!S),onClick:M})},renderIndicator:function(M,S,E,D){return e.default.createElement("li",{className:n.default.DOT(S),onClick:M,onKeyDown:M,value:E,key:E,role:"button",tabIndex:0,"aria-label":"".concat(D," ").concat(E+1)})},renderItem:function(M){return M},renderThumbs:function(M){var S=e.Children.map(M,function(E){var D=E;if(E.type!=="img"&&(D=e.Children.toArray(E.props.children).find(function(C){return C.type==="img"})),!!D)return D});return S.filter(function(E){return E}).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"),[]):S},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:s.slideSwipeAnimationHandler,stopSwipingHandler:s.slideStopSwipingHandler}),Ir}var xf={},tc;function Cf(){return tc||(tc=1),xf}var nc;function kf(){return nc||(nc=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 o.default}});var t=r(yf()),n=Cf(),o=r(Xs());function r(i){return i&&i.__esModule?i:{default:i}}}(_s)),_s}var Sf=kf(),Hl,oc;function Mf(){if(oc)return Hl;oc=1;var e=_y(),t=function(){return e.Date.now()};return Hl=t,Hl}var Fl,rc;function ic(){if(rc)return Fl;rc=1;var e=Ph(),t=Mf(),n=Ah(),o="Expected a function",r=Math.max,i=Math.min;function l(s,a,c){var u,d,f,h,g,m,b=0,y=!1,v=!1,I=!0;if(typeof s!="function")throw new TypeError(o);a=n(a)||0,e(c)&&(y=!!c.leading,v="maxWait"in c,f=v?r(n(c.maxWait)||0,a):f,I="trailing"in c?!!c.trailing:I);function T(E){var D=u,C=d;return u=d=void 0,b=E,h=s.apply(C,D),h}function k(E){return b=E,g=setTimeout(O,a),y?T(E):h}function x(E){var D=E-m,C=E-b,G=a-D;return v?i(G,f-C):G}function L(E){var D=E-m,C=E-b;return m===void 0||D>=a||D<0||v&&C>=f}function O(){var E=t();if(L(E))return R(E);g=setTimeout(O,x(E))}function R(E){return g=void 0,I&&u?T(E):(u=d=void 0,h)}function P(){g!==void 0&&clearTimeout(g),b=0,u=m=d=g=void 0}function M(){return g===void 0?h:R(t())}function S(){var E=t(),D=L(E);if(u=arguments,d=this,m=E,D){if(g===void 0)return k(m);if(v)return clearTimeout(g),g=setTimeout(O,a),T(m)}return g===void 0&&(g=setTimeout(O,a)),h}return S.cancel=P,S.flush=M,S}return Fl=l,Fl}var Rf=ic();const lc=mo(Rf);function fn(e,t,n,o,r=!1){const i=p.useRef();i.current=t,p.useEffect(()=>{if(n===null||n.addEventListener===void 0)return;const l=n,s=a=>{var c;(c=i.current)==null||c.call(l,a)};return l.addEventListener(e,s,{passive:o,capture:r}),()=>{l.removeEventListener(e,s,{capture:r})}},[e,n,o,r])}function Ao(e,t){return e===void 0?void 0:t}const Ef=Math.PI;function ac(e){return e*Ef/180}const sc=(e,t,n)=>({x1:e-n/2,y1:t-n/2,x2:e+n/2,y2:t+n/2}),cc=(e,t,n,o,r)=>{switch(e){case"left":return Math.floor(t)+o+r/2;case"center":return Math.floor(t+n/2);case"right":return Math.floor(t+n)-o-r/2}},uc=(e,t,n)=>Math.min(e,t-n*2),dc=(e,t,n)=>n.x1<=e&&e<=n.x2&&n.y1<=t&&t<=n.y2,_l=e=>{const t=e.fgColor??"currentColor";return p.createElement("svg",{viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},p.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"}),p.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"}))},If=e=>{const t=e.fgColor??"currentColor";return p.createElement("svg",{viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},p.createElement("path",{d:"M19 6L10.3802 17L5.34071 11.8758",vectorEffect:"non-scaling-stroke",stroke:t,strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}))};function Tf(e,t,n){const[o,r]=p.useState(e),i=p.useRef(!0);p.useEffect(()=>()=>{i.current=!1},[]);const l=p.useRef(lc(s=>{i.current&&r(s)},n));return p.useLayoutEffect(()=>{i.current&&l.current(()=>e())},t),o}const Of="\u0591-\u07FF\uFB1D-\uFDFD\uFE70-\uFEFC",Df="A-Za-z\xC0-\xD6\xD8-\xF6\xF8-\u02B8\u0300-\u0590\u0800-\u1FFF\u200E\u2C00-\uFB1C\uFE00-\uFE6F\uFEFD-\uFFFF",zf=new RegExp("^[^"+Df+"]*["+Of+"]");function Nl(e){return zf.test(e)?"rtl":"not-rtl"}let yi;function Bl(){if(typeof document>"u")return 0;if(yi!==void 0)return yi;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 o=e.offsetWidth;return n===o&&(o=t.clientWidth),t.remove(),yi=n-o,yi}const Ho=Symbol();function Lf(e){const t=p.useRef([Ho,e]);t.current[1]!==e&&(t.current[0]=e),t.current[1]=e;const[n,o]=p.useState(e),[,r]=p.useState(),i=p.useCallback(s=>{const a=t.current[0];a!==Ho&&(s=typeof s=="function"?s(a):s,s===a)||(a!==Ho&&r({}),o(c=>typeof s=="function"?s(a===Ho?c:a):s),t.current[0]=Ho)},[]),l=p.useCallback(()=>{t.current[0]=Ho,r({})},[]);return[t.current[0]===Ho?n:t.current[0],i,l]}function hc(e){if(e.length===0)return"";let t=0,n=0;for(const o of e){if(n+=o.length,n>1e4)break;t++}return e.slice(0,t).join(", ")}function Pf(e){const t=p.useRef(e);return er(e,t.current)||(t.current=e),t.current}const Af=e=>{const{urls:t,canWrite:n,onEditClick:o,renderImage:r}=e,i=t.filter(s=>s!=="");if(i.length===0)return null;const l=i.length>1;return p.createElement(gf,{"data-testid":"GDG-default-image-overlay-editor"},p.createElement(Sf.Carousel,{showArrows:l,showThumbs:!1,swipeable:l,emulateTouch:l,infiniteLoop:l},i.map(s=>{const a=(r==null?void 0:r(s))??p.createElement("img",{draggable:!1,src:s});return p.createElement("div",{className:"gdg-centering-container",key:s},a)})),n&&o&&p.createElement("button",{className:"gdg-edit-icon",onClick:o},p.createElement(_l,null)))};function fc(){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 Fo=fc();function Hf(e){Fo=e}const pc=/[&<>"']/,Ff=new RegExp(pc.source,"g"),gc=/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,_f=new RegExp(gc.source,"g"),Nf={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},mc=e=>Nf[e];function bn(e,t){if(t){if(pc.test(e))return e.replace(Ff,mc)}else if(gc.test(e))return e.replace(_f,mc);return e}const Bf=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig;function vc(e){return e.replace(Bf,(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 Vf=/(^|[^\[])\^/g;function Nt(e,t){e=typeof e=="string"?e:e.source,t=t||"";const n={replace:(o,r)=>(r=r.source||r,r=r.replace(Vf,"$1"),e=e.replace(o,r),n),getRegex:()=>new RegExp(e,t)};return n}const $f=/[^\w:]/g,Wf=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;function bc(e,t,n){if(e){let o;try{o=decodeURIComponent(vc(n)).replace($f,"").toLowerCase()}catch{return null}if(o.indexOf("javascript:")===0||o.indexOf("vbscript:")===0||o.indexOf("data:")===0)return null}t&&!Wf.test(n)&&(n=Gf(t,n));try{n=encodeURI(n).replace(/%25/g,"%")}catch{return null}return n}const xi={},jf=/^[^:]+:\/*[^/]*$/,Uf=/^([^:]+:)[\s\S]*$/,Yf=/^([^:]+:\/*[^/]*)[\s\S]*$/;function Gf(e,t){xi[" "+e]||(jf.test(e)?xi[" "+e]=e+"/":xi[" "+e]=ki(e,"/",!0)),e=xi[" "+e];const n=e.indexOf(":")===-1;return t.substring(0,2)==="//"?n?t:e.replace(Uf,"$1")+t:t.charAt(0)==="/"?n?t:e.replace(Yf,"$1")+t:e+t}const Ci={exec:function(){}};function wc(e,t){const n=e.replace(/\|/g,(i,l,s)=>{let a=!1,c=l;for(;--c>=0&&s[c]==="\\";)a=!a;return a?"|":" |"}),o=n.split(/ \|/);let r=0;if(o[0].trim()||o.shift(),o.length>0&&!o[o.length-1].trim()&&o.pop(),o.length>t)o.splice(t);else for(;o.length<t;)o.push("");for(;r<o.length;r++)o[r]=o[r].trim().replace(/\\\|/g,"|");return o}function ki(e,t,n){const o=e.length;if(o===0)return"";let r=0;for(;r<o;){const i=e.charAt(o-r-1);if(i===t&&!n)r++;else if(i!==t&&n)r++;else break}return e.slice(0,o-r)}function Kf(e,t){if(e.indexOf(t[1])===-1)return-1;const n=e.length;let o=0,r=0;for(;r<n;r++)if(e[r]==="\\")r++;else if(e[r]===t[0])o++;else if(e[r]===t[1]&&(o--,o<0))return r;return-1}function Xf(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 yc(e,t){if(t<1)return"";let n="";for(;t>1;)t&1&&(n+=e),t>>=1,e+=e;return n+e}function xc(e,t,n,o){const r=t.href,i=t.title?bn(t.title):null,l=e[1].replace(/\\([\[\]])/g,"$1");if(e[0].charAt(0)!=="!"){o.state.inLink=!0;const s={type:"link",raw:n,href:r,title:i,text:l,tokens:o.inlineTokens(l)};return o.state.inLink=!1,s}return{type:"image",raw:n,href:r,title:i,text:bn(l)}}function qf(e,t){const n=e.match(/^(\s+)(?:```)/);if(n===null)return t;const o=n[1];return t.split(`
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/data-grid-overlay-editor-BDv7jlce.js","assets/index-OxGwEg3m.js","assets/index.5L7agjmb.css","assets/FormClearHelper-DxeY-rII.js","assets/withFullScreenWrapper-CEJUxUJC.js","assets/Toolbar-CJ0mD5An.js","assets/checkbox-Dj0lswiB.js","assets/mergeWith-D2cULMN8.js","assets/sprintf-D7DtBTRn.js","assets/createDownloadLinkElement-DZMwyjvU.js","assets/slicedToArray-HZKHLTaA.js","assets/inherits-BbfuKc-R.js","assets/createSuper-Ipqc67nc.js","assets/FileDownload.esm-Bzb3HjS9.js","assets/number-overlay-editor-cmVGLaYJ.js","assets/es6-BZHzmZtr.js"])))=>i.map(i=>d[i]);
2
+ import{r as p,E as ps,_ as Xe,d as Ay,g as mo,R as ne,i as gs,e as fi,f as Hy,h as Fy,m as _y,n as Ph,o as Ah,p as Ny,q as Hh,s as By,t as Vy,v as $y,w as Wy,x as jy,y as Uy,a as ao,z as ms,c as kr,A as Zo,j as Oe,B as xl,C as Cl,T as Fh,D as kl,F as vo,G as $n,H as _h,I as Sl,J as Yy,K as Gy,L as $e,M as Nh,N as gt,O as pi,Q as Jo,S as vs,U as Ky,V as Xy,W as qy,X as Bh,Y as Zy,Z as Vh,$ as Jy,a0 as Qy,a1 as bs,a2 as $h,a3 as Wh,a4 as ex,a5 as tx,a6 as nx,a7 as ox,a8 as rx,a9 as ix,aa as lx,ab as ax,ac as sx,ad as jh,ae as cx,af as ux,ag as dx,ah as hx,ai as fx,aj as px,ak as gx,al as mx,am as vx,an as bx,ao as wx,ap as yx,aq as xx,ar as En,l as ws,as as gi,at as bo,au as Cx,av as kx,aw as Sx,ax as Mx,ay as Rx,az as Ex,aA as Ml,aB as mi,aC as $t,aD as Ix,aE as Tx,aF as Ox,aG as Dx,aH as Qo,aI as Rt,aJ as xn,aK as Uh,aL as Yh,aM as Rl,aN as zx,aO as Gh,aP as Kh,aQ as Lx,aR as ys,aS as Px,aT as Ax,aU as Xh,aV as Hx,aW as qh,aX as Fx,aY as Zh,aZ as _x,a_ as Nx,a$ as Bx,b as Jh,b0 as xs,b1 as Vx,b2 as $x,b3 as Cs,b4 as Wx,b5 as jx,b6 as Ux,b7 as Yx,__tla as Gx}from"./index-OxGwEg3m.js";import{u as Kx}from"./FormClearHelper-DxeY-rII.js";import{w as Xx,u as qx,E as Zx}from"./withFullScreenWrapper-CEJUxUJC.js";import{T as Jx,a as Sr}from"./Toolbar-CJ0mD5An.js";import{S as Qx,L as eC,a as tC}from"./checkbox-Dj0lswiB.js";import{m as nC}from"./mergeWith-D2cULMN8.js";import{s as oC}from"./sprintf-D7DtBTRn.js";import{c as rC}from"./createDownloadLinkElement-DZMwyjvU.js";import{_ as wo,C as iC}from"./slicedToArray-HZKHLTaA.js";import{_ as lC,a as aC,b as sC}from"./inherits-BbfuKc-R.js";import{_ as cC}from"./createSuper-Ipqc67nc.js";import{D as uC,F as dC}from"./FileDownload.esm-Bzb3HjS9.js";let ks,El,Lo,Ss,Qh,Po,Ms,sn,hC=Promise.all([(()=>{try{return Gx}catch{}})()]).then(async()=>{var ef=Object.defineProperty,tf=(e,t,n)=>t in e?ef(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,dt=(e,t,n)=>tf(e,typeof t!="symbol"?t+"":t,n),Rs=p.forwardRef(function(e,t){var n={fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"};return p.createElement(ps,Xe({iconAttrs:n,iconVerticalAlign:"middle",iconViewBox:"0 0 24 24"},e,{ref:t}),p.createElement("path",{fill:"none",d:"M0 0h24v24H0V0z"}),p.createElement("path",{d:"M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z"}))});Rs.displayName="Add";var Es=p.forwardRef(function(e,t){var n={fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"};return p.createElement(ps,Xe({iconAttrs:n,iconVerticalAlign:"middle",iconViewBox:"0 0 24 24"},e,{ref:t}),p.createElement("path",{fill:"none",d:"M0 0h24v24H0V0z"}),p.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"}))});Es.displayName="Search";var Is=p.forwardRef(function(e,t){var n={fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"};return p.createElement(ps,Xe({iconAttrs:n,iconVerticalAlign:"middle",iconViewBox:"0 0 24 24"},e,{ref:t}),p.createElement("path",{fill:"none",d:"M0 0h24v24H0V0z"}),p.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"}))});Is.displayName="Visibility";function Ts(e="This should not happen"){throw new Error(e)}function zn(e,t="Assertion failed"){if(!e)return Ts(t)}function Mr(e,t){return Ts(t??"Hell froze over")}function nf(e,t){try{return e()}catch{return t}}const Os=Object.prototype.hasOwnProperty;function er(e,t){let n,o;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((o=e.length)===t.length)for(;o--&&er(e[o],t[o]););return o===-1}if(!n||typeof e=="object"){o=0;for(n in e)if(Os.call(e,n)&&++o&&!Os.call(t,n)||!(n in t)||!er(e[n],t[n]))return!1;return Object.keys(t).length===o}}return e!==e&&t!==t}var Tl,Ds;function of(){if(Ds)return Tl;Ds=1;var e=Object.prototype,t=e.hasOwnProperty;function n(o,r){return o!=null&&t.call(o,r)}return Tl=n,Tl}var Ol,zs;function rf(){if(zs)return Ol;zs=1;var e=of(),t=Ay();function n(o,r){return o!=null&&t(o,r,e)}return Ol=n,Ol}var lf=rf();const af=mo(lf),vi=null,Dl=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 Ls;(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"})(Ls||(Ls={}));var bi;(function(e){e.Triangle="triangle",e.Dots="dots"})(bi||(bi={}));function wi(e){return"width"in e&&typeof e.width=="number"}async function Ps(e){return typeof e=="object"?e:await e()}Po=function(e){return!(e.kind===Z.Loading||e.kind===Z.Bubble||e.kind===Z.RowID||e.kind===Z.Protected||e.kind===Z.Drilldown)},Lo=function(e){return e.kind===Fn.Marker||e.kind===Fn.NewRow};function Rr(e){if(!Po(e)||e.kind===Z.Image)return!1;if(e.kind===Z.Text||e.kind===Z.Number||e.kind===Z.Markdown||e.kind===Z.Uri||e.kind===Z.Custom||e.kind===Z.Boolean)return e.readonly!==!0;Mr(e,"A cell was passed with an invalid kind")}Ss=function(e){return af(e,"editor")};function zl(e){return!(e.readonly??!1)}var Fn;(function(e){e.NewRow="new-row",e.Marker="marker"})(Fn||(Fn={}));function sf(e){if(e.length===0)return[];const t=[...e],n=[];t.sort(function(o,r){return o[0]-r[0]}),n.push([...t[0]]);for(const o of t.slice(1)){const r=n[n.length-1];r[1]<o[0]?n.push([...o]):r[1]<o[1]&&(r[1]=o[1])}return n}let As;const Er=class Il{constructor(t){dt(this,"items"),this.items=t}offset(t){if(t===0)return this;const n=this.items.map(o=>[o[0]+t,o[1]+t]);return new Il(n)}add(t){const n=typeof t=="number"?[t,t+1]:t,o=sf([...this.items,n]);return new Il(o)}remove(t){const n=[...this.items],o=typeof t=="number"?t:t[0],r=typeof t=="number"?t+1:t[1];for(const[i,l]of n.entries()){const[s,a]=l;if(s<=r&&o<=a){const c=[];s<o&&c.push([s,o]),r<a&&c.push([r,a]),n.splice(i,1,...c)}}return new Il(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[o,r]=this.items[n];if(t>=o&&t<r)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 o=t.items[n],r=this.items[n];if(o[0]!==r[0]||o[1]!==r[1])return!1}return!0}toArray(){const t=[];for(const[n,o]of this.items)for(let r=n;r<o;r++)t.push(r);return t}get length(){let t=0;for(const[n,o]of this.items)t+=o-n;return t}*[Symbol.iterator](){for(const[t,n]of this.items)for(let o=t;o<n;o++)yield o}};dt(Er,"empty",()=>As??(As=new Er([]))),dt(Er,"fromSingleSelection",e=>Er.empty().add(e));let mt=Er;var cf=function(){const e=Array.prototype.slice.call(arguments).filter(Boolean),t={},n=[];e.forEach(r=>{(r?r.split(" "):[]).forEach(i=>{if(i.startsWith("atm_")){const[,l]=i.split("_");t[l]=i}else n.push(i)})});const o=[];for(const r in t)Object.prototype.hasOwnProperty.call(t,r)&&o.push(t[r]);return o.push(...n),o.join(" ")},Hs=cf,uf=e=>e.toUpperCase()===e,df=e=>t=>e.indexOf(t)===-1,Fs=(e,t)=>{const n={};return Object.keys(e).filter(df(t)).forEach(o=>{n[o]=e[o]}),n};function hf(e,t,n){const o=Fs(t,n);if(!e){const r=typeof gs=="function"?{default:gs}:gs;Object.keys(o).forEach(i=>{r.default(i)||delete o[i]})}return o}var ff=(e,t)=>{};function pf(e){let t="";return n=>{const o=(i,l)=>{const{as:s=e,class:a=t}=i,c=n.propsAsIs===void 0?!(typeof s=="string"&&s.indexOf("-")===-1&&!uf(s[0])):n.propsAsIs,u=hf(c,i,["as","class"]);u.ref=l,u.className=n.atomic?Hs(n.class,u.className||a):Hs(u.className||a,n.class);const{vars:d}=n;if(d){const f={};for(const m in d){const b=d[m],y=b[0],v=b[1]||"",I=typeof y=="function"?y(i):y;ff(I,n.name),f[`--${m}`]=`${I}${v}`}const h=u.style||{},g=Object.keys(h);g.length>0&&g.forEach(m=>{f[m]=h[m]}),u.style=f}return e.__linaria&&e!==s?(u.as=s,ne.createElement(e,u)):ne.createElement(s,u)},r=ne.forwardRef?ne.forwardRef(o):i=>{const l=Fs(i,["innerRef"]);return o(l,i.innerRef)};return r.displayName=n.name,r.__linaria={className:n.class||t,extends:e},r}}sn=pf;const gf=sn("div")({name:"ImageOverlayEditorStyle",class:"gdg-i2iowwq",propsAsIs:!1});var _s={},Ir={},Ll={},Pl={},Ns;function mf(){return Ns||(Ns=1,function(e){(function(t,n){n(e,fi(),Hy())})(Pl,function(t,n,o){Object.defineProperty(t,"__esModule",{value:!0}),t.setHasSupportToCaptureOption=g;var r=l(n),i=l(o);function l(v){return v&&v.__esModule?v:{default:v}}var s=Object.assign||function(v){for(var I=1;I<arguments.length;I++){var T=arguments[I];for(var k in T)Object.prototype.hasOwnProperty.call(T,k)&&(v[k]=T[k])}return v};function a(v,I){var T={};for(var k in v)I.indexOf(k)>=0||Object.prototype.hasOwnProperty.call(v,k)&&(T[k]=v[k]);return T}function c(v,I){if(!(v instanceof I))throw new TypeError("Cannot call a class as a function")}var u=function(){function v(I,T){for(var k=0;k<T.length;k++){var x=T[k];x.enumerable=x.enumerable||!1,x.configurable=!0,"value"in x&&(x.writable=!0),Object.defineProperty(I,x.key,x)}}return function(I,T,k){return T&&v(I.prototype,T),k&&v(I,k),I}}();function d(v,I){if(!v)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return I&&(typeof I=="object"||typeof I=="function")?I:v}function f(v,I){if(typeof I!="function"&&I!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof I);v.prototype=Object.create(I&&I.prototype,{constructor:{value:v,enumerable:!1,writable:!0,configurable:!0}}),I&&(Object.setPrototypeOf?Object.setPrototypeOf(v,I):v.__proto__=I)}var h=!1;function g(v){h=v}try{addEventListener("test",null,Object.defineProperty({},"capture",{get:function(){g(!0)}}))}catch{}function m(){var v=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{capture:!0};return h?v:v.capture}function b(v){if("touches"in v){var I=v.touches[0],T=I.pageX,k=I.pageY;return{x:T,y:k}}var x=v.screenX,L=v.screenY;return{x,y:L}}var y=function(v){f(I,v);function I(){var T;c(this,I);for(var k=arguments.length,x=Array(k),L=0;L<k;L++)x[L]=arguments[L];var O=d(this,(T=I.__proto__||Object.getPrototypeOf(I)).call.apply(T,[this].concat(x)));return O._handleSwipeStart=O._handleSwipeStart.bind(O),O._handleSwipeMove=O._handleSwipeMove.bind(O),O._handleSwipeEnd=O._handleSwipeEnd.bind(O),O._onMouseDown=O._onMouseDown.bind(O),O._onMouseMove=O._onMouseMove.bind(O),O._onMouseUp=O._onMouseUp.bind(O),O._setSwiperRef=O._setSwiperRef.bind(O),O}return u(I,[{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(T){this.props.allowMouseEvents&&(this.mouseDown=!0,document.addEventListener("mouseup",this._onMouseUp),document.addEventListener("mousemove",this._onMouseMove),this._handleSwipeStart(T))}},{key:"_onMouseMove",value:function(T){this.mouseDown&&this._handleSwipeMove(T)}},{key:"_onMouseUp",value:function(T){this.mouseDown=!1,document.removeEventListener("mouseup",this._onMouseUp),document.removeEventListener("mousemove",this._onMouseMove),this._handleSwipeEnd(T)}},{key:"_handleSwipeStart",value:function(T){var k=b(T),x=k.x,L=k.y;this.moveStart={x,y:L},this.props.onSwipeStart(T)}},{key:"_handleSwipeMove",value:function(T){if(this.moveStart){var k=b(T),x=k.x,L=k.y,O=x-this.moveStart.x,R=L-this.moveStart.y;this.moving=!0;var P=this.props.onSwipeMove({x:O,y:R},T);P&&T.cancelable&&T.preventDefault(),this.movePosition={deltaX:O,deltaY:R}}}},{key:"_handleSwipeEnd",value:function(T){this.props.onSwipeEnd(T);var k=this.props.tolerance;this.moving&&this.movePosition&&(this.movePosition.deltaX<-k?this.props.onSwipeLeft(1,T):this.movePosition.deltaX>k&&this.props.onSwipeRight(1,T),this.movePosition.deltaY<-k?this.props.onSwipeUp(1,T):this.movePosition.deltaY>k&&this.props.onSwipeDown(1,T)),this.moveStart=null,this.moving=!1,this.movePosition=null}},{key:"_setSwiperRef",value:function(T){this.swiper=T,this.props.innerRef(T)}},{key:"render",value:function(){var T=this.props;T.tagName;var k=T.className,x=T.style,L=T.children;T.allowMouseEvents,T.onSwipeUp,T.onSwipeDown,T.onSwipeLeft,T.onSwipeRight,T.onSwipeStart,T.onSwipeMove,T.onSwipeEnd,T.innerRef,T.tolerance;var O=a(T,["tagName","className","style","children","allowMouseEvents","onSwipeUp","onSwipeDown","onSwipeLeft","onSwipeRight","onSwipeStart","onSwipeMove","onSwipeEnd","innerRef","tolerance"]);return r.default.createElement(this.props.tagName,s({ref:this._setSwiperRef,onMouseDown:this._onMouseDown,onTouchStart:this._handleSwipeStart,onTouchEnd:this._handleSwipeEnd,className:k,style:x},O),L)}}]),I}(n.Component);y.displayName="ReactSwipe",y.propTypes={tagName:i.default.string,className:i.default.string,style:i.default.object,children:i.default.node,allowMouseEvents:i.default.bool,onSwipeUp:i.default.func,onSwipeDown:i.default.func,onSwipeLeft:i.default.func,onSwipeRight:i.default.func,onSwipeStart:i.default.func,onSwipeMove:i.default.func,onSwipeEnd:i.default.func,innerRef:i.default.func,tolerance:i.default.number.isRequired},y.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=y})}(Pl)),Pl}var Bs;function Vs(){return Bs||(Bs=1,function(e){(function(t,n){n(e,mf())})(Ll,function(t,n){Object.defineProperty(t,"__esModule",{value:!0});var o=r(n);function r(i){return i&&i.__esModule?i:{default:i}}t.default=o.default})}(Ll)),Ll}var Tr={},$s;function Ws(){if($s)return Tr;$s=1,Object.defineProperty(Tr,"__esModule",{value:!0}),Tr.default=void 0;var e=t(Fy());function t(r){return r&&r.__esModule?r:{default:r}}function n(r,i,l){return i in r?Object.defineProperty(r,i,{value:l,enumerable:!0,configurable:!0,writable:!0}):r[i]=l,r}var o={ROOT:function(r){return(0,e.default)(n({"carousel-root":!0},r||"",!!r))},CAROUSEL:function(r){return(0,e.default)({carousel:!0,"carousel-slider":r})},WRAPPER:function(r,i){return(0,e.default)({"thumbs-wrapper":!r,"slider-wrapper":r,"axis-horizontal":i==="horizontal","axis-vertical":i!=="horizontal"})},SLIDER:function(r,i){return(0,e.default)({thumbs:!r,slider:r,animated:!i})},ITEM:function(r,i,l){return(0,e.default)({thumb:!r,slide:r,selected:i,previous:l})},ARROW_PREV:function(r){return(0,e.default)({"control-arrow control-prev":!0,"control-disabled":r})},ARROW_NEXT:function(r){return(0,e.default)({"control-arrow control-next":!0,"control-disabled":r})},DOT:function(r){return(0,e.default)({dot:!0,selected:r})}};return Tr.default=o,Tr}var Or={},Dr={},js;function vf(){if(js)return Dr;js=1,Object.defineProperty(Dr,"__esModule",{value:!0}),Dr.outerWidth=void 0;var e=function(t){var n=t.offsetWidth,o=getComputedStyle(t);return n+=parseInt(o.marginLeft)+parseInt(o.marginRight),n};return Dr.outerWidth=e,Dr}var zr={},Us;function Al(){if(Us)return zr;Us=1,Object.defineProperty(zr,"__esModule",{value:!0}),zr.default=void 0;var e=function(t,n,o){var r=t===0?t:t+n,i=o==="horizontal"?[r,0,0]:[0,r,0],l="translate3d",s="("+i.join(",")+")";return l+s};return zr.default=e,zr}var Lr={},Ys;function Gs(){if(Ys)return Lr;Ys=1,Object.defineProperty(Lr,"__esModule",{value:!0}),Lr.default=void 0;var e=function(){return window};return Lr.default=e,Lr}var Ks;function Xs(){if(Ks)return Or;Ks=1,Object.defineProperty(Or,"__esModule",{value:!0}),Or.default=void 0;var e=a(fi()),t=l(Ws()),n=vf(),o=l(Al()),r=l(Vs()),i=l(Gs());function l(O){return O&&O.__esModule?O:{default:O}}function s(){if(typeof WeakMap!="function")return null;var O=new WeakMap;return s=function(){return O},O}function a(O){if(O&&O.__esModule)return O;if(O===null||c(O)!=="object"&&typeof O!="function")return{default:O};var R=s();if(R&&R.has(O))return R.get(O);var P={},M=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var S in O)if(Object.prototype.hasOwnProperty.call(O,S)){var E=M?Object.getOwnPropertyDescriptor(O,S):null;E&&(E.get||E.set)?Object.defineProperty(P,S,E):P[S]=O[S]}return P.default=O,R&&R.set(O,P),P}function c(O){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?c=function(R){return typeof R}:c=function(R){return R&&typeof Symbol=="function"&&R.constructor===Symbol&&R!==Symbol.prototype?"symbol":typeof R},c(O)}function u(){return u=Object.assign||function(O){for(var R=1;R<arguments.length;R++){var P=arguments[R];for(var M in P)Object.prototype.hasOwnProperty.call(P,M)&&(O[M]=P[M])}return O},u.apply(this,arguments)}function d(O,R){if(!(O instanceof R))throw new TypeError("Cannot call a class as a function")}function f(O,R){for(var P=0;P<R.length;P++){var M=R[P];M.enumerable=M.enumerable||!1,M.configurable=!0,"value"in M&&(M.writable=!0),Object.defineProperty(O,M.key,M)}}function h(O,R,P){return R&&f(O.prototype,R),O}function g(O,R){if(typeof R!="function"&&R!==null)throw new TypeError("Super expression must either be null or a function");O.prototype=Object.create(R&&R.prototype,{constructor:{value:O,writable:!0,configurable:!0}}),R&&m(O,R)}function m(O,R){return m=Object.setPrototypeOf||function(P,M){return P.__proto__=M,P},m(O,R)}function b(O){var R=I();return function(){var P=T(O),M;if(R){var S=T(this).constructor;M=Reflect.construct(P,arguments,S)}else M=P.apply(this,arguments);return y(this,M)}}function y(O,R){return R&&(c(R)==="object"||typeof R=="function")?R:v(O)}function v(O){if(O===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return O}function I(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}function T(O){return T=Object.setPrototypeOf?Object.getPrototypeOf:function(R){return R.__proto__||Object.getPrototypeOf(R)},T(O)}function k(O,R,P){return R in O?Object.defineProperty(O,R,{value:P,enumerable:!0,configurable:!0,writable:!0}):O[R]=P,O}var x=function(O){return O.hasOwnProperty("key")},L=function(O){g(P,O);var R=b(P);function P(M){var S;return d(this,P),S=R.call(this,M),k(v(S),"itemsWrapperRef",void 0),k(v(S),"itemsListRef",void 0),k(v(S),"thumbsRef",void 0),k(v(S),"setItemsWrapperRef",function(E){S.itemsWrapperRef=E}),k(v(S),"setItemsListRef",function(E){S.itemsListRef=E}),k(v(S),"setThumbsRef",function(E,D){S.thumbsRef||(S.thumbsRef=[]),S.thumbsRef[D]=E}),k(v(S),"updateSizes",function(){if(!(!S.props.children||!S.itemsWrapperRef||!S.thumbsRef)){var E=e.Children.count(S.props.children),D=S.itemsWrapperRef.clientWidth,C=S.props.thumbWidth?S.props.thumbWidth:(0,n.outerWidth)(S.thumbsRef[0]),G=Math.floor(D/C),B=G<E,J=B?E-G:0;S.setState(function(se,re){return{itemSize:C,visibleItems:G,firstItem:B?S.getFirstItem(re.selectedItem):0,lastPosition:J,showArrows:B}})}}),k(v(S),"handleClickItem",function(E,D,C){if(!x(C)||C.key==="Enter"){var G=S.props.onSelectItem;typeof G=="function"&&G(E,D)}}),k(v(S),"onSwipeStart",function(){S.setState({swiping:!0})}),k(v(S),"onSwipeEnd",function(){S.setState({swiping:!1})}),k(v(S),"onSwipeMove",function(E){var D=E.x;if(!S.state.itemSize||!S.itemsWrapperRef||!S.state.visibleItems)return!1;var C=0,G=e.Children.count(S.props.children),B=-(S.state.firstItem*100)/S.state.visibleItems,J=Math.max(G-S.state.visibleItems,0),se=-J*100/S.state.visibleItems;B===C&&D>0&&(D=0),B===se&&D<0&&(D=0);var re=S.itemsWrapperRef.clientWidth,U=B+100/(re/D);return S.itemsListRef&&["WebkitTransform","MozTransform","MsTransform","OTransform","transform","msTransform"].forEach(function(ie){S.itemsListRef.style[ie]=(0,o.default)(U,"%",S.props.axis)}),!0}),k(v(S),"slideRight",function(E){S.moveTo(S.state.firstItem-(typeof E=="number"?E:1))}),k(v(S),"slideLeft",function(E){S.moveTo(S.state.firstItem+(typeof E=="number"?E:1))}),k(v(S),"moveTo",function(E){E=E<0?0:E,E=E>=S.state.lastPosition?S.state.lastPosition:E,S.setState({firstItem:E})}),S.state={selectedItem:M.selectedItem,swiping:!1,showArrows:!1,firstItem:0,visibleItems:0,lastPosition:0},S}return h(P,[{key:"componentDidMount",value:function(){this.setupThumbs()}},{key:"componentDidUpdate",value:function(M){this.props.selectedItem!==this.state.selectedItem&&this.setState({selectedItem:this.props.selectedItem,firstItem:this.getFirstItem(this.props.selectedItem)}),this.props.children!==M.children&&this.updateSizes()}},{key:"componentWillUnmount",value:function(){this.destroyThumbs()}},{key:"setupThumbs",value:function(){(0,i.default)().addEventListener("resize",this.updateSizes),(0,i.default)().addEventListener("DOMContentLoaded",this.updateSizes),this.updateSizes()}},{key:"destroyThumbs",value:function(){(0,i.default)().removeEventListener("resize",this.updateSizes),(0,i.default)().removeEventListener("DOMContentLoaded",this.updateSizes)}},{key:"getFirstItem",value:function(M){var S=M;return M>=this.state.lastPosition&&(S=this.state.lastPosition),M<this.state.firstItem+this.state.visibleItems&&(S=this.state.firstItem),M<this.state.firstItem&&(S=M),S}},{key:"renderItems",value:function(){var M=this;return this.props.children.map(function(S,E){var D=t.default.ITEM(!1,E===M.state.selectedItem),C={key:E,ref:function(G){return M.setThumbsRef(G,E)},className:D,onClick:M.handleClickItem.bind(M,E,M.props.children[E]),onKeyDown:M.handleClickItem.bind(M,E,M.props.children[E]),"aria-label":"".concat(M.props.labels.item," ").concat(E+1),style:{width:M.props.thumbWidth}};return e.default.createElement("li",u({},C,{role:"button",tabIndex:0}),S)})}},{key:"render",value:function(){var M=this;if(!this.props.children)return null;var S=e.Children.count(this.props.children)>1,E=this.state.showArrows&&this.state.firstItem>0,D=this.state.showArrows&&this.state.firstItem<this.state.lastPosition,C={},G=-this.state.firstItem*(this.state.itemSize||0),B=(0,o.default)(G,"px",this.props.axis),J=this.props.transitionTime+"ms";return C={WebkitTransform:B,MozTransform:B,MsTransform:B,OTransform:B,transform:B,msTransform:B,WebkitTransitionDuration:J,MozTransitionDuration:J,MsTransitionDuration:J,OTransitionDuration:J,transitionDuration:J,msTransitionDuration:J},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(!E),onClick:function(){return M.slideRight()},"aria-label":this.props.labels.leftArrow}),S?e.default.createElement(r.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:C,innerRef:this.setItemsListRef,allowMouseEvents:this.props.emulateTouch},this.renderItems()):e.default.createElement("ul",{className:t.default.SLIDER(!1,this.state.swiping),ref:function(se){return M.setItemsListRef(se)},style:C},this.renderItems()),e.default.createElement("button",{type:"button",className:t.default.ARROW_NEXT(!D),onClick:function(){return M.slideLeft()},"aria-label":this.props.labels.rightArrow})))}}]),P}(e.Component);return Or.default=L,k(L,"displayName","Thumbs"),k(L,"defaultProps",{axis:"horizontal",labels:{leftArrow:"previous slide / item",rightArrow:"next slide / item",item:"slide item"},selectedItem:0,thumbWidth:80,transitionTime:350}),Or}var Pr={},qs;function bf(){if(qs)return Pr;qs=1,Object.defineProperty(Pr,"__esModule",{value:!0}),Pr.default=void 0;var e=function(){return document};return Pr.default=e,Pr}var Ln={},Zs;function Js(){if(Zs)return Ln;Zs=1,Object.defineProperty(Ln,"__esModule",{value:!0}),Ln.setPosition=Ln.getPosition=Ln.isKeyboardEvent=Ln.defaultStatusFormatter=Ln.noop=void 0;var e=fi(),t=n(Al());function n(a){return a&&a.__esModule?a:{default:a}}var o=function(){};Ln.noop=o;var r=function(a,c){return"".concat(a," of ").concat(c)};Ln.defaultStatusFormatter=r;var i=function(a){return a?a.hasOwnProperty("key"):!1};Ln.isKeyboardEvent=i;var l=function(a,c){if(c.infiniteLoop&&++a,a===0)return 0;var u=e.Children.count(c.children);if(c.centerMode&&c.axis==="horizontal"){var d=-a*c.centerSlidePercentage,f=u-1;return a&&(a!==f||c.infiniteLoop)?d+=(100-c.centerSlidePercentage)/2:a===f&&(d+=100-c.centerSlidePercentage),d}return-a*100};Ln.getPosition=l;var s=function(a,c){var u={};return["WebkitTransform","MozTransform","MsTransform","OTransform","transform","msTransform"].forEach(function(d){u[d]=(0,t.default)(a,"%",c)}),u};return Ln.setPosition=s,Ln}var Wn={},Qs;function wf(){if(Qs)return Wn;Qs=1,Object.defineProperty(Wn,"__esModule",{value:!0}),Wn.fadeAnimationHandler=Wn.slideStopSwipingHandler=Wn.slideSwipeAnimationHandler=Wn.slideAnimationHandler=void 0;var e=fi(),t=o(Al()),n=Js();function o(d){return d&&d.__esModule?d:{default:d}}function r(d,f){var h=Object.keys(d);if(Object.getOwnPropertySymbols){var g=Object.getOwnPropertySymbols(d);f&&(g=g.filter(function(m){return Object.getOwnPropertyDescriptor(d,m).enumerable})),h.push.apply(h,g)}return h}function i(d){for(var f=1;f<arguments.length;f++){var h=arguments[f]!=null?arguments[f]:{};f%2?r(Object(h),!0).forEach(function(g){l(d,g,h[g])}):Object.getOwnPropertyDescriptors?Object.defineProperties(d,Object.getOwnPropertyDescriptors(h)):r(Object(h)).forEach(function(g){Object.defineProperty(d,g,Object.getOwnPropertyDescriptor(h,g))})}return d}function l(d,f,h){return f in d?Object.defineProperty(d,f,{value:h,enumerable:!0,configurable:!0,writable:!0}):d[f]=h,d}var s=function(d,f){var h={},g=f.selectedItem,m=g,b=e.Children.count(d.children)-1,y=d.infiniteLoop&&(g<0||g>b);if(y)return m<0?d.centerMode&&d.centerSlidePercentage&&d.axis==="horizontal"?h.itemListStyle=(0,n.setPosition)(-(b+2)*d.centerSlidePercentage-(100-d.centerSlidePercentage)/2,d.axis):h.itemListStyle=(0,n.setPosition)(-(b+2)*100,d.axis):m>b&&(h.itemListStyle=(0,n.setPosition)(0,d.axis)),h;var v=(0,n.getPosition)(g,d),I=(0,t.default)(v,"%",d.axis),T=d.transitionTime+"ms";return h.itemListStyle={WebkitTransform:I,msTransform:I,OTransform:I,transform:I},f.swiping||(h.itemListStyle=i(i({},h.itemListStyle),{},{WebkitTransitionDuration:T,MozTransitionDuration:T,OTransitionDuration:T,transitionDuration:T,msTransitionDuration:T})),h};Wn.slideAnimationHandler=s;var a=function(d,f,h,g){var m={},b=f.axis==="horizontal",y=e.Children.count(f.children),v=0,I=(0,n.getPosition)(h.selectedItem,f),T=f.infiniteLoop?(0,n.getPosition)(y-1,f)-100:(0,n.getPosition)(y-1,f),k=b?d.x:d.y,x=k;I===v&&k>0&&(x=0),I===T&&k<0&&(x=0);var L=I+100/(h.itemSize/x),O=Math.abs(k)>f.swipeScrollTolerance;return f.infiniteLoop&&O&&(h.selectedItem===0&&L>-100?L-=y*100:h.selectedItem===y-1&&L<-y*100&&(L+=y*100)),(!f.preventMovementUntilSwipeScrollTolerance||O||h.swipeMovementStarted)&&(h.swipeMovementStarted||g({swipeMovementStarted:!0}),m.itemListStyle=(0,n.setPosition)(L,f.axis)),O&&!h.cancelClick&&g({cancelClick:!0}),m};Wn.slideSwipeAnimationHandler=a;var c=function(d,f){var h=(0,n.getPosition)(f.selectedItem,d),g=(0,n.setPosition)(h,d.axis);return{itemListStyle:g}};Wn.slideStopSwipingHandler=c;var u=function(d,f){var h=d.transitionTime+"ms",g="ease-in-out",m={position:"absolute",display:"block",zIndex:-2,minHeight:"100%",opacity:0,top:0,right:0,left:0,bottom:0,transitionTimingFunction:g,msTransitionTimingFunction:g,MozTransitionTimingFunction:g,WebkitTransitionTimingFunction:g,OTransitionTimingFunction:g};return f.swiping||(m=i(i({},m),{},{WebkitTransitionDuration:h,MozTransitionDuration:h,OTransitionDuration:h,transitionDuration:h,msTransitionDuration:h})),{slideStyle:m,selectedStyle:i(i({},m),{},{opacity:1,position:"relative"}),prevStyle:i({},m)}};return Wn.fadeAnimationHandler=u,Wn}var ec;function yf(){if(ec)return Ir;ec=1,Object.defineProperty(Ir,"__esModule",{value:!0}),Ir.default=void 0;var e=u(fi()),t=a(Vs()),n=a(Ws()),o=a(Xs()),r=a(bf()),i=a(Gs()),l=Js(),s=wf();function a(M){return M&&M.__esModule?M:{default:M}}function c(){if(typeof WeakMap!="function")return null;var M=new WeakMap;return c=function(){return M},M}function u(M){if(M&&M.__esModule)return M;if(M===null||d(M)!=="object"&&typeof M!="function")return{default:M};var S=c();if(S&&S.has(M))return S.get(M);var E={},D=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var C in M)if(Object.prototype.hasOwnProperty.call(M,C)){var G=D?Object.getOwnPropertyDescriptor(M,C):null;G&&(G.get||G.set)?Object.defineProperty(E,C,G):E[C]=M[C]}return E.default=M,S&&S.set(M,E),E}function d(M){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?d=function(S){return typeof S}:d=function(S){return S&&typeof Symbol=="function"&&S.constructor===Symbol&&S!==Symbol.prototype?"symbol":typeof S},d(M)}function f(){return f=Object.assign||function(M){for(var S=1;S<arguments.length;S++){var E=arguments[S];for(var D in E)Object.prototype.hasOwnProperty.call(E,D)&&(M[D]=E[D])}return M},f.apply(this,arguments)}function h(M,S){var E=Object.keys(M);if(Object.getOwnPropertySymbols){var D=Object.getOwnPropertySymbols(M);S&&(D=D.filter(function(C){return Object.getOwnPropertyDescriptor(M,C).enumerable})),E.push.apply(E,D)}return E}function g(M){for(var S=1;S<arguments.length;S++){var E=arguments[S]!=null?arguments[S]:{};S%2?h(Object(E),!0).forEach(function(D){R(M,D,E[D])}):Object.getOwnPropertyDescriptors?Object.defineProperties(M,Object.getOwnPropertyDescriptors(E)):h(Object(E)).forEach(function(D){Object.defineProperty(M,D,Object.getOwnPropertyDescriptor(E,D))})}return M}function m(M,S){if(!(M instanceof S))throw new TypeError("Cannot call a class as a function")}function b(M,S){for(var E=0;E<S.length;E++){var D=S[E];D.enumerable=D.enumerable||!1,D.configurable=!0,"value"in D&&(D.writable=!0),Object.defineProperty(M,D.key,D)}}function y(M,S,E){return S&&b(M.prototype,S),M}function v(M,S){if(typeof S!="function"&&S!==null)throw new TypeError("Super expression must either be null or a function");M.prototype=Object.create(S&&S.prototype,{constructor:{value:M,writable:!0,configurable:!0}}),S&&I(M,S)}function I(M,S){return I=Object.setPrototypeOf||function(E,D){return E.__proto__=D,E},I(M,S)}function T(M){var S=L();return function(){var E=O(M),D;if(S){var C=O(this).constructor;D=Reflect.construct(E,arguments,C)}else D=E.apply(this,arguments);return k(this,D)}}function k(M,S){return S&&(d(S)==="object"||typeof S=="function")?S:x(M)}function x(M){if(M===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return M}function L(){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 O(M){return O=Object.setPrototypeOf?Object.getPrototypeOf:function(S){return S.__proto__||Object.getPrototypeOf(S)},O(M)}function R(M,S,E){return S in M?Object.defineProperty(M,S,{value:E,enumerable:!0,configurable:!0,writable:!0}):M[S]=E,M}var P=function(M){v(E,M);var S=T(E);function E(D){var C;m(this,E),C=S.call(this,D),R(x(C),"thumbsRef",void 0),R(x(C),"carouselWrapperRef",void 0),R(x(C),"listRef",void 0),R(x(C),"itemsRef",void 0),R(x(C),"timer",void 0),R(x(C),"animationHandler",void 0),R(x(C),"setThumbsRef",function(B){C.thumbsRef=B}),R(x(C),"setCarouselWrapperRef",function(B){C.carouselWrapperRef=B}),R(x(C),"setListRef",function(B){C.listRef=B}),R(x(C),"setItemsRef",function(B,J){C.itemsRef||(C.itemsRef=[]),C.itemsRef[J]=B}),R(x(C),"autoPlay",function(){e.Children.count(C.props.children)<=1||(C.clearAutoPlay(),C.props.autoPlay&&(C.timer=setTimeout(function(){C.increment()},C.props.interval)))}),R(x(C),"clearAutoPlay",function(){C.timer&&clearTimeout(C.timer)}),R(x(C),"resetAutoPlay",function(){C.clearAutoPlay(),C.autoPlay()}),R(x(C),"stopOnHover",function(){C.setState({isMouseEntered:!0},C.clearAutoPlay)}),R(x(C),"startOnLeave",function(){C.setState({isMouseEntered:!1},C.autoPlay)}),R(x(C),"isFocusWithinTheCarousel",function(){return C.carouselWrapperRef?!!((0,r.default)().activeElement===C.carouselWrapperRef||C.carouselWrapperRef.contains((0,r.default)().activeElement)):!1}),R(x(C),"navigateWithKeyboard",function(B){if(C.isFocusWithinTheCarousel()){var J=C.props.axis,se=J==="horizontal",re={ArrowUp:38,ArrowRight:39,ArrowDown:40,ArrowLeft:37},U=se?re.ArrowRight:re.ArrowDown,ie=se?re.ArrowLeft:re.ArrowUp;U===B.keyCode?C.increment():ie===B.keyCode&&C.decrement()}}),R(x(C),"updateSizes",function(){if(!(!C.state.initialized||!C.itemsRef||C.itemsRef.length===0)){var B=C.props.axis==="horizontal",J=C.itemsRef[0];if(J){var se=B?J.clientWidth:J.clientHeight;C.setState({itemSize:se}),C.thumbsRef&&C.thumbsRef.updateSizes()}}}),R(x(C),"setMountState",function(){C.setState({hasMount:!0}),C.updateSizes()}),R(x(C),"handleClickItem",function(B,J){if(e.Children.count(C.props.children)!==0){if(C.state.cancelClick){C.setState({cancelClick:!1});return}C.props.onClickItem(B,J),B!==C.state.selectedItem&&C.setState({selectedItem:B})}}),R(x(C),"handleOnChange",function(B,J){e.Children.count(C.props.children)<=1||C.props.onChange(B,J)}),R(x(C),"handleClickThumb",function(B,J){C.props.onClickThumb(B,J),C.moveTo(B)}),R(x(C),"onSwipeStart",function(B){C.setState({swiping:!0}),C.props.onSwipeStart(B)}),R(x(C),"onSwipeEnd",function(B){C.setState({swiping:!1,cancelClick:!1,swipeMovementStarted:!1}),C.props.onSwipeEnd(B),C.clearAutoPlay(),C.state.autoPlay&&C.autoPlay()}),R(x(C),"onSwipeMove",function(B,J){C.props.onSwipeMove(J);var se=C.props.swipeAnimationHandler(B,C.props,C.state,C.setState.bind(x(C)));return C.setState(g({},se)),!!Object.keys(se).length}),R(x(C),"decrement",function(){var B=arguments.length>0&&arguments[0]!==void 0?arguments[0]:1;C.moveTo(C.state.selectedItem-(typeof B=="number"?B:1))}),R(x(C),"increment",function(){var B=arguments.length>0&&arguments[0]!==void 0?arguments[0]:1;C.moveTo(C.state.selectedItem+(typeof B=="number"?B:1))}),R(x(C),"moveTo",function(B){if(typeof B=="number"){var J=e.Children.count(C.props.children)-1;B<0&&(B=C.props.infiniteLoop?J:0),B>J&&(B=C.props.infiniteLoop?0:J),C.selectItem({selectedItem:B}),C.state.autoPlay&&C.state.isMouseEntered===!1&&C.resetAutoPlay()}}),R(x(C),"onClickNext",function(){C.increment(1)}),R(x(C),"onClickPrev",function(){C.decrement(1)}),R(x(C),"onSwipeForward",function(){C.increment(1),C.props.emulateTouch&&C.setState({cancelClick:!0})}),R(x(C),"onSwipeBackwards",function(){C.decrement(1),C.props.emulateTouch&&C.setState({cancelClick:!0})}),R(x(C),"changeItem",function(B){return function(J){(!(0,l.isKeyboardEvent)(J)||J.key==="Enter")&&C.moveTo(B)}}),R(x(C),"selectItem",function(B){C.setState(g({previousItem:C.state.selectedItem},B),function(){C.setState(C.animationHandler(C.props,C.state))}),C.handleOnChange(B.selectedItem,e.Children.toArray(C.props.children)[B.selectedItem])}),R(x(C),"getInitialImage",function(){var B=C.props.selectedItem,J=C.itemsRef&&C.itemsRef[B],se=J&&J.getElementsByTagName("img")||[];return se[0]}),R(x(C),"getVariableItemHeight",function(B){var J=C.itemsRef&&C.itemsRef[B];if(C.state.hasMount&&J&&J.children.length){var se=J.children[0].getElementsByTagName("img")||[];if(se.length>0){var re=se[0];if(!re.complete){var U=function he(){C.forceUpdate(),re.removeEventListener("load",he)};re.addEventListener("load",U)}}var ie=se[0]||J.children[0],ce=ie.clientHeight;return ce>0?ce:null}return null});var G={initialized:!1,previousItem:D.selectedItem,selectedItem:D.selectedItem,hasMount:!1,isMouseEntered:!1,autoPlay:D.autoPlay,swiping:!1,swipeMovementStarted:!1,cancelClick:!1,itemSize:1,itemListStyle:{},slideStyle:{},selectedStyle:{},prevStyle:{}};return C.animationHandler=typeof D.animationHandler=="function"&&D.animationHandler||D.animationHandler==="fade"&&s.fadeAnimationHandler||s.slideAnimationHandler,C.state=g(g({},G),C.animationHandler(D,G)),C}return y(E,[{key:"componentDidMount",value:function(){this.props.children&&this.setupCarousel()}},{key:"componentDidUpdate",value:function(D,C){!D.children&&this.props.children&&!this.state.initialized&&this.setupCarousel(),!D.autoFocus&&this.props.autoFocus&&this.forceFocus(),C.swiping&&!this.state.swiping&&this.setState(g({},this.props.stopSwipingHandler(this.props,this.state))),(D.selectedItem!==this.props.selectedItem||D.centerMode!==this.props.centerMode)&&(this.updateSizes(),this.moveTo(this.props.selectedItem)),D.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 D=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 C=D.getInitialImage();C&&!C.complete?C.addEventListener("load",D.setMountState):D.setMountState()})}},{key:"destroyCarousel",value:function(){this.state.initialized&&(this.unbindEvents(),this.destroyAutoPlay())}},{key:"setupAutoPlay",value:function(){this.autoPlay();var D=this.carouselWrapperRef;this.props.stopOnHover&&D&&(D.addEventListener("mouseenter",this.stopOnHover),D.addEventListener("mouseleave",this.startOnLeave))}},{key:"destroyAutoPlay",value:function(){this.clearAutoPlay();var D=this.carouselWrapperRef;this.props.stopOnHover&&D&&(D.removeEventListener("mouseenter",this.stopOnHover),D.removeEventListener("mouseleave",this.startOnLeave))}},{key:"bindEvents",value:function(){(0,i.default)().addEventListener("resize",this.updateSizes),(0,i.default)().addEventListener("DOMContentLoaded",this.updateSizes),this.props.useKeyboardArrows&&(0,r.default)().addEventListener("keydown",this.navigateWithKeyboard)}},{key:"unbindEvents",value:function(){(0,i.default)().removeEventListener("resize",this.updateSizes),(0,i.default)().removeEventListener("DOMContentLoaded",this.updateSizes);var D=this.getInitialImage();D&&D.removeEventListener("load",this.setMountState),this.props.useKeyboardArrows&&(0,r.default)().removeEventListener("keydown",this.navigateWithKeyboard)}},{key:"forceFocus",value:function(){var D;(D=this.carouselWrapperRef)===null||D===void 0||D.focus()}},{key:"renderItems",value:function(D){var C=this;return this.props.children?e.Children.map(this.props.children,function(G,B){var J=B===C.state.selectedItem,se=B===C.state.previousItem,re=J&&C.state.selectedStyle||se&&C.state.prevStyle||C.state.slideStyle||{};C.props.centerMode&&C.props.axis==="horizontal"&&(re=g(g({},re),{},{minWidth:C.props.centerSlidePercentage+"%"})),C.state.swiping&&C.state.swipeMovementStarted&&(re=g(g({},re),{},{pointerEvents:"none"}));var U={ref:function(ie){return C.setItemsRef(ie,B)},key:"itemKey"+B+(D?"clone":""),className:n.default.ITEM(!0,B===C.state.selectedItem,B===C.state.previousItem),onClick:C.handleClickItem.bind(C,B,G),style:re};return e.default.createElement("li",U,C.props.renderItem(G,{isSelected:B===C.state.selectedItem,isPrevious:B===C.state.previousItem}))}):[]}},{key:"renderControls",value:function(){var D=this,C=this.props,G=C.showIndicators,B=C.labels,J=C.renderIndicator,se=C.children;return G?e.default.createElement("ul",{className:"control-dots"},e.Children.map(se,function(re,U){return J&&J(D.changeItem(U),U===D.state.selectedItem,U,B.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(o.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 D=this;if(!this.props.children||e.Children.count(this.props.children)===0)return null;var C=this.props.swipeable&&e.Children.count(this.props.children)>1,G=this.props.axis==="horizontal",B=this.props.showArrows&&e.Children.count(this.props.children)>1,J=B&&(this.state.selectedItem>0||this.props.infiniteLoop)||!1,se=B&&(this.state.selectedItem<e.Children.count(this.props.children)-1||this.props.infiniteLoop)||!1,re=this.renderItems(!0),U=re.shift(),ie=re.pop(),ce={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},he={};if(G){if(ce.onSwipeLeft=this.onSwipeForward,ce.onSwipeRight=this.onSwipeBackwards,this.props.dynamicHeight){var pe=this.getVariableItemHeight(this.state.selectedItem);he.height=pe||"auto"}}else ce.onSwipeUp=this.props.verticalSwipe==="natural"?this.onSwipeBackwards:this.onSwipeForward,ce.onSwipeDown=this.props.verticalSwipe==="natural"?this.onSwipeForward:this.onSwipeBackwards,ce.style=g(g({},ce.style),{},{height:this.state.itemSize}),he.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,J,this.props.labels.leftArrow),e.default.createElement("div",{className:n.default.WRAPPER(!0,this.props.axis),style:he},C?e.default.createElement(t.default,f({tagName:"ul",innerRef:this.setListRef},ce,{allowMouseEvents:this.props.emulateTouch}),this.props.infiniteLoop&&ie,this.renderItems(),this.props.infiniteLoop&&U):e.default.createElement("ul",{className:n.default.SLIDER(!0,this.state.swiping),ref:function(Q){return D.setListRef(Q)},style:this.state.itemListStyle||{}},this.props.infiniteLoop&&ie,this.renderItems(),this.props.infiniteLoop&&U)),this.props.renderArrowNext(this.onClickNext,se,this.props.labels.rightArrow),this.renderStatus()),this.renderThumbs())}}]),E}(e.default.Component);return Ir.default=P,R(P,"displayName","Carousel"),R(P,"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(M,S,E){return e.default.createElement("button",{type:"button","aria-label":E,className:n.default.ARROW_PREV(!S),onClick:M})},renderArrowNext:function(M,S,E){return e.default.createElement("button",{type:"button","aria-label":E,className:n.default.ARROW_NEXT(!S),onClick:M})},renderIndicator:function(M,S,E,D){return e.default.createElement("li",{className:n.default.DOT(S),onClick:M,onKeyDown:M,value:E,key:E,role:"button",tabIndex:0,"aria-label":"".concat(D," ").concat(E+1)})},renderItem:function(M){return M},renderThumbs:function(M){var S=e.Children.map(M,function(E){var D=E;if(E.type!=="img"&&(D=e.Children.toArray(E.props.children).find(function(C){return C.type==="img"})),!!D)return D});return S.filter(function(E){return E}).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"),[]):S},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:s.slideSwipeAnimationHandler,stopSwipingHandler:s.slideStopSwipingHandler}),Ir}var xf={},tc;function Cf(){return tc||(tc=1),xf}var nc;function kf(){return nc||(nc=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 o.default}});var t=r(yf()),n=Cf(),o=r(Xs());function r(i){return i&&i.__esModule?i:{default:i}}}(_s)),_s}var Sf=kf(),Hl,oc;function Mf(){if(oc)return Hl;oc=1;var e=_y(),t=function(){return e.Date.now()};return Hl=t,Hl}var Fl,rc;function ic(){if(rc)return Fl;rc=1;var e=Ph(),t=Mf(),n=Ah(),o="Expected a function",r=Math.max,i=Math.min;function l(s,a,c){var u,d,f,h,g,m,b=0,y=!1,v=!1,I=!0;if(typeof s!="function")throw new TypeError(o);a=n(a)||0,e(c)&&(y=!!c.leading,v="maxWait"in c,f=v?r(n(c.maxWait)||0,a):f,I="trailing"in c?!!c.trailing:I);function T(E){var D=u,C=d;return u=d=void 0,b=E,h=s.apply(C,D),h}function k(E){return b=E,g=setTimeout(O,a),y?T(E):h}function x(E){var D=E-m,C=E-b,G=a-D;return v?i(G,f-C):G}function L(E){var D=E-m,C=E-b;return m===void 0||D>=a||D<0||v&&C>=f}function O(){var E=t();if(L(E))return R(E);g=setTimeout(O,x(E))}function R(E){return g=void 0,I&&u?T(E):(u=d=void 0,h)}function P(){g!==void 0&&clearTimeout(g),b=0,u=m=d=g=void 0}function M(){return g===void 0?h:R(t())}function S(){var E=t(),D=L(E);if(u=arguments,d=this,m=E,D){if(g===void 0)return k(m);if(v)return clearTimeout(g),g=setTimeout(O,a),T(m)}return g===void 0&&(g=setTimeout(O,a)),h}return S.cancel=P,S.flush=M,S}return Fl=l,Fl}var Rf=ic();const lc=mo(Rf);function fn(e,t,n,o,r=!1){const i=p.useRef();i.current=t,p.useEffect(()=>{if(n===null||n.addEventListener===void 0)return;const l=n,s=a=>{var c;(c=i.current)==null||c.call(l,a)};return l.addEventListener(e,s,{passive:o,capture:r}),()=>{l.removeEventListener(e,s,{capture:r})}},[e,n,o,r])}function Ao(e,t){return e===void 0?void 0:t}const Ef=Math.PI;function ac(e){return e*Ef/180}const sc=(e,t,n)=>({x1:e-n/2,y1:t-n/2,x2:e+n/2,y2:t+n/2}),cc=(e,t,n,o,r)=>{switch(e){case"left":return Math.floor(t)+o+r/2;case"center":return Math.floor(t+n/2);case"right":return Math.floor(t+n)-o-r/2}},uc=(e,t,n)=>Math.min(e,t-n*2),dc=(e,t,n)=>n.x1<=e&&e<=n.x2&&n.y1<=t&&t<=n.y2,_l=e=>{const t=e.fgColor??"currentColor";return p.createElement("svg",{viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},p.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"}),p.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"}))},If=e=>{const t=e.fgColor??"currentColor";return p.createElement("svg",{viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},p.createElement("path",{d:"M19 6L10.3802 17L5.34071 11.8758",vectorEffect:"non-scaling-stroke",stroke:t,strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}))};function Tf(e,t,n){const[o,r]=p.useState(e),i=p.useRef(!0);p.useEffect(()=>()=>{i.current=!1},[]);const l=p.useRef(lc(s=>{i.current&&r(s)},n));return p.useLayoutEffect(()=>{i.current&&l.current(()=>e())},t),o}const Of="\u0591-\u07FF\uFB1D-\uFDFD\uFE70-\uFEFC",Df="A-Za-z\xC0-\xD6\xD8-\xF6\xF8-\u02B8\u0300-\u0590\u0800-\u1FFF\u200E\u2C00-\uFB1C\uFE00-\uFE6F\uFEFD-\uFFFF",zf=new RegExp("^[^"+Df+"]*["+Of+"]");function Nl(e){return zf.test(e)?"rtl":"not-rtl"}let yi;function Bl(){if(typeof document>"u")return 0;if(yi!==void 0)return yi;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 o=e.offsetWidth;return n===o&&(o=t.clientWidth),t.remove(),yi=n-o,yi}const Ho=Symbol();function Lf(e){const t=p.useRef([Ho,e]);t.current[1]!==e&&(t.current[0]=e),t.current[1]=e;const[n,o]=p.useState(e),[,r]=p.useState(),i=p.useCallback(s=>{const a=t.current[0];a!==Ho&&(s=typeof s=="function"?s(a):s,s===a)||(a!==Ho&&r({}),o(c=>typeof s=="function"?s(a===Ho?c:a):s),t.current[0]=Ho)},[]),l=p.useCallback(()=>{t.current[0]=Ho,r({})},[]);return[t.current[0]===Ho?n:t.current[0],i,l]}function hc(e){if(e.length===0)return"";let t=0,n=0;for(const o of e){if(n+=o.length,n>1e4)break;t++}return e.slice(0,t).join(", ")}function Pf(e){const t=p.useRef(e);return er(e,t.current)||(t.current=e),t.current}const Af=e=>{const{urls:t,canWrite:n,onEditClick:o,renderImage:r}=e,i=t.filter(s=>s!=="");if(i.length===0)return null;const l=i.length>1;return p.createElement(gf,{"data-testid":"GDG-default-image-overlay-editor"},p.createElement(Sf.Carousel,{showArrows:l,showThumbs:!1,swipeable:l,emulateTouch:l,infiniteLoop:l},i.map(s=>{const a=(r==null?void 0:r(s))??p.createElement("img",{draggable:!1,src:s});return p.createElement("div",{className:"gdg-centering-container",key:s},a)})),n&&o&&p.createElement("button",{className:"gdg-edit-icon",onClick:o},p.createElement(_l,null)))};function fc(){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 Fo=fc();function Hf(e){Fo=e}const pc=/[&<>"']/,Ff=new RegExp(pc.source,"g"),gc=/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,_f=new RegExp(gc.source,"g"),Nf={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},mc=e=>Nf[e];function bn(e,t){if(t){if(pc.test(e))return e.replace(Ff,mc)}else if(gc.test(e))return e.replace(_f,mc);return e}const Bf=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig;function vc(e){return e.replace(Bf,(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 Vf=/(^|[^\[])\^/g;function Nt(e,t){e=typeof e=="string"?e:e.source,t=t||"";const n={replace:(o,r)=>(r=r.source||r,r=r.replace(Vf,"$1"),e=e.replace(o,r),n),getRegex:()=>new RegExp(e,t)};return n}const $f=/[^\w:]/g,Wf=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;function bc(e,t,n){if(e){let o;try{o=decodeURIComponent(vc(n)).replace($f,"").toLowerCase()}catch{return null}if(o.indexOf("javascript:")===0||o.indexOf("vbscript:")===0||o.indexOf("data:")===0)return null}t&&!Wf.test(n)&&(n=Gf(t,n));try{n=encodeURI(n).replace(/%25/g,"%")}catch{return null}return n}const xi={},jf=/^[^:]+:\/*[^/]*$/,Uf=/^([^:]+:)[\s\S]*$/,Yf=/^([^:]+:\/*[^/]*)[\s\S]*$/;function Gf(e,t){xi[" "+e]||(jf.test(e)?xi[" "+e]=e+"/":xi[" "+e]=ki(e,"/",!0)),e=xi[" "+e];const n=e.indexOf(":")===-1;return t.substring(0,2)==="//"?n?t:e.replace(Uf,"$1")+t:t.charAt(0)==="/"?n?t:e.replace(Yf,"$1")+t:e+t}const Ci={exec:function(){}};function wc(e,t){const n=e.replace(/\|/g,(i,l,s)=>{let a=!1,c=l;for(;--c>=0&&s[c]==="\\";)a=!a;return a?"|":" |"}),o=n.split(/ \|/);let r=0;if(o[0].trim()||o.shift(),o.length>0&&!o[o.length-1].trim()&&o.pop(),o.length>t)o.splice(t);else for(;o.length<t;)o.push("");for(;r<o.length;r++)o[r]=o[r].trim().replace(/\\\|/g,"|");return o}function ki(e,t,n){const o=e.length;if(o===0)return"";let r=0;for(;r<o;){const i=e.charAt(o-r-1);if(i===t&&!n)r++;else if(i!==t&&n)r++;else break}return e.slice(0,o-r)}function Kf(e,t){if(e.indexOf(t[1])===-1)return-1;const n=e.length;let o=0,r=0;for(;r<n;r++)if(e[r]==="\\")r++;else if(e[r]===t[0])o++;else if(e[r]===t[1]&&(o--,o<0))return r;return-1}function Xf(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 yc(e,t){if(t<1)return"";let n="";for(;t>1;)t&1&&(n+=e),t>>=1,e+=e;return n+e}function xc(e,t,n,o){const r=t.href,i=t.title?bn(t.title):null,l=e[1].replace(/\\([\[\]])/g,"$1");if(e[0].charAt(0)!=="!"){o.state.inLink=!0;const s={type:"link",raw:n,href:r,title:i,text:l,tokens:o.inlineTokens(l)};return o.state.inLink=!1,s}return{type:"image",raw:n,href:r,title:i,text:bn(l)}}function qf(e,t){const n=e.match(/^(\s+)(?:```)/);if(n===null)return t;const o=n[1];return t.split(`
3
3
  `).map(r=>{const i=r.match(/^\s+/);if(i===null)return r;const[l]=i;return l.length>=o.length?r.slice(o.length):r}).join(`
4
4
  `)}class Vl{constructor(t){this.options=t||Fo}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 o=n[0].replace(/^ {1,4}/gm,"");return{type:"code",raw:n[0],codeBlockStyle:"indented",text:this.options.pedantic?o:ki(o,`
5
5
  `)}}}fences(t){const n=this.rules.block.fences.exec(t);if(n){const o=n[0],r=qf(o,n[3]||"");return{type:"code",raw:o,lang:n[2]?n[2].trim().replace(this.rules.inline._escapes,"$1"):n[2],text:r}}}heading(t){const n=this.rules.block.heading.exec(t);if(n){let o=n[2].trim();if(/#$/.test(o)){const r=ki(o,"#");(this.options.pedantic||!r||/ $/.test(r))&&(o=r.trim())}return{type:"heading",raw:n[0],depth:n[1].length,text:o,tokens:this.lexer.inline(o)}}}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 o=n[0].replace(/^ *>[ \t]?/gm,""),r=this.lexer.state.top;this.lexer.state.top=!0;const i=this.lexer.blockTokens(o);return this.lexer.state.top=r,{type:"blockquote",raw:n[0],tokens:i,text:o}}}list(t){let n=this.rules.block.list.exec(t);if(n){let o,r,i,l,s,a,c,u,d,f,h,g,m=n[1].trim();const b=m.length>1,y={type:"list",raw:"",ordered:b,start:b?+m.slice(0,-1):"",loose:!1,items:[]};m=b?`\\d{1,9}\\${m.slice(-1)}`:`\\${m}`,this.options.pedantic&&(m=b?m:"[*+-]");const v=new RegExp(`^( {0,3}${m})((?:[ ][^\\n]*)?(?:\\n|$))`);for(;t&&(g=!1,!(!(n=v.exec(t))||this.rules.block.hr.test(t)));){if(o=n[0],t=t.substring(o.length),u=n[2].split(`
@@ -169,10 +169,10 @@ Please report this to https://github.com/markedjs/marked.`,e){const r="<p>An err
169
169
  `?(o.push(e.slice(r,l)),r=l+1,s===`
170
170
  `&&(n.push(o),o=[])):s==='"'&&(i=t.inString);break;case t.inString:s==='"'&&(i=t.inStringPostQuote);break;case t.inStringPostQuote:s==='"'?i=t.inString:((s===" "||s===`
171
171
  `)&&(o.push(wu(e.slice(r,l))),r=l+1,s===`
172
- `&&(n.push(o),o=[])),i=t.None);break}l++}return r<e.length&&o.push(wu(e.slice(r,e.length))),n.push(o),n.map(s=>s.map(a=>({rawValue:a,formatted:a,format:"string"})))}function yu(e,t,n){var o;const r=hg(e,t),i=a=>{var c;(c=window.navigator.clipboard)==null||c.writeText(a)},l=(a,c)=>{var u;return((u=window.navigator.clipboard)==null?void 0:u.write)===void 0?!1:(window.navigator.clipboard.write([new ClipboardItem({"text/plain":new Blob([a],{type:"text/plain"}),"text/html":new Blob([c],{type:"text/html"})})]),!0)},s=(a,c)=>{var u,d;try{if(n===void 0||n.clipboardData===null)throw new Error("No clipboard data");(u=n==null?void 0:n.clipboardData)==null||u.setData("text/plain",a),(d=n==null?void 0:n.clipboardData)==null||d.setData("text/html",c)}catch{l(a,c)||i(a)}};((o=window.navigator.clipboard)==null?void 0:o.write)!==void 0||(n==null?void 0:n.clipboardData)!==void 0?s(r.textPlain,r.textHtml):i(r.textPlain),n==null||n.preventDefault()}function xu(e){return e!==!0}function Cu(e){return typeof e=="string"?e:`${e}px`}const gg=()=>e=>e.innerWidth,mg=()=>e=>e.innerHeight,vg=sn("div")({name:"Wrapper",class:"gdg-wmyidgi",propsAsIs:!1,vars:{"wmyidgi-0":[gg()],"wmyidgi-1":[mg()]}}),bg=e=>{const{inWidth:t,inHeight:n,children:o,...r}=e;return p.createElement(vg,{innerHeight:Cu(n),innerWidth:Cu(t),...r},o)},wg=2,yg=1300;function xg(e,t,n){const o=ne.useRef(0),[r,i]=e??[0,0];ne.useEffect(()=>{if(r===0&&i===0){o.current=0;return}let l=!1,s=0;const a=c=>{var u;if(!l){if(s===0)s=c;else{const d=c-s;o.current=Math.min(1,o.current+d/yg);const f=o.current**1.618*d*wg;(u=t.current)==null||u.scrollBy(r*f,i*f),s=c,n==null||n()}window.requestAnimationFrame(a)}};return window.requestAnimationFrame(a),()=>{l=!0}},[t,r,i,n])}function Cg({rowHeight:e,headerHeight:t,groupHeaderHeight:n,theme:o,overscrollX:r,overscrollY:i,scaleToRem:l,remSize:s}){const[a,c,u,d,f,h]=ne.useMemo(()=>{if(!l||s===16)return[e,t,n,o,r,i];const g=s/16,m=e,b=$c();return[typeof m=="number"?m*g:y=>Math.ceil(m(y)*g),Math.ceil(t*g),Math.ceil(n*g),{...o,headerIconSize:((o==null?void 0:o.headerIconSize)??b.headerIconSize)*g,cellHorizontalPadding:((o==null?void 0:o.cellHorizontalPadding)??b.cellHorizontalPadding)*g,cellVerticalPadding:((o==null?void 0:o.cellVerticalPadding)??b.cellVerticalPadding)*g},Math.ceil((r??0)*g),Math.ceil((i??0)*g)]},[n,t,r,i,s,e,l,o]);return{rowHeight:a,headerHeight:c,groupHeaderHeight:u,theme:d,overscrollX:f,overscrollY:h}}const Mo={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 st(e,t){return e===!0?t:e===!1?"":e}function ku(e){const t=Oi.value;return{activateCell:st(e.activateCell," |Enter|shift+Enter"),clear:st(e.clear,"any+Escape"),closeOverlay:st(e.closeOverlay,"any+Escape"),acceptOverlayDown:st(e.acceptOverlayDown,"Enter"),acceptOverlayUp:st(e.acceptOverlayUp,"shift+Enter"),acceptOverlayLeft:st(e.acceptOverlayLeft,"shift+Tab"),acceptOverlayRight:st(e.acceptOverlayRight,"Tab"),copy:e.copy,cut:e.cut,delete:st(e.delete,t?"Backspace|Delete":"Delete"),downFill:st(e.downFill,"primary+_68"),scrollToSelectedCell:st(e.scrollToSelectedCell,"primary+Enter"),goDownCell:st(e.goDownCell,"ArrowDown"),goDownCellRetainSelection:st(e.goDownCellRetainSelection,"alt+ArrowDown"),goLeftCell:st(e.goLeftCell,"ArrowLeft|shift+Tab"),goLeftCellRetainSelection:st(e.goLeftCellRetainSelection,"alt+ArrowLeft"),goRightCell:st(e.goRightCell,"ArrowRight|Tab"),goRightCellRetainSelection:st(e.goRightCellRetainSelection,"alt+ArrowRight"),goUpCell:st(e.goUpCell,"ArrowUp"),goUpCellRetainSelection:st(e.goUpCellRetainSelection,"alt+ArrowUp"),goToFirstCell:st(e.goToFirstCell,"primary+Home"),goToFirstColumn:st(e.goToFirstColumn,"Home|primary+ArrowLeft"),goToFirstRow:st(e.goToFirstRow,"primary+ArrowUp"),goToLastCell:st(e.goToLastCell,"primary+End"),goToLastColumn:st(e.goToLastColumn,"End|primary+ArrowRight"),goToLastRow:st(e.goToLastRow,"primary+ArrowDown"),goToNextPage:st(e.goToNextPage,"PageDown"),goToPreviousPage:st(e.goToPreviousPage,"PageUp"),paste:e.paste,rightFill:st(e.rightFill,"primary+_82"),search:st(e.search,"primary+f"),selectAll:st(e.selectAll,"primary+a"),selectColumn:st(e.selectColumn,"ctrl+ "),selectGrowDown:st(e.selectGrowDown,"shift+ArrowDown"),selectGrowLeft:st(e.selectGrowLeft,"shift+ArrowLeft"),selectGrowRight:st(e.selectGrowRight,"shift+ArrowRight"),selectGrowUp:st(e.selectGrowUp,"shift+ArrowUp"),selectRow:st(e.selectRow,"shift+ "),selectToFirstCell:st(e.selectToFirstCell,"primary+shift+Home"),selectToFirstColumn:st(e.selectToFirstColumn,"primary+shift+ArrowLeft"),selectToFirstRow:st(e.selectToFirstRow,"primary+shift+ArrowUp"),selectToLastCell:st(e.selectToLastCell,"primary+shift+End"),selectToLastColumn:st(e.selectToLastColumn,"primary+shift+ArrowRight"),selectToLastRow:st(e.selectToLastRow,"primary+shift+ArrowDown")}}function kg(e){const t=Pf(e);return ne.useMemo(()=>{if(t===void 0)return ku(Mo);const n={...t,goToNextPage:(t==null?void 0:t.goToNextPage)??(t==null?void 0:t.pageDown)??Mo.goToNextPage,goToPreviousPage:(t==null?void 0:t.goToPreviousPage)??(t==null?void 0:t.pageUp)??Mo.goToPreviousPage,goToFirstCell:(t==null?void 0:t.goToFirstCell)??(t==null?void 0:t.first)??Mo.goToFirstCell,goToLastCell:(t==null?void 0:t.goToLastCell)??(t==null?void 0:t.last)??Mo.goToLastCell,selectToFirstCell:(t==null?void 0:t.selectToFirstCell)??(t==null?void 0:t.first)??Mo.selectToFirstCell,selectToLastCell:(t==null?void 0:t.selectToLastCell)??(t==null?void 0:t.last)??Mo.selectToLastCell};return ku({...Mo,...n})},[t])}function Sg(e){function t(n,o,r){if(typeof n=="number")return{headerIndex:n,isCollapsed:!1,depth:o,path:r};const i={headerIndex:n.headerIndex,isCollapsed:n.isCollapsed,depth:o,path:r};return n.subGroups!==void 0&&(i.subGroups=n.subGroups.map((l,s)=>t(l,o+1,[...r,s])).sort((l,s)=>l.headerIndex-s.headerIndex)),i}return e.map((n,o)=>t(n,0,[o])).sort((n,o)=>n.headerIndex-o.headerIndex)}function ua(e,t){const n=[];function o(l,s,a=!1){let c=s!==null?s-l.headerIndex:t-l.headerIndex;if(l.subGroups!==void 0&&(c=l.subGroups[0].headerIndex-l.headerIndex),c--,n.push({headerIndex:l.headerIndex,contentIndex:-1,skip:a,isCollapsed:l.isCollapsed,depth:l.depth,path:l.path,rows:c}),l.subGroups)for(let u=0;u<l.subGroups.length;u++){const d=u<l.subGroups.length-1?l.subGroups[u+1].headerIndex:s;o(l.subGroups[u],d,a||l.isCollapsed)}}const r=Sg(e.groups);for(let l=0;l<r.length;l++){const s=l<r.length-1?r[l+1].headerIndex:null;o(r[l],s)}let i=0;for(const l of n)l.contentIndex=i,i+=l.rows;return n.filter(l=>l.skip===!1).map(l=>{const{skip:s,...a}=l;return a})}function zi(e,t){if(t===void 0||ua.length===0)return{path:[e],originalIndex:e,isGroupHeader:!1,groupIndex:e,contentIndex:e,groupRows:-1};let n=e;for(const o of t){if(n===0)return{path:[...o.path,-1],originalIndex:o.headerIndex,isGroupHeader:!0,groupIndex:-1,contentIndex:-1,groupRows:o.rows};if(n--,!o.isCollapsed){if(n<o.rows)return{path:[...o.path,n],originalIndex:o.headerIndex+n,isGroupHeader:!1,groupIndex:n,contentIndex:o.contentIndex+n,groupRows:o.rows};n-=o.rows}}return{path:[e],originalIndex:e,isGroupHeader:!1,groupIndex:e,contentIndex:e,groupRows:-1}}function Mg(e,t,n,o){const r=ne.useMemo(()=>e===void 0?void 0:ua(e,t),[e,t]),i=ne.useMemo(()=>r===void 0?t:r.reduce((c,u)=>c+(u.isCollapsed?1:u.rows+1),0),[r,t]),l=ne.useMemo(()=>e===void 0||typeof n=="number"&&e.height===n?n:c=>{const{isGroupHeader:u}=zi(c,r);return u?e.height:typeof n=="number"?n:n(c)},[r,e,n]),s=ne.useCallback(c=>{if(r===void 0)return c;let u=c;for(const d of r){if(u===0)return;if(u--,!d.isCollapsed){if(u<d.rows)return d.contentIndex+u;u-=d.rows}}return c},[r]),a=Ao(o??(e==null?void 0:e.themeOverride),ne.useCallback(c=>{if(e===void 0)return o==null?void 0:o(c,c,c);if(o===void 0&&(e==null?void 0:e.themeOverride)===void 0)return;const{isGroupHeader:u,contentIndex:d,groupIndex:f}=zi(c,r);return u?e.themeOverride:o==null?void 0:o(c,f,d)},[r,o,e]));return e===void 0?{rowHeight:l,rows:t,rowNumberMapper:s,getRowThemeOverride:a}:{rowHeight:l,rows:i,rowNumberMapper:s,getRowThemeOverride:a}}function Rg(e,t){const n=ne.useMemo(()=>e===void 0?void 0:ua(e,t),[e,t]);return{getRowGroupingForPath:Mu,updateRowGroupingByPath:Su,mapper:ne.useCallback(o=>{if(typeof o=="number")return zi(o,n);const r=zi(o[1],n);return{...r,originalIndex:[o[0],r.originalIndex]}},[n])}}function Su(e,t,n){const[o,...r]=t;return r[0]===-1?e.map((i,l)=>l===o?{...i,...n}:i):e.map((i,l)=>l===o?{...i,subGroups:Su(i.subGroups??[],r,n)}:i)}function Mu(e,t){const[n,...o]=t;return o[0]===-1?e[n]:Mu(e[n].subGroups??[],o)}function Eg(e,t){const[n]=p.useState(()=>({value:e,callback:t,facade:{get current(){return n.value},set current(o){const r=n.value;r!==o&&(n.value=o,n.callback(o,r))}}}));return n.callback=t,n.facade}function Ig(e,t,n,o,r){const[i,l]=p.useMemo(()=>[t!==void 0&&typeof n=="number"?Math.floor(t/n):0,t!==void 0&&typeof n=="number"?-(t%n):0],[t,n]),s=p.useMemo(()=>({x:o.current.x,y:i,width:o.current.width??1,height:o.current.height??1,ty:l}),[o,l,i]),[a,c,u]=Lf(s),d=p.useRef(r);d.current=r;const f=Eg(null,m=>{m!==null&&t!==void 0?m.scrollTop=t:m!==null&&e!==void 0&&(m.scrollLeft=e)}),h=(a.height??1)>1;p.useLayoutEffect(()=>{if(t!==void 0&&f.current!==null&&h){if(f.current.scrollTop===t)return;f.current.scrollTop=t,f.current.scrollTop!==t&&u(),d.current()}},[t,h,u,f]);const g=(a.width??1)>1;return p.useLayoutEffect(()=>{if(e!==void 0&&f.current!==null&&g){if(f.current.scrollLeft===e)return;f.current.scrollLeft=e,f.current.scrollLeft!==e&&u(),d.current()}},[e,g,u,f]),{visibleRegion:a,setVisibleRegion:c,scrollRef:f}}const Tg=p.lazy(async()=>await ms(()=>import("./data-grid-overlay-editor-D6T-ER_q.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13])));let Og=0;function Dg(e){return Hp(qc(qc(e).filter(t=>t.span!==void 0).map(t=>{var n,o;return ao((((n=t.span)==null?void 0:n[0])??0)+1,(((o=t.span)==null?void 0:o[1])??0)+1)})))}function Li(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 Pi={kind:Z.Loading,allowOverlay:!1},Ai={columns:mt.empty(),rows:mt.empty(),current:void 0},zg=(e,t)=>{var n,o,r;const[i,l]=p.useState(Ai),[s,a]=p.useState(),c=p.useRef(null),u=p.useRef(null),[d,f]=p.useState(),h=p.useRef(),g=typeof window>"u"?null:window,{imageEditorOverride:m,getRowThemeOverride:b,markdownDivCreateNode:y,width:v,height:I,columns:T,rows:k,getCellContent:x,onCellClicked:L,onCellActivated:O,onFillPattern:R,onFinishedEditing:P,coercePasteValue:M,drawHeader:S,drawCell:E,editorBloom:D,onHeaderClicked:C,onColumnProposeMove:G,rangeSelectionColumnSpanning:B=!0,spanRangeBehavior:J="default",onGroupHeaderClicked:se,onCellContextMenu:re,className:U,onHeaderContextMenu:ie,getCellsForSelection:ce,onGroupHeaderContextMenu:he,onGroupHeaderRenamed:pe,onCellEdited:Q,onCellsEdited:_,onSearchResultsChanged:z,searchResults:j,onSearchValueChange:ge,searchValue:ke,onKeyDown:_e,onKeyUp:xe,keybindings:De,editOnType:Ne=!0,onRowAppended:tt,onColumnMoved:Lt,validateCell:kt,highlightRegions:we,rangeSelect:be="rect",columnSelect:me="multi",rowSelect:le="multi",rangeSelectionBlending:Ee="exclusive",columnSelectionBlending:Ie="exclusive",rowSelectionBlending:Ue="exclusive",onDelete:nt,onDragStart:St,onMouseMove:ue,onPaste:rt,copyHeaders:lt=!1,freezeColumns:Re=0,cellActivationBehavior:Et="second-click",rowSelectionMode:jt="auto",onHeaderMenuClick:Be,onHeaderIndicatorClick:ot,getGroupDetails:yt,rowGrouping:Mt,onSearchClose:Xt,onItemHovered:cn,onSelectionCleared:Qt,showSearch:Ht,onVisibleRegionChanged:It,gridSelection:Pt,onGridSelectionChange:In,minColumnWidth:Cn=50,maxColumnWidth:Qe=500,maxColumnAutoWidth:un,provideEditor:pn,trailingRowOptions:xt,freezeTrailingRows:qt=0,allowedFillDirections:ct="orthogonal",scrollOffsetX:Ft,scrollOffsetY:Ut,verticalBorder:rn,onDragOverCell:Tt,onDrop:Zt,onColumnResize:qe,onColumnResizeEnd:At,onColumnResizeStart:kn,customRenderers:Ot,fillHandle:Bt,experimental:Vt,fixedShadowX:uo,fixedShadowY:Bn,headerIcons:N,imageWindowLoader:Ze,initialSize:ee,isDraggable:ze,onDragLeave:en,onRowMoved:Yt,overscrollX:ln,overscrollY:Sn,preventDiagonalScrolling:tn,rightElement:gn,rightElementProps:wn,trapFocus:oo=!1,smoothScrollX:tl,smoothScrollY:Ga,scaleToRem:Ka=!1,rowHeight:ar=34,headerHeight:ho=36,groupHeaderHeight:Xa=ho,theme:qa,isOutsideClick:nl,renderers:sr,resizeIndicator:cr,scrollToActiveCell:ei=!0,drawFocusRing:ur=!0}=e,ti=ur==="no-editor"?s===void 0:ur,mn=typeof e.rowMarkers=="string"?void 0:e.rowMarkers,dn=(mn==null?void 0:mn.kind)??e.rowMarkers??"none",Eo=(mn==null?void 0:mn.width)??e.rowMarkerWidth,dr=(mn==null?void 0:mn.startIndex)??e.rowMarkerStartIndex??1,Io=(mn==null?void 0:mn.theme)??e.rowMarkerTheme,hr=mn==null?void 0:mn.headerTheme,ni=mn==null?void 0:mn.headerAlwaysVisible,oi=le!=="multi",jo=(mn==null?void 0:mn.checkboxStyle)??"square",To=Math.max(Cn,20),fr=Math.max(Qe,To),ol=Math.max(un??fr,To),ri=p.useMemo(()=>typeof window>"u"?{fontSize:"16px"}:window.getComputedStyle(document.documentElement),[]),{rows:Ye,rowNumberMapper:ii,rowHeight:Za,getRowThemeOverride:fo}=Mg(Mt,k,ar,b),Ja=p.useMemo(()=>Number.parseFloat(ri.fontSize),[ri]),{rowHeight:ro,headerHeight:li,groupHeaderHeight:pr,theme:rl,overscrollX:Qa,overscrollY:es}=Cg({groupHeaderHeight:Xa,headerHeight:ho,overscrollX:ln,overscrollY:Sn,remSize:Ja,rowHeight:Za,scaleToRem:Ka,theme:qa}),io=kg(De),po=Eo??(k>1e4?48:k>1e3?44:k>100?36:32),Mn=dn!=="none",W=Mn?1:0,Gt=tt!==void 0,Uo=(xt==null?void 0:xt.sticky)===!0,[gr,il]=p.useState(!1),mr=Ht??gr,ts=p.useCallback(()=>{Xt!==void 0?Xt():il(!1)},[Xt]),X=p.useMemo(()=>Pt===void 0?void 0:Li(Pt,W),[Pt,W])??i,F=p.useRef();F.current===void 0&&(F.current=new AbortController),p.useEffect(()=>()=>F==null?void 0:F.current.abort(),[]);const[te,Te]=lg(ce,x,W,F.current,Ye),Se=p.useCallback((w,A,$)=>{if(kt===void 0)return!0;const K=[w[0]-W,w[1]];return kt==null?void 0:kt(K,A,$)},[W,kt]),Ae=p.useRef(Pt),fe=p.useCallback((w,A)=>{A&&(w=fg(w,te,W,J,F.current)),In!==void 0?(Ae.current=Li(w,-W),In(Ae.current)):l(w)},[In,te,W,J]),Pe=Ao(qe,p.useCallback((w,A,$,K)=>{qe==null||qe(T[$-W],A,$-W,K)},[qe,W,T])),it=Ao(At,p.useCallback((w,A,$,K)=>{At==null||At(T[$-W],A,$-W,K)},[At,W,T])),bt=Ao(kn,p.useCallback((w,A,$,K)=>{kn==null||kn(T[$-W],A,$-W,K)},[kn,W,T])),Dt=Ao(S,p.useCallback((w,A)=>(S==null?void 0:S({...w,columnIndex:w.columnIndex-W},A))??!1,[S,W])),ye=Ao(E,p.useCallback((w,A)=>(E==null?void 0:E({...w,col:w.col-W},A))??!1,[E,W])),ht=p.useCallback(w=>{if(nt!==void 0){const A=nt(Li(w,-W));return typeof A=="boolean"?A:Li(A,W)}return!0},[nt,W]),[Je,Ke,ft]=ig(X,fe,Ee,Ie,Ue,be,B),_t=p.useMemo(()=>so($c(),rl),[rl]),[nn,Un]=p.useState([0,0,0]),Yn=p.useMemo(()=>{if(sr===void 0)return{};const w={};for(const A of sr)w[A.kind]=A;return w},[sr]),Kt=p.useCallback(w=>w.kind!==Z.Custom?Yn[w.kind]:Ot==null?void 0:Ot.find(A=>A.isMatch(w)),[Ot,Yn]);let{sizedColumns:ut,nonGrowWidth:Tn}=Ep(T,Ye,Te,nn[0]-(W===0?0:po)-nn[2],To,ol,_t,Kt,F.current);dn!=="none"&&(Tn+=po);const On=p.useMemo(()=>ut.some(w=>w.group!==void 0),[ut]),Gn=On?li+pr:li,Kn=X.rows.length,vr=dn==="none"?void 0:Kn===0?!1:Kn===Ye?!0:void 0,wt=p.useMemo(()=>dn==="none"?ut:[{title:"",width:po,icon:void 0,hasMenu:!1,style:"normal",themeOverride:Io,rowMarker:jo,rowMarkerChecked:vr,headerRowMarkerTheme:hr,headerRowMarkerAlwaysVisible:ni,headerRowMarkerDisabled:oi},...ut],[dn,ut,po,Io,jo,vr,hr,ni,oi]),An=p.useRef({height:1,width:1,x:0,y:0}),ll=p.useRef(!1),{setVisibleRegion:wh,visibleRegion:Yo,scrollRef:Jt}=Ig(Ft,Ut,ro,An,()=>ll.current=!0);An.current=Yo;const iy=Yo.x+W,al=Yo.y,Dn=p.useRef(null),Rn=p.useCallback(w=>{var A;w===!0?(A=Dn.current)==null||A.focus():window.requestAnimationFrame(()=>{var $;($=Dn.current)==null||$.focus()})},[]),yn=Gt?Ye+1:Ye,Vn=p.useCallback(w=>{const A=W===0?w:w.map(K=>({...K,location:[K.location[0]-W,K.location[1]]})),$=_==null?void 0:_(A);if($!==!0)for(const K of A)Q==null||Q(K.location,K.value);return $},[Q,_,W]),[Go,ns]=p.useState(),sl=X.current!==void 0&&X.current.range.width*X.current.range.height>1?X.current.range:void 0,cl=ti?(n=X.current)==null?void 0:n.cell:void 0,ul=cl==null?void 0:cl[0],dl=cl==null?void 0:cl[1],ly=p.useMemo(()=>{if((we===void 0||we.length===0)&&(sl??ul??dl??Go)===void 0)return;const w=[];if(we!==void 0)for(const A of we){const $=wt.length-A.range.x-W;$>0&&w.push({color:A.color,range:{...A.range,x:A.range.x+W,width:Math.min($,A.range.width)},style:A.style})}return Go!==void 0&&w.push({color:No(_t.accentColor,0),range:Go,style:"dashed"}),sl!==void 0&&w.push({color:No(_t.accentColor,.5),range:sl,style:"solid-outline"}),ul!==void 0&&dl!==void 0&&w.push({color:_t.accentColor,range:{x:ul,y:dl,width:1,height:1},style:"solid-outline"}),w.length>0?w:void 0},[Go,sl,ul,dl,we,wt.length,_t.accentColor,W]),yh=p.useRef(wt);yh.current=wt;const Hn=p.useCallback(([w,A],$=!1)=>{var K,H,de,oe,q,V,Y;const ae=Gt&&A===yn-1;if(w===0&&Mn){if(ae)return Pi;const Ce=ii(A);return Ce===void 0?Pi:{kind:Fn.Marker,allowOverlay:!1,checkboxStyle:jo,checked:(X==null?void 0:X.rows.hasIndex(A))===!0,markerKind:dn==="clickable-number"?"number":dn,row:dr+Ce,drawHandle:Yt!==void 0,cursor:dn==="clickable-number"?"pointer":void 0}}else if(ae){const Ce=w===W?(xt==null?void 0:xt.hint)??"":"",ve=yh.current[w];if(((K=ve==null?void 0:ve.trailingRowOptions)==null?void 0:K.disabled)===!0)return Pi;{const Le=((H=ve==null?void 0:ve.trailingRowOptions)==null?void 0:H.hint)??Ce,et=((de=ve==null?void 0:ve.trailingRowOptions)==null?void 0:de.addIcon)??(xt==null?void 0:xt.addIcon);return{kind:Fn.NewRow,hint:Le,allowOverlay:!1,icon:et}}}else{const Ce=w-W;if($||(Vt==null?void 0:Vt.strict)===!0){const Le=An.current,et=Le.x>Ce||Ce>Le.x+Le.width||Le.y>A||A>Le.y+Le.height||A>=rs.current,pt=Ce===((q=(oe=Le.extras)==null?void 0:oe.selected)==null?void 0:q[0])&&A===((V=Le.extras)==null?void 0:V.selected[1]);let Ve=!1;if(((Y=Le.extras)==null?void 0:Y.freezeRegions)!==void 0){for(const He of Le.extras.freezeRegions)if($o(He,Ce,A)){Ve=!0;break}}if(et&&!pt&&!Ve)return Pi}let ve=x([Ce,A]);return W!==0&&ve.span!==void 0&&(ve={...ve,span:[ve.span[0]+W,ve.span[1]+W]}),ve}},[Gt,yn,Mn,ii,jo,X==null?void 0:X.rows,dn,dr,Yt,W,xt==null?void 0:xt.hint,xt==null?void 0:xt.addIcon,Vt==null?void 0:Vt.strict,x]),os=p.useCallback(w=>{let A=(yt==null?void 0:yt(w))??{name:w};return pe!==void 0&&w!==""&&(A={icon:A.icon,name:A.name,overrideTheme:A.overrideTheme,actions:[...A.actions??[],{title:"Rename",icon:"renameIcon",onClick:$=>ls({group:A.name,bounds:$.bounds})}]}),A},[yt,pe]),hl=p.useCallback(w=>{var A;const[$,K]=w.cell,H=wt[$],de=(H==null?void 0:H.group)!==void 0?(A=os(H.group))==null?void 0:A.overrideTheme:void 0,oe=H==null?void 0:H.themeOverride,q=fo==null?void 0:fo(K);a({...w,theme:so(_t,de,oe,q,w.content.themeOverride)})},[fo,wt,os,_t]),br=p.useCallback((w,A,$)=>{var K;if(X.current===void 0)return;const[H,de]=X.current.cell,oe=Hn([H,de]);if(oe.kind!==Z.Boolean&&oe.allowOverlay){let q=oe;if($!==void 0)switch(q.kind){case Z.Number:{const V=nf(()=>$==="-"?-0:Number.parseFloat($),0);q={...q,data:Number.isNaN(V)?0:V};break}case Z.Text:case Z.Markdown:case Z.Uri:q={...q,data:$};break}hl({target:w,content:q,initialValue:$,cell:[H,de],highlight:$===void 0,forceEditMode:$!==void 0})}else oe.kind===Z.Boolean&&A&&oe.readonly!==!0&&(Vn([{location:X.current.cell,value:{...oe,data:xu(oe.data)}}]),(K=Dn.current)==null||K.damage([{cell:X.current.cell}]))},[Hn,X,Vn,hl]),xh=p.useCallback((w,A)=>{var $;const K=($=Dn.current)==null?void 0:$.getBounds(w,A);if(K===void 0||Jt.current===null)return;const H=Hn([w,A]);H.allowOverlay&&hl({target:K,content:H,initialValue:void 0,highlight:!0,cell:[w,A],forceEditMode:!0})},[Hn,Jt,hl]),an=p.useCallback((w,A,$="both",K=0,H=0,de=void 0)=>{if(Jt.current!==null){const oe=Dn.current,q=u.current,V=typeof w!="number"?w.unit==="cell"?w.amount:void 0:w,Y=typeof A!="number"?A.unit==="cell"?A.amount:void 0:A,ae=typeof w!="number"&&w.unit==="px"?w.amount:void 0,Ce=typeof A!="number"&&A.unit==="px"?A.amount:void 0;if(oe!==null&&q!==null){let ve={x:0,y:0,width:0,height:0},Le=0,et=0;if((V!==void 0||Y!==void 0)&&(ve=oe.getBounds((V??0)+W,Y??0)??ve,ve.width===0||ve.height===0))return;const pt=q.getBoundingClientRect(),Ve=pt.width/q.offsetWidth;if(ae!==void 0&&(ve={...ve,x:ae-pt.left-Jt.current.scrollLeft,width:1}),Ce!==void 0&&(ve={...ve,y:Ce+pt.top-Jt.current.scrollTop,height:1}),ve!==void 0){const He={x:ve.x-K,y:ve.y-H,width:ve.width+2*K,height:ve.height+2*H};let Ct=0;for(let fs=0;fs<Re;fs++)Ct+=ut[fs].width;let vn=0;const hn=qt+(Uo?1:0);hn>0&&(vn=Bo(yn,hn,ro));let Jn=Ct*Ve+pt.left+W*po*Ve,lo=pt.right,Qn=pt.top+Gn*Ve,go=pt.bottom-vn*Ve;const wl=ve.width+K*2;switch(de==null?void 0:de.hAlign){case"start":lo=Jn+wl;break;case"end":Jn=lo-wl;break;case"center":Jn=Math.floor((Jn+lo)/2)-wl/2,lo=Jn+wl;break}const yl=ve.height+H*2;switch(de==null?void 0:de.vAlign){case"start":go=Qn+yl;break;case"end":Qn=go-yl;break;case"center":Qn=Math.floor((Qn+go)/2)-yl/2,go=Qn+yl;break}Jn>He.x?Le=He.x-Jn:lo<He.x+He.width&&(Le=He.x+He.width-lo),Qn>He.y?et=He.y-Qn:go<He.y+He.height&&(et=He.y+He.height-go),$==="vertical"||typeof w=="number"&&w<Re?Le=0:($==="horizontal"||typeof A=="number"&&A>=yn-hn)&&(et=0),(Le!==0||et!==0)&&(Ve!==1&&(Le/=Ve,et/=Ve),Jt.current.scrollTo(Le+Jt.current.scrollLeft,et+Jt.current.scrollTop))}}}},[W,qt,po,Jt,Gn,Re,ut,yn,Uo,ro]),Ch=p.useRef(xh),kh=p.useRef(x),rs=p.useRef(Ye);Ch.current=xh,kh.current=x,rs.current=Ye;const wr=p.useCallback(async(w,A=!0)=>{var $;const K=wt[w];if((($=K==null?void 0:K.trailingRowOptions)==null?void 0:$.disabled)===!0)return;const H=tt==null?void 0:tt();let de,oe=!0;H!==void 0&&(de=await H,de==="top"&&(oe=!1),typeof de=="number"&&(oe=!1));let q=0;const V=()=>{if(rs.current<=Ye){q<500&&window.setTimeout(V,q),q=50+q*2;return}const Y=typeof de=="number"?de:oe?Ye:0;bl.current(w-W,Y),Je({cell:[w,Y],range:{x:w,y:Y,width:1,height:1}},!1,!1,"edit");const ae=kh.current([w-W,Y]);ae.allowOverlay&&Rr(ae)&&ae.readonly!==!0&&A&&window.setTimeout(()=>{Ch.current(w,Y)},0)};V()},[wt,tt,W,Ye,Je]),fl=p.useCallback(w=>{var A,$;const K=(($=(A=ut[w])==null?void 0:A.trailingRowOptions)==null?void 0:$.targetColumn)??(xt==null?void 0:xt.targetColumn);if(typeof K=="number")return K+(Mn?1:0);if(typeof K=="object"){const H=T.indexOf(K);if(H>=0)return H+(Mn?1:0)}},[ut,T,Mn,xt==null?void 0:xt.targetColumn]),Oo=p.useRef(),yr=p.useRef(),ai=p.useCallback((w,A)=>{var $;const[K,H]=A;return so(_t,($=wt[K])==null?void 0:$.themeOverride,fo==null?void 0:fo(H),w.themeOverride)},[fo,wt,_t]),{mapper:Ko}=Rg(Mt,k),Xn=Mt==null?void 0:Mt.navigationBehavior,si=p.useCallback(w=>{var A,$,K;const H=Oi.value?w.metaKey:w.ctrlKey,de=H&&le==="multi",oe=H&&me==="multi",[q,V]=w.location,Y=X.columns,ae=X.rows,[Ce,ve]=((A=X.current)==null?void 0:A.cell)??[];if(w.kind==="cell"){if(yr.current=void 0,Xo.current=[q,V],q===0&&Mn){if(Gt===!0&&V===Ye||dn==="number"||le==="none")return;const Le=Hn(w.location);if(Le.kind!==Fn.Marker)return;if(Yt!==void 0){const Ve=Kt(Le);zn((Ve==null?void 0:Ve.kind)===Fn.Marker);const He=($=Ve==null?void 0:Ve.onClick)==null?void 0:$.call(Ve,{...w,cell:Le,posX:w.localEventX,posY:w.localEventY,bounds:w.bounds,theme:ai(Le,w.location),preventDefault:()=>{}});if(He===void 0||He.checked===Le.checked)return}a(void 0),Rn();const et=ae.hasIndex(V),pt=Oo.current;if(le==="multi"&&(w.shiftKey||w.isLongTouch===!0)&&pt!==void 0&&ae.hasIndex(pt)){const Ve=[Math.min(pt,V),Math.max(pt,V)+1];de||jt==="multi"?Ke(void 0,Ve,!0):Ke(mt.fromSingleSelection(Ve),void 0,de)}else le==="multi"&&(de||w.isTouch||jt==="multi")?et?Ke(ae.remove(V),void 0,!0):(Ke(void 0,V,!0),Oo.current=V):et&&ae.length===1?Ke(mt.empty(),void 0,H):(Ke(mt.fromSingleSelection(V),void 0,H),Oo.current=V)}else if(q>=W&&Gt&&V===Ye){const Le=fl(q);wr(Le??q)}else if(Ce!==q||ve!==V){const Le=Hn(w.location),et=Kt(Le);if((et==null?void 0:et.onSelect)!==void 0){let He=!1;if(et.onSelect({...w,cell:Le,posX:w.localEventX,posY:w.localEventY,bounds:w.bounds,preventDefault:()=>He=!0,theme:ai(Le,w.location)}),He)return}if(Xn==="block"&&Ko(V).isGroupHeader)return;const pt=Uo&&V===Ye,Ve=Uo&&X!==void 0&&((K=X.current)==null?void 0:K.cell[1])===Ye;if((w.shiftKey||w.isLongTouch===!0)&&Ce!==void 0&&ve!==void 0&&X.current!==void 0&&!Ve){if(pt)return;const He=Math.min(q,Ce),Ct=Math.max(q,Ce),vn=Math.min(V,ve),hn=Math.max(V,ve);Je({...X.current,range:{x:He,y:vn,width:Ct-He+1,height:hn-vn+1}},!0,H,"click"),Oo.current=void 0,Rn()}else Je({cell:[q,V],range:{x:q,y:V,width:1,height:1}},!0,H,"click"),Oo.current=void 0,a(void 0),Rn()}}else if(w.kind==="header")if(Xo.current=[q,V],a(void 0),Mn&&q===0)Oo.current=void 0,yr.current=void 0,le==="multi"&&(ae.length!==Ye?Ke(mt.fromSingleSelection([0,Ye]),void 0,H):Ke(mt.empty(),void 0,H),Rn());else{const Le=yr.current;if(me==="multi"&&(w.shiftKey||w.isLongTouch===!0)&&Le!==void 0&&Y.hasIndex(Le)){const et=[Math.min(Le,q),Math.max(Le,q)+1];oe?ft(void 0,et,H):ft(mt.fromSingleSelection(et),void 0,H)}else oe?(Y.hasIndex(q)?ft(Y.remove(q),void 0,H):ft(void 0,q,H),yr.current=q):me!=="none"&&(ft(mt.fromSingleSelection(q),void 0,H),yr.current=q);Oo.current=void 0,Rn()}else w.kind===Nn?Xo.current=[q,V]:w.kind===Di&&!w.isMaybeScrollbar&&(fe(Ai,!1),a(void 0),Rn(),Qt==null||Qt(),Oo.current=void 0,yr.current=void 0)},[le,me,X,Mn,W,Gt,Ye,dn,Hn,Yt,Rn,jt,Kt,ai,Ke,fl,wr,Xn,Ko,Uo,Je,ft,fe,Qt]),ci=p.useRef(!1),Xo=p.useRef(),Sh=p.useRef(Yo),qn=p.useRef(),ay=p.useCallback(w=>{if(xr.current=!1,Sh.current=An.current,w.button!==0&&w.button!==1){qn.current=void 0;return}const A=performance.now();qn.current={button:w.button,time:A,location:w.location},(w==null?void 0:w.kind)==="header"&&(ci.current=!0);const $=w.kind==="cell"&&w.isFillHandle;!$&&w.kind!=="cell"&&w.isEdge||(f({previousSelection:X,fillHandle:$}),Xo.current=void 0,!w.isTouch&&w.button===0&&!$?si(w):!w.isTouch&&w.button===1&&(Xo.current=w.location))},[X,si]),[is,ls]=p.useState(),Mh=p.useCallback(w=>{if(w.kind!==Nn||me!=="multi")return;const A=Oi.value?w.metaKey:w.ctrlKey,[$]=w.location,K=X.columns;if($<W)return;const H=wt[$];let de=$,oe=$;for(let q=$-1;q>=W&&Hr(H.group,wt[q].group);q--)de--;for(let q=$+1;q<wt.length&&Hr(H.group,wt[q].group);q++)oe++;if(Rn(),A)if(K.hasAll([de,oe+1])){let q=K;for(let V=de;V<=oe;V++)q=q.remove(V);ft(q,void 0,A)}else ft(void 0,[de,oe+1],A);else ft(mt.fromSingleSelection([de,oe+1]),void 0,A)},[me,Rn,X.columns,wt,W,ft]),xr=p.useRef(!1),pl=p.useCallback(async w=>{if(te!==void 0&&Pe!==void 0){const A=An.current.y,$=An.current.height;let K=te({x:w,y:A,width:1,height:Math.min($,Ye-A)},F.current.signal);typeof K!="object"&&(K=await K());const H=ut[w-W],de=document.createElement("canvas").getContext("2d",{alpha:!1});if(de!==null){de.font=_t.baseFontFull;const oe=Wc(de,_t,H,0,K,To,fr,!1,Kt);Pe==null||Pe(H,oe.width,w,oe.width)}}},[ut,te,fr,_t,To,Pe,W,Ye,Kt]),[sy,as]=p.useState(),Cr=p.useCallback(async(w,A)=>{var $,K;const H=($=w.current)==null?void 0:$.range;if(H===void 0||te===void 0||A.current===void 0)return;const de=A.current.range;if(R!==void 0){let Y=!1;if(R({fillDestination:{...de,x:de.x-W},patternSource:{...H,x:H.x-W},preventDefault:()=>Y=!0}),Y)return}let oe=te(H,F.current.signal);typeof oe!="object"&&(oe=await oe());const q=oe,V=[];for(let Y=0;Y<de.width;Y++)for(let ae=0;ae<de.height;ae++){const Ce=[de.x+Y,de.y+ae];if(Tc(Ce,H))continue;const ve=q[ae%H.height][Y%H.width];Lo(ve)||!Rr(ve)||V.push({location:Ce,value:{...ve}})}Vn(V),(K=Dn.current)==null||K.damage(V.map(Y=>({cell:Y.location})))},[te,Vn,R,W]),Rh=p.useCallback(()=>{if(X.current===void 0||X.current.range.width<=1)return;const w={...X,current:{...X.current,range:{...X.current.range,width:1}}};Cr(w,X)},[Cr,X]),Eh=p.useCallback(()=>{if(X.current===void 0||X.current.range.height<=1)return;const w={...X,current:{...X.current,range:{...X.current.range,height:1}}};Cr(w,X)},[Cr,X]),cy=p.useCallback((w,A)=>{var $,K;const H=d;if(f(void 0),ns(void 0),as(void 0),ci.current=!1,A)return;if((H==null?void 0:H.fillHandle)===!0&&X.current!==void 0&&(($=H.previousSelection)==null?void 0:$.current)!==void 0){if(Go===void 0)return;const ve={...X,current:{...X.current,range:tu(H.previousSelection.current.range,Go)}};Cr(H.previousSelection,ve),fe(ve,!0);return}const[de,oe]=w.location,[q,V]=Xo.current??[],Y=()=>{xr.current=!0},ae=ve=>{var Le,et,pt;const Ve=ve.isTouch||q===de&&V===oe;if(Ve&&(L==null||L([de-W,oe],{...ve,preventDefault:Y})),ve.button===1)return!xr.current;if(!xr.current){const He=Hn(w.location),Ct=Kt(He);if(Ct!==void 0&&Ct.onClick!==void 0&&Ve){const hn=Ct.onClick({...ve,cell:He,posX:ve.localEventX,posY:ve.localEventY,bounds:ve.bounds,theme:ai(He,w.location),preventDefault:Y});hn!==void 0&&!Lo(hn)&&Po(hn)&&(Vn([{location:ve.location,value:hn}]),(Le=Dn.current)==null||Le.damage([{cell:ve.location}]))}if(xr.current||X.current===void 0)return!1;let vn=!1;switch(He.activationBehaviorOverride??Et){case"double-click":case"second-click":{if(((pt=(et=H==null?void 0:H.previousSelection)==null?void 0:et.current)==null?void 0:pt.cell)===void 0)break;const[hn,Jn]=X.current.cell,[lo,Qn]=H.previousSelection.current.cell;vn=de===hn&&de===lo&&oe===Jn&&oe===Qn&&(ve.isDoubleClick===!0||Et==="second-click");break}case"single-click":{vn=!0;break}}if(vn)return O==null||O([de-W,oe]),br(ve.bounds,!1),!0}return!1},Ce=w.location[0]-W;if(w.isTouch){const ve=An.current,Le=Sh.current;if(ve.x!==Le.x||ve.y!==Le.y)return;if(w.isLongTouch===!0){if(w.kind==="cell"&&Fr((K=X.current)==null?void 0:K.cell,w.location)){re==null||re([Ce,w.location[1]],{...w,preventDefault:Y});return}else if(w.kind==="header"&&X.columns.hasIndex(de)){ie==null||ie(Ce,{...w,preventDefault:Y});return}else if(w.kind===Nn){if(Ce<0)return;he==null||he(Ce,{...w,preventDefault:Y});return}}w.kind==="cell"?ae(w)||si(w):w.kind===Nn?se==null||se(Ce,{...w,preventDefault:Y}):(w.kind===So&&(C==null||C(Ce,{...w,preventDefault:Y})),si(w));return}if(w.kind==="header"){if(Ce<0)return;w.isEdge?w.isDoubleClick===!0&&pl(de):w.button===0&&de===q&&oe===V&&(C==null||C(Ce,{...w,preventDefault:Y}))}if(w.kind===Nn){if(Ce<0)return;w.button===0&&de===q&&oe===V&&(se==null||se(Ce,{...w,preventDefault:Y}),xr.current||Mh(w))}w.kind==="cell"&&(w.button===0||w.button===1)&&ae(w),Xo.current=void 0},[d,X,W,Go,Cr,fe,L,Hn,Kt,Et,ai,Vn,O,br,re,ie,he,si,se,C,pl,Mh]),uy=p.useCallback(w=>{const A={...w,location:[w.location[0]-W,w.location[1]]};ue==null||ue(A),d!==void 0&&w.buttons===0&&(f(void 0),ns(void 0),as(void 0),ci.current=!1),as($=>{var K;return ci.current?[w.scrollEdge[0],0]:w.scrollEdge[0]===($==null?void 0:$[0])&&w.scrollEdge[1]===$[1]?$:d===void 0||(((K=qn.current)==null?void 0:K.location[0])??0)<W?void 0:w.scrollEdge})},[d,ue,W]),dy=p.useCallback((w,A)=>{Be==null||Be(w-W,A)},[Be,W]),hy=p.useCallback((w,A)=>{ot==null||ot(w-W,A)},[ot,W]),Do=(o=X==null?void 0:X.current)==null?void 0:o.cell,fy=p.useCallback((w,A,$,K,H,de)=>{ll.current=!1;let oe=Do;oe!==void 0&&(oe=[oe[0]-W,oe[1]]);const q=Re===0?void 0:{x:0,y:w.y,width:Re,height:w.height},V=[];q!==void 0&&V.push(q),qt>0&&(V.push({x:w.x-W,y:Ye-qt,width:w.width,height:qt}),Re>0&&V.push({x:0,y:Ye-qt,width:Re,height:qt}));const Y={x:w.x-W,y:w.y,width:w.width,height:Gt&&w.y+w.height>=Ye?w.height-1:w.height,tx:H,ty:de,extras:{selected:oe,freezeRegion:q,freezeRegions:V}};An.current=Y,wh(Y),Un([A,$,K]),It==null||It(Y,Y.tx,Y.ty,Y.extras)},[Do,W,Gt,Ye,Re,qt,wh,It]),py=Ao(Lt,p.useCallback((w,A)=>{Lt==null||Lt(w-W,A-W),me!=="none"&&ft(mt.fromSingleSelection(A),void 0,!0)},[me,Lt,W,ft])),ss=p.useRef(!1),gy=p.useCallback(w=>{if(w.location[0]===0&&W>0){w.preventDefault();return}St==null||St({...w,location:[w.location[0]-W,w.location[1]]}),w.defaultPrevented()||(ss.current=!0),f(void 0)},[St,W]),my=p.useCallback(()=>{ss.current=!1},[]),Ih=Mt==null?void 0:Mt.selectionBehavior,gl=p.useCallback(w=>{if(Ih!=="block-spanning")return;const{isGroupHeader:A,path:$,groupRows:K}=Ko(w);if(A)return[w,w];const H=$[$.length-1],de=w-H,oe=w+K-H-1;return[de,oe]},[Ko,Ih]),cs=p.useRef(),us=p.useCallback(w=>{var A,$,K;if(!fu(w,cs.current)&&(cs.current=w,!(((A=qn==null?void 0:qn.current)==null?void 0:A.button)!==void 0&&qn.current.button>=1))){if(w.buttons!==0&&d!==void 0&&(($=qn.current)==null?void 0:$.location[0])===0&&w.location[0]===0&&W===1&&le==="multi"&&d.previousSelection&&!d.previousSelection.rows.hasIndex(qn.current.location[1])&&X.rows.hasIndex(qn.current.location[1])){const H=Math.min(qn.current.location[1],w.location[1]),de=Math.max(qn.current.location[1],w.location[1])+1;Ke(mt.fromSingleSelection([H,de]),void 0,!1)}if(w.buttons!==0&&d!==void 0&&X.current!==void 0&&!ss.current&&!ci.current&&(be==="rect"||be==="multi-rect")){const[H,de]=X.current.cell;let[oe,q]=w.location;if(q<0&&(q=An.current.y),d.fillHandle===!0&&((K=d.previousSelection)==null?void 0:K.current)!==void 0){const V=d.previousSelection.current.range;q=Math.min(q,Gt?Ye-1:Ye);const Y=g0(V,oe,q,ct);ns(Y)}else{if(Gt&&de===Ye)return;if(Gt&&q===Ye)if(w.kind===Di)q--;else return;oe=Math.max(oe,W);const V=gl(de);q=V===void 0?q:_n(q,V[0],V[1]);const Y=oe-H,ae=q-de,Ce={x:Y>=0?H:oe,y:ae>=0?de:q,width:Math.abs(Y)+1,height:Math.abs(ae)+1};Je({...X.current,range:Ce},!0,!1,"drag")}}cn==null||cn({...w,location:[w.location[0]-W,w.location[1]]})}},[d,W,le,X,be,cn,Ke,Gt,Ye,ct,gl,Je]),vy=p.useCallback(()=>{var w,A;const $=cs.current;if($===void 0)return;const[K,H]=$.scrollEdge;let[de,oe]=$.location;const q=An.current;K===-1?de=((A=(w=q.extras)==null?void 0:w.freezeRegion)==null?void 0:A.x)??q.x:K===1&&(de=q.x+q.width),H===-1?oe=Math.max(0,q.y):H===1&&(oe=Math.min(Ye-1,q.y+q.height)),de=_n(de,0,wt.length-1),oe=_n(oe,0,Ye-1),us({...$,location:[de,oe]})},[wt.length,us,Ye]);xg(sy,Jt,vy);const Zn=p.useCallback(w=>{if(X.current===void 0)return;const[A,$]=w,[K,H]=X.current.cell,de=X.current.range;let oe=de.x,q=de.x+de.width,V=de.y,Y=de.y+de.height;const[ae,Ce]=gl(H)??[0,Ye-1],ve=Ce+1;if($!==0)switch($){case 2:{Y=ve,V=H,an(0,Y,"vertical");break}case-2:{V=ae,Y=H+1,an(0,V,"vertical");break}case 1:{V<H?(V++,an(0,V,"vertical")):(Y=Math.min(ve,Y+1),an(0,Y,"vertical"));break}case-1:{Y>H+1?(Y--,an(0,Y,"vertical")):(V=Math.max(ae,V-1),an(0,V,"vertical"));break}default:Mr()}if(A!==0)if(A===2)q=wt.length,oe=K,an(q-1-W,0,"horizontal");else if(A===-2)oe=W,q=K+1,an(oe-W,0,"horizontal");else{let Le=[];if(te!==void 0){const et=te({x:oe,y:V,width:q-oe-W,height:Y-V},F.current.signal);typeof et=="object"&&(Le=Dg(et))}if(A===1){let et=!1;if(oe<K){if(Le.length>0){const pt=ao(oe+1,K+1).find(Ve=>!Le.includes(Ve-W));pt!==void 0&&(oe=pt,et=!0)}else oe++,et=!0;et&&an(oe,0,"horizontal")}et||(q=Math.min(wt.length,q+1),an(q-1-W,0,"horizontal"))}else if(A===-1){let et=!1;if(q>K+1){if(Le.length>0){const pt=ao(q-1,K,-1).find(Ve=>!Le.includes(Ve-W));pt!==void 0&&(q=pt,et=!0)}else q--,et=!0;et&&an(q-W,0,"horizontal")}et||(oe=Math.max(W,oe-1),an(oe-W,0,"horizontal"))}else Mr()}Je({cell:X.current.cell,range:{x:oe,y:V,width:q-oe,height:Y-V}},!0,!1,"keyboard-select")},[te,gl,X,wt.length,W,Ye,an,Je]),ds=p.useRef(ei);ds.current=ei;const zo=p.useCallback((w,A,$,K)=>{const H=yn-($?0:1);w=_n(w,W,ut.length-1+W),A=_n(A,0,H);const de=Do==null?void 0:Do[0],oe=Do==null?void 0:Do[1];if(w===de&&A===oe)return!1;if(K&&X.current!==void 0){const q=[...X.current.rangeStack];(X.current.range.width>1||X.current.range.height>1)&&q.push(X.current.range),fe({...X,current:{cell:[w,A],range:{x:w,y:A,width:1,height:1},rangeStack:q}},!0)}else Je({cell:[w,A],range:{x:w,y:A,width:1,height:1}},!0,!1,"keyboard-nav");return h.current!==void 0&&h.current[0]===w&&h.current[1]===A&&(h.current=void 0),ds.current&&an(w-W,A),!0},[yn,W,ut.length,Do,X,an,fe,Je]),by=p.useCallback((w,A)=>{(s==null?void 0:s.cell)!==void 0&&w!==void 0&&Po(w)&&(Vn([{location:s.cell,value:w}]),window.requestAnimationFrame(()=>{var H;(H=Dn.current)==null||H.damage([{cell:s.cell}])})),Rn(!0),a(void 0);const[$,K]=A;if(X.current!==void 0&&($!==0||K!==0)){const H=X.current.cell[1]===yn-1&&w!==void 0;zo(_n(X.current.cell[0]+$,0,wt.length-1),_n(X.current.cell[1]+K,0,yn-1),H,!1)}P==null||P(w,A)},[s==null?void 0:s.cell,Rn,X,P,Vn,yn,zo,wt.length]),wy=p.useMemo(()=>`gdg-overlay-${Og++}`,[]),qo=p.useCallback(w=>{var A,$,K,H;Rn();const de=[];for(let oe=w.x;oe<w.x+w.width;oe++)for(let q=w.y;q<w.y+w.height;q++){const V=x([oe-W,q]);if(!V.allowOverlay&&V.kind!==Z.Boolean)continue;let Y;if(V.kind===Z.Custom){const ae=Kt(V),Ce=(A=ae==null?void 0:ae.provideEditor)==null?void 0:A.call(ae,V);(ae==null?void 0:ae.onDelete)!==void 0?Y=ae.onDelete(V):Ss(Ce)&&(Y=($=Ce==null?void 0:Ce.deletedValue)==null?void 0:$.call(Ce,V))}else if(Po(V)&&V.allowOverlay||V.kind===Z.Boolean){const ae=Kt(V);Y=(K=ae==null?void 0:ae.onDelete)==null?void 0:K.call(ae,V)}Y!==void 0&&!Lo(Y)&&Po(Y)&&de.push({location:[oe,q],value:Y})}Vn(de),(H=Dn.current)==null||H.damage(de.map(oe=>({cell:oe.location})))},[Rn,x,Kt,Vn,W]),ui=s!==void 0,Th=p.useCallback(w=>{var A,$;const K=()=>{w.stopPropagation(),w.preventDefault()},H={didMatch:!1},{bounds:de}=w,oe=X.columns,q=X.rows,V=io;if(!ui&&at(V.clear,w,H))fe(Ai,!1),Qt==null||Qt();else if(!ui&&at(V.selectAll,w,H))fe({columns:mt.empty(),rows:mt.empty(),current:{cell:((A=X.current)==null?void 0:A.cell)??[W,0],range:{x:W,y:0,width:T.length,height:Ye},rangeStack:[]}},!1);else if(at(V.search,w,H))($=c==null?void 0:c.current)==null||$.focus({preventScroll:!0}),il(!0);else if(at(V.delete,w,H)){const Ve=(ht==null?void 0:ht(X))??!0;if(Ve!==!1){const He=Ve===!0?X:Ve;if(He.current!==void 0){qo(He.current.range);for(const Ct of He.current.rangeStack)qo(Ct)}for(const Ct of He.rows)qo({x:W,y:Ct,width:T.length,height:1});for(const Ct of He.columns)qo({x:Ct,y:0,width:1,height:Ye})}}if(H.didMatch)return K(),!0;if(X.current===void 0)return!1;let[Y,ae]=X.current.cell;const[,Ce]=X.current.cell;let ve=!1,Le=!1;if(at(V.scrollToSelectedCell,w,H)?bl.current(Y-W,ae):me!=="none"&&at(V.selectColumn,w,H)?oe.hasIndex(Y)?ft(oe.remove(Y),void 0,!0):me==="single"?ft(mt.fromSingleSelection(Y),void 0,!0):ft(void 0,Y,!0):le!=="none"&&at(V.selectRow,w,H)?q.hasIndex(ae)?Ke(q.remove(ae),void 0,!0):le==="single"?Ke(mt.fromSingleSelection(ae),void 0,!0):Ke(void 0,ae,!0):!ui&&de!==void 0&&at(V.activateCell,w,H)?ae===Ye&&Gt?window.setTimeout(()=>{const Ve=fl(Y);wr(Ve??Y)},0):(O==null||O([Y-W,ae]),br(de,!0)):X.current.range.height>1&&at(V.downFill,w,H)?Eh():X.current.range.width>1&&at(V.rightFill,w,H)?Rh():at(V.goToNextPage,w,H)?ae+=Math.max(1,An.current.height-4):at(V.goToPreviousPage,w,H)?ae-=Math.max(1,An.current.height-4):at(V.goToFirstCell,w,H)?(a(void 0),ae=0,Y=0):at(V.goToLastCell,w,H)?(a(void 0),ae=Number.MAX_SAFE_INTEGER,Y=Number.MAX_SAFE_INTEGER):at(V.selectToFirstCell,w,H)?(a(void 0),Zn([-2,-2])):at(V.selectToLastCell,w,H)?(a(void 0),Zn([2,2])):ui?(at(V.closeOverlay,w,H)&&a(void 0),at(V.acceptOverlayDown,w,H)&&(a(void 0),ae++),at(V.acceptOverlayUp,w,H)&&(a(void 0),ae--),at(V.acceptOverlayLeft,w,H)&&(a(void 0),Y--),at(V.acceptOverlayRight,w,H)&&(a(void 0),Y++)):(at(V.goDownCell,w,H)?ae+=1:at(V.goUpCell,w,H)?ae-=1:at(V.goRightCell,w,H)?Y+=1:at(V.goLeftCell,w,H)?Y-=1:at(V.goDownCellRetainSelection,w,H)?(ae+=1,ve=!0):at(V.goUpCellRetainSelection,w,H)?(ae-=1,ve=!0):at(V.goRightCellRetainSelection,w,H)?(Y+=1,ve=!0):at(V.goLeftCellRetainSelection,w,H)?(Y-=1,ve=!0):at(V.goToLastRow,w,H)?ae=Ye-1:at(V.goToFirstRow,w,H)?ae=Number.MIN_SAFE_INTEGER:at(V.goToLastColumn,w,H)?Y=Number.MAX_SAFE_INTEGER:at(V.goToFirstColumn,w,H)?Y=Number.MIN_SAFE_INTEGER:(be==="rect"||be==="multi-rect")&&(at(V.selectGrowDown,w,H)?Zn([0,1]):at(V.selectGrowUp,w,H)?Zn([0,-1]):at(V.selectGrowRight,w,H)?Zn([1,0]):at(V.selectGrowLeft,w,H)?Zn([-1,0]):at(V.selectToLastRow,w,H)?Zn([0,2]):at(V.selectToFirstRow,w,H)?Zn([0,-2]):at(V.selectToLastColumn,w,H)?Zn([2,0]):at(V.selectToFirstColumn,w,H)&&Zn([-2,0])),Le=H.didMatch),Xn!==void 0&&Xn!=="normal"&&ae!==Ce){const Ve=Xn==="skip-up"||Xn==="skip"||Xn==="block",He=Xn==="skip-down"||Xn==="skip"||Xn==="block",Ct=ae<Ce;if(Ct&&Ve){for(;ae>=0&&Ko(ae).isGroupHeader;)ae--;ae<0&&(ae=Ce)}else if(!Ct&&He){for(;ae<Ye&&Ko(ae).isGroupHeader;)ae++;ae>=Ye&&(ae=Ce)}}const et=zo(Y,ae,!1,ve),pt=H.didMatch;return pt&&(et||!Le||oo)&&K(),pt},[Xn,ui,X,io,me,le,be,W,Ko,Ye,zo,fe,Qt,T.length,ht,oo,qo,ft,Ke,Gt,fl,wr,O,br,Eh,Rh,Zn]),di=p.useCallback(w=>{let A=!1;if(_e!==void 0&&_e({...w,cancel:()=>{A=!0}}),A||Th(w)||X.current===void 0)return;const[$,K]=X.current.cell,H=An.current;if(Ne&&!w.metaKey&&!w.ctrlKey&&X.current!==void 0&&w.key.length===1&&/[ -~]/g.test(w.key)&&w.bounds!==void 0&&Rr(x([$-W,Math.max(0,Math.min(K,Ye-1))]))){if((!Gt||K!==Ye)&&(H.y>K||K>H.y+H.height||H.x>$||$>H.x+H.width))return;br(w.bounds,!0,w.key),w.stopPropagation(),w.preventDefault()}},[Ne,_e,Th,X,x,W,Ye,Gt,br]),yy=p.useCallback((w,A)=>{const $=w.location[0]-W;if(w.kind==="header"&&(ie==null||ie($,{...w,preventDefault:A})),w.kind===Nn){if($<0)return;he==null||he($,{...w,preventDefault:A})}if(w.kind==="cell"){const[K,H]=w.location;re==null||re([$,H],{...w,preventDefault:A}),dp(X,w.location)||zo(K,H,!1,!1)}},[X,re,he,ie,W,zo]),hs=p.useCallback(async w=>{var A,$,K;if(!io.paste)return;function H(Y,ae,Ce,ve){var Le,et;const pt=typeof Ce=="object"?(Ce==null?void 0:Ce.join(`
172
+ `&&(n.push(o),o=[])),i=t.None);break}l++}return r<e.length&&o.push(wu(e.slice(r,e.length))),n.push(o),n.map(s=>s.map(a=>({rawValue:a,formatted:a,format:"string"})))}function yu(e,t,n){var o;const r=hg(e,t),i=a=>{var c;(c=window.navigator.clipboard)==null||c.writeText(a)},l=(a,c)=>{var u;return((u=window.navigator.clipboard)==null?void 0:u.write)===void 0?!1:(window.navigator.clipboard.write([new ClipboardItem({"text/plain":new Blob([a],{type:"text/plain"}),"text/html":new Blob([c],{type:"text/html"})})]),!0)},s=(a,c)=>{var u,d;try{if(n===void 0||n.clipboardData===null)throw new Error("No clipboard data");(u=n==null?void 0:n.clipboardData)==null||u.setData("text/plain",a),(d=n==null?void 0:n.clipboardData)==null||d.setData("text/html",c)}catch{l(a,c)||i(a)}};((o=window.navigator.clipboard)==null?void 0:o.write)!==void 0||(n==null?void 0:n.clipboardData)!==void 0?s(r.textPlain,r.textHtml):i(r.textPlain),n==null||n.preventDefault()}function xu(e){return e!==!0}function Cu(e){return typeof e=="string"?e:`${e}px`}const gg=()=>e=>e.innerWidth,mg=()=>e=>e.innerHeight,vg=sn("div")({name:"Wrapper",class:"gdg-wmyidgi",propsAsIs:!1,vars:{"wmyidgi-0":[gg()],"wmyidgi-1":[mg()]}}),bg=e=>{const{inWidth:t,inHeight:n,children:o,...r}=e;return p.createElement(vg,{innerHeight:Cu(n),innerWidth:Cu(t),...r},o)},wg=2,yg=1300;function xg(e,t,n){const o=ne.useRef(0),[r,i]=e??[0,0];ne.useEffect(()=>{if(r===0&&i===0){o.current=0;return}let l=!1,s=0;const a=c=>{var u;if(!l){if(s===0)s=c;else{const d=c-s;o.current=Math.min(1,o.current+d/yg);const f=o.current**1.618*d*wg;(u=t.current)==null||u.scrollBy(r*f,i*f),s=c,n==null||n()}window.requestAnimationFrame(a)}};return window.requestAnimationFrame(a),()=>{l=!0}},[t,r,i,n])}function Cg({rowHeight:e,headerHeight:t,groupHeaderHeight:n,theme:o,overscrollX:r,overscrollY:i,scaleToRem:l,remSize:s}){const[a,c,u,d,f,h]=ne.useMemo(()=>{if(!l||s===16)return[e,t,n,o,r,i];const g=s/16,m=e,b=$c();return[typeof m=="number"?m*g:y=>Math.ceil(m(y)*g),Math.ceil(t*g),Math.ceil(n*g),{...o,headerIconSize:((o==null?void 0:o.headerIconSize)??b.headerIconSize)*g,cellHorizontalPadding:((o==null?void 0:o.cellHorizontalPadding)??b.cellHorizontalPadding)*g,cellVerticalPadding:((o==null?void 0:o.cellVerticalPadding)??b.cellVerticalPadding)*g},Math.ceil((r??0)*g),Math.ceil((i??0)*g)]},[n,t,r,i,s,e,l,o]);return{rowHeight:a,headerHeight:c,groupHeaderHeight:u,theme:d,overscrollX:f,overscrollY:h}}const Mo={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 st(e,t){return e===!0?t:e===!1?"":e}function ku(e){const t=Oi.value;return{activateCell:st(e.activateCell," |Enter|shift+Enter"),clear:st(e.clear,"any+Escape"),closeOverlay:st(e.closeOverlay,"any+Escape"),acceptOverlayDown:st(e.acceptOverlayDown,"Enter"),acceptOverlayUp:st(e.acceptOverlayUp,"shift+Enter"),acceptOverlayLeft:st(e.acceptOverlayLeft,"shift+Tab"),acceptOverlayRight:st(e.acceptOverlayRight,"Tab"),copy:e.copy,cut:e.cut,delete:st(e.delete,t?"Backspace|Delete":"Delete"),downFill:st(e.downFill,"primary+_68"),scrollToSelectedCell:st(e.scrollToSelectedCell,"primary+Enter"),goDownCell:st(e.goDownCell,"ArrowDown"),goDownCellRetainSelection:st(e.goDownCellRetainSelection,"alt+ArrowDown"),goLeftCell:st(e.goLeftCell,"ArrowLeft|shift+Tab"),goLeftCellRetainSelection:st(e.goLeftCellRetainSelection,"alt+ArrowLeft"),goRightCell:st(e.goRightCell,"ArrowRight|Tab"),goRightCellRetainSelection:st(e.goRightCellRetainSelection,"alt+ArrowRight"),goUpCell:st(e.goUpCell,"ArrowUp"),goUpCellRetainSelection:st(e.goUpCellRetainSelection,"alt+ArrowUp"),goToFirstCell:st(e.goToFirstCell,"primary+Home"),goToFirstColumn:st(e.goToFirstColumn,"Home|primary+ArrowLeft"),goToFirstRow:st(e.goToFirstRow,"primary+ArrowUp"),goToLastCell:st(e.goToLastCell,"primary+End"),goToLastColumn:st(e.goToLastColumn,"End|primary+ArrowRight"),goToLastRow:st(e.goToLastRow,"primary+ArrowDown"),goToNextPage:st(e.goToNextPage,"PageDown"),goToPreviousPage:st(e.goToPreviousPage,"PageUp"),paste:e.paste,rightFill:st(e.rightFill,"primary+_82"),search:st(e.search,"primary+f"),selectAll:st(e.selectAll,"primary+a"),selectColumn:st(e.selectColumn,"ctrl+ "),selectGrowDown:st(e.selectGrowDown,"shift+ArrowDown"),selectGrowLeft:st(e.selectGrowLeft,"shift+ArrowLeft"),selectGrowRight:st(e.selectGrowRight,"shift+ArrowRight"),selectGrowUp:st(e.selectGrowUp,"shift+ArrowUp"),selectRow:st(e.selectRow,"shift+ "),selectToFirstCell:st(e.selectToFirstCell,"primary+shift+Home"),selectToFirstColumn:st(e.selectToFirstColumn,"primary+shift+ArrowLeft"),selectToFirstRow:st(e.selectToFirstRow,"primary+shift+ArrowUp"),selectToLastCell:st(e.selectToLastCell,"primary+shift+End"),selectToLastColumn:st(e.selectToLastColumn,"primary+shift+ArrowRight"),selectToLastRow:st(e.selectToLastRow,"primary+shift+ArrowDown")}}function kg(e){const t=Pf(e);return ne.useMemo(()=>{if(t===void 0)return ku(Mo);const n={...t,goToNextPage:(t==null?void 0:t.goToNextPage)??(t==null?void 0:t.pageDown)??Mo.goToNextPage,goToPreviousPage:(t==null?void 0:t.goToPreviousPage)??(t==null?void 0:t.pageUp)??Mo.goToPreviousPage,goToFirstCell:(t==null?void 0:t.goToFirstCell)??(t==null?void 0:t.first)??Mo.goToFirstCell,goToLastCell:(t==null?void 0:t.goToLastCell)??(t==null?void 0:t.last)??Mo.goToLastCell,selectToFirstCell:(t==null?void 0:t.selectToFirstCell)??(t==null?void 0:t.first)??Mo.selectToFirstCell,selectToLastCell:(t==null?void 0:t.selectToLastCell)??(t==null?void 0:t.last)??Mo.selectToLastCell};return ku({...Mo,...n})},[t])}function Sg(e){function t(n,o,r){if(typeof n=="number")return{headerIndex:n,isCollapsed:!1,depth:o,path:r};const i={headerIndex:n.headerIndex,isCollapsed:n.isCollapsed,depth:o,path:r};return n.subGroups!==void 0&&(i.subGroups=n.subGroups.map((l,s)=>t(l,o+1,[...r,s])).sort((l,s)=>l.headerIndex-s.headerIndex)),i}return e.map((n,o)=>t(n,0,[o])).sort((n,o)=>n.headerIndex-o.headerIndex)}function ua(e,t){const n=[];function o(l,s,a=!1){let c=s!==null?s-l.headerIndex:t-l.headerIndex;if(l.subGroups!==void 0&&(c=l.subGroups[0].headerIndex-l.headerIndex),c--,n.push({headerIndex:l.headerIndex,contentIndex:-1,skip:a,isCollapsed:l.isCollapsed,depth:l.depth,path:l.path,rows:c}),l.subGroups)for(let u=0;u<l.subGroups.length;u++){const d=u<l.subGroups.length-1?l.subGroups[u+1].headerIndex:s;o(l.subGroups[u],d,a||l.isCollapsed)}}const r=Sg(e.groups);for(let l=0;l<r.length;l++){const s=l<r.length-1?r[l+1].headerIndex:null;o(r[l],s)}let i=0;for(const l of n)l.contentIndex=i,i+=l.rows;return n.filter(l=>l.skip===!1).map(l=>{const{skip:s,...a}=l;return a})}function zi(e,t){if(t===void 0||ua.length===0)return{path:[e],originalIndex:e,isGroupHeader:!1,groupIndex:e,contentIndex:e,groupRows:-1};let n=e;for(const o of t){if(n===0)return{path:[...o.path,-1],originalIndex:o.headerIndex,isGroupHeader:!0,groupIndex:-1,contentIndex:-1,groupRows:o.rows};if(n--,!o.isCollapsed){if(n<o.rows)return{path:[...o.path,n],originalIndex:o.headerIndex+n,isGroupHeader:!1,groupIndex:n,contentIndex:o.contentIndex+n,groupRows:o.rows};n-=o.rows}}return{path:[e],originalIndex:e,isGroupHeader:!1,groupIndex:e,contentIndex:e,groupRows:-1}}function Mg(e,t,n,o){const r=ne.useMemo(()=>e===void 0?void 0:ua(e,t),[e,t]),i=ne.useMemo(()=>r===void 0?t:r.reduce((c,u)=>c+(u.isCollapsed?1:u.rows+1),0),[r,t]),l=ne.useMemo(()=>e===void 0||typeof n=="number"&&e.height===n?n:c=>{const{isGroupHeader:u}=zi(c,r);return u?e.height:typeof n=="number"?n:n(c)},[r,e,n]),s=ne.useCallback(c=>{if(r===void 0)return c;let u=c;for(const d of r){if(u===0)return;if(u--,!d.isCollapsed){if(u<d.rows)return d.contentIndex+u;u-=d.rows}}return c},[r]),a=Ao(o??(e==null?void 0:e.themeOverride),ne.useCallback(c=>{if(e===void 0)return o==null?void 0:o(c,c,c);if(o===void 0&&(e==null?void 0:e.themeOverride)===void 0)return;const{isGroupHeader:u,contentIndex:d,groupIndex:f}=zi(c,r);return u?e.themeOverride:o==null?void 0:o(c,f,d)},[r,o,e]));return e===void 0?{rowHeight:l,rows:t,rowNumberMapper:s,getRowThemeOverride:a}:{rowHeight:l,rows:i,rowNumberMapper:s,getRowThemeOverride:a}}function Rg(e,t){const n=ne.useMemo(()=>e===void 0?void 0:ua(e,t),[e,t]);return{getRowGroupingForPath:Mu,updateRowGroupingByPath:Su,mapper:ne.useCallback(o=>{if(typeof o=="number")return zi(o,n);const r=zi(o[1],n);return{...r,originalIndex:[o[0],r.originalIndex]}},[n])}}function Su(e,t,n){const[o,...r]=t;return r[0]===-1?e.map((i,l)=>l===o?{...i,...n}:i):e.map((i,l)=>l===o?{...i,subGroups:Su(i.subGroups??[],r,n)}:i)}function Mu(e,t){const[n,...o]=t;return o[0]===-1?e[n]:Mu(e[n].subGroups??[],o)}function Eg(e,t){const[n]=p.useState(()=>({value:e,callback:t,facade:{get current(){return n.value},set current(o){const r=n.value;r!==o&&(n.value=o,n.callback(o,r))}}}));return n.callback=t,n.facade}function Ig(e,t,n,o,r){const[i,l]=p.useMemo(()=>[t!==void 0&&typeof n=="number"?Math.floor(t/n):0,t!==void 0&&typeof n=="number"?-(t%n):0],[t,n]),s=p.useMemo(()=>({x:o.current.x,y:i,width:o.current.width??1,height:o.current.height??1,ty:l}),[o,l,i]),[a,c,u]=Lf(s),d=p.useRef(r);d.current=r;const f=Eg(null,m=>{m!==null&&t!==void 0?m.scrollTop=t:m!==null&&e!==void 0&&(m.scrollLeft=e)}),h=(a.height??1)>1;p.useLayoutEffect(()=>{if(t!==void 0&&f.current!==null&&h){if(f.current.scrollTop===t)return;f.current.scrollTop=t,f.current.scrollTop!==t&&u(),d.current()}},[t,h,u,f]);const g=(a.width??1)>1;return p.useLayoutEffect(()=>{if(e!==void 0&&f.current!==null&&g){if(f.current.scrollLeft===e)return;f.current.scrollLeft=e,f.current.scrollLeft!==e&&u(),d.current()}},[e,g,u,f]),{visibleRegion:a,setVisibleRegion:c,scrollRef:f}}const Tg=p.lazy(async()=>await ms(()=>import("./data-grid-overlay-editor-BDv7jlce.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13])));let Og=0;function Dg(e){return Hp(qc(qc(e).filter(t=>t.span!==void 0).map(t=>{var n,o;return ao((((n=t.span)==null?void 0:n[0])??0)+1,(((o=t.span)==null?void 0:o[1])??0)+1)})))}function Li(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 Pi={kind:Z.Loading,allowOverlay:!1},Ai={columns:mt.empty(),rows:mt.empty(),current:void 0},zg=(e,t)=>{var n,o,r;const[i,l]=p.useState(Ai),[s,a]=p.useState(),c=p.useRef(null),u=p.useRef(null),[d,f]=p.useState(),h=p.useRef(),g=typeof window>"u"?null:window,{imageEditorOverride:m,getRowThemeOverride:b,markdownDivCreateNode:y,width:v,height:I,columns:T,rows:k,getCellContent:x,onCellClicked:L,onCellActivated:O,onFillPattern:R,onFinishedEditing:P,coercePasteValue:M,drawHeader:S,drawCell:E,editorBloom:D,onHeaderClicked:C,onColumnProposeMove:G,rangeSelectionColumnSpanning:B=!0,spanRangeBehavior:J="default",onGroupHeaderClicked:se,onCellContextMenu:re,className:U,onHeaderContextMenu:ie,getCellsForSelection:ce,onGroupHeaderContextMenu:he,onGroupHeaderRenamed:pe,onCellEdited:Q,onCellsEdited:_,onSearchResultsChanged:z,searchResults:j,onSearchValueChange:ge,searchValue:ke,onKeyDown:_e,onKeyUp:xe,keybindings:De,editOnType:Ne=!0,onRowAppended:tt,onColumnMoved:Lt,validateCell:kt,highlightRegions:we,rangeSelect:be="rect",columnSelect:me="multi",rowSelect:le="multi",rangeSelectionBlending:Ee="exclusive",columnSelectionBlending:Ie="exclusive",rowSelectionBlending:Ue="exclusive",onDelete:nt,onDragStart:St,onMouseMove:ue,onPaste:rt,copyHeaders:lt=!1,freezeColumns:Re=0,cellActivationBehavior:Et="second-click",rowSelectionMode:jt="auto",onHeaderMenuClick:Be,onHeaderIndicatorClick:ot,getGroupDetails:yt,rowGrouping:Mt,onSearchClose:Xt,onItemHovered:cn,onSelectionCleared:Qt,showSearch:Ht,onVisibleRegionChanged:It,gridSelection:Pt,onGridSelectionChange:In,minColumnWidth:Cn=50,maxColumnWidth:Qe=500,maxColumnAutoWidth:un,provideEditor:pn,trailingRowOptions:xt,freezeTrailingRows:qt=0,allowedFillDirections:ct="orthogonal",scrollOffsetX:Ft,scrollOffsetY:Ut,verticalBorder:rn,onDragOverCell:Tt,onDrop:Zt,onColumnResize:qe,onColumnResizeEnd:At,onColumnResizeStart:kn,customRenderers:Ot,fillHandle:Bt,experimental:Vt,fixedShadowX:uo,fixedShadowY:Bn,headerIcons:N,imageWindowLoader:Ze,initialSize:ee,isDraggable:ze,onDragLeave:en,onRowMoved:Yt,overscrollX:ln,overscrollY:Sn,preventDiagonalScrolling:tn,rightElement:gn,rightElementProps:wn,trapFocus:oo=!1,smoothScrollX:tl,smoothScrollY:Ga,scaleToRem:Ka=!1,rowHeight:ar=34,headerHeight:ho=36,groupHeaderHeight:Xa=ho,theme:qa,isOutsideClick:nl,renderers:sr,resizeIndicator:cr,scrollToActiveCell:ei=!0,drawFocusRing:ur=!0}=e,ti=ur==="no-editor"?s===void 0:ur,mn=typeof e.rowMarkers=="string"?void 0:e.rowMarkers,dn=(mn==null?void 0:mn.kind)??e.rowMarkers??"none",Eo=(mn==null?void 0:mn.width)??e.rowMarkerWidth,dr=(mn==null?void 0:mn.startIndex)??e.rowMarkerStartIndex??1,Io=(mn==null?void 0:mn.theme)??e.rowMarkerTheme,hr=mn==null?void 0:mn.headerTheme,ni=mn==null?void 0:mn.headerAlwaysVisible,oi=le!=="multi",jo=(mn==null?void 0:mn.checkboxStyle)??"square",To=Math.max(Cn,20),fr=Math.max(Qe,To),ol=Math.max(un??fr,To),ri=p.useMemo(()=>typeof window>"u"?{fontSize:"16px"}:window.getComputedStyle(document.documentElement),[]),{rows:Ye,rowNumberMapper:ii,rowHeight:Za,getRowThemeOverride:fo}=Mg(Mt,k,ar,b),Ja=p.useMemo(()=>Number.parseFloat(ri.fontSize),[ri]),{rowHeight:ro,headerHeight:li,groupHeaderHeight:pr,theme:rl,overscrollX:Qa,overscrollY:es}=Cg({groupHeaderHeight:Xa,headerHeight:ho,overscrollX:ln,overscrollY:Sn,remSize:Ja,rowHeight:Za,scaleToRem:Ka,theme:qa}),io=kg(De),po=Eo??(k>1e4?48:k>1e3?44:k>100?36:32),Mn=dn!=="none",W=Mn?1:0,Gt=tt!==void 0,Uo=(xt==null?void 0:xt.sticky)===!0,[gr,il]=p.useState(!1),mr=Ht??gr,ts=p.useCallback(()=>{Xt!==void 0?Xt():il(!1)},[Xt]),X=p.useMemo(()=>Pt===void 0?void 0:Li(Pt,W),[Pt,W])??i,F=p.useRef();F.current===void 0&&(F.current=new AbortController),p.useEffect(()=>()=>F==null?void 0:F.current.abort(),[]);const[te,Te]=lg(ce,x,W,F.current,Ye),Se=p.useCallback((w,A,$)=>{if(kt===void 0)return!0;const K=[w[0]-W,w[1]];return kt==null?void 0:kt(K,A,$)},[W,kt]),Ae=p.useRef(Pt),fe=p.useCallback((w,A)=>{A&&(w=fg(w,te,W,J,F.current)),In!==void 0?(Ae.current=Li(w,-W),In(Ae.current)):l(w)},[In,te,W,J]),Pe=Ao(qe,p.useCallback((w,A,$,K)=>{qe==null||qe(T[$-W],A,$-W,K)},[qe,W,T])),it=Ao(At,p.useCallback((w,A,$,K)=>{At==null||At(T[$-W],A,$-W,K)},[At,W,T])),bt=Ao(kn,p.useCallback((w,A,$,K)=>{kn==null||kn(T[$-W],A,$-W,K)},[kn,W,T])),Dt=Ao(S,p.useCallback((w,A)=>(S==null?void 0:S({...w,columnIndex:w.columnIndex-W},A))??!1,[S,W])),ye=Ao(E,p.useCallback((w,A)=>(E==null?void 0:E({...w,col:w.col-W},A))??!1,[E,W])),ht=p.useCallback(w=>{if(nt!==void 0){const A=nt(Li(w,-W));return typeof A=="boolean"?A:Li(A,W)}return!0},[nt,W]),[Je,Ke,ft]=ig(X,fe,Ee,Ie,Ue,be,B),_t=p.useMemo(()=>so($c(),rl),[rl]),[nn,Un]=p.useState([0,0,0]),Yn=p.useMemo(()=>{if(sr===void 0)return{};const w={};for(const A of sr)w[A.kind]=A;return w},[sr]),Kt=p.useCallback(w=>w.kind!==Z.Custom?Yn[w.kind]:Ot==null?void 0:Ot.find(A=>A.isMatch(w)),[Ot,Yn]);let{sizedColumns:ut,nonGrowWidth:Tn}=Ep(T,Ye,Te,nn[0]-(W===0?0:po)-nn[2],To,ol,_t,Kt,F.current);dn!=="none"&&(Tn+=po);const On=p.useMemo(()=>ut.some(w=>w.group!==void 0),[ut]),Gn=On?li+pr:li,Kn=X.rows.length,vr=dn==="none"?void 0:Kn===0?!1:Kn===Ye?!0:void 0,wt=p.useMemo(()=>dn==="none"?ut:[{title:"",width:po,icon:void 0,hasMenu:!1,style:"normal",themeOverride:Io,rowMarker:jo,rowMarkerChecked:vr,headerRowMarkerTheme:hr,headerRowMarkerAlwaysVisible:ni,headerRowMarkerDisabled:oi},...ut],[dn,ut,po,Io,jo,vr,hr,ni,oi]),An=p.useRef({height:1,width:1,x:0,y:0}),ll=p.useRef(!1),{setVisibleRegion:wh,visibleRegion:Yo,scrollRef:Jt}=Ig(Ft,Ut,ro,An,()=>ll.current=!0);An.current=Yo;const iy=Yo.x+W,al=Yo.y,Dn=p.useRef(null),Rn=p.useCallback(w=>{var A;w===!0?(A=Dn.current)==null||A.focus():window.requestAnimationFrame(()=>{var $;($=Dn.current)==null||$.focus()})},[]),yn=Gt?Ye+1:Ye,Vn=p.useCallback(w=>{const A=W===0?w:w.map(K=>({...K,location:[K.location[0]-W,K.location[1]]})),$=_==null?void 0:_(A);if($!==!0)for(const K of A)Q==null||Q(K.location,K.value);return $},[Q,_,W]),[Go,ns]=p.useState(),sl=X.current!==void 0&&X.current.range.width*X.current.range.height>1?X.current.range:void 0,cl=ti?(n=X.current)==null?void 0:n.cell:void 0,ul=cl==null?void 0:cl[0],dl=cl==null?void 0:cl[1],ly=p.useMemo(()=>{if((we===void 0||we.length===0)&&(sl??ul??dl??Go)===void 0)return;const w=[];if(we!==void 0)for(const A of we){const $=wt.length-A.range.x-W;$>0&&w.push({color:A.color,range:{...A.range,x:A.range.x+W,width:Math.min($,A.range.width)},style:A.style})}return Go!==void 0&&w.push({color:No(_t.accentColor,0),range:Go,style:"dashed"}),sl!==void 0&&w.push({color:No(_t.accentColor,.5),range:sl,style:"solid-outline"}),ul!==void 0&&dl!==void 0&&w.push({color:_t.accentColor,range:{x:ul,y:dl,width:1,height:1},style:"solid-outline"}),w.length>0?w:void 0},[Go,sl,ul,dl,we,wt.length,_t.accentColor,W]),yh=p.useRef(wt);yh.current=wt;const Hn=p.useCallback(([w,A],$=!1)=>{var K,H,de,oe,q,V,Y;const ae=Gt&&A===yn-1;if(w===0&&Mn){if(ae)return Pi;const Ce=ii(A);return Ce===void 0?Pi:{kind:Fn.Marker,allowOverlay:!1,checkboxStyle:jo,checked:(X==null?void 0:X.rows.hasIndex(A))===!0,markerKind:dn==="clickable-number"?"number":dn,row:dr+Ce,drawHandle:Yt!==void 0,cursor:dn==="clickable-number"?"pointer":void 0}}else if(ae){const Ce=w===W?(xt==null?void 0:xt.hint)??"":"",ve=yh.current[w];if(((K=ve==null?void 0:ve.trailingRowOptions)==null?void 0:K.disabled)===!0)return Pi;{const Le=((H=ve==null?void 0:ve.trailingRowOptions)==null?void 0:H.hint)??Ce,et=((de=ve==null?void 0:ve.trailingRowOptions)==null?void 0:de.addIcon)??(xt==null?void 0:xt.addIcon);return{kind:Fn.NewRow,hint:Le,allowOverlay:!1,icon:et}}}else{const Ce=w-W;if($||(Vt==null?void 0:Vt.strict)===!0){const Le=An.current,et=Le.x>Ce||Ce>Le.x+Le.width||Le.y>A||A>Le.y+Le.height||A>=rs.current,pt=Ce===((q=(oe=Le.extras)==null?void 0:oe.selected)==null?void 0:q[0])&&A===((V=Le.extras)==null?void 0:V.selected[1]);let Ve=!1;if(((Y=Le.extras)==null?void 0:Y.freezeRegions)!==void 0){for(const He of Le.extras.freezeRegions)if($o(He,Ce,A)){Ve=!0;break}}if(et&&!pt&&!Ve)return Pi}let ve=x([Ce,A]);return W!==0&&ve.span!==void 0&&(ve={...ve,span:[ve.span[0]+W,ve.span[1]+W]}),ve}},[Gt,yn,Mn,ii,jo,X==null?void 0:X.rows,dn,dr,Yt,W,xt==null?void 0:xt.hint,xt==null?void 0:xt.addIcon,Vt==null?void 0:Vt.strict,x]),os=p.useCallback(w=>{let A=(yt==null?void 0:yt(w))??{name:w};return pe!==void 0&&w!==""&&(A={icon:A.icon,name:A.name,overrideTheme:A.overrideTheme,actions:[...A.actions??[],{title:"Rename",icon:"renameIcon",onClick:$=>ls({group:A.name,bounds:$.bounds})}]}),A},[yt,pe]),hl=p.useCallback(w=>{var A;const[$,K]=w.cell,H=wt[$],de=(H==null?void 0:H.group)!==void 0?(A=os(H.group))==null?void 0:A.overrideTheme:void 0,oe=H==null?void 0:H.themeOverride,q=fo==null?void 0:fo(K);a({...w,theme:so(_t,de,oe,q,w.content.themeOverride)})},[fo,wt,os,_t]),br=p.useCallback((w,A,$)=>{var K;if(X.current===void 0)return;const[H,de]=X.current.cell,oe=Hn([H,de]);if(oe.kind!==Z.Boolean&&oe.allowOverlay){let q=oe;if($!==void 0)switch(q.kind){case Z.Number:{const V=nf(()=>$==="-"?-0:Number.parseFloat($),0);q={...q,data:Number.isNaN(V)?0:V};break}case Z.Text:case Z.Markdown:case Z.Uri:q={...q,data:$};break}hl({target:w,content:q,initialValue:$,cell:[H,de],highlight:$===void 0,forceEditMode:$!==void 0})}else oe.kind===Z.Boolean&&A&&oe.readonly!==!0&&(Vn([{location:X.current.cell,value:{...oe,data:xu(oe.data)}}]),(K=Dn.current)==null||K.damage([{cell:X.current.cell}]))},[Hn,X,Vn,hl]),xh=p.useCallback((w,A)=>{var $;const K=($=Dn.current)==null?void 0:$.getBounds(w,A);if(K===void 0||Jt.current===null)return;const H=Hn([w,A]);H.allowOverlay&&hl({target:K,content:H,initialValue:void 0,highlight:!0,cell:[w,A],forceEditMode:!0})},[Hn,Jt,hl]),an=p.useCallback((w,A,$="both",K=0,H=0,de=void 0)=>{if(Jt.current!==null){const oe=Dn.current,q=u.current,V=typeof w!="number"?w.unit==="cell"?w.amount:void 0:w,Y=typeof A!="number"?A.unit==="cell"?A.amount:void 0:A,ae=typeof w!="number"&&w.unit==="px"?w.amount:void 0,Ce=typeof A!="number"&&A.unit==="px"?A.amount:void 0;if(oe!==null&&q!==null){let ve={x:0,y:0,width:0,height:0},Le=0,et=0;if((V!==void 0||Y!==void 0)&&(ve=oe.getBounds((V??0)+W,Y??0)??ve,ve.width===0||ve.height===0))return;const pt=q.getBoundingClientRect(),Ve=pt.width/q.offsetWidth;if(ae!==void 0&&(ve={...ve,x:ae-pt.left-Jt.current.scrollLeft,width:1}),Ce!==void 0&&(ve={...ve,y:Ce+pt.top-Jt.current.scrollTop,height:1}),ve!==void 0){const He={x:ve.x-K,y:ve.y-H,width:ve.width+2*K,height:ve.height+2*H};let Ct=0;for(let fs=0;fs<Re;fs++)Ct+=ut[fs].width;let vn=0;const hn=qt+(Uo?1:0);hn>0&&(vn=Bo(yn,hn,ro));let Jn=Ct*Ve+pt.left+W*po*Ve,lo=pt.right,Qn=pt.top+Gn*Ve,go=pt.bottom-vn*Ve;const wl=ve.width+K*2;switch(de==null?void 0:de.hAlign){case"start":lo=Jn+wl;break;case"end":Jn=lo-wl;break;case"center":Jn=Math.floor((Jn+lo)/2)-wl/2,lo=Jn+wl;break}const yl=ve.height+H*2;switch(de==null?void 0:de.vAlign){case"start":go=Qn+yl;break;case"end":Qn=go-yl;break;case"center":Qn=Math.floor((Qn+go)/2)-yl/2,go=Qn+yl;break}Jn>He.x?Le=He.x-Jn:lo<He.x+He.width&&(Le=He.x+He.width-lo),Qn>He.y?et=He.y-Qn:go<He.y+He.height&&(et=He.y+He.height-go),$==="vertical"||typeof w=="number"&&w<Re?Le=0:($==="horizontal"||typeof A=="number"&&A>=yn-hn)&&(et=0),(Le!==0||et!==0)&&(Ve!==1&&(Le/=Ve,et/=Ve),Jt.current.scrollTo(Le+Jt.current.scrollLeft,et+Jt.current.scrollTop))}}}},[W,qt,po,Jt,Gn,Re,ut,yn,Uo,ro]),Ch=p.useRef(xh),kh=p.useRef(x),rs=p.useRef(Ye);Ch.current=xh,kh.current=x,rs.current=Ye;const wr=p.useCallback(async(w,A=!0)=>{var $;const K=wt[w];if((($=K==null?void 0:K.trailingRowOptions)==null?void 0:$.disabled)===!0)return;const H=tt==null?void 0:tt();let de,oe=!0;H!==void 0&&(de=await H,de==="top"&&(oe=!1),typeof de=="number"&&(oe=!1));let q=0;const V=()=>{if(rs.current<=Ye){q<500&&window.setTimeout(V,q),q=50+q*2;return}const Y=typeof de=="number"?de:oe?Ye:0;bl.current(w-W,Y),Je({cell:[w,Y],range:{x:w,y:Y,width:1,height:1}},!1,!1,"edit");const ae=kh.current([w-W,Y]);ae.allowOverlay&&Rr(ae)&&ae.readonly!==!0&&A&&window.setTimeout(()=>{Ch.current(w,Y)},0)};V()},[wt,tt,W,Ye,Je]),fl=p.useCallback(w=>{var A,$;const K=(($=(A=ut[w])==null?void 0:A.trailingRowOptions)==null?void 0:$.targetColumn)??(xt==null?void 0:xt.targetColumn);if(typeof K=="number")return K+(Mn?1:0);if(typeof K=="object"){const H=T.indexOf(K);if(H>=0)return H+(Mn?1:0)}},[ut,T,Mn,xt==null?void 0:xt.targetColumn]),Oo=p.useRef(),yr=p.useRef(),ai=p.useCallback((w,A)=>{var $;const[K,H]=A;return so(_t,($=wt[K])==null?void 0:$.themeOverride,fo==null?void 0:fo(H),w.themeOverride)},[fo,wt,_t]),{mapper:Ko}=Rg(Mt,k),Xn=Mt==null?void 0:Mt.navigationBehavior,si=p.useCallback(w=>{var A,$,K;const H=Oi.value?w.metaKey:w.ctrlKey,de=H&&le==="multi",oe=H&&me==="multi",[q,V]=w.location,Y=X.columns,ae=X.rows,[Ce,ve]=((A=X.current)==null?void 0:A.cell)??[];if(w.kind==="cell"){if(yr.current=void 0,Xo.current=[q,V],q===0&&Mn){if(Gt===!0&&V===Ye||dn==="number"||le==="none")return;const Le=Hn(w.location);if(Le.kind!==Fn.Marker)return;if(Yt!==void 0){const Ve=Kt(Le);zn((Ve==null?void 0:Ve.kind)===Fn.Marker);const He=($=Ve==null?void 0:Ve.onClick)==null?void 0:$.call(Ve,{...w,cell:Le,posX:w.localEventX,posY:w.localEventY,bounds:w.bounds,theme:ai(Le,w.location),preventDefault:()=>{}});if(He===void 0||He.checked===Le.checked)return}a(void 0),Rn();const et=ae.hasIndex(V),pt=Oo.current;if(le==="multi"&&(w.shiftKey||w.isLongTouch===!0)&&pt!==void 0&&ae.hasIndex(pt)){const Ve=[Math.min(pt,V),Math.max(pt,V)+1];de||jt==="multi"?Ke(void 0,Ve,!0):Ke(mt.fromSingleSelection(Ve),void 0,de)}else le==="multi"&&(de||w.isTouch||jt==="multi")?et?Ke(ae.remove(V),void 0,!0):(Ke(void 0,V,!0),Oo.current=V):et&&ae.length===1?Ke(mt.empty(),void 0,H):(Ke(mt.fromSingleSelection(V),void 0,H),Oo.current=V)}else if(q>=W&&Gt&&V===Ye){const Le=fl(q);wr(Le??q)}else if(Ce!==q||ve!==V){const Le=Hn(w.location),et=Kt(Le);if((et==null?void 0:et.onSelect)!==void 0){let He=!1;if(et.onSelect({...w,cell:Le,posX:w.localEventX,posY:w.localEventY,bounds:w.bounds,preventDefault:()=>He=!0,theme:ai(Le,w.location)}),He)return}if(Xn==="block"&&Ko(V).isGroupHeader)return;const pt=Uo&&V===Ye,Ve=Uo&&X!==void 0&&((K=X.current)==null?void 0:K.cell[1])===Ye;if((w.shiftKey||w.isLongTouch===!0)&&Ce!==void 0&&ve!==void 0&&X.current!==void 0&&!Ve){if(pt)return;const He=Math.min(q,Ce),Ct=Math.max(q,Ce),vn=Math.min(V,ve),hn=Math.max(V,ve);Je({...X.current,range:{x:He,y:vn,width:Ct-He+1,height:hn-vn+1}},!0,H,"click"),Oo.current=void 0,Rn()}else Je({cell:[q,V],range:{x:q,y:V,width:1,height:1}},!0,H,"click"),Oo.current=void 0,a(void 0),Rn()}}else if(w.kind==="header")if(Xo.current=[q,V],a(void 0),Mn&&q===0)Oo.current=void 0,yr.current=void 0,le==="multi"&&(ae.length!==Ye?Ke(mt.fromSingleSelection([0,Ye]),void 0,H):Ke(mt.empty(),void 0,H),Rn());else{const Le=yr.current;if(me==="multi"&&(w.shiftKey||w.isLongTouch===!0)&&Le!==void 0&&Y.hasIndex(Le)){const et=[Math.min(Le,q),Math.max(Le,q)+1];oe?ft(void 0,et,H):ft(mt.fromSingleSelection(et),void 0,H)}else oe?(Y.hasIndex(q)?ft(Y.remove(q),void 0,H):ft(void 0,q,H),yr.current=q):me!=="none"&&(ft(mt.fromSingleSelection(q),void 0,H),yr.current=q);Oo.current=void 0,Rn()}else w.kind===Nn?Xo.current=[q,V]:w.kind===Di&&!w.isMaybeScrollbar&&(fe(Ai,!1),a(void 0),Rn(),Qt==null||Qt(),Oo.current=void 0,yr.current=void 0)},[le,me,X,Mn,W,Gt,Ye,dn,Hn,Yt,Rn,jt,Kt,ai,Ke,fl,wr,Xn,Ko,Uo,Je,ft,fe,Qt]),ci=p.useRef(!1),Xo=p.useRef(),Sh=p.useRef(Yo),qn=p.useRef(),ay=p.useCallback(w=>{if(xr.current=!1,Sh.current=An.current,w.button!==0&&w.button!==1){qn.current=void 0;return}const A=performance.now();qn.current={button:w.button,time:A,location:w.location},(w==null?void 0:w.kind)==="header"&&(ci.current=!0);const $=w.kind==="cell"&&w.isFillHandle;!$&&w.kind!=="cell"&&w.isEdge||(f({previousSelection:X,fillHandle:$}),Xo.current=void 0,!w.isTouch&&w.button===0&&!$?si(w):!w.isTouch&&w.button===1&&(Xo.current=w.location))},[X,si]),[is,ls]=p.useState(),Mh=p.useCallback(w=>{if(w.kind!==Nn||me!=="multi")return;const A=Oi.value?w.metaKey:w.ctrlKey,[$]=w.location,K=X.columns;if($<W)return;const H=wt[$];let de=$,oe=$;for(let q=$-1;q>=W&&Hr(H.group,wt[q].group);q--)de--;for(let q=$+1;q<wt.length&&Hr(H.group,wt[q].group);q++)oe++;if(Rn(),A)if(K.hasAll([de,oe+1])){let q=K;for(let V=de;V<=oe;V++)q=q.remove(V);ft(q,void 0,A)}else ft(void 0,[de,oe+1],A);else ft(mt.fromSingleSelection([de,oe+1]),void 0,A)},[me,Rn,X.columns,wt,W,ft]),xr=p.useRef(!1),pl=p.useCallback(async w=>{if(te!==void 0&&Pe!==void 0){const A=An.current.y,$=An.current.height;let K=te({x:w,y:A,width:1,height:Math.min($,Ye-A)},F.current.signal);typeof K!="object"&&(K=await K());const H=ut[w-W],de=document.createElement("canvas").getContext("2d",{alpha:!1});if(de!==null){de.font=_t.baseFontFull;const oe=Wc(de,_t,H,0,K,To,fr,!1,Kt);Pe==null||Pe(H,oe.width,w,oe.width)}}},[ut,te,fr,_t,To,Pe,W,Ye,Kt]),[sy,as]=p.useState(),Cr=p.useCallback(async(w,A)=>{var $,K;const H=($=w.current)==null?void 0:$.range;if(H===void 0||te===void 0||A.current===void 0)return;const de=A.current.range;if(R!==void 0){let Y=!1;if(R({fillDestination:{...de,x:de.x-W},patternSource:{...H,x:H.x-W},preventDefault:()=>Y=!0}),Y)return}let oe=te(H,F.current.signal);typeof oe!="object"&&(oe=await oe());const q=oe,V=[];for(let Y=0;Y<de.width;Y++)for(let ae=0;ae<de.height;ae++){const Ce=[de.x+Y,de.y+ae];if(Tc(Ce,H))continue;const ve=q[ae%H.height][Y%H.width];Lo(ve)||!Rr(ve)||V.push({location:Ce,value:{...ve}})}Vn(V),(K=Dn.current)==null||K.damage(V.map(Y=>({cell:Y.location})))},[te,Vn,R,W]),Rh=p.useCallback(()=>{if(X.current===void 0||X.current.range.width<=1)return;const w={...X,current:{...X.current,range:{...X.current.range,width:1}}};Cr(w,X)},[Cr,X]),Eh=p.useCallback(()=>{if(X.current===void 0||X.current.range.height<=1)return;const w={...X,current:{...X.current,range:{...X.current.range,height:1}}};Cr(w,X)},[Cr,X]),cy=p.useCallback((w,A)=>{var $,K;const H=d;if(f(void 0),ns(void 0),as(void 0),ci.current=!1,A)return;if((H==null?void 0:H.fillHandle)===!0&&X.current!==void 0&&(($=H.previousSelection)==null?void 0:$.current)!==void 0){if(Go===void 0)return;const ve={...X,current:{...X.current,range:tu(H.previousSelection.current.range,Go)}};Cr(H.previousSelection,ve),fe(ve,!0);return}const[de,oe]=w.location,[q,V]=Xo.current??[],Y=()=>{xr.current=!0},ae=ve=>{var Le,et,pt;const Ve=ve.isTouch||q===de&&V===oe;if(Ve&&(L==null||L([de-W,oe],{...ve,preventDefault:Y})),ve.button===1)return!xr.current;if(!xr.current){const He=Hn(w.location),Ct=Kt(He);if(Ct!==void 0&&Ct.onClick!==void 0&&Ve){const hn=Ct.onClick({...ve,cell:He,posX:ve.localEventX,posY:ve.localEventY,bounds:ve.bounds,theme:ai(He,w.location),preventDefault:Y});hn!==void 0&&!Lo(hn)&&Po(hn)&&(Vn([{location:ve.location,value:hn}]),(Le=Dn.current)==null||Le.damage([{cell:ve.location}]))}if(xr.current||X.current===void 0)return!1;let vn=!1;switch(He.activationBehaviorOverride??Et){case"double-click":case"second-click":{if(((pt=(et=H==null?void 0:H.previousSelection)==null?void 0:et.current)==null?void 0:pt.cell)===void 0)break;const[hn,Jn]=X.current.cell,[lo,Qn]=H.previousSelection.current.cell;vn=de===hn&&de===lo&&oe===Jn&&oe===Qn&&(ve.isDoubleClick===!0||Et==="second-click");break}case"single-click":{vn=!0;break}}if(vn)return O==null||O([de-W,oe]),br(ve.bounds,!1),!0}return!1},Ce=w.location[0]-W;if(w.isTouch){const ve=An.current,Le=Sh.current;if(ve.x!==Le.x||ve.y!==Le.y)return;if(w.isLongTouch===!0){if(w.kind==="cell"&&Fr((K=X.current)==null?void 0:K.cell,w.location)){re==null||re([Ce,w.location[1]],{...w,preventDefault:Y});return}else if(w.kind==="header"&&X.columns.hasIndex(de)){ie==null||ie(Ce,{...w,preventDefault:Y});return}else if(w.kind===Nn){if(Ce<0)return;he==null||he(Ce,{...w,preventDefault:Y});return}}w.kind==="cell"?ae(w)||si(w):w.kind===Nn?se==null||se(Ce,{...w,preventDefault:Y}):(w.kind===So&&(C==null||C(Ce,{...w,preventDefault:Y})),si(w));return}if(w.kind==="header"){if(Ce<0)return;w.isEdge?w.isDoubleClick===!0&&pl(de):w.button===0&&de===q&&oe===V&&(C==null||C(Ce,{...w,preventDefault:Y}))}if(w.kind===Nn){if(Ce<0)return;w.button===0&&de===q&&oe===V&&(se==null||se(Ce,{...w,preventDefault:Y}),xr.current||Mh(w))}w.kind==="cell"&&(w.button===0||w.button===1)&&ae(w),Xo.current=void 0},[d,X,W,Go,Cr,fe,L,Hn,Kt,Et,ai,Vn,O,br,re,ie,he,si,se,C,pl,Mh]),uy=p.useCallback(w=>{const A={...w,location:[w.location[0]-W,w.location[1]]};ue==null||ue(A),d!==void 0&&w.buttons===0&&(f(void 0),ns(void 0),as(void 0),ci.current=!1),as($=>{var K;return ci.current?[w.scrollEdge[0],0]:w.scrollEdge[0]===($==null?void 0:$[0])&&w.scrollEdge[1]===$[1]?$:d===void 0||(((K=qn.current)==null?void 0:K.location[0])??0)<W?void 0:w.scrollEdge})},[d,ue,W]),dy=p.useCallback((w,A)=>{Be==null||Be(w-W,A)},[Be,W]),hy=p.useCallback((w,A)=>{ot==null||ot(w-W,A)},[ot,W]),Do=(o=X==null?void 0:X.current)==null?void 0:o.cell,fy=p.useCallback((w,A,$,K,H,de)=>{ll.current=!1;let oe=Do;oe!==void 0&&(oe=[oe[0]-W,oe[1]]);const q=Re===0?void 0:{x:0,y:w.y,width:Re,height:w.height},V=[];q!==void 0&&V.push(q),qt>0&&(V.push({x:w.x-W,y:Ye-qt,width:w.width,height:qt}),Re>0&&V.push({x:0,y:Ye-qt,width:Re,height:qt}));const Y={x:w.x-W,y:w.y,width:w.width,height:Gt&&w.y+w.height>=Ye?w.height-1:w.height,tx:H,ty:de,extras:{selected:oe,freezeRegion:q,freezeRegions:V}};An.current=Y,wh(Y),Un([A,$,K]),It==null||It(Y,Y.tx,Y.ty,Y.extras)},[Do,W,Gt,Ye,Re,qt,wh,It]),py=Ao(Lt,p.useCallback((w,A)=>{Lt==null||Lt(w-W,A-W),me!=="none"&&ft(mt.fromSingleSelection(A),void 0,!0)},[me,Lt,W,ft])),ss=p.useRef(!1),gy=p.useCallback(w=>{if(w.location[0]===0&&W>0){w.preventDefault();return}St==null||St({...w,location:[w.location[0]-W,w.location[1]]}),w.defaultPrevented()||(ss.current=!0),f(void 0)},[St,W]),my=p.useCallback(()=>{ss.current=!1},[]),Ih=Mt==null?void 0:Mt.selectionBehavior,gl=p.useCallback(w=>{if(Ih!=="block-spanning")return;const{isGroupHeader:A,path:$,groupRows:K}=Ko(w);if(A)return[w,w];const H=$[$.length-1],de=w-H,oe=w+K-H-1;return[de,oe]},[Ko,Ih]),cs=p.useRef(),us=p.useCallback(w=>{var A,$,K;if(!fu(w,cs.current)&&(cs.current=w,!(((A=qn==null?void 0:qn.current)==null?void 0:A.button)!==void 0&&qn.current.button>=1))){if(w.buttons!==0&&d!==void 0&&(($=qn.current)==null?void 0:$.location[0])===0&&w.location[0]===0&&W===1&&le==="multi"&&d.previousSelection&&!d.previousSelection.rows.hasIndex(qn.current.location[1])&&X.rows.hasIndex(qn.current.location[1])){const H=Math.min(qn.current.location[1],w.location[1]),de=Math.max(qn.current.location[1],w.location[1])+1;Ke(mt.fromSingleSelection([H,de]),void 0,!1)}if(w.buttons!==0&&d!==void 0&&X.current!==void 0&&!ss.current&&!ci.current&&(be==="rect"||be==="multi-rect")){const[H,de]=X.current.cell;let[oe,q]=w.location;if(q<0&&(q=An.current.y),d.fillHandle===!0&&((K=d.previousSelection)==null?void 0:K.current)!==void 0){const V=d.previousSelection.current.range;q=Math.min(q,Gt?Ye-1:Ye);const Y=g0(V,oe,q,ct);ns(Y)}else{if(Gt&&de===Ye)return;if(Gt&&q===Ye)if(w.kind===Di)q--;else return;oe=Math.max(oe,W);const V=gl(de);q=V===void 0?q:_n(q,V[0],V[1]);const Y=oe-H,ae=q-de,Ce={x:Y>=0?H:oe,y:ae>=0?de:q,width:Math.abs(Y)+1,height:Math.abs(ae)+1};Je({...X.current,range:Ce},!0,!1,"drag")}}cn==null||cn({...w,location:[w.location[0]-W,w.location[1]]})}},[d,W,le,X,be,cn,Ke,Gt,Ye,ct,gl,Je]),vy=p.useCallback(()=>{var w,A;const $=cs.current;if($===void 0)return;const[K,H]=$.scrollEdge;let[de,oe]=$.location;const q=An.current;K===-1?de=((A=(w=q.extras)==null?void 0:w.freezeRegion)==null?void 0:A.x)??q.x:K===1&&(de=q.x+q.width),H===-1?oe=Math.max(0,q.y):H===1&&(oe=Math.min(Ye-1,q.y+q.height)),de=_n(de,0,wt.length-1),oe=_n(oe,0,Ye-1),us({...$,location:[de,oe]})},[wt.length,us,Ye]);xg(sy,Jt,vy);const Zn=p.useCallback(w=>{if(X.current===void 0)return;const[A,$]=w,[K,H]=X.current.cell,de=X.current.range;let oe=de.x,q=de.x+de.width,V=de.y,Y=de.y+de.height;const[ae,Ce]=gl(H)??[0,Ye-1],ve=Ce+1;if($!==0)switch($){case 2:{Y=ve,V=H,an(0,Y,"vertical");break}case-2:{V=ae,Y=H+1,an(0,V,"vertical");break}case 1:{V<H?(V++,an(0,V,"vertical")):(Y=Math.min(ve,Y+1),an(0,Y,"vertical"));break}case-1:{Y>H+1?(Y--,an(0,Y,"vertical")):(V=Math.max(ae,V-1),an(0,V,"vertical"));break}default:Mr()}if(A!==0)if(A===2)q=wt.length,oe=K,an(q-1-W,0,"horizontal");else if(A===-2)oe=W,q=K+1,an(oe-W,0,"horizontal");else{let Le=[];if(te!==void 0){const et=te({x:oe,y:V,width:q-oe-W,height:Y-V},F.current.signal);typeof et=="object"&&(Le=Dg(et))}if(A===1){let et=!1;if(oe<K){if(Le.length>0){const pt=ao(oe+1,K+1).find(Ve=>!Le.includes(Ve-W));pt!==void 0&&(oe=pt,et=!0)}else oe++,et=!0;et&&an(oe,0,"horizontal")}et||(q=Math.min(wt.length,q+1),an(q-1-W,0,"horizontal"))}else if(A===-1){let et=!1;if(q>K+1){if(Le.length>0){const pt=ao(q-1,K,-1).find(Ve=>!Le.includes(Ve-W));pt!==void 0&&(q=pt,et=!0)}else q--,et=!0;et&&an(q-W,0,"horizontal")}et||(oe=Math.max(W,oe-1),an(oe-W,0,"horizontal"))}else Mr()}Je({cell:X.current.cell,range:{x:oe,y:V,width:q-oe,height:Y-V}},!0,!1,"keyboard-select")},[te,gl,X,wt.length,W,Ye,an,Je]),ds=p.useRef(ei);ds.current=ei;const zo=p.useCallback((w,A,$,K)=>{const H=yn-($?0:1);w=_n(w,W,ut.length-1+W),A=_n(A,0,H);const de=Do==null?void 0:Do[0],oe=Do==null?void 0:Do[1];if(w===de&&A===oe)return!1;if(K&&X.current!==void 0){const q=[...X.current.rangeStack];(X.current.range.width>1||X.current.range.height>1)&&q.push(X.current.range),fe({...X,current:{cell:[w,A],range:{x:w,y:A,width:1,height:1},rangeStack:q}},!0)}else Je({cell:[w,A],range:{x:w,y:A,width:1,height:1}},!0,!1,"keyboard-nav");return h.current!==void 0&&h.current[0]===w&&h.current[1]===A&&(h.current=void 0),ds.current&&an(w-W,A),!0},[yn,W,ut.length,Do,X,an,fe,Je]),by=p.useCallback((w,A)=>{(s==null?void 0:s.cell)!==void 0&&w!==void 0&&Po(w)&&(Vn([{location:s.cell,value:w}]),window.requestAnimationFrame(()=>{var H;(H=Dn.current)==null||H.damage([{cell:s.cell}])})),Rn(!0),a(void 0);const[$,K]=A;if(X.current!==void 0&&($!==0||K!==0)){const H=X.current.cell[1]===yn-1&&w!==void 0;zo(_n(X.current.cell[0]+$,0,wt.length-1),_n(X.current.cell[1]+K,0,yn-1),H,!1)}P==null||P(w,A)},[s==null?void 0:s.cell,Rn,X,P,Vn,yn,zo,wt.length]),wy=p.useMemo(()=>`gdg-overlay-${Og++}`,[]),qo=p.useCallback(w=>{var A,$,K,H;Rn();const de=[];for(let oe=w.x;oe<w.x+w.width;oe++)for(let q=w.y;q<w.y+w.height;q++){const V=x([oe-W,q]);if(!V.allowOverlay&&V.kind!==Z.Boolean)continue;let Y;if(V.kind===Z.Custom){const ae=Kt(V),Ce=(A=ae==null?void 0:ae.provideEditor)==null?void 0:A.call(ae,V);(ae==null?void 0:ae.onDelete)!==void 0?Y=ae.onDelete(V):Ss(Ce)&&(Y=($=Ce==null?void 0:Ce.deletedValue)==null?void 0:$.call(Ce,V))}else if(Po(V)&&V.allowOverlay||V.kind===Z.Boolean){const ae=Kt(V);Y=(K=ae==null?void 0:ae.onDelete)==null?void 0:K.call(ae,V)}Y!==void 0&&!Lo(Y)&&Po(Y)&&de.push({location:[oe,q],value:Y})}Vn(de),(H=Dn.current)==null||H.damage(de.map(oe=>({cell:oe.location})))},[Rn,x,Kt,Vn,W]),ui=s!==void 0,Th=p.useCallback(w=>{var A,$;const K=()=>{w.stopPropagation(),w.preventDefault()},H={didMatch:!1},{bounds:de}=w,oe=X.columns,q=X.rows,V=io;if(!ui&&at(V.clear,w,H))fe(Ai,!1),Qt==null||Qt();else if(!ui&&at(V.selectAll,w,H))fe({columns:mt.empty(),rows:mt.empty(),current:{cell:((A=X.current)==null?void 0:A.cell)??[W,0],range:{x:W,y:0,width:T.length,height:Ye},rangeStack:[]}},!1);else if(at(V.search,w,H))($=c==null?void 0:c.current)==null||$.focus({preventScroll:!0}),il(!0);else if(at(V.delete,w,H)){const Ve=(ht==null?void 0:ht(X))??!0;if(Ve!==!1){const He=Ve===!0?X:Ve;if(He.current!==void 0){qo(He.current.range);for(const Ct of He.current.rangeStack)qo(Ct)}for(const Ct of He.rows)qo({x:W,y:Ct,width:T.length,height:1});for(const Ct of He.columns)qo({x:Ct,y:0,width:1,height:Ye})}}if(H.didMatch)return K(),!0;if(X.current===void 0)return!1;let[Y,ae]=X.current.cell;const[,Ce]=X.current.cell;let ve=!1,Le=!1;if(at(V.scrollToSelectedCell,w,H)?bl.current(Y-W,ae):me!=="none"&&at(V.selectColumn,w,H)?oe.hasIndex(Y)?ft(oe.remove(Y),void 0,!0):me==="single"?ft(mt.fromSingleSelection(Y),void 0,!0):ft(void 0,Y,!0):le!=="none"&&at(V.selectRow,w,H)?q.hasIndex(ae)?Ke(q.remove(ae),void 0,!0):le==="single"?Ke(mt.fromSingleSelection(ae),void 0,!0):Ke(void 0,ae,!0):!ui&&de!==void 0&&at(V.activateCell,w,H)?ae===Ye&&Gt?window.setTimeout(()=>{const Ve=fl(Y);wr(Ve??Y)},0):(O==null||O([Y-W,ae]),br(de,!0)):X.current.range.height>1&&at(V.downFill,w,H)?Eh():X.current.range.width>1&&at(V.rightFill,w,H)?Rh():at(V.goToNextPage,w,H)?ae+=Math.max(1,An.current.height-4):at(V.goToPreviousPage,w,H)?ae-=Math.max(1,An.current.height-4):at(V.goToFirstCell,w,H)?(a(void 0),ae=0,Y=0):at(V.goToLastCell,w,H)?(a(void 0),ae=Number.MAX_SAFE_INTEGER,Y=Number.MAX_SAFE_INTEGER):at(V.selectToFirstCell,w,H)?(a(void 0),Zn([-2,-2])):at(V.selectToLastCell,w,H)?(a(void 0),Zn([2,2])):ui?(at(V.closeOverlay,w,H)&&a(void 0),at(V.acceptOverlayDown,w,H)&&(a(void 0),ae++),at(V.acceptOverlayUp,w,H)&&(a(void 0),ae--),at(V.acceptOverlayLeft,w,H)&&(a(void 0),Y--),at(V.acceptOverlayRight,w,H)&&(a(void 0),Y++)):(at(V.goDownCell,w,H)?ae+=1:at(V.goUpCell,w,H)?ae-=1:at(V.goRightCell,w,H)?Y+=1:at(V.goLeftCell,w,H)?Y-=1:at(V.goDownCellRetainSelection,w,H)?(ae+=1,ve=!0):at(V.goUpCellRetainSelection,w,H)?(ae-=1,ve=!0):at(V.goRightCellRetainSelection,w,H)?(Y+=1,ve=!0):at(V.goLeftCellRetainSelection,w,H)?(Y-=1,ve=!0):at(V.goToLastRow,w,H)?ae=Ye-1:at(V.goToFirstRow,w,H)?ae=Number.MIN_SAFE_INTEGER:at(V.goToLastColumn,w,H)?Y=Number.MAX_SAFE_INTEGER:at(V.goToFirstColumn,w,H)?Y=Number.MIN_SAFE_INTEGER:(be==="rect"||be==="multi-rect")&&(at(V.selectGrowDown,w,H)?Zn([0,1]):at(V.selectGrowUp,w,H)?Zn([0,-1]):at(V.selectGrowRight,w,H)?Zn([1,0]):at(V.selectGrowLeft,w,H)?Zn([-1,0]):at(V.selectToLastRow,w,H)?Zn([0,2]):at(V.selectToFirstRow,w,H)?Zn([0,-2]):at(V.selectToLastColumn,w,H)?Zn([2,0]):at(V.selectToFirstColumn,w,H)&&Zn([-2,0])),Le=H.didMatch),Xn!==void 0&&Xn!=="normal"&&ae!==Ce){const Ve=Xn==="skip-up"||Xn==="skip"||Xn==="block",He=Xn==="skip-down"||Xn==="skip"||Xn==="block",Ct=ae<Ce;if(Ct&&Ve){for(;ae>=0&&Ko(ae).isGroupHeader;)ae--;ae<0&&(ae=Ce)}else if(!Ct&&He){for(;ae<Ye&&Ko(ae).isGroupHeader;)ae++;ae>=Ye&&(ae=Ce)}}const et=zo(Y,ae,!1,ve),pt=H.didMatch;return pt&&(et||!Le||oo)&&K(),pt},[Xn,ui,X,io,me,le,be,W,Ko,Ye,zo,fe,Qt,T.length,ht,oo,qo,ft,Ke,Gt,fl,wr,O,br,Eh,Rh,Zn]),di=p.useCallback(w=>{let A=!1;if(_e!==void 0&&_e({...w,cancel:()=>{A=!0}}),A||Th(w)||X.current===void 0)return;const[$,K]=X.current.cell,H=An.current;if(Ne&&!w.metaKey&&!w.ctrlKey&&X.current!==void 0&&w.key.length===1&&/[ -~]/g.test(w.key)&&w.bounds!==void 0&&Rr(x([$-W,Math.max(0,Math.min(K,Ye-1))]))){if((!Gt||K!==Ye)&&(H.y>K||K>H.y+H.height||H.x>$||$>H.x+H.width))return;br(w.bounds,!0,w.key),w.stopPropagation(),w.preventDefault()}},[Ne,_e,Th,X,x,W,Ye,Gt,br]),yy=p.useCallback((w,A)=>{const $=w.location[0]-W;if(w.kind==="header"&&(ie==null||ie($,{...w,preventDefault:A})),w.kind===Nn){if($<0)return;he==null||he($,{...w,preventDefault:A})}if(w.kind==="cell"){const[K,H]=w.location;re==null||re([$,H],{...w,preventDefault:A}),dp(X,w.location)||zo(K,H,!1,!1)}},[X,re,he,ie,W,zo]),hs=p.useCallback(async w=>{var A,$,K;if(!io.paste)return;function H(Y,ae,Ce,ve){var Le,et;const pt=typeof Ce=="object"?(Ce==null?void 0:Ce.join(`
173
173
  `))??"":(Ce==null?void 0:Ce.toString())??"";if(!Lo(Y)&&Rr(Y)&&Y.readonly!==!0){const Ve=M==null?void 0:M(pt,Y);if(Ve!==void 0&&Po(Ve))return{location:ae,value:Ve};const He=Kt(Y);if(He===void 0)return;if(He.kind===Z.Custom){zn(Y.kind===Z.Custom);const Ct=(Le=He.onPaste)==null?void 0:Le.call(He,pt,Y.data);return Ct===void 0?void 0:{location:ae,value:{...Y,data:Ct}}}else{const Ct=(et=He.onPaste)==null?void 0:et.call(He,pt,Y,{formatted:ve,formattedString:typeof ve=="string"?ve:ve==null?void 0:ve.join(`
174
174
  `),rawValue:Ce});return Ct===void 0?void 0:(zn(Ct.kind===Y.kind),{location:ae,value:Ct})}}}const de=X.columns,oe=X.rows,q=((A=Jt.current)==null?void 0:A.contains(document.activeElement))===!0||(($=u.current)==null?void 0:$.contains(document.activeElement))===!0;let V;if(X.current!==void 0?V=[X.current.range.x,X.current.range.y]:de.length===1?V=[de.first()??0,0]:oe.length===1&&(V=[W,oe.first()??0]),q&&V!==void 0){let Y,ae;const Ce="text/plain",ve="text/html";if(navigator.clipboard.read!==void 0){const Ve=await navigator.clipboard.read();for(const He of Ve){if(He.types.includes(ve)){const Ct=await(await He.getType(ve)).text(),vn=bu(Ct);if(vn!==void 0){Y=vn;break}}He.types.includes(Ce)&&(ae=await(await He.getType(Ce)).text())}}else if(navigator.clipboard.readText!==void 0)ae=await navigator.clipboard.readText();else if(w!==void 0&&(w==null?void 0:w.clipboardData)!==null){if(w.clipboardData.types.includes(ve)){const Ve=w.clipboardData.getData(ve);Y=bu(Ve)}Y===void 0&&w.clipboardData.types.includes(Ce)&&(ae=w.clipboardData.getData(Ce))}else return;const[Le,et]=V,pt=[];do{if(rt===void 0){const Ve=Hn(V),He=ae??(Y==null?void 0:Y.map(vn=>vn.map(hn=>hn.rawValue).join(" ")).join(" "))??"",Ct=H(Ve,V,He,void 0);Ct!==void 0&&pt.push(Ct);break}if(Y===void 0){if(ae===void 0)return;Y=pg(ae)}if(rt===!1||typeof rt=="function"&&(rt==null?void 0:rt([V[0]-W,V[1]],Y.map(Ve=>Ve.map(He=>{var Ct;return((Ct=He.rawValue)==null?void 0:Ct.toString())??""}))))!==!0)return;for(const[Ve,He]of Y.entries()){if(Ve+et>=Ye)break;for(const[Ct,vn]of He.entries()){const hn=[Ct+Le,Ve+et],[Jn,lo]=hn;if(Jn>=wt.length||lo>=yn)continue;const Qn=Hn(hn),go=H(Qn,hn,vn.rawValue,vn.formatted);go!==void 0&&pt.push(go)}}}while(!1);Vn(pt),(K=Dn.current)==null||K.damage(pt.map(Ve=>({cell:Ve.location})))}},[M,Kt,Hn,X,io.paste,Jt,wt.length,Vn,yn,rt,W,Ye]);fn("paste",hs,g,!1,!0);const hi=p.useCallback(async(w,A)=>{var $,K;if(!io.copy)return;const H=A===!0||(($=Jt.current)==null?void 0:$.contains(document.activeElement))===!0||((K=u.current)==null?void 0:K.contains(document.activeElement))===!0,de=X.columns,oe=X.rows,q=(V,Y)=>{if(!lt)yu(V,Y,w);else{const ae=Y.map(Ce=>({kind:Z.Text,data:T[Ce].title,displayData:T[Ce].title,allowOverlay:!1}));yu([ae,...V],Y,w)}};if(H&&te!==void 0){if(X.current!==void 0){let V=te(X.current.range,F.current.signal);typeof V!="object"&&(V=await V()),q(V,ao(X.current.range.x-W,X.current.range.x+X.current.range.width-W))}else if(oe!==void 0&&oe.length>0){const V=[...oe].map(Y=>{const ae=te({x:W,y:Y,width:T.length,height:1},F.current.signal);return typeof ae=="object"?ae[0]:ae().then(Ce=>Ce[0])});if(V.some(Y=>Y instanceof Promise)){const Y=await Promise.all(V);q(Y,ao(T.length))}else q(V,ao(T.length))}else if(de.length>0){const V=[],Y=[];for(const ae of de){let Ce=te({x:ae,y:0,width:1,height:Ye},F.current.signal);typeof Ce!="object"&&(Ce=await Ce()),V.push(Ce),Y.push(ae-W)}if(V.length===1)q(V[0],Y);else{const ae=V.reduce((Ce,ve)=>Ce.map((Le,et)=>[...Le,...ve[et]]));q(ae,Y)}}}},[T,te,X,io.copy,W,Jt,Ye,lt]);fn("copy",hi,g,!1,!1);const xy=p.useCallback(async w=>{var A,$;if(!(!io.cut||!(((A=Jt.current)==null?void 0:A.contains(document.activeElement))===!0||(($=u.current)==null?void 0:$.contains(document.activeElement))===!0))&&(await hi(w),X.current!==void 0)){let K={current:{cell:X.current.cell,range:X.current.range,rangeStack:[]},rows:mt.empty(),columns:mt.empty()};const H=ht==null?void 0:ht(K);if(H===!1||(K=H===!0?K:H,K.current===void 0))return;qo(K.current.range)}},[qo,X,io.cut,hi,Jt,ht]);fn("cut",xy,g,!1,!1);const Cy=p.useCallback((w,A)=>{if(z!==void 0){W!==0&&(w=w.map(H=>[H[0]-W,H[1]])),z(w,A);return}if(w.length===0||A===-1)return;const[$,K]=w[A];h.current!==void 0&&h.current[0]===$&&h.current[1]===K||(h.current=[$,K],zo($,K,!1,!1))},[z,W,zo]),[ml,vl]=((r=Pt==null?void 0:Pt.current)==null?void 0:r.cell)??[],bl=p.useRef(an);bl.current=an,p.useLayoutEffect(()=>{var w,A,$,K;ds.current&&!ll.current&&ml!==void 0&&vl!==void 0&&(ml!==((A=(w=Ae.current)==null?void 0:w.current)==null?void 0:A.cell[0])||vl!==((K=($=Ae.current)==null?void 0:$.current)==null?void 0:K.cell[1]))&&bl.current(ml,vl),ll.current=!1},[ml,vl]);const Oh=X.current!==void 0&&(X.current.cell[0]>=wt.length||X.current.cell[1]>=yn);p.useLayoutEffect(()=>{Oh&&fe(Ai,!1)},[Oh,fe]);const ky=p.useMemo(()=>Gt===!0&&(xt==null?void 0:xt.tint)===!0?mt.fromSingleSelection(yn-1):mt.empty(),[yn,Gt,xt==null?void 0:xt.tint]),Sy=p.useCallback(w=>typeof rn=="boolean"?rn:(rn==null?void 0:rn(w-W))??!0,[W,rn]),My=p.useMemo(()=>{if(is===void 0||u.current===null)return null;const{bounds:w,group:A}=is,$=u.current.getBoundingClientRect();return p.createElement(og,{bounds:w,group:A,canvasBounds:$,onClose:()=>ls(void 0),onFinish:K=>{ls(void 0),pe==null||pe(A,K)}})},[pe,is]),Ry=Math.min(wt.length,Re+(Mn?1:0));p.useImperativeHandle(t,()=>({appendRow:(w,A)=>wr(w+W,A),updateCells:w=>{var A;return W!==0&&(w=w.map($=>({cell:[$.cell[0]+W,$.cell[1]]}))),(A=Dn.current)==null?void 0:A.damage(w)},getBounds:(w,A)=>{var $;if(!((u==null?void 0:u.current)===null||(Jt==null?void 0:Jt.current)===null)){if(w===void 0&&A===void 0){const K=u.current.getBoundingClientRect(),H=K.width/Jt.current.clientWidth;return{x:K.x-Jt.current.scrollLeft*H,y:K.y-Jt.current.scrollTop*H,width:Jt.current.scrollWidth*H,height:Jt.current.scrollHeight*H}}return($=Dn.current)==null?void 0:$.getBounds((w??0)+W,A)}},focus:()=>{var w;return(w=Dn.current)==null?void 0:w.focus()},emit:async w=>{switch(w){case"delete":di({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":di({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":di({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 hi(void 0,!0);break;case"paste":await hs();break}},scrollTo:an,remeasureColumns:w=>{for(const A of w)pl(A+W)}}),[wr,pl,Jt,hi,di,hs,W,an]);const[Dh,zh]=Do??[],Ey=p.useCallback(w=>{const[A,$]=w;if($===-1){me!=="none"&&(ft(mt.fromSingleSelection(A),void 0,!1),Rn());return}Dh===A&&zh===$||(Je({cell:w,range:{x:A,y:$,width:1,height:1}},!0,!1,"keyboard-nav"),an(A,$))},[me,Rn,an,Dh,zh,Je,ft]),[Iy,Ty]=p.useState(!1),Lh=p.useRef(lc(w=>{Ty(w)},5)),Oy=p.useCallback(()=>{Lh.current(!0),X.current===void 0&&X.columns.length===0&&X.rows.length===0&&d===void 0&&Je({cell:[W,al],range:{x:W,y:al,width:1,height:1}},!0,!1,"keyboard-select")},[al,X,d,W,Je]),Dy=p.useCallback(()=>{Lh.current(!1)},[]),[zy,Ly]=p.useMemo(()=>{let w;const A=(Vt==null?void 0:Vt.scrollbarWidthOverride)??Bl(),$=Ye+(Gt?1:0);if(typeof ro=="number")w=Gn+$*ro;else{let H=0;const de=Math.min($,10);for(let oe=0;oe<de;oe++)H+=ro(oe);H=Math.floor(H/de),w=Gn+$*H}w+=A;const K=wt.reduce((H,de)=>de.width+H,0)+A;return[`${Math.min(1e5,K)}px`,`${Math.min(1e5,w)}px`]},[wt,Vt==null?void 0:Vt.scrollbarWidthOverride,ro,Ye,Gt,Gn]),Py=p.useMemo(()=>Ms(_t),[_t]);return p.createElement(El.Provider,{value:_t},p.createElement(bg,{style:Py,className:U,inWidth:v??zy,inHeight:I??Ly},p.createElement(eg,{fillHandle:Bt,drawFocusRing:ti,experimental:Vt,fixedShadowX:uo,fixedShadowY:Bn,getRowThemeOverride:fo,headerIcons:N,imageWindowLoader:Ze,initialSize:ee,isDraggable:ze,onDragLeave:en,onRowMoved:Yt,overscrollX:Qa,overscrollY:es,preventDiagonalScrolling:tn,rightElement:gn,rightElementProps:wn,smoothScrollX:tl,smoothScrollY:Ga,className:U,enableGroups:On,onCanvasFocused:Oy,onCanvasBlur:Dy,canvasRef:u,onContextMenu:yy,theme:_t,cellXOffset:iy,cellYOffset:al,accessibilityHeight:Yo.height,onDragEnd:my,columns:wt,nonGrowWidth:Tn,drawHeader:Dt,onColumnProposeMove:G,drawCell:ye,disabledRows:ky,freezeColumns:Ry,lockColumns:W,firstColAccessible:W===0,getCellContent:Hn,minColumnWidth:To,maxColumnWidth:fr,searchInputRef:c,showSearch:mr,onSearchClose:ts,highlightRegions:ly,getCellsForSelection:te,getGroupDetails:os,headerHeight:li,isFocused:Iy,groupHeaderHeight:On?pr:0,freezeTrailingRows:qt+(Gt&&(xt==null?void 0:xt.sticky)===!0?1:0),hasAppendRow:Gt,onColumnResize:Pe,onColumnResizeEnd:it,onColumnResizeStart:bt,onCellFocused:Ey,onColumnMoved:py,onDragStart:gy,onHeaderMenuClick:dy,onHeaderIndicatorClick:hy,onItemHovered:us,isFilling:(d==null?void 0:d.fillHandle)===!0,onMouseMove:uy,onKeyDown:di,onKeyUp:xe,onMouseDown:ay,onMouseUp:cy,onDragOverCell:Tt,onDrop:Zt,onSearchResultsChanged:Cy,onVisibleRegionChanged:fy,clientSize:nn,rowHeight:ro,searchResults:j,searchValue:ke,onSearchValueChange:ge,rows:yn,scrollRef:Jt,selection:X,translateX:Yo.tx,translateY:Yo.ty,verticalBorder:Sy,gridRef:Dn,getCellRenderer:Kt,resizeIndicator:cr}),My,s!==void 0&&p.createElement(p.Suspense,{fallback:null},p.createElement(Tg,{...s,validateCell:Se,bloom:D,id:wy,getCellRenderer:Kt,className:(Vt==null?void 0:Vt.isSubGrid)===!0?"click-outside-ignore":void 0,provideEditor:pn,imageEditorOverride:m,onFinishEditing:by,markdownDivCreateNode:y,isOutsideClick:nl,customEventTarget:Vt==null?void 0:Vt.eventTarget}))))},Lg=p.forwardRef(zg),Ru=20;function Eu(e){const{cell:t,posX:n,posY:o,bounds:r,theme:i}=e,{width:l,height:s,x:a,y:c}=r,u=t.maxSize??Ru,d=Math.floor(r.y+s/2),f=uc(u,s,i.cellVerticalPadding),h=cc(t.contentAlign??"center",a,l,i.cellHorizontalPadding,f),g=sc(h,d,f),m=dc(a+n,c+o,g);return zl(t)&&m}const Pg={getAccessibilityString:e=>{var t;return((t=e.data)==null?void 0:t.toString())??"false"},kind:Z.Boolean,needsHover:!0,useLabel:!1,needsHoverPosition:!0,measure:()=>50,draw:e=>Ag(e,e.cell.data,zl(e.cell),e.cell.maxSize??Ru,e.cell.hoverEffectIntensity??.35),onDelete:e=>({...e,data:!1}),onSelect:e=>{Eu(e)&&e.preventDefault()},onClick:e=>{if(Eu(e))return{...e.cell,data:xu(e.cell.data)}},onPaste:(e,t)=>{let n=vi;return e.toLowerCase()==="true"?n=!0:e.toLowerCase()==="false"?n=!1:e.toLowerCase()==="indeterminate"&&(n=Dl),n===t.data?void 0:{...t,data:n}}};function Ag(e,t,n,o,r){if(!n&&t===vi)return;const{ctx:i,hoverAmount:l,theme:s,rect:a,highlighted:c,hoverX:u,hoverY:d,cell:{contentAlign:f}}=e,{x:h,y:g,width:m,height:b}=a;let y=!1;if(r>0){let v=n?1-r+r*l:.4;if(t===vi&&(v*=l),v===0)return;v<1&&(y=!0,i.globalAlpha=v)}la(i,s,t,h,g,m,b,c,u,d,o,f),y&&(i.globalAlpha=1)}const Hg=sn("div")({name:"BubblesOverlayEditorStyle",class:"gdg-b1ygi5by",propsAsIs:!1}),Fg=e=>{const{bubbles:t}=e;return p.createElement(Hg,null,t.map((n,o)=>p.createElement("div",{key:o,className:"boe-bubble"},n)),p.createElement("textarea",{className:"gdg-input",autoFocus:!0}))},_g={getAccessibilityString:e=>hc(e.data),kind:Z.Bubble,needsHover:!1,useLabel:!1,needsHoverPosition:!1,measure:(e,t,n)=>t.data.reduce((o,r)=>e.measureText(r).width+o+20,0)+2*n.cellHorizontalPadding-4,draw:e=>Bg(e,e.cell.data),provideEditor:()=>e=>{const{value:t}=e;return p.createElement(Fg,{bubbles:t.data})},onPaste:()=>{}},Ng=4;function Bg(e,t){const{rect:n,theme:o,ctx:r,highlighted:i}=e,{x:l,y:s,width:a,height:c}=n,u=20,d=8,f=Ng;let h=l+o.cellHorizontalPadding;const g=[];for(const m of t){if(h>l+a)break;const b=Vo(m,r,o.baseFontFull).width;g.push({x:h,width:b}),h+=b+d*2+f}r.beginPath();for(const m of g)no(r,m.x,s+(c-u)/2,m.width+d*2,u,o.roundingRadius??u/2);r.fillStyle=i?o.bgBubbleSelected:o.bgBubble,r.fill();for(const[m,b]of g.entries())r.beginPath(),r.fillStyle=o.textBubble,r.fillText(t[m],b.x+d,s+c/2+eo(r,o))}const Vg=sn("div")({name:"DrilldownOverlayEditorStyle",class:"gdg-d4zsq0x",propsAsIs:!1}),$g=e=>{const{drilldowns:t}=e;return p.createElement(Vg,null,t.map((n,o)=>p.createElement("div",{key:o,className:"doe-bubble"},n.img!==void 0&&p.createElement("img",{src:n.img}),p.createElement("div",null,n.text))))},Wg={getAccessibilityString:e=>hc(e.data.map(t=>t.text)),kind:Z.Drilldown,needsHover:!1,useLabel:!1,needsHoverPosition:!1,measure:(e,t,n)=>t.data.reduce((o,r)=>e.measureText(r.text).width+o+20+(r.img!==void 0?18:0),0)+2*n.cellHorizontalPadding-4,draw:e=>Yg(e,e.cell.data),provideEditor:()=>e=>{const{value:t}=e;return p.createElement($g,{drilldowns:t.data})},onPaste:()=>{}},jg=4,da={};function Ug(e,t,n,o){const r=Math.ceil(window.devicePixelRatio),i=5,l=n-i*2,s=4,a=n*r,c=o+i,u=o*3,d=(u+i*2)*r,f=`${e},${t},${r},${n}`;if(da[f]!==void 0)return{el:da[f],height:a,width:d,middleWidth:s*r,sideWidth:c*r,padding:i*r,dpr:r};const h=document.createElement("canvas"),g=h.getContext("2d");return g===null?null:(h.width=d,h.height=a,g.scale(r,r),da[f]=h,g.beginPath(),no(g,i,i,u,l,o),g.shadowColor="rgba(24, 25, 34, 0.4)",g.shadowBlur=1,g.fillStyle=e,g.fill(),g.shadowColor="rgba(24, 25, 34, 0.3)",g.shadowOffsetY=1,g.shadowBlur=5,g.fillStyle=e,g.fill(),g.shadowOffsetY=0,g.shadowBlur=0,g.shadowBlur=0,g.beginPath(),no(g,i+.5,i+.5,u,l,o),g.strokeStyle=t,g.lineWidth=1,g.stroke(),{el:h,height:a,width:d,sideWidth:c*r,middleWidth:o*r,padding:i*r,dpr:r})}function Yg(e,t){const{rect:n,theme:o,ctx:r,imageLoader:i,col:l,row:s}=e,{x:a,width:c}=n,u=o.baseFontFull,d=_c(r,u),f=Math.min(n.height,Math.max(16,Math.ceil(d*o.lineHeight)*2)),h=Math.floor(n.y+(n.height-f)/2),g=f-10,m=8,b=jg;let y=a+o.cellHorizontalPadding;const v=o.roundingRadius??6,I=Ug(o.bgCell,o.drilldownBorder,f,v),T=[];for(const k of t){if(y>a+c)break;const x=Vo(k.text,r,u).width;let L=0;k.img!==void 0&&i.loadOrGetImage(k.img,l,s)!==void 0&&(L=g-8+4);const O=x+L+m*2;T.push({x:y,width:O}),y+=O+b}if(I!==null){const{el:k,height:x,middleWidth:L,sideWidth:O,width:R,dpr:P,padding:M}=I,S=O/P,E=M/P;for(const D of T){const C=Math.floor(D.x),G=Math.floor(D.width),B=G-(S-E)*2;r.imageSmoothingEnabled=!1,r.drawImage(k,0,0,O,x,C-E,h,S,f),B>0&&r.drawImage(k,O,0,L,x,C+(S-E),h,B,f),r.drawImage(k,R-O,0,O,x,C+G-(S-E),h,S,f),r.imageSmoothingEnabled=!0}}r.beginPath();for(const[k,x]of T.entries()){const L=t[k];let O=x.x+m;if(L.img!==void 0){const R=i.loadOrGetImage(L.img,l,s);if(R!==void 0){const P=g-8;let M=0,S=0,E=R.width,D=R.height;E>D?(M+=(E-D)/2,E=D):D>E&&(S+=(D-E)/2,D=E),r.beginPath(),no(r,O,h+f/2-P/2,P,P,o.roundingRadius??3),r.save(),r.clip(),r.drawImage(R,M,S,E,D,O,h+f/2-P/2,P,P),r.restore(),O+=P+4}}r.beginPath(),r.fillStyle=o.textBubble,r.fillText(L.text,O,h+f/2+eo(r,o))}}const Gg={getAccessibilityString:e=>e.data.join(", "),kind:Z.Image,needsHover:!1,useLabel:!1,needsHoverPosition:!1,draw:e=>Kg(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:o}=e,r=o??Af;return p.createElement(r,{urls:t.data,canWrite:t.readonly!==!0,onCancel:n,onChange:i=>{n({...t,data:[i]})}})},onPaste:(e,t)=>{e=e.trim();const n=e.split(",").map(o=>{try{return new URL(o),o}catch{return}}).filter(o=>o!==void 0);if(!(n.length===t.data.length&&n.every((o,r)=>o===t.data[r])))return{...t,data:n}}},ha=4;function Kg(e,t,n,o){const{rect:r,col:i,row:l,theme:s,ctx:a,imageLoader:c}=e,{x:u,y:d,height:f,width:h}=r,g=f-s.cellVerticalPadding*2,m=[];let b=0;for(let v=0;v<t.length;v++){const I=t[v];if(I.length===0)continue;const T=c.loadOrGetImage(I,i,l);if(T!==void 0){m[v]=T;const k=T.width*(g/T.height);b+=k+ha}}if(b===0)return;b-=ha;let y=u+s.cellHorizontalPadding;o==="right"?y=Math.floor(u+h-s.cellHorizontalPadding-b):o==="center"&&(y=Math.floor(u+h/2-b/2));for(const v of m){if(v===void 0)continue;const I=v.width*(g/v.height);n>0&&(a.beginPath(),no(a,y,d+s.cellVerticalPadding,I,g,n),a.save(),a.clip()),a.drawImage(v,y,d+s.cellVerticalPadding,I,g),n>0&&a.restore(),y+=I+ha}}function Xg(e,t){let n=e*49632+t*325176;return n^=n<<13,n^=n>>17,n^=n<<5,n/4294967295*2}const qg={getAccessibilityString:()=>"",kind:Z.Loading,needsHover:!1,useLabel:!1,needsHoverPosition:!1,measure:()=>120,draw:e=>{const{cell:t,col:n,row:o,ctx:r,rect:i,theme:l}=e;if(t.skeletonWidth===void 0||t.skeletonWidth===0)return;let s=t.skeletonWidth;t.skeletonWidthVariability!==void 0&&t.skeletonWidthVariability>0&&(s+=Math.round(Xg(n,o)*t.skeletonWidthVariability));const a=l.cellHorizontalPadding;s+a*2>=i.width&&(s=i.width-a*2-1);const c=t.skeletonHeight??Math.min(18,i.height-2*l.cellVerticalPadding);no(r,i.x+a,i.y+(i.height-c)/2,s,c,l.roundingRadius??3),r.fillStyle=No(l.textDark,.1),r.fill()},onPaste:()=>{}},Zg=()=>e=>e.targetWidth,Iu=sn("div")({name:"MarkdownOverlayEditorStyle",class:"gdg-m1pnx84e",propsAsIs:!1,vars:{"m1pnx84e-0":[Zg(),"px"]}}),Jg=e=>{const{value:t,onChange:n,forceEditMode:o,createNode:r,targetRect:i,onFinish:l,validatedSelection:s}=e,a=t.data,c=t.readonly===!0,[u,d]=p.useState(a===""||o),f=p.useCallback(()=>{d(g=>!g)},[]),h=a?"gdg-ml-6":"";return u?p.createElement(Iu,{targetWidth:i.width-20},p.createElement(_o,{autoFocus:!0,highlight:!1,validatedSelection:s,value:a,onKeyDown:g=>{g.key==="Enter"&&g.stopPropagation()},onChange:n}),p.createElement("div",{className:`gdg-edit-icon gdg-checkmark-hover ${h}`,onClick:()=>l(t)},p.createElement(If,null))):p.createElement(Iu,{targetWidth:i.width},p.createElement(ep,{contents:a,createNode:r}),!c&&p.createElement(p.Fragment,null,p.createElement("div",{className:"spacer"}),p.createElement("div",{className:`gdg-edit-icon gdg-edit-hover ${h}`,onClick:f},p.createElement(_l,null))),p.createElement("textarea",{className:"gdg-md-edit-textarea gdg-input",autoFocus:!0}))},Qg={getAccessibilityString:e=>{var t;return((t=e.data)==null?void 0:t.toString())??""},kind:Z.Markdown,needsHover:!1,needsHoverPosition:!1,drawPrep:Nr,measure:(e,t,n)=>{const o=t.data.split(`
175
- `)[0];return e.measureText(o).width+2*n.cellHorizontalPadding},draw:e=>to(e,e.cell.data,e.cell.contentAlign),onDelete:e=>({...e,data:""}),provideEditor:()=>e=>{const{onChange:t,value:n,target:o,onFinishedEditing:r,markdownDivCreateNode:i,forceEditMode:l,validatedSelection:s}=e;return p.createElement(Jg,{onFinish:r,targetRect:o,value:n,validatedSelection:s,onChange:a=>t({...n,data:a.target.value}),forceEditMode:l,createNode:i})},onPaste:(e,t)=>e===t.data?void 0:{...t,data:e}},em={getAccessibilityString:e=>e.row.toString(),kind:Fn.Marker,needsHover:!0,needsHoverPosition:!1,drawPrep:tm,measure:()=>44,draw:e=>om(e,e.cell.row,e.cell.checked,e.cell.markerKind,e.cell.drawHandle,e.cell.checkboxStyle),onClick:e=>{const{bounds:t,cell:n,posX:o,posY:r}=e,{width:i,height:l}=t,s=n.drawHandle?7+(i-7)/2:i/2,a=l/2;if(Math.abs(o-s)<=10&&Math.abs(r-a)<=10)return{...n,checked:!n.checked}},onPaste:()=>{}};function tm(e,t){const{ctx:n,theme:o}=e,r=o.markerFontFull,i=t??{};return(i==null?void 0:i.font)!==r&&(n.font=r,i.font=r),i.deprep=nm,n.textAlign="center",i}function nm(e){const{ctx:t}=e;t.textAlign="start"}function om(e,t,n,o,r,i){const{ctx:l,rect:s,hoverAmount:a,theme:c}=e,{x:u,y:d,width:f,height:h}=s,g=n?1:o==="checkbox-visible"?.6+.4*a:a;if(o!=="number"&&g>0){l.globalAlpha=g;const m=7*(n?a:1);if(la(l,c,n,r?u+m:u,d,r?f-m:f,h,!0,void 0,void 0,18,"center",i),r){l.globalAlpha=a,l.beginPath();for(const b of[3,6])for(const y of[-5,-1,3])l.rect(u+b,d+h/2+y,2,2);l.fillStyle=c.textLight,l.fill(),l.beginPath()}l.globalAlpha=1}if(o==="number"||o==="both"&&!n){const m=t.toString(),b=c.markerFontFull,y=u+f/2;o==="both"&&a!==0&&(l.globalAlpha=1-a),l.fillStyle=c.textLight,l.font=b,l.fillText(m,y,d+h/2+eo(l,b)),a!==0&&(l.globalAlpha=1)}}const rm={getAccessibilityString:()=>"",kind:Fn.NewRow,needsHover:!0,needsHoverPosition:!1,measure:()=>200,draw:e=>im(e,e.cell.hint,e.cell.icon),onPaste:()=>{}};function im(e,t,n){const{ctx:o,rect:r,hoverAmount:i,theme:l,spriteManager:s}=e,{x:a,y:c,width:u,height:d}=r;o.beginPath(),o.globalAlpha=i,o.rect(a+1,c+1,u,d-2),o.fillStyle=l.bgHeaderHovered,o.fill(),o.globalAlpha=1,o.beginPath();const f=t!=="";let h=0;if(n!==void 0){const g=d-8,m=a+8/2,b=c+8/2;s.drawSprite(n,"normal",o,m,b,g,l,f?1:i),h=g}else{h=24;const g=12,m=f?g:i*g,b=f?0:(1-i)*g*.5,y=l.cellHorizontalPadding+4;m>0&&(o.moveTo(a+y+b,c+d/2),o.lineTo(a+y+b+m,c+d/2),o.moveTo(a+y+b+m*.5,c+d/2-m*.5),o.lineTo(a+y+b+m*.5,c+d/2+m*.5),o.lineWidth=2,o.strokeStyle=l.bgIconHeader,o.lineCap="round",o.stroke())}o.fillStyle=l.textMedium,o.fillText(t,h+a+l.cellHorizontalPadding+.5,c+d/2+eo(o,l)),o.beginPath()}function Tu(e,t,n,o,r,i,l){e.textBaseline="alphabetic";const s=lm(e,r,o,t,(n==null?void 0:n.fullSize)??!1);e.beginPath(),no(e,s.x,s.y,s.width,s.height,t.roundingRadius??4),e.globalAlpha=i,e.fillStyle=(n==null?void 0:n.bgColor)??No(t.textDark,.1),e.fill(),e.globalAlpha=1,e.fillStyle=t.textDark,e.textBaseline="middle",l==null||l("text")}function lm(e,t,n,o,r){const i=o.cellHorizontalPadding,l=o.cellVerticalPadding;if(r)return{x:t.x+i/2,y:t.y+l/2+1,width:t.width-i,height:t.height-l-1};const s=Vo(n,e,o.baseFontFull,"alphabetic"),a=t.height-l,c=Math.min(a,s.actualBoundingBoxAscent*2.5);return{x:t.x+i/2,y:t.y+(t.height-c)/2+1,width:s.width+i*3,height:c-1}}const am=p.lazy(async()=>await ms(()=>import("./number-overlay-editor-D5Yhw2y2.js"),__vite__mapDeps([14,1,2,3,4,5,6,7,8,9,10,11,12,13]))),sm={getAccessibilityString:e=>{var t;return((t=e.data)==null?void 0:t.toString())??""},kind:Z.Number,needsHover:e=>e.hoverEffect===!0,needsHoverPosition:!1,useLabel:!0,drawPrep:Nr,draw:e=>{const{hoverAmount:t,cell:n,ctx:o,theme:r,rect:i,overrideCursor:l}=e,{hoverEffect:s,displayData:a,hoverEffectTheme:c}=n;s===!0&&t>0&&Tu(o,r,c,a,i,t,l),to(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:o,validatedSelection:r}=e;return p.createElement(p.Suspense,{fallback:null},p.createElement(am,{highlight:t,disabled:o.readonly===!0,value:o.data,fixedDecimals:o.fixedDecimals,allowNegative:o.allowNegative,thousandSeparator:o.thousandSeparator,decimalSeparator:o.decimalSeparator,validatedSelection:r,onChange:i=>n({...o,data:Number.isNaN(i.floatValue??0)?0:i.floatValue})}))},onPaste:(e,t,n)=>{const o=typeof n.rawValue=="number"?n.rawValue:Number.parseFloat(typeof n.rawValue=="string"?n.rawValue:e);if(!(Number.isNaN(o)||t.data===o))return{...t,data:o,displayData:n.formattedString??t.displayData}}},cm={getAccessibilityString:()=>"",measure:()=>108,kind:Z.Protected,needsHover:!1,needsHoverPosition:!1,draw:um,onPaste:()=>{}};function um(e){const{ctx:t,theme:n,rect:o}=e,{x:r,y:i,height:l}=o;t.beginPath();const s=2.5;let a=r+n.cellHorizontalPadding+s;const c=i+l/2,u=Math.cos(ac(30))*s,d=Math.sin(ac(30))*s;for(let f=0;f<12;f++)t.moveTo(a,c-s),t.lineTo(a,c+s),t.moveTo(a+u,c-d),t.lineTo(a-u,c+d),t.moveTo(a-u,c-d),t.lineTo(a+u,c+d),a+=8;t.lineWidth=1.1,t.lineCap="square",t.strokeStyle=n.textLight,t.stroke()}const dm={getAccessibilityString:e=>{var t;return((t=e.data)==null?void 0:t.toString())??""},kind:Z.RowID,needsHover:!1,needsHoverPosition:!1,drawPrep:(e,t)=>Nr(e,t,e.theme.textLight),draw:e=>to(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:o,validatedSelection:r}=e;return ne.createElement(_o,{highlight:t,autoFocus:o.readonly!==!0,disabled:o.readonly!==!1,value:o.data,validatedSelection:r,onChange:i=>n({...o,data:i.target.value})})},onPaste:()=>{}},hm={getAccessibilityString:e=>{var t;return((t=e.data)==null?void 0:t.toString())??""},kind:Z.Text,needsHover:e=>e.hoverEffect===!0,needsHoverPosition:!1,drawPrep:Nr,useLabel:!0,draw:e=>{const{cell:t,hoverAmount:n,hyperWrapping:o,ctx:r,rect:i,theme:l,overrideCursor:s}=e,{displayData:a,contentAlign:c,hoverEffect:u,allowWrapping:d,hoverEffectTheme:f}=t;u===!0&&n>0&&Tu(r,l,f,a,i,n,s),to(e,a,c,d,o)},measure:(e,t,n)=>{const o=t.displayData.split(`
175
+ `)[0];return e.measureText(o).width+2*n.cellHorizontalPadding},draw:e=>to(e,e.cell.data,e.cell.contentAlign),onDelete:e=>({...e,data:""}),provideEditor:()=>e=>{const{onChange:t,value:n,target:o,onFinishedEditing:r,markdownDivCreateNode:i,forceEditMode:l,validatedSelection:s}=e;return p.createElement(Jg,{onFinish:r,targetRect:o,value:n,validatedSelection:s,onChange:a=>t({...n,data:a.target.value}),forceEditMode:l,createNode:i})},onPaste:(e,t)=>e===t.data?void 0:{...t,data:e}},em={getAccessibilityString:e=>e.row.toString(),kind:Fn.Marker,needsHover:!0,needsHoverPosition:!1,drawPrep:tm,measure:()=>44,draw:e=>om(e,e.cell.row,e.cell.checked,e.cell.markerKind,e.cell.drawHandle,e.cell.checkboxStyle),onClick:e=>{const{bounds:t,cell:n,posX:o,posY:r}=e,{width:i,height:l}=t,s=n.drawHandle?7+(i-7)/2:i/2,a=l/2;if(Math.abs(o-s)<=10&&Math.abs(r-a)<=10)return{...n,checked:!n.checked}},onPaste:()=>{}};function tm(e,t){const{ctx:n,theme:o}=e,r=o.markerFontFull,i=t??{};return(i==null?void 0:i.font)!==r&&(n.font=r,i.font=r),i.deprep=nm,n.textAlign="center",i}function nm(e){const{ctx:t}=e;t.textAlign="start"}function om(e,t,n,o,r,i){const{ctx:l,rect:s,hoverAmount:a,theme:c}=e,{x:u,y:d,width:f,height:h}=s,g=n?1:o==="checkbox-visible"?.6+.4*a:a;if(o!=="number"&&g>0){l.globalAlpha=g;const m=7*(n?a:1);if(la(l,c,n,r?u+m:u,d,r?f-m:f,h,!0,void 0,void 0,18,"center",i),r){l.globalAlpha=a,l.beginPath();for(const b of[3,6])for(const y of[-5,-1,3])l.rect(u+b,d+h/2+y,2,2);l.fillStyle=c.textLight,l.fill(),l.beginPath()}l.globalAlpha=1}if(o==="number"||o==="both"&&!n){const m=t.toString(),b=c.markerFontFull,y=u+f/2;o==="both"&&a!==0&&(l.globalAlpha=1-a),l.fillStyle=c.textLight,l.font=b,l.fillText(m,y,d+h/2+eo(l,b)),a!==0&&(l.globalAlpha=1)}}const rm={getAccessibilityString:()=>"",kind:Fn.NewRow,needsHover:!0,needsHoverPosition:!1,measure:()=>200,draw:e=>im(e,e.cell.hint,e.cell.icon),onPaste:()=>{}};function im(e,t,n){const{ctx:o,rect:r,hoverAmount:i,theme:l,spriteManager:s}=e,{x:a,y:c,width:u,height:d}=r;o.beginPath(),o.globalAlpha=i,o.rect(a+1,c+1,u,d-2),o.fillStyle=l.bgHeaderHovered,o.fill(),o.globalAlpha=1,o.beginPath();const f=t!=="";let h=0;if(n!==void 0){const g=d-8,m=a+8/2,b=c+8/2;s.drawSprite(n,"normal",o,m,b,g,l,f?1:i),h=g}else{h=24;const g=12,m=f?g:i*g,b=f?0:(1-i)*g*.5,y=l.cellHorizontalPadding+4;m>0&&(o.moveTo(a+y+b,c+d/2),o.lineTo(a+y+b+m,c+d/2),o.moveTo(a+y+b+m*.5,c+d/2-m*.5),o.lineTo(a+y+b+m*.5,c+d/2+m*.5),o.lineWidth=2,o.strokeStyle=l.bgIconHeader,o.lineCap="round",o.stroke())}o.fillStyle=l.textMedium,o.fillText(t,h+a+l.cellHorizontalPadding+.5,c+d/2+eo(o,l)),o.beginPath()}function Tu(e,t,n,o,r,i,l){e.textBaseline="alphabetic";const s=lm(e,r,o,t,(n==null?void 0:n.fullSize)??!1);e.beginPath(),no(e,s.x,s.y,s.width,s.height,t.roundingRadius??4),e.globalAlpha=i,e.fillStyle=(n==null?void 0:n.bgColor)??No(t.textDark,.1),e.fill(),e.globalAlpha=1,e.fillStyle=t.textDark,e.textBaseline="middle",l==null||l("text")}function lm(e,t,n,o,r){const i=o.cellHorizontalPadding,l=o.cellVerticalPadding;if(r)return{x:t.x+i/2,y:t.y+l/2+1,width:t.width-i,height:t.height-l-1};const s=Vo(n,e,o.baseFontFull,"alphabetic"),a=t.height-l,c=Math.min(a,s.actualBoundingBoxAscent*2.5);return{x:t.x+i/2,y:t.y+(t.height-c)/2+1,width:s.width+i*3,height:c-1}}const am=p.lazy(async()=>await ms(()=>import("./number-overlay-editor-cmVGLaYJ.js"),__vite__mapDeps([14,1,2,3,4,5,6,7,8,9,10,11,12,13]))),sm={getAccessibilityString:e=>{var t;return((t=e.data)==null?void 0:t.toString())??""},kind:Z.Number,needsHover:e=>e.hoverEffect===!0,needsHoverPosition:!1,useLabel:!0,drawPrep:Nr,draw:e=>{const{hoverAmount:t,cell:n,ctx:o,theme:r,rect:i,overrideCursor:l}=e,{hoverEffect:s,displayData:a,hoverEffectTheme:c}=n;s===!0&&t>0&&Tu(o,r,c,a,i,t,l),to(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:o,validatedSelection:r}=e;return p.createElement(p.Suspense,{fallback:null},p.createElement(am,{highlight:t,disabled:o.readonly===!0,value:o.data,fixedDecimals:o.fixedDecimals,allowNegative:o.allowNegative,thousandSeparator:o.thousandSeparator,decimalSeparator:o.decimalSeparator,validatedSelection:r,onChange:i=>n({...o,data:Number.isNaN(i.floatValue??0)?0:i.floatValue})}))},onPaste:(e,t,n)=>{const o=typeof n.rawValue=="number"?n.rawValue:Number.parseFloat(typeof n.rawValue=="string"?n.rawValue:e);if(!(Number.isNaN(o)||t.data===o))return{...t,data:o,displayData:n.formattedString??t.displayData}}},cm={getAccessibilityString:()=>"",measure:()=>108,kind:Z.Protected,needsHover:!1,needsHoverPosition:!1,draw:um,onPaste:()=>{}};function um(e){const{ctx:t,theme:n,rect:o}=e,{x:r,y:i,height:l}=o;t.beginPath();const s=2.5;let a=r+n.cellHorizontalPadding+s;const c=i+l/2,u=Math.cos(ac(30))*s,d=Math.sin(ac(30))*s;for(let f=0;f<12;f++)t.moveTo(a,c-s),t.lineTo(a,c+s),t.moveTo(a+u,c-d),t.lineTo(a-u,c+d),t.moveTo(a-u,c-d),t.lineTo(a+u,c+d),a+=8;t.lineWidth=1.1,t.lineCap="square",t.strokeStyle=n.textLight,t.stroke()}const dm={getAccessibilityString:e=>{var t;return((t=e.data)==null?void 0:t.toString())??""},kind:Z.RowID,needsHover:!1,needsHoverPosition:!1,drawPrep:(e,t)=>Nr(e,t,e.theme.textLight),draw:e=>to(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:o,validatedSelection:r}=e;return ne.createElement(_o,{highlight:t,autoFocus:o.readonly!==!0,disabled:o.readonly!==!1,value:o.data,validatedSelection:r,onChange:i=>n({...o,data:i.target.value})})},onPaste:()=>{}},hm={getAccessibilityString:e=>{var t;return((t=e.data)==null?void 0:t.toString())??""},kind:Z.Text,needsHover:e=>e.hoverEffect===!0,needsHoverPosition:!1,drawPrep:Nr,useLabel:!0,draw:e=>{const{cell:t,hoverAmount:n,hyperWrapping:o,ctx:r,rect:i,theme:l,overrideCursor:s}=e,{displayData:a,contentAlign:c,hoverEffect:u,allowWrapping:d,hoverEffectTheme:f}=t;u===!0&&n>0&&Tu(r,l,f,a,i,n,s),to(e,a,c,d,o)},measure:(e,t,n)=>{const o=t.displayData.split(`
176
176
  `,t.allowWrapping===!0?void 0:1);let r=0;for(const i of o)r=Math.max(r,e.measureText(i).width);return r+2*n.cellHorizontalPadding},onDelete:e=>({...e,data:""}),provideEditor:e=>({disablePadding:e.allowWrapping===!0,editor:t=>{const{isHighlighted:n,onChange:o,value:r,validatedSelection:i}=t;return p.createElement(_o,{style:e.allowWrapping===!0?{padding:"3px 8.5px"}:void 0,highlight:n,autoFocus:r.readonly!==!0,disabled:r.readonly===!0,altNewline:!0,value:r.data,validatedSelection:i,onChange:l=>o({...r,data:l.target.value})})}}),onPaste:(e,t,n)=>e===t.data?void 0:{...t,data:e,displayData:n.formattedString??t.displayData}},fm=sn("div")({name:"UriOverlayEditorStyle",class:"gdg-u1rrojo",propsAsIs:!1}),pm=e=>{const{uri:t,onChange:n,forceEditMode:o,readonly:r,validatedSelection:i,preview:l}=e,[s,a]=p.useState(!r&&(t===""||o)),c=p.useCallback(()=>{a(!0)},[]);return s?p.createElement(_o,{validatedSelection:i,highlight:!0,autoFocus:!0,value:t,onChange:n}):p.createElement(fm,null,p.createElement("a",{className:"gdg-link-area",href:t,target:"_blank",rel:"noopener noreferrer"},l),!r&&p.createElement("div",{className:"gdg-edit-icon",onClick:c},p.createElement(_l,null)),p.createElement("textarea",{className:"gdg-input",autoFocus:!0}))};function Ou(e,t,n,o){let r=n.cellHorizontalPadding;const i=t.height/2-e.actualBoundingBoxAscent/2,l=e.width,s=e.actualBoundingBoxAscent;return o==="right"?r=t.width-l-n.cellHorizontalPadding:o==="center"&&(r=t.width/2-l/2),{x:r,y:i,width:l,height:s}}function Du(e){const{cell:t,bounds:n,posX:o,posY:r,theme:i}=e,l=t.displayData??t.data;if(t.hoverEffect!==!0||t.onClickUri===void 0)return!1;const s=Pc(l,i.baseFontFull);if(s===void 0)return!1;const a=Ou(s,n,i,t.contentAlign);return $o({x:a.x-4,y:a.y-4,width:a.width+8,height:a.height+8},o,r)}const gm={getAccessibilityString:e=>{var t;return((t=e.data)==null?void 0:t.toString())??""},kind:Z.Uri,needsHover:e=>e.hoverEffect===!0,needsHoverPosition:!0,useLabel:!0,drawPrep:Nr,draw:e=>{const{cell:t,theme:n,overrideCursor:o,hoverX:r,hoverY:i,rect:l,ctx:s}=e,a=t.displayData??t.data,c=t.hoverEffect===!0;if(o!==void 0&&c&&r!==void 0&&i!==void 0){const u=Vo(a,s,n.baseFontFull),d=Ou(u,l,n,t.contentAlign),{x:f,y:h,width:g,height:m}=d;if(r>=f-4&&r<=f-4+g+8&&i>=h-4&&i<=h-4+m+8){const b=eo(s,n.baseFontFull);o("pointer");const y=5,v=h-b;s.beginPath(),s.moveTo(l.x+f,Math.floor(l.y+v+m+y)+.5),s.lineTo(l.x+f+g,Math.floor(l.y+v+m+y)+.5),s.strokeStyle=n.linkColor,s.stroke(),s.save(),s.fillStyle=e.cellFillColor,to({...e,rect:{...l,x:l.x-1}},a,t.contentAlign),to({...e,rect:{...l,x:l.x-2}},a,t.contentAlign),to({...e,rect:{...l,x:l.x+1}},a,t.contentAlign),to({...e,rect:{...l,x:l.x+2}},a,t.contentAlign),s.restore()}}s.fillStyle=c?n.linkColor:n.textDark,to(e,a,t.contentAlign)},onSelect:e=>{Du(e)&&e.preventDefault()},onClick:e=>{var t;const{cell:n}=e;Du(e)&&((t=n.onClickUri)==null||t.call(n,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:o,forceEditMode:r,validatedSelection:i}=t;return p.createElement(pm,{forceEditMode:o.readonly!==!0&&(r||e.hoverEffect===!0&&e.onClickUri!==void 0),uri:o.data,preview:o.displayData??o.data,validatedSelection:i,readonly:o.readonly===!0,onChange:l=>n({...o,data:l.target.value})})},onPaste:(e,t,n)=>e===t.data?void 0:{...t,data:e,displayData:n.formattedString??t.displayData}},mm=[em,rm,Pg,_g,Wg,Gg,qg,Qg,sm,cm,dm,hm,gm];var fa,zu;function vm(){if(zu)return fa;zu=1;var e=ic(),t=Ph(),n="Expected a function";function o(r,i,l){var s=!0,a=!0;if(typeof r!="function")throw new TypeError(n);return t(l)&&(s="leading"in l?!!l.leading:s,a="trailing"in l?!!l.trailing:a),e(r,i,{leading:s,maxWait:i,trailing:a})}return fa=o,fa}var bm=vm();const wm=mo(bm),pa=[];class ym extends Bc{constructor(){super(...arguments),dt(this,"imageLoaded",()=>{}),dt(this,"loadedLocations",[]),dt(this,"cache",{}),dt(this,"sendLoaded",wm(()=>{this.imageLoaded(new Br(this.loadedLocations)),this.loadedLocations=[]},20)),dt(this,"clearOutOfWindow",()=>{const t=Object.keys(this.cache);for(const n of t){const o=this.cache[n];let r=!1;for(let i=0;i<o.cells.length;i++){const l=o.cells[i];if(this.isInWindow(l)){r=!0;break}}r?o.cells=o.cells.filter(this.isInWindow):(o.cancel(),delete this.cache[n])}})}setCallback(t){this.imageLoaded=t}loadImage(t,n,o,r){let i=!1;const l=pa.pop()??new Image;let s=!1;const a={img:void 0,cells:[jn(n,o)],url:t,cancel:()=>{s||(s=!0,pa.length<12?pa.unshift(l):i||(l.src=""))}},c=new Promise(u=>l.addEventListener("load",()=>u(null)));requestAnimationFrame(async()=>{try{l.src=t,await c,await l.decode();const u=this.cache[r];if(u!==void 0&&!s){u.img=l;for(const d of u.cells)this.loadedLocations.push(ql(d));i=!0,this.sendLoaded()}}catch{a.cancel()}}),this.cache[r]=a}loadOrGetImage(t,n,o){const r=t,i=this.cache[r];if(i!==void 0){const l=jn(n,o);return i.cells.includes(l)||i.cells.push(l),i.img}else this.loadImage(t,n,o,r)}}const xm=(e,t)=>{const n=p.useMemo(()=>({...h0,...e.headerIcons}),[e.headerIcons]),o=p.useMemo(()=>e.imageWindowLoader??new ym,[e.imageWindowLoader]);return p.createElement(Lg,{...e,renderers:mm,headerIcons:n,ref:t,imageWindowLoader:o})},Cm=p.forwardRef(xm);function Lu(e,t){const n=p.useRef(null),o=p.useRef(),r=p.useCallback(()=>{n.current&&(clearTimeout(n.current),n.current=null)},[]);return p.useEffect(()=>r,[r]),{debouncedCallback:p.useCallback((...i)=>{o.current=i,r(),n.current=setTimeout(()=>{o.current&&(e(...o.current),o.current=void 0)},t)},[e,t,r]),cancel:r}}const Pu=kr("div",{target:"e1hnsd042"})(({theme:e})=>({paddingTop:e.spacing.xs,paddingBottom:e.spacing.xs}),""),Ro=kr("div",{target:"e1hnsd041"})(({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}}}),""),km=kr("div",{target:"e1hnsd040"})(({theme:e})=>({height:e.sizes.borderWidth,backgroundColor:e.colors.borderColor,marginTop:e.spacing.xs,marginBottom:e.spacing.xs}),""),Au=[{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:"percent",label:"Percent",icon:":material/percent:"},{format:"scientific",label:"Scientific",icon:":material/experiment:"},{format:"accounting",label:"Accounting",icon:":material/finance_chip:"}],Sm={number:Au,progress:Au,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 Mm({columnKind:e,isOpen:t,onMouseEnter:n,onMouseLeave:o,onChangeFormat:r,onCloseMenu:i,children:l}){const s=Zo(),{colors:a,fontSizes:c,radii:u,fontWeights:d}=s,f=Sm[e]||[];return f.length===0?Oe.jsx(Oe.Fragment,{}):Oe.jsx(xl,{triggerType:Fh.hover,returnFocus:!0,autoFocus:!0,focusLock:!0,isOpen:t,onMouseEnter:n,onMouseLeave:o,ignoreBoundary:!0,content:Oe.jsx(Pu,{role:"menu",children:f.map(h=>Oe.jsxs(Ro,{onClick:()=>{r(h.format),i()},role:"menuitem",children:[Oe.jsx(vo,{size:"base",margin:"0",color:"inherit",iconValue:h.icon}),h.label]},h.format))}),placement:Cl.right,showArrow:!1,popoverMargin:2,overrides:{Body:{props:{"data-testid":"stDataFrameColumnFormattingMenu"},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",border:`${s.sizes.borderWidth} solid ${s.colors.borderColor}`}},Inner:{style:{backgroundColor:kl(s)?a.bgColor:a.secondaryBg,color:a.bodyText,fontSize:c.sm,fontWeight:d.normal,paddingTop:"0 !important",paddingBottom:"0 !important",paddingLeft:"0 !important",paddingRight:"0 !important"}}},children:l})}const Rm=p.memo(Mm);function Em({top:e,left:t,isColumnPinned:n,onPinColumn:o,onUnpinColumn:r,onCloseMenu:i,onSortColumn:l,onHideColumn:s,columnKind:a,onChangeFormat:c,onAutosize:u}){const d=Zo(),[f,h]=p.useState(!1),{colors:g,fontSizes:m,radii:b,fontWeights:y}=d;p.useEffect(()=>{function I(T){T.preventDefault()}return document.addEventListener("wheel",I,{passive:!1}),document.addEventListener("touchmove",I,{passive:!1}),()=>{document.removeEventListener("wheel",I),document.removeEventListener("touchmove",I)}},[]);const v=ne.useCallback(()=>{i()},[i]);return Oe.jsx(xl,{autoFocus:!0,"aria-label":"Dataframe column menu",content:Oe.jsxs(Pu,{children:[l&&Oe.jsxs(Oe.Fragment,{children:[Oe.jsxs(Ro,{onClick:()=>{l("asc"),v()},role:"menuitem",children:[Oe.jsx(vo,{size:"base",margin:"0",color:"inherit",iconValue:":material/arrow_upward:"}),"Sort ascending"]}),Oe.jsxs(Ro,{onClick:()=>{l("desc"),v()},role:"menuitem",children:[Oe.jsx(vo,{size:"base",margin:"0",color:"inherit",iconValue:":material/arrow_downward:"}),"Sort descending"]}),Oe.jsx(km,{})]}),c&&Oe.jsx(Rm,{columnKind:a,isOpen:f,onMouseEnter:()=>h(!0),onMouseLeave:()=>h(!1),onChangeFormat:c,onCloseMenu:v,children:Oe.jsxs(Ro,{onMouseEnter:()=>h(!0),onMouseLeave:()=>h(!1),isActive:f,hasSubmenu:!0,children:[Oe.jsxs("div",{children:[Oe.jsx(vo,{size:"base",margin:"0",color:"inherit",iconValue:":material/format_list_numbered:"}),"Format"]}),Oe.jsx(vo,{size:"base",margin:"0",color:"inherit",iconValue:":material/chevron_right:"})]})}),u&&Oe.jsxs(Ro,{onClick:()=>{u(),v()},children:[Oe.jsx(vo,{size:"base",margin:"0",color:"inherit",iconValue:":material/arrows_outward:"}),"Autosize"]}),n&&Oe.jsxs(Ro,{onClick:()=>{r(),v()},children:[Oe.jsx(vo,{size:"base",margin:"0",color:"inherit",iconValue:":material/keep_off:"}),"Unpin column"]}),!n&&Oe.jsxs(Ro,{onClick:()=>{o(),v()},children:[Oe.jsx(vo,{size:"base",margin:"0",color:"inherit",iconValue:":material/keep:"}),"Pin column"]}),s&&Oe.jsxs(Ro,{onClick:()=>{s(),v()},children:[Oe.jsx(vo,{size:"base",margin:"0",color:"inherit",iconValue:":material/visibility_off:"}),"Hide column"]})]}),placement:Cl.bottomRight,accessibilityType:_h.menu,showArrow:!1,popoverMargin:$n("0.375rem"),onClickOutside:f?void 0:v,onEsc:v,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:kl(d)?g.bgColor:g.secondaryBg,color:g.bodyText,fontSize:m.sm,fontWeight:y.normal,borderTopLeftRadius:b.default,borderTopRightRadius:b.default,borderBottomLeftRadius:b.default,borderBottomRightRadius:b.default,overflow:"auto",paddingTop:"0 !important",paddingBottom:"0 !important",paddingLeft:"0 !important",paddingRight:"0 !important"}}},isOpen:!0,children:Oe.jsx("div",{"data-testid":"stDataFrameColumnMenuTarget",style:{position:"fixed",top:e,left:t,visibility:"hidden",transform:"unset"}})})}const Im=p.memo(Em),Tm="(index)",Om=({label:e,initialValue:t,onChange:n})=>{const o=Zo();return Oe.jsx(Qx,{checked:t,onChange:r=>{n(r.target.checked)},"aria-label":e,checkmarkType:tC.default,labelPlacement:eC.right,overrides:{Root:{style:({$isFocusVisible:r})=>({marginBottom:o.spacing.none,marginTop:o.spacing.none,paddingLeft:o.spacing.md,paddingRight:o.spacing.md,paddingTop:o.spacing.twoXS,paddingBottom:o.spacing.twoXS,backgroundColor:r?o.colors.darkenedBgMix25:"",display:"flex",alignItems:"start"})},Checkmark:{style:({$isFocusVisible:r,$checked:i})=>{const l=i?o.colors.primary:o.colors.fadedText40;return{outline:0,width:o.sizes.checkbox,height:o.sizes.checkbox,marginTop:o.spacing.twoXS,marginLeft:0,marginBottom:0,boxShadow:r&&i?`0 0 0 0.2rem ${Sl(o.colors.primary,.5)}`:"",borderLeftWidth:o.sizes.borderWidth,borderRightWidth:o.sizes.borderWidth,borderTopWidth:o.sizes.borderWidth,borderBottomWidth:o.sizes.borderWidth,borderLeftColor:l,borderRightColor:l,borderTopColor:l,borderBottomColor:l}}},Label:{style:{lineHeight:o.lineHeights.small,paddingLeft:o.spacing.sm,position:"relative",color:o.colors.bodyText,fontSize:o.fontSizes.sm,fontWeight:o.fontWeights.normal}}},children:e})},Dm=({columns:e,columnOrder:t,setColumnOrder:n,hideColumn:o,showColumn:r,children:i,isOpen:l,onClose:s})=>{const a=Zo();return Oe.jsx(xl,{triggerType:Fh.click,placement:Cl.bottomRight,autoFocus:!0,focusLock:!0,content:()=>Oe.jsx("div",{style:{paddingTop:a.spacing.sm,paddingBottom:a.spacing.sm},children:e.map(c=>{const u=t.length&&!c.isIndex?!t.includes(c.id)&&!t.includes(c.name):!1;return Oe.jsx(Om,{label:!c.title&&c.isIndex?Tm:c.title,initialValue:!(c.isHidden===!0||u),onChange:d=>{d?(r(c.id),u&&n(f=>[...f,c.id])):o(c.id)}},c.id)})}),isOpen:l,onClickOutside:s,onClick:()=>l?s():void 0,onEsc:s,ignoreBoundary:!1,overrides:{Body:{props:{"data-testid":"stDataFrameColumnVisibilityMenu"},style:{borderTopLeftRadius:a.radii.default,borderTopRightRadius:a.radii.default,borderBottomLeftRadius:a.radii.default,borderBottomRightRadius:a.radii.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:kl(a)?a.colors.bgColor:a.colors.secondaryBg,color:a.colors.bodyText,fontSize:a.fontSizes.sm,fontWeight:a.fontWeights.normal,minWidth:a.sizes.minMenuWidth,maxWidth:`calc(${a.sizes.minMenuWidth} * 2)`,maxHeight:a.sizes.maxDropdownHeight,overflow:"auto",paddingTop:"0 !important",paddingBottom:"0 !important",paddingLeft:"0 !important",paddingRight:"0 !important"}}},children:Oe.jsx("div",{children:i})})},zm=p.memo(Dm);var Lm=Yy();const Pm=mo(Lm);var ga={exports:{}},Am=ga.exports,Hu;function Hm(){return Hu||(Hu=1,function(e,t){(function(n,o){try{e.exports=o(Gy)}catch{e.exports=o}n&&(n.momentDurationFormatSetup=n.moment?o(n.moment):o)})(Am,function(n){var o=!1,r=!1,i=!1,l=!1,s="escape years months weeks days hours minutes seconds milliseconds general".split(" "),a=[{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 c(_,z){return z.length>_.length?!1:_.indexOf(z)!==-1}function u(_){for(var z="";_;)z+="0",_-=1;return z}function d(_){for(var z=_.split("").reverse(),j=0,ge=!0;ge&&j<z.length;)j?z[j]==="9"?z[j]="0":(z[j]=(parseInt(z[j],10)+1).toString(),ge=!1):(parseInt(z[j],10)<5&&(ge=!1),z[j]="0"),j+=1;return ge&&z.push("1"),z.reverse().join("")}function f(_,z){var j=L(C(z).sort(),function(ke){return ke+":"+z[ke]}).join(","),ge=_+"+"+j;return f.cache[ge]||(f.cache[ge]=Intl.NumberFormat(_,z)),f.cache[ge]}f.cache={};function h(_,z,j){var ge=z.useToLocaleString,ke=z.useGrouping,_e=ke&&z.grouping.slice(),xe=z.maximumSignificantDigits,De=z.minimumIntegerDigits||1,Ne=z.fractionDigits||0,tt=z.groupingSeparator,Lt=z.decimalSeparator;if(ge&&j){var kt={minimumIntegerDigits:De,useGrouping:ke};if(Ne&&(kt.maximumFractionDigits=Ne,kt.minimumFractionDigits=Ne),xe&&_>0&&(kt.maximumSignificantDigits=xe),i){if(!l){var we=D({},z);we.useGrouping=!1,we.decimalSeparator=".",_=parseFloat(h(_,we),10)}return f(j,kt).format(_)}else{if(!r){var we=D({},z);we.useGrouping=!1,we.decimalSeparator=".",_=parseFloat(h(_,we),10)}return _.toLocaleString(j,kt)}}var be;xe?be=_.toPrecision(xe+1):be=_.toFixed(Ne+1);var me,le,Ee,Ie=be.split("e");Ee=Ie[1]||"",Ie=Ie[0].split("."),le=Ie[1]||"",me=Ie[0]||"";var Ue=me.length,nt=le.length,St=Ue+nt,ue=me+le;(xe&&St===xe+1||!xe&&nt===Ne+1)&&(ue=d(ue),ue.length===St+1&&(Ue=Ue+1),nt&&(ue=ue.slice(0,-1)),me=ue.slice(0,Ue),le=ue.slice(Ue)),xe&&(le=le.replace(/0*$/,""));var rt=parseInt(Ee,10);rt>0?le.length<=rt?(le=le+u(rt-le.length),me=me+le,le=""):(me=me+le.slice(0,rt),le=le.slice(rt)):rt<0&&(le=u(Math.abs(rt)-me.length)+me+le,me="0"),xe||(le=le.slice(0,Ne),le.length<Ne&&(le=le+u(Ne-le.length)),me.length<De&&(me=u(De-me.length)+me));var lt="";if(ke){Ie=me;for(var Re;Ie.length;)_e.length&&(Re=_e.shift()),lt&&(lt=tt+lt),lt=Ie.slice(-Re)+lt,Ie=Ie.slice(0,-Re)}else lt=me;return le&&(lt=lt+Lt+le),lt}function g(_,z){return _.label.length>z.label.length?-1:_.label.length<z.label.length?1:0}function m(_,z){var j=[];return x(C(z),function(ge){if(ge.slice(0,15)==="_durationLabels"){var ke=ge.slice(15).toLowerCase();x(C(z[ge]),function(_e){_e.slice(0,1)===_&&j.push({type:ke,key:_e,label:z[ge][_e]})})}}),j}function b(_,z,j){return z===1&&j===null?_:_+_}var y={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:b};function v(_){return Object.prototype.toString.call(_)==="[object Array]"}function I(_){return Object.prototype.toString.call(_)==="[object Object]"}function T(_,z){for(var j=_.length;j-=1;)if(z(_[j]))return _[j]}function k(_,z){var j=0,ge=_&&_.length||0,ke;for(typeof z!="function"&&(ke=z,z=function(_e){return _e===ke});j<ge;){if(z(_[j]))return _[j];j+=1}}function x(_,z){var j=0,ge=_.length;if(!(!_||!ge))for(;j<ge;){if(z(_[j],j)===!1)return;j+=1}}function L(_,z){var j=0,ge=_.length,ke=[];if(!_||!ge)return ke;for(;j<ge;)ke[j]=z(_[j],j),j+=1;return ke}function O(_,z){return L(_,function(j){return j[z]})}function R(_){var z=[];return x(_,function(j){j&&z.push(j)}),z}function P(_){var z=[];return x(_,function(j){k(z,j)||z.push(j)}),z}function M(_,z){var j=[];return x(_,function(ge){x(z,function(ke){ge===ke&&j.push(ge)})}),P(j)}function S(_,z){var j=[];return x(_,function(ge,ke){if(!z(ge))return j=_.slice(ke),!1}),j}function E(_,z){var j=_.slice().reverse();return S(j,z).reverse()}function D(_,z){for(var j in z)z.hasOwnProperty(j)&&(_[j]=z[j]);return _}function C(_){var z=[];for(var j in _)_.hasOwnProperty(j)&&z.push(j);return z}function G(_,z){var j=0,ge=_.length;if(!_||!ge)return!1;for(;j<ge;){if(z(_[j],j)===!0)return!0;j+=1}return!1}function B(_){var z=[];return x(_,function(j){z=z.concat(j)}),z}function J(){var _=0;try{_.toLocaleString("i")}catch(z){return z.name==="RangeError"}return!1}function se(_){return _(3.55,"en",{useGrouping:!1,minimumIntegerDigits:1,minimumFractionDigits:1,maximumFractionDigits:1})==="3.6"}function re(_){var z=!0;return z=z&&_(1,"en",{minimumIntegerDigits:1})==="1",z=z&&_(1,"en",{minimumIntegerDigits:2})==="01",z=z&&_(1,"en",{minimumIntegerDigits:3})==="001",!(!z||(z=z&&_(99.99,"en",{maximumFractionDigits:0,minimumFractionDigits:0})==="100",z=z&&_(99.99,"en",{maximumFractionDigits:1,minimumFractionDigits:1})==="100.0",z=z&&_(99.99,"en",{maximumFractionDigits:2,minimumFractionDigits:2})==="99.99",z=z&&_(99.99,"en",{maximumFractionDigits:3,minimumFractionDigits:3})==="99.990",!z)||(z=z&&_(99.99,"en",{maximumSignificantDigits:1})==="100",z=z&&_(99.99,"en",{maximumSignificantDigits:2})==="100",z=z&&_(99.99,"en",{maximumSignificantDigits:3})==="100",z=z&&_(99.99,"en",{maximumSignificantDigits:4})==="99.99",z=z&&_(99.99,"en",{maximumSignificantDigits:5})==="99.99",!z)||(z=z&&_(1e3,"en",{useGrouping:!0})==="1,000",z=z&&_(1e3,"en",{useGrouping:!1})==="1000",!z))}function U(){var _=[].slice.call(arguments),z={},j;if(x(_,function(xe,De){if(!De){if(!v(xe))throw"Expected array as the first argument to durationsFormat.";j=xe}if(typeof xe=="string"||typeof xe=="function"){z.template=xe;return}if(typeof xe=="number"){z.precision=xe;return}I(xe)&&D(z,xe)}),!j||!j.length)return[];z.returnMomentTypes=!0;var ge=L(j,function(xe){return xe.format(z)}),ke=M(s,P(O(B(ge),"type"))),_e=z.largest;return _e&&(ke=ke.slice(0,_e)),z.returnMomentTypes=!1,z.outputTypes=ke,L(j,function(xe){return xe.format(z)})}function ie(){var _=[].slice.call(arguments),z=D({},this.format.defaults),j=this.asMilliseconds(),ge=this.asMonths();typeof this.isValid=="function"&&this.isValid()===!1&&(j=0,ge=0);var ke=j<0,_e=n.duration(Math.abs(j),"milliseconds"),xe=n.duration(Math.abs(ge),"months");x(_,function(N){if(typeof N=="string"||typeof N=="function"){z.template=N;return}if(typeof N=="number"){z.precision=N;return}I(N)&&D(z,N)});var De={years:"y",months:"M",weeks:"w",days:"d",hours:"h",minutes:"m",seconds:"s",milliseconds:"S"},Ne={escape:/\[(.+?)\]/,years:/\*?[Yy]+/,months:/\*?M+/,weeks:/\*?[Ww]+/,days:/\*?[Dd]+/,hours:/\*?[Hh]+/,minutes:/\*?m+/,seconds:/\*?s+/,milliseconds:/\*?S+/,general:/.+?/};z.types=s;var tt=function(N){return k(s,function(Ze){return Ne[Ze].test(N)})},Lt=new RegExp(L(s,function(N){return Ne[N].source}).join("|"),"g");z.duration=this;var kt=typeof z.template=="function"?z.template.apply(z):z.template,we=z.outputTypes,be=z.returnMomentTypes,me=z.largest,le=[];we||(v(z.stopTrim)&&(z.stopTrim=z.stopTrim.join("")),z.stopTrim&&x(z.stopTrim.match(Lt),function(N){var Ze=tt(N);Ze==="escape"||Ze==="general"||le.push(Ze)}));var Ee=n.localeData();Ee||(Ee={}),x(C(y),function(N){if(typeof y[N]=="function"){Ee[N]||(Ee[N]=y[N]);return}Ee["_"+N]||(Ee["_"+N]=y[N])}),x(C(Ee._durationTimeTemplates),function(N){kt=kt.replace("_"+N+"_",Ee._durationTimeTemplates[N])});var Ie=z.userLocale||n.locale(),Ue=z.useLeftUnits,nt=z.usePlural,St=z.precision,ue=z.forceLength,rt=z.useGrouping,lt=z.trunc,Re=z.useSignificantDigits&&St>0,Et=Re?z.precision:0,jt=Et,Be=z.minValue,ot=!1,yt=z.maxValue,Mt=!1,Xt=z.useToLocaleString,cn=z.groupingSeparator,Qt=z.decimalSeparator,Ht=z.grouping;Xt=Xt&&(o||i);var It=z.trim;v(It)&&(It=It.join(" ")),It===null&&(me||yt||Re)&&(It="all"),(It===null||It===!0||It==="left"||It==="right")&&(It="large"),It===!1&&(It="");var Pt=function(N){return N.test(It)},In=/large/,Cn=/small/,Qe=/both/,un=/mid/,pn=/^all|[^sm]all/,xt=/final/,qt=me>0||G([In,Qe,pn],Pt),ct=G([Cn,Qe,pn],Pt),Ft=G([un,pn],Pt),Ut=G([xt,pn],Pt),rn=L(kt.match(Lt),function(N,Ze){var ee=tt(N);return N.slice(0,1)==="*"&&(N=N.slice(1),ee!=="escape"&&ee!=="general"&&le.push(ee)),{index:Ze,length:N.length,text:"",token:ee==="escape"?N.replace(Ne.escape,"$1"):N,type:ee==="escape"||ee==="general"?null:ee}}),Tt={index:0,length:0,token:"",text:"",type:null},Zt=[];Ue&&rn.reverse(),x(rn,function(N){if(N.type){(Tt.type||Tt.text)&&Zt.push(Tt),Tt=N;return}Ue?Tt.text=N.token+Tt.text:Tt.text+=N.token}),(Tt.type||Tt.text)&&Zt.push(Tt),Ue&&Zt.reverse();var qe=M(s,P(R(O(Zt,"type"))));if(!qe.length)return O(Zt,"text").join("");qe=L(qe,function(N,Ze){var ee=Ze+1===qe.length,ze=!Ze,en;N==="years"||N==="months"?en=xe.as(N):en=_e.as(N);var Yt=Math.floor(en),ln=en-Yt,Sn=k(Zt,function(tn){return N===tn.type});return ze&&yt&&en>yt&&(Mt=!0),ee&&Be&&Math.abs(z.duration.as(N))<Be&&(ot=!0),ze&&ue===null&&Sn.length>1&&(ue=!0),_e.subtract(Yt,N),xe.subtract(Yt,N),{rawValue:en,wholeValue:Yt,decimalValue:ee?ln:0,isSmallest:ee,isLargest:ze,type:N,tokenLength:Sn.length}});var At=lt?Math.floor:Math.round,kn=function(N,Ze){var ee=Math.pow(10,Ze);return At(N*ee)/ee},Ot=!1,Bt=!1,Vt=function(N,Ze){var ee={useGrouping:rt,groupingSeparator:cn,decimalSeparator:Qt,grouping:Ht,useToLocaleString:Xt};return Re&&(Et<=0?(N.rawValue=0,N.wholeValue=0,N.decimalValue=0):(ee.maximumSignificantDigits=Et,N.significantDigits=Et)),Mt&&!Bt&&(N.isLargest?(N.wholeValue=yt,N.decimalValue=0):(N.wholeValue=0,N.decimalValue=0)),ot&&!Bt&&(N.isSmallest?(N.wholeValue=Be,N.decimalValue=0):(N.wholeValue=0,N.decimalValue=0)),N.isSmallest||N.significantDigits&&N.significantDigits-N.wholeValue.toString().length<=0?St<0?N.value=kn(N.wholeValue,St):St===0?N.value=At(N.wholeValue+N.decimalValue):Re?(lt?N.value=kn(N.rawValue,Et-N.wholeValue.toString().length):N.value=N.rawValue,N.wholeValue&&(Et-=N.wholeValue.toString().length)):(ee.fractionDigits=St,lt?N.value=N.wholeValue+kn(N.decimalValue,St):N.value=N.wholeValue+N.decimalValue):Re&&N.wholeValue?(N.value=Math.round(kn(N.wholeValue,N.significantDigits-N.wholeValue.toString().length)),Et-=N.wholeValue.toString().length):N.value=N.wholeValue,N.tokenLength>1&&(ue||Ot)&&(ee.minimumIntegerDigits=N.tokenLength,Bt&&ee.maximumSignificantDigits<N.tokenLength&&delete ee.maximumSignificantDigits),!Ot&&(N.value>0||It===""||k(le,N.type)||k(we,N.type))&&(Ot=!0),N.formattedValue=h(N.value,ee,Ie),ee.useGrouping=!1,ee.decimalSeparator=".",N.formattedValueEn=h(N.value,ee,"en"),N.tokenLength===2&&N.type==="milliseconds"&&(N.formattedValueMS=h(N.value,{minimumIntegerDigits:3,useGrouping:!1},"en").slice(0,2)),N};if(qe=L(qe,Vt),qe=R(qe),qe.length>1){var uo=function(N){return k(qe,function(Ze){return Ze.type===N})},Bn=function(N){var Ze=uo(N.type);Ze&&x(N.targets,function(ee){var ze=uo(ee.type);ze&&parseInt(Ze.formattedValueEn,10)===ee.value&&(Ze.rawValue=0,Ze.wholeValue=0,Ze.decimalValue=0,ze.rawValue+=1,ze.wholeValue+=1,ze.decimalValue=0,ze.formattedValueEn=ze.wholeValue.toString(),Bt=!0)})};x(a,Bn)}return Bt&&(Ot=!1,Et=jt,qe=L(qe,Vt),qe=R(qe)),we&&!(Mt&&!z.trim)?(qe=L(qe,function(N){return k(we,function(Ze){return N.type===Ze})?N:null}),qe=R(qe)):(qt&&(qe=S(qe,function(N){return!N.isSmallest&&!N.wholeValue&&!k(le,N.type)})),me&&qe.length&&(qe=qe.slice(0,me)),ct&&qe.length>1&&(qe=E(qe,function(N){return!N.wholeValue&&!k(le,N.type)&&!N.isLargest})),Ft&&(qe=L(qe,function(N,Ze){return Ze>0&&Ze<qe.length-1&&!N.wholeValue?null:N}),qe=R(qe)),Ut&&qe.length===1&&!qe[0].wholeValue&&!(!lt&&qe[0].isSmallest&&qe[0].rawValue<Be)&&(qe=[])),be?qe:(x(Zt,function(N){var Ze=De[N.type],ee=k(qe,function(tn){return tn.type===N.type});if(!(!Ze||!ee)){var ze=ee.formattedValueEn.split(".");ze[0]=parseInt(ze[0],10),ze[1]?ze[1]=parseFloat("0."+ze[1],10):ze[1]=null;var en=Ee.durationPluralKey(Ze,ze[0],ze[1]),Yt=m(Ze,Ee),ln=!1,Sn={};x(Ee._durationLabelTypes,function(tn){var gn=k(Yt,function(wn){return wn.type===tn.type&&wn.key===en});gn&&(Sn[gn.type]=gn.label,c(N.text,tn.string)&&(N.text=N.text.replace(tn.string,gn.label),ln=!0))}),nt&&!ln&&(Yt.sort(g),x(Yt,function(tn){if(Sn[tn.type]===tn.label)return c(N.text,tn.label)?!1:void 0;if(c(N.text,tn.label))return N.text=N.text.replace(tn.label,Sn[tn.type]),!1}))}}),Zt=L(Zt,function(N){if(!N.type)return N.text;var Ze=k(qe,function(ze){return ze.type===N.type});if(!Ze)return"";var ee="";return Ue&&(ee+=N.text),(ke&&Mt||!ke&&ot)&&(ee+="< ",Mt=!1,ot=!1),(ke&&ot||!ke&&Mt)&&(ee+="> ",Mt=!1,ot=!1),ke&&(Ze.value>0||It===""||k(le,Ze.type)||k(we,Ze.type))&&(ee+="-",ke=!1),N.type==="milliseconds"&&Ze.formattedValueMS?ee+=Ze.formattedValueMS:ee+=Ze.formattedValue,Ue||(ee+=N.text),ee}),Zt.join("").replace(/(,| |:|\.)*$/,"").replace(/^(,| |:|\.)*/,""))}function ce(){var _=this.duration,z=function(ke){return _._data[ke]},j=k(this.types,z),ge=T(this.types,z);switch(j){case"milliseconds":return"S __";case"seconds":case"minutes":return"*_MS_";case"hours":return"_HMS_";case"days":if(j===ge)return"d __";case"weeks":return j===ge?"w __":(this.trim===null&&(this.trim="both"),"w __, d __, h __");case"months":if(j===ge)return"M __";case"years":return j===ge?"y __":(this.trim===null&&(this.trim="both"),"y __, M __, d __");default:return this.trim===null&&(this.trim="both"),"y __, d __, h __, m __, s __"}}function he(_){if(!_)throw"Moment Duration Format init cannot find moment instance.";_.duration.format=U,_.duration.fn.format=ie,_.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:ce,useToLocaleString:!0,groupingSeparator:",",decimalSeparator:".",grouping:[3]},_.updateLocale("en",y)}var pe=function(_,z,j){return _.toLocaleString(z,j)};o=J()&&re(pe),r=o&&se(pe);var Q=function(_,z,j){if(typeof window<"u"&&window&&window.Intl&&window.Intl.NumberFormat)return window.Intl.NumberFormat(z,j).format(_)};return i=re(Q),l=i&&se(Q),he(n),he})}(ga)),ga.exports}Hm();const Fm=["true","t","yes","y","on","1"],_m=["false","f","no","n","off","0"];function zt(e,t=""){return{kind:Z.Text,readonly:!0,allowOverlay:!0,data:e,displayData:e,errorDetails:t,isError:!0,style:"faded"}}function ir(e){return e.hasOwnProperty("isError")&&e.isError}function Nm(e){return e.hasOwnProperty("tooltip")&&e.tooltip!==""}function Hi(e){return e.hasOwnProperty("isMissingValue")&&e.isMissingValue}function ma(e=!1){return e?{kind:Z.Loading,allowOverlay:!1,isMissingValue:!0}:{kind:Z.Loading,allowOverlay:!1}}function Bm(e,t){const n=t?"faded":"normal";return{kind:Z.Text,data:"",displayData:"",allowOverlay:!0,readonly:e,style:n}}function va(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 Yr(e,t){return $e(e)?t||{}:$e(t)?e||{}:Nh(e,t)}function Fu(e){if($e(e))return[];if(typeof e=="number"||typeof e=="boolean")return[e];if(e instanceof Uint8Array&&(e=new TextDecoder("utf-8").decode(e)),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,o)=>typeof o=="bigint"?Number(o):o));return Array.isArray(t)?t.map(n=>["string","number","boolean","null"].includes(typeof n)?n:vt(n)):[vt(t)]}catch{return[vt(e)]}}function Vm(e){return e&&e.startsWith("{")&&e.endsWith("}")}function vt(e){try{try{return Pm(e)}catch{return JSON.stringify(e,(t,n)=>typeof n=="bigint"?Number(n):n)}}catch{return`[${typeof e}]`}}function _u(e){if($e(e))return null;if(typeof e=="boolean")return e;const t=vt(e).toLowerCase().trim();if(t==="")return null;if(Fm.includes(t))return!0;if(_m.includes(t))return!1}function Gr(e){if($e(e))return null;if(Array.isArray(e))return NaN;if(typeof e=="string"){if(e.trim().length===0)return null;try{const t=pi.unformat(e.trim());if(gt(t))return t}catch{}}else if(e instanceof Int32Array)return Number(e[0]);return Number(e)}function Fi(e){if($e(e))return"";if(typeof e=="string")return e;try{return JSON.stringify(e,(t,n)=>typeof n=="bigint"?Number(n):n)}catch{return vt(e)}}function $m(e){if(e===0||Math.abs(e)>=1e-4)return 4;const t=e.toExponential().split("e");return Math.abs(parseInt(t[1],10))}function _i(e,t,n){return Number.isNaN(e)||!Number.isFinite(e)?"":$e(t)||t===""?gt(n)?(n===0&&(e=Math.round(e)),pi(e).format({thousandSeparated:!1,mantissa:n,trimMantissa:!1})):pi(e).format({thousandSeparated:!1,mantissa:$m(e),trimMantissa:!0}):t==="plain"?pi(e).format({thousandSeparated:!1,mantissa:20,trimMantissa:!0}):t==="localized"?new Intl.NumberFormat().format(e):t==="percent"?new Intl.NumberFormat(void 0,{style:"percent",minimumFractionDigits:0,maximumFractionDigits:2}).format(e):t==="dollar"?new Intl.NumberFormat(void 0,{style:"currency",currency:"USD",currencyDisplay:"narrowSymbol",maximumFractionDigits:2}).format(e):t==="euro"?new Intl.NumberFormat(void 0,{style:"currency",currency:"EUR",maximumFractionDigits:2}).format(e):["compact","scientific","engineering"].includes(t)?new Intl.NumberFormat(void 0,{notation:t}).format(e):t==="accounting"?pi(e).format({thousandSeparated:!0,negative:"parenthesis",mantissa:2,trimMantissa:!1}):oC.sprintf(t,e)}function Nu(e,t,n="datetime"){return t==="localized"?new Intl.DateTimeFormat(void 0,{dateStyle:n==="time"?void 0:"medium",timeStyle:n==="date"?void 0:"medium"}).format(e.toDate()):t==="distance"?e.fromNow():t==="calendar"?e.calendar():t==="iso8601"?n==="date"?e.format("YYYY-MM-DD"):n==="time"?e.format("HH:mm:ss.SSS[Z]"):e.toISOString():e.format(t)}function Ni(e){if($e(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 o=Jo.unix(n).utc();if(o.isValid())return o.toDate()}if(typeof e=="string"){const n=Jo.utc(e);if(n.isValid())return n.toDate();const o=Jo.utc(e,[Jo.HTML5_FMT.TIME_MS,Jo.HTML5_FMT.TIME_SECONDS,Jo.HTML5_FMT.TIME]);if(o.isValid())return o.toDate()}}catch{return}}function Bu(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 Wm(e,t){return t===0?Math.trunc(e):Math.trunc(e*10**t)/10**t}const jm=new RegExp(/(\r\n|\n|\r)/gm);function Kr(e){return e.indexOf(`
177
177
  `)!==-1?e.replace(jm," "):e}function Um(e,t){if($e(t))return"";try{const n=t.match(e);return n&&n[1]!==void 0?decodeURIComponent(n[1].replace(/\+/g,"%20")):t}catch{return t}}const Ym=kr("div",{target:"en99xsi0"})(({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"}}),""),Vu=({jsonValue:e,theme:t})=>{let n;if(e)try{n=typeof e=="string"?vs.parse(e):vs.parse(vs.stringify(e))}catch{n=void 0}return $e(n)?Oe.jsx(_o,{highlight:!0,autoFocus:!1,disabled:!0,value:Fi(e)??"",onChange:()=>{}}):Oe.jsx(Ym,{"data-testid":"stJsonColumnViewer",children:Oe.jsx(Ky,{src:n,collapsed:2,theme:Xy(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"}})})},Gm=e=>{const t=e.theme,n=e.value.data;return Oe.jsx(Vu,{jsonValue:n.value||n.displayValue,theme:t})},Km=e=>{const t=e.theme,n=e.value;return Oe.jsx(Vu,{jsonValue:n.data,theme:t})},Xm={kind:Z.Custom,isMatch:e=>e.data.kind==="json-cell",draw:(e,t)=>{const{value:n,displayValue:o}=t.data;return Yl(e,o??Fi(n)??"",t.contentAlign),!0},measure:(e,t,n)=>{const{value:o,displayValue:r}=t.data,i=r??Fi(o)??"";return(i?e.measureText(i).width:0)+n.cellHorizontalPadding*2},provideEditor:()=>({editor:Gm})},qm="line_chart",Zm="area_chart",Jm="bar_chart";function ba(e,t,n){const o=Yr({y_min:0,y_max:1},t.columnTypeOptions),r={kind:Z.Custom,allowOverlay:!1,copyData:"",contentAlign:t.contentAlignment,data:{kind:"sparkline-cell",values:[],displayValues:[],graphKind:n,yAxis:[o.y_min,o.y_max]}};return{...t,kind:e,sortMode:"default",isEditable:!1,getCell(i){if($e(o.y_min)||$e(o.y_max)||Number.isNaN(o.y_min)||Number.isNaN(o.y_max)||o.y_min>=o.y_max)return zt("Invalid min/max y-axis configuration",`The y_min (${o.y_min}) and y_max (${o.y_max}) configuration options must be valid numbers.`);if($e(i))return ma();const l=Fu(i),s=[];let a=[];if(l.length===0)return ma();let c=Number.MIN_SAFE_INTEGER,u=Number.MAX_SAFE_INTEGER;for(let d=0;d<l.length;d++){const f=Gr(l[d]);if(Number.isNaN(f)||$e(f))return zt(vt(l),`The value cannot be interpreted as a numeric array. ${vt(f)} is not a number.`);f>c&&(c=f),f<u&&(u=f),s.push(f)}return s.length>0&&(c>o.y_max||u<o.y_min)?a=s.map(d=>c-u===0?c>(o.y_max||1)?o.y_max||1:o.y_min||0:((o.y_max||1)-(o.y_min||0))*((d-u)/(c-u))+(o.y_min||0)):a=s,{...r,copyData:s.join(","),data:{...r.data,values:a,displayValues:s.map(d=>_i(d))},isMissingValue:$e(i)}},getCellValue(i){var l,s;return i.kind===Z.Loading||((l=i.data)==null?void 0:l.values)===void 0?null:(s=i.data)==null?void 0:s.values}}}function $u(e){return ba(qm,e,"line")}$u.isEditableType=!1;function Wu(e){return ba(Jm,e,"bar")}Wu.isEditableType=!1;function ju(e){return ba(Zm,e,"area")}ju.isEditableType=!1;function wa(e){const t={kind:Z.Boolean,data:!1,allowOverlay:!1,contentAlign:e.contentAlignment,readonly:!e.isEditable,style:"normal"};return{...e,kind:"checkbox",sortMode:"default",getCell(n){let o=null;return o=_u(n),o===void 0?zt(vt(n),"The value cannot be interpreted as boolean."):{...t,data:o,isMissingValue:$e(o)}},getCellValue(n){return n.data===void 0?null:n.data}}}wa.isEditableType=!0;function Uu(e,t){return t.startsWith("+")||t.startsWith("-")?e=e.utcOffset(t,!1):e=e.tz(t),e}function ya(e,t,n,o,r,i,l){var s,a;const c=Yr({format:n,step:o,timezone:l},t.columnTypeOptions);let u;if(gt(c.timezone))try{u=((s=Uu(Bh(),c.timezone))==null?void 0:s.utcOffset())||void 0}catch{}let d;gt(c.min_value)&&(d=Ni(c.min_value)||void 0);let f;gt(c.max_value)&&(f=Ni(c.max_value)||void 0);const h={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=c.step)==null?void 0:a.toString())||"1",format:r,min:d,max:f}},g=m=>{const b=Ni(m);return b===null?!t.isRequired:!(b===void 0||gt(d)&&i(b)<i(d)||gt(f)&&i(b)>i(f))};return{...t,kind:e,sortMode:"default",validateInput:g,getCell(m,b){if(b===!0){const k=g(m);if(k===!1)return zt(vt(m),"Invalid input.");k instanceof Date&&(m=k)}const y=Ni(m);let v="",I="",T=u;if(y===void 0)return zt(vt(m),"The value cannot be interpreted as a datetime object.");if(y!==null){let k=Bh.utc(y);if(!k.isValid())return zt(vt(y),`Invalid moment date. This should never happen. Please report this bug.
178
178
  Error: ${k.toString()}`);if(c.timezone){try{k=Uu(k,c.timezone)}catch(x){return zt(k.toISOString(),`Failed to adjust to the provided timezone: ${c.timezone}.
@@ -184,5 +184,5 @@ Error: ${i}`}const o={kind:Z.Text,data:"",displayData:"",allowOverlay:!0,content
184
184
  40% { opacity: 1; }
185
185
  `]))),tb=function(e,t){var n=e.isFocused,o=e.size,r=e.theme,i=r.colors,l=r.spacing.baseUnit;return je({label:"loadingIndicator",display:"flex",transition:"color 150ms",alignSelf:"center",fontSize:o,lineHeight:1,marginRight:o,textAlign:"center",verticalAlign:"middle"},t?{}:{color:n?i.neutral60:i.neutral20,padding:l*2})},_a=function(e){var t=e.delay,n=e.offset;return Fe("span",{css:za({animation:"".concat(eb," 1s ease-in-out ").concat(t,"ms infinite;"),backgroundColor:"currentColor",borderRadius:"1em",display:"inline-block",marginLeft:n?"1em":void 0,height:"1em",verticalAlign:"top",width:"1em"},"","")})},nb=function(e){var t=e.innerProps,n=e.isRtl,o=e.size,r=o===void 0?4:o,i=bo(e,Y1);return Fe("div",Xe({},on(je(je({},i),{},{innerProps:t,isRtl:n,size:r}),"loadingIndicator",{indicator:!0,"loading-indicator":!0}),t),Fe(_a,{delay:0,offset:n}),Fe(_a,{delay:160,offset:!0}),Fe(_a,{delay:320,offset:!n}))},ob=function(e,t){var n=e.isDisabled,o=e.isFocused,r=e.theme,i=r.colors,l=r.borderRadius,s=r.spacing;return je({label:"control",alignItems:"center",cursor:"default",display:"flex",flexWrap:"wrap",justifyContent:"space-between",minHeight:s.controlHeight,outline:"0 !important",position:"relative",transition:"all 100ms"},t?{}:{backgroundColor:n?i.neutral5:i.neutral0,borderColor:n?i.neutral10:o?i.primary:i.neutral20,borderRadius:l,borderStyle:"solid",borderWidth:1,boxShadow:o?"0 0 0 1px ".concat(i.primary):void 0,"&:hover":{borderColor:o?i.primary:i.neutral30}})},rb=function(e){var t=e.children,n=e.isDisabled,o=e.isFocused,r=e.innerRef,i=e.innerProps,l=e.menuIsOpen;return Fe("div",Xe({ref:r},on(e,"control",{control:!0,"control--is-disabled":n,"control--is-focused":o,"control--menu-is-open":l}),i,{"aria-disabled":n||void 0}),t)},ib=rb,lb=["data"],ab=function(e,t){var n=e.theme.spacing;return t?{}:{paddingBottom:n.baseUnit*2,paddingTop:n.baseUnit*2}},sb=function(e){var t=e.children,n=e.cx,o=e.getStyles,r=e.getClassNames,i=e.Heading,l=e.headingProps,s=e.innerProps,a=e.label,c=e.theme,u=e.selectProps;return Fe("div",Xe({},on(e,"group",{group:!0}),s),Fe(i,Xe({},l,{selectProps:u,theme:c,getStyles:o,getClassNames:r,cx:n}),a),Fe("div",null,t))},cb=function(e,t){var n=e.theme,o=n.colors,r=n.spacing;return je({label:"group",cursor:"default",display:"block"},t?{}:{color:o.neutral40,fontSize:"75%",fontWeight:500,marginBottom:"0.25em",paddingLeft:r.baseUnit*3,paddingRight:r.baseUnit*3,textTransform:"uppercase"})},ub=function(e){var t=kd(e);t.data;var n=bo(t,lb);return Fe("div",Xe({},on(e,"groupHeading",{"group-heading":!0}),n))},db=sb,hb=["innerRef","isDisabled","isHidden","inputClassName"],fb=function(e,t){var n=e.isDisabled,o=e.value,r=e.theme,i=r.spacing,l=r.colors;return je(je({visibility:n?"hidden":"visible",transform:o?"translateZ(0)":""},pb),t?{}:{margin:i.baseUnit/2,paddingBottom:i.baseUnit/2,paddingTop:i.baseUnit/2,color:l.neutral80})},Ad={gridArea:"1 / 2",font:"inherit",minWidth:"2px",border:0,margin:0,outline:0,padding:0},pb={flex:"1 1 auto",display:"inline-grid",gridArea:"1 / 1 / 2 / 3",gridTemplateColumns:"0 min-content","&:after":je({content:'attr(data-value) " "',visibility:"hidden",whiteSpace:"pre"},Ad)},gb=function(e){return je({label:"input",color:"inherit",background:0,opacity:e?0:1,width:"100%"},Ad)},mb=function(e){var t=e.cx,n=e.value,o=kd(e),r=o.innerRef,i=o.isDisabled,l=o.isHidden,s=o.inputClassName,a=bo(o,hb);return Fe("div",Xe({},on(e,"input",{"input-container":!0}),{"data-value":n||""}),Fe("input",Xe({className:t({input:!0},s),ref:r,style:gb(l),disabled:i},a)))},vb=mb,bb=function(e,t){var n=e.theme,o=n.spacing,r=n.borderRadius,i=n.colors;return je({label:"multiValue",display:"flex",minWidth:0},t?{}:{backgroundColor:i.neutral10,borderRadius:r/2,margin:o.baseUnit/2})},wb=function(e,t){var n=e.theme,o=n.borderRadius,r=n.colors,i=e.cropWithEllipsis;return je({overflow:"hidden",textOverflow:i||i===void 0?"ellipsis":void 0,whiteSpace:"nowrap"},t?{}:{borderRadius:o/2,color:r.neutral80,fontSize:"85%",padding:3,paddingLeft:6})},yb=function(e,t){var n=e.theme,o=n.spacing,r=n.borderRadius,i=n.colors,l=e.isFocused;return je({alignItems:"center",display:"flex"},t?{}:{borderRadius:r/2,backgroundColor:l?i.dangerLight:void 0,paddingLeft:o.baseUnit,paddingRight:o.baseUnit,":hover":{backgroundColor:i.dangerLight,color:i.danger}})},Hd=function(e){var t=e.children,n=e.innerProps;return Fe("div",n,t)},xb=Hd,Cb=Hd;function kb(e){var t=e.children,n=e.innerProps;return Fe("div",Xe({role:"button"},n),t||Fe(Fa,{size:14}))}var Sb=function(e){var t=e.children,n=e.components,o=e.data,r=e.innerProps,i=e.isDisabled,l=e.removeProps,s=e.selectProps,a=n.Container,c=n.Label,u=n.Remove;return Fe(a,{data:o,innerProps:je(je({},on(e,"multiValue",{"multi-value":!0,"multi-value--is-disabled":i})),r),selectProps:s},Fe(c,{data:o,innerProps:je({},on(e,"multiValueLabel",{"multi-value__label":!0})),selectProps:s},t),Fe(u,{data:o,innerProps:je(je({},on(e,"multiValueRemove",{"multi-value__remove":!0})),{},{"aria-label":"Remove ".concat(t||"option")},l),selectProps:s}))},Mb=Sb,Rb=function(e,t){var n=e.isDisabled,o=e.isFocused,r=e.isSelected,i=e.theme,l=i.spacing,s=i.colors;return je({label:"option",cursor:"default",display:"block",fontSize:"inherit",width:"100%",userSelect:"none",WebkitTapHighlightColor:"rgba(0, 0, 0, 0)"},t?{}:{backgroundColor:r?s.primary:o?s.primary25:"transparent",color:n?s.neutral20:r?s.neutral0:"inherit",padding:"".concat(l.baseUnit*2,"px ").concat(l.baseUnit*3,"px"),":active":{backgroundColor:n?void 0:r?s.primary:s.primary50}})},Eb=function(e){var t=e.children,n=e.isDisabled,o=e.isFocused,r=e.isSelected,i=e.innerRef,l=e.innerProps;return Fe("div",Xe({},on(e,"option",{option:!0,"option--is-disabled":n,"option--is-focused":o,"option--is-selected":r}),{ref:i,"aria-disabled":n},l),t)},Ib=Eb,Tb=function(e,t){var n=e.theme,o=n.spacing,r=n.colors;return je({label:"placeholder",gridArea:"1 / 1 / 2 / 3"},t?{}:{color:r.neutral50,marginLeft:o.baseUnit/2,marginRight:o.baseUnit/2})},Ob=function(e){var t=e.children,n=e.innerProps;return Fe("div",Xe({},on(e,"placeholder",{placeholder:!0}),n),t)},Db=Ob,zb=function(e,t){var n=e.isDisabled,o=e.theme,r=o.spacing,i=o.colors;return je({label:"singleValue",gridArea:"1 / 1 / 2 / 3",maxWidth:"100%",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},t?{}:{color:n?i.neutral40:i.neutral80,marginLeft:r.baseUnit/2,marginRight:r.baseUnit/2})},Lb=function(e){var t=e.children,n=e.isDisabled,o=e.innerProps;return Fe("div",Xe({},on(e,"singleValue",{"single-value":!0,"single-value--is-disabled":n}),o),t)},Pb=Lb,Fd={ClearIndicator:Z1,Control:ib,DropdownIndicator:X1,DownChevron:Ld,CrossIcon:Fa,Group:db,GroupHeading:ub,IndicatorsContainer:j1,IndicatorSeparator:Q1,Input:vb,LoadingIndicator:nb,Menu:O1,MenuList:z1,MenuPortal:_1,LoadingMessage:H1,NoOptionsMessage:A1,MultiValue:Mb,MultiValueContainer:xb,MultiValueLabel:Cb,MultiValueRemove:kb,Option:Ib,Placeholder:Db,SelectContainer:B1,SingleValue:Pb,ValueContainer:$1},Ab=function(e){return je(je({},Fd),e.components)},_d=Number.isNaN||function(e){return typeof e=="number"&&e!==e};function Hb(e,t){return!!(e===t||_d(e)&&_d(t))}function Fb(e,t){if(e.length!==t.length)return!1;for(var n=0;n<e.length;n++)if(!Hb(e[n],t[n]))return!1;return!0}function _b(e,t){t===void 0&&(t=Fb);var n=null;function o(){for(var r=[],i=0;i<arguments.length;i++)r[i]=arguments[i];if(n&&n.lastThis===this&&t(r,n.lastArgs))return n.lastResult;var l=e.apply(this,r);return n={lastResult:l,lastArgs:r,lastThis:this},l}return o.clear=function(){n=null},o}for(var Nb={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"},Bb=function(e){return Fe("span",Xe({css:Nb},e))},Nd=Bb,Vb={guidance:function(e){var t=e.isSearchable,n=e.isMulti,o=e.tabSelectsValue,r=e.context,i=e.isInitialFocus;switch(r){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(o?", press Tab to select the option and exit the menu":"",".");case"input":return i?"".concat(e["aria-label"]||"Select"," is focused ").concat(t?",type to refine list":"",", press Down to open the menu, ").concat(n?" 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(e){var t=e.action,n=e.label,o=n===void 0?"":n,r=e.labels,i=e.isDisabled;switch(t){case"deselect-option":case"pop-value":case"remove-value":return"option ".concat(o,", deselected.");case"clear":return"All selected options have been cleared.";case"initial-input-focus":return"option".concat(r.length>1?"s":""," ").concat(r.join(","),", selected.");case"select-option":return i?"option ".concat(o," is disabled. Select another option."):"option ".concat(o,", selected.");default:return""}},onFocus:function(e){var t=e.context,n=e.focused,o=e.options,r=e.label,i=r===void 0?"":r,l=e.selectValue,s=e.isDisabled,a=e.isSelected,c=e.isAppleDevice,u=function(h,g){return h&&h.length?"".concat(h.indexOf(g)+1," of ").concat(h.length):""};if(t==="value"&&l)return"value ".concat(i," focused, ").concat(u(l,n),".");if(t==="menu"&&c){var d=s?" disabled":"",f="".concat(a?" selected":"").concat(d);return"".concat(i).concat(f,", ").concat(u(o,n),".")}return""},onFilter:function(e){var t=e.inputValue,n=e.resultsMessage;return"".concat(n).concat(t?" for search term "+t:"",".")}},$b=function(e){var t=e.ariaSelection,n=e.focusedOption,o=e.focusedValue,r=e.focusableOptions,i=e.isFocused,l=e.selectValue,s=e.selectProps,a=e.id,c=e.isAppleDevice,u=s.ariaLiveMessages,d=s.getOptionLabel,f=s.inputValue,h=s.isMulti,g=s.isOptionDisabled,m=s.isSearchable,b=s.menuIsOpen,y=s.options,v=s.screenReaderStatus,I=s.tabSelectsValue,T=s.isLoading,k=s["aria-label"],x=s["aria-live"],L=p.useMemo(function(){return je(je({},Vb),u||{})},[u]),O=p.useMemo(function(){var D="";if(t&&L.onChange){var C=t.option,G=t.options,B=t.removedValue,J=t.removedValues,se=t.value,re=function(Q){return Array.isArray(Q)?null:Q},U=B||C||re(se),ie=U?d(U):"",ce=G||J||void 0,he=ce?ce.map(d):[],pe=je({isDisabled:U&&g(U,l),label:ie,labels:he},t);D=L.onChange(pe)}return D},[t,L,g,l,d]),R=p.useMemo(function(){var D="",C=n||o,G=!!(n&&l&&l.includes(n));if(C&&L.onFocus){var B={focused:C,label:d(C),isDisabled:g(C,l),isSelected:G,options:r,context:C===n?"menu":"value",selectValue:l,isAppleDevice:c};D=L.onFocus(B)}return D},[n,o,d,g,L,r,l,c]),P=p.useMemo(function(){var D="";if(b&&y.length&&!T&&L.onFilter){var C=v({count:r.length});D=L.onFilter({inputValue:f,resultsMessage:C})}return D},[r,f,b,L,y,v,T]),M=(t==null?void 0:t.action)==="initial-input-focus",S=p.useMemo(function(){var D="";if(L.guidance){var C=o?"value":b?"menu":"input";D=L.guidance({"aria-label":k,context:C,isDisabled:n&&g(n,l),isMulti:h,isSearchable:m,tabSelectsValue:I,isInitialFocus:M})}return D},[k,n,o,h,g,m,b,L,l,I,M]),E=Fe(p.Fragment,null,Fe("span",{id:"aria-selection"},O),Fe("span",{id:"aria-focused"},R),Fe("span",{id:"aria-results"},P),Fe("span",{id:"aria-guidance"},S));return Fe(p.Fragment,null,Fe(Nd,{id:a},M&&E),Fe(Nd,{"aria-live":x,"aria-atomic":"false","aria-relevant":"additions text",role:"log"},i&&!M&&E))},Wb=$b,Na=[{base:"A",letters:"A\u24B6\uFF21\xC0\xC1\xC2\u1EA6\u1EA4\u1EAA\u1EA8\xC3\u0100\u0102\u1EB0\u1EAE\u1EB4\u1EB2\u0226\u01E0\xC4\u01DE\u1EA2\xC5\u01FA\u01CD\u0200\u0202\u1EA0\u1EAC\u1EB6\u1E00\u0104\u023A\u2C6F"},{base:"AA",letters:"\uA732"},{base:"AE",letters:"\xC6\u01FC\u01E2"},{base:"AO",letters:"\uA734"},{base:"AU",letters:"\uA736"},{base:"AV",letters:"\uA738\uA73A"},{base:"AY",letters:"\uA73C"},{base:"B",letters:"B\u24B7\uFF22\u1E02\u1E04\u1E06\u0243\u0182\u0181"},{base:"C",letters:"C\u24B8\uFF23\u0106\u0108\u010A\u010C\xC7\u1E08\u0187\u023B\uA73E"},{base:"D",letters:"D\u24B9\uFF24\u1E0A\u010E\u1E0C\u1E10\u1E12\u1E0E\u0110\u018B\u018A\u0189\uA779"},{base:"DZ",letters:"\u01F1\u01C4"},{base:"Dz",letters:"\u01F2\u01C5"},{base:"E",letters:"E\u24BA\uFF25\xC8\xC9\xCA\u1EC0\u1EBE\u1EC4\u1EC2\u1EBC\u0112\u1E14\u1E16\u0114\u0116\xCB\u1EBA\u011A\u0204\u0206\u1EB8\u1EC6\u0228\u1E1C\u0118\u1E18\u1E1A\u0190\u018E"},{base:"F",letters:"F\u24BB\uFF26\u1E1E\u0191\uA77B"},{base:"G",letters:"G\u24BC\uFF27\u01F4\u011C\u1E20\u011E\u0120\u01E6\u0122\u01E4\u0193\uA7A0\uA77D\uA77E"},{base:"H",letters:"H\u24BD\uFF28\u0124\u1E22\u1E26\u021E\u1E24\u1E28\u1E2A\u0126\u2C67\u2C75\uA78D"},{base:"I",letters:"I\u24BE\uFF29\xCC\xCD\xCE\u0128\u012A\u012C\u0130\xCF\u1E2E\u1EC8\u01CF\u0208\u020A\u1ECA\u012E\u1E2C\u0197"},{base:"J",letters:"J\u24BF\uFF2A\u0134\u0248"},{base:"K",letters:"K\u24C0\uFF2B\u1E30\u01E8\u1E32\u0136\u1E34\u0198\u2C69\uA740\uA742\uA744\uA7A2"},{base:"L",letters:"L\u24C1\uFF2C\u013F\u0139\u013D\u1E36\u1E38\u013B\u1E3C\u1E3A\u0141\u023D\u2C62\u2C60\uA748\uA746\uA780"},{base:"LJ",letters:"\u01C7"},{base:"Lj",letters:"\u01C8"},{base:"M",letters:"M\u24C2\uFF2D\u1E3E\u1E40\u1E42\u2C6E\u019C"},{base:"N",letters:"N\u24C3\uFF2E\u01F8\u0143\xD1\u1E44\u0147\u1E46\u0145\u1E4A\u1E48\u0220\u019D\uA790\uA7A4"},{base:"NJ",letters:"\u01CA"},{base:"Nj",letters:"\u01CB"},{base:"O",letters:"O\u24C4\uFF2F\xD2\xD3\xD4\u1ED2\u1ED0\u1ED6\u1ED4\xD5\u1E4C\u022C\u1E4E\u014C\u1E50\u1E52\u014E\u022E\u0230\xD6\u022A\u1ECE\u0150\u01D1\u020C\u020E\u01A0\u1EDC\u1EDA\u1EE0\u1EDE\u1EE2\u1ECC\u1ED8\u01EA\u01EC\xD8\u01FE\u0186\u019F\uA74A\uA74C"},{base:"OI",letters:"\u01A2"},{base:"OO",letters:"\uA74E"},{base:"OU",letters:"\u0222"},{base:"P",letters:"P\u24C5\uFF30\u1E54\u1E56\u01A4\u2C63\uA750\uA752\uA754"},{base:"Q",letters:"Q\u24C6\uFF31\uA756\uA758\u024A"},{base:"R",letters:"R\u24C7\uFF32\u0154\u1E58\u0158\u0210\u0212\u1E5A\u1E5C\u0156\u1E5E\u024C\u2C64\uA75A\uA7A6\uA782"},{base:"S",letters:"S\u24C8\uFF33\u1E9E\u015A\u1E64\u015C\u1E60\u0160\u1E66\u1E62\u1E68\u0218\u015E\u2C7E\uA7A8\uA784"},{base:"T",letters:"T\u24C9\uFF34\u1E6A\u0164\u1E6C\u021A\u0162\u1E70\u1E6E\u0166\u01AC\u01AE\u023E\uA786"},{base:"TZ",letters:"\uA728"},{base:"U",letters:"U\u24CA\uFF35\xD9\xDA\xDB\u0168\u1E78\u016A\u1E7A\u016C\xDC\u01DB\u01D7\u01D5\u01D9\u1EE6\u016E\u0170\u01D3\u0214\u0216\u01AF\u1EEA\u1EE8\u1EEE\u1EEC\u1EF0\u1EE4\u1E72\u0172\u1E76\u1E74\u0244"},{base:"V",letters:"V\u24CB\uFF36\u1E7C\u1E7E\u01B2\uA75E\u0245"},{base:"VY",letters:"\uA760"},{base:"W",letters:"W\u24CC\uFF37\u1E80\u1E82\u0174\u1E86\u1E84\u1E88\u2C72"},{base:"X",letters:"X\u24CD\uFF38\u1E8A\u1E8C"},{base:"Y",letters:"Y\u24CE\uFF39\u1EF2\xDD\u0176\u1EF8\u0232\u1E8E\u0178\u1EF6\u1EF4\u01B3\u024E\u1EFE"},{base:"Z",letters:"Z\u24CF\uFF3A\u0179\u1E90\u017B\u017D\u1E92\u1E94\u01B5\u0224\u2C7F\u2C6B\uA762"},{base:"a",letters:"a\u24D0\uFF41\u1E9A\xE0\xE1\xE2\u1EA7\u1EA5\u1EAB\u1EA9\xE3\u0101\u0103\u1EB1\u1EAF\u1EB5\u1EB3\u0227\u01E1\xE4\u01DF\u1EA3\xE5\u01FB\u01CE\u0201\u0203\u1EA1\u1EAD\u1EB7\u1E01\u0105\u2C65\u0250"},{base:"aa",letters:"\uA733"},{base:"ae",letters:"\xE6\u01FD\u01E3"},{base:"ao",letters:"\uA735"},{base:"au",letters:"\uA737"},{base:"av",letters:"\uA739\uA73B"},{base:"ay",letters:"\uA73D"},{base:"b",letters:"b\u24D1\uFF42\u1E03\u1E05\u1E07\u0180\u0183\u0253"},{base:"c",letters:"c\u24D2\uFF43\u0107\u0109\u010B\u010D\xE7\u1E09\u0188\u023C\uA73F\u2184"},{base:"d",letters:"d\u24D3\uFF44\u1E0B\u010F\u1E0D\u1E11\u1E13\u1E0F\u0111\u018C\u0256\u0257\uA77A"},{base:"dz",letters:"\u01F3\u01C6"},{base:"e",letters:"e\u24D4\uFF45\xE8\xE9\xEA\u1EC1\u1EBF\u1EC5\u1EC3\u1EBD\u0113\u1E15\u1E17\u0115\u0117\xEB\u1EBB\u011B\u0205\u0207\u1EB9\u1EC7\u0229\u1E1D\u0119\u1E19\u1E1B\u0247\u025B\u01DD"},{base:"f",letters:"f\u24D5\uFF46\u1E1F\u0192\uA77C"},{base:"g",letters:"g\u24D6\uFF47\u01F5\u011D\u1E21\u011F\u0121\u01E7\u0123\u01E5\u0260\uA7A1\u1D79\uA77F"},{base:"h",letters:"h\u24D7\uFF48\u0125\u1E23\u1E27\u021F\u1E25\u1E29\u1E2B\u1E96\u0127\u2C68\u2C76\u0265"},{base:"hv",letters:"\u0195"},{base:"i",letters:"i\u24D8\uFF49\xEC\xED\xEE\u0129\u012B\u012D\xEF\u1E2F\u1EC9\u01D0\u0209\u020B\u1ECB\u012F\u1E2D\u0268\u0131"},{base:"j",letters:"j\u24D9\uFF4A\u0135\u01F0\u0249"},{base:"k",letters:"k\u24DA\uFF4B\u1E31\u01E9\u1E33\u0137\u1E35\u0199\u2C6A\uA741\uA743\uA745\uA7A3"},{base:"l",letters:"l\u24DB\uFF4C\u0140\u013A\u013E\u1E37\u1E39\u013C\u1E3D\u1E3B\u017F\u0142\u019A\u026B\u2C61\uA749\uA781\uA747"},{base:"lj",letters:"\u01C9"},{base:"m",letters:"m\u24DC\uFF4D\u1E3F\u1E41\u1E43\u0271\u026F"},{base:"n",letters:"n\u24DD\uFF4E\u01F9\u0144\xF1\u1E45\u0148\u1E47\u0146\u1E4B\u1E49\u019E\u0272\u0149\uA791\uA7A5"},{base:"nj",letters:"\u01CC"},{base:"o",letters:"o\u24DE\uFF4F\xF2\xF3\xF4\u1ED3\u1ED1\u1ED7\u1ED5\xF5\u1E4D\u022D\u1E4F\u014D\u1E51\u1E53\u014F\u022F\u0231\xF6\u022B\u1ECF\u0151\u01D2\u020D\u020F\u01A1\u1EDD\u1EDB\u1EE1\u1EDF\u1EE3\u1ECD\u1ED9\u01EB\u01ED\xF8\u01FF\u0254\uA74B\uA74D\u0275"},{base:"oi",letters:"\u01A3"},{base:"ou",letters:"\u0223"},{base:"oo",letters:"\uA74F"},{base:"p",letters:"p\u24DF\uFF50\u1E55\u1E57\u01A5\u1D7D\uA751\uA753\uA755"},{base:"q",letters:"q\u24E0\uFF51\u024B\uA757\uA759"},{base:"r",letters:"r\u24E1\uFF52\u0155\u1E59\u0159\u0211\u0213\u1E5B\u1E5D\u0157\u1E5F\u024D\u027D\uA75B\uA7A7\uA783"},{base:"s",letters:"s\u24E2\uFF53\xDF\u015B\u1E65\u015D\u1E61\u0161\u1E67\u1E63\u1E69\u0219\u015F\u023F\uA7A9\uA785\u1E9B"},{base:"t",letters:"t\u24E3\uFF54\u1E6B\u1E97\u0165\u1E6D\u021B\u0163\u1E71\u1E6F\u0167\u01AD\u0288\u2C66\uA787"},{base:"tz",letters:"\uA729"},{base:"u",letters:"u\u24E4\uFF55\xF9\xFA\xFB\u0169\u1E79\u016B\u1E7B\u016D\xFC\u01DC\u01D8\u01D6\u01DA\u1EE7\u016F\u0171\u01D4\u0215\u0217\u01B0\u1EEB\u1EE9\u1EEF\u1EED\u1EF1\u1EE5\u1E73\u0173\u1E77\u1E75\u0289"},{base:"v",letters:"v\u24E5\uFF56\u1E7D\u1E7F\u028B\uA75F\u028C"},{base:"vy",letters:"\uA761"},{base:"w",letters:"w\u24E6\uFF57\u1E81\u1E83\u0175\u1E87\u1E85\u1E98\u1E89\u2C73"},{base:"x",letters:"x\u24E7\uFF58\u1E8B\u1E8D"},{base:"y",letters:"y\u24E8\uFF59\u1EF3\xFD\u0177\u1EF9\u0233\u1E8F\xFF\u1EF7\u1E99\u1EF5\u01B4\u024F\u1EFF"},{base:"z",letters:"z\u24E9\uFF5A\u017A\u1E91\u017C\u017E\u1E93\u1E95\u01B6\u0225\u0240\u2C6C\uA763"}],jb=new RegExp("["+Na.map(function(e){return e.letters}).join("")+"]","g"),Bd={},Ba=0;Ba<Na.length;Ba++)for(var Va=Na[Ba],$a=0;$a<Va.letters.length;$a++)Bd[Va.letters[$a]]=Va.base;var Vd=function(e){return e.replace(jb,function(t){return Bd[t]})},Ub=_b(Vd),$d=function(e){return e.replace(/^\s+|\s+$/g,"")},Yb=function(e){return"".concat(e.label," ").concat(e.value)},Gb=function(e){return function(t,n){if(t.data.__isNew__)return!0;var o=je({ignoreCase:!0,ignoreAccents:!0,stringify:Yb,trim:!0,matchFrom:"any"},e),r=o.ignoreCase,i=o.ignoreAccents,l=o.stringify,s=o.trim,a=o.matchFrom,c=s?$d(n):n,u=s?$d(l(t)):l(t);return r&&(c=c.toLowerCase(),u=u.toLowerCase()),i&&(c=Ub(c),u=Vd(u)),a==="start"?u.substr(0,c.length)===c:u.indexOf(c)>-1}},Kb=["innerRef"];function Xb(e){var t=e.innerRef,n=bo(e,Kb),o=C1(n,"onExited","in","enter","exit","appear");return Fe("input",Xe({ref:t},o,{css:za({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 qb=function(e){e.cancelable&&e.preventDefault(),e.stopPropagation()};function Zb(e){var t=e.isEnabled,n=e.onBottomArrive,o=e.onBottomLeave,r=e.onTopArrive,i=e.onTopLeave,l=p.useRef(!1),s=p.useRef(!1),a=p.useRef(0),c=p.useRef(null),u=p.useCallback(function(b,y){if(c.current!==null){var v=c.current,I=v.scrollTop,T=v.scrollHeight,k=v.clientHeight,x=c.current,L=y>0,O=T-k-I,R=!1;O>y&&l.current&&(o&&o(b),l.current=!1),L&&s.current&&(i&&i(b),s.current=!1),L&&y>O?(n&&!l.current&&n(b),x.scrollTop=T,R=!0,l.current=!0):!L&&-y>I&&(r&&!s.current&&r(b),x.scrollTop=0,R=!0,s.current=!0),R&&qb(b)}},[n,o,r,i]),d=p.useCallback(function(b){u(b,b.deltaY)},[u]),f=p.useCallback(function(b){a.current=b.changedTouches[0].clientY},[]),h=p.useCallback(function(b){var y=a.current-b.changedTouches[0].clientY;u(b,y)},[u]),g=p.useCallback(function(b){if(b){var y=w1?{passive:!1}:!1;b.addEventListener("wheel",d,y),b.addEventListener("touchstart",f,y),b.addEventListener("touchmove",h,y)}},[h,f,d]),m=p.useCallback(function(b){b&&(b.removeEventListener("wheel",d,!1),b.removeEventListener("touchstart",f,!1),b.removeEventListener("touchmove",h,!1))},[h,f,d]);return p.useEffect(function(){if(t){var b=c.current;return g(b),function(){m(b)}}},[t,g,m]),function(b){c.current=b}}var Wd=["boxSizing","height","overflow","paddingRight","position"],jd={boxSizing:"border-box",overflow:"hidden",position:"relative",height:"100%"};function Ud(e){e.preventDefault()}function Yd(e){e.stopPropagation()}function Gd(){var e=this.scrollTop,t=this.scrollHeight,n=e+this.offsetHeight;e===0?this.scrollTop=1:n===t&&(this.scrollTop=e-1)}function Kd(){return"ontouchstart"in window||navigator.maxTouchPoints}var Xd=!!(typeof window<"u"&&window.document&&window.document.createElement),Jr=0,lr={capture:!1,passive:!1};function Jb(e){var t=e.isEnabled,n=e.accountForScrollbars,o=n===void 0?!0:n,r=p.useRef({}),i=p.useRef(null),l=p.useCallback(function(a){if(Xd){var c=document.body,u=c&&c.style;if(o&&Wd.forEach(function(g){var m=u&&u[g];r.current[g]=m}),o&&Jr<1){var d=parseInt(r.current.paddingRight,10)||0,f=document.body?document.body.clientWidth:0,h=window.innerWidth-f+d||0;Object.keys(jd).forEach(function(g){var m=jd[g];u&&(u[g]=m)}),u&&(u.paddingRight="".concat(h,"px"))}c&&Kd()&&(c.addEventListener("touchmove",Ud,lr),a&&(a.addEventListener("touchstart",Gd,lr),a.addEventListener("touchmove",Yd,lr))),Jr+=1}},[o]),s=p.useCallback(function(a){if(Xd){var c=document.body,u=c&&c.style;Jr=Math.max(Jr-1,0),o&&Jr<1&&Wd.forEach(function(d){var f=r.current[d];u&&(u[d]=f)}),c&&Kd()&&(c.removeEventListener("touchmove",Ud,lr),a&&(a.removeEventListener("touchstart",Gd,lr),a.removeEventListener("touchmove",Yd,lr)))}},[o]);return p.useEffect(function(){if(t){var a=i.current;return l(a),function(){s(a)}}},[t,l,s]),function(a){i.current=a}}var Qb=function(e){var t=e.target;return t.ownerDocument.activeElement&&t.ownerDocument.activeElement.blur()},ew={name:"1kfdb0e",styles:"position:fixed;left:0;bottom:0;right:0;top:0"};function tw(e){var t=e.children,n=e.lockEnabled,o=e.captureEnabled,r=o===void 0?!0:o,i=e.onBottomArrive,l=e.onBottomLeave,s=e.onTopArrive,a=e.onTopLeave,c=Zb({isEnabled:r,onBottomArrive:i,onBottomLeave:l,onTopArrive:s,onTopLeave:a}),u=Jb({isEnabled:n}),d=function(f){c(f),u(f)};return Fe(p.Fragment,null,n&&Fe("div",{onClick:Qb,css:ew}),t(d))}var nw={name:"1a0ro4n-requiredInput",styles:"label:requiredInput;opacity:0;pointer-events:none;position:absolute;bottom:0;left:0;right:0;width:100%"},ow=function(e){var t=e.name,n=e.onFocus;return Fe("input",{required:!0,name:t,tabIndex:-1,"aria-hidden":"true",onFocus:n,css:nw,value:"",onChange:function(){}})},rw=ow;function Wa(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 iw(){return Wa(/^iPhone/i)}function qd(){return Wa(/^Mac/i)}function lw(){return Wa(/^iPad/i)||qd()&&navigator.maxTouchPoints>1}function aw(){return iw()||lw()}function sw(){return qd()||aw()}var cw=function(e){return e.label},uw=function(e){return e.label},dw=function(e){return e.value},hw=function(e){return!!e.isDisabled},fw={clearIndicator:q1,container:N1,control:ob,dropdownIndicator:K1,group:ab,groupHeading:cb,indicatorsContainer:W1,indicatorSeparator:J1,input:fb,loadingIndicator:tb,loadingMessage:P1,menu:E1,menuList:D1,menuPortal:F1,multiValue:bb,multiValueLabel:wb,multiValueRemove:yb,noOptionsMessage:L1,option:Rb,placeholder:Tb,singleValue:zb,valueContainer:V1},pw={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%)"},gw=4,Zd=4,mw=38,vw=Zd*2,bw={baseUnit:Zd,controlHeight:mw,menuGutter:vw},ja={borderRadius:gw,colors:pw,spacing:bw},ww={"aria-live":"polite",backspaceRemovesValue:!0,blurInputOnSelect:Rd(),captureMenuScroll:!Rd(),classNames:{},closeMenuOnSelect:!0,closeMenuOnScroll:!1,components:{},controlShouldRenderValue:!0,escapeClearsValue:!1,filterOption:Gb(),formatGroupLabel:cw,getOptionLabel:uw,getOptionValue:dw,isDisabled:!1,isLoading:!1,isMulti:!1,isRtl:!1,isSearchable:!0,isOptionDisabled:hw,loadingMessage:function(){return"Loading..."},maxMenuHeight:300,minMenuHeight:140,menuIsOpen:!1,menuPlacement:"bottom",menuPosition:"absolute",menuShouldBlockScroll:!1,menuShouldScrollIntoView:!v1(),noOptionsMessage:function(){return"No options"},openMenuOnFocus:!1,openMenuOnClick:!0,options:[],pageSize:5,placeholder:"Select...",screenReaderStatus:function(e){var t=e.count;return"".concat(t," result").concat(t!==1?"s":""," available")},styles:{},tabIndex:0,tabSelectsValue:!0,unstyled:!1};function Jd(e,t,n,o){var r=oh(e,t,n),i=rh(e,t,n),l=nh(e,t),s=el(e,t);return{type:"option",data:t,isDisabled:r,isSelected:i,label:l,value:s,index:o}}function Qi(e,t){return e.options.map(function(n,o){if("options"in n){var r=n.options.map(function(l,s){return Jd(e,l,t,s)}).filter(function(l){return th(e,l)});return r.length>0?{type:"group",data:n,options:r,index:o}:void 0}var i=Jd(e,n,t,o);return th(e,i)?i:void 0}).filter(y1)}function Qd(e){return e.reduce(function(t,n){return n.type==="group"?t.push.apply(t,xs(n.options.map(function(o){return o.data}))):t.push(n.data),t},[])}function eh(e,t){return e.reduce(function(n,o){return o.type==="group"?n.push.apply(n,xs(o.options.map(function(r){return{data:r.data,id:"".concat(t,"-").concat(o.index,"-").concat(r.index)}}))):n.push({data:o.data,id:"".concat(t,"-").concat(o.index)}),n},[])}function yw(e,t){return Qd(Qi(e,t))}function th(e,t){var n=e.inputValue,o=n===void 0?"":n,r=t.data,i=t.isSelected,l=t.label,s=t.value;return(!lh(e)||!i)&&ih(e,{label:l,value:s,data:r},o)}function xw(e,t){var n=e.focusedValue,o=e.selectValue,r=o.indexOf(n);if(r>-1){var i=t.indexOf(n);if(i>-1)return n;if(r<t.length)return t[r]}return null}function Cw(e,t){var n=e.focusedOption;return n&&t.indexOf(n)>-1?n:t[0]}var Ua=function(e,t){var n,o=(n=e.find(function(r){return r.data===t}))===null||n===void 0?void 0:n.id;return o||null},nh=function(e,t){return e.getOptionLabel(t)},el=function(e,t){return e.getOptionValue(t)};function oh(e,t,n){return typeof e.isOptionDisabled=="function"?e.isOptionDisabled(t,n):!1}function rh(e,t,n){if(n.indexOf(t)>-1)return!0;if(typeof e.isOptionSelected=="function")return e.isOptionSelected(t,n);var o=el(e,t);return n.some(function(r){return el(e,r)===o})}function ih(e,t,n){return e.filterOption?e.filterOption(t,n):!0}var lh=function(e){var t=e.hideSelectedOptions,n=e.isMulti;return t===void 0?n:t},kw=1,ah=function(e){lC(n,e);var t=cC(n);function n(o){var r;if(sC(this,n),r=t.call(this,o),r.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:""},r.blockOptionHover=!1,r.isComposing=!1,r.commonProps=void 0,r.initialTouchX=0,r.initialTouchY=0,r.openAfterFocus=!1,r.scrollToFocusedOptionOnUpdate=!1,r.userIsDragging=void 0,r.isAppleDevice=sw(),r.controlRef=null,r.getControlRef=function(a){r.controlRef=a},r.focusedOptionRef=null,r.getFocusedOptionRef=function(a){r.focusedOptionRef=a},r.menuListRef=null,r.getMenuListRef=function(a){r.menuListRef=a},r.inputRef=null,r.getInputRef=function(a){r.inputRef=a},r.focus=r.focusInput,r.blur=r.blurInput,r.onChange=function(a,c){var u=r.props,d=u.onChange,f=u.name;c.name=f,r.ariaOnChange(a,c),d(a,c)},r.setValue=function(a,c,u){var d=r.props,f=d.closeMenuOnSelect,h=d.isMulti,g=d.inputValue;r.onInputChange("",{action:"set-value",prevInputValue:g}),f&&(r.setState({inputIsHiddenAfterUpdate:!h}),r.onMenuClose()),r.setState({clearFocusValueOnUpdate:!0}),r.onChange(a,{action:c,option:u})},r.selectOption=function(a){var c=r.props,u=c.blurInputOnSelect,d=c.isMulti,f=c.name,h=r.state.selectValue,g=d&&r.isOptionSelected(a,h),m=r.isOptionDisabled(a,h);if(g){var b=r.getOptionValue(a);r.setValue(h.filter(function(y){return r.getOptionValue(y)!==b}),"deselect-option",a)}else if(!m)d?r.setValue([].concat(xs(h),[a]),"select-option",a):r.setValue(a,"select-option");else{r.ariaOnChange(a,{action:"select-option",option:a,name:f});return}u&&r.blurInput()},r.removeValue=function(a){var c=r.props.isMulti,u=r.state.selectValue,d=r.getOptionValue(a),f=u.filter(function(g){return r.getOptionValue(g)!==d}),h=Ji(c,f,f[0]||null);r.onChange(h,{action:"remove-value",removedValue:a}),r.focusInput()},r.clearValue=function(){var a=r.state.selectValue;r.onChange(Ji(r.props.isMulti,[],null),{action:"clear",removedValues:a})},r.popValue=function(){var a=r.props.isMulti,c=r.state.selectValue,u=c[c.length-1],d=c.slice(0,c.length-1),f=Ji(a,d,d[0]||null);r.onChange(f,{action:"pop-value",removedValue:u})},r.getFocusedOptionId=function(a){return Ua(r.state.focusableOptionsWithIds,a)},r.getFocusableOptionsWithIds=function(){return eh(Qi(r.props,r.state.selectValue),r.getElementId("option"))},r.getValue=function(){return r.state.selectValue},r.cx=function(){for(var a=arguments.length,c=new Array(a),u=0;u<a;u++)c[u]=arguments[u];return h1.apply(void 0,[r.props.classNamePrefix].concat(c))},r.getOptionLabel=function(a){return nh(r.props,a)},r.getOptionValue=function(a){return el(r.props,a)},r.getStyles=function(a,c){var u=r.props.unstyled,d=fw[a](c,u);d.boxSizing="border-box";var f=r.props.styles[a];return f?f(d,c):d},r.getClassNames=function(a,c){var u,d;return(u=(d=r.props.classNames)[a])===null||u===void 0?void 0:u.call(d,c)},r.getElementId=function(a){return"".concat(r.state.instancePrefix,"-").concat(a)},r.getComponents=function(){return Ab(r.props)},r.buildCategorizedOptions=function(){return Qi(r.props,r.state.selectValue)},r.getCategorizedOptions=function(){return r.props.menuIsOpen?r.buildCategorizedOptions():[]},r.buildFocusableOptions=function(){return Qd(r.buildCategorizedOptions())},r.getFocusableOptions=function(){return r.props.menuIsOpen?r.buildFocusableOptions():[]},r.ariaOnChange=function(a,c){r.setState({ariaSelection:je({value:a},c)})},r.onMenuMouseDown=function(a){a.button===0&&(a.stopPropagation(),a.preventDefault(),r.focusInput())},r.onMenuMouseMove=function(a){r.blockOptionHover=!1},r.onControlMouseDown=function(a){if(!a.defaultPrevented){var c=r.props.openMenuOnClick;r.state.isFocused?r.props.menuIsOpen?a.target.tagName!=="INPUT"&&a.target.tagName!=="TEXTAREA"&&r.onMenuClose():c&&r.openMenu("first"):(c&&(r.openAfterFocus=!0),r.focusInput()),a.target.tagName!=="INPUT"&&a.target.tagName!=="TEXTAREA"&&a.preventDefault()}},r.onDropdownIndicatorMouseDown=function(a){if(!(a&&a.type==="mousedown"&&a.button!==0)&&!r.props.isDisabled){var c=r.props,u=c.isMulti,d=c.menuIsOpen;r.focusInput(),d?(r.setState({inputIsHiddenAfterUpdate:!u}),r.onMenuClose()):r.openMenu("first"),a.preventDefault()}},r.onClearIndicatorMouseDown=function(a){a&&a.type==="mousedown"&&a.button!==0||(r.clearValue(),a.preventDefault(),r.openAfterFocus=!1,a.type==="touchend"?r.focusInput():setTimeout(function(){return r.focusInput()}))},r.onScroll=function(a){typeof r.props.closeMenuOnScroll=="boolean"?a.target instanceof HTMLElement&&Ki(a.target)&&r.props.onMenuClose():typeof r.props.closeMenuOnScroll=="function"&&r.props.closeMenuOnScroll(a)&&r.props.onMenuClose()},r.onCompositionStart=function(){r.isComposing=!0},r.onCompositionEnd=function(){r.isComposing=!1},r.onTouchStart=function(a){var c=a.touches,u=c&&c.item(0);u&&(r.initialTouchX=u.clientX,r.initialTouchY=u.clientY,r.userIsDragging=!1)},r.onTouchMove=function(a){var c=a.touches,u=c&&c.item(0);if(u){var d=Math.abs(u.clientX-r.initialTouchX),f=Math.abs(u.clientY-r.initialTouchY),h=5;r.userIsDragging=d>h||f>h}},r.onTouchEnd=function(a){r.userIsDragging||(r.controlRef&&!r.controlRef.contains(a.target)&&r.menuListRef&&!r.menuListRef.contains(a.target)&&r.blurInput(),r.initialTouchX=0,r.initialTouchY=0)},r.onControlTouchEnd=function(a){r.userIsDragging||r.onControlMouseDown(a)},r.onClearIndicatorTouchEnd=function(a){r.userIsDragging||r.onClearIndicatorMouseDown(a)},r.onDropdownIndicatorTouchEnd=function(a){r.userIsDragging||r.onDropdownIndicatorMouseDown(a)},r.handleInputChange=function(a){var c=r.props.inputValue,u=a.currentTarget.value;r.setState({inputIsHiddenAfterUpdate:!1}),r.onInputChange(u,{action:"input-change",prevInputValue:c}),r.props.menuIsOpen||r.onMenuOpen()},r.onInputFocus=function(a){r.props.onFocus&&r.props.onFocus(a),r.setState({inputIsHiddenAfterUpdate:!1,isFocused:!0}),(r.openAfterFocus||r.props.openMenuOnFocus)&&r.openMenu("first"),r.openAfterFocus=!1},r.onInputBlur=function(a){var c=r.props.inputValue;if(r.menuListRef&&r.menuListRef.contains(document.activeElement)){r.inputRef.focus();return}r.props.onBlur&&r.props.onBlur(a),r.onInputChange("",{action:"input-blur",prevInputValue:c}),r.onMenuClose(),r.setState({focusedValue:null,isFocused:!1})},r.onOptionHover=function(a){if(!(r.blockOptionHover||r.state.focusedOption===a)){var c=r.getFocusableOptions(),u=c.indexOf(a);r.setState({focusedOption:a,focusedOptionId:u>-1?r.getFocusedOptionId(a):null})}},r.shouldHideSelectedOptions=function(){return lh(r.props)},r.onValueInputFocus=function(a){a.preventDefault(),a.stopPropagation(),r.focus()},r.onKeyDown=function(a){var c=r.props,u=c.isMulti,d=c.backspaceRemovesValue,f=c.escapeClearsValue,h=c.inputValue,g=c.isClearable,m=c.isDisabled,b=c.menuIsOpen,y=c.onKeyDown,v=c.tabSelectsValue,I=c.openMenuOnFocus,T=r.state,k=T.focusedOption,x=T.focusedValue,L=T.selectValue;if(!m&&!(typeof y=="function"&&(y(a),a.defaultPrevented))){switch(r.blockOptionHover=!0,a.key){case"ArrowLeft":if(!u||h)return;r.focusValue("previous");break;case"ArrowRight":if(!u||h)return;r.focusValue("next");break;case"Delete":case"Backspace":if(h)return;if(x)r.removeValue(x);else{if(!d)return;u?r.popValue():g&&r.clearValue()}break;case"Tab":if(r.isComposing||a.shiftKey||!b||!v||!k||I&&r.isOptionSelected(k,L))return;r.selectOption(k);break;case"Enter":if(a.keyCode===229)break;if(b){if(!k||r.isComposing)return;r.selectOption(k);break}return;case"Escape":b?(r.setState({inputIsHiddenAfterUpdate:!1}),r.onInputChange("",{action:"menu-close",prevInputValue:h}),r.onMenuClose()):g&&f&&r.clearValue();break;case" ":if(h)return;if(!b){r.openMenu("first");break}if(!k)return;r.selectOption(k);break;case"ArrowUp":b?r.focusOption("up"):r.openMenu("last");break;case"ArrowDown":b?r.focusOption("down"):r.openMenu("first");break;case"PageUp":if(!b)return;r.focusOption("pageup");break;case"PageDown":if(!b)return;r.focusOption("pagedown");break;case"Home":if(!b)return;r.focusOption("first");break;case"End":if(!b)return;r.focusOption("last");break;default:return}a.preventDefault()}},r.state.instancePrefix="react-select-"+(r.props.instanceId||++kw),r.state.selectValue=Cd(o.value),o.menuIsOpen&&r.state.selectValue.length){var i=r.getFocusableOptionsWithIds(),l=r.buildFocusableOptions(),s=l.indexOf(r.state.selectValue[0]);r.state.focusableOptionsWithIds=i,r.state.focusedOption=l[s],r.state.focusedOptionId=Ua(i,l[s])}return r}return aC(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&&Md(this.menuListRef,this.focusedOptionRef)}},{key:"componentDidUpdate",value:function(o){var r=this.props,i=r.isDisabled,l=r.menuIsOpen,s=this.state.isFocused;(s&&!i&&o.isDisabled||s&&l&&!o.menuIsOpen)&&this.focusInput(),s&&i&&!o.isDisabled?this.setState({isFocused:!1},this.onMenuClose):!s&&!i&&o.isDisabled&&this.inputRef===document.activeElement&&this.setState({isFocused:!0}),this.menuListRef&&this.focusedOptionRef&&this.scrollToFocusedOptionOnUpdate&&(Md(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(o,r){this.props.onInputChange(o,r)}},{key:"focusInput",value:function(){this.inputRef&&this.inputRef.focus()}},{key:"blurInput",value:function(){this.inputRef&&this.inputRef.blur()}},{key:"openMenu",value:function(o){var r=this,i=this.state,l=i.selectValue,s=i.isFocused,a=this.buildFocusableOptions(),c=o==="first"?0:a.length-1;if(!this.props.isMulti){var u=a.indexOf(l[0]);u>-1&&(c=u)}this.scrollToFocusedOptionOnUpdate=!(s&&this.menuListRef),this.setState({inputIsHiddenAfterUpdate:!1,focusedValue:null,focusedOption:a[c],focusedOptionId:this.getFocusedOptionId(a[c])},function(){return r.onMenuOpen()})}},{key:"focusValue",value:function(o){var r=this.state,i=r.selectValue,l=r.focusedValue;if(this.props.isMulti){this.setState({focusedOption:null});var s=i.indexOf(l);l||(s=-1);var a=i.length-1,c=-1;if(i.length){switch(o){case"previous":s===0?c=0:s===-1?c=a:c=s-1;break;case"next":s>-1&&s<a&&(c=s+1);break}this.setState({inputIsHidden:c!==-1,focusedValue:i[c]})}}}},{key:"focusOption",value:function(){var o=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"first",r=this.props.pageSize,i=this.state.focusedOption,l=this.getFocusableOptions();if(l.length){var s=0,a=l.indexOf(i);i||(a=-1),o==="up"?s=a>0?a-1:l.length-1:o==="down"?s=(a+1)%l.length:o==="pageup"?(s=a-r,s<0&&(s=0)):o==="pagedown"?(s=a+r,s>l.length-1&&(s=l.length-1)):o==="last"&&(s=l.length-1),this.scrollToFocusedOptionOnUpdate=!0,this.setState({focusedOption:l[s],focusedValue:null,focusedOptionId:this.getFocusedOptionId(l[s])})}}},{key:"getTheme",value:function(){return this.props.theme?typeof this.props.theme=="function"?this.props.theme(ja):je(je({},ja),this.props.theme):ja}},{key:"getCommonProps",value:function(){var o=this.clearValue,r=this.cx,i=this.getStyles,l=this.getClassNames,s=this.getValue,a=this.selectOption,c=this.setValue,u=this.props,d=u.isMulti,f=u.isRtl,h=u.options,g=this.hasValue();return{clearValue:o,cx:r,getStyles:i,getClassNames:l,getValue:s,hasValue:g,isMulti:d,isRtl:f,options:h,selectOption:a,selectProps:u,setValue:c,theme:this.getTheme()}}},{key:"hasValue",value:function(){var o=this.state.selectValue;return o.length>0}},{key:"hasOptions",value:function(){return!!this.getFocusableOptions().length}},{key:"isClearable",value:function(){var o=this.props,r=o.isClearable,i=o.isMulti;return r===void 0?i:r}},{key:"isOptionDisabled",value:function(o,r){return oh(this.props,o,r)}},{key:"isOptionSelected",value:function(o,r){return rh(this.props,o,r)}},{key:"filterOption",value:function(o,r){return ih(this.props,o,r)}},{key:"formatOptionLabel",value:function(o,r){if(typeof this.props.formatOptionLabel=="function"){var i=this.props.inputValue,l=this.state.selectValue;return this.props.formatOptionLabel(o,{context:r,inputValue:i,selectValue:l})}else return this.getOptionLabel(o)}},{key:"formatGroupLabel",value:function(o){return this.props.formatGroupLabel(o)}},{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 o=this.props,r=o.isDisabled,i=o.isSearchable,l=o.inputId,s=o.inputValue,a=o.tabIndex,c=o.form,u=o.menuIsOpen,d=o.required,f=this.getComponents(),h=f.Input,g=this.state,m=g.inputIsHidden,b=g.ariaSelection,y=this.commonProps,v=l||this.getElementId("input"),I=je(je(je({"aria-autocomplete":"list","aria-expanded":u,"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":d,role:"combobox","aria-activedescendant":this.isAppleDevice?void 0:this.state.focusedOptionId||""},u&&{"aria-controls":this.getElementId("listbox")}),!i&&{"aria-readonly":!0}),this.hasValue()?(b==null?void 0:b.action)==="initial-input-focus"&&{"aria-describedby":this.getElementId("live-region")}:{"aria-describedby":this.getElementId("placeholder")});return i?p.createElement(h,Xe({},y,{autoCapitalize:"none",autoComplete:"off",autoCorrect:"off",id:v,innerRef:this.getInputRef,isDisabled:r,isHidden:m,onBlur:this.onInputBlur,onChange:this.handleInputChange,onFocus:this.onInputFocus,spellCheck:"false",tabIndex:a,form:c,type:"text",value:s},I)):p.createElement(Xb,Xe({id:v,innerRef:this.getInputRef,onBlur:this.onInputBlur,onChange:Gi,onFocus:this.onInputFocus,disabled:r,tabIndex:a,inputMode:"none",form:c,value:""},I))}},{key:"renderPlaceholderOrValue",value:function(){var o=this,r=this.getComponents(),i=r.MultiValue,l=r.MultiValueContainer,s=r.MultiValueLabel,a=r.MultiValueRemove,c=r.SingleValue,u=r.Placeholder,d=this.commonProps,f=this.props,h=f.controlShouldRenderValue,g=f.isDisabled,m=f.isMulti,b=f.inputValue,y=f.placeholder,v=this.state,I=v.selectValue,T=v.focusedValue,k=v.isFocused;if(!this.hasValue()||!h)return b?null:p.createElement(u,Xe({},d,{key:"placeholder",isDisabled:g,isFocused:k,innerProps:{id:this.getElementId("placeholder")}}),y);if(m)return I.map(function(L,O){var R=L===T,P="".concat(o.getOptionLabel(L),"-").concat(o.getOptionValue(L));return p.createElement(i,Xe({},d,{components:{Container:l,Label:s,Remove:a},isFocused:R,isDisabled:g,key:P,index:O,removeProps:{onClick:function(){return o.removeValue(L)},onTouchEnd:function(){return o.removeValue(L)},onMouseDown:function(M){M.preventDefault()}},data:L}),o.formatOptionLabel(L,"value"))});if(b)return null;var x=I[0];return p.createElement(c,Xe({},d,{data:x,isDisabled:g}),this.formatOptionLabel(x,"value"))}},{key:"renderClearIndicator",value:function(){var o=this.getComponents(),r=o.ClearIndicator,i=this.commonProps,l=this.props,s=l.isDisabled,a=l.isLoading,c=this.state.isFocused;if(!this.isClearable()||!r||s||!this.hasValue()||a)return null;var u={onMouseDown:this.onClearIndicatorMouseDown,onTouchEnd:this.onClearIndicatorTouchEnd,"aria-hidden":"true"};return p.createElement(r,Xe({},i,{innerProps:u,isFocused:c}))}},{key:"renderLoadingIndicator",value:function(){var o=this.getComponents(),r=o.LoadingIndicator,i=this.commonProps,l=this.props,s=l.isDisabled,a=l.isLoading,c=this.state.isFocused;if(!r||!a)return null;var u={"aria-hidden":"true"};return p.createElement(r,Xe({},i,{innerProps:u,isDisabled:s,isFocused:c}))}},{key:"renderIndicatorSeparator",value:function(){var o=this.getComponents(),r=o.DropdownIndicator,i=o.IndicatorSeparator;if(!r||!i)return null;var l=this.commonProps,s=this.props.isDisabled,a=this.state.isFocused;return p.createElement(i,Xe({},l,{isDisabled:s,isFocused:a}))}},{key:"renderDropdownIndicator",value:function(){var o=this.getComponents(),r=o.DropdownIndicator;if(!r)return null;var i=this.commonProps,l=this.props.isDisabled,s=this.state.isFocused,a={onMouseDown:this.onDropdownIndicatorMouseDown,onTouchEnd:this.onDropdownIndicatorTouchEnd,"aria-hidden":"true"};return p.createElement(r,Xe({},i,{innerProps:a,isDisabled:l,isFocused:s}))}},{key:"renderMenu",value:function(){var o=this,r=this.getComponents(),i=r.Group,l=r.GroupHeading,s=r.Menu,a=r.MenuList,c=r.MenuPortal,u=r.LoadingMessage,d=r.NoOptionsMessage,f=r.Option,h=this.commonProps,g=this.state.focusedOption,m=this.props,b=m.captureMenuScroll,y=m.inputValue,v=m.isLoading,I=m.loadingMessage,T=m.minMenuHeight,k=m.maxMenuHeight,x=m.menuIsOpen,L=m.menuPlacement,O=m.menuPosition,R=m.menuPortalTarget,P=m.menuShouldBlockScroll,M=m.menuShouldScrollIntoView,S=m.noOptionsMessage,E=m.onMenuScrollToTop,D=m.onMenuScrollToBottom;if(!x)return null;var C=function(U,ie){var ce=U.type,he=U.data,pe=U.isDisabled,Q=U.isSelected,_=U.label,z=U.value,j=g===he,ge=pe?void 0:function(){return o.onOptionHover(he)},ke=pe?void 0:function(){return o.selectOption(he)},_e="".concat(o.getElementId("option"),"-").concat(ie),xe={id:_e,onClick:ke,onMouseMove:ge,onMouseOver:ge,tabIndex:-1,role:"option","aria-selected":o.isAppleDevice?void 0:Q};return p.createElement(f,Xe({},h,{innerProps:xe,data:he,isDisabled:pe,isSelected:Q,key:_e,label:_,type:ce,value:z,isFocused:j,innerRef:j?o.getFocusedOptionRef:void 0}),o.formatOptionLabel(U.data,"menu"))},G;if(this.hasOptions())G=this.getCategorizedOptions().map(function(U){if(U.type==="group"){var ie=U.data,ce=U.options,he=U.index,pe="".concat(o.getElementId("group"),"-").concat(he),Q="".concat(pe,"-heading");return p.createElement(i,Xe({},h,{key:pe,data:ie,options:ce,Heading:l,headingProps:{id:Q,data:U.data},label:o.formatGroupLabel(U.data)}),U.options.map(function(_){return C(_,"".concat(he,"-").concat(_.index))}))}else if(U.type==="option")return C(U,"".concat(U.index))});else if(v){var B=I({inputValue:y});if(B===null)return null;G=p.createElement(u,h,B)}else{var J=S({inputValue:y});if(J===null)return null;G=p.createElement(d,h,J)}var se={minMenuHeight:T,maxMenuHeight:k,menuPlacement:L,menuPosition:O,menuShouldScrollIntoView:M},re=p.createElement(I1,Xe({},h,se),function(U){var ie=U.ref,ce=U.placerProps,he=ce.placement,pe=ce.maxHeight;return p.createElement(s,Xe({},h,se,{innerRef:ie,innerProps:{onMouseDown:o.onMenuMouseDown,onMouseMove:o.onMenuMouseMove},isLoading:v,placement:he}),p.createElement(tw,{captureEnabled:b,onTopArrive:E,onBottomArrive:D,lockEnabled:P},function(Q){return p.createElement(a,Xe({},h,{innerRef:function(_){o.getMenuListRef(_),Q(_)},innerProps:{role:"listbox","aria-multiselectable":h.isMulti,id:o.getElementId("listbox")},isLoading:v,maxHeight:pe,focusedOption:g}),G)}))});return R||O==="fixed"?p.createElement(c,Xe({},h,{appendTo:R,controlElement:this.controlRef,menuPlacement:L,menuPosition:O}),re):re}},{key:"renderFormField",value:function(){var o=this,r=this.props,i=r.delimiter,l=r.isDisabled,s=r.isMulti,a=r.name,c=r.required,u=this.state.selectValue;if(c&&!this.hasValue()&&!l)return p.createElement(rw,{name:a,onFocus:this.onValueInputFocus});if(!(!a||l))if(s)if(i){var d=u.map(function(g){return o.getOptionValue(g)}).join(i);return p.createElement("input",{name:a,type:"hidden",value:d})}else{var f=u.length>0?u.map(function(g,m){return p.createElement("input",{key:"i-".concat(m),name:a,type:"hidden",value:o.getOptionValue(g)})}):p.createElement("input",{name:a,type:"hidden",value:""});return p.createElement("div",null,f)}else{var h=u[0]?this.getOptionValue(u[0]):"";return p.createElement("input",{name:a,type:"hidden",value:h})}}},{key:"renderLiveRegion",value:function(){var o=this.commonProps,r=this.state,i=r.ariaSelection,l=r.focusedOption,s=r.focusedValue,a=r.isFocused,c=r.selectValue,u=this.getFocusableOptions();return p.createElement(Wb,Xe({},o,{id:this.getElementId("live-region"),ariaSelection:i,focusedOption:l,focusedValue:s,isFocused:a,selectValue:c,focusableOptions:u,isAppleDevice:this.isAppleDevice}))}},{key:"render",value:function(){var o=this.getComponents(),r=o.Control,i=o.IndicatorsContainer,l=o.SelectContainer,s=o.ValueContainer,a=this.props,c=a.className,u=a.id,d=a.isDisabled,f=a.menuIsOpen,h=this.state.isFocused,g=this.commonProps=this.getCommonProps();return p.createElement(l,Xe({},g,{className:c,innerProps:{id:u,onKeyDown:this.onKeyDown},isDisabled:d,isFocused:h}),this.renderLiveRegion(),p.createElement(r,Xe({},g,{innerRef:this.getControlRef,innerProps:{onMouseDown:this.onControlMouseDown,onTouchEnd:this.onControlTouchEnd},isDisabled:d,isFocused:h,menuIsOpen:f}),p.createElement(s,Xe({},g,{isDisabled:d}),this.renderPlaceholderOrValue(),this.renderInput()),p.createElement(i,Xe({},g,{isDisabled:d}),this.renderClearIndicator(),this.renderLoadingIndicator(),this.renderIndicatorSeparator(),this.renderDropdownIndicator())),this.renderMenu(),this.renderFormField())}}],[{key:"getDerivedStateFromProps",value:function(o,r){var i=r.prevProps,l=r.clearFocusValueOnUpdate,s=r.inputIsHiddenAfterUpdate,a=r.ariaSelection,c=r.isFocused,u=r.prevWasFocused,d=r.instancePrefix,f=o.options,h=o.value,g=o.menuIsOpen,m=o.inputValue,b=o.isMulti,y=Cd(h),v={};if(i&&(h!==i.value||f!==i.options||g!==i.menuIsOpen||m!==i.inputValue)){var I=g?yw(o,y):[],T=g?eh(Qi(o,y),"".concat(d,"-option")):[],k=l?xw(r,y):null,x=Cw(r,I),L=Ua(T,x);v={selectValue:y,focusedOption:x,focusedOptionId:L,focusableOptionsWithIds:T,focusedValue:k,clearFocusValueOnUpdate:!1}}var O=s!=null&&o!==i?{inputIsHidden:s,inputIsHiddenAfterUpdate:void 0}:{},R=a,P=c&&u;return c&&!P&&(R={value:Ji(b,y,y[0]||null),options:y,action:"initial-input-focus"},P=!u),(a==null?void 0:a.action)==="initial-input-focus"&&(R=null),je(je(je({},v),O),{},{prevProps:o,ariaSelection:R,prevWasFocused:P})}}]),n}(p.Component);ah.defaultProps=ww;var Sw=p.forwardRef(function(e,t){var n=Iv(e);return p.createElement(ah,Xe({ref:t},n))}),Mw=Sw;const Rw=e=>{const{Menu:t}=Fd,{children:n,...o}=e;return p.createElement(t,{...o},n)},Ew=sn("div")({name:"Wrap",class:"gdg-wghi2zc",propsAsIs:!1}),Iw=sn("div")({name:"PortalWrap",class:"gdg-p13nj8j0",propsAsIs:!1}),Tw=sn("div")({name:"ReadOnlyWrap",class:"gdg-r6sia3g",propsAsIs:!1}),Ow=e=>{const{value:t,onFinishedEditing:n,initialValue:o}=e,{allowedValues:r,value:i}=t.data,[l,s]=p.useState(i),[a,c]=p.useState(o??""),u=Mp(),d=p.useMemo(()=>r.map(f=>typeof f=="string"||f===null||f===void 0?{value:f,label:(f==null?void 0:f.toString())??""}:f),[r]);return t.readonly?p.createElement(Tw,null,p.createElement(_o,{highlight:!0,autoFocus:!1,disabled:!0,value:l??"",onChange:()=>{}})):p.createElement(Ew,null,p.createElement(Mw,{className:"glide-select",inputValue:a,onInputChange:c,menuPlacement:"auto",value:d.find(f=>f.value===l),styles:{control:f=>({...f,border:0,boxShadow:"none"}),option:(f,{isFocused:h})=>({...f,fontSize:u.editorFontSize,fontFamily:u.fontFamily,cursor:h?"pointer":void 0,paddingLeft:u.cellHorizontalPadding,paddingRight:u.cellHorizontalPadding,":active":{...f[":active"],color:u.accentFg},":empty::after":{content:'"&nbsp;"',visibility:"hidden"}})},theme:f=>({...f,colors:{...f.colors,neutral0:u.bgCell,neutral5:u.bgCell,neutral10:u.bgCell,neutral20:u.bgCellMedium,neutral30:u.bgCellMedium,neutral40:u.bgCellMedium,neutral50:u.textLight,neutral60:u.textMedium,neutral70:u.textMedium,neutral80:u.textDark,neutral90:u.textDark,neutral100:u.textDark,primary:u.accentColor,primary75:u.accentColor,primary50:u.accentColor,primary25:u.accentLight}}),menuPortalTarget:document.getElementById("portal"),autoFocus:!0,openMenuOnFocus:!0,components:{DropdownIndicator:()=>null,IndicatorSeparator:()=>null,Menu:f=>p.createElement(Iw,null,p.createElement(Rw,{className:"click-outside-ignore",...f}))},options:d,onChange:async f=>{f!==null&&(s(f.value),await new Promise(h=>window.requestAnimationFrame(h)),n({...t,data:{...t.data,value:f.value}}))}}))},Dw={kind:Z.Custom,isMatch:e=>e.data.kind==="dropdown-cell",draw:(e,t)=>{const{ctx:n,theme:o,rect:r}=e,{value:i}=t.data,l=t.data.allowedValues.find(a=>typeof a=="string"||a===null||a===void 0?a===i:a.value===i),s=typeof l=="string"?l:(l==null?void 0:l.label)??"";return s&&(n.fillStyle=o.textDark,n.fillText(s,r.x+o.cellHorizontalPadding,r.y+r.height/2+eo(n,o))),!0},measure:(e,t,n)=>{const{value:o}=t.data;return(o?e.measureText(o).width:0)+n.cellHorizontalPadding*2},provideEditor:()=>({editor:Ow,disablePadding:!0,deletedValue:e=>({...e,copyData:"",data:{...e.data,value:""}})}),onPaste:(e,t)=>({...t,value:t.allowedValues.includes(e)?e:t.value})},Wo=6,zw={marginRight:8},Lw={display:"flex",alignItems:"center",flexGrow:1},Pw={kind:Z.Custom,isMatch:e=>e.data.kind==="range-cell",draw:(e,t)=>{const{ctx:n,theme:o,rect:r}=e,{min:i,max:l,value:s,label:a,measureLabel:c}=t.data,u=r.x+o.cellHorizontalPadding,d=r.y+r.height/2,f=l-i,h=(s-i)/f;n.save();let g=0;a!==void 0&&(n.font=`12px ${o.fontFamily}`,g=Vo(c??a,n,`12px ${o.fontFamily}`).width+o.cellHorizontalPadding);const m=r.width-o.cellHorizontalPadding*2-g;if(m>=Wo){const b=n.createLinearGradient(u,d,u+m,d);b.addColorStop(0,o.accentColor),b.addColorStop(h,o.accentColor),b.addColorStop(h,o.bgBubble),b.addColorStop(1,o.bgBubble),n.beginPath(),n.fillStyle=b,cd(n,u,d-Wo/2,m,Wo,Wo/2),n.fill(),n.beginPath(),cd(n,u+.5,d-Wo/2+.5,m-1,Wo-1,(Wo-1)/2),n.strokeStyle=o.accentLight,n.lineWidth=1,n.stroke()}return a!==void 0&&(n.textAlign="right",n.fillStyle=o.textDark,n.fillText(a,r.x+r.width-o.cellHorizontalPadding,d+eo(n,`12px ${o.fontFamily}`))),n.restore(),!0},provideEditor:()=>e=>{const{data:t,readonly:n}=e.value,o=t.value.toString(),r=t.min.toString(),i=t.max.toString(),l=t.step.toString(),s=a=>{e.onChange({...e.value,data:{...t,value:Number(a.target.value)}})};return p.createElement("label",{style:Lw},p.createElement("input",{style:zw,type:"range",value:o,min:r,max:i,step:l,onChange:s,disabled:n}),o)},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}}},Aw=sn("input")({name:"StyledInputBox",class:"gdg-s1wtovjx",propsAsIs:!1}),Ya=(e,t)=>{if(t==null)return"";const n=t.toISOString();switch(e){case"date":return n.split("T")[0];case"datetime-local":return n.replace("Z","");case"time":return n.split("T")[1].replace("Z","");default:throw new Error(`Unknown date kind ${e}`)}},Hw=e=>{const t=e.value.data,{format:n,displayDate:o}=t,r=t.step!==void 0&&!Number.isNaN(Number(t.step))?Number(t.step):void 0,i=t.min instanceof Date?Ya(n,t.min):t.min,l=t.max instanceof Date?Ya(n,t.max):t.max;let s=t.date;const a=t.timezoneOffset?t.timezoneOffset*60*1e3:0;a&&s&&(s=new Date(s.getTime()+a));const c=Ya(n,s);return e.value.readonly?ne.createElement(_o,{highlight:!0,autoFocus:!1,disabled:!0,value:o??"",onChange:()=>{}}):ne.createElement(Aw,{"data-testid":"date-picker-cell",required:!0,type:n,defaultValue:c,min:i,max:l,step:r,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-a)}})}})},Fw={kind:Z.Custom,isMatch:e=>e.data.kind==="date-picker-cell",draw:(e,t)=>{const{displayDate:n}=t.data;return Yl(e,n,t.contentAlign),!0},measure:(e,t,n)=>{const{displayDate:o}=t.data;return e.measureText(o).width+n.cellHorizontalPadding*2},provideEditor:()=>({editor:Hw}),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)}}},_w="None";function sh(e,t,n){e.save(),e.beginPath(),e.moveTo(t.x+t.width-8,t.y+1),e.lineTo(t.x+t.width,t.y+1),e.lineTo(t.x+t.width,t.y+1+8),e.fillStyle=n.accentColor,e.fill(),e.restore()}const Nw=e=>{const{cell:t,theme:n,ctx:o}=e;Yl({...e,theme:{...n,textDark:n.textLight,headerFontFull:`${n.headerFontStyle} ${n.fontFamily}`,baseFontFull:`${n.baseFontStyle} ${n.fontFamily}`,markerFontFull:`${n.markerFontStyle} ${n.fontFamily}`}},_w,t.contentAlign),o.fillStyle=n.textDark};function Bw(e){const t=ne.useCallback((o,r)=>{const{cell:i,theme:l,ctx:s,rect:a}=o,c=o.col;if(ir(i))sh(s,a,l);else if(Hi(i)&&c<e.length){const u=e[c];["checkbox","line_chart","bar_chart","progress"].includes(u.kind)?r():Nw(o),u.isRequired&&u.isEditable&&sh(s,a,l);return}r()},[e]),n=ne.useMemo(()=>[Rv,Dw,Pw,Fw,...ev],[]);return{drawCell:t,customRenderers:n}}function Vw(){const e=Zo();return ne.useMemo(()=>{const t={editable:n=>`<svg xmlns="http://www.w3.org/2000/svg" height="40" viewBox="0 96 960 960" width="40" fill="${n.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:Sl(e.colors.primary,.9),borderColor:e.colors.borderColorLight,horizontalBorderColor:e.colors.borderColorLight,fontFamily:e.genericFonts.bodyFont,bgSearchResult:Sl(e.colors.primary,.9),resizeIndicatorColor:e.colors.primary,bgIconHeader:e.colors.fadedText60,fgIconHeader:e.colors.white,bgHeader:e.colors.bgMix,bgHeaderHasFocus:e.colors.darkenedBgMix15,bgHeaderHovered:e.colors.darkenedBgMix15,textHeader:e.colors.fadedText60,textHeaderSelected:e.colors.white,textGroupHeader:e.colors.fadedText60,headerFontStyle:`${$n(e.fontSizes.sm)}px`,baseFontStyle:`${$n(e.fontSizes.sm)}px`,editorFontSize:e.fontSizes.sm,textDark:e.colors.bodyText,textMedium:Sl(e.colors.bodyText,.2),textLight:e.colors.fadedText40,textBubble:e.colors.fadedText60,bgCell:e.colors.bgColor,bgCellMedium:e.colors.bgColor,cellHorizontalPadding:Math.round($n(e.spacing.sm)),cellVerticalPadding:Math.round($n("0.1875rem")),bgBubble:e.colors.secondaryBg,bgBubbleSelected:e.colors.secondaryBg,linkColor:e.colors.link,drilldownBorder:e.colors.darkenedBgMix25},tableBorderRadius:e.radii.default,tableBorderWidth:1,defaultTableHeight:Math.round($n("25rem")),minColumnWidth:Math.round($n("3.125rem")),maxColumnWidth:Math.round($n("62.5rem")),maxColumnAutoWidth:Math.round($n("31.25rem")),defaultRowHeight:Math.round($n("2.1875rem")),defaultHeaderHeight:Math.round($n("2.1875rem")),bgRowHovered:Vx(e.colors.bgColor,e.colors.secondaryBg,.3),headerIcons:t}},[e])}const $w=ws.getLogger("useDataEditor");function Ww(e,t,n,o,r,i,l,s,a){const c=ne.useCallback(([m,b],y)=>{const v=e[m];if(!v.isEditable)return;const I=v.indexNumber,T=n.current.getOriginalRowIndex(r(b)),k=o([m,b]),x=v.getCellValue(k),L=v.getCellValue(y);if(!ir(k)&&L===x)return;const O=v.getCell(L,!0);ir(O)?$w.warn(`Not applying the cell edit since it causes this error:
186
186
  ${O.data}`):(n.current.setCell(I,T,{...O,lastUpdated:performance.now()}),s())},[e,n,r,o,s]),u=ne.useCallback(()=>{if(t)return;const m=new Map;e.forEach(b=>{m.set(b.indexNumber,b.getCell(b.defaultValue))}),n.current.addRow(m),l()},[e,n,t,l]),d=ne.useCallback(()=>{t||(u(),s())},[u,s,t]),f=ne.useCallback(m=>{var b;if(m.rows.length>0){if(t)return!0;const y=m.rows.toArray().map(v=>n.current.getOriginalRowIndex(r(v)));return n.current.deleteRows(y),l(),a(),s(),!1}if((b=m.current)!=null&&b.range){const y=[],v=m.current.range;for(let I=v.y;I<v.y+v.height;I++)for(let T=v.x;T<v.x+v.width;T++){const k=e[T];k.isEditable&&!k.isRequired&&(y.push({cell:[T,I]}),c([T,I],k.getCell(null)))}return y.length>0&&(s(),i(y)),!1}return!0},[e,n,t,i,r,s,c,a,l]),h=ne.useCallback((m,b)=>{const[y,v]=m,I=[];for(let T=0;T<b.length;T++){const k=b[T];if(T+v>=n.current.getNumRows()){if(t)break;u()}for(let x=0;x<k.length;x++){const L=k[x],O=T+v,R=x+y;if(R>=e.length)break;const P=e[R];if(P.isEditable){const M=P.getCell(L,!0);if(gt(M)&&!ir(M)){const S=P.indexNumber,E=n.current.getOriginalRowIndex(r(O)),D=P.getCellValue(o([R,O]));P.getCellValue(M)!==D&&(n.current.setCell(S,E,{...M,lastUpdated:performance.now()}),I.push({cell:[R,O]}))}}}I.length>0&&(s(),i(I))}return!1},[e,n,t,r,o,u,s,i]),g=ne.useCallback((m,b)=>{const y=m[0];if(y>=e.length)return!0;const v=e[y];if(v.validateInput){const I=v.validateInput(v.getCellValue(b));return I===!0||I===!1?I:v.getCell(I)}return!0},[e]);return{onCellEdited:c,onPaste:h,onRowAppended:d,onDelete:f,validateCell:g}}const ch=",",Qr='"',jw='"',uh=`
187
- `,Uw="\uFEFF",Yw=new RegExp(`[${[ch,Qr,uh].join("")}]`),dh=ws.getLogger("useDataExporter");function hh(e){return e.map(t=>Gw(t)).join(ch)+uh}function Gw(e){if($e(e))return"";const t=vt(e);return Yw.test(t)?`${Qr}${t.replace(new RegExp(Qr,"g"),jw+Qr)}${Qr}`:t}async function fh(e,t,n,o){const r=new TextEncoder;await e.write(r.encode(Uw));const i=n.map(l=>l.name);await e.write(r.encode(hh(i)));for(let l=0;l<o;l++){const s=[];n.forEach((a,c,u)=>{s.push(a.getCellValue(t([c,l])))}),await e.write(r.encode(hh(s)))}await e.close()}function Kw(e,t,n,o){return{exportToCsv:ne.useCallback(async()=>{const r=`${new Date().toISOString().slice(0,16).replace(":","-")}_export.csv`;try{const i=await(await(await ms(()=>import("./es6-CcuZyssh.js").then(async l=>(await l.__tla,l)).then(l=>l.a),__vite__mapDeps([15,1,2]))).showSaveFilePicker({suggestedName:r,types:[{accept:{"text/csv":[".csv"]}}],excludeAcceptAllOption:!1})).createWritable();await fh(i,e,t,n)}catch(i){if(i instanceof Error&&i.name==="AbortError")return;try{dh.warn("Failed to export data as CSV with FileSystem API, trying fallback method",i);let l="";const s=new WritableStream({write:async d=>{l+=new TextDecoder("utf-8").decode(d)},close:async()=>{}});await fh(s.getWriter(),e,t,n);const a=new Blob([l],{type:"text/csv;charset=utf-8;"}),c=URL.createObjectURL(a),u=rC({enforceDownloadInNewTab:o,url:c,filename:r});u.style.display="none",document.body.appendChild(u),u.click(),document.body.removeChild(u),URL.revokeObjectURL(c)}catch(l){dh.error("Failed to export data as CSV",l)}}},[t,n,e,o])}}function Xw(e,t,n,o){return{getCellContent:ne.useCallback(([r,i])=>{var l;if(r>t.length-1)return zt("Column index out of bounds","This error should never happen. Please report this bug.");if(i>n-1)return zt("Row index out of bounds","This error should never happen. Please report this bug.");try{const s=t[r],a=s.indexNumber,c=o.current.getOriginalRowIndex(i),u=o.current.isAddedRow(c);if(s.isEditable||u){const h=o.current.getCell(a,c);if(gt(h))return{...s.getCell(s.getCellValue(h),!1),lastUpdated:h.lastUpdated};if(u)return zt("Error during cell creation",`This error should never happen. Please report this bug. No cell found for an added row: col=${a}; row=${c}`)}const d=e.getCell(c,a),f=$x(e,c,a);return uv(s,d,f,(l=e.styler)==null?void 0:l.cssStyles)}catch(s){return zt("Error during cell creation",`This error should never happen. Please report this bug.
187
+ `,Uw="\uFEFF",Yw=new RegExp(`[${[ch,Qr,uh].join("")}]`),dh=ws.getLogger("useDataExporter");function hh(e){return e.map(t=>Gw(t)).join(ch)+uh}function Gw(e){if($e(e))return"";const t=vt(e);return Yw.test(t)?`${Qr}${t.replace(new RegExp(Qr,"g"),jw+Qr)}${Qr}`:t}async function fh(e,t,n,o){const r=new TextEncoder;await e.write(r.encode(Uw));const i=n.map(l=>l.name);await e.write(r.encode(hh(i)));for(let l=0;l<o;l++){const s=[];n.forEach((a,c,u)=>{s.push(a.getCellValue(t([c,l])))}),await e.write(r.encode(hh(s)))}await e.close()}function Kw(e,t,n,o){return{exportToCsv:ne.useCallback(async()=>{const r=`${new Date().toISOString().slice(0,16).replace(":","-")}_export.csv`;try{const i=await(await(await ms(()=>import("./es6-BZHzmZtr.js").then(async l=>(await l.__tla,l)).then(l=>l.a),__vite__mapDeps([15,1,2]))).showSaveFilePicker({suggestedName:r,types:[{accept:{"text/csv":[".csv"]}}],excludeAcceptAllOption:!1})).createWritable();await fh(i,e,t,n)}catch(i){if(i instanceof Error&&i.name==="AbortError")return;try{dh.warn("Failed to export data as CSV with FileSystem API, trying fallback method",i);let l="";const s=new WritableStream({write:async d=>{l+=new TextDecoder("utf-8").decode(d)},close:async()=>{}});await fh(s.getWriter(),e,t,n);const a=new Blob([l],{type:"text/csv;charset=utf-8;"}),c=URL.createObjectURL(a),u=rC({enforceDownloadInNewTab:o,url:c,filename:r});u.style.display="none",document.body.appendChild(u),u.click(),document.body.removeChild(u),URL.revokeObjectURL(c)}catch(l){dh.error("Failed to export data as CSV",l)}}},[t,n,e,o])}}function Xw(e,t,n,o){return{getCellContent:ne.useCallback(([r,i])=>{var l;if(r>t.length-1)return zt("Column index out of bounds","This error should never happen. Please report this bug.");if(i>n-1)return zt("Row index out of bounds","This error should never happen. Please report this bug.");try{const s=t[r],a=s.indexNumber,c=o.current.getOriginalRowIndex(i),u=o.current.isAddedRow(c);if(s.isEditable||u){const h=o.current.getCell(a,c);if(gt(h))return{...s.getCell(s.getCellValue(h),!1),lastUpdated:h.lastUpdated};if(u)return zt("Error during cell creation",`This error should never happen. Please report this bug. No cell found for an added row: col=${a}; row=${c}`)}const d=e.getCell(c,a),f=$x(e,c,a);return uv(s,d,f,(l=e.styler)==null?void 0:l.cssStyles)}catch(s){return zt("Error during cell creation",`This error should never happen. Please report this bug.
188
188
  Error: ${s}`)}},[t,n,e,o])}}function qw(e){const[t,n]=ne.useState(void 0),o=ne.useCallback(r=>{if(r.kind!=="cell")n(void 0);else{const[,i]=r.location;n(i)}},[n]);return{getRowThemeOverride:ne.useCallback(r=>{if(r===t)return{bgCell:e.bgRowHovered,bgCellMedium:e.bgRowHovered}},[e.bgRowHovered,t]),onItemHovered:o}}function Zw(e,t,n,o,r){const[i,l]=ne.useState({columns:mt.empty(),rows:mt.empty(),current:void 0}),s=!t&&!n&&(e.selectionMode.includes(En.SelectionMode.MULTI_ROW)||e.selectionMode.includes(En.SelectionMode.SINGLE_ROW)),a=s&&e.selectionMode.includes(En.SelectionMode.MULTI_ROW),c=!t&&!n&&(e.selectionMode.includes(En.SelectionMode.SINGLE_COLUMN)||e.selectionMode.includes(En.SelectionMode.MULTI_COLUMN)),u=c&&e.selectionMode.includes(En.SelectionMode.MULTI_COLUMN),d=i.rows.length>0,f=i.columns.length>0,h=i.current!==void 0,g=ne.useCallback(b=>{const y=!Cs(b.rows.toArray(),i.rows.toArray()),v=!Cs(b.columns.toArray(),i.columns.toArray()),I=!Cs(b.current,i.current);let T=s&&y||c&&v,k=b;if((s||c)&&b.current!==void 0&&I&&(k={...b,rows:i.rows,columns:i.columns},T=!1),y&&b.rows.length>0&&v&&b.columns.length===0&&(k={...k,columns:i.columns},T=!0),v&&b.columns.length>0&&y&&b.rows.length===0&&(k={...k,rows:i.rows},T=!0),v&&k.columns.length>=0){let x=k.columns;o.forEach((L,O)=>{L.isIndex&&(x=x.remove(O))}),x.length<k.columns.length&&(k={...k,columns:x})}l(k),T&&r(k)},[i,s,c,r,o]),m=ne.useCallback((b=!1,y=!1)=>{const v={columns:y?i.columns:mt.empty(),rows:b?i.rows:mt.empty(),current:void 0};l(v),(!b&&s||!y&&c)&&r(v)},[i,s,c,r]);return{gridSelection:i,isRowSelectionActivated:s,isMultiRowSelectionActivated:a,isColumnSelectionActivated:c,isMultiColumnSelectionActivated:u,isRowSelected:d,isColumnSelected:f,isCellSelected:h,clearSelection:m,processSelectionChange:g}}function Jw(e,t,n,o,r,i,l){const s=e.rowHeight??t.defaultRowHeight,a=t.defaultHeaderHeight+s+2*t.tableBorderWidth,c=o?2:1,u=e.editingMode===En.EditingMode.DYNAMIC?1:0,d=n+u;let f=Math.max(d*s+c*t.defaultHeaderHeight+2*t.tableBorderWidth,a),h=Math.min(f,t.defaultTableHeight);e.height&&(h=Math.max(e.height,a),f=Math.max(e.height,f)),i&&(h=Math.min(h,i),f=Math.min(f,i),e.height||(h=f));const g=t.minColumnWidth+2*t.tableBorderWidth,m=Math.max(r,g);let b,y=m;e.useContainerWidth?b=m:e.width&&(b=Math.min(Math.max(e.width,g),m),y=Math.min(Math.max(e.width,y),m));const[v,I]=ne.useState({width:b||"100%",height:h});return ne.useLayoutEffect(()=>{e.useContainerWidth&&v.width==="100%"&&I(T=>({...T,width:m}))},[m]),ne.useLayoutEffect(()=>{I(T=>({...T,width:b||"100%"}))},[b]),ne.useLayoutEffect(()=>{I(T=>({...T,height:h}))},[h,n]),ne.useLayoutEffect(()=>{if(l){const T=e.useContainerWidth||gt(e.width)&&e.width>0;I({width:T?y:"100%",height:f})}else I({width:b||"100%",height:h})},[l]),{minHeight:a,maxHeight:f,minWidth:g,maxWidth:y,rowHeight:s,resizableSize:v,setResizableSize:I}}const Qw=600,ey="\u26A0\uFE0F Please fill out this cell.";function ty(e,t,n=[]){const[o,r]=ne.useState(),i=ne.useRef(null),l=ne.useCallback(a=>{if(clearTimeout(i.current),i.current=0,r(void 0),(a.kind==="header"||a.kind==="cell")&&a.location){const c=a.location[0],u=a.location[1];let d;if(c<0||c>=e.length||n.includes(u))return;const f=e[c];if(a.kind==="header"&&gt(f))d=f.help;else if(a.kind==="cell"){const h=t([c,u]);ir(h)?d=h.errorDetails:f.isRequired&&f.isEditable&&Hi(h)?d=ey:Nm(h)&&(d=h.tooltip)}d&&(i.current=setTimeout(()=>{d&&r({content:d,left:a.bounds.x+a.bounds.width/2,top:a.bounds.y})},Qw))}},[e,t,r,i,n]),s=ne.useCallback(()=>{r(void 0)},[r]);return{tooltip:o,clearTooltip:s,onItemHovered:l}}function ny({top:e,left:t,content:n,clearTooltip:o}){const[r,i]=ne.useState(!0),l=Zo(),{colors:s,fontSizes:a,radii:c,fontWeights:u}=l,d=ne.useCallback(()=>{i(!1),o()},[o,i]);return Oe.jsx(xl,{content:Oe.jsx(Wx,{"data-testid":"stDataFrameTooltipContent",children:Oe.jsx(jx,{style:{fontSize:a.sm},source:n,allowHTML:!1})}),placement:Cl.top,accessibilityType:_h.tooltip,showArrow:!1,popoverMargin:5,onClickOutside:d,onEsc:d,overrides:{Body:{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"}},Inner:{style:{backgroundColor:kl(l)?s.bgColor:s.secondaryBg,color:s.bodyText,fontSize:a.sm,fontWeight:u.normal,paddingTop:"0 !important",paddingBottom:"0 !important",paddingLeft:"0 !important",paddingRight:"0 !important"}}},isOpen:r,children:Oe.jsx("div",{"data-testid":"stDataFrameTooltipTarget",style:{position:"fixed",top:e,left:t}})})}const ph=kr("div",{target:"e1w7nams0"})(({hasCustomizedScrollbars:e,theme:t})=>({position:"relative",display:"inline-block","& .stDataFrameGlideDataEditor":{height:"100%",minWidth:"100%",borderRadius:t.radii.default},"& .dvn-scroller":{...!e&&{scrollbarWidth:"thin"},overflowX:"auto !important",overflowY:"auto !important"},"& .gdg-seveqep":{maxWidth:"19rem",width:"80%",minWidth:"6rem",top:t.spacing.sm,right:t.spacing.sm,padding:t.spacing.sm,borderRadius:t.radii.default,"& .gdg-search-status":{paddingTop:t.spacing.twoXS,fontSize:t.fontSizes.twoSm},"& .gdg-search-progress":{display:"none"},"& input":{width:"100%"},"& button":{width:t.iconSizes.xl,height:t.iconSizes.xl,"& .button-icon":{width:t.iconSizes.base,height:t.iconSizes.base}}}}),""),gh=150,oy=15e4,mh=6;function ry({element:e,data:t,disabled:n,widgetMgr:o,disableFullscreenMode:r,fragmentId:i}){const{expanded:l,expand:s,collapse:a,width:c,height:u}=qx(Zx),d=ne.useRef(null),f=ne.useRef(null),h=ne.useRef(null),g=Vw(),{getRowThemeOverride:m,onItemHovered:b}=qw(g),{libConfig:{enforceDownloadInNewTab:y=!1}}=ne.useContext(Ux),[v,I]=ne.useState(!0),[T,k]=ne.useState(!1),[x,L]=ne.useState(!1),[O,R]=ne.useState(!1),[P,M]=ne.useState(),[S,E]=ne.useState(!1),D=ne.useMemo(()=>window.matchMedia&&window.matchMedia("(pointer: coarse)").matches,[]),C=ne.useMemo(()=>window.navigator.userAgent.includes("Mac OS")&&window.navigator.userAgent.includes("Safari")||window.navigator.userAgent.includes("Chrome"),[]);$e(e.editingMode)&&(e.editingMode=En.EditingMode.READ_ONLY);const{READ_ONLY:G,DYNAMIC:B}=En.EditingMode,J=t.dimensions,se=Math.max(0,J.numDataRows),re=se===0&&!(e.editingMode===B&&J.numDataColumns>0),U=se>oy,ie=!U&&!re&&e.editingMode!==B,ce=!re&&e.editingMode===B&&!n,he=ne.useRef(new $i(se)),[pe,Q]=ne.useState(he.current.getNumRows());ne.useEffect(()=>{he.current=new $i(se),Q(he.current.getNumRows())},[se]);const _=ne.useCallback(()=>{he.current=new $i(se),Q(he.current.getNumRows())},[se]),[z,j]=ne.useState(e.columnOrder);ne.useEffect(()=>{j(e.columnOrder)},[e.columnOrder.join(",")]);const{columns:ge,allColumns:ke,setColumnConfigMapping:_e}=fv(e,t,n,z);ne.useEffect(()=>{if(e.editingMode===G)return;const ee=o.getStringValue({id:e.id,formId:e.formId});ee&&(he.current.fromJson(ee,ge),Q(he.current.getNumRows()))},[]);const{getCellContent:xe}=Xw(t,ge,pe,he),{columns:De,sortColumn:Ne,getOriginalIndex:tt,getCellContent:Lt}=kv(se,ge,xe),kt=ne.useCallback(ee=>{const ze={selection:{rows:[],columns:[]}};ze.selection.rows=ee.rows.toArray().map(ln=>tt(ln)),ze.selection.columns=ee.columns.toArray().map(ln=>qr(De[ln]));const en=JSON.stringify(ze),Yt=o.getStringValue({id:e.id,formId:e.formId});(Yt===void 0||Yt!==en)&&o.setStringValue({id:e.id,formId:e.formId},en,{fromUi:!0},i)},[De,e.id,e.formId,o,i,tt]),{debouncedCallback:we}=Lu(kt,gh),{gridSelection:be,isRowSelectionActivated:me,isMultiRowSelectionActivated:le,isColumnSelectionActivated:Ee,isMultiColumnSelectionActivated:Ie,isRowSelected:Ue,isColumnSelected:nt,isCellSelected:St,clearSelection:ue,processSelectionChange:rt}=Zw(e,re,n,De,we);ne.useEffect(()=>{ue(!0,!0)},[l]);const lt=ne.useCallback(ee=>{var ze;(ze=f.current)==null||ze.updateCells(ee)},[]);ne.useEffect(()=>{var ee,ze,en,Yt;if(!me&&!Ee)return;const ln=o.getStringValue({id:e.id,formId:e.formId});if(ln){const Sn=De.map(oo=>qr(oo)),tn=JSON.parse(ln);let gn=mt.empty(),wn=mt.empty();(ze=(ee=tn.selection)==null?void 0:ee.rows)==null||ze.forEach(oo=>{gn=gn.add(oo)}),(Yt=(en=tn.selection)==null?void 0:en.columns)==null||Yt.forEach(oo=>{wn=wn.add(Sn.indexOf(oo))}),(gn.length>0||wn.length>0)&&rt({rows:gn,columns:wn,current:void 0})}},[]);const Re=ne.useCallback(()=>{pe!==he.current.getNumRows()&&Q(he.current.getNumRows())},[pe]),Et=ne.useCallback(()=>{const ee=he.current.toJson(De);let ze=o.getStringValue({id:e.id,formId:e.formId});ze===void 0&&(ze=new $i(0).toJson([])),ee!==ze&&o.setStringValue({id:e.id,formId:e.formId},ee,{fromUi:!0},i)},[De,e.id,e.formId,o,i]),{debouncedCallback:jt}=Lu(Et,gh),{exportToCsv:Be}=Kw(Lt,De,pe,y),{onCellEdited:ot,onPaste:yt,onRowAppended:Mt,onDelete:Xt,validateCell:cn}=Ww(De,e.editingMode!==B,he,Lt,tt,lt,Re,jt,ue),{tooltip:Qt,clearTooltip:Ht,onItemHovered:It}=ty(De,Lt,ce?[pe]:[]),{drawCell:Pt,customRenderers:In}=Bw(De),{provideEditor:Cn}=Mv(),Qe=p.useCallback(ee=>({...ee,hasMenu:!re}),[re]),un=ne.useMemo(()=>De.map(ee=>Qe(va(ee))),[De,Qe]),{columns:pn,onColumnResize:xt}=vv(un),qt=t.dimensions.numHeaderRows>1,{minHeight:ct,maxHeight:Ft,minWidth:Ut,maxWidth:rn,rowHeight:Tt,resizableSize:Zt,setResizableSize:qe}=Jw(e,g,pe,qt,c||0,u,l),At=ne.useCallback(([ee,ze])=>({...Bm(!0,!1),displayData:"empty",contentAlign:"center",allowOverlay:!1,themeOverride:{textDark:g.glideTheme.textLight},span:[0,Math.max(De.length-1,0)]}),[De,g.glideTheme.textLight]),kn=ne.useCallback(()=>{_(),ue()},[_,ue]);Kx({element:e,widgetMgr:o,onFormCleared:kn});const{pinColumn:Ot,unpinColumn:Bt,freezeColumns:Vt}=gv(De,re,c||0,g.minColumnWidth,ue,_e),{changeColumnFormat:uo}=pv(_e),{hideColumn:Bn,showColumn:N}=Sv(ue,_e),{onColumnMoved:Ze}=mv(De,Vt,Ot,Bt,j);return ne.useEffect(()=>{setTimeout(()=>{var ee,ze;if(h.current&&f.current){const en=(ze=(ee=h.current)==null?void 0:ee.querySelector(".dvn-stack"))==null?void 0:ze.getBoundingClientRect();en&&(L(en.height>h.current.clientHeight),R(en.width>h.current.clientWidth))}},1)},[Zt,pe,pn]),p.useEffect(()=>{ke.length==De.length&&E(!1)},[ke.length,De.length]),Oe.jsxs(ph,{className:"stDataFrame","data-testid":"stDataFrame",hasCustomizedScrollbars:C,ref:h,onMouseDown:ee=>{if(h.current&&C){const ze=h.current.getBoundingClientRect();O&&ze.height-(mh+1)<ee.clientY-ze.top&&ee.stopPropagation(),x&&ze.width-(mh+1)<ee.clientX-ze.left&&ee.stopPropagation()}},onBlur:ee=>{!v&&!D&&!ee.currentTarget.contains(ee.relatedTarget)&&ue(!0,!0)},children:[Oe.jsxs(Jx,{isFullScreen:l,disableFullscreenMode:r,locked:Ue&&!me||St||D&&v||S,onExpand:s,onCollapse:a,target:ph,children:[(me&&Ue||Ee&&nt)&&Oe.jsx(Sr,{label:"Clear selection",icon:iC,onClick:()=>{ue(),Ht()}}),ce&&Ue&&Oe.jsx(Sr,{label:"Delete row(s)",icon:uC,onClick:()=>{Xt&&(Xt(be),Ht())}}),ce&&!Ue&&Oe.jsx(Sr,{label:"Add row",icon:Rs,onClick:()=>{var ee;Mt&&(I(!0),Mt(),Ht(),(ee=f.current)==null||ee.scrollTo(0,pe,"vertical"))}}),!re&&ke.length>De.length&&Oe.jsx(zm,{columns:ke,columnOrder:z,setColumnOrder:j,hideColumn:Bn,showColumn:N,isOpen:S,onClose:()=>E(!1),children:Oe.jsx(Sr,{label:"Show/hide columns",icon:Is,onClick:()=>E(!0)})}),!U&&!re&&Oe.jsx(Sr,{label:"Download as CSV",icon:dC,onClick:()=>Be()}),!re&&Oe.jsx(Sr,{label:"Search",icon:Es,onClick:()=>{T?k(!1):(I(!0),k(!0)),Ht()}})]}),Oe.jsx(Yx,{"data-testid":"stDataFrameResizable",ref:d,defaultSize:Zt,style:{border:`${g.tableBorderWidth}px solid ${g.glideTheme.borderColor}`,borderRadius:`${g.tableBorderRadius}`},minHeight:ct,maxHeight:Ft,minWidth:Ut,maxWidth:rn,size:Zt,enable:{top:!1,right:!1,bottom:!1,left:!1,topRight:!1,bottomRight:!0,bottomLeft:!1,topLeft:!1},grid:[1,Tt],snapGap:Tt/3,onResizeStop:(ee,ze,en,Yt)=>{if(d.current){const ln=2*g.tableBorderWidth;qe({width:d.current.size.width,height:Ft-d.current.size.height===ln?d.current.size.height+ln:d.current.size.height})}},children:Oe.jsx(Cm,{className:"stDataFrameGlideDataEditor","data-testid":"stDataFrameGlideDataEditor",ref:f,columns:pn,rows:re?1:pe,minColumnWidth:g.minColumnWidth,maxColumnWidth:g.maxColumnWidth,maxColumnAutoWidth:g.maxColumnAutoWidth,rowHeight:Tt,headerHeight:g.defaultHeaderHeight,getCellContent:re?At:Lt,onColumnResize:D?void 0:xt,resizeIndicator:"header",freezeColumns:Vt,smoothScrollX:!0,smoothScrollY:!0,verticalBorder:!0,getCellsForSelection:!0,rowMarkers:"none",rangeSelect:D?"cell":"rect",columnSelect:"none",rowSelect:"none",onColumnMoved:Ee?void 0:Ze,onItemHovered:ee=>{b==null||b(ee),It==null||It(ee)},keybindings:{downFill:!0},onKeyDown:ee=>{(ee.ctrlKey||ee.metaKey)&&ee.key==="f"&&(k(ze=>!ze),ee.stopPropagation(),ee.preventDefault())},showSearch:T,onSearchClose:()=>{k(!1),Ht()},onHeaderClicked:(ee,ze)=>{!ie||Ee||(me&&Ue?ue():ue(!0,!0),Ne(ee,"auto"))},gridSelection:be,onGridSelectionChange:ee=>{(v||D)&&(rt(ee),Qt!==void 0&&Ht())},theme:g.glideTheme,getRowThemeOverride:m,onMouseMove:ee=>{ee.kind==="out-of-bounds"&&v?I(!1):ee.kind!=="out-of-bounds"&&!v&&I(!0)},fixedShadowX:!0,fixedShadowY:!0,experimental:{scrollbarWidthOverride:0,...C&&{paddingBottom:O?-6:void 0,paddingRight:x?-6:void 0}},provideEditor:Cn,drawCell:Pt,customRenderers:In,imageEditorOverride:Qm,headerIcons:g.headerIcons,validateCell:cn,onHeaderMenuClick:(ee,ze)=>{M({columnIdx:ee,headerBounds:ze})},onPaste:!1,...me&&{rowMarkers:{kind:"checkbox",checkboxStyle:"square",theme:{bgCell:g.glideTheme.bgHeader,bgCellMedium:g.glideTheme.bgHeader}},rowSelectionMode:le?"multi":"auto",rowSelect:n?"none":le?"multi":"single",rowSelectionBlending:"mixed",rangeSelectionBlending:"exclusive"},...Ee&&{columnSelect:n?"none":Ie?"multi":"single",columnSelectionBlending:"mixed",rangeSelectionBlending:"exclusive"},...!re&&e.editingMode!==G&&!n&&{fillHandle:!D,onCellEdited:ot,onPaste:yt,onDelete:Xt},...!re&&e.editingMode===B&&{trailingRowOptions:{sticky:!1,tint:!0},rowMarkers:{kind:"checkbox",checkboxStyle:"square",theme:{bgCell:g.glideTheme.bgHeader,bgCellMedium:g.glideTheme.bgHeader}},rowSelectionMode:"multi",rowSelect:n?"none":"multi",onRowAppended:n?void 0:Mt,onHeaderClicked:void 0}})}),Qt&&Qt.content&&Oe.jsx(ny,{top:Qt.top,left:Qt.left,content:Qt.content,clearTooltip:Ht}),P&&Jh.createPortal(Oe.jsx(Im,{top:P.headerBounds.y+P.headerBounds.height,left:P.headerBounds.x+P.headerBounds.width,columnKind:ge[P.columnIdx].kind,onCloseMenu:()=>M(void 0),onSortColumn:ie?ee=>{ue(!0,!0),Ne(P.columnIdx,ee,!0)}:void 0,isColumnPinned:ge[P.columnIdx].isPinned,onUnpinColumn:()=>{Bt(ge[P.columnIdx].id)},onPinColumn:()=>{Ot(ge[P.columnIdx].id)},onHideColumn:()=>{Bn(ge[P.columnIdx].id)},onChangeFormat:ee=>{uo(ge[P.columnIdx].id,ee),setTimeout(()=>{var ze;(ze=f.current)==null||ze.remeasureColumns(mt.fromSingleSelection(P.columnIdx))},100)},onAutosize:()=>{var ee;(ee=f.current)==null||ee.remeasureColumns(mt.fromSingleSelection(P.columnIdx))}}),document.querySelector("#portal"))]})}let vh,bh;vh=Xx(ry),bh=p.memo(vh),Qh=Object.freeze(Object.defineProperty({__proto__:null,default:bh},Symbol.toStringTag,{value:"Module"}))});export{ks as C,El as T,hC as __tla,Lo as a,Ss as b,Qh as c,Po as i,Ms as m,sn as s};