@sheetxl/studio-vanilla 0.4.9 → 0.4.11

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 (133) hide show
  1. package/README.md +1 -1
  2. package/browser/cjs/B0rdyyttE2Aibsag.cjs +7 -0
  3. package/browser/cjs/B2e7dDI-zKoqXpIW.cjs +107 -0
  4. package/browser/cjs/BAyEOOtO-9sHQQRW.cjs +7 -0
  5. package/browser/cjs/BPTHTRDvNOVkUJGa.cjs +7 -0
  6. package/browser/cjs/BlSFY6zLlebuejdV.cjs +7 -0
  7. package/browser/cjs/BplA5pDzOJpfTZuA.cjs +7 -0
  8. package/browser/cjs/BshvMtUxTJHj3JQN.cjs +7 -0
  9. package/browser/cjs/BuWtGFX0HiBezGjw.cjs +7 -0
  10. package/browser/cjs/C5FXOMLhAu_KTjVe.cjs +7 -0
  11. package/browser/cjs/C7EZCTczsC-gkRcq.cjs +7 -0
  12. package/browser/cjs/CFcjX5-nVsgzdZ4F.cjs +7 -0
  13. package/browser/cjs/CjZbhk41S1qO_74G.cjs +7 -0
  14. package/browser/cjs/CuTW2Pt-L5n-hNxV.cjs +7 -0
  15. package/browser/cjs/D3iOk-Q2tRdUeTcn.cjs +7 -0
  16. package/browser/cjs/DFspSkki779xN-Ey.cjs +7 -0
  17. package/browser/cjs/DFtyXc7YFh9dIp74.cjs +7 -0
  18. package/browser/cjs/Db_Ew1r6yOMYylvA.cjs +7 -0
  19. package/browser/cjs/DgBn3aW39yjgm0X_.cjs +7 -0
  20. package/browser/cjs/DiBy6-IxLscyMW2y.cjs +7 -0
  21. package/browser/cjs/DrlS1oz9Nea8Pm3j.cjs +7 -0
  22. package/browser/cjs/Dx-jp_LJxWbAScyA.cjs +7 -0
  23. package/browser/cjs/SzxJv7OUs5ojl8gx.cjs +7 -0
  24. package/browser/cjs/T4SHYo66xDT3l9JN.cjs +7 -0
  25. package/browser/cjs/index.cjs +4 -3
  26. package/browser/cjs/vfUix5Di0Ro8tEID.cjs +7 -0
  27. package/browser/esm/B5kkStdEkTczERyM.mjs +7 -0
  28. package/browser/esm/B905wKzTtod-jbsD.mjs +7 -0
  29. package/browser/esm/BALnKy2Fp7fyk-lc.mjs +7 -0
  30. package/browser/esm/BDVJ7eOPpW5FnEAP.mjs +7 -0
  31. package/browser/esm/BGpv6Kq7eBlJy43T.mjs +7 -0
  32. package/browser/esm/BUSR_OK5Qi6hRPfw.mjs +7 -0
  33. package/browser/esm/BXUGsC1Mo3FP8vnW.mjs +7 -0
  34. package/browser/esm/BlGoi1_x9rUMpWMd.mjs +7 -0
  35. package/browser/esm/Bo_ZPRrOQrqOVHAF.mjs +7 -0
  36. package/browser/esm/BuURCm92KsyGHG9e.mjs +7 -0
  37. package/browser/esm/CFFC0SNc24a0Dxnh.mjs +7 -0
  38. package/browser/esm/CGZ5MX7afzMxDkCe.mjs +7 -0
  39. package/browser/esm/Cc_VWd0wF5-39LsI.mjs +7 -0
  40. package/browser/esm/Cq8D_M0jeHLcnRjg.mjs +7 -0
  41. package/browser/esm/CzmNwV9tfFYUp_gS.mjs +7 -0
  42. package/browser/esm/De6RPxc4p_jXLlT5.mjs +7 -0
  43. package/browser/esm/DlVZFM9ZR5jGyG0_.mjs +7 -0
  44. package/browser/esm/DqXxZP6yKF4U1YfY.mjs +7 -0
  45. package/browser/esm/DtmE60AvstK9u0Ta.mjs +107 -0
  46. package/browser/esm/Dz2OVgq3kxi1TkfX.mjs +7 -0
  47. package/browser/esm/PS0cqYnlMVEGOQpI.mjs +7 -0
  48. package/browser/esm/QBGUD1XS5_pysBLL.mjs +7 -0
  49. package/browser/esm/index.mjs +2 -8
  50. package/browser/esm/tFhROdVSw9KLQfUN.mjs +7 -0
  51. package/browser/esm/uGDCdtqxjqRCo4Xn.mjs +7 -0
  52. package/cdn/index.js +40 -44
  53. package/cdn/loader.js +1 -1
  54. package/package.json +5 -5
  55. package/types/index.d.ts +9 -9
  56. package/browser/cjs/3GhIDU8JK1oBJrCA.cjs +0 -6
  57. package/browser/cjs/5hPVyVAXmITQCRAG.cjs +0 -6
  58. package/browser/cjs/7PlrLPQx1lct0mdN.cjs +0 -6
  59. package/browser/cjs/B4K6KuggSdXj-V8g.cjs +0 -6
  60. package/browser/cjs/B5Qc3gXLEhscRsFm.cjs +0 -12
  61. package/browser/cjs/B7eW1GQgFvphlLGY.cjs +0 -6
  62. package/browser/cjs/BQPFxJ77OaD_sBIX.cjs +0 -6
  63. package/browser/cjs/Ba3O1f0NYbzEwNAd.cjs +0 -6
  64. package/browser/cjs/BoojmbbjqixMVu2H.cjs +0 -6
  65. package/browser/cjs/CSGVl8EBCRhxcFm1.cjs +0 -15
  66. package/browser/cjs/CalnqtYH48_x2rcI.cjs +0 -301
  67. package/browser/cjs/CjDsO4sQWUHbIX1N.cjs +0 -6
  68. package/browser/cjs/CsCaFaiySArzEfdH.cjs +0 -7
  69. package/browser/cjs/D6AUUY9awlTRjjqd.cjs +0 -11
  70. package/browser/cjs/D8lN5Mv3J4SwSpLP.cjs +0 -161
  71. package/browser/cjs/D9RQ5oYv7U38wSI7.cjs +0 -11
  72. package/browser/cjs/DCd2rPNFkSHDaRcM.cjs +0 -7
  73. package/browser/cjs/DGQrcBvjSGwwoZEv.cjs +0 -6
  74. package/browser/cjs/DIXyMJKaeCGuWxjZ.cjs +0 -12
  75. package/browser/cjs/Dmw7xaaV85s72QZe.cjs +0 -145
  76. package/browser/cjs/DzCXPcqV1oKbCcLO.cjs +0 -16
  77. package/browser/cjs/EoaX6dPoS-Mb-ITO.cjs +0 -42
  78. package/browser/cjs/Y6OgkWqbIB761o5q.cjs +0 -6
  79. package/browser/cjs/gbABnN2zW1kHo3_I.cjs +0 -19
  80. package/browser/cjs/kfV5Cli9oE9IsCtx.cjs +0 -6
  81. package/browser/cjs/nURb18uhj9rScsHa.cjs +0 -6
  82. package/browser/esm/2NQDbhor1Nuzndgq.mjs +0 -3756
  83. package/browser/esm/4aC35Q2XPOwifBRR.mjs +0 -1365
  84. package/browser/esm/5zFDFBAgT-aPgQQ0.mjs +0 -1665
  85. package/browser/esm/B3I_TrFN_pAK5Mdh.mjs +0 -2346
  86. package/browser/esm/BD9GKsR-k4aEK2tx.mjs +0 -421
  87. package/browser/esm/BQpsMTJvguy6LMIq.mjs +0 -43
  88. package/browser/esm/BfCWogOnq8R-c3dD.mjs +0 -21
  89. package/browser/esm/BkGQPKMRPIVUVTLO.mjs +0 -944
  90. package/browser/esm/C81J50HcankGTOIj.mjs +0 -390
  91. package/browser/esm/CO_s27056nua6qzN.mjs +0 -1346
  92. package/browser/esm/CPEjlDUTxckVS1rp.mjs +0 -50
  93. package/browser/esm/CY7astxzrfb7uZqy.mjs +0 -2178
  94. package/browser/esm/CZVzRhflTpwAAl1o.mjs +0 -22
  95. package/browser/esm/CaWZXQsmKl4hTNq5.mjs +0 -46
  96. package/browser/esm/CxcLNXXaxyFyUzyb.mjs +0 -633
  97. package/browser/esm/D0icxW0WVNoeVRLH.mjs +0 -58
  98. package/browser/esm/DFQvqk5r1uf_z0h_.mjs +0 -24994
  99. package/browser/esm/DRL5s4S0fIXi1aU7.mjs +0 -84
  100. package/browser/esm/DRmeb1VC4YCzKKWd.mjs +0 -13208
  101. package/browser/esm/DTwhl4v5YnZrUSgI.mjs +0 -24
  102. package/browser/esm/DmpPAs6w-XNWGTIN.mjs +0 -1703
  103. package/browser/esm/Dx-GS3XDBkRaMNG-.mjs +0 -151
  104. package/browser/esm/V5CA7xqGOB7-Qx4Y.mjs +0 -1467
  105. package/browser/esm/gsfI5CGYr7LCQxRx.mjs +0 -41
  106. package/browser/esm/tOBqasyBAnd7O4qE.mjs +0 -46
  107. package/browser/esm/tPrnEcHW_czJDZOT.mjs +0 -50
  108. package/cdn/assets/2NQDbhor1Nuzndgq.js +0 -3756
  109. package/cdn/assets/4aC35Q2XPOwifBRR.js +0 -1365
  110. package/cdn/assets/5zFDFBAgT-aPgQQ0.js +0 -1665
  111. package/cdn/assets/B0w_moB3pDJd-a6V.js +0 -24
  112. package/cdn/assets/BD9GKsR-k4aEK2tx.js +0 -421
  113. package/cdn/assets/BJVOhUH_XL03H6ZD.js +0 -22
  114. package/cdn/assets/BWJOkXXB6Tr-jYUS.js +0 -46
  115. package/cdn/assets/BapFqJyAb3cblvJM.js +0 -50
  116. package/cdn/assets/Bg88bG-JM9EHeyYX.js +0 -41
  117. package/cdn/assets/C81J50HcankGTOIj.js +0 -390
  118. package/cdn/assets/CO_s27056nua6qzN.js +0 -1346
  119. package/cdn/assets/CXa9u-7w14dyPYxk.js +0 -1703
  120. package/cdn/assets/CkcETdiKdTsZAzma.js +0 -1467
  121. package/cdn/assets/CxcLNXXaxyFyUzyb.js +0 -633
  122. package/cdn/assets/D0PaU6F-TNaTWj-a.js +0 -43
  123. package/cdn/assets/D4hoypx6_sZbvrC_.js +0 -2346
  124. package/cdn/assets/D5exf1RvCqvUoJ3X.js +0 -2178
  125. package/cdn/assets/DKLitAhDj5Ibh2cc.js +0 -24841
  126. package/cdn/assets/DRL5s4S0fIXi1aU7.js +0 -84
  127. package/cdn/assets/DRmeb1VC4YCzKKWd.js +0 -13208
  128. package/cdn/assets/DYkBvlMlZjOASUJs.js +0 -58
  129. package/cdn/assets/ON5--a75QdEU99y_.js +0 -151
  130. package/cdn/assets/PIZDjyqIbvmHXs1T.js +0 -46
  131. package/cdn/assets/TOkIJFYhNg78FdJa.js +0 -21
  132. package/cdn/assets/b9dlFmoFz8tJhV0Z.js +0 -50
  133. package/cdn/assets/d1PG-QPA1GcQ_RuH.js +0 -944
