@sheetxl/studio-mui 0.4.14 → 0.4.16

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 (83) hide show
  1. package/browser/cjs/{XGmQ2kUHM2qQkG1r.cjs → 3eFeaOE8BdZL1wxv.cjs} +1 -1
  2. package/browser/cjs/{DD8-ZSDUkRqk7l6y.cjs → B7jcDdJUMAjZpGWo.cjs} +1 -1
  3. package/browser/cjs/{BkVtS9FZxWYNmrbU.cjs → BNGY-twelLFkYYI6.cjs} +1 -1
  4. package/browser/cjs/{CRvxop0QcZL23Akb.cjs → BsjtiKh23e6v8G0f.cjs} +2 -2
  5. package/browser/cjs/{D2gy3JDrJyGAMqsl.cjs → BzMxZOWpUV_RYST5.cjs} +2 -2
  6. package/browser/cjs/{B1Eaz6PFZAmrWiyY.cjs → C5nAx9uKHMANWBcf.cjs} +2 -2
  7. package/browser/cjs/{B8ZfZXhvW4sSKKZs.cjs → CQN6CMOb4-vmBky4.cjs} +2 -2
  8. package/browser/cjs/CVQnn-QAlTwmCcqi.cjs +96 -0
  9. package/browser/cjs/{BqOg0z4HGrbNaL1k.cjs → CXs0QRWS8JCF5XHE.cjs} +2 -2
  10. package/browser/cjs/{Bmifo5y7ZMJolUTY.cjs → CXwNI8k-NCP-Xytq.cjs} +1 -1
  11. package/browser/cjs/{W7LR70ajtjR9Lmvl.cjs → CgzOmQLgtPYoapZz.cjs} +2 -2
  12. package/browser/cjs/{DNL88d5PGwk92LeD.cjs → Crjro8zyw3_OPSdv.cjs} +2 -2
  13. package/browser/cjs/{BpLu9-spCLcAFdwd.cjs → Ctj6jurjmyOjmyC_.cjs} +2 -2
  14. package/browser/cjs/{-zKDSjn55SCvCwk8.cjs → D3DP2KHrlCUvr5GM.cjs} +1 -1
  15. package/browser/cjs/{DZ8WTAzF6V2Tw1tW.cjs → D6vlAfPBLlktoBgq.cjs} +2 -2
  16. package/browser/cjs/DFqjzGGReUL-7MoI.cjs +18 -0
  17. package/browser/cjs/{BUwmvmcdC0xBQ97L.cjs → DKYqcrXsQ_6SuhnP.cjs} +1 -1
  18. package/browser/cjs/{BAfNSJo7fktzFVJd.cjs → DRXfWFboy9pbnpXC.cjs} +3 -3
  19. package/browser/cjs/{AoLA7tfyPshG_mKt.cjs → Die-N4kV2bzafWfb.cjs} +2 -2
  20. package/browser/cjs/{C6Fk0jGWAOED60yf.cjs → DoxscTb4o7M2CzO-.cjs} +1 -1
  21. package/browser/cjs/{d2jsgbPdf35xArnn.cjs → htqwuaRLOx8unJxi.cjs} +2 -2
  22. package/browser/cjs/index.cjs +2 -2
  23. package/browser/cjs/{BH0v7IIykugrFxaT.cjs → nyCcUTXcNQz4oeHS.cjs} +2 -2
  24. package/browser/cjs/{CS5USjyVh8DwPSri.cjs → omjToo5UJ4DJDaQ_.cjs} +1 -1
  25. package/browser/cjs/{BiBEmbWoJHdOB1li.cjs → ovadKV9YIel9XeoD.cjs} +1 -1
  26. package/browser/esm/{C4ORm_Up6Zxt92F_.mjs → B6X8Qvia5W098Liv.mjs} +1 -1
  27. package/browser/esm/{4fzdzYhVH9eIXv-E.mjs → BHgGHdonH-Pv6AWm.mjs} +2 -2
  28. package/browser/esm/{CS6uJp7phBvUmos6.mjs → BKiH_cfuFpIWR0Kh.mjs} +6 -6
  29. package/browser/esm/{CCwOCTrf9Bira1-Y.mjs → BPW1-Hf2PHIk0e2L.mjs} +1 -1
  30. package/browser/esm/{CBQZHZlKIiEz186r.mjs → BSJUiUM1YTsyAkO6.mjs} +89 -90
  31. package/browser/esm/{ClmlhDf-0RC5GFV3.mjs → BWsWm5Ktnddf-7sU.mjs} +6 -6
  32. package/browser/esm/{CHovQU_R4AuKULmT.mjs → Be60UaEY4-jBg5EP.mjs} +1 -1
  33. package/browser/esm/BfgjY48NUV6xeZZz.mjs +43 -0
  34. package/browser/esm/{DWy4L2usallW0WdU.mjs → Bm9oowz3XGKUJAwu.mjs} +69 -69
  35. package/browser/esm/{CmAnpd_SOxQuTQRL.mjs → C1PvMvQkRbbPczX9.mjs} +3 -3
  36. package/browser/esm/{Dc1PmtvbeqsIQHq6.mjs → CSJOA0MduTRibCPc.mjs} +20 -20
  37. package/browser/esm/{vgS9ixFRuZrPx6vq.mjs → CVxFHP2hSU8M4x8L.mjs} +1 -1
  38. package/browser/esm/{C8po4rRYJ8127Rgb.mjs → CYkAU_Fwrj5HpveQ.mjs} +10 -10
  39. package/browser/esm/CnpSLh6bctHwICAg.mjs +23 -0
  40. package/browser/esm/{CYG1vk4AMMwqsul7.mjs → DlVsPuV-HRiRBisB.mjs} +1 -1
  41. package/browser/esm/{C5OCdRxcYIZViFzN.mjs → DnqJg0A5zWCsTH6-.mjs} +1 -1
  42. package/browser/esm/{CSKgHJSTMvOEe2RH.mjs → DqaP59JHe_yjCNLN.mjs} +11804 -10969
  43. package/browser/esm/{CB7vnn7AtsGma4R6.mjs → DsE9LT7djZNC_bpr.mjs} +1 -1
  44. package/browser/esm/{Ks946bL2vmd4m743.mjs → DtYTMRjYASQHh47Z.mjs} +6 -6
  45. package/browser/esm/{_FvE2-K7MOW_qWVS.mjs → DusKklXwfexZKIz3.mjs} +1 -1
  46. package/browser/esm/{CQiALmsycGGLFj1o.mjs → RjtykFbCcbv4qS7T.mjs} +5 -5
  47. package/browser/esm/{DgKsUQMTThBdEQds.mjs → bgdZRJ8Fv13W0mzX.mjs} +12 -12
  48. package/browser/esm/{B-rZWEIXFvB2W_mP.mjs → i2tBquKvd69Lntmu.mjs} +1 -1
  49. package/browser/esm/{TlZOl3Gt-d0Nc2a8.mjs → iUN2PzjdPItUTr7H.mjs} +3 -3
  50. package/browser/esm/index.mjs +66 -64
  51. package/licenses/dependencies.txt +134 -134
  52. package/node/esm/{DWCxF-chq5dVi363.mjs → -nq4m1_-YnMSpDz2.mjs} +38 -38
  53. package/node/esm/{CZoMFCKJudiTl_Tf.mjs → -wKDYIC7nV2UawT2.mjs} +2 -2
  54. package/node/esm/{Bi5br6yrYZqhLEiY.mjs → 6L31NM1-LL-KdFrd.mjs} +4 -4
  55. package/node/esm/{BTNBRzW8ZZbJY4GL.mjs → BKhroikdnIEO-cch.mjs} +1 -1
  56. package/node/esm/{DghPySv_2Ts78czJ.mjs → BVDB8yUgU4Pe3e3J.mjs} +1 -1
  57. package/node/esm/{762kbapO408ejsVC.mjs → BmnB45A5Kcks8H37.mjs} +2 -2
  58. package/node/esm/{BR9YJuwMP9nTMBE-.mjs → C-K2oA0Q20MmV5RC.mjs} +1 -1
  59. package/node/esm/{yP0whgIwVZApluLw.mjs → CC2vphWASQ4iYaeu.mjs} +2 -2
  60. package/node/esm/{DrujinnhlNDCosqb.mjs → CKJI-uruL_zkUxDv.mjs} +1 -1
  61. package/node/esm/{VHY56h6xqQcPba6u.mjs → Cr0a6BIKIyYJjP1S.mjs} +1 -1
  62. package/node/esm/{B0gJGF9-J3L5yBEW.mjs → CtQxIh_WsWd2Iqtp.mjs} +5 -5
  63. package/node/esm/{DUqIYzvmrCd67Dpx.mjs → DLPeWl4zrLTgco5e.mjs} +2 -2
  64. package/node/esm/{CY1qC_sXGD6av4yO.mjs → DavolEdR41s-e_Fj.mjs} +2 -2
  65. package/node/esm/{DC2dPUCWVgxEKzaS.mjs → DfkGEyNA6RPSKyEP.mjs} +13 -13
  66. package/node/esm/{CCygt4zw40-jO57G.mjs → Dn5QZmzECuToX8GV.mjs} +2 -2
  67. package/node/esm/{D1GfRQ1jyFg-wmLD.mjs → DqZDYIleTnvpbErd.mjs} +1 -1
  68. package/node/esm/{yB8OTWhDomxUy_SX.mjs → KPnfLrtriahFI_c0.mjs} +2 -2
  69. package/node/esm/{DOUP6ynjlQE-UEJs.mjs → OpLz9iqEueYpbPNa.mjs} +6 -6
  70. package/node/esm/{dlEq3vDkIERtTn7Y.mjs → RM7navTE1C8IL9a9.mjs} +25 -25
  71. package/node/esm/{Bgtg4I8EL4M776SY.mjs → fYYkAOtCehA-pVps.mjs} +8 -8
  72. package/node/esm/{CzWLA_IQgFbENkMq.mjs → iZ76esdFvFKIFxbE.mjs} +1 -1
  73. package/node/esm/index.mjs +5402 -5136
  74. package/node/esm/{CTpkd2r1aBS5d0yl.mjs → xiFL_cTYqzecUPE9.mjs} +1 -1
  75. package/package.json +8 -8
  76. package/types/index.d.ts +14 -1
  77. package/browser/cjs/As7uhSEgY8VJ3I6f.cjs +0 -90
  78. package/browser/cjs/Chz3K3Qt8M2FNJwI.cjs +0 -12
  79. package/browser/cjs/DTHMIHonHaHeJ0o1.cjs +0 -18
  80. package/browser/esm/CIH3ADFJJmUiyA8p.mjs +0 -864
  81. package/browser/esm/Dk00kGaRJxiitO5-.mjs +0 -23
  82. package/browser/esm/FdSIHwC_mNRZpcgJ.mjs +0 -43
  83. package/node/esm/DsD7O5j2cXyaECkB.mjs +0 -313
