@sheetxl/studio-vanilla 0.3.8 → 0.3.10

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 (84) hide show
  1. package/browser/cjs/{BLsKhZuxt0Lz81Jq.cjs → B0UnLQzm9aULMzPT.cjs} +1 -1
  2. package/browser/cjs/{DxMgcD3KlK3QJl-U.cjs → B3cvLROY4acHRpqQ.cjs} +3 -3
  3. package/browser/cjs/{BT9klXPxG99Cy93r.cjs → B8jhm3BCEuLafFwH.cjs} +2 -2
  4. package/browser/cjs/{FtuZdC5JrI787_5y.cjs → BJb9ydBFUT-D7M78.cjs} +2 -2
  5. package/browser/cjs/{8C6Zxo7y_y2FPQms.cjs → BUHSxXZOFmXodHq7.cjs} +2 -2
  6. package/browser/cjs/{k6l-_glcwCczGSOg.cjs → BaXDKXz-NmI5xp81.cjs} +1 -1
  7. package/browser/cjs/{DGo33lohWotJ_RRG.cjs → BpLgVPeGuLG6beKx.cjs} +2 -2
  8. package/browser/cjs/{Cnmg3JGNRhHyQ9lN.cjs → BrxTUaY3H_6imMe-.cjs} +2 -2
  9. package/browser/cjs/{CBooeax30UubtyR8.cjs → C6mu7Qx_XGjwTB1s.cjs} +2 -2
  10. package/browser/cjs/{pGI8vorFhC9MVowN.cjs → C8IvCN3O_TuQgZmK.cjs} +3 -3
  11. package/browser/cjs/{CSPBwiu90ceh-zBx.cjs → C9au43N7QYEd4jbG.cjs} +2 -2
  12. package/browser/cjs/{DDXDnRHWdH8vB7JP.cjs → CPauoJM4X1inXrDV.cjs} +2 -2
  13. package/browser/cjs/{BOkJxMfaJUl7r9lv.cjs → Cgqp9iXOU2RXxdeZ.cjs} +2 -2
  14. package/browser/cjs/{C44gb5KZ6OvPSbeT.cjs → CizyRLP3ZrkggAB7.cjs} +1 -1
  15. package/browser/cjs/{BlXwqYO4AOArGHCi.cjs → Cp7B6d67T494RIQ-.cjs} +1 -1
  16. package/browser/cjs/{BQcsaJmSUla59HMq.cjs → D7AupitbVLpw8et2.cjs} +2 -2
  17. package/browser/cjs/{B7tqo1XGuZRbs_l5.cjs → DGDm35bUxi7ng9WE.cjs} +1 -1
  18. package/browser/cjs/{LJuGpzSJqBoSbONN.cjs → DIVRlmEESJ5STCAj.cjs} +4 -4
  19. package/browser/cjs/{CwTBvK0RpFdqTco1.cjs → DShyafVYmmSyaEWV.cjs} +1 -1
  20. package/browser/cjs/DhTMv-Goidfqkc4O.cjs +6 -0
  21. package/browser/cjs/{CxsVnL2Y7ui9olJR.cjs → DoanFJYH05T3OueB.cjs} +1 -1
  22. package/browser/cjs/{CMbsanyrB8wnt6GW.cjs → F-yTOOzf6QeODuSF.cjs} +2 -2
  23. package/browser/cjs/{jOeWxX6k9CpmF1eF.cjs → IGWUl-yFjg5eEWKm.cjs} +1 -1
  24. package/browser/cjs/{U87lgd4_s2ZMANCD.cjs → UPWauCNGEO3N4aKC.cjs} +2 -2
  25. package/browser/cjs/{K9D20kibYbfJVTaz.cjs → _j-1bJDk5uJQPGz1.cjs} +1 -1
  26. package/browser/cjs/{Cs1ISFaMpmDKy9t2.cjs → bBrqIaOYcNmpSMcM.cjs} +8 -8
  27. package/browser/cjs/index.cjs +2 -2
  28. package/{cdn/assets/CWYtl6EkkEAaMEfu.js → browser/esm/7atOvhNWO7To6qIo.mjs} +2 -2
  29. package/{cdn/assets/xD8ZlqNN-Q-RgiRC.js → browser/esm/BDkAZVHttPcnNXUe.mjs} +2 -2
  30. package/browser/esm/{D3N0hiMsbBC6BLyh.mjs → BMLz3JQSNqHRkci1.mjs} +2 -2
  31. package/browser/esm/{B3W6O8j1eoBPIMR3.mjs → BeaUNp9QZPme6pXB.mjs} +6 -6
  32. package/{cdn/assets/BmcEXcs1G_iE6sz3.js → browser/esm/BlS58PdvZro_V3QH.mjs} +1 -1
  33. package/{cdn/assets/tzHh1gWGtGwzD-fo.js → browser/esm/BrPBUgVE_tQjDFrM.mjs} +2 -2
  34. package/browser/esm/{mFujdhEkGP012ZUn.mjs → C1sg8t7_4vcoaPrc.mjs} +2 -2
  35. package/browser/esm/{DWBgqGlNAU4rBWwn.mjs → C4eCPG8J315jbHYa.mjs} +3 -3
  36. package/browser/esm/{DgkjZQUyhO9g4HCN.mjs → C66dN9W-Tvris7DA.mjs} +5 -5
  37. package/browser/esm/{BMhpits2yAVuyqgP.mjs → CEQc6snj11Ew_fub.mjs} +2 -2
  38. package/{cdn/assets/DpNFmO9jTAvAQh79.js → browser/esm/CU3nx-nuZxBxPZKi.mjs} +1 -1
  39. package/browser/esm/{D-WabC5EWOjpuux9.mjs → CUu9fQcboTA2cFg0.mjs} +2 -2
  40. package/{cdn/assets/B3GArqfClnixINHW.js → browser/esm/CXfnQ0pwwKenYyFn.mjs} +2 -2
  41. package/browser/esm/{BCxjMajgkPiIO9Bq.mjs → Ck8FFgpzphfCqQw_.mjs} +4 -4
  42. package/browser/esm/{CfD2LhJmurlUNNv0.mjs → Cs6oF063jtxIeVKT.mjs} +3 -3
  43. package/browser/esm/{CoDhBn7r_qgSW9CH.mjs → CsNTMNRXTRqEL-EP.mjs} +2 -2
  44. package/browser/esm/{D1ZuiBYcFekXPz0Q.mjs → Ct-YJvj6EaaUx1RW.mjs} +10 -10
  45. package/browser/esm/{DwgfvKguLjV-q7xB.mjs → DCuHDW9IuhzEOjbk.mjs} +1 -1
  46. package/browser/esm/{BJg9gLudjo_1vmZM.mjs → DNt1dtQrguWb3KVg.mjs} +1 -1
  47. package/{cdn/assets/D2ehHlTu9BBXJBJZ.js → browser/esm/DVEU8U_0QrbsPIg3.mjs} +10 -10
  48. package/{cdn/assets/B6sTLyVY7xGM2Eux.js → browser/esm/Du9E4EGsVFWHnCLR.mjs} +2 -2
  49. package/{cdn/assets/Bhr7t-EtPRky552R.js → browser/esm/Dwl8F3BBFQ3o4uyc.mjs} +1 -1
  50. package/{cdn/assets/CjyQtzim_fntC8LV.js → browser/esm/RGhLeGAliyi9iCPu.mjs} +1 -1
  51. package/browser/esm/{BijMT6Iusi6K3Lxw.mjs → fZB4-W2w1n6qwQa2.mjs} +1 -1
  52. package/browser/esm/index.mjs +2 -2
  53. package/{cdn/assets/B1HqX855v_7wpbnr.js → browser/esm/tGg9bQVLVn5V73v8.mjs} +1 -1
  54. package/{cdn/assets/BUlsvG-HL6B8tXrR.js → browser/esm/v8vGr0VEBp0xz6gk.mjs} +1 -1
  55. package/{browser/esm/BPkPjj6CJhqu_7YS.mjs → cdn/assets/BKxulz-GuWAkUJE0.js} +10 -10
  56. package/cdn/assets/{Dga0bg-zF3uQqKE3.js → BbiOY3cFv2P7cPgY.js} +3 -3
  57. package/cdn/assets/{BYqaI9ezs_vskNcC.js → BecL-qO75HFrUzM8.js} +4 -4
  58. package/{browser/esm/BmcEXcs1G_iE6sz3.mjs → cdn/assets/BlS58PdvZro_V3QH.js} +1 -1
  59. package/cdn/assets/{Bqfs-WuQlcQnOamT.js → BlgVQDr9Mw5Ocg3C.js} +9 -9
  60. package/cdn/assets/{Dwh99xyIOCw3pHQQ.js → BrZAa2Uoh836Cp-p.js} +6 -6
  61. package/cdn/assets/{ZNNmm2fbzbUJ-lno.js → C7cav_iY8B8vLymI.js} +2 -2
  62. package/cdn/assets/{DBbVeMryT52v6nfv.js → C8_cuh-B4VJM5BnP.js} +2 -2
  63. package/{browser/esm/DpNFmO9jTAvAQh79.mjs → cdn/assets/CU3nx-nuZxBxPZKi.js} +1 -1
  64. package/cdn/assets/{L6EK2IbRgTWAct6j.js → CeB-zbjIohLN95xd.js} +2 -2
  65. package/cdn/assets/{CmdRcGV9nqeeoZNe.js → DACjGxfwEf9AuPDf.js} +2 -2
  66. package/cdn/assets/{DwgfvKguLjV-q7xB.js → DCuHDW9IuhzEOjbk.js} +1 -1
  67. package/cdn/assets/{Cs-PVMYSu41rJjzK.js → DIJW3AvYT33rT9RR.js} +2 -2
  68. package/cdn/assets/{BJg9gLudjo_1vmZM.js → DNt1dtQrguWb3KVg.js} +1 -1
  69. package/cdn/assets/{Dn7VLDpXvtwOfIHe.js → DUqT6i588LhHGfiA.js} +5 -5
  70. package/{browser/esm/CdT0HYVf6aKXCAC-.mjs → cdn/assets/DXxL_4cZU9_NCwSR.js} +2 -2
  71. package/{browser/esm/dFBexGmKi2AHG3kx.mjs → cdn/assets/DZ3CRJYecaShtULc.js} +2 -2
  72. package/{browser/esm/BOMo6c71-c3KUDnI.mjs → cdn/assets/Dphp1w0t0c_8jFrM.js} +2 -2
  73. package/{browser/esm/Bhr7t-EtPRky552R.mjs → cdn/assets/Dwl8F3BBFQ3o4uyc.js} +1 -1
  74. package/{browser/esm/R8yOfjU26n8XzD44.mjs → cdn/assets/KKhTlRkG4PbjKXkJ.js} +2 -2
  75. package/{browser/esm/CjyQtzim_fntC8LV.mjs → cdn/assets/RGhLeGAliyi9iCPu.js} +1 -1
  76. package/cdn/assets/{Cnpw0LGW1g2EFzuC.js → ZQpOfTjvNw-aIElW.js} +3 -3
  77. package/cdn/assets/{BijMT6Iusi6K3Lxw.js → fZB4-W2w1n6qwQa2.js} +1 -1
  78. package/{browser/esm/BS27NULv0RMZeB4w.mjs → cdn/assets/nHTnQd5YrliliFQQ.js} +2 -2
  79. package/{browser/esm/B1HqX855v_7wpbnr.mjs → cdn/assets/tGg9bQVLVn5V73v8.js} +1 -1
  80. package/{browser/esm/BUlsvG-HL6B8tXrR.mjs → cdn/assets/v8vGr0VEBp0xz6gk.js} +1 -1
  81. package/cdn/index.js +2 -2
  82. package/cdn/loader.js +1 -1
  83. package/package.json +3 -3
  84. package/browser/cjs/Cdy6vngiKMCIlOw2.cjs +0 -6