@@ -0,0 +1,7 @@
1
+ /**
2
+ * @license @sheetxl/studio-vanilla - SheetXL Studio - Vanilla entry point for integrating SheetXL UI. - v0.4.11
3
+ *
4
+ * (C) 2025-present SheetXL Inc. & Michael T. Ford
5
+ * License: The license can be found at https://www.sheetxl.com/license.
6
+ */
7
+ import{NumberFormat as t,ScalarType as e,ResourceCollection as s,Tuple as i,IAutoFilter as o,AddressUtils as r,CoordUtils as n,FormulaError as a,IRange as l,CommonUtils as c,Theme as h,JSONStableStringify as u,Workbook as d,IColor as p,OutOfBoundsError as g}from"@sheetxl/sdk";import{_ as f}from"./DtmE60AvstK9u0Ta.mjs";const m=":A-Z_a-zÀ-ÖØ-öø-˿Ͱ-ͽͿ-῿‌‍⁰-↏Ⰰ-⿯、-퟿豈-﷏ﷰ-�𐀀-󯿿",T=new RegExp(`^[${m}][-${m}.0-9·̀-ͯ‿-⁀]*$`,"u");function y(t){return t>=65&&t<=90||t>=97&&t<=122||58===t||95===t||8204===t||8205===t||t>=192&&t<=214||t>=216&&t<=246||t>=248&&t<=767||t>=880&&t<=893||t>=895&&t<=8191||t>=8304&&t<=8591||t>=11264&&t<=12271||t>=12289&&t<=55295||t>=63744&&t<=64975||t>=65008&&t<=65533||t>=65536&&t<=983039}const b="A-Z_a-zÀ-ÖØ-öø-˿Ͱ-ͽͿ-῿‌-‍⁰-↏Ⰰ-⿯、-퟿豈-﷏ﷰ-�𐀀-󯿿",x=new RegExp(`^[${b}][-${b}.0-9·̀-ͯ‿-⁀]*$`,"u");function w(t){return t>=65&&t<=90||95===t||t>=97&&t<=122||t>=192&&t<=214||t>=216&&t<=246||t>=248&&t<=767||t>=880&&t<=893||t>=895&&t<=8191||t>=8204&&t<=8205||t>=8304&&t<=8591||t>=11264&&t<=12271||t>=12289&&t<=55295||t>=63744&&t<=64975||t>=65008&&t<=65533||t>=65536&&t<=983039}const v=function(t){return 32===t||10===t||13===t||9===t},S=function(t){return t>=32&&t<=55295||10===t||13===t||9===t||t>=57344&&t<=65533||t>=65536&&t<=1114111},C=y,k=function(t){return y(t)||t>=48&&t<=57||45===t||46===t||183===t||t>=768&&t<=879||t>=8255&&t<=8256},A=[32,10,13,9],D=T,E=function(t){return t>=1&&t<=55295||t>=57344&&t<=65533||t>=65536&&t<=1114111},P=w,O=function(t){return w(t)||45===t||46===t||t>=48&&t<=57||183===t||t>=768&&t<=879||t>=8255&&t<=8256},I=x,V="http://www.w3.org/XML/1998/namespace",L="http://www.w3.org/2000/xmlns/",N={__proto__:null,xml:V,xmlns:L},R={__proto__:null,amp:"&",gt:">",lt:"<",quot:'"',apos:"'"},$=-1,M=-2,j=13,H=33,F=10,X=60,B=61,W=62,_=63,q=93,z=t=>34===t||39===t,U=[34,39],G=[...U,91,W],Z=[...U,X,q],Q=[B,_,...A],J=[...A,W,38,X];function K(t,e,s){switch(e){case"xml":s!==V&&t.fail(`xml prefix must be bound to ${V}.`);break;case"xmlns":s!==L&&t.fail(`xmlns prefix must be bound to ${L}.`)}switch(s){case L:t.fail(""===e?`the default namespace may not be set to ${s}.`:`may not assign a prefix (even "xmlns") to the URI ${L}.`);break;case V:switch(e){case"xml":break;case"":t.fail(`the default namespace may not be set to ${s}.`);break;default:t.fail("may not assign the xml namespace to another prefix.")}}}const Y=t=>I.test(t),tt=t=>D.test(t),et={xmldecl:"xmldeclHandler",text:"textHandler",processinginstruction:"piHandler",doctype:"doctypeHandler",comment:"commentHandler",opentagstart:"openTagStartHandler",attribute:"attributeHandler",opentag:"openTagHandler",closetag:"closeTagHandler",cdata:"cdataHandler",error:"errorHandler",end:"endHandler",ready:"readyHandler"};class st{constructor(t){this.i=0,this.prevI=0,this.opt=t??{},this.fragmentOpt=!!this.opt.fragment;const e=this.xmlnsOpt=!!this.opt.xmlns;if(this.trackPosition=!1!==this.opt.position,this.fileName=this.opt.fileName,e){this.nameStartCheck=P,this.nameCheck=O,this.isName=Y,this.processAttribs=this.processAttribsNS,this.pushAttrib=this.pushAttribNS,this.ns={__proto__:null,...N};const t=this.opt.additionalNamespaces;null!=t&&(function(t,e){for(const s of Object.keys(e))K(t,s,e[s])}(this,t),Object.assign(this.ns,t))}else this.nameStartCheck=C,this.nameCheck=k,this.isName=tt,this.processAttribs=this.processAttribsPlain,this.pushAttrib=this.pushAttribPlain;this.stateTable=[this.sBegin,this.sBeginWhitespace,this.sDoctype,this.sDoctypeQuote,this.sDTD,this.sDTDQuoted,this.sDTDOpenWaka,this.sDTDOpenWakaBang,this.sDTDComment,this.sDTDCommentEnding,this.sDTDCommentEnded,this.sDTDPI,this.sDTDPIEnding,this.sText,this.sEntity,this.sOpenWaka,this.sOpenWakaBang,this.sComment,this.sCommentEnding,this.sCommentEnded,this.sCData,this.sCDataEnding,this.sCDataEnding2,this.sPIFirstChar,this.sPIRest,this.sPIBody,this.sPIEnding,this.sXMLDeclNameStart,this.sXMLDeclName,this.sXMLDeclEq,this.sXMLDeclValueStart,this.sXMLDeclValue,this.sXMLDeclSeparator,this.sXMLDeclEnding,this.sOpenTag,this.sOpenTagSlash,this.sAttrib,this.sAttribName,this.sAttribNameSawWhite,this.sAttribValue,this.sAttribValueQuoted,this.sAttribValueClosed,this.sAttribValueUnquoted,this.sCloseTag,this.sCloseTagSawWhite],this._init()}get closed(){return this._closed}_init(){this.openWakaBang="",this.text="",this.name="",this.piTarget="",this.entity="",this.q=null,this.tags=[],this.tag=null,this.topNS=null,this.chunk="",this.chunkPosition=0,this.i=0,this.prevI=0,this.carriedFromPrevious=void 0,this.forbiddenState=0,this.attribList=[];const{fragmentOpt:t}=this;this.state=t?j:0,this.reportedTextBeforeRoot=this.reportedTextAfterRoot=this.closedRoot=this.sawRoot=t,this.xmlDeclPossible=!t,this.xmlDeclExpects=["version"],this.entityReturnState=void 0;let{defaultXMLVersion:e}=this.opt;if(void 0===e){if(!0===this.opt.forceXMLVersion)throw new Error("forceXMLVersion set but defaultXMLVersion is not set");e="1.0"}this.setXMLVersion(e),this.positionAtNewLine=0,this.doctype=!1,this._closed=!1,this.xmlDecl={version:void 0,encoding:void 0,standalone:void 0},this.line=1,this.column=0,this.ENTITIES=Object.create(R),this.readyHandler?.()}get position(){return this.chunkPosition+this.i}get columnIndex(){return this.position-this.positionAtNewLine}on(t,e){this[et[t]]=e}off(t){this[et[t]]=void 0}makeError(t){let e=this.fileName??"";return this.trackPosition&&(e.length>0&&(e+=":"),e+=`${this.line}:${this.column}`),e.length>0&&(e+=": "),new Error(e+t)}fail(t){const e=this.makeError(t),s=this.errorHandler;if(void 0===s)throw e;return s(e),this}write(t){if(this.closed)return this.fail("cannot write after close; assign an onready handler.");let e=!1;null===t?(e=!0,t=""):"object"==typeof t&&(t=t.toString()),void 0!==this.carriedFromPrevious&&(t=`${this.carriedFromPrevious}${t}`,this.carriedFromPrevious=void 0);let s=t.length;const i=t.charCodeAt(s-1);!e&&(13===i||i>=55296&&i<=56319)&&(this.carriedFromPrevious=t[s-1],s--,t=t.slice(0,s));const{stateTable:o}=this;for(this.chunk=t,this.i=0;this.i<s;)o[this.state].call(this);return this.chunkPosition+=s,e?this.end():this}close(){return this.write(null)}getCode10(){const t=this.chunk,e=this.i;if(this.prevI=e,this.i++,e>=t.length)return $;const s=t.charCodeAt(e);if(this.column++,s<55296){if(s>=32||9===s)return s;switch(s){case F:return this.line++,this.column=0,this.positionAtNewLine=this.position,F;case 13:return t.charCodeAt(e+1)===F&&(this.i=e+2),this.line++,this.column=0,this.positionAtNewLine=this.position,M;default:return this.fail("disallowed character."),s}}if(s>56319)return s>=57344&&s<=65533||this.fail("disallowed character."),s;const i=65536+1024*(s-55296)+(t.charCodeAt(e+1)-56320);return this.i=e+2,i>1114111&&this.fail("disallowed character."),i}getCode11(){const{chunk:t,i:e}=this;if(this.prevI=e,this.i=e+1,e>=t.length)return $;const s=t.charCodeAt(e);if(this.column++,s<55296){if(s>31&&s<127||s>159&&8232!==s||9===s)return s;switch(s){case F:return this.line++,this.column=0,this.positionAtNewLine=this.position,F;case 13:{const s=t.charCodeAt(e+1);s!==F&&133!==s||(this.i=e+2)}case 133:case 8232:return this.line++,this.column=0,this.positionAtNewLine=this.position,M;default:return this.fail("disallowed character."),s}}if(s>56319)return s>=57344&&s<=65533||this.fail("disallowed character."),s;const i=65536+1024*(s-55296)+(t.charCodeAt(e+1)-56320);return this.i=e+2,i>1114111&&this.fail("disallowed character."),i}getCodeNorm(){const t=this.getCode();return t===M?F:t}unget(){this.i=this.prevI,this.column--}captureTo(t){let{i:e}=this;const{chunk:s}=this;for(;;){const i=this.getCode(),o=i===M,r=o?F:i;if(r===$||t.includes(r))return this.text+=s.slice(e,this.prevI),r;o&&(this.text+=`${s.slice(e,this.prevI)}\n`,e=this.i)}}captureToChar(t){let{i:e}=this;const{chunk:s}=this;for(;;){let i=this.getCode();switch(i){case M:this.text+=`${s.slice(e,this.prevI)}\n`,e=this.i,i=F;break;case $:return this.text+=s.slice(e),!1}if(i===t)return this.text+=s.slice(e,this.prevI),!0}}captureNameChars(){const{chunk:t,i:e}=this;for(;;){const s=this.getCode();if(s===$)return this.name+=t.slice(e),$;if(!k(s))return this.name+=t.slice(e,this.prevI),s===M?F:s}}skipSpaces(){for(;;){const t=this.getCodeNorm();if(t===$||!v(t))return t}}setXMLVersion(t){this.currentXMLVersion=t,"1.0"===t?(this.isChar=S,this.getCode=this.getCode10):(this.isChar=E,this.getCode=this.getCode11)}sBegin(){65279===this.chunk.charCodeAt(0)&&(this.i++,this.column++),this.state=1}sBeginWhitespace(){const t=this.i,e=this.skipSpaces();switch(this.prevI!==t&&(this.xmlDeclPossible=!1),e){case X:if(this.state=15,0!==this.text.length)throw new Error("no-empty text at start");break;case $:break;default:this.unget(),this.state=j,this.xmlDeclPossible=!1}}sDoctype(){const t=this.captureTo(G);switch(t){case W:this.doctypeHandler?.(this.text),this.text="",this.state=j,this.doctype=!0;break;case $:break;default:this.text+=String.fromCodePoint(t),91===t?this.state=4:z(t)&&(this.state=3,this.q=t)}}sDoctypeQuote(){const t=this.q;this.captureToChar(t)&&(this.text+=String.fromCodePoint(t),this.q=null,this.state=2)}sDTD(){const t=this.captureTo(Z);t!==$&&(this.text+=String.fromCodePoint(t),t===q?this.state=2:t===X?this.state=6:z(t)&&(this.state=5,this.q=t))}sDTDQuoted(){const t=this.q;this.captureToChar(t)&&(this.text+=String.fromCodePoint(t),this.state=4,this.q=null)}sDTDOpenWaka(){const t=this.getCodeNorm();switch(this.text+=String.fromCodePoint(t),t){case 33:this.state=7,this.openWakaBang="";break;case _:this.state=11;break;default:this.state=4}}sDTDOpenWakaBang(){const t=String.fromCodePoint(this.getCodeNorm()),e=this.openWakaBang+=t;this.text+=t,"-"!==e&&(this.state="--"===e?8:4,this.openWakaBang="")}sDTDComment(){this.captureToChar(45)&&(this.text+="-",this.state=9)}sDTDCommentEnding(){const t=this.getCodeNorm();this.text+=String.fromCodePoint(t),this.state=45===t?10:8}sDTDCommentEnded(){const t=this.getCodeNorm();this.text+=String.fromCodePoint(t),t===W?this.state=4:(this.fail("malformed comment."),this.state=8)}sDTDPI(){this.captureToChar(_)&&(this.text+="?",this.state=12)}sDTDPIEnding(){const t=this.getCodeNorm();this.text+=String.fromCodePoint(t),t===W&&(this.state=4)}sText(){0!==this.tags.length?this.handleTextInRoot():this.handleTextOutsideRoot()}sEntity(){let{i:t}=this;const{chunk:e}=this;t:for(;;)switch(this.getCode()){case M:this.entity+=`${e.slice(t,this.prevI)}\n`,t=this.i;break;case 59:{const{entityReturnState:s}=this,i=this.entity+e.slice(t,this.prevI);let o;this.state=s,""===i?(this.fail("empty entity name."),o="&;"):(o=this.parseEntity(i),this.entity=""),s===j&&void 0===this.textHandler||(this.text+=o);break t}case $:this.entity+=e.slice(t);break t}}sOpenWaka(){const t=this.getCode();if(C(t))this.state=34,this.unget(),this.xmlDeclPossible=!1;else switch(t){case 47:this.state=43,this.xmlDeclPossible=!1;break;case 33:this.state=16,this.openWakaBang="",this.xmlDeclPossible=!1;break;case _:this.state=23;break;default:this.fail("disallowed character in tag name"),this.state=j,this.xmlDeclPossible=!1}}sOpenWakaBang(){switch(this.openWakaBang+=String.fromCodePoint(this.getCodeNorm()),this.openWakaBang){case"[CDATA[":this.sawRoot||this.reportedTextBeforeRoot||(this.fail("text data outside of root node."),this.reportedTextBeforeRoot=!0),this.closedRoot&&!this.reportedTextAfterRoot&&(this.fail("text data outside of root node."),this.reportedTextAfterRoot=!0),this.state=20,this.openWakaBang="";break;case"--":this.state=17,this.openWakaBang="";break;case"DOCTYPE":this.state=2,(this.doctype||this.sawRoot)&&this.fail("inappropriately located doctype declaration."),this.openWakaBang="";break;default:this.openWakaBang.length>=7&&this.fail("incorrect syntax.")}}sComment(){this.captureToChar(45)&&(this.state=18)}sCommentEnding(){const t=this.getCodeNorm();45===t?(this.state=19,this.commentHandler?.(this.text),this.text=""):(this.text+=`-${String.fromCodePoint(t)}`,this.state=17)}sCommentEnded(){const t=this.getCodeNorm();t!==W?(this.fail("malformed comment."),this.text+=`--${String.fromCodePoint(t)}`,this.state=17):this.state=j}sCData(){this.captureToChar(q)&&(this.state=21)}sCDataEnding(){const t=this.getCodeNorm();t===q?this.state=22:(this.text+=`]${String.fromCodePoint(t)}`,this.state=20)}sCDataEnding2(){const t=this.getCodeNorm();switch(t){case W:this.cdataHandler?.(this.text),this.text="",this.state=j;break;case q:this.text+="]";break;default:this.text+=`]]${String.fromCodePoint(t)}`,this.state=20}}sPIFirstChar(){const t=this.getCodeNorm();this.nameStartCheck(t)?(this.piTarget+=String.fromCodePoint(t),this.state=24):t===_||v(t)?(this.fail("processing instruction without a target."),this.state=t===_?26:25):(this.fail("disallowed character in processing instruction name."),this.piTarget+=String.fromCodePoint(t),this.state=24)}sPIRest(){const{chunk:t,i:e}=this;for(;;){const s=this.getCodeNorm();if(s===$)return void(this.piTarget+=t.slice(e));if(!this.nameCheck(s)){this.piTarget+=t.slice(e,this.prevI);const i=s===_;i||v(s)?"xml"===this.piTarget?(this.xmlDeclPossible||this.fail("an XML declaration must be at the start of the document."),this.state=i?H:27):this.state=i?26:25:(this.fail("disallowed character in processing instruction name."),this.piTarget+=String.fromCodePoint(s));break}}}sPIBody(){if(0===this.text.length){const t=this.getCodeNorm();t===_?this.state=26:v(t)||(this.text=String.fromCodePoint(t))}else this.captureToChar(_)&&(this.state=26)}sPIEnding(){const t=this.getCodeNorm();if(t===W){const{piTarget:t}=this;"xml"===t.toLowerCase()&&this.fail("the XML declaration must appear at the start of the document."),this.piHandler?.({target:t,body:this.text}),this.piTarget=this.text="",this.state=j}else t===_?this.text+="?":(this.text+=`?${String.fromCodePoint(t)}`,this.state=25);this.xmlDeclPossible=!1}sXMLDeclNameStart(){const t=this.skipSpaces();t!==_?t!==$&&(this.state=28,this.name=String.fromCodePoint(t)):this.state=H}sXMLDeclName(){const t=this.captureTo(Q);if(t===_)return this.state=H,this.name+=this.text,this.text="",void this.fail("XML declaration is incomplete.");if(v(t)||t===B){if(this.name+=this.text,this.text="",!this.xmlDeclExpects.includes(this.name))switch(this.name.length){case 0:this.fail("did not expect any more name/value pairs.");break;case 1:this.fail(`expected the name ${this.xmlDeclExpects[0]}.`);break;default:this.fail(`expected one of ${this.xmlDeclExpects.join(", ")}`)}this.state=t===B?30:29}}sXMLDeclEq(){const t=this.getCodeNorm();if(t===_)return this.state=H,void this.fail("XML declaration is incomplete.");v(t)||(t!==B&&this.fail("value required."),this.state=30)}sXMLDeclValueStart(){const t=this.getCodeNorm();if(t===_)return this.state=H,void this.fail("XML declaration is incomplete.");v(t)||(z(t)?this.q=t:(this.fail("value must be quoted."),this.q=32),this.state=31)}sXMLDeclValue(){const t=this.captureTo([this.q,_]);if(t===_)return this.state=H,this.text="",void this.fail("XML declaration is incomplete.");if(t===$)return;const e=this.text;switch(this.text="",this.name){case"version":{this.xmlDeclExpects=["encoding","standalone"];const t=e;this.xmlDecl.version=t,/^1\.[0-9]+$/.test(t)?this.opt.forceXMLVersion||this.setXMLVersion(t):this.fail("version number must match /^1\\.[0-9]+$/.");break}case"encoding":/^[A-Za-z][A-Za-z0-9._-]*$/.test(e)||this.fail("encoding value must match /^[A-Za-z0-9][A-Za-z0-9._-]*$/."),this.xmlDeclExpects=["standalone"],this.xmlDecl.encoding=e;break;case"standalone":"yes"!==e&&"no"!==e&&this.fail('standalone value must match "yes" or "no".'),this.xmlDeclExpects=[],this.xmlDecl.standalone=e}this.name="",this.state=32}sXMLDeclSeparator(){const t=this.getCodeNorm();t!==_?(v(t)||(this.fail("whitespace required."),this.unget()),this.state=27):this.state=H}sXMLDeclEnding(){this.getCodeNorm()===W?("xml"!==this.piTarget?this.fail("processing instructions are not allowed before root."):"version"!==this.name&&this.xmlDeclExpects.includes("version")&&this.fail("XML declaration must contain a version."),this.xmldeclHandler?.(this.xmlDecl),this.name="",this.piTarget=this.text="",this.state=j):this.fail("The character ? is disallowed anywhere in XML declarations."),this.xmlDeclPossible=!1}sOpenTag(){const t=this.captureNameChars();if(t===$)return;const e=this.tag={name:this.name,attributes:Object.create(null)};switch(this.name="",this.xmlnsOpt&&(this.topNS=e.ns=Object.create(null)),this.openTagStartHandler?.(e),this.sawRoot=!0,!this.fragmentOpt&&this.closedRoot&&this.fail("documents may contain only one root."),t){case W:this.openTag();break;case 47:this.state=35;break;default:v(t)||this.fail("disallowed character in tag name."),this.state=36}}sOpenTagSlash(){this.getCode()===W?this.openSelfClosingTag():(this.fail("forward-slash in opening tag not followed by >."),this.state=36)}sAttrib(){const t=this.skipSpaces();t!==$&&(C(t)?(this.unget(),this.state=37):t===W?this.openTag():47===t?this.state=35:this.fail("disallowed character in attribute name."))}sAttribName(){const t=this.captureNameChars();t===B?this.state=39:v(t)?this.state=38:t===W?(this.fail("attribute without value."),this.pushAttrib(this.name,this.name),this.name=this.text="",this.openTag()):t!==$&&this.fail("disallowed character in attribute name.")}sAttribNameSawWhite(){const t=this.skipSpaces();switch(t){case $:return;case B:this.state=39;break;default:this.fail("attribute without value."),this.text="",this.name="",t===W?this.openTag():C(t)?(this.unget(),this.state=37):(this.fail("disallowed character in attribute name."),this.state=36)}}sAttribValue(){const t=this.getCodeNorm();z(t)?(this.q=t,this.state=40):v(t)||(this.fail("unquoted attribute value."),this.state=42,this.unget())}sAttribValueQuoted(){const{q:t,chunk:e}=this;let{i:s}=this;for(;;)switch(this.getCode()){case t:return this.pushAttrib(this.name,this.text+e.slice(s,this.prevI)),this.name=this.text="",this.q=null,void(this.state=41);case 38:return this.text+=e.slice(s,this.prevI),this.state=14,void(this.entityReturnState=40);case F:case M:case 9:this.text+=`${e.slice(s,this.prevI)} `,s=this.i;break;case X:return this.text+=e.slice(s,this.prevI),void this.fail("disallowed character.");case $:return void(this.text+=e.slice(s))}}sAttribValueClosed(){const t=this.getCodeNorm();v(t)?this.state=36:t===W?this.openTag():47===t?this.state=35:C(t)?(this.fail("no whitespace between attributes."),this.unget(),this.state=37):this.fail("disallowed character in attribute name.")}sAttribValueUnquoted(){const t=this.captureTo(J);switch(t){case 38:this.state=14,this.entityReturnState=42;break;case X:this.fail("disallowed character.");break;case $:break;default:this.text.includes("]]>")&&this.fail('the string "]]>" is disallowed in char data.'),this.pushAttrib(this.name,this.text),this.name=this.text="",t===W?this.openTag():this.state=36}}sCloseTag(){const t=this.captureNameChars();t===W?this.closeTag():v(t)?this.state=44:t!==$&&this.fail("disallowed character in closing tag.")}sCloseTagSawWhite(){switch(this.skipSpaces()){case W:this.closeTag();break;case $:break;default:this.fail("disallowed character in closing tag.")}}handleTextInRoot(){let{i:t,forbiddenState:e}=this;const{chunk:s,textHandler:i}=this;t:for(;;)switch(this.getCode()){case X:if(this.state=15,void 0!==i){const{text:e}=this,o=s.slice(t,this.prevI);0!==e.length?(i(e+o),this.text=""):0!==o.length&&i(o)}e=0;break t;case 38:this.state=14,this.entityReturnState=j,void 0!==i&&(this.text+=s.slice(t,this.prevI)),e=0;break t;case q:switch(e){case 0:e=1;break;case 1:e=2;break;case 2:break;default:throw new Error("impossible state")}break;case W:2===e&&this.fail('the string "]]>" is disallowed in char data.'),e=0;break;case M:void 0!==i&&(this.text+=`${s.slice(t,this.prevI)}\n`),t=this.i,e=0;break;case $:void 0!==i&&(this.text+=s.slice(t));break t;default:e=0}this.forbiddenState=e}handleTextOutsideRoot(){let{i:t}=this;const{chunk:e,textHandler:s}=this;let i=!1;t:for(;;){const o=this.getCode();switch(o){case X:if(this.state=15,void 0!==s){const{text:i}=this,o=e.slice(t,this.prevI);0!==i.length?(s(i+o),this.text=""):0!==o.length&&s(o)}break t;case 38:this.state=14,this.entityReturnState=j,void 0!==s&&(this.text+=e.slice(t,this.prevI)),i=!0;break t;case M:void 0!==s&&(this.text+=`${e.slice(t,this.prevI)}\n`),t=this.i;break;case $:void 0!==s&&(this.text+=e.slice(t));break t;default:v(o)||(i=!0)}}i&&(this.sawRoot||this.reportedTextBeforeRoot||(this.fail("text data outside of root node."),this.reportedTextBeforeRoot=!0),this.closedRoot&&!this.reportedTextAfterRoot&&(this.fail("text data outside of root node."),this.reportedTextAfterRoot=!0))}pushAttribNS(t,e){const{prefix:s,local:i}=this.qname(t),o={name:t,prefix:s,local:i,value:e};if(this.attribList.push(o),this.attributeHandler?.(o),"xmlns"===s){const t=e.trim();"1.0"===this.currentXMLVersion&&""===t&&this.fail("invalid attempt to undefine prefix in XML 1.0"),this.topNS[i]=t,K(this,i,t)}else if("xmlns"===t){const t=e.trim();this.topNS[""]=t,K(this,"",t)}}pushAttribPlain(t,e){const s={name:t,value:e};this.attribList.push(s),this.attributeHandler?.(s)}end(){this.sawRoot||this.fail("document must contain a root element.");const{tags:t}=this;for(;t.length>0;){const e=t.pop();this.fail(`unclosed tag: ${e.name}`)}0!==this.state&&this.state!==j&&this.fail("unexpected end.");const{text:e}=this;return 0!==e.length&&(this.textHandler?.(e),this.text=""),this._closed=!0,this.endHandler?.(),this._init(),this}resolve(t){let e=this.topNS[t];if(void 0!==e)return e;const{tags:s}=this;for(let i=s.length-1;i>=0;i--)if(e=s[i].ns[t],void 0!==e)return e;return e=this.ns[t],void 0!==e?e:this.opt.resolvePrefix?.(t)}qname(t){const e=t.indexOf(":");if(-1===e)return{prefix:"",local:t};const s=t.slice(e+1),i=t.slice(0,e);return(""===i||""===s||s.includes(":"))&&this.fail(`malformed name: ${t}.`),{prefix:i,local:s}}processAttribsNS(){const{attribList:t}=this,e=this.tag;{const{prefix:t,local:s}=this.qname(e.name);e.prefix=t,e.local=s;const i=e.uri=this.resolve(t)??"";""!==t&&("xmlns"===t&&this.fail('tags may not have "xmlns" as prefix.'),""===i&&(this.fail(`unbound namespace prefix: ${JSON.stringify(t)}.`),e.uri=t))}if(0===t.length)return;const{attributes:s}=e,i=new Set;for(const e of t){const{name:t,prefix:o,local:r}=e;let n,a;""===o?(n="xmlns"===t?L:"",a=t):(n=this.resolve(o),void 0===n&&(this.fail(`unbound namespace prefix: ${JSON.stringify(o)}.`),n=o),a=`{${n}}${r}`),i.has(a)&&this.fail(`duplicate attribute: ${a}.`),i.add(a),e.uri=n,s[t]=e}this.attribList=[]}processAttribsPlain(){const{attribList:t}=this,e=this.tag.attributes;for(const{name:s,value:i}of t)void 0!==e[s]&&this.fail(`duplicate attribute: ${s}.`),e[s]=i;this.attribList=[]}openTag(){this.processAttribs();const{tags:t}=this,e=this.tag;e.isSelfClosing=!1,this.openTagHandler?.(e),t.push(e),this.state=j,this.name=""}openSelfClosingTag(){this.processAttribs();const{tags:t}=this,e=this.tag;e.isSelfClosing=!0,this.openTagHandler?.(e),this.closeTagHandler?.(e),null===(this.tag=t[t.length-1]??null)&&(this.closedRoot=!0),this.state=j,this.name=""}closeTag(){const{tags:t,name:e}=this;if(this.state=j,this.name="",""===e)return this.fail("weird empty close tag."),void(this.text+="</>");const s=this.closeTagHandler;let i=t.length;for(;i-- >0;){const i=this.tag=t.pop();if(this.topNS=i.ns,s?.(i),i.name===e)break;this.fail("unexpected close tag.")}0===i?this.closedRoot=!0:i<0&&(this.fail(`unmatched closing tag: ${e}.`),this.text+=`</${e}>`)}parseEntity(t){if("#"!==t[0]){const e=this.ENTITIES[t];return void 0!==e?e:(this.fail(this.isName(t)?"undefined entity.":"disallowed character in entity name."),`&${t};`)}let e=NaN;return"x"===t[1]&&/^#x[0-9a-f]+$/i.test(t)?e=parseInt(t.slice(2),16):/^#[0-9]+$/.test(t)&&(e=parseInt(t.slice(1),10)),this.isChar(e)?String.fromCodePoint(e):(this.fail("malformed character entity."),`&${t};`)}}var it,ot;(ot=it||(it={})).Events={XmlDecl:"xmldecl",Text:"text",ProcessingInstruction:"processinginstruction",Doctype:"doctype",Comment:"comment",OpenTagStart:"opentagstart",Attribute:"attribute",OpenTag:"opentag",CloseTag:"closetag",CDdata:"cdata",Error:"error",End:"end",Ready:"ready"},ot.parseStream=async(t,e,s)=>{const i=new st({position:!1,...s});let o;if(e.onOpenTagStart&&i.on(ot.Events.OpenTagStart,e.onOpenTagStart),e.onOpenTag&&i.on(ot.Events.OpenTag,e.onOpenTag),e.onCloseTag&&i.on(ot.Events.CloseTag,e.onCloseTag),e.onAttribute&&i.on(ot.Events.Attribute,e.onAttribute),e.onText&&i.on(ot.Events.Text,e.onText),e.onError&&i.on(ot.Events.Error,e.onError),e.onEnd){e.onEnd;const t=()=>{o=e.onEnd()};i.on(ot.Events.End,t)}for(;;){const{value:e,done:s}=await t.read();if(s)break;i.write(e)}return i.close(),o};const rt=t=>!0===t||"1"===t||"on"===t||"true"===t||!1!==t&&"0"!==t&&"off"!==t&&"false"!==t&&null,nt=t=>{const e=parseInt(t);return isNaN(e)?null:e},at=t=>{const e=parseFloat(t);return isNaN(e)?null:e},lt=null;class ct{constructor(){this._registeredVisitors=new Map}registerVisitor(t){this._registeredVisitors.set(t.from,t)}createEventHandler(t,e,s){const i=this._registeredVisitors,o=[];let r=null,n=null,a=null,l=null;const c=[],h={key:null,source:t};let u=null,d=!1;const p=(t,e)=>{let s=a.attributes[t];if(e)if(Array.isArray(e))for(let t=0;t<e.length;t++){if(null==s)return;if(s=e[t](s),null==s)return}else{if(null==s)return;if(s=e(s),null==s)return}return s},g={getSource:()=>u.source,setSource:t=>{u.source=t},setKey:t=>{u.key=t},getFrom:()=>a,getAttribute:(t,e)=>p(t,e)??null,hasAttribute:t=>null!==g.getAttribute(t),getParent:()=>c[c.length-2].source,getPath:()=>{const t=[];for(let e=0;e<o.length;e++)t.push(o[e].local);return t.join("\\")},parseAttribute:p,copyToObject:(t,e,s,i)=>{const o=p(i??e,s);void 0!==o&&(t[e]=o)},copyTo:(t,e,s)=>{const i=p(s??t,e);void 0!==i&&(u.source[t]=i)},warn:t=>{s?s?.(t):console.warn(t)}};return{onOpenTag:t=>{let e=t.name;const s=e.indexOf(":");-1!==s&&(e=e.slice(s+1));const p=i.get(e);if(r={local:e,visitor:p,tag:t,destination:null},d)return o.push(r),n=e,void(a=t);l=r?.visitor??null,p&&(u=0===o.length?h:null!==l?.to?{key:null,source:{}}:null,r.destination=u,u&&c.push(u)),o.push(r),n=e,a=t,d=null===l?.to,l?.openTag?.(g)},onCloseTag:t=>{let e=t.name;const i=e.indexOf(":");if(-1!==i&&(e=e.slice(i+1)),e!==n)throw new Error(`mismatch open/close tag: '${e}'/'${n}'`);d||l?.closeTag?.(g);const p=o.pop()??null;r=o[o.length-1]??null;const f=p?.destination;if(f){c.pop(),u=c[c.length-1]??h;const t=p.visitor;t&&t.to&&void 0!==f.source&&(Array.isArray(t.to)?u.source.push?u.source.push(f.source):s?.(`Unable to parse array for ${t.from} at ${g.getPath()}`):f.key?u.source[f.key]=f.source:"string"==typeof t.to&&(u.source[t.to]=f.source))}n=r?.local??null,a=r?.tag??null,l=r?.visitor??null,d=!r?.destination},onText:t=>{l?.text?.(t,g)},onEnd:e}}}const ht=(t,e,s,i=null)=>{if(!t)return null;let o=t;o.startsWith("/")&&(o=o.substring(1));let r=i?.parsedRefs?.get(t);if(void 0!==r)return r;const n=e(o);if(!n)return null;let a=n.content;try{s&&(a=s(a))}catch(t){console.warn(t)}return i?.parsedRefs?.set(t,a),a},ut=(t,e,s,i,o=null)=>{if(!t)return null;let r=t;r.startsWith("/")&&(r=r.substring(1));let n=o?.parsedRefs?.get(t);if(void 0!==n)return n;const a=e(r);if(!a)return null;const l=a.content;try{const e=(new TextDecoder).decode(l),r=s.parseFromString(e,"text/xml"),n=i.convert(r,t,o);return o?.parsedRefs?.set(t,n),n}catch(t){console.warn(t)}return null},dt=(t,e,s,i,o=null)=>{const r=new Map;let n=e.Directory[t];const a=n?n.length:0;for(let t=0;t<a;t++){const a=n[t];if(!a)continue;let l=a;l.startsWith("/")&&(l=l.substring(1));const c=ut(l,t=>e.files[t],s,i,o);r.set(l,c)}return r},pt=["lt1","dk1","lt2","dk2","accent1","accent2","accent3","accent4","accent5","accent6","hlink","folHlink"],gt=(t,e="dk1")=>{let s;const i=t("auto");void 0===i||"1"!==i&&"true"!==i||(s=e);const o=t("indexed");o&&(s=`index${o}`);const r=t("rgb");r&&(s=r.toLowerCase(),8!==r.length||r.startsWith("FF")||(s="FF"+r.substring(2,r.length)));const n=t("theme");n&&(s=pt[n]);let a=t("tint");if(a&&(s+=` ${p.AdjustmentType.ETint} ${parseFloat(a)}`),s)return s},ft=t=>t?t.replace(/^\{([\s\S]+)\}$/,"$1"):t,mt=t=>t?f.roundAccurately(parseFloat(t)/12700,4):null,Tt=t=>t?f.roundAccurately(parseFloat(t)/9525,1):null,yt=t=>parseFloat(t)/1e3,bt=t=>parseFloat(t)/6e4,xt=t=>"true"===t||"1"===t;class wt{static{this.Collapsed=1}static{this.CustomFormat=2}static{this.CustomHeight=4}static{this.Hidden=8}static{this.Ht=16}static{this.OutlineLevel=32}static{this.Ph=64}static{this.R=128}static{this.S=256}static{this.Spans=512}static{this.ThickBot=1024}static{this.ThickTop=2048}}const vt=(t,e,s)=>{if(t[0].value[0]===t[1].value[0])return e},St={colStart:0,colEnd:0,rowStart:0,rowEnd:0},Ct=Object.freeze(Object.defineProperty({__proto__:null,fromBufferXLSX:async(t,p)=>{const{password:f,onWarning:m,createWorkbookOptions:T={},...y}=p??{},b=import("./BDVJ7eOPpW5FnEAP.mjs"),x=import("./Bo_ZPRrOQrqOVHAF.mjs");let w=null;try{w=new DOMParser}catch(t){}let v=null;w||(v=import("./BlGoi1_x9rUMpWMd.mjs").then(t=>t.i));let S=null,C=null,k=null;try{const t=await Promise.all([b,x,v]);S=t[0],C=t[1],k=t[2]}catch(t){throw new Error("Unable to load XLSX parser.",{cause:t})}try{const p=S.read(t,{type:"array",sheets:[],cellStyles:!1,bookFiles:!0});if(!p.Directory)throw new Error("Unable to parse as an Excel document. Try to save as '.xlsx' and try again.");p.Directory.richstructure=["/xl/richData/rdrichvaluestructure.xml"],p.Directory.richdata=["/xl/richData/rdrichvalue.xml"];const g=new C.FromOOXMLConverter,f=w??new k.DOMParser,y=T?.resources??new s,b=y.beginPersist(),x={},v=new Set,A=new Map;A.set("richTypes",[]);const D=new Map,E=[],P=t=>p.files[t],O=(t,e)=>{const s=t.lastIndexOf("/"),i=t.substring(0,s+1)+"_rels/"+t.substring(s+1,t.length)+".rels";let o=e.get(i);return o||(o=((t,e,s,i,o=null)=>{if(!t)return null;const r=ut(t,e,s,i,o);if(!r)return null;const n=new Map,a=Object.keys(r),l=a.length;for(let t=0;t<l;t++){const e=a[t],s=r[e];n.set(e,s)}return n})(i,P,f,g,V),e.set(i,o)),o},I=(t,s,h,u=D)=>{let d=O(s,u).get(t),p=d?.target;if(!p)return null;if("External"===d.targetMode)return d.target;const T=s.lastIndexOf("/"),w=s.substring(0,T+1);p.startsWith("/")||(p=w+p),p=(t=>{const e=t.split(/\/+/),s=e.reduce((t,e,s)=>("."===e?t.splice(s,1):".."===e&&t.splice(s-1,2),t),e);return s.join("/")})(p);const S=g?.getVisitorParamsState().get("dxfs");let C=u.get(p);if(!C){const t="http://schemas.openxmlformats.org/officeDocument/2006/relationships/worksheet";if(d.type===t){const t={};C=t;const s=async()=>{const s=((t,s,c,h,u,d,p)=>{const g=new ct,f=new i.TransposedBuilder;let m=null;g.registerVisitor({from:"autoFilter",to:"filter",openTag:t=>{t.copyTo("ref",lt)}}),g.registerVisitor({from:"conditionalFormatting",to:{},openTag:t=>{const e=t.getParent();e.conditionals||(e.conditionals=[]),e.conditionals.push(t.getSource());const s=t.getAttribute("sqref");s&&(t.getSource().ref=s.split(" ").join(",")),t.copyTo("pivot",rt)},closeTag:t=>{const e=t.getSource();if(e.rule){const t=Object.keys(e.rule);for(let s=0;s<t.length;s++){const i=t[s];"rule"!==i&&(e[i]=e.rule[i])}}delete e.rule}}),g.registerVisitor({from:"cfRule",to:"rule",openTag:t=>{const e=t.getParent();t.copyToObject(e,"type",lt),t.copyToObject(e,"priority",nt),t.copyToObject(e,"stopIfTrue",rt);const s=t.getAttribute("dxfId",nt);if(null!==s){let i=h?.get(s);i||(d?.(`Unable to load conditional color. Invalid dxfI: '${s}' at '${t.getPath()}'.`),i={}),e.style=i}t.copyToObject(e,"aboveAverage",rt),t.copyToObject(e,"equalAverage",rt),t.copyToObject(e,"stdDev",nt),t.copyToObject(e,"bottom",rt),t.copyToObject(e,"percent",rt),t.copyToObject(e,"rank",nt),t.copyToObject(e,"operator",lt),t.copyToObject(e,"text",lt),t.copyToObject(e,"timePeriod",lt)}}),g.registerVisitor({from:"colorScale",to:"colorScale"}),g.registerVisitor({from:"dataBar",to:"dataBar",openTag:t=>{t.copyTo("maxLength",nt),t.copyTo("minLength",nt),t.copyTo("showValue",rt)}}),g.registerVisitor({from:"iconSet",to:"iconSet",openTag:t=>{t.copyTo("iconSet",lt),t.copyTo("reverse",rt),t.copyTo("showValue",rt)}}),g.registerVisitor({from:"formula",to:null,text:(t,e)=>{const s=e.getParent();let i=s.formulas;i||(i=[],s.formulas=i),i.push(t)}}),g.registerVisitor({from:"cfvo",to:{},openTag:t=>{const e=t.getParent();e.conditions||(e.conditions=[]),e.conditions.push(t.getSource()),t.copyTo("type",lt),t.copyTo("value",at,"val"),t.copyTo("gte",rt)}}),g.registerVisitor({from:"color",to:{},openTag:t=>{const e=t.getParent();e.colors||(e.colors=[]);const s=gt(e=>t.getAttribute(e));e.colors.push(s)}}),g.registerVisitor({from:"filterColumn",to:"filterColumn",openTag:t=>{const e=t.getParent();e.fields||(e.fields=[]),e.fields.push(t.getSource()),t.copyTo("offset",nt,"colId"),t.copyTo("hiddenButton",rt),t.copyTo("showButton",rt)}}),g.registerVisitor({from:"colorFilter",to:"colorFilter",openTag:t=>{const e=t.getParent();e.criteria||(e.criteria=[]),e.criteria.push(t.getSource()),t.getSource().type=o.Type.Color,t.copyTo("cellColor",rt),t.copyTo("styleId",nt,"dxfId")}}),g.registerVisitor({from:"dynamicFilter",to:"dynamicFilter",openTag:t=>{const e=t.getParent();e.criteria||(e.criteria=[]),e.criteria.push(t.getSource()),t.getSource().type=o.Type.Dynamic,t.copyTo("dynamicType",lt,"type"),t.copyTo("val",at),t.copyTo("maxVal",at,"maxVal")}}),g.registerVisitor({from:"iconFilter",to:"iconFilter",openTag:t=>{const e=t.getParent();e.criteria||(e.criteria=[]),e.criteria.push(t.getSource()),t.getSource().type=o.Type.Icon,t.copyTo("iconId",nt),t.copyTo("iconSet",lt)}}),g.registerVisitor({from:"top10",to:"top10",openTag:t=>{const e=t.getParent();e.criteria||(e.criteria=[]),e.criteria.push(t.getSource()),t.getSource().type=o.Type.Top10,t.copyTo("filterVal",at),t.copyTo("percent",rt),t.copyTo("top",rt),t.copyTo("val",at)}}),g.registerVisitor({from:"filters",to:"filters",openTag:t=>{const e=t.getParent();e.criteria||(e.criteria=[]),e.criteria.push(t.getSource()),t.getSource().type=o.Type.Items,t.copyTo("blank",rt),t.copyTo("calendarType",lt)}}),g.registerVisitor({from:"dateGroupItem",to:"dateGroupItem",openTag:t=>{const e=t.getParent();e.dateGroups||(e.dateGroups=[]),e.dateGroups.push(t.getSource()),t.copyTo("group",lt,"dateTimeGrouping"),t.copyTo("day",nt),t.copyTo("hour",nt),t.copyTo("minute",nt),t.copyTo("month",nt),t.copyTo("second",nt),t.copyTo("year",nt)}}),g.registerVisitor({from:"filter",to:"filter",openTag:t=>{const e=t.getParent();e.items||(e.items=[]),e.items.push(t.getAttribute("val",at))}}),g.registerVisitor({from:"customFilters",to:"customFilters",openTag:t=>{const e=t.getParent();e.criteria||(e.criteria=[]),e.criteria.push(t.getSource()),t.getSource().type=o.Type.Custom,t.copyTo("and",rt)}}),g.registerVisitor({from:"customFilter",to:"customFilter",openTag:t=>{const e=t.getParent();e.filters||(e.filters=[]),e.filters.push(t.getSource()),t.copyTo("operator",lt),t.copyTo("value",at,"val")}}),g.registerVisitor({from:"sortState",to:"sort",openTag:t=>{t.copyTo("ref",lt)}}),g.registerVisitor({from:"sortCondition",to:"sortCondition",openTag:t=>{const e=t.getParent();e.fields||(e.fields=[]);const s=t.getSource();e.fields.push(s),t.copyTo("sortOn",lt,"sortBy"),t.copyTo("dxfId",lt,"sortBy"),t.copyTo("iconSet",lt),t.copyTo("customList",lt);const i=t.getAttribute("ref");if(i){const t=r.fastStringToRange(i,St).colStart,o=r.fastStringToRange(e.ref,St),n=o.colStart;s.offset=o?t-n:t}s.reverse=t.getAttribute("descending",rt)??!1}}),g.registerVisitor({from:"AlternateContent",to:null});const T=t=>{m=t.getSource(),t.copyTo("topLeft",lt,"topLeftCell");const e=xt(t.getAttribute("defaultGridColor")),s=t.getAttribute("colorId");null===s||e||(t.getSource().gridLineColor="index"+parseFloat(s)),t.copyTo("showZeros",rt),t.copyTo("showFormulas",rt),t.copyTo("zoomScale",nt),t.copyTo("showRowHeaders",rt,"showRowColHeaders"),t.copyTo("showColumnHeaders",rt,"showRowColHeaders"),t.copyTo("showRowGridlines",rt,"showGridLines"),t.copyTo("showColumnGridlines",rt,"showGridLines")};g.registerVisitor({from:"sheetView",to:"view",openTag:t=>{T(t)},closeTag:()=>{m=null}}),g.registerVisitor({from:"customSheetViews",to:"customSheetViews",openTag:t=>{t.setSource([])}}),g.registerVisitor({from:"customSheetView",to:[],openTag:t=>{T(t)},closeTag:()=>{m=null}}),g.registerVisitor({from:"selection",to:"selection",openTag:t=>{if(!m)return;t.copyTo("cell",lt,"activeCell"),t.copyTo("rangeIndex",nt,"activeCellId");const e=t.getAttribute("activeCell"),s=t.getAttribute("sqref");s&&s!==e&&(t.getSource().ranges=s.split(" "))}}),g.registerVisitor({from:"pane",to:"pane",openTag:t=>{if(m&&"frozen"===t.getAttribute("state")){const e={};m.freezePanes=e,t.copyToObject(e,"topLeft",lt,"topLeftCell");const s=m.topLeft?r.fastStringToCell(m.topLeft):{colIndex:0,rowIndex:0},i={colIndex:0,rowIndex:0};t.copyToObject(i,"colIndex",nt,"xSplit"),t.copyToObject(i,"rowIndex",nt,"ySplit");const o={colIndex:s.colIndex+i.colIndex,rowIndex:s.rowIndex+i.rowIndex};e.coords=r.cellToString(o)}}}),g.registerVisitor({from:"tabColor",to:null,openTag:e=>{const s=gt(t=>e.getAttribute(t));s&&(t.tabColor=s)}}),g.registerVisitor({from:"pageSetUpPr",to:"pageSetUpPr",openTag:t=>{}}),g.registerVisitor({from:"outlinePr",to:"outlinePr",openTag:t=>{}}),g.registerVisitor({from:"pageMargins",to:"pageMargins",openTag:t=>{}}),g.registerVisitor({from:"pageSetup",to:"pageSetup",openTag:t=>{}}),g.registerVisitor({from:"printOptions",to:"printOptions",openTag:t=>{}}),g.registerVisitor({from:"mergeCells",to:"merges",openTag:t=>{t.setSource([])}}),g.registerVisitor({from:"mergeCell",to:[],openTag:t=>{const e=t.getAttribute("ref");t.setSource(e)}}),g.registerVisitor({from:"hyperlinks",to:"hyperlinks",openTag:t=>{t.setSource([])}}),g.registerVisitor({from:"hyperlink",to:[],openTag:t=>{const e=t.getAttribute("r:id"),i=t.getAttribute("ref");if(!i)return void console.warn("No ref found for hyperlink");t.setKey(i);let o=e?s(e):"";if("string"!=typeof o)return void console.warn("Invalid address ",o);const r=t.getAttribute("location");o.endsWith("\\")&&(o=o.substring(0,o.length-1));const n=t.getAttribute("location");if(n&&(r&&r!==n&&console.warn("display and location are different",r,n),o+="#"+n),!o)return void console.warn("No address found for hyperlink. r:id",e);let a;const l=t.getAttribute("tooltip");a=l?{address:o,tooltip:l}:o,t.setSource({r:i,v:a})}}),g.registerVisitor({from:"drawing",to:"movables",openTag:t=>{const e=t.getAttribute("r:id");if(!e)return;const i=s(e);i?t.setSource(i.movables):console.warn("no drawing found for rId",e)}}),g.registerVisitor({from:"tableParts",to:"tables",openTag:t=>{t.setSource([])}}),g.registerVisitor({from:"tablePart",to:[],openTag:t=>{const e=t.getAttribute("r:id");if(!e)return;const i=s(e);i?t.setSource(i):console.warn("no table found for rId",e)}}),g.registerVisitor({from:"worksheet",to:"worksheet",openTag:t=>{}}),g.registerVisitor({from:"sheetProtection",to:"protection",openTag:t=>{let e=!1;if(t.hasAttribute("sheet")&&rt(t.getAttribute("sheet"))&&(e=!0),!e)return void t.setSource(void 0);const s=t=>!0===t||"1"===t||"on"===t||"true"===t||!1===t||"0"===t||"off"===t||"false"===t||null;t.copyTo("autoFilter",s),t.copyTo("deleteColumns",s),t.copyTo("formatCells",s),t.copyTo("formatColumns",s),t.copyTo("formatRows",s),t.copyTo("insertColumns",s),t.copyTo("insertHyperlinks",s),t.copyTo("insertRows",s),t.copyTo("objects",s),t.copyTo("pivotTables",s),t.copyTo("scenarios",s),t.copyTo("selectUnlockedCells",s),t.copyTo("selectUnlockedCells",s),t.copyTo("sort",s);const i={};t.copyToObject(i,"hash",lt,"hashValue"),t.copyToObject(i,"algorithm",lt,"algorithmName"),t.copyToObject(i,"salt",lt,"saltValue"),t.copyToObject(i,"spinCount",nt),Object.keys(i).length>0&&(t.getSource().password=i)}}),g.registerVisitor({from:"protectedRanges",to:"protectedRanges",openTag:t=>{t.setSource({})}}),g.registerVisitor({from:"protectedRange",to:{},openTag:t=>{const e=t.getAttribute("sqref");t.setKey(e),t.copyTo("name"),t.copyTo("securityDescriptor");const s={};t.copyToObject(s,"hash",lt,"hashValue"),t.copyToObject(s,"algorithm",lt,"algorithmName"),t.copyToObject(s,"salt",lt,"saltValue"),t.copyToObject(s,"spinCount",nt),Object.keys(s).length>0&&(t.getSource().password=s)}}),g.registerVisitor({from:"sheetFormatPr",to:"sheetFormatPr",openTag:e=>{e.copyToObject(t,"defaultColSize",at,"defaultColWidth"),e.copyToObject(t,"outlineLevelCol",nt,"outlineLevelCol");const s=e.getAttribute("customHeight");"1"!==s&&"true"!==s||e.copyToObject(t,"defaultRowSize",at,"defaultRowHeight"),e.copyToObject(t,"outlineLevelRow",nt,"outlineLevelRow")}}),g.registerVisitor({from:"cols",to:"cols",openTag:t=>{t.setSource([])}}),g.registerVisitor({from:"col",to:[],openTag:t=>{t.copyTo("min",t=>parseInt(t)-1),t.copyTo("max",t=>parseInt(t)-1),t.copyTo("sz",at,"width"),t.copyTo("cs",rt,"customWidth"),t.copyTo("h",rt,"hidden"),t.copyTo("l",nt,"outlineLevel"),t.copyTo("s",nt,"style")}}),g.registerVisitor({from:"oleObjects",to:null,openTag:t=>{t.warn("'OLE Objects' are not supported.")}});let y=null;const b={onOpenTag:t=>{null===y&&(y="")},onText:t=>{y+=t},onEnd:()=>{const t=c(y);return y=null,t},onError:t=>{}};return((t,s,i,o,c,h)=>{let u=!1,d=!1,p=[],g=!1,f=null,m=null,T=null,y=null,b=null,x=null;const w=h?.get("richData")??[],v=r.normalizeA1ToR1C1,S=n.createConflatingRanges(),C=new Map,k=[];let A=null;const D=n.createConflatingRanges();let E,P=!1,O=-1,I=-1,V=null,L=null;const N=[];let R=null,$=-2,M=0,j="",H="",F="",X="",B="",W="",_="",q="",z="",U="",G="",Z="",Q="",J="",K=!0,Y=null;return{...i,onEnd:()=>{N.length>0&&(s.rows=N);let e=S.done(vt);const o=e.length;if(o>0){const t=new Array(o);for(let s=0;s<o;s++){const i=e[s],o=r.rangeToString(i),n=i.value[1],a=r.resolveRelativeToA1(n,i.rowStart,i.colStart);t[s]=[o,a]}s.formulas=t}const a=D.done(!0),c=a.length;if(c>0){const t=new Array(c);for(let e=0;e<c;e++){const s=a[e],i=r.rangeToString(s);t[e]=i}s.volatile=t}if(k.length>0&&(s.dynamicArray=[...k]),p.length>0){p.sort(n.createRangeComparator(l.Orientation.Column));const t=[];let e=null,i=-1,o=-1,r=-1,a=-1,c=null;const h=p.length;h>0&&(e=p[0],i=e.colStart,o=e.colEnd,r=e.rowEnd,a=e.value,t.push(e));for(let s=1;s<h;s++)c=p[s],a!==c.value||i!==c.colStart||o!==c.colEnd||r+1!==c.rowEnd?(t.push(c),e=c,i=e.colStart,o=e.colEnd,r=e.rowEnd,a=e.value):(r=c.rowEnd,e.rowEnd=r);let u=[];for(let e=0;e<t.length;e++){const s=t[e];u.push({r:{colStart:s.colStart,colEnd:s.colEnd,rowStart:s.rowStart,rowEnd:s.rowEnd},v:s.value})}s.directStyles=u}const h=t.build();if(h){const t=h.tuples;s.data=t}i?.onEnd?.()},onOpenTag:t=>{let e=t.name;const s=e.indexOf(":");if(-1!==s&&(e=e.slice(s+1)),E){const s=t.attributes;switch(e){case"v":d=!0;break;case"f":switch(s.t??null){case null:case"normal":g=!0;break;case"shared":const t=s.si;m=s.ref,f=t;break;case"array":g=!0,m=s.ref,A=[m,!1];break;case"datatable":g=!0,m=s.ref,g=!0}void 0!==s.ca&&D.append(O,I);break;case"is":return void(P=!0)}return void(P&&c?.onOpenTag(t))}if(u){if("c"===e){E=t;const e=t.attributes.r;I=r.fastStringToCol(e);const s=t.attributes.t;void 0===s?L=null:(L=s,"str"===L&&(P=!0));let i=t.attributes.s;void 0!==i&&(i=parseInt(i),Y&&Y.value===i&&Y.colEnd+1===I?Y.colEnd=I:(Y={colStart:I,rowStart:O,colEnd:I,rowEnd:O,value:i},p.push(Y)))}}else{if("row"===e){u=!0;const e=t.attributes.r;if(O=parseInt(e)-1,M=0,H=t.attributes.customHeight,void 0!==H&&(M|=wt.CustomHeight),H!==z&&(K=!0,z=H),j=t.attributes.ht,void 0!==j&&(M|=wt.Ht),j!==q&&(K=!0,q=j),F=t.attributes.hidden,void 0!==F&&(M|=wt.Hidden),F!==U&&(K=!0,U=F),B=t.attributes.s,void 0!==B&&(M|=wt.S),B!==Z&&(K=!0,Z=B),X=t.attributes.customFormat,void 0!==X&&(M|=wt.CustomFormat),X!==G&&(K=!0,G=X),W=t.attributes.outlineLevel,void 0!==W&&(M|=wt.OutlineLevel),W!==Q&&(K=!0,Q=W),_=t.attributes.collapsed,void 0!==_&&(M|=wt.Collapsed),_!==J&&(K=!0,J=_),0!==M)if($+1!==O||K){const t=void 0!==H&&("1"===H||"true"===H),e=void 0!==X&&("1"===X||"true"===X);R={min:O,max:O,sz:t&&void 0!==j?parseFloat(j):-1,csz:t,h:void 0!==F&&("1"===F||"true"===F),s:t&&void 0!==B&&"0"!==B?parseInt(B):0,cs:e,l:void 0===W||"0"===W?0:parseInt(W),cl:void 0!==_&&("1"===_||"true"===_)},N.push(R)}else R.max=O;return $=O,void(K=!1)}i?.onOpenTag(t)}},onCloseTag:e=>{if(E){let s=e.name;const i=s.indexOf(":");if(-1!==i&&(s=s.slice(i+1)),P)if("is"===s||"v"===s){const e=c?.onEnd();null!==e&&t.addValue(O,I,""+e)}else c?.onCloseTag?.(e);return d&&(d=!1),void("c"===s&&(E=null,P=!1))}if(u)return u=!1,void(Y=null);i?.onCloseTag(e)},onText:s=>{if(s=s.trim(),d){switch(V=null,L){case null:case"n":V=parseFloat(s);break;case"b":V="1"===s||"true"===s;break;case"s":V=s;break;case"e":if("#VALUE!"===s){const t=E.attributes.vm;if(void 0!==t){const s=w[parseInt(t)-1];if(s&&s.isFormulaError){V={t:e.Error,v:s.getCode()};break}}}const t=a.getBuiltInByLabel(s);t?V={t:e.Error,v:t.getCode()}:(V=s,o?.(`Unknown formula error '${s}' in cell ${r.cellToString({colIndex:I,rowIndex:O})}`));break;case"str":case"inlineStr":P=!0}null!==V&&t.addValue(O,I,V)}if(A&&("e"===L&&(A[1]=!0),k.push(A),A=null),f)if(b===f)y=x;else{if(y=C.get(f),!y){const t=[];T=v(s,O,I,t),y=[T,t,s],C.set(f,y)}b=f,x=y}if(g){const t=[];T=v(s,O,I,t),y=[T,t,s]}if(y)return S.append(O,I,y),y=null,g=!1,f=null,void(m=null);P?c?.onText(s):u||i?.onText(s)}}})(f,t,g.createEventHandler(t,()=>{},d),d,b,p)})(t,(t,e=!1)=>I(t,p,e)??null,j,S,0,t=>{m&&(t=p+": "+t,m?.(t))},A),h=ht(p,P),d=await(async(t,e=8388608)=>{await(async()=>{if("undefined"==typeof ReadableStream)if("undefined"==typeof window){const{ReadableStream:t}=await import("./BUSR_OK5Qi6hRPfw.mjs");globalThis.ReadableStream=t}else console.warn("Browser does not support ReadableStream; consider loading a polyfill.")})();const s=new TextDecoder("utf-8");let i=0;const o=t instanceof Uint8Array?t:new Uint8Array(t);return new ReadableStream({pull(t){if(i>=o.byteLength)return void t.close();const r=o.subarray(i,Math.min(i+e,o.byteLength)),n=s.decode(r,{stream:i+e<o.byteLength});t.enqueue(n),i+=r.length}}).getReader()})(h);try{await it.parseStream(d,s,{xmlns:!1})}catch(t){throw console.warn(`Error parsing sheet: '${p}'`,t),new Error(`Error parsing sheet: '${p}'`,{cause:t})}const g=O(p,u);let f,T=new Map;if(g){const e="http://schemas.microsoft.com/office/2017/10/relationships/threadedComment";let s;g.forEach((t,s)=>{if(t.type===e){const t=I(s,p,!1,u);f=t?.comments,f&&f.forEach(t=>{T.set(t.id,t)})}});const i="http://schemas.openxmlformats.org/officeDocument/2006/relationships/comments";if(g.forEach((t,e)=>{if(t.type===i){const t=I(e,p,!1,u);s=t}}),s||f){const e=f??[],i=s?.comments;if(i){const t=s?.authors;for(let s=0;s<i.length;s++){const o=i[s];let r=void 0!==o.authorId?t[o.authorId]:void 0;if((!r||r.startsWith("tc="))&&(r=ft(r.substring(3)),T.has(r)))continue;let n=H.get(r);n||(n=F.get(r)),n||(n={id:c.uuidV4(),displayName:r},F.set(n.displayName,n),H.set(n.id,n)),r=n?.id??null;const a={id:c.uuidV4(),personId:r,ref:o.ref,done:!1,asNote:!0,content:o.content};e.push(a)}}t.comments=e}}};E.push(s())}else C=h?ht(p,P,t=>{const e=y.add({buffer:t});return e.addReference(x),v.add(e),b.toResourceId(e)},V):ut(p,P,f,g,V)}return C},V={paramMap:A,getRefs:O,getRef:I,parsedRefs:D,onWarning:m,addPerson:t=>null},L=[];let N=0;p.Strings&&(N=parseInt(p.Strings.Unique??p.Strings.length??0));const R=p.Strings??[];for(let t=0;t<N;t++)L.push(R[t]?.t??"");const $=new Map;let M=N;const j=t=>{const e=$.get(t);if(void 0!==e)return e;const s=M;return $.set(t,M++),L.push(t),s},H=(dt("richstructure",p,f,g,V),dt("richdata",p,f,g,V),new Map),F=new Map,X=dt("people",p,f,g);let B=null;if(X.size>0&&(B=X.entries().next()?.value?.[1]?.persons,B)){const t=B.length;for(let e=0;e<t;e++){const t=B[e];H.set(t.id,t),H.set(t.displayName,t)}}const W=dt("themes",p,f,g,V);let _=null;if(W&&W.entries){let t=W.entries().next();t?.value?.[1]&&(_=t.value[1])}const q=new h(_),z=dt("styles",p,f,g,V);let U=z.entries().next()?.value[1];U&&(U=JSON.parse(u(U)));const G=dt("workbooks",p,f,g,V);await Promise.all(E);const Z={...G.entries().next().value[1],styles:U,theme:q.toJSON()};L.length>0&&(Z.strings=L),B&&B.length>0&&(Z.people=B);const Q={...T,resources:y,json:Z},J=new d(Q);return v.forEach(t=>{t.deleteReference(x)}),b.endPersist(),J}catch(t){let e="Unable to parse XLSX.";throw t instanceof g&&(e="Unable to open XLSX. There are too many rows or columns."),new Error(e,{cause:t})}},toBufferXLSX:async(s,i)=>{const o=await import("./BDVJ7eOPpW5FnEAP.mjs"),r=await s.toJSON(!0),n=o.utils.book_new();for(let i=0;i<r.sheets.length;i++){const a=r.sheets[i],l=o.utils.json_to_sheet([{}]);o.utils.book_append_sheet(n,l,a.name);const c=a.sheet,h=s.getSheetAt(i),u=h.getUsedRange();if(u?(l["!ref"]=u.getA1(),u.forEach((s,i)=>{const o={t:"z"},r=i.getCell().getStyle();if(!r.isNormal()){let e=r.getNumberFormat();e!==t.Type.General&&(e===t.Type.ShortDate?e="m/d/yyyy":e===t.Type.MediumDate?e="d-mmm-yy":e===t.Type.LongDate?e="[$-x-sysdate]dddd, mmmm dd, yyyy":e===t.Type.ShortTime?e="h:mm":e===t.Type.MediumTime?e="h:mm AM/PM":e===t.Type.LongTime&&(e="h:mm:ss AM/PM"),o.z=e)}if(null!==s)switch(i.getType()){case e.Number:o.t="n",o.v=s;break;case e.String:o.t="s",o.v=s;break;case e.Boolean:o.t="b",o.v=s;break;case e.Error:o.t="e",o.v=s.toString();case e.RichData:}l[i.getA1()]=o})):l["!ref"]="A1:A1",c.merges?.length>0){const t=[];l["!merges"]=t;for(let e=0;e<c.merges.length;e++)t.push(o.utils.decode_range(c.merges[e]))}if(c.cols?.length>0){const t=[];l["!cols"]=t;const e=c.cols,s={width:c.defaultColSize??h.getColumnWidthAsFontUnit(h.getColumnHeaders().getDefaultSize())};for(let i=0;i<e.length;i++){const o=e[i];for(let e=t.length;e<=o.min-1;e++)t.push(s);const r={};void 0!==o.sz&&(r.width=o.sz),void 0!==o.h&&(r.hidden=o.h),void 0!==o.l&&(r.level=o.l);for(let e=o.min;e<=o.max;e++)t.push(r)}}}return o.write(n,{type:"array",bookType:"xlsx"}),o.write(n,{type:"array",bookType:"xlsx"})}},Symbol.toStringTag,{value:"Module"}));export{yt as a,xt as b,Tt as c,gt as d,Ct as i,bt as p,ft as r,mt as t};