@@ -0,0 +1,18 @@
1
+ "use strict";/**
2
+ * @license @sheetxl/studio-mui - Studio - Spreadsheet UI built with SheetXL SDK using React & MUI. - v0.4.16
3
+ *
4
+ * (C) 2025-present SheetXL Inc. & Michael T. Ford
5
+ * License: The license can be found at https://www.sheetxl.com/license.
6
+ */Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const A=require("react/jsx-runtime"),N=require("@mui/material"),I=require("./CVQnn-QAlTwmCcqi.cjs"),U=require("react"),Ut=require("@mui/icons-material"),q=require("@mui/styled-engine"),de=require("@mui/system");function Vt(o){const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(o){for(const t in o)if(t!=="default"){const n=Object.getOwnPropertyDescriptor(o,t);Object.defineProperty(e,t,n.get?n:{enumerable:!0,get:()=>o[t]})}}return e.default=o,Object.freeze(e)}const x=Vt(U),qt=I.createTheme();function ve(o){return o!=="ownerState"&&o!=="theme"&&o!=="sx"&&o!=="as"}function K(o,e){return e&&o&&typeof o=="object"&&o.styles&&!o.styles.startsWith("@layer")&&(o.styles=`@layer ${e}{${String(o.styles)}}`),o}function $t(o){return o?(e,t)=>t[o]:null}function pe(o,e,t){const n=typeof e=="function"?e(o):e;if(Array.isArray(n))return n.flatMap(r=>pe(o,r,t));if(Array.isArray(n?.variants)){let r;if(n.isProcessed)r=t?K(n.style,t):n.style;else{const{variants:l,...i}=n;r=t?K(q.internal_serializeStyles(i),t):i}return ht(o,n.variants,[r],t)}return n?.isProcessed?t?K(q.internal_serializeStyles(n.style),t):n.style:t?K(q.internal_serializeStyles(n),t):n}function ht(o,e,t=[],n=void 0){let r;e:for(let l=0;l<e.length;l+=1){const i=e[l];if(typeof i.props=="function"){if(r??={...o,...o.ownerState,ownerState:o.ownerState},!i.props(r))continue}else for(const a in i.props)if(o[a]!==i.props[a]&&o.ownerState?.[a]!==i.props[a])continue e;typeof i.style=="function"?(r??={...o,...o.ownerState,ownerState:o.ownerState},t.push(n?K(q.internal_serializeStyles(i.style(r)),n):i.style(r))):t.push(n?K(q.internal_serializeStyles(i.style),n):i.style)}return t}function Kt(o){return o&&o.charAt(0).toLowerCase()+o.slice(1)}const Xt=function(o={}){const{themeId:e,defaultTheme:t=qt,rootShouldForwardProp:n=ve,slotShouldForwardProp:r=ve}=o;function l(i){(function(a,s,c){a.theme=function(u){for(const d in u)return!1;return!0}(a.theme)?c:a.theme[s]||a.theme})(i,e,t)}return(i,a={})=>{q.internal_mutateStyles(i,C=>C.filter(R=>R!==I.styleFunctionSx));const{name:s,slot:c,skipVariantsResolver:u,skipSx:d,overridesResolver:f=$t(Kt(c)),...h}=a,g=s&&s.startsWith("Mui")||c?"components":"custom",v=u!==void 0?u:c&&c!=="Root"&&c!=="root"||!1,_=d||!1;let S=ve;c==="Root"||c==="root"?S=n:c?S=r:function(C){return typeof C=="string"&&C.charCodeAt(0)>96}(i)&&(S=void 0);const m=q(i,{shouldForwardProp:S,label:void 0,...h}),y=C=>{if(C.__emotion_real===C)return C;if(typeof C=="function")return function(R){return pe(R,C,R.theme.modularCssLayers?g:void 0)};if(I.isPlainObject(C)){const R=function(z){const{variants:b,...P}=z,k={variants:b,style:q.internal_serializeStyles(P),isProcessed:!0};return k.style===P||b&&b.forEach(T=>{typeof T.style!="function"&&(T.style=q.internal_serializeStyles(T.style))}),k}(C);return function(z){return R.variants?pe(z,R,z.theme.modularCssLayers?g:void 0):z.theme.modularCssLayers?K(R.style,g):R.style}}return C},w=(...C)=>{const R=[],z=C.map(y),b=[];if(R.push(l),s&&f&&b.push(function(T){const G=T.theme,M=G.components?.[s]?.styleOverrides;if(!M)return null;const H={};for(const Z in M)H[Z]=pe(T,M[Z],T.theme.modularCssLayers?"theme":void 0);return f(T,H)}),s&&!v&&b.push(function(T){const G=T.theme,M=G?.components?.[s]?.variants;return M?ht(T,M,[],T.theme.modularCssLayers?"theme":void 0):null}),_||b.push(I.styleFunctionSx),Array.isArray(z[0])){const T=z.shift(),G=new Array(R.length).fill(""),M=new Array(b.length).fill("");let H;H=[...G,...T,...M],H.raw=[...G,...T.raw,...M],R.unshift(H)}const P=[...R,...z,...b],k=m(...P);return i.muiName&&(k.muiName=i.muiName),k};return m.withConfig&&(w.withConfig=m.withConfig),w}}({themeId:I.THEME_ID,defaultTheme:I.defaultTheme,rootShouldForwardProp:o=>function(e){return e!=="ownerState"&&e!=="theme"&&e!=="sx"&&e!=="as"}(o)&&o!=="classes"});function E(o,e){if(!(o instanceof e))throw new TypeError("Cannot call a class as a function")}function X(o){return X=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},X(o)}function ft(o){var e=function(t,n){if(X(t)!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var l=r.call(t,n);if(X(l)!="object")return l;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(o,"string");return X(e)=="symbol"?e:e+""}function Le(o,e){for(var t=0;t<e.length;t++){var n=e[t];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(o,ft(n.key),n)}}function W(o,e,t){return e&&Le(o.prototype,e),t&&Le(o,t),Object.defineProperty(o,"prototype",{writable:!1}),o}function D(o,e){if(e&&(X(e)=="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(o)}function O(o){return O=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},O(o)}function j(o,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");o.prototype=Object.create(e&&e.prototype,{constructor:{value:o,writable:!0,configurable:!0}}),Object.defineProperty(o,"prototype",{writable:!1}),e&&I._setPrototypeOf(o,e)}function p(o,e,t){return(e=ft(e))in o?Object.defineProperty(o,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):o[e]=t,o}function pt(){var o=this.constructor.getDerivedStateFromProps(this.props,this.state);o!=null&&this.setState(o)}function mt(o){this.setState(function(e){var t=this.constructor.getDerivedStateFromProps(o,e);return t??null}.bind(this))}function gt(o,e){try{var t=this.props,n=this.state;this.props=o,this.state=e,this.__reactInternalSnapshotFlag=!0,this.__reactInternalSnapshot=this.getSnapshotBeforeUpdate(t,n)}finally{this.props=t,this.state=n}}function ue(o){var e=o.prototype;if(!e||!e.isReactComponent)throw new Error("Can only polyfill class components");if(typeof o.getDerivedStateFromProps!="function"&&typeof e.getSnapshotBeforeUpdate!="function")return o;var t=null,n=null,r=null;if(typeof e.componentWillMount=="function"?t="componentWillMount":typeof e.UNSAFE_componentWillMount=="function"&&(t="UNSAFE_componentWillMount"),typeof e.componentWillReceiveProps=="function"?n="componentWillReceiveProps":typeof e.UNSAFE_componentWillReceiveProps=="function"&&(n="UNSAFE_componentWillReceiveProps"),typeof e.componentWillUpdate=="function"?r="componentWillUpdate":typeof e.UNSAFE_componentWillUpdate=="function"&&(r="UNSAFE_componentWillUpdate"),t!==null||n!==null||r!==null){var l=o.displayName||o.name,i=typeof o.getDerivedStateFromProps=="function"?"getDerivedStateFromProps()":"getSnapshotBeforeUpdate()";throw Error(`Unsafe legacy lifecycles will not be called for components using new component APIs.
7
+
8
+ `+l+" uses "+i+" but also contains the following legacy lifecycles:"+(t!==null?`
9
+ `+t:"")+(n!==null?`
10
+ `+n:"")+(r!==null?`
11
+ `+r:"")+`
12
+
13
+ The above lifecycles should be removed. Learn more about this warning here:
14
+ https://fb.me/react-async-component-lifecycle-hooks`)}if(typeof o.getDerivedStateFromProps=="function"&&(e.componentWillMount=pt,e.componentWillReceiveProps=mt),typeof e.getSnapshotBeforeUpdate=="function"){if(typeof e.componentDidUpdate!="function")throw new Error("Cannot polyfill getSnapshotBeforeUpdate() for components that do not define componentDidUpdate() on the prototype");e.componentWillUpdate=gt;var a=e.componentDidUpdate;e.componentDidUpdate=function(s,c,u){var d=this.__reactInternalSnapshotFlag?this.__reactInternalSnapshot:u;a.call(this,s,c,d)}}return o}function Ge(o,e){var t=Object.keys(o);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(o);e&&(n=n.filter(function(r){return Object.getOwnPropertyDescriptor(o,r).enumerable})),t.push.apply(t,n)}return t}function Ae(o){for(var e=1;e<arguments.length;e++){var t=arguments[e]!=null?arguments[e]:{};e%2?Ge(Object(t),!0).forEach(function(n){p(o,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(o,Object.getOwnPropertyDescriptors(t)):Ge(Object(t)).forEach(function(n){Object.defineProperty(o,n,Object.getOwnPropertyDescriptor(t,n))})}return o}function vt(){try{var o=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(vt=function(){return!!o})()}pt.__suppressDeprecationWarning=!0,mt.__suppressDeprecationWarning=!0,gt.__suppressDeprecationWarning=!0;var Ee=function(){function o(){var e,t,n,r;E(this,o);for(var l=arguments.length,i=new Array(l),a=0;a<l;a++)i[a]=arguments[a];return t=this,n=o,r=[].concat(i),n=O(n),p(e=D(t,vt()?Reflect.construct(n,r||[],O(t).constructor):n.apply(t,r)),"state",{scrollToColumn:0,scrollToRow:0,instanceProps:{prevScrollToColumn:0,prevScrollToRow:0}}),p(e,"_columnStartIndex",0),p(e,"_columnStopIndex",0),p(e,"_rowStartIndex",0),p(e,"_rowStopIndex",0),p(e,"_onKeyDown",function(s){var c=e.props,u=c.columnCount,d=c.disabled,f=c.mode,h=c.rowCount;if(!d){var g=e._getScrollState(),v=g.scrollToColumn,_=g.scrollToRow,S=e._getScrollState(),m=S.scrollToColumn,y=S.scrollToRow;switch(s.key){case"ArrowDown":y=Math.min(f==="cells"?y+1:e._rowStopIndex+1,h-1);break;case"ArrowLeft":m=Math.max(f==="cells"?m-1:e._columnStartIndex-1,0);break;case"ArrowRight":m=Math.min(f==="cells"?m+1:e._columnStopIndex+1,u-1);break;case"ArrowUp":y=Math.max(f==="cells"?y-1:e._rowStartIndex-1,0)}m===v&&y===_||(s.preventDefault(),e._updateScrollState({scrollToColumn:m,scrollToRow:y}))}}),p(e,"_onSectionRendered",function(s){var c=s.columnStartIndex,u=s.columnStopIndex,d=s.rowStartIndex,f=s.rowStopIndex;e._columnStartIndex=c,e._columnStopIndex=u,e._rowStartIndex=d,e._rowStopIndex=f}),e}return j(o,x.PureComponent),W(o,[{key:"setScrollIndexes",value:function(e){var t=e.scrollToColumn,n=e.scrollToRow;this.setState({scrollToRow:n,scrollToColumn:t})}},{key:"render",value:function(){var e=this.props,t=e.className,n=e.children,r=this._getScrollState(),l=r.scrollToColumn,i=r.scrollToRow;return x.createElement("div",{className:t,onKeyDown:this._onKeyDown},n({onSectionRendered:this._onSectionRendered,scrollToColumn:l,scrollToRow:i}))}},{key:"_getScrollState",value:function(){return this.props.isControlled?this.props:this.state}},{key:"_updateScrollState",value:function(e){var t=e.scrollToColumn,n=e.scrollToRow,r=this.props,l=r.isControlled,i=r.onScrollToChange;typeof i=="function"&&i({scrollToColumn:t,scrollToRow:n}),l||this.setState({scrollToColumn:t,scrollToRow:n})}}],[{key:"getDerivedStateFromProps",value:function(e,t){return e.isControlled?{}:e.scrollToColumn!==t.instanceProps.prevScrollToColumn||e.scrollToRow!==t.instanceProps.prevScrollToRow?Ae(Ae({},t),{},{scrollToColumn:e.scrollToColumn,scrollToRow:e.scrollToRow,instanceProps:{prevScrollToColumn:e.scrollToColumn,prevScrollToRow:e.scrollToRow}}):{}}}])}();function _t(o,e){var t,n=(t=e!==void 0?e:typeof window<"u"?window:typeof self<"u"?self:global).document!==void 0&&t.document.attachEvent;if(!n){var r=function(){var m=t.requestAnimationFrame||t.mozRequestAnimationFrame||t.webkitRequestAnimationFrame||function(y){return t.setTimeout(y,20)};return function(y){return m(y)}}(),l=function(){var m=t.cancelAnimationFrame||t.mozCancelAnimationFrame||t.webkitCancelAnimationFrame||t.clearTimeout;return function(y){return m(y)}}(),i=function(m){var y=m.__resizeTriggers__,w=y.firstElementChild,C=y.lastElementChild,R=w.firstElementChild;C.scrollLeft=C.scrollWidth,C.scrollTop=C.scrollHeight,R.style.width=w.offsetWidth+1+"px",R.style.height=w.offsetHeight+1+"px",w.scrollLeft=w.scrollWidth,w.scrollTop=w.scrollHeight},a=function(m){if(!(m.target.className&&typeof m.target.className.indexOf=="function"&&m.target.className.indexOf("contract-trigger")<0&&m.target.className.indexOf("expand-trigger")<0)){var y=this;i(this),this.__resizeRAF__&&l(this.__resizeRAF__),this.__resizeRAF__=r(function(){(function(w){return w.offsetWidth!=w.__resizeLast__.width||w.offsetHeight!=w.__resizeLast__.height})(y)&&(y.__resizeLast__.width=y.offsetWidth,y.__resizeLast__.height=y.offsetHeight,y.__resizeListeners__.forEach(function(w){w.call(y,m)}))})}},s=!1,c="",u="animationstart",d="Webkit Moz O ms".split(" "),f="webkitAnimationStart animationstart oAnimationStart MSAnimationStart".split(" "),h=t.document.createElement("fakeelement");if(h.style.animationName!==void 0&&(s=!0),s===!1){for(var g=0;g<d.length;g++)if(h.style[d[g]+"AnimationName"]!==void 0){c="-"+d[g].toLowerCase()+"-",u=f[g],s=!0;break}}var v="resizeanim",_="@"+c+"keyframes "+v+" { from { opacity: 0; } to { opacity: 0; } } ",S=c+"animation: 1ms "+v+"; "}return{addResizeListener:function(m,y){if(n)m.attachEvent("onresize",y);else{if(!m.__resizeTriggers__){var w=m.ownerDocument,C=t.getComputedStyle(m);C&&C.position=="static"&&(m.style.position="relative"),function(b){if(!b.getElementById("detectElementResize")){var P=(_||"")+".resize-triggers { "+(S||"")+'visibility: hidden; opacity: 0; } .resize-triggers, .resize-triggers > div, .contract-trigger:before { content: " "; display: block; position: absolute; top: 0; left: 0; height: 100%; width: 100%; overflow: hidden; z-index: -1; } .resize-triggers > div { background: #eee; overflow: auto; } .contract-trigger:before { width: 200%; height: 200%; }',k=b.head||b.getElementsByTagName("head")[0],T=b.createElement("style");T.id="detectElementResize",T.type="text/css",o!=null&&T.setAttribute("nonce",o),T.styleSheet?T.styleSheet.cssText=P:T.appendChild(b.createTextNode(P)),k.appendChild(T)}}(w),m.__resizeLast__={},m.__resizeListeners__=[],(m.__resizeTriggers__=w.createElement("div")).className="resize-triggers";var R=w.createElement("div");R.className="expand-trigger",R.appendChild(w.createElement("div"));var z=w.createElement("div");z.className="contract-trigger",m.__resizeTriggers__.appendChild(R),m.__resizeTriggers__.appendChild(z),m.appendChild(m.__resizeTriggers__),i(m),m.addEventListener("scroll",a,!0),u&&(m.__resizeTriggers__.__animationListener__=function(b){b.animationName==v&&i(m)},m.__resizeTriggers__.addEventListener(u,m.__resizeTriggers__.__animationListener__))}m.__resizeListeners__.push(y)}},removeResizeListener:function(m,y){if(n)m.detachEvent("onresize",y);else if(m.__resizeListeners__.splice(m.__resizeListeners__.indexOf(y),1),!m.__resizeListeners__.length){m.removeEventListener("scroll",a,!0),m.__resizeTriggers__.__animationListener__&&(m.__resizeTriggers__.removeEventListener(u,m.__resizeTriggers__.__animationListener__),m.__resizeTriggers__.__animationListener__=null);try{m.__resizeTriggers__=!m.removeChild(m.__resizeTriggers__)}catch{}}}}}function We(o,e){var t=Object.keys(o);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(o);e&&(n=n.filter(function(r){return Object.getOwnPropertyDescriptor(o,r).enumerable})),t.push.apply(t,n)}return t}function He(o){for(var e=1;e<arguments.length;e++){var t=arguments[e]!=null?arguments[e]:{};e%2?We(Object(t),!0).forEach(function(n){p(o,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(o,Object.getOwnPropertyDescriptors(t)):We(Object(t)).forEach(function(n){Object.defineProperty(o,n,Object.getOwnPropertyDescriptor(t,n))})}return o}function St(){try{var o=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(St=function(){return!!o})()}p(Ee,"defaultProps",{disabled:!1,isControlled:!1,mode:"edges",scrollToColumn:0,scrollToRow:0}),ue(Ee);var yt=function(){function o(){var e,t,n,r;E(this,o);for(var l=arguments.length,i=new Array(l),a=0;a<l;a++)i[a]=arguments[a];return t=this,n=o,r=[].concat(i),n=O(n),p(e=D(t,St()?Reflect.construct(n,r||[],O(t).constructor):n.apply(t,r)),"state",{height:e.props.defaultHeight||0,width:e.props.defaultWidth||0}),p(e,"_parentNode",void 0),p(e,"_autoSizer",void 0),p(e,"_window",void 0),p(e,"_detectElementResize",void 0),p(e,"_onResize",function(){var s=e.props,c=s.disableHeight,u=s.disableWidth,d=s.onResize;if(e._parentNode){var f=e._parentNode.offsetHeight||0,h=e._parentNode.offsetWidth||0,g=(e._window||window).getComputedStyle(e._parentNode)||{},v=parseInt(g.paddingLeft,10)||0,_=parseInt(g.paddingRight,10)||0,S=parseInt(g.paddingTop,10)||0,m=parseInt(g.paddingBottom,10)||0,y=f-S-m,w=h-v-_;(!c&&e.state.height!==y||!u&&e.state.width!==w)&&(e.setState({height:f-S-m,width:h-v-_}),d({height:f,width:h}))}}),p(e,"_setRef",function(s){e._autoSizer=s}),e}return j(o,x.Component),W(o,[{key:"componentDidMount",value:function(){var e=this.props.nonce;this._autoSizer&&this._autoSizer.parentNode&&this._autoSizer.parentNode.ownerDocument&&this._autoSizer.parentNode.ownerDocument.defaultView&&this._autoSizer.parentNode instanceof this._autoSizer.parentNode.ownerDocument.defaultView.HTMLElement&&(this._parentNode=this._autoSizer.parentNode,this._window=this._autoSizer.parentNode.ownerDocument.defaultView,this._detectElementResize=_t(e,this._window),this._detectElementResize.addResizeListener(this._parentNode,this._onResize),this._onResize())}},{key:"componentWillUnmount",value:function(){this._detectElementResize&&this._parentNode&&this._detectElementResize.removeResizeListener(this._parentNode,this._onResize)}},{key:"render",value:function(){var e=this.props,t=e.children,n=e.className,r=e.disableHeight,l=e.disableWidth,i=e.style,a=this.state,s=a.height,c=a.width,u={overflow:"visible"},d={};return r||(u.height=0,d.height=s),l||(u.width=0,d.width=c),x.createElement("div",{className:n,ref:this._setRef,style:He(He({},u),i)},t(d))}}])}();function wt(){try{var o=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(wt=function(){return!!o})()}p(yt,"defaultProps",{onResize:function(){},disableHeight:!1,disableWidth:!1,style:{}});var Yt=function(){function o(){var e,t,n,r;E(this,o);for(var l=arguments.length,i=new Array(l),a=0;a<l;a++)i[a]=arguments[a];return t=this,n=o,r=[].concat(i),n=O(n),p(e=D(t,wt()?Reflect.construct(n,r||[],O(t).constructor):n.apply(t,r)),"_child",x.createRef()),p(e,"_measure",function(){var s=e.props,c=s.cache,u=s.columnIndex,d=u===void 0?0:u,f=s.parent,h=s.rowIndex,g=h===void 0?e.props.index||0:h,v=e._getCellMeasurements(),_=v.height,S=v.width;_===c.getHeight(g,d)&&S===c.getWidth(g,d)||(c.set(g,d,S,_),f&&typeof f.recomputeGridSize=="function"&&f.recomputeGridSize({columnIndex:d,rowIndex:g}))}),p(e,"_registerChild",function(s){!s||s instanceof Element||console.warn("CellMeasurer registerChild expects to be passed Element or null"),e._child.current=s,s&&e._maybeMeasureCell()}),e}return j(o,x.PureComponent),W(o,[{key:"componentDidMount",value:function(){this._maybeMeasureCell()}},{key:"componentDidUpdate",value:function(){this._maybeMeasureCell()}},{key:"render",value:function(){var e=this,t=this.props.children,n=typeof t=="function"?t({measure:this._measure,registerChild:this._registerChild}):t;return n===null?n:U.cloneElement(n,{ref:function(r){typeof n.ref=="function"?n.ref(r):n.ref&&(n.ref.current=r),e._child.current=r}})}},{key:"_getCellMeasurements",value:function(){var e=this.props.cache,t=this._child.current;if(t&&t.ownerDocument&&t.ownerDocument.defaultView&&t instanceof t.ownerDocument.defaultView.HTMLElement){var n=t.style.width,r=t.style.height;e.hasFixedWidth()||(t.style.width="auto"),e.hasFixedHeight()||(t.style.height="auto");var l=Math.ceil(t.offsetHeight),i=Math.ceil(t.offsetWidth);return n&&(t.style.width=n),r&&(t.style.height=r),{height:l,width:i}}return{height:0,width:0}}},{key:"_maybeMeasureCell",value:function(){var e=this.props,t=e.cache,n=e.columnIndex,r=n===void 0?0:n,l=e.parent,i=e.rowIndex,a=i===void 0?this.props.index||0:i;if(!t.has(a,r)){var s=this._getCellMeasurements(),c=s.height,u=s.width;t.set(a,r,u,c),l&&typeof l.invalidateCellSizeAfterRender=="function"&&l.invalidateCellSizeAfterRender({columnIndex:r,rowIndex:a})}}}])}();function ee(){var o=!(arguments.length>0&&arguments[0]!==void 0)||arguments[0],e={};return function(t){var n=t.callback,r=t.indices,l=Object.keys(r),i=!o||l.every(function(s){var c=r[s];return Array.isArray(c)?c.length>0:c>=0}),a=l.length!==Object.keys(e).length||l.some(function(s){var c=e[s],u=r[s];return Array.isArray(u)?c.join(",")!==u.join(","):c!==u});e=r,i&&a&&n(r)}}p(Yt,"__internalCellMeasurerFlag",!1);const Jt=!(typeof window>"u"||!window.document||!window.document.createElement);var he;function Ce(o){if((!he&&he!==0||o)&&Jt){var e=document.createElement("div");e.style.position="absolute",e.style.top="-9999px",e.style.width="50px",e.style.height="50px",e.style.overflow="scroll",document.body.appendChild(e),he=e.offsetWidth-e.clientWidth,document.body.removeChild(e)}return he}function De(o,e){var t=Object.keys(o);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(o);e&&(n=n.filter(function(r){return Object.getOwnPropertyDescriptor(o,r).enumerable})),t.push.apply(t,n)}return t}function je(o){for(var e=1;e<arguments.length;e++){var t=arguments[e]!=null?arguments[e]:{};e%2?De(Object(t),!0).forEach(function(n){p(o,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(o,Object.getOwnPropertyDescriptors(t)):De(Object(t)).forEach(function(n){Object.defineProperty(o,n,Object.getOwnPropertyDescriptor(t,n))})}return o}function Ct(){try{var o=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(Ct=function(){return!!o})()}var Zt="observed",oe="requested",me=function(){function o(){var e,t,n,r;E(this,o);for(var l=arguments.length,i=new Array(l),a=0;a<l;a++)i[a]=arguments[a];return t=this,n=o,r=[].concat(i),n=O(n),p(e=D(t,Ct()?Reflect.construct(n,r||[],O(t).constructor):n.apply(t,r)),"state",{isScrolling:!1,scrollLeft:0,scrollTop:0}),p(e,"_calculateSizeAndPositionDataOnNextUpdate",!1),p(e,"_onSectionRenderedMemoizer",ee()),p(e,"_onScrollMemoizer",ee(!1)),p(e,"_invokeOnSectionRenderedHelper",function(){var s=e.props,c=s.cellLayoutManager,u=s.onSectionRendered;e._onSectionRenderedMemoizer({callback:u,indices:{indices:c.getLastRenderedIndices()}})}),p(e,"_setScrollingContainerRef",function(s){e._scrollingContainer=s}),p(e,"_updateScrollPositionForScrollToCell",function(){var s=e.props,c=s.cellLayoutManager,u=s.height,d=s.scrollToAlignment,f=s.scrollToCell,h=s.width,g=e.state,v=g.scrollLeft,_=g.scrollTop;if(f>=0){var S=c.getScrollPositionForCell({align:d,cellIndex:f,height:u,scrollLeft:v,scrollTop:_,width:h});S.scrollLeft===v&&S.scrollTop===_||e._setScrollPosition(S)}}),p(e,"_onScroll",function(s){if(s.target===e._scrollingContainer){e._enablePointerEventsAfterDelay();var c=e.props,u=c.cellLayoutManager,d=c.height,f=c.isScrollingChange,h=c.width,g=e._scrollbarSize,v=u.getTotalSize(),_=v.height,S=v.width,m=Math.max(0,Math.min(S-h+g,s.target.scrollLeft)),y=Math.max(0,Math.min(_-d+g,s.target.scrollTop));if(e.state.scrollLeft!==m||e.state.scrollTop!==y){var w=s.cancelable?Zt:oe;e.state.isScrolling||f(!0),e.setState({isScrolling:!0,scrollLeft:m,scrollPositionChangeReason:w,scrollTop:y})}e._invokeOnScrollMemoizer({scrollLeft:m,scrollTop:y,totalWidth:S,totalHeight:_})}}),e._scrollbarSize=Ce(),e._scrollbarSize===void 0?(e._scrollbarSizeMeasured=!1,e._scrollbarSize=0):e._scrollbarSizeMeasured=!0,e}return j(o,x.PureComponent),W(o,[{key:"recomputeCellSizesAndPositions",value:function(){this._calculateSizeAndPositionDataOnNextUpdate=!0,this.forceUpdate()}},{key:"componentDidMount",value:function(){var e=this.props,t=e.cellLayoutManager,n=e.scrollLeft,r=e.scrollToCell,l=e.scrollTop;this._scrollbarSizeMeasured||(this._scrollbarSize=Ce(),this._scrollbarSizeMeasured=!0,this.setState({})),r>=0?this._updateScrollPositionForScrollToCell():(n>=0||l>=0)&&this._setScrollPosition({scrollLeft:n,scrollTop:l}),this._invokeOnSectionRenderedHelper();var i=t.getTotalSize(),a=i.height,s=i.width;this._invokeOnScrollMemoizer({scrollLeft:n||0,scrollTop:l||0,totalHeight:a,totalWidth:s})}},{key:"componentDidUpdate",value:function(e,t){var n=this.props,r=n.height,l=n.scrollToAlignment,i=n.scrollToCell,a=n.width,s=this.state,c=s.scrollLeft,u=s.scrollPositionChangeReason,d=s.scrollTop;u===oe&&(c>=0&&c!==t.scrollLeft&&c!==this._scrollingContainer.scrollLeft&&(this._scrollingContainer.scrollLeft=c),d>=0&&d!==t.scrollTop&&d!==this._scrollingContainer.scrollTop&&(this._scrollingContainer.scrollTop=d)),r===e.height&&l===e.scrollToAlignment&&i===e.scrollToCell&&a===e.width||this._updateScrollPositionForScrollToCell(),this._invokeOnSectionRenderedHelper()}},{key:"componentWillUnmount",value:function(){this._disablePointerEventsTimeoutId&&clearTimeout(this._disablePointerEventsTimeoutId)}},{key:"render",value:function(){var e=this.props,t=e.autoHeight,n=e.cellCount,r=e.cellLayoutManager,l=e.className,i=e.height,a=e.horizontalOverscanSize,s=e.id,c=e.noContentRenderer,u=e.style,d=e.verticalOverscanSize,f=e.width,h=this.state,g=h.isScrolling,v=h.scrollLeft,_=h.scrollTop;(this._lastRenderedCellCount!==n||this._lastRenderedCellLayoutManager!==r||this._calculateSizeAndPositionDataOnNextUpdate)&&(this._lastRenderedCellCount=n,this._lastRenderedCellLayoutManager=r,this._calculateSizeAndPositionDataOnNextUpdate=!1,r.calculateSizeAndPositionData());var S=r.getTotalSize(),m=S.height,y=S.width,w=Math.max(0,v-a),C=Math.max(0,_-d),R=Math.min(y,v+f+a),z=Math.min(m,_+i+d),b=i>0&&f>0?r.cellRenderers({height:z-C,isScrolling:g,width:R-w,x:w,y:C}):[],P={boxSizing:"border-box",direction:"ltr",height:t?"auto":i,position:"relative",WebkitOverflowScrolling:"touch",width:f,willChange:"transform"},k=m>i?this._scrollbarSize:0,T=y>f?this._scrollbarSize:0;return P.overflowX=y+k<=f?"hidden":"auto",P.overflowY=m+T<=i?"hidden":"auto",x.createElement("div",{ref:this._setScrollingContainerRef,"aria-label":this.props["aria-label"],className:I.clsx("ReactVirtualized__Collection",l),id:s,onScroll:this._onScroll,role:"grid",style:je(je({},P),u),tabIndex:0},n>0&&x.createElement("div",{className:"ReactVirtualized__Collection__innerScrollContainer",style:{height:m,maxHeight:m,maxWidth:y,overflow:"hidden",pointerEvents:g?"none":"",width:y}},b),n===0&&c())}},{key:"_enablePointerEventsAfterDelay",value:function(){var e=this;this._disablePointerEventsTimeoutId&&clearTimeout(this._disablePointerEventsTimeoutId),this._disablePointerEventsTimeoutId=setTimeout(function(){(0,e.props.isScrollingChange)(!1),e._disablePointerEventsTimeoutId=null,e.setState({isScrolling:!1})},150)}},{key:"_invokeOnScrollMemoizer",value:function(e){var t=this,n=e.scrollLeft,r=e.scrollTop,l=e.totalHeight,i=e.totalWidth;this._onScrollMemoizer({callback:function(a){var s=a.scrollLeft,c=a.scrollTop,u=t.props,d=u.height;(0,u.onScroll)({clientHeight:d,clientWidth:u.width,scrollHeight:l,scrollLeft:s,scrollTop:c,scrollWidth:i})},indices:{scrollLeft:n,scrollTop:r}})}},{key:"_setScrollPosition",value:function(e){var t=e.scrollLeft,n=e.scrollTop,r={scrollPositionChangeReason:oe};t>=0&&(r.scrollLeft=t),n>=0&&(r.scrollTop=n),(t>=0&&t!==this.state.scrollLeft||n>=0&&n!==this.state.scrollTop)&&this.setState(r)}}],[{key:"getDerivedStateFromProps",value:function(e,t){return e.cellCount!==0||t.scrollLeft===0&&t.scrollTop===0?e.scrollLeft!==t.scrollLeft||e.scrollTop!==t.scrollTop?{scrollLeft:e.scrollLeft!=null?e.scrollLeft:t.scrollLeft,scrollTop:e.scrollTop!=null?e.scrollTop:t.scrollTop,scrollPositionChangeReason:oe}:null:{scrollLeft:0,scrollTop:0,scrollPositionChangeReason:oe}}}])}();p(me,"defaultProps",{"aria-label":"grid",horizontalOverscanSize:0,noContentRenderer:function(){return null},onScroll:function(){return null},onSectionRendered:function(){return null},scrollToAlignment:"auto",scrollToCell:-1,style:{},verticalOverscanSize:0}),me.propTypes={},ue(me);var Qt=function(){return W(function o(e){var t=e.height,n=e.width,r=e.x,l=e.y;E(this,o),this.height=t,this.width=n,this.x=r,this.y=l,this._indexMap={},this._indices=[]},[{key:"addCellIndex",value:function(o){var e=o.index;this._indexMap[e]||(this._indexMap[e]=!0,this._indices.push(e))}},{key:"getCellIndices",value:function(){return this._indices}},{key:"toString",value:function(){return"".concat(this.x,",").concat(this.y," ").concat(this.width,"x").concat(this.height)}}])}(),eo=function(){return W(function o(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:100;E(this,o),this._sectionSize=e,this._cellMetadata=[],this._sections={}},[{key:"getCellIndices",value:function(o){var e=o.height,t=o.width,n=o.x,r=o.y,l={};return this.getSections({height:e,width:t,x:n,y:r}).forEach(function(i){return i.getCellIndices().forEach(function(a){l[a]=a})}),Object.keys(l).map(function(i){return l[i]})}},{key:"getCellMetadata",value:function(o){var e=o.index;return this._cellMetadata[e]}},{key:"getSections",value:function(o){for(var e=o.height,t=o.width,n=o.x,r=o.y,l=Math.floor(n/this._sectionSize),i=Math.floor((n+t-1)/this._sectionSize),a=Math.floor(r/this._sectionSize),s=Math.floor((r+e-1)/this._sectionSize),c=[],u=l;u<=i;u++)for(var d=a;d<=s;d++){var f="".concat(u,".").concat(d);this._sections[f]||(this._sections[f]=new Qt({height:this._sectionSize,width:this._sectionSize,x:u*this._sectionSize,y:d*this._sectionSize})),c.push(this._sections[f])}return c}},{key:"getTotalSectionCount",value:function(){return Object.keys(this._sections).length}},{key:"toString",value:function(){var o=this;return Object.keys(this._sections).map(function(e){return o._sections[e].toString()})}},{key:"registerCell",value:function(o){var e=o.cellMetadatum,t=o.index;this._cellMetadata[t]=e,this.getSections(e).forEach(function(n){return n.addCellIndex({index:t})})}}])}();function Fe(o){var e=o.align,t=e===void 0?"auto":e,n=o.cellOffset,r=o.cellSize,l=o.containerSize,i=o.currentOffset,a=n,s=a-l+r;switch(t){case"start":return a;case"end":return s;case"center":return a-(l-r)/2;default:return Math.max(s,Math.min(a,i))}}function xt(){try{var o=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(xt=function(){return!!o})()}var Ne=function(){function o(e,t){var n,r,l,i;return E(this,o),r=this,i=[e,t],l=O(l=o),(n=D(r,xt()?Reflect.construct(l,i||[],O(r).constructor):l.apply(r,i)))._cellMetadata=[],n._lastRenderedCellIndices=[],n._cellCache=[],n._isScrollingChange=n._isScrollingChange.bind(n),n._setCollectionViewRef=n._setCollectionViewRef.bind(n),n}return j(o,x.PureComponent),W(o,[{key:"forceUpdate",value:function(){this._collectionView!==void 0&&this._collectionView.forceUpdate()}},{key:"recomputeCellSizesAndPositions",value:function(){this._cellCache=[],this._collectionView.recomputeCellSizesAndPositions()}},{key:"render",value:function(){var e=I._extends({},(function(t){if(t==null)throw new TypeError("Cannot destructure "+t)}(this.props),this.props));return x.createElement(me,I._extends({cellLayoutManager:this,isScrollingChange:this._isScrollingChange,ref:this._setCollectionViewRef},e))}},{key:"calculateSizeAndPositionData",value:function(){var e=this.props,t=function(n){for(var r=n.cellCount,l=n.cellSizeAndPositionGetter,i=n.sectionSize,a=[],s=new eo(i),c=0,u=0,d=0;d<r;d++){var f=l({index:d});if(f.height==null||isNaN(f.height)||f.width==null||isNaN(f.width)||f.x==null||isNaN(f.x)||f.y==null||isNaN(f.y))throw Error("Invalid metadata returned for cell ".concat(d,`:
15
+ x:`).concat(f.x,", y:").concat(f.y,", width:").concat(f.width,", height:").concat(f.height));c=Math.max(c,f.y+f.height),u=Math.max(u,f.x+f.width),a[d]=f,s.registerCell({cellMetadatum:f,index:d})}return{cellMetadata:a,height:c,sectionManager:s,width:u}}({cellCount:e.cellCount,cellSizeAndPositionGetter:e.cellSizeAndPositionGetter,sectionSize:e.sectionSize});this._cellMetadata=t.cellMetadata,this._sectionManager=t.sectionManager,this._height=t.height,this._width=t.width}},{key:"getLastRenderedIndices",value:function(){return this._lastRenderedCellIndices}},{key:"getScrollPositionForCell",value:function(e){var t=e.align,n=e.cellIndex,r=e.height,l=e.scrollLeft,i=e.scrollTop,a=e.width,s=this.props.cellCount;if(n>=0&&n<s){var c=this._cellMetadata[n];l=Fe({align:t,cellOffset:c.x,cellSize:c.width,containerSize:a,currentOffset:l}),i=Fe({align:t,cellOffset:c.y,cellSize:c.height,containerSize:r,currentOffset:i})}return{scrollLeft:l,scrollTop:i}}},{key:"getTotalSize",value:function(){return{height:this._height,width:this._width}}},{key:"cellRenderers",value:function(e){var t=this,n=e.height,r=e.isScrolling,l=e.width,i=e.x,a=e.y,s=this.props,c=s.cellGroupRenderer,u=s.cellRenderer;return this._lastRenderedCellIndices=this._sectionManager.getCellIndices({height:n,width:l,x:i,y:a}),c({cellCache:this._cellCache,cellRenderer:u,cellSizeAndPositionGetter:function(d){var f=d.index;return t._sectionManager.getCellMetadata({index:f})},indices:this._lastRenderedCellIndices,isScrolling:r})}},{key:"_isScrollingChange",value:function(e){e||(this._cellCache=[])}},{key:"_setCollectionViewRef",value:function(e){this._collectionView=e}}])}();function Rt(){try{var o=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(Rt=function(){return!!o})()}function Be(o){var e=o.cellCount,t=o.cellSize,n=o.computeMetadataCallback,r=o.computeMetadataCallbackProps,l=o.nextCellsCount,i=o.nextCellSize,a=o.nextScrollToIndex,s=o.scrollToIndex,c=o.updateScrollOffsetForScrollToIndex;e===l&&(typeof t!="number"&&typeof i!="number"||t===i)||(n(r),s>=0&&s===a&&c())}function re(o,e){if(o==null)return{};var t,n,r=I._objectWithoutPropertiesLoose(o,e);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(o);for(n=0;n<l.length;n++)t=l[n],e.indexOf(t)===-1&&{}.propertyIsEnumerable.call(o,t)&&(r[t]=o[t])}return r}p(Ne,"defaultProps",{"aria-label":"grid",cellGroupRenderer:function(o){var e=o.cellCache,t=o.cellRenderer,n=o.cellSizeAndPositionGetter,r=o.indices,l=o.isScrolling;return r.map(function(i){var a=n({index:i}),s={index:i,isScrolling:l,key:i,style:{height:a.height,left:a.x,position:"absolute",top:a.y,width:a.width}};return l?(i in e||(e[i]=t(s)),e[i]):t(s)}).filter(function(i){return!!i})}}),Ne.propTypes={},function(){function o(e,t){var n,r,l,i;return E(this,o),r=this,i=[e,t],l=O(l=o),(n=D(r,Rt()?Reflect.construct(l,i||[],O(r).constructor):l.apply(r,i)))._registerChild=n._registerChild.bind(n),n}return j(o,x.PureComponent),W(o,[{key:"componentDidUpdate",value:function(e){var t=this.props,n=t.columnMaxWidth,r=t.columnMinWidth,l=t.columnCount,i=t.width;n===e.columnMaxWidth&&r===e.columnMinWidth&&l===e.columnCount&&i===e.width||this._registeredChild&&this._registeredChild.recomputeGridSize()}},{key:"render",value:function(){var e=this.props,t=e.children,n=e.columnMaxWidth,r=e.columnMinWidth,l=e.columnCount,i=e.width,a=r||1,s=n?Math.min(n,i):i,c=i/l;return c=Math.max(a,c),c=Math.min(s,c),c=Math.floor(c),t({adjustedWidth:Math.min(i,c*l),columnWidth:c,getColumnWidth:function(){return c},registerChild:this._registerChild})}},{key:"_registerChild",value:function(e){if(e&&typeof e.recomputeGridSize!="function")throw Error("Unexpected child type registered; only Grid/MultiGrid children are supported.");this._registeredChild=e,this._registeredChild&&this._registeredChild.recomputeGridSize()}}])}().propTypes={};var B,to=function(){return W(function o(e){var t=e.cellCount,n=e.cellSizeGetter,r=e.estimatedCellSize;E(this,o),p(this,"_cellSizeAndPositionData",{}),p(this,"_lastMeasuredIndex",-1),p(this,"_lastBatchedIndex",-1),p(this,"_cellCount",void 0),p(this,"_cellSizeGetter",void 0),p(this,"_estimatedCellSize",void 0),this._cellSizeGetter=n,this._cellCount=t,this._estimatedCellSize=r},[{key:"areOffsetsAdjusted",value:function(){return!1}},{key:"configure",value:function(o){var e=o.cellCount,t=o.estimatedCellSize,n=o.cellSizeGetter;this._cellCount=e,this._estimatedCellSize=t,this._cellSizeGetter=n}},{key:"getCellCount",value:function(){return this._cellCount}},{key:"getEstimatedCellSize",value:function(){return this._estimatedCellSize}},{key:"getLastMeasuredIndex",value:function(){return this._lastMeasuredIndex}},{key:"getOffsetAdjustment",value:function(){return 0}},{key:"getSizeAndPositionOfCell",value:function(o){if(o<0||o>=this._cellCount)throw Error("Requested index ".concat(o," is outside of range 0..").concat(this._cellCount));if(o>this._lastMeasuredIndex)for(var e=this.getSizeAndPositionOfLastMeasuredCell(),t=e.offset+e.size,n=this._lastMeasuredIndex+1;n<=o;n++){var r=this._cellSizeGetter({index:n});if(r===void 0||isNaN(r))throw Error("Invalid size returned for cell ".concat(n," of value ").concat(r));r===null?(this._cellSizeAndPositionData[n]={offset:t,size:0},this._lastBatchedIndex=o):(this._cellSizeAndPositionData[n]={offset:t,size:r},t+=r,this._lastMeasuredIndex=o)}return this._cellSizeAndPositionData[o]}},{key:"getSizeAndPositionOfLastMeasuredCell",value:function(){return this._lastMeasuredIndex>=0?this._cellSizeAndPositionData[this._lastMeasuredIndex]:{offset:0,size:0}}},{key:"getTotalSize",value:function(){var o=this.getSizeAndPositionOfLastMeasuredCell();return o.offset+o.size+(this._cellCount-this._lastMeasuredIndex-1)*this._estimatedCellSize}},{key:"getUpdatedOffsetForIndex",value:function(o){var e=o.align,t=e===void 0?"auto":e,n=o.containerSize,r=o.currentOffset,l=o.targetIndex;if(n<=0)return 0;var i,a=this.getSizeAndPositionOfCell(l),s=a.offset,c=s-n+a.size;switch(t){case"start":i=s;break;case"end":i=c;break;case"center":i=s-(n-a.size)/2;break;default:i=Math.max(c,Math.min(s,r))}var u=this.getTotalSize();return Math.max(0,Math.min(u-n,i))}},{key:"getVisibleCellRange",value:function(o){var e=o.containerSize,t=o.offset;if(this.getTotalSize()===0)return{};var n=t+e,r=this._findNearestCell(t),l=this.getSizeAndPositionOfCell(r);t=l.offset+l.size;for(var i=r;t<n&&i<this._cellCount-1;)i++,t+=this.getSizeAndPositionOfCell(i).size;return{start:r,stop:i}}},{key:"resetCell",value:function(o){this._lastMeasuredIndex=Math.min(this._lastMeasuredIndex,o-1)}},{key:"_binarySearch",value:function(o,e,t){for(;e<=o;){var n=e+Math.floor((o-e)/2),r=this.getSizeAndPositionOfCell(n).offset;if(r===t)return n;r<t?e=n+1:r>t&&(o=n-1)}return e>0?e-1:0}},{key:"_exponentialSearch",value:function(o,e){for(var t=1;o<this._cellCount&&this.getSizeAndPositionOfCell(o).offset<e;)o+=t,t*=2;return this._binarySearch(Math.min(o,this._cellCount-1),Math.floor(o/2),e)}},{key:"_findNearestCell",value:function(o){if(isNaN(o))throw Error("Invalid offset ".concat(o," specified"));o=Math.max(0,o);var e=this.getSizeAndPositionOfLastMeasuredCell(),t=Math.max(0,this._lastMeasuredIndex);return e.offset>=o?this._binarySearch(t,0,o):this._exponentialSearch(t,o)}}])}(),oo=function(){return typeof window<"u"&&window.chrome?16777100:15e5},no=["maxScrollSize"],Ue=function(){return W(function o(e){var t=e.maxScrollSize,n=t===void 0?oo():t,r=re(e,no);E(this,o),p(this,"_cellSizeAndPositionManager",void 0),p(this,"_maxScrollSize",void 0),this._cellSizeAndPositionManager=new to(r),this._maxScrollSize=n},[{key:"areOffsetsAdjusted",value:function(){return this._cellSizeAndPositionManager.getTotalSize()>this._maxScrollSize}},{key:"configure",value:function(o){this._cellSizeAndPositionManager.configure(o)}},{key:"getCellCount",value:function(){return this._cellSizeAndPositionManager.getCellCount()}},{key:"getEstimatedCellSize",value:function(){return this._cellSizeAndPositionManager.getEstimatedCellSize()}},{key:"getLastMeasuredIndex",value:function(){return this._cellSizeAndPositionManager.getLastMeasuredIndex()}},{key:"getOffsetAdjustment",value:function(o){var e=o.containerSize,t=o.offset,n=this._cellSizeAndPositionManager.getTotalSize(),r=this.getTotalSize(),l=this._getOffsetPercentage({containerSize:e,offset:t,totalSize:r});return Math.round(l*(r-n))}},{key:"getSizeAndPositionOfCell",value:function(o){return this._cellSizeAndPositionManager.getSizeAndPositionOfCell(o)}},{key:"getSizeAndPositionOfLastMeasuredCell",value:function(){return this._cellSizeAndPositionManager.getSizeAndPositionOfLastMeasuredCell()}},{key:"getTotalSize",value:function(){return Math.min(this._maxScrollSize,this._cellSizeAndPositionManager.getTotalSize())}},{key:"getUpdatedOffsetForIndex",value:function(o){var e=o.align,t=e===void 0?"auto":e,n=o.containerSize,r=o.currentOffset,l=o.targetIndex;r=this._safeOffsetToOffset({containerSize:n,offset:r});var i=this._cellSizeAndPositionManager.getUpdatedOffsetForIndex({align:t,containerSize:n,currentOffset:r,targetIndex:l});return this._offsetToSafeOffset({containerSize:n,offset:i})}},{key:"getVisibleCellRange",value:function(o){var e=o.containerSize,t=o.offset;return t=this._safeOffsetToOffset({containerSize:e,offset:t}),this._cellSizeAndPositionManager.getVisibleCellRange({containerSize:e,offset:t})}},{key:"resetCell",value:function(o){this._cellSizeAndPositionManager.resetCell(o)}},{key:"_getOffsetPercentage",value:function(o){var e=o.containerSize,t=o.offset,n=o.totalSize;return n<=e?0:t/(n-e)}},{key:"_offsetToSafeOffset",value:function(o){var e=o.containerSize,t=o.offset,n=this._cellSizeAndPositionManager.getTotalSize(),r=this.getTotalSize();if(n===r)return t;var l=this._getOffsetPercentage({containerSize:e,offset:t,totalSize:n});return Math.round(l*(r-e))}},{key:"_safeOffsetToOffset",value:function(o){var e=o.containerSize,t=o.offset,n=this._cellSizeAndPositionManager.getTotalSize(),r=this.getTotalSize();if(n===r)return t;var l=this._getOffsetPercentage({containerSize:e,offset:t,totalSize:r});return Math.round(l*(n-e))}}])}();function Ve(o){var e=o.cellSize,t=o.cellSizeAndPositionManager,n=o.previousCellsCount,r=o.previousCellSize,l=o.previousScrollToAlignment,i=o.previousScrollToIndex,a=o.previousSize,s=o.scrollOffset,c=o.scrollToAlignment,u=o.scrollToIndex,d=o.size,f=o.sizeJustIncreasedFromZero,h=o.updateScrollIndexCallback,g=t.getCellCount(),v=u>=0&&u<g;v&&(d!==a||f||!r||typeof e=="number"&&e!==r||c!==l||u!==i)?h(u):!v&&g>0&&(d<a||g<n)&&s>t.getTotalSize()-d&&h(g-1)}var ro=(B=typeof window<"u"?window:typeof self<"u"?self:{}).requestAnimationFrame||B.webkitRequestAnimationFrame||B.mozRequestAnimationFrame||B.oRequestAnimationFrame||B.msRequestAnimationFrame||function(o){return B.setTimeout(o,1e3/60)},io=B.cancelAnimationFrame||B.webkitCancelAnimationFrame||B.mozCancelAnimationFrame||B.oCancelAnimationFrame||B.msCancelAnimationFrame||function(o){B.clearTimeout(o)},qe=ro,lo=io,te=function(o){return lo(o.id)},Oe=function(o,e){var t;Promise.resolve().then(function(){t=Date.now()});var n=function(){Date.now()-t>=e?o.call():r.id=qe(n)},r={id:qe(n)};return r};function $e(o,e){var t=Object.keys(o);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(o);e&&(n=n.filter(function(r){return Object.getOwnPropertyDescriptor(o,r).enumerable})),t.push.apply(t,n)}return t}function F(o){for(var e=1;e<arguments.length;e++){var t=arguments[e]!=null?arguments[e]:{};e%2?$e(Object(t),!0).forEach(function(n){p(o,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(o,Object.getOwnPropertyDescriptors(t)):$e(Object(t)).forEach(function(n){Object.defineProperty(o,n,Object.getOwnPropertyDescriptor(t,n))})}return o}function bt(){try{var o=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(bt=function(){return!!o})()}var so="observed",Ke="requested",$=function(){function o(e){var t,n,r,l;E(this,o),n=this,l=[e],r=O(r=o),p(t=D(n,bt()?Reflect.construct(r,l||[],O(n).constructor):r.apply(n,l)),"_onGridRenderedMemoizer",ee()),p(t,"_onScrollMemoizer",ee(!1)),p(t,"_deferredInvalidateColumnIndex",null),p(t,"_deferredInvalidateRowIndex",null),p(t,"_recomputeScrollLeftFlag",!1),p(t,"_recomputeScrollTopFlag",!1),p(t,"_horizontalScrollBarSize",0),p(t,"_verticalScrollBarSize",0),p(t,"_scrollbarPresenceChanged",!1),p(t,"_scrollingContainer",void 0),p(t,"_childrenToDisplay",void 0),p(t,"_columnStartIndex",void 0),p(t,"_columnStopIndex",void 0),p(t,"_rowStartIndex",void 0),p(t,"_rowStopIndex",void 0),p(t,"_renderedColumnStartIndex",0),p(t,"_renderedColumnStopIndex",0),p(t,"_renderedRowStartIndex",0),p(t,"_renderedRowStopIndex",0),p(t,"_initialScrollTop",void 0),p(t,"_initialScrollLeft",void 0),p(t,"_disablePointerEventsTimeoutId",void 0),p(t,"_styleCache",{}),p(t,"_cellCache",{}),p(t,"_debounceScrollEndedCallback",function(){t._disablePointerEventsTimeoutId=null,t.setState({isScrolling:!1,needToResetStyleCache:!1})}),p(t,"_invokeOnGridRenderedHelper",function(){var s=t.props.onSectionRendered;t._onGridRenderedMemoizer({callback:s,indices:{columnOverscanStartIndex:t._columnStartIndex,columnOverscanStopIndex:t._columnStopIndex,columnStartIndex:t._renderedColumnStartIndex,columnStopIndex:t._renderedColumnStopIndex,rowOverscanStartIndex:t._rowStartIndex,rowOverscanStopIndex:t._rowStopIndex,rowStartIndex:t._renderedRowStartIndex,rowStopIndex:t._renderedRowStopIndex}})}),p(t,"_setScrollingContainerRef",function(s){t._scrollingContainer=s,typeof t.props.elementRef=="function"?t.props.elementRef(s):X(t.props.elementRef)==="object"&&(t.props.elementRef.current=s)}),p(t,"_onScroll",function(s){s.target===t._scrollingContainer&&t.handleScrollEvent(s.target)});var i=new Ue({cellCount:e.columnCount,cellSizeGetter:function(s){return o._wrapSizeGetter(e.columnWidth)(s)},estimatedCellSize:o._getEstimatedColumnSize(e)}),a=new Ue({cellCount:e.rowCount,cellSizeGetter:function(s){return o._wrapSizeGetter(e.rowHeight)(s)},estimatedCellSize:o._getEstimatedRowSize(e)});return t.state={instanceProps:{columnSizeAndPositionManager:i,rowSizeAndPositionManager:a,prevColumnWidth:e.columnWidth,prevRowHeight:e.rowHeight,prevColumnCount:e.columnCount,prevRowCount:e.rowCount,prevIsScrolling:e.isScrolling===!0,prevScrollToColumn:e.scrollToColumn,prevScrollToRow:e.scrollToRow,scrollbarSize:0,scrollbarSizeMeasured:!1},isScrolling:!1,scrollDirectionHorizontal:1,scrollDirectionVertical:1,scrollLeft:0,scrollTop:0,scrollPositionChangeReason:null,needToResetStyleCache:!1},e.scrollToRow>0&&(t._initialScrollTop=t._getCalculatedScrollTop(e,t.state)),e.scrollToColumn>0&&(t._initialScrollLeft=t._getCalculatedScrollLeft(e,t.state)),t}return j(o,x.PureComponent),W(o,[{key:"getOffsetForCell",value:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=e.alignment,n=t===void 0?this.props.scrollToAlignment:t,r=e.columnIndex,l=r===void 0?this.props.scrollToColumn:r,i=e.rowIndex,a=i===void 0?this.props.scrollToRow:i,s=F(F({},this.props),{},{scrollToAlignment:n,scrollToColumn:l,scrollToRow:a});return{scrollLeft:this._getCalculatedScrollLeft(s),scrollTop:this._getCalculatedScrollTop(s)}}},{key:"getTotalRowsHeight",value:function(){return this.state.instanceProps.rowSizeAndPositionManager.getTotalSize()}},{key:"getTotalColumnsWidth",value:function(){return this.state.instanceProps.columnSizeAndPositionManager.getTotalSize()}},{key:"handleScrollEvent",value:function(e){var t=e.scrollLeft,n=t===void 0?0:t,r=e.scrollTop,l=r===void 0?0:r;if(!(l<0)){this._debounceScrollEnded();var i=this.props,a=i.autoHeight,s=i.autoWidth,c=i.height,u=i.width,d=this.state.instanceProps,f=d.scrollbarSize,h=d.rowSizeAndPositionManager.getTotalSize(),g=d.columnSizeAndPositionManager.getTotalSize(),v=Math.min(Math.max(0,g-u+f),n),_=Math.min(Math.max(0,h-c+f),l);if(this.state.scrollLeft!==v||this.state.scrollTop!==_){var S={isScrolling:!0,scrollDirectionHorizontal:v!==this.state.scrollLeft?v>this.state.scrollLeft?1:-1:this.state.scrollDirectionHorizontal,scrollDirectionVertical:_!==this.state.scrollTop?_>this.state.scrollTop?1:-1:this.state.scrollDirectionVertical,scrollPositionChangeReason:so};a||(S.scrollTop=_),s||(S.scrollLeft=v),S.needToResetStyleCache=!1,this.setState(S)}this._invokeOnScrollMemoizer({scrollLeft:v,scrollTop:_,totalColumnsWidth:g,totalRowsHeight:h})}}},{key:"invalidateCellSizeAfterRender",value:function(e){var t=e.columnIndex,n=e.rowIndex;this._deferredInvalidateColumnIndex=typeof this._deferredInvalidateColumnIndex=="number"?Math.min(this._deferredInvalidateColumnIndex,t):t,this._deferredInvalidateRowIndex=typeof this._deferredInvalidateRowIndex=="number"?Math.min(this._deferredInvalidateRowIndex,n):n}},{key:"measureAllCells",value:function(){var e=this.props,t=e.columnCount,n=e.rowCount,r=this.state.instanceProps;r.columnSizeAndPositionManager.getSizeAndPositionOfCell(t-1),r.rowSizeAndPositionManager.getSizeAndPositionOfCell(n-1)}},{key:"recomputeGridSize",value:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=e.columnIndex,n=t===void 0?0:t,r=e.rowIndex,l=r===void 0?0:r,i=this.props,a=i.scrollToColumn,s=i.scrollToRow,c=this.state.instanceProps;c.columnSizeAndPositionManager.resetCell(n),c.rowSizeAndPositionManager.resetCell(l),this._recomputeScrollLeftFlag=a>=0&&(this.state.scrollDirectionHorizontal===1?n<=a:n>=a),this._recomputeScrollTopFlag=s>=0&&(this.state.scrollDirectionVertical===1?l<=s:l>=s),this._styleCache={},this._cellCache={},this.forceUpdate()}},{key:"scrollToCell",value:function(e){var t=e.columnIndex,n=e.rowIndex,r=this.props.columnCount,l=this.props;r>1&&t!==void 0&&this._updateScrollLeftForScrollToColumn(F(F({},l),{},{scrollToColumn:t})),n!==void 0&&this._updateScrollTopForScrollToRow(F(F({},l),{},{scrollToRow:n}))}},{key:"componentDidMount",value:function(){var e=this.props,t=e.getScrollbarSize,n=e.height,r=e.scrollLeft,l=e.scrollToColumn,i=e.scrollTop,a=e.scrollToRow,s=e.width,c=this.state.instanceProps;if(this._initialScrollTop=0,this._initialScrollLeft=0,this._handleInvalidatedGridSize(),c.scrollbarSizeMeasured||this.setState(function(f){var h=F(F({},f),{},{needToResetStyleCache:!1});return h.instanceProps.scrollbarSize=t(),h.instanceProps.scrollbarSizeMeasured=!0,h}),typeof r=="number"&&r>=0||typeof i=="number"&&i>=0){var u=o._getScrollToPositionStateUpdate({prevState:this.state,scrollLeft:r,scrollTop:i});u&&(u.needToResetStyleCache=!1,this.setState(u))}this._scrollingContainer&&(this._scrollingContainer.scrollLeft!==this.state.scrollLeft&&(this._scrollingContainer.scrollLeft=this.state.scrollLeft),this._scrollingContainer.scrollTop!==this.state.scrollTop&&(this._scrollingContainer.scrollTop=this.state.scrollTop));var d=n>0&&s>0;l>=0&&d&&this._updateScrollLeftForScrollToColumn(),a>=0&&d&&this._updateScrollTopForScrollToRow(),this._invokeOnGridRenderedHelper(),this._invokeOnScrollMemoizer({scrollLeft:r||0,scrollTop:i||0,totalColumnsWidth:c.columnSizeAndPositionManager.getTotalSize(),totalRowsHeight:c.rowSizeAndPositionManager.getTotalSize()}),this._maybeCallOnScrollbarPresenceChange()}},{key:"componentDidUpdate",value:function(e,t){var n=this,r=this.props,l=r.autoHeight,i=r.autoWidth,a=r.columnCount,s=r.height,c=r.rowCount,u=r.scrollToAlignment,d=r.scrollToColumn,f=r.scrollToRow,h=r.width,g=this.state,v=g.scrollLeft,_=g.scrollPositionChangeReason,S=g.scrollTop,m=g.instanceProps;this._handleInvalidatedGridSize();var y=a>0&&e.columnCount===0||c>0&&e.rowCount===0;_===Ke&&(!i&&v>=0&&(v!==this._scrollingContainer.scrollLeft||y)&&(this._scrollingContainer.scrollLeft=v),!l&&S>=0&&(S!==this._scrollingContainer.scrollTop||y)&&(this._scrollingContainer.scrollTop=S));var w=(e.width===0||e.height===0)&&s>0&&h>0;if(this._recomputeScrollLeftFlag?(this._recomputeScrollLeftFlag=!1,this._updateScrollLeftForScrollToColumn(this.props)):Ve({cellSizeAndPositionManager:m.columnSizeAndPositionManager,previousCellsCount:e.columnCount,previousCellSize:e.columnWidth,previousScrollToAlignment:e.scrollToAlignment,previousScrollToIndex:e.scrollToColumn,previousSize:e.width,scrollOffset:v,scrollToAlignment:u,scrollToIndex:d,size:h,sizeJustIncreasedFromZero:w,updateScrollIndexCallback:function(){return n._updateScrollLeftForScrollToColumn(n.props)}}),this._recomputeScrollTopFlag?(this._recomputeScrollTopFlag=!1,this._updateScrollTopForScrollToRow(this.props)):Ve({cellSizeAndPositionManager:m.rowSizeAndPositionManager,previousCellsCount:e.rowCount,previousCellSize:e.rowHeight,previousScrollToAlignment:e.scrollToAlignment,previousScrollToIndex:e.scrollToRow,previousSize:e.height,scrollOffset:S,scrollToAlignment:u,scrollToIndex:f,size:s,sizeJustIncreasedFromZero:w,updateScrollIndexCallback:function(){return n._updateScrollTopForScrollToRow(n.props)}}),this._invokeOnGridRenderedHelper(),v!==t.scrollLeft||S!==t.scrollTop){var C=m.rowSizeAndPositionManager.getTotalSize(),R=m.columnSizeAndPositionManager.getTotalSize();this._invokeOnScrollMemoizer({scrollLeft:v,scrollTop:S,totalColumnsWidth:R,totalRowsHeight:C})}this._maybeCallOnScrollbarPresenceChange()}},{key:"componentWillUnmount",value:function(){this._disablePointerEventsTimeoutId&&te(this._disablePointerEventsTimeoutId)}},{key:"render",value:function(){var e=this.props,t=e.autoContainerWidth,n=e.autoHeight,r=e.autoWidth,l=e.className,i=e.containerProps,a=e.containerRole,s=e.containerStyle,c=e.height,u=e.id,d=e.noContentRenderer,f=e.role,h=e.style,g=e.tabIndex,v=e.width,_=this.state,S=_.instanceProps,m=_.needToResetStyleCache,y=this._isScrolling(),w={boxSizing:"border-box",direction:"ltr",height:n?"auto":c,position:"relative",width:r?"auto":v,WebkitOverflowScrolling:"touch",willChange:"transform"};m&&(this._styleCache={}),this.state.isScrolling||this._resetStyleCache(),this._calculateChildrenToRender(this.props,this.state);var C=S.columnSizeAndPositionManager.getTotalSize(),R=S.rowSizeAndPositionManager.getTotalSize(),z=R>c?S.scrollbarSize:0,b=C>v?S.scrollbarSize:0;b===this._horizontalScrollBarSize&&z===this._verticalScrollBarSize||(this._horizontalScrollBarSize=b,this._verticalScrollBarSize=z,this._scrollbarPresenceChanged=!0),w.overflowX=C+z<=v?"hidden":"auto",w.overflowY=R+b<=c?"hidden":"auto";var P=this._childrenToDisplay,k=P.length===0&&c>0&&v>0;return x.createElement("div",I._extends({ref:this._setScrollingContainerRef},i,{"aria-label":this.props["aria-label"],"aria-readonly":this.props["aria-readonly"],className:I.clsx("ReactVirtualized__Grid",l),id:u,onScroll:this._onScroll,role:f,style:F(F({},w),h),tabIndex:g}),P.length>0&&x.createElement("div",{className:"ReactVirtualized__Grid__innerScrollContainer",role:a,style:F({width:t?"auto":C,height:R,maxWidth:C,maxHeight:R,overflow:"hidden",pointerEvents:y?"none":"",position:"relative"},s)},P),k&&d())}},{key:"_calculateChildrenToRender",value:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.props,t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.state,n=e.cellRenderer,r=e.cellRangeRenderer,l=e.columnCount,i=e.deferredMeasurementCache,a=e.height,s=e.overscanColumnCount,c=e.overscanIndicesGetter,u=e.overscanRowCount,d=e.rowCount,f=e.width,h=e.isScrollingOptOut,g=t.scrollDirectionHorizontal,v=t.scrollDirectionVertical,_=t.instanceProps,S=this._initialScrollTop>0?this._initialScrollTop:t.scrollTop,m=this._initialScrollLeft>0?this._initialScrollLeft:t.scrollLeft,y=this._isScrolling(e,t);if(this._childrenToDisplay=[],a>0&&f>0){var w=_.columnSizeAndPositionManager.getVisibleCellRange({containerSize:f,offset:m}),C=_.rowSizeAndPositionManager.getVisibleCellRange({containerSize:a,offset:S}),R=_.columnSizeAndPositionManager.getOffsetAdjustment({containerSize:f,offset:m}),z=_.rowSizeAndPositionManager.getOffsetAdjustment({containerSize:a,offset:S});this._renderedColumnStartIndex=w.start,this._renderedColumnStopIndex=w.stop,this._renderedRowStartIndex=C.start,this._renderedRowStopIndex=C.stop;var b=c({direction:"horizontal",cellCount:l,overscanCellsCount:s,scrollDirection:g,startIndex:typeof w.start=="number"?w.start:0,stopIndex:typeof w.stop=="number"?w.stop:-1}),P=c({direction:"vertical",cellCount:d,overscanCellsCount:u,scrollDirection:v,startIndex:typeof C.start=="number"?C.start:0,stopIndex:typeof C.stop=="number"?C.stop:-1}),k=b.overscanStartIndex,T=b.overscanStopIndex,G=P.overscanStartIndex,M=P.overscanStopIndex;if(i){if(!i.hasFixedHeight()){for(var H=G;H<=M;H++)if(!i.has(H,0)){k=0,T=l-1;break}}if(!i.hasFixedWidth()){for(var Z=k;Z<=T;Z++)if(!i.has(0,Z)){G=0,M=d-1;break}}}this._childrenToDisplay=r({cellCache:this._cellCache,cellRenderer:n,columnSizeAndPositionManager:_.columnSizeAndPositionManager,columnStartIndex:k,columnStopIndex:T,deferredMeasurementCache:i,horizontalOffsetAdjustment:R,isScrolling:y,isScrollingOptOut:h,parent:this,rowSizeAndPositionManager:_.rowSizeAndPositionManager,rowStartIndex:G,rowStopIndex:M,scrollLeft:m,scrollTop:S,styleCache:this._styleCache,verticalOffsetAdjustment:z,visibleColumnIndices:w,visibleRowIndices:C}),this._columnStartIndex=k,this._columnStopIndex=T,this._rowStartIndex=G,this._rowStopIndex=M}}},{key:"_debounceScrollEnded",value:function(){var e=this.props.scrollingResetTimeInterval;this._disablePointerEventsTimeoutId&&te(this._disablePointerEventsTimeoutId),this._disablePointerEventsTimeoutId=Oe(this._debounceScrollEndedCallback,e)}},{key:"_handleInvalidatedGridSize",value:function(){if(typeof this._deferredInvalidateColumnIndex=="number"&&typeof this._deferredInvalidateRowIndex=="number"){var e=this._deferredInvalidateColumnIndex,t=this._deferredInvalidateRowIndex;this._deferredInvalidateColumnIndex=null,this._deferredInvalidateRowIndex=null,this.recomputeGridSize({columnIndex:e,rowIndex:t})}}},{key:"_invokeOnScrollMemoizer",value:function(e){var t=this,n=e.scrollLeft,r=e.scrollTop,l=e.totalColumnsWidth,i=e.totalRowsHeight;this._onScrollMemoizer({callback:function(a){var s=a.scrollLeft,c=a.scrollTop,u=t.props,d=u.height;(0,u.onScroll)({clientHeight:d,clientWidth:u.width,scrollHeight:i,scrollLeft:s,scrollTop:c,scrollWidth:l})},indices:{scrollLeft:n,scrollTop:r}})}},{key:"_isScrolling",value:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.props,t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.state;return Object.hasOwnProperty.call(e,"isScrolling")?!!e.isScrolling:!!t.isScrolling}},{key:"_maybeCallOnScrollbarPresenceChange",value:function(){if(this._scrollbarPresenceChanged){var e=this.props.onScrollbarPresenceChange;this._scrollbarPresenceChanged=!1,e({horizontal:this._horizontalScrollBarSize>0,size:this.state.instanceProps.scrollbarSize,vertical:this._verticalScrollBarSize>0})}}},{key:"scrollToPosition",value:function(e){var t=e.scrollLeft,n=e.scrollTop,r=o._getScrollToPositionStateUpdate({prevState:this.state,scrollLeft:t,scrollTop:n});r&&(r.needToResetStyleCache=!1,this.setState(r))}},{key:"_getCalculatedScrollLeft",value:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.props,t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.state;return o._getCalculatedScrollLeft(e,t)}},{key:"_updateScrollLeftForScrollToColumn",value:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.props,t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.state,n=o._getScrollLeftForScrollToColumnStateUpdate(e,t);n&&(n.needToResetStyleCache=!1,this.setState(n))}},{key:"_getCalculatedScrollTop",value:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.props,t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.state;return o._getCalculatedScrollTop(e,t)}},{key:"_resetStyleCache",value:function(){var e=this._styleCache,t=this._cellCache,n=this.props.isScrollingOptOut;this._cellCache={},this._styleCache={};for(var r=this._rowStartIndex;r<=this._rowStopIndex;r++)for(var l=this._columnStartIndex;l<=this._columnStopIndex;l++){var i="".concat(r,"-").concat(l);this._styleCache[i]=e[i],n&&(this._cellCache[i]=t[i])}}},{key:"_updateScrollTopForScrollToRow",value:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.props,t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.state,n=o._getScrollTopForScrollToRowStateUpdate(e,t);n&&(n.needToResetStyleCache=!1,this.setState(n))}}],[{key:"getDerivedStateFromProps",value:function(e,t){var n={};e.columnCount===0&&t.scrollLeft!==0||e.rowCount===0&&t.scrollTop!==0?(n.scrollLeft=0,n.scrollTop=0):(e.scrollLeft!==t.scrollLeft&&e.scrollToColumn<0||e.scrollTop!==t.scrollTop&&e.scrollToRow<0)&&Object.assign(n,o._getScrollToPositionStateUpdate({prevState:t,scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}));var r,l,i=t.instanceProps;return n.needToResetStyleCache=!1,e.columnWidth===i.prevColumnWidth&&e.rowHeight===i.prevRowHeight||(n.needToResetStyleCache=!0),i.columnSizeAndPositionManager.configure({cellCount:e.columnCount,estimatedCellSize:o._getEstimatedColumnSize(e),cellSizeGetter:o._wrapSizeGetter(e.columnWidth)}),i.rowSizeAndPositionManager.configure({cellCount:e.rowCount,estimatedCellSize:o._getEstimatedRowSize(e),cellSizeGetter:o._wrapSizeGetter(e.rowHeight)}),i.prevColumnCount!==0&&i.prevRowCount!==0||(i.prevColumnCount=0,i.prevRowCount=0),e.autoHeight&&e.isScrolling===!1&&i.prevIsScrolling===!0&&Object.assign(n,{isScrolling:!1}),Be({cellCount:i.prevColumnCount,cellSize:typeof i.prevColumnWidth=="number"?i.prevColumnWidth:null,computeMetadataCallback:function(){return i.columnSizeAndPositionManager.resetCell(0)},computeMetadataCallbackProps:e,nextCellsCount:e.columnCount,nextCellSize:typeof e.columnWidth=="number"?e.columnWidth:null,nextScrollToIndex:e.scrollToColumn,scrollToIndex:i.prevScrollToColumn,updateScrollOffsetForScrollToIndex:function(){r=o._getScrollLeftForScrollToColumnStateUpdate(e,t)}}),Be({cellCount:i.prevRowCount,cellSize:typeof i.prevRowHeight=="number"?i.prevRowHeight:null,computeMetadataCallback:function(){return i.rowSizeAndPositionManager.resetCell(0)},computeMetadataCallbackProps:e,nextCellsCount:e.rowCount,nextCellSize:typeof e.rowHeight=="number"?e.rowHeight:null,nextScrollToIndex:e.scrollToRow,scrollToIndex:i.prevScrollToRow,updateScrollOffsetForScrollToIndex:function(){l=o._getScrollTopForScrollToRowStateUpdate(e,t)}}),i.prevColumnCount=e.columnCount,i.prevColumnWidth=e.columnWidth,i.prevIsScrolling=e.isScrolling===!0,i.prevRowCount=e.rowCount,i.prevRowHeight=e.rowHeight,i.prevScrollToColumn=e.scrollToColumn,i.prevScrollToRow=e.scrollToRow,i.scrollbarSize=e.getScrollbarSize(),i.scrollbarSize===void 0?(i.scrollbarSizeMeasured=!1,i.scrollbarSize=0):i.scrollbarSizeMeasured=!0,n.instanceProps=i,F(F(F({},n),r),l)}},{key:"_getEstimatedColumnSize",value:function(e){return typeof e.columnWidth=="number"?e.columnWidth:e.estimatedColumnSize}},{key:"_getEstimatedRowSize",value:function(e){return typeof e.rowHeight=="number"?e.rowHeight:e.estimatedRowSize}},{key:"_getScrollToPositionStateUpdate",value:function(e){var t=e.prevState,n=e.scrollLeft,r=e.scrollTop,l={scrollPositionChangeReason:Ke};return typeof n=="number"&&n>=0&&(l.scrollDirectionHorizontal=n>t.scrollLeft?1:-1,l.scrollLeft=n),typeof r=="number"&&r>=0&&(l.scrollDirectionVertical=r>t.scrollTop?1:-1,l.scrollTop=r),typeof n=="number"&&n>=0&&n!==t.scrollLeft||typeof r=="number"&&r>=0&&r!==t.scrollTop?l:{}}},{key:"_wrapSizeGetter",value:function(e){return typeof e=="function"?e:function(){return e}}},{key:"_getCalculatedScrollLeft",value:function(e,t){var n=e.columnCount,r=e.height,l=e.scrollToAlignment,i=e.scrollToColumn,a=e.width,s=t.scrollLeft,c=t.instanceProps;if(n>0){var u=n-1,d=i<0?u:Math.min(u,i),f=c.rowSizeAndPositionManager.getTotalSize(),h=c.scrollbarSizeMeasured&&f>r?c.scrollbarSize:0;return c.columnSizeAndPositionManager.getUpdatedOffsetForIndex({align:l,containerSize:a-h,currentOffset:s,targetIndex:d})}return 0}},{key:"_getScrollLeftForScrollToColumnStateUpdate",value:function(e,t){var n=t.scrollLeft,r=o._getCalculatedScrollLeft(e,t);return typeof r=="number"&&r>=0&&n!==r?o._getScrollToPositionStateUpdate({prevState:t,scrollLeft:r,scrollTop:-1}):{}}},{key:"_getCalculatedScrollTop",value:function(e,t){var n=e.height,r=e.rowCount,l=e.scrollToAlignment,i=e.scrollToRow,a=e.width,s=t.scrollTop,c=t.instanceProps;if(r>0){var u=r-1,d=i<0?u:Math.min(u,i),f=c.columnSizeAndPositionManager.getTotalSize(),h=c.scrollbarSizeMeasured&&f>a?c.scrollbarSize:0;return c.rowSizeAndPositionManager.getUpdatedOffsetForIndex({align:l,containerSize:n-h,currentOffset:s,targetIndex:d})}return 0}},{key:"_getScrollTopForScrollToRowStateUpdate",value:function(e,t){var n=t.scrollTop,r=o._getCalculatedScrollTop(e,t);return typeof r=="number"&&r>=0&&n!==r?o._getScrollToPositionStateUpdate({prevState:t,scrollLeft:-1,scrollTop:r}):{}}}])}();p($,"defaultProps",{"aria-label":"grid","aria-readonly":!0,autoContainerWidth:!1,autoHeight:!1,autoWidth:!1,cellRangeRenderer:function(o){for(var e=o.cellCache,t=o.cellRenderer,n=o.columnSizeAndPositionManager,r=o.columnStartIndex,l=o.columnStopIndex,i=o.deferredMeasurementCache,a=o.horizontalOffsetAdjustment,s=o.isScrolling,c=o.isScrollingOptOut,u=o.parent,d=o.rowSizeAndPositionManager,f=o.rowStartIndex,h=o.rowStopIndex,g=o.styleCache,v=o.verticalOffsetAdjustment,_=o.visibleColumnIndices,S=o.visibleRowIndices,m=[],y=n.areOffsetsAdjusted()||d.areOffsetsAdjusted(),w=!s&&!y,C=f;C<=h;C++)for(var R=d.getSizeAndPositionOfCell(C),z=r;z<=l;z++){var b=n.getSizeAndPositionOfCell(z),P=z>=_.start&&z<=_.stop&&C>=S.start&&C<=S.stop,k="".concat(C,"-").concat(z),T=void 0;w&&g[k]?T=g[k]:i&&!i.has(C,z)?T={height:"auto",left:0,position:"absolute",top:0,width:"auto"}:(T={height:R.size,left:b.offset+a,position:"absolute",top:R.offset+v,width:b.size},g[k]=T);var G={columnIndex:z,isScrolling:s,isVisible:P,key:k,parent:u,rowIndex:C,style:T},M=void 0;!c&&!s||a||v?M=t(G):(e[k]||(e[k]=t(G)),M=e[k]),M!=null&&M!==!1&&(M.props.role||(M=U.cloneElement(M,{role:"gridcell"})),m.push(M))}return m},containerRole:"row",containerStyle:{},estimatedColumnSize:100,estimatedRowSize:30,getScrollbarSize:Ce,noContentRenderer:function(){return null},onScroll:function(){},onScrollbarPresenceChange:function(){},onSectionRendered:function(){},overscanColumnCount:0,overscanIndicesGetter:function(o){var e=o.cellCount,t=o.overscanCellsCount,n=o.scrollDirection,r=o.startIndex,l=o.stopIndex;return n===1?{overscanStartIndex:Math.max(0,r),overscanStopIndex:Math.min(e-1,l+t)}:{overscanStartIndex:Math.max(0,r-t),overscanStopIndex:Math.min(e-1,l)}},overscanRowCount:10,role:"grid",scrollingResetTimeInterval:150,scrollToAlignment:"auto",scrollToColumn:-1,scrollToRow:-1,style:{},tabIndex:0,isScrollingOptOut:!1}),ue($);function Tt(o){var e=o.cellCount,t=o.overscanCellsCount,n=o.scrollDirection,r=o.startIndex,l=o.stopIndex;return t=Math.max(1,t),n===1?{overscanStartIndex:Math.max(0,r-1),overscanStopIndex:Math.min(e-1,l+t)}:{overscanStartIndex:Math.max(0,r-t),overscanStopIndex:Math.min(e-1,l+1)}}function xe(o,e){(e==null||e>o.length)&&(e=o.length);for(var t=0,n=Array(e);t<e;t++)n[t]=o[t];return n}function zt(o,e){if(o){if(typeof o=="string")return xe(o,e);var t={}.toString.call(o).slice(8,-1);return t==="Object"&&o.constructor&&(t=o.constructor.name),t==="Map"||t==="Set"?Array.from(o):t==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?xe(o,e):void 0}}function ao(o){return function(e){if(Array.isArray(e))return xe(e)}(o)||function(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}(o)||zt(o)||function(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
16
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function It(){try{var o=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(It=function(){return!!o})()}var Xe=function(){function o(e,t){var n,r,l,i;return E(this,o),r=this,i=[e,t],l=O(l=o),(n=D(r,It()?Reflect.construct(l,i||[],O(r).constructor):l.apply(r,i)))._loadMoreRowsMemoizer=ee(),n._onRowsRendered=n._onRowsRendered.bind(n),n._registerChild=n._registerChild.bind(n),n}return j(o,x.PureComponent),W(o,[{key:"resetLoadMoreRowsCache",value:function(e){this._loadMoreRowsMemoizer=ee(),e&&this._doStuff(this._lastRenderedStartIndex,this._lastRenderedStopIndex)}},{key:"render",value:function(){return(0,this.props.children)({onRowsRendered:this._onRowsRendered,registerChild:this._registerChild})}},{key:"_loadUnloadedRanges",value:function(e){var t=this,n=this.props.loadMoreRows;e.forEach(function(r){var l=n(r);l&&l.then(function(){var i,a,s,c,u;i={lastRenderedStartIndex:t._lastRenderedStartIndex,lastRenderedStopIndex:t._lastRenderedStopIndex,startIndex:r.startIndex,stopIndex:r.stopIndex},a=i.lastRenderedStartIndex,s=i.lastRenderedStopIndex,c=i.startIndex,u=i.stopIndex,c>s||u<a||t._registeredChild&&function(d){var f=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,h=typeof d.recomputeGridSize=="function"?d.recomputeGridSize:d.recomputeRowHeights;h?h.call(d,f):d.forceUpdate()}(t._registeredChild,t._lastRenderedStartIndex)})})}},{key:"_onRowsRendered",value:function(e){var t=e.startIndex,n=e.stopIndex;this._lastRenderedStartIndex=t,this._lastRenderedStopIndex=n,this._doStuff(t,n)}},{key:"_doStuff",value:function(e,t){var n,r=this,l=this.props,i=l.isRowLoaded,a=l.minimumBatchSize,s=l.rowCount,c=l.threshold,u=function(f){for(var h=f.isRowLoaded,g=f.minimumBatchSize,v=f.rowCount,_=f.startIndex,S=f.stopIndex,m=[],y=null,w=null,C=_;C<=S;C++)h({index:C})?w!==null&&(m.push({startIndex:y,stopIndex:w}),y=w=null):(w=C,y===null&&(y=C));if(w!==null){for(var R=Math.min(Math.max(w,y+g-1),v-1),z=w+1;z<=R&&!h({index:z});z++)w=z;m.push({startIndex:y,stopIndex:w})}if(m.length)for(var b=m[0];b.stopIndex-b.startIndex+1<g&&b.startIndex>0;){var P=b.startIndex-1;if(h({index:P}))break;b.startIndex=P}return m}({isRowLoaded:i,minimumBatchSize:a,rowCount:s,startIndex:Math.max(0,e-c),stopIndex:Math.min(s-1,t+c)}),d=(n=[]).concat.apply(n,ao(u.map(function(f){return[f.startIndex,f.stopIndex]})));this._loadMoreRowsMemoizer({callback:function(){r._loadUnloadedRanges(u)},indices:{squashedUnloadedRanges:d}})}},{key:"_registerChild",value:function(e){this._registeredChild=e}}])}();function Pt(){try{var o=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(Pt=function(){return!!o})()}p(Xe,"defaultProps",{minimumBatchSize:10,rowCount:0,threshold:15}),Xe.propTypes={};var co=function(){function o(){var e,t,n,r;E(this,o);for(var l=arguments.length,i=new Array(l),a=0;a<l;a++)i[a]=arguments[a];return t=this,n=o,r=[].concat(i),n=O(n),p(e=D(t,Pt()?Reflect.construct(n,r||[],O(t).constructor):n.apply(t,r)),"Grid",void 0),p(e,"_cellRenderer",function(s){var c=s.parent,u=s.rowIndex,d=s.style,f=s.isScrolling,h=s.isVisible,g=s.key,v=e.props.rowRenderer,_=Object.getOwnPropertyDescriptor(d,"width");return _&&_.writable&&(d.width="100%"),v({index:u,style:d,isScrolling:f,isVisible:h,key:g,parent:c})}),p(e,"_setRef",function(s){e.Grid=s}),p(e,"_onScroll",function(s){var c=s.clientHeight,u=s.scrollHeight,d=s.scrollTop;(0,e.props.onScroll)({clientHeight:c,scrollHeight:u,scrollTop:d})}),p(e,"_onSectionRendered",function(s){var c=s.rowOverscanStartIndex,u=s.rowOverscanStopIndex,d=s.rowStartIndex,f=s.rowStopIndex;(0,e.props.onRowsRendered)({overscanStartIndex:c,overscanStopIndex:u,startIndex:d,stopIndex:f})}),e}return j(o,x.PureComponent),W(o,[{key:"forceUpdateGrid",value:function(){this.Grid&&this.Grid.forceUpdate()}},{key:"getOffsetForRow",value:function(e){var t=e.alignment,n=e.index;return this.Grid?this.Grid.getOffsetForCell({alignment:t,rowIndex:n,columnIndex:0}).scrollTop:0}},{key:"invalidateCellSizeAfterRender",value:function(e){var t=e.columnIndex,n=e.rowIndex;this.Grid&&this.Grid.invalidateCellSizeAfterRender({rowIndex:n,columnIndex:t})}},{key:"measureAllRows",value:function(){this.Grid&&this.Grid.measureAllCells()}},{key:"recomputeGridSize",value:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=e.columnIndex,n=t===void 0?0:t,r=e.rowIndex,l=r===void 0?0:r;this.Grid&&this.Grid.recomputeGridSize({rowIndex:l,columnIndex:n})}},{key:"recomputeRowHeights",value:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0;this.Grid&&this.Grid.recomputeGridSize({rowIndex:e,columnIndex:0})}},{key:"scrollToPosition",value:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0;this.Grid&&this.Grid.scrollToPosition({scrollTop:e})}},{key:"scrollToRow",value:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0;this.Grid&&this.Grid.scrollToCell({columnIndex:0,rowIndex:e})}},{key:"render",value:function(){var e=this.props,t=e.className,n=e.noRowsRenderer,r=e.scrollToIndex,l=e.width,i=I.clsx("ReactVirtualized__List",t);return x.createElement($,I._extends({},this.props,{autoContainerWidth:!0,cellRenderer:this._cellRenderer,className:i,columnWidth:l,columnCount:1,noContentRenderer:n,onScroll:this._onScroll,onSectionRendered:this._onSectionRendered,ref:this._setRef,scrollToRow:r}))}}])}();function uo(o,e){return function(t){if(Array.isArray(t))return t}(o)||function(t,n){var r=t==null?null:typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(r!=null){var l,i,a,s,c=[],u=!0,d=!1;try{if(a=(r=r.call(t)).next,n!==0)for(;!(u=(l=a.call(r)).done)&&(c.push(l.value),c.length!==n);u=!0);}catch(f){d=!0,i=f}finally{try{if(!u&&r.return!=null&&(s=r.return(),Object(s)!==s))return}finally{if(d)throw i}}return c}}(o,e)||zt(o,e)||function(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
17
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}p(co,"defaultProps",{autoHeight:!1,estimatedRowSize:30,onScroll:function(){},noRowsRenderer:function(){return null},onRowsRendered:function(){},overscanIndicesGetter:Tt,overscanRowCount:10,scrollToAlignment:"auto",scrollToIndex:-1,style:{}});const fe={ge:function(o,e,t,n,r){return typeof t=="function"?function(l,i,a,s,c){for(var u=a+1;i<=a;){var d=i+a>>>1;c(l[d],s)>=0?(u=d,a=d-1):i=d+1}return u}(o,n===void 0?0:0|n,r===void 0?o.length-1:0|r,e,t):function(l,i,a,s){for(var c=a+1;i<=a;){var u=i+a>>>1;l[u]>=s?(c=u,a=u-1):i=u+1}return c}(o,t===void 0?0:0|t,n===void 0?o.length-1:0|n,e)},gt:function(o,e,t,n,r){return typeof t=="function"?function(l,i,a,s,c){for(var u=a+1;i<=a;){var d=i+a>>>1;c(l[d],s)>0?(u=d,a=d-1):i=d+1}return u}(o,n===void 0?0:0|n,r===void 0?o.length-1:0|r,e,t):function(l,i,a,s){for(var c=a+1;i<=a;){var u=i+a>>>1;l[u]>s?(c=u,a=u-1):i=u+1}return c}(o,t===void 0?0:0|t,n===void 0?o.length-1:0|n,e)},lt:function(o,e,t,n,r){return typeof t=="function"?function(l,i,a,s,c){for(var u=i-1;i<=a;){var d=i+a>>>1;c(l[d],s)<0?(u=d,i=d+1):a=d-1}return u}(o,n===void 0?0:0|n,r===void 0?o.length-1:0|r,e,t):function(l,i,a,s){for(var c=i-1;i<=a;){var u=i+a>>>1;l[u]<s?(c=u,i=u+1):a=u-1}return c}(o,t===void 0?0:0|t,n===void 0?o.length-1:0|n,e)},le:function(o,e,t,n,r){return typeof t=="function"?function(l,i,a,s,c){for(var u=i-1;i<=a;){var d=i+a>>>1;c(l[d],s)<=0?(u=d,i=d+1):a=d-1}return u}(o,n===void 0?0:0|n,r===void 0?o.length-1:0|r,e,t):function(l,i,a,s){for(var c=i-1;i<=a;){var u=i+a>>>1;l[u]<=s?(c=u,i=u+1):a=u-1}return c}(o,t===void 0?0:0|t,n===void 0?o.length-1:0|n,e)},eq:function(o,e,t,n,r){return typeof t=="function"?function(l,i,a,s,c){for(;i<=a;){var u=i+a>>>1,d=c(l[u],s);if(d===0)return u;d<=0?i=u+1:a=u-1}return-1}(o,n===void 0?0:0|n,r===void 0?o.length-1:0|r,e,t):function(l,i,a,s){for(;i<=a;){var c=i+a>>>1,u=l[c];if(u===s)return c;u<=s?i=c+1:a=c-1}return-1}(o,t===void 0?0:0|t,n===void 0?o.length-1:0|n,e)}};function ke(o,e,t,n,r){this.mid=o,this.left=e,this.right=t,this.leftPoints=n,this.rightPoints=r,this.count=(e?e.count:0)+(t?t.count:0)+n.length}var ne=ke.prototype;function _e(o,e){o.mid=e.mid,o.left=e.left,o.right=e.right,o.leftPoints=e.leftPoints,o.rightPoints=e.rightPoints,o.count=e.count}function Ot(o,e){var t=ae(e);o.mid=t.mid,o.left=t.left,o.right=t.right,o.leftPoints=t.leftPoints,o.rightPoints=t.rightPoints,o.count=t.count}function Ye(o,e){var t=o.intervals([]);t.push(e),Ot(o,t)}function Je(o,e){var t=o.intervals([]),n=t.indexOf(e);return n<0?0:(t.splice(n,1),Ot(o,t),1)}function Ze(o,e,t){for(var n=0;n<o.length&&o[n][0]<=e;++n){var r=t(o[n]);if(r)return r}}function Qe(o,e,t){for(var n=o.length-1;n>=0&&o[n][1]>=e;--n){var r=t(o[n]);if(r)return r}}function et(o,e){for(var t=0;t<o.length;++t){var n=e(o[t]);if(n)return n}}function ho(o,e){return o-e}function Re(o,e){var t=o[0]-e[0];return t||o[1]-e[1]}function be(o,e){var t=o[1]-e[1];return t||o[0]-e[0]}function ae(o){if(o.length===0)return null;for(var e=[],t=0;t<o.length;++t)e.push(o[t][0],o[t][1]);e.sort(ho);var n=e[e.length>>1],r=[],l=[],i=[];for(t=0;t<o.length;++t){var a=o[t];a[1]<n?r.push(a):n<a[0]?l.push(a):i.push(a)}var s=i,c=i.slice();return s.sort(Re),c.sort(be),new ke(n,ae(r),ae(l),s,c)}function kt(o){this.root=o}ne.intervals=function(o){return o.push.apply(o,this.leftPoints),this.left&&this.left.intervals(o),this.right&&this.right.intervals(o),o},ne.insert=function(o){var e=this.count-this.leftPoints.length;if(this.count+=1,o[1]<this.mid)this.left?4*(this.left.count+1)>3*(e+1)?Ye(this,o):this.left.insert(o):this.left=ae([o]);else if(o[0]>this.mid)this.right?4*(this.right.count+1)>3*(e+1)?Ye(this,o):this.right.insert(o):this.right=ae([o]);else{var t=fe.ge(this.leftPoints,o,Re),n=fe.ge(this.rightPoints,o,be);this.leftPoints.splice(t,0,o),this.rightPoints.splice(n,0,o)}},ne.remove=function(o){var e=this.count-this.leftPoints;if(o[1]<this.mid)return this.left?4*(this.right?this.right.count:0)>3*(e-1)?Je(this,o):(l=this.left.remove(o))===2?(this.left=null,this.count-=1,1):(l===1&&(this.count-=1),l):0;if(o[0]>this.mid)return this.right?4*(this.left?this.left.count:0)>3*(e-1)?Je(this,o):(l=this.right.remove(o))===2?(this.right=null,this.count-=1,1):(l===1&&(this.count-=1),l):0;if(this.count===1)return this.leftPoints[0]===o?2:0;if(this.leftPoints.length===1&&this.leftPoints[0]===o){if(this.left&&this.right){for(var t=this,n=this.left;n.right;)t=n,n=n.right;if(t===this)n.right=this.right;else{var r=this.left,l=this.right;t.count-=n.count,t.right=n.left,n.left=r,n.right=l}_e(this,n),this.count=(this.left?this.left.count:0)+(this.right?this.right.count:0)+this.leftPoints.length}else this.left?_e(this,this.left):_e(this,this.right);return 1}for(r=fe.ge(this.leftPoints,o,Re);r<this.leftPoints.length&&this.leftPoints[r][0]===o[0];++r)if(this.leftPoints[r]===o){for(this.count-=1,this.leftPoints.splice(r,1),l=fe.ge(this.rightPoints,o,be);l<this.rightPoints.length&&this.rightPoints[l][1]===o[1];++l)if(this.rightPoints[l]===o)return this.rightPoints.splice(l,1),1}return 0},ne.queryPoint=function(o,e){if(o<this.mid)return this.left&&(t=this.left.queryPoint(o,e))?t:Ze(this.leftPoints,o,e);if(o>this.mid){var t;return this.right&&(t=this.right.queryPoint(o,e))?t:Qe(this.rightPoints,o,e)}return et(this.leftPoints,e)},ne.queryInterval=function(o,e,t){var n;return o<this.mid&&this.left&&(n=this.left.queryInterval(o,e,t))||e>this.mid&&this.right&&(n=this.right.queryInterval(o,e,t))?n:e<this.mid?Ze(this.leftPoints,e,t):o>this.mid?Qe(this.rightPoints,o,t):et(this.leftPoints,t)};var Q=kt.prototype;Q.insert=function(o){this.root?this.root.insert(o):this.root=new ke(o[0],null,null,[o],[o])},Q.remove=function(o){if(this.root){var e=this.root.remove(o);return e===2&&(this.root=null),e!==0}return!1},Q.queryPoint=function(o,e){if(this.root)return this.root.queryPoint(o,e)},Q.queryInterval=function(o,e,t){if(o<=e&&this.root)return this.root.queryInterval(o,e,t)},Object.defineProperty(Q,"count",{get:function(){return this.root?this.root.count:0}}),Object.defineProperty(Q,"intervals",{get:function(){return this.root?this.root.intervals([]):[]}});var Se=function(){return W(function o(){E(this,o),p(this,"_columnSizeMap",{}),p(this,"_intervalTree",new kt(null)),p(this,"_leftMap",{})},[{key:"estimateTotalHeight",value:function(o,e,t){var n=o-this.count;return this.tallestColumnSize+Math.ceil(n/e)*t}},{key:"range",value:function(o,e,t){var n=this;this._intervalTree.queryInterval(o,o+e,function(r){var l=uo(r,3),i=l[0];l[1];var a=l[2];return t(a,n._leftMap[a],i)})}},{key:"setPosition",value:function(o,e,t,n){this._intervalTree.insert([t,t+n,o]),this._leftMap[o]=e;var r=this._columnSizeMap,l=r[e];r[e]=l===void 0?t+n:Math.max(l,t+n)}},{key:"count",get:function(){return this._intervalTree.count}},{key:"shortestColumnSize",get:function(){var o=this._columnSizeMap,e=0;for(var t in o){var n=o[t];e=e===0?n:Math.min(e,n)}return e}},{key:"tallestColumnSize",get:function(){var o=this._columnSizeMap,e=0;for(var t in o){var n=o[t];e=Math.max(e,n)}return e}}])}();function tt(o,e){var t=Object.keys(o);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(o);e&&(n=n.filter(function(r){return Object.getOwnPropertyDescriptor(o,r).enumerable})),t.push.apply(t,n)}return t}function fo(o){for(var e=1;e<arguments.length;e++){var t=arguments[e]!=null?arguments[e]:{};e%2?tt(Object(t),!0).forEach(function(n){p(o,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(o,Object.getOwnPropertyDescriptors(t)):tt(Object(t)).forEach(function(n){Object.defineProperty(o,n,Object.getOwnPropertyDescriptor(t,n))})}return o}function Mt(){try{var o=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(Mt=function(){return!!o})()}var ot=function(){function o(){var e,t,n,r;E(this,o);for(var l=arguments.length,i=new Array(l),a=0;a<l;a++)i[a]=arguments[a];return t=this,n=o,r=[].concat(i),n=O(n),p(e=D(t,Mt()?Reflect.construct(n,r||[],O(t).constructor):n.apply(t,r)),"state",{isScrolling:!1,scrollTop:0}),p(e,"_debounceResetIsScrollingId",void 0),p(e,"_invalidateOnUpdateStartIndex",null),p(e,"_invalidateOnUpdateStopIndex",null),p(e,"_positionCache",new Se),p(e,"_startIndex",null),p(e,"_startIndexMemoized",null),p(e,"_stopIndex",null),p(e,"_stopIndexMemoized",null),p(e,"_debounceResetIsScrollingCallback",function(){e.setState({isScrolling:!1})}),p(e,"_setScrollingContainerRef",function(s){e._scrollingContainer=s}),p(e,"_onScroll",function(s){var c=e.props.height,u=s.currentTarget.scrollTop,d=Math.min(Math.max(0,e._getEstimatedTotalHeight()-c),u);u===d&&(e._debounceResetIsScrolling(),e.state.scrollTop!==d&&e.setState({isScrolling:!0,scrollTop:d}))}),e}return j(o,x.PureComponent),W(o,[{key:"clearCellPositions",value:function(){this._positionCache=new Se,this.forceUpdate()}},{key:"invalidateCellSizeAfterRender",value:function(e){var t=e.rowIndex;this._invalidateOnUpdateStartIndex===null?(this._invalidateOnUpdateStartIndex=t,this._invalidateOnUpdateStopIndex=t):(this._invalidateOnUpdateStartIndex=Math.min(this._invalidateOnUpdateStartIndex,t),this._invalidateOnUpdateStopIndex=Math.max(this._invalidateOnUpdateStopIndex,t))}},{key:"recomputeCellPositions",value:function(){var e=this._positionCache.count-1;this._positionCache=new Se,this._populatePositionCache(0,e),this.forceUpdate()}},{key:"componentDidMount",value:function(){this._checkInvalidateOnUpdate(),this._invokeOnScrollCallback(),this._invokeOnCellsRenderedCallback()}},{key:"componentDidUpdate",value:function(e,t){this._checkInvalidateOnUpdate(),this._invokeOnScrollCallback(),this._invokeOnCellsRenderedCallback(),this.props.scrollTop!==e.scrollTop&&this._debounceResetIsScrolling()}},{key:"componentWillUnmount",value:function(){this._debounceResetIsScrollingId&&te(this._debounceResetIsScrollingId)}},{key:"render",value:function(){var e,t=this,n=this.props,r=n.autoHeight,l=n.cellCount,i=n.cellMeasurerCache,a=n.cellRenderer,s=n.className,c=n.height,u=n.id,d=n.keyMapper,f=n.overscanByPixels,h=n.role,g=n.style,v=n.tabIndex,_=n.width,S=n.rowDirection,m=this.state,y=m.isScrolling,w=m.scrollTop,C=[],R=this._getEstimatedTotalHeight(),z=this._positionCache.shortestColumnSize,b=this._positionCache.count,P=0;if(this._positionCache.range(Math.max(0,w-f),c+2*f,function(G,M,H){e===void 0?(P=G,e=G):(P=Math.min(P,G),e=Math.max(e,G)),C.push(a({index:G,isScrolling:y,key:d(G),parent:t,style:p(p(p(p({height:i.getHeight(G)},S==="ltr"?"left":"right",M),"position","absolute"),"top",H),"width",i.getWidth(G))}))}),z<w+c+f&&b<l)for(var k=Math.min(l-b,Math.ceil((w+c+f-z)/i.defaultHeight*_/i.defaultWidth)),T=b;T<b+k;T++)e=T,C.push(a({index:T,isScrolling:y,key:d(T),parent:this,style:{width:i.getWidth(T)}}));return this._startIndex=P,this._stopIndex=e,x.createElement("div",{ref:this._setScrollingContainerRef,"aria-label":this.props["aria-label"],className:I.clsx("ReactVirtualized__Masonry",s),id:u,onScroll:this._onScroll,role:h,style:fo({boxSizing:"border-box",direction:"ltr",height:r?"auto":c,overflowX:"hidden",overflowY:R<c?"hidden":"auto",position:"relative",width:_,WebkitOverflowScrolling:"touch",willChange:"transform"},g),tabIndex:v},x.createElement("div",{className:"ReactVirtualized__Masonry__innerScrollContainer",style:{width:"100%",height:R,maxWidth:"100%",maxHeight:R,overflow:"hidden",pointerEvents:y?"none":"",position:"relative"}},C))}},{key:"_checkInvalidateOnUpdate",value:function(){if(typeof this._invalidateOnUpdateStartIndex=="number"){var e=this._invalidateOnUpdateStartIndex,t=this._invalidateOnUpdateStopIndex;this._invalidateOnUpdateStartIndex=null,this._invalidateOnUpdateStopIndex=null,this._populatePositionCache(e,t),this.forceUpdate()}}},{key:"_debounceResetIsScrolling",value:function(){var e=this.props.scrollingResetTimeInterval;this._debounceResetIsScrollingId&&te(this._debounceResetIsScrollingId),this._debounceResetIsScrollingId=Oe(this._debounceResetIsScrollingCallback,e)}},{key:"_getEstimatedTotalHeight",value:function(){var e=this.props,t=e.cellCount,n=e.cellMeasurerCache,r=e.width,l=Math.max(1,Math.floor(r/n.defaultWidth));return this._positionCache.estimateTotalHeight(t,l,n.defaultHeight)}},{key:"_invokeOnScrollCallback",value:function(){var e=this.props,t=e.height,n=e.onScroll,r=this.state.scrollTop;this._onScrollMemoized!==r&&(n({clientHeight:t,scrollHeight:this._getEstimatedTotalHeight(),scrollTop:r}),this._onScrollMemoized=r)}},{key:"_invokeOnCellsRenderedCallback",value:function(){this._startIndexMemoized===this._startIndex&&this._stopIndexMemoized===this._stopIndex||((0,this.props.onCellsRendered)({startIndex:this._startIndex,stopIndex:this._stopIndex}),this._startIndexMemoized=this._startIndex,this._stopIndexMemoized=this._stopIndex)}},{key:"_populatePositionCache",value:function(e,t){for(var n=this.props,r=n.cellMeasurerCache,l=n.cellPositioner,i=e;i<=t;i++){var a=l(i),s=a.left,c=a.top;this._positionCache.setPosition(i,s,c,r.getHeight(i))}}}],[{key:"getDerivedStateFromProps",value:function(e,t){return e.scrollTop!==void 0&&t.scrollTop!==e.scrollTop?{isScrolling:!0,scrollTop:e.scrollTop}:null}}])}();function nt(){}p(ot,"defaultProps",{autoHeight:!1,keyMapper:function(o){return o},onCellsRendered:nt,onScroll:nt,overscanByPixels:20,role:"grid",scrollingResetTimeInterval:150,style:{},tabIndex:0,rowDirection:"ltr"}),ue(ot);var ye=function(){return W(function o(){var e=this,t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};E(this,o),p(this,"_cellMeasurerCache",void 0),p(this,"_columnIndexOffset",void 0),p(this,"_rowIndexOffset",void 0),p(this,"columnWidth",function(s){var c=s.index;e._cellMeasurerCache.columnWidth({index:c+e._columnIndexOffset})}),p(this,"rowHeight",function(s){var c=s.index;e._cellMeasurerCache.rowHeight({index:c+e._rowIndexOffset})});var n=t.cellMeasurerCache,r=t.columnIndexOffset,l=r===void 0?0:r,i=t.rowIndexOffset,a=i===void 0?0:i;this._cellMeasurerCache=n,this._columnIndexOffset=l,this._rowIndexOffset=a},[{key:"clear",value:function(o,e){this._cellMeasurerCache.clear(o+this._rowIndexOffset,e+this._columnIndexOffset)}},{key:"clearAll",value:function(){this._cellMeasurerCache.clearAll()}},{key:"defaultHeight",get:function(){return this._cellMeasurerCache.defaultHeight}},{key:"defaultWidth",get:function(){return this._cellMeasurerCache.defaultWidth}},{key:"hasFixedHeight",value:function(){return this._cellMeasurerCache.hasFixedHeight()}},{key:"hasFixedWidth",value:function(){return this._cellMeasurerCache.hasFixedWidth()}},{key:"getHeight",value:function(o){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return this._cellMeasurerCache.getHeight(o+this._rowIndexOffset,e+this._columnIndexOffset)}},{key:"getWidth",value:function(o){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return this._cellMeasurerCache.getWidth(o+this._rowIndexOffset,e+this._columnIndexOffset)}},{key:"has",value:function(o){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return this._cellMeasurerCache.has(o+this._rowIndexOffset,e+this._columnIndexOffset)}},{key:"set",value:function(o,e,t,n){this._cellMeasurerCache.set(o+this._rowIndexOffset,e+this._columnIndexOffset,t,n)}}])}(),po=["rowIndex"],mo=["columnIndex","rowIndex"],go=["columnIndex"],vo=["onScroll","onSectionRendered","onScrollbarPresenceChange","scrollLeft","scrollToColumn","scrollTop","scrollToRow"];function rt(o,e){var t=Object.keys(o);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(o);e&&(n=n.filter(function(r){return Object.getOwnPropertyDescriptor(o,r).enumerable})),t.push.apply(t,n)}return t}function L(o){for(var e=1;e<arguments.length;e++){var t=arguments[e]!=null?arguments[e]:{};e%2?rt(Object(t),!0).forEach(function(n){p(o,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(o,Object.getOwnPropertyDescriptors(t)):rt(Object(t)).forEach(function(n){Object.defineProperty(o,n,Object.getOwnPropertyDescriptor(t,n))})}return o}function Lt(){try{var o=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(Lt=function(){return!!o})()}var we=function(){function o(e,t){var n,r,l,i;E(this,o),r=this,i=[e,t],l=O(l=o),p(n=D(r,Lt()?Reflect.construct(l,i||[],O(r).constructor):l.apply(r,i)),"state",{scrollLeft:0,scrollTop:0,scrollbarSize:0,showHorizontalScrollbar:!1,showVerticalScrollbar:!1}),p(n,"_deferredInvalidateColumnIndex",null),p(n,"_deferredInvalidateRowIndex",null),p(n,"_bottomLeftGridRef",function(u){n._bottomLeftGrid=u}),p(n,"_bottomRightGridRef",function(u){n._bottomRightGrid=u}),p(n,"_cellRendererBottomLeftGrid",function(u){var d=u.rowIndex,f=re(u,po),h=n.props,g=h.cellRenderer,v=h.fixedRowCount;return d===h.rowCount-v?x.createElement("div",{key:f.key,style:L(L({},f.style),{},{height:20})}):g(L(L({},f),{},{parent:n,rowIndex:d+v}))}),p(n,"_cellRendererBottomRightGrid",function(u){var d=u.columnIndex,f=u.rowIndex,h=re(u,mo),g=n.props,v=g.cellRenderer,_=g.fixedColumnCount,S=g.fixedRowCount;return v(L(L({},h),{},{columnIndex:d+_,parent:n,rowIndex:f+S}))}),p(n,"_cellRendererTopRightGrid",function(u){var d=u.columnIndex,f=re(u,go),h=n.props,g=h.cellRenderer,v=h.columnCount,_=h.fixedColumnCount;return d===v-_?x.createElement("div",{key:f.key,style:L(L({},f.style),{},{width:20})}):g(L(L({},f),{},{columnIndex:d+_,parent:n}))}),p(n,"_columnWidthRightGrid",function(u){var d=u.index,f=n.props,h=f.columnCount,g=f.fixedColumnCount,v=f.columnWidth,_=n.state,S=_.scrollbarSize;return _.showHorizontalScrollbar&&d===h-g?S:typeof v=="function"?v({index:d+g}):v}),p(n,"_onScroll",function(u){var d=u.scrollLeft,f=u.scrollTop;n.setState({scrollLeft:d,scrollTop:f});var h=n.props.onScroll;h&&h(u)}),p(n,"_onScrollbarPresenceChange",function(u){var d=u.horizontal,f=u.size,h=u.vertical,g=n.state,v=g.showHorizontalScrollbar,_=g.showVerticalScrollbar;if(d!==v||h!==_){n.setState({scrollbarSize:f,showHorizontalScrollbar:d,showVerticalScrollbar:h});var S=n.props.onScrollbarPresenceChange;typeof S=="function"&&S({horizontal:d,size:f,vertical:h})}}),p(n,"_onScrollLeft",function(u){var d=u.scrollLeft;n._onScroll({scrollLeft:d,scrollTop:n.state.scrollTop})}),p(n,"_onScrollTop",function(u){var d=u.scrollTop;n._onScroll({scrollTop:d,scrollLeft:n.state.scrollLeft})}),p(n,"_rowHeightBottomGrid",function(u){var d=u.index,f=n.props,h=f.fixedRowCount,g=f.rowCount,v=f.rowHeight,_=n.state,S=_.scrollbarSize;return _.showVerticalScrollbar&&d===g-h?S:typeof v=="function"?v({index:d+h}):v}),p(n,"_topLeftGridRef",function(u){n._topLeftGrid=u}),p(n,"_topRightGridRef",function(u){n._topRightGrid=u});var a=e.deferredMeasurementCache,s=e.fixedColumnCount,c=e.fixedRowCount;return n._maybeCalculateCachedStyles(!0),a&&(n._deferredMeasurementCacheBottomLeftGrid=c>0?new ye({cellMeasurerCache:a,columnIndexOffset:0,rowIndexOffset:c}):a,n._deferredMeasurementCacheBottomRightGrid=s>0||c>0?new ye({cellMeasurerCache:a,columnIndexOffset:s,rowIndexOffset:c}):a,n._deferredMeasurementCacheTopRightGrid=s>0?new ye({cellMeasurerCache:a,columnIndexOffset:s,rowIndexOffset:0}):a),n}return j(o,x.PureComponent),W(o,[{key:"forceUpdateGrids",value:function(){this._bottomLeftGrid&&this._bottomLeftGrid.forceUpdate(),this._bottomRightGrid&&this._bottomRightGrid.forceUpdate(),this._topLeftGrid&&this._topLeftGrid.forceUpdate(),this._topRightGrid&&this._topRightGrid.forceUpdate()}},{key:"invalidateCellSizeAfterRender",value:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=e.columnIndex,n=t===void 0?0:t,r=e.rowIndex,l=r===void 0?0:r;this._deferredInvalidateColumnIndex=typeof this._deferredInvalidateColumnIndex=="number"?Math.min(this._deferredInvalidateColumnIndex,n):n,this._deferredInvalidateRowIndex=typeof this._deferredInvalidateRowIndex=="number"?Math.min(this._deferredInvalidateRowIndex,l):l}},{key:"measureAllCells",value:function(){this._bottomLeftGrid&&this._bottomLeftGrid.measureAllCells(),this._bottomRightGrid&&this._bottomRightGrid.measureAllCells(),this._topLeftGrid&&this._topLeftGrid.measureAllCells(),this._topRightGrid&&this._topRightGrid.measureAllCells()}},{key:"recomputeGridSize",value:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=e.columnIndex,n=t===void 0?0:t,r=e.rowIndex,l=r===void 0?0:r,i=this.props,a=i.fixedColumnCount,s=i.fixedRowCount,c=Math.max(0,n-a),u=Math.max(0,l-s);this._bottomLeftGrid&&this._bottomLeftGrid.recomputeGridSize({columnIndex:n,rowIndex:u}),this._bottomRightGrid&&this._bottomRightGrid.recomputeGridSize({columnIndex:c,rowIndex:u}),this._topLeftGrid&&this._topLeftGrid.recomputeGridSize({columnIndex:n,rowIndex:l}),this._topRightGrid&&this._topRightGrid.recomputeGridSize({columnIndex:c,rowIndex:l}),this._leftGridWidth=null,this._topGridHeight=null,this._maybeCalculateCachedStyles(!0)}},{key:"componentDidMount",value:function(){var e=this.props,t=e.scrollLeft,n=e.scrollTop;if(t>0||n>0){var r={};t>0&&(r.scrollLeft=t),n>0&&(r.scrollTop=n),this.setState(r)}this._handleInvalidatedGridSize()}},{key:"componentDidUpdate",value:function(){this._handleInvalidatedGridSize()}},{key:"render",value:function(){var e=this.props,t=e.onScroll,n=e.onSectionRendered;e.onScrollbarPresenceChange,e.scrollLeft;var r=e.scrollToColumn;e.scrollTop;var l=e.scrollToRow,i=re(e,vo);if(this._prepareForRender(),this.props.width===0||this.props.height===0)return null;var a=this.state,s=a.scrollLeft,c=a.scrollTop;return x.createElement("div",{style:this._containerOuterStyle},x.createElement("div",{style:this._containerTopStyle},this._renderTopLeftGrid(i),this._renderTopRightGrid(L(L({},i),{},{onScroll:t,scrollLeft:s}))),x.createElement("div",{style:this._containerBottomStyle},this._renderBottomLeftGrid(L(L({},i),{},{onScroll:t,scrollTop:c})),this._renderBottomRightGrid(L(L({},i),{},{onScroll:t,onSectionRendered:n,scrollLeft:s,scrollToColumn:r,scrollToRow:l,scrollTop:c}))))}},{key:"_getBottomGridHeight",value:function(e){return e.height-this._getTopGridHeight(e)}},{key:"_getLeftGridWidth",value:function(e){var t=e.fixedColumnCount,n=e.columnWidth;if(this._leftGridWidth==null)if(typeof n=="function"){for(var r=0,l=0;l<t;l++)r+=n({index:l});this._leftGridWidth=r}else this._leftGridWidth=n*t;return this._leftGridWidth}},{key:"_getRightGridWidth",value:function(e){return e.width-this._getLeftGridWidth(e)}},{key:"_getTopGridHeight",value:function(e){var t=e.fixedRowCount,n=e.rowHeight;if(this._topGridHeight==null)if(typeof n=="function"){for(var r=0,l=0;l<t;l++)r+=n({index:l});this._topGridHeight=r}else this._topGridHeight=n*t;return this._topGridHeight}},{key:"_handleInvalidatedGridSize",value:function(){if(typeof this._deferredInvalidateColumnIndex=="number"){var e=this._deferredInvalidateColumnIndex,t=this._deferredInvalidateRowIndex;this._deferredInvalidateColumnIndex=null,this._deferredInvalidateRowIndex=null,this.recomputeGridSize({columnIndex:e,rowIndex:t}),this.forceUpdate()}}},{key:"_maybeCalculateCachedStyles",value:function(e){var t=this.props,n=t.columnWidth,r=t.enableFixedColumnScroll,l=t.enableFixedRowScroll,i=t.height,a=t.fixedColumnCount,s=t.fixedRowCount,c=t.rowHeight,u=t.style,d=t.styleBottomLeftGrid,f=t.styleBottomRightGrid,h=t.styleTopLeftGrid,g=t.styleTopRightGrid,v=t.width,_=e||i!==this._lastRenderedHeight||v!==this._lastRenderedWidth,S=e||n!==this._lastRenderedColumnWidth||a!==this._lastRenderedFixedColumnCount,m=e||s!==this._lastRenderedFixedRowCount||c!==this._lastRenderedRowHeight;(e||_||u!==this._lastRenderedStyle)&&(this._containerOuterStyle=L({height:i,overflow:"visible",width:v},u)),(e||_||m)&&(this._containerTopStyle={height:this._getTopGridHeight(this.props),position:"relative",width:v},this._containerBottomStyle={height:i-this._getTopGridHeight(this.props),overflow:"visible",position:"relative",width:v}),(e||d!==this._lastRenderedStyleBottomLeftGrid)&&(this._bottomLeftGridStyle=L({left:0,overflowX:"hidden",overflowY:r?"auto":"hidden",position:"absolute"},d)),(e||S||f!==this._lastRenderedStyleBottomRightGrid)&&(this._bottomRightGridStyle=L({left:this._getLeftGridWidth(this.props),position:"absolute"},f)),(e||h!==this._lastRenderedStyleTopLeftGrid)&&(this._topLeftGridStyle=L({left:0,overflowX:"hidden",overflowY:"hidden",position:"absolute",top:0},h)),(e||S||g!==this._lastRenderedStyleTopRightGrid)&&(this._topRightGridStyle=L({left:this._getLeftGridWidth(this.props),overflowX:l?"auto":"hidden",overflowY:"hidden",position:"absolute",top:0},g)),this._lastRenderedColumnWidth=n,this._lastRenderedFixedColumnCount=a,this._lastRenderedFixedRowCount=s,this._lastRenderedHeight=i,this._lastRenderedRowHeight=c,this._lastRenderedStyle=u,this._lastRenderedStyleBottomLeftGrid=d,this._lastRenderedStyleBottomRightGrid=f,this._lastRenderedStyleTopLeftGrid=h,this._lastRenderedStyleTopRightGrid=g,this._lastRenderedWidth=v}},{key:"_prepareForRender",value:function(){this._lastRenderedColumnWidth===this.props.columnWidth&&this._lastRenderedFixedColumnCount===this.props.fixedColumnCount||(this._leftGridWidth=null),this._lastRenderedFixedRowCount===this.props.fixedRowCount&&this._lastRenderedRowHeight===this.props.rowHeight||(this._topGridHeight=null),this._maybeCalculateCachedStyles(),this._lastRenderedColumnWidth=this.props.columnWidth,this._lastRenderedFixedColumnCount=this.props.fixedColumnCount,this._lastRenderedFixedRowCount=this.props.fixedRowCount,this._lastRenderedRowHeight=this.props.rowHeight}},{key:"_renderBottomLeftGrid",value:function(e){var t=e.enableFixedColumnScroll,n=e.fixedColumnCount,r=e.fixedRowCount,l=e.rowCount,i=e.hideBottomLeftGridScrollbar,a=this.state.showVerticalScrollbar;if(!n)return null;var s=a?1:0,c=this._getBottomGridHeight(e),u=this._getLeftGridWidth(e),d=this.state.showVerticalScrollbar?this.state.scrollbarSize:0,f=i?u+d:u,h=x.createElement($,I._extends({},e,{cellRenderer:this._cellRendererBottomLeftGrid,className:this.props.classNameBottomLeftGrid,columnCount:n,deferredMeasurementCache:this._deferredMeasurementCacheBottomLeftGrid,height:c,onScroll:t?this._onScrollTop:void 0,ref:this._bottomLeftGridRef,rowCount:Math.max(0,l-r)+s,rowHeight:this._rowHeightBottomGrid,style:this._bottomLeftGridStyle,tabIndex:null,width:f}));return i?x.createElement("div",{className:"BottomLeftGrid_ScrollWrapper",style:L(L({},this._bottomLeftGridStyle),{},{height:c,width:u,overflowY:"hidden"})},h):h}},{key:"_renderBottomRightGrid",value:function(e){var t=e.columnCount,n=e.fixedColumnCount,r=e.fixedRowCount,l=e.rowCount,i=e.scrollToColumn,a=e.scrollToRow;return x.createElement($,I._extends({},e,{cellRenderer:this._cellRendererBottomRightGrid,className:this.props.classNameBottomRightGrid,columnCount:Math.max(0,t-n),columnWidth:this._columnWidthRightGrid,deferredMeasurementCache:this._deferredMeasurementCacheBottomRightGrid,height:this._getBottomGridHeight(e),onScroll:this._onScroll,onScrollbarPresenceChange:this._onScrollbarPresenceChange,ref:this._bottomRightGridRef,rowCount:Math.max(0,l-r),rowHeight:this._rowHeightBottomGrid,scrollToColumn:i-n,scrollToRow:a-r,style:this._bottomRightGridStyle,width:this._getRightGridWidth(e)}))}},{key:"_renderTopLeftGrid",value:function(e){var t=e.fixedColumnCount,n=e.fixedRowCount;return t&&n?x.createElement($,I._extends({},e,{className:this.props.classNameTopLeftGrid,columnCount:t,height:this._getTopGridHeight(e),ref:this._topLeftGridRef,rowCount:n,style:this._topLeftGridStyle,tabIndex:null,width:this._getLeftGridWidth(e)})):null}},{key:"_renderTopRightGrid",value:function(e){var t=e.columnCount,n=e.enableFixedRowScroll,r=e.fixedColumnCount,l=e.fixedRowCount,i=e.scrollLeft,a=e.hideTopRightGridScrollbar,s=this.state,c=s.showHorizontalScrollbar,u=s.scrollbarSize;if(!l)return null;var d=c?1:0,f=this._getTopGridHeight(e),h=this._getRightGridWidth(e),g=c?u:0,v=f,_=this._topRightGridStyle;a&&(v=f+g,_=L(L({},this._topRightGridStyle),{},{left:0}));var S=x.createElement($,I._extends({},e,{cellRenderer:this._cellRendererTopRightGrid,className:this.props.classNameTopRightGrid,columnCount:Math.max(0,t-r)+d,columnWidth:this._columnWidthRightGrid,deferredMeasurementCache:this._deferredMeasurementCacheTopRightGrid,height:v,onScroll:n?this._onScrollLeft:void 0,ref:this._topRightGridRef,rowCount:l,scrollLeft:i,style:_,tabIndex:null,width:h}));return a?x.createElement("div",{className:"TopRightGrid_ScrollWrapper",style:L(L({},this._topRightGridStyle),{},{height:f,width:h,overflowX:"hidden"})},S):S}}],[{key:"getDerivedStateFromProps",value:function(e,t){return e.scrollLeft!==t.scrollLeft||e.scrollTop!==t.scrollTop?{scrollLeft:e.scrollLeft!=null&&e.scrollLeft>=0?e.scrollLeft:t.scrollLeft,scrollTop:e.scrollTop!=null&&e.scrollTop>=0?e.scrollTop:t.scrollTop}:null}}])}();function Gt(){try{var o=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(Gt=function(){return!!o})()}p(we,"defaultProps",{classNameBottomLeftGrid:"",classNameBottomRightGrid:"",classNameTopLeftGrid:"",classNameTopRightGrid:"",enableFixedColumnScroll:!1,enableFixedRowScroll:!1,fixedColumnCount:0,fixedRowCount:0,scrollToColumn:-1,scrollToRow:-1,style:{},styleBottomLeftGrid:{},styleBottomRightGrid:{},styleTopLeftGrid:{},styleTopRightGrid:{},hideTopRightGridScrollbar:!1,hideBottomLeftGridScrollbar:!1}),we.propTypes={},ue(we),function(){function o(e,t){var n,r,l,i;return E(this,o),r=this,i=[e,t],l=O(l=o),(n=D(r,Gt()?Reflect.construct(l,i||[],O(r).constructor):l.apply(r,i))).state={clientHeight:0,clientWidth:0,scrollHeight:0,scrollLeft:0,scrollTop:0,scrollWidth:0},n._onScroll=n._onScroll.bind(n),n}return j(o,x.PureComponent),W(o,[{key:"render",value:function(){var e=this.props.children,t=this.state,n=t.clientHeight,r=t.clientWidth,l=t.scrollHeight,i=t.scrollLeft,a=t.scrollTop,s=t.scrollWidth;return e({clientHeight:n,clientWidth:r,onScroll:this._onScroll,scrollHeight:l,scrollLeft:i,scrollTop:a,scrollWidth:s})}},{key:"_onScroll",value:function(e){var t=e.clientHeight,n=e.clientWidth,r=e.scrollHeight,l=e.scrollLeft,i=e.scrollTop,a=e.scrollWidth;this.setState({clientHeight:t,clientWidth:n,scrollHeight:r,scrollLeft:l,scrollTop:i,scrollWidth:a})}}])}().propTypes={};var ce="ASC",Te="DESC";function At(o){var e=o.sortDirection,t=I.clsx("ReactVirtualized__Table__sortableHeaderIcon",{"ReactVirtualized__Table__sortableHeaderIcon--ASC":e===ce,"ReactVirtualized__Table__sortableHeaderIcon--DESC":e===Te});return x.createElement("svg",{className:t,width:18,height:18,viewBox:"0 0 24 24"},e===ce?x.createElement("path",{d:"M7 14l5-5 5 5z"}):x.createElement("path",{d:"M7 10l5 5 5-5z"}),x.createElement("path",{d:"M0 0h24v24H0z",fill:"none"}))}function Et(){try{var o=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(Et=function(){return!!o})()}At.propTypes={};var ge=function(){function o(){return E(this,o),e=this,n=arguments,t=O(t=o),D(e,Et()?Reflect.construct(t,n||[],O(e).constructor):t.apply(e,n));var e,t,n}return j(o,x.Component),W(o)}();function it(o,e){var t=Object.keys(o);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(o);e&&(n=n.filter(function(r){return Object.getOwnPropertyDescriptor(o,r).enumerable})),t.push.apply(t,n)}return t}function V(o){for(var e=1;e<arguments.length;e++){var t=arguments[e]!=null?arguments[e]:{};e%2?it(Object(t),!0).forEach(function(n){p(o,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(o,Object.getOwnPropertyDescriptors(t)):it(Object(t)).forEach(function(n){Object.defineProperty(o,n,Object.getOwnPropertyDescriptor(t,n))})}return o}function Wt(){try{var o=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(Wt=function(){return!!o})()}p(ge,"defaultProps",{cellDataGetter:function(o){var e=o.dataKey,t=o.rowData;return typeof t.get=="function"?t.get(e):t[e]},cellRenderer:function(o){var e=o.cellData;return e==null?"":String(e)},defaultSortDirection:ce,flexGrow:0,flexShrink:1,headerRenderer:function(o){var e=o.dataKey,t=o.label,n=o.sortBy,r=o.sortDirection,l=n===e,i=[x.createElement("span",{className:"ReactVirtualized__Table__headerTruncatedText",key:"label",title:typeof t=="string"?t:null},t)];return l&&i.push(x.createElement(At,{key:"SortIndicator",sortDirection:r})),i},style:{}}),ge.propTypes={};var ze=function(){function o(e){var t,n,r,l;return E(this,o),n=this,l=[e],r=O(r=o),(t=D(n,Wt()?Reflect.construct(r,l||[],O(n).constructor):r.apply(n,l))).state={scrollbarWidth:0},t._createColumn=t._createColumn.bind(t),t._createRow=t._createRow.bind(t),t._onScroll=t._onScroll.bind(t),t._onSectionRendered=t._onSectionRendered.bind(t),t._setRef=t._setRef.bind(t),t._setGridElementRef=t._setGridElementRef.bind(t),t}return j(o,x.PureComponent),W(o,[{key:"forceUpdateGrid",value:function(){this.Grid&&this.Grid.forceUpdate()}},{key:"getOffsetForRow",value:function(e){var t=e.alignment,n=e.index;return this.Grid?this.Grid.getOffsetForCell({alignment:t,rowIndex:n}).scrollTop:0}},{key:"invalidateCellSizeAfterRender",value:function(e){var t=e.columnIndex,n=e.rowIndex;this.Grid&&this.Grid.invalidateCellSizeAfterRender({rowIndex:n,columnIndex:t})}},{key:"measureAllRows",value:function(){this.Grid&&this.Grid.measureAllCells()}},{key:"recomputeGridSize",value:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=e.columnIndex,n=t===void 0?0:t,r=e.rowIndex,l=r===void 0?0:r;this.Grid&&this.Grid.recomputeGridSize({rowIndex:l,columnIndex:n})}},{key:"recomputeRowHeights",value:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0;this.Grid&&this.Grid.recomputeGridSize({rowIndex:e})}},{key:"scrollToPosition",value:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0;this.Grid&&this.Grid.scrollToPosition({scrollTop:e})}},{key:"scrollToRow",value:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0;this.Grid&&this.Grid.scrollToCell({columnIndex:0,rowIndex:e})}},{key:"getScrollbarWidth",value:function(){if(this.GridElement){var e=this.GridElement,t=e.clientWidth||0;return(e.offsetWidth||0)-t}return 0}},{key:"componentDidMount",value:function(){this._setScrollbarWidth()}},{key:"componentDidUpdate",value:function(){this._setScrollbarWidth()}},{key:"render",value:function(){var e=this,t=this.props,n=t.children,r=t.className,l=t.disableHeader,i=t.gridClassName,a=t.gridStyle,s=t.headerHeight,c=t.headerRowRenderer,u=t.height,d=t.id,f=t.noRowsRenderer,h=t.rowClassName,g=t.rowStyle,v=t.scrollToIndex,_=t.style,S=t.width,m=this.state.scrollbarWidth,y=l?u:u-s,w=typeof h=="function"?h({index:-1}):h,C=typeof g=="function"?g({index:-1}):g;return this._cachedColumnStyles=[],x.Children.toArray(n).forEach(function(R,z){var b=e._getFlexStyleForColumn(R,R.props.style||ge.defaultProps.style);e._cachedColumnStyles[z]=V({overflow:"hidden"},b)}),x.createElement("div",{"aria-label":this.props["aria-label"],"aria-labelledby":this.props["aria-labelledby"],"aria-colcount":x.Children.toArray(n).length,"aria-rowcount":this.props.rowCount,className:I.clsx("ReactVirtualized__Table",r),id:d,role:"grid",style:_},!l&&c({className:I.clsx("ReactVirtualized__Table__headerRow",w),columns:this._getHeaderColumns(),style:V({height:s,overflow:"hidden",paddingRight:m,width:S},C)}),x.createElement($,I._extends({},this.props,{elementRef:this._setGridElementRef,"aria-readonly":null,autoContainerWidth:!0,className:I.clsx("ReactVirtualized__Table__Grid",i),cellRenderer:this._createRow,columnWidth:S,columnCount:1,height:y,id:void 0,noContentRenderer:f,onScroll:this._onScroll,onSectionRendered:this._onSectionRendered,ref:this._setRef,role:"rowgroup",scrollbarWidth:m,scrollToRow:v,style:V(V({},a),{},{overflowX:"hidden"})})))}},{key:"_createColumn",value:function(e){var t=e.column,n=e.columnIndex,r=e.isScrolling,l=e.parent,i=e.rowData,a=e.rowIndex,s=this.props.onColumnClick,c=t.props,u=c.cellDataGetter,d=c.cellRenderer,f=c.className,h=c.columnData,g=c.dataKey,v=c.id,_=d({cellData:u({columnData:h,dataKey:g,rowData:i}),columnData:h,columnIndex:n,dataKey:g,isScrolling:r,parent:l,rowData:i,rowIndex:a}),S=this._cachedColumnStyles[n],m=typeof _=="string"?_:null;return x.createElement("div",{"aria-colindex":n+1,"aria-describedby":v,className:I.clsx("ReactVirtualized__Table__rowColumn",f),key:"Row"+a+"-Col"+n,onClick:function(y){s&&s({columnData:h,dataKey:g,event:y})},role:"gridcell",style:S,title:m},_)}},{key:"_createHeader",value:function(e){var t,n,r,l,i,a=e.column,s=e.index,c=this.props,u=c.headerClassName,d=c.headerStyle,f=c.onHeaderClick,h=c.sort,g=c.sortBy,v=c.sortDirection,_=a.props,S=_.columnData,m=_.dataKey,y=_.defaultSortDirection,w=_.disableSort,C=_.headerRenderer,R=_.id,z=_.label,b=!w&&h,P=I.clsx("ReactVirtualized__Table__headerColumn",u,a.props.headerClassName,{ReactVirtualized__Table__sortableHeaderColumn:b}),k=this._getFlexStyleForColumn(a,V(V({},d),a.props.headerStyle)),T=C({columnData:S,dataKey:m,disableSort:w,label:z,sortBy:g,sortDirection:v});if(b||f){var G=g!==m?y:v===Te?ce:Te,M=function(H){b&&h({defaultSortDirection:y,event:H,sortBy:m,sortDirection:G}),f&&f({columnData:S,dataKey:m,event:H})};i=a.props["aria-label"]||z||m,l="none",r=0,t=M,n=function(H){H.key!=="Enter"&&H.key!==" "||M(H)}}return g===m&&(l=v===ce?"ascending":"descending"),x.createElement("div",{"aria-label":i,"aria-sort":l,className:P,id:R,key:"Header-Col"+s,onClick:t,onKeyDown:n,role:"columnheader",style:k,tabIndex:r},T)}},{key:"_createRow",value:function(e){var t=this,n=e.rowIndex,r=e.isScrolling,l=e.key,i=e.parent,a=e.style,s=this.props,c=s.children,u=s.onRowClick,d=s.onRowDoubleClick,f=s.onRowRightClick,h=s.onRowMouseOver,g=s.onRowMouseOut,v=s.rowClassName,_=s.rowGetter,S=s.rowRenderer,m=s.rowStyle,y=this.state.scrollbarWidth,w=typeof v=="function"?v({index:n}):v,C=typeof m=="function"?m({index:n}):m,R=_({index:n}),z=x.Children.toArray(c).map(function(k,T){return t._createColumn({column:k,columnIndex:T,isScrolling:r,parent:i,rowData:R,rowIndex:n,scrollbarWidth:y})}),b=I.clsx("ReactVirtualized__Table__row",w),P=V(V({},a),{},{height:this._getRowHeight(n),overflow:"hidden",paddingRight:y},C);return S({className:b,columns:z,index:n,isScrolling:r,key:l,onRowClick:u,onRowDoubleClick:d,onRowRightClick:f,onRowMouseOver:h,onRowMouseOut:g,rowData:R,style:P})}},{key:"_getFlexStyleForColumn",value:function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n="".concat(e.props.flexGrow," ").concat(e.props.flexShrink," ").concat(e.props.width,"px"),r=V(V({},t),{},{flex:n,msFlex:n,WebkitFlex:n});return e.props.maxWidth&&(r.maxWidth=e.props.maxWidth),e.props.minWidth&&(r.minWidth=e.props.minWidth),r}},{key:"_getHeaderColumns",value:function(){var e=this,t=this.props,n=t.children;return(t.disableHeader?[]:x.Children.toArray(n)).map(function(r,l){return e._createHeader({column:r,index:l})})}},{key:"_getRowHeight",value:function(e){var t=this.props.rowHeight;return typeof t=="function"?t({index:e}):t}},{key:"_onScroll",value:function(e){var t=e.clientHeight,n=e.scrollHeight,r=e.scrollTop;(0,this.props.onScroll)({clientHeight:t,scrollHeight:n,scrollTop:r})}},{key:"_onSectionRendered",value:function(e){var t=e.rowOverscanStartIndex,n=e.rowOverscanStopIndex,r=e.rowStartIndex,l=e.rowStopIndex;(0,this.props.onRowsRendered)({overscanStartIndex:t,overscanStopIndex:n,startIndex:r,stopIndex:l})}},{key:"_setRef",value:function(e){this.Grid=e}},{key:"_setGridElementRef",value:function(e){this.GridElement=e}},{key:"_setScrollbarWidth",value:function(){var e=this.getScrollbarWidth();this.setState({scrollbarWidth:e})}}])}();p(ze,"defaultProps",{disableHeader:!1,estimatedRowSize:30,headerHeight:0,headerStyle:{},noRowsRenderer:function(){return null},onRowsRendered:function(){return null},onScroll:function(){return null},overscanIndicesGetter:Tt,overscanRowCount:10,rowRenderer:function(o){var e=o.className,t=o.columns,n=o.index,r=o.key,l=o.onRowClick,i=o.onRowDoubleClick,a=o.onRowMouseOut,s=o.onRowMouseOver,c=o.onRowRightClick,u=o.rowData,d=o.style,f={"aria-rowindex":n+1};return(l||i||a||s||c)&&(f["aria-label"]="row",f.tabIndex=0,l&&(f.onClick=function(h){return l({event:h,index:n,rowData:u})}),i&&(f.onDoubleClick=function(h){return i({event:h,index:n,rowData:u})}),a&&(f.onMouseOut=function(h){return a({event:h,index:n,rowData:u})}),s&&(f.onMouseOver=function(h){return s({event:h,index:n,rowData:u})}),c&&(f.onContextMenu=function(h){return c({event:h,index:n,rowData:u})})),x.createElement("div",I._extends({},f,{className:e,key:r,role:"row",style:d}),t)},headerRowRenderer:function(o){var e=o.className,t=o.columns,n=o.style;return x.createElement("div",{className:e,role:"row",style:n},t)},rowStyle:{},scrollToAlignment:"auto",scrollToIndex:-1,style:{}}),ze.propTypes={};var J=[],se=null,Y=null;function Ht(){Y&&(Y=null,document.body&&se!=null&&(document.body.style.pointerEvents=se),se=null)}function _o(){Ht(),J.forEach(function(o){return o.__resetIsScrolling()})}function Dt(o){o.currentTarget===window&&se==null&&document.body&&(se=document.body.style.pointerEvents,document.body.style.pointerEvents="none"),function(){Y&&te(Y);var e=0;J.forEach(function(t){e=Math.max(e,t.props.scrollingResetTimeInterval)}),Y=Oe(_o,e)}(),J.forEach(function(e){e.props.scrollElement===o.currentTarget&&e.__handleWindowScrollEvent()})}function lt(o,e){J.some(function(t){return t.props.scrollElement===e})||e.addEventListener("scroll",Dt),J.push(o)}function st(o,e){(J=J.filter(function(t){return t!==o})).length||(e.removeEventListener("scroll",Dt),Y&&(te(Y),Ht()))}var Me=function(o){return o===window},ie=function(o){return o.getBoundingClientRect()};function at(o,e){if(o){if(Me(o)){var t=window,n=t.innerHeight,r=t.innerWidth;return{height:typeof n=="number"?n:0,width:typeof r=="number"?r:0}}return ie(o)}return{height:e.serverHeight,width:e.serverWidth}}function ct(o){return Me(o)&&document.documentElement?{top:"scrollY"in window?window.scrollY:document.documentElement.scrollTop,left:"scrollX"in window?window.scrollX:document.documentElement.scrollLeft}:{top:o.scrollTop,left:o.scrollLeft}}function ut(o,e){var t=Object.keys(o);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(o);e&&(n=n.filter(function(r){return Object.getOwnPropertyDescriptor(o,r).enumerable})),t.push.apply(t,n)}return t}function dt(o){for(var e=1;e<arguments.length;e++){var t=arguments[e]!=null?arguments[e]:{};e%2?ut(Object(t),!0).forEach(function(n){p(o,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(o,Object.getOwnPropertyDescriptors(t)):ut(Object(t)).forEach(function(n){Object.defineProperty(o,n,Object.getOwnPropertyDescriptor(t,n))})}return o}function jt(){try{var o=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(jt=function(){return!!o})()}var Ft=function(){return typeof window<"u"?window:void 0},So=function(){function o(){var e,t,n,r;E(this,o);for(var l=arguments.length,i=new Array(l),a=0;a<l;a++)i[a]=arguments[a];return t=this,n=o,r=[].concat(i),n=O(n),p(e=D(t,jt()?Reflect.construct(n,r||[],O(t).constructor):n.apply(t,r)),"_window",Ft()),p(e,"_isMounted",!1),p(e,"_positionFromTop",0),p(e,"_positionFromLeft",0),p(e,"_detectElementResize",void 0),p(e,"_child",void 0),p(e,"_windowScrollerRef",x.createRef()),p(e,"state",dt(dt({},at(e.props.scrollElement,e.props)),{},{isScrolling:!1,scrollLeft:0,scrollTop:0})),p(e,"_registerChild",function(s){!s||s instanceof Element||console.warn("WindowScroller registerChild expects to be passed Element or null"),e._child=s,e.updatePosition()}),p(e,"_onChildScroll",function(s){var c=s.scrollTop;if(e.state.scrollTop!==c){var u=e.props.scrollElement;u&&(typeof u.scrollTo=="function"?u.scrollTo(0,c+e._positionFromTop):u.scrollTop=c+e._positionFromTop)}}),p(e,"_registerResizeListener",function(s){s===window?window.addEventListener("resize",e._onResize,!1):e._detectElementResize.addResizeListener(s,e._onResize)}),p(e,"_unregisterResizeListener",function(s){s===window?window.removeEventListener("resize",e._onResize,!1):s&&e._detectElementResize.removeResizeListener(s,e._onResize)}),p(e,"_onResize",function(){e.updatePosition()}),p(e,"__handleWindowScrollEvent",function(){if(e._isMounted){var s=e.props.onScroll,c=e.props.scrollElement;if(c){var u=ct(c),d=Math.max(0,u.left-e._positionFromLeft),f=Math.max(0,u.top-e._positionFromTop);e.setState({isScrolling:!0,scrollLeft:d,scrollTop:f}),s({scrollLeft:d,scrollTop:f})}}}),p(e,"__resetIsScrolling",function(){e.setState({isScrolling:!1})}),e}return j(o,x.PureComponent),W(o,[{key:"updatePosition",value:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.props.scrollElement,t=this.props.onResize,n=this.state,r=n.height,l=n.width,i=this._child||this._windowScrollerRef.current;if(i instanceof Element&&e){var a=function(c,u){if(Me(u)&&document.documentElement){var d=document.documentElement,f=ie(c),h=ie(d);return{top:f.top-h.top,left:f.left-h.left}}var g=ct(u),v=ie(c),_=ie(u);return{top:v.top+g.top-_.top,left:v.left+g.left-_.left}}(i,e);this._positionFromTop=a.top,this._positionFromLeft=a.left}var s=at(e,this.props);r===s.height&&l===s.width||(this.setState({height:s.height,width:s.width}),t({height:s.height,width:s.width})),this.props.updateScrollTopOnUpdatePosition===!0&&(this.__handleWindowScrollEvent(),this.__resetIsScrolling())}},{key:"componentDidMount",value:function(){var e=this.props.scrollElement;this._detectElementResize=_t(),this.updatePosition(e),e&&(lt(this,e),this._registerResizeListener(e)),this._isMounted=!0}},{key:"componentDidUpdate",value:function(e,t){var n=this.props.scrollElement,r=e.scrollElement;r!==n&&r!=null&&n!=null&&(this.updatePosition(n),st(this,r),lt(this,n),this._unregisterResizeListener(r),this._registerResizeListener(n))}},{key:"componentWillUnmount",value:function(){var e=this.props.scrollElement;e&&(st(this,e),this._unregisterResizeListener(e)),this._isMounted=!1}},{key:"render",value:function(){var e=this.props.children,t=this.state,n=t.isScrolling,r=t.scrollTop,l=t.scrollLeft,i=t.height,a=t.width;return x.createElement("div",{ref:this._windowScrollerRef},e({onChildScroll:this._onChildScroll,registerChild:this._registerChild,height:i,isScrolling:n,scrollLeft:l,scrollTop:r,width:a}))}}])}();p(So,"defaultProps",{onResize:function(){},onScroll:function(){},scrollingResetTimeInterval:150,scrollElement:Ft(),serverHeight:0,serverWidth:0});const le="ReactVirtualizedDemo-flexContainer",Nt="ReactVirtualizedDemo-tableRow",Bt="ReactVirtualizedDemo-tableRowHover",Ie="ReactVirtualizedDemo-tableCell",Pe="ReactVirtualizedDemo-noClick";class yo extends U.PureComponent{constructor(){super(...arguments),this.getRowClassName=({index:e})=>{const{onRowClick:t}=this.props;return I.clsx$1(Nt,le,{[Bt]:e!==-1&&t!=null})},this.cellRenderer=({cellData:e,dataKey:t,columnIndex:n,width:r})=>{const{columns:l,rowHeight:i,onRowClick:a}=this.props;let s=e,c={height:i,paddingRight:"2px",paddingTop:"0px",paddingBottom:"0px",minWidth:`${r}px`,maxWidth:`${r}px`};return t==="shortcut"?s=I.$7(e):t==="description"&&(c={...c,fontSize:".75rem",display:"block",paddingTop:"4px",whiteSpace:"pre-line"}),A.jsx(N.TableCell,{component:"div",className:I.clsx$1(Ie,le,{[Pe]:a==null}),variant:"body",style:c,align:n!=null&&l[n].numeric?"right":"left",children:s})},this.headerRenderer=({label:e,columnIndex:t,width:n})=>{const{headerHeight:r,columns:l}=this.props,i=l[t];return A.jsx(N.TableCell,{component:"div",className:I.clsx$1(Ie,le,Pe),variant:"head",sx:{width:n,height:r,backgroundColor:a=>a.palette.grey[300]},align:i.numeric?"right":"left",children:A.jsx("span",{children:i.label})})}}static{this.defaultProps={headerHeight:40,rowHeight:48}}render(){const{columns:e,rowHeight:t,headerHeight:n,...r}=this.props;return A.jsx(yt,{children:({height:l,width:i})=>A.jsx(ze,{height:l,width:i,rowHeight:t,gridStyle:{direction:"inherit"},headerHeight:n,...r,rowClassName:this.getRowClassName,children:e.map(({dataKey:a,width:s,widthLess:c,...u},d)=>{const f=c?i-c:s;return A.jsx(ge,{style:{flex:`1 1 ${f}px`},headerRenderer:h=>this.headerRenderer({...h,width:f,columnIndex:d}),className:le,cellDataGetter:({rowData:h,columnData:g,dataKey:v})=>h[v],cellRenderer:h=>this.cellRenderer({...h,width:f,columnIndex:d}),dataKey:a,width:f,...u},a)})})})}}const wo=Xt(yo)(({theme:o})=>({"& .ReactVirtualized__Table__headerRow":{...o.direction==="rtl"&&{paddingLeft:"0 !important"},...o.direction!=="rtl"&&{paddingRight:void 0}},"& .ReactVirtualized__Table__Grid":{outline:"none"},[`& .${le}`]:{display:"flex",alignItems:"center",boxSizing:"border-box"},[`& .${Nt}`]:{cursor:"pointer"},[`& .${Bt}`]:{"&:hover:not([disabled])":{backgroundColor:o.palette.grey[200]}},[`& .${Ie}`]:{flex:1},[`& .${Pe}`]:{cursor:"initial"}}));function Co(o){const{commands:e,...t}=o,[n,r]=U.useState(!1),[l,i]=U.useState(""),a=U.useMemo(()=>{let h=e.getAllCommands();n||(h=h.filter(_=>_.command.shortcut())),h.sort((_,S)=>_.command.label().localeCompare(S.command.label()));const g=[],v=_=>_.replace(/\n\n/g,`
18
+ `);for(let _=0;_<h.length;_++){const S=h[_].command,m=S.shortcut();if(Array.isArray(m)){const y=m;for(let w=0;w<y.length;w++)g.push({label:S.label(),description:v(S.description()),shortcut:y[w]})}else g.push({label:S.label(),description:v(S.description()),shortcut:S.shortcut()})}return g},[n,e]),[s,c]=U.useState(null);U.useEffect(()=>{Promise.resolve().then(()=>require("./D3DP2KHrlCUvr5GM.cjs")).then(h=>{c(new h.default(a,{threshold:0,ignoreLocation:!0,keys:["label","description"]}))})},[a]);const[u,d]=U.useState(a),f=l.length>0&&u.length===0;return U.useEffect(()=>{s&&I.Yt.debounce(()=>{if(l.trim().length===0)return void d(a);const h=s.search(l.trim()),g=new Array(h.length);for(let v=0;v<h.length;v++)g[v]=h[v].item;d(g)},90)()},[s,l]),A.jsxs(N.Box,{style:{height:440,width:"100%",display:"flex",flexDirection:"column"},...t,children:[A.jsxs(N.Box,{sx:{display:"flex",alignItems:"center",justifyContent:"end",marginBottom:h=>h.spacing(2),color:h=>h.palette.text.secondary},children:[A.jsx(N.TextField,{InputProps:{sx:{backgroundImage:`linear-gradient(${de.alpha("#fff",I.getOverlayAlpha(5))}, ${de.alpha("#fff",I.getOverlayAlpha(5))})`},inputProps:{className:"input",autoFocus:!0,spellCheck:!1,placeholder:"Type to search key bindings",autoComplete:"off",sx:{paddingTop:h=>h.spacing(1),paddingBottom:h=>h.spacing(1)}},endAdornment:A.jsx(N.InputAdornment,{sx:{opacity:l.length>0?1:0,display:l.length>0?"flex":"none"},position:"end",children:A.jsx(N.IconButton,{"aria-label":"clear search",onClick:()=>i(""),edge:"end",children:A.jsx(Ut.Close,{})})})},sx:{flex:"1 1 40%",marginRight:h=>h.spacing(1),"& .MuiOutlinedInput-notchedOutline":{borderColor:h=>f?`${h.palette.error.main} !important`:void 0},"& .MuiInputLabel-outlined":{color:h=>f?`${h.palette.error.main} !important`:void 0}},value:l,onChange:h=>{i(h.target.value)},onKeyDown:h=>{h.which===I.eo.Escape&&l.length>0&&(i(""),h.stopPropagation(),h.preventDefault())},onContextMenu:h=>{h.stopPropagation()}}),A.jsx(N.FormControlLabel,{sx:{flex:"1 1 60%"},control:A.jsx(N.Checkbox,{checked:n,onChange:()=>r(!n)}),label:"Show commands without key bindings",labelPlacement:"start"})]}),A.jsx(N.Box,{sx:{flex:"1 1 100%",borderRadius:h=>`${h.shape.borderRadius}px`,border:h=>`solid ${h.palette.divider} 1px`,paddingRight:"1px",overflow:"hidden","* .MuiTableCell-head":{background:h=>h.palette.background.paper,backgroundImage:`linear-gradient(${de.alpha("#fff",I.getOverlayAlpha(5))}, ${de.alpha("#fff",I.getOverlayAlpha(5))})`}},children:A.jsx(wo,{rowCount:u.length,rowGetter:h=>u[h.index],columns:[{width:180,label:"Command",dataKey:"label"},{width:260,label:"Key Binding",dataKey:"shortcut"},{width:240,label:"Description",dataKey:"description",widthLess:440}]})}),A.jsx(N.Box,{sx:{display:"flex",flexShrink:"0",paddingLeft:h=>h.spacing(1),paddingTop:h=>h.spacing(1),paddingRight:h=>h.spacing(1),userSelect:"none",justifyContent:"flex-end"},children:A.jsx(N.Typography,{noWrap:!0,component:"div",sx:{color:h=>f?h.palette.error.main:h.palette.text.secondary},children:`${u.length===0?"No":u.length} shortcut key${u.length===1?"":"s"}${l.length>0?" found":""}`})})]})}exports.default=o=>{const{title:e="Shortcut Keys",commands:t,sx:n,...r}=o;return A.jsx(I.jn,{isModal:!0,onKeyDown:l=>{l.keyCode===I.eo.F1&&l.preventDefault()},sx:{width:"780px",...n},title:e,autoFocusSel:".input",...r,children:A.jsx(N.DialogContent,{dividers:!0,children:A.jsx(Co,{commands:t,sx:{marginBottom:"8px"}})})})};
@@ -1,5 +1,5 @@
1
1
  "use strict";/**
2
- * @license @sheetxl/studio-mui - Studio - Spreadsheet UI built with SheetXL SDK using React & MUI. - v0.4.14
2
+ * @license @sheetxl/studio-mui - Studio - Spreadsheet UI built with SheetXL SDK using React & MUI. - v0.4.16
3
3
  *
4
4
  * (C) 2025-present SheetXL Inc. & Michael T. Ford
5
5
  * License: The license can be found at https://www.sheetxl.com/license.
@@ -1,11 +1,11 @@
1
1
  "use strict";/**
2
- * @license @sheetxl/studio-mui - Studio - Spreadsheet UI built with SheetXL SDK using React & MUI. - v0.4.14
2
+ * @license @sheetxl/studio-mui - Studio - Spreadsheet UI built with SheetXL SDK using React & MUI. - v0.4.16
3
3
  *
4
4
  * (C) 2025-present SheetXL Inc. & Michael T. Ford
5
5
  * License: The license can be found at https://www.sheetxl.com/license.
6
- */Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const u=require("@sheetxl/sdk"),Ke=require("./As7uhSEgY8VJ3I6f.cjs"),Ye=":A-Z_a-zÀ-ÖØ-öø-˿Ͱ-ͽͿ-῿‌‍⁰-↏Ⰰ-⿯、-퟿豈-﷏ﷰ-�𐀀-󯿿",bs=new RegExp(`^[${Ye}][-${Ye}.0-9·̀-ͯ‿-⁀]*$`,"u");function rs(i){return i>=65&&i<=90||i>=97&&i<=122||i===58||i===95||i===8204||i===8205||i>=192&&i<=214||i>=216&&i<=246||i>=248&&i<=767||i>=880&&i<=893||i>=895&&i<=8191||i>=8304&&i<=8591||i>=11264&&i<=12271||i>=12289&&i<=55295||i>=63744&&i<=64975||i>=65008&&i<=65533||i>=65536&&i<=983039}const ts="A-Z_a-zÀ-ÖØ-öø-˿Ͱ-ͽͿ-῿‌-‍⁰-↏Ⰰ-⿯、-퟿豈-﷏ﷰ-�𐀀-󯿿",xs=new RegExp(`^[${ts}][-${ts}.0-9·̀-ͯ‿-⁀]*$`,"u");function ns(i){return i>=65&&i<=90||i===95||i>=97&&i<=122||i>=192&&i<=214||i>=216&&i<=246||i>=248&&i<=767||i>=880&&i<=893||i>=895&&i<=8191||i>=8204&&i<=8205||i>=8304&&i<=8591||i>=11264&&i<=12271||i>=12289&&i<=55295||i>=63744&&i<=64975||i>=65008&&i<=65533||i>=65536&&i<=983039}const U=function(i){return i===32||i===10||i===13||i===9},ws=function(i){return i>=32&&i<=55295||i===10||i===13||i===9||i>=57344&&i<=65533||i>=65536&&i<=1114111},re=rs,es=function(i){return rs(i)||i>=48&&i<=57||i===45||i===46||i===183||i>=768&&i<=879||i>=8255&&i<=8256},as=[32,10,13,9],vs=bs,Ss=function(i){return i>=1&&i<=55295||i>=57344&&i<=65533||i>=65536&&i<=1114111},Cs=ns,ks=function(i){return ns(i)||i===45||i===46||i>=48&&i<=57||i===183||i>=768&&i<=879||i>=8255&&i<=8256},As=xs,ge="http://www.w3.org/XML/1998/namespace",Jt="http://www.w3.org/2000/xmlns/",Es={__proto__:null,xml:ge,xmlns:Jt},Ds={__proto__:null,amp:"&",gt:">",lt:"<",quot:'"',apos:"'"},O=-1,lt=-2,W=13,jt=33,ot=10,St=60,Gt=61,M=62,X=63,Zt=93,pe=i=>i===34||i===39,ls=[34,39],Ps=[...ls,91,M],Is=[...ls,St,Zt],Os=[Gt,X,...as],Vs=[...as,M,38,St];function ke(i,t,s){switch(t){case"xml":s!==ge&&i.fail(`xml prefix must be bound to ${ge}.`);break;case"xmlns":s!==Jt&&i.fail(`xmlns prefix must be bound to ${Jt}.`)}switch(s){case Jt:i.fail(t===""?`the default namespace may not be set to ${s}.`:`may not assign a prefix (even "xmlns") to the URI ${Jt}.`);break;case ge:switch(t){case"xml":break;case"":i.fail(`the default namespace may not be set to ${s}.`);break;default:i.fail("may not assign the xml namespace to another prefix.")}}}const Ns=i=>As.test(i),Ls=i=>vs.test(i),ss={xmldecl:"xmldeclHandler",text:"textHandler",processinginstruction:"piHandler",doctype:"doctypeHandler",comment:"commentHandler",opentagstart:"openTagStartHandler",attribute:"attributeHandler",opentag:"openTagHandler",closetag:"closeTagHandler",cdata:"cdataHandler",error:"errorHandler",end:"endHandler",ready:"readyHandler"};class Rs{constructor(t){this.i=0,this.prevI=0,this.opt=t??{},this.fragmentOpt=!!this.opt.fragment;const s=this.xmlnsOpt=!!this.opt.xmlns;if(this.trackPosition=this.opt.position!==!1,this.fileName=this.opt.fileName,s){this.nameStartCheck=Cs,this.nameCheck=ks,this.isName=Ns,this.processAttribs=this.processAttribsNS,this.pushAttrib=this.pushAttribNS,this.ns={__proto__:null,...Es};const o=this.opt.additionalNamespaces;o!=null&&(function(n,a){for(const c of Object.keys(a))ke(n,c,a[c])}(this,o),Object.assign(this.ns,o))}else this.nameStartCheck=re,this.nameCheck=es,this.isName=Ls,this.processAttribs=this.processAttribsPlain,this.pushAttrib=this.pushAttribPlain;this.stateTable=[this.sBegin,this.sBeginWhitespace,this.sDoctype,this.sDoctypeQuote,this.sDTD,this.sDTDQuoted,this.sDTDOpenWaka,this.sDTDOpenWakaBang,this.sDTDComment,this.sDTDCommentEnding,this.sDTDCommentEnded,this.sDTDPI,this.sDTDPIEnding,this.sText,this.sEntity,this.sOpenWaka,this.sOpenWakaBang,this.sComment,this.sCommentEnding,this.sCommentEnded,this.sCData,this.sCDataEnding,this.sCDataEnding2,this.sPIFirstChar,this.sPIRest,this.sPIBody,this.sPIEnding,this.sXMLDeclNameStart,this.sXMLDeclName,this.sXMLDeclEq,this.sXMLDeclValueStart,this.sXMLDeclValue,this.sXMLDeclSeparator,this.sXMLDeclEnding,this.sOpenTag,this.sOpenTagSlash,this.sAttrib,this.sAttribName,this.sAttribNameSawWhite,this.sAttribValue,this.sAttribValueQuoted,this.sAttribValueClosed,this.sAttribValueUnquoted,this.sCloseTag,this.sCloseTagSawWhite],this._init()}get closed(){return this._closed}_init(){this.openWakaBang="",this.text="",this.name="",this.piTarget="",this.entity="",this.q=null,this.tags=[],this.tag=null,this.topNS=null,this.chunk="",this.chunkPosition=0,this.i=0,this.prevI=0,this.carriedFromPrevious=void 0,this.forbiddenState=0,this.attribList=[];const{fragmentOpt:t}=this;this.state=t?W:0,this.reportedTextBeforeRoot=this.reportedTextAfterRoot=this.closedRoot=this.sawRoot=t,this.xmlDeclPossible=!t,this.xmlDeclExpects=["version"],this.entityReturnState=void 0;let{defaultXMLVersion:s}=this.opt;if(s===void 0){if(this.opt.forceXMLVersion===!0)throw new Error("forceXMLVersion set but defaultXMLVersion is not set");s="1.0"}this.setXMLVersion(s),this.positionAtNewLine=0,this.doctype=!1,this._closed=!1,this.xmlDecl={version:void 0,encoding:void 0,standalone:void 0},this.line=1,this.column=0,this.ENTITIES=Object.create(Ds),this.readyHandler?.()}get position(){return this.chunkPosition+this.i}get columnIndex(){return this.position-this.positionAtNewLine}on(t,s){this[ss[t]]=s}off(t){this[ss[t]]=void 0}makeError(t){let s=this.fileName??"";return this.trackPosition&&(s.length>0&&(s+=":"),s+=`${this.line}:${this.column}`),s.length>0&&(s+=": "),new Error(s+t)}fail(t){const s=this.makeError(t),o=this.errorHandler;if(o===void 0)throw s;return o(s),this}write(t){if(this.closed)return this.fail("cannot write after close; assign an onready handler.");let s=!1;t===null?(s=!0,t=""):typeof t=="object"&&(t=t.toString()),this.carriedFromPrevious!==void 0&&(t=`${this.carriedFromPrevious}${t}`,this.carriedFromPrevious=void 0);let o=t.length;const n=t.charCodeAt(o-1);!s&&(n===13||n>=55296&&n<=56319)&&(this.carriedFromPrevious=t[o-1],o--,t=t.slice(0,o));const{stateTable:a}=this;for(this.chunk=t,this.i=0;this.i<o;)a[this.state].call(this);return this.chunkPosition+=o,s?this.end():this}close(){return this.write(null)}getCode10(){const t=this.chunk,s=this.i;if(this.prevI=s,this.i++,s>=t.length)return O;const o=t.charCodeAt(s);if(this.column++,o<55296){if(o>=32||o===9)return o;switch(o){case ot:return this.line++,this.column=0,this.positionAtNewLine=this.position,ot;case 13:return t.charCodeAt(s+1)===ot&&(this.i=s+2),this.line++,this.column=0,this.positionAtNewLine=this.position,lt;default:return this.fail("disallowed character."),o}}if(o>56319)return o>=57344&&o<=65533||this.fail("disallowed character."),o;const n=65536+1024*(o-55296)+(t.charCodeAt(s+1)-56320);return this.i=s+2,n>1114111&&this.fail("disallowed character."),n}getCode11(){const{chunk:t,i:s}=this;if(this.prevI=s,this.i=s+1,s>=t.length)return O;const o=t.charCodeAt(s);if(this.column++,o<55296){if(o>31&&o<127||o>159&&o!==8232||o===9)return o;switch(o){case ot:return this.line++,this.column=0,this.positionAtNewLine=this.position,ot;case 13:{const a=t.charCodeAt(s+1);a!==ot&&a!==133||(this.i=s+2)}case 133:case 8232:return this.line++,this.column=0,this.positionAtNewLine=this.position,lt;default:return this.fail("disallowed character."),o}}if(o>56319)return o>=57344&&o<=65533||this.fail("disallowed character."),o;const n=65536+1024*(o-55296)+(t.charCodeAt(s+1)-56320);return this.i=s+2,n>1114111&&this.fail("disallowed character."),n}getCodeNorm(){const t=this.getCode();return t===lt?ot:t}unget(){this.i=this.prevI,this.column--}captureTo(t){let{i:s}=this;const{chunk:o}=this;for(;;){const n=this.getCode(),a=n===lt,c=a?ot:n;if(c===O||t.includes(c))return this.text+=o.slice(s,this.prevI),c;a&&(this.text+=`${o.slice(s,this.prevI)}
6
+ */Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const u=require("@sheetxl/sdk"),Ke=require("./CVQnn-QAlTwmCcqi.cjs"),Ye=":A-Z_a-zÀ-ÖØ-öø-˿Ͱ-ͽͿ-῿‌‍⁰-↏Ⰰ-⿯、-퟿豈-﷏ﷰ-�𐀀-󯿿",bs=new RegExp(`^[${Ye}][-${Ye}.0-9·̀-ͯ‿-⁀]*$`,"u");function rs(i){return i>=65&&i<=90||i>=97&&i<=122||i===58||i===95||i===8204||i===8205||i>=192&&i<=214||i>=216&&i<=246||i>=248&&i<=767||i>=880&&i<=893||i>=895&&i<=8191||i>=8304&&i<=8591||i>=11264&&i<=12271||i>=12289&&i<=55295||i>=63744&&i<=64975||i>=65008&&i<=65533||i>=65536&&i<=983039}const ts="A-Z_a-zÀ-ÖØ-öø-˿Ͱ-ͽͿ-῿‌-‍⁰-↏Ⰰ-⿯、-퟿豈-﷏ﷰ-�𐀀-󯿿",xs=new RegExp(`^[${ts}][-${ts}.0-9·̀-ͯ‿-⁀]*$`,"u");function ns(i){return i>=65&&i<=90||i===95||i>=97&&i<=122||i>=192&&i<=214||i>=216&&i<=246||i>=248&&i<=767||i>=880&&i<=893||i>=895&&i<=8191||i>=8204&&i<=8205||i>=8304&&i<=8591||i>=11264&&i<=12271||i>=12289&&i<=55295||i>=63744&&i<=64975||i>=65008&&i<=65533||i>=65536&&i<=983039}const U=function(i){return i===32||i===10||i===13||i===9},ws=function(i){return i>=32&&i<=55295||i===10||i===13||i===9||i>=57344&&i<=65533||i>=65536&&i<=1114111},re=rs,es=function(i){return rs(i)||i>=48&&i<=57||i===45||i===46||i===183||i>=768&&i<=879||i>=8255&&i<=8256},as=[32,10,13,9],vs=bs,Ss=function(i){return i>=1&&i<=55295||i>=57344&&i<=65533||i>=65536&&i<=1114111},Cs=ns,ks=function(i){return ns(i)||i===45||i===46||i>=48&&i<=57||i===183||i>=768&&i<=879||i>=8255&&i<=8256},As=xs,ge="http://www.w3.org/XML/1998/namespace",Jt="http://www.w3.org/2000/xmlns/",Es={__proto__:null,xml:ge,xmlns:Jt},Ds={__proto__:null,amp:"&",gt:">",lt:"<",quot:'"',apos:"'"},O=-1,lt=-2,W=13,jt=33,ot=10,St=60,Gt=61,M=62,X=63,Zt=93,pe=i=>i===34||i===39,ls=[34,39],Ps=[...ls,91,M],Is=[...ls,St,Zt],Os=[Gt,X,...as],Vs=[...as,M,38,St];function ke(i,t,s){switch(t){case"xml":s!==ge&&i.fail(`xml prefix must be bound to ${ge}.`);break;case"xmlns":s!==Jt&&i.fail(`xmlns prefix must be bound to ${Jt}.`)}switch(s){case Jt:i.fail(t===""?`the default namespace may not be set to ${s}.`:`may not assign a prefix (even "xmlns") to the URI ${Jt}.`);break;case ge:switch(t){case"xml":break;case"":i.fail(`the default namespace may not be set to ${s}.`);break;default:i.fail("may not assign the xml namespace to another prefix.")}}}const Ns=i=>As.test(i),Ls=i=>vs.test(i),ss={xmldecl:"xmldeclHandler",text:"textHandler",processinginstruction:"piHandler",doctype:"doctypeHandler",comment:"commentHandler",opentagstart:"openTagStartHandler",attribute:"attributeHandler",opentag:"openTagHandler",closetag:"closeTagHandler",cdata:"cdataHandler",error:"errorHandler",end:"endHandler",ready:"readyHandler"};class Rs{constructor(t){this.i=0,this.prevI=0,this.opt=t??{},this.fragmentOpt=!!this.opt.fragment;const s=this.xmlnsOpt=!!this.opt.xmlns;if(this.trackPosition=this.opt.position!==!1,this.fileName=this.opt.fileName,s){this.nameStartCheck=Cs,this.nameCheck=ks,this.isName=Ns,this.processAttribs=this.processAttribsNS,this.pushAttrib=this.pushAttribNS,this.ns={__proto__:null,...Es};const o=this.opt.additionalNamespaces;o!=null&&(function(n,a){for(const c of Object.keys(a))ke(n,c,a[c])}(this,o),Object.assign(this.ns,o))}else this.nameStartCheck=re,this.nameCheck=es,this.isName=Ls,this.processAttribs=this.processAttribsPlain,this.pushAttrib=this.pushAttribPlain;this.stateTable=[this.sBegin,this.sBeginWhitespace,this.sDoctype,this.sDoctypeQuote,this.sDTD,this.sDTDQuoted,this.sDTDOpenWaka,this.sDTDOpenWakaBang,this.sDTDComment,this.sDTDCommentEnding,this.sDTDCommentEnded,this.sDTDPI,this.sDTDPIEnding,this.sText,this.sEntity,this.sOpenWaka,this.sOpenWakaBang,this.sComment,this.sCommentEnding,this.sCommentEnded,this.sCData,this.sCDataEnding,this.sCDataEnding2,this.sPIFirstChar,this.sPIRest,this.sPIBody,this.sPIEnding,this.sXMLDeclNameStart,this.sXMLDeclName,this.sXMLDeclEq,this.sXMLDeclValueStart,this.sXMLDeclValue,this.sXMLDeclSeparator,this.sXMLDeclEnding,this.sOpenTag,this.sOpenTagSlash,this.sAttrib,this.sAttribName,this.sAttribNameSawWhite,this.sAttribValue,this.sAttribValueQuoted,this.sAttribValueClosed,this.sAttribValueUnquoted,this.sCloseTag,this.sCloseTagSawWhite],this._init()}get closed(){return this._closed}_init(){this.openWakaBang="",this.text="",this.name="",this.piTarget="",this.entity="",this.q=null,this.tags=[],this.tag=null,this.topNS=null,this.chunk="",this.chunkPosition=0,this.i=0,this.prevI=0,this.carriedFromPrevious=void 0,this.forbiddenState=0,this.attribList=[];const{fragmentOpt:t}=this;this.state=t?W:0,this.reportedTextBeforeRoot=this.reportedTextAfterRoot=this.closedRoot=this.sawRoot=t,this.xmlDeclPossible=!t,this.xmlDeclExpects=["version"],this.entityReturnState=void 0;let{defaultXMLVersion:s}=this.opt;if(s===void 0){if(this.opt.forceXMLVersion===!0)throw new Error("forceXMLVersion set but defaultXMLVersion is not set");s="1.0"}this.setXMLVersion(s),this.positionAtNewLine=0,this.doctype=!1,this._closed=!1,this.xmlDecl={version:void 0,encoding:void 0,standalone:void 0},this.line=1,this.column=0,this.ENTITIES=Object.create(Ds),this.readyHandler?.()}get position(){return this.chunkPosition+this.i}get columnIndex(){return this.position-this.positionAtNewLine}on(t,s){this[ss[t]]=s}off(t){this[ss[t]]=void 0}makeError(t){let s=this.fileName??"";return this.trackPosition&&(s.length>0&&(s+=":"),s+=`${this.line}:${this.column}`),s.length>0&&(s+=": "),new Error(s+t)}fail(t){const s=this.makeError(t),o=this.errorHandler;if(o===void 0)throw s;return o(s),this}write(t){if(this.closed)return this.fail("cannot write after close; assign an onready handler.");let s=!1;t===null?(s=!0,t=""):typeof t=="object"&&(t=t.toString()),this.carriedFromPrevious!==void 0&&(t=`${this.carriedFromPrevious}${t}`,this.carriedFromPrevious=void 0);let o=t.length;const n=t.charCodeAt(o-1);!s&&(n===13||n>=55296&&n<=56319)&&(this.carriedFromPrevious=t[o-1],o--,t=t.slice(0,o));const{stateTable:a}=this;for(this.chunk=t,this.i=0;this.i<o;)a[this.state].call(this);return this.chunkPosition+=o,s?this.end():this}close(){return this.write(null)}getCode10(){const t=this.chunk,s=this.i;if(this.prevI=s,this.i++,s>=t.length)return O;const o=t.charCodeAt(s);if(this.column++,o<55296){if(o>=32||o===9)return o;switch(o){case ot:return this.line++,this.column=0,this.positionAtNewLine=this.position,ot;case 13:return t.charCodeAt(s+1)===ot&&(this.i=s+2),this.line++,this.column=0,this.positionAtNewLine=this.position,lt;default:return this.fail("disallowed character."),o}}if(o>56319)return o>=57344&&o<=65533||this.fail("disallowed character."),o;const n=65536+1024*(o-55296)+(t.charCodeAt(s+1)-56320);return this.i=s+2,n>1114111&&this.fail("disallowed character."),n}getCode11(){const{chunk:t,i:s}=this;if(this.prevI=s,this.i=s+1,s>=t.length)return O;const o=t.charCodeAt(s);if(this.column++,o<55296){if(o>31&&o<127||o>159&&o!==8232||o===9)return o;switch(o){case ot:return this.line++,this.column=0,this.positionAtNewLine=this.position,ot;case 13:{const a=t.charCodeAt(s+1);a!==ot&&a!==133||(this.i=s+2)}case 133:case 8232:return this.line++,this.column=0,this.positionAtNewLine=this.position,lt;default:return this.fail("disallowed character."),o}}if(o>56319)return o>=57344&&o<=65533||this.fail("disallowed character."),o;const n=65536+1024*(o-55296)+(t.charCodeAt(s+1)-56320);return this.i=s+2,n>1114111&&this.fail("disallowed character."),n}getCodeNorm(){const t=this.getCode();return t===lt?ot:t}unget(){this.i=this.prevI,this.column--}captureTo(t){let{i:s}=this;const{chunk:o}=this;for(;;){const n=this.getCode(),a=n===lt,c=a?ot:n;if(c===O||t.includes(c))return this.text+=o.slice(s,this.prevI),c;a&&(this.text+=`${o.slice(s,this.prevI)}
7
7
  `,s=this.i)}}captureToChar(t){let{i:s}=this;const{chunk:o}=this;for(;;){let n=this.getCode();switch(n){case lt:this.text+=`${o.slice(s,this.prevI)}
8
8
  `,s=this.i,n=ot;break;case O:return this.text+=o.slice(s),!1}if(n===t)return this.text+=o.slice(s,this.prevI),!0}}captureNameChars(){const{chunk:t,i:s}=this;for(;;){const o=this.getCode();if(o===O)return this.name+=t.slice(s),O;if(!es(o))return this.name+=t.slice(s,this.prevI),o===lt?ot:o}}skipSpaces(){for(;;){const t=this.getCodeNorm();if(t===O||!U(t))return t}}setXMLVersion(t){this.currentXMLVersion=t,t==="1.0"?(this.isChar=ws,this.getCode=this.getCode10):(this.isChar=Ss,this.getCode=this.getCode11)}sBegin(){this.chunk.charCodeAt(0)===65279&&(this.i++,this.column++),this.state=1}sBeginWhitespace(){const t=this.i,s=this.skipSpaces();switch(this.prevI!==t&&(this.xmlDeclPossible=!1),s){case St:if(this.state=15,this.text.length!==0)throw new Error("no-empty text at start");break;case O:break;default:this.unget(),this.state=W,this.xmlDeclPossible=!1}}sDoctype(){const t=this.captureTo(Ps);switch(t){case M:this.doctypeHandler?.(this.text),this.text="",this.state=W,this.doctype=!0;break;case O:break;default:this.text+=String.fromCodePoint(t),t===91?this.state=4:pe(t)&&(this.state=3,this.q=t)}}sDoctypeQuote(){const t=this.q;this.captureToChar(t)&&(this.text+=String.fromCodePoint(t),this.q=null,this.state=2)}sDTD(){const t=this.captureTo(Is);t!==O&&(this.text+=String.fromCodePoint(t),t===Zt?this.state=2:t===St?this.state=6:pe(t)&&(this.state=5,this.q=t))}sDTDQuoted(){const t=this.q;this.captureToChar(t)&&(this.text+=String.fromCodePoint(t),this.state=4,this.q=null)}sDTDOpenWaka(){const t=this.getCodeNorm();switch(this.text+=String.fromCodePoint(t),t){case 33:this.state=7,this.openWakaBang="";break;case X:this.state=11;break;default:this.state=4}}sDTDOpenWakaBang(){const t=String.fromCodePoint(this.getCodeNorm()),s=this.openWakaBang+=t;this.text+=t,s!=="-"&&(this.state=s==="--"?8:4,this.openWakaBang="")}sDTDComment(){this.captureToChar(45)&&(this.text+="-",this.state=9)}sDTDCommentEnding(){const t=this.getCodeNorm();this.text+=String.fromCodePoint(t),this.state=t===45?10:8}sDTDCommentEnded(){const t=this.getCodeNorm();this.text+=String.fromCodePoint(t),t===M?this.state=4:(this.fail("malformed comment."),this.state=8)}sDTDPI(){this.captureToChar(X)&&(this.text+="?",this.state=12)}sDTDPIEnding(){const t=this.getCodeNorm();this.text+=String.fromCodePoint(t),t===M&&(this.state=4)}sText(){this.tags.length!==0?this.handleTextInRoot():this.handleTextOutsideRoot()}sEntity(){let{i:t}=this;const{chunk:s}=this;t:for(;;)switch(this.getCode()){case lt:this.entity+=`${s.slice(t,this.prevI)}
9
9
  `,t=this.i;break;case 59:{const{entityReturnState:o}=this,n=this.entity+s.slice(t,this.prevI);let a;this.state=o,n===""?(this.fail("empty entity name."),a="&;"):(a=this.parseEntity(n),this.entity=""),o===W&&this.textHandler===void 0||(this.text+=a);break t}case O:this.entity+=s.slice(t);break t}}sOpenWaka(){const t=this.getCode();if(re(t))this.state=34,this.unget(),this.xmlDeclPossible=!1;else switch(t){case 47:this.state=43,this.xmlDeclPossible=!1;break;case 33:this.state=16,this.openWakaBang="",this.xmlDeclPossible=!1;break;case X:this.state=23;break;default:this.fail("disallowed character in tag name"),this.state=W,this.xmlDeclPossible=!1}}sOpenWakaBang(){switch(this.openWakaBang+=String.fromCodePoint(this.getCodeNorm()),this.openWakaBang){case"[CDATA[":this.sawRoot||this.reportedTextBeforeRoot||(this.fail("text data outside of root node."),this.reportedTextBeforeRoot=!0),this.closedRoot&&!this.reportedTextAfterRoot&&(this.fail("text data outside of root node."),this.reportedTextAfterRoot=!0),this.state=20,this.openWakaBang="";break;case"--":this.state=17,this.openWakaBang="";break;case"DOCTYPE":this.state=2,(this.doctype||this.sawRoot)&&this.fail("inappropriately located doctype declaration."),this.openWakaBang="";break;default:this.openWakaBang.length>=7&&this.fail("incorrect syntax.")}}sComment(){this.captureToChar(45)&&(this.state=18)}sCommentEnding(){const t=this.getCodeNorm();t===45?(this.state=19,this.commentHandler?.(this.text),this.text=""):(this.text+=`-${String.fromCodePoint(t)}`,this.state=17)}sCommentEnded(){const t=this.getCodeNorm();t!==M?(this.fail("malformed comment."),this.text+=`--${String.fromCodePoint(t)}`,this.state=17):this.state=W}sCData(){this.captureToChar(Zt)&&(this.state=21)}sCDataEnding(){const t=this.getCodeNorm();t===Zt?this.state=22:(this.text+=`]${String.fromCodePoint(t)}`,this.state=20)}sCDataEnding2(){const t=this.getCodeNorm();switch(t){case M:this.cdataHandler?.(this.text),this.text="",this.state=W;break;case Zt:this.text+="]";break;default:this.text+=`]]${String.fromCodePoint(t)}`,this.state=20}}sPIFirstChar(){const t=this.getCodeNorm();this.nameStartCheck(t)?(this.piTarget+=String.fromCodePoint(t),this.state=24):t===X||U(t)?(this.fail("processing instruction without a target."),this.state=t===X?26:25):(this.fail("disallowed character in processing instruction name."),this.piTarget+=String.fromCodePoint(t),this.state=24)}sPIRest(){const{chunk:t,i:s}=this;for(;;){const o=this.getCodeNorm();if(o===O)return void(this.piTarget+=t.slice(s));if(!this.nameCheck(o)){this.piTarget+=t.slice(s,this.prevI);const n=o===X;n||U(o)?this.piTarget==="xml"?(this.xmlDeclPossible||this.fail("an XML declaration must be at the start of the document."),this.state=n?jt:27):this.state=n?26:25:(this.fail("disallowed character in processing instruction name."),this.piTarget+=String.fromCodePoint(o));break}}}sPIBody(){if(this.text.length===0){const t=this.getCodeNorm();t===X?this.state=26:U(t)||(this.text=String.fromCodePoint(t))}else this.captureToChar(X)&&(this.state=26)}sPIEnding(){const t=this.getCodeNorm();if(t===M){const{piTarget:s}=this;s.toLowerCase()==="xml"&&this.fail("the XML declaration must appear at the start of the document."),this.piHandler?.({target:s,body:this.text}),this.piTarget=this.text="",this.state=W}else t===X?this.text+="?":(this.text+=`?${String.fromCodePoint(t)}`,this.state=25);this.xmlDeclPossible=!1}sXMLDeclNameStart(){const t=this.skipSpaces();t!==X?t!==O&&(this.state=28,this.name=String.fromCodePoint(t)):this.state=jt}sXMLDeclName(){const t=this.captureTo(Os);if(t===X)return this.state=jt,this.name+=this.text,this.text="",void this.fail("XML declaration is incomplete.");if(U(t)||t===Gt){if(this.name+=this.text,this.text="",!this.xmlDeclExpects.includes(this.name))switch(this.name.length){case 0:this.fail("did not expect any more name/value pairs.");break;case 1:this.fail(`expected the name ${this.xmlDeclExpects[0]}.`);break;default:this.fail(`expected one of ${this.xmlDeclExpects.join(", ")}`)}this.state=t===Gt?30:29}}sXMLDeclEq(){const t=this.getCodeNorm();if(t===X)return this.state=jt,void this.fail("XML declaration is incomplete.");U(t)||(t!==Gt&&this.fail("value required."),this.state=30)}sXMLDeclValueStart(){const t=this.getCodeNorm();if(t===X)return this.state=jt,void this.fail("XML declaration is incomplete.");U(t)||(pe(t)?this.q=t:(this.fail("value must be quoted."),this.q=32),this.state=31)}sXMLDeclValue(){const t=this.captureTo([this.q,X]);if(t===X)return this.state=jt,this.text="",void this.fail("XML declaration is incomplete.");if(t===O)return;const s=this.text;switch(this.text="",this.name){case"version":{this.xmlDeclExpects=["encoding","standalone"];const o=s;this.xmlDecl.version=o,/^1\.[0-9]+$/.test(o)?this.opt.forceXMLVersion||this.setXMLVersion(o):this.fail("version number must match /^1\\.[0-9]+$/.");break}case"encoding":/^[A-Za-z][A-Za-z0-9._-]*$/.test(s)||this.fail("encoding value must match /^[A-Za-z0-9][A-Za-z0-9._-]*$/."),this.xmlDeclExpects=["standalone"],this.xmlDecl.encoding=s;break;case"standalone":s!=="yes"&&s!=="no"&&this.fail('standalone value must match "yes" or "no".'),this.xmlDeclExpects=[],this.xmlDecl.standalone=s}this.name="",this.state=32}sXMLDeclSeparator(){const t=this.getCodeNorm();t!==X?(U(t)||(this.fail("whitespace required."),this.unget()),this.state=27):this.state=jt}sXMLDeclEnding(){this.getCodeNorm()===M?(this.piTarget!=="xml"?this.fail("processing instructions are not allowed before root."):this.name!=="version"&&this.xmlDeclExpects.includes("version")&&this.fail("XML declaration must contain a version."),this.xmldeclHandler?.(this.xmlDecl),this.name="",this.piTarget=this.text="",this.state=W):this.fail("The character ? is disallowed anywhere in XML declarations."),this.xmlDeclPossible=!1}sOpenTag(){const t=this.captureNameChars();if(t===O)return;const s=this.tag={name:this.name,attributes:Object.create(null)};switch(this.name="",this.xmlnsOpt&&(this.topNS=s.ns=Object.create(null)),this.openTagStartHandler?.(s),this.sawRoot=!0,!this.fragmentOpt&&this.closedRoot&&this.fail("documents may contain only one root."),t){case M:this.openTag();break;case 47:this.state=35;break;default:U(t)||this.fail("disallowed character in tag name."),this.state=36}}sOpenTagSlash(){this.getCode()===M?this.openSelfClosingTag():(this.fail("forward-slash in opening tag not followed by >."),this.state=36)}sAttrib(){const t=this.skipSpaces();t!==O&&(re(t)?(this.unget(),this.state=37):t===M?this.openTag():t===47?this.state=35:this.fail("disallowed character in attribute name."))}sAttribName(){const t=this.captureNameChars();t===Gt?this.state=39:U(t)?this.state=38:t===M?(this.fail("attribute without value."),this.pushAttrib(this.name,this.name),this.name=this.text="",this.openTag()):t!==O&&this.fail("disallowed character in attribute name.")}sAttribNameSawWhite(){const t=this.skipSpaces();switch(t){case O:return;case Gt:this.state=39;break;default:this.fail("attribute without value."),this.text="",this.name="",t===M?this.openTag():re(t)?(this.unget(),this.state=37):(this.fail("disallowed character in attribute name."),this.state=36)}}sAttribValue(){const t=this.getCodeNorm();pe(t)?(this.q=t,this.state=40):U(t)||(this.fail("unquoted attribute value."),this.state=42,this.unget())}sAttribValueQuoted(){const{q:t,chunk:s}=this;let{i:o}=this;for(;;)switch(this.getCode()){case t:return this.pushAttrib(this.name,this.text+s.slice(o,this.prevI)),this.name=this.text="",this.q=null,void(this.state=41);case 38:return this.text+=s.slice(o,this.prevI),this.state=14,void(this.entityReturnState=40);case ot:case lt:case 9:this.text+=`${s.slice(o,this.prevI)} `,o=this.i;break;case St:return this.text+=s.slice(o,this.prevI),void this.fail("disallowed character.");case O:return void(this.text+=s.slice(o))}}sAttribValueClosed(){const t=this.getCodeNorm();U(t)?this.state=36:t===M?this.openTag():t===47?this.state=35:re(t)?(this.fail("no whitespace between attributes."),this.unget(),this.state=37):this.fail("disallowed character in attribute name.")}sAttribValueUnquoted(){const t=this.captureTo(Vs);switch(t){case 38:this.state=14,this.entityReturnState=42;break;case St:this.fail("disallowed character.");break;case O:break;default:this.text.includes("]]>")&&this.fail('the string "]]>" is disallowed in char data.'),this.pushAttrib(this.name,this.text),this.name=this.text="",t===M?this.openTag():this.state=36}}sCloseTag(){const t=this.captureNameChars();t===M?this.closeTag():U(t)?this.state=44:t!==O&&this.fail("disallowed character in closing tag.")}sCloseTagSawWhite(){switch(this.skipSpaces()){case M:this.closeTag();break;case O:break;default:this.fail("disallowed character in closing tag.")}}handleTextInRoot(){let{i:t,forbiddenState:s}=this;const{chunk:o,textHandler:n}=this;t:for(;;)switch(this.getCode()){case St:if(this.state=15,n!==void 0){const{text:a}=this,c=o.slice(t,this.prevI);a.length!==0?(n(a+c),this.text=""):c.length!==0&&n(c)}s=0;break t;case 38:this.state=14,this.entityReturnState=W,n!==void 0&&(this.text+=o.slice(t,this.prevI)),s=0;break t;case Zt:switch(s){case 0:s=1;break;case 1:s=2;break;case 2:break;default:throw new Error("impossible state")}break;case M:s===2&&this.fail('the string "]]>" is disallowed in char data.'),s=0;break;case lt:n!==void 0&&(this.text+=`${o.slice(t,this.prevI)}
10
10
  `),t=this.i,s=0;break;case O:n!==void 0&&(this.text+=o.slice(t));break t;default:s=0}this.forbiddenState=s}handleTextOutsideRoot(){let{i:t}=this;const{chunk:s,textHandler:o}=this;let n=!1;t:for(;;){const a=this.getCode();switch(a){case St:if(this.state=15,o!==void 0){const{text:c}=this,T=s.slice(t,this.prevI);c.length!==0?(o(c+T),this.text=""):T.length!==0&&o(T)}break t;case 38:this.state=14,this.entityReturnState=W,o!==void 0&&(this.text+=s.slice(t,this.prevI)),n=!0;break t;case lt:o!==void 0&&(this.text+=`${s.slice(t,this.prevI)}
11
- `),t=this.i;break;case O:o!==void 0&&(this.text+=s.slice(t));break t;default:U(a)||(n=!0)}}n&&(this.sawRoot||this.reportedTextBeforeRoot||(this.fail("text data outside of root node."),this.reportedTextBeforeRoot=!0),this.closedRoot&&!this.reportedTextAfterRoot&&(this.fail("text data outside of root node."),this.reportedTextAfterRoot=!0))}pushAttribNS(t,s){const{prefix:o,local:n}=this.qname(t),a={name:t,prefix:o,local:n,value:s};if(this.attribList.push(a),this.attributeHandler?.(a),o==="xmlns"){const c=s.trim();this.currentXMLVersion==="1.0"&&c===""&&this.fail("invalid attempt to undefine prefix in XML 1.0"),this.topNS[n]=c,ke(this,n,c)}else if(t==="xmlns"){const c=s.trim();this.topNS[""]=c,ke(this,"",c)}}pushAttribPlain(t,s){const o={name:t,value:s};this.attribList.push(o),this.attributeHandler?.(o)}end(){this.sawRoot||this.fail("document must contain a root element.");const{tags:t}=this;for(;t.length>0;){const o=t.pop();this.fail(`unclosed tag: ${o.name}`)}this.state!==0&&this.state!==W&&this.fail("unexpected end.");const{text:s}=this;return s.length!==0&&(this.textHandler?.(s),this.text=""),this._closed=!0,this.endHandler?.(),this._init(),this}resolve(t){let s=this.topNS[t];if(s!==void 0)return s;const{tags:o}=this;for(let n=o.length-1;n>=0;n--)if(s=o[n].ns[t],s!==void 0)return s;return s=this.ns[t],s!==void 0?s:this.opt.resolvePrefix?.(t)}qname(t){const s=t.indexOf(":");if(s===-1)return{prefix:"",local:t};const o=t.slice(s+1),n=t.slice(0,s);return(n===""||o===""||o.includes(":"))&&this.fail(`malformed name: ${t}.`),{prefix:n,local:o}}processAttribsNS(){const{attribList:t}=this,s=this.tag;{const{prefix:a,local:c}=this.qname(s.name);s.prefix=a,s.local=c;const T=s.uri=this.resolve(a)??"";a!==""&&(a==="xmlns"&&this.fail('tags may not have "xmlns" as prefix.'),T===""&&(this.fail(`unbound namespace prefix: ${JSON.stringify(a)}.`),s.uri=a))}if(t.length===0)return;const{attributes:o}=s,n=new Set;for(const a of t){const{name:c,prefix:T,local:S}=a;let x,w;T===""?(x=c==="xmlns"?Jt:"",w=c):(x=this.resolve(T),x===void 0&&(this.fail(`unbound namespace prefix: ${JSON.stringify(T)}.`),x=T),w=`{${x}}${S}`),n.has(w)&&this.fail(`duplicate attribute: ${w}.`),n.add(w),a.uri=x,o[c]=a}this.attribList=[]}processAttribsPlain(){const{attribList:t}=this,s=this.tag.attributes;for(const{name:o,value:n}of t)s[o]!==void 0&&this.fail(`duplicate attribute: ${o}.`),s[o]=n;this.attribList=[]}openTag(){this.processAttribs();const{tags:t}=this,s=this.tag;s.isSelfClosing=!1,this.openTagHandler?.(s),t.push(s),this.state=W,this.name=""}openSelfClosingTag(){this.processAttribs();const{tags:t}=this,s=this.tag;s.isSelfClosing=!0,this.openTagHandler?.(s),this.closeTagHandler?.(s),(this.tag=t[t.length-1]??null)===null&&(this.closedRoot=!0),this.state=W,this.name=""}closeTag(){const{tags:t,name:s}=this;if(this.state=W,this.name="",s==="")return this.fail("weird empty close tag."),void(this.text+="</>");const o=this.closeTagHandler;let n=t.length;for(;n-- >0;){const a=this.tag=t.pop();if(this.topNS=a.ns,o?.(a),a.name===s)break;this.fail("unexpected close tag.")}n===0?this.closedRoot=!0:n<0&&(this.fail(`unmatched closing tag: ${s}.`),this.text+=`</${s}>`)}parseEntity(t){if(t[0]!=="#"){const o=this.ENTITIES[t];return o!==void 0?o:(this.fail(this.isName(t)?"undefined entity.":"disallowed character in entity name."),`&${t};`)}let s=NaN;return t[1]==="x"&&/^#x[0-9a-f]+$/i.test(t)?s=parseInt(t.slice(2),16):/^#[0-9]+$/.test(t)&&(s=parseInt(t.slice(1),10)),this.isChar(s)?String.fromCodePoint(s):(this.fail("malformed character entity."),`&${t};`)}}var Ae,Tt;(Tt=Ae||(Ae={})).Events={XmlDecl:"xmldecl",Text:"text",ProcessingInstruction:"processinginstruction",Doctype:"doctype",Comment:"comment",OpenTagStart:"opentagstart",Attribute:"attribute",OpenTag:"opentag",CloseTag:"closetag",CDdata:"cdata",Error:"error",End:"end",Ready:"ready"},Tt.parseStream=async(i,t,s)=>{const o=new Rs({position:!1,...s});let n;if(t.onOpenTagStart&&o.on(Tt.Events.OpenTagStart,t.onOpenTagStart),t.onOpenTag&&o.on(Tt.Events.OpenTag,t.onOpenTag),t.onCloseTag&&o.on(Tt.Events.CloseTag,t.onCloseTag),t.onAttribute&&o.on(Tt.Events.Attribute,t.onAttribute),t.onText&&o.on(Tt.Events.Text,t.onText),t.onError&&o.on(Tt.Events.Error,t.onError),t.onEnd){t.onEnd;const a=()=>{n=t.onEnd()};o.on(Tt.Events.End,a)}for(;;){const{value:a,done:c}=await i.read();if(c)break;o.write(a)}return o.close(),n};const v=i=>i===!0||i==="1"||i==="on"||i==="true"||i!==!1&&i!=="0"&&i!=="off"&&i!=="false"&&null,E=i=>{const t=parseInt(i);return isNaN(t)?null:t},ct=i=>{const t=parseFloat(i);return isNaN(t)?null:t},A=null;class $s{constructor(){this._registeredVisitors=new Map}registerVisitor(t){this._registeredVisitors.set(t.from,t)}createEventHandler(t,s,o){const n=this._registeredVisitors,a=[];let c=null,T=null,S=null,x=null;const w=[],D={key:null,source:t};let b=null,d=!1;const P=(y,m)=>{let V=S.attributes[y];if(m){if(Array.isArray(m)){for(let H=0;H<m.length;H++)if(V==null||(V=m[H](V),V==null))return}else if(V==null||(V=m(V),V==null))return}return V},f={getSource:()=>b.source,setSource:y=>{b.source=y},setKey:y=>{b.key=y},getFrom:()=>S,getAttribute:(y,m)=>P(y,m)??null,hasAttribute:y=>f.getAttribute(y)!==null,getParent:()=>w[w.length-2].source,getPath:()=>{const y=[];for(let m=0;m<a.length;m++)y.push(a[m].local);return y.join("\\")},parseAttribute:P,copyToObject:(y,m,V,H)=>{const q=P(H??m,V);q!==void 0&&(y[m]=q)},copyTo:(y,m,V)=>{const H=P(V??y,m);H!==void 0&&(b.source[y]=H)},warn:y=>{o?o?.(y):console.warn(y)}};return{onOpenTag:y=>{let m=y.name;const V=m.indexOf(":");V!==-1&&(m=m.slice(V+1));const H=n.get(m);if(c={local:m,visitor:H,tag:y,destination:null},d)return a.push(c),T=m,void(S=y);x=c?.visitor??null,H&&(b=a.length===0?D:x?.to!==null?{key:null,source:{}}:null,c.destination=b,b&&w.push(b)),a.push(c),T=m,S=y,d=x?.to===null,x?.openTag?.(f)},onCloseTag:y=>{let m=y.name;const V=m.indexOf(":");if(V!==-1&&(m=m.slice(V+1)),m!==T)throw new Error(`mismatch open/close tag: '${m}'/'${T}'`);d||x?.closeTag?.(f);const H=a.pop()??null;c=a[a.length-1]??null;const q=H?.destination;if(q){w.pop(),b=w[w.length-1]??D;const ht=H.visitor;ht&&ht.to&&q.source!==void 0&&(Array.isArray(ht.to)?b.source.push?b.source.push(q.source):o?.(`Unable to parse array for ${ht.from} at ${f.getPath()}`):q.key?b.source[q.key]=q.source:typeof ht.to=="string"&&(b.source[ht.to]=q.source))}T=c?.local??null,S=c?.tag??null,x=c?.visitor??null,d=!c?.destination},onText:y=>{x?.text?.(y,f)},onEnd:s}}}const is=(i,t,s,o=null)=>{if(!i)return null;let n=i;n.startsWith("/")&&(n=n.substring(1));let a=o?.parsedRefs?.get(i);if(a!==void 0)return a;const c=t(n);if(!c)return null;let T=c.content;try{s&&(T=s(T))}catch(S){console.warn(S)}return o?.parsedRefs?.set(i,T),T},Ee=(i,t,s,o,n=null)=>{if(!i)return null;let a=i;a.startsWith("/")&&(a=a.substring(1));let c=n?.parsedRefs?.get(i);if(c!==void 0)return c;const T=t(a);if(!T)return null;const S=T.content;try{const x=new TextDecoder().decode(S),w=s.parseFromString(x,"text/xml"),D=o.convert(w,i,n);return n?.parsedRefs?.set(i,D),D}catch(x){console.warn(x)}return null},zt=(i,t,s,o,n=null)=>{const a=new Map;let c=t.Directory[i];const T=c?c.length:0;for(let S=0;S<T;S++){const x=c[S];if(!x)continue;let w=x;w.startsWith("/")&&(w=w.substring(1));const D=Ee(w,b=>t.files[b],s,o,n);a.set(w,D)}return a},Fs=["lt1","dk1","lt2","dk2","accent1","accent2","accent3","accent4","accent5","accent6","hlink","folHlink"],De=(i,t="dk1")=>{let s;const o=i("auto");o===void 0||o!=="1"&&o!=="true"||(s=t);const n=i("indexed");n&&(s=`index${n}`);const a=i("rgb");a&&(s=a.toLowerCase(),a.length!==8||a.startsWith("FF")||(s="FF"+a.substring(2,a.length)));const c=i("theme");c&&(s=Fs[c]);let T=i("tint");if(T&&(s+=` ${u.IColor.AdjustmentType.ETint} ${parseFloat(T)}`),s)return s},cs=i=>i&&i.replace(/^\{([\s\S]+)\}$/,"$1"),hs=i=>i==="true"||i==="1";class Ht{static{this.Collapsed=1}static{this.CustomFormat=2}static{this.CustomHeight=4}static{this.Hidden=8}static{this.Ht=16}static{this.OutlineLevel=32}static{this.Ph=64}static{this.R=128}static{this.S=256}static{this.Spans=512}static{this.ThickBot=1024}static{this.ThickTop=2048}}const Ms=(i,t,s)=>{if(i[0].value[0]===i[1].value[0])return t},os={colStart:0,colEnd:0,rowStart:0,rowEnd:0},js=Object.freeze(Object.defineProperty({__proto__:null,fromBufferXLSX:async(i,t)=>{const{password:s,onWarning:o,createWorkbookOptions:n={},...a}=t??{},c=Promise.resolve().then(()=>require("./BUwmvmcdC0xBQ97L.cjs")),T=Promise.resolve().then(()=>require("./W7LR70ajtjR9Lmvl.cjs"));let S=null;try{S=new DOMParser}catch{}let x=null;S||(x=Promise.resolve().then(()=>require("./DD8-ZSDUkRqk7l6y.cjs")).then(d=>d.i));let w=null,D=null,b=null;try{const d=await Promise.all([c,T,x]);w=d[0],D=d[1],b=d[2]}catch(d){throw new Error("Unable to load XLSX parser.",{cause:d})}try{const d=w.read(i,{type:"array",sheets:[],cellStyles:!1,bookFiles:!0});if(!d.Directory)throw new Error("Unable to parse as an Excel document. Try to save as '.xlsx' and try again.");d.Directory.richstructure=["/xl/richData/rdrichvaluestructure.xml"],d.Directory.richdata=["/xl/richData/rdrichvalue.xml"];const P=new D.FromOOXMLConverter,f=S??new b.DOMParser,y=n?.resources??new u.ResourceCollection,m=y.beginPersist(),V={},H=new Set,q=new Map;q.set("richTypes",[]);const ht=new Map,Pe=[],ne=I=>d.files[I],fe=(I,z)=>{const Y=I.lastIndexOf("/"),ut=I.substring(0,Y+1)+"_rels/"+I.substring(Y+1,I.length)+".rels";let dt=z.get(ut);return dt||(dt=(($,be,xe,we,Xt=null)=>{if(!$)return null;const tt=Ee($,be,xe,we,Xt);if(!tt)return null;const et=new Map,bt=Object.keys(tt),Bt=bt.length;for(let xt=0;xt<Bt;xt++){const Wt=bt[xt],kt=tt[Wt];et.set(Wt,kt)}return et})(ut,ne,f,P,yt),z.set(ut,dt)),dt},ae=(I,z,Y,ut=ht)=>{let dt=fe(z,ut).get(I),$=dt?.target;if(!$)return null;if(dt.targetMode==="External")return dt.target;const be=z.lastIndexOf("/"),xe=z.substring(0,be+1);$.startsWith("/")||($=xe+$),$=(tt=>{const et=tt.split(/\/+/);return et.reduce((bt,Bt,xt)=>(Bt==="."?bt.splice(xt,1):Bt===".."&&bt.splice(xt-1,2),bt),et).join("/")})($);const we=P?.getVisitorParamsState().get("dxfs");let Xt=ut.get($);if(!Xt)if(dt.type==="http://schemas.openxmlformats.org/officeDocument/2006/relationships/worksheet"){const tt={};Xt=tt;const et=async()=>{const bt=((N,G,Qt,_,Z,J,wt)=>{const h=new $s,Q=new u.Tuple.TransposedBuilder;let j=null;h.registerVisitor({from:"autoFilter",to:"filter",openTag:e=>{e.copyTo("ref",A)}}),h.registerVisitor({from:"conditionalFormatting",to:{},openTag:e=>{const r=e.getParent();r.conditionals||(r.conditionals=[]),r.conditionals.push(e.getSource());const l=e.getAttribute("sqref");l&&(e.getSource().ref=l.split(" ").join(",")),e.copyTo("pivot",v)},closeTag:e=>{const r=e.getSource();if(r.rule){const l=Object.keys(r.rule);for(let p=0;p<l.length;p++){const C=l[p];C!=="rule"&&(r[C]=r.rule[C])}}delete r.rule}}),h.registerVisitor({from:"cfRule",to:"rule",openTag:e=>{const r=e.getParent();e.copyToObject(r,"type",A),e.copyToObject(r,"priority",E),e.copyToObject(r,"stopIfTrue",v);const l=e.getAttribute("dxfId",E);if(l!==null){let p=_?.get(l);p||(J?.(`Unable to load conditional color. Invalid dxfI: '${l}' at '${e.getPath()}'.`),p={}),r.style=p}e.copyToObject(r,"aboveAverage",v),e.copyToObject(r,"equalAverage",v),e.copyToObject(r,"stdDev",E),e.copyToObject(r,"bottom",v),e.copyToObject(r,"percent",v),e.copyToObject(r,"rank",E),e.copyToObject(r,"operator",A),e.copyToObject(r,"text",A),e.copyToObject(r,"timePeriod",A)}}),h.registerVisitor({from:"colorScale",to:"colorScale"}),h.registerVisitor({from:"dataBar",to:"dataBar",openTag:e=>{e.copyTo("maxLength",E),e.copyTo("minLength",E),e.copyTo("showValue",v)}}),h.registerVisitor({from:"iconSet",to:"iconSet",openTag:e=>{e.copyTo("iconSet",A),e.copyTo("reverse",v),e.copyTo("showValue",v)}}),h.registerVisitor({from:"formula",to:null,text:(e,r)=>{const l=r.getParent();let p=l.formulas;p||(p=[],l.formulas=p),p.push(e)}}),h.registerVisitor({from:"cfvo",to:{},openTag:e=>{const r=e.getParent();r.conditions||(r.conditions=[]),r.conditions.push(e.getSource()),e.copyTo("type",A),e.copyTo("value",ct,"val"),e.copyTo("gte",v)}}),h.registerVisitor({from:"color",to:{},openTag:e=>{const r=e.getParent();r.colors||(r.colors=[]);const l=De(p=>e.getAttribute(p));r.colors.push(l)}}),h.registerVisitor({from:"filterColumn",to:"filterColumn",openTag:e=>{const r=e.getParent();r.fields||(r.fields=[]),r.fields.push(e.getSource()),e.copyTo("offset",E,"colId"),e.copyTo("hiddenButton",v),e.copyTo("showButton",v)}}),h.registerVisitor({from:"colorFilter",to:"colorFilter",openTag:e=>{const r=e.getParent();r.criteria||(r.criteria=[]),r.criteria.push(e.getSource()),e.getSource().type=u.IAutoFilter.Type.Color,e.copyTo("cellColor",v),e.copyTo("styleId",E,"dxfId")}}),h.registerVisitor({from:"dynamicFilter",to:"dynamicFilter",openTag:e=>{const r=e.getParent();r.criteria||(r.criteria=[]),r.criteria.push(e.getSource()),e.getSource().type=u.IAutoFilter.Type.Dynamic,e.copyTo("dynamicType",A,"type"),e.copyTo("val",ct),e.copyTo("maxVal",ct,"maxVal")}}),h.registerVisitor({from:"iconFilter",to:"iconFilter",openTag:e=>{const r=e.getParent();r.criteria||(r.criteria=[]),r.criteria.push(e.getSource()),e.getSource().type=u.IAutoFilter.Type.Icon,e.copyTo("iconId",E),e.copyTo("iconSet",A)}}),h.registerVisitor({from:"top10",to:"top10",openTag:e=>{const r=e.getParent();r.criteria||(r.criteria=[]),r.criteria.push(e.getSource()),e.getSource().type=u.IAutoFilter.Type.Top10,e.copyTo("filterVal",ct),e.copyTo("percent",v),e.copyTo("top",v),e.copyTo("val",ct)}}),h.registerVisitor({from:"filters",to:"filters",openTag:e=>{const r=e.getParent();r.criteria||(r.criteria=[]),r.criteria.push(e.getSource()),e.getSource().type=u.IAutoFilter.Type.Items,e.copyTo("blank",v),e.copyTo("calendarType",A)}}),h.registerVisitor({from:"dateGroupItem",to:"dateGroupItem",openTag:e=>{const r=e.getParent();r.dateGroups||(r.dateGroups=[]),r.dateGroups.push(e.getSource()),e.copyTo("group",A,"dateTimeGrouping"),e.copyTo("day",E),e.copyTo("hour",E),e.copyTo("minute",E),e.copyTo("month",E),e.copyTo("second",E),e.copyTo("year",E)}}),h.registerVisitor({from:"filter",to:"filter",openTag:e=>{const r=e.getParent();r.items||(r.items=[]),r.items.push(e.getAttribute("val",ct))}}),h.registerVisitor({from:"customFilters",to:"customFilters",openTag:e=>{const r=e.getParent();r.criteria||(r.criteria=[]),r.criteria.push(e.getSource()),e.getSource().type=u.IAutoFilter.Type.Custom,e.copyTo("and",v)}}),h.registerVisitor({from:"customFilter",to:"customFilter",openTag:e=>{const r=e.getParent();r.filters||(r.filters=[]),r.filters.push(e.getSource()),e.copyTo("operator",A),e.copyTo("value",ct,"val")}}),h.registerVisitor({from:"sortState",to:"sort",openTag:e=>{e.copyTo("ref",A)}}),h.registerVisitor({from:"sortCondition",to:"sortCondition",openTag:e=>{const r=e.getParent();r.fields||(r.fields=[]);const l=e.getSource();r.fields.push(l),e.copyTo("sortOn",A,"sortBy"),e.copyTo("dxfId",A,"sortBy"),e.copyTo("iconSet",A),e.copyTo("customList",A);const p=e.getAttribute("ref");if(p){const C=u.AddressUtils.fastStringToRange(p,os).colStart,pt=u.AddressUtils.fastStringToRange(r.ref,os),rt=pt.colStart;l.offset=pt?C-rt:C}l.reverse=e.getAttribute("descending",v)??!1}}),h.registerVisitor({from:"AlternateContent",to:null});const ue=e=>{j=e.getSource(),e.copyTo("topLeft",A,"topLeftCell");const r=hs(e.getAttribute("defaultGridColor")),l=e.getAttribute("colorId");l===null||r||(e.getSource().gridLineColor="index"+parseFloat(l)),e.copyTo("showZeros",v),e.copyTo("showFormulas",v),e.copyTo("zoomScale",E),e.copyTo("showRowHeaders",v,"showRowColHeaders"),e.copyTo("showColumnHeaders",v,"showRowColHeaders"),e.copyTo("showRowGridlines",v,"showGridLines"),e.copyTo("showColumnGridlines",v,"showGridLines")};h.registerVisitor({from:"sheetView",to:"view",openTag:e=>{ue(e)},closeTag:()=>{j=null}}),h.registerVisitor({from:"customSheetViews",to:"customSheetViews",openTag:e=>{e.setSource([])}}),h.registerVisitor({from:"customSheetView",to:[],openTag:e=>{ue(e)},closeTag:()=>{j=null}}),h.registerVisitor({from:"selection",to:"selection",openTag:e=>{if(!j)return;e.copyTo("cell",A,"activeCell"),e.copyTo("rangeIndex",E,"activeCellId");const r=e.getAttribute("activeCell"),l=e.getAttribute("sqref");l&&l!==r&&(e.getSource().ranges=l.split(" "))}}),h.registerVisitor({from:"pane",to:"pane",openTag:e=>{if(j&&e.getAttribute("state")==="frozen"){const r={};j.freezePanes=r,e.copyToObject(r,"topLeft",A,"topLeftCell");const l=j.topLeft?u.AddressUtils.fastStringToCell(j.topLeft):{colIndex:0,rowIndex:0},p={colIndex:0,rowIndex:0};e.copyToObject(p,"colIndex",E,"xSplit"),e.copyToObject(p,"rowIndex",E,"ySplit");const C={colIndex:l.colIndex+p.colIndex,rowIndex:l.rowIndex+p.rowIndex};r.coords=u.AddressUtils.cellToString(C)}}}),h.registerVisitor({from:"tabColor",to:null,openTag:e=>{const r=De(l=>e.getAttribute(l));r&&(N.tabColor=r)}}),h.registerVisitor({from:"pageSetUpPr",to:"pageSetUpPr",openTag:e=>{}}),h.registerVisitor({from:"outlinePr",to:"outlinePr",openTag:e=>{}}),h.registerVisitor({from:"pageMargins",to:"pageMargins",openTag:e=>{}}),h.registerVisitor({from:"pageSetup",to:"pageSetup",openTag:e=>{}}),h.registerVisitor({from:"printOptions",to:"printOptions",openTag:e=>{}}),h.registerVisitor({from:"mergeCells",to:"merges",openTag:e=>{e.setSource([])}}),h.registerVisitor({from:"mergeCell",to:[],openTag:e=>{const r=e.getAttribute("ref");e.setSource(r)}}),h.registerVisitor({from:"hyperlinks",to:"hyperlinks",openTag:e=>{e.setSource([])}}),h.registerVisitor({from:"hyperlink",to:[],openTag:e=>{const r=e.getAttribute("r:id"),l=e.getAttribute("ref");if(!l)return void console.warn("No ref found for hyperlink");e.setKey(l);let p=r?G(r):"";if(typeof p!="string")return void console.warn("Invalid address ",p);const C=e.getAttribute("location");p.endsWith("\\")&&(p=p.substring(0,p.length-1));const pt=e.getAttribute("location");if(pt&&(C&&C!==pt&&console.warn("display and location are different",C,pt),p+="#"+pt),!p)return void console.warn("No address found for hyperlink. r:id",r);let rt;const At=e.getAttribute("tooltip");rt=At?{address:p,tooltip:At}:p,e.setSource({r:l,v:rt})}}),h.registerVisitor({from:"drawing",to:"movables",openTag:e=>{const r=e.getAttribute("r:id");if(!r)return;const l=G(r);l?e.setSource(l.movables):console.warn("no drawing found for rId",r)}}),h.registerVisitor({from:"tableParts",to:"tables",openTag:e=>{e.setSource([])}}),h.registerVisitor({from:"tablePart",to:[],openTag:e=>{const r=e.getAttribute("r:id");if(!r)return;const l=G(r);l?e.setSource(l):console.warn("no table found for rId",r)}}),h.registerVisitor({from:"worksheet",to:"worksheet",openTag:e=>{}}),h.registerVisitor({from:"sheetProtection",to:"protection",openTag:e=>{let r=!1;if(e.hasAttribute("sheet")&&v(e.getAttribute("sheet"))&&(r=!0),!r)return void e.setSource(void 0);const l=C=>C===!0||C==="1"||C==="on"||C==="true"||C===!1||C==="0"||C==="off"||C==="false"||null;e.copyTo("autoFilter",l),e.copyTo("deleteColumns",l),e.copyTo("formatCells",l),e.copyTo("formatColumns",l),e.copyTo("formatRows",l),e.copyTo("insertColumns",l),e.copyTo("insertHyperlinks",l),e.copyTo("insertRows",l),e.copyTo("objects",l),e.copyTo("pivotTables",l),e.copyTo("scenarios",l),e.copyTo("selectUnlockedCells",l),e.copyTo("selectUnlockedCells",l),e.copyTo("sort",l);const p={};e.copyToObject(p,"hash",A,"hashValue"),e.copyToObject(p,"algorithm",A,"algorithmName"),e.copyToObject(p,"salt",A,"saltValue"),e.copyToObject(p,"spinCount",E),Object.keys(p).length>0&&(e.getSource().password=p)}}),h.registerVisitor({from:"protectedRanges",to:"protectedRanges",openTag:e=>{e.setSource({})}}),h.registerVisitor({from:"protectedRange",to:{},openTag:e=>{const r=e.getAttribute("sqref");e.setKey(r),e.copyTo("name"),e.copyTo("securityDescriptor");const l={};e.copyToObject(l,"hash",A,"hashValue"),e.copyToObject(l,"algorithm",A,"algorithmName"),e.copyToObject(l,"salt",A,"saltValue"),e.copyToObject(l,"spinCount",E),Object.keys(l).length>0&&(e.getSource().password=l)}}),h.registerVisitor({from:"sheetFormatPr",to:"sheetFormatPr",openTag:e=>{e.copyToObject(N,"defaultColSize",ct,"defaultColWidth"),e.copyToObject(N,"outlineLevelCol",E,"outlineLevelCol");const r=e.getAttribute("customHeight");r!=="1"&&r!=="true"||e.copyToObject(N,"defaultRowSize",ct,"defaultRowHeight"),e.copyToObject(N,"outlineLevelRow",E,"outlineLevelRow")}}),h.registerVisitor({from:"cols",to:"cols",openTag:e=>{e.setSource([])}}),h.registerVisitor({from:"col",to:[],openTag:e=>{e.copyTo("min",r=>parseInt(r)-1),e.copyTo("max",r=>parseInt(r)-1),e.copyTo("sz",ct,"width"),e.copyTo("cs",v,"customWidth"),e.copyTo("h",v,"hidden"),e.copyTo("l",E,"outlineLevel"),e.copyTo("s",E,"style")}}),h.registerVisitor({from:"oleObjects",to:null,openTag:e=>{e.warn("'OLE Objects' are not supported.")}});let Kt=null;const Ts={onOpenTag:e=>{Kt===null&&(Kt="")},onText:e=>{Kt+=e},onEnd:()=>{const e=Qt(Kt);return Kt=null,e},onError:e=>{}};return((e,r,l,p,C,pt)=>{let rt=!1,At=!1,qt=[],_t=!1,Et=null,Yt=null,de=null,nt=null,$e=null,Fe=null;const ys=pt?.get("richData")??[],Me=u.AddressUtils.normalizeA1ToR1C1,je=u.CoordUtils.createConflatingRanges(),He=new Map,ve=[];let te=null;const Xe=u.CoordUtils.createConflatingRanges();let ee,Dt=!1,B=-1,K=-1,gt=null,se=null;const Se=[];let Ce=null,Be=-2,ft=0,Ut="",Pt="",It="",Ot="",Vt="",Nt="",Lt="",We="",qe="",_e="",Ue="",ze="",Ge="",Ze="",mt=!0,Rt=null;return{...l,onEnd:()=>{Se.length>0&&(r.rows=Se);let g=je.done(Ms);const k=g.length;if(k>0){const F=new Array(k);for(let L=0;L<k;L++){const at=g[L],$t=u.AddressUtils.rangeToString(at),Ft=at.value[1],ie=u.AddressUtils.resolveRelativeToA1(Ft,at.rowStart,at.colStart);F[L]=[$t,ie]}r.formulas=F}const st=Xe.done(!0),R=st.length;if(R>0){const F=new Array(R);for(let L=0;L<R;L++){const at=st[L],$t=u.AddressUtils.rangeToString(at);F[L]=$t}r.volatile=F}if(ve.length>0&&(r.dynamicArray=[...ve]),qt.length>0){qt.sort(u.CoordUtils.createRangeComparator(u.IRange.Orientation.Column));const F=[];let L=null,at=-1,$t=-1,Ft=-1,ie=-1,vt=null;const Je=qt.length;Je>0&&(L=qt[0],at=L.colStart,$t=L.colEnd,Ft=L.rowEnd,ie=L.value,F.push(L));for(let Mt=1;Mt<Je;Mt++)vt=qt[Mt],ie!==vt.value||at!==vt.colStart||$t!==vt.colEnd||Ft+1!==vt.rowEnd?(F.push(vt),L=vt,at=L.colStart,$t=L.colEnd,Ft=L.rowEnd,ie=L.value):(Ft=vt.rowEnd,L.rowEnd=Ft);let Qe=[];for(let Mt=0;Mt<F.length;Mt++){const oe=F[Mt];Qe.push({r:{colStart:oe.colStart,colEnd:oe.colEnd,rowStart:oe.rowStart,rowEnd:oe.rowEnd},v:oe.value})}r.directStyles=Qe}const it=e.build();if(it){const F=it.tuples;r.data=F}l?.onEnd?.()},onOpenTag:g=>{let k=g.name;const st=k.indexOf(":");if(st!==-1&&(k=k.slice(st+1)),ee){const R=g.attributes;switch(k){case"v":At=!0;break;case"f":switch(R.t??null){case null:case"normal":_t=!0;break;case"shared":const it=R.si;Yt=R.ref,Et=it;break;case"array":_t=!0,Yt=R.ref,te=[Yt,!1];break;case"datatable":_t=!0,Yt=R.ref,_t=!0}R.ca!==void 0&&Xe.append(B,K);break;case"is":return void(Dt=!0)}return void(Dt&&C?.onOpenTag(g))}if(rt){if(k==="c"){ee=g;const R=g.attributes.r;K=u.AddressUtils.fastStringToCol(R);const it=g.attributes.t;it===void 0?se=null:(se=it,se==="str"&&(Dt=!0));let F=g.attributes.s;F!==void 0&&(F=parseInt(F),Rt&&Rt.value===F&&Rt.colEnd+1===K?Rt.colEnd=K:(Rt={colStart:K,rowStart:B,colEnd:K,rowEnd:B,value:F},qt.push(Rt)))}}else{if(k==="row"){rt=!0;const R=g.attributes.r;if(B=parseInt(R)-1,ft=0,Pt=g.attributes.customHeight,Pt!==void 0&&(ft|=Ht.CustomHeight),Pt!==qe&&(mt=!0,qe=Pt),Ut=g.attributes.ht,Ut!==void 0&&(ft|=Ht.Ht),Ut!==We&&(mt=!0,We=Ut),It=g.attributes.hidden,It!==void 0&&(ft|=Ht.Hidden),It!==_e&&(mt=!0,_e=It),Vt=g.attributes.s,Vt!==void 0&&(ft|=Ht.S),Vt!==ze&&(mt=!0,ze=Vt),Ot=g.attributes.customFormat,Ot!==void 0&&(ft|=Ht.CustomFormat),Ot!==Ue&&(mt=!0,Ue=Ot),Nt=g.attributes.outlineLevel,Nt!==void 0&&(ft|=Ht.OutlineLevel),Nt!==Ge&&(mt=!0,Ge=Nt),Lt=g.attributes.collapsed,Lt!==void 0&&(ft|=Ht.Collapsed),Lt!==Ze&&(mt=!0,Ze=Lt),ft!==0)if(Be+1!==B||mt){const it=Pt!==void 0&&(Pt==="1"||Pt==="true"),F=Ot!==void 0&&(Ot==="1"||Ot==="true");Ce={min:B,max:B,sz:it&&Ut!==void 0?parseFloat(Ut):-1,csz:it,h:It!==void 0&&(It==="1"||It==="true"),s:it&&Vt!==void 0&&Vt!=="0"?parseInt(Vt):0,cs:F,l:Nt===void 0||Nt==="0"?0:parseInt(Nt),cl:Lt!==void 0&&(Lt==="1"||Lt==="true")},Se.push(Ce)}else Ce.max=B;return Be=B,void(mt=!1)}l?.onOpenTag(g)}},onCloseTag:g=>{if(ee){let k=g.name;const st=k.indexOf(":");if(st!==-1&&(k=k.slice(st+1)),Dt)if(k==="is"||k==="v"){const R=C?.onEnd();R!==null&&e.addValue(B,K,""+R)}else C?.onCloseTag?.(g);return At&&(At=!1),void(k==="c"&&(ee=null,Dt=!1))}if(rt)return rt=!1,void(Rt=null);l?.onCloseTag(g)},onText:g=>{if(g=g.trim(),At){switch(gt=null,se){case null:case"n":gt=parseFloat(g);break;case"b":gt=g==="1"||g==="true";break;case"s":gt=g;break;case"e":if(g==="#VALUE!"){const st=ee.attributes.vm;if(st!==void 0){const R=ys[parseInt(st)-1];if(R&&R.isFormulaError){gt={t:u.ScalarType.Error,v:R.getCode()};break}}}const k=u.FormulaError.getBuiltInByLabel(g);k?gt={t:u.ScalarType.Error,v:k.getCode()}:(gt=g,p?.(`Unknown formula error '${g}' in cell ${u.AddressUtils.cellToString({colIndex:K,rowIndex:B})}`));break;case"str":case"inlineStr":Dt=!0}gt!==null&&e.addValue(B,K,gt)}if(te&&(se==="e"&&(te[1]=!0),ve.push(te),te=null),Et)if($e===Et)nt=Fe;else{if(nt=He.get(Et),!nt){const k=[];de=Me(g,B,K,k),nt=[de,k,g],He.set(Et,nt)}$e=Et,Fe=nt}if(_t){const k=[];de=Me(g,B,K,k),nt=[de,k,g]}if(nt)return je.append(B,K,nt),nt=null,_t=!1,Et=null,void(Yt=null);Dt?C?.onText(g):rt||l?.onText(g)}}})(Q,N,h.createEventHandler(N,()=>{},J),J,Ts,wt)})(tt,(N,G=!1)=>ae(N,$,G)??null,ds,we,0,N=>{o&&(N=$+": "+N,o?.(N))},q),Bt=is($,ne),xt=await(async(N,G=8388608)=>{await(async()=>{if(typeof ReadableStream>"u")if(typeof window>"u"){const{ReadableStream:J}=await Promise.resolve().then(()=>require("./BkVtS9FZxWYNmrbU.cjs"));globalThis.ReadableStream=J}else console.warn("Browser does not support ReadableStream; consider loading a polyfill.")})();const Qt=new TextDecoder("utf-8");let _=0;const Z=N instanceof Uint8Array?N:new Uint8Array(N);return new ReadableStream({pull(J){if(_>=Z.byteLength)return void J.close();const wt=Z.subarray(_,Math.min(_+G,Z.byteLength)),h=Qt.decode(wt,{stream:_+G<Z.byteLength});J.enqueue(h),_+=wt.length}}).getReader()})(Bt);try{await Ae.parseStream(xt,bt,{xmlns:!1})}catch(N){throw console.warn(`Error parsing sheet: '${$}'`,N),new Error(`Error parsing sheet: '${$}'`,{cause:N})}const Wt=fe($,ut);let kt,Re=new Map;if(Wt){const N="http://schemas.microsoft.com/office/2017/10/relationships/threadedComment";let G;Wt.forEach((_,Z)=>{_.type===N&&(kt=ae(Z,$,!1,ut)?.comments,kt&&kt.forEach(J=>{Re.set(J.id,J)}))});const Qt="http://schemas.openxmlformats.org/officeDocument/2006/relationships/comments";if(Wt.forEach((_,Z)=>{_.type===Qt&&(G=ae(Z,$,!1,ut))}),G||kt){const _=kt??[],Z=G?.comments;if(Z){const J=G?.authors;for(let wt=0;wt<Z.length;wt++){const h=Z[wt];let Q=h.authorId!==void 0?J[h.authorId]:void 0;if((!Q||Q.startsWith("tc="))&&(Q=cs(Q.substring(3)),Re.has(Q)))continue;let j=ce.get(Q);j||(j=Ve.get(Q)),j||(j={id:u.CommonUtils.uuidV4(),displayName:Q},Ve.set(j.displayName,j),ce.set(j.id,j)),Q=j?.id??null;const ue={id:u.CommonUtils.uuidV4(),personId:Q,ref:h.ref,done:!1,asNote:!0,content:h.content};_.push(ue)}}tt.comments=_}}};Pe.push(et())}else Xt=Y?is($,ne,tt=>{const et=y.add({buffer:tt});return et.addReference(V),H.add(et),m.toResourceId(et)},yt):Ee($,ne,f,P,yt);return Xt},yt={paramMap:q,getRefs:fe,getRef:ae,parsedRefs:ht,onWarning:o,addPerson:I=>null},le=[];let me=0;d.Strings&&(me=parseInt(d.Strings.Unique??d.Strings.length??0));const us=d.Strings??[];for(let I=0;I<me;I++)le.push(us[I]?.t??"");const Ie=new Map;let Oe=me;const ds=I=>{const z=Ie.get(I);if(z!==void 0)return z;const Y=Oe;return Ie.set(I,Oe++),le.push(I),Y},ce=(zt("richstructure",d,f,P,yt),zt("richdata",d,f,P,yt),new Map),Ve=new Map,Ne=zt("people",d,f,P);let Ct=null;if(Ne.size>0&&(Ct=Ne.entries().next()?.value?.[1]?.persons,Ct)){const I=Ct.length;for(let z=0;z<I;z++){const Y=Ct[z];ce.set(Y.id,Y),ce.set(Y.displayName,Y)}}const Te=zt("themes",d,f,P,yt);let Le=null;if(Te&&Te.entries){let I=Te.entries().next();I?.value?.[1]&&(Le=I.value[1])}const ps=new u.Theme(Le);let he=zt("styles",d,f,P,yt).entries().next()?.value[1];he&&(he=JSON.parse(u.JSONStableStringify(he)));const gs=zt("workbooks",d,f,P,yt);await Promise.all(Pe);const ye={...gs.entries().next().value[1],styles:he,theme:ps.toJSON()};le.length>0&&(ye.strings=le),Ct&&Ct.length>0&&(ye.people=Ct);const fs={...n,resources:y,json:ye},ms=new u.Workbook(fs);return H.forEach(I=>{I.deleteReference(V)}),m.endPersist(),ms}catch(d){let P="Unable to parse XLSX.";throw d instanceof u.OutOfBoundsError&&(P="Unable to open XLSX. There are too many rows or columns."),new Error(P,{cause:d})}},toBufferXLSX:async(i,t)=>{const s=await Promise.resolve().then(()=>require("./BUwmvmcdC0xBQ97L.cjs")),o=await i.toJSON(!0),n=s.utils.book_new();for(let a=0;a<o.sheets.length;a++){const c=o.sheets[a],T=s.utils.json_to_sheet([{}]);s.utils.book_append_sheet(n,T,c.name);const S=c.sheet,x=i.getSheetAt(a),w=x.getUsedRange();if(w?(T["!ref"]=w.getA1(),w.forEach((D,b)=>{const d={t:"z"},P=b.getCell().getStyle();if(!P.isNormal()){let f=P.getNumberFormat();f!==u.NumberFormat.Type.General&&(f===u.NumberFormat.Type.ShortDate?f="m/d/yyyy":f===u.NumberFormat.Type.MediumDate?f="d-mmm-yy":f===u.NumberFormat.Type.LongDate?f="[$-x-sysdate]dddd, mmmm dd, yyyy":f===u.NumberFormat.Type.ShortTime?f="h:mm":f===u.NumberFormat.Type.MediumTime?f="h:mm AM/PM":f===u.NumberFormat.Type.LongTime&&(f="h:mm:ss AM/PM"),d.z=f)}if(D!==null)switch(b.getType()){case u.ScalarType.Number:d.t="n",d.v=D;break;case u.ScalarType.String:d.t="s",d.v=D;break;case u.ScalarType.Boolean:d.t="b",d.v=D;break;case u.ScalarType.Error:d.t="e",d.v=D.toString();case u.ScalarType.RichData:}T[b.getA1()]=d})):T["!ref"]="A1:A1",S.merges?.length>0){const D=[];T["!merges"]=D;for(let b=0;b<S.merges.length;b++)D.push(s.utils.decode_range(S.merges[b]))}if(S.cols?.length>0){const D=[];T["!cols"]=D;const b=S.cols,d={width:S.defaultColSize??x.getColumnWidthAsFontUnit(x.getColumnHeaders().getDefaultSize())};for(let P=0;P<b.length;P++){const f=b[P];for(let m=D.length;m<=f.min-1;m++)D.push(d);const y={};f.sz!==void 0&&(y.width=f.sz),f.h!==void 0&&(y.hidden=f.h),f.l!==void 0&&(y.level=f.l);for(let m=f.min;m<=f.max;m++)D.push(y)}}}return s.write(n,{type:"array",bookType:"xlsx"}),s.write(n,{type:"array",bookType:"xlsx"})}},Symbol.toStringTag,{value:"Module"}));exports.a=i=>parseFloat(i)/1e3,exports.b=hs,exports.c=i=>i?Ke.Yt.roundAccurately(parseFloat(i)/9525,1):null,exports.d=De,exports.i=js,exports.p=i=>parseFloat(i)/6e4,exports.r=cs,exports.t=i=>i?Ke.Yt.roundAccurately(parseFloat(i)/12700,4):null;
11
+ `),t=this.i;break;case O:o!==void 0&&(this.text+=s.slice(t));break t;default:U(a)||(n=!0)}}n&&(this.sawRoot||this.reportedTextBeforeRoot||(this.fail("text data outside of root node."),this.reportedTextBeforeRoot=!0),this.closedRoot&&!this.reportedTextAfterRoot&&(this.fail("text data outside of root node."),this.reportedTextAfterRoot=!0))}pushAttribNS(t,s){const{prefix:o,local:n}=this.qname(t),a={name:t,prefix:o,local:n,value:s};if(this.attribList.push(a),this.attributeHandler?.(a),o==="xmlns"){const c=s.trim();this.currentXMLVersion==="1.0"&&c===""&&this.fail("invalid attempt to undefine prefix in XML 1.0"),this.topNS[n]=c,ke(this,n,c)}else if(t==="xmlns"){const c=s.trim();this.topNS[""]=c,ke(this,"",c)}}pushAttribPlain(t,s){const o={name:t,value:s};this.attribList.push(o),this.attributeHandler?.(o)}end(){this.sawRoot||this.fail("document must contain a root element.");const{tags:t}=this;for(;t.length>0;){const o=t.pop();this.fail(`unclosed tag: ${o.name}`)}this.state!==0&&this.state!==W&&this.fail("unexpected end.");const{text:s}=this;return s.length!==0&&(this.textHandler?.(s),this.text=""),this._closed=!0,this.endHandler?.(),this._init(),this}resolve(t){let s=this.topNS[t];if(s!==void 0)return s;const{tags:o}=this;for(let n=o.length-1;n>=0;n--)if(s=o[n].ns[t],s!==void 0)return s;return s=this.ns[t],s!==void 0?s:this.opt.resolvePrefix?.(t)}qname(t){const s=t.indexOf(":");if(s===-1)return{prefix:"",local:t};const o=t.slice(s+1),n=t.slice(0,s);return(n===""||o===""||o.includes(":"))&&this.fail(`malformed name: ${t}.`),{prefix:n,local:o}}processAttribsNS(){const{attribList:t}=this,s=this.tag;{const{prefix:a,local:c}=this.qname(s.name);s.prefix=a,s.local=c;const T=s.uri=this.resolve(a)??"";a!==""&&(a==="xmlns"&&this.fail('tags may not have "xmlns" as prefix.'),T===""&&(this.fail(`unbound namespace prefix: ${JSON.stringify(a)}.`),s.uri=a))}if(t.length===0)return;const{attributes:o}=s,n=new Set;for(const a of t){const{name:c,prefix:T,local:S}=a;let x,w;T===""?(x=c==="xmlns"?Jt:"",w=c):(x=this.resolve(T),x===void 0&&(this.fail(`unbound namespace prefix: ${JSON.stringify(T)}.`),x=T),w=`{${x}}${S}`),n.has(w)&&this.fail(`duplicate attribute: ${w}.`),n.add(w),a.uri=x,o[c]=a}this.attribList=[]}processAttribsPlain(){const{attribList:t}=this,s=this.tag.attributes;for(const{name:o,value:n}of t)s[o]!==void 0&&this.fail(`duplicate attribute: ${o}.`),s[o]=n;this.attribList=[]}openTag(){this.processAttribs();const{tags:t}=this,s=this.tag;s.isSelfClosing=!1,this.openTagHandler?.(s),t.push(s),this.state=W,this.name=""}openSelfClosingTag(){this.processAttribs();const{tags:t}=this,s=this.tag;s.isSelfClosing=!0,this.openTagHandler?.(s),this.closeTagHandler?.(s),(this.tag=t[t.length-1]??null)===null&&(this.closedRoot=!0),this.state=W,this.name=""}closeTag(){const{tags:t,name:s}=this;if(this.state=W,this.name="",s==="")return this.fail("weird empty close tag."),void(this.text+="</>");const o=this.closeTagHandler;let n=t.length;for(;n-- >0;){const a=this.tag=t.pop();if(this.topNS=a.ns,o?.(a),a.name===s)break;this.fail("unexpected close tag.")}n===0?this.closedRoot=!0:n<0&&(this.fail(`unmatched closing tag: ${s}.`),this.text+=`</${s}>`)}parseEntity(t){if(t[0]!=="#"){const o=this.ENTITIES[t];return o!==void 0?o:(this.fail(this.isName(t)?"undefined entity.":"disallowed character in entity name."),`&${t};`)}let s=NaN;return t[1]==="x"&&/^#x[0-9a-f]+$/i.test(t)?s=parseInt(t.slice(2),16):/^#[0-9]+$/.test(t)&&(s=parseInt(t.slice(1),10)),this.isChar(s)?String.fromCodePoint(s):(this.fail("malformed character entity."),`&${t};`)}}var Ae,Tt;(Tt=Ae||(Ae={})).Events={XmlDecl:"xmldecl",Text:"text",ProcessingInstruction:"processinginstruction",Doctype:"doctype",Comment:"comment",OpenTagStart:"opentagstart",Attribute:"attribute",OpenTag:"opentag",CloseTag:"closetag",CDdata:"cdata",Error:"error",End:"end",Ready:"ready"},Tt.parseStream=async(i,t,s)=>{const o=new Rs({position:!1,...s});let n;if(t.onOpenTagStart&&o.on(Tt.Events.OpenTagStart,t.onOpenTagStart),t.onOpenTag&&o.on(Tt.Events.OpenTag,t.onOpenTag),t.onCloseTag&&o.on(Tt.Events.CloseTag,t.onCloseTag),t.onAttribute&&o.on(Tt.Events.Attribute,t.onAttribute),t.onText&&o.on(Tt.Events.Text,t.onText),t.onError&&o.on(Tt.Events.Error,t.onError),t.onEnd){t.onEnd;const a=()=>{n=t.onEnd()};o.on(Tt.Events.End,a)}for(;;){const{value:a,done:c}=await i.read();if(c)break;o.write(a)}return o.close(),n};const v=i=>i===!0||i==="1"||i==="on"||i==="true"||i!==!1&&i!=="0"&&i!=="off"&&i!=="false"&&null,E=i=>{const t=parseInt(i);return isNaN(t)?null:t},ct=i=>{const t=parseFloat(i);return isNaN(t)?null:t},A=null;class $s{constructor(){this._registeredVisitors=new Map}registerVisitor(t){this._registeredVisitors.set(t.from,t)}createEventHandler(t,s,o){const n=this._registeredVisitors,a=[];let c=null,T=null,S=null,x=null;const w=[],D={key:null,source:t};let b=null,d=!1;const P=(y,m)=>{let V=S.attributes[y];if(m){if(Array.isArray(m)){for(let H=0;H<m.length;H++)if(V==null||(V=m[H](V),V==null))return}else if(V==null||(V=m(V),V==null))return}return V},f={getSource:()=>b.source,setSource:y=>{b.source=y},setKey:y=>{b.key=y},getFrom:()=>S,getAttribute:(y,m)=>P(y,m)??null,hasAttribute:y=>f.getAttribute(y)!==null,getParent:()=>w[w.length-2].source,getPath:()=>{const y=[];for(let m=0;m<a.length;m++)y.push(a[m].local);return y.join("\\")},parseAttribute:P,copyToObject:(y,m,V,H)=>{const q=P(H??m,V);q!==void 0&&(y[m]=q)},copyTo:(y,m,V)=>{const H=P(V??y,m);H!==void 0&&(b.source[y]=H)},warn:y=>{o?o?.(y):console.warn(y)}};return{onOpenTag:y=>{let m=y.name;const V=m.indexOf(":");V!==-1&&(m=m.slice(V+1));const H=n.get(m);if(c={local:m,visitor:H,tag:y,destination:null},d)return a.push(c),T=m,void(S=y);x=c?.visitor??null,H&&(b=a.length===0?D:x?.to!==null?{key:null,source:{}}:null,c.destination=b,b&&w.push(b)),a.push(c),T=m,S=y,d=x?.to===null,x?.openTag?.(f)},onCloseTag:y=>{let m=y.name;const V=m.indexOf(":");if(V!==-1&&(m=m.slice(V+1)),m!==T)throw new Error(`mismatch open/close tag: '${m}'/'${T}'`);d||x?.closeTag?.(f);const H=a.pop()??null;c=a[a.length-1]??null;const q=H?.destination;if(q){w.pop(),b=w[w.length-1]??D;const ht=H.visitor;ht&&ht.to&&q.source!==void 0&&(Array.isArray(ht.to)?b.source.push?b.source.push(q.source):o?.(`Unable to parse array for ${ht.from} at ${f.getPath()}`):q.key?b.source[q.key]=q.source:typeof ht.to=="string"&&(b.source[ht.to]=q.source))}T=c?.local??null,S=c?.tag??null,x=c?.visitor??null,d=!c?.destination},onText:y=>{x?.text?.(y,f)},onEnd:s}}}const is=(i,t,s,o=null)=>{if(!i)return null;let n=i;n.startsWith("/")&&(n=n.substring(1));let a=o?.parsedRefs?.get(i);if(a!==void 0)return a;const c=t(n);if(!c)return null;let T=c.content;try{s&&(T=s(T))}catch(S){console.warn(S)}return o?.parsedRefs?.set(i,T),T},Ee=(i,t,s,o,n=null)=>{if(!i)return null;let a=i;a.startsWith("/")&&(a=a.substring(1));let c=n?.parsedRefs?.get(i);if(c!==void 0)return c;const T=t(a);if(!T)return null;const S=T.content;try{const x=new TextDecoder().decode(S),w=s.parseFromString(x,"text/xml"),D=o.convert(w,i,n);return n?.parsedRefs?.set(i,D),D}catch(x){console.warn(x)}return null},zt=(i,t,s,o,n=null)=>{const a=new Map;let c=t.Directory[i];const T=c?c.length:0;for(let S=0;S<T;S++){const x=c[S];if(!x)continue;let w=x;w.startsWith("/")&&(w=w.substring(1));const D=Ee(w,b=>t.files[b],s,o,n);a.set(w,D)}return a},Fs=["lt1","dk1","lt2","dk2","accent1","accent2","accent3","accent4","accent5","accent6","hlink","folHlink"],De=(i,t="dk1")=>{let s;const o=i("auto");o===void 0||o!=="1"&&o!=="true"||(s=t);const n=i("indexed");n&&(s=`index${n}`);const a=i("rgb");a&&(s=a.toLowerCase(),a.length!==8||a.startsWith("FF")||(s="FF"+a.substring(2,a.length)));const c=i("theme");c&&(s=Fs[c]);let T=i("tint");if(T&&(s+=` ${u.IColor.AdjustmentType.ETint} ${parseFloat(T)}`),s)return s},cs=i=>i&&i.replace(/^\{([\s\S]+)\}$/,"$1"),hs=i=>i==="true"||i==="1";class Ht{static{this.Collapsed=1}static{this.CustomFormat=2}static{this.CustomHeight=4}static{this.Hidden=8}static{this.Ht=16}static{this.OutlineLevel=32}static{this.Ph=64}static{this.R=128}static{this.S=256}static{this.Spans=512}static{this.ThickBot=1024}static{this.ThickTop=2048}}const Ms=(i,t,s)=>{if(i[0].value[0]===i[1].value[0])return t},os={colStart:0,colEnd:0,rowStart:0,rowEnd:0},js=Object.freeze(Object.defineProperty({__proto__:null,fromBufferXLSX:async(i,t)=>{const{password:s,onWarning:o,createWorkbookOptions:n={},...a}=t??{},c=Promise.resolve().then(()=>require("./DKYqcrXsQ_6SuhnP.cjs")),T=Promise.resolve().then(()=>require("./CgzOmQLgtPYoapZz.cjs"));let S=null;try{S=new DOMParser}catch{}let x=null;S||(x=Promise.resolve().then(()=>require("./B7jcDdJUMAjZpGWo.cjs")).then(d=>d.i));let w=null,D=null,b=null;try{const d=await Promise.all([c,T,x]);w=d[0],D=d[1],b=d[2]}catch(d){throw new Error("Unable to load XLSX parser.",{cause:d})}try{const d=w.read(i,{type:"array",sheets:[],cellStyles:!1,bookFiles:!0});if(!d.Directory)throw new Error("Unable to parse as an Excel document. Try to save as '.xlsx' and try again.");d.Directory.richstructure=["/xl/richData/rdrichvaluestructure.xml"],d.Directory.richdata=["/xl/richData/rdrichvalue.xml"];const P=new D.FromOOXMLConverter,f=S??new b.DOMParser,y=n?.resources??new u.ResourceCollection,m=y.beginPersist(),V={},H=new Set,q=new Map;q.set("richTypes",[]);const ht=new Map,Pe=[],ne=I=>d.files[I],fe=(I,z)=>{const Y=I.lastIndexOf("/"),ut=I.substring(0,Y+1)+"_rels/"+I.substring(Y+1,I.length)+".rels";let dt=z.get(ut);return dt||(dt=(($,be,xe,we,Xt=null)=>{if(!$)return null;const tt=Ee($,be,xe,we,Xt);if(!tt)return null;const et=new Map,bt=Object.keys(tt),Bt=bt.length;for(let xt=0;xt<Bt;xt++){const Wt=bt[xt],kt=tt[Wt];et.set(Wt,kt)}return et})(ut,ne,f,P,yt),z.set(ut,dt)),dt},ae=(I,z,Y,ut=ht)=>{let dt=fe(z,ut).get(I),$=dt?.target;if(!$)return null;if(dt.targetMode==="External")return dt.target;const be=z.lastIndexOf("/"),xe=z.substring(0,be+1);$.startsWith("/")||($=xe+$),$=(tt=>{const et=tt.split(/\/+/);return et.reduce((bt,Bt,xt)=>(Bt==="."?bt.splice(xt,1):Bt===".."&&bt.splice(xt-1,2),bt),et).join("/")})($);const we=P?.getVisitorParamsState().get("dxfs");let Xt=ut.get($);if(!Xt)if(dt.type==="http://schemas.openxmlformats.org/officeDocument/2006/relationships/worksheet"){const tt={};Xt=tt;const et=async()=>{const bt=((N,G,Qt,_,Z,J,wt)=>{const h=new $s,Q=new u.Tuple.TransposedBuilder;let j=null;h.registerVisitor({from:"autoFilter",to:"filter",openTag:e=>{e.copyTo("ref",A)}}),h.registerVisitor({from:"conditionalFormatting",to:{},openTag:e=>{const r=e.getParent();r.conditionals||(r.conditionals=[]),r.conditionals.push(e.getSource());const l=e.getAttribute("sqref");l&&(e.getSource().ref=l.split(" ").join(",")),e.copyTo("pivot",v)},closeTag:e=>{const r=e.getSource();if(r.rule){const l=Object.keys(r.rule);for(let p=0;p<l.length;p++){const C=l[p];C!=="rule"&&(r[C]=r.rule[C])}}delete r.rule}}),h.registerVisitor({from:"cfRule",to:"rule",openTag:e=>{const r=e.getParent();e.copyToObject(r,"type",A),e.copyToObject(r,"priority",E),e.copyToObject(r,"stopIfTrue",v);const l=e.getAttribute("dxfId",E);if(l!==null){let p=_?.get(l);p||(J?.(`Unable to load conditional color. Invalid dxfI: '${l}' at '${e.getPath()}'.`),p={}),r.style=p}e.copyToObject(r,"aboveAverage",v),e.copyToObject(r,"equalAverage",v),e.copyToObject(r,"stdDev",E),e.copyToObject(r,"bottom",v),e.copyToObject(r,"percent",v),e.copyToObject(r,"rank",E),e.copyToObject(r,"operator",A),e.copyToObject(r,"text",A),e.copyToObject(r,"timePeriod",A)}}),h.registerVisitor({from:"colorScale",to:"colorScale"}),h.registerVisitor({from:"dataBar",to:"dataBar",openTag:e=>{e.copyTo("maxLength",E),e.copyTo("minLength",E),e.copyTo("showValue",v)}}),h.registerVisitor({from:"iconSet",to:"iconSet",openTag:e=>{e.copyTo("iconSet",A),e.copyTo("reverse",v),e.copyTo("showValue",v)}}),h.registerVisitor({from:"formula",to:null,text:(e,r)=>{const l=r.getParent();let p=l.formulas;p||(p=[],l.formulas=p),p.push(e)}}),h.registerVisitor({from:"cfvo",to:{},openTag:e=>{const r=e.getParent();r.conditions||(r.conditions=[]),r.conditions.push(e.getSource()),e.copyTo("type",A),e.copyTo("value",ct,"val"),e.copyTo("gte",v)}}),h.registerVisitor({from:"color",to:{},openTag:e=>{const r=e.getParent();r.colors||(r.colors=[]);const l=De(p=>e.getAttribute(p));r.colors.push(l)}}),h.registerVisitor({from:"filterColumn",to:"filterColumn",openTag:e=>{const r=e.getParent();r.fields||(r.fields=[]),r.fields.push(e.getSource()),e.copyTo("offset",E,"colId"),e.copyTo("hiddenButton",v),e.copyTo("showButton",v)}}),h.registerVisitor({from:"colorFilter",to:"colorFilter",openTag:e=>{const r=e.getParent();r.criteria||(r.criteria=[]),r.criteria.push(e.getSource()),e.getSource().type=u.IAutoFilter.Type.Color,e.copyTo("cellColor",v),e.copyTo("styleId",E,"dxfId")}}),h.registerVisitor({from:"dynamicFilter",to:"dynamicFilter",openTag:e=>{const r=e.getParent();r.criteria||(r.criteria=[]),r.criteria.push(e.getSource()),e.getSource().type=u.IAutoFilter.Type.Dynamic,e.copyTo("dynamicType",A,"type"),e.copyTo("val",ct),e.copyTo("maxVal",ct,"maxVal")}}),h.registerVisitor({from:"iconFilter",to:"iconFilter",openTag:e=>{const r=e.getParent();r.criteria||(r.criteria=[]),r.criteria.push(e.getSource()),e.getSource().type=u.IAutoFilter.Type.Icon,e.copyTo("iconId",E),e.copyTo("iconSet",A)}}),h.registerVisitor({from:"top10",to:"top10",openTag:e=>{const r=e.getParent();r.criteria||(r.criteria=[]),r.criteria.push(e.getSource()),e.getSource().type=u.IAutoFilter.Type.Top10,e.copyTo("filterVal",ct),e.copyTo("percent",v),e.copyTo("top",v),e.copyTo("val",ct)}}),h.registerVisitor({from:"filters",to:"filters",openTag:e=>{const r=e.getParent();r.criteria||(r.criteria=[]),r.criteria.push(e.getSource()),e.getSource().type=u.IAutoFilter.Type.Items,e.copyTo("blank",v),e.copyTo("calendarType",A)}}),h.registerVisitor({from:"dateGroupItem",to:"dateGroupItem",openTag:e=>{const r=e.getParent();r.dateGroups||(r.dateGroups=[]),r.dateGroups.push(e.getSource()),e.copyTo("group",A,"dateTimeGrouping"),e.copyTo("day",E),e.copyTo("hour",E),e.copyTo("minute",E),e.copyTo("month",E),e.copyTo("second",E),e.copyTo("year",E)}}),h.registerVisitor({from:"filter",to:"filter",openTag:e=>{const r=e.getParent();r.items||(r.items=[]),r.items.push(e.getAttribute("val",ct))}}),h.registerVisitor({from:"customFilters",to:"customFilters",openTag:e=>{const r=e.getParent();r.criteria||(r.criteria=[]),r.criteria.push(e.getSource()),e.getSource().type=u.IAutoFilter.Type.Custom,e.copyTo("and",v)}}),h.registerVisitor({from:"customFilter",to:"customFilter",openTag:e=>{const r=e.getParent();r.filters||(r.filters=[]),r.filters.push(e.getSource()),e.copyTo("operator",A),e.copyTo("value",ct,"val")}}),h.registerVisitor({from:"sortState",to:"sort",openTag:e=>{e.copyTo("ref",A)}}),h.registerVisitor({from:"sortCondition",to:"sortCondition",openTag:e=>{const r=e.getParent();r.fields||(r.fields=[]);const l=e.getSource();r.fields.push(l),e.copyTo("sortOn",A,"sortBy"),e.copyTo("dxfId",A,"sortBy"),e.copyTo("iconSet",A),e.copyTo("customList",A);const p=e.getAttribute("ref");if(p){const C=u.AddressUtils.fastStringToRange(p,os).colStart,pt=u.AddressUtils.fastStringToRange(r.ref,os),rt=pt.colStart;l.offset=pt?C-rt:C}l.reverse=e.getAttribute("descending",v)??!1}}),h.registerVisitor({from:"AlternateContent",to:null});const ue=e=>{j=e.getSource(),e.copyTo("topLeft",A,"topLeftCell");const r=hs(e.getAttribute("defaultGridColor")),l=e.getAttribute("colorId");l===null||r||(e.getSource().gridLineColor="index"+parseFloat(l)),e.copyTo("showZeros",v),e.copyTo("showFormulas",v),e.copyTo("zoomScale",E),e.copyTo("showRowHeaders",v,"showRowColHeaders"),e.copyTo("showColumnHeaders",v,"showRowColHeaders"),e.copyTo("showRowGridlines",v,"showGridLines"),e.copyTo("showColumnGridlines",v,"showGridLines")};h.registerVisitor({from:"sheetView",to:"view",openTag:e=>{ue(e)},closeTag:()=>{j=null}}),h.registerVisitor({from:"customSheetViews",to:"customSheetViews",openTag:e=>{e.setSource([])}}),h.registerVisitor({from:"customSheetView",to:[],openTag:e=>{ue(e)},closeTag:()=>{j=null}}),h.registerVisitor({from:"selection",to:"selection",openTag:e=>{if(!j)return;e.copyTo("cell",A,"activeCell"),e.copyTo("rangeIndex",E,"activeCellId");const r=e.getAttribute("activeCell"),l=e.getAttribute("sqref");l&&l!==r&&(e.getSource().ranges=l.split(" "))}}),h.registerVisitor({from:"pane",to:"pane",openTag:e=>{if(j&&e.getAttribute("state")==="frozen"){const r={};j.freezePanes=r,e.copyToObject(r,"topLeft",A,"topLeftCell");const l=j.topLeft?u.AddressUtils.fastStringToCell(j.topLeft):{colIndex:0,rowIndex:0},p={colIndex:0,rowIndex:0};e.copyToObject(p,"colIndex",E,"xSplit"),e.copyToObject(p,"rowIndex",E,"ySplit");const C={colIndex:l.colIndex+p.colIndex,rowIndex:l.rowIndex+p.rowIndex};r.coords=u.AddressUtils.cellToString(C)}}}),h.registerVisitor({from:"tabColor",to:null,openTag:e=>{const r=De(l=>e.getAttribute(l));r&&(N.tabColor=r)}}),h.registerVisitor({from:"pageSetUpPr",to:"pageSetUpPr",openTag:e=>{}}),h.registerVisitor({from:"outlinePr",to:"outlinePr",openTag:e=>{}}),h.registerVisitor({from:"pageMargins",to:"pageMargins",openTag:e=>{}}),h.registerVisitor({from:"pageSetup",to:"pageSetup",openTag:e=>{}}),h.registerVisitor({from:"printOptions",to:"printOptions",openTag:e=>{}}),h.registerVisitor({from:"mergeCells",to:"merges",openTag:e=>{e.setSource([])}}),h.registerVisitor({from:"mergeCell",to:[],openTag:e=>{const r=e.getAttribute("ref");e.setSource(r)}}),h.registerVisitor({from:"hyperlinks",to:"hyperlinks",openTag:e=>{e.setSource([])}}),h.registerVisitor({from:"hyperlink",to:[],openTag:e=>{const r=e.getAttribute("r:id"),l=e.getAttribute("ref");if(!l)return void console.warn("No ref found for hyperlink");e.setKey(l);let p=r?G(r):"";if(typeof p!="string")return void console.warn("Invalid address ",p);const C=e.getAttribute("location");p.endsWith("\\")&&(p=p.substring(0,p.length-1));const pt=e.getAttribute("location");if(pt&&(C&&C!==pt&&console.warn("display and location are different",C,pt),p+="#"+pt),!p)return void console.warn("No address found for hyperlink. r:id",r);let rt;const At=e.getAttribute("tooltip");rt=At?{address:p,tooltip:At}:p,e.setSource({r:l,v:rt})}}),h.registerVisitor({from:"drawing",to:"movables",openTag:e=>{const r=e.getAttribute("r:id");if(!r)return;const l=G(r);l?e.setSource(l.movables):console.warn("no drawing found for rId",r)}}),h.registerVisitor({from:"tableParts",to:"tables",openTag:e=>{e.setSource([])}}),h.registerVisitor({from:"tablePart",to:[],openTag:e=>{const r=e.getAttribute("r:id");if(!r)return;const l=G(r);l?e.setSource(l):console.warn("no table found for rId",r)}}),h.registerVisitor({from:"worksheet",to:"worksheet",openTag:e=>{}}),h.registerVisitor({from:"sheetProtection",to:"protection",openTag:e=>{let r=!1;if(e.hasAttribute("sheet")&&v(e.getAttribute("sheet"))&&(r=!0),!r)return void e.setSource(void 0);const l=C=>C===!0||C==="1"||C==="on"||C==="true"||C===!1||C==="0"||C==="off"||C==="false"||null;e.copyTo("autoFilter",l),e.copyTo("deleteColumns",l),e.copyTo("formatCells",l),e.copyTo("formatColumns",l),e.copyTo("formatRows",l),e.copyTo("insertColumns",l),e.copyTo("insertHyperlinks",l),e.copyTo("insertRows",l),e.copyTo("objects",l),e.copyTo("pivotTables",l),e.copyTo("scenarios",l),e.copyTo("selectUnlockedCells",l),e.copyTo("selectUnlockedCells",l),e.copyTo("sort",l);const p={};e.copyToObject(p,"hash",A,"hashValue"),e.copyToObject(p,"algorithm",A,"algorithmName"),e.copyToObject(p,"salt",A,"saltValue"),e.copyToObject(p,"spinCount",E),Object.keys(p).length>0&&(e.getSource().password=p)}}),h.registerVisitor({from:"protectedRanges",to:"protectedRanges",openTag:e=>{e.setSource({})}}),h.registerVisitor({from:"protectedRange",to:{},openTag:e=>{const r=e.getAttribute("sqref");e.setKey(r),e.copyTo("name"),e.copyTo("securityDescriptor");const l={};e.copyToObject(l,"hash",A,"hashValue"),e.copyToObject(l,"algorithm",A,"algorithmName"),e.copyToObject(l,"salt",A,"saltValue"),e.copyToObject(l,"spinCount",E),Object.keys(l).length>0&&(e.getSource().password=l)}}),h.registerVisitor({from:"sheetFormatPr",to:"sheetFormatPr",openTag:e=>{e.copyToObject(N,"defaultColSize",ct,"defaultColWidth"),e.copyToObject(N,"outlineLevelCol",E,"outlineLevelCol");const r=e.getAttribute("customHeight");r!=="1"&&r!=="true"||e.copyToObject(N,"defaultRowSize",ct,"defaultRowHeight"),e.copyToObject(N,"outlineLevelRow",E,"outlineLevelRow")}}),h.registerVisitor({from:"cols",to:"cols",openTag:e=>{e.setSource([])}}),h.registerVisitor({from:"col",to:[],openTag:e=>{e.copyTo("min",r=>parseInt(r)-1),e.copyTo("max",r=>parseInt(r)-1),e.copyTo("sz",ct,"width"),e.copyTo("cs",v,"customWidth"),e.copyTo("h",v,"hidden"),e.copyTo("l",E,"outlineLevel"),e.copyTo("s",E,"style")}}),h.registerVisitor({from:"oleObjects",to:null,openTag:e=>{e.warn("'OLE Objects' are not supported.")}});let Kt=null;const Ts={onOpenTag:e=>{Kt===null&&(Kt="")},onText:e=>{Kt+=e},onEnd:()=>{const e=Qt(Kt);return Kt=null,e},onError:e=>{}};return((e,r,l,p,C,pt)=>{let rt=!1,At=!1,qt=[],_t=!1,Et=null,Yt=null,de=null,nt=null,$e=null,Fe=null;const ys=pt?.get("richData")??[],Me=u.AddressUtils.normalizeA1ToR1C1,je=u.CoordUtils.createConflatingRanges(),He=new Map,ve=[];let te=null;const Xe=u.CoordUtils.createConflatingRanges();let ee,Dt=!1,B=-1,K=-1,gt=null,se=null;const Se=[];let Ce=null,Be=-2,ft=0,Ut="",Pt="",It="",Ot="",Vt="",Nt="",Lt="",We="",qe="",_e="",Ue="",ze="",Ge="",Ze="",mt=!0,Rt=null;return{...l,onEnd:()=>{Se.length>0&&(r.rows=Se);let g=je.done(Ms);const k=g.length;if(k>0){const F=new Array(k);for(let L=0;L<k;L++){const at=g[L],$t=u.AddressUtils.rangeToString(at),Ft=at.value[1],ie=u.AddressUtils.resolveRelativeToA1(Ft,at.rowStart,at.colStart);F[L]=[$t,ie]}r.formulas=F}const st=Xe.done(!0),R=st.length;if(R>0){const F=new Array(R);for(let L=0;L<R;L++){const at=st[L],$t=u.AddressUtils.rangeToString(at);F[L]=$t}r.volatile=F}if(ve.length>0&&(r.dynamicArray=[...ve]),qt.length>0){qt.sort(u.CoordUtils.createRangeComparator(u.IRange.Orientation.Column));const F=[];let L=null,at=-1,$t=-1,Ft=-1,ie=-1,vt=null;const Je=qt.length;Je>0&&(L=qt[0],at=L.colStart,$t=L.colEnd,Ft=L.rowEnd,ie=L.value,F.push(L));for(let Mt=1;Mt<Je;Mt++)vt=qt[Mt],ie!==vt.value||at!==vt.colStart||$t!==vt.colEnd||Ft+1!==vt.rowEnd?(F.push(vt),L=vt,at=L.colStart,$t=L.colEnd,Ft=L.rowEnd,ie=L.value):(Ft=vt.rowEnd,L.rowEnd=Ft);let Qe=[];for(let Mt=0;Mt<F.length;Mt++){const oe=F[Mt];Qe.push({r:{colStart:oe.colStart,colEnd:oe.colEnd,rowStart:oe.rowStart,rowEnd:oe.rowEnd},v:oe.value})}r.directStyles=Qe}const it=e.build();if(it){const F=it.tuples;r.data=F}l?.onEnd?.()},onOpenTag:g=>{let k=g.name;const st=k.indexOf(":");if(st!==-1&&(k=k.slice(st+1)),ee){const R=g.attributes;switch(k){case"v":At=!0;break;case"f":switch(R.t??null){case null:case"normal":_t=!0;break;case"shared":const it=R.si;Yt=R.ref,Et=it;break;case"array":_t=!0,Yt=R.ref,te=[Yt,!1];break;case"datatable":_t=!0,Yt=R.ref,_t=!0}R.ca!==void 0&&Xe.append(B,K);break;case"is":return void(Dt=!0)}return void(Dt&&C?.onOpenTag(g))}if(rt){if(k==="c"){ee=g;const R=g.attributes.r;K=u.AddressUtils.fastStringToCol(R);const it=g.attributes.t;it===void 0?se=null:(se=it,se==="str"&&(Dt=!0));let F=g.attributes.s;F!==void 0&&(F=parseInt(F),Rt&&Rt.value===F&&Rt.colEnd+1===K?Rt.colEnd=K:(Rt={colStart:K,rowStart:B,colEnd:K,rowEnd:B,value:F},qt.push(Rt)))}}else{if(k==="row"){rt=!0;const R=g.attributes.r;if(B=parseInt(R)-1,ft=0,Pt=g.attributes.customHeight,Pt!==void 0&&(ft|=Ht.CustomHeight),Pt!==qe&&(mt=!0,qe=Pt),Ut=g.attributes.ht,Ut!==void 0&&(ft|=Ht.Ht),Ut!==We&&(mt=!0,We=Ut),It=g.attributes.hidden,It!==void 0&&(ft|=Ht.Hidden),It!==_e&&(mt=!0,_e=It),Vt=g.attributes.s,Vt!==void 0&&(ft|=Ht.S),Vt!==ze&&(mt=!0,ze=Vt),Ot=g.attributes.customFormat,Ot!==void 0&&(ft|=Ht.CustomFormat),Ot!==Ue&&(mt=!0,Ue=Ot),Nt=g.attributes.outlineLevel,Nt!==void 0&&(ft|=Ht.OutlineLevel),Nt!==Ge&&(mt=!0,Ge=Nt),Lt=g.attributes.collapsed,Lt!==void 0&&(ft|=Ht.Collapsed),Lt!==Ze&&(mt=!0,Ze=Lt),ft!==0)if(Be+1!==B||mt){const it=Pt!==void 0&&(Pt==="1"||Pt==="true"),F=Ot!==void 0&&(Ot==="1"||Ot==="true");Ce={min:B,max:B,sz:it&&Ut!==void 0?parseFloat(Ut):-1,csz:it,h:It!==void 0&&(It==="1"||It==="true"),s:it&&Vt!==void 0&&Vt!=="0"?parseInt(Vt):0,cs:F,l:Nt===void 0||Nt==="0"?0:parseInt(Nt),cl:Lt!==void 0&&(Lt==="1"||Lt==="true")},Se.push(Ce)}else Ce.max=B;return Be=B,void(mt=!1)}l?.onOpenTag(g)}},onCloseTag:g=>{if(ee){let k=g.name;const st=k.indexOf(":");if(st!==-1&&(k=k.slice(st+1)),Dt)if(k==="is"||k==="v"){const R=C?.onEnd();R!==null&&e.addValue(B,K,""+R)}else C?.onCloseTag?.(g);return At&&(At=!1),void(k==="c"&&(ee=null,Dt=!1))}if(rt)return rt=!1,void(Rt=null);l?.onCloseTag(g)},onText:g=>{if(g=g.trim(),At){switch(gt=null,se){case null:case"n":gt=parseFloat(g);break;case"b":gt=g==="1"||g==="true";break;case"s":gt=g;break;case"e":if(g==="#VALUE!"){const st=ee.attributes.vm;if(st!==void 0){const R=ys[parseInt(st)-1];if(R&&R.isFormulaError){gt={t:u.ScalarType.Error,v:R.getCode()};break}}}const k=u.FormulaError.getBuiltInByLabel(g);k?gt={t:u.ScalarType.Error,v:k.getCode()}:(gt=g,p?.(`Unknown formula error '${g}' in cell ${u.AddressUtils.cellToString({colIndex:K,rowIndex:B})}`));break;case"str":case"inlineStr":Dt=!0}gt!==null&&e.addValue(B,K,gt)}if(te&&(se==="e"&&(te[1]=!0),ve.push(te),te=null),Et)if($e===Et)nt=Fe;else{if(nt=He.get(Et),!nt){const k=[];de=Me(g,B,K,k),nt=[de,k,g],He.set(Et,nt)}$e=Et,Fe=nt}if(_t){const k=[];de=Me(g,B,K,k),nt=[de,k,g]}if(nt)return je.append(B,K,nt),nt=null,_t=!1,Et=null,void(Yt=null);Dt?C?.onText(g):rt||l?.onText(g)}}})(Q,N,h.createEventHandler(N,()=>{},J),J,Ts,wt)})(tt,(N,G=!1)=>ae(N,$,G)??null,ds,we,0,N=>{o&&(N=$+": "+N,o?.(N))},q),Bt=is($,ne),xt=await(async(N,G=8388608)=>{await(async()=>{if(typeof ReadableStream>"u")if(typeof window>"u"){const{ReadableStream:J}=await Promise.resolve().then(()=>require("./BNGY-twelLFkYYI6.cjs"));globalThis.ReadableStream=J}else console.warn("Browser does not support ReadableStream; consider loading a polyfill.")})();const Qt=new TextDecoder("utf-8");let _=0;const Z=N instanceof Uint8Array?N:new Uint8Array(N);return new ReadableStream({pull(J){if(_>=Z.byteLength)return void J.close();const wt=Z.subarray(_,Math.min(_+G,Z.byteLength)),h=Qt.decode(wt,{stream:_+G<Z.byteLength});J.enqueue(h),_+=wt.length}}).getReader()})(Bt);try{await Ae.parseStream(xt,bt,{xmlns:!1})}catch(N){throw console.warn(`Error parsing sheet: '${$}'`,N),new Error(`Error parsing sheet: '${$}'`,{cause:N})}const Wt=fe($,ut);let kt,Re=new Map;if(Wt){const N="http://schemas.microsoft.com/office/2017/10/relationships/threadedComment";let G;Wt.forEach((_,Z)=>{_.type===N&&(kt=ae(Z,$,!1,ut)?.comments,kt&&kt.forEach(J=>{Re.set(J.id,J)}))});const Qt="http://schemas.openxmlformats.org/officeDocument/2006/relationships/comments";if(Wt.forEach((_,Z)=>{_.type===Qt&&(G=ae(Z,$,!1,ut))}),G||kt){const _=kt??[],Z=G?.comments;if(Z){const J=G?.authors;for(let wt=0;wt<Z.length;wt++){const h=Z[wt];let Q=h.authorId!==void 0?J[h.authorId]:void 0;if((!Q||Q.startsWith("tc="))&&(Q=cs(Q.substring(3)),Re.has(Q)))continue;let j=ce.get(Q);j||(j=Ve.get(Q)),j||(j={id:u.CommonUtils.uuidV4(),displayName:Q},Ve.set(j.displayName,j),ce.set(j.id,j)),Q=j?.id??null;const ue={id:u.CommonUtils.uuidV4(),personId:Q,ref:h.ref,done:!1,asNote:!0,content:h.content};_.push(ue)}}tt.comments=_}}};Pe.push(et())}else Xt=Y?is($,ne,tt=>{const et=y.add({buffer:tt});return et.addReference(V),H.add(et),m.toResourceId(et)},yt):Ee($,ne,f,P,yt);return Xt},yt={paramMap:q,getRefs:fe,getRef:ae,parsedRefs:ht,onWarning:o,addPerson:I=>null},le=[];let me=0;d.Strings&&(me=parseInt(d.Strings.Unique??d.Strings.length??0));const us=d.Strings??[];for(let I=0;I<me;I++)le.push(us[I]?.t??"");const Ie=new Map;let Oe=me;const ds=I=>{const z=Ie.get(I);if(z!==void 0)return z;const Y=Oe;return Ie.set(I,Oe++),le.push(I),Y},ce=(zt("richstructure",d,f,P,yt),zt("richdata",d,f,P,yt),new Map),Ve=new Map,Ne=zt("people",d,f,P);let Ct=null;if(Ne.size>0&&(Ct=Ne.entries().next()?.value?.[1]?.persons,Ct)){const I=Ct.length;for(let z=0;z<I;z++){const Y=Ct[z];ce.set(Y.id,Y),ce.set(Y.displayName,Y)}}const Te=zt("themes",d,f,P,yt);let Le=null;if(Te&&Te.entries){let I=Te.entries().next();I?.value?.[1]&&(Le=I.value[1])}const ps=new u.Theme(Le);let he=zt("styles",d,f,P,yt).entries().next()?.value[1];he&&(he=JSON.parse(u.JSONStableStringify(he)));const gs=zt("workbooks",d,f,P,yt);await Promise.all(Pe);const ye={...gs.entries().next().value[1],styles:he,theme:ps.toJSON()};le.length>0&&(ye.strings=le),Ct&&Ct.length>0&&(ye.people=Ct);const fs={...n,resources:y,json:ye},ms=new u.Workbook(fs);return H.forEach(I=>{I.deleteReference(V)}),m.endPersist(),ms}catch(d){let P="Unable to parse XLSX.";throw d instanceof u.OutOfBoundsError&&(P="Unable to open XLSX. There are too many rows or columns."),new Error(P,{cause:d})}},toBufferXLSX:async(i,t)=>{const s=await Promise.resolve().then(()=>require("./DKYqcrXsQ_6SuhnP.cjs")),o=await i.toJSON(!0),n=s.utils.book_new();for(let a=0;a<o.sheets.length;a++){const c=o.sheets[a],T=s.utils.json_to_sheet([{}]);s.utils.book_append_sheet(n,T,c.name);const S=c.sheet,x=i.getSheetAt(a),w=x.getUsedRange();if(w?(T["!ref"]=w.getA1(),w.forEach((D,b)=>{const d={t:"z"},P=b.getCell().getStyle();if(!P.isNormal()){let f=P.getNumberFormat();f!==u.NumberFormat.Type.General&&(f===u.NumberFormat.Type.ShortDate?f="m/d/yyyy":f===u.NumberFormat.Type.MediumDate?f="d-mmm-yy":f===u.NumberFormat.Type.LongDate?f="[$-x-sysdate]dddd, mmmm dd, yyyy":f===u.NumberFormat.Type.ShortTime?f="h:mm":f===u.NumberFormat.Type.MediumTime?f="h:mm AM/PM":f===u.NumberFormat.Type.LongTime&&(f="h:mm:ss AM/PM"),d.z=f)}if(D!==null)switch(b.getType()){case u.ScalarType.Number:d.t="n",d.v=D;break;case u.ScalarType.String:d.t="s",d.v=D;break;case u.ScalarType.Boolean:d.t="b",d.v=D;break;case u.ScalarType.Error:d.t="e",d.v=D.toString();case u.ScalarType.RichData:}T[b.getA1()]=d})):T["!ref"]="A1:A1",S.merges?.length>0){const D=[];T["!merges"]=D;for(let b=0;b<S.merges.length;b++)D.push(s.utils.decode_range(S.merges[b]))}if(S.cols?.length>0){const D=[];T["!cols"]=D;const b=S.cols,d={width:S.defaultColSize??x.getColumnWidthAsFontUnit(x.getColumnHeaders().getDefaultSize())};for(let P=0;P<b.length;P++){const f=b[P];for(let m=D.length;m<=f.min-1;m++)D.push(d);const y={};f.sz!==void 0&&(y.width=f.sz),f.h!==void 0&&(y.hidden=f.h),f.l!==void 0&&(y.level=f.l);for(let m=f.min;m<=f.max;m++)D.push(y)}}}return s.write(n,{type:"array",bookType:"xlsx"}),s.write(n,{type:"array",bookType:"xlsx"})}},Symbol.toStringTag,{value:"Module"}));exports.a=i=>parseFloat(i)/1e3,exports.b=hs,exports.c=i=>i?Ke.Yt.roundAccurately(parseFloat(i)/9525,1):null,exports.d=De,exports.i=js,exports.p=i=>parseFloat(i)/6e4,exports.r=cs,exports.t=i=>i?Ke.Yt.roundAccurately(parseFloat(i)/12700,4):null;