@@ -1,12 +1,12 @@
1
1
  "use strict";/**
2
- * @license @sheetxl/studio-vanilla - SheetXL Studio - Vanilla entry point for integrating SheetXL UI. - v0.3.8
2
+ * @license @sheetxl/studio-vanilla - SheetXL Studio - Vanilla entry point for integrating SheetXL UI. - v0.3.10
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
- */const m=require("react/jsx-runtime"),l=require("react"),a=require("./Cs1ISFaMpmDKy9t2.cjs"),Wt=require("react-dom"),ue=require("@sheetxl/sdk");function Pt(e){const o=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const r in e)if(r!=="default"){const t=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(o,r,t.get?t:{enumerable:!0,get:()=>e[r]})}}return o.default=e,Object.freeze(o)}const pe=Pt(l);function At(e){return a.generateUtilityClass("MuiCollapse",e)}a.generateUtilityClasses("MuiCollapse",["root","horizontal","vertical","entered","hidden","wrapper","wrapperInner"]);const Ft=a.styled("div",{name:"MuiCollapse",slot:"Root",overridesResolver:(e,o)=>{const{ownerState:r}=e;return[o.root,o[r.orientation],r.state==="entered"&&o.entered,r.state==="exited"&&!r.in&&r.collapsedSize==="0px"&&o.hidden]}})(a.memoTheme(({theme:e})=>({height:0,overflow:"hidden",transition:e.transitions.create("height"),variants:[{props:{orientation:"horizontal"},style:{height:"auto",width:0,transition:e.transitions.create("width")}},{props:{state:"entered"},style:{height:"auto",overflow:"visible"}},{props:{state:"entered",orientation:"horizontal"},style:{width:"auto"}},{props:({ownerState:o})=>o.state==="exited"&&!o.in&&o.collapsedSize==="0px",style:{visibility:"hidden"}}]}))),It=a.styled("div",{name:"MuiCollapse",slot:"Wrapper",overridesResolver:(e,o)=>o.wrapper})({display:"flex",width:"100%",variants:[{props:{orientation:"horizontal"},style:{width:"auto",height:"100%"}}]}),Nt=a.styled("div",{name:"MuiCollapse",slot:"WrapperInner",overridesResolver:(e,o)=>o.wrapperInner})({width:"100%",variants:[{props:{orientation:"horizontal"},style:{width:"auto",height:"100%"}}]}),Fe=pe.forwardRef(function(e,o){const r=a.useDefaultProps({props:e,name:"MuiCollapse"}),{addEndListener:t,children:n,className:i,collapsedSize:s="0px",component:u,easing:c,in:d,onEnter:p,onEntered:f,onEntering:x,onExit:v,onExited:y,onExiting:b,orientation:w="vertical",style:k,timeout:h=a.duration.standard,TransitionComponent:R=a.Transition,...E}=r,F={...r,orientation:w,collapsedSize:s},L=(M=>{const{orientation:O,classes:V}=M,Y={root:["root",`${O}`],entered:["entered"],hidden:["hidden"],wrapper:["wrapper",`${O}`],wrapperInner:["wrapperInner",`${O}`]};return a.composeClasses(Y,At,V)})(F),z=a.useTheme(),_=a.useTimeout(),P=pe.useRef(null),H=pe.useRef(),G=typeof s=="number"?`${s}px`:s,X=w==="horizontal",I=X?"width":"height",te=pe.useRef(null),A=a.useForkRef(o,te),S=M=>O=>{if(M){const V=te.current;O===void 0?M(V):M(V,O)}},j=()=>P.current?P.current[X?"clientWidth":"clientHeight"]:0,N=S((M,O)=>{P.current&&X&&(P.current.style.position="absolute"),M.style[I]=G,p&&p(M,O)}),D=S((M,O)=>{const V=j();P.current&&X&&(P.current.style.position="");const{duration:Y,easing:ae}=a.getTransitionProps({style:k,timeout:h,easing:c},{mode:"enter"});if(h==="auto"){const ne=z.transitions.getAutoHeightDuration(V);M.style.transitionDuration=`${ne}ms`,H.current=ne}else M.style.transitionDuration=typeof Y=="string"?Y:`${Y}ms`;M.style[I]=`${V}px`,M.style.transitionTimingFunction=ae,x&&x(M,O)}),U=S((M,O)=>{M.style[I]="auto",f&&f(M,O)}),B=S(M=>{M.style[I]=`${j()}px`,v&&v(M)}),J=S(y),q=S(M=>{const O=j(),{duration:V,easing:Y}=a.getTransitionProps({style:k,timeout:h,easing:c},{mode:"exit"});if(h==="auto"){const ae=z.transitions.getAutoHeightDuration(O);M.style.transitionDuration=`${ae}ms`,H.current=ae}else M.style.transitionDuration=typeof V=="string"?V:`${V}ms`;M.style[I]=G,M.style.transitionTimingFunction=Y,b&&b(M)});return m.jsx(R,{in:d,onEnter:N,onEntered:U,onEntering:D,onExit:B,onExited:J,onExiting:q,addEndListener:M=>{h==="auto"&&_.start(H.current||0,M),t&&t(te.current,M)},nodeRef:te,timeout:h==="auto"?null:h,...E,children:(M,{ownerState:O,...V})=>m.jsx(Ft,{as:u,className:a.clsx(L.root,i,{entered:L.entered,exited:!d&&G==="0px"&&L.hidden}[M]),style:{[X?"minWidth":"minHeight"]:G,...k},ref:A,ownerState:{...F,state:M},...V,children:m.jsx(It,{ownerState:{...F,state:M},className:L.wrapper,ref:P,children:m.jsx(Nt,{ownerState:{...F,state:M},className:L.wrapperInner,children:n})})})})});function zt(e){return a.generateUtilityClass("MuiCard",e)}Fe&&(Fe.muiSupportAuto=!0),a.generateUtilityClasses("MuiCard",["root"]);const qt=a.styled(a.Paper,{name:"MuiCard",slot:"Root",overridesResolver:(e,o)=>o.root})({overflow:"hidden"}),Ht=pe.forwardRef(function(e,o){const r=a.useDefaultProps({props:e,name:"MuiCard"}),{className:t,raised:n=!1,...i}=r,s={...r,raised:n},u=(c=>{const{classes:d}=c;return a.composeClasses({root:["root"]},zt,d)})(s);return m.jsx(qt,{className:a.clsx(u.root,t),elevation:n?8:void 0,ref:o,ownerState:s,...i})});function Bt(e){return a.generateUtilityClass("MuiCardActions",e)}a.generateUtilityClasses("MuiCardActions",["root","spacing"]);const _t=a.styled("div",{name:"MuiCardActions",slot:"Root",overridesResolver:(e,o)=>{const{ownerState:r}=e;return[o.root,!r.disableSpacing&&o.spacing]}})({display:"flex",alignItems:"center",padding:8,variants:[{props:{disableSpacing:!1},style:{"& > :not(style) ~ :not(style)":{marginLeft:8}}}]}),Ut=pe.forwardRef(function(e,o){const r=a.useDefaultProps({props:e,name:"MuiCardActions"}),{disableSpacing:t=!1,className:n,...i}=r,s={...r,disableSpacing:t},u=(c=>{const{classes:d,disableSpacing:p}=c,f={root:["root",!p&&"spacing"]};return a.composeClasses(f,Bt,d)})(s);return m.jsx(_t,{className:a.clsx(u.root,n),ownerState:s,ref:o,...i})}),Ge=typeof a.globalCss({})=="function",Vt=(e,o)=>({WebkitFontSmoothing:"antialiased",MozOsxFontSmoothing:"grayscale",boxSizing:"border-box",WebkitTextSizeAdjust:"100%",...o&&!e.vars&&{colorScheme:e.palette.mode}}),$t=e=>({color:(e.vars||e).palette.text.primary,...e.typography.body1,backgroundColor:(e.vars||e).palette.background.default,"@media print":{backgroundColor:(e.vars||e).palette.common.white}}),tt=(e,o=!1)=>{const r={};o&&e.colorSchemes&&typeof e.getColorSchemeSelector=="function"&&Object.entries(e.colorSchemes).forEach(([i,s])=>{const u=e.getColorSchemeSelector(i);u.startsWith("@")?r[u]={":root":{colorScheme:s.palette?.mode}}:r[u.replace(/\s*&/,"")]={colorScheme:s.palette?.mode}});let t={html:Vt(e,o),"*, *::before, *::after":{boxSizing:"inherit"},"strong, b":{fontWeight:e.typography.fontWeightBold},body:{margin:0,...$t(e),"&::backdrop":{backgroundColor:(e.vars||e).palette.background.default}},...r};const n=e.components?.MuiCssBaseline?.styleOverrides;return n&&(t=[t,n]),t},Pe="mui-ecs",Kt=a.globalCss(Ge?({theme:e,enableColorScheme:o})=>tt(e,o):({theme:e})=>(o=>{const r=tt(o,!1),t=Array.isArray(r)?r[0]:r;return!o.vars&&t&&(t.html[`:root:has(${Pe})`]={colorScheme:o.palette.mode}),o.colorSchemes&&Object.entries(o.colorSchemes).forEach(([n,i])=>{const s=o.getColorSchemeSelector(n);s.startsWith("@")?t[s]={[`:root:not(:has(.${Pe}))`]:{colorScheme:i.palette?.mode}}:t[s.replace(/\s*&/,"")]={[`&:not(:has(.${Pe}))`]:{colorScheme:i.palette?.mode}}}),r})(e));function Gt(e){const o=a.useDefaultProps({props:e,name:"MuiCssBaseline"}),{children:r,enableColorScheme:t=!1}=o;return m.jsxs(pe.Fragment,{children:[Ge&&m.jsx(Kt,{enableColorScheme:t}),!Ge&&!t&&m.jsx("span",{className:Pe,style:{display:"none"}}),r]})}const Zt=a.createSvgIcon(m.jsx("path",{d:"M12 2C6.47 2 2 6.47 2 12s4.47 10 10 10 10-4.47 10-10S17.53 2 12 2m0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8m3.59-13L12 10.59 8.41 7 7 8.41 10.59 12 7 15.59 8.41 17 12 13.41 15.59 17 17 15.59 13.41 12 17 8.41z"}),"CancelOutlined"),Qt=l.createContext(null),He={didCatch:!1,error:null};class Xt extends l.Component{constructor(o){super(o),this.resetErrorBoundary=this.resetErrorBoundary.bind(this),this.state=He}static getDerivedStateFromError(o){return{didCatch:!0,error:o}}resetErrorBoundary(){const{error:o}=this.state;if(o!==null){for(var r,t,n=arguments.length,i=new Array(n),s=0;s<n;s++)i[s]=arguments[s];(r=(t=this.props).onReset)===null||r===void 0||r.call(t,{args:i,reason:"imperative-api"}),this.setState(He)}}componentDidCatch(o,r){var t,n;(t=(n=this.props).onError)===null||t===void 0||t.call(n,o,r)}componentDidUpdate(o,r){const{didCatch:t}=this.state,{resetKeys:n}=this.props;var i,s;t&&r.error!==null&&function(){let u=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],c=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[];return u.length!==c.length||u.some((d,p)=>!Object.is(d,c[p]))}(o.resetKeys,n)&&((i=(s=this.props).onReset)===null||i===void 0||i.call(s,{next:n,prev:o.resetKeys,reason:"keys"}),this.setState(He))}render(){const{children:o,fallbackRender:r,FallbackComponent:t,fallback:n}=this.props,{didCatch:i,error:s}=this.state;let u=o;if(i){const c={error:s,resetErrorBoundary:this.resetErrorBoundary};if(typeof r=="function")u=r(c);else if(t)u=l.createElement(t,c);else{if(n===void 0)throw s;u=n}}return l.createElement(Qt.Provider,{value:{didCatch:i,error:s,resetErrorBoundary:this.resetErrorBoundary}},u)}}function ht(e){var o,r,t="";if(typeof e=="string"||typeof e=="number")t+=e;else if(typeof e=="object")if(Array.isArray(e))for(o=0;o<e.length;o++)e[o]&&(r=ht(e[o]))&&(t&&(t+=" "),t+=r);else for(o in e)e[o]&&(t&&(t+=" "),t+=o);return t}function ie(){for(var e,o,r=0,t="";r<arguments.length;)(e=arguments[r++])&&(o=ht(e))&&(t&&(t+=" "),t+=o);return t}let Jt={data:""},Yt=/(?:([\u0080-\uFFFF\w-%@]+) *:? *([^{;]+?);|([^;}{]*?) *{)|(}\s*)/g,en=/\/\*[^]*?\*\/| +/g,nt=/\n+/g,de=(e,o)=>{let r="",t="",n="";for(let i in e){let s=e[i];i[0]=="@"?i[1]=="i"?r=i+" "+s+";":t+=i[1]=="f"?de(s,i):i+"{"+de(s,i[1]=="k"?"":o)+"}":typeof s=="object"?t+=de(s,o?o.replace(/([^,])+/g,u=>i.replace(/([^,]*:\S+\([^)]*\))|([^,])+/g,c=>/&/.test(c)?c.replace(/&/g,u):u?u+" "+c:c)):i):s!=null&&(i=/^--/.test(i)?i:i.replace(/[A-Z]/g,"-$&").toLowerCase(),n+=de.p?de.p(i,s):i+":"+s+";")}return r+(o&&n?o+"{"+n+"}":n)+t},oe={},gt=e=>{if(typeof e=="object"){let o="";for(let r in e)o+=r+gt(e[r]);return o}return e};function Ze(e){let o=this||{},r=e.call?e(o.p):e;return((s,u,c,d,p)=>{let f=gt(s),x=oe[f]||(oe[f]=(h=>{let R=0,E=11;for(;R<h.length;)E=101*E+h.charCodeAt(R++)>>>0;return"go"+E})(f));if(!oe[x]){let h=f!==s?s:(R=>{let E,F,L=[{}];for(;E=Yt.exec(R.replace(en,""));)E[4]?L.shift():E[3]?(F=E[3].replace(nt," ").trim(),L.unshift(L[0][F]=L[0][F]||{})):L[0][E[1]]=E[2].replace(nt," ").trim();return L[0]})(s);oe[x]=de(p?{["@keyframes "+x]:h}:h,c?"":"."+x)}let v=c&&oe.g?oe.g:null;return c&&(oe.g=oe[x]),y=oe[x],b=u,w=d,(k=v)?b.data=b.data.replace(k,y):b.data.indexOf(y)===-1&&(b.data=w?y+b.data:b.data+y),x;var y,b,w,k})(r.unshift?r.raw?(t=r,n=[].slice.call(arguments,1),i=o.p,t.reduce((s,u,c)=>{let d=n[c];if(d&&d.call){let p=d(i),f=p&&p.props&&p.props.className||/^go/.test(p)&&p;d=f?"."+f:p&&typeof p=="object"?p.props?"":de(p,""):p===!1?"":p}return s+u+(d??"")},"")):r.reduce((s,u)=>Object.assign(s,u&&u.call?u(o.p):u),{}):r,(s=>typeof window=="object"?((s?s.querySelector("#_goober"):window._goober)||Object.assign((s||document.head).appendChild(document.createElement("style")),{innerHTML:" ",id:"_goober"})).firstChild:s||Jt)(o.target),o.g,o.o,o.k);var t,n,i}function kt(e,o,r){return o&&function(t,n){for(var i=0;i<n.length;i++){var s=n[i];s.enumerable=s.enumerable||!1,s.configurable=!0,"value"in s&&(s.writable=!0),Object.defineProperty(t,s.key,s)}}(e.prototype,o),e}function T(){return T=Object.assign||function(e){for(var o=1;o<arguments.length;o++){var r=arguments[o];for(var t in r)Object.prototype.hasOwnProperty.call(r,t)&&(e[t]=r[t])}return e},T.apply(this,arguments)}function bt(e,o){e.prototype=Object.create(o.prototype),e.prototype.constructor=e,e.__proto__=o}function Se(e,o){if(e==null)return{};var r,t,n={},i=Object.keys(e);for(t=0;t<i.length;t++)r=i[t],o.indexOf(r)>=0||(n[r]=e[r]);return n}function ot(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}Ze.bind({g:1}),Ze.bind({k:1});var rt=function(){return""},xt=l.createContext({enqueueSnackbar:rt,closeSnackbar:rt}),Be="@media (max-width:599.95px)",Ae="@media (min-width:600px)",it=function(e){return e.charAt(0).toUpperCase()+e.slice(1)},Xe=function(e){return""+it(e.vertical)+it(e.horizontal)},je=function(e){return!!e||e===0},Re="unmounted",me="exited",fe="entering",ye="entered",at="exiting",Je=function(e){function o(t){var n;n=e.call(this,t)||this;var i,s=t.appear;return n.appearStatus=null,t.in?s?(i=me,n.appearStatus=fe):i=ye:i=t.unmountOnExit||t.mountOnEnter?Re:me,n.state={status:i},n.nextCallback=null,n}bt(o,e),o.getDerivedStateFromProps=function(t,n){return t.in&&n.status===Re?{status:me}:null};var r=o.prototype;return r.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},r.componentDidUpdate=function(t){var n=null;if(t!==this.props){var i=this.state.status;this.props.in?i!==fe&&i!==ye&&(n=fe):i!==fe&&i!==ye||(n=at)}this.updateStatus(!1,n)},r.componentWillUnmount=function(){this.cancelNextCallback()},r.getTimeouts=function(){var t=this.props.timeout,n=t,i=t;return t!=null&&typeof t!="number"&&typeof t!="string"&&(i=t.exit,n=t.enter),{exit:i,enter:n}},r.updateStatus=function(t,n){t===void 0&&(t=!1),n!==null?(this.cancelNextCallback(),n===fe?this.performEnter(t):this.performExit()):this.props.unmountOnExit&&this.state.status===me&&this.setState({status:Re})},r.performEnter=function(t){var n=this,i=this.props.enter,s=t,u=this.getTimeouts();t||i?(this.props.onEnter&&this.props.onEnter(this.node,s),this.safeSetState({status:fe},function(){n.props.onEntering&&n.props.onEntering(n.node,s),n.onTransitionEnd(u.enter,function(){n.safeSetState({status:ye},function(){n.props.onEntered&&n.props.onEntered(n.node,s)})})})):this.safeSetState({status:ye},function(){n.props.onEntered&&n.props.onEntered(n.node,s)})},r.performExit=function(){var t=this,n=this.props.exit,i=this.getTimeouts();n?(this.props.onExit&&this.props.onExit(this.node),this.safeSetState({status:at},function(){t.props.onExiting&&t.props.onExiting(t.node),t.onTransitionEnd(i.exit,function(){t.safeSetState({status:me},function(){t.props.onExited&&t.props.onExited(t.node)})})})):this.safeSetState({status:me},function(){t.props.onExited&&t.props.onExited(t.node)})},r.cancelNextCallback=function(){this.nextCallback!==null&&this.nextCallback.cancel&&(this.nextCallback.cancel(),this.nextCallback=null)},r.safeSetState=function(t,n){n=this.setNextCallback(n),this.setState(t,n)},r.setNextCallback=function(t){var n=this,i=!0;return this.nextCallback=function(){i&&(i=!1,n.nextCallback=null,t())},this.nextCallback.cancel=function(){i=!1},this.nextCallback},r.onTransitionEnd=function(t,n){this.setNextCallback(n);var i=t==null&&!this.props.addEndListener;this.node&&!i?(this.props.addEndListener&&this.props.addEndListener(this.node,this.nextCallback),t!=null&&setTimeout(this.nextCallback,t)):setTimeout(this.nextCallback,0)},r.render=function(){var t=this.state.status;if(t===Re)return null;var n=this.props;return(0,n.children)(t,Se(n,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]))},kt(o,[{key:"node",get:function(){var t,n=(t=this.props.nodeRef)===null||t===void 0?void 0:t.current;if(!n)throw new Error("notistack - Custom snackbar is not refForwarding");return n}}]),o}(l.Component);function he(){}function st(e,o){typeof e=="function"?e(o):e&&(e.current=o)}function Qe(e,o){return l.useMemo(function(){return e==null&&o==null?null:function(r){st(e,r),st(o,r)}},[e,o])}function Ie(e){var o=e.timeout,r=e.style,t=r===void 0?{}:r,n=e.mode;return{duration:typeof o=="object"?o[n]||0:o,easing:t.transitionTimingFunction,delay:t.transitionDelay}}Je.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:he,onEntering:he,onEntered:he,onExit:he,onExiting:he,onExited:he};var yt=function(e){e.scrollTop=e.scrollTop},lt=function(e){return Math.round(e)+"ms"};function ge(e,o){e===void 0&&(e=["all"]);var r=o||{},t=r.duration,n=t===void 0?300:t,i=r.easing,s=i===void 0?"cubic-bezier(0.4, 0, 0.2, 1)":i,u=r.delay,c=u===void 0?0:u;return(Array.isArray(e)?e:[e]).map(function(d){var p=typeof n=="string"?n:lt(n),f=typeof c=="string"?c:lt(c);return d+" "+p+" "+s+" "+f}).join(",")}function wt(e){var o;return((o=e)&&o.ownerDocument||document).defaultView||window}function Le(e,o){if(o){var r=function(t,n){var i,s=n.getBoundingClientRect(),u=wt(n);if(n.fakeTransform)i=n.fakeTransform;else{var c=u.getComputedStyle(n);i=c.getPropertyValue("-webkit-transform")||c.getPropertyValue("transform")}var d=0,p=0;if(i&&i!=="none"&&typeof i=="string"){var f=i.split("(")[1].split(")")[0].split(",");d=parseInt(f[4],10),p=parseInt(f[5],10)}switch(t){case"left":return"translateX("+(u.innerWidth+d-s.left)+"px)";case"right":return"translateX(-"+(s.left+s.width-d)+"px)";case"up":return"translateY("+(u.innerHeight+p-s.top)+"px)";default:return"translateY(-"+(s.top+s.height-p)+"px)"}}(e,o);r&&(o.style.webkitTransform=r,o.style.transform=r)}}var vt=l.forwardRef(function(e,o){var r=e.children,t=e.direction,n=t===void 0?"down":t,i=e.in,s=e.style,u=e.timeout,c=u===void 0?0:u,d=e.onEnter,p=e.onEntered,f=e.onExit,x=e.onExited,v=Se(e,["children","direction","in","style","timeout","onEnter","onEntered","onExit","onExited"]),y=l.useRef(null),b=Qe(r.ref,y),w=Qe(b,o),k=l.useCallback(function(){y.current&&Le(n,y.current)},[n]);return l.useEffect(function(){if(!i&&n!=="down"&&n!=="right"){var h=function(E,F){var L;function z(){for(var _=this,P=arguments.length,H=new Array(P),G=0;G<P;G++)H[G]=arguments[G];clearTimeout(L),L=setTimeout(function(){E.apply(_,H)},F)}return F===void 0&&(F=166),z.clear=function(){clearTimeout(L)},z}(function(){y.current&&Le(n,y.current)}),R=wt(y.current);return R.addEventListener("resize",h),function(){h.clear(),R.removeEventListener("resize",h)}}},[n,i]),l.useEffect(function(){i||k()},[i,k]),l.createElement(Je,Object.assign({appear:!0,nodeRef:y,onEnter:function(h,R){Le(n,h),yt(h),d&&d(h,R)},onEntered:p,onEntering:function(h){var R=Ie({timeout:c,mode:"enter",style:T({},s,{transitionTimingFunction:s?.transitionTimingFunction||"cubic-bezier(0.0, 0, 0.2, 1)"})});h.style.webkitTransition=ge("-webkit-transform",R),h.style.transition=ge("transform",R),h.style.webkitTransform="none",h.style.transform="none"},onExit:function(h){var R=Ie({timeout:c,mode:"exit",style:T({},s,{transitionTimingFunction:s?.transitionTimingFunction||"cubic-bezier(0.4, 0, 0.6, 1)"})});h.style.webkitTransition=ge("-webkit-transform",R),h.style.transition=ge("transform",R),Le(n,h),f&&f(h)},onExited:function(h){h.style.webkitTransition="",h.style.transition="",x&&x(h)},in:i,timeout:c},v),function(h,R){return l.cloneElement(r,T({ref:w,style:T({visibility:h!=="exited"||i?void 0:"hidden"},s,{},r.props.style)},R))})});vt.displayName="Slide";var De=function(e){return l.createElement("svg",Object.assign({viewBox:"0 0 24 24",focusable:"false",style:{fontSize:20,marginInlineEnd:8,userSelect:"none",width:"1em",height:"1em",display:"inline-block",fill:"currentColor",flexShrink:0}},e))},ce={maxSnack:3,persist:!1,hideIconVariant:!1,disableWindowBlurListener:!1,variant:"default",autoHideDuration:5e3,iconVariant:{default:void 0,success:l.createElement(function(){return l.createElement(De,null,l.createElement("path",{d:`M12 2C6.5 2 2 6.5 2 12S6.5 22 12 22 22 17.5 22 12 17.5 2 12 2M10 17L5 12L6.41
6
+ */const m=require("react/jsx-runtime"),l=require("react"),a=require("./bBrqIaOYcNmpSMcM.cjs"),Wt=require("react-dom"),ue=require("@sheetxl/sdk");function Pt(e){const o=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const r in e)if(r!=="default"){const t=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(o,r,t.get?t:{enumerable:!0,get:()=>e[r]})}}return o.default=e,Object.freeze(o)}const pe=Pt(l);function At(e){return a.generateUtilityClass("MuiCollapse",e)}a.generateUtilityClasses("MuiCollapse",["root","horizontal","vertical","entered","hidden","wrapper","wrapperInner"]);const Ft=a.styled("div",{name:"MuiCollapse",slot:"Root",overridesResolver:(e,o)=>{const{ownerState:r}=e;return[o.root,o[r.orientation],r.state==="entered"&&o.entered,r.state==="exited"&&!r.in&&r.collapsedSize==="0px"&&o.hidden]}})(a.memoTheme(({theme:e})=>({height:0,overflow:"hidden",transition:e.transitions.create("height"),variants:[{props:{orientation:"horizontal"},style:{height:"auto",width:0,transition:e.transitions.create("width")}},{props:{state:"entered"},style:{height:"auto",overflow:"visible"}},{props:{state:"entered",orientation:"horizontal"},style:{width:"auto"}},{props:({ownerState:o})=>o.state==="exited"&&!o.in&&o.collapsedSize==="0px",style:{visibility:"hidden"}}]}))),It=a.styled("div",{name:"MuiCollapse",slot:"Wrapper",overridesResolver:(e,o)=>o.wrapper})({display:"flex",width:"100%",variants:[{props:{orientation:"horizontal"},style:{width:"auto",height:"100%"}}]}),Nt=a.styled("div",{name:"MuiCollapse",slot:"WrapperInner",overridesResolver:(e,o)=>o.wrapperInner})({width:"100%",variants:[{props:{orientation:"horizontal"},style:{width:"auto",height:"100%"}}]}),Fe=pe.forwardRef(function(e,o){const r=a.useDefaultProps({props:e,name:"MuiCollapse"}),{addEndListener:t,children:n,className:i,collapsedSize:s="0px",component:u,easing:c,in:d,onEnter:p,onEntered:f,onEntering:x,onExit:v,onExited:y,onExiting:b,orientation:w="vertical",style:k,timeout:h=a.duration.standard,TransitionComponent:R=a.Transition,...E}=r,F={...r,orientation:w,collapsedSize:s},L=(M=>{const{orientation:O,classes:V}=M,Y={root:["root",`${O}`],entered:["entered"],hidden:["hidden"],wrapper:["wrapper",`${O}`],wrapperInner:["wrapperInner",`${O}`]};return a.composeClasses(Y,At,V)})(F),z=a.useTheme(),U=a.useTimeout(),P=pe.useRef(null),H=pe.useRef(),G=typeof s=="number"?`${s}px`:s,X=w==="horizontal",I=X?"width":"height",te=pe.useRef(null),A=a.useForkRef(o,te),S=M=>O=>{if(M){const V=te.current;O===void 0?M(V):M(V,O)}},j=()=>P.current?P.current[X?"clientWidth":"clientHeight"]:0,N=S((M,O)=>{P.current&&X&&(P.current.style.position="absolute"),M.style[I]=G,p&&p(M,O)}),D=S((M,O)=>{const V=j();P.current&&X&&(P.current.style.position="");const{duration:Y,easing:ae}=a.getTransitionProps({style:k,timeout:h,easing:c},{mode:"enter"});if(h==="auto"){const ne=z.transitions.getAutoHeightDuration(V);M.style.transitionDuration=`${ne}ms`,H.current=ne}else M.style.transitionDuration=typeof Y=="string"?Y:`${Y}ms`;M.style[I]=`${V}px`,M.style.transitionTimingFunction=ae,x&&x(M,O)}),_=S((M,O)=>{M.style[I]="auto",f&&f(M,O)}),B=S(M=>{M.style[I]=`${j()}px`,v&&v(M)}),J=S(y),q=S(M=>{const O=j(),{duration:V,easing:Y}=a.getTransitionProps({style:k,timeout:h,easing:c},{mode:"exit"});if(h==="auto"){const ae=z.transitions.getAutoHeightDuration(O);M.style.transitionDuration=`${ae}ms`,H.current=ae}else M.style.transitionDuration=typeof V=="string"?V:`${V}ms`;M.style[I]=G,M.style.transitionTimingFunction=Y,b&&b(M)});return m.jsx(R,{in:d,onEnter:N,onEntered:_,onEntering:D,onExit:B,onExited:J,onExiting:q,addEndListener:M=>{h==="auto"&&U.start(H.current||0,M),t&&t(te.current,M)},nodeRef:te,timeout:h==="auto"?null:h,...E,children:(M,{ownerState:O,...V})=>m.jsx(Ft,{as:u,className:a.clsx(L.root,i,{entered:L.entered,exited:!d&&G==="0px"&&L.hidden}[M]),style:{[X?"minWidth":"minHeight"]:G,...k},ref:A,ownerState:{...F,state:M},...V,children:m.jsx(It,{ownerState:{...F,state:M},className:L.wrapper,ref:P,children:m.jsx(Nt,{ownerState:{...F,state:M},className:L.wrapperInner,children:n})})})})});function zt(e){return a.generateUtilityClass("MuiCard",e)}Fe&&(Fe.muiSupportAuto=!0),a.generateUtilityClasses("MuiCard",["root"]);const qt=a.styled(a.Paper,{name:"MuiCard",slot:"Root",overridesResolver:(e,o)=>o.root})({overflow:"hidden"}),Ht=pe.forwardRef(function(e,o){const r=a.useDefaultProps({props:e,name:"MuiCard"}),{className:t,raised:n=!1,...i}=r,s={...r,raised:n},u=(c=>{const{classes:d}=c;return a.composeClasses({root:["root"]},zt,d)})(s);return m.jsx(qt,{className:a.clsx(u.root,t),elevation:n?8:void 0,ref:o,ownerState:s,...i})});function Bt(e){return a.generateUtilityClass("MuiCardActions",e)}a.generateUtilityClasses("MuiCardActions",["root","spacing"]);const Ut=a.styled("div",{name:"MuiCardActions",slot:"Root",overridesResolver:(e,o)=>{const{ownerState:r}=e;return[o.root,!r.disableSpacing&&o.spacing]}})({display:"flex",alignItems:"center",padding:8,variants:[{props:{disableSpacing:!1},style:{"& > :not(style) ~ :not(style)":{marginLeft:8}}}]}),_t=pe.forwardRef(function(e,o){const r=a.useDefaultProps({props:e,name:"MuiCardActions"}),{disableSpacing:t=!1,className:n,...i}=r,s={...r,disableSpacing:t},u=(c=>{const{classes:d,disableSpacing:p}=c,f={root:["root",!p&&"spacing"]};return a.composeClasses(f,Bt,d)})(s);return m.jsx(Ut,{className:a.clsx(u.root,n),ownerState:s,ref:o,...i})}),Ge=typeof a.globalCss({})=="function",Vt=(e,o)=>({WebkitFontSmoothing:"antialiased",MozOsxFontSmoothing:"grayscale",boxSizing:"border-box",WebkitTextSizeAdjust:"100%",...o&&!e.vars&&{colorScheme:e.palette.mode}}),$t=e=>({color:(e.vars||e).palette.text.primary,...e.typography.body1,backgroundColor:(e.vars||e).palette.background.default,"@media print":{backgroundColor:(e.vars||e).palette.common.white}}),tt=(e,o=!1)=>{const r={};o&&e.colorSchemes&&typeof e.getColorSchemeSelector=="function"&&Object.entries(e.colorSchemes).forEach(([i,s])=>{const u=e.getColorSchemeSelector(i);u.startsWith("@")?r[u]={":root":{colorScheme:s.palette?.mode}}:r[u.replace(/\s*&/,"")]={colorScheme:s.palette?.mode}});let t={html:Vt(e,o),"*, *::before, *::after":{boxSizing:"inherit"},"strong, b":{fontWeight:e.typography.fontWeightBold},body:{margin:0,...$t(e),"&::backdrop":{backgroundColor:(e.vars||e).palette.background.default}},...r};const n=e.components?.MuiCssBaseline?.styleOverrides;return n&&(t=[t,n]),t},Pe="mui-ecs",Kt=a.globalCss(Ge?({theme:e,enableColorScheme:o})=>tt(e,o):({theme:e})=>(o=>{const r=tt(o,!1),t=Array.isArray(r)?r[0]:r;return!o.vars&&t&&(t.html[`:root:has(${Pe})`]={colorScheme:o.palette.mode}),o.colorSchemes&&Object.entries(o.colorSchemes).forEach(([n,i])=>{const s=o.getColorSchemeSelector(n);s.startsWith("@")?t[s]={[`:root:not(:has(.${Pe}))`]:{colorScheme:i.palette?.mode}}:t[s.replace(/\s*&/,"")]={[`&:not(:has(.${Pe}))`]:{colorScheme:i.palette?.mode}}}),r})(e));function Gt(e){const o=a.useDefaultProps({props:e,name:"MuiCssBaseline"}),{children:r,enableColorScheme:t=!1}=o;return m.jsxs(pe.Fragment,{children:[Ge&&m.jsx(Kt,{enableColorScheme:t}),!Ge&&!t&&m.jsx("span",{className:Pe,style:{display:"none"}}),r]})}const Zt=a.createSvgIcon(m.jsx("path",{d:"M12 2C6.47 2 2 6.47 2 12s4.47 10 10 10 10-4.47 10-10S17.53 2 12 2m0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8m3.59-13L12 10.59 8.41 7 7 8.41 10.59 12 7 15.59 8.41 17 12 13.41 15.59 17 17 15.59 13.41 12 17 8.41z"}),"CancelOutlined"),Qt=l.createContext(null),He={didCatch:!1,error:null};class Xt extends l.Component{constructor(o){super(o),this.resetErrorBoundary=this.resetErrorBoundary.bind(this),this.state=He}static getDerivedStateFromError(o){return{didCatch:!0,error:o}}resetErrorBoundary(){const{error:o}=this.state;if(o!==null){for(var r,t,n=arguments.length,i=new Array(n),s=0;s<n;s++)i[s]=arguments[s];(r=(t=this.props).onReset)===null||r===void 0||r.call(t,{args:i,reason:"imperative-api"}),this.setState(He)}}componentDidCatch(o,r){var t,n;(t=(n=this.props).onError)===null||t===void 0||t.call(n,o,r)}componentDidUpdate(o,r){const{didCatch:t}=this.state,{resetKeys:n}=this.props;var i,s;t&&r.error!==null&&function(){let u=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],c=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[];return u.length!==c.length||u.some((d,p)=>!Object.is(d,c[p]))}(o.resetKeys,n)&&((i=(s=this.props).onReset)===null||i===void 0||i.call(s,{next:n,prev:o.resetKeys,reason:"keys"}),this.setState(He))}render(){const{children:o,fallbackRender:r,FallbackComponent:t,fallback:n}=this.props,{didCatch:i,error:s}=this.state;let u=o;if(i){const c={error:s,resetErrorBoundary:this.resetErrorBoundary};if(typeof r=="function")u=r(c);else if(t)u=l.createElement(t,c);else{if(n===void 0)throw s;u=n}}return l.createElement(Qt.Provider,{value:{didCatch:i,error:s,resetErrorBoundary:this.resetErrorBoundary}},u)}}function ht(e){var o,r,t="";if(typeof e=="string"||typeof e=="number")t+=e;else if(typeof e=="object")if(Array.isArray(e))for(o=0;o<e.length;o++)e[o]&&(r=ht(e[o]))&&(t&&(t+=" "),t+=r);else for(o in e)e[o]&&(t&&(t+=" "),t+=o);return t}function ie(){for(var e,o,r=0,t="";r<arguments.length;)(e=arguments[r++])&&(o=ht(e))&&(t&&(t+=" "),t+=o);return t}let Jt={data:""},Yt=/(?:([\u0080-\uFFFF\w-%@]+) *:? *([^{;]+?);|([^;}{]*?) *{)|(}\s*)/g,en=/\/\*[^]*?\*\/| +/g,nt=/\n+/g,de=(e,o)=>{let r="",t="",n="";for(let i in e){let s=e[i];i[0]=="@"?i[1]=="i"?r=i+" "+s+";":t+=i[1]=="f"?de(s,i):i+"{"+de(s,i[1]=="k"?"":o)+"}":typeof s=="object"?t+=de(s,o?o.replace(/([^,])+/g,u=>i.replace(/([^,]*:\S+\([^)]*\))|([^,])+/g,c=>/&/.test(c)?c.replace(/&/g,u):u?u+" "+c:c)):i):s!=null&&(i=/^--/.test(i)?i:i.replace(/[A-Z]/g,"-$&").toLowerCase(),n+=de.p?de.p(i,s):i+":"+s+";")}return r+(o&&n?o+"{"+n+"}":n)+t},oe={},gt=e=>{if(typeof e=="object"){let o="";for(let r in e)o+=r+gt(e[r]);return o}return e};function Ze(e){let o=this||{},r=e.call?e(o.p):e;return((s,u,c,d,p)=>{let f=gt(s),x=oe[f]||(oe[f]=(h=>{let R=0,E=11;for(;R<h.length;)E=101*E+h.charCodeAt(R++)>>>0;return"go"+E})(f));if(!oe[x]){let h=f!==s?s:(R=>{let E,F,L=[{}];for(;E=Yt.exec(R.replace(en,""));)E[4]?L.shift():E[3]?(F=E[3].replace(nt," ").trim(),L.unshift(L[0][F]=L[0][F]||{})):L[0][E[1]]=E[2].replace(nt," ").trim();return L[0]})(s);oe[x]=de(p?{["@keyframes "+x]:h}:h,c?"":"."+x)}let v=c&&oe.g?oe.g:null;return c&&(oe.g=oe[x]),y=oe[x],b=u,w=d,(k=v)?b.data=b.data.replace(k,y):b.data.indexOf(y)===-1&&(b.data=w?y+b.data:b.data+y),x;var y,b,w,k})(r.unshift?r.raw?(t=r,n=[].slice.call(arguments,1),i=o.p,t.reduce((s,u,c)=>{let d=n[c];if(d&&d.call){let p=d(i),f=p&&p.props&&p.props.className||/^go/.test(p)&&p;d=f?"."+f:p&&typeof p=="object"?p.props?"":de(p,""):p===!1?"":p}return s+u+(d??"")},"")):r.reduce((s,u)=>Object.assign(s,u&&u.call?u(o.p):u),{}):r,(s=>typeof window=="object"?((s?s.querySelector("#_goober"):window._goober)||Object.assign((s||document.head).appendChild(document.createElement("style")),{innerHTML:" ",id:"_goober"})).firstChild:s||Jt)(o.target),o.g,o.o,o.k);var t,n,i}function kt(e,o,r){return o&&function(t,n){for(var i=0;i<n.length;i++){var s=n[i];s.enumerable=s.enumerable||!1,s.configurable=!0,"value"in s&&(s.writable=!0),Object.defineProperty(t,s.key,s)}}(e.prototype,o),e}function T(){return T=Object.assign||function(e){for(var o=1;o<arguments.length;o++){var r=arguments[o];for(var t in r)Object.prototype.hasOwnProperty.call(r,t)&&(e[t]=r[t])}return e},T.apply(this,arguments)}function bt(e,o){e.prototype=Object.create(o.prototype),e.prototype.constructor=e,e.__proto__=o}function Se(e,o){if(e==null)return{};var r,t,n={},i=Object.keys(e);for(t=0;t<i.length;t++)r=i[t],o.indexOf(r)>=0||(n[r]=e[r]);return n}function ot(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}Ze.bind({g:1}),Ze.bind({k:1});var rt=function(){return""},xt=l.createContext({enqueueSnackbar:rt,closeSnackbar:rt}),Be="@media (max-width:599.95px)",Ae="@media (min-width:600px)",it=function(e){return e.charAt(0).toUpperCase()+e.slice(1)},Xe=function(e){return""+it(e.vertical)+it(e.horizontal)},je=function(e){return!!e||e===0},Re="unmounted",me="exited",fe="entering",ye="entered",at="exiting",Je=function(e){function o(t){var n;n=e.call(this,t)||this;var i,s=t.appear;return n.appearStatus=null,t.in?s?(i=me,n.appearStatus=fe):i=ye:i=t.unmountOnExit||t.mountOnEnter?Re:me,n.state={status:i},n.nextCallback=null,n}bt(o,e),o.getDerivedStateFromProps=function(t,n){return t.in&&n.status===Re?{status:me}:null};var r=o.prototype;return r.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},r.componentDidUpdate=function(t){var n=null;if(t!==this.props){var i=this.state.status;this.props.in?i!==fe&&i!==ye&&(n=fe):i!==fe&&i!==ye||(n=at)}this.updateStatus(!1,n)},r.componentWillUnmount=function(){this.cancelNextCallback()},r.getTimeouts=function(){var t=this.props.timeout,n=t,i=t;return t!=null&&typeof t!="number"&&typeof t!="string"&&(i=t.exit,n=t.enter),{exit:i,enter:n}},r.updateStatus=function(t,n){t===void 0&&(t=!1),n!==null?(this.cancelNextCallback(),n===fe?this.performEnter(t):this.performExit()):this.props.unmountOnExit&&this.state.status===me&&this.setState({status:Re})},r.performEnter=function(t){var n=this,i=this.props.enter,s=t,u=this.getTimeouts();t||i?(this.props.onEnter&&this.props.onEnter(this.node,s),this.safeSetState({status:fe},function(){n.props.onEntering&&n.props.onEntering(n.node,s),n.onTransitionEnd(u.enter,function(){n.safeSetState({status:ye},function(){n.props.onEntered&&n.props.onEntered(n.node,s)})})})):this.safeSetState({status:ye},function(){n.props.onEntered&&n.props.onEntered(n.node,s)})},r.performExit=function(){var t=this,n=this.props.exit,i=this.getTimeouts();n?(this.props.onExit&&this.props.onExit(this.node),this.safeSetState({status:at},function(){t.props.onExiting&&t.props.onExiting(t.node),t.onTransitionEnd(i.exit,function(){t.safeSetState({status:me},function(){t.props.onExited&&t.props.onExited(t.node)})})})):this.safeSetState({status:me},function(){t.props.onExited&&t.props.onExited(t.node)})},r.cancelNextCallback=function(){this.nextCallback!==null&&this.nextCallback.cancel&&(this.nextCallback.cancel(),this.nextCallback=null)},r.safeSetState=function(t,n){n=this.setNextCallback(n),this.setState(t,n)},r.setNextCallback=function(t){var n=this,i=!0;return this.nextCallback=function(){i&&(i=!1,n.nextCallback=null,t())},this.nextCallback.cancel=function(){i=!1},this.nextCallback},r.onTransitionEnd=function(t,n){this.setNextCallback(n);var i=t==null&&!this.props.addEndListener;this.node&&!i?(this.props.addEndListener&&this.props.addEndListener(this.node,this.nextCallback),t!=null&&setTimeout(this.nextCallback,t)):setTimeout(this.nextCallback,0)},r.render=function(){var t=this.state.status;if(t===Re)return null;var n=this.props;return(0,n.children)(t,Se(n,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]))},kt(o,[{key:"node",get:function(){var t,n=(t=this.props.nodeRef)===null||t===void 0?void 0:t.current;if(!n)throw new Error("notistack - Custom snackbar is not refForwarding");return n}}]),o}(l.Component);function he(){}function st(e,o){typeof e=="function"?e(o):e&&(e.current=o)}function Qe(e,o){return l.useMemo(function(){return e==null&&o==null?null:function(r){st(e,r),st(o,r)}},[e,o])}function Ie(e){var o=e.timeout,r=e.style,t=r===void 0?{}:r,n=e.mode;return{duration:typeof o=="object"?o[n]||0:o,easing:t.transitionTimingFunction,delay:t.transitionDelay}}Je.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:he,onEntering:he,onEntered:he,onExit:he,onExiting:he,onExited:he};var yt=function(e){e.scrollTop=e.scrollTop},lt=function(e){return Math.round(e)+"ms"};function ge(e,o){e===void 0&&(e=["all"]);var r=o||{},t=r.duration,n=t===void 0?300:t,i=r.easing,s=i===void 0?"cubic-bezier(0.4, 0, 0.2, 1)":i,u=r.delay,c=u===void 0?0:u;return(Array.isArray(e)?e:[e]).map(function(d){var p=typeof n=="string"?n:lt(n),f=typeof c=="string"?c:lt(c);return d+" "+p+" "+s+" "+f}).join(",")}function wt(e){var o;return((o=e)&&o.ownerDocument||document).defaultView||window}function Le(e,o){if(o){var r=function(t,n){var i,s=n.getBoundingClientRect(),u=wt(n);if(n.fakeTransform)i=n.fakeTransform;else{var c=u.getComputedStyle(n);i=c.getPropertyValue("-webkit-transform")||c.getPropertyValue("transform")}var d=0,p=0;if(i&&i!=="none"&&typeof i=="string"){var f=i.split("(")[1].split(")")[0].split(",");d=parseInt(f[4],10),p=parseInt(f[5],10)}switch(t){case"left":return"translateX("+(u.innerWidth+d-s.left)+"px)";case"right":return"translateX(-"+(s.left+s.width-d)+"px)";case"up":return"translateY("+(u.innerHeight+p-s.top)+"px)";default:return"translateY(-"+(s.top+s.height-p)+"px)"}}(e,o);r&&(o.style.webkitTransform=r,o.style.transform=r)}}var vt=l.forwardRef(function(e,o){var r=e.children,t=e.direction,n=t===void 0?"down":t,i=e.in,s=e.style,u=e.timeout,c=u===void 0?0:u,d=e.onEnter,p=e.onEntered,f=e.onExit,x=e.onExited,v=Se(e,["children","direction","in","style","timeout","onEnter","onEntered","onExit","onExited"]),y=l.useRef(null),b=Qe(r.ref,y),w=Qe(b,o),k=l.useCallback(function(){y.current&&Le(n,y.current)},[n]);return l.useEffect(function(){if(!i&&n!=="down"&&n!=="right"){var h=function(E,F){var L;function z(){for(var U=this,P=arguments.length,H=new Array(P),G=0;G<P;G++)H[G]=arguments[G];clearTimeout(L),L=setTimeout(function(){E.apply(U,H)},F)}return F===void 0&&(F=166),z.clear=function(){clearTimeout(L)},z}(function(){y.current&&Le(n,y.current)}),R=wt(y.current);return R.addEventListener("resize",h),function(){h.clear(),R.removeEventListener("resize",h)}}},[n,i]),l.useEffect(function(){i||k()},[i,k]),l.createElement(Je,Object.assign({appear:!0,nodeRef:y,onEnter:function(h,R){Le(n,h),yt(h),d&&d(h,R)},onEntered:p,onEntering:function(h){var R=Ie({timeout:c,mode:"enter",style:T({},s,{transitionTimingFunction:s?.transitionTimingFunction||"cubic-bezier(0.0, 0, 0.2, 1)"})});h.style.webkitTransition=ge("-webkit-transform",R),h.style.transition=ge("transform",R),h.style.webkitTransform="none",h.style.transform="none"},onExit:function(h){var R=Ie({timeout:c,mode:"exit",style:T({},s,{transitionTimingFunction:s?.transitionTimingFunction||"cubic-bezier(0.4, 0, 0.6, 1)"})});h.style.webkitTransition=ge("-webkit-transform",R),h.style.transition=ge("transform",R),Le(n,h),f&&f(h)},onExited:function(h){h.style.webkitTransition="",h.style.transition="",x&&x(h)},in:i,timeout:c},v),function(h,R){return l.cloneElement(r,T({ref:w,style:T({visibility:h!=="exited"||i?void 0:"hidden"},s,{},r.props.style)},R))})});vt.displayName="Slide";var De=function(e){return l.createElement("svg",Object.assign({viewBox:"0 0 24 24",focusable:"false",style:{fontSize:20,marginInlineEnd:8,userSelect:"none",width:"1em",height:"1em",display:"inline-block",fill:"currentColor",flexShrink:0}},e))},ce={maxSnack:3,persist:!1,hideIconVariant:!1,disableWindowBlurListener:!1,variant:"default",autoHideDuration:5e3,iconVariant:{default:void 0,success:l.createElement(function(){return l.createElement(De,null,l.createElement("path",{d:`M12 2C6.5 2 2 6.5 2 12S6.5 22 12 22 22 17.5 22 12 17.5 2 12 2M10 17L5 12L6.41
7
7
  10.59L10 14.17L17.59 6.58L19 8L10 17Z`}))},null),warning:l.createElement(function(){return l.createElement(De,null,l.createElement("path",{d:"M13,14H11V10H13M13,18H11V16H13M1,21H23L12,2L1,21Z"}))},null),error:l.createElement(function(){return l.createElement(De,null,l.createElement("path",{d:`M12,2C17.53,2 22,6.47 22,12C22,17.53 17.53,22 12,22C6.47,22 2,17.53 2,12C2,
8
8
  6.47 6.47,2 12,2M15.59,7L12,10.59L8.41,7L7,8.41L10.59,12L7,15.59L8.41,17L12,
9
9
  13.41L15.59,17L17,15.59L13.41,12L17,8.41L15.59,7Z`}))},null),info:l.createElement(function(){return l.createElement(De,null,l.createElement("path",{d:`M13,9H11V7H13M13,17H11V11H13M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,
10
- 0 22,12A10,10 0 0,0 12,2Z`}))},null)},anchorOrigin:{vertical:"bottom",horizontal:"left"},TransitionComponent:vt,transitionDuration:{enter:225,exit:195}};function Me(e){return Object.entries(e).reduce(function(o,r){var t,n=r[0],i=r[1];return T({},o,((t={})[n]=Ze(i),t))},{})}var Et="notistack-CollapseWrapper",tn=function(e){return"notistack-MuiContent-"+e},ct=Me({root:{height:0},entered:{height:"auto"}}),_e="0px",Ct=l.forwardRef(function(e,o){var r=e.children,t=e.in,n=e.onExited,i=l.useRef(null),s=l.useRef(null),u=Qe(o,s),c=function(){return i.current?i.current.clientHeight:0};return l.createElement(Je,{in:t,unmountOnExit:!0,onEnter:function(d){d.style.height=_e},onEntered:function(d){d.style.height="auto"},onEntering:function(d){var p=c(),f=Ie({timeout:175,mode:"enter"}),x=f.duration,v=f.easing;d.style.transitionDuration=typeof x=="string"?x:x+"ms",d.style.height=p+"px",d.style.transitionTimingFunction=v||""},onExit:function(d){d.style.height=c()+"px"},onExited:n,onExiting:function(d){yt(d);var p=Ie({timeout:175,mode:"exit"}),f=p.duration,x=p.easing;d.style.transitionDuration=typeof f=="string"?f:f+"ms",d.style.height=_e,d.style.transitionTimingFunction=x||""},nodeRef:s,timeout:175},function(d,p){return l.createElement("div",Object.assign({ref:u,className:ie(ct.root,d==="entered"&&ct.entered),style:T({pointerEvents:"all",overflow:"hidden",minHeight:_e,transition:ge("height")},d==="entered"&&{overflow:"visible"},{},d==="exited"&&!t&&{visibility:"hidden"})},p),l.createElement("div",{ref:i,className:Et,style:{display:"flex",width:"100%"}},r))})});Ct.displayName="Collapse";var ut={right:"left",left:"right",bottom:"up",top:"down"},nn=function(e){return"anchorOrigin"+Xe(e)},on=function(){};function Ce(e,o){return e.reduce(function(r,t){return t==null?r:function(){for(var n=arguments.length,i=new Array(n),s=0;s<n;s++)i[s]=arguments[s];var u=[].concat(i);o&&u.indexOf(o)===-1&&u.push(o),r.apply(this,u),t.apply(this,u)}},on)}var rn=typeof window<"u"?l.useLayoutEffect:l.useEffect;function dt(e){var o=l.useRef(e);return rn(function(){o.current=e}),l.useCallback(function(){return o.current.apply(void 0,arguments)},[])}var Ue,St=l.forwardRef(function(e,o){var r=e.children,t=e.className,n=e.autoHideDuration,i=e.disableWindowBlurListener,s=i!==void 0&&i,u=e.onClose,c=e.id,d=e.open,p=e.SnackbarProps,f=p===void 0?{}:p,x=l.useRef(),v=dt(function(){u&&u.apply(void 0,arguments)}),y=dt(function(k){u&&k!=null&&(x.current&&clearTimeout(x.current),x.current=setTimeout(function(){v(null,"timeout",c)},k))});l.useEffect(function(){return d&&y(n),function(){x.current&&clearTimeout(x.current)}},[d,n,y]);var b=function(){x.current&&clearTimeout(x.current)},w=l.useCallback(function(){n!=null&&y(.5*n)},[n,y]);return l.useEffect(function(){if(!s&&d)return window.addEventListener("focus",w),window.addEventListener("blur",b),function(){window.removeEventListener("focus",w),window.removeEventListener("blur",b)}},[s,w,d]),l.createElement("div",Object.assign({ref:o},f,{className:ie("notistack-Snackbar",t),onMouseEnter:function(k){f.onMouseEnter&&f.onMouseEnter(k),b()},onMouseLeave:function(k){f.onMouseLeave&&f.onMouseLeave(k),w()}}),r)});St.displayName="Snackbar";var an=Me({root:(Ue={display:"flex",flexWrap:"wrap",flexGrow:1},Ue[Ae]={flexGrow:"initial",minWidth:"288px"},Ue)}),Ye=l.forwardRef(function(e,o){var r=e.className,t=Se(e,["className"]);return l.createElement("div",Object.assign({ref:o,className:ie(an.root,r)},t))});Ye.displayName="SnackbarContent";var we=Me({root:{backgroundColor:"#313131",fontSize:"0.875rem",lineHeight:1.43,letterSpacing:"0.01071em",color:"#fff",alignItems:"center",padding:"6px 16px",borderRadius:"4px",boxShadow:"0px 3px 5px -1px rgba(0,0,0,0.2),0px 6px 10px 0px rgba(0,0,0,0.14),0px 1px 18px 0px rgba(0,0,0,0.12)"},lessPadding:{paddingLeft:"20px"},default:{backgroundColor:"#313131"},success:{backgroundColor:"#43a047"},error:{backgroundColor:"#d32f2f"},warning:{backgroundColor:"#ff9800"},info:{backgroundColor:"#2196f3"},message:{display:"flex",alignItems:"center",padding:"8px 0"},action:{display:"flex",alignItems:"center",marginLeft:"auto",paddingLeft:"16px",marginRight:"-8px"}}),pt="notistack-snackbar",Mt=l.forwardRef(function(e,o){var r=e.id,t=e.message,n=e.action,i=e.iconVariant,s=e.variant,u=e.hideIconVariant,c=e.style,d=e.className,p=i[s],f=n;return typeof f=="function"&&(f=f(r)),l.createElement(Ye,{ref:o,role:"alert","aria-describedby":pt,style:c,className:ie("notistack-MuiContent",tn(s),we.root,we[s],d,!u&&p&&we.lessPadding)},l.createElement("div",{id:pt,className:we.message},u?null:p,t),f&&l.createElement("div",{className:we.action},f))});Mt.displayName="MaterialDesignContent";var ve,Ve,Te,Oe,$e,sn=l.memo(Mt),ln=Me({wrappedRoot:{width:"100%",position:"relative",transform:"translateX(0)",top:0,right:0,bottom:0,left:0,minWidth:"288px"}}),cn=function(e){var o=l.useRef(),r=l.useState(!0),t=r[0],n=r[1],i=Ce([e.snack.onClose,e.onClose]),s=l.useCallback(function(){o.current=setTimeout(function(){n(function(_){return!_})},125)},[]);l.useEffect(function(){return function(){o.current&&clearTimeout(o.current)}},[]);var u,c=e.snack,d=e.classes,p=e.Component,f=p===void 0?sn:p,x=l.useMemo(function(){return function(_){_===void 0&&(_={});var P={containerRoot:!0,containerAnchorOriginTopCenter:!0,containerAnchorOriginBottomCenter:!0,containerAnchorOriginTopRight:!0,containerAnchorOriginBottomRight:!0,containerAnchorOriginTopLeft:!0,containerAnchorOriginBottomLeft:!0};return Object.keys(_).filter(function(H){return!P[H]}).reduce(function(H,G){var X;return T({},H,((X={})[G]=_[G],X))},{})}(d)},[d]),v=c.open,y=c.SnackbarProps,b=c.TransitionComponent,w=c.TransitionProps,k=c.transitionDuration,h=c.disableWindowBlurListener,R=c.content,E=Se(c,["open","SnackbarProps","TransitionComponent","TransitionProps","transitionDuration","disableWindowBlurListener","content","entered","requestClose","onEnter","onEntered","onExit","onExited"]),F=T({direction:(u=E.anchorOrigin,u.horizontal!=="center"?ut[u.horizontal]:ut[u.vertical]),timeout:k},w),L=R;typeof L=="function"&&(L=L(E.id,E.message));var z=["onEnter","onEntered","onExit","onExited"].reduce(function(_,P){var H;return T({},_,((H={})[P]=Ce([e.snack[P],e[P]],E.id),H))},{});return l.createElement(Ct,{in:t,onExited:z.onExited},l.createElement(St,{open:v,id:E.id,disableWindowBlurListener:h,autoHideDuration:E.autoHideDuration,className:ie(ln.wrappedRoot,x.root,x[nn(E.anchorOrigin)]),SnackbarProps:y,onClose:i},l.createElement(b,Object.assign({},F,{appear:!0,in:v,onExit:z.onExit,onExited:s,onEnter:z.onEnter,onEntered:Ce([z.onEntered,function(){e.snack.requestClose&&i(null,"instructed",e.snack.id)}],E.id)}),L||l.createElement(f,Object.assign({},E)))))},Ee=20,Ke=6,un=2,mt="."+Et,We=Me({root:(ve={boxSizing:"border-box",display:"flex",maxHeight:"100%",position:"fixed",zIndex:1400,height:"auto",width:"auto",transition:ge(["top","right","bottom","left","max-width"],{duration:300,easing:"ease"}),pointerEvents:"none"},ve[mt]={padding:Ke+"px 0px",transition:"padding 300ms ease 0ms"},ve.maxWidth="calc(100% - "+2*Ee+"px)",ve[Be]={width:"100%",maxWidth:"calc(100% - 32px)"},ve),rootDense:(Ve={},Ve[mt]={padding:un+"px 0px"},Ve),top:{top:Ee-Ke+"px",flexDirection:"column"},bottom:{bottom:Ee-Ke+"px",flexDirection:"column-reverse"},left:(Te={left:Ee+"px"},Te[Ae]={alignItems:"flex-start"},Te[Be]={left:"16px"},Te),right:(Oe={right:Ee+"px"},Oe[Ae]={alignItems:"flex-end"},Oe[Be]={right:"16px"},Oe),center:($e={left:"50%",transform:"translateX(-50%)"},$e[Ae]={alignItems:"center"},$e)}),dn=l.memo(function(e){var o=e.classes,r=o===void 0?{}:o,t=e.anchorOrigin,n=e.dense,i=e.children,s=ie("notistack-SnackbarContainer",We[t.vertical],We[t.horizontal],We.root,r.containerRoot,r["containerAnchorOrigin"+Xe(t)],n&&We.rootDense);return l.createElement("div",{className:s},i)}),ft=function(e){return!(typeof e=="string"||l.isValidElement(e))},pn=function(e){function o(r){var t;return(t=e.call(this,r)||this).enqueueSnackbar=function(n,i){if(i===void 0&&(i={}),n==null)throw new Error("enqueueSnackbar called with invalid argument");var s=ft(n)?n:i,u=ft(n)?n.message:n,c=s.key,d=s.preventDuplicate,p=Se(s,["key","preventDuplicate"]),f=je(c),x=f?c:new Date().getTime()+Math.random(),v=function(b,w){return function(k,h){return h===void 0&&(h=!1),h?T({},ce[k],{},w[k],{},b[k]):k==="autoHideDuration"?(L=b.autoHideDuration,z=w.autoHideDuration,(_=function(P){return typeof P=="number"||P===null})(L)?L:_(z)?z:ce.autoHideDuration):k==="transitionDuration"?(R=b.transitionDuration,E=w.transitionDuration,(F=function(P,H){return H.some(function(G){return typeof P===G})})(R,["string","number"])?R:F(R,["object"])?T({},ce.transitionDuration,{},F(E,["object"])&&E,{},R):F(E,["string","number"])?E:F(E,["object"])?T({},ce.transitionDuration,{},E):ce.transitionDuration):b[k]||w[k]||ce[k];var R,E,F,L,z,_}}(p,t.props),y=T({id:x},p,{message:u,open:!0,entered:!1,requestClose:!1,persist:v("persist"),action:v("action"),content:v("content"),variant:v("variant"),anchorOrigin:v("anchorOrigin"),disableWindowBlurListener:v("disableWindowBlurListener"),autoHideDuration:v("autoHideDuration"),hideIconVariant:v("hideIconVariant"),TransitionComponent:v("TransitionComponent"),transitionDuration:v("transitionDuration"),TransitionProps:v("TransitionProps",!0),iconVariant:v("iconVariant",!0),style:v("style",!0),SnackbarProps:v("SnackbarProps",!0),className:ie(t.props.className,p.className)});return y.persist&&(y.autoHideDuration=void 0),t.setState(function(b){if(d===void 0&&t.props.preventDuplicate||d){var w=function(R){return f?R.id===x:R.message===u},k=b.queue.findIndex(w)>-1,h=b.snacks.findIndex(w)>-1;if(k||h)return b}return t.handleDisplaySnack(T({},b,{queue:[].concat(b.queue,[y])}))}),x},t.handleDisplaySnack=function(n){return n.snacks.length>=t.maxSnack?t.handleDismissOldest(n):t.processQueue(n)},t.processQueue=function(n){var i=n.queue,s=n.snacks;return i.length>0?T({},n,{snacks:[].concat(s,[i[0]]),queue:i.slice(1,i.length)}):n},t.handleDismissOldest=function(n){if(n.snacks.some(function(c){return!c.open||c.requestClose}))return n;var i=!1,s=!1;n.snacks.reduce(function(c,d){return c+(d.open&&d.persist?1:0)},0)===t.maxSnack&&(s=!0);var u=n.snacks.map(function(c){return i||c.persist&&!s?T({},c):(i=!0,c.entered?(c.onClose&&c.onClose(null,"maxsnack",c.id),t.props.onClose&&t.props.onClose(null,"maxsnack",c.id),T({},c,{open:!1})):T({},c,{requestClose:!0}))});return T({},n,{snacks:u})},t.handleEnteredSnack=function(n,i,s){if(!je(s))throw new Error("handleEnteredSnack Cannot be called with undefined key");t.setState(function(u){return{snacks:u.snacks.map(function(c){return c.id===s?T({},c,{entered:!0}):T({},c)})}})},t.handleCloseSnack=function(n,i,s){t.props.onClose&&t.props.onClose(n,i,s);var u=s===void 0;t.setState(function(c){var d=c.snacks,p=c.queue;return{snacks:d.map(function(f){return u||f.id===s?f.entered?T({},f,{open:!1}):T({},f,{requestClose:!0}):T({},f)}),queue:p.filter(function(f){return f.id!==s})}})},t.closeSnackbar=function(n){var i=t.state.snacks.find(function(s){return s.id===n});je(n)&&i&&i.onClose&&i.onClose(null,"instructed",n),t.handleCloseSnack(null,"instructed",n)},t.handleExitedSnack=function(n,i){if(!je(i))throw new Error("handleExitedSnack Cannot be called with undefined key");t.setState(function(s){var u=t.processQueue(T({},s,{snacks:s.snacks.filter(function(c){return c.id!==i})}));return u.queue.length===0?u:t.handleDismissOldest(u)})},t.enqueueSnackbar,t.closeSnackbar,t.state={snacks:[],queue:[],contextValue:{enqueueSnackbar:t.enqueueSnackbar.bind(ot(t)),closeSnackbar:t.closeSnackbar.bind(ot(t))}},t}return bt(o,e),o.prototype.render=function(){var r=this,t=this.state.contextValue,n=this.props,i=n.domRoot,s=n.children,u=n.dense,c=u!==void 0&&u,d=n.Components,p=d===void 0?{}:d,f=n.classes,x=this.state.snacks.reduce(function(y,b){var w,k=Xe(b.anchorOrigin),h=y[k]||[];return T({},y,((w={})[k]=[].concat(h,[b]),w))},{}),v=Object.keys(x).map(function(y){var b=x[y],w=b[0];return l.createElement(dn,{key:y,dense:c,anchorOrigin:w.anchorOrigin,classes:f},b.map(function(k){return l.createElement(cn,{key:k.id,snack:k,classes:f,Component:p[k.variant],onClose:r.handleCloseSnack,onEnter:r.props.onEnter,onExit:r.props.onExit,onExited:Ce([r.handleExitedSnack,r.props.onExited],k.id),onEntered:Ce([r.handleEnteredSnack,r.props.onEntered],k.id)})}))});return l.createElement(xt.Provider,{value:t},s,i?Wt.createPortal(v,i):v)},kt(o,[{key:"maxSnack",get:function(){return this.props.maxSnack||ce.maxSnack}}]),o}(l.Component),jt=function(){return l.useContext(xt)};const re={card:"_card_1a398_7",actionRoot:"_actionRoot_1a398_11",icons:"_icons_1a398_16",expand:"_expand_1a398_22",expandOpen:"_expandOpen_1a398_29",stackTraceContainer:"_stackTraceContainer_1a398_33"},Rt=l.forwardRef((e,o)=>{const{id:r,message:t,iconVariant:n,error:i,hideIconVariant:s,...u}=e,{closeSnackbar:c}=jt(),d=a.E0(),[p,f]=l.useState(!1),x=l.useCallback(()=>{f(b=>!b)},[]),v=l.useCallback(()=>{c(r)},[r,c]),y=i?.message||String(t);return m.jsx(Ye,{ref:o,className:a.wo(re.root,"error-snackbar"),children:m.jsxs(Ht,{className:re.card,style:{backgroundColor:d.palette.error.dark,border:`1px solid ${d.palette.error.dark}`},children:[m.jsxs(Ut,{className:re.actionRoot,children:[s?null:n?.error,m.jsx(a.Typography,{variant:"body2",component:"div",className:re.typography,style:{color:d.palette.text.primary},children:y}),m.jsx("div",{style:{flex:"1 1 auto"}}),m.jsxs("div",{className:re.icons,children:[i?m.jsx(a.IconButton,{"aria-label":"Show more",size:"small",className:a.wo(re.expand,{[re.expandOpen]:p}),style:{color:d.palette.action.active},onClick:x,children:m.jsx(a.Zn,{})}):null,m.jsx(a.IconButton,{size:"small",className:re.expand,style:{color:d.palette.action.active},onClick:v,children:m.jsx(a._o,{fontSize:"small"})})]})]}),i?m.jsx(Fe,{in:p,timeout:"auto",unmountOnExit:!0,children:m.jsx("div",{className:re.stackTraceContainer,style:{backgroundColor:d.palette.error.light,borderTop:`1px solid ${d.palette.error.main}`},children:m.jsx(a.P9,{error:i,hideLineNumbers:!0})})}):null]})})});Rt.displayName="ToastError";const Lt=l.memo(l.forwardRef((e,o)=>{const{commands:r,commandHook:t,scope:n="workbook",disabled:i=!1,...s}=e,u=a.pe(d=>{const p={variant:a.en.Menuitem,parentFloat:d.floatReference,commandHook:t,scope:n,disabled:i},f=m.jsxs(m.Fragment,{children:[m.jsx(a.ze,{...p,command:r.getCommand("newWorkbook"),icon:a.Ce(m.jsx(a.bR,{}))}),m.jsx(a.Wt,{orientation:"horizontal"}),m.jsx(a.ze,{...p,command:r.getCommand("openWorkbook"),icon:a.Ce(m.jsx(a.vR,{}))}),m.jsx(a.Jn,{...p,commands:r,quickCommand:"saveWorkbook",icon:a.Ce(m.jsx(a.wR,{})),createPopupPanel:x=>{const v={...p,parentFloat:x.floatReference,scope:"saveWorkbook"},y=[];return a.ZR.getWriteFormats().forEach(b=>{if(b.isDefault)return;let w=null;b.key==="CSV"?w=a.Ce(m.jsx(a.SR,{})):b.key==="Excel"&&(w=a.Ce(m.jsx(a.xR,{})));const k=r.getCommand(`saveWorkbookAs${b.key}`);k?y.push(l.createElement(a.ze,{...v,key:b.key,command:k,icon:w})):console.warn(`Unable to resolve command: 'saveWorkbookAs${b.key}'`)}),a.jn({...x,children:y,onClick:()=>{x.closeFloatAll()}})}})]});return a.jn({...d,children:f,onClick:x=>{x.isDefaultPrevented||d.closeFloatAll()}})},[i,r,t,n]),c="File";return m.jsx(a.Jn,{commands:r,disabled:i,commandHook:t,scope:n,label:c,tooltip:"Options for saving and loading the workbook.",sx:{paddingBottom:"0px","& button":{paddingTop:"0px",paddingBottom:"0px",height:d=>`calc(1.25rem + ${d.spacing(2)}px)`}},...s,createPopupPanel:u,icon:m.jsx(a.es,{className:"label",icon:null,label:c})})}));Lt.displayName="StandaloneFileCommandButton";const mn=m.jsx(a.dr,{label:"SheetXL",description:"Visit me at sheetxl.com.",children:m.jsx(a.Box,{sx:{width:"24px",height:"24px",marginBottom:"4px",marginLeft:"6px"},children:m.jsx(a.VR,{onClick:()=>{window?.open("https://www.sheetxl.com","_blank")},style:{width:"24px",height:"24px",cursor:"pointer"}})})}),Dt=l.memo(l.forwardRef((e,o)=>{const{commands:r,workbook:t,logo:n=mn,mainElement:i,showFileMenu:s=!0,showAppearanceMenu:u=!0,...c}=e,{reference:d}=a.N0(),[p,{width:f}]=a.fc(),x=f<530,v=s?m.jsx(Lt,{commands:r,commandHook:{beforeExecute(){d?.closeAll()},onError(k,h,R){}}}):null,y=u?m.jsx(a.$R,{commands:r,commandHook:{beforeExecute(){d?.closeAll()},onError(k,h,R){}}}):null,b=l.useMemo(()=>({paddingLeft:k=>k.spacing(1),paddingRight:k=>k.spacing(1)}),[]),w=l.useRef(null);return m.jsx(a.Box,{ref:a.h5([w,p,o]),...c,children:a.IM({commands:r,renderCompact:x,workbook:t,selectWrapper:k=>m.jsxs(a.Box,{sx:{display:"flex",flex:"1",flexDirection:"row",alignItems:"stretch",gap:h=>h.spacing(1),paddingLeft:h=>h.spacing(1),paddingRight:h=>h.spacing(1)},children:[m.jsxs(a.Box,{sx:{display:"flex",flexDirection:"row",alignItems:"center",flex:"1 1 100%",gap:h=>h.spacing(.5)},children:[n,m.jsxs(a.Box,{sx:{display:"flex",flexDirection:"row",alignItems:"center",gap:h=>h.spacing(.25)},children:[v,k]})]}),m.jsx(a.Box,{sx:{display:"flex",flexDirection:"row",flex:"1 1 300%",overflow:"hidden",alignItems:"center",justifyContent:"center"},children:i}),m.jsx(a.Box,{sx:{display:"flex",alignItems:"center",justifyContent:"end",flex:x&&!y?"0 0 auto":"1 1 100%"},children:y})]}),selectProps:b,toolbarsProps:{Home:{sx:{}}}})})}));Dt.displayName="StandaloneWorkbookToolbar";const Tt=l.memo(l.forwardRef((e,o)=>{const{workbook:r,setWorkbook:t,refWorkbookTitle:n,titleWorkbook:i,setWorkbookTitle:s,titlePlaceHolder:u,children:c,undoManager:d,commands:p,importExportDisabled:f,themeModeOptions:x}=e,v=jt(),y=v?v.enqueueSnackbar:()=>{},b=v?v.closeSnackbar:()=>{},[w,k]=l.useState({isMounted:!1,label:null,starting:new Map,running:new Map}),h=l.useCallback(()=>{k(A=>({...A,isMounted:!0}))},[]),R=l.useCallback(()=>{k(A=>({...A,isMounted:!1}))},[]),E=a.LR(),F=a.AR(),L=a.PR(),z=l.useRef(new Set),_=l.useMemo(()=>{const A=(S,j)=>{if(j?.onceKey){if(z.current.has(j.onceKey))return;const D=new Set(z.current);D.add(j.onceKey),z.current=D}const N={variant:j?.type??a.z0.Info,anchorOrigin:{vertical:"top",horizontal:"center"},preventDuplicate:j?.preventDuplicate,persist:j?.persist??j?.type===a.z0.Error,action:D=>m.jsx(a.IconButton,{onClick:()=>b(D),children:m.jsx(Zt,{})})};j?.enqueueProps&&Object.assign(N,j.enqueueProps),S||console.log("message is 'null'",j),y(S??"Alert",N)};return{showMessage:A,showBusy:(S,j)=>{let N=null;const D=new Promise(U=>{N=U});return k(U=>{const B=new Map(U.starting);return B.set(D,N),{...U,label:S,starting:B}}),D},showWindow:(S,j,N)=>{const D={...j,onKeyDown:U=>{p?.dispatchToFocusedCommand(U),U.isDefaultPrevented()||U.isPropagationStopped()||j?.onKeyDown?.(U)}};return E(S,{sort:()=>Promise.resolve().then(()=>require("./U87lgd4_s2ZMANCD.cjs")),numberFormat:()=>Promise.resolve().then(()=>require("./CBooeax30UubtyR8.cjs")),hyperlink:()=>Promise.resolve().then(()=>require("./CSPBwiu90ceh-zBx.cjs")),comments:()=>Promise.resolve().then(()=>require("./8C6Zxo7y_y2FPQms.cjs")),find:()=>Promise.resolve().then(()=>require("./BQcsaJmSUla59HMq.cjs")),tableDetails:()=>Promise.resolve().then(()=>require("./BT9klXPxG99Cy93r.cjs")),tableNew:()=>Promise.resolve().then(()=>require("./DGo33lohWotJ_RRG.cjs")),namedDetails:()=>Promise.resolve().then(()=>require("./BOkJxMfaJUl7r9lv.cjs"))}[S],D,N)},showOptions:F,showInputOptions:L,showError:S=>{let j,N=a.z0.Error,D="Unknown Error";typeof S=="string"?D=S:S instanceof Error&&(j=S,S.message&&(D=S.message)),S instanceof ue.PartialError&&(N=a.z0.Info),A(D,{type:N,enqueueProps:{error:j}})}}},[]),P=l.useCallback(()=>{},[]),H=(A=>{const{workbook:S,setWorkbook:j,importExportDisabled:N,workbookTitle:D="export",setWorkbookTitle:U,notifier:B,requestWorkbookTitle:J,themeModeOptions:q,undoManager:M,commands:O,onExecute:V}=A,Y=a.pe(q?.onForceModeChange,[q?.onForceModeChange]),ae=a.pe(q?.onForceLightGridChange,[q?.onForceLightGridChange]),ne=a.pe(q?.onForceLightImagesChange,[q?.onForceLightImagesChange]),Ne=a.pe(async(W=null,Q=null)=>{const g=[];let C,$=null,ee=null;if(typeof W=="string"?ee=W:$=W,C=$?W:await a.Qt.openFileDialog(ee??a.ZR.getAllReadFormatTypeAsString().join(",")),!C)return null;const se={source:C,constructorOptions:Q,onWarning:qe=>{g.push(qe)}},xe=await a.ZR.read(se,B);return g.length>0&&(B?.showMessage?.("Some elements were not able to be imported. See console for details."),console.warn(`Import warnings:
10
+ 0 22,12A10,10 0 0,0 12,2Z`}))},null)},anchorOrigin:{vertical:"bottom",horizontal:"left"},TransitionComponent:vt,transitionDuration:{enter:225,exit:195}};function Me(e){return Object.entries(e).reduce(function(o,r){var t,n=r[0],i=r[1];return T({},o,((t={})[n]=Ze(i),t))},{})}var Et="notistack-CollapseWrapper",tn=function(e){return"notistack-MuiContent-"+e},ct=Me({root:{height:0},entered:{height:"auto"}}),Ue="0px",Ct=l.forwardRef(function(e,o){var r=e.children,t=e.in,n=e.onExited,i=l.useRef(null),s=l.useRef(null),u=Qe(o,s),c=function(){return i.current?i.current.clientHeight:0};return l.createElement(Je,{in:t,unmountOnExit:!0,onEnter:function(d){d.style.height=Ue},onEntered:function(d){d.style.height="auto"},onEntering:function(d){var p=c(),f=Ie({timeout:175,mode:"enter"}),x=f.duration,v=f.easing;d.style.transitionDuration=typeof x=="string"?x:x+"ms",d.style.height=p+"px",d.style.transitionTimingFunction=v||""},onExit:function(d){d.style.height=c()+"px"},onExited:n,onExiting:function(d){yt(d);var p=Ie({timeout:175,mode:"exit"}),f=p.duration,x=p.easing;d.style.transitionDuration=typeof f=="string"?f:f+"ms",d.style.height=Ue,d.style.transitionTimingFunction=x||""},nodeRef:s,timeout:175},function(d,p){return l.createElement("div",Object.assign({ref:u,className:ie(ct.root,d==="entered"&&ct.entered),style:T({pointerEvents:"all",overflow:"hidden",minHeight:Ue,transition:ge("height")},d==="entered"&&{overflow:"visible"},{},d==="exited"&&!t&&{visibility:"hidden"})},p),l.createElement("div",{ref:i,className:Et,style:{display:"flex",width:"100%"}},r))})});Ct.displayName="Collapse";var ut={right:"left",left:"right",bottom:"up",top:"down"},nn=function(e){return"anchorOrigin"+Xe(e)},on=function(){};function Ce(e,o){return e.reduce(function(r,t){return t==null?r:function(){for(var n=arguments.length,i=new Array(n),s=0;s<n;s++)i[s]=arguments[s];var u=[].concat(i);o&&u.indexOf(o)===-1&&u.push(o),r.apply(this,u),t.apply(this,u)}},on)}var rn=typeof window<"u"?l.useLayoutEffect:l.useEffect;function dt(e){var o=l.useRef(e);return rn(function(){o.current=e}),l.useCallback(function(){return o.current.apply(void 0,arguments)},[])}var _e,St=l.forwardRef(function(e,o){var r=e.children,t=e.className,n=e.autoHideDuration,i=e.disableWindowBlurListener,s=i!==void 0&&i,u=e.onClose,c=e.id,d=e.open,p=e.SnackbarProps,f=p===void 0?{}:p,x=l.useRef(),v=dt(function(){u&&u.apply(void 0,arguments)}),y=dt(function(k){u&&k!=null&&(x.current&&clearTimeout(x.current),x.current=setTimeout(function(){v(null,"timeout",c)},k))});l.useEffect(function(){return d&&y(n),function(){x.current&&clearTimeout(x.current)}},[d,n,y]);var b=function(){x.current&&clearTimeout(x.current)},w=l.useCallback(function(){n!=null&&y(.5*n)},[n,y]);return l.useEffect(function(){if(!s&&d)return window.addEventListener("focus",w),window.addEventListener("blur",b),function(){window.removeEventListener("focus",w),window.removeEventListener("blur",b)}},[s,w,d]),l.createElement("div",Object.assign({ref:o},f,{className:ie("notistack-Snackbar",t),onMouseEnter:function(k){f.onMouseEnter&&f.onMouseEnter(k),b()},onMouseLeave:function(k){f.onMouseLeave&&f.onMouseLeave(k),w()}}),r)});St.displayName="Snackbar";var an=Me({root:(_e={display:"flex",flexWrap:"wrap",flexGrow:1},_e[Ae]={flexGrow:"initial",minWidth:"288px"},_e)}),Ye=l.forwardRef(function(e,o){var r=e.className,t=Se(e,["className"]);return l.createElement("div",Object.assign({ref:o,className:ie(an.root,r)},t))});Ye.displayName="SnackbarContent";var we=Me({root:{backgroundColor:"#313131",fontSize:"0.875rem",lineHeight:1.43,letterSpacing:"0.01071em",color:"#fff",alignItems:"center",padding:"6px 16px",borderRadius:"4px",boxShadow:"0px 3px 5px -1px rgba(0,0,0,0.2),0px 6px 10px 0px rgba(0,0,0,0.14),0px 1px 18px 0px rgba(0,0,0,0.12)"},lessPadding:{paddingLeft:"20px"},default:{backgroundColor:"#313131"},success:{backgroundColor:"#43a047"},error:{backgroundColor:"#d32f2f"},warning:{backgroundColor:"#ff9800"},info:{backgroundColor:"#2196f3"},message:{display:"flex",alignItems:"center",padding:"8px 0"},action:{display:"flex",alignItems:"center",marginLeft:"auto",paddingLeft:"16px",marginRight:"-8px"}}),pt="notistack-snackbar",Mt=l.forwardRef(function(e,o){var r=e.id,t=e.message,n=e.action,i=e.iconVariant,s=e.variant,u=e.hideIconVariant,c=e.style,d=e.className,p=i[s],f=n;return typeof f=="function"&&(f=f(r)),l.createElement(Ye,{ref:o,role:"alert","aria-describedby":pt,style:c,className:ie("notistack-MuiContent",tn(s),we.root,we[s],d,!u&&p&&we.lessPadding)},l.createElement("div",{id:pt,className:we.message},u?null:p,t),f&&l.createElement("div",{className:we.action},f))});Mt.displayName="MaterialDesignContent";var ve,Ve,Te,Oe,$e,sn=l.memo(Mt),ln=Me({wrappedRoot:{width:"100%",position:"relative",transform:"translateX(0)",top:0,right:0,bottom:0,left:0,minWidth:"288px"}}),cn=function(e){var o=l.useRef(),r=l.useState(!0),t=r[0],n=r[1],i=Ce([e.snack.onClose,e.onClose]),s=l.useCallback(function(){o.current=setTimeout(function(){n(function(U){return!U})},125)},[]);l.useEffect(function(){return function(){o.current&&clearTimeout(o.current)}},[]);var u,c=e.snack,d=e.classes,p=e.Component,f=p===void 0?sn:p,x=l.useMemo(function(){return function(U){U===void 0&&(U={});var P={containerRoot:!0,containerAnchorOriginTopCenter:!0,containerAnchorOriginBottomCenter:!0,containerAnchorOriginTopRight:!0,containerAnchorOriginBottomRight:!0,containerAnchorOriginTopLeft:!0,containerAnchorOriginBottomLeft:!0};return Object.keys(U).filter(function(H){return!P[H]}).reduce(function(H,G){var X;return T({},H,((X={})[G]=U[G],X))},{})}(d)},[d]),v=c.open,y=c.SnackbarProps,b=c.TransitionComponent,w=c.TransitionProps,k=c.transitionDuration,h=c.disableWindowBlurListener,R=c.content,E=Se(c,["open","SnackbarProps","TransitionComponent","TransitionProps","transitionDuration","disableWindowBlurListener","content","entered","requestClose","onEnter","onEntered","onExit","onExited"]),F=T({direction:(u=E.anchorOrigin,u.horizontal!=="center"?ut[u.horizontal]:ut[u.vertical]),timeout:k},w),L=R;typeof L=="function"&&(L=L(E.id,E.message));var z=["onEnter","onEntered","onExit","onExited"].reduce(function(U,P){var H;return T({},U,((H={})[P]=Ce([e.snack[P],e[P]],E.id),H))},{});return l.createElement(Ct,{in:t,onExited:z.onExited},l.createElement(St,{open:v,id:E.id,disableWindowBlurListener:h,autoHideDuration:E.autoHideDuration,className:ie(ln.wrappedRoot,x.root,x[nn(E.anchorOrigin)]),SnackbarProps:y,onClose:i},l.createElement(b,Object.assign({},F,{appear:!0,in:v,onExit:z.onExit,onExited:s,onEnter:z.onEnter,onEntered:Ce([z.onEntered,function(){e.snack.requestClose&&i(null,"instructed",e.snack.id)}],E.id)}),L||l.createElement(f,Object.assign({},E)))))},Ee=20,Ke=6,un=2,mt="."+Et,We=Me({root:(ve={boxSizing:"border-box",display:"flex",maxHeight:"100%",position:"fixed",zIndex:1400,height:"auto",width:"auto",transition:ge(["top","right","bottom","left","max-width"],{duration:300,easing:"ease"}),pointerEvents:"none"},ve[mt]={padding:Ke+"px 0px",transition:"padding 300ms ease 0ms"},ve.maxWidth="calc(100% - "+2*Ee+"px)",ve[Be]={width:"100%",maxWidth:"calc(100% - 32px)"},ve),rootDense:(Ve={},Ve[mt]={padding:un+"px 0px"},Ve),top:{top:Ee-Ke+"px",flexDirection:"column"},bottom:{bottom:Ee-Ke+"px",flexDirection:"column-reverse"},left:(Te={left:Ee+"px"},Te[Ae]={alignItems:"flex-start"},Te[Be]={left:"16px"},Te),right:(Oe={right:Ee+"px"},Oe[Ae]={alignItems:"flex-end"},Oe[Be]={right:"16px"},Oe),center:($e={left:"50%",transform:"translateX(-50%)"},$e[Ae]={alignItems:"center"},$e)}),dn=l.memo(function(e){var o=e.classes,r=o===void 0?{}:o,t=e.anchorOrigin,n=e.dense,i=e.children,s=ie("notistack-SnackbarContainer",We[t.vertical],We[t.horizontal],We.root,r.containerRoot,r["containerAnchorOrigin"+Xe(t)],n&&We.rootDense);return l.createElement("div",{className:s},i)}),ft=function(e){return!(typeof e=="string"||l.isValidElement(e))},pn=function(e){function o(r){var t;return(t=e.call(this,r)||this).enqueueSnackbar=function(n,i){if(i===void 0&&(i={}),n==null)throw new Error("enqueueSnackbar called with invalid argument");var s=ft(n)?n:i,u=ft(n)?n.message:n,c=s.key,d=s.preventDuplicate,p=Se(s,["key","preventDuplicate"]),f=je(c),x=f?c:new Date().getTime()+Math.random(),v=function(b,w){return function(k,h){return h===void 0&&(h=!1),h?T({},ce[k],{},w[k],{},b[k]):k==="autoHideDuration"?(L=b.autoHideDuration,z=w.autoHideDuration,(U=function(P){return typeof P=="number"||P===null})(L)?L:U(z)?z:ce.autoHideDuration):k==="transitionDuration"?(R=b.transitionDuration,E=w.transitionDuration,(F=function(P,H){return H.some(function(G){return typeof P===G})})(R,["string","number"])?R:F(R,["object"])?T({},ce.transitionDuration,{},F(E,["object"])&&E,{},R):F(E,["string","number"])?E:F(E,["object"])?T({},ce.transitionDuration,{},E):ce.transitionDuration):b[k]||w[k]||ce[k];var R,E,F,L,z,U}}(p,t.props),y=T({id:x},p,{message:u,open:!0,entered:!1,requestClose:!1,persist:v("persist"),action:v("action"),content:v("content"),variant:v("variant"),anchorOrigin:v("anchorOrigin"),disableWindowBlurListener:v("disableWindowBlurListener"),autoHideDuration:v("autoHideDuration"),hideIconVariant:v("hideIconVariant"),TransitionComponent:v("TransitionComponent"),transitionDuration:v("transitionDuration"),TransitionProps:v("TransitionProps",!0),iconVariant:v("iconVariant",!0),style:v("style",!0),SnackbarProps:v("SnackbarProps",!0),className:ie(t.props.className,p.className)});return y.persist&&(y.autoHideDuration=void 0),t.setState(function(b){if(d===void 0&&t.props.preventDuplicate||d){var w=function(R){return f?R.id===x:R.message===u},k=b.queue.findIndex(w)>-1,h=b.snacks.findIndex(w)>-1;if(k||h)return b}return t.handleDisplaySnack(T({},b,{queue:[].concat(b.queue,[y])}))}),x},t.handleDisplaySnack=function(n){return n.snacks.length>=t.maxSnack?t.handleDismissOldest(n):t.processQueue(n)},t.processQueue=function(n){var i=n.queue,s=n.snacks;return i.length>0?T({},n,{snacks:[].concat(s,[i[0]]),queue:i.slice(1,i.length)}):n},t.handleDismissOldest=function(n){if(n.snacks.some(function(c){return!c.open||c.requestClose}))return n;var i=!1,s=!1;n.snacks.reduce(function(c,d){return c+(d.open&&d.persist?1:0)},0)===t.maxSnack&&(s=!0);var u=n.snacks.map(function(c){return i||c.persist&&!s?T({},c):(i=!0,c.entered?(c.onClose&&c.onClose(null,"maxsnack",c.id),t.props.onClose&&t.props.onClose(null,"maxsnack",c.id),T({},c,{open:!1})):T({},c,{requestClose:!0}))});return T({},n,{snacks:u})},t.handleEnteredSnack=function(n,i,s){if(!je(s))throw new Error("handleEnteredSnack Cannot be called with undefined key");t.setState(function(u){return{snacks:u.snacks.map(function(c){return c.id===s?T({},c,{entered:!0}):T({},c)})}})},t.handleCloseSnack=function(n,i,s){t.props.onClose&&t.props.onClose(n,i,s);var u=s===void 0;t.setState(function(c){var d=c.snacks,p=c.queue;return{snacks:d.map(function(f){return u||f.id===s?f.entered?T({},f,{open:!1}):T({},f,{requestClose:!0}):T({},f)}),queue:p.filter(function(f){return f.id!==s})}})},t.closeSnackbar=function(n){var i=t.state.snacks.find(function(s){return s.id===n});je(n)&&i&&i.onClose&&i.onClose(null,"instructed",n),t.handleCloseSnack(null,"instructed",n)},t.handleExitedSnack=function(n,i){if(!je(i))throw new Error("handleExitedSnack Cannot be called with undefined key");t.setState(function(s){var u=t.processQueue(T({},s,{snacks:s.snacks.filter(function(c){return c.id!==i})}));return u.queue.length===0?u:t.handleDismissOldest(u)})},t.enqueueSnackbar,t.closeSnackbar,t.state={snacks:[],queue:[],contextValue:{enqueueSnackbar:t.enqueueSnackbar.bind(ot(t)),closeSnackbar:t.closeSnackbar.bind(ot(t))}},t}return bt(o,e),o.prototype.render=function(){var r=this,t=this.state.contextValue,n=this.props,i=n.domRoot,s=n.children,u=n.dense,c=u!==void 0&&u,d=n.Components,p=d===void 0?{}:d,f=n.classes,x=this.state.snacks.reduce(function(y,b){var w,k=Xe(b.anchorOrigin),h=y[k]||[];return T({},y,((w={})[k]=[].concat(h,[b]),w))},{}),v=Object.keys(x).map(function(y){var b=x[y],w=b[0];return l.createElement(dn,{key:y,dense:c,anchorOrigin:w.anchorOrigin,classes:f},b.map(function(k){return l.createElement(cn,{key:k.id,snack:k,classes:f,Component:p[k.variant],onClose:r.handleCloseSnack,onEnter:r.props.onEnter,onExit:r.props.onExit,onExited:Ce([r.handleExitedSnack,r.props.onExited],k.id),onEntered:Ce([r.handleEnteredSnack,r.props.onEntered],k.id)})}))});return l.createElement(xt.Provider,{value:t},s,i?Wt.createPortal(v,i):v)},kt(o,[{key:"maxSnack",get:function(){return this.props.maxSnack||ce.maxSnack}}]),o}(l.Component),jt=function(){return l.useContext(xt)};const re={card:"_card_1a398_7",actionRoot:"_actionRoot_1a398_11",icons:"_icons_1a398_16",expand:"_expand_1a398_22",expandOpen:"_expandOpen_1a398_29",stackTraceContainer:"_stackTraceContainer_1a398_33"},Rt=l.forwardRef((e,o)=>{const{id:r,message:t,iconVariant:n,error:i,hideIconVariant:s,...u}=e,{closeSnackbar:c}=jt(),d=a.E0(),[p,f]=l.useState(!1),x=l.useCallback(()=>{f(b=>!b)},[]),v=l.useCallback(()=>{c(r)},[r,c]),y=i?.message||String(t);return m.jsx(Ye,{ref:o,className:a.wo(re.root,"error-snackbar"),children:m.jsxs(Ht,{className:re.card,style:{backgroundColor:d.palette.error.dark,border:`1px solid ${d.palette.error.dark}`},children:[m.jsxs(_t,{className:re.actionRoot,children:[s?null:n?.error,m.jsx(a.Typography,{variant:"body2",component:"div",className:re.typography,style:{color:d.palette.text.primary},children:y}),m.jsx("div",{style:{flex:"1 1 auto"}}),m.jsxs("div",{className:re.icons,children:[i?m.jsx(a.IconButton,{"aria-label":"Show more",size:"small",className:a.wo(re.expand,{[re.expandOpen]:p}),style:{color:d.palette.action.active},onClick:x,children:m.jsx(a.Zn,{})}):null,m.jsx(a.IconButton,{size:"small",className:re.expand,style:{color:d.palette.action.active},onClick:v,children:m.jsx(a._o,{fontSize:"small"})})]})]}),i?m.jsx(Fe,{in:p,timeout:"auto",unmountOnExit:!0,children:m.jsx("div",{className:re.stackTraceContainer,style:{backgroundColor:d.palette.error.light,borderTop:`1px solid ${d.palette.error.main}`},children:m.jsx(a.P9,{error:i,hideLineNumbers:!0})})}):null]})})});Rt.displayName="ToastError";const Lt=l.memo(l.forwardRef((e,o)=>{const{commands:r,commandHook:t,scope:n="workbook",disabled:i=!1,...s}=e,u=a.pe(d=>{const p={variant:a.en.Menuitem,parentFloat:d.floatReference,commandHook:t,scope:n,disabled:i},f=m.jsxs(m.Fragment,{children:[m.jsx(a.ze,{...p,command:r.getCommand("newWorkbook"),icon:a.Ce(m.jsx(a.bR,{}))}),m.jsx(a.Wt,{orientation:"horizontal"}),m.jsx(a.ze,{...p,command:r.getCommand("openWorkbook"),icon:a.Ce(m.jsx(a.vR,{}))}),m.jsx(a.Jn,{...p,commands:r,quickCommand:"saveWorkbook",icon:a.Ce(m.jsx(a.wR,{})),createPopupPanel:x=>{const v={...p,parentFloat:x.floatReference,scope:"saveWorkbook"},y=[];return a.ZR.getWriteFormats().forEach(b=>{if(b.isDefault)return;let w=null;b.key==="CSV"?w=a.Ce(m.jsx(a.SR,{})):b.key==="Excel"&&(w=a.Ce(m.jsx(a.xR,{})));const k=r.getCommand(`saveWorkbookAs${b.key}`);k?y.push(l.createElement(a.ze,{...v,key:b.key,command:k,icon:w})):console.warn(`Unable to resolve command: 'saveWorkbookAs${b.key}'`)}),a.jn({...x,children:y,onClick:()=>{x.closeFloatAll()}})}})]});return a.jn({...d,children:f,onClick:x=>{x.isDefaultPrevented||d.closeFloatAll()}})},[i,r,t,n]),c="File";return m.jsx(a.Jn,{commands:r,disabled:i,commandHook:t,scope:n,label:c,tooltip:"Options for saving and loading the workbook.",sx:{paddingBottom:"0px","& button":{paddingTop:"0px",paddingBottom:"0px",height:d=>`calc(1.25rem + ${d.spacing(2)}px)`}},...s,createPopupPanel:u,icon:m.jsx(a.es,{className:"label",icon:null,label:c})})}));Lt.displayName="StandaloneFileCommandButton";const mn=m.jsx(a.dr,{label:"SheetXL",description:"Visit me at sheetxl.com.",children:m.jsx(a.Box,{sx:{width:"24px",height:"24px",marginBottom:"4px",marginLeft:"6px"},children:m.jsx(a.VR,{onClick:()=>{window?.open("https://www.sheetxl.com","_blank")},style:{width:"24px",height:"24px",cursor:"pointer"}})})}),Dt=l.memo(l.forwardRef((e,o)=>{const{commands:r,workbook:t,logo:n=mn,mainElement:i,showFileMenu:s=!0,showAppearanceMenu:u=!0,...c}=e,{reference:d}=a.N0(),[p,{width:f}]=a.fc(),x=f<530,v=s?m.jsx(Lt,{commands:r,commandHook:{beforeExecute(){d?.closeAll()},onError(k,h,R){}}}):null,y=u?m.jsx(a.$R,{commands:r,commandHook:{beforeExecute(){d?.closeAll()},onError(k,h,R){}}}):null,b=l.useMemo(()=>({paddingLeft:k=>k.spacing(1),paddingRight:k=>k.spacing(1)}),[]),w=l.useRef(null);return m.jsx(a.Box,{ref:a.h5([w,p,o]),...c,children:a.IM({commands:r,renderCompact:x,workbook:t,selectWrapper:k=>m.jsxs(a.Box,{sx:{display:"flex",flex:"1",flexDirection:"row",alignItems:"stretch",gap:h=>h.spacing(1),paddingLeft:h=>h.spacing(1),paddingRight:h=>h.spacing(1)},children:[m.jsxs(a.Box,{sx:{display:"flex",flexDirection:"row",alignItems:"center",flex:"1 1 100%",gap:h=>h.spacing(.5)},children:[n,m.jsxs(a.Box,{sx:{display:"flex",flexDirection:"row",alignItems:"center",gap:h=>h.spacing(.25)},children:[v,k]})]}),m.jsx(a.Box,{sx:{display:"flex",flexDirection:"row",flex:"1 1 300%",overflow:"hidden",alignItems:"center",justifyContent:"center"},children:i}),m.jsx(a.Box,{sx:{display:"flex",alignItems:"center",justifyContent:"end",flex:x&&!y?"0 0 auto":"1 1 100%"},children:y})]}),selectProps:b,toolbarsProps:{Home:{sx:{}}}})})}));Dt.displayName="StandaloneWorkbookToolbar";const Tt=l.memo(l.forwardRef((e,o)=>{const{workbook:r,setWorkbook:t,refWorkbookTitle:n,titleWorkbook:i,setWorkbookTitle:s,titlePlaceHolder:u,children:c,undoManager:d,commands:p,importExportDisabled:f,themeModeOptions:x}=e,v=jt(),y=v?v.enqueueSnackbar:()=>{},b=v?v.closeSnackbar:()=>{},[w,k]=l.useState({isMounted:!1,label:null,starting:new Map,running:new Map}),h=l.useCallback(()=>{k(A=>({...A,isMounted:!0}))},[]),R=l.useCallback(()=>{k(A=>({...A,isMounted:!1}))},[]),E=a.LR(),F=a.AR(),L=a.PR(),z=l.useRef(new Set),U=l.useMemo(()=>{const A=(S,j)=>{if(j?.onceKey){if(z.current.has(j.onceKey))return;const D=new Set(z.current);D.add(j.onceKey),z.current=D}const N={variant:j?.type??a.z0.Info,anchorOrigin:{vertical:"top",horizontal:"center"},preventDuplicate:j?.preventDuplicate,persist:j?.persist??j?.type===a.z0.Error,action:D=>m.jsx(a.IconButton,{onClick:()=>b(D),children:m.jsx(Zt,{})})};j?.enqueueProps&&Object.assign(N,j.enqueueProps),S||console.log("message is 'null'",j),y(S??"Alert",N)};return{showMessage:A,showBusy:(S,j)=>{let N=null;const D=new Promise(_=>{N=_});return k(_=>{const B=new Map(_.starting);return B.set(D,N),{..._,label:S,starting:B}}),D},showWindow:(S,j,N)=>{const D={...j,onKeyDown:_=>{p?.dispatchToFocusedCommand(_),_.isDefaultPrevented()||_.isPropagationStopped()||j?.onKeyDown?.(_)}};return E(S,{sort:()=>Promise.resolve().then(()=>require("./UPWauCNGEO3N4aKC.cjs")),numberFormat:()=>Promise.resolve().then(()=>require("./C6mu7Qx_XGjwTB1s.cjs")),hyperlink:()=>Promise.resolve().then(()=>require("./C9au43N7QYEd4jbG.cjs")),comments:()=>Promise.resolve().then(()=>require("./BUHSxXZOFmXodHq7.cjs")),find:()=>Promise.resolve().then(()=>require("./D7AupitbVLpw8et2.cjs")),tableDetails:()=>Promise.resolve().then(()=>require("./B8jhm3BCEuLafFwH.cjs")),tableNew:()=>Promise.resolve().then(()=>require("./BpLgVPeGuLG6beKx.cjs")),namedDetails:()=>Promise.resolve().then(()=>require("./Cgqp9iXOU2RXxdeZ.cjs"))}[S],D,N)},showOptions:F,showInputOptions:L,showError:S=>{let j,N=a.z0.Error,D="Unknown Error";typeof S=="string"?D=S:S instanceof Error&&(j=S,S.message&&(D=S.message)),S instanceof ue.PartialError&&(N=a.z0.Info),A(D,{type:N,enqueueProps:{error:j}})}}},[]),P=l.useCallback(()=>{},[]),H=(A=>{const{workbook:S,setWorkbook:j,importExportDisabled:N,workbookTitle:D="export",setWorkbookTitle:_,notifier:B,requestWorkbookTitle:J,themeModeOptions:q,undoManager:M,commands:O,onExecute:V}=A,Y=a.pe(q?.onForceModeChange,[q?.onForceModeChange]),ae=a.pe(q?.onForceLightGridChange,[q?.onForceLightGridChange]),ne=a.pe(q?.onForceLightImagesChange,[q?.onForceLightImagesChange]),Ne=a.pe(async(W=null,Q=null)=>{const g=[];let C,$=null,ee=null;if(typeof W=="string"?ee=W:$=W,C=$?W:await a.Qt.openFileDialog(ee??a.ZR.getAllReadFormatTypeAsString().join(",")),!C)return null;const se={source:C,constructorOptions:Q,onWarning:qe=>{g.push(qe)}},xe=await a.ZR.read(se,B);return g.length>0&&(B?.showMessage?.("Some elements were not able to be imported. See console for details."),console.warn(`Import warnings:
11
11
  `+g.join(`
12
- `))),xe},[V,B,S]),ke=a.pe(async(W,Q,g)=>{if(!Q&&J){const C=await J("Enter Workbook name to "+(g.isDefault?"Save.":`Export as ${g.description}.`));return C!==null&&a.ZR.writeFile(C,W,{formatType:g.key})}return a.ZR.writeFile(Q,W,{formatType:g.key})},[B,S,J]),K=l.useCallback(()=>({contains:W=>!0,focus(){}}),[]),le=l.useMemo(()=>{const W=[];N||(a.ZR.getWriteFormats().forEach(g=>{const C=g.isDefault,$={label:C?"Save Workbook":`Save Workbook as ${g.description}`,scopedLabels:{workbook:"Save",saveWorkbook:`as ${g.description}`},tags:g.tags,description:`Save the workbook to the desktop${C?"":` as ${g.description}`}.`};C&&($.shortcut={key:"S",modifiers:[a.Re.Ctrl]},W.push(new a.Ae("saveWorkbookAs",K,{label:"Save Workbook As…",scopedLabels:{workbook:"Save as…",saveWorkbook:"as…"},shortcut:[{key:"S",modifiers:[a.Re.Shift,a.Re.Ctrl]},{key:"F12"}],description:"Save the workbook to the desktop with the provided name."},()=>{ke(S,null,g).catch(se=>{B?.showError?.(se)})})));const ee=C?"saveWorkbook":`saveWorkbookAs${g.key}`;W.push(new a.Ae(ee,K,$,se=>{ke(S,se??D,g).catch(xe=>{B?.showError?.(xe)})}))}),W.push(new a.Ae("openWorkbook",K,{label:"Open Workbook…",scopedLabels:{workbook:"Open…"},description:"Open a workbook from the desktop.",shortcut:{key:"O",modifiers:[a.Re.Ctrl]}},async(g=null)=>{const C={date1904:S.isDate1904(),...S.options};try{const $=await Ne(g,C);if(!$)return;const ee=$.title,se=$.workbook,xe=se.getSelectedSheet();if($.formatType.mimeType==="text/csv"){const qe=S.findValidSheetName(ee);await S.doBatch(async()=>{const et=xe.getUsedRange();et?await S.getSheets().add({name:qe,autoSelect:!0}).getRange({colStart:0,rowStart:0,colEnd:0,rowEnd:0}).copyFrom(et):B?.showMessage("The file appears to be blank.")},`Import CSV '${ee}'`)}else S?.close(),U?.(ee),j(se)}catch($){B?.showError?.($)}})),W.push(new a.Ae("openWorkbookFromUrl",K,{label:"Open Workbook From Web",scopedLabels:{insert:"From Web",workbook:"From Web…"},description:"Open a workbook from the web."},async function(g){if(!g){const C=await B?.showInputOptions?.({title:"Open Workbook from the Web",description:"Enter the web address for the workbook to open.",inputLabel:"Address",initialValue:"https://www.sheetxl.com/examples/features-checklist.xlsx",inputProps:{style:{minWidth:"440px"}},options:["Open"]});if(C.option!=="Open")return;g=C.input}g&&console.log("openWorkbookFromUrl",g)})));let Q=[];return q&&(Q=[new a.Ae("themeMode",K,{label:"Light/Dark Mode",scopedLabels:{appearance:"Light/Dark Mode"},description:"Toggle the application styling between light and dark mode."}),new a.Ae("defaultThemeMode",K,{label:"Use System Light/Dark Mode",scopedLabels:{appearance:"Use System Default"},description:"Use the system settings to determine styling for light and dark mode."}),new a.Ae("forceLightGrid",K,{label:"Force Light Grid",description:"Force the grid to always render in light mode if dark mode is being used. This is ensures that the grid will render the colors as specified in another tools (for example Excel)."}),new a.Ae("forceLightImages",K,{label:"Force Light Images",description:"Force the images to always render in light mode if dark mode is being used. This is ensures that the images will render the colors as specified in another tools (for example Excel). This only has any effect if the grid is in dark mode."})]),[...W,...Q,new a.Dt("help",K,{label:"Show Help",description:"Provide Help.",shortcut:{key:"F1"}},()=>{}),new a.Dt("showKeyboardShortcuts",K,{label:"Keyboard Shortcuts",description:"Show keyboard shortcuts.",shortcut:{key:"/",modifiers:[a.Re.Ctrl]}},()=>{}),new a.Ae("gotoUrlGithub",K,{label:"Github",description:"Download examples, explore source code, and leave a star."},()=>{window?.open("https://github.com/sheetxl/sheetxl")}),new a.Ae("gotoUrlDiscord",K,{label:"Discord",description:"Join our community on discord."},()=>{window?.open("https://discord.gg/NTKdwUgK9p")}),new a.Ae("gotoUrlDocumentation",K,{label:"Documentation",description:"Read the documentation."},()=>{window?.open("https://www.sheetxl.com/docs")}),new a.Ae("gotoUrlIssue",K,{label:"Create Issue",description:"Create an issue to identify a bug or a feature request."},()=>{window?.open("https://github.com/sheetxl/sheetxl/issues")})]},[S,D,B,N,q,O,M]),Z=l.useMemo(()=>{let W=null;return W=O?O.createChildGroup(K,"standaloneWorkbook",!1):new a.fs(K,"standaloneWorkbook"),W.addCommands(le,!0),W},[O,le]);a.yR({manager:M,commands:Z,notifier:B});const{themeMode:be}=a.qR();l.useEffect(()=>{if(!q||!Z)return;const W=q.forceMode==="dark"||!q.forceMode&&be==="dark";Z.getCommand("themeMode").update({state:q.forceMode??null,label:W?"Dark Mode":"Light Mode",scopedLabels:{appearance:W?"Dark Mode":"Light Mode"}}).updateCallback(()=>{Y(W?a.UR.Light:a.UR.Dark)}),Z.getCommand("defaultThemeMode").update({state:!q.forceMode}).updateCallback(()=>{Y(null)}),Z.getCommand("forceLightGrid").update({state:q.forceLightGrid}).updateCallback(()=>{ae(!q.forceLightGrid)}),Z.getCommand("forceLightImages").update({state:q.forceLightImages}).updateCallback(()=>{ne(!q.forceLightImages)})},[be,q,le]);const{showModal:ze}=a.Bu();return l.useEffect(()=>{const W=()=>new Promise((Q,g)=>{const C=l.lazy(()=>Promise.resolve().then(()=>require("./DxMgcD3KlK3QJl-U.cjs"))),$=ze(C,{title:"Shortcut Keys Reference",commands:Z,onDone:()=>{$.hide()},TransitionProps:{onExited:()=>{Q(!0)}}})});Z.getCommand("showKeyboardShortcuts").updateCallback(()=>W()),Z.getCommand("help").updateCallback(()=>W())},[le,Z]),Z})({workbook:r,setWorkbook:t,importExportDisabled:f,workbookTitle:i,setWorkbookTitle:s,commands:p,requestWorkbookTitle:A=>new Promise(S=>{n.current?n.current.requestWorkbookTitle((j,N)=>{S(j)},{selectAll:!0,requestReason:A}):S(u)}),themeModeOptions:x,undoManager:d,notifier:_,onExecute:P});l.useEffect(()=>{w.starting.size<=0||!w.isMounted||k(A=>{const S=new Map(A.running);return A.starting.forEach((j,N)=>{const D=()=>{k(U=>{const B=new Map(U.running);return B.delete(N),{...U,running:B}})};S.set(N,D),j(D)}),{...A,starting:new Map,running:S}})},[w]);const[G,X]=l.useState(null);l.useEffect(()=>{w.starting.size!==0||w.running.size!==0?X(m.jsx(a.bs,{icon:m.jsx(a.DR,{sx:{transform:"scale(0.7)",marginLeft:"-6px"}}),panel:!0,label:w.label,onMount:h,onUnmount:R,sx:{position:"absolute",left:"0",top:"0",width:"100%",height:"100%",zIndex:"9999"}})):X(null)},[w.starting,w.running]);const I=l.useMemo(()=>m.jsx(a.jR,{commands:H,disableHover:!0,sx:{padding:"0"},buttonProps:{sx:{maxHeight:"22px"}}}),[H]),te={notifier:_,commands:H};return r&&(te.statusBarProps={childrenEnd:I}),m.jsxs(m.Fragment,{children:[G,c?l.cloneElement(c,te):null]})}));Tt.displayName="SnackbarAndCommandsWrapper";const Ot=l.memo(l.forwardRef((e,o)=>{const{className:r,sx:t,style:n,onElementLoad:i,onError:s,undoManager:u,errorPanel:c=a.kx,onKeyDown:d,workbook:p,createWorkbookOptions:f,onWorkbookChange:x,logo:v,importExportDisabled:y=!1,themeModeOptions:b,autoFocus:w=!1,commands:k,title:h,onTitleChange:R,titleProps:E,...F}=e,L=l.useRef(null),z=a.pe(x,[x]),_=a.pe(R??E?.onTitleChange,[R??E?.onTitleChange]),P=E?.placeHolder??"Untitled",H=b?.forceMode,{themeMode:G,source:X}=a.qR({mode:H}),I=l.useMemo(()=>({...b,light:a.IR(!1,ue.CommonUtils.deepMerge(b?.theme??{},b?.light??{})),dark:a.IR(!0,ue.CommonUtils.deepMerge(b?.theme??{},b?.dark??{}))}),[b]),te=G===a.UR.Dark,[A,S]=l.useState(null);l.useEffect(()=>{S(u??new ue.UndoManager)},[u]);const[j,N]=l.useState(null),[D,U]=l.useState(null),B=a.Qf();l.useLayoutEffect(()=>{if(!p||Object.keys(p).length===0&&!ue.CommonUtils.isPromiseLike(p)){const g={theme:B.getDefaultTheme(),...f};U(new ue.Workbook(g))}else U(p)},[p]),l.useLayoutEffect(()=>{if(D){if(D instanceof ue.Workbook)return N({workbook:D}),void(p!==D&&z?.(D));(async()=>{try{let g,C=await Promise.resolve(D);C&&C.source&&(C=await a.ZR.read(C)),C.workbook?(V(C.title),g=C.workbook):g=C,z?.(g),N({workbook:g})}catch(g){z?.(null),N({error:g})}})()}},[D]);const[J,q]=l.useState(null);l.useEffect(()=>{if(!A||!j)return;A.clear();const g=j?.workbook?.getTransactions();return g?g.addListener({onCommitEnd:C=>{C.getDescription()?A.addUndoOperation({description:C.getDescription(),undo:()=>(g.revert(C.getId()),J.source?.focus(),()=>{g.restore(C.getId()),J.source?.focus()})}):console.warn("commit has no description",C)}}):void 0},[A,j,J]);const M=a.pe(g=>{g?A.setRepeatableOperation({description:g.label(),repeat:async()=>g.execute()}):A.setRepeatableOperation(null)},[A]),[O,V]=l.useState(h??E?.title??"");l.useEffect(()=>{V(h??E?.title??"")},[h??E?.title]),l.useEffect(()=>{_?.(O)},[O]);const[Y,ae]=l.useState(null),ne=l.useMemo(()=>{const g=()=>({contains:C=>!0,focus(){}});return k?k.createChildGroup(g,"application",!1):new a.fs(g,"application")},[k]),Ne=a.pe(g=>{ae(g.source.getViewportElement()),q(g),ne.activate("sheet"),i?.(g)},[ne]);l.useEffect(()=>{J&&w&&J.source?.focus(typeof w=="object"?w:void 0)},[J]);const ke=l.useRef(null),K=l.useCallback(g=>{let C=null;return E?.hidden||(C=m.jsx(a.tR,{...E,style:{maxWidth:"100%",...E?.style},workbook:L.current,ref:ke,title:O,placeHolder:P,onTitleChange:$=>{V($)}})),m.jsx(Dt,{...g,logo:v,mainElement:C,showFileMenu:!y,showAppearanceMenu:!!(I?.onForceLightGridChange||I?.onForceLightImagesChange||I?.onForceModeChange)})},[v,O,E,I,y,ne]);l.useEffect(()=>{const g=C=>C.preventDefault();return L.current?.addEventListener("wheel",g,{passive:!1}),()=>{L.current?.removeEventListener("wheel",g)}},[]);const le=l.useMemo(()=>m.jsx(a.bs,{transparentBackground:!0,sx:t,style:n}),[t,n]),Z=l.useCallback(({error:g})=>(s?.(g),m.jsx(c,{sx:t,style:n,error:g??"Unable to display empty workbook."})),[t,n,s]),be=l.useMemo(()=>({...t,"& .SnackbarContainer-root":{position:"absolute !important"},"& .notistack-Snackbar":{minWidth:"unset"},"& .notistack-MuiContent *":{fontFamily:g=>g.typography.fontFamily},"& #notistack-snackbar":{maxWidth:"560px",whiteSpace:"pre-wrap"},"*":{userSelect:"none"}}),[t]),ze=a.h5([L,o]),W=l.useMemo(()=>{if(!j)return le;if(j.error||!j.workbook)return Z({error:j.error});let g=null,C=null,$=!1;return I&&(g=te?I.dark:I.light,C=te&&!I.forceLightGrid?I.dark:I.light,$=I.forceLightImages),m.jsx(a.QM,{sx:be,style:n,tabIndex:0,autoFocus:!0,workbook:j.workbook,ref:ze,renderToolbar:K,onElementLoad:Ne,onRepeatCommandChange:M,onKeyDown:ee=>{d?.(ee)},gridTheme:C,headersTheme:g,forceLightImages:$,className:a.wo(r,"sheetxl-workbook"),onContextMenu:ee=>ee.preventDefault(),...F},"WorkbookElement")},[j,O,A,le,I,F,K,be]);let Q=m.jsx(Xt,{fallbackRender:Z,children:m.jsx(pn,{maxSnack:3,domRoot:Y,anchorOrigin:{vertical:"bottom",horizontal:"right"},autoHideDuration:3500,onClose:(g,C,$)=>{L.current?.focus()},Components:{error:Rt},iconVariant:{success:m.jsx(a.SvgIcon,{style:{marginRight:"8px"},children:m.jsx("path",{d:"M20,12A8,8 0 0,1 12,20A8,8 0 0,1 4,12A8,8 0 0,1 12,4C12.76,4 13.5,4.11 14.2, 4.31L15.77,2.74C14.61,2.26 13.34,2 12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0, 0 22,12M7.91,10.08L6.5,11.5L11,16L21,6L19.59,4.58L11,13.17L7.91,10.08Z"})}),error:m.jsx(a.RR,{style:{marginRight:"8px"}})},children:m.jsx(a.OR,{children:m.jsx(Tt,{workbook:j?.workbook,setWorkbook:U,importExportDisabled:y,titlePlaceHolder:P,titleWorkbook:O,setWorkbookTitle:V,refWorkbookTitle:ke,commands:ne,undoManager:A,themeModeOptions:I,children:W})})})});return I&&(Q=m.jsxs(a.ik,{theme:te?I.dark:I.light,children:[I.cssBaseline?m.jsx(Gt,{}):null,Q]})),Q}));Ot.displayName="EagerStandaloneWorkbook";const fn=Object.freeze(Object.defineProperty({__proto__:null,default:Ot},Symbol.toStringTag,{value:"Module"})),hn=Object.freeze(Object.defineProperty({__proto__:null,E:fn,c:ie},Symbol.toStringTag,{value:"Module"}));exports.BqlQEs1rIE5H45L=hn,exports.Collapse=Fe,exports.fe=ie;
12
+ `))),xe},[V,B,S]),ke=a.pe(async(W,Q,g)=>{if(!Q&&J){const C=await J("Enter Workbook name to "+(g.isDefault?"Save.":`Export as ${g.description}.`));return C!==null&&a.ZR.writeFile(C,W,{formatType:g.key})}return a.ZR.writeFile(Q,W,{formatType:g.key})},[B,S,J]),K=l.useCallback(()=>({contains:W=>!0,focus(){}}),[]),le=l.useMemo(()=>{const W=[];N||(a.ZR.getWriteFormats().forEach(g=>{const C=g.isDefault,$={label:C?"Save Workbook":`Save Workbook as ${g.description}`,scopedLabels:{workbook:"Save",saveWorkbook:`as ${g.description}`},tags:g.tags,description:`Save the workbook to the desktop${C?"":` as ${g.description}`}.`};C&&($.shortcut={key:"S",modifiers:[a.Re.Ctrl]},W.push(new a.Ae("saveWorkbookAs",K,{label:"Save Workbook As…",scopedLabels:{workbook:"Save as…",saveWorkbook:"as…"},shortcut:[{key:"S",modifiers:[a.Re.Shift,a.Re.Ctrl]},{key:"F12"}],description:"Save the workbook to the desktop with the provided name."},()=>{ke(S,null,g).catch(se=>{B?.showError?.(se)})})));const ee=C?"saveWorkbook":`saveWorkbookAs${g.key}`;W.push(new a.Ae(ee,K,$,se=>{ke(S,se??D,g).catch(xe=>{B?.showError?.(xe)})}))}),W.push(new a.Ae("openWorkbook",K,{label:"Open Workbook…",scopedLabels:{workbook:"Open…"},description:"Open a workbook from the desktop.",shortcut:{key:"O",modifiers:[a.Re.Ctrl]}},async(g=null)=>{const C={date1904:S.isDate1904(),...S.options};try{const $=await Ne(g,C);if(!$)return;const ee=$.title,se=$.workbook,xe=se.getSelectedSheet();if($.formatType.mimeType==="text/csv"){const qe=S.findValidSheetName(ee);await S.doBatch(async()=>{const et=xe.getUsedRange();et?await S.getSheets().add({name:qe,autoSelect:!0}).getRange({colStart:0,rowStart:0,colEnd:0,rowEnd:0}).copyFrom(et):B?.showMessage("The file appears to be blank.")},`Import CSV '${ee}'`)}else S?.close(),_?.(ee),j(se)}catch($){B?.showError?.($)}})),W.push(new a.Ae("openWorkbookFromUrl",K,{label:"Open Workbook From Web",scopedLabels:{insert:"From Web",workbook:"From Web…"},description:"Open a workbook from the web."},async function(g){if(!g){const C=await B?.showInputOptions?.({title:"Open Workbook from the Web",description:"Enter the web address for the workbook to open.",inputLabel:"Address",initialValue:"https://www.sheetxl.com/examples/features-checklist.xlsx",inputProps:{style:{minWidth:"440px"}},options:["Open"]});if(C.option!=="Open")return;g=C.input}g&&console.log("openWorkbookFromUrl",g)})));let Q=[];return q&&(Q=[new a.Ae("themeMode",K,{label:"Light/Dark Mode",scopedLabels:{appearance:"Light/Dark Mode"},description:"Toggle the application styling between light and dark mode."}),new a.Ae("defaultThemeMode",K,{label:"Use System Light/Dark Mode",scopedLabels:{appearance:"Use System Default"},description:"Use the system settings to determine styling for light and dark mode."}),new a.Ae("forceLightGrid",K,{label:"Force Light Grid",description:"Force the grid to always render in light mode if dark mode is being used. This is ensures that the grid will render the colors as specified in another tools (for example Excel)."}),new a.Ae("forceLightImages",K,{label:"Force Light Images",description:"Force the images to always render in light mode if dark mode is being used. This is ensures that the images will render the colors as specified in another tools (for example Excel). This only has any effect if the grid is in dark mode."})]),[...W,...Q,new a.Dt("help",K,{label:"Show Help",description:"Provide Help.",shortcut:{key:"F1"}},()=>{}),new a.Dt("showKeyboardShortcuts",K,{label:"Keyboard Shortcuts",description:"Show keyboard shortcuts.",shortcut:{key:"/",modifiers:[a.Re.Ctrl]}},()=>{}),new a.Ae("gotoUrlGithub",K,{label:"Github",description:"Download examples, explore source code, and leave a star."},()=>{window?.open("https://github.com/sheetxl/sheetxl")}),new a.Ae("gotoUrlDiscord",K,{label:"Discord",description:"Join our community on discord."},()=>{window?.open("https://discord.gg/NTKdwUgK9p")}),new a.Ae("gotoUrlDocumentation",K,{label:"Documentation",description:"Read the documentation."},()=>{window?.open("https://www.sheetxl.com/docs")}),new a.Ae("gotoUrlIssue",K,{label:"Create Issue",description:"Create an issue to identify a bug or a feature request."},()=>{window?.open("https://github.com/sheetxl/sheetxl/issues")})]},[S,D,B,N,q,O,M]),Z=l.useMemo(()=>{let W=null;return W=O?O.createChildGroup(K,"standaloneWorkbook",!1):new a.fs(K,"standaloneWorkbook"),W.addCommands(le,!0),W},[O,le]);a.yR({manager:M,commands:Z,notifier:B});const{themeMode:be}=a.qR();l.useEffect(()=>{if(!q||!Z)return;const W=q.forceMode==="dark"||!q.forceMode&&be==="dark";Z.getCommand("themeMode").update({state:q.forceMode??null,label:W?"Dark Mode":"Light Mode",scopedLabels:{appearance:W?"Dark Mode":"Light Mode"}}).updateCallback(()=>{Y(W?a.UR.Light:a.UR.Dark)}),Z.getCommand("defaultThemeMode").update({state:!q.forceMode}).updateCallback(()=>{Y(null)}),Z.getCommand("forceLightGrid").update({state:q.forceLightGrid}).updateCallback(()=>{ae(!q.forceLightGrid)}),Z.getCommand("forceLightImages").update({state:q.forceLightImages}).updateCallback(()=>{ne(!q.forceLightImages)})},[be,q,le]);const{showModal:ze}=a.Bu();return l.useEffect(()=>{const W=()=>new Promise((Q,g)=>{const C=l.lazy(()=>Promise.resolve().then(()=>require("./B3cvLROY4acHRpqQ.cjs"))),$=ze(C,{title:"Shortcut Keys Reference",commands:Z,onDone:()=>{$.hide()},TransitionProps:{onExited:()=>{Q(!0)}}})});Z.getCommand("showKeyboardShortcuts").updateCallback(()=>W()),Z.getCommand("help").updateCallback(()=>W())},[le,Z]),Z})({workbook:r,setWorkbook:t,importExportDisabled:f,workbookTitle:i,setWorkbookTitle:s,commands:p,requestWorkbookTitle:A=>new Promise(S=>{n.current?n.current.requestWorkbookTitle((j,N)=>{S(j)},{selectAll:!0,requestReason:A}):S(u)}),themeModeOptions:x,undoManager:d,notifier:U,onExecute:P});l.useEffect(()=>{w.starting.size<=0||!w.isMounted||k(A=>{const S=new Map(A.running);return A.starting.forEach((j,N)=>{const D=()=>{k(_=>{const B=new Map(_.running);return B.delete(N),{..._,running:B}})};S.set(N,D),j(D)}),{...A,starting:new Map,running:S}})},[w]);const[G,X]=l.useState(null);l.useEffect(()=>{w.starting.size!==0||w.running.size!==0?X(m.jsx(a.bs,{icon:m.jsx(a.DR,{sx:{transform:"scale(0.7)",marginLeft:"-6px"}}),panel:!0,label:w.label,onMount:h,onUnmount:R,sx:{position:"absolute",left:"0",top:"0",width:"100%",height:"100%",zIndex:"9999"}})):X(null)},[w.starting,w.running]);const I=l.useMemo(()=>m.jsx(a.jR,{commands:H,disableHover:!0,sx:{padding:"0"},buttonProps:{sx:{maxHeight:"22px"}}}),[H]),te={notifier:U,commands:H};return r&&(te.statusBarProps={childrenEnd:I}),m.jsxs(m.Fragment,{children:[G,c?l.cloneElement(c,te):null]})}));Tt.displayName="SnackbarAndCommandsWrapper";const Ot=l.memo(l.forwardRef((e,o)=>{const{className:r,sx:t,style:n,onElementLoad:i,onError:s,undoManager:u,errorPanel:c=a.kx,onKeyDown:d,workbook:p,createWorkbookOptions:f,onWorkbookChange:x,logo:v,importExportDisabled:y=!1,themeModeOptions:b,autoFocus:w=!1,commands:k,title:h,onTitleChange:R,titleProps:E,...F}=e,L=l.useRef(null),z=a.pe(x,[x]),U=a.pe(R??E?.onTitleChange,[R??E?.onTitleChange]),P=E?.placeHolder??"Untitled",H=b?.forceMode,{themeMode:G,source:X}=a.qR({mode:H}),I=l.useMemo(()=>({...b,light:a.IR(!1,ue.CommonUtils.deepMerge(b?.theme??{},b?.light??{})),dark:a.IR(!0,ue.CommonUtils.deepMerge(b?.theme??{},b?.dark??{}))}),[b]),te=G===a.UR.Dark,[A,S]=l.useState(null);l.useEffect(()=>{S(u??new ue.UndoManager)},[u]);const[j,N]=l.useState(null),[D,_]=l.useState(null),B=a.Qf();l.useLayoutEffect(()=>{if(!p||Object.keys(p).length===0&&!ue.CommonUtils.isPromiseLike(p)){const g={theme:B.getDefaultTheme(),...f};_(new ue.Workbook(g))}else _(p)},[p]),l.useLayoutEffect(()=>{if(D){if(D instanceof ue.Workbook)return N({workbook:D}),void(p!==D&&z?.(D));(async()=>{try{let g,C=await Promise.resolve(D);C&&C.source&&(C=await a.ZR.read(C)),C.workbook?(V(C.title),g=C.workbook):g=C,z?.(g),N({workbook:g})}catch(g){z?.(null),N({error:g})}})()}},[D]);const[J,q]=l.useState(null);l.useEffect(()=>{if(!A||!j)return;A.clear();const g=j?.workbook?.getTransactions();return g?g.addListener({onCommitEnd:C=>{C.getDescription()?A.addUndoOperation({description:C.getDescription(),undo:()=>(g.revert(C.getId()),J.source?.focus(),()=>{g.restore(C.getId()),J.source?.focus()})}):console.warn("commit has no description",C)}}):void 0},[A,j,J]);const M=a.pe(g=>{g?A.setRepeatableOperation({description:g.label(),repeat:async()=>g.execute()}):A.setRepeatableOperation(null)},[A]),[O,V]=l.useState(h??E?.title??"");l.useEffect(()=>{V(h??E?.title??"")},[h??E?.title]),l.useEffect(()=>{U?.(O)},[O]);const[Y,ae]=l.useState(null),ne=l.useMemo(()=>{const g=()=>({contains:C=>!0,focus(){}});return k?k.createChildGroup(g,"application",!1):new a.fs(g,"application")},[k]),Ne=a.pe(g=>{ae(g.source.getViewportElement()),q(g),ne.activate("sheet"),i?.(g)},[ne]);l.useEffect(()=>{J&&w&&J.source?.focus(typeof w=="object"?w:void 0)},[J]);const ke=l.useRef(null),K=l.useCallback(g=>{let C=null;return E?.hidden||(C=m.jsx(a.tR,{...E,style:{maxWidth:"100%",...E?.style},workbook:L.current,ref:ke,title:O,placeHolder:P,onTitleChange:$=>{V($)}})),m.jsx(Dt,{...g,logo:v,mainElement:C,showFileMenu:!y,showAppearanceMenu:!!(I?.onForceLightGridChange||I?.onForceLightImagesChange||I?.onForceModeChange)})},[v,O,E,I,y,ne]);l.useEffect(()=>{const g=C=>C.preventDefault();return L.current?.addEventListener("wheel",g,{passive:!1}),()=>{L.current?.removeEventListener("wheel",g)}},[]);const le=l.useMemo(()=>m.jsx(a.bs,{transparentBackground:!0,sx:t,style:n}),[t,n]),Z=l.useCallback(({error:g})=>(s?.(g),m.jsx(c,{sx:t,style:n,error:g??"Unable to display empty workbook."})),[t,n,s]),be=l.useMemo(()=>({...t,"& .SnackbarContainer-root":{position:"absolute !important"},"& .notistack-Snackbar":{minWidth:"unset"},"& .notistack-MuiContent *":{fontFamily:g=>g.typography.fontFamily},"& #notistack-snackbar":{maxWidth:"560px",whiteSpace:"pre-wrap"},"*":{userSelect:"none"}}),[t]),ze=a.h5([L,o]),W=l.useMemo(()=>{if(!j)return le;if(j.error||!j.workbook)return Z({error:j.error});let g=null,C=null,$=!1;return I&&(g=te?I.dark:I.light,C=te&&!I.forceLightGrid?I.dark:I.light,$=I.forceLightImages),m.jsx(a.QM,{sx:be,style:n,tabIndex:0,autoFocus:!0,workbook:j.workbook,ref:ze,renderToolbar:K,onElementLoad:Ne,onRepeatCommandChange:M,onKeyDown:ee=>{d?.(ee)},gridTheme:C,headersTheme:g,forceLightImages:$,className:a.wo(r,"sheetxl-workbook"),onContextMenu:ee=>ee.preventDefault(),...F},"WorkbookElement")},[j,O,A,le,I,F,K,be]);let Q=m.jsx(Xt,{fallbackRender:Z,children:m.jsx(pn,{maxSnack:3,domRoot:Y,anchorOrigin:{vertical:"bottom",horizontal:"right"},autoHideDuration:3500,onClose:(g,C,$)=>{L.current?.focus()},Components:{error:Rt},iconVariant:{success:m.jsx(a.SvgIcon,{style:{marginRight:"8px"},children:m.jsx("path",{d:"M20,12A8,8 0 0,1 12,20A8,8 0 0,1 4,12A8,8 0 0,1 12,4C12.76,4 13.5,4.11 14.2, 4.31L15.77,2.74C14.61,2.26 13.34,2 12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0, 0 22,12M7.91,10.08L6.5,11.5L11,16L21,6L19.59,4.58L11,13.17L7.91,10.08Z"})}),error:m.jsx(a.RR,{style:{marginRight:"8px"}})},children:m.jsx(a.OR,{children:m.jsx(Tt,{workbook:j?.workbook,setWorkbook:_,importExportDisabled:y,titlePlaceHolder:P,titleWorkbook:O,setWorkbookTitle:V,refWorkbookTitle:ke,commands:ne,undoManager:A,themeModeOptions:I,children:W})})})});return I&&(Q=m.jsxs(a.ik,{theme:te?I.dark:I.light,children:[I.cssBaseline?m.jsx(Gt,{}):null,Q]})),Q}));Ot.displayName="EagerStandaloneWorkbook";const fn=Object.freeze(Object.defineProperty({__proto__:null,default:Ot},Symbol.toStringTag,{value:"Module"})),hn=Object.freeze(Object.defineProperty({__proto__:null,E:fn,c:ie},Symbol.toStringTag,{value:"Module"}));exports.Collapse=Fe,exports.Dg2FsPa20O3uFQUO=hn,exports.fe=ie;
@@ -1,5 +1,5 @@
1
1
  "use strict";/**
2
- * @license @sheetxl/studio-vanilla - SheetXL Studio - Vanilla entry point for integrating SheetXL UI. - v0.3.8
2
+ * @license @sheetxl/studio-vanilla - SheetXL Studio - Vanilla entry point for integrating SheetXL UI. - v0.3.10
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.
@@ -0,0 +1,6 @@
1
+ "use strict";/**
2
+ * @license @sheetxl/studio-vanilla - SheetXL Studio - Vanilla entry point for integrating SheetXL UI. - v0.3.10
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 I=require("./bBrqIaOYcNmpSMcM.cjs"),p=require("./C8IvCN3O_TuQgZmK.cjs"),d=require("@sheetxl/sdk");class G{constructor(t){this.list=t}get length(){return this.list.length}item(t){return this.list[t]}forEach(t,e){for(let s=0;s<this.list.length;s++)t(this.list[s],s,this)}}const W=u=>u===!0||u==="1"||u==="on"||u==="true"||u!==!1&&u!=="0"&&u!=="off"&&u!=="false"&&null,X=u=>{const t=parseInt(u);return isNaN(t)?null:t},$=u=>{const t=parseFloat(u);return isNaN(t)?null:t},K=new Map;class S{constructor(t,e,s,r,o,i=null,n){const l=(c,h,g)=>n?.getRef?.(c,h,g,n?.parsedRefs),a=c=>n?.getRefs?.(c,n?.parsedRefs);this._parent=t,this.sharedShared=e,this.currentPath=s,this.elemRoot=r,this.jsonRoot=o,t?(this._fileLocation=t._fileLocation,this._getRef=t._getRef,this._getRefs=t._getRefs):(i&&(this._fileLocation=i),l&&a&&(this._getRef=l),a&&(this._getRefs=a),this._onWarning=n?.onWarning,this._addPerson=n?.addPerson)}getRef(t,e=!1){return this._getRef?.(t,this._fileLocation,e)??null}getRelationships(){return this._getRefs(this._fileLocation)??K}getPath(){return this.currentPath}getElemRoot(){return this.elemRoot}getJsonRoot(){return this.jsonRoot}warn(t){this._onWarning?this._onWarning(t):this._parent?this._parent?.warn?.(t):console.warn(t)}addPerson(t){return this._addPerson?this._addPerson(t):this._parent?this._parent?._addPerson?.(t):null}getVisitorParamsState(){return this.sharedShared.getVisitorParamsState()}evaluate(t,e){if(!t)return e;let s=[e];const r=t.split("/");for(let o=0;o<r.length;o++){const i=r[o];if(i===""||i===".")continue;let n=[];for(let l=0;l<s.length;l++){const a=s[l],c=a.childNodes;for(let h=0;c&&h<c.length;h++){const g=a.childNodes[h];g.localName!==i&&i!=="*"||n.push(g)}}s=n}return s.length===1?s[0]:s.length===0?null:new G(s)}getFromPath(t,e){return I.Qt.getFromPath(t,e)}setToPath(t,e,s){return I.Qt.setToPath(t,e,s)}getValAttrAsString(t,e){let s=this.evaluate(t,e);return s&&s.hasAttribute("val")?s.getAttribute("val")??null:null}getValAttrAsBoolean(t,e,s=!1){let r=this.evaluate(t,e);if(!r)return null;const o=r.hasAttribute("val")?r.getAttribute("val"):void 0;return o==null?s:o==="1"||o==="on"||o==="true"||o!=="0"&&o!=="off"&&o!=="false"&&s}getValAttrAsInteger(t,e){let s=this.evaluate(t,e);return s&&s.hasAttribute("val")?parseInt(s.getAttribute("val"))??null:null}getValAttrAsFloat(t,e){let s=this.evaluate(t,e);return s&&s.hasAttribute("val")?parseFloat(s.getAttribute("val"))??null:null}get BOOLEAN_COPY(){return W}get INT_COPY(){return X}get FLOAT_COPY(){return $}copyFromAttribute(t,e,s,r=e,o=null){if(!t||!s||!t.hasAttribute(e))return;let i=t.getAttribute(e);if(o){if(Array.isArray(o)){for(let n=0;n<o.length;n++)if(i==null||(i=o[n](i),i==null))return}else if(i==null||(i=o(i),i==null))return}this.setToPath(s,r,i)}}class V{constructor(t){this.jsonKey=t}visit(t,e,s){const r={};return s[this.jsonKey]=r,r}}class H{visit(t,e,s){if(!e)return;const r=e.childNodes;for(let o=0;o<r.length;o++){const i=r.item(o);i.nodeType===1&&i.localName==="Relationship"&&this.processRelationship(t,i,s)}return s}processRelationship(t,e,s){const r={};t.copyFromAttribute(e,"Target",r,"target"),t.copyFromAttribute(e,"Type",r,"type"),t.copyFromAttribute(e,"TargetMode",r,"targetMode"),s[e.getAttribute("Id")]=r}}const D=(u,t)=>{if(u||!u.hasAttribute("rot"))return;const e=u.getAttribute("rot"),s=I.Qt.roundAccurately(p.p(e),2);s!==-1e3&&(t.rotation=s)},f=(u,t,e,s,r)=>{const o=u.getValAttrAsString(s,t);o!==null&&(e[r]=o)},A=(u,t,e,s,r=s,o=null)=>{const i=u.getValAttrAsBoolean(s,t,o);i!==null&&(e[r]=i)},C=(u,t,e,s,r)=>{const o=u.getValAttrAsInteger(s,t);o!==null&&(e[r]=o)},y=(u,t,e,s,r,o=1)=>{const i=u.getValAttrAsFloat(s,t);i!==null&&(e[r]=i*o)};class q{visit(t,e,s){return A(t,e,s,"roundedCorners","roundedCorners"),C(t,e,s,".//AlternateContent/Fallback/style","styleId"),s.range=null,s}afterVisit(t,e,s){let r={};s.types=r;let o={},i=0,n={},l=0,a=t.getVisitorParamsState().get("axes");const c=t.getVisitorParamsState().get("types");for(let m=0;m<c.length;m++){const b=c[m];if(b.xAxisId){const v=b.xAxisId,P=a.get(v);o[m+""]=P,b.offsetXAxis=m,delete b.xAxisId,s.xAxes=o,o.length=++i}if(b.yAxisId){const v=b.yAxisId,P=a.get(v);n[m+""]=P,b.offsetYAxis=m,delete b.yAxisId,s.yAxes=n,n.length=++l}r[m+""]=b}r.length=c.length;const h=t.getVisitorParamsState().get("series");if(!h||h.length===0)return;const g={};s.series=g;for(let m=0;m<h.length;m++)g[m+""]=h[m];g.length=h.length}}class J{visit(t,e,s){return A(t,e,s,"plotVisOnly","plotVisOnly"),f(t,e,s,"dispBlanksAs","dispBlanksAs"),A(t,e,s,".//extLst/ext/dataDisplayOptions16/dispNaAsBlank","dispNaAsBlank"),A(t,e,s,"showDLblsOverMax","showDLblsOverMax"),s}afterVisit(t,e,s){try{const r=t.getValAttrAsBoolean("autoTitleDeleted",e),o=t.evaluate("title",e);t.setToPath(s,"title.shown",!(r===!0||!o));const i=t.evaluate("legend",e);t.setToPath(s,"legend.shown",i!==null)}catch(r){throw new Error("Unexpected Error parsing Chart: "+r)}}}class Q{visit(t,e,s){let r={};return s.plotArea=r,r}}class O{EnumMappings(){}static fromOoxmlGradientType(t){return t==="circle"?"radial":t}static fromOoxmlLineCap(t){if(t==="rnd")return"round";if(t==="flat")return"butt";if(t==="sq")return"square";throw new Error("Invalid lineCap type: "+t)}static fromOoxmlCompound(t){return t==="sng"?"single":t}static fromOoxmlAlignment(t){return t==="ctr"?"center":t}}class M{visit(t,e,s){}processStroke(t,e,s){const r={},o=t.evaluate("ln",e);if(o){o.hasAttribute("algn")&&(r.align=O.fromOoxmlAlignment(o.getAttribute("algn"))),o.hasAttribute("cap")&&(r.lineCap=O.fromOoxmlLineCap(o.getAttribute("cap"))),o.hasAttribute("cmpd")&&(r.compound=O.fromOoxmlCompound(o.getAttribute("cmpd"))),o.hasAttribute("w")&&(r.width=p.t(o.getAttribute("w")));const i=t.evaluate("miter",o);i&&(r.lineJoin="miter",i.hasAttribute("lim")&&(r.miter=parseFloat(i.getAttribute("lim")))),t.evaluate("bevel",o)&&(r.lineJoin="bevel"),t.evaluate("round",o)&&(r.lineJoin="round");const n=t.evaluate("custDash",o);if(n){const c=t.evaluate("ds",n);if(c&&c.length>0){let h="";for(let g=0;g<c.length;g++){const m=c.item(g);h+=p.a(m.getAttribute("d"))+","+p.a(m.getAttribute("sp"))}r.dash=h}}const l=t.evaluate("prstDash",o);l&&l.hasAttribute("val")&&(r.dash=l.getAttribute("val")),this.parseEndElement(t,o,r,"headEnd","head"),this.parseEndElement(t,o,r,"tailEnd","tail");const a=this.processFill(t,o,s);r.fill=a}return r}parseEndElement(t,e,s,r,o){const i=t.evaluate(r,e);if(i&&(i.hasAttribute("type")&&(s[o+"Type"]=i.getAttribute("type")),i.hasAttribute("len")||i.hasAttribute("w"))){const n=i.getAttribute("len")?i.getAttribute("len"):"med",l=i.getAttribute("w")?i.getAttribute("w"):"med";s[o+"Size"]=n+"-"+l}}processFill(t,e,s){const r={};if(t.evaluate("noFill",e))return r.none=!0,r;const o=t.evaluate("solidFill",e);if(o){const a=this.processAdjColor(t,o);return a&&(r.solid=a),r}const i=t.evaluate("gradFill",e);if(i){i.hasAttribute("rotWithShape")&&(r.isRotated=i.getAttribute("rotWithShape")==="1");const a=this.processGradFill(t,i);return r.gradient=a,r}const n=t.evaluate("pattFill",e);if(n){const a=this.processPatternFill(t,n);return r.pattern=a,r}const l=t.evaluate("blipFill",e);if(l){l.hasAttribute("rotWithShape")&&(r.isRotated=p.b(l.getAttribute("rotWithShape"))),l.hasAttribute("dpi")&&(r.dpi=l.getAttribute("dpi"));const a=this.processImageFill(t,l);return r.image=a,r}return r.none=!0,r}processGradFill(t,e){const s={},r=t.evaluate("lin",e);if(r){if(s.type="linear",r.hasAttribute("ang")){const c=p.p(r.getAttribute("ang"));s.angle=c}if(r.hasAttribute("scaled")){const c=p.b(r.getAttribute("scaled"));s.scaled=c}}const o={};e.hasAttribute("flip")&&(o.mirror=e.getAttribute("flip")),Object.keys(o).length>0&&(s.tile=o);const i=t.evaluate("path",e);if(i){i.hasAttribute("path")&&(s.type=O.fromOoxmlGradientType(i.getAttribute("path")));const c=t.evaluate("fillToRect",i);c&&(s.fillTo=this.getRect(c))}const n=t.evaluate("tileRect",e);n&&(s.tile.bounds=this.getRect(n));const l=[],a=t.evaluate("gsLst/gs",e);for(let c=0;a&&c<a.length;c++){const h=a.item(c),g={offset:p.a(h.getAttribute("pos")),color:this.processAdjColor(t,h)};l.push(g)}return l.length>0&&(s.stops=l),s}getRect(t){const e={};return t.hasAttribute("t")&&(e.t=p.a(t.getAttribute("t"))),t.hasAttribute("l")&&(e.l=p.a(t.getAttribute("l"))),t.hasAttribute("b")&&(e.b=p.a(t.getAttribute("b"))),t.hasAttribute("r")&&(e.r=p.a(t.getAttribute("r"))),Object.keys(e).length===0?null:e}processImageFill(t,e){return{ref:"https://www.sheetxl.com/logo-color-padded-white.jpg",tile:!1}}processPatternFill(t,e){const s={},r=e.getAttribute("prst");s.type=r;const o=t.evaluate("bgClr",e);if(o){const n=this.processAdjColor(t,o);n&&(s.background=n)}const i=t.evaluate("fgClr",e);if(i){let n=this.processAdjColor(t,i);n&&(s.foreground=n)}return s}processAdjColor(t,e){const s=t.evaluate("hslClr",e);if(s)return this.processHslClr(t,s);const r=t.evaluate("prstClr",e);if(r)return this.processClrWithValAttribute(t,r);const o=t.evaluate("schemeClr",e);if(o)return this.processClrWithValAttribute(t,o);const i=t.evaluate("sysClr",e);if(i)return this.processClrWithValAttribute(t,i);const n=t.evaluate("scrgbClr",e);if(n)return this.processScrgbClrElement(t,n);const l=t.evaluate("srgbClr",e);return l?this.processSrgbClrElement(t,l):null}processScrgbClrElement(t,e){let s="lrgba("+p.a(e.getAttribute("r"))+","+p.a(e.getAttribute("g"))+","+p.a(e.getAttribute("b"))+")";return s+=this.processAdjustments(t,e),s}processSrgbClrElement(t,e){let s=e.getAttribute("val");return s+=this.processAdjustments(t,e),s}processHslClr(t,e){let s="hsl("+p.p(e.getAttribute("hue"))+","+p.a(e.getAttribute("sat"))+","+p.a(e.getAttribute("lum"))+")";return s+=this.processAdjustments(t,e),s}processClrWithValAttribute(t,e){const s=e.getAttribute("val");if(!s)return;let r=s;return r+=this.processAdjustments(t,e),r}processAdjustments(t,e){let s="";const r=e.childNodes;for(let o=0;o<r.length;o++){const i=r.item(o);if(i.nodeType===1){let n=i.localName;s+=n==="hue"||n==="hueOff"||n==="hueMod"?this.processAdjustmentElement(t,e,n,6e4):n==="gray"||n==="comp"||n==="inv"||n==="gamma"||n==="invGamma"?this.processAdjustmentElement(t,e,n,1):this.processAdjustmentElement(t,e,n)}}return s}processAdjustmentElement(t,e,s,r=1e3){const o=t.evaluate(s,e);if(!o)return"";const i=o.getAttribute("val");return i?` ${s} ${!i||parseFloat(i)/r}`:` ${s}`}}class L extends M{visit(t,e,s){try{const r=t.evaluate("xfrm",e);if(r){D(r,s);const l={x:0,y:0,width:0,height:0},a=t.evaluate("off",r);a&&(l.x=p.c(a.getAttribute("x"))??0,l.y=p.c(a.getAttribute("y"))??0);const c=t.evaluate("ext",r);a&&(l.width=p.c(c.getAttribute("cx"))??0,l.height=p.c(c.getAttribute("cy"))??0),s.bounds=l}const o=t.evaluate("prstGeom",e);o?.hasAttribute("prst")?s.geometry=o?.getAttribute("prst"):t.evaluate("customGeom",e)&&console.warn("customGeom not supported yet");const i=this.processFill(t,e,s);i&&Object.keys(i).length>0&&(s.fill=i);const n=this.processStroke(t,e,s);return n&&Object.keys(n).length>0&&(s.stroke=n),s}catch(r){throw console.warn(r),new Error("Unexpected Error parsing Shape Properties element")}}}class N{visit(t,e,s){let r={};if(f(t,e,r,"grouping","grouping"),A(t,e,r,"varyColors","varyColors"),y(t,e,r,"gapWidth","gapWidth",.01),y(t,e,r,"overlap","overlap",.01),this.parseType(t,e,r),C(t,e,r,"bubbleScale","bubbleScale"),A(t,e,r,"showNegBubbles","showNegativeBubbleValues"),A(t,e,r,"sizeRepresents","bubbleSizeRepresentsWidth"),C(t,e,r,"firstSliceAng","startAngle"),C(t,e,r,"holeSize","holeSize"),f(t,e,r,"scatterStyle","scatterStyle"),this.parseAxisIds(t,e,r),Object.keys(r).length>0){let o=t.getVisitorParamsState().get("types");o||(o=[],t.getVisitorParamsState().set("types",o)),o.push(r)}return r}parseType(t,e,s){switch(e.localName){case"areaChart":s.type="area";break;case"bubbleChart":s.type="bubble";break;case"doughnutChart":case"ofPieType":case"pieChart":s.type="pie";break;case"lineChart":s.type="line";break;case"scatterChart":s.type="scatter"}}parseAxisIds(t,e,s){const r=t.evaluate("axId",e);if(r.length===0)return;const o=r.item(0).getAttribute("val");s.xAxisId=o;const i=r.item(1).getAttribute("val");s.yAxisId=i}}class Z extends N{parseType(t,e,s){const r=t.getValAttrAsString("barDir",e);r&&(s.type=r==="col"?"column":"bar")}}class w{constructor(t){this.jsonKey=t}visit(t,e,s){let r={},o=r,i=t.getValAttrAsString("idx",e);i!==null&&(o={},o[i]=r);const n=t.getValAttrAsBoolean("delete",e);this.parseNumFormat(t,e,r),n===!0?(r.showBubbleSize=!1,r.showCatName=!1,r.showLeaderLines=!1,r.showPercentage=!1,r.showSerName=!1,r.showVal=!1,r.showLegendKey=!1):(A(t,e,r,"showBubbleSize","showBubbleSize"),A(t,e,r,"showCatName","showCatName"),A(t,e,r,"showLeaderLines","showLeaderLines"),A(t,e,r,"showPercent","showPercentage"),A(t,e,r,"showSerName","showSerName"),A(t,e,r,"showVal","showVal"),A(t,e,r,"showLegendKey","showLegendKey"));const l=t.evaluate("separator",e);return l!==null&&(r.separator=l.textContent),f(t,e,r,"dLblPos","position"),s[this.jsonKey]=o,r}parseNumFormat(t,e,s){const r=t.evaluate("numFmt",e);if(r){const o=r.getAttribute("formatCode");s.formatCode=o,r.hasAttribute("sourceLinked")&&(s.sourceLinked=r.getAttribute("sourceLinked")==="1")}}}const U=(u,t,e)=>{if(u.getValAttrAsBoolean("invertIfNegative",t)===!0)if(u.evaluate("extLst/ext/invertSolidFillFmt",t)){if(e.fill&&e.fillNegative){const s=u.getFromPath(e,"fill.solid.adjs");s&&u.setToPath(e,"fillNegative.solid.adjs",s)}}else{const s={val:"FFFFFF"},r={};r.solid=s,e.fillNegative=r;const o={val:"000000"},i={};i.solid=o;const n={};n.fill=i,e.strokeNegative=n}};class tt{visit(t,e,s){const r={};C(t,e,r,"explosion","explosion");let o=t.evaluate("cat/*/f",e);o||(o=t.evaluate("xVal/*/f",e));let i=null;o!==null&&o.firstChild!==null&&(i=o.firstChild.nodeValue),o||(o=t.evaluate("cat/strLit",e),o||(o=t.evaluate("cat/numLit",e)),o&&(i=this.parsePointsAsString(t,o))),i!==null&&(r.xRange=i);let n=t.evaluate("val/*/f",e);n||(n=t.evaluate("yVal/*/f",e));let l=null;n&&n.firstChild&&(l=n.firstChild.nodeValue),n||(n=t.evaluate("val/numLit",e),n!==null&&(l=this.parsePointsAsString(t,n))),l!==null&&(r.valRange=l),this.parseTitleRangeOrValue(t,e,r),C(t,e,r,"idx","idx"),A(t,e,r,"smooth","smooth");const a=t.getVisitorParamsState().get("types").length-1;r.offsetChart=a;let c=t.getVisitorParamsState().get("series");return c||(c=[],t.getVisitorParamsState().set("series",c)),c.push(r),r}parseTitleRangeOrValue(t,e,s){const r=t.evaluate("tx/strRef/f",e);if(r!==null){const o=r.firstChild.nodeValue;t.setToPath(s,"title.range",o)}else{const o=t.evaluate("tx/v",e);o!==null&&t.setToPath(s,"title.text.simpleRun",o.firstChild.nodeValue)}}parsePointsAsString(t,e){let s="{";const r=t.getValAttrAsInteger("ptCount",e),o=t.evaluate("pt",e),i=[];for(let n=0;o&&r&&n<r;n++){let l=null,a=t.evaluate("pt[@idx='"+n+"']/v",e);a instanceof Node&&(l=a.textContent),i[n]=l}for(let n=0;n<i.length;n++)n>0&&(s+=","),i[n]!==void 0&&(s+=i[n]);return s+="}",s}afterVisit(t,e,s){U(t,e,s);let r=t.getFromPath(s,"points");if(r){const o=Object.keys(r);for(let i=0;i<o.length;i++){const n=o[i],l=t.getFromPath(r,n);if(!l)continue;let a=t.getFromPath(l,"markers");a&&(t.setToPath(s,"markers.points."+n,a),delete l.markers)}}}}class et{DataPointVisitor(){}visit(t,e,s){let r=t.getFromPath(s,"points"),o=null;r?o=r:(o={},t.setToPath(s,"points",o));let i={},n=t.getValAttrAsString("idx",e);return n!==null&&(o[n]=i),A(t,e,i,"bubble3D","bubble3D"),C(t,e,i,"explosion","explosion"),U(t,e,i),i}}class rt{visit(t,e,s){const r=e.parentNode.localName;if(r==="ser"||r==="dPt"){const o={},i=t.getValAttrAsString("size",e);i!==null&&(o.size=i);const n=t.getValAttrAsString("symbol",e);return n&&(o.type=n),s.markers=o,o}return null}}class x{visit(t,e,s){let r={};this.parseScaling(t,e,r),y(t,e,r,"majorUnit","majorUnits"),y(t,e,r,"minorUnit","minorUnits"),A(t,e,r,"delete","shown"),this.parseOrientation(t,e,r),this.parseNumFormat(t,e,r),f(t,e,r,"majorTickMark","majorTickMarks"),f(t,e,r,"minorTickMark","minorTickMarks"),f(t,e,r,"crosses","crosses"),y(t,e,r,"crossesAt","crosses"),f(t,e,r,"crossBetween","crossBetween"),this.parseLabelAlign(t,e,r),C(t,e,r,"lblOffset","labelOffset"),f(t,e,r,"tickLblPos","labelPosition");const o=t.getValAttrAsInteger("noMultiLvlLbl",e);r.labelMultiLevel=o!==null&&o===0,C(t,e,r,"tickMarkSkip","tickMarkSkip"),C(t,e,r,"tickLblSkip","labelInterval"),this.parseDisplayCustOrBuiltInUnit(e,t,r),this.parseTimeUnits(t,e,r,"majorUnitDates","majorTimeUnit","majorUnit"),this.parseTimeUnits(t,e,r,"minorUnitDates","minorTimeUnit","minorUnit"),f(t,e,r,"baseTimeUnit","baseUnitDates"),t.getVisitorParamsState().get("axes")||t.getVisitorParamsState().set("axes",new Map);const i=t.getValAttrAsString("axId",e);return t.getVisitorParamsState().get("axes").set(i,r),r}parseTimeUnits(t,e,s,r,o,i){const n={};let l=t.getValAttrAsString(o,e);if(l!==null){n.dem=l;let a=t.getValAttrAsString(i,e);n.amt=a}Object.keys(n).length>0&&(s[r]=n)}parseDisplayCustOrBuiltInUnit(t,e,s){let r=e.getValAttrAsString("dispUnits/builtInUnit",t);r||(r=e.getValAttrAsString("dispUnits/custUnit",t)),r&&(s.displayUnits=r)}parseLabelAlign(t,e,s){let r=t.getValAttrAsString("lblAlgn",e);r!==null&&(r==="ctr"?s.labelAlign="center":r==="l"?s.labelAlign="left":r==="r"&&(s.labelAlign="right"))}parseOrientation(t,e,s){const r=t.getValAttrAsString("AxPos",e);r!==null&&(r==="b"?s.orientation="bottom":r==="l"?s.orientation="left":r==="r"?s.orientation="right":r==="t"&&(s.orientation="top"))}parseNumFormat(t,e,s){const r={},o=t.evaluate("numFmt",e);o!==null&&(o.hasAttribute("formatCode")&&(r.formatCode=o.getAttribute("formatCode")),o.hasAttribute("sourceLinked")&&(r.sourceLinked=o.getAttribute("sourceLinked")==="1")),Object.keys(r).length>0&&(s.labels=r)}parseScaling(t,e,s){const r=t.getValAttrAsString("scaling/orientation",e);r!==null&&(s.inverted=r!=="minMax");const o=t.getValAttrAsFloat("scaling/logBase",e);o!==null&&(s.logBase=o,s.scaleType="log"),y(t,e,s,"scaling/max","max"),y(t,e,s,"scaling/min","min")}afterVisit(t,e,s){s.fill&&s.labels&&(s.labels.fill=s.fill,delete s.fill);let r=t.getValAttrAsBoolean("delete",e);r!==null&&(t.setToPath(s,"labels.shown",r!==!0),t.setToPath(s,"shown",r!==!0));const o=t.getFromPath(s,"dispUnits.displayUnitsLabel");o&&(t.setToPath(s,"displayUnitsLabel",o),delete s.dispUnits);const i=t.evaluate("title",e);t.setToPath(s,"title.shown",i!==null);const n=t.evaluate("minorGridlines",e);t.setToPath(s,"gridLinesMinor.shown",n!==null);const l=t.evaluate("majorGridlines",e);t.setToPath(s,"gridLinesMajor.shown",l!==null)}}class F{constructor(t="text"){this._jsonKey=t}getTextPath(){return this._jsonKey}visit(t,e,s){let r=t.getFromPath(s,this.getTextPath());return r||(r={}),this.parseTextElement(t,e,r,!1),Object.keys(r).length>0&&t.setToPath(s,this.getTextPath(),r),s}parseTextElement(t,e,s,r){const o=t.evaluate("p/pPr/defRPr",e)??t.evaluate("defRPr",e);o&&(this.parseTextProperties(t,o,s),new L().visit(t,o,s));let i=[],n=t.evaluate("p/r",e)??t.evaluate("r",e);const l=c=>{const h={};let g=t.evaluate("t",c);const m=t.evaluate("rPr",c);m&&this.parseTextProperties(t,m,h),g?h.text=g.firstChild.textContent??"":c.textContent&&(h.text=c.textContent??""),i.push(h)};if(n?.length!==void 0)for(let c=0;n&&c<n.length;c++)l(n.item(c));else l(n||e);i.length>0&&(s.runs=i);const a=t.evaluate("bodyPr",e);a&&D(a,s)}parseTextProperties(t,e,s){if(!e)return;e.hasAttribute("sz")&&(s.size=parseFloat(e.getAttribute("sz"))/100),e.hasAttribute("b")&&(s.weight=e.getAttribute("b")==="1"?700:400),e.hasAttribute("i")&&(s.italic=e.getAttribute("i")==="1"),e.hasAttribute("u")&&(s.underline=e.getAttribute("u")),e.hasAttribute("strike")&&(s.strike=e.getAttribute("strike"));const r=t.evaluate("latin",e);if(r&&!r.getAttribute("typeface").startsWith("+")){const o=s.font??{};if(r.hasAttribute("typeface")&&(o.family=r.getAttribute("typeface")),r.hasAttribute("panose")){const i=r.getAttribute("panose");i&&(o.fallbacks=[d.IFont.getPanoseFallback(i)])}r.hasAttribute("pitchFamily")&&(o.pitch=r.getAttribute("pitchFamily")),r.hasAttribute("charset")&&(o.charset=r.getAttribute("charset")),Object.keys(o).length>0&&(s.font=o)}}}class st{visit(t,e,s){let r=t.getVisitorParamsState().get("series")[t.getValAttrAsInteger("idx",e)];if(r){let o=t.getFromPath(r,"title");o||(o={},t.setToPath(r,"title",o));let i=o,n=t.getValAttrAsBoolean("delete",e);return n!==null&&(i.shown=!n),i}return s}}class ot{visit(t,e,s){const r={};return A(t,e,r,"overlay","overlay"),f(t,e,r,"legendPos","position"),s.legend=r,r}}class it extends L{visit(t,e,s){const r=this.processFill(t,e,s);Object.keys(r).length>0&&(s.fillNegative=r);const o=this.processStroke(t,e,s);return Object.keys(o).length>0&&(s.strokeNegative=o),s}}class j extends F{constructor(t="title"){super(t)}parseTitleRangeOrValue(t,e,s){let r=t.evaluate("tx/strRef/f",e)??null;if(r){const o=r.firstElementChild.nodeValue;t.setToPath(s,"range",o)}}visit(t,e,s){const r={};A(t,e,r,"overlay","overlay"),s[this._jsonKey]=r;let o=t.getFromPath(r,this.getTextPath());o||(o={}),this.parseTitleRangeOrValue(t,e,r);const i=t.evaluate("txPr",e);i&&this.parseTextElement(t,i,o,!1);const n=t.evaluate("tx/rich",e);return n&&this.parseTextElement(t,n,o,!0),Object.keys(o).length>0&&t.setToPath(r,this.getTextPath(),o),r}afterVisit(t,e,s){if(s?.text){const r=s.text?.rotation??null;r!==null&&(s.rotation=parseInt(r),delete s.title.rotation)}}}class nt{visit(t,e,s){const r=t.evaluate("manualLayout",e);if(r){let o={};y(t,r,o,"x","x"),y(t,r,o,"y","y"),y(t,r,o,"w","w"),y(t,r,o,"h","h"),f(t,r,o,"xMode","xMode"),f(t,r,o,"yMode","yMode"),f(t,r,o,"wMode","wMode"),f(t,r,o,"hMode","hMode"),Object.keys(o).length>0&&(s.manualLayout=o)}return s}}class lt{visit(t,e,s){return s.name=e.getAttribute("name"),s}}class at extends M{visit(t,e,s){const r={};r.name=e.getAttribute("name");const o=e.childNodes;for(let i=0;i<o.length;i++){const n=o.item(i);if(n.nodeType===1){let l=n.localName;const a=t.evaluate(l,e),c=this.processAdjColor(t,a);r[l]=c}}return Object.keys(r).length>0&&(s.colors=r),r}}class ct{visit(t,e,s){const r={};r.name=e.getAttribute("name");const o=t.evaluate("majorFont",e),i=this.processFontElement(t,o,{});r.majorFont=i.family,i.fallbacks&&(r.majorFallbacks=i.fallbacks);const n=t.evaluate("minorFont",e),l=this.processFontElement(t,n,{});return r.minorFont=l.family,i.fallbacks&&(r.minorFallbacks=l.fallbacks),s.fonts=r,r}processFontElement(t,e,s){if(!e)return;const r=t.evaluate("latin",e);if(!r)return;const o=r.getAttribute("typeface");o&&(s.family=o);const i=r.getAttribute("panose");return i&&(s.fallbacks=[d.IFont.getPanoseFallback(i)]),s}}class ut{visit(t,e,s){if(!e)return;const r={},o=e.getAttribute("r:id");if(o){const i=t.getRef(o);typeof i=="string"&&(r.address=i)}return t.copyFromAttribute(e,"tooltip",r),t.copyFromAttribute(e,"history",r,"history",t.BOOLEAN_COPY),t.copyFromAttribute(e,"tgtFrame",r,"target"),s.hyperlink=r,r}}class ht{visit(t,e,s){if(!e)return;const r={};return t.copyFromAttribute(e,"ref",r),this.processFilterColumns(t,e,r),Object.keys(r).length>0&&(s.filter=r),r}processColorFilter(t,e){const s={type:d.IAutoFilter.Type.Color};return t.copyFromAttribute(e,"cellColor",s,"cellColor",t.BOOLEAN_COPY),t.copyFromAttribute(e,"dxfId",s,"styleId",t.INT_COPY),s}processCustomFilter(t,e){const s={};return t.copyFromAttribute(e,"operator",s,"operator",t.BOOLEAN_COPY),t.copyFromAttribute(e,"val",s,"val"),s}processCustomFilters(t,e){const s={type:d.IAutoFilter.Type.Custom};t.copyFromAttribute(e,"and",s,"and",t.BOOLEAN_COPY);const r=e.childNodes;s.filters=[];for(let o=0;o<r.length;o++){const i=r.item(o);if(i.nodeType!==1)continue;let n=null;i.localName==="customFilter"&&(n=this.processCustomFilter(t,i)),n&&s.filters.push(n)}return s}processDynamicFilter(t,e){const s={type:d.IAutoFilter.Type.Dynamic};return t.copyFromAttribute(e,"type",s,"dynamicType"),t.copyFromAttribute(e,"val",s,"val",t.INT_COPY),t.copyFromAttribute(e,"maxVal",s,"maxVal",t.INT_COPY),s}processDateGroupItem(t,e){const s={};return t.copyFromAttribute(e,"dateTimeGrouping",s,"group"),t.copyFromAttribute(e,"day",s,"day",t.INT_COPY),t.copyFromAttribute(e,"hour",s,"hour",t.INT_COPY),t.copyFromAttribute(e,"minute",s,"minute",t.INT_COPY),t.copyFromAttribute(e,"month",s,"month",t.INT_COPY),t.copyFromAttribute(e,"second",s,"second",t.INT_COPY),t.copyFromAttribute(e,"year",s,"year",t.INT_COPY),s}processFilterItem(t,e){if(e.hasAttribute("val"))return e.getAttribute("val")}processFilters(t,e){const s={type:d.IAutoFilter.Type.Items};t.copyFromAttribute(e,"blank",s,"blank",t.BOOLEAN_COPY),t.copyFromAttribute(e,"calendarType",s,"calendarType");let r=[],o=[];const i=e.childNodes;for(let n=0;n<i.length;n++){const l=i.item(n);if(l.nodeType===1){if(l.localName==="dateGroupItem"){const a=this.processDateGroupItem(t,l);a&&r.push(a)}else if(l.localName==="filter"){const a=this.processFilterItem(t,l);a!==void 0&&o.push(a)}}}return r.length>0&&(s.dateGroups=r),o.length>0&&(s.items=o),s}processIcon(t,e){const s={type:d.IAutoFilter.Type.Icon};return t.copyFromAttribute(e,"iconId",s,"iconId",t.INT_COPY),t.copyFromAttribute(e,"iconSet",s),s}processTop10(t,e){const s={type:d.IAutoFilter.Type.Top10};return t.copyFromAttribute(e,"filterVal",s,"filterVal",t.FLOAT_COPY),t.copyFromAttribute(e,"percent",s,"percent",t.BOOLEAN_COPY),t.copyFromAttribute(e,"top",s,"top",t.BOOLEAN_COPY),t.copyFromAttribute(e,"val",s,"val",t.FLOAT_COPY),s}processFilterCriteria(t,e,s){if(!e)return;const r=e.childNodes,o=[];for(let i=0;i<r.length;i++){const n=r.item(i);if(n.nodeType!==1)continue;let l=null;n.localName==="colorFilter"?l=this.processColorFilter(t,n):n.localName==="customFilters"?l=this.processCustomFilters(t,n):n.localName==="dynamicFilter"?l=this.processDynamicFilter(t,n):n.localName==="filters"?l=this.processFilters(t,n):n.localName==="iconFilter"?l=this.processIcon(t,n):n.localName==="top10"&&(l=this.processTop10(t,n)),l&&o.push(l)}return o.length>0&&(s.criteria=o),o}processFilterColumn(t,e){if(!e)return null;const s={};if(!e.hasAttribute("colId"))return;s.offset=parseInt(e.getAttribute("colId"));let r=!1;return e.hasAttribute("hiddenButton")&&(r=p.b(e.getAttribute("hiddenButton"))),r&&(s.hiddenButton=!0),e.hasAttribute("showButton")&&(s.showButton=p.b(e.getAttribute("showButton"))),this.processFilterCriteria(t,e,s),s}processFilterColumns(t,e,s){if(!e)return;const r=e.childNodes,o=[];for(let i=0;i<r.length;i++){const n=r.item(i);if(n.nodeType===1&&n.localName==="filterColumn"){const l=this.processFilterColumn(t,n);l&&o.push(l)}}return o.length>0&&(s.fields=o),o}}class pt{visit(t,e,s){if(!e)return;const r={};if(t.copyFromAttribute(e,"ref",r),e.hasAttribute("caseSensitive")){const n=p.b(e.getAttribute("caseSensitive"));r.collatorOptions=n?d.Sort.CaseSensitiveOptions:d.Sort.CaseInsensitiveOptions}const o=e.getAttribute("sortMethod");o!=null&&o!=="none"&&(o==="stroke"?r.collatorOptions={...r.collatorOptions,collation:"stroke"}:o==="pinYin"&&(r.collatorOptions={...r.collatorOptions,collation:"pinyin"})),e.hasAttribute("columnSort")&&p.b(e.getAttribute("columnSort"))&&(r.orientation=d.IRange.Orientation.Column);const i=d.AddressUtils.fastStringToRange(r.ref);return this.processSortConditions(t,e,r,i),Object.keys(r).length>0&&(s.sort=r),r}processSortCondition(t,e,s){if(!e)return null;const r={};if(e.hasAttribute("ref")){if(e.hasAttribute("ref")){const o=e.getAttribute("ref"),i=d.AddressUtils.fastStringToRange(o);r.offset=s?i.colStart-s.colStart:i.colStart}return r.reverse=!1,e.hasAttribute("descending")&&(r.reverse=p.b(e.getAttribute("descending"))),t.copyFromAttribute(e,"sortBy",r,"sortOn"),t.copyFromAttribute(e,"dxfId",r),t.copyFromAttribute(e,"iconSet",r),t.copyFromAttribute(e,"customList",r),r}console.warn("no ref for sort conditional",t.getPath())}processSortConditions(t,e,s,r){if(!e)return;const o=e.childNodes,i=[];for(let n=0;n<o.length;n++){const l=o.item(n);if(l.nodeType===1&&l.localName==="sortCondition"){const a=this.processSortCondition(t,l,r);a&&i.push(a)}}return i.length>0&&(s.fields=i),i}}class z{visit(t,e,s){}processDataBarColor(t,e,s,r,o="dk1"){if(!e)return;const i=p.d(n=>e.getAttribute(n),o);return i&&(s[r]=i),s}processFonts(t,e,s){if(!e)return;const r=e.childNodes;let o=0;for(let i=0;i<r.length;i++){const n=r.item(i);if(n.nodeType===1&&n.localName==="font"){const l={};this.processFont(t,n,l),s[o++]=l}}return s}processFont(t,e,s){t.getValAttrAsBoolean("b",e,!0)&&(s.weight=700),t.getValAttrAsBoolean("i",e,!0)&&(s.style=d.IFont.Style.Italic),t.getValAttrAsBoolean("strike",e,!0)&&(s.strike=!0);const r=t.evaluate("u",e);if(r){const n=r.getAttribute("val");s.underline=n||d.IFont.UnderlineStyle.Single}f(t,e,s,"vertAlign","verticalAlign"),s.verticalAlign==="superscript"?s.verticalAlign=d.IFont.VerticalAlignment.Super:s.verticalAlign==="subscript"&&(s.verticalAlign=d.IFont.VerticalAlignment.Sub),y(t,e,s,"sz","size");const o=t.evaluate("color",e);this.processDataBarColor(t,o,s,"fill"),s.fill||(s.fill="dk1"),f(t,e,s,"name","family"),f(t,e,s,"rFont","family");const i=t.evaluate("family",e);if(i){const n=i.getAttribute("val");if(n)switch(n){case"1":s.fallbacks=["serif"];break;case"2":s.fallbacks=["sans-serif"];break;case"3":s.fallbacks=["monospace"];break;case"4":s.fallbacks=["cursive"];break;case"5":s.fallbacks=["fantasy"]}}return f(t,e,s,"scheme","scheme"),A(t,e,s,"shadow","shadow",!0),A(t,e,s,"outline","outline",!0),t.getValAttrAsBoolean("condense",e,!0)&&(s.letterSpacing=-1),t.getValAttrAsBoolean("extend",e,!0)&&(s.letterSpacing=1),f(t,e,s,"charset","charset"),s}processFills(t,e,s){if(!e)return;const r=e.childNodes;let o=0;for(let i=0;i<r.length;i++){const n=r.item(i);n.nodeType===1&&n.localName==="fill"&&this.processFill(t,n,s,o++)}return s}processFill(t,e,s,r){const o={type:d.IFill.Type.None},i=e.childNodes;let n=!1;for(let l=0;!n&&l<i.length;l++){const a=i.item(l);a.nodeType===1&&(a.localName==="gradientFill"?(this.processGradientFill(t,a,o),n=!0):a.localName==="patternFill"&&(this.processPatternFill(t,a,o),n=!0))}return s[r]=o,s}processGradientFill(t,e,s){if(!e)return;s.type=d.IFill.Type.Gradient;const r=[];s.stops=r,s.angle=90+(e.hasAttribute("degree")?parseFloat(e.getAttribute("degree")):0);const o=e.getAttribute("type");o&&(s.gradientType=o);const i=l=>{if(!l)return 0;const a=parseFloat(l);return isNaN(a)?0:a};(e.hasAttribute("left")||e.hasAttribute("top")||e.hasAttribute("right")||e.hasAttribute("bottom"))&&(s.fillTo={left:i(e.getAttribute("left")),top:i(e.getAttribute("top")),right:i(e.getAttribute("right")),bottom:i(e.getAttribute("bottom"))});const n=e.childNodes;for(let l=0;l<n.length;l++){const a=n.item(l);if(a.nodeType===1&&a.localName==="stop"){const c={};r.push(c);const h=parseFloat(a.getAttribute("position"));c.offset=h;const g=t.evaluate("color",a);this.processDataBarColor(t,g,c,"color")}}return s}processPatternFill(t,e,s){if(!e)return;const r=t.getVisitorParamsState().get("processingDXFs"),o=e.getAttribute("patternType")||(r?d.IFill.BuiltInSheetPattern.Solid:d.IFill.BuiltInSheetPattern.None);if(o===d.IFill.BuiltInSheetPattern.None)return{none:!0};s.type=d.IFill.Type.Pattern,o&&(s.patternType=o);let i,n="foreground",l="background";const a=s.patternType===d.IFill.BuiltInSheetPattern.Solid&&r;if(a){i="lt1";const g=n;n=l,l=g}const c=t.evaluate("fgColor",e);this.processDataBarColor(t,c,s,n,i);const h=t.evaluate("bgColor",e);return this.processDataBarColor(t,h,s,l,i),a&&!s.foreground&&(s.foreground=i),s}processBorders(t,e,s,r){if(!e)return;const o=e.childNodes;let i=0;for(let n=0;n<o.length;n++){const l=o.item(n);l.nodeType===1&&l.localName==="border"&&this.processBorder(t,l,s,i++,r)}return s}processBorder(t,e,s,r,o){if(!e)return;const i={};return this.processBorderStroke(t,e,i,d.IBorder.Edge.Left),this.processBorderStroke(t,e,i,d.IBorder.Edge.Right),o?(i.right||i.left)&&(i.right?i.vertical={...i.right}:i.vertical={...i.left}):this.processBorderStroke(t,e,i,d.IBorder.Edge.Vertical),this.processBorderStroke(t,e,i,d.IBorder.Edge.Top),this.processBorderStroke(t,e,i,d.IBorder.Edge.Bottom),o?(i.bottom||i.top)&&(i.right?i.horizontal={...i.bottom}:i.horizontal={...i.top}):this.processBorderStroke(t,e,i,d.IBorder.Edge.Horizontal),s[r]=i,s}processBorderStroke(t,e,s,r){if(!e)return;const o=t.evaluate(r,e);if(!o)return;const i={};o.hasAttribute("style")&&(i.style=o.getAttribute("style"));const n=t.evaluate("color",o);return n&&this.processDataBarColor(t,n,i,"color"),Object.keys(i).length>0?s[r]=i:null}}class gt extends z{visit(t,e,s){this.processNumFmts(t,t.evaluate("numFmts",e),null),t.getVisitorParamsState().set("colorsToProcess",new Set);const r={fills:{},fonts:{},borders:{}};this.processFonts(t,t.evaluate("fonts",e),r.fonts),this.processFills(t,t.evaluate("fills",e),r.fills),this.processBorders(t,t.evaluate("borders",e),r.borders,!0),r.fills[0]={type:d.IFill.Type.None},r.fills[1]={type:d.IFill.Type.Pattern,patternType:d.IFill.BuiltInSheetPattern.Gray125},r.borders[0]={};const o=[];this.processXFs(t,t.evaluate("cellStyleXfs",e),o,r,null,!1);const i=new Map;if(o.length>0){const a=[];this.processCellStyles(t,t.evaluate("cellStyles",e),a,o,i),s.named=a}const n=[];this.processXFs(t,t.evaluate("cellXfs",e),n,r,i),Object.keys(n).length>0&&(s.direct=n);const l=[];return this.processDXFs(t,t.evaluate("dxfs",e),l),this.processTableStyles(t,t.evaluate("tableStyles",e),s,l),this.processIndexColors(t,t.evaluate("colors/indexedColors",e),s),this.processMruColors(t,t.evaluate("colors/mruColors",e),s),s}processIndexColors(t,e,s){if(!e)return;const r=[],o=e.childNodes;for(let i=0;i<o.length;i++){const n=o.item(i);if(n.nodeType===1&&n.localName==="rgbColor"){const l={color:null};this.processDataBarColor(t,n,l,"color"),l.color&&r.push(l.color)}}s.indexedColors=r}processMruColors(t,e,s){if(!e)return;const r=[],o=e.childNodes;for(let i=0;i<o.length;i++){const n=o.item(i);if(n.nodeType===1&&n.localName==="color"){const l={color:null};this.processDataBarColor(t,n,l,"color"),l.color&&r.push(l.color)}}r.length>0&&(s.mruColors=r)}processNumFmts(t,e,s){if(!e)return;const r=new Map;if(t.getVisitorParamsState().set("numFmts",r),!e)return;const o=e.childNodes;for(let i=0;i<o.length;i++){const n=o.item(i);if(n.nodeType===1&&n.localName==="numFmt"){const l=n.getAttribute("numFmtId"),a=n.getAttribute("formatCode");if(l&&a){const c=a.replace(/\\(.)/g,"$1");r.set(parseInt(l),c)}}}}processXFs(t,e,s,r,o=null,i=!0){if(!e)return;const n=e.childNodes;for(let l=0;l<n.length;l++){const a=n.item(l);if(a.nodeType===1&&a.localName==="xf"){const c={};this.processXF(t,a,c,r,o,i),s.push(c)}}}processXF(t,e,s,r,o,i){if(!e)return;const n=e.getAttribute("xfId");if(n&&o){const c=o.get(parseInt(n));c&&c!==d.IStyle.BuiltInName.Normal&&(s.named=c)}const l=c=>!(!i&&e.hasAttribute(c))||p.b(e.getAttribute("applyFont"));if(l("applyFont")){const c=r.fonts[e.getAttribute("fontId")];c&&(s.font=c)}if(l("applyFill")){const c=r.fills[e.getAttribute("fillId")];c&&Object.keys(c).length>0&&(s.fill=c)}if(l("applyBorder")){const c=r.borders[e.getAttribute("borderId")];c&&Object.keys(c).length>0&&(s.border=c)}if(l("applyNumberFormat")){const c=e.getAttribute("numFmtId");if(c){const h=parseInt(c);let g;const m=t.getVisitorParamsState();if(m){const b=m.get("numFmts");b&&(g=b.get(h)),s.numberFormat=g??h}else console.warn("no visitor params state")}}l("applyAlignment")&&this.processAlignment(t,t.evaluate("alignment",e),s),l("applyProtection")&&this.processProtection(t,t.evaluate("protection",e),s);const a=p.b(e.getAttribute("quotePrefix"));a&&(s.quotePrefix=a)}processAlignment(t,e,s){const r={};if(e?.hasAttribute("horizontal")?r.horizontal=e.getAttribute("horizontal"):r.horizontal=d.ITextFrame.HorizontalAlignment.General,e?.hasAttribute("vertical")?r.vertical=e.getAttribute("vertical"):r.vertical=d.ITextFrame.VerticalAlignment.Bottom,e?.hasAttribute("indent")?r.indent=parseInt(e.getAttribute("indent")):r.indent=0,e?.hasAttribute("relativeIndent")?r.relativeIndent=parseInt(e.getAttribute("relativeIndent")):r.relativeIndent=0,p.b(e?.getAttribute("wrapText"))?r.overflow=d.ITextFrame.Overflow.Wrap:r.overflow=d.ITextFrame.Overflow.Visible,p.b(e?.getAttribute("shrinkToFit"))&&(r.overflow=d.ITextFrame.Overflow.Shrink),e?.hasAttribute("textRotation")){let i=parseFloat(e.getAttribute("textRotation"));i>0&&i<=90?i=360-i:i>90&&i<=180?i-=90:i===255&&(i=0,r.stacked=!0),r.rotation=i}else r.rotation=0;e?.hasAttribute("justifyLastLine")&&(r.justifyLastLine=p.b(e.getAttribute("justifyLastLine")));const o=e?.getAttribute("readingOrder");return o&&(o==="0"?r.readingDirection=d.ITextFrame.ReadingDirection.Auto:o==="1"?r.readingDirection=d.ITextFrame.ReadingDirection.LeftToRight:o==="2"?r.readingDirection=d.ITextFrame.ReadingDirection.RightToLeft:console.warn(`invalid readingOrder: ${o}`)),Object.keys(r).length>0&&(s.alignment=r),s}processProtection(t,e,s){if(!e)return;const r={},o=e.getAttribute("locked");o&&!p.b(o)&&(r.edit=!0);const i=e.getAttribute("hidden");return i&&p.b(i)&&(r.formulaHidden=!0),Object.keys(r).length>0&&(s.protection=r),s}processDXF(t,e,s){if(!e)return;const r=e.childNodes;for(let o=0;o<r.length;o++){const i=r.item(o);if(i.nodeType===1&&i.localName==="font"){const n={};this.processFont(t,i,n),s.font=n}else if(i.nodeType===1&&i.localName==="fill"){const n=[];this.processFill(t,i,n,0),n.length>0&&n[0]&&(s.fill=n[0])}else if(i.nodeType===1&&i.localName==="border"){const n=[];this.processBorder(t,i,n,0,!1),n.length>0&&n[0]&&(s.border=n[0])}}}processDXFs(t,e,s){if(!e)return;t.getVisitorParamsState().set("processingDXFs",!0);const r=new Map;t.getVisitorParamsState().set("dxfs",r);const o=e.childNodes;for(let i=0;i<o.length;i++){const n=o.item(i);if(n.nodeType===1&&n.localName==="dxf"){const l={};this.processDXF(t,n,l);const a=s.length;r.set(a,l),s.push(l)}}t.getVisitorParamsState().delete("processingDXFs")}processTableStyle(t,e,s,r,o=!1){const i=e.getAttribute("name"),n={name:i};e.hasAttribute("table")&&(n.table=p.b(e.getAttribute("table"))),e.hasAttribute("pivot")&&(n.pivot=p.b(e.getAttribute("pivot"))),o&&!n.pivot&&r.unshift(null);const l=e.childNodes;for(let a=0;a<l.length;a++){const c=l.item(a);if(c.nodeType===1&&c.localName==="tableStyleElement"){const h=c.getAttribute("type"),g=c.getAttribute("dxfId");let m=r?.[g];m||(console.warn("invalid dfx id",g),m={}),n[h]=m;let b=null;c.hasAttribute("size")&&(b=parseInt(c.getAttribute("size"))),b&&!isNaN(b)&&(m.size=b)}}delete n.name,s[i]=n}processTableStyles(t,e,s,r,o){if(!e)return;const i={},n=e.getAttribute("defaultTableStyle");n&&(i.defaultTableStyle=n);const l=e.getAttribute("defaultPivotStyle");l&&(i.defaultPivotStyle=l);const a=e.childNodes,c={};for(let h=0;h<a.length;h++){const g=a.item(h);g.nodeType===1&&g.localName==="tableStyle"&&this.processTableStyle(t,g,c,r,o)}return Object.keys(c).length>0&&(i.styles=c),Object.keys(i).length>0&&(s.tables=i),s}processCellStyles(t,e,s,r,o){if(!e)return;const i=e.childNodes;for(let n=0;n<i.length;n++){const l=i.item(n);if(l.nodeType===1&&l.localName==="cellStyle"){const a=parseInt(l.getAttribute("xfId")),c=l.getAttribute("name");if(o.set(a,c),!r[a])continue;const h={name:c,style:r[a]};l.getAttribute("hidden")&&(h.hidden=p.b(l.getAttribute("hidden"))),l.getAttribute("iLevel")&&(h.iLevel=parseInt(l.getAttribute("iLevel"))),s.push(h)}}}afterVisit(t,e,s){}}class dt extends z{visit(t,e,s){return this.processSheetRefs(t,t.evaluate("sheets",e),s),this.processBookViews(t,t.evaluate("bookViews",e),s),this.processDefinedNames(t,t.evaluate("definedNames",e),s),this.processCalcPr(t,t.evaluate("calcPr",e),s),this.processWorkbookProtection(t,t.evaluate("workbookProtection",e),s),this.processWorkbookPr(t,t.evaluate("workbookPr",e),s),s}processPassword(t,e,s,r="password"){if(!e)return;const o={};t.copyFromAttribute(e,"algorithmName",o,"algorithmName"),t.copyFromAttribute(e,"hashValue",o,"hashValue"),t.copyFromAttribute(e,"saltValue",o,"saltValue",t.BOOLEAN_COPY),t.copyFromAttribute(e,"spinCount",o,"spinCount",t.INT_COPY),Object.keys(o).length>0&&(s[r]=o)}processWorkbookProtection(t,e,s){if(!e)return;const r={};this.processPassword(t,t.evaluate("workbookPassword",e),r),this.processPassword(t,t.evaluate("revisionsPassword",e),r,"revisionsPassword");const o=i=>i!==!0&&i!=="1"&&i!=="on"&&i!=="true"&&(i===!1||i==="0"||i==="off"||i==="false"||null);return t.copyFromAttribute(e,"lockStructure",r,"structure",o),t.copyFromAttribute(e,"lockWindows",r,"windows",o),t.copyFromAttribute(e,"lockRevision",r,"revision",o),s.protection=r,s}processCalcPr(t,e,s){e&&(s.calc={})}processSheetRefs(t,e,s){if(!e)return;const r=[],o=e.childNodes;for(let i=0;i<o.length;i++){const n=o.item(i);n.nodeType===1&&n.localName==="sheet"&&this.processSheetRef(t,n,r)}s.sheets=r}processSheetRef(t,e,s){const r={};t.copyFromAttribute(e,"name",r,"name"),t.copyFromAttribute(e,"state",r,"visibility");const o=e.getAttribute("r:id"),i=t.getRef(o);i&&(r.sheet=i),s.push(r)}processBookViews(t,e,s){if(!e)return;const r=e.childNodes;let o=0;for(let i=0;o<1&&i<e.childNodes.length;i++){const n=r.item(i);n.nodeType===1&&n.localName==="workbookView"&&(this.processWorkbookView(t,n,s),o++)}}processWorkbookView(t,e,s){if(!e)return;const r={};t.copyFromAttribute(e,"activeTab",r,"activeSheetId",[t.INT_COPY,o=>o+1]),e.hasAttribute("activeTab")||(r.activeSheetId=1),t.copyFromAttribute(e,"showHorizontalScroll",r,"showHorizontalScrollbar",t.BOOLEAN_COPY),t.copyFromAttribute(e,"showVerticalScroll",r,"showVerticalScrollbar",t.BOOLEAN_COPY),t.copyFromAttribute(e,"showSheetTabs",r,"showTabs",t.BOOLEAN_COPY),t.copyFromAttribute(e,"tabRatio",r,"tabRatio",[t.FLOAT_COPY,o=>o]),Object.keys(r).length>0&&(s.view=r)}processDefineName(t,e,s,r){if(!e)return;const o={},i=e.firstChild;if(i&&i.nodeType===3&&(o.ref=i.textContent),t.copyFromAttribute(e,"name",o),t.copyFromAttribute(e,"comment",o),t.copyFromAttribute(e,"hidden",o,"hidden",t.BOOLEAN_COPY),e.hasAttribute("localSheetId")){const n=e.getAttribute("localSheetId");if(!r[n]?.name)return void console.warn(`Defined name '${e.getAttribute("name")}' references a sheet with localSheetId '${n}' which does not exist.`);o.scope=r[n].name}t.copyFromAttribute(e,"customMenu",o),t.copyFromAttribute(e,"description",o),t.copyFromAttribute(e,"statusBar",o),t.copyFromAttribute(e,"help",o),t.copyFromAttribute(e,"shortcutKey",o),t.copyFromAttribute(e,"function",o,"function",t.BOOLEAN_COPY),t.copyFromAttribute(e,"functionGroupId",o,"functionGroupId",t.INT_COPY),t.copyFromAttribute(e,"publishToServer",o,"publishToServer",t.BOOLEAN_COPY),t.copyFromAttribute(e,"vbProcedure",o,"vbProcedure",t.BOOLEAN_COPY),t.copyFromAttribute(e,"xlm",o,"xlm",t.BOOLEAN_COPY),Object.keys(o).length>0&&s.push(o)}processDefinedNames(t,e,s){if(!e)return;const r=[],o=e.childNodes;for(let i=0;i<o.length;i++){const n=o.item(i);n.nodeType===1&&n.localName==="definedName"&&this.processDefineName(t,n,r,s.sheets)}r.length>0&&(s.names=r)}processWorkbookPr(t,e,s){e&&t.copyFromAttribute(e,"date1904",s,"date1904",t.BOOLEAN_COPY)}afterVisit(t,e,s){}}class mt{visit(t,e,s){return t.copyFromAttribute(e,"name",s),t.copyFromAttribute(e,"displayName",s),t.copyFromAttribute(e,"ref",s),t.copyFromAttribute(e,"headerRowCount",s,"headerRowCount",t.INT_COPY),t.copyFromAttribute(e,"totalsRowCount",s,"totalsRowCount",t.INT_COPY),this.processTableColumns(t,e,s),this.processTableStyleInfo(t,e,s),s}processTableStyleInfo(t,e,s){if(!e)return;const r=e.childNodes,o={};for(let i=0;i<r.length;i++){const n=r.item(i);n.nodeType===1&&n.localName==="tableStyleInfo"&&(t.copyFromAttribute(n,"name",o),t.copyFromAttribute(n,"showColumnStripes",o,"showColumnStripes",t.BOOLEAN_COPY),t.copyFromAttribute(n,"showFirstColumn",o,"showFirstColumn",t.BOOLEAN_COPY),t.copyFromAttribute(n,"showLastColumn",o,"showLastColumn",t.BOOLEAN_COPY),t.copyFromAttribute(n,"showRowStripes",o,"showRowStripes",t.BOOLEAN_COPY))}Object.keys(o).length>0&&(s.styleOptions=o)}processTableColumn(t,e,s){if(!e)return null;const r=e.childNodes;for(let o=0;o<r.length;o++){const i=r.item(o);if(i.nodeType===1&&i.localName==="tableColumn"){const n={};t.copyFromAttribute(i,"name",n),t.copyFromAttribute(i,"uniqueName",n),s.push(n)}}return s}processTableColumns(t,e,s){const r=e.childNodes,o=[];for(let i=0;i<r.length;i++){const n=r.item(i);n.nodeType===1&&n.localName==="tableColumns"&&this.processTableColumn(t,n,o)}o.length>0&&(s.columns=o)}}class bt{visit(t,e,s){return s}}class k{visit(t,e,s){if(!e)return;const r={};return t.copyFromAttribute(e,"editAs",r,"anchorType"),r.anchor={},this.processOffsetCoord(t,t.evaluate("from",e),r.anchor,"from"),this.processOffsetCoord(t,t.evaluate("to",e),r.anchor,"to"),s.movables||(s.movables=[]),s.movables.push(r),r}processOffsetCoord(t,e,s,r){if(!e)return;const o={c:0,r:0,x:0,y:0};return t.evaluate("col",e)&&(o.c=parseInt(t.evaluate("col",e).textContent)),t.evaluate("row",e)&&(o.r=parseInt(t.evaluate("row",e).textContent)),t.evaluate("colOff",e)&&(o.x=p.c(t.evaluate("colOff",e).textContent)),t.evaluate("rowOff",e)&&(o.y=p.c(t.evaluate("rowOff",e).textContent)),r==="from"?s.tl=o:s.br=o,s}}class B{visit(t,e,s){if(!e)return;const r=t.evaluate("*/cNvPr",e);return r&&(t.copyFromAttribute(r,"name",s),t.copyFromAttribute(r,"desc",s),t.copyFromAttribute(r,"hidden",s,"hidden",t.BOOLEAN_COPY),t.copyFromAttribute(r,"id",s)),s}}class At extends B{visit(t,e,s){if(!e)return;s=super.visit(t,e,s);const r=t.evaluate("nvGraphicFramePr/cNvGraphicFramePr",e);if(r){const n=t.evaluate("graphicFrameLocks",r);if(n){n.hasAttribute("noChangeAspect")&&(s.lockAspect=n.getAttribute("noChangeAspect")==="1");const l={};Object.keys(l).length>0&&(s.locks=l)}}let o={type:"graphicFrame",json:{}};const i=t.evaluate("graphic/graphicData",e).childNodes;for(let n=0;n<i.length;n++){const l=i.item(n);if(l.nodeType===1)try{let a=l.localName;a==="chart"&&(a="chart"),o.type=a;const c=l.getAttribute("r:id");c&&(o.json=t.getRef(c))}catch(a){console.warn("Unable to parse graphicFrame",a)}}return o&&(s.content=o),o}}class _ extends B{visit(t,e,s){if(!e)return;s=super.visit(t,e,s);const r=t.evaluate("nvSpPr/cNvSpPr",e);if(r){const i=t.evaluate("spLocks",r);if(i){i.hasAttribute("noChangeAspect")&&(s.lockAspect=i.getAttribute("noChangeAspect")==="1");const n={};Object.keys(n).length>0&&(s.locks=n)}}t.warn(`Unable to import '${s.name}', shapes are not supported.`);const o={};return s.content={type:"sp",json:o},o}}class ft extends B{visit(t,e,s){if(!e)return;const r=super.visit(t,e,s),o=t.evaluate("nvPicPr/cNvPicPr",e);if(o){t.copyFromAttribute(e,"preferRelativeResize",r,"preferRelativeResize",t.BOOLEAN_COPY);const a=t.evaluate("picLocks",o);if(a){a.hasAttribute("noChangeAspect")&&(r.lockAspect=a.getAttribute("noChangeAspect")==="1");const c={};t.copyFromAttribute(a,"noChangeArrowheads",r,"noChangeArrowheads",t.BOOLEAN_COPY),t.copyFromAttribute(a,"noChangeShapeType",r,"noChangeShapeType",t.BOOLEAN_COPY),t.copyFromAttribute(a,"noEditPoints",r,"noEditPoints",t.BOOLEAN_COPY),t.copyFromAttribute(a,"noAdjustHandles",r,"noAdjustHandles",t.BOOLEAN_COPY),t.copyFromAttribute(a,"noCrop",r,"noCrop",t.BOOLEAN_COPY),t.copyFromAttribute(a,"noGrp",r,"noGrp",t.BOOLEAN_COPY),t.copyFromAttribute(a,"noMove",r,"noMove",t.BOOLEAN_COPY),t.copyFromAttribute(a,"noResize",r,"noResize",t.BOOLEAN_COPY),t.copyFromAttribute(a,"noRot",r,"noRot",t.BOOLEAN_COPY),t.copyFromAttribute(a,"noSelect",r,"noSelect",t.BOOLEAN_COPY),Object.keys(c).length>0&&(r.locks=c)}}const i=t.evaluate("blipFill/blip",e);let n;if(i){const a=i.getAttribute("r:embed")??i.getAttribute("embed");if(!a)return void console.warn("no rId found for blip",i);n=t.getRef(a,!0)}const l={resId:n};return s.content={type:"picture",json:l},r}}class yt extends _{visit(t,e,s){if(!e)return;s=super.visit(t,e,s);const r=t.evaluate("nvGrpSpPr/cNvGrpSpPr",e);if(r){const i=t.evaluate("grpSpLocks",r);if(i){i.hasAttribute("noChangeAspect")&&(s.lockAspect=i.getAttribute("noChangeAspect")==="1");const n={};Object.keys(n).length>0&&(s.locks=n)}}t.warn(`Unable to import '${s.name}', group shapes are not supported.`);const o={};return s.content={type:"grpSp",json:o},o}}class vt extends _{visit(t,e,s){if(!e)return;s=super.visit(t,e,s);const r=t.evaluate("nvCxnSpPr/cNvCxnSpPr",e);if(r){const i=t.evaluate("cxnSpLocks",r);if(i){i.hasAttribute("noChangeAspect")&&(s.lockAspect=i.getAttribute("noChangeAspect")==="1");const n={};Object.keys(n).length>0&&(s.locks=n)}}t.warn(`Unable to import '${s.name}', connection shapes are not supported.`);const o={};return s.content={type:"cxnSp",json:o},o}}const R="richTypes";class Ft{visit(t,e,s){let r=t.getVisitorParamsState().get(R);r||(r=[],t.getVisitorParamsState().set(R,r));const o=e.childNodes,i=o.length;for(let n=0;n<i;n++){const l=o.item(n);if(l.nodeType===1&&l.localName==="s"){const a={type:l.getAttribute("t")??"n",keys:[]};this.processKeys(t,l,a),r.push(a)}}return s.richTypes=r,r}processKeys(t,e,s){const r=e.childNodes,o=r.length,i=s.keys;for(let n=0;n<o;n++){const l=r.item(n);if(l.nodeType===1&&l.localName==="k"){const a=l.getAttribute("n"),c=l.getAttribute("t");i.push([a,c])}}}}const E="richData";class Ct{visit(t,e,s){let r=t.getVisitorParamsState().get("richTypes");if(!r)return void t.warn("RichValueFound but not type.");let o=t.getVisitorParamsState().get(E);o||(o=[],t.getVisitorParamsState().set(E,o));const i=e.childNodes,n=i.length;for(let l=0;l<n;l++){const a=i.item(l);if(a.nodeType===1&&a.localName==="rv"){const c=r[a.getAttribute("s")],h={type:c.type};this.processValues(t,a,h,c);const g=this.mapType(t,h);o.push(g)}}return s.richData=o,o}mapType(t,e){if(e.type==="_error"){const s=e.errorType;if(s)try{e=d.FormulaError.getBuiltInById(s+1)}catch{}}return e}processValues(t,e,s,r){const o=e.childNodes,i=o.length;r.type;const n=r.keys;for(let l=0;l<i;l++){const a=o.item(l);if(a.nodeType===1&&a.localName==="v"){const c=n[l];if(!c)return void t.warn("Invalid richData");const h=c[0],g=c[1];let m=a.textContent;g==="i"&&(m=Number(m)),s[h]=m}}}}class wt{visit(t,e,s){if(!e)return;const r=[];return this.processAuthors(t,t.evaluate("authors",e),r),r.length>0&&(s.authors=r),s.comments=[],s}processAuthors(t,e,s){if(!e)return;const r=e.childNodes;for(let o=0;o<r.length;o++){const i=r.item(o);if(i.nodeType===1&&i.localName==="author"){const n=i.firstChild;n&&n.nodeType===3&&s.push(n.textContent)}}}}class Pt{visit(t,e,s){if(!e)return;const r={};return t.copyFromAttribute(e,"ref",r),t.copyFromAttribute(e,"authorId",r,"authorId",t.INT_COPY),r.asNote=!0,s.comments||(s.comments=[]),s.comments.push(r),r}}class Nt{visit(t,e,s){if(!e)return;const r=[];return s.comments=r,r}}class Ot{visit(t,e,s){if(!e)return;const r={};return t.copyFromAttribute(e,"id",r,"id",p.r),t.copyFromAttribute(e,"personId",r,"personId",p.r),t.copyFromAttribute(e,"ref",r),t.copyFromAttribute(e,"parentId",r,"parentId",p.r),t.copyFromAttribute(e,"dT",r),e.hasAttribute("done")&&(r.done=p.b(e.getAttribute("done"))),s.push(r),r}}class Tt{visit(t,e,s){const r=[],o=e.childNodes;for(let i=0;i<o.length;i++){const n=o.item(i);if(n.nodeType===1&&n.localName==="person"){const l={};t.copyFromAttribute(n,"id",l,"id",p.r),t.copyFromAttribute(n,"displayName",l),t.copyFromAttribute(n,"userId",l,"userId",p.r),t.copyFromAttribute(n,"providerId",l),r.push(l)}}return r.length>0&&(s.persons=r),r}}const St={};class Vt{constructor(t,e){this.path=t,this.visitor=e}}class Y{constructor(){this.visitorsByXmlTagName=new Map,this.scopedVisitorsByXmlTagName=new Map,this.visitorParamsState=null,this.registerVisitor("Relationships",new H),this.registerVisitor("spPr",new L),this.registerVisitor("txBody",new F),this.registerVisitor("txPr",new F),this.registerVisitor("c:chartSpace",new q),this.registerVisitor("c:chartSpace",new J,"chart"),this.registerVisitor("c:plotArea",new Q),this.registerVisitor("c:barChart",new Z),this.registerVisitor("c:doughnutChart",new N),this.registerVisitor("c:lineChart",new N),this.registerVisitor("c:ofPieType",new N),this.registerVisitor("c:pieChart",new N),this.registerVisitor("c:scatterChart",new N),this.registerVisitor("c:barChart",new w("dataLabels"),"dLbls"),this.registerVisitor("c:doughnutChart",new w("dataLabels"),"dLbls"),this.registerVisitor("c:lineChart",new w("dataLabels"),"dLbls"),this.registerVisitor("c:ofPieType",new w("dataLabels"),"dLbls"),this.registerVisitor("c:pieChart",new w("dataLabels"),"dLbls"),this.registerVisitor("c:scatterChart",new w("dataLabels"),"dLbls"),this.registerVisitor("c:ser",new tt),this.registerVisitor("c:dPt",new et),this.registerVisitor("c:marker",new rt),this.registerVisitor("c:catAx",new x),this.registerVisitor("c:valAx",new x),this.registerVisitor("c:dateAx",new x),this.registerVisitor("c:majorGridlines",new V("gridLinesMajor")),this.registerVisitor("c:minorGridlines",new V("gridLinesMinor")),this.registerVisitor("c:chartSpace",null,"txPr"),this.registerVisitor("c:catAx",new F("labels.text"),"txPr"),this.registerVisitor("c:valAx",new F("labels.text"),"txPr"),this.registerVisitor("c:dateAx",new F("labels.text"),"txPr"),this.registerVisitor("c:legend",new ot),this.registerVisitor("c:legend",new F("labels.text"),"txPr"),this.registerVisitor("c:legendEntry",new st),this.registerVisitor("c:ser",new it,"extLst/ext/invertSolidFillFmt/spPr"),this.registerVisitor("c:ser",new w("labels"),"dLbls"),this.registerVisitor("c:dLbl",new w("points")),this.registerVisitor("c:title",new j),this.registerVisitor("c:title",null,"tx/rich"),this.registerVisitor("c:title",null,"txPr"),this.registerVisitor("c:layout",new nt),this.registerVisitor("c:dispUnits",new V("dispUnits")),this.registerVisitor("c:dispUnitsLbl",new j("displayUnitsLabel")),this.registerVisitor("c:dispUnitsLbl",new F,"tx/rich"),this.registerVisitor("a:theme",new lt),this.registerVisitor("a:theme",new at,"themeElements/clrScheme"),this.registerVisitor("a:theme",new ct,"themeElements/fontScheme"),this.registerVisitor("autoFilter",new ht),this.registerVisitor("sortState",new pt),this.registerVisitor("s:workbook",new dt),this.registerVisitor("styleSheet",new gt),this.registerVisitor("table",new mt),this.registerVisitor("hlinkClick",new ut),this.registerVisitor("wsDr",new bt),this.registerVisitor("twoCellAnchor",new k),this.registerVisitor("oneCellAnchor",new k),this.registerVisitor("absoluteAnchor",new k),this.registerVisitor("graphicFrame",new At),this.registerVisitor("sp",new _),this.registerVisitor("grpSp",new yt),this.registerVisitor("cxnSp",new vt),this.registerVisitor("pic",new ft),this.registerVisitor("rvStructures",new Ft),this.registerVisitor("rvData",new Ct),this.registerVisitor("comments",new wt),this.registerVisitor("commentList",new Pt,"comment"),this.registerVisitor("comment",new F("content"),"text"),this.registerVisitor("ThreadedComments",new Nt),this.registerVisitor("threadedComment",new Ot),this.registerVisitor("threadedComment",new F("content"),"text"),this.registerVisitor("personList",new Tt)}registerVisitor(t,e,s=null){t.indexOf(":")===-1&&(t="*:"+t);const r=t.split(":"),o=r.length>1?r[1]:r[0];if(!s)return this.visitorsByXmlTagName.set(o,e),void this.visitorsByXmlTagName.set(t,e);let i=this.scopedVisitorsByXmlTagName.get(o);i||(i=[],this.scopedVisitorsByXmlTagName.set(o,i),this.scopedVisitorsByXmlTagName.set(t,i)),i.push(new Vt(s,e))}getVisitorParamsState(){return this.visitorParamsState}convert(t,e,s=St){const r=t.documentElement;this.visitorParamsState&&!s?.paramMap||(this.visitorParamsState=s?.paramMap??new Map);const o={};let i=this.visitorsByXmlTagName.get(r.nodeName);if(i||(i=this.visitorsByXmlTagName.get(r.localName)),!i)throw new Error(`A visitor for the root element: '${r.nodeName}' or '${r.localName}' must be registered.`);const n="/"+r.localName,l=new S(null,this,n,r,o,e,s),a=[];this._doWalk(i,l,a,r,o,e,s);for(let c=0;c<a.length;c++){const h=a[c];try{h.visitor?.afterVisit?.(h.context,h.elemParent,h.jsonParent)}catch(g){console.warn(`Error in afterVisit: ${h.context.getPath()}`,g)}}return o}_walkScoped(t,e,s,r,o,i,n){const l=this.scopedVisitorsByXmlTagName.get(t);for(let a=0;l&&a<l.length;a++){const c=l[a];let h=null;try{h=e.evaluate(c.path,r)}catch{console.warn(`"Invalid path '${c.path}' for '${t}'.`)}if(!h)continue;const g=m=>{let b=m.localName,v=m.parentNode;for(;v&&v!==r;)b=v.localName+"/"+b,v=v.parentNode;const P=e.getPath()+"/"+b;if(c.visitor){const T=new S(e,this,P,e.getElemRoot(),e.getJsonRoot(),i,n);this._doWalk(c.visitor,T,s,m,o,i,n)}};if(h.length>0){const m=h;for(let b=0;b<m.length;b++)g(m.item(b))}else g(h)}}_doWalk(t,e,s,r,o,i,n){let l=null;t&&(s.push({visitor:t,context:e,elemParent:r,jsonParent:o}),l=t.visit(e,r,o)),l||(l=o);const a=r.localName;this._walkScoped(a,e,s,r,l,i,n);const c=r.childNodes;for(let h=0;h<c.length;h++){const g=c.item(h);if(g.nodeType===1){const m=g,b=m.localName,v=this.visitorsByXmlTagName.get(b),P=e.getPath()+"/"+b,T=new S(e,this,P,e.getElemRoot(),e.getJsonRoot(),i,n);this._doWalk(v,T,s,m,l??o,i,n)}}return l}}exports.FromOOXMLConverter=Y,exports.default=Y;
@@ -1,5 +1,5 @@
1
1
  "use strict";/**
2
- * @license @sheetxl/studio-vanilla - SheetXL Studio - Vanilla entry point for integrating SheetXL UI. - v0.3.8
2
+ * @license @sheetxl/studio-vanilla - SheetXL Studio - Vanilla entry point for integrating SheetXL UI. - v0.3.10
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.