@sheetxl/io-xlsx 0.8.0-beta.6 → 0.8.0-beta.9
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.
- package/browser/cjs/B0Ugu_crqQYpdfQz.cjs +1 -0
- package/browser/cjs/{qb-YQ8mGwpogSP08.cjs → BHM3_D9PsNURVAVy.cjs} +1 -1
- package/browser/cjs/BHWdwAQ322YA8JAZ.cjs +6 -0
- package/browser/cjs/CeuX8p1aBuKTuagi.cjs +2 -0
- package/browser/cjs/DSM4q1dhVVXvsgby.cjs +30 -0
- package/browser/cjs/DiAHwNv2I8RHE9GY.cjs +1 -0
- package/browser/cjs/index.cjs +1 -1
- package/browser/cjs/wrpXlaSBGEicQf6_.cjs +6 -0
- package/browser/esm/{B3cYXnqV2Zjaw6Jp.mjs → Bu64BYvRAlVftMr1.mjs} +4 -4
- package/browser/esm/{B0E-_6m23g4BDnX6.mjs → C-2KaUyV4gs-sDTZ.mjs} +2 -2
- package/browser/esm/{CGgjL7wM5WHZA6Dt.mjs → CRrTMRdN_IcSA_pm.mjs} +2 -2
- package/browser/esm/{BYENv_UE3Hv5ghGD.mjs → CWt4fDYEbj2hvsl_.mjs} +820 -800
- package/browser/esm/{BLEHoDT0SLbo8OO2.mjs → Ccnxz-y2WBEgfvvh.mjs} +2606 -1408
- package/browser/esm/{k-aEFzUZ8aU9FPf4.mjs → CxtFawTfwRTCC4Xr.mjs} +1 -1
- package/browser/esm/{DdTgGiFy8nAZTQ0d.mjs → D-epcZSoKLbsAIaC.mjs} +2 -2
- package/browser/esm/DsSIg46AR7IFBN5N.mjs +2298 -0
- package/browser/esm/{D01fs7vrCLlmdHoW.mjs → Dx64JMAGwNNDBkC1.mjs} +1555 -1159
- package/browser/esm/Sv4twwEJDb9dZ91h.mjs +149 -0
- package/browser/esm/index.mjs +2 -2
- package/node/esm/{am47EU_k1uSVm7yW.mjs → BCr4lCI6qQXXN0K1.mjs} +2 -2
- package/node/esm/BPn5XBizKkwaUqXB.mjs +4285 -0
- package/node/esm/{D-l0hqYTXUIEFoTg.mjs → BVV11IlqF6Lmlv8D.mjs} +53 -69
- package/node/esm/{Co5_sjvEk9d-x9gx.mjs → BiJEEgltJzx94zIR.mjs} +930 -909
- package/node/esm/{DWF_5NYPdrlTVvHi.mjs → BsTMtvwpQoPNv95M.mjs} +1 -1
- package/node/esm/{ZWSOYqmTKEmEOz2u.mjs → CBtj0-a4l2qux2hA.mjs} +2 -2
- package/node/esm/CkmZuMvRTpva7eQu.mjs +5074 -0
- package/node/esm/index.mjs +4 -4
- package/node/esm/j0RE2usgdljRw_gr.mjs +2345 -0
- package/package.json +3 -3
- package/types/src/AutoFilterRules.d.ts +83 -10
- package/types/src/OOXMLExtensions.d.ts +6 -0
- package/types/src/reader/dom/CustGeomUtils.d.ts +7 -0
- package/types/src/reader/domVisitors/AutoFilterVisitor.d.ts +13 -0
- package/types/src/reader/domVisitors/ColorContainerVisitor.d.ts +7 -1
- package/types/src/reader/domVisitors/DrawingCxnSpVisitor.d.ts +1 -0
- package/types/src/reader/domVisitors/DrawingElementVisitor.d.ts +23 -1
- package/types/src/reader/domVisitors/DrawingGrpSpVisitor.d.ts +9 -0
- package/types/src/reader/domVisitors/DrawingPicVisitor.d.ts +20 -1
- package/types/src/reader/domVisitors/DrawingSpVisitor.d.ts +20 -1
- package/types/src/reader/domVisitors/DrawingVisitor.d.ts +8 -0
- package/types/src/reader/domVisitors/FormControlPrVisitor.d.ts +9 -0
- package/types/src/reader/domVisitors/ShapeTextVisitor.d.ts +44 -0
- package/types/src/reader/domVisitors/TextPropertiesVisitor.d.ts +13 -1
- package/types/src/reader/domVisitors/index.d.ts +4 -2
- package/types/src/reader/saxVisitors/WorksheetVisitor.d.ts +1 -1
- package/types/src/utils/DrawingMLText.d.ts +39 -0
- package/types/src/utils/FormControls.d.ts +97 -0
- package/types/src/writer/builder/Emitter.d.ts +5 -0
- package/types/src/writer/builder/PackageBuilder.d.ts +2 -0
- package/types/src/writer/builder/Types.d.ts +10 -0
- package/types/src/writer/utils/CustGeomUtils.d.ts +5 -0
- package/types/src/writer/utils/DrawMLUtils.d.ts +39 -2
- package/types/src/writer/utils/PrstGeomUtils.d.ts +6 -0
- package/types/src/writer/utils/TextUtils.d.ts +21 -2
- package/browser/cjs/17tMBnuyu4YIxixh.cjs +0 -1
- package/browser/cjs/B7_pDFYCVzt-3hUs.cjs +0 -1
- package/browser/cjs/BxU-OlZIQViQl7gX.cjs +0 -1
- package/browser/cjs/CIpMN7SDVREKQUQE.cjs +0 -6
- package/browser/cjs/DHKWtqZ0vQfXrbq1.cjs +0 -2
- package/browser/cjs/DpZr07y7ifaZGvJ9.cjs +0 -5
- package/browser/cjs/MqKQ_B5qRARrRbO4.cjs +0 -24
- package/browser/esm/96C1ntelYWh7kQtW.mjs +0 -24
- package/browser/esm/FwrsLfi1iEAQGIjj.mjs +0 -2402
- package/browser/esm/gicSNvWtBLkvLsIw.mjs +0 -159
- package/node/esm/B-g20MoPHbZFapp8.mjs +0 -4642
- package/node/esm/Bu9QkKpBW4G2ULAg.mjs +0 -2450
- package/node/esm/CHl-WFsto0oTmBtB.mjs +0 -3051
- package/types/src/reader/domVisitors/HyperlinkVisitor.d.ts +0 -6
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
const e=require("./B7_pDFYCVzt-3hUs.cjs"),t=require("./MqKQ_B5qRARrRbO4.cjs"),n=require("./17tMBnuyu4YIxixh.cjs");let r=require("@sheetxl/utils"),i=require("@sheetxl/sdk");var a=new Uint8Array,o=class e{constructor(e,t,n){this.buffers=new Map,this.zip=e,this.entries=t,this.rawBuffer=n}static normalize(e){return e.startsWith(`/`)?e.slice(1):e}static async create(n){let r=n instanceof Blob?a:n instanceof Uint8Array?n:new Uint8Array(n),i=new t.G(n instanceof Blob?new t.K(n):new t.Y(r)),o=new Map;for(let e of await i.getEntries())e.directory||o.set(e.filename,e);return new e(i,o,r)}getNames(){return[...this.entries.keys()]}has(t){return this.entries.has(e.normalize(t))}uncompressedSize(t){return this.entries.get(e.normalize(t))?.uncompressedSize??0}async getBuffer(n){let r=e.normalize(n),i=this.buffers.get(r);if(i)return i;let a=this.entries.get(r);if(!a)return null;let o=await a.getData(new t.X);return this.buffers.set(r,o),o}async prefetch(e){let n=[];for(let[r,i]of this.entries)!this.buffers.has(r)&&e(r,i)&&n.push(i.getData(new t.X).then(e=>{this.buffers.set(r,e)}));await Promise.all(n)}getEntry(t){return this.buffers.get(e.normalize(t))??null}async getTextStream(t,n){let r=this.entries.get(e.normalize(t));if(!r)return null;let i=new TransformStream;r.getData(i.writable).catch(()=>{});let a=i.readable.getReader(),o=new TextDecoder(`utf-8`);return new ReadableStream({async pull(e){let{value:t,done:r}=await a.read();if(r){let t=o.decode();t&&e.enqueue(t),e.close();return}n?.(t.byteLength);let i=o.decode(t,{stream:!0});i&&e.enqueue(i)}}).getReader()}getRawEntry(t){let n=this.entries.get(e.normalize(t));if(!n||n.encrypted)return null;let r=n.offset;if(r+30>this.rawBuffer.byteLength)return null;let i=new DataView(this.rawBuffer.buffer,this.rawBuffer.byteOffset+r,30);if(i.getUint32(0,!0)!==67324752)return null;let a=r+30+i.getUint16(26,!0)+i.getUint16(28,!0),o=a+n.compressedSize;return o>this.rawBuffer.byteLength?null:{data:this.rawBuffer.subarray(a,o),compressionMethod:n.compressionMethod,signature:n.signature}}async close(){await this.zip.close()}},s=class{constructor(e){this._sink=e,this._samples=[],this._t0=c(),this._tPrev=this._t0,this._heapPrev=l()}mark(e){let t=c(),n=l(),r={label:e,tMs:t-this._t0,dtMs:t-this._tPrev,heapBytes:n,dHeapBytes:n!==void 0&&this._heapPrev!==void 0?n-this._heapPrev:void 0,rssBytes:u()};this._tPrev=t,this._heapPrev=n,this._samples.push(r),this._sink?.(r)}samples(){return this._samples}toTable(){return this._samples.map(e=>({phase:e.label,tMs:Math.round(e.tMs),dtMs:Math.round(e.dtMs),heapMB:e.heapBytes===void 0?`—`:d(e.heapBytes/1048576),dHeapMB:e.dHeapBytes===void 0?`—`:d(e.dHeapBytes/1048576),rssMB:e.rssBytes===void 0?`—`:d(e.rssBytes/1048576)}))}},c=typeof performance==`object`&&typeof performance.now==`function`?()=>performance.now():()=>Date.now();function l(){let e=typeof performance==`object`?performance.memory:void 0;if(e&&typeof e.usedJSHeapSize==`number`)return e.usedJSHeapSize;let t=globalThis.process;return typeof t==`object`&&typeof t.memoryUsage==`function`?t.memoryUsage().heapUsed:void 0}function u(){let e=globalThis.process;if(typeof e==`object`&&typeof e.memoryUsage==`function`)return e.memoryUsage().rss}function d(e){return Math.round(10*e)/10}var f=`:A-Z_a-zÀ-ÖØ-öø-˿Ͱ-ͽͿ-⁰-Ⰰ-、-豈-﷏ﷰ-�𐀀-`,p=`-${f}.0-9·̀-ͯ‿-⁀`,m=(RegExp(`^[${f}]$`,`u`),RegExp(`^[${p}]$`,`u`),RegExp(`^[${f}][${p}]*$`,`u`)),h=(RegExp(`^[${p}]+$`,`u`),[32,10,13,9]);function g(e){return e>=65&&e<=90||e>=97&&e<=122||e===58||e===95||e===8204||e===8205||e>=192&&e<=214||e>=216&&e<=246||e>=248&&e<=767||e>=880&&e<=893||e>=895&&e<=8191||e>=8304&&e<=8591||e>=11264&&e<=12271||e>=12289&&e<=55295||e>=63744&&e<=64975||e>=65008&&e<=65533||e>=65536&&e<=983039}var _=`:A-Z_a-zÀ-ÖØ-öø-˿Ͱ-ͽͿ-⁰-Ⰰ-、-豈-﷏ﷰ-�𐀀-`,v=`-${_}.0-9·̀-ͯ‿-⁀`;RegExp(`^[${_}]$`,`u`),RegExp(`^[${v}]$`,`u`),RegExp(`^[${_}][${v}]*$`,`u`),RegExp(`^[${v}]+$`,`u`);var y=`A-Z_a-zÀ-ÖØ-öø-˿Ͱ-ͽͿ--⁰-Ⰰ-、-豈-﷏ﷰ-�𐀀-`,b=`-${y}.0-9·̀-ͯ‿-⁀`,x=(RegExp(`^[${y}]$`,`u`),RegExp(`^[${b}]$`,`u`),RegExp(`^[${y}][${b}]*$`,`u`));function S(e){return e>=65&&e<=90||e===95||e>=97&&e<=122||e>=192&&e<=214||e>=216&&e<=246||e>=248&&e<=767||e>=880&&e<=893||e>=895&&e<=8191||e>=8204&&e<=8205||e>=8304&&e<=8591||e>=11264&&e<=12271||e>=12289&&e<=55295||e>=63744&&e<=64975||e>=65008&&e<=65533||e>=65536&&e<=983039}var C=function(e){return e===32||e===10||e===13||e===9},w=function(e){return e>=32&&e<=55295||e===10||e===13||e===9||e>=57344&&e<=65533||e>=65536&&e<=1114111},T=g,E=function(e){return g(e)||e>=48&&e<=57||e===45||e===46||e===183||e>=768&&e<=879||e>=8255&&e<=8256},D=h,ee=m,O=function(e){return e>=1&&e<=55295||e>=57344&&e<=65533||e>=65536&&e<=1114111},k=S,A=function(e){return S(e)||e===45||e===46||e>=48&&e<=57||e===183||e>=768&&e<=879||e>=8255&&e<=8256},j=x,M=`http://www.w3.org/XML/1998/namespace`,N=`http://www.w3.org/2000/xmlns/`,te={__proto__:null,xml:M,xmlns:N},ne={__proto__:null,amp:`&`,gt:`>`,lt:`<`,quot:`"`,apos:`'`},P=-1,F=-2,I=13,L=33,R=10,z=60,B=61,V=62,H=63,U=93,W=e=>e===34||e===39,re=[34,39],ie=[...re,91,V],ae=[...re,z,U],oe=[B,H,...D],se=[...D,V,38,z];function G(e,t,n){switch(t){case`xml`:n!==M&&e.fail(`xml prefix must be bound to ${M}.`);break;case`xmlns`:n!==N&&e.fail(`xmlns prefix must be bound to ${N}.`)}switch(n){case N:e.fail(t===``?`the default namespace may not be set to ${n}.`:`may not assign a prefix (even "xmlns") to the URI ${N}.`);break;case M:switch(t){case`xml`:break;case``:e.fail(`the default namespace may not be set to ${n}.`);break;default:e.fail(`may not assign the xml namespace to another prefix.`)}}}var K,ce=e=>j.test(e),le=e=>ee.test(e),ue={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`},de=class{get closed(){return this._closed}constructor(e){this.i=0,this.prevI=0,this.opt=e??{},this.fragmentOpt=!!this.opt.fragment;let t=this.xmlnsOpt=!!this.opt.xmlns;if(this.trackPosition=!1!==this.opt.position,this.fileName=this.opt.fileName,t){this.nameStartCheck=k,this.nameCheck=A,this.isName=ce,this.processAttribs=this.processAttribsNS,this.pushAttrib=this.pushAttribNS,this.ns={__proto__:null,...te};let e=this.opt.additionalNamespaces;e!=null&&(function(e,t){for(let n of Object.keys(t))G(e,n,t[n])}(this,e),Object.assign(this.ns,e))}else this.nameStartCheck=T,this.nameCheck=E,this.isName=le,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()}_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=[];let{fragmentOpt:e}=this;this.state=e?I:0,this.reportedTextBeforeRoot=this.reportedTextAfterRoot=this.closedRoot=this.sawRoot=e,this.xmlDeclPossible=!e,this.xmlDeclExpects=[`version`],this.entityReturnState=void 0;let{defaultXMLVersion:t}=this.opt;if(t===void 0){if(!0===this.opt.forceXMLVersion)throw Error(`forceXMLVersion set but defaultXMLVersion is not set`);t=`1.0`}this.setXMLVersion(t),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(ne),this.readyHandler?.()}get position(){return this.chunkPosition+this.i}get columnIndex(){return this.position-this.positionAtNewLine}on(e,t){this[ue[e]]=t}off(e){this[ue[e]]=void 0}makeError(e){let t=this.fileName??``;return this.trackPosition&&(t.length>0&&(t+=`:`),t+=`${this.line}:${this.column}`),t.length>0&&(t+=`: `),Error(t+e)}fail(e){let t=this.makeError(e),n=this.errorHandler;if(n===void 0)throw t;return n(t),this}write(e){if(this.closed)return this.fail(`cannot write after close.`);let t=!1;e===null?(t=!0,e=``):typeof e==`object`&&(e=e.toString()),this.carriedFromPrevious!==void 0&&(e=`${this.carriedFromPrevious}${e}`,this.carriedFromPrevious=void 0);let n=e.length,r=e.charCodeAt(n-1);!t&&(r===13||r>=55296&&r<=56319)&&(this.carriedFromPrevious=e[n-1],n--,e=e.slice(0,n));let{stateTable:i}=this;for(this.chunk=e,this.i=0;this.i<n;)i[this.state].call(this);return this.chunkPosition+=n,t?this.end():this}close(){return this.write(null)}getCode10(){let e=this.chunk,t=this.i;if(this.prevI=t,this.i++,t>=e.length)return P;let n=e.charCodeAt(t);if(this.column++,n<55296){if(n>=32||n===9)return n;switch(n){case R:return this.line++,this.column=0,this.positionAtNewLine=this.position,R;case 13:return e.charCodeAt(t+1)===R&&(this.i=t+2),this.line++,this.column=0,this.positionAtNewLine=this.position,F;default:return this.fail(`disallowed character.`),n}}if(n>56319)return n>=57344&&n<=65533||this.fail(`disallowed character.`),n;let r=65536+1024*(n-55296)+(e.charCodeAt(t+1)-56320);return this.i=t+2,r>1114111&&this.fail(`disallowed character.`),r}getCode11(){let{chunk:e,i:t}=this;if(this.prevI=t,this.i=t+1,t>=e.length)return P;let n=e.charCodeAt(t);if(this.column++,n<55296){if(n>31&&n<127||n>159&&n!==8232||n===9)return n;switch(n){case R:return this.line++,this.column=0,this.positionAtNewLine=this.position,R;case 13:{let n=e.charCodeAt(t+1);n!==R&&n!==133||(this.i=t+2)}case 133:case 8232:return this.line++,this.column=0,this.positionAtNewLine=this.position,F;default:return this.fail(`disallowed character.`),n}}if(n>56319)return n>=57344&&n<=65533||this.fail(`disallowed character.`),n;let r=65536+1024*(n-55296)+(e.charCodeAt(t+1)-56320);return this.i=t+2,r>1114111&&this.fail(`disallowed character.`),r}getCodeNorm(){let e=this.getCode();return e===F?R:e}unGet(){this.i=this.prevI,this.column--}captureTo(e){let{i:t}=this,{chunk:n}=this;for(;;){let r=this.getCode(),i=r===F,a=i?R:r;if(a===P||e.includes(a))return this.text+=n.slice(t,this.prevI),a;i&&(this.text+=`${n.slice(t,this.prevI)}\n`,t=this.i)}}captureToChar(e){let{i:t}=this,{chunk:n}=this;for(;;){let r=this.getCode();switch(r){case F:this.text+=`${n.slice(t,this.prevI)}\n`,t=this.i,r=R;break;case P:return this.text+=n.slice(t),!1}if(r===e)return this.text+=n.slice(t,this.prevI),!0}}captureNameChars(){let{chunk:e,i:t}=this;for(;;){let n=this.getCode();if(n===P)return this.name+=e.slice(t),P;if(!E(n))return this.name+=e.slice(t,this.prevI),n===F?R:n}}skipSpaces(){for(;;){let e=this.getCodeNorm();if(e===P||!C(e))return e}}setXMLVersion(e){this.currentXMLVersion=e,e===`1.0`?(this.isChar=w,this.getCode=this.getCode10):(this.isChar=O,this.getCode=this.getCode11)}sBegin(){this.chunk.charCodeAt(0)===65279&&(this.i++,this.column++),this.state=1}sBeginWhitespace(){let e=this.i,t=this.skipSpaces();switch(this.prevI!==e&&(this.xmlDeclPossible=!1),t){case z:if(this.state=15,this.text.length!==0)throw Error(`no-empty text at start`);break;case P:break;default:this.unGet(),this.state=I,this.xmlDeclPossible=!1}}sDoctype(){let e=this.captureTo(ie);switch(e){case V:this.doctypeHandler?.(this.text),this.text=``,this.state=I,this.doctype=!0;break;case P:break;default:this.text+=String.fromCodePoint(e),e===91?this.state=4:W(e)&&(this.state=3,this.q=e)}}sDoctypeQuote(){let e=this.q;this.captureToChar(e)&&(this.text+=String.fromCodePoint(e),this.q=null,this.state=2)}sDTD(){let e=this.captureTo(ae);e!==P&&(this.text+=String.fromCodePoint(e),e===U?this.state=2:e===z?this.state=6:W(e)&&(this.state=5,this.q=e))}sDTDQuoted(){let e=this.q;this.captureToChar(e)&&(this.text+=String.fromCodePoint(e),this.state=4,this.q=null)}sDTDOpenWaka(){let e=this.getCodeNorm();switch(this.text+=String.fromCodePoint(e),e){case 33:this.state=7,this.openWakaBang=``;break;case H:this.state=11;break;default:this.state=4}}sDTDOpenWakaBang(){let e=String.fromCodePoint(this.getCodeNorm()),t=this.openWakaBang+=e;this.text+=e,t!==`-`&&(this.state=t===`--`?8:4,this.openWakaBang=``)}sDTDComment(){this.captureToChar(45)&&(this.text+=`-`,this.state=9)}sDTDCommentEnding(){let e=this.getCodeNorm();this.text+=String.fromCodePoint(e),this.state=e===45?10:8}sDTDCommentEnded(){let e=this.getCodeNorm();this.text+=String.fromCodePoint(e),e===V?this.state=4:(this.fail(`malformed comment.`),this.state=8)}sDTDPI(){this.captureToChar(H)&&(this.text+=`?`,this.state=12)}sDTDPIEnding(){let e=this.getCodeNorm();this.text+=String.fromCodePoint(e),e===V&&(this.state=4)}sText(){this.tags.length===0?this.handleTextOutsideRoot():this.handleTextInRoot()}sEntity(){let{i:e}=this,{chunk:t}=this;t:for(;;)switch(this.getCode()){case F:this.entity+=`${t.slice(e,this.prevI)}\n`,e=this.i;break;case 59:{let{entityReturnState:n}=this,r=this.entity+t.slice(e,this.prevI),i;this.state=n,r===``?(this.fail(`empty entity name.`),i=`&;`):(i=this.parseEntity(r),this.entity=``),n===I&&this.textHandler===void 0||(this.text+=i);break t}case P:this.entity+=t.slice(e);break t}}sOpenWaka(){let e=this.getCode();if(T(e))this.state=34,this.unGet(),this.xmlDeclPossible=!1;else switch(e){case 47:this.state=43,this.xmlDeclPossible=!1;break;case 33:this.state=16,this.openWakaBang=``,this.xmlDeclPossible=!1;break;case H:this.state=23;break;default:this.fail(`disallowed character in tag name`),this.state=I,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(){let e=this.getCodeNorm();e===45?(this.state=19,this.commentHandler?.(this.text),this.text=``):(this.text+=`-${String.fromCodePoint(e)}`,this.state=17)}sCommentEnded(){let e=this.getCodeNorm();e===V?this.state=I:(this.fail(`malformed comment.`),this.text+=`--${String.fromCodePoint(e)}`,this.state=17)}sCData(){this.captureToChar(U)&&(this.state=21)}sCDataEnding(){let e=this.getCodeNorm();e===U?this.state=22:(this.text+=`]${String.fromCodePoint(e)}`,this.state=20)}sCDataEnding2(){let e=this.getCodeNorm();switch(e){case V:this.cdataHandler?.(this.text),this.text=``,this.state=I;break;case U:this.text+=`]`;break;default:this.text+=`]]${String.fromCodePoint(e)}`,this.state=20}}sPIFirstChar(){let e=this.getCodeNorm();this.nameStartCheck(e)?(this.piTarget+=String.fromCodePoint(e),this.state=24):e===H||C(e)?(this.fail(`processing instruction without a target.`),this.state=e===H?26:25):(this.fail(`disallowed character in processing instruction name.`),this.piTarget+=String.fromCodePoint(e),this.state=24)}sPIRest(){let{chunk:e,i:t}=this;for(;;){let n=this.getCodeNorm();if(n===P)return void(this.piTarget+=e.slice(t));if(!this.nameCheck(n)){this.piTarget+=e.slice(t,this.prevI);let r=n===H;r||C(n)?this.piTarget===`xml`?(this.xmlDeclPossible||this.fail(`an XML declaration must be at the start of the document.`),this.state=r?L:27):this.state=r?26:25:(this.fail(`disallowed character in processing instruction name.`),this.piTarget+=String.fromCodePoint(n));break}}}sPIBody(){if(this.text.length===0){let e=this.getCodeNorm();e===H?this.state=26:C(e)||(this.text=String.fromCodePoint(e))}else this.captureToChar(H)&&(this.state=26)}sPIEnding(){let e=this.getCodeNorm();if(e===V){let{piTarget:e}=this;e.toLowerCase()===`xml`&&this.fail(`the XML declaration must appear at the start of the document.`),this.piHandler?.({target:e,body:this.text}),this.piTarget=this.text=``,this.state=I}else e===H?this.text+=`?`:(this.text+=`?${String.fromCodePoint(e)}`,this.state=25);this.xmlDeclPossible=!1}sXMLDeclNameStart(){let e=this.skipSpaces();e===H?this.state=L:e!==P&&(this.state=28,this.name=String.fromCodePoint(e))}sXMLDeclName(){let e=this.captureTo(oe);if(e===H)return this.state=L,this.name+=this.text,this.text=``,void this.fail(`XML declaration is incomplete.`);if(C(e)||e===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=e===B?30:29}}sXMLDeclEq(){let e=this.getCodeNorm();if(e===H)return this.state=L,void this.fail(`XML declaration is incomplete.`);C(e)||(e!==B&&this.fail(`value required.`),this.state=30)}sXMLDeclValueStart(){let e=this.getCodeNorm();if(e===H)return this.state=L,void this.fail(`XML declaration is incomplete.`);C(e)||(W(e)?this.q=e:(this.fail(`value must be quoted.`),this.q=32),this.state=31)}sXMLDeclValue(){let e=this.captureTo([this.q,H]);if(e===H)return this.state=L,this.text=``,void this.fail(`XML declaration is incomplete.`);if(e===P)return;let t=this.text;switch(this.text=``,this.name){case`version`:{this.xmlDeclExpects=[`encoding`,`standalone`];let e=t;this.xmlDecl.version=e,/^1\.[0-9]+$/.test(e)?this.opt.forceXMLVersion||this.setXMLVersion(e):this.fail(`version number must match /^1\\.[0-9]+$/.`);break}case`encoding`:/^[A-Za-z][A-Za-z0-9._-]*$/.test(t)||this.fail(`encoding value must match /^[A-Za-z0-9][A-Za-z0-9._-]*$/.`),this.xmlDeclExpects=[`standalone`],this.xmlDecl.encoding=t;break;case`standalone`:t!==`yes`&&t!==`no`&&this.fail(`standalone value must match "yes" or "no".`),this.xmlDeclExpects=[],this.xmlDecl.standalone=t}this.name=``,this.state=32}sXMLDeclSeparator(){let e=this.getCodeNorm();e===H?this.state=L:(C(e)||(this.fail(`whitespace required.`),this.unGet()),this.state=27)}sXMLDeclEnding(){this.getCodeNorm()===V?(this.piTarget===`xml`?this.name!==`version`&&this.xmlDeclExpects.includes(`version`)&&this.fail(`XML declaration must contain a version.`):this.fail(`processing instructions are not allowed before root.`),this.xmlDeclHandler?.(this.xmlDecl),this.name=``,this.piTarget=this.text=``,this.state=I):this.fail(`The character ? is disallowed anywhere in XML declarations.`),this.xmlDeclPossible=!1}sOpenTag(){let e=this.captureNameChars();if(e===P)return;let t=this.tag={name:this.name,attributes:Object.create(null)};switch(this.name=``,this.xmlnsOpt&&(this.topNS=t.ns=Object.create(null)),this.openTagStartHandler?.(t),this.sawRoot=!0,!this.fragmentOpt&&this.closedRoot&&this.fail(`documents may contain only one root.`),e){case V:this.openTag();break;case 47:this.state=35;break;default:C(e)||this.fail(`disallowed character in tag name.`),this.state=36}}sOpenTagSlash(){this.getCode()===V?this.openSelfClosingTag():(this.fail(`forward-slash in opening tag not followed by >.`),this.state=36)}sAttrib(){let e=this.skipSpaces();e!==P&&(T(e)?(this.unGet(),this.state=37):e===V?this.openTag():e===47?this.state=35:this.fail(`disallowed character in attribute name.`))}sAttribName(){let e=this.captureNameChars();e===B?this.state=39:C(e)?this.state=38:e===V?(this.fail(`attribute without value.`),this.pushAttrib(this.name,this.name),this.name=this.text=``,this.openTag()):e!==P&&this.fail(`disallowed character in attribute name.`)}sAttribNameSawWhite(){let e=this.skipSpaces();switch(e){case P:return;case B:this.state=39;break;default:this.fail(`attribute without value.`),this.text=``,this.name=``,e===V?this.openTag():T(e)?(this.unGet(),this.state=37):(this.fail(`disallowed character in attribute name.`),this.state=36)}}sAttribValue(){let e=this.getCodeNorm();W(e)?(this.q=e,this.state=40):C(e)||(this.fail(`unquoted attribute value.`),this.state=42,this.unGet())}sAttribValueQuoted(){let{q:e,chunk:t}=this,{i:n}=this;for(;;)switch(this.getCode()){case e:this.pushAttrib(this.name,this.text+t.slice(n,this.prevI)),this.name=this.text=``,this.q=null,this.state=41;return;case 38:this.text+=t.slice(n,this.prevI),this.state=14,this.entityReturnState=40;return;case R:case F:case 9:this.text+=`${t.slice(n,this.prevI)} `,n=this.i;break;case z:this.text+=t.slice(n,this.prevI),this.fail(`disallowed character.`);return;case P:this.text+=t.slice(n);return}}sAttribValueClosed(){let e=this.getCodeNorm();C(e)?this.state=36:e===V?this.openTag():e===47?this.state=35:T(e)?(this.fail(`no whitespace between attributes.`),this.unGet(),this.state=37):this.fail(`disallowed character in attribute name.`)}sAttribValueUnquoted(){let e=this.captureTo(se);switch(e){case 38:this.state=14,this.entityReturnState=42;break;case z:this.fail(`disallowed character.`);break;case P:break;default:this.text.includes(`]]>`)&&this.fail(`the string "]]>" is disallowed in char data.`),this.pushAttrib(this.name,this.text),this.name=this.text=``,e===V?this.openTag():this.state=36}}sCloseTag(){let e=this.captureNameChars();e===V?this.closeTag():C(e)?this.state=44:e!==P&&this.fail(`disallowed character in closing tag.`)}sCloseTagSawWhite(){switch(this.skipSpaces()){case V:this.closeTag();break;case P:break;default:this.fail(`disallowed character in closing tag.`)}}handleTextInRoot(){let{i:e,forbiddenState:t}=this,{chunk:n,textHandler:r}=this;t:for(;;)switch(this.getCode()){case z:if(this.state=15,r!==void 0){let{text:t}=this,i=n.slice(e,this.prevI);t.length===0?i.length!==0&&r(i):(r(t+i),this.text=``)}t=0;break t;case 38:this.state=14,this.entityReturnState=I,r!==void 0&&(this.text+=n.slice(e,this.prevI)),t=0;break t;case U:switch(t){case 0:t=1;break;case 1:t=2;break;case 2:break;default:throw Error(`impossible state`)}break;case V:t===2&&this.fail(`the string "]]>" is disallowed in char data.`),t=0;break;case F:r!==void 0&&(this.text+=`${n.slice(e,this.prevI)}\n`),e=this.i,t=0;break;case P:r!==void 0&&(this.text+=n.slice(e));break t;default:t=0}this.forbiddenState=t}handleTextOutsideRoot(){let{i:e}=this,{chunk:t,textHandler:n}=this,r=!1;t:for(;;){let i=this.getCode();switch(i){case z:if(this.state=15,n!==void 0){let{text:r}=this,i=t.slice(e,this.prevI);r.length===0?i.length!==0&&n(i):(n(r+i),this.text=``)}break t;case 38:this.state=14,this.entityReturnState=I,n!==void 0&&(this.text+=t.slice(e,this.prevI)),r=!0;break t;case F:n!==void 0&&(this.text+=`${t.slice(e,this.prevI)}\n`),e=this.i;break;case P:n!==void 0&&(this.text+=t.slice(e));break t;default:C(i)||(r=!0)}}r&&(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(e,t){let{prefix:n,local:r}=this.qName(e),i={name:e,prefix:n,local:r,value:t};if(this.attribList.push(i),this.attributeHandler?.(i),n===`xmlns`){let e=t.trim();this.currentXMLVersion===`1.0`&&e===``&&this.fail(`invalid attempt to undefine prefix in XML 1.0`),this.topNS[r]=e,G(this,r,e)}else if(e===`xmlns`){let e=t.trim();this.topNS[``]=e,G(this,``,e)}}pushAttribPlain(e,t){let n={name:e,value:t};this.attribList.push(n),this.attributeHandler?.(n)}end(){this.sawRoot||this.fail(`document must contain a root element.`);let{tags:e}=this;for(;e.length>0;){let t=e.pop();this.fail(`unclosed tag: ${t.name}`)}this.state!==0&&this.state!==I&&this.fail(`unexpected end.`);let{text:t}=this;return t.length!==0&&(this.textHandler?.(t),this.text=``),this._closed=!0,this.endHandler?.(),this._init(),this}resolve(e){let t=this.topNS[e];if(t!==void 0)return t;let{tags:n}=this;for(let r=n.length-1;r>=0;r--)if(t=n[r].ns[e],t!==void 0)return t;return t=this.ns[e],t===void 0?this.opt.resolvePrefix?.(e):t}qName(e){let t=e.indexOf(`:`);if(t===-1)return{prefix:``,local:e};let n=e.slice(t+1),r=e.slice(0,t);return(r===``||n===``||n.includes(`:`))&&this.fail(`malformed name: ${e}.`),{prefix:r,local:n}}processAttribsNS(){let{attribList:e}=this,t=this.tag;{let{prefix:e,local:n}=this.qName(t.name);t.prefix=e,t.local=n;let r=t.uri=this.resolve(e)??``;e!==``&&(e===`xmlns`&&this.fail(`tags may not have "xmlns" as prefix.`),r===``&&(this.fail(`unbound namespace prefix: ${JSON.stringify(e)}.`),t.uri=e))}if(e.length===0)return;let{attributes:n}=t,r=new Set;for(let t of e){let{name:e,prefix:i,local:a}=t,o,s;i===``?(o=e===`xmlns`?N:``,s=e):(o=this.resolve(i),o===void 0&&(this.fail(`unbound namespace prefix: ${JSON.stringify(i)}.`),o=i),s=`{${o}}${a}`),r.has(s)&&this.fail(`duplicate attribute: ${s}.`),r.add(s),t.uri=o,n[e]=t}this.attribList=[]}processAttribsPlain(){let{attribList:e}=this,t=this.tag.attributes;for(let{name:n,value:r}of e)t[n]!==void 0&&this.fail(`duplicate attribute: ${n}.`),t[n]=r;this.attribList=[]}openTag(){this.processAttribs();let{tags:e}=this,t=this.tag;t.isSelfClosing=!1,this.openTagHandler?.(t),e.push(t),this.state=I,this.name=``}openSelfClosingTag(){this.processAttribs();let{tags:e}=this,t=this.tag;t.isSelfClosing=!0,this.openTagHandler?.(t),this.closeTagHandler?.(t),(this.tag=e[e.length-1]??null)===null&&(this.closedRoot=!0),this.state=I,this.name=``}closeTag(){let{tags:e,name:t}=this;if(this.state=I,this.name=``,t===``)return this.fail(`weird empty close tag.`),void(this.text+=`</>`);let n=this.closeTagHandler,r=e.length;for(;r-->0;){let r=this.tag=e.pop();if(this.topNS=r.ns,n?.(r),r.name===t)break;this.fail(`unexpected close tag: ${t}.`)}r===0?this.closedRoot=!0:r<0&&(this.fail(`unmatched closing tag: ${t}.`),this.text+=`</${t}>`)}parseEntity(e){if(e[0]!==`#`){let t=this.ENTITIES[e];return t===void 0?(this.fail(this.isName(e)?`undefined entity.`:`disallowed character in entity name.`),`&${e};`):t}let t=NaN;return e[1]===`x`&&/^#x[0-9a-f]+$/i.test(e)?t=parseInt(e.slice(2),16):/^#[0-9]+$/.test(e)&&(t=parseInt(e.slice(1),10)),this.isChar(t)?String.fromCodePoint(t):(this.fail(`malformed character entity.`),`&${e};`)}},fe=/&(#x[0-9a-fA-F]+|#[0-9]+|amp|lt|gt|quot|apos);/g,pe={amp:`&`,lt:`<`,gt:`>`,quot:`"`,apos:`'`},me=(e,t)=>{let n=pe[t];if(n!==void 0)return n;let r=t.charCodeAt(1)===120?parseInt(t.slice(2),16):parseInt(t.slice(1),10);return r>0&&r<=1114111?String.fromCodePoint(r):e},he=e=>{let t=e;return t.indexOf(`\r`)!==-1&&(t=t.replace(/\r\n?/g,`
|
|
2
|
-
`)),t.indexOf(`&`)!==-1&&(t=t.replace(fe,me)),t},q=e=>{let t=e,n=t.length;for(let e=0;e<n;e++){let n=t.charCodeAt(e);if(n===9||n===10||n===13){t=t.replace(/\r\n|[\t\n\r]/g,` `);break}}return t.indexOf(`&`)!==-1&&(t=t.replace(fe,me)),t},ge=e=>e===32||e===9||e===10||e===13,_e=class e{constructor(){this._openTagHandler=void 0,this._closeTagHandler=void 0,this._textHandler=void 0,this._cdataHandler=void 0,this._errorHandler=void 0,this._endHandler=void 0,this._scanners=null,this._carry=``,this._text=``,this._tags=[],this._sawRoot=!1,this._closed=!1}static{this.NEED_MORE=-1}static{this.NOT_HANDLED=-2}static decodeText(e){return he(e)}on(e,t){switch(e){case`opentag`:this._openTagHandler=t;break;case`closetag`:this._closeTagHandler=t;break;case`text`:this._textHandler=t;break;case`cdata`:this._cdataHandler=t;break;case`error`:this._errorHandler=t;break;case`end`:this._endHandler=t}}setElementScanners(e){if(!e||e.length===0)return void(this._scanners=null);let t=Array(128);for(let n of e){let e=n.name.charCodeAt(0);if(!(e<128)||t[e]!==void 0)throw Error(`Element scanner '${n.name}' needs an ASCII first character no other scanner uses.`);t[e]=n}this._scanners=t}fail(e){let t=Error(e),n=this._errorHandler;if(n===void 0)throw t;n(t)}write(e){if(this._closed)return this.fail(`cannot write after close.`),this;let t=e;this._carry.length!==0&&(t=this._carry+e,this._carry=``);let n=t.length,r=0;for(;r<n;){let e=t.indexOf(`<`,r);if(e===-1)return this._text+=t.slice(r),this;e>r&&(this._text+=t.slice(r,e));let i=this._markup(t,e,n);if(i===-1)return this._carry=t.slice(e),this;r=i}return this}close(){this._carry.length!==0&&(this.fail(`unexpected end.`),this._carry=``),this._sawRoot||this.fail(`document must contain a root element.`);let e=this._tags;for(;e.length>0;){let t=e.pop();this.fail(`unclosed tag: ${t.name}`)}return this._flushText(),this._closed=!0,this._endHandler?.(),this}_flushText(){let e=this._text;if(e.length===0)return;this._text=``;let t=this._textHandler;t!==void 0&&this._tags.length!==0&&t(he(e))}_markup(t,n,r){if(n+1>=r)return-1;let i=t.charCodeAt(n+1);if(i===47){let e=t.indexOf(`>`,n+2);return e===-1?-1:(this._flushText(),this._closeTag(t.slice(n+2,e).trimEnd()),e+1)}if(i===63){let e=t.indexOf(`?>`,n+2);return e===-1?-1:e+2}if(i===33){if(n+4>r)return-1;if(t.charCodeAt(n+2)===45&&t.charCodeAt(n+3)===45){let e=t.indexOf(`-->`,n+4);return e===-1?-1:e+3}if(n+9>r)return-1;if(t.startsWith(`[CDATA[`,n+2)){let e=t.indexOf(`]]>`,n+9);return e===-1?-1:(this._flushText(),this._cdataHandler?.(t.slice(n+9,e)),e+3)}let e=t.indexOf(`[`,n+2),i=t.indexOf(`>`,n+2);if(i===-1)return-1;if(e!==-1&&e<i){let n=t.indexOf(`]>`,e);return n===-1?-1:n+2}return i+1}let a=this._scanners;if(a!==null){let o=i<128?a[i]:void 0;if(o!==void 0&&t.startsWith(o.name,n+1)){let i=n+1+o.name.length;if(i>=r)return-1;let a=t.charCodeAt(i);if(a===62||a===47||ge(a)){this._flushText();let i=o.scan(t,n,r);if(i!==e.NOT_HANDLED){if(i!==e.NEED_MORE){this._sawRoot=!0;let e=o.openTag;e!==void 0&&this._tags.push(e)}return i}}}}return this._openTag(t,n,r)}_openTag(e,t,n){let r=t+1,i=0;for(;r<n&&(i=e.charCodeAt(r),i!==62&&i!==47&&!ge(i));)r++;if(r>=n)return-1;let a=e.slice(t+1,r),o={},s=!1;for(;;){for(;r<n&&ge(i=e.charCodeAt(r));)r++;if(r>=n)return-1;if(i===62){r++;break}if(i===47){if(r+1>=n)return-1;if(e.charCodeAt(r+1)!==62){this.fail(`forward-slash in opening tag not followed by >.`),r++;continue}s=!0,r+=2;break}let t=r;for(;r<n&&(i=e.charCodeAt(r),i!==61&&i!==62&&i!==47&&!ge(i));)r++;if(r>=n)return-1;let a=e.slice(t,r);for(;r<n&&ge(i=e.charCodeAt(r));)r++;if(r>=n)return-1;if(i!==61){this.fail(`attribute without value.`);continue}for(r++;r<n&&ge(i=e.charCodeAt(r));)r++;if(r>=n)return-1;if(i!==34&&i!==39){this.fail(`unquoted attribute value.`);continue}let c=e.indexOf(i===34?`"`:`'`,r+1);if(c===-1)return-1;a!==`__proto__`&&(o[a]=q(e.slice(r+1,c))),r=c+1}this._flushText(),this._sawRoot=!0;let c={name:a,attributes:o,isSelfClosing:s};return this._openTagHandler?.(c),s?this._closeTagHandler?.(c):this._tags.push(c),r}_closeTag(e){if(e===``)return void this.fail(`weird empty close tag.`);let t=this._tags,n=this._closeTagHandler,r=t.length;for(;r-->0;){let r=t.pop();if(n?.(r),r.name===e)return;this.fail(`unexpected close tag: ${e}.`)}this.fail(`unmatched closing tag: ${e}.`)}};(function(e){e.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`},e.parseStream=async(e,t,n)=>{if(n?.lean)return(async(e,t)=>{let n=new _e,r;t.elementScanners&&n.setElementScanners(t.elementScanners),t.onOpenTag&&n.on(`opentag`,t.onOpenTag),t.onCloseTag&&n.on(`closetag`,t.onCloseTag),t.onText&&n.on(`text`,t.onText),t.onError&&n.on(`error`,t.onError);let i=t.onEnd;for(i&&n.on(`end`,()=>{r=i()});;){let{value:t,done:r}=await e.read();if(r)break;n.write(t)}return n.close(),r})(e,t);let r=new de({position:!1,...n}),i;t.onOpenTagStart&&r.on(K.Events.OpenTagStart,t.onOpenTagStart),t.onOpenTag&&r.on(K.Events.OpenTag,t.onOpenTag),t.onCloseTag&&r.on(K.Events.CloseTag,t.onCloseTag),t.onAttribute&&r.on(K.Events.Attribute,t.onAttribute),t.onText&&r.on(K.Events.Text,t.onText),t.onError&&r.on(K.Events.Error,t.onError);let a=t.onEnd;for(a&&r.on(K.Events.End,()=>{i=a()});;){let{value:t,done:n}=await e.read();if(n)break;r.write(t)}return r.close(),i}})(K||={});var J=e=>!0===e||e===`1`||e===`on`||e===`true`||!1!==e&&e!==`0`&&e!==`off`&&e!==`false`&&null,Y=e=>{let t=parseInt(e);return isNaN(t)?null:t},X=e=>{let t=parseFloat(e);return isNaN(t)?null:t},Z=null,Q=e=>e.replace(/&/g,`&`).replace(/</g,`<`).replace(/>/g,`>`),ve=e=>Q(e).replace(/"/g,`"`),$=class{constructor(){this._registeredVisitors=new Map}registerVisitor(e){this._registeredVisitors.set(e.from,e)}createEventHandler(e,t,n){let r=this._registeredVisitors,i=[],a=[],o=null,s=null,c=null,l=null,u=[],d={key:null,source:e,parent:null},f=null,p=!1,m=null,h=null,g=null,_=(e,t)=>{let n=c.attributes[e];if(t){if(Array.isArray(t)){let e=t.length;for(let r=0;r<e;r++)if(n==null||(n=t[r](n),n==null))return}else if(n==null||(n=t(n),n==null))return}return n},v={getSource:()=>f?.source??null,setSource:e=>{f.source=e},setKey:e=>{f.key=e},getFrom:()=>c,getAttribute:(e,t)=>_(e,t)??null,hasAttribute:e=>v.getAttribute(e)!==null,getParent:()=>{let e=u[u.length-2];return e.parent??e.source},getPath:()=>{let e=[],t=a.length;for(let n=0;n<t;n++)e.push(a[n].local);return e.join(`\\`)},parseAttribute:_,getRawXml:()=>g,copyToObject:(e,t,n,r)=>{let i=_(r??t,n);i!==void 0&&(e[t]=i)},copyTo:(e,t,n)=>{let r=_(n??e,t);r!==void 0&&(f.source[e]=r)},warn:(e,t)=>{n?n(e,void 0,t?.onceKey):console.warn(e)}};return{onOpenTag:e=>{let t=e.name,n=t.indexOf(`:`);if(n!==-1&&(t=t.slice(n+1)),m)return m.push((e=>{let t=e.attributes??{},n=`<${e.name}`;for(let e in t){let r=t[e];n+=` ${e}="${ve(typeof r==`string`?r:r?.value??``)}"`}return n+`>`})(e)),o={local:t,tag:e,destination:null},a.push(o),s=t,void(c=e);let g=(i.length>0?i[i.length-1]:r).get(t);if(o={local:t,visitor:g,tag:e,destination:null},p)return a.push(o),s=t,void(c=e);l=o?.visitor??null,s=t,c=e;let _=!!g&&g.to===null;if(g&&!_&&g.scope){let e=g.scope(v);e===null?_=!0:e&&(i.push(e),o.pushedScope=!0)}g&&(a.length===0?(f=d,o.destination=f,o.pushedDestination=!0,u.push(f)):_?(f=null,o.destination=null):g.transparent?o.destination=f:(f={key:null,source:{},parent:null},o.destination=f,o.pushedDestination=!0,u.push(f))),a.push(o),p=_;let y=l?.openTag?.(v);y!==void 0&&(f.parent=y),g?.raw&&!_&&(m=[],h=o)},onCloseTag:e=>{let t=e.name,r=t.indexOf(`:`);if(r!==-1&&(t=t.slice(r+1)),t!==s)throw Error(`mismatch open/close tag: '${t}'/'${s}'`);let _=!1;if(m){if(a[a.length-1]!==h)return m.push(`</${e.name}>`),a.pop(),o=a[a.length-1]??null,s=o?.local??null,void(c=o?.tag??null);g=m.join(``),m=null,h=null,_=!0}p||l?.closeTag?.(v),_&&(g=null);let y=a.pop()??null;o=a[a.length-1]??null,y?.pushedScope&&i.pop();let b=y?.destination;if(b&&y.pushedDestination){u.pop(),f=u[u.length-1]??d;let e=y.visitor;e&&e.to&&b.source!==void 0&&(Array.isArray(e.to)?f.source.push?f.source.push(b.source):n?.(`Unable to parse array for ${e.from} at ${v.getPath()}`):b.key?f.source[b.key]=b.source:typeof e.to==`string`&&(f.source[e.to]=b.source))}else b||(f=u[u.length-1]??d);s=o?.local??null,c=o?.tag??null,l=o?.visitor??null,p=!o?.destination},onText:e=>{m?m.push(Q(e)):l?.text?.(e,v)},onEnd:t}}},ye=`IFERROR(${t.D}(`,be=ye.toUpperCase(),xe=t.E.toUpperCase(),Se={kind:`none`},Ce={kind:`spilled`},we=(e,t)=>{if(e.charCodeAt(t)!==34)return null;let n=``,r=t+1;for(;r<e.length;)if(e.charCodeAt(r)===34){if(e.charCodeAt(r+1)!==34)return{value:n,end:r+1};n+=`"`,r+=2}else n+=e[r],r++;return null},Te=e=>{let t=[],n=0;for(;n<e.length;){let r=e.charCodeAt(n);if(r===34){let t=we(e,n);if(t===null)break;n=t.end;continue}if(!(r>=65&&r<=90||r>=97&&r<=122||r===95)){n++;continue}let i=n+1;for(;i<e.length;){let t=e.charCodeAt(i);if(!(t>=65&&t<=90||t>=97&&t<=122||t>=48&&t<=57||t===95||t===46))break;i++}e.charCodeAt(i)===40&&t.push(e.slice(n,i).toUpperCase().replace(/^_XLFN\./,``).replace(/^_XLWS\./,``)),n=i}return t},Ee=e=>{let t=t=>{if(e)return RegExp(`<(?:[\\w.-]+:)?${t}\\b[^>]*>([^<]*)<`).exec(e)?.[1]},r=e=>{let t=parseInt(e??``,10);return isNaN(t)?0:t};return{c:r(t(`col`)),r:r(t(`row`)),x:n.s(t(`colOff`)??`0`)??0,y:n.s(t(`rowOff`)??`0`)??0}},De=`formulaDialect`,Oe=(e,r,a,o,s,c,l,u)=>{let d=new $,f=u?.get(`parseInlineDxf`),p=u?.get(De),m=e=>p&&e?p.readDetached(e):e,h=new i.Tuple.TransposedBuilder,g=null;d.registerVisitor({from:`autoFilter`,to:`autoTable`,openTag:e=>{let t=e.getAttribute(`ref`),n=i.AddressUtils.fastStringToRange(t);e.getSource().r=n,e.getSource().v={}},closeTag:e=>{let t=e.getSource(),n=t.v,r=n.hiddenButtons;if(Array.isArray(r)){let e=r.length,i=t.r,a=i.colEnd-i.colStart+1;e===0?n.hiddenButtons=!1:e===a&&(n.hiddenButtons=!0)}}}),d.registerVisitor({from:`conditionalFormatting`,to:{},openTag:e=>{let t=e.getParent();t.conditionals||=[];let n=e.getAttribute(`sqref`);n&&=n.trim().split(/\s+/).join(`,`);let r={r:n,conditionals:t.conditionals},i=e.getAttribute(`pivot`,J);i!==null&&(r.pivot=i),e.setSource(r)}}),d.registerVisitor({from:`cfRule`,to:{},openTag:e=>{let t=e.getParent();if(!t?.r)return;let n=e.getSource()??{};t.pivot!==void 0&&(n.pivot=t.pivot),t.conditionals.push({r:t.r,v:null,rule:n}),e.copyToObject(n,`type`,Z),e.copyToObject(n,`priority`,Y),e.copyToObject(n,`stopIfTrue`,J);let r=e.getAttribute(`dxfId`,Y);if(r!==null){let t=o?.get(r);t||=(c?.(`Unable to load conditional color. Invalid dxfI: '${r}' at '${e.getPath()}'.`),{}),n.style=t}e.copyToObject(n,`aboveAverage`,J),e.copyToObject(n,`equalAverage`,J),e.copyToObject(n,`stdDev`,Y),e.copyToObject(n,`bottom`,J),e.copyToObject(n,`percent`,J),e.copyToObject(n,`rank`,Y),e.copyToObject(n,`operator`,Z),e.copyToObject(n,`text`,Z),e.copyToObject(n,`timePeriod`,Z)},closeTag:e=>{let n=e.getParent();if(!n?.r)return;let r=n.conditionals[n.conditionals.length-1],i=r?.rule;if(!i)return;let a={},o=t._(i,c);o&&(a.condition=o),i.style&&(a.style=i.style),i.scale&&(a.scale=i.scale),i.stopIfTrue&&(a.stopIfTrue=!0),i.pivot&&(a.pivot=!0),r.v=a,r.priority=i.priority,i.x14Id&&(r.x14Id=i.x14Id),delete r.rule}});let _=e=>{let t=e.conditions??[],n=[];for(let e=0;e<t.length;e++){let r=t[e],i={};r.type&&(i.type=r.type),r.value!==void 0&&(i.value=r.value),r.exclusive&&(i.exclusive=!0),n.push(i)}return n};d.registerVisitor({from:`colorScale`,to:{},openTag:e=>{},closeTag:e=>{let t=e.getSource(),n=t.colors??[],r=_(t);for(let e=0;e<r.length;e++)r[e].color=n[e];e.getParent().scale={type:i.IConditionalFormat.ScaleType.ColorScale,stops:r}}}),d.registerVisitor({from:`dataBar`,to:{},openTag:e=>{e.copyTo(`maxLength`,Y),e.copyTo(`minLength`,Y),e.copyTo(`showValue`,J)},closeTag:e=>{let t=e.getSource(),n={type:i.IConditionalFormat.ScaleType.DataBar,stops:_(t)},r=t.colors?.[0];r&&(n.color=r),t.minLength!==void 0&&(n.minLength=t.minLength),t.maxLength!==void 0&&(n.maxLength=t.maxLength),t.showValue!==void 0&&(n.showValue=t.showValue),e.getParent().scale=n}}),d.registerVisitor({from:`iconSet`,to:{},openTag:e=>{e.copyTo(`iconSet`,Z),e.copyTo(`reverse`,J),e.copyTo(`showValue`,J)},closeTag:e=>{let t=e.getSource(),n={type:i.IConditionalFormat.ScaleType.IconSet,stops:_(t)};t.iconSet!==void 0&&(n.iconSet=t.iconSet),t.reverse!==void 0&&(n.reverse=t.reverse),t.showValue!==void 0&&(n.showValue=t.showValue),e.getParent().scale=n}}),d.registerVisitor({from:`formula`,to:{},text:(e,t)=>{let n=t.getParent(),r=n.formulas;r||(r=[],n.formulas=r),r.push(m(e))}}),d.registerVisitor({from:`cfvo`,to:{},openTag:e=>{let t=e.getParent();t.conditions||=[];let n=e.getSource();if(t.conditions.push(n),e.copyTo(`type`,Z),n.type===i.IConditionalFormat.ColorStopType.Formula){let t=e.getAttribute(`val`);t!=null&&(n.value=m(String(t)))}else e.copyTo(`value`,X,`val`);!1===e.getAttribute(`gte`,J)&&(n.exclusive=!0)}}),d.registerVisitor({from:`color`,to:{},openTag:e=>{let t=e.getParent();t.colors||=[];let r=n.p(t=>e.getAttribute(t));t.colors.push(r)}}),d.registerVisitor({from:`filterColumn`,to:{},openTag:e=>{let t=e.getParent().v,n=parseInt(e.getAttribute(`colId`)),r=e.getSource();r.index=n;let i=t.filter;i||(i={conditions:[]},t.filter=i);let a=i.conditions;if(a||(a=[],i.conditions=a),a.push(r),e.getAttribute(`hiddenButton`,J)&&t){let e=t.hiddenButtons;e||(e=[],t.hiddenButtons=e),e.push(n)}if(e.getAttribute(`showButton`,J)&&t){let e=t.showButtons;e||(e=[],t.showButtons=e),e.push(n)}return r}}),d.registerVisitor({from:`colorFilter`,openTag:e=>{let t=e.getParent(),n={};t.operator=i.ICondition.BuiltInOperatorNames.Color,t.param=n,e.copyToObject(n,`cellColor`),e.copyToObject(n,`styleId`,Y,`dxfId`)}}),d.registerVisitor({from:`iconFilter`,openTag:e=>{let t=e.getParent(),n={};t.operator=i.ICondition.BuiltInOperatorNames.Icon,t.param=n,e.copyToObject(n,`iconId`,Y),e.copyToObject(n,`iconSet`,Z)}}),d.registerVisitor({from:`top10`,openTag:e=>{let t=e.getParent(),n={};t.operator=i.ICondition.BuiltInOperatorNames.TopN,t.param=n,e.copyToObject(n,`filterVal`,X),e.copyToObject(n,`percent`,J),e.copyToObject(n,`top`,J),e.copyToObject(n,`limit`,X,`val`)}}),d.registerVisitor({from:`dynamicFilter`,openTag:e=>{let t=e.getParent(),n={};t.operator=i.ICondition.BuiltInOperatorNames.TimePeriod,t.param=n;let r=e.getAttribute(`type`);Object.values(i.ICondition.AverageType).includes(r)?(t.operator=i.ICondition.BuiltInOperatorNames.Average,e.copyToObject(n,`stdDevs`,Y,`val`)):e.copyToObject(n,`anchorDate`,Y,`val`),e.copyToObject(n,`operator`,Z,`type`),e.copyToObject(n,`maxVal`,X,`maxVal`)}}),d.registerVisitor({from:`filters`,to:{},openTag:e=>{let t=e.getParent(),n={};return t.operator=i.ICondition.BuiltInOperatorNames.InSet,t.param=n,e.copyToObject(n,`blank`,J),e.copyToObject(n,`calendarType`,Z),n}}),d.registerVisitor({from:`filter`,openTag:e=>{let t=e.getParent(),n=t.items;n||(n=[],t.items=n),n.push(e.getAttribute(`val`,Z))}}),d.registerVisitor({from:`dateGroupItem`,to:{},openTag:e=>{let t=e.getParent(),n=t.dateGroups;n||(n=[],t.dateGroups=n),n.push(e.getSource()),e.copyTo(`group`,Z,`dateTimeGrouping`),e.copyTo(`day`,Y),e.copyTo(`hour`,Y),e.copyTo(`minute`,Y),e.copyTo(`month`,Y),e.copyTo(`second`,Y),e.copyTo(`year`,Y)}}),d.registerVisitor({from:`customFilters`,openTag:e=>{let t=e.getParent(),n=e.getAttribute(`and`),r=n===`and`||n===`1`,a=[];return t.operator=r?i.ICondition.BuiltInOperatorNames.And:i.ICondition.BuiltInOperatorNames.Or,t.param=a,e.setSource(t),a},closeTag:e=>{let t=e.getSource(),n=t?.param;if(n?.length!==1)return;let r=n[0];t.operator=r.operator,t.param=r.param}}),d.registerVisitor({from:`customFilter`,openTag:e=>{let n=e.getParent(),r;Array.isArray(n)?(r={},n.push(r)):r=n;let i=t.h({operator:e.getAttribute(`operator`),val:e.getAttribute(`val`)});i&&(r.operator=i.operator,r.param=i.param)}}),d.registerVisitor({from:`sortState`,to:{},openTag:e=>{let t=e.getParent(),n=t.v;n&&(n.sort={},e.setSource(t))}}),d.registerVisitor({from:`sortCondition`,to:{},openTag:e=>{let t=e.getParent(),n=t.v;if(!n)return;let r=n.sort;if(!r)return;let a=r.sorts;a||(a=[],r.sorts=a);let o=e.getAttribute(`ref`),s=0;if(o){let e=i.AddressUtils.fastStringToRange(o,je).colStart,n=t.r,r=n.colStart;s=n?e-r:e}let c={};e.copyToObject(c,`sortOn`,Z,`sortBy`),e.copyToObject(c,`dxfId`,Z,`sortBy`),e.copyToObject(c,`iconSet`,Z),e.copyToObject(c,`customList`,Z),c.reverse=e.getAttribute(`descending`,J)??!1;let l={index:s,criteria:c};a.push(l)}});let v=e=>{g=e.getSource(),e.copyTo(`topLeft`,Z,`topLeftCell`);let t=n.a(e.getAttribute(`defaultGridColor`)),r=e.getAttribute(`colorId`);r===null||t||(e.getSource().gridLineColor=`index`+parseFloat(r)),e.copyTo(`showZeros`,J),e.copyTo(`showFormulas`,J),e.copyTo(`zoomScale`,Y),e.copyTo(`showRowHeaders`,J,`showRowColHeaders`),e.copyTo(`showColumnHeaders`,J,`showRowColHeaders`),e.copyTo(`showRowGridlines`,J,`showGridLines`),e.copyTo(`showColumnGridlines`,J,`showGridLines`),e.copyTo(`rightToLeft`,J)};d.registerVisitor({from:`sheetView`,to:`view`,openTag:e=>{v(e)},closeTag:()=>{g=null}}),d.registerVisitor({from:`customSheetViews`,to:`customSheetViews`,openTag:e=>{e.setSource([])}}),d.registerVisitor({from:`customSheetView`,to:[],openTag:e=>{v(e)},closeTag:()=>{g=null}}),d.registerVisitor({from:`selection`,to:`selection`,openTag:e=>{if(!g)return;e.copyTo(`cell`,Z,`activeCell`),e.copyTo(`rangeIndex`,Y,`activeCellId`);let t=e.getAttribute(`activeCell`),n=e.getAttribute(`sqref`);n&&n!==t&&(e.getSource().ranges=n.trim().split(/\s+/))}}),d.registerVisitor({from:`pane`,to:null,openTag:e=>{if(g&&e.getAttribute(`state`)===`frozen`){let t={};g.freezePanes=t,e.copyToObject(t,`topLeft`,Z,`topLeftCell`);let n=(g.topLeft?i.AddressUtils.fastStringToCell(g.topLeft):void 0)??{colIndex:0,rowIndex:0},r={colIndex:0,rowIndex:0};e.copyToObject(r,`colIndex`,Y,`xSplit`),e.copyToObject(r,`rowIndex`,Y,`ySplit`);let a={colIndex:n.colIndex+r.colIndex,rowIndex:n.rowIndex+r.rowIndex};t.coords=i.AddressUtils.cellToString(a)}}}),d.registerVisitor({from:`sheetPr`,transparent:!0,openTag:t=>{let n=t.getAttribute(`codeName`);n&&(e.codeName=n),!1===t.getAttribute(`enableFormatConditionsCalculation`,J)&&(e.conditionalFormatCalculation=!1)}}),d.registerVisitor({from:`tabColor`,to:null,openTag:t=>{let r=n.p(e=>t.getAttribute(e));r&&(e.tabColor=r)}}),d.registerVisitor({from:`pageSetUpPr`,to:`pageSetUpPr`,openTag:e=>{}}),d.registerVisitor({from:`outlinePr`,to:null,openTag:t=>{let n={};t.copyToObject(n,`summaryBelow`,J),t.copyToObject(n,`summaryRight`,J),t.copyToObject(n,`showOutlineSymbols`,J),t.copyToObject(n,`applyStyles`,J),Object.keys(n).length>0&&(e.outline=n)}}),d.registerVisitor({from:`pageMargins`,to:`pageMargins`,openTag:e=>{e.copyTo(`bottom`,X),e.copyTo(`footer`,X),e.copyTo(`header`,X),e.copyTo(`left`,X),e.copyTo(`right`,X),e.copyTo(`top`,X),e.copyTo(`bottom`,X)}}),d.registerVisitor({from:`pageSetup`,to:`pageSetup`,openTag:e=>{e.copyTo(`blackAndWhite`,J),e.copyTo(`cellComments`),e.copyTo(`copies`,Y),e.copyTo(`draft`,J),e.copyTo(`errors`),e.copyTo(`firstPageNumber`,Y),e.copyTo(`fitToHeight`,Y),e.copyTo(`fitToWidth`,Y),e.copyTo(`horizontalDpi`,Y),e.copyTo(`orientation`),e.copyTo(`pageOrder`),e.copyTo(`paperSize`,Y),e.copyTo(`scale`,Y),e.copyTo(`useFirstPageNumber`,J),e.copyTo(`usePrinterDefaults`,J),e.copyTo(`verticalDpi`,Y)}}),d.registerVisitor({from:`printOptions`,to:`printOptions`,openTag:e=>{e.copyTo(`gridLines`,J),e.copyTo(`gridLinesSet`,J),e.copyTo(`headings`,J),e.copyTo(`horizontalCentered`,J),e.copyTo(`verticalCentered`,J)}}),d.registerVisitor({from:`headerFoot`,to:`headerFoot`,openTag:e=>{}}),d.registerVisitor({from:`mergeCells`,to:`merges`,openTag:e=>{e.setSource([])}}),d.registerVisitor({from:`dataValidations`,to:`validations`,openTag:e=>{e.setSource([])}});let y={from:`dataValidation`,to:[],openTag:e=>{let t=e.getAttribute(`sqref`);t&&=t.trim().split(/\s+/).join(`,`);let n={},r={r:t,v:n,rule:{type:e.getAttribute(`type`)??void 0,operator:e.getAttribute(`operator`)??void 0}};!0===e.getAttribute(`showDropDown`,J)&&(n.hideDropdown=!0),e.copyToObject(n,`alert`,Z,`error`),e.copyToObject(n,`alertTitle`,Z,`errorTitle`),e.copyToObject(n,`showAlertMessage`,J,`showErrorMessage`),n.alertStyle=e.getAttribute(`errorStyle`)??`stop`,e.copyToObject(n,`imeMode`),e.copyToObject(n,`prompt`),e.copyToObject(n,`promptTitle`),e.copyToObject(n,`showPromptMessage`,J,`showInputMessage`),e.setSource(r)},closeTag:e=>{let n=e.getSource();if(!n?.rule)return;let r=t.f(n.rule,c);r&&(e.getAttribute(`allowBlank`,J)&&(r.includeBlanks=!0),n.v.condition=r),delete n.rule}};d.registerVisitor(y),d.registerVisitor({from:`formula1`,to:{},text:(e,n)=>{let r=n.getParent().rule;r?.type&&(r.formula1=t.u(m(e),r.type))}}),d.registerVisitor({from:`formula2`,to:{},text:(e,n)=>{let r=n.getParent().rule;r?.type&&(r.formula2=t.u(m(e),r.type))}}),d.registerVisitor({from:`picture`,to:`picture`,openTag:e=>{let t=e.getAttribute(`r:id`);if(!t)return void e.warn(`A picture names no image; it was not imported.`,{onceKey:`xlsx.sheet.picture.noRel`});let n=r(t,`resource`);e.getSource().resId=n}});let b={from:`slicer`,to:{},openTag:e=>{let t=e.getAttribute(`r:id`);if(!t)return void e.warn(`A slicer names no cache; it was not imported.`,{onceKey:`xlsx.sheet.slicer.noRel`});let n=r(t)?.slicers,i=e.getParent();i.slicers||={};let a=Object.keys(n);for(let e of a)i.slicers[e]=n[e]}};d.registerVisitor(b);let x=(e,t)=>({from:e,to:{},openTag:e=>{e.setSource(``)},text:(e,t)=>{t.setSource((t.getSource()??``)+e)},closeTag:e=>{t(String(e.getSource()??``),e)}}),S=new Map;S.set(`dataValidations`,{from:`dataValidations`,to:`validations`,openTag:e=>{let t=e.getParent();e.setSource(t.validations??[])},closeTag:e=>{(e.getSource()?.length??0)===0&&e.setSource(void 0)}}),S.set(`dataValidation`,{...y,closeTag:e=>{y.closeTag(e);let t=e.getSource();t&&!t.r&&(e.warn(`x14 dataValidation with no xm:sqref was dropped.`),e.setSource(void 0))}});let C=e=>({from:e,to:{},openTag:t=>{t.setSource({rule:t.getParent()?.rule,key:e})}});S.set(`formula1`,C(`formula1`)),S.set(`formula2`,C(`formula2`)),S.set(`f`,x(`f`,(e,n)=>{let r=n.getParent(),i=r?.rule;i&&(i[r.key]=t.u(m(e),i.type))})),S.set(`sqref`,x(`sqref`,(e,t)=>{let n=t.getParent(),r=e.trim();n&&r&&(n.r=r.split(/\s+/).join(`,`))}));let w=new Map,T=[],E=new Map;E.set(`conditionalFormattings`,{from:`conditionalFormattings`,transparent:!0}),E.set(`conditionalFormatting`,{from:`conditionalFormatting`,to:{},openTag:e=>{e.setSource({rules:[]})},closeTag:e=>{let t=e.getSource(),n=t?.rules??[];for(let e=0;e<n.length;e++){let r=n[e];r.sqref=t.sqref,r.id?w.set(r.id,r):T.push(r)}}}),E.set(`cfRule`,{from:`cfRule`,to:{},openTag:e=>{e.copyTo(`id`,Z),e.copyTo(`type`,Z),e.copyTo(`priority`,Y),e.copyTo(`stopIfTrue`,J),e.copyTo(`operator`,Z),e.copyTo(`text`,Z),e.copyTo(`timePeriod`,Z),e.copyTo(`aboveAverage`,J),e.copyTo(`equalAverage`,J),e.copyTo(`stdDev`,Y),e.copyTo(`bottom`,J),e.copyTo(`percent`,J),e.copyTo(`rank`,Y)},closeTag:e=>{let t=e.getSource();t&&e.getParent()?.rules?.push(t)}}),E.set(`sqref`,x(`sqref`,(e,t)=>{let n=t.getParent(),r=e.trim();n&&r&&(n.sqref=r)})),E.set(`dataBar`,{from:`dataBar`,to:{},openTag:e=>{e.copyTo(`minLength`,Y),e.copyTo(`maxLength`,Y),e.copyTo(`gradient`,J),e.copyTo(`border`,J),e.copyTo(`direction`,Z),e.copyTo(`axisPosition`,Z),e.copyTo(`negativeBarColorSameAsPositive`,J),e.copyTo(`negativeBarBorderColorSameAsPositive`,J)},closeTag:e=>{e.getParent().dataBar=e.getSource()}}),E.set(`iconSet`,{from:`iconSet`,to:{},openTag:e=>{e.copyTo(`iconSet`,Z),e.copyTo(`custom`,J),e.copyTo(`reverse`,J),e.copyTo(`showValue`,J)},closeTag:e=>{e.getParent().iconSet=e.getSource()}});let D=new Map;D.set(`f`,x(`f`,(e,t)=>{let n=t.getParent();if(!n)return;let r=e.trim(),i=Number(r);n.value=r.length>0&&Number.isFinite(i)?i:m(e)})),E.set(`cfvo`,{from:`cfvo`,to:{},scope:()=>D,openTag:e=>{let t=e.getParent();t.conditions||=[];let n=e.getSource();t.conditions.push(n),e.copyTo(`type`,Z),!1===e.getAttribute(`gte`,J)&&(n.exclusive=!0)}}),E.set(`f`,x(`f`,(e,t)=>{let n=t.getParent();n&&(n.formulas??=[]).push(m(e))})),E.set(`dxf`,{from:`dxf`,to:{},raw:!0,closeTag:e=>{if(!f)return;let t=e.getParent();if(!t)return;let n=f(e.getRawXml()??``);n&&(t.style=n)}});let ee=e=>({from:e,to:{},openTag:t=>{let r=n.p(e=>t.getAttribute(e));r&&(t.getParent()[e]=r)}});E.set(`borderColor`,ee(`borderColor`)),E.set(`negativeFillColor`,ee(`negativeFillColor`)),E.set(`negativeBorderColor`,ee(`negativeBorderColor`)),E.set(`axisColor`,ee(`axisColor`)),E.set(`cfIcon`,{from:`cfIcon`,to:{},openTag:e=>{let t=e.getAttribute(`iconSet`),n=e.getAttribute(`iconId`,Y);if(t===null||n===null)return;let r=e.getParent();r.icons||=[],r.icons.push({set:t,id:n})}});let O=new Map;O.set(`id`,x(`id`,(e,t)=>{let n=t.getParent(),r=e.trim();n&&r&&(n.x14Id=r)}));let k=new Map;k.set(`slicerList`,{from:`slicerList`,transparent:!0}),k.set(`slicer`,b);let A=new Map([[t.ct(t.et),S],[t.ct(t.Q),E],[t.ct(t.$),E],[t.ct(t.Z),O],[t.ct(t.tt),k],[t.ct(t.nt),k]]),j=new Set;d.registerVisitor({from:`extLst`,transparent:!0}),d.registerVisitor({from:`ext`,transparent:!0,scope:e=>{let n=e.getAttribute(`uri`),r=t.ct(n),i=A.get(r);if(i)return i;if(!t.at.has(r)&&!j.has(r)){j.add(r);let i=t.ot[r];e.warn(i?`Extension content '${i}' (${n}) is not read; it will be lost on resave.`:`Unknown extension content (uri ${n}) is not read; it will be lost on resave.`)}return null}}),d.registerVisitor({from:`mergeCell`,to:[],openTag:e=>{let t=e.getAttribute(`ref`);e.setSource(t)}}),d.registerVisitor({from:`hyperlinks`,to:`hyperlinks`,openTag:e=>{e.setSource([])}}),d.registerVisitor({from:`hyperlink`,to:[],openTag:e=>{let t=e.getAttribute(`r:id`),n=e.getAttribute(`ref`);if(!n)return void e.warn(`A hyperlink has no ref; it was dropped.`,{onceKey:`xlsx.sheet.hyperlink.noRef`});e.setKey(n);let i=t?r(t):``;if(typeof i!=`string`)return void e.warn(`A hyperlink has an invalid address; it was dropped.`,{onceKey:`xlsx.sheet.hyperlink.address`});i.endsWith(`\\`)&&(i=i.substring(0,i.length-1));let a=e.getAttribute(`location`);if(a&&(i+=`#`+a),!i)return void e.warn(`A hyperlink has no address; it was dropped.`,{onceKey:`xlsx.sheet.hyperlink.address`});let o,s=e.getAttribute(`tooltip`);o=s?{address:i,screenTip:s}:i,e.setSource({r:n,v:o})}}),d.registerVisitor({from:`drawing`,to:`movables`,openTag:e=>{let t=e.getAttribute(`r:id`);if(!t)return;let n=r(t);n?e.setSource(n.movables):e.warn(`A drawing part is missing; its shapes were not imported.`,{onceKey:`xlsx.sheet.drawing.missing`})}}),d.registerVisitor({from:`legacyDrawing`,to:`legacyDrawing`,openTag:e=>{e.setSource(r(e.getAttribute(`r:id`),`legacyDrawing`)??void 0)}}),d.registerVisitor({from:`legacyDrawingHF`,to:`legacyDrawingHF`,openTag:e=>{e.setSource(r(e.getAttribute(`r:id`),`legacyDrawing`)??void 0)}});let M=null,N=!1,te=new Map,ne={from:`Fallback`,to:null},P={from:`Choice`,transparent:!0};te.set(`Fallback`,ne),te.set(`Choice`,P),te.set(`control`,{from:`control`,transparent:!0,openTag:e=>{let t={},n=parseInt(e.getAttribute(`shapeId`)??``,10);isNaN(n)||(t.shapeId=n);let i=e.getAttribute(`r:id`),a=i?r(i,`part`):null;a&&(t.part=a);let o=e.getAttribute(`name`),s={anchor:{tl:{c:0,r:0,x:0,y:0},br:{c:0,r:0,x:0,y:0}},content:{type:`control`,json:t}};o&&(s.content.name=o),M={movable:s,control:t}},closeTag:()=>{M&&=(e.movables||=[],e.movables.push(M.movable),null)}}),te.set(`controlPr`,{from:`controlPr`,transparent:!0,raw:!0,openTag:e=>{if(!M)return;let t=e.getFrom().attributes??{},n={};for(let e in t){let r=t[e];n[e]=typeof r==`string`?r:r?.value??``}Object.keys(n).length>0&&(M.control.props=n)},closeTag:e=>{if(!M)return;let t=(e=>{let t=/<(?:[\w.-]+:)?anchor\b([^>]*)>([\s\S]*?)<\/(?:[\w.-]+:)?anchor>/.exec(e);if(!t)return null;let n=t[2],r=e=>RegExp(`<(?:[\\w.-]+:)?${e}\\b[^>]*>([\\s\\S]*?)<\\/(?:[\\w.-]+:)?${e}>`).exec(n)?.[1],i=t[1],a=/\bmoveWithCells="(?:1|true)"/.test(i),o=/\bsizeWithCells="(?:1|true)"/.test(i);return{anchor:{tl:Ee(r(`from`)),br:Ee(r(`to`))},anchorType:a?o?`twoCell`:`oneCell`:`absolute`,rest:(e.slice(0,t.index)+e.slice(t.index+t[0].length)).trim()}})(e.getRawXml()??``);t?(M.movable.anchor=t.anchor,t.anchorType!==`twoCell`&&(M.movable.anchorType=t.anchorType),t.rest&&(M.control.xml=t.rest)):N||(N=!0,e.warn(`A form control has no anchor; it is placed at the top left of the sheet.`))}});let F={from:`controls`,transparent:!0,scope:()=>te};d.registerVisitor(F);let I=new Map([[`Choice`,P],[`Fallback`,ne],[`controls`,F]]);d.registerVisitor({from:`AlternateContent`,transparent:!0,scope:()=>I}),d.registerVisitor({from:`tableParts`,to:`tables`,openTag:e=>{e.setSource([])}}),d.registerVisitor({from:`tablePart`,to:[],openTag:e=>{let t=e.getAttribute(`r:id`);if(!t)return;let n=r(t);n?e.setSource(n):e.warn(`A table part is missing; the table was not imported.`,{onceKey:`xlsx.sheet.table.missing`})}});let L=(e,t)=>{t.conditions?.length&&(e.stops=_(t)),t.minLength!==void 0&&(e.minLength=t.minLength),t.maxLength!==void 0&&(e.maxLength=t.maxLength),(t.gradient??1)&&(e.gradient=!0),t.border&&t.borderColor&&(e.borderColor=t.borderColor),!t.negativeBarColorSameAsPositive&&t.negativeFillColor&&(e.negativeFillColor=t.negativeFillColor),!(t.negativeBarBorderColorSameAsPositive??1)&&t.negativeBorderColor&&(e.negativeBorderColor=t.negativeBorderColor),t.axisColor&&(e.axisColor=t.axisColor),t.axisPosition!==`middle`&&t.axisPosition!==`none`||(e.axisPosition=t.axisPosition),t.direction!==`leftToRight`&&t.direction!==`rightToLeft`||(e.direction=t.direction)},R=(e,t)=>{t.conditions?.length&&(e.stops=_(t)),t.iconSet&&t.iconSet!==e.iconSet&&(e.iconSet=t.iconSet),t.icons?.length&&(e.icon=t.icons),t.reverse!==void 0&&(e.reverse=t.reverse),t.showValue!==void 0&&(e.showValue=t.showValue)},z=e=>{if(!e.sqref)return null;let n=e.sqref.split(/\s+/).join(`,`);if(e.type===`iconSet`){if(!e.iconSet)return null;let t={type:i.IConditionalFormat.ScaleType.IconSet,stops:[]};return R(t,e.iconSet),{r:n,v:{scale:t},priority:e.priority}}let r=t._(e,c);if(!r)return null;let a={condition:r};return e.style&&(a.style=e.style),e.stopIfTrue&&(a.stopIfTrue=!0),{r:n,v:a,priority:e.priority}};d.registerVisitor({from:`worksheet`,to:{},openTag:e=>{},closeTag:e=>{let t=e.getSource(),n=t?.conditionals;if(n)for(let e=0;e<n.length;e++){let t=n[e],r=t.x14Id;if(!r)continue;delete t.x14Id;let a=w.get(r);if(!a)continue;w.delete(r);let o=t.v?.scale;a.dataBar&&o?.type===i.IConditionalFormat.ScaleType.DataBar?L(o,a.dataBar):a.iconSet&&o?.type===i.IConditionalFormat.ScaleType.IconSet&&R(o,a.iconSet)}let r=[...w.values(),...T],a=new Set,o=0;for(let e=0;e<r.length;e++){let i=z(r[e]);i?(n||(n=[],t.conditionals=n),n.push(i)):(a.add(r[e].type??`unknown`),o++)}if(o>0){let e=[...a].map(e=>`'${e}'`).join(`, `);c?.(o===1?`An x14-only conditional formatting rule (type ${e}) is not read and will be lost on resave.`:`${o} x14-only conditional formatting rules (types ${e}) are not read and will be lost on resave.`)}if(n){n.length>1&&n.sort((e,t)=>(e.priority??1/0)-(t.priority??1/0));for(let e=0;e<n.length;e++)delete n[e].priority}}}),d.registerVisitor({from:`customProperties`,to:`customProperties`,openTag:e=>{e.setSource([])},closeTag:e=>{let t=e.getSource();t.length>0&&(e.getParent().customProperties=t)}}),d.registerVisitor({from:`customPr`,to:{},openTag:e=>{let t=e.getParent();e.copyTo(`name`);let n=e.getAttribute(`r:id`);if(!n)return void e.warn(`A custom property names no part; it was not imported.`,{onceKey:`xlsx.sheet.customProperty.noRel`});let i=r(n,`resource`),a=e.getSource();a.resId=i,t.push(a)}}),d.registerVisitor({from:`sheetProtection`,to:`protection`,openTag:e=>{let n=e.getSource();for(let r of t.v){let i=e.hasAttribute(r.attribute)?e.getAttribute(r.attribute):null;n[r.key]=t.b(r,i)}if(n.sheet)return;let r={};e.copyToObject(r,`hash`,Z,`hashValue`),e.copyToObject(r,`algorithm`,Z,`algorithmName`),e.copyToObject(r,`salt`,Z,`saltValue`),e.copyToObject(r,`spinCount`,Y),Object.keys(r).length>0&&(e.getSource().password=r)}}),d.registerVisitor({from:`protectedRanges`,to:`protectedRanges`,openTag:e=>{e.setSource([])}}),d.registerVisitor({from:`protectedRange`,to:[],openTag:e=>{let t=e.getAttribute(`sqref`);t&&=t.trim().split(/\s+/).join(`,`);let n={},r={r:t,v:n};e.copyToObject(n,`name`),e.copyToObject(n,`securityDescriptor`);let i={};e.copyToObject(i,`hash`,Z,`hashValue`),e.copyToObject(i,`algorithm`,Z,`algorithmName`),e.copyToObject(i,`salt`,Z,`saltValue`),e.copyToObject(i,`spinCount`,Y),Object.keys(i).length>0&&(n.password=i),e.setSource(r)},closeTag:e=>{let t=e.getSource();t?.r&&t.v.name||e.setSource(void 0)}}),d.registerVisitor({from:`sheetFormatPr`,to:`sheetFormatPr`,openTag:t=>{t.copyToObject(e,`defaultColSize`,X,`defaultColWidth`),t.copyToObject(e,`outlineLevelCol`,Y,`outlineLevelCol`);let n=t.getAttribute(`customHeight`);n!==`1`&&n!==`true`||t.copyToObject(e,`defaultRowSize`,X,`defaultRowHeight`),t.copyToObject(e,`outlineLevelRow`,Y,`outlineLevelRow`)}}),d.registerVisitor({from:`cols`,to:`cols`,openTag:e=>{e.setSource([])}}),d.registerVisitor({from:`col`,to:[],openTag:e=>{let t=e.getSource(),n=e.getAttribute(`min`),r=e.getAttribute(`max`),a=n===void 0?0:parseInt(n)-1,o=r===void 0?a:parseInt(r)-1;t.r=i.AddressUtils.runToString(a,o,!0);let s={};t.v=s,e.copyToObject(s,`sz`,X,`width`),e.copyToObject(s,`csz`,J,`customWidth`),e.copyToObject(s,`h`,J,`hidden`),e.copyToObject(s,`l`,Y,`outlineLevel`),e.copyToObject(s,`s`,Y,`style`)}}),d.registerVisitor({from:`oleObjects`,to:null,openTag:e=>{e.warn(`'OLE Objects' are not supported.`)}});let B=!1,V=!1,H=0,U=``,W=e=>{let t=e.indexOf(`:`);return t===-1?e:e.slice(t+1)};return Me(h,e,d.createEventHandler(e,s,c),c,l,{onOpenTag:e=>{B=!0;let t=W(e.name);t===`t`||t===`v`?H===0&&(V=!0):t!==`rPh`&&t!==`phoneticPr`||H++},onText:e=>{V&&(U+=e)},onCloseTag:e=>{let t=W(e.name);t===`t`||t===`v`?V=!1:t!==`rPh`&&t!==`phoneticPr`||H>0&&H--},onEnd:()=>{if(!B)return;let e=a(t.w(U));return B=!1,V=!1,H=0,U=``,e},onError:e=>{}},u)},ke=class{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}},Ae=(e,t,n)=>{if(e[0].value[0]===e[1].value[0])return t},je={colStart:0,colEnd:0,rowStart:0,rowEnd:0},Me=(e,t,n,r,a,o,s)=>{let c=!1,l=!1,u=[],d=!1,f=null,p=null,m=null,h=null,g=null,_=null,v=s?.get(`richData`)??i.CommonUtils.EmptyArray,y=s?.get(`dummyWrapped`)??null,b=i.AddressUtils.normalizeA1ToR1C1,x=i.CoordUtils.createConflatingRanges(),S=new Map,C=[],w=!1,T=!1,E=null,D=!1,ee=i.CoordUtils.createConflatingRanges(),O=!1,k=-1,A=-1,j=null,M=null,N=null,te=[],ne=null,P=-2,F=0,I=``,L=``,R=``,z=``,B=``,V=``,H=``,U=``,W=``,re=``,ie=``,ae=``,oe=``,se=``,G=!0,K=null,ce=!1,le=!1,ue=!1,de=null,fe=0,pe=e=>{let r=e.name,m=r.indexOf(`:`);if(m!==-1&&(r=r.slice(m+1)),fe++,fe%196608==0&&a?.(fe),M){let t=e.attributes;switch(r){case`v`:l=!0;break;case`f`:switch(d=!0,t.t??null){case null:case`normal`:break;case`shared`:let e=t.si;p=t.ref,f=e;break;case`array`:p=t.ref,E=p;break;case`datatable`:p=t.ref,d=!0}let e=t.ca;e!==void 0&&(D=e===`1`);break;case`is`:O=!0;return}O&&!d&&o?.onOpenTag?.(e);return}if(c){if(r===`c`){M=e;let t=e.attributes,n=t.r;A=i.AddressUtils.fastStringToCol(n);let r=t.t;r===void 0?N=null:(N=r,N===`str`&&(O=!0));let a=t.s;a===void 0&&(de!==null||ue)&&(a=`0`),a!==void 0&&(a=parseInt(a),K&&K.value===a&&K.colEnd+1===A?K.colEnd=A:(K={colStart:A,rowStart:k,colEnd:A,rowEnd:k,value:a},u.push(K))),E=null,T=!1;let o=t.cm;w=o!==void 0&&(e=>{let t=s?.get(`metadata`)?.cells;if(!t)return!1;let n=parseInt(e,10);return!(!Number.isFinite(n)||n<1)&&!0===t[n-1]?.get(`XLDAPR`)?.fDynamic})(o);let c=t.vm;if(c!==void 0){let e=v[parseInt(c)-1];if(i.FormulaError.isError(e)){let t=e.getCode();j={t:`e`,v:t},w&&t===i.FormulaError.Code.Spill&&(T=!0)}}}}else{if(le&&r===`row`){c=!0;let t=e.attributes.r;if(k=parseInt(t)-1,F=0,L=e.attributes.customHeight,L!==void 0&&(F|=ke.CustomHeight),L!==W&&(G=!0,W=L),I=e.attributes.ht,I!==void 0&&(F|=ke.Ht),I!==U&&(G=!0,U=I),R=e.attributes.hidden,R!==void 0&&(F|=ke.Hidden),R!==re&&(G=!0,re=R),B=e.attributes.s,B!==void 0&&(F|=ke.S),B!==ae&&(G=!0,ae=B),z=e.attributes.customFormat,z!==void 0&&(F|=ke.CustomFormat),z!==ie&&(G=!0,ie=z),V=e.attributes.outlineLevel,V!==void 0&&(F|=ke.OutlineLevel),V!==oe&&(G=!0,oe=V),H=e.attributes.collapsed,H!==void 0&&(F|=ke.Collapsed),H!==se&&(G=!0,se=H),F!==0)if(P+1!==k||G){let e=L!==void 0&&(L===`1`||L===`true`),t=z!==void 0&&(z===`1`||z===`true`);de=t&&B!==void 0?B:null,t&&de===null&&(de=`0`),ne={min:k,max:k,value:{sz:I===void 0?-1:parseFloat(I),csz:e,h:R!==void 0&&(R===`1`||R===`true`),s:de===null?void 0:de===`0`?0:parseInt(de),l:V===void 0||V===`0`?0:parseInt(V),cl:H!==void 0&&(H===`1`||H===`true`)}},te.push(ne)}else ne.max=k;P=k,G=!1;return}if(r===`sheetData`&&(le=!0),!ce&&r===`sheetData`){ce=!0;let e=t.cols,n=e?e.length:0;for(let t=0;!ue&&t<n;t++)e[t].v.s&&(ue=!0)}n?.onOpenTag?.(e)}},me=t=>{let r=t.name;if(r===`sheetData`&&(le=!1),!d||r!==`c`&&r!==`f`||(f&&(h=S.get(f)??null),h&&(x.append(k,A,h),D&&ee.append(k,A)),E!==null&&C.push([E,w?T?`error`:`dynamic`:`fixed`]),d=!1,h=null,f=null,p=null,l=!1,D=!1,E=null,w=!1,T=!1),M){let n=r.indexOf(`:`);if(n!==-1&&(r=r.slice(n+1)),O)if(r===`is`||r===`v`){let t=o?.onEnd?.();t!=null&&e.pushAt(k,A,``+t)}else r!==`f`&&o?.onCloseTag?.(t);l&&=!1,r===`c`&&(M=null,O=!1);return}if(c)return c=!1,void(K=null);n?.onCloseTag?.(t)},he=a=>{let s=a.trim();if(l){switch(j=null,N){case null:case`n`:j=parseFloat(s);break;case`b`:j=s===`1`||s===`true`;break;case`s`:j=s;break;case`e`:if(s===`#VALUE!`){let e=M.attributes.vm;if(e!==void 0){let t=v[parseInt(e)-1];if(i.FormulaError.isError(t)){j={t:`e`,v:t.getCode()};break}}}let e=i.FormulaError.getBuiltInByLabel(s);e?j={t:`e`,v:e.getCode()}:(j=s,r?.(`Unknown formula error '${s}' in cell ${i.AddressUtils.cellToString({colIndex:A,rowIndex:k})}`));break;case`str`:case`inlineStr`:O=!0}j!==null&&e.pushAt(k,A,j)}if(f){if(g===f)h=_;else{if(h=S.get(f)??null,!h){let e=[];m=b(s,k,A,e),h=[m,e,s],S.set(f,h)}g=f,_=h}f=null}if(d){if(y!==null){let e=(e=>{if(e.length<ye.length||e.slice(0,ye.length).toUpperCase()!==be)return Se;let t=we(e,ye.length);if(t===null||e.charCodeAt(t.end)!==41||e.charCodeAt(t.end+1)!==44||e.charCodeAt(e.length-1)!==41)return Se;let n=t.value;return n.toUpperCase()===xe?Ce:n.length===0?Se:{kind:`formula`,formula:n}})(s);e.kind!==`none`&&y.push({sheet:t,rowIndex:k,colIndex:A,formula:e.kind===`formula`?e.formula:null})}let e=[];m=b(s,k,A,e),h=[m,e,s]}O?o?.onText?.(a):c||n?.onText?.(s)},q={r:void 0,t:void 0,s:void 0,cm:void 0,vm:void 0},ge={name:`c`,attributes:q,isSelfClosing:!1},J={t:void 0,si:void 0,ref:void 0,ca:void 0},Y={name:`f`,attributes:J,isSelfClosing:!1},X={name:`v`,attributes:{},isSelfClosing:!1},Z={r:void 0,s:void 0,ht:void 0,hidden:void 0,collapsed:void 0,customHeight:void 0,customFormat:void 0,outlineLevel:void 0},Q={name:`row`,attributes:Z,isSelfClosing:!1},ve=_e.NEED_MORE,$=_e.NOT_HANDLED,Te=_e.decodeText,Ee=!1,De=(e,t,n,r)=>{for(;;){let i=0;for(;t<n&&((i=e.charCodeAt(t))===32||i===9||i===10||i===13);)t++;if(t>=n)return ve;if(i===62)return Ee=!1,t+1;if(i===47)return t+1>=n?ve:e.charCodeAt(t+1)===62?(Ee=!0,t+2):$;let a=t;for(;t<n&&(i=e.charCodeAt(t))!==61;){if(i===62||i===47||i===32||i===9||i===10||i===13)return $;t++}if(t+1>=n)return ve;let o=t-a,s=e.charCodeAt(t+1);if(s!==34&&s!==39)return $;let c=t+2,l=c;for(;l<n&&(i=e.charCodeAt(l))!==s;){if(i===38||i<32)return $;l++}if(l>=n)return ve;t=l+1;let u=e.charCodeAt(a);if(r===2)switch(o){case 1:u===114?Z.r=e.slice(c,l):u===115&&(Z.s=e.slice(c,l));break;case 2:e.startsWith(`ht`,a)&&(Z.ht=e.slice(c,l));break;case 6:e.startsWith(`hidden`,a)&&(Z.hidden=e.slice(c,l));break;case 9:e.startsWith(`collapsed`,a)&&(Z.collapsed=e.slice(c,l));break;case 12:e.startsWith(`customHeight`,a)?Z.customHeight=e.slice(c,l):e.startsWith(`customFormat`,a)?Z.customFormat=e.slice(c,l):e.startsWith(`outlineLevel`,a)&&(Z.outlineLevel=e.slice(c,l))}else if(r===0)o===1?u===114?q.r=e.slice(c,l):u===116?q.t=e.slice(c,l):u===115&&(q.s=e.slice(c,l)):o===2&&e.charCodeAt(a+1)===109&&(u===99?q.cm=e.slice(c,l):u===118&&(q.vm=e.slice(c,l)));else if(o===1)u===116&&(J.t=e.slice(c,l));else if(o===2){let t=e.charCodeAt(a+1);u===115&&t===105?J.si=e.slice(c,l):u===99&&t===97&&(J.ca=e.slice(c,l))}else o===3&&e.startsWith(`ref`,a)&&(J.ref=e.slice(c,l))}},Oe=(e,t,n)=>e.charCodeAt(t+1)===47&&e.charCodeAt(t+2)===n&&e.charCodeAt(t+3)===62;return{...n,onEnd:()=>{te.length>0&&(t.rows=i.AddressUtils.runsToRefs(te,!1));let r=x.done(Ae),a=r.length;if(a>0){let e=Array(a);for(let t=0;t<a;t++){let n=r[t],a=i.AddressUtils.rangeToString(n),o=n.value[1];e[t]=[a,i.AddressUtils.resolveRelativeToA1(o,n.rowStart,n.colStart)]}t.formulas=e}let o=ee.done(!0),s=o.length;if(s>0){let e=Array(s);for(let t=0;t<s;t++){let n=o[t];e[t]=i.AddressUtils.rangeToString(n)}t.volatile=e}C.length>0&&(t.formulaArray=[...C]);let c=u.length;if(c>0){u.sort(i.CoordUtils.createRangeComparator(i.IRange.Axis.Column));let e=u[0],n=e.colStart,r=e.colEnd,a=e.rowEnd,o=e.value,s=[];s.push(e);let l=null;for(let t=1;t<c;t++)l=u[t],o!==l.value||n!==l.colStart||r!==l.colEnd||a+1!==l.rowEnd?(s.push(l),e=l,n=e.colStart,r=e.colEnd,a=e.rowEnd,o=e.value):(a=l.rowEnd,e.rowEnd=a);let d=s.length,f=Array(d);for(let e=0;e<d;e++){let t=s[e];f[e]=[i.AddressUtils.rangeToString(t),t.value]}t.directStyles=f}let l=e.build();l&&(t.data=l.tuples),n?.onEnd?.()},onOpenTag:pe,onCloseTag:me,onText:he,elementScanners:[{name:`c`,scan:(e,t,n)=>{if(!c||M!==null)return $;q.r=q.t=q.s=q.cm=q.vm=void 0;let r=De(e,t+2,n,0);if(r<0)return r;let i=q.t;if(q.r===void 0||i===`str`||i===`inlineStr`)return $;let a=!1,o=-1,s=-1,l=-1,u=-1,d=r;if(!Ee)for(J.t=J.si=J.ref=J.ca=void 0;;){let t=e.indexOf(`<`,r);if(t===-1||t+3>=n)return ve;for(let n=r;n<t;n++){let t=e.charCodeAt(n);if(t!==32&&t!==9&&t!==10&&t!==13)return $}let i=e.charCodeAt(t+1),c=e.charCodeAt(t+2);if(i===47){if(!Oe(e,t,99))return $;d=t+4;break}if(i===102&&!a&&l===-1&&(c===32||c===62||c===47)){if(a=!0,r=De(e,t+2,n,1),r<0)return r;if(Ee)continue;let i=e.indexOf(`<`,r);if(i===-1||i+3>=n)return ve;if(!Oe(e,i,102))return $;o=r,s=i,r=i+4;continue}if(i===118&&c===62&&l===-1){let i=e.indexOf(`<`,t+3);if(i===-1||i+3>=n)return ve;if(!Oe(e,i,118))return $;l=t+3,u=i,r=i+4;continue}return $}return pe(ge),a&&(pe(Y),s>o&&he(Te(e.slice(o,s))),me(Y)),l!==-1&&(pe(X),u>l&&he(Te(e.slice(l,u))),me(X)),me(ge),d}},{name:`row`,openTag:Q,scan:(e,t,n)=>{if(!le||c||M!==null)return $;Z.r=Z.s=Z.ht=Z.hidden=Z.collapsed=Z.customHeight=Z.customFormat=Z.outlineLevel=void 0;let r=De(e,t+4,n,2);return r<0?r:Ee||Z.r===void 0?$:(pe(Q),r)}}]}},Ne=e=>{let t=e.indexOf(`:`);return t===-1?e:e.slice(t+1)},Pe={"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet.main+xml":`workbooks`,"application/vnd.ms-excel.sheet.macroEnabled.main+xml":`workbooks`,"application/vnd.ms-excel.sheet.binary.macroEnabled.main":`workbooks`,"application/vnd.ms-excel.addin.macroEnabled.main+xml":`workbooks`,"application/vnd.openxmlformats-officedocument.spreadsheetml.template.main+xml":`workbooks`,"application/vnd.openxmlformats-officedocument.spreadsheetml.worksheet+xml":`sheets`,"application/vnd.ms-excel.worksheet":`sheets`,"application/vnd.openxmlformats-officedocument.spreadsheetml.chartsheet+xml":`charts`,"application/vnd.ms-excel.chartsheet":`charts`,"application/vnd.ms-excel.macrosheet+xml":`macros`,"application/vnd.ms-excel.macrosheet":`macros`,"application/vnd.openxmlformats-officedocument.spreadsheetml.dialogsheet+xml":`dialogs`,"application/vnd.ms-excel.dialogsheet":`dialogs`,"application/vnd.openxmlformats-officedocument.spreadsheetml.sharedStrings+xml":`strs`,"application/vnd.ms-excel.sharedStrings":`strs`,"application/vnd.openxmlformats-officedocument.spreadsheetml.styles+xml":`styles`,"application/vnd.ms-excel.styles":`styles`,"application/vnd.openxmlformats-package.core-properties+xml":`coreprops`,"application/vnd.openxmlformats-officedocument.custom-properties+xml":`custprops`,"application/vnd.openxmlformats-officedocument.extended-properties+xml":`extprops`,"application/vnd.openxmlformats-officedocument.spreadsheetml.comments+xml":`comments`,"application/vnd.ms-excel.comments":`comments`,"application/vnd.ms-excel.threadedcomments+xml":`threadedcomments`,"application/vnd.ms-excel.person+xml":`people`,"application/vnd.openxmlformats-officedocument.spreadsheetml.sheetMetadata+xml":`metadata`,"application/vnd.ms-excel.sheetMetadata":`metadata`,"application/vnd.ms-excel.externalLink":`links`,"application/vnd.openxmlformats-officedocument.spreadsheetml.externalLink+xml":`links`,"application/vnd.openxmlformats-officedocument.theme+xml":`themes`},Fe=e=>e.startsWith(`/`)?e.slice(1):e,Ie=/^xl\/(worksheets|chartsheets)\/[^/]+\.xml$/i,Le=e=>typeof e==`string`?e:(e?.runs??[]).map(e=>e.text??``).join(``);exports.readXLSX=async(a,c)=>{let{password:l,onVBA:u,profile:d,calcOnLoad:f=`auto`,createWorkbookOptions:p={},...m}=c??{},h=!!p.origin&&typeof p.origin!=`string`,g=d?new s(typeof d==`function`?d:void 0):null,_=[],v=(e,t,n)=>{_.push([e,t??``,n])},y={onWarning:v},b=c?.progress,x=b?.onProgress?b.onProgress.bind(b):void 0,S=a.byteLength,C=0,w=0,T=x?e=>{if(C<=0)return;w+=e;let t=Math.min(S,Math.round(w/C*S));x(t,S)}:void 0,E=Promise.resolve().then(()=>require("./BxU-OlZIQViQl7gX.cjs")),D=null;try{D=new DOMParser}catch{}let ee=null;try{ee=new XMLSerializer}catch{}let O,k,A,j=null;D||(j=Promise.resolve().then(()=>e.r(require("./CIpMN7SDVREKQUQE.cjs").default,1)));try{let[e,t]=await Promise.all([j,E]);O=new t.DOMTransformer,k=D??new e.DOMParser,A=ee??new e.XMLSerializer}catch(e){throw Error(`Unable to load XLSX parser.`,{cause:e})}let M=e=>A.serializeToString(e),N;try{N=await o.create(a)}catch(e){throw new r.ExpectedError(`Unable to parse as an Excel document. Try to save as '.xlsx' and try again.`,{cause:e})}g?.mark(`zip-open`);try{if(!N.has(`[Content_Types].xml`))throw new r.ExpectedError(`Unable to parse as an Excel document. Try to save as '.xlsx' and try again.`);let e=e=>{let t=N.getEntry(e);return t?{content:t}:void 0},a={workbooks:[],sheets:[],charts:[],dialogs:[],macros:[],strs:[],comments:[],threadedcomments:[],links:[],coreprops:[],extprops:[],custprops:[],themes:[],styles:[],metadata:[],people:[],overrides:{},sst:``,style:``,defaults:{}};{let e=((e,t)=>({onOpenTag:t=>{let n=(e=>{let t=e.indexOf(`:`);return t===-1?e:e.slice(t+1)})(t.name),r=t.attributes;if(n===`Override`){let t=r.ContentType,n=r.PartName;if(!t||!n)return;e.overrides[n.startsWith(`/`)?n.slice(1):n]=t;let i=Pe[t],a=i?e[i]:void 0;Array.isArray(a)&&a.push(n)}else if(n===`Default`){let t=r.Extension,n=r.ContentType;t&&(e.defaults[t.toLowerCase()]=n)}},onEnd:()=>{e.sst=e.strs.length>0?e.strs[0]:``,e.style=e.styles.length>0?e.styles[0]:``},onError:e=>{t?.(`Error parsing content types: ${e?.message??e}`)}}))(a,e=>{_.push([e,`[Content_Types].xml`])}),t=await N.getTextStream(`[Content_Types].xml`);if(!t)throw Error(`Error parsing content types: '[Content_Types].xml'`);try{await K.parseStream(t,e,{xmlns:!1})}catch(e){throw Error(`Error parsing content types: '[Content_Types].xml'`,{cause:e})}h&&await N.getBuffer(`[Content_Types].xml`)}g?.mark(`content-types`);let o=a.sst,s=new Set;for(let e of a.sheets)s.add(Fe(e));o&&s.add(Fe(o));for(let e of s)C+=N.uncompressedSize(e);if(await N.prefetch(e=>!s.has(e)&&!Ie.test(e)),g?.mark(`prefetch-side-parts`),a.workbooks.length===0){let t=n.l(`_rels/.rels`,e,k,O,y);if(t){for(let e of t.values())if(e.type===`http://schemas.openxmlformats.org/officeDocument/2006/relationships/officeDocument`&&e.target){a.workbooks.push(e.target);break}}}if(a.workbooks.length===0)throw new r.ExpectedError(`Unable to parse as an Excel document. Try to save as '.xlsx' and try again.`);a.richstructure=[`/xl/richData/rdrichvaluestructure.xml`],a.richdata=[`/xl/richData/rdrichvalue.xml`];let c=p?.resources??new i.ResourceCollection,l=c.beginPersist(),m={},w=new Set,E=new Map;E.set(`richTypes`,[]),E.set(`parseInlineDxf`,e=>{if(!e)return;let n=k.parseFromString(`<dxf xmlns:x14="${t.rt}" xmlns:xm="${t.it}">${e}</dxf>`,`text/xml`)?.documentElement;if(!n)return;let r=O.parseDxf(n,``,y);return Object.keys(r).length>0?r:void 0});let D=[];E.set(`dummyWrapped`,D);let ee=n.f(`metadata`,a,e,k,O,y).entries().next()?.value?.[1]?.metadata;ee&&E.set(`metadata`,ee),E.set(De,t.L());let A=new Map,j=[],te=new Set,ne=e=>{te.add(Fe(e))},P=(t,r=A)=>{let i=t.lastIndexOf(`/`),a=t.substring(0,i+1)+`_rels/`+t.substring(i+1,t.length)+`.rels`,o=r.get(a);return o||(o=n.l(a,e,k,O,U),r.set(a,o)),o},F=(r,i,a,o=A)=>{let s=P(i,o).get(r),u=s?.target;if(!u)return null;if(s.targetMode===`External`){if(!a)return s.target;let e=c.add({source:{external:s.target}});return e.addReference(m),w.add(e),l.toResourceId(e)}let d=i.lastIndexOf(`/`),f=i.substring(0,d+1);u.startsWith(`/`)||(u=f+u),u=n.h(u);let p=O?.getVisitorParamsState().get(`dxfs`),h=o.get(u);if(!h)if(s.type===`http://schemas.openxmlformats.org/officeDocument/2006/relationships/worksheet`){let e={};h=e,j.push((async()=>{let n=Oe(e,(e,t)=>t===`legacyDrawing`?R(e,u):t===`part`?z(e,u):F(e,u,t===`resource`)??null,oe,p,()=>{},(e,t,n)=>{v(e,t?`${t} (${u})`:u,n)},void 0,E),r=await N.getTextStream(u,T);if(r)try{await K.parseStream(r,n,{xmlns:!1,lean:!0})}catch(e){throw Error(`Error parsing sheet: '${u}'`,{cause:e})}let i=P(u,o);if(i){L(e,u,i,o);let n=[];i.forEach((e,r)=>{if(e.type!==`http://schemas.openxmlformats.org/officeDocument/2006/relationships/pivotTable`)return;let i=z(r,u,e.type,e=>e!==`http://schemas.openxmlformats.org/officeDocument/2006/relationships/pivotCacheDefinition`);if(!i?.xml)return;let a=/<pivotTableDefinition\b[^>]*>/.exec(i.xml)?.[0]??``,o=parseInt(/\scacheId="(\d+)"/.exec(a)?.[1]??``,10);if(isNaN(o))return void _.push([`Pivot table '${i.name}' names no cache and was dropped.`,u]);let s=/\sname="([^"]*)"/.exec(a)?.[1];n.push({...s?{name:t.V(s)}:{},cacheId:o,part:i})}),n.length>0&&(e.pivotTables=n)}})())}else if(s.type===`http://schemas.openxmlformats.org/officeDocument/2006/relationships/externalLink`){let t=n.d(u,e,k,O,U);if(t&&Object.keys(t).length!==0){let e=t,n=e.__bookRelId,r=e.__absoluteUrlRelId;delete e.__bookRelId,delete e.__absoluteUrlRelId;let i=[];P(u,o)?.forEach((e,t)=>{if(e.targetMode===`External`&&e.type&&e.target){let a={type:e.type,target:e.target};t===n?a.role=`book`:t===r&&(a.role=`absoluteUrl`),i.push(a)}}),i.sort((e,t)=>(e.role===`book`?0:1)-(t.role===`book`?0:1)),e.sources=i,ne(u),h=e}else h=null}else h=a?n.u(u,e,(e,t)=>{let n=c.add({source:{buffer:e}});return n.addReference(m),w.add(n),l.toResourceId(n)},U):n.d(u,e,k,O,U);return h},I=(e,t)=>{if(!e)return null;let r=P(t,A)?.get(e);if(!r?.target||r.targetMode===`External`)return null;let i=r.target;return i.startsWith(`/`)||(i=t.substring(0,t.lastIndexOf(`/`)+1)+i),n.h(i)},L=(e,a,o,s)=>{let c=[],l=new Map,u=[];o.forEach((e,t)=>{if(e.type!==`http://schemas.microsoft.com/office/2017/10/relationships/threadedComment`)return;let n=F(t,a,!1,s)?.comments;if(!n)return;for(let e=0;e<n.length;e++){let t=n[e];if(!t?.v?.id)continue;let{parentId:r,done:i,content:a,...o}=t.v,s={...o,content:Le(a)};r?u.push({parentId:r,json:s}):(i&&(s.done=!0),l.set(s.id,s),c.push({r:t.r,v:s}))}let r=I(t,a);r&&ne(r)});for(let e=0;e<u.length;e++){let{parentId:t,json:n}=u[e],r=l.get(t);r&&(r.replies??=[]).push(n)}let d=[];if(o.forEach((e,t)=>{if(e.type!==`http://schemas.openxmlformats.org/officeDocument/2006/relationships/comments`)return;let i=F(t,a,!1,s),o=i?.comments;if(!o)return;let c=i?.authors;for(let e=0;e<o.length;e++){let t=o[e];if(!t?.r)continue;let i=c&&t.v.authorId!==void 0?c[t.v.authorId]:void 0;if(i&&i.startsWith(`tc=`)){if(l.has(n.m(i.substring(3))))continue;i=void 0}let a={id:r.CommonUtils.uuidV4().toUpperCase(),asNote:!0,content:t.v.content??``},s=i?H({displayName:i}):void 0;s&&(a.personId=s.id),d.push({r:t.r,v:a})}let u=I(t,a);u&&ne(u)}),c.length===0&&d.length===0)return;let f=[...c,...d],p=e.legacyDrawing;if(p?.xml){let{rest:n,notes:r}=t.s(p.xml);if(r.length>0){let a=new Map;for(let e=0;e<r.length;e++){let t=r[e];a.set(i.AddressUtils.cellToString({rowIndex:t.row,colIndex:t.col}),t)}for(let e=0;e<f.length;e++){let n=f[e],r=a.get(String(n.r).toUpperCase());if(!r||(a.delete(String(n.r).toUpperCase()),!n.v.asNote))continue;let i=t.o(r.xml),o={};if(i.anchor){let[e,t,n,a,s,c,l,u]=i.anchor;o.anchor={tl:{c:e-r.col,x:t,r:n-r.row,y:a},br:{c:s-r.col,x:c,r:l-r.row,y:u}}}i.xml&&(o.xml=i.xml),(o.anchor||o.xml)&&(n.v.box=o),i.visible&&(n.v.shown=!0),i.alt&&(n.v.description=i.alt)}let o=[];a.forEach(e=>{o.push(e.xml)});let s=t.i(n,o);s?p.xml=s:delete e.legacyDrawing}}e.comments=f},R=(t,n)=>{let r=I(t,n);if(!r)return null;let i=e(Fe(r));if(!i)return null;let a={xml:new TextDecoder(`utf-8`).decode(i.content)},o=[];return P(r,A)?.forEach((e,t)=>{if(e.type!==`http://schemas.openxmlformats.org/officeDocument/2006/relationships/image`)return;let n=F(t,r,!0);typeof n==`number`&&o.push({id:t,resId:n})}),o.length>0&&(a.images=o),ne(r),a},z=(t,n,r,i,o=new Set)=>{let s=I(t,n);if(!s||o.has(s))return null;let c=r??P(n,A)?.get(t)?.type;if(!c)return null;let l=e(Fe(s));if(!l)return null;o.add(s);let u=s.substring(s.lastIndexOf(`/`)+1),d=a.overrides[Fe(s)]??a.defaults[u.substring(u.lastIndexOf(`.`)+1).toLowerCase()],f={id:t,type:c,name:u};if(d&&(f.contentType=d),((e,t)=>e?e.endsWith(`+xml`)||e===`application/xml`:/\.(xml|rels|vml)$/i.test(t))(d,u))f.xml=new TextDecoder(`utf-8`).decode(l.content);else{let e=F(t,n,!0);if(typeof e!=`number`)return null;f.resId=e}let p=[];return P(s,A)?.forEach((e,t)=>{if(!e?.type||i&&!i(e.type))return;if(e.targetMode===`External`){let n=F(t,s,!0);typeof n==`number`&&p.push({id:t,type:e.type,resId:n});return}let n=z(t,s,e.type,i,o);n&&p.push(n)}),p.length>0&&(f.parts=p),ne(s),f};n.f(`coreprops`,a,e,k,O,y),n.f(`extprops`,a,e,k,O,y);let B=new i.PersonCollection,V=n.f(`people`,a,e,k,O,y);if(V.size>0){let[e,t]=V.entries().next().value;B.fromJSON(t?.persons),ne(e)}let H=e=>{if(e)return B.add(e).toJSON()},U={paramMap:E,getRefs:P,getRef:F,parsedRefs:A,readEmbeddedPart:(e,t)=>z(e,t),addPerson:H,serializeElement:M,onWarning:v},W=[];if(o){let e=await N.getTextStream(o,T);if(e){let n=((e,n)=>{let r=!1,i=!1,a=0,o=``;return{onOpenTag:e=>{let t=Ne(e.name);t===`t`?r&&a===0&&(i=!0):t===`si`?(r=!0,o=``,a=0):t!==`rPh`&&t!==`phoneticPr`||a++},onText:e=>{i&&(o+=e)},onCloseTag:n=>{let s=Ne(n.name);s===`t`?i=!1:s===`si`?(e(t.w(o)),r=!1,o=``):s!==`rPh`&&s!==`phoneticPr`||a>0&&a--},onError:e=>{n?.(`Error parsing shared strings: ${e?.message??e}`)}}})(e=>{W.push(e)},e=>{v(e,o)});try{await K.parseStream(e,n,{xmlns:!1})}catch(e){throw Error(`Error parsing shared strings: '${o}'`,{cause:e})}}}g?.mark(`shared-strings`);let re=W.length,ie=new Map,ae=re,oe=e=>{let t=ie.get(e);if(t!==void 0)return t;let n=ae;return ie.set(e,ae++),W.push(e),n},se=[];a.slicersCache=se;let G=N.getNames(),ce=G.length;for(let e=0;e<ce;e++){let t=G[e];t&&t.startsWith(`xl/slicerCache`)&&se.push(`/${t}`)}let le=n.f(`slicersCache`,a,e,k,O,U),ue=new Map;le.forEach(e=>{let t=e.name;delete e.name,ue.set(t,e)}),E.set(`slicerCaches`,ue),n.f(`richstructure`,a,e,k,O,U),n.f(`richdata`,a,e,k,O,U);let de=n.f(`themes`,a,e,k,O,U),fe=null;if(de&&de.entries){let e=de.entries().next();e?.value?.[1]&&(fe=e.value[1])}let pe=new i.Theme(fe),me=n.f(`styles`,a,e,k,O,U).entries().next()?.value?.[1];me&&=JSON.parse(r.BufferUtils.JSONStableStringify(me));let he=n.f(`workbooks`,a,e,k,O,U);g?.mark(`side-parts-json`),await Promise.all(j);{let e=he.entries().next().value?.[1],n=t.L(e?.names),r=e?.sheets??[];for(let e=0;e<r.length;e++){let i=r[e]?.sheet;i&&t.R(i,n)}let i=e?.names;if(i)for(let e=0;e<i.length;e++){let t=i[e]?.ref;typeof t==`string`&&(i[e].ref=n.readDetached(t))}}x&&C>0&&(x(S,S),await new Promise(e=>setTimeout(e,0))),g?.mark(`sheets`);let q={...he.entries().next().value?.[1],styles:me,theme:pe.toJSON()};n.n(q,E.get(n.t)),q.calc={...q.calc??{},legacyIntersect:!0},W.length>0&&(q.strings=W);let ge=B.toJSON();ge&&ge.length>0&&(q.people=ge);let _e=N.getEntry(`xl/vbaProject.bin`);if(_e)try{let{VBAProject:e}=await Promise.resolve().then(()=>require("./D3EWCPfCu-qMOIGd.cjs")),t=e.extract(_e);if(t){let n=new Map;for(let e of q.sheets??[]){let t=e?.sheet?.codeName;t&&n.set(t,e.sheet)}for(let r of t.modules){let t={language:`vba`},{header:i,body:a}=e.splitAttributes(r.code);a&&(t.source=a),i&&(t.sourceHeader=i);let o=r.type===`document`?n.get(r.name):void 0;o||r.type!==`document`||(t.scope=`workbook`);let s=o?o.modules??={}:q.modules??={};s[r.name]||(s[r.name]=t)}u?.(t)}else _.push([`Unable to parse VBA project.`,`xl/vbaProject.bin`])}catch(e){_.push([`Error extracting VBA: ${e?.message??e}`,`xl/vbaProject.bin`])}let J=E.get(`calcId`),Y=J===void 0||!(Number(J)>=191029),X=p.calcOnLoad??(f===`auto`&&Y?`full`:f),Z={...p,calcOnLoad:X,resources:c,json:q};Z.disableLoadAutoFit===void 0&&(Z.disableLoadAutoFit=!1),g?.mark(`json-assembled`);let Q=new i.Workbook(Z);if(g?.mark(`workbook-constructed`),D.length>0&&X!==`none`){await Q.whenCalculationReady();let e=new Map,t=q.sheets??[],n=Q.getSheets().getItems();for(let r=0;r<t.length;r++){let i=t[r]?.sheet,a=n[r];i&&a&&e.set(i,a)}((e,t,n)=>{if(t.length===0)return;let r=e.getCalculation().getFunctions(),i=new Map,a=e=>{let t=i.get(e);return t===void 0&&(t=r.getByName(e)!==null,i.set(e,t)),t},o=new Map;for(let e of t){let t=o.get(e.sheet);t||(t=[],o.set(e.sheet,t)),t.push(e)}for(let[e,t]of o){let r=n.get(e);if(!r)continue;let i=(e,t)=>`${e},${t}`,o=new Set;for(let e of t)e.formula===null&&o.add(i(e.rowIndex,e.colIndex));for(let e of t){if(e.formula===null)continue;let t=Te(e.formula),n=!0;for(let e of t)if(!a(e)){n=!1;break}if(!n)continue;let s=[],c=[[e.rowIndex,e.colIndex]],l=new Set([i(e.rowIndex,e.colIndex)]);for(;c.length>0;){let[e,t]=c.pop(),n=[[e+1,t],[e-1,t],[e,t+1],[e,t-1]];for(let[e,t]of n){let n=i(e,t);!l.has(n)&&o.has(n)&&(l.add(n),s.push([e,t]),c.push([e,t]))}}for(let[e,t]of s)o.delete(i(e,t)),r.getRange({rowStart:e,colStart:t,rowEnd:e,colEnd:t}).clear();r.getRange({rowStart:e.rowIndex,colStart:e.colIndex,rowEnd:e.rowIndex,colEnd:e.colIndex}).setValue(`=`+e.formula)}}})(Q,D,e)}if(w.forEach(e=>{e.deleteReference(m)}),l.endPersist(),h){t.P(Q);let e=new Map,n=0;for(let t of N.getNames()){let r=N.getEntry(t);if(!r)continue;let i=N.getRawEntry(t),a=i?{data:r,uncompressedSize:N.uncompressedSize(t),raw:{compressedData:i.data,compressionMethod:i.compressionMethod,signature:i.signature}}:{data:r,uncompressedSize:N.uncompressedSize(t)};e.set(t,a),n+=r.byteLength}if(n>67108864)_.push([`Source package too large to retain (${n} bytes, limit ${t.j}); unmodeled parts will be dropped on save.`,`SourcePackage`]);else if(e.size>0){let n=new t.M(e,te);t.F(Q,n);let r=Q.getSheets().getItems(),i=Q.getTransactions().addListener({onCommitEnd:e=>{let t=e.getOperation()?.name;t!==`insertCells`&&t!==`deleteCells`||n.markStructuralChange()}}),a=Q.addListeners({onSheetsChange:()=>{let e=Q.getSheets().getItems();(e.length!==r.length||e.some((e,t)=>e!==r[t]))&&n.markStructuralChange(),r=e}});Q.addListeners({onClose:()=>{i(),a(),t.P(Q)}})}}if(_.length&&b?.onWarning){let e=new Set;for(let t of _){let[n,r,i]=t,a=i??n;e.has(a)||(e.add(a),b.onWarning(n,r))}}return g&&!0===d&&console.table(g.toTable()),Q}catch(e){let t=`Unable to parse XLSX.`;throw e instanceof i.OutOfBoundsError&&(t=`Unable to open XLSX. There are too many rows or columns.`),Error(t,{cause:e})}finally{await N.close().catch(()=>{})}};
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
require("./qb-YQ8mGwpogSP08.cjs");const e=require("./MqKQ_B5qRARrRbO4.cjs");let t=require("@sheetxl/sdk");var n=`resourcesById`,r=class{constructor(e){this._kind=e.kind,this._contentType=e.contentType,this._relTypeUri=e.relTypeUri,this._path=e.path}getKind(){return this._kind}getContentType(e){return this._contentType}getRelTypeUri(e){return this._relTypeUri}getPath(e){return typeof this._path==`function`?this._path(e):this._path}},i=class t{constructor(e,t,n){this.zipWriter=e,this.outputKind=t,this.outWritable=n}static createUint8Array(n){let r=new e.W(new e.X,n);return new t(r,`uint8array`)}static createBlob(n){let r=new e.W(new e.q(`application/zip`),n);return new t(r,`blob`)}static createWritableStream(n,r){let i=new e.W(n,r);return new t(i,`writable`,n)}async add(t,n,r){let i=function(e){let t=e.replace(/\\/g,`/`).trim();for(;t.startsWith(`/`);)t=t.slice(1);return t}(t),a={level:r?.level,password:r?.password,encryptionStrength:r?.encryptionStrength,zipCrypto:r?.zipCrypto,lastModDate:r?.lastModDate,keepOrder:r?.keepOrder,uncompressedSize:r?.uncompressedSize,dataDescriptor:r?.dataDescriptor,passThrough:r?.passThrough,compressionMethod:r?.compressionMethod,signature:r?.signature};if(typeof n==`string`)return void await this.zipWriter.add(i,new e.J(n),a);if(n instanceof Uint8Array||ArrayBuffer.isView(n)||n&&typeof n.byteLength==`number`&&typeof n.byteOffset==`number`){try{await this.zipWriter.add(i,new e.Y(n),a)}catch(e){throw console.log(`Error adding Uint8Array source to zip:`,i,a),e}return}let o=(s=n)&&typeof s.getReader==`function`?n:function(e){let t=e[Symbol.asyncIterator]();return new ReadableStream({async pull(e){let{value:n,done:r}=await t.next();r?e.close():e.enqueue(n)},async cancel(e){if(typeof t.return==`function`)try{await t.return(e)}catch{}}})}(n);var s;await this.zipWriter.add(i,o,a)}async close(e){let t=e?.comment,n=await this.zipWriter.close(t,{});return this.outputKind===`writable`?this.outWritable??n:n}};function a(e){let t=e=>e.replace(/&/g,`&`).replace(/</g,`<`).replace(/>/g,`>`),n=e=>t(e).replace(/"/g,`"`),r=e=>{if(!e)return``;let t=``;for(let[r,i]of Object.entries(e))i!==void 0&&!1!==i&&(t+=!0===i?` ${r}="1"`:` ${r}="${n(String(i))}"`);return t},i=new TextEncoder,a=``,o=()=>{a&&=(e.write(i.encode(a)),``)},s=e=>{a+=e,a.length>65536&&o()},c=[],l=null,u=[],d=!0;return{decl(){s(`<?xml version="1.0" encoding="UTF-8" standalone="yes"?>`)},pushDefaultNamespace(e){c.push(e),l=e},getDefaultNamespace:()=>c.length>0?c[c.length-1]:null,popDefaultNamespace(){c.length>0&&(c.pop(),l=c.length>0?c[c.length-1]:null)},start(e,t){d&&u.push({tag:e,attrs:t,bufferPos:a.length});let n=e;l&&e.indexOf(`:`)===-1&&(n=`${l}:${e}`),s(`<${n}${r(t)}>`)},empty(e,t){let n=e;l&&e.indexOf(`:`)===-1&&(n=`${l}:${e}`),s(`<${n}${r(t)}/>`)},text(e){s(t(String(e)))},raw(e){s(e)},end(e){let t;if(d){if(u.length===0)throw Error(`XML Writer: Unexpected end tag </${e}> - no matching start tag`);if(t=u[u.length-1],t.tag!==e)throw Error(`XML Writer: End tag </${e}> does not match start tag <${t.tag}>`)}let n=e;if(l&&e.indexOf(`:`)===-1&&(n=`${l}:${e}`),d){let e=a.length,i=`<${n}${r(t.attrs)}>`.length;e===t.bufferPos+i?(a=a.slice(0,t.bufferPos),s(`<${n}${r(t.attrs)}/>`)):s(`</${n}>`),u.pop()}else s(`</${n}>`)},close(){o()},setValidationDisabled(e){d=!e}}}function o(e){switch(e.kind){case`bytes`:return e.bytes;case`text`:return e.text;case`stream`:return e.stream;case`xmlStream`:{let t=[],n=a({write:e=>t.push(e)});return e.writeXml(n),n.close(),function(e){let t=0;for(let n of e)t+=n.byteLength;let n=new Uint8Array(t),r=0;for(let t of e)n.set(t,r),r+=t.byteLength;return n}(t)}case`xmlStreamed`:return e.write()}}function s(e){let t=c(e);if(!t)return`_rels/.rels`;let n=t.lastIndexOf(`/`),r=n>=0?t.slice(0,n):``;return`${r?`${r}/_rels`:`_rels`}/${n>=0?t.slice(n+1):t}.rels`}function c(e){let t=(e??``).replace(/\\/g,`/`).trim();for(;t.startsWith(`/`);)t=t.slice(1);return t}function l(e){let t=(e??``).replace(/\\/g,`/`).trim();return t.startsWith(`/`)||(t=`/`+t),t}function u(e){let t=/^rId(\d+)$/.exec(e);return t?parseInt(t[1],10):2**53-1}function d(e){return String(e).replace(/&/g,`&`).replace(/</g,`<`).replace(/"/g,`"`).replace(/>/g,`>`)}function f(e,t,n,r=!1){let i=t;if(t.startsWith(`/`))i=t.slice(1);else{if(!e)throw Error(`Relative path "${t}" cannot be used at root level. Use an absolute path starting with "/" (e.g., "/xl/workbook.xml").`);i=(e.includes(`/`)?e.slice(0,e.lastIndexOf(`/`)+1):``)+t}if(i=p(i),!i.includes(`{n}`)){if(!r&&n.has(i))throw Error(`Path already existing path: ${i}`);return i}let a,o=1;do if(a=i.replace(/{n}/g,String(o)),o++,o>1e4)throw Error(`Failed to resolve path template "${t}" after 10000 attempts. This likely indicates a bug or an impossible constraint.`);while(n.has(a));return a}function p(e){let t=e.split(`/`),n=[];for(let r of t)if(r!==``&&r!==`.`)if(r===`..`){if(n.length===0)throw Error(`Invalid path: too many ".." segments in "${e}"`);n.pop()}else n.push(r);return n.join(`/`)}function m(e,t){if(!e)return t;let n=e.includes(`/`)?e.slice(0,e.lastIndexOf(`/`)):``,r=n?n.split(`/`):[],i=t.split(`/`),a=0,o=Math.min(r.length,i.length-1);for(let e=0;e<o&&r[e]===i[e];e++)a++;let s=r.length-a;return`../`.repeat(s)+i.slice(a).join(`/`)}function h(e){return new TextEncoder().encode(e)}function g(e,t){return function(e,t=` `){let n=``,r=0,i=e.split(/(<[^>]+>)/g).filter(Boolean);for(let e=0;e<i.length;e++){let a=i[e];if(a.trim())if(a.startsWith(`<?`))n+=a+`
|
|
2
|
-
`;else if(a.startsWith(`</`))r--,r<0&&console.warn(`XML formatting warning: negative indentation depth: ${a}`),n+=t.repeat(Math.max(r,0))+a+`
|
|
3
|
-
`;else if(a.startsWith(`<`)){let e=a.endsWith(`/>`);n+=t.repeat(r)+a+`
|
|
4
|
-
`,e||r++}else n+=t.repeat(r)+a.trim()+`
|
|
5
|
-
`}return n}(function(e){return new TextDecoder(`utf-8`).decode(e)}(e),t)}var _=class{constructor(e){this.rels=[],this.usedIds=new Set,this.reservedIds=new Set,this.nextId=1,this.sourcePart=c(e)}add(e,t,n){let r=n?.idHint&&!this.usedIds.has(n.idHint)?n.idHint:void 0;if(!r)do r=`rId`+this.nextId++;while(this.usedIds.has(r)||this.reservedIds.has(r));let i=/^rId(\d+)$/.exec(r);return i&&(this.nextId=Math.max(this.nextId,parseInt(i[1],10)+1)),this.usedIds.add(r),this.rels.push({id:r,type:e,target:t,targetMode:n?.external?`External`:void 0}),r}reserve(e){for(let t of e){if(!t)continue;this.reservedIds.add(t);let e=/^rId(\d+)$/.exec(t);e&&(this.nextId=Math.max(this.nextId,parseInt(e[1],10)+1))}}list(){return this.rels}toXmlBytes(){let e=[...this.rels].sort((e,t)=>u(t.id)-u(e.id)||e.id.localeCompare(t.id)),t=[];t.push(`<?xml version="1.0" encoding="UTF-8" standalone="yes"?>`),t.push(`<Relationships xmlns="${v}">`);for(let n of e){let e=[`Id="${d(n.id)}"`,`Type="${d(n.type)}"`,`Target="${d(n.target)}"`];n.targetMode===`External`&&e.push(`TargetMode="External"`),t.push(`<Relationship ${e.join(` `)}/>`)}return t.push(`</Relationships>`),h(t.join(``))}},v=`http://schemas.openxmlformats.org/package/2006/relationships`,y=class{constructor(){this._defaultsSet=new Set,this._overridesSet=new Set,this._defaults=[],this._overrides=[]}addDefault(e,t){let n=function(e){let t=(e??``).trim().toLowerCase();return t.startsWith(`.`)&&(t=t.slice(1)),t}(e);this._defaultsSet.has(n)||(this._defaultsSet.add(n),this._defaults.push({key:n,content:t}))}addOverride(e,t){let n=l(e);this._overridesSet.has(n)||(this._overridesSet.add(n),this._overrides.push({key:n,content:t}))}replaceOverride(e,t){let n=l(e);if(!this._overridesSet.has(n))return;let r=this._overrides.find(e=>e.key===n);r&&(r.content=t)}toXmlBytes(){let e=[];e.push(`<?xml version="1.0" encoding="UTF-8" standalone="yes"?>`),e.push(`<Types xmlns="${b}">`);let t=this._defaults.reverse();this.addDefault(`rels`,`application/vnd.openxmlformats-package.relationships+xml`),this.addDefault(`xml`,`application/xml`);for(let{key:n,content:r}of t)e.push(`<Default Extension="${d(n)}" ContentType="${d(r)}"/>`);let n=this._overrides;for(let{key:t,content:r}of n)e.push(`<Override PartName="${d(t)}" ContentType="${d(r)}"/>`);return e.push(`</Types>`),h(e.join(``))}},b=`http://schemas.openxmlformats.org/package/2006/content-types`,x=class{constructor(e){this.parts=[],this.relsRoot=new _(``),this.relsByPart=new Map,this.contentTypes=new y,this.zip=e}addContentType(e,t){let n=c(e);this.contentTypes.addOverride(`/`+n,t)}addDefaultType(e,t){this.contentTypes.addDefault(e,t)}replaceContentType(e,t){this.contentTypes.replaceOverride(`/`+c(e),t)}addPart(e,t,n,r){let i=c(e);this.parts.push({path:i,body:t,optionsZip:r}),n&&this.contentTypes.addOverride(`/`+i,n)}rels(e){let t=c(e||``);if(!t)return this.relsRoot;let n=this.relsByPart.get(t);return n||(n=new _(t),this.relsByPart.set(t,n)),n}async emit(){let e=[...this.parts].sort((e,t)=>e.path.localeCompare(t.path));for(let t of e){let e=o(t.body);await this.zip.add(t.path,e,t.optionsZip)}let t=this.relsRoot.toXmlBytes();await this.zip.add(`_rels/.rels`,t,{});let n=[...this.relsByPart.values()].sort((e,t)=>e.sourcePart.localeCompare(t.sourcePart));for(let e of n){let t=s(e.sourcePart),n=e.toXmlBytes();await this.zip.add(t,n,{})}let r=this.contentTypes.toXmlBytes();await this.zip.add(`[Content_Types].xml`,r,{})}async build(e){return await this.emit(),await this.zip.close(e)}},S=new Set([`xl/calcChain.xml`]),C=[/^xl\/slicers\//i,/^xl\/slicerCaches\//i];function w(e){return e===`[Content_Types].xml`||T.test(e)}var T=/^(?:(.*)\/)?_rels\/(.*)\.rels$/;function E(e){if(e===`_rels/.rels`)return``;let t=T.exec(e);if(!t)return null;let n=t[1]??``,r=t[2];return n?`${n}/${r}`:r}function D(e){return e.startsWith(`#`)}function O(e,t){if(t.startsWith(`/`))return p(t);let n=e.includes(`/`)?e.slice(0,e.lastIndexOf(`/`)):``;return p((n?n+`/`:``)+t)}var k=class{constructor(e,t,n){this._queue=[],this._scheduledByNodeKey=new Map,this._nodesByPath=new Map,this._writtenPaths=new Set,this._explicitRelTargets=new Set,this._partWriter=new x(e),this._registry=t,this._options=n??{},this._mapState=this._options.mapState??new Map,this._sourcePackage=this._options.sourcePackage??null,this._macroEnabled=this._options.macroEnabled??!1,this._reserveSourceRelIds(``)}_isSourcePartCarried(e){let t=this._sourcePackage;return!(!t||!t.has(e))&&!S.has(e)&&!t.isAbsorbed(e)&&!(!this._macroEnabled&&e===`xl/vbaProject.bin`)&&!w(e)&&(!t.hasStructuralChange()||!function(e){return C.some(t=>t.test(e))}(e))}_reserveSourceRelIds(t){let n=this._sourcePackage?.getPart(s(t));n&&this._partWriter.rels(t).reserve(e.U(n.data).map(e=>e.id))}async waitEmit(){let e=this._queue;for(;e.length;){let t=e.shift();await this._processPart(t)}}async build(e){return await this.waitEmit(),this._passthroughSourceParts(),this._applyWorkbookContentTypeVariant(),await this._partWriter.build(e??{})}_passthroughSourceParts(){let t=this._sourcePackage;if(!t)return;let n=new Set(this._writtenPaths),r=[];for(let e of t.getNames())n.has(e)||this._isSourcePartCarried(e)&&r.push(e);let i=new Set(n);for(let e of r)i.add(e);let a=t.getPart(`[Content_Types].xml`),o=a?e.H(a.data):null;if(o)for(let{ext:e,contentType:t}of o.defaults)this._partWriter.addDefaultType(e,t);for(let e of r){let n=t.getPart(e),r=o?.overrides.get(`/`+e);n.raw?this._partWriter.addPart(e,{kind:`bytes`,bytes:n.raw.compressedData},r,{passThrough:!0,compressionMethod:n.raw.compressionMethod,signature:n.raw.signature,uncompressedSize:n.uncompressedSize}):this._partWriter.addPart(e,{kind:`bytes`,bytes:n.data},r),this._writtenPaths.add(e)}for(let e of t.getNames()){if(e===`[Content_Types].xml`||!w(e))continue;let r=E(e);r!==null&&(r===``||i.has(r))&&(t.isAbsorbed(r)||this._mergeSourceRelsInto(r,t.getPart(e).data,n,i))}}_applyWorkbookContentTypeVariant(){this._macroEnabled&&this._partWriter.replaceContentType(`xl/workbook.xml`,`application/vnd.ms-excel.sheet.macroEnabled.main+xml`)}_mergeSourceRelsInto(t,n,r,i){let a=this._partWriter.rels(t),o=t===``||r.has(t);for(let s of e.U(n)){if(s.external||D(s.target)){a.add(s.type,s.target,{external:s.external,idHint:s.id});continue}let e=O(t,s.target);o&&(r.has(e)||this._explicitRelTargets.has(`${t}::${e}`))||(i.has(e)?a.add(s.type,s.target,{idHint:s.id}):this._registry.ownsRelType(s.type)||S.has(e)||this._sourcePackage?.isAbsorbed(e)||console.warn(`Dropping preserved relationship to missing part '${e}'`,t||`(root)`))}}addPart(e,t,n,r){return this._addPartInternal(``,e,t,n,r)}_addPartInternal(e,t,n,r,i){let a=this._registry.get(t);if(!a)throw Error(`No emitter registered for kind '${t}'.`);let o=a.getContentType(n),s=a.getRelTypeUri(n),c=r??a.getPath?.(n);if(!c)throw Error(`No path provided in either argument or emitter.`);let l=this._writtenPaths,u=f(e,c,l),d=`${t}:${u}`,p=this._scheduledByNodeKey.get(d);if(!p){let e;this._reserveSourceRelIds(u),p={kind:t,key:d,payload:n,path:u,contentType:o,promise:new Promise(t=>{e=t}),resolve:e},this._scheduledByNodeKey.set(d,p),this._queue.push(p)}let h=this._nodesByPath.get(e);h||(h=new Set,this._nodesByPath.set(e,h)),h.add(d),!o||s||e||this._partWriter.rels(``).add(`http://schemas.openxmlformats.org/officeDocument/2006/relationships/officeDocument`,u);let g=null;if(s){let t=m(e,p.path);g=this._partWriter.rels(e).add(s,t,{idHint:i})}return l.add(u),{path:u,contentTypeUri:o,relId:g}}addBinary(e,t,n,r,i=!1,a){return this._addBinaryInternal(``,e,t,n,r,i,a)}_addBinaryInternal(e,t,n,r,i,a=!1,o){if(!i)throw Error(`No path provided for binary.`);if(!n)throw Error(`No content type provided for binary.`);let s=this._writtenPaths,c=f(e,i,s,a),l=null;if(r){let t=m(e,c);l=this._partWriter.rels(e).add(r,t,{idHint:o})}if(e||this._partWriter.rels(``).add(`http://schemas.openxmlformats.org/officeDocument/2006/relationships/officeDocument`,c),!s.has(c)){let e=c.split(`.`).pop()||``;e&&this._partWriter.addDefaultType(e,n),this._partWriter.addPart(c,{kind:`bytes`,bytes:t},void 0,{level:0,uncompressedSize:t.byteLength,dataDescriptor:!1}),s.add(c)}return{path:c,contentTypeUri:n,relId:l}}async _waitForDescendants(e){let t=this._nodesByPath.get(e);if(!t||t.size===0)return;let n=[];for(let e of t){let t=this._scheduledByNodeKey.get(e);if(t){let e=this._processPart(t);n.push(e)}}await Promise.all(n)}async _processPart(e){if(e.processed)return e.promise;e.processed=!0;let t=this._registry.get(e.kind),n=e.path;this._partWriter.addContentType(e.path,e.contentType);try{let r=[],i={write:e=>{r.push(e)}},o;await t.emit(e.payload,{getXMLWriter:()=>o||(o=a(i),o),addPart:(e,t,r,i)=>this._addPartInternal(n,e,t,r,i),addBinary:(e,t,r,i,a=!1,o)=>this._addBinaryInternal(n,e,t,r,i,a,o),addExternal:(e,t,r)=>({path:t,contentTypeUri:null,relId:this._partWriter.rels(n).add(e,t,{external:!0,idHint:r})}),addRelationship:(e,t,r)=>{if(!this._writtenPaths.has(t)&&!this._isSourcePartCarried(t))return null;let i=m(n,t),a=this._partWriter.rels(n).add(e,i,{idHint:r});return this._explicitRelTargets.add(`${n}::${t}`),a},waitEmit:()=>this._waitForDescendants(e.path),getPath:()=>e.path,getSharedStates:()=>this._mapState,warn:(t,n,r)=>{let i=n??e.path,a=this._options.onWarning;a?a(t,i,r):console.warn(t,i)},log:(t,n)=>{console.warn(t,n??e.path)}});let s=function(e){let t=0;for(let n of e)t+=n.byteLength;let n=new Uint8Array(t),r=0;for(let t of e)n.set(t,r),r+=t.byteLength;return n}(r),c=this._options.onPartEmitted;c&&await c(e.kind,e.path,s),ee&&(console.log(`\n=== ${e.path} ===`),console.log(g(s))),this._partWriter.addPart(e.path,{kind:`bytes`,bytes:s},e.contentType)}catch(t){throw this._options.onPartError?.(e.kind,e.path,t),t}finally{this._nodesByPath.delete(e.path),this._scheduledByNodeKey.delete(e.key),e.resolve()}}},ee=!1,A=class{constructor(){this.map=new Map}register(e){let t=e.getKind();if(this.map.has(t))throw Error(`Duplicate part kind: ${t}`);this.map.set(t,e)}get(e){let t=this.map.get(e);if(!t)throw Error(`Unknown part kind: ${e}`);return t}has(e){return this.map.has(e)}ownsRelType(e){for(let t of this.map.values())if(t.getRelTypeUri()===e)return!0;return!1}};function j(e,t,n){e&&(e.algorithm&&(t[n?`${n}AlgorithmName`:`algorithmName`]=e.algorithm),e.hash&&(t[n?`${n}HashValue`:`hashValue`]=e.hash),e.salt&&(t[n?`${n}SaltValue`:`saltValue`]=e.salt),e.spinCount!==void 0&&(t[n?`${n}SpinCount`:`spinCount`]=e.spinCount))}var te=`hiddenFormulaXfs`,M=class{constructor(e,t){this._variants=new Map,this._sources=[],this._json=e,this._styles=t,this._directCount=Math.max(1,e?.direct?.length??0)}getHiddenXf(e){let t=this._variants.get(e);return t!==void 0||(this._isShown(e)?t=e:(t=this._directCount+this._sources.length,this._sources.push(e)),this._variants.set(e,t)),t}getSources(){return this._sources}_isShown(e){let n=this._json?.direct?.[e],r=n?.protection?.showFormulas;if(r!==void 0)return r;let i=(e===0?void 0:n?.named)??t.IStyle.BuiltInName.Normal;return this._styles.getNamedStyles().getByName(i)?.toJSON().style?.protection?.showFormulas??!1}},N=class{constructor(){this._daprFMBks=[],this._daprFMBkMap=new Map,this._rvFMBks=[],this._rvFMBkMap=new Map,this._valueMeta=[]}registerArrayCell(e){let t=+!!e,n=`1,${t}`,r=this._daprFMBkMap.get(n);return r===void 0&&(r=this._daprFMBks.length,this._daprFMBks.push({fDynamic:1,fCollapsed:t}),this._daprFMBkMap.set(n,r)),r+1}registerRichValueCell(e){let t=this._rvFMBkMap.get(e);t===void 0&&(t=this._rvFMBks.length,this._rvFMBks.push(e),this._rvFMBkMap.set(e,t));let n=this._valueMeta.length;return this._valueMeta.push(t),n+1}hasCellMeta(){return this._daprFMBks.length>0}hasValueMeta(){return this._valueMeta.length>0}hasAny(){return this.hasCellMeta()||this.hasValueMeta()}getDAPRFutureMetadataBlocks(){return this._daprFMBks}getRVFutureMetadataBlocks(){return this._rvFMBks}getValueMeta(){return this._valueMeta}},ne=class{constructor(e,t=console.warn){this._entries=[],this._keyMap=new Map,this._metaCollector=e,this._onWarn=t}add(e){if(e==null)return this._onWarn?.(`RichValueCollector.add: null/undefined value — falling back to #UNKNOWN!`),this._registerFallback();if(t.FormulaError.isError(e)){let t=e.getCode(),n=this._register(`_error:${t}`,{errorType:``+(t-1)},P);return this._metaCollector.registerRichValueCell(n)}return e.isIRichData&&e.getType(),this._onWarn?.(`RichValueCollector.add: unsupported rich value type — falling back to #UNKNOWN!`,e),this._registerFallback()}_registerFallback(){let e=this._register(`_error:fallback`,{errorType:t.FormulaError.Code.Unknown-1},P);return this._metaCollector.registerRichValueCell(e)}_register(e,t,n){let r=this._keyMap.get(e);return r===void 0&&(r=this._entries.length,this._entries.push({handler:n,rawValue:t}),this._keyMap.set(e,r)),r}getCount(){return this._entries.length}hasAny(){return this._entries.length>0}getEntries(){return this._entries}uniqueHandlers(){let e=new Set,t=[];for(let n of this._entries)e.has(n.handler)||(e.add(n.handler),t.push(n.handler));return t}handlerStructureIndex(e){let t=0,n=new Set;for(let r of this._entries)if(!n.has(r.handler)){if(r.handler===e)return t;n.add(r.handler),t++}return-1}},P=new class{constructor(e,t){this.type=e,this.props=t}getValues(e){return this.props.map(([t,,n=``])=>{let r=e?.[t];return r==null?n:``+r})}}(`_error`,[[`errorType`,`i`,``],[`subType`,`i`,`0`]]),F=`application/xml`,I=async(e,t)=>{let n=e.parts,r=n?n.length:0;for(let i=0;i<r;i++){let r=n[i];try{await L(r,t)}catch(n){t.log(`Unable to write the part '${r.name??r.id}' referenced by '${e.name??e.id}'`,n)}}},L=async(e,t,r)=>{let i=e.resId===void 0?void 0:t.getSharedStates().get(n)?.get(e.resId);if(!i)return e.resId===void 0?t.addPart(`embeddedPart`,e,r,e.id):(t.log(`The part '${e.name??e.id}' cites resource ${e.resId}, which is not in the workbook.`),null);let a=await i.getExternalURI();if(a){let n=t.addExternal(e.type,a,e.id);return n.relId!==e.id&&t.log(`The external reference '${e.id}' was written as '${n.relId}'; the markup will not find it.`),n}let o=await i.toBuffer();return t.addBinary(new Uint8Array(o),e.contentType||F,e.type,r??`./${re(e.name)}`,!1,e.id)},re=e=>{let t=e&&/^[\w.\-~%]+$/.test(e)?e:`part.xml`,n=t.lastIndexOf(`.`),r=n>0?t.slice(0,n):t,i=n>0?t.slice(n):``;return`${r.replace(/\d+$/,``)}{n}${i}`},ie=`application/vnd.openxmlformats-officedocument.spreadsheetml.pivotTable+xml`,ae=(e,t)=>e.getSharedStates().get(`pivotCachePaths`)?.get(t)??null,oe=`http://schemas.openxmlformats.org/officeDocument/2006/relationships/externalLink`,se=`fileVersion`,ce=`sheetParts`,le=`externalLinkParts`;function ue(e){if(!e||e.indexOf(`[`)===-1)return[];let t=[],n=e.replace(/"(?:[^"]|"")*"/g,``);for(let e of n.matchAll(/\[(\d+)\]/g)){let n=Number(e[1]);n>0&&!t.includes(n)&&t.push(n)}return t}var de={auto:`auto`,automaticExceptTables:`autoNoTable`,manual:`manual`};function R(e,n,r,i){if(!r)return;let a=typeof r==`string`?n.parseColor(r):r;i&&e.start(i);let o=a.getType(),s=a.getVal(),c=a.getAdjustments(),l=c&&c.length>0;switch(o){case`scheme`:l?(e.start(`schemeClr`,{val:s}),z(e,c),e.end(`schemeClr`)):e.empty(`schemeClr`,{val:s});break;case`named`:if(t.Color.isSystem(s)){let t=a.getLastColor()??a.getBaseColor().toHex().toString(!1).replace(`#`,``);l?(e.start(`sysClr`,{val:s,lastClr:t}),z(e,c),e.end(`sysClr`)):e.empty(`sysClr`,{val:s,lastClr:t})}else l?(e.start(`prstClr`,{val:s}),z(e,c),e.end(`prstClr`)):e.empty(`prstClr`,{val:s});break;case`auto`:{let t=a.getLastColor()??a.getBaseColor().toHex().toString(!1).replace(`#`,``);l?(e.start(`sysClr`,{val:`windowText`,lastClr:t}),z(e,c),e.end(`sysClr`)):e.empty(`sysClr`,{val:`windowText`,lastClr:t});break}case`index`:l?(e.start(`srgbClr`,{val:s}),z(e,c),e.end(`srgbClr`)):e.empty(`srgbClr`,{val:s});break;case`hsl`:let n=a.toHex().toString();l?(e.start(`srgbClr`,{val:n}),z(e,c),e.end(`srgbClr`)):e.empty(`srgbClr`,{val:n});break;case`rgb`:case`lrgb`:let r=a.toHex().toString();l?(e.start(`srgbClr`,{val:r}),z(e,c),e.end(`srgbClr`)):e.empty(`srgbClr`,{val:r});break;case`hex`:let i=s.replace(`#`,``).toUpperCase();l?(e.start(`srgbClr`,{val:i}),z(e,c),e.end(`srgbClr`)):e.empty(`srgbClr`,{val:i});break;default:let o=s.replace(`#`,``).toUpperCase();e.empty(`srgbClr`,{val:o})}i&&e.end(i)}function z(e,t){if(t&&t.length!==0)for(let n of t)for(let[t,r]of Object.entries(n)){if(r==null)continue;let n=t;if(n)if(typeof r==`boolean`)e.empty(n);else{let i;if(t===`alpha`||t===`alphaOff`||t===`alphaMod`)i=Math.round(1e5*r);else{if(t===`eTint`){if(r<0){e.empty(`shade`,{val:Math.round(1e5*(1+r)).toString()});continue}e.empty(`tint`,{val:Math.round(1e5*r).toString()});continue}i=Math.round(1e3*r)}e.empty(n,{val:i.toString()})}}}function B(e,n,r,i,a=!1,o=!1){if(!r)return;let s=typeof r==`string`?n.parseColor(r):r,c=()=>{e.empty(i,{rgb:ve(s.toHex().toString(!0))})},l=s.getAdjustments(),u=l&&l.length>0,d=s.getType();if(d!==t.IColor.Type.Auto){if(d===t.IColor.Type.Scheme){let n=s.getVal(),r=fe[n]??n,a=he.get(r);if(a===void 0&&r!==`phClr`)return console.warn(`Color scheme not in theme. schemeVal=${n} themeKey=${r}`),c();let o={};if(o.theme=a,u){if(!function(e){for(let n of e)switch(Object.keys(n)[0]){case t.IColor.AdjustmentType.Tint:case t.IColor.AdjustmentType.ETint:case t.IColor.AdjustmentType.Shade:case t.IColor.AdjustmentType.Lum:case t.IColor.AdjustmentType.LumOff:case t.IColor.AdjustmentType.LumMod:case t.IColor.AdjustmentType.Alpha:case t.IColor.AdjustmentType.AlphaOff:case t.IColor.AdjustmentType.AlphaMod:continue;default:return!1}return!0}(l))return c();let e=l.length===1?l[0][t.IColor.AdjustmentType.ETint]:void 0,n;if(e!==void 0)n=ge(e);else{let e=s.getBaseColor().toHex().toString(!0),t=s.toHex().toString(!0);n=ge(function(e,t){let n=V(e,0,255),r=V(t,0,255);return Math.abs(r-n)<1e-9?0:r<n?n<=1e-9?-1:V(r/n-1,-1,0):255-n<=1e-9?0:V((r-n)/(255-n),0,1)}(_e(e),_e(t)))}n!==0&&(o.tint=n)}e.empty(i,o);return}if(d===t.IColor.Type.Index){let t=s.getVal(),n=t.substring(5,t.length);e.empty(i,{indexed:Number(n)});return}return c()}e.empty(i,{auto:1})}var fe={bg1:`lt1`,tx1:`dk1`,bg2:`lt2`,tx2:`dk2`,accent1:`accent1`,accent2:`accent2`,accent3:`accent3`,accent4:`accent4`,accent5:`accent5`,accent6:`accent6`,hlink:`hlink`,folHlink:`folHlink`},pe=Object.freeze([`lt1`,`dk1`,`lt2`,`dk2`,`accent1`,`accent2`,`accent3`,`accent4`,`accent5`,`accent6`,`hlink`,`folHlink`]),me=Object.freeze([`dk1`,`lt1`,`dk2`,`lt2`,`accent1`,`accent2`,`accent3`,`accent4`,`accent5`,`accent6`,`hlink`,`folHlink`]),he=new Map(pe.map((e,t)=>[e,t]));function V(e,t,n){return Math.max(t,Math.min(n,e))}function ge(e){let t=V(e,-1,1);return Math.abs(t)<1e-12?0:t}function _e(e){let t=function(e){let t=e.replace(/^#/,``).toUpperCase();if(t.length===8)return t.slice(2);if(t.length===6)return t;throw Error(`Invalid hex: ${e}`)}(e),n=parseInt(t.slice(0,2),16)/255,r=parseInt(t.slice(2,4),16)/255,i=parseInt(t.slice(4,6),16)/255;return(Math.max(n,r,i)+Math.min(n,r,i))/2*255}function ve(e){let t=e.replace(/^#/,``).toUpperCase();if(t.length===8)return t;if(t.length===6)return`FF`+t;throw Error(`Invalid hex: ${e}`)}function ye(e,t=!1){let n=e;return n.length===8&&(n=n.substring(2,8)),n.length===6&&(n=(t?`00`:`FF`)+n),n.toUpperCase()}function be(e){let t=`[Threaded comment]\n\nYour version of Excel allows you to read this threaded comment; however, any edits to it will get removed if the file is opened in a newer version of Excel. Learn more: https://go.microsoft.com/fwlink/?linkid=870924\n\nComment:\n ${e.getContent()}`,n=e.getReplies();for(let e=0;e<n.length;e++)t+=`\nReply:\n ${n[e].getContent()}`;return t}function xe(e,t,n){if(typeof t==`string`)return void we(e,t);let r=t.runs;for(let t=0;t<r.length;t++){let i=r[t];e.start(`r`),i.font&&Ce(e,i.font,n),we(e,i.text??``),e.end(`r`)}}var Se={serif:1,"sans-serif":2,monospace:3,cursive:4,fantasy:5};function Ce(e,n,r){e.start(`rPr`);let i=(t,n)=>{n!==void 0&&e.empty(t,n?void 0:{val:0})};if(i(`b`,n.weight===void 0?void 0:n.weight>=700),i(`i`,n.style===void 0?void 0:n.style!==t.IFont.Style.Normal),i(`strike`,n.strike),i(`extend`,n.extend),i(`outline`,n.outline),i(`shadow`,n.shadow),n.underline&&e.empty(`u`,n.underline===t.IFont.UnderlineStyle.Single?void 0:{val:n.underline}),n.verticalAlign){let r=n.verticalAlign===t.IFont.VerticalAlignment.Super?`superscript`:n.verticalAlign===t.IFont.VerticalAlignment.Sub?`subscript`:n.verticalAlign;e.empty(`vertAlign`,{val:r})}n.size!==void 0&&e.empty(`sz`,{val:n.size}),n.color&&function(e,t,n){let r=/^index(\d+)$/.exec(t);if(r)return void e.empty(`color`,{indexed:Number(r[1])});B(e,n,t,`color`)}(e,n.color,r),n.family&&e.empty(`rFont`,{val:n.family});let a=n.fallbacks;if(a)for(let t=0;t<a.length;t++){let n=Se[a[t]];if(n!==void 0){e.empty(`family`,{val:n});break}}n.charset!==void 0&&e.empty(`charset`,{val:n.charset}),n.scheme&&n.scheme!==t.IFont.Scheme.None&&e.empty(`scheme`,{val:n.scheme}),e.end(`rPr`)}function we(t,n){t.start(`t`,e.C.test(n)||/[\n\r]/.test(n)?e.S:void 0),t.text(n),t.end(`t`)}function Te(e){let n=e.getRanges();if(n.isInvalid())return null;let r=n.getCoords()[0];return r?{ref:t.AddressUtils.cellToString({rowIndex:r.rowStart,colIndex:r.colStart}),row:r.rowStart,col:r.colStart}:null}function H(e,n,r,i,a=!1,o=!1){let s=i.getTheme();if(a&&n.start(`fill`),typeof r==`string`&&(r={type:t.IFill.Type.Solid,color:r}),r.type===t.IFill.Type.None)a?n.empty(`patternFill`,{patternType:`none`}):n.empty(`noFill`);else if(r.type===t.IFill.Type.Solid){let e=r;a?n.start(`patternFill`,{patternType:`solid`}):n.start(`solidFill`),e.color&&(a?B(n,s,e.color,`fgColor`):R(n,s,e.color)),a?n.end(`patternFill`):n.end(`solidFill`)}else if(r.type===t.IFill.Type.Pattern){let e=r,t=e.patternType||`solid`;n.start(`patternFill`,{patternType:t}),e.foreground&&(a?B(n,s,o?e.background:e.foreground,`fgColor`):R(n,s,o?e.background:e.foreground)),e.background&&(a?B(n,s,o?e.foreground:e.background,`bgColor`):R(n,s,o?e.foreground:e.background)),n.end(`patternFill`)}else if(r.type===t.IFill.Type.Gradient&&a){let e=r,i={},a=e.gradientType;if(a!==t.IFill.GradientType.Path&&a!==t.IFill.GradientType.Linear||(i.type=a),e.angle!==void 0){let t=(e.angle-90)%360;t!==0&&(i.degree=String(t))}let o=e.focus;o&&(o.left&&(i.left=String(o.left)),o.right&&(i.right=String(o.right)),o.top&&(i.top=String(o.top)),o.bottom&&(i.bottom=String(o.bottom))),n.start(`gradientFill`,i);let c=e.stops;if(c&&c.length>0)for(let e of c){let t,r=0;if(typeof e==`string`||typeof e==`object`&&!(`offset`in e))t=e,r=0;else{let n=e;r=n.offset||0,t=n.color}n.start(`stop`,{position:String(r)}),t&&B(n,s,t,`color`),n.end(`stop`)}n.end(`gradientFill`)}else if(r.type===t.IFill.Type.Gradient){let e=r,i={};e.isRotatedWithShape!==void 0&&(i.rotWithShape=e.isRotatedWithShape?`1`:`0`),n.start(`gradFill`,i),n.start(`gsLst`);let a=e.stops;if(a&&a.length>0)for(let e of a){let r,i=0;if(typeof e==`string`||typeof e==`object`&&!(`offset`in e))r=e;else{let t=e;i=t.offset||0,r=t.color}n.start(`gs`,{pos:String(t.CommonUtils.roundAccurately(1e3*i,0))}),r&&R(n,s,r),n.end(`gs`)}n.end(`gsLst`);let o=e.gradientType;if(o&&o!==t.IFill.GradientType.Linear){let r=o===`radial`?`circle`:o;n.start(`path`,{path:r});let i=e.focus;if(i){let e={};i.t!==void 0&&(e.t=String(t.CommonUtils.roundAccurately(1e3*i.t,0))),i.l!==void 0&&(e.l=String(t.CommonUtils.roundAccurately(1e3*i.l,0))),i.b!==void 0&&(e.b=String(t.CommonUtils.roundAccurately(1e3*i.b,0))),i.r!==void 0&&(e.r=String(t.CommonUtils.roundAccurately(1e3*i.r,0))),n.empty(`fillToRect`,e)}n.end(`path`)}else{let r={};e.angle!==void 0&&(r.ang=String(t.CommonUtils.roundAccurately(6e4*e.angle,0)));let i=e.scaled;i!==void 0&&(r.scaled=i?`1`:`0`),n.empty(`lin`,r)}n.end(`gradFill`)}else a?n.empty(`patternFill`,{patternType:`none`}):n.empty(`noFill`);a&&n.end(`fill`)}var Ee=(e,n,r,i)=>{if(!r)return n.start(`ln`),n.empty(`noFill`),void n.end(`ln`);typeof r==`string`&&(r={fill:r});let a=r,o={};if(a.width!==void 0&&(o.w=String(G(a.width))),a.lineCap!==void 0&&(o.cap=De(a.lineCap)),a.compound!==void 0&&(o.cmpd=a.compound),a.align!==void 0&&(o.algn=a.align),n.start(`ln`,o),H(0,n,a.fill??je,i),Array.isArray(a.dash)){n.start(`custDash`);for(let e=0;e<a.dash.length;e+=2)n.empty(`ds`,{d:String(t.CommonUtils.roundAccurately(1e3*a.dash[e],0)),sp:String(t.CommonUtils.roundAccurately(1e3*(a.dash[e+1]??0),0))});n.end(`custDash`)}else typeof a.dash==`string`&&n.empty(`prstDash`,{val:a.dash});if(a.lineJoin===t.IStroke.LineJoin.Round)n.empty(`round`);else if(a.lineJoin===t.IStroke.LineJoin.Bevel)n.empty(`bevel`);else if(a.lineJoin===t.IStroke.LineJoin.Miter){let e={};a.miterLimit!==void 0&&(e.lim=String(t.CommonUtils.roundAccurately(1e5*a.miterLimit,0))),n.empty(`miter`,e)}n.end(`ln`)},De=e=>e===`round`?`rnd`:e===`butt`?`flat`:e===`square`?`sq`:e,Oe=(e,t,n,r=void 0,i=!1)=>{if(!n||!(n.fill||n.stroke||n.effects?.length||i))return;let a=e.getXMLWriter();r&&a.start(r),a.pushDefaultNamespace(`a`),n.fill&&H(0,a,n.fill,t),n.stroke&&Ee(0,a,n.stroke,t),n.effects?.length?ke(e,a,t.getTheme(),n.effects):i&&a.empty(`effectLst`),a.popDefaultNamespace(),r&&a.end(r)},ke=(e,t,n,r)=>{t.start(`effectLst`);for(let e of r)Ae(t,n,e);t.end(`effectLst`)},Ae=(e,n,r)=>{switch(r.type){case t.IEffect.Type.OuterShadow:{let i=r,a={};i.blur!==void 0&&(a.blurRad=String(G(i.blur))),i.distance!==void 0&&(a.dist=String(G(i.distance))),i.angle!==void 0&&(a.dir=String(q(i.angle))),i.alignment!==void 0&&(a.algn=i.alignment),i.isRotatedWithShape!==void 0&&(a.rotWithShape=i.isRotatedWithShape?`1`:`0`),i.scaleX!==void 0&&(a.sx=String(t.CommonUtils.roundAccurately(1e3*i.scaleX,0))),i.scaleY!==void 0&&(a.sy=String(t.CommonUtils.roundAccurately(1e3*i.scaleY,0))),i.skewX!==void 0&&(a.kx=String(q(i.skewX))),i.skewY!==void 0&&(a.ky=String(q(i.skewY))),e.start(`outerShdw`,a),R(e,n,i.color),e.end(`outerShdw`);break}case t.IEffect.Type.InnerShadow:{let t=r,i={};t.blur!==void 0&&(i.blurRad=String(G(t.blur))),t.distance!==void 0&&(i.dist=String(G(t.distance))),t.angle!==void 0&&(i.dir=String(q(t.angle))),e.start(`innerShdw`,i),R(e,n,t.color),e.end(`innerShdw`);break}case t.IEffect.Type.PresetShadow:{let t=r,i={prst:t.preset};t.distance!==void 0&&(i.dist=String(G(t.distance))),t.angle!==void 0&&(i.dir=String(q(t.angle))),e.start(`prstShdw`,i),R(e,n,t.color),e.end(`prstShdw`);break}case t.IEffect.Type.Glow:{let t=r,i={};t.radius!==void 0&&(i.rad=String(G(t.radius))),e.start(`glow`,i),R(e,n,t.color),e.end(`glow`);break}case t.IEffect.Type.SoftEdge:{let t=r,n={};t.radius!==void 0&&(n.rad=String(G(t.radius))),e.empty(`softEdge`,n);break}case t.IEffect.Type.Reflection:{let n=r,i={};n.blur!==void 0&&(i.blurRad=String(G(n.blur))),n.distance!==void 0&&(i.dist=String(G(n.distance))),n.angle!==void 0&&(i.dir=String(q(n.angle))),n.fadeAngle!==void 0&&(i.fadeDir=String(q(n.fadeAngle))),n.startAlpha!==void 0&&(i.stA=String(t.CommonUtils.roundAccurately(1e3*n.startAlpha,0))),n.startPosition!==void 0&&(i.stPos=String(t.CommonUtils.roundAccurately(1e3*n.startPosition,0))),n.endAlpha!==void 0&&(i.endA=String(t.CommonUtils.roundAccurately(1e3*n.endAlpha,0))),n.endPosition!==void 0&&(i.endPos=String(t.CommonUtils.roundAccurately(1e3*n.endPosition,0))),n.scaleX!==void 0&&(i.sx=String(t.CommonUtils.roundAccurately(1e3*n.scaleX,0))),n.scaleY!==void 0&&(i.sy=String(t.CommonUtils.roundAccurately(1e3*n.scaleY,0))),n.skewX!==void 0&&(i.kx=String(q(n.skewX))),n.skewY!==void 0&&(i.ky=String(q(n.skewY))),n.alignment!==void 0&&(i.algn=n.alignment),n.isRotatedWithShape!==void 0&&(i.rotWithShape=n.isRotatedWithShape?`1`:`0`),e.empty(`reflection`,i);break}}},je={type:`none`},U=`http://schemas.openxmlformats.org/officeDocument/2006/relationships/image`,W=`imagesWritten`,Me={mime:`image/png`,ext:`png`},G=(e=0)=>t.CommonUtils.roundAccurately(12700*e,0),K=(e=0)=>t.CommonUtils.roundAccurately(9525*e,0),q=e=>6e4*e,Ne=(e=0)=>t.CommonUtils.roundAccurately(100*e,2),Pe=class{constructor(){this._dxfs=[],this._byKey=new Map}add(e){let t=JSON.stringify(e),n=this._byKey.get(t);return n===void 0&&(n=this._dxfs.length,this._dxfs.push(e),this._byKey.set(t,n)),n}getDxfs(){return this._dxfs}getCount(){return this._dxfs.length}},Fe=`cfDxfs`,Ie=[`font`,`fill`,`borders`,`numberFormat`,`alignment`];function Le(e,n,r){if(n){if(n.named){let i=n.named,a=i.toLowerCase(),o=r.namedStyleMap;if(!o.has(a)){o.set(a,``+o.size);let n=e.getNamedStyles().getByName(i).toJSON();Le(e,n.style??t.CommonUtils.EmptyObject,r),r.namedStyles.push(n)}}n.font&&function(e,n,r){if(!n)return;let i=t.BufferUtils.JSONStableStringify(n),a=r.fontMap;if(!a.has(i)){let e=a.size;a.set(i,``+e),r.fonts.push(n)}}(0,n.font,r),n.fill&&function(e,n,r){if(!n)return;let i=t.BufferUtils.JSONStableStringify(n),a=r.fillMap;if(!a.has(i)&&typeof n==`object`&&n.type){let e=a.size;a.set(i,``+e),r.fills.push(n)}}(0,n.fill,r),n.borders&&function(e,n,r){if(!n)return;let i=t.BufferUtils.JSONStableStringify(n),a=r.borderMap;if(!a.has(i)){let e=a.size;a.set(i,``+e),r.borders.push(n)}}(0,n.borders,r),n.numberFormat!==void 0&&function(e,n,r){if(!n)return;let i=t.NumberFormat.toBuiltInID(n),a=r.numFmtMap;if(!a.has(i)){let e=0;typeof i==`number`?e=i:(e=r.numFmtsCustom.length+We,r.numFmtsCustom.push(i)),a.set(n,``+e)}}(0,n.numberFormat,r)}}function Re(e,t,n){if(!t)return;let r=t.name.toLowerCase();n.namedStyleMap.has(r)||(n.namedStyleMap.set(r,``+n.namedStyleMap.size),n.namedStyles.push(t),Le(e,t.style,n))}function ze(e,t,n,r,i=!1){let a=r.getDefaultFontSize(),o=r.getTheme().getFontScheme().getMinorFont()??`Calibri`,s=r.getNormal().getFont().getColor();t.start(`font`),n.weight&&n.weight>=700&&t.empty(`b`),n.style&&n.style!==`normal`&&t.empty(`i`),n.strike&&t.empty(`strike`),n.underline&&t.empty(`u`,{val:n.underline}),n.outline&&t.empty(`outline`),n.shadow&&t.empty(`shadow`),n.extend&&t.empty(`extend`);let c=n.verticalAlign;c&&(c===`super`&&(c=`superscript`),c===`sub`&&(c=`subscript`),t.empty(`vertAlign`,{val:c})),i?n.size!==void 0&&t.empty(`sz`,{val:String(n.size)}):t.empty(`sz`,{val:String(n.size??a)}),B(t,r.getTheme(),n.color??s,`color`,!i);let l=!i||n.family&&n.family!==o;if(l&&(t.empty(`name`,{val:n.family??o}),n.fallbacks&&n.fallbacks.length>0)){let e=n.fallbacks;e.includes(`serif`)?t.empty(`family`,{val:1}):e.includes(`sans-serif`)?t.empty(`family`,{val:2}):e.includes(`monospace`)?t.empty(`family`,{val:3}):e.includes(`cursive`)?t.empty(`family`,{val:4}):e.includes(`fantasy`)&&t.empty(`family`,{val:5})}n.charset!==void 0&&n.charset!==null&&t.empty(`charset`,{val:String(n.charset)});let u=n.scheme??(n.family===void 0?`minor`:void 0);l&&u!==void 0&&u!==`none`&&t.empty(`scheme`,{val:u}),t.end(`font`)}function J(e,t,n,r,i,a=!1){if(!i||i.style===`none`||!i.style)return void(a&&!i||t.empty(r));t.start(r,{style:i.style});let o=i.color;o&&B(t,n,o,`color`,!a,a),t.end(r)}function Be(e,t,n,r,i=!1){let a={};i?(a.diagonalUp=`0`,a.diagonalDown=`0`):(n.diagonalUp&&(a.diagonalUp=`1`),n.diagonalDown&&(a.diagonalDown=`1`)),t.start(`border`,a),J(0,t,r,`left`,n.left,i),J(0,t,r,`right`,n.right,i),J(0,t,r,`top`,n.top,i),J(0,t,r,`bottom`,n.bottom,i),i?(J(0,t,r,`vertical`,n.vertical,i),J(0,t,r,`horizontal`,n.horizontal,i)):J(0,t,r,`diagonal`,n.diagonalUp??n.diagonalDown,i),t.end(`border`)}function Ve(e,n,r,i=!1){let a={};r.horizontal&&r.horizontal!==t.ITextFrame.HorizontalAlignment.General&&(a.horizontal=r.horizontal),r.vertical&&r.vertical!==t.ITextFrame.VerticalAlignment.Bottom&&(a.vertical=r.vertical);let o=r.rotation;r.stacked&&(a.textRotation=`255`,o=0),o&&(o>=270&&o<360?o=360-o:o>0&&o<=90&&(o+=90),a.textRotation=String(o));let s=r.overflow;switch(s===t.ITextFrame.Overflow.Wrap&&(a.wrapText=`1`),r.indent&&(a.indent=``+r.indent),r.relativeIndent&&(a.relativeIndent=``+r.relativeIndent),r.justifyLastLine&&(a.justifyLastLine=`1`),s===t.ITextFrame.Overflow.Shrink&&(a.shrinkToFit=`1`),r.readingDirection){case t.ITextFrame.ReadingDirection.Auto:break;case t.ITextFrame.ReadingDirection.LeftToRight:a.readingOrder=`1`;break;case t.ITextFrame.ReadingDirection.RightToLeft:a.readingOrder=`2`}return Object.keys(a).length>0?a:null}function He(e,n,r,i,a,o,s=!1){let c={},l=null,u=i.named;u&&(l=r.getNamedStyles().getByName(u).toJSON().style);let d=i.font??l?.font,f=d?a.fontMap.get(t.BufferUtils.JSONStableStringify(d))??0:0,p=i.fill??l?.fill,m=p?a.fillMap.get(t.BufferUtils.JSONStableStringify(p))??0:0,h=i.borders??l?.borders,g=h?a.borderMap.get(t.BufferUtils.JSONStableStringify(h))??0:0,_=i.numberFormat??l?.numberFormat;if(c.numFmtId=(_===void 0?void 0:a.numFmtMap.get(_))??`0`,c.fontId=String(f),c.fillId=String(m),c.borderId=String(g),o){let e=i.named??t.IStyle.BuiltInName.Normal;c.xfId=a.namedStyleMap.get(e.toLowerCase())}let v=null,y=i.alignment??l?.alignment;y&&(v=Ve(0,0,y)),i.font&&(c.applyFont=`1`),i.fill&&(c.applyFill=`1`),i.numberFormat&&(c.applyNumberFormat=`1`),i.borders&&(c.applyBorder=`1`),v&&(c.applyAlignment=`1`);let b=null,x=i.protection?.alwaysUnlocked??l?.protection?.alwaysUnlocked??!1;(x||s)&&(b={},x&&(b.locked=`0`),s&&(b.hidden=`1`),c.applyProtection=`1`),i.quotePrefix&&(c.quotePrefix=`1`),v||b?(n.start(`xf`,c),v&&n.empty(`alignment`,v),b&&n.empty(`protection`,b),n.end(`xf`)):n.empty(`xf`,c)}function Ue(e,n,r,i,a,o=`dxf`,s=We){if(n.start(o),r.font&&ze(0,n,r.font,i,!0),r.numberFormat!==void 0&&r.numberFormat!==null){let e=t.NumberFormat.toBuiltInID(r.numberFormat),i=typeof e==`number`,a=i?t.NumberFormat.builtInFormat(e):String(e);a&&n.empty(`numFmt`,{numFmtId:String(i?e:s++),formatCode:a})}if(r.fill&&H(0,n,r.fill,i,!0,!0),r.alignment){let e=Ve(0,0,r.alignment,!0);e&&n.empty(`alignment`,e)}return r.borders&&Be(0,n,r.borders,a,!0),n.end(o),s}var We=164,Ge=Object.freeze([`wholeTable`,`headerRow`,`totalRow`,`firstColumn`,`lastColumn`,`firstRowStripe`,`secondRowStripe`,`firstColumnStripe`,`secondColumnStripe`,`firstHeaderCell`,`lastHeaderCell`,`firstTotalCell`,`lastTotalCell`]),Ke=t.ICondition.BuiltInOperatorNames,qe=(e,t,n,r,i,a)=>{let o=r.sorts,s=o?o.length:0;if(s===0)return;let c={};if(s>0){let e=o[0].criteria?.collatorOptions;e&&(c.caseSensitive=typeof e!=`object`||Array.isArray(e)||e.sensitivity!==`case`&&e.sensitivity!==`variant`?`0`:`1`)}c.ref=n.getRange().toString(),c[`xmlns:xlrd2`]=`http://schemas.microsoft.com/office/spreadsheetml/2017/richdata2`,t.start(`sortState`,c);for(let e=0;e<s;e++){let n=o[e],r=n.criteria??{},s=n.index+a.colStart,c={};r.reverse&&(c.descending=`1`),c.ref=i.getIntersect({colStart:s,rowStart:a.rowStart,colEnd:s,rowEnd:a.rowEnd}).toString(),r.sortOn&&(c.sortBy=r.sortOn),r.dxfId!==void 0&&(c.dxfId=r.dxfId),r.iconSet!==void 0&&(c.iconSet=r.iconSet),r.customList!==void 0&&(c.customList=r.customList),t.empty(`sortCondition`,c)}t.end(`sortState`)},Je=(e,t,n,r,i=!1)=>{let a=n.getRange();n.isShowTotals()&&(a=a.getResizeBy(-1,0));let o=a.getCoords(),s=r.sort,c=r.filter,l=c?c.conditions:void 0,u=l?l.length:0,d=r.hiddenButtons,f={};f.ref=a.toString();let p,m=[];for(let e=0;e<u;e++){let t=l[e];m[t.index]={...t}}if(Array.isArray(d)&&d.length>0){let e=d.length;p=Array(d[e-1]);for(let t=0;t<e;t++)p[d[t]]=!0}if(m||d||p||i){let c=0;r.columns?c=r.columns.length:i&&(c=a.getColumnCount()),t.start(`autoFilter`,f);for(let n=0;n<c;n++){let r=!0===d||!0===p?.[n],i=m[n];(i||r)&&Ye(e,t,n,i,r)}s&&i&&qe(0,t,n,s,a,o),t.end(`autoFilter`)}else t.empty(`autoFilter`,f);s&&!i&&qe(0,t,n,s,a,o)},Y=(t,n,r)=>{let i=e.p(r,e=>t.warn(e,r));if(!i)return;let a={operator:i.operator};i.val!==void 0&&(a.val=i.val),n.empty(`customFilter`,a)},Ye=(n,r,i,a,o)=>{let s={};s.colId=``+i,o&&(s.hiddenButton=`1`),a?(r.start(`filterColumn`,s),((n,r,i)=>{let a=i.operator;if(a!==t.ICondition.BuiltInOperatorNames.Expression)if(a!==t.ICondition.BuiltInOperatorNames.Unique){if(a===t.ICondition.BuiltInOperatorNames.Color){let e=i.param,t={};e.cellColor!==void 0&&(t.cellColor=e.cellColor?`1`:`0`),e.styleId!==void 0&&(t.dxfId=e.styleId),r.empty(`colorFilter`,t)}if(Xe(a))if(a===`between`){let e=i.param;r.start(`customFilters`,{and:`1`}),Y(n,r,{operator:Ke.GreaterThanEqualTo,param:e.from}),Y(n,r,{operator:Ke.LessThanEqualTo,param:e.to}),r.end(`customFilters`)}else if(a===t.ICondition.BuiltInOperatorNames.Not){let t=i.param;e.m(t?.operator)?(r.start(`customFilters`),Y(n,r,i),r.end(`customFilters`)):n.warn(`Not rule with non-comparison criteria not supported in OOXML`,t)}else if(a===t.ICondition.BuiltInOperatorNames.And||a===t.ICondition.BuiltInOperatorNames.Or){let o=i.param,s=o.length;if(s>0){let i={};a===t.ICondition.BuiltInOperatorNames.And&&s>1&&(i.and=`1`),r.start(`customFilters`,i);for(let t=0;t<s;t++){let i=o[t],a=i.operator===Ke.Not&&e.m(i.param?.operator);e.m(i.operator)||a?Y(n,r,i):n.warn(`Only Comparison criteria supported in Union conditions for Table AutoFilters`,i)}r.end(`customFilters`)}}else e.m(a)&&(r.start(`customFilters`),Y(n,r,i),r.end(`customFilters`));if(a===t.ICondition.BuiltInOperatorNames.TimePeriod){let e=i.param,t={};e.type&&(t.type=e.type),e.anchorDate!==void 0&&(t.val=``+e.anchorDate),e.maxVal!==void 0&&(t.maxVal=``+e.maxVal),r.empty(`dynamicFilter`,t)}if(a===t.ICondition.BuiltInOperatorNames.Average){let e=i.param,n={},a=e.type;a&&(a===t.ICondition.AverageType.Above?n.type=`aboveAverage`:a===t.ICondition.AverageType.Below&&(n.type=`belowAverage`)),e.stdDevs!==void 0&&(n.val=``+e.stdDevs),r.empty(`dynamicFilter`,n)}if(a===t.ICondition.BuiltInOperatorNames.InSet){let e=i.param;if(e.dateGroups){let t=e.dateGroups,n=t.length;r.start(`dateGroupItem`);for(let e=0;e<n;e++){let n=t[e],i={};n.day!==void 0&&(i.day=``+n.day),n.hour!==void 0&&(i.hour=``+n.hour),n.minute!==void 0&&(i.minute=``+n.minute),n.second!==void 0&&(i.second=``+n.second),n.year!==void 0&&(i.year=``+n.year),n.month!==void 0&&(i.month=``+n.month),i.dateTimeGrouping=n.group,r.empty(`dateGroupItem`,i)}r.end(`dateGroupItem`)}if(e.items){let t=e.items,n=t.length;r.start(`filters`);for(let e=0;e<n;e++){let n=t[e];r.empty(`filter`,{val:``+n})}r.end(`filters`)}}if(a===t.ICondition.BuiltInOperatorNames.Icon){let e=i.param,t={};e.iconSet!==void 0&&(t.iconSet=e.iconSet),e.iconId!==void 0&&(t.iconId=``+e.iconId),r.empty(`iconFilter`,t)}if(a===t.ICondition.BuiltInOperatorNames.TopN){let e=i.param,t={};e.percent&&(t.percent=`1`),e.top!==void 0&&(t.top=e.top?`1`:`0`),e.limit!==void 0&&(t.val=``+e.limit),e.filterVal!==void 0&&(t.filterVal=``+e.filterVal),r.empty(`top10`,t)}}else n.warn(`Unique conditions not supported in Table AutoFilters`,i);else n.warn(`Expression conditions not supported in Table AutoFilters`,i)})(n,r,a),r.end(`filterColumn`)):r.empty(`filterColumn`,s)},Xe=e=>e===t.ICondition.BuiltInOperatorNames.GreaterThan||e===t.ICondition.BuiltInOperatorNames.GreaterThanEqualTo||e===t.ICondition.BuiltInOperatorNames.LessThan||e===t.ICondition.BuiltInOperatorNames.LessThanEqualTo||e===t.ICondition.BuiltInOperatorNames.EqualTo||e===t.ICondition.BuiltInOperatorNames.And||e===t.ICondition.BuiltInOperatorNames.Or||e===t.ICondition.BuiltInOperatorNames.Not||e===`between`,Ze={names:new Set,perFormula:[],affects:()=>!1},Qe=1048576,$e=(e,t,n)=>{if(!n)return[];let r=0;for(let i=0;i<n.length;i++){let a=n[i][0],o=t.getRange(a).getCoords();if(r+=(o.rowEnd-o.rowStart+1)*(o.colEnd-o.colStart+1),r>Qe)return e.warn(`Direct styles cover more than ${Qe} cells; not writing the styles from '${a}' on. A range that size belongs in a column or row style.`),n.slice(0,i)}return n};function et(e,n){let r=n.type;r===t.IConditionalFormat.ColorStopType.AutoMin?r=t.IConditionalFormat.ColorStopType.Min:r===t.IConditionalFormat.ColorStopType.AutoMax&&(r=t.IConditionalFormat.ColorStopType.Max),e.empty(`cfvo`,{type:r,val:n.value,gte:n.exclusive?`0`:void 0})}function tt(e,t){let n={type:t.type,gte:t.exclusive?`0`:void 0};t.value===void 0?e.empty(`x14:cfvo`,n):(e.start(`x14:cfvo`,n),e.start(`xm:f`),e.text(t.value),e.end(`xm:f`),e.end(`x14:cfvo`))}var nt=new Set([t.IStyle.IconSet.Arrows3,t.IStyle.IconSet.ArrowsGray3,t.IStyle.IconSet.Flags3,t.IStyle.IconSet.Signs3,t.IStyle.IconSet.Symbols3,t.IStyle.IconSet.Symbols3_2,t.IStyle.IconSet.TrafficLights3,t.IStyle.IconSet.TrafficLights3_2,t.IStyle.IconSet.Arrows4,t.IStyle.IconSet.ArrowsGray4,t.IStyle.IconSet.Rating4,t.IStyle.IconSet.RedToBlack4,t.IStyle.IconSet.TrafficLights4,t.IStyle.IconSet.Arrows5,t.IStyle.IconSet.ArrowsGray5,t.IStyle.IconSet.Quarters5,t.IStyle.IconSet.Rating5]);function rt(e){return(e.icon?.length??0)>0||e.iconSet!==void 0&&!nt.has(e.iconSet)}function it(n,r,i,a,o,s,c,l,u){let d=a.scale;a.ext&&n.warn(`Conditional format extension payload is not written to xlsx; it will be lost.`);let f={type:o.type,dxfId:a.style&&Object.keys(a.style).length>0?l.add(a.style):void 0,priority:c,stopIfTrue:X(a.stopIfTrue),aboveAverage:X(o.aboveAverage),equalAverage:X(o.equalAverage),stdDev:o.stdDev,bottom:X(o.bottom),percent:X(o.percent),rank:o.rank,operator:o.operator,text:o.text,timePeriod:o.timePeriod},p;d?.type===t.IConditionalFormat.ScaleType.DataBar&&function(e){if(e.gradient||e.borderColor||e.negativeFillColor||e.negativeBorderColor||e.axisColor||e.axisPosition||e.direction)return!0;let n=e.stops,r=n?n.length:0;for(let e=0;e<r;e++){let r=n[e].type;if(r===t.IConditionalFormat.ColorStopType.AutoMin||r===t.IConditionalFormat.ColorStopType.AutoMax)return!0}return!1}(d)&&(p=e.st(t.CommonUtils.uuidV4),u.push({guid:p,sqref:s,priority:c,scale:d}));let m=o.formulas,h=m?m.length:0;if(h!==0||d){r.start(`cfRule`,f);for(let e=0;e<h;e++)r.start(`formula`),r.text(m[e]),r.end(`formula`);if(d?.type===t.IConditionalFormat.ScaleType.ColorScale){let e=d.stops??[];r.start(`colorScale`);for(let t=0;t<e.length;t++)et(r,e[t]);for(let t=0;t<e.length;t++)B(r,i,e[t].color,`color`);r.end(`colorScale`)}else if(d?.type===t.IConditionalFormat.ScaleType.DataBar){let e=d.stops??[];r.start(`dataBar`,{minLength:d.minLength,maxLength:d.maxLength,showValue:X(d.showValue)});for(let t=0;t<e.length;t++)et(r,e[t]);d.color&&B(r,i,d.color,`color`),r.end(`dataBar`)}else if(d?.type===t.IConditionalFormat.ScaleType.IconSet){let e=d.stops??[];r.start(`iconSet`,{iconSet:d.iconSet,reverse:X(d.reverse),showValue:X(d.showValue)});for(let t=0;t<e.length;t++)et(r,e[t]);r.end(`iconSet`)}p&&(r.start(`extLst`),r.start(`ext`,{uri:e.Z,"xmlns:x14":e.rt}),r.start(`x14:id`),r.text(p),r.end(`x14:id`),r.end(`ext`),r.end(`extLst`)),r.end(`cfRule`)}else r.empty(`cfRule`,f)}function at(e){let n=2**53-1,r=2**53-1,i=e.split(` `);for(let e=0;e<i.length;e++){if(!i[e])continue;let a=t.AddressUtils.fastStringToRange(i[e]);a.rowStart<n&&(n=a.rowStart),a.colStart<r&&(r=a.colStart)}return t.AddressUtils.cellToString({rowIndex:n,colIndex:r})}function ot(e){if(typeof e==`string`)return e.split(`,`).join(` `);if(Array.isArray(e)){let n=[];for(let r=0;r<e.length;r++){let i=t.AddressUtils.rangeToString(e[r]);i&&n.push(i)}return n.length>0?n.join(` `):null}return t.AddressUtils.rangeToString(e)}function X(e){if(e!==void 0)return e?`1`:`0`}function st(e){if(typeof e!=`string`)return!1;let t=!1;for(let n=0;n<e.length;n++){let r=e[n];if(r===`"`)t=!t;else if(r===`!`&&!t)return!0}return!1}function ct(e){let t=e.formulas,n=t?t.length:0;for(let e=0;e<n;e++)if(st(t[e]))return!0;return!1}function lt(e){let n=2**53-1,r=2**53-1,i=e.split(` `);for(let e=0;e<i.length;e++){if(!i[e])continue;let a=t.AddressUtils.fastStringToRange(i[e]);a.rowStart<n&&(n=a.rowStart),a.colStart<r&&(r=a.colStart)}return n===2**53-1?null:{rowIndex:n,colIndex:r}}function ut(e,n,r){if(typeof e!=`string`||!e||!n||!r)return e;try{let i=r.parse(e,n);return i&&t.FormulaText.image(r.spell(i,!0),{at:n})||e}catch{return e}}function dt(e,t,n){let r=e?.stops;if(!r||!n)return e;let i;for(let e=0;e<r.length;e++){let a=r[e]?.value;if(typeof a!=`string`)continue;let o=ut(a,t,n);o!==a&&(i||=[...r],i[e]={...r[e],value:o})}return i?{...e,stops:i}:e}function ft(e,t,n,r){if(!r?.xml)return;let i=e.addPart(`legacyDrawing`,r);t.empty(n,{"r:id":i.relId})}var pt=(e,t,n,r)=>{let i=(t,n)=>{let r=e.getRangeAtBounds({x:t,y:n,width:0,height:0}),i=r.getCoords(),a=r.getBounds();return[i.colStart,t-a.x,i.rowStart,n-a.y]},a=t.getMovable()?.getBounds()??null,o=a?t.toJSON()?.box?.anchor:void 0;if(a&&o?.tl&&o.br){let t=e.getEntireRange().getCoords(),i=e=>[Math.min(t.colEnd,Math.max(0,r+(e.c??0))),e.x??0,Math.min(t.rowEnd,Math.max(0,n+(e.r??0))),e.y??0];return{bounds:a,anchor:[...i(o.tl),...i(o.br)]}}if(!a){let t=e.getRange({rowStart:n,colStart:r,rowEnd:n,colEnd:r}).getBounds();a={x:t.x+t.width+15,y:Math.max(2,t.y-10),width:144,height:79}}return{bounds:a,anchor:[...i(a.x,a.y),...i(a.x+a.width,a.y+a.height)]}},mt=(t,n)=>{if(!n)return t;let r=t?.xml??null,i=e.a(r??``),a=[],o=n.comments;for(let t=0;t<o.length;t++){let{comment:r,row:s,col:c}=o[t],l=r.isNote()?r.toJSON():null,{bounds:u,anchor:d}=pt(n.sheet,r,s,c);a.push(e.c(l?.box?.xml,{shapeId:++i,zIndex:t+1,row:s,col:c,anchor:d,bounds:u,visible:!!l?.shown,alt:l?.description}))}let s=e.i(r,a,i);return s?s===r?t:t?{...t,xml:s}:{xml:s}:t},ht=e=>e.content?.type!==`control`,gt=`http://schemas.openxmlformats.org/officeDocument/2006/relationships/ctrlProp`,_t=(e,t)=>{if(!e?.xml)return e;let n=t.movables;if(!n)return e;let r=new Map,i=n.length;for(let e=0;e<i;e++){let t=n[e];if(ht(t))continue;let i=t.content?.json?.shapeId;typeof i==`number`&&r.set(i,t)}if(r.size===0)return e;let a=e.xml.replace(/<v:shape\b[\s\S]*?<\/v:shape>/g,e=>{let t=/\bo:spid="_x0000_s(\d+)"/.exec(e)??/\bid="_x0000_s(\d+)"/.exec(e),n=t?r.get(parseInt(t[1],10)):void 0;if(!n)return e;let i=n.anchor,a=[i.tl.c,i.tl.r,i.br.c,i.br.r];return e.replace(/(<x:Anchor>)([\s\d,-]*)(<\/x:Anchor>)/,(e,t,n,r)=>{let i=n.split(`,`).map(e=>e.trim());if(i.length!==8)return e;let o=i.slice();for(let e=0;e<4;e++)o[2*e]=String(a[e]??0);return o.join(`,`)===i.join(`,`)?e:`${t}${o.join(`, `)}${r}`})});return a===e.xml?e:{...e,xml:a}},vt=(e,t,n)=>{e.start(t),e.start(`xdr:col`),e.text(n.c??0),e.end(`xdr:col`),e.start(`xdr:colOff`),e.text(K(n.x)),e.end(`xdr:colOff`),e.start(`xdr:row`),e.text(n.r??0),e.end(`xdr:row`),e.start(`xdr:rowOff`),e.text(K(n.y)),e.end(`xdr:rowOff`),e.end(t)},yt={r:void 0,s:void 0,t:void 0,cm:void 0,vm:void 0},bt={r:void 0,s:void 0,customFormat:void 0,hidden:void 0,ht:void 0,customHeight:void 0,"x14ac:dyDescent":`0.25`,outlineLevel:void 0,collapsed:void 0},xt={t:void 0,aca:void 0,ref:void 0,ca:void 0,si:void 0},St={t:`shared`,aca:void 0,ref:void 0,ca:void 0,si:void 0},Ct={t:`array`,aca:void 0,ref:void 0,ca:void 0,si:void 0};function wt(e,t,n,r){n&&(t.start(r),t.empty(`latin`,{typeface:n}),t.empty(`ea`,{typeface:``}),t.empty(`cs`,{typeface:``}),t.end(r))}var Tt=e=>e.toISOString().split(`.`)[0]+`Z`,Et=(e,t,n)=>{switch(t){case`creator`:e.start(`dc:creator`),e.text(n),e.end(`dc:creator`);break;case`lastModifiedBy`:e.start(`cp:lastModifiedBy`),e.text(n),e.end(`cp:lastModifiedBy`);break;case`created`:e.start(`dcterms:created`,{"xsi:type":`dcterms:W3CDTF`}),e.text(n),e.end(`dcterms:created`);break;case`modified`:e.start(`dcterms:modified`,{"xsi:type":`dcterms:W3CDTF`}),e.text(n),e.end(`dcterms:modified`)}},Z=(e,t,n,r)=>{t.start(n),t.text(r),t.end(n)},Dt=(e,n,r)=>{let i=r.getSheets().getItems({visibility:t.ISheet.Visibility.Hidden}).map(e=>e.getName()),a=r.getNames().getItems({type:`formula`}).filter(e=>!!e.getRanges?.()).map(e=>e.getName());n.start(`HeadingPairs`),n.start(`vt:vector`,{size:a.length>0?`4`:`2`,baseType:`variant`}),n.start(`vt:variant`),n.start(`vt:lpstr`),n.text(`Worksheets`),n.end(`vt:lpstr`),n.end(`vt:variant`),n.start(`vt:variant`),n.start(`vt:i4`),n.text(``+i.length),n.end(`vt:i4`),n.end(`vt:variant`),a.length>0&&(n.start(`vt:variant`),n.start(`vt:lpstr`),n.text(`Named Ranges`),n.end(`vt:lpstr`),n.end(`vt:variant`),n.start(`vt:variant`),n.start(`vt:i4`),n.text(``+a.length),n.end(`vt:i4`),n.end(`vt:variant`)),n.end(`vt:vector`),n.end(`HeadingPairs`),n.start(`TitlesOfParts`),n.start(`vt:vector`,{size:``+(i.length+a.length),baseType:`lpstr`});for(let e of i)n.start(`vt:lpstr`),n.text(e),n.end(`vt:lpstr`);for(let e of a)n.start(`vt:lpstr`),n.text(e),n.end(`vt:lpstr`);n.end(`vt:vector`),n.end(`TitlesOfParts`)},Ot={minSupportedVersion:`120000`,copy:`1`,pasteAll:`1`,pasteValues:`1`,merge:`1`,splitFirst:`1`,rowColShift:`1`,clearFormats:`1`,clearComments:`1`,assign:`1`,coerce:`1`},kt=(e,n,r=t.CommonUtils.EmptyArray)=>{if(!n)return{...r};let{text:i,runs:a,color:o,size:s,kern:c,weight:l,style:u,b:d,i:f,spc:p,baseline:m,...h}=n,g={...r,...h};return s!==void 0&&(g.sz=``+Ne(s)),d!==void 0&&(g.b=d?`1`:`0`),l!==void 0&&(g.b=l>500?`1`:`0`),f!==void 0&&(g.i=f?`1`:`0`),u!==void 0&&(g.i=u===`italic`?`1`:`0`),c!==void 0&&(g.kern=``+Ne(c)),p!==void 0&&(g.spc=``+Ne(p)),m!==void 0&&(g.baseline=``+Ne(m)),g},At=(e,t,n)=>{if(!n)return;let r=e.getXMLWriter();r.start(`txBody`),r.pushDefaultNamespace(`a`),Mt(e,t,{vertOverflow:`clip`,horzOverflow:`clip`,rtlCol:`0`,anchor:`ctr`}),r.empty(`lstStyle`),((e,t,n)=>{if(!n)return;let r=e.getXMLWriter();r.pushDefaultNamespace(`a`),typeof n==`string`&&(n={runs:[{text:n}]}),r.start(`p`),r.empty(`pPr`,{algn:`ctr`});let i=kt(0,n,{...Nt,size:t.getDefaultFontSize()}),a=n?.runs,o=a?a.length:0;if(o>0)for(let e=0;e<o;e++){let n=a[e];r.start(`r`,{});let i=kt(0,n,Nt),o=n.color;o?(r.start(`rPr`,i),H(0,r,o,t),r.end(`rPr`)):r.empty(`rPr`,i),r.start(`t`),r.text(n?.text??``),r.end(`t`),r.end(`r`)}else r.empty(`endParaRPr`,i);r.end(`p`),r.popDefaultNamespace()})(e,t,n),r.popDefaultNamespace(),r.end(`txBody`)},jt=(e,t,n)=>{if(!n)return;let r=e.getXMLWriter(),i=kt(0,n);r.empty(`defRPr`,i)},Mt=(e,t,n)=>{if(!n)return;let r=e.getXMLWriter(),{spAutoFit:i,...a}=n;i?(r.start(`bodyPr`,a),r.empty(`spAutoFit`),r.end(`bodyPr`)):r.empty(`bodyPr`,a)},Nt=Object.freeze({lang:`en-US`}),Pt=(e,t)=>{if(t.length!==0){e.start(`a:extLst`);for(let n of t){let t={},r=n[0];r&&(t.uri=r),e.start(`a:ext`,t),e.empty(n[1],n[2]),e.end(`a:ext`)}e.end(`a:extLst`)}},Ft=async(e,t,n,r,i)=>{let a=e.getSharedStates(),o=r.getContent().getResource(),s=await o.getExternalURI(),c;if(s)c=e.addExternal(U,s);else if(c=n.get(o),!c){let t=a.get(W);t||(t=new Map,a.set(W,t));let r=t.get(o);if(!r){let e=await o.toBuffer();r={bytes:new Uint8Array(e),type:await o.getType()??Me,index:t.size+1},t.set(o,r)}c=e.addBinary(r.bytes,r.type.mime,U,`../media/image${r.index}.${r.type.ext}`,!0),n.set(o,c)}let l={"xmlns:r":`http://schemas.openxmlformats.org/officeDocument/2006/relationships`};s?l[`r:link`]=c.relId:l[`r:embed`]=c.relId;let u=[];s||u.push([`{28A0092B-C50C-407E-A947-70E740481C1C}`,`a14:useLocalDpi`,{"xmlns:a14":`http://schemas.microsoft.com/office/drawing/2010/main`,val:`0`}]);let d=e.getXMLWriter();d.start(`pic`),d.start(`nvPicPr`),Ut(e,d,r,i,t),Gt(e,d,r,i),d.end(`nvPicPr`),d.start(`blipFill`),d.start(`a:blip`,l),Pt(d,u),d.end(`a:blip`),d.start(`a:stretch`),d.empty(`a:fillRect`),d.end(`a:stretch`),d.end(`blipFill`),Vt(e,t,n,r,i),d.end(`pic`)},It=async(e,t,n,r,i,a)=>{let o=i.content?.json,s=o?.xml,c=o?.part;if(!s||!c)return Q(e,t,n,r,i);let l=await L(c,e,`../charts/chart{n}.xml`);if(!l?.relId)return Q(e,t,n,r,i);let u=l.relId===c.id?s:s.replace(`r:id="${c.id}"`,`r:id="${l.relId}"`);a!==void 0&&typeof i.content?.json?.sourceId==`number`&&(u=u.replace(`cNvPr id="${i.content.json.sourceId}"`,`cNvPr id="${a}"`)),e.getXMLWriter().raw(u)},Lt=async(e,t,n,r,i)=>Q(e,t,n,r,i),Rt=async(e,t,n,r,i)=>Q(e,t,n,r,i),zt=async(e,t,n,r,i)=>Q(e,t,n,r,i),Bt=async(e,t,n,r,i,a)=>{let o=i.content?.json,s=o?.xml;if(!s)return Q(e,t,n,r,i);let c=a!==void 0&&typeof o?.sourceId==`number`?s.replace(`cNvPr id="${o.sourceId}"`,`cNvPr id="${a}"`):s;e.getXMLWriter().raw(c)},Q=async(e,t,n,r,i)=>{(async(e,t,n,r,i)=>{let a=e.getXMLWriter(),o={},s=i.content?.json,c=s?.type??`sp`,l=t.getStyles();c===`cxnSp`?(o.macro=``,a.start(`cxnSp`,o),a.start(`nvCxnSpPr`),Ut(e,a,r,i,t),Wt(e,a,r,i,t),a.start(`cNvCxnSpPr`),a.empty(`a:stCnx`,{id:`0`,idx:`0`}),a.end(`cNvCxnSpPr`),a.end(`nvCxnSpPr`),Vt(e,t,n,r,i),Ht(e,t,n,r,i),At(e,l,s?.text),a.end(`cxnSp`)):c===`grpSp`||(o.macro=``,o.textlink=``,a.start(`sp`,o),a.start(`nvSpPr`),Ut(e,a,r,i,t),Wt(e,a,r,i,t),a.end(`nvSpPr`),Vt(e,t,n,r,i),Ht(e,t,n,r,i),At(e,l,s?.text),a.end(`sp`))})(e,t,n,r,{...i,content:{type:`shape`,name:i.content?.name,description:i.content?.description,json:{fill:`bg1`,stroke:{width:2,fill:`red`},text:{runs:[{text:`Unsupported Type: `+(i.content?.type??`unknown`),color:`tx1`}]}}}})},Vt=(e,t,n,r,i)=>{let a=e.getXMLWriter(),o=i.content?.json,s=o?.geometry??`rect`,c=t.getStyles();a.start(`spPr`),a.pushDefaultNamespace(`a`),Kt(a,r,i),a.start(`prstGeom`,{prst:s}),a.empty(`avLst`),a.end(`prstGeom`),Oe(e,c,o),a.popDefaultNamespace(),a.end(`spPr`)},Ht=(e,t,n,r,i)=>{let a=e.getXMLWriter();a.start(`style`),a.pushDefaultNamespace(`a`),a.start(`lnRef`,{idx:`1`}),a.start(`schemeClr`,{val:`accent1`}),a.empty(`shade`,{val:`15000`}),a.end(`schemeClr`),a.end(`lnRef`),a.start(`fillRef`,{idx:`1`}),a.empty(`schemeClr`,{val:`accent1`}),a.end(`fillRef`),a.start(`effectRef`,{idx:`0`}),a.empty(`schemeClr`,{val:`accent1`}),a.end(`effectRef`),a.start(`fontRef`,{idx:`minor`}),a.empty(`schemeClr`,{val:`lt1`}),a.end(`fontRef`),a.popDefaultNamespace(),a.end(`style`)},Ut=(e,n,r,i,a)=>{let o=e.getSharedStates(),s=o.get(`uniqueIdCounter`);s||(s=new Map,o.set(`uniqueIdCounter`,s));let c=s.get(a)??1;c++,s.set(a,c);let l={id:``+c,name:i.content?.name};i.content?.description&&(l.descr=i.content.description),i.hidden&&(l.hidden=`1`);let u=[];u.push([`{FF2B5EF4-FFF2-40B4-BE49-F238E27FC236}`,`a16:creationId`,{"xmlns:a16":`http://schemas.microsoft.com/office/drawing/2014/main`,id:`{${t.CommonUtils.uuidV4().toUpperCase()}}`}]),n.start(`cNvPr`,l),Pt(n,u),n.end(`cNvPr`)},Wt=(e,t,n,r,i)=>{t.empty(`cNvSpPr`)},Gt=(e,t,n,r)=>{let i={};if(r.lockAspect&&(i.noChangeAspect=`1`),r.locks)for(let e of Object.keys(r.locks))!0===r.locks[e]&&(i[e]=`1`);t.start(`cNvPicPr`,{}),t.empty(`a:picLocks`,i),t.end(`cNvPicPr`)},Kt=(e,t,n)=>{let r=t.getBounds(),i={},a=n.rotation;a!==void 0&&a!==0&&(i.rot=``+q(a)),e.start(`xfrm`,i),e.start(`off`,{x:K(r.x),y:K(r.y)}),e.end(`off`),e.start(`ext`,{cx:K(r.width),cy:K(r.height)}),e.end(`ext`),e.end(`xfrm`)},qt=(e,t,n)=>{e.start(t),e.start(`col`),e.text(n.c??0),e.end(`col`),e.start(`colOff`),e.text(K(n.x)),e.end(`colOff`),e.start(`row`),e.text(n.r??0),e.end(`row`),e.start(`rowOff`),e.text(K(n.y)),e.end(`rowOff`),e.end(t)},Jt=async(e,t,n)=>{let r=await n.getExternalURI();if(r)return void e.addExternal(U,r);let i=e.getSharedStates(),a=i.get(W);a||(a=new Map,i.set(W,a));let o=a.get(n);if(!o){let e=await n.toBuffer();o={bytes:new Uint8Array(e),type:await n.getType()??Me,index:a.size+1},a.set(n,o)}let s=e.addBinary(o.bytes,o.type.mime,U,`../media/image${o.index}.${o.type.ext}`,!0,t);s.relId!==t&&e.log(`Legacy drawing image '${t}' was written as '${s.relId}'; the markup will not find it.`)};function Yt(e){return e.toISOString().substring(0,22)}function Xt(t,n,r,i,a,o,s,c,l){let u={ref:n,dT:Yt(a??new Date),personId:i?$(i):void 0,id:$(r),parentId:s?$(s):void 0,done:c?`1`:void 0};if(t.start(`threadedComment`,u),t.start(`text`,e.C.test(o)||/[\n\r]/.test(o)?e.S:void 0),t.text(o),t.end(`text`),l&&l.length>0){t.start(`mentions`);for(let e=0;e<l.length;e++){let n=l[e];t.empty(`mention`,{mentionpersonId:$(n.personId),mentionId:$(n.id),startIndex:n.startIndex??0,length:n.length??0})}t.end(`mentions`)}t.end(`threadedComment`)}function $(e){return`{${e.replace(/^\{|\}$/g,``).toUpperCase()}}`}var Zt=0,Qt=(e,t,n,r)=>{let i=r.columns,a=i?i.length:0;if(a!==0){t.start(`tableColumns`,{count:a});for(let o=0;o<a;o++){let a=i[o];typeof a==`string`&&(a={name:a});let s={};s.id=o+1,s.name=a.name??`Column${o+1}`;let c=null,l=a.totalsRowFormula;if(typeof l==`number`){let e=tn.get(l);e?s.totalsRowFunction=e:c=`SUBTOTAL(${l},${r.name?.trim()}[${s.name}])`}else l&&(c=$t(e,n,o,l.startsWith(`=`)?l.substring(1):l));c&&(s.totalsRowFunction=`custom`),a.totalsRowLabel&&(s.totalsRowLabel=a.totalsRowLabel);let u=a.calculatedColumnFormula?$t(e,n,o,a.calculatedColumnFormula):null;(c||u)&&(t.start(`tableColumn`,s),u&&(t.start(`calculatedColumnFormula`),t.text(u),t.end(`calculatedColumnFormula`))),c&&(t.start(`totalsRowFormula`),t.text(c),t.end(`totalsRowFormula`)),c||u?t.end(`tableColumn`):t.empty(`tableColumn`,s)}t.end(`tableColumns`)}},$t=(n,r,i,a)=>{let o=n.getSharedStates().get(e.I);if(!o)return a;try{let e=r.getDataRange().getCoords(),n={rowIndex:e.rowStart,colIndex:e.colStart+i},s=o.parse(a,n);return s&&t.FormulaText.image(o.spell(s,!1,r.getName()),{at:n})||a}catch{return a}},en=(e,t,n,r)=>{let i={name:n.getStyle().getName(),showFirstColumn:n.isShowHighlightFirstColumn()?`1`:`0`,showLastColumn:n.isShowHighlightLastColumn()?`1`:`0`,showRowStripes:n.isShowBandedRows()?`1`:`0`,showColumnStripes:n.isShowBandedColumns()?`1`:`0`};t.empty(`tableStyleInfo`,i)},tn=new Map([[101,`average`],[102,`countNums`],[103,`count`],[104,`max`],[105,`min`],[107,`stdDev`],[109,`sum`],[110,`var`]]),nn={rowIndex:0,colIndex:0};function rn(e,n,r,i){if(i==null)return;nn.rowIndex=n,nn.colIndex=r;let a=t.AddressUtils.cellToString(nn),o,s;switch(typeof i){case`number`:s=``+i;break;case`boolean`:o=`b`,s=i?`1`:`0`;break;case`string`:o=`str`,s=i;break;default:{let e=i;if(e.t!==`e`)return;o=`e`,s=t.FormulaError.getBuiltInByCode(e.v)?.getLabel()??t.FormulaError.BuiltIn.Value.getLabel()}}e.start(`cell`,o?{r:a,t:o}:{r:a}),e.start(`v`),e.text(s),e.end(`v`),e.end(`cell`)}var an=(e,t,n,r)=>{t.start(`mc:AlternateContent`,{"xmlns:mc":`http://schemas.openxmlformats.org/markup-compatibility/2006`}),t.start(`mc:Choice`,{Requires:`c14`,"xmlns:c14":`http://schemas.microsoft.com/office/drawing/2007/8/2/chart`}),t.empty(`c14:style`,{val:`102`}),t.end(`mc:Choice`),t.start(`mc:Fallback`),t.empty(`c:style`,{val:`2`}),t.end(`mc:Fallback`),t.end(`mc:AlternateContent`)},on=(e,t,n,r,i)=>{t.start(`chart`),((e,t,n,r,i)=>{t.start(`title`),t.empty(`overlay`,{val:`0`}),Oe(e,n,i,`spPr`,!0),t.end(`title`),t.empty(`autoTitleDeleted`,{val:`0`})})(e,t,n,0,i),((e,t,n,r,i)=>{t.start(`plotArea`),t.empty(`layout`),Oe(e,n,i,`spPr`,!0),t.end(`plotArea`)})(e,t,n,0,i),t.empty(`plotVisOnly`,{val:`1`}),t.empty(`dispBlanksAs`,{val:`gap`}),t.empty(`showDLblsOverMax`,{val:`0`}),t.end(`chart`)},sn=(e,t,n,r)=>{t.start(`printSettings`),t.empty(`headerFooter`),t.empty(`pageMargins`,{b:`0.75`,l:`0.7`,r:`0.7`,t:`0.75`,header:`0.3`,footer:`0.3`}),t.empty(`pageSetup`),t.end(`printSettings`)},cn=(e,t,n,r,i,a=`0`)=>{let o=i?.color,s={idx:i?.idx??a};o===void 0?t.empty(r,s):(t.start(r,s),o===`auto`?t.empty(`styleClr`,{val:`auto`}):(t.pushDefaultNamespace(`a`),R(t,n.getTheme(),o),t.popDefaultNamespace()),t.end(r))},ln=(e,t,n,r)=>{let i=n.length;for(let a=0;a<i;a++){let i=n[a];i.empty?t.empty(i.type,i.mods):(t.start(i.type,i.mods),cn(0,t,r,`lnRef`,i.lineRef,`0`),cn(0,t,r,`fillRef`,i.fillRef,`0`),cn(0,t,r,`effectRef`,i.effectRef,`0`),cn(0,t,r,`fontRef`,i.fontRef,`minor`),Oe(e,r,i,`spPr`),jt(e,0,i.defRPr),Mt(e,r,i.bodyPr),t.end(i.type))}},un=Object.freeze([{type:`axisTitle`,fontRef:{color:`tx1 lumMod 65 lumOff 35`},defRPr:{size:10,kern:12}},{type:`categoryAxis`,fontRef:{color:`tx1 lumMod 65 lumOff 35`},stroke:{width:.75,cap:`flat`,cmpd:`sng`,algn:`ctr`,round:!0,fill:`tx1 lumMod 15 lumOff 85`},defRPr:{size:9,kern:12}},{type:`chartArea`,mods:{mods:`allowNoFillOverride allowNoLineOverride`},fontRef:{color:`tx1`},fill:{type:`solid`,color:`bg1`},stroke:{width:.75,cap:`flat`,cmpd:`sng`,algn:`ctr`,round:!0,fill:`tx1 lumMod 15 lumOff 85`},defRPr:{size:10,kern:12}},{type:`dataLabel`,fontRef:{color:`tx1 lumMod 75 lumOff 25`},defRPr:{size:9,kern:12}},{type:`dataLabelCallout`,fontRef:{color:`dk1 lumMod 65 lumOff 35`},fill:{type:`solid`,color:`lt1`},stroke:{fill:`dk1 lumMod 25 lumOff 75`},defRPr:{size:9,kern:12},bodyPr:{rot:`0`,spcFirstLastPara:`1`,vertOverflow:`clip`,horzOverflow:`clip`,vert:`horz`,wrap:`square`,lIns:`36576`,tIns:`18288`,rIns:`36576`,bIns:`18288`,anchor:`ctr`,anchorCtr:`1`,spAutoFit:`true`}},{type:`dataPoint`,fillRef:{idx:`1`,color:`auto`},fontRef:{color:`tx1`}},{type:`dataPoint3D`,fillRef:{idx:`1`,color:`auto`},fontRef:{color:`tx1`}},{type:`dataPointLine`,lineRef:{color:`auto`},fillRef:{idx:`1`},fontRef:{color:`tx1`},stroke:{width:2.25,cap:`rnd`,fill:`phClr`,round:!0}},{type:`dataPointMarker`,lineRef:{color:`auto`},fillRef:{idx:`1`,color:`auto`},fontRef:{color:`tx1`},stroke:{width:.75,fill:`phClr`}},{type:`dataPointMarkerLayout`,mods:{symbol:`circle`,size:`5`},empty:!0},{type:`dataPointWireframe`,lineRef:{color:`auto`},fillRef:{idx:`1`},fontRef:{color:`tx1`},stroke:{width:.75,cap:`rnd`,fill:`phClr`,round:!0}},{type:`dataTable`,fontRef:{color:`tx1 lumMod 65 lumOff 35`},fill:{type:`none`},stroke:{width:.75,cap:`flat`,cmpd:`sng`,algn:`ctr`,round:!0,fill:`tx1 lumMod 15 lumOff 85`},defRPr:{size:9,kern:12}},{type:`downBar`,fontRef:{color:`tx1`},fill:{type:`solid`,color:`dk1 lumMod 75 lumOff 25`},stroke:{width:.75,cap:`flat`,cmpd:`sng`,algn:`ctr`,round:!0,fill:`tx1 lumMod 65 lumOff 35`}},{type:`dropLine`,fontRef:{color:`tx1`},stroke:{width:.75,cap:`flat`,cmpd:`sng`,algn:`ctr`,round:!0,fill:`tx1 lumMod 35 lumOff 65`}},{type:`errorBar`,fontRef:{color:`tx1`},stroke:{width:.75,cap:`flat`,cmpd:`sng`,algn:`ctr`,round:!0,fill:`tx1 lumMod 65 lumOff 35`}},{type:`floor`,fontRef:{color:`tx1`},fill:{type:`none`},stroke:{}},{type:`gridlineMajor`,fontRef:{color:`tx1`},stroke:{width:.75,cap:`flat`,cmpd:`sng`,algn:`ctr`,round:!0,fill:`tx1 lumMod 15 lumOff 85`}},{type:`gridlineMinor`,fontRef:{color:`tx1`},stroke:{width:.75,cap:`flat`,cmpd:`sng`,algn:`ctr`,round:!0,fill:`tx1 lumMod 5 lumOff 95`}},{type:`hiLoLine`,fontRef:{color:`tx1`},stroke:{width:.75,cap:`flat`,cmpd:`sng`,algn:`ctr`,round:!0,fill:`tx1 lumMod 50 lumOff 50`}},{type:`leaderLine`,fontRef:{color:`tx1`},stroke:{width:.75,cap:`flat`,cmpd:`sng`,algn:`ctr`,round:!0,fill:`tx1 lumMod 35 lumOff 65`}},{type:`legend`,fontRef:{color:`tx1 lumMod 65 lumOff 35`},defRPr:{size:9,kern:12}},{type:`plotArea`,mods:{mods:`allowNoFillOverride allowNoLineOverride`},fontRef:{color:`tx1`}},{type:`plotArea3D`,mods:{mods:`allowNoFillOverride allowNoLineOverride`},fontRef:{color:`tx1`}},{type:`seriesAxis`,fontRef:{color:`tx1 lumMod 65 lumOff 35`},defRPr:{size:9,kern:12}},{type:`seriesLine`,fontRef:{color:`tx1`},stroke:{width:.75,cap:`flat`,cmpd:`sng`,algn:`ctr`,round:!0,fill:`tx1 lumMod 35 lumOff 65`}},{type:`title`,fontRef:{color:`tx1 lumMod 65 lumOff 35`},defRPr:{size:14,b:!1,kern:12,spc:0,baseline:0}},{type:`trendline`,lineRef:{color:`auto`},fontRef:{color:`tx1`},stroke:{width:1.5,cap:`rnd`,fill:`phClr`,prstDash:`sysDot`}},{type:`trendlineLabel`,fontRef:{color:`tx1 lumMod 65 lumOff 35`},defRPr:{size:9,kern:12}},{type:`upBar`,fontRef:{color:`tx1`},fill:{type:`solid`,color:`lt1`},stroke:{width:.75,cap:`flat`,cmpd:`sng`,algn:`ctr`,round:!0,fill:`tx1 lumMod 65 lumOff 35`}},{type:`valueAxis`,fontRef:{color:`tx1 lumMod 65 lumOff 35`},defRPr:{size:9,kern:12}},{type:`wall`,fontRef:{color:`tx1`},fill:{type:`none`},stroke:{}}]),dn=(e,t,n)=>{let r=n.length;for(let e=0;e<r;e++){let r=n[e],i={},a=r[0],o=r[1];a||o?(t.start(`variation`,i),a&&t.empty(`a:lumMod`,{val:a}),o&&t.empty(`a:lumOff`,{val:o}),t.end(`variation`)):t.empty(`variation`,i)}},fn=Object.freeze([[0,0],[6e4,0],[8e4,2e4],[8e4,0],[6e4,4e4],[5e4,0],[7e4,3e4],[7e4,0],[5e4,5e4]]),pn=[new class extends r{constructor(){super({kind:`workbook`,contentType:`application/vnd.openxmlformats-officedocument.spreadsheetml.sheet.main+xml`,relTypeUri:`http://schemas.openxmlformats.org/officeDocument/2006/relationships/officeDocument`,path:`/xl/workbook.xml`})}async emit(r,i){let a=i.getXMLWriter();a.decl(),a.start(`workbook`,{xmlns:`http://schemas.openxmlformats.org/spreadsheetml/2006/main`,"xmlns:r":`http://schemas.openxmlformats.org/officeDocument/2006/relationships`,"xmlns:mc":`http://schemas.openxmlformats.org/markup-compatibility/2006`,"mc:Ignorable":`x15 xr xr6 xr10 xr2`,"xmlns:x15":`http://schemas.microsoft.com/office/spreadsheetml/2010/11/main`,"xmlns:xr":`http://schemas.microsoft.com/office/spreadsheetml/2014/revision`,"xmlns:xr6":`http://schemas.microsoft.com/office/spreadsheetml/2016/revision6`,"xmlns:xr10":`http://schemas.microsoft.com/office/spreadsheetml/2016/revision10`,"xmlns:xr2":`http://schemas.microsoft.com/office/spreadsheetml/2015/revision2`});let o=i.getSharedStates().get(n),s=await r.toJSON({ignoreData:!0,resources:(e,t)=>(o?.set(t,e),null),includeHeaderStyles:!0,splitDirectBorders:!0});i.getSharedStates().set(e.I,e.L(s.names,function(e){let t=[],n=e.sheets??[];for(let e=0;e<n.length;e++){let r=n[e]?.sheet?.tables;if(r)for(let e=0;e<r.length;e++){let n=r[e],i=Array.isArray(n)?n[1]?.name:n?.v?.name;i&&t.push(String(i))}}return t}(s))),function(e,t){let n=e.getSharedStates().get(se);n&&t.empty(`fileVersion`,n)}(i,a),function(e,t,n,r){let i={},a=n.getCodeName();a&&(i.codeName=a),n.getRuntime().isDate1904()&&(i.date1904=`1`),r.updateLinks&&(i.updateLinks=r.updateLinks),t.empty(`workbookPr`,i)}(0,a,r,s),function(t,n,r,i){let a=i.protection;if(!a||a.workbook)return;let o={};j(a.password??{},o,`workbook`),j(a.revisionsPassword??{},o,`revisions`);for(let t of e.y){let n=e.x(t,a[t.key]);n!==null&&(o[t.attribute]=n)}n.empty(`workbookProtection`,o)}(0,a,0,s),function(e,t,n){t.start(`bookViews`);let r=n.getView(),i={};r.isShowHorizontalScrollbar()||(i.showHorizontalScroll=`0`),r.isShowVerticalScrollbar()||(i.showVerticalScroll=`0`),r.isShowTabs()||(i.showSheetTabs=`0`);let a=r.getTabRatio();a!==600&&(i.tabRatio=a);let o=n.getSelectedSheet().getIndex();o!==0&&(i.activeTab=``+o),t.empty(`workbookView`,i),t.end(`bookViews`)}(0,a,r,s.view);let c=await(async(e,t)=>{let n=[],r=t?t.length:0;if(r===0)return n;let i=new Map;e.getSharedStates().set(`pivotCachePaths`,i);for(let a=0;a<r;a++){let r=t[a],o=r.cacheId,s=r.part;if(s?.xml&&!i.has(o))try{let t=await L({...s,type:s.type||`http://schemas.openxmlformats.org/officeDocument/2006/relationships/pivotCacheDefinition`,contentType:s.contentType||`application/vnd.openxmlformats-officedocument.spreadsheetml.pivotCacheDefinition+xml`},e,`/xl/pivotCache/pivotCacheDefinition{n}.xml`);if(!t?.relId)continue;i.set(o,t.path),n.push({cacheId:o,relId:t.relId})}catch(t){e.log(`Unable to write the pivot cache ${o}; the pivot tables on it will be dropped.`,t)}}return n})(i,s.pivotCaches);(function(e,t){t.getComments().some(e=>!e.isNote())&&e.addPart(`persons`,t.getPeople())})(i,r),a.start(`sheets`);let l=i.getSharedStates(),u=r.getStrings().beginPersist();l.set(`persistStrings`,u);let d=new N;l.set(`metaCollector`,d);let f=new ne(d,i.log.bind(i));l.set(`persistRichTypes`,f),l.set(te,new M(s.styles,r.getStyles()));try{let e=r.getSheets().getItems({visibility:t.ISheet.Visibility.VeryHidden}),n=s.sheets,o=r.getSelectedSheet(),c=e.length,d=((e,t)=>{let n=Array(t),r=new Set,i=1;for(let a=0;a<t;a++){let t=e?.[a]?.sheetId;t===void 0||!Number.isInteger(t)||t<1||r.has(t)||(r.add(t),n[a]=t,t>=i&&(i=t+1))}for(let e=0;e<t;e++)if(n[e]===void 0){for(;r.has(i);)i++;r.add(i),n[e]=i++}return n})(n,c),f=((e,t,n)=>{let r=t.length,i=Array(r),a=new Set(n?.values()??[]),o=new Set;for(let a=0;a<r;a++){let r=e?.[a]?.sheetId;if(r===void 0||t[a]!==r)continue;let s=n?.get(r);s&&!o.has(s)&&(o.add(s),i[a]=s)}let s=1;for(let e=0;e<r;e++){if(i[e])continue;let t;do t=`xl/worksheets/sheet${s++}.xml`;while(a.has(t)||o.has(t));o.add(t),i[e]=t}return i})(n,d,l.get(ce));for(let t=0;t<c;t++){let r=e[t],s=``+d[t],c={name:r.getName(),sheetId:s},l=r.getVisibility();l===`hidden`?c.state=`hidden`:l===`veryHidden`&&(c.state=`veryHidden`);let p=n[t].sheet;c[`r:id`]=i.addPart(`worksheet`,{model:r,isSelected:o===r,json:p,persistStrings:u},`/`+f[t]).relId,a.empty(`sheet`,c)}await i.waitEmit();let p=r.getTheme();i.addPart(`theme`,{model:p,json:s.theme}),await i.waitEmit(),i.addPart(`styles`,{styles:r.getStyles(),theme:r.getTheme(),json:s.styles}),await i.waitEmit();let m=await u.toJSONAsync();m&&m.length>0&&(i.addPart(`sharedStrings`,{model:m,json:m}),await i.waitEmit());let h=l.get(`persistRichTypes`);h?.hasAny()&&(i.addPart(`richValue`,h),i.addPart(`richValueStructure`,h),i.addPart(`richValueTypes`,null),await i.waitEmit());let g=l.get(`metaCollector`);g?.hasAny()&&(i.addPart(`metadata`,g),await i.waitEmit()),l.delete(`persistRichTypes`),l.delete(`metaCollector`),l.delete(`persistStrings`)}catch(e){throw e}finally{u.endPersist()}a.end(`sheets`),function(e,t,n){let r=n.externalBooks,i=r?r.length:0;if(i===0)return;let a=e.getSharedStates().get(le),o=new Set;if(a)for(let e=0;e<i;e++)!r[e]&&a[e]&&o.add(a[e]);let s=[],c=1;for(let t=0;t<i;t++){let n=r[t];if(n){let t;do t=`xl/externalLinks/externalLink${c++}.xml`;while(o.has(t));s.push(e.addPart(`externalLink`,n,`/`+t).relId);continue}let i=a?.[t],l=i?e.addRelationship(oe,i):null;l?s.push(l):e.log(`External link [${t+1}] cannot be written and is being dropped; later links will renumber.`)}if(s.length!==0){t.start(`externalReferences`);for(let e=0;e<s.length;e++)t.empty(`externalReference`,{"r:id":s[e]});t.end(`externalReferences`)}}(i,a,s),function(n,r,i,a){let o=n.getSharedStates().get(e.I),s=a.names,c=s?s.length:0;if(c===0)return;let l=a.externalBooks?.length??0,u=new Map,d=i.getSheets().getItems({visibility:t.ISheet.Visibility.VeryHidden});for(let e=0;e<d.length;e++)u.set(d[e].getName().toLowerCase(),e);r.start(`definedNames`);for(let e=0;e<c;e++){let t=s[e],i={name:t.name};if(t.comment&&(i.comment=t.comment),t.scope){let e=u.get(t.scope.toLowerCase());e===void 0?n.log(`Defined name '${t.name}' is scoped to unknown sheet '${t.scope}'; writing it as global.`):i.localSheetId=``+e}t.hidden&&(i.hidden=`1`);let a=o.writeName(t.ref);for(let e of ue(a))e>l&&n.log(`Defined name '${t.name}' cites external book [${e}], but only ${l} ${l===1?`is`:`are`} written; Excel will report the file as needing repair.`);r.start(`definedName`,i),r.text(a),r.end(`definedName`)}r.end(`definedNames`)}(i,a,r,s),function(e,t,n){let r=n.getCalculation().toJSON(),i={calcId:e.getSharedStates().get(`calcId`)??`191029`},a=(e,t)=>{let n=r[e];typeof n==`boolean`&&(i[t]=n?`1`:`0`)};if(r.calcMode){let e=de[r.calcMode];e&&e!==`auto`&&(i.calcMode=e)}a(`fullCalcOnLoad`,`fullCalcOnLoad`),a(`calcOnSave`,`calcOnSave`),a(`calcCompleted`,`calcCompleted`),a(`fullPrecision`,`fullPrecision`),a(`forceFullCalc`,`forceFullCalc`),a(`concurrentCalc`,`concurrentCalc`),r.refMode&&(i.refMode=r.refMode),r.iterate&&(i.iterate=`1`),r.maxIteration!==void 0&&(i.iterateCount=String(r.maxIteration)),r.maxIterateChange!==void 0&&(i.iterateDelta=String(r.maxIterateChange)),t.empty(`calcPr`,i)}(i,a,r),function(e,t){if(t.length!==0){e.start(`pivotCaches`);for(let n=0;n<t.length;n++)e.empty(`pivotCache`,{cacheId:t[n].cacheId,"r:id":t[n].relId});e.end(`pivotCaches`)}}(a,c),function(e,t){let n=e.getSharedStates().get(`calcFeatures`)??`<ext uri="{B58B0392-4F1F-4190-BB64-5DF3571DCE5F}" xmlns:xcalcf="http://schemas.microsoft.com/office/spreadsheetml/2018/calcfeatures"><xcalcf:calcFeatures><xcalcf:feature name="microsoft.com:RD"/><xcalcf:feature name="microsoft.com:Single"/><xcalcf:feature name="microsoft.com:FV"/><xcalcf:feature name="microsoft.com:CNMTM"/><xcalcf:feature name="microsoft.com:LET_WF"/><xcalcf:feature name="microsoft.com:LAMBDA_WF"/><xcalcf:feature name="microsoft.com:ARRAYTEXT_WF"/></xcalcf:calcFeatures></ext>`;t.start(`extLst`),t.raw(n),t.end(`extLst`)}(i,a),a.end(`workbook`),a.close()}},new class extends r{constructor(){super({kind:`worksheet`,contentType:`application/vnd.openxmlformats-officedocument.spreadsheetml.worksheet+xml`,relTypeUri:`http://schemas.openxmlformats.org/officeDocument/2006/relationships/worksheet`,path:()=>`/xl/worksheets/sheet{n}.xml`})}async emit(n,r){let i=r.getXMLWriter(),a=n.model,o=n.json;i.decl(),i.start(`worksheet`,{xmlns:`http://schemas.openxmlformats.org/spreadsheetml/2006/main`,"xmlns:r":`http://schemas.openxmlformats.org/officeDocument/2006/relationships`,"xmlns:mc":`http://schemas.openxmlformats.org/markup-compatibility/2006`,"mc:Ignorable":`x14ac`,"xmlns:x14ac":`http://schemas.microsoft.com/office/spreadsheetml/2009/9/ac`}),function(e,t,n){let r=n.getTabColor(),i=n.getCodeName(),a={};i&&(a.codeName=i),n.isConditionalFormatCalculationEnabled()||(a.enableFormatConditionsCalculation=`0`);let o=n.getOutlineSettings(),s={};o.summaryBelow||(s.summaryBelow=`0`),o.summaryRight||(s.summaryRight=`0`),o.showOutlineSymbols||(s.showOutlineSymbols=`0`),o.applyStyles&&(s.applyStyles=`1`);let c=Object.keys(s).length>0,l=!!r||c;if(!(!l&&Object.keys(a).length===0)){if(!l)return void t.empty(`sheetPr`,a);t.start(`sheetPr`,a),r&&B(t,n.getStyles().getTheme(),r,`tabColor`,!1),c&&t.empty(`outlinePr`,s),t.end(`sheetPr`)}}(0,i,a),function(n,r,i,a){let o=i.getUsedRange({features:[]}),s=o?o.getCoords():null,c=e.n,l=e.t,u=a.directStyles,d=u?u.length:0;for(let e=0;e<d;e++){let n=i.getRange(u[e][0]).getCoords();if(n.colEnd===l){let e=s?.colStart??0;n={...n,colStart:e,colEnd:e}}if(n.rowEnd===c){let e=s?.rowStart??0;n={...n,rowStart:e,rowEnd:e}}s=t.CoordUtils.unionRanges(s,n)}let f=a.merges,p=f?f.length:0;for(let e=0;e<p;e++){let n=i.getRange(f[e]).getCoords();n.colEnd===l&&(n={...s},n.colStart=s?.colStart??0,n.colEnd=n.colStart),n.rowEnd===c&&(n={...n},n.rowStart=s?.rowStart??0,n.rowEnd=n.rowStart),s=t.CoordUtils.unionRanges(s,n)}let m=`A1`;s&&(o=i.getRange(s),m=s.colStart===s.colEnd&&s.rowStart===s.rowEnd?o.getAddress():`${o.getIntersect({colStart:s.colStart,rowStart:s.rowStart,colEnd:s.colStart,rowEnd:s.rowStart}).getAddress()}:${o.getIntersect({colStart:s.colEnd,rowStart:s.rowEnd,colEnd:s.colEnd,rowEnd:s.rowEnd}).getAddress()}`),r.empty(`dimension`,{ref:m})}(0,i,a,o),function(e,n,r,i,a){let o=r.getView(),s=o.getTopLeft(),c=r.getRowHeaders().getIndex(s.top),l=r.getColumnHeaders().getIndex(s.left),u=t.AddressUtils.cellToString({colIndex:l,rowIndex:c});n.start(`sheetViews`);let d={};o.isShowFormulas()&&(d.showFormulas=`1`),o.isShowColumnGridlines()||o.isShowRowGridlines()||(d.showGridLines=`0`),o.isShowColumnHeaders()||o.isShowRowHeaders()||(d.showRowColHeaders=`0`),o.isShowZeros()||(d.showZeros=`0`),o.isRightToLeft()&&(d.rightToLeft=`1`),a&&(d.tabSelected=`1`),u!==`A1`&&(d.topLeftCell=u);let f=o.getZoomScale();f!==100&&(d.zoomScale=f,d.zoomScaleNormal=f);let p=o.getGridLineColor();if(p){d.defaultGridColor=`0`;let e=p.toRGBA(),t=e.red,n=e.green,i=e.blue,a=r.getStyles().getIndexedColors(),o=a.length,s=0,c=Number.MAX_VALUE;for(let e=0;e<o;e++){let r=a[e].toRGBA(),o=(t-r.red)**2+(n-r.green)**2+(i-r.blue)**2;o<c&&(c=o,s=e)}d.colorId=``+s}d.workbookViewId=`0`;let m=r.getSelection().getCoords(),h=t.AddressUtils.cellToString(m.cell),g={},_=o.getFreezePanes(),v=_.coords??{},y=v.colIndex??0,b=v.rowIndex??0;if(y>0||b>0){let e=_.topLeft??{},i=e.top??0,a=e.left??0,o=r.getRowHeaders().getIndex(i),c=r.getColumnHeaders().getIndex(a),l=y-c,u=b-o,f=Math.max(y,r.getColumnHeaders().getIndex(s.left+r.getColumnHeaders().getOffset(y)-a)),p=Math.max(b,r.getRowHeaders().getIndex(s.top+r.getRowHeaders().getOffset(b)-i)),m=t.AddressUtils.cellToString({colIndex:c,rowIndex:o});m===`A1`?delete d.topLeftCell:d.topLeftCell=m,n.start(`sheetView`,d);let h={};if(l>0&&(h.xSplit=l),u>0&&(h.ySplit=u),h.topLeftCell=t.AddressUtils.cellToString({colIndex:f,rowIndex:p}),h.state=`frozen`,y===0){h.activePane=`bottomLeft`,n.empty(`pane`,h);let e=t.AddressUtils.cellToString({colIndex:f,rowIndex:o});e!==`A1`&&n.empty(`selection`,{activeCell:e,sqref:e}),g.pane=`bottomLeft`}else if(b===0){h.activePane=`topRight`,n.empty(`pane`,h);let e=t.AddressUtils.cellToString({colIndex:c,rowIndex:p});e!==`A1`&&n.empty(`selection`,{activeCell:e,sqref:e}),g.pane=`topRight`}else{h.activePane=`bottomRight`,n.empty(`pane`,h),m!==`A1`&&n.empty(`selection`,{activeCell:m,sqref:m});let e=t.AddressUtils.cellToString({colIndex:f,rowIndex:o});n.empty(`selection`,{pane:`topRight`,activeCell:e,sqref:e});let r=t.AddressUtils.cellToString({colIndex:c,rowIndex:p});n.empty(`selection`,{pane:`bottomLeft`,activeCell:r,sqref:r}),g.pane=`bottomRight`}}else n.start(`sheetView`,d);g.activeCell=h;let x=m.ranges,S=x?x.length:0;if(S>0){let e=``;for(let n=0;n<S;n++){let r=x[n];n>0&&(e+=` `),e+=t.AddressUtils.rangeToString(r)}g.sqref=e,(m.rangeIndex??0)>0&&(g.activeCellId=``+m.rangeIndex)}else h===`A1`?g=null:g.sqref=h;g&&n.empty(`selection`,g),n.end(`sheetView`),n.end(`sheetViews`)}(0,i,a,0,n.isSelected),function(e,t,n,r){let i=r.defaultColSize,a=r.defaultRowSize,o={};i!==void 0&&(o.defaultColWidth=i),o.defaultRowHeight=a??.75*n.getRowHeaders().getDefaultSize(),a!==void 0&&(o.customHeight=`1`),o[`x14ac:dyDescent`]=`0.25`,t.empty(`sheetFormatPr`,o)}(0,i,a,o);let s=!1===o.protection?.showFormulas?r.getSharedStates().get(`hiddenFormulaXfs`)??null:null;(function(n,r,i,a,o){let s=a.cols?t.AddressUtils.refsToRuns(a.cols,!0):null,c=s?s.length:0;i.getEntireRange().getColumnEnd();let l=i.getColumnHeaders().getDefaultSizeNative(),u=o?o.getHiddenXf(0):0,d=1,f=e=>{u!==0&&e>=d&&r.empty(`col`,{min:d,max:e,width:l,style:u})};if(c>0||u!==0){r.start(`cols`);for(let t=0;t<c;t++){let n=s[t],i=n.min+1,a=e.t+1;if(i>a)continue;let c=Math.min(n.max+1,a);f(i-1),d=c+1;let u={min:i,max:c},p=n.value,m=p.sz;m===void 0?u.width=l:m!==0&&(u.width=Math.round(256*m)/256);let h=o?o.getHiddenXf(p.s??0):p.s;h&&(u.style=h),p.h!==void 0&&(u.hidden=1),p.csz&&(u.customWidth=1),p.l!==void 0&&(u.outlineLevel=p.l),p.cl!==void 0&&(u.collapsed=1),r.empty(`col`,u)}f(e.t+1),r.end(`cols`)}})(0,i,a,o,s),function(n,r,i,a,o,s){let c=n.getSharedStates(),l=c.get(`persistStrings`),u=c.get(`metaCollector`),d=c.get(`persistRichTypes`),f=0,p=0,m=i.getUsedRange(),h=0,g=a.rows?t.AddressUtils.refsToRuns(a.rows,!1):null,_=g?g.length:0,v=g?.[_-1]?.max??-1,y=a.cols?t.AddressUtils.refsToRuns(a.cols,!0):null,b=y?y.length:0,x=y?.[b-1]?.max??-1;if(m||_>0){let c=.75,m=a.defaultRowSize??i.getRowHeaders().getDefaultSize()*c,_=i.getStyles().getNormal().getBestFit().height*c,b=(e,t)=>{let n=bt;if(n.r=``+(e+1),n.s=void 0,n.customFormat=void 0,n.hidden=void 0,n.ht=void 0,n.customHeight=void 0,n.outlineLevel=void 0,n.collapsed=void 0,!t)return n;let r=t.value;r.s!==void 0&&(n.s=``+(s?s.getHiddenXf(r.s):r.s),n.customFormat=`1`),r.h&&(n.hidden=`1`);let i=r.csz??!1,a=r.sz??m;return(a!==_||i)&&(n.ht=``+a),i&&(n.customHeight=`1`),r.l!==void 0&&(n.outlineLevel=``+r.l),r.cl!==void 0&&(n.collapsed=``+r.cl),n},S=0,C=g?.[S]??null,w=C?.min??2**53-1,T=C?.max??2**53-1,E=C?.value?.s,D=-1,O=0,k=y?.[O]??null,ee=k?.min??2**53-1,A=k?.max??2**53-1,j=k?.value?.s,te=(e,t=!1)=>{if(D!==e){for(D!==-1&&(r.end(`row`),O!==0&&(O=0,k=y?.[O]??null,ee=k?.min??2**53-1,A=k?.max??2**53-1,j=k?.value?.s));D+1<=e;){D++,C&&D>T&&(C=g[++S]??null,C?(w=C.min,T=C.max,E=C.value?.s):(w=2**53-1,T=2**53-1,E=void 0)),D<w&&D<e&&(D=C?Math.min(w,e):e);let n=D<e||t&&D===e,i=b(D,C&&D>=w&&D<=T?C:null);n?r.empty(`row`,i):r.start(`row`,i)}if(e<D){let t=b(e,null);r.start(`row`,t)}}};r.setValidationDisabled(!0),r.start(`sheetData`);let M=[];M.push($e(n,i,a.directStyles));let N=a.formulas,ne=N?N.length:0;if(ne>0){let r=new Map;if(o.names.size>0&&a.formulaArray)for(let e of a.formulaArray)try{let t=i.getRange(e[0]).getCoords();r.set(`${t.rowStart},${t.colStart}`,t)}catch{}let s=[];if(a.formulaArray)for(let e of a.formulaArray)try{s.push(i.getRange(e[0]).getCoords())}catch{}let c=e=>{for(let t=0;t<s.length;t++){let n=s[t];if(n.rowStart<=e.rowEnd&&n.rowEnd>=e.rowStart&&n.colStart<=e.colEnd&&n.colEnd>=e.colStart)return!0}return!1},l=n.getSharedStates().get(`xlsxFormulaDialect`)??e.L(i.getCalculation().getNamedFormulas().toJSON(),i.getTables().getItems().map(e=>e.getName())),u=i.getEntireRange().getCoords(),d=[];for(let e of i.getTables().getItems())d.push([e.getRange().getCoords(),e.getName()]);let f=(e,t)=>{for(let n=0;n<d.length;n++){let r=d[n][0];if(e>=r.rowStart&&e<=r.rowEnd&&t>=r.colStart&&t<=r.colEnd)return d[n][1]}return null},p=new Set;for(let e=0;e<s.length;e++)p.add(`${s[e].rowStart},${s[e].colStart}`);let m=[];for(let a=0;a<ne;a++){let s=N[a];try{let n=s[0],d=i.getRange(n),g=d.getCoords(),_=s[1],v=null,y={rowIndex:g.rowStart,colIndex:g.colStart},b=l.parse(_,y),x=b?l.annotate(b):void 0,S=b?l.spell(b,p.has(`${g.rowStart},${g.colStart}`),f(g.rowStart,g.colStart)):null,C=S?t.FormulaText.imager(S,{entireCoords:u}):null;C&&(_=C(y));let w=!0===x?.cm,T=!0===x?.ca;if(o.affects(a)){v=null,w=!1;let n=(e,n,r)=>{let i={rowStart:e,colStart:n,rowEnd:e,colEnd:n};m.push([i,{coords:i,formula:r,sharedId:null,ref:t.AddressUtils.rangeToString(i),isDynamicRange:!1,isWrapped:!0}])},a=r.get(`${g.rowStart},${g.colStart}`),o=a!==void 0&&(a.rowEnd>a.rowStart||a.colEnd>a.colStart),s=!1;if(o){let r=e.k(_,d.getCell().getValue());if(r!==null)for(let o=a.rowStart;o<=a.rowEnd;o++)for(let c=a.colStart;c<=a.colEnd;c++){if(o===a.rowStart&&c===a.colStart){n(o,c,r),s=!0;continue}let l=e.A(i.getRange(t.AddressUtils.rangeToString({rowStart:o,colStart:c,rowEnd:o,colEnd:c})).getCell().getValue());l!==null&&n(o,c,l)}}else d.forEach((t,r)=>{let i=r.getCoords(),a=e.k(C?.(i)??_,r.getCell().getValue());a!==null&&(n(i.rowIndex,i.colIndex,a),s=!0)},{includeEmpty:!0});if(s)continue}let E=_.indexOf(`!`)!==-1||_.indexOf(`[`)!==-1;w||d.isSingleCell()||E||c(g)||(v=``+h++);let D=v!==null||d.isSingleCell()?null:C,O=[g,{coords:g,formula:_,sharedId:v,ref:n,isDynamicRange:w,isExcelVolatile:T,memberImage:D}];m.push(O)}catch(e){n.log(`Could not write the formula '${s[1]}' over '${s[0]}'; those cells are written as values only. ${e}`);continue}}M.push(m)}else M.push([]);let P=a.volatile,F=P?P.length:0;if(F>0){let e=Array(F);for(let t=0;t<F;t++){let n=P[t];try{e[t]=[i.getRange(n).getCoords(),!0]}catch(e){console.warn(`Failed to parse volatile: ${n}`,e);continue}}M.push(e)}else M.push([]);let I=a.formulaArray,L=I?I.length:0;if(L>0){let e=Array(L);for(let t=0;t<L;t++){let n=I[t];try{let r=n[0];e[t]=[i.getRange(r).getCoords(),{ref:r,kind:n[1]??`dynamic`}]}catch(e){console.warn(`Failed to parse formula array: ${n}`,e);continue}}M.push(e)}else M.push([]);i.getEntireRange().forEach((i,a)=>{let o=a.getCoords(),c=o.rowIndex,m=o.colIndex;D!==c&&te(c);let h=a.getInjectedReference(0);if(h===void 0&&E!==void 0&&c>=w&&c<=T&&(h=E),h===void 0){for(;m<=x&&m>A;)O++,k=y?.[O]??null,ee=k?.min??2**53-1,A=k?.max??2**53-1,j=k?.value?.s;j!==void 0&&m>=ee&&m<=A&&(h=j)}let g=a.getType(),_=null;ne>0&&(_=a.getInjectedReference(1)??null);let v=!1;F>0&&(v=a.getInjectedReference(2)??!1);let b=null;L>0&&(b=a.getInjectedReference(3)??null);let S=b?.kind===`error`,C=b?.kind===`fixed`,M=yt;M.r=a.getAddress(),M.s=void 0,M.t=void 0,M.cm=void 0,M.vm=void 0,s&&(h=s.getHiddenXf(h??0)),h!==void 0&&h!==0&&(M.s=``+h);let N=null,P=null;switch(g){case t.ScalarType.Boolean:N=i?`1`:`0`,P=`b`;break;case t.ScalarType.Error:let e=i.getCode();if(P=`e`,e>7)N=t.FormulaError.BuiltIn.Value.getLabel(),M.vm=``+d.add(i);else if(e<1){let e;P=`s`,_?(e=`=`+_.formula,_=null):e=``+i.getLabel(),N=``+l.add(e),f++}else N=``+i.getLabel();break;case t.ScalarType.Number:N=``+i,P=null;break;case t.ScalarType.String:N=i,_?(P=`str`,N=i):(P=`s`,N=``+l.add(N),f++);break;case t.ScalarType.RichData:P=`e`,N=t.FormulaError.BuiltIn.Value.getLabel(),M.vm=``+d.add(i)}P&&(M.t=P);let I=!_?.isWrapped&&(b!==null||(_?.isDynamicRange??!1));if(_!==null||N!==null){if(I&&_!==null&&!C&&(M.cm=``+u.registerArrayCell(S)),r.start(`c`,M),_){let e=c===_.coords.rowStart&&m===_.coords.colStart,t=_.formula;_.memberImage&&!e&&(t=_.memberImage({rowIndex:c,colIndex:m}));let n,i=null,a=_.sharedId;if(a){n=St;let e=_.coords;e.colStart===m&&e.rowStart===c?(n.ref=_.ref,n.si=a,i=_.formula):(n.ref=void 0,n.si=a)}else I?(n=Ct,n.aca=S?`1`:void 0,n.ref=S?M.r:b?.ref??M.r,i=t):(n=xt,i=t);n.ca=v||S||_.isExcelVolatile?`1`:void 0,i?(r.start(`f`,n),r.text(i),r.end(`f`)):r.empty(`f`,n)}N!==null&&(P===`str`&&N?(r.start(`v`,e.C.test(N)?e.S:void 0),r.text(e.T(N))):(r.start(`v`),N&&r.text(N)),r.end(`v`)),r.end(`c`)}else p++<Qe?r.empty(`c`,M):p===1048577&&n.warn(`Reached ${Qe} style-only cells at '${M.r}'; not writing the rest.`)},{injectReferences:M,features:[]}),D!==-1&&D>=v?r.end(`row`):te(v,!0),r.end(`sheetData`),r.setValidationDisabled(!1)}else r.empty(`sheetData`);if(f>0){let e=c.get(`stringsCount`)??0;c.set(`stringsCount`,e+f)}}(r,i,a,o,await(async(n,r)=>{let i=r?r.length:0;if(i===0)return Ze;let a=new Set,o=Array(i);for(let e=0;e<i;e++){o[e]=null;try{let n=t.FormulaText.parse(r[e][1]);if(!n)continue;let i=null,s=e=>{let t=null;e.type===`function`?t=String(e.value):e.type===`call`&&e.inputs?.[0]?.type===`named`&&(t=String(e.inputs[0].value?.name??``)),t&&(t=t.toUpperCase(),a.add(t),(i??=new Set).add(t));let n=e.inputs;if(n)for(let e=0;e<n.length;e++)n[e]&&s(n[e])};s(n),o[e]=i}catch{}}let s=n.getWorkbook();if(!s)return Ze;let c=await e.O(s,a);return c.size===0?Ze:{names:c,perFormula:o,affects:e=>{let t=o[e];if(!t)return!1;for(let e of t)if(c.has(e))return!0;return!1}}})(a,o.formulas),s),function(t,n,r,i){let a=i.protection;if(!a)return;let o={};a.sheet||j(a.password??{},o);for(let t of e.v){let n=e.x(t,a[t.key]);n!==null&&(o[t.attribute]=n)}n.empty(`sheetProtection`,o)}(0,i,0,o),function(e,t,n,r){let i=r.protectedRanges,a=i?i.length:0;if(a===0)return;let o=[];for(let t=0;t<a;t++){let n=i[t],r,a;Array.isArray(n)?(r=n[0],a=n[1]):(r=n.r,a=n.v);let s=ot(r);if(!s||!a){e.log(`Skipping protectedRange with no range.`);continue}if(!a.name){e.log(`Skipping protectedRange with no name.`);continue}let c={};j(a.password??{},c),c.sqref=s,c.name=a.name,a.securityDescriptor&&(c.securityDescriptor=a.securityDescriptor),o.push(c)}if(o.length!==0){t.start(`protectedRanges`);for(let e=0;e<o.length;e++)t.empty(`protectedRange`,o[e]);t.end(`protectedRanges`)}}(r,i,0,o);let c=o.autoTable;if(c){let e,t=c;e=Array.isArray(t)?t[1]:t.v,Je(r,i,a.getAutoTable(),e,!0)}(function(e,n,r,i){let a=i.merges?i.merges.length:0;if(a>0){n.start(`mergeCells`,{count:a});for(let e=0;e<a;e++){let r=i.merges[e],a=typeof r==`string`?r:t.AddressUtils.rangeToString(r);n.empty(`mergeCell`,{ref:a})}n.end(`mergeCells`)}})(0,i,0,o);let l=function(n,r,i,a){let o=[],s=a.conditionals,c=s?s.length:0;if(c===0)return o;let l=n.getSharedStates(),u=l.get(Fe);u||(u=new Pe,l.set(Fe,u));let d=i.getStyles().getTheme(),f=l.get(e.I),p=null,m=0;for(let i=0;i<c;i++){let a=s[i],c,l;Array.isArray(a)?(c=a[0],l=a[1]):(c=a.r,l=a.v);let h=ot(c);if(!h||!l){n.log(`Skipping conditionalFormatting with no range.`);continue}let g=lt(h),_=dt(l.scale,g,f);_!==l.scale&&(l={...l,scale:_});let v=_?{type:_.type}:e.g(l.condition,at(h),(e,t)=>n.warn(e,void 0,t));v?(v.formulas&&=v.formulas.map(e=>ut(e,g,f)),_?.type===t.IConditionalFormat.ScaleType.IconSet&&rt(_)?(m++,o.push({guid:e.st(t.CommonUtils.uuidV4),sqref:h,priority:m,scale:_})):_||!ct(v)?(h!==p&&(p!==null&&r.end(`conditionalFormatting`),r.start(`conditionalFormatting`,{sqref:h,pivot:l.pivot?`1`:void 0}),p=h),m++,it(n,r,d,l,v,h,m,u,o)):(m++,o.push({guid:e.st(t.CommonUtils.uuidV4),sqref:h,priority:m,rule:v,style:l.style,stopIfTrue:l.stopIfTrue}))):l.condition||n.log(`Skipping conditional format with neither a condition nor a scale.`)}return p!==null&&r.end(`conditionalFormatting`),o}(r,i,a,o),u=function(t,n,r,i){let a=[],o=t.getSharedStates().get(e.I),s=i.validations,c=s?s.length:0;if(c===0)return a;let l=[];for(let n=0;n<c;n++){let r=s[n],i,c;Array.isArray(r)?(i=r[0],c=r[1]):(i=r.r,c=r.v);let u=ot(i);if(!u||!c){t.log(`Skipping dataValidation with no range.`);continue}c.ext&&t.warn(`DataValidation extension payload is not written to xlsx; it will be lost.`);let d=(e,n)=>t.warn(e,void 0,n),f=e.d(c.condition,d),{type:p,operator:m}=f??{},h=lt(u),g=ut(f?.formula1,h,o),_=ut(f?.formula2,h,o),v={type:p,operator:m,allowBlank:X(c.condition?.includeBlanks??!1),showDropDown:c.hideDropdown?`1`:void 0,showInputMessage:X(c.showPromptMessage),showErrorMessage:X(c.showAlertMessage),errorStyle:c.alertStyle??`stop`,errorTitle:e.l(c.alertTitle,`errorTitle`,d),error:e.l(c.alert,`error`,d),promptTitle:e.l(c.promptTitle,`promptTitle`,d),prompt:e.l(c.prompt,`prompt`,d),imeMode:c.imeMode};st(g)||st(_)?a.push({attrs:v,formula1:g,formula2:_,sqref:u}):(v.sqref=u,l.push({attrs:v,formula1:g,formula2:_}))}if(l.length===0)return a;n.start(`dataValidations`,{count:l.length});for(let e=0;e<l.length;e++){let{attrs:t,formula1:r,formula2:i}=l[e];r!==void 0||i!==void 0?(n.start(`dataValidation`,t),r!==void 0&&(n.start(`formula1`),n.text(r),n.end(`formula1`)),i!==void 0&&(n.start(`formula2`),n.text(i),n.end(`formula2`)),n.end(`dataValidation`)):n.empty(`dataValidation`,t)}return n.end(`dataValidations`),a}(r,i,0,o);(function(e,t,n,r){let i=r.hyperlinks,a=i?i.length:0;if(a!==0){t.start(`hyperlinks`);for(let n=0;n<a;n++){let r,a,o=i[n];Array.isArray(o)?(a=o[0],r=o[1]):(a=o.r,r=o.v),typeof r==`string`&&(r={address:r});let s=r.address??``,c=s.indexOf(`#`),l=c===-1?s:s.substring(0,c),u=c===-1?``:s.substring(c+1),d={};d.ref=a,l&&(d[`r:id`]=e.addExternal(`http://schemas.openxmlformats.org/officeDocument/2006/relationships/hyperlink`,l).relId),u&&(d.location=u),r.screenTip&&(d.tooltip=r.screenTip),t.empty(`hyperlink`,d)}t.end(`hyperlinks`)}})(r,i,0,o),function(e,t,n,r){let i=r.pageMargins;t.empty(`pageMargins`,{left:i?.left??.7,right:i?.right??.7,top:i?.top??.75,bottom:i?.bottom??.75,header:i?.header??.3,footer:i?.footer??.3})}(0,i,0,o),function(e,t,n,r){let i=r.movables?.filter(ht);if((i?i.length:0)===0||!i.some(e=>{let t=e.content?.type;if(t===`picture`||t===`chart`)return!0;if(t===`shape`){let t=e.content?.json?.type;return t===`sp`||t===`cxnSp`}return!1}))return;let a=n.getMovables().getItems().filter(e=>e.getContent().getType()!==`note`).filter((e,t)=>ht(r.movables[t])),o=e.addPart(`drawing`,{sheet:n,movables:a,jsonMovables:i,resources:n.getResources()});t.empty(`drawing`,{"r:id":o.relId})}(r,i,a,o);let d=function(e){let t=e.getComments().toArray();if(t.length===0)return null;let n=[];for(let e=0;e<t.length;e++){let r=t[e],i=Te(r);i&&n.push({comment:r,...i})}return n.length===0?null:(n.sort((e,t)=>e.row-t.row||e.col-t.col),{sheet:e,comments:n})}(a);ft(r,i,`legacyDrawing`,mt(_t(o.legacyDrawing??null,o),d)),ft(r,i,`legacyDrawingHF`,o.legacyDrawingHF??null),await async function(e,t,n){let r=n.getPicture();if(!r)return;let i=r.getResource(),a=await i.getExternalURI(),o;if(a)o=e.addExternal(U,a);else{let t=e.getSharedStates(),n=t.get(W);n||(n=new Map,t.set(W,n));let r=n.get(i);if(!r){let e=await i.toBuffer();r={bytes:new Uint8Array(e),type:await i.getType()??Me,index:n.size+1},n.set(i,r)}o=e.addBinary(r.bytes,r.type.mime,U,`../media/image${r.index}.${r.type.ext}`,!0)}t.empty(`picture`,{"r:id":o.relId})}(r,i,a),await async function(t,n,r){let i=r.movables;if(!i||i.every(ht))return;let a=[],o=i.length;for(let e=0;e<o;e++){let n=i[e];if(ht(n))continue;let r=n.content?.json??{},o=r.part,s;if(o)try{s=(await L(o.type?o:{...o,type:gt},t,`../ctrlProps/ctrlProp{n}.xml`))?.relId??void 0}catch(e){t.log(`Unable to write the properties of the control '${n.content?.name}'`,e)}s?a.push({jsonMovable:n,jsonControl:r,relId:s}):t.log(`The control '${n.content?.name}' has no properties to write and was dropped.`)}if(a.length===0)return;n.start(`mc:AlternateContent`,{"xmlns:x14":e.rt,"xmlns:xdr":`http://schemas.openxmlformats.org/drawingml/2006/spreadsheetDrawing`}),n.start(`mc:Choice`,{Requires:`x14`}),n.start(`controls`);let s=a.length;for(let e=0;e<s;e++){let{jsonMovable:t,jsonControl:r,relId:i}=a[e];n.start(`mc:AlternateContent`),n.start(`mc:Choice`,{Requires:`x14`}),n.start(`control`,{shapeId:r.shapeId,"r:id":i,name:t.content?.name??void 0});let o=t.anchorType??`twoCell`;n.start(`controlPr`,r.props),n.start(`anchor`,{moveWithCells:o===`absolute`?void 0:`1`,sizeWithCells:o===`twoCell`?`1`:void 0}),vt(n,`from`,t.anchor.tl),vt(n,`to`,t.anchor.br),n.end(`anchor`),r.xml&&n.raw(r.xml),n.end(`controlPr`),n.end(`control`),n.end(`mc:Choice`),n.end(`mc:AlternateContent`)}n.end(`controls`),n.end(`mc:Choice`),n.end(`mc:AlternateContent`)}(r,i,o),function(e,t,n,r){let i=r.tables,a=i?i.length:0;if(a===0)return;let o=n.getTables().getItems();t.start(`tableParts`,{count:a});for(let n=0;n<a;n++){let r,a,s=i[n];Array.isArray(s)?(a=s[0],r=s[1]):(a=s.r,r=s.v);let c=e.addPart(`table`,{json:r,model:o[n],ref:a}),l={};l[`r:id`]=c.relId,t.empty(`tablePart`,l)}t.end(`tableParts`)}(r,i,a,o),function(n,r,i,a,o){if(a.length===0&&o.length===0)return;let s=i.getStyles(),c=s.getTheme();if(r.start(`extLst`),a.length>0){r.start(`ext`,{uri:e.Q,"xmlns:x14":e.rt}),r.start(`x14:conditionalFormattings`);for(let n=0;n<a.length;n++){let{guid:i,sqref:o,priority:l,scale:u,rule:d,style:f,stopIfTrue:p}=a[n];if(r.start(`x14:conditionalFormatting`,{"xmlns:xm":e.it}),u)if(u.type===t.IConditionalFormat.ScaleType.DataBar){r.start(`x14:cfRule`,{type:`dataBar`,id:i}),r.start(`x14:dataBar`,{minLength:u.minLength,maxLength:u.maxLength,gradient:u.gradient?void 0:`0`,border:u.borderColor?`1`:void 0,direction:u.direction,negativeBarColorSameAsPositive:u.negativeFillColor?`0`:`1`,negativeBarBorderColorSameAsPositive:u.negativeBorderColor?`0`:void 0,axisPosition:u.axisPosition});let e=u.stops??[];if(e.length===0)tt(r,{type:t.IConditionalFormat.ColorStopType.AutoMin}),tt(r,{type:t.IConditionalFormat.ColorStopType.AutoMax});else for(let t=0;t<e.length;t++)tt(r,e[t]);u.borderColor&&B(r,c,u.borderColor,`x14:borderColor`),u.negativeFillColor&&B(r,c,u.negativeFillColor,`x14:negativeFillColor`),u.negativeBorderColor&&B(r,c,u.negativeBorderColor,`x14:negativeBorderColor`),u.axisColor&&B(r,c,u.axisColor,`x14:axisColor`),r.end(`x14:dataBar`),r.end(`x14:cfRule`)}else{r.start(`x14:cfRule`,{type:`iconSet`,priority:l,id:i}),r.start(`x14:iconSet`,{iconSet:u.iconSet,reverse:X(u.reverse),showValue:X(u.showValue),custom:(u.icon?.length??0)>0?`1`:void 0});let e=u.stops??[];for(let t=0;t<e.length;t++)tt(r,e[t]);let t=u.icon??[];for(let e=0;e<t.length;e++)r.empty(`x14:cfIcon`,{iconSet:t[e].set,iconId:t[e].id});r.end(`x14:iconSet`),r.end(`x14:cfRule`)}else{r.start(`x14:cfRule`,{type:d.type,priority:l,stopIfTrue:X(p),aboveAverage:X(d.aboveAverage),equalAverage:X(d.equalAverage),stdDev:d.stdDev,bottom:X(d.bottom),percent:X(d.percent),rank:d.rank,operator:d.operator,text:d.text,timePeriod:d.timePeriod,id:i});let e=d.formulas??[];for(let t=0;t<e.length;t++)r.start(`xm:f`),r.text(e[t]),r.end(`xm:f`);f&&Object.keys(f).length>0&&Ue(0,r,f,s,c,`x14:dxf`),r.end(`x14:cfRule`)}r.start(`xm:sqref`),r.text(o),r.end(`xm:sqref`),r.end(`x14:conditionalFormatting`)}r.end(`x14:conditionalFormattings`),r.end(`ext`)}if(o.length>0){r.start(`ext`,{uri:e.et,"xmlns:x14":e.rt}),r.start(`x14:dataValidations`,{"xmlns:xm":e.it,count:o.length});for(let e=0;e<o.length;e++){let{attrs:t,formula1:n,formula2:i,sqref:a}=o[e];r.start(`x14:dataValidation`,t),n!==void 0&&(r.start(`x14:formula1`),r.start(`xm:f`),r.text(n),r.end(`xm:f`),r.end(`x14:formula1`)),i!==void 0&&(r.start(`x14:formula2`),r.start(`xm:f`),r.text(i),r.end(`xm:f`),r.end(`x14:formula2`)),r.start(`xm:sqref`),r.text(a),r.end(`xm:sqref`),r.end(`x14:dataValidation`)}r.end(`x14:dataValidations`),r.end(`ext`)}r.end(`extLst`)}(0,i,a,l,u),function(e,t){let n=t.pivotTables,r=n?n.length:0;for(let t=0;t<r;t++){let r=n[t],i=r.part;i?.xml&&(ae(e,r.cacheId)?e.addPart(`pivotTable`,r):e.log(`The pivot table '${i.name??``}' has no cache with id ${r.cacheId} and was dropped.`))}}(r,o),function(e,t){t&&(e.addPart(`comments`,t),t.comments.some(e=>!e.comment.isNote())&&e.addPart(`threadedComments`,t))}(r,d),i.end(`worksheet`),i.close()}},new class extends r{constructor(){super({kind:`sharedStrings`,contentType:`application/vnd.openxmlformats-officedocument.spreadsheetml.sharedStrings+xml`,relTypeUri:`http://schemas.openxmlformats.org/officeDocument/2006/relationships/sharedStrings`,path:`/xl/sharedStrings.xml`})}async emit(t,n){let r=n.getXMLWriter(),i=t.json,a=i?i.length:0,o=n.getSharedStates().get(`stringsCount`)??0;r.decl(),r.start(`sst`,{xmlns:`http://schemas.openxmlformats.org/spreadsheetml/2006/main`,count:o,uniqueCount:a});for(let t=0;t<a;t++){let n=i[t];r.start(`si`);let a=e.C.test(n)?e.S:void 0;r.start(`t`,a),r.text(e.T(n)),r.end(`t`),r.end(`si`)}r.end(`sst`),r.close()}},new class extends r{constructor(){super({kind:`theme`,contentType:`application/vnd.openxmlformats-officedocument.theme+xml`,relTypeUri:`http://schemas.openxmlformats.org/officeDocument/2006/relationships/theme`,path:`/xl/theme/theme{n}.xml`})}async emit(e,t){let n=t.getXMLWriter(),r=e.model,i=e.json;n.decl(),n.pushDefaultNamespace(`a`),n.start(`theme`,{"xmlns:a":`http://schemas.openxmlformats.org/drawingml/2006/main`,name:r.getName()||`Office Theme`}),n.start(`themeElements`),function(e,t,n,r){let i=n?.getColorScheme();if(i){t.start(r,{name:i.getName()||`Office`});for(let e of me)t.start(e),R(t,n,i[`get`+e.charAt(0).toUpperCase()+e.slice(1)]()),t.end(e);t.end(r)}}(0,n,r,`clrScheme`),function(e,t,n,r){n&&(t.start(r,{name:n.getName()||`Office`}),wt(e,t,n.getMajorFont()||`Calibri Light`,`majorFont`),wt(e,t,n.getMinorFont()||`Calibri`,`minorFont`),t.end(r))}(t,n,r.getFontScheme(),`fontScheme`),function(e,t,n,r,i){if(i?.fillStyleLst&&i?.lnStyleLst&&i?.effectStyleLst&&i?.bgFillStyleLst)return void function(e,t,n,r,i){let a={getTheme:()=>r};t.start(n,{name:`Office`}),t.start(`fillStyleLst`);for(let e of i.fillStyleLst)H(0,t,e,a);t.end(`fillStyleLst`),t.start(`lnStyleLst`);for(let e of i.lnStyleLst)Ee(0,t,e,a);t.end(`lnStyleLst`),t.start(`effectStyleLst`);for(let n of i.effectStyleLst)t.start(`effectStyle`),n.length>0?ke(e,t,r,n):t.empty(`effectLst`),t.end(`effectStyle`);t.end(`effectStyleLst`),t.start(`bgFillStyleLst`);for(let e of i.bgFillStyleLst)H(0,t,e,a);t.end(`bgFillStyleLst`),t.end(n)}(e,t,n,r,i);if(i?.formatSchemeXml)return void t.raw(i.formatSchemeXml);t.start(n,{name:`Office`}),function(e,t){t.start(`fillStyleLst`),t.start(`solidFill`),t.empty(`schemeClr`,{val:`phClr`}),t.end(`solidFill`),t.start(`gradFill`,{rotWithShape:`1`}),t.start(`gsLst`),t.start(`gs`,{pos:`0`}),t.start(`schemeClr`,{val:`phClr`}),t.empty(`tint`,{val:`50000`}),t.empty(`satMod`,{val:`300000`}),t.end(`schemeClr`),t.end(`gs`),t.start(`gs`,{pos:`35000`}),t.start(`schemeClr`,{val:`phClr`}),t.empty(`tint`,{val:`37000`}),t.empty(`satMod`,{val:`300000`}),t.end(`schemeClr`),t.end(`gs`),t.start(`gs`,{pos:`100000`}),t.start(`schemeClr`,{val:`phClr`}),t.empty(`tint`,{val:`15000`}),t.empty(`satMod`,{val:`350000`}),t.end(`schemeClr`),t.end(`gs`),t.end(`gsLst`),t.empty(`lin`,{ang:`16200000`,scaled:`1`}),t.end(`gradFill`),t.start(`gradFill`,{rotWithShape:`1`}),t.start(`gsLst`),t.start(`gs`,{pos:`0`}),t.start(`schemeClr`,{val:`phClr`}),t.empty(`shade`,{val:`51000`}),t.empty(`satMod`,{val:`130000`}),t.end(`schemeClr`),t.end(`gs`),t.start(`gs`,{pos:`80000`}),t.start(`schemeClr`,{val:`phClr`}),t.empty(`shade`,{val:`93000`}),t.empty(`satMod`,{val:`130000`}),t.end(`schemeClr`),t.end(`gs`),t.start(`gs`,{pos:`100000`}),t.start(`schemeClr`,{val:`phClr`}),t.empty(`shade`,{val:`94000`}),t.empty(`satMod`,{val:`135000`}),t.end(`schemeClr`),t.end(`gs`),t.end(`gsLst`),t.empty(`lin`,{ang:`16200000`,scaled:`0`}),t.end(`gradFill`),t.end(`fillStyleLst`)}(0,t),function(e,t){t.start(`lnStyleLst`);let n=[9525,25400,38100];for(let e=0;e<3;e++)t.start(`ln`,{w:n[e].toString(),cap:`flat`,cmpd:`sng`,algn:`ctr`}),t.start(`solidFill`),t.start(`schemeClr`,{val:`phClr`}),t.empty(`shade`,{val:`95000`}),t.empty(`satMod`,{val:`105000`}),t.end(`schemeClr`),t.end(`solidFill`),t.empty(`prstDash`,{val:`solid`}),t.end(`ln`);t.end(`lnStyleLst`)}(0,t),function(e,t){t.start(`effectStyleLst`);for(let e=0;e<3;e++)t.start(`effectStyle`),t.start(`effectLst`),e===2&&(t.start(`outerShdw`,{blurRad:`40000`,dist:`20000`,dir:`5400000`,rotWithShape:`0`}),t.start(`srgbClr`,{val:`000000`}),t.empty(`alpha`,{val:`38000`}),t.end(`srgbClr`),t.end(`outerShdw`)),t.end(`effectLst`),t.end(`effectStyle`);t.end(`effectStyleLst`)}(0,t),function(e,t){t.start(`bgFillStyleLst`),t.start(`solidFill`),t.empty(`schemeClr`,{val:`phClr`}),t.end(`solidFill`),t.start(`gradFill`,{rotWithShape:`1`}),t.start(`gsLst`),t.start(`gs`,{pos:`0`}),t.start(`schemeClr`,{val:`phClr`}),t.empty(`tint`,{val:`40000`}),t.empty(`satMod`,{val:`350000`}),t.end(`schemeClr`),t.end(`gs`),t.start(`gs`,{pos:`40000`}),t.start(`schemeClr`,{val:`phClr`}),t.empty(`tint`,{val:`45000`}),t.empty(`shade`,{val:`99000`}),t.empty(`satMod`,{val:`350000`}),t.end(`schemeClr`),t.end(`gs`),t.start(`gs`,{pos:`100000`}),t.start(`schemeClr`,{val:`phClr`}),t.empty(`shade`,{val:`20000`}),t.empty(`satMod`,{val:`255000`}),t.end(`schemeClr`),t.end(`gs`),t.end(`gsLst`),t.empty(`path`,{path:`circle`}),t.empty(`fillToRect`,{l:`50000`,t:`-80000`,r:`50000`,b:`180000`}),t.end(`gradFill`),t.start(`gradFill`,{rotWithShape:`1`}),t.start(`gsLst`),t.start(`gs`,{pos:`0`}),t.start(`schemeClr`,{val:`phClr`}),t.empty(`tint`,{val:`80000`}),t.empty(`satMod`,{val:`300000`}),t.end(`schemeClr`),t.end(`gs`),t.start(`gs`,{pos:`100000`}),t.start(`schemeClr`,{val:`phClr`}),t.empty(`shade`,{val:`30000`}),t.empty(`satMod`,{val:`200000`}),t.end(`schemeClr`),t.end(`gs`),t.end(`gsLst`),t.empty(`path`,{path:`circle`}),t.empty(`fillToRect`,{l:`50000`,t:`50000`,r:`50000`,b:`50000`}),t.end(`gradFill`),t.end(`bgFillStyleLst`)}(0,t),t.end(n)}(t,n,`fmtScheme`,r,i),n.end(`themeElements`),n.start(`objectDefaults`),n.end(`objectDefaults`),n.start(`extraClrSchemeLst`),n.end(`extraClrSchemeLst`),n.end(`theme`),n.close()}},new class extends r{constructor(){super({kind:`styles`,contentType:`application/vnd.openxmlformats-officedocument.spreadsheetml.styles+xml`,relTypeUri:`http://schemas.openxmlformats.org/officeDocument/2006/relationships/styles`,path:`/xl/styles.xml`})}async emit(e,n){let r=n.getXMLWriter(),i=e.json,a=(e.theme,e.styles);r.decl(),r.start(`styleSheet`,{xmlns:`http://schemas.openxmlformats.org/spreadsheetml/2006/main`,"xmlns:mc":`http://schemas.openxmlformats.org/markup-compatibility/2006`,"mc:Ignorable":`x14ac x16r2 xr`,"xmlns:x14ac":`http://schemas.microsoft.com/office/spreadsheetml/2009/9/ac`,"xmlns:x16r2":`http://schemas.microsoft.com/office/spreadsheetml/2015/02/main`,"xmlns:xr":`http://schemas.microsoft.com/office/spreadsheetml/2014/revision`});let o=function(e,n){let r=n?.direct;r&&r.length!==0||(r=[{}]);let i=r.length,a=Array(i);for(let n=0;n<i;n++){let i=n===0?{...r[n],named:t.IStyle.BuiltInName.Normal}:r[n],o=e.resolve(i),s={};i.named!==void 0&&(s.named=i.named),i.quotePrefix!==void 0&&(s.quotePrefix=i.quotePrefix),i.protection!==void 0&&(s.protection=i.protection);for(let e=0;e<Ie.length;e++){let t=Ie[e];if(i[t]===void 0&&t!==`alignment`)continue;let n=o?.[t]??i[t];n!==void 0&&(s[t]=n)}a[n]=s}return a}(a,i),s=function(e,n,r){let i={fontMap:new Map,fonts:[],fillMap:new Map,fills:[],borderMap:new Map,borders:[],numFmtMap:new Map,numFmtsCustom:[],namedStyleMap:new Map,namedStyles:[]};(function(e,n){let r=(e.getNamedStyles().getByName(t.IStyle.BuiltInName.Normal).toJSON().style??{}).font??{};n.fontMap.set(t.BufferUtils.JSONStableStringify(r),`0`),n.fonts.push(r)})(e,i),function(e){let n={type:`none`};e.fillMap.set(t.BufferUtils.JSONStableStringify(n),`0`),e.fills.push(n);let r={type:`pattern`,patternType:`gray125`};e.fillMap.set(t.BufferUtils.JSONStableStringify(r),`1`),e.fills.push(r)}(i),function(e){let n={bottom:{style:`none`},left:{style:`none`},right:{style:`none`},top:{style:`none`}};e.borderMap.set(t.BufferUtils.JSONStableStringify(n),`0`),e.borders.push(n)}(i),function(e,n){Re(e,e.getNamedStyles().getByName(t.IStyle.BuiltInName.Normal).toJSON(),n)}(e,i);let a=n?.named??t.CommonUtils.EmptyArray;for(let t of a)Re(e,t,i);for(let t of r)Le(e,t,i);return i}(a,i,o),c=n.getSharedStates().get(Fe),l=function(e,t=0){let n=e?.tables;if(!n)return null;let r=n.styles;if(!r)return null;let i=[],a=new Map,o=Object.keys(r),s=[...Ge].reverse();for(let e of o){let n=r[e];for(let r of s){let o=n[r];if(!o)continue;let s={};if(o.font&&(s.font=o.font),o.fill&&(s.fill=o.fill),o.borders&&(s.borders=o.borders),o.numberFormat!==void 0&&(s.numberFormat=o.numberFormat),Object.keys(s).length===0)continue;let c=t+i.length;i.push(s);let l=`${e}:${r}`;a.set(l,c)}}return{dxfs:i,dxfIndexMap:a}}(i,c?.getCount()??0);(function(e,t,n){let r=n.numFmtsCustom,i=r.length;if(i!==0){t.start(`numFmts`,{count:String(i)});for(let e=0;e<i;e++){let n=r[e];t.empty(`numFmt`,{numFmtId:String(e+We),formatCode:n})}t.end(`numFmts`)}})(0,r,s),function(e,t,n,r){let i=r.fonts,a=i.length;t.start(`fonts`,{count:String(a),"x14ac:knownFonts":`1`});for(let r of i)ze(e,t,r,n);t.end(`fonts`)}(n,r,a,s),function(e,t,n,r){let i=r.fills,a=i.length;t.start(`fills`,{count:String(a)});for(let e of i)H(0,t,e,n,!0);t.end(`fills`)}(0,r,a,s),function(e,t,n,r){let i=r.borders,a=i.length;t.start(`borders`,{count:String(a)});let o=n.getTheme();for(let n of i)Be(e,t,n,o,!1);t.end(`borders`)}(n,r,a,s),function(e,n,r,i,a){let o=a.namedStyles,s=o.length;n.start(`cellStyleXfs`,{count:String(s)});for(let i of o)He(e,n,r,i.style??t.CommonUtils.EmptyObject,a,!1);n.end(`cellStyleXfs`)}(n,r,a,0,s),function(e,t,n,r,i,a){let o=r.length,s=a?.getSources()??[];t.start(`cellXfs`,{count:String(o+s.length)});for(let a=0;a<o;a++)He(e,t,n,r[a],i,!0);for(let a=0;a<s.length;a++)He(e,t,n,r[s[a]],i,!0,!0);t.end(`cellXfs`)}(n,r,a,o,s,n.getSharedStates().get(te)),function(e,n,r,i,a){let o=a.namedStyles,s=o.length;n.start(`cellStyles`,{count:String(s)});let c=a.namedStyleMap;for(let e=0;e<s;e++){let i=o[e],a=i.name,s=a.toLowerCase(),l={name:a,xfId:c.get(s)};i.hidden&&(l.hidden=`1`),i.iLevel&&(l.iLevel=String(i.iLevel));let u=null;u=s===t.IStyle.BuiltInName.Normal.toLowerCase()?0:r.getNamedStyles().getByName(a).getBuiltInID(),u!==null&&(l.builtinId=String(u),l.customBuiltin=`1`),n.empty(`cellStyle`,l)}n.end(`cellStyles`)}(0,r,a,0,s),function(e,t,n,r,i){let a=[...i?.getDxfs()??[],...r?.dxfs??[]];if(a.length===0)return void t.empty(`dxfs`,{count:`0`});let o=n.getTheme();t.start(`dxfs`,{count:String(a.length)});let s=We;for(let r of a)s=Ue(e,t,r,n,o,`dxf`,s);t.end(`dxfs`)}(n,r,a,l,c),function(e,t,n,r,i){let a=r?.tables,o=a?.styles??null,s=o?Object.keys(o):null,c=s?s.length:0,l={count:String(c),defaultTableStyle:a?.defaultTableStyle??`TableStyleMedium2`,defaultPivotStyle:a?.defaultPivotStyle??`PivotStyleLight16`};if(c===0)return void t.empty(`tableStyles`,l);t.start(`tableStyles`,l);for(let e of s){let n=o[e],r=[];for(let e of Ge){let t=n[e];t&&r.push([e,t])}let a={name:e,pivot:n.pivot?`1`:`0`,count:String(r.length)};t.start(`tableStyle`,a);for(let[n,a]of r){let r=`${e}:${n}`,o=i?.dxfIndexMap.get(r)??`0`,s={};s.type=n,a.size!==void 0&&(s.size=String(a.size)),s.dxfId=String(o),t.empty(`tableStyleElement`,s)}t.end(`tableStyle`)}t.end(`tableStyles`)}(0,r,0,i,l),function(e,t,n,r){let i=r?.indexedColors&&r.indexedColors.length>0,a=r?.mruColors&&r.mruColors.length>0;if(!(!i&&!a)){if(t.start(`colors`),i){t.start(`indexedColors`);for(let e of r.indexedColors){let n=ye(e,!0);t.empty(`rgbColor`,{rgb:n})}t.end(`indexedColors`)}if(a){t.start(`mruColors`);for(let e of r.mruColors){let n=ye(e);t.empty(`color`,{rgb:n})}t.end(`mruColors`)}t.end(`colors`)}}(0,r,0,i),function(e,t){t.start(`extLst`),t.start(`ext`,{uri:`{EB79DEF2-80B8-43e5-95BD-54CBDDF9020C}`,"xmlns:x14":`http://schemas.microsoft.com/office/spreadsheetml/2009/9/main`}),t.empty(`x14:slicerStyles`,{defaultSlicerStyle:`SlicerStyleLight1`}),t.end(`ext`),t.start(`ext`,{uri:`{9260A510-F301-46a8-8635-F512D64BE5F5}`,"xmlns:x15":`http://schemas.microsoft.com/office/spreadsheetml/2010/11/main`}),t.empty(`x15:timelineStyles`,{defaultTimelineStyle:`TimeSlicerStyleLight1`}),t.end(`ext`),t.end(`extLst`)}(0,r),r.end(`styleSheet`),r.close()}},new class extends r{constructor(){super({kind:`propsCore`,contentType:`application/vnd.openxmlformats-package.core-properties+xml`,relTypeUri:`http://schemas.openxmlformats.org/package/2006/relationships/metadata/core-properties`,path:`/docProps/core.xml`})}async emit(e,t){let n=t.getXMLWriter();n.decl(),n.start(`cp:coreProperties`,{"xmlns:cp":`http://schemas.openxmlformats.org/package/2006/metadata/core-properties`,"xmlns:dc":`http://purl.org/dc/elements/1.1/`,"xmlns:dcterms":`http://purl.org/dc/terms/`,"xmlns:dcmitype":`http://purl.org/dc/dcmitype/`,"xmlns:xsi":`http://www.w3.org/2001/XMLSchema-instance`});let r=new Date,i=[[`creator`,`SheetXL`],[`lastModifiedBy`,`SheetXL`],[`created`,Tt(r)],[`modified`,Tt(r)]];for(let e of i)Et(n,e[0],e[1]);n.end(`cp:coreProperties`),n.close()}},new class extends r{constructor(){super({kind:`propsApp`,contentType:`application/vnd.openxmlformats-officedocument.extended-properties+xml`,relTypeUri:`http://schemas.openxmlformats.org/officeDocument/2006/relationships/extended-properties`,path:`/docProps/app.xml`})}async emit(n,r){let i=r.getXMLWriter(),a=n.model,o=await t.LicenseManager.getDetails(),s=e.r(o.getBuildVersion()),c=o.getLicensee()||``;i.setValidationDisabled(!0),i.decl(),i.start(`Properties`,{xmlns:`http://schemas.openxmlformats.org/officeDocument/2006/extended-properties`,"xmlns:vt":`http://schemas.openxmlformats.org/officeDocument/2006/docPropsVTypes`}),Z(r,i,`Application`,`SheetXL`),Z(r,i,`DocSecurity`,`0`),Z(r,i,`ScaleCrop`,`false`),Dt(r,i,a),Z(r,i,`Company`,c),Z(r,i,`LinksUpToDate`,`false`),Z(r,i,`SharedDoc`,`false`),Z(r,i,`HyperlinksChanged`,`false`),Z(r,i,`AppVersion`,s),i.end(`Properties`),i.close()}},new class extends r{constructor(){super({kind:`metadata`,contentType:`application/vnd.openxmlformats-officedocument.spreadsheetml.sheetMetadata+xml`,relTypeUri:`http://schemas.openxmlformats.org/officeDocument/2006/relationships/sheetMetadata`,path:`/xl/metadata.xml`})}emit(e,t){let n=t.getXMLWriter(),r=e.hasCellMeta(),i=e.hasValueMeta(),a=e.getDAPRFutureMetadataBlocks(),o=e.getRVFutureMetadataBlocks(),s=e.getValueMeta(),c=0,l=0,u=0;r&&(c=++u),i&&(l=++u);let d={xmlns:`http://schemas.openxmlformats.org/spreadsheetml/2006/main`};if(r&&(d[`xmlns:xda`]=`http://schemas.microsoft.com/office/spreadsheetml/2017/dynamicarray`),i&&(d[`xmlns:xlrd`]=`http://schemas.microsoft.com/office/spreadsheetml/2017/richdata`),n.decl(),n.start(`metadata`,d),n.start(`metadataTypes`,{count:u}),r&&n.empty(`metadataType`,{name:`XLDAPR`,...Ot,cellMeta:`1`}),i&&n.empty(`metadataType`,{name:`XLRICHVALUE`,...Ot}),n.end(`metadataTypes`),r){n.start(`futureMetadata`,{name:`XLDAPR`,count:a.length});for(let e of a)n.start(`bk`),n.start(`extLst`),n.start(`ext`,{uri:`{bdbb8cdc-fa1e-496e-a857-3c3f30c029c3}`}),n.empty(`xda:dynamicArrayProperties`,{fDynamic:e.fDynamic,fCollapsed:e.fCollapsed}),n.end(`ext`),n.end(`extLst`),n.end(`bk`);n.end(`futureMetadata`)}if(i){n.start(`futureMetadata`,{name:`XLRICHVALUE`,count:o.length});for(let e of o)n.start(`bk`),n.start(`extLst`),n.start(`ext`,{uri:`{3e2802c4-a4d2-4d8b-9148-e3be6c30e623}`}),n.empty(`xlrd:rvb`,{i:e}),n.end(`ext`),n.end(`extLst`),n.end(`bk`);n.end(`futureMetadata`)}if(r){n.start(`cellMetadata`,{count:a.length});for(let e=0;e<a.length;e++)n.start(`bk`),n.empty(`rc`,{t:c,v:e}),n.end(`bk`);n.end(`cellMetadata`)}if(i){n.start(`valueMetadata`,{count:s.length});for(let e of s)n.start(`bk`),n.empty(`rc`,{t:l,v:e}),n.end(`bk`);n.end(`valueMetadata`)}n.end(`metadata`),n.close()}},new class extends r{constructor(){super({kind:`richValue`,contentType:`application/vnd.ms-excel.rdrichvalue+xml`,relTypeUri:`http://schemas.microsoft.com/office/2017/06/relationships/rdRichValue`,path:`./richData/rdrichvalue.xml`})}async emit(e,t){let n=t.getXMLWriter(),r=e.getEntries(),i=r.length;n.decl(),n.start(`rvData`,{xmlns:`http://schemas.microsoft.com/office/spreadsheetml/2017/richdata`,count:i});for(let t of r){let r=e.handlerStructureIndex(t.handler);n.start(`rv`,{s:r});let i=t.handler.getValues(t.rawValue);for(let e of i)n.start(`v`),n.text(e),n.end(`v`);n.end(`rv`)}n.end(`rvData`),n.close()}},new class extends r{constructor(){super({kind:`richValueStructure`,contentType:`application/vnd.ms-excel.rdrichvaluestructure+xml`,relTypeUri:`http://schemas.microsoft.com/office/2017/06/relationships/rdRichValueStructure`,path:`./richData/rdrichvaluestructure.xml`})}async emit(e,t){let n=t.getXMLWriter(),r=e.uniqueHandlers(),i=r.length;n.decl(),n.start(`rvStructures`,{xmlns:`http://schemas.microsoft.com/office/spreadsheetml/2017/richdata`,count:i});for(let e of r){n.start(`s`,{t:e.type});for(let[t,r]of e.props)n.empty(`k`,{n:t,t:r});n.end(`s`)}n.end(`rvStructures`),n.close()}},new class extends r{constructor(){super({kind:`richValueTypes`,contentType:`application/vnd.ms-excel.rdrichvaluetypes+xml`,relTypeUri:`http://schemas.microsoft.com/office/2017/06/relationships/rdRichValueTypes`,path:`./richData/rdRichValueTypes.xml`})}async emit(e,t){let n=t.getXMLWriter();n.decl(),n.start(`rvTypesInfo`,{xmlns:`http://schemas.microsoft.com/office/spreadsheetml/2017/richdata2`,"xmlns:mc":`http://schemas.openxmlformats.org/markup-compatibility/2006`,"mc:Ignorable":`x`,"xmlns:x":`http://schemas.openxmlformats.org/spreadsheetml/2006/main`});let r=[[`_self`,[`ExcludeFromFile`,`ExcludeFromCalcComparison`]],[`_DisplayString`,[`ExcludeFromCalcComparison`]],[`_Flags`,[`ExcludeFromCalcComparison`]],[`_Format`,[`ExcludeFromCalcComparison`]],[`_SubLabel`,[`ExcludeFromCalcComparison`]],[`_Attribution`,[`ExcludeFromCalcComparison`]],[`_Icons`,[`ExcludeFromCalcComparison`]],[`_Display`,[`ExcludeFromCalcComparison`]],[`_CanonicalPropertyNames`,[`ExcludeFromCalcComparison`]],[`_ClassificationId`,[`ExcludeFromCalcComparison`]]];n.start(`global`),n.start(`keyFlags`);for(let[e,t]of r){n.start(`key`,{name:e});for(let e of t)n.empty(`flag`,{name:e,value:`1`});n.end(`key`)}n.end(`keyFlags`),n.end(`global`),n.end(`rvTypesInfo`),n.close()}},new class extends r{constructor(){super({kind:`drawing`,contentType:`application/vnd.openxmlformats-officedocument.drawing+xml`,relTypeUri:`http://schemas.openxmlformats.org/officeDocument/2006/relationships/drawing`,path:`../drawings/drawing{n}.xml`})}async emit(e,t){let n=t.getXMLWriter();n.decl(),n.pushDefaultNamespace(`xdr`),n.start(`wsDr`,{"xmlns:xdr":`http://schemas.openxmlformats.org/drawingml/2006/spreadsheetDrawing`,"xmlns:a":`http://schemas.openxmlformats.org/drawingml/2006/main`});let r=new Map,i=e.sheet,a=e.movables,o=e.jsonMovables,s=o?o.length:0,c=0;for(let e=0;e<s;e++){let t=o[e].content?.json?.sourceId;typeof t==`number`&&t>c&&(c=t)}let l=new Map,u;if(c>0){let e=t.getSharedStates();u=e.get(`uniqueIdCounter`),u||(u=new Map,e.set(`uniqueIdCounter`,u)),u.set(i,Math.max(u.get(i)??1,c));let n=new Set;for(let e=0;e<s;e++){let t=o[e].content?.json?.sourceId;if(typeof t==`number`)if(n.has(t)){let t=u.get(i)+1;u.set(i,t),l.set(o[e],t)}else n.add(t)}}for(let e=0;e<s;e++){let s=o[e],c=a[e],u=s.content?.type;switch(n.start(`twoCellAnchor`,{editAs:s.anchorType||`twoCell`}),qt(n,`from`,s.anchor.tl),qt(n,`to`,s.anchor.br),u){case`picture`:await Ft(t,i,r,c,s);break;case`chart`:await It(t,i,r,c,s,l.get(s));break;case`shape`:await Bt(t,i,r,c,s,l.get(s));break;case`smartArt`:await Lt(t,i,r,c,s);break;case`slicer`:await Rt(t,i,r,c,s);break;case`graphicFrame`:await zt(t,i,r,c,s);break;default:await Q(t,i,r,c,s)}n.empty(`clientData`),n.end(`twoCellAnchor`)}n.end(`wsDr`),n.close()}},new class extends r{constructor(){super({kind:`legacyDrawing`,contentType:`application/vnd.openxmlformats-officedocument.vmlDrawing`,relTypeUri:`http://schemas.openxmlformats.org/officeDocument/2006/relationships/vmlDrawing`,path:`../drawings/vmlDrawing{n}.vml`})}async emit(e,t){let r=e.images,i=r?r.length:0;if(i>0){let e=t.getSharedStates().get(n);for(let n=0;n<i;n++){let i=r[n],a=e?.get(i.resId);if(a)try{await Jt(t,i.id,a)}catch(e){t.log(`Unable to write legacy drawing image '${i.id}'`,e)}else t.log(`Legacy drawing image '${i.id}' has no resource ${i.resId} and was not written.`)}}let a=t.getXMLWriter();a.setValidationDisabled(!0),a.raw(e.xml),a.close()}},new class extends r{constructor(){super({kind:`embeddedPart`,contentType:F,relTypeUri:``})}getContentType(e){return e?.contentType||F}getRelTypeUri(e){return e?.type??``}getPath(e){return`./${re(e.name)}`}async emit(e,t){await I(e,t);let n=t.getXMLWriter();n.setValidationDisabled(!0),n.raw(e.xml??``),n.close()}},new class extends r{constructor(){super({kind:`pivotTable`,contentType:ie,relTypeUri:`http://schemas.openxmlformats.org/officeDocument/2006/relationships/pivotTable`,path:`../pivotTables/pivotTable{n}.xml`})}getContentType(e){return e?.part?.contentType||ie}async emit(e,t){let n=e.part;await I(n,t);let r=ae(t,e.cacheId);if(!r||!t.addRelationship(`http://schemas.openxmlformats.org/officeDocument/2006/relationships/pivotCacheDefinition`,r))throw Error(`Pivot table '${n.name??``}' has no cache with id ${e.cacheId}.`);let i=t.getXMLWriter();i.setValidationDisabled(!0),i.raw(n.xml??``),i.close()}},new class extends r{constructor(){super({kind:`comments`,contentType:`application/vnd.openxmlformats-officedocument.spreadsheetml.comments+xml`,relTypeUri:`http://schemas.openxmlformats.org/officeDocument/2006/relationships/comments`,path:`../comments{n}.xml`})}async emit(e,t){let n=t.getXMLWriter();n.decl(),n.start(`comments`,{xmlns:`http://schemas.openxmlformats.org/spreadsheetml/2006/main`,"xmlns:mc":`http://schemas.openxmlformats.org/markup-compatibility/2006`,"mc:Ignorable":`xr`,"xmlns:xr":`http://schemas.microsoft.com/office/spreadsheetml/2014/revision`});let r=[],i=new Map,a=e=>{let t=i.get(e);return t===void 0&&(t=r.length,r.push(e),i.set(e,t)),t},o=e.comments,s=[];for(let e=0;e<o.length;e++){let{comment:t,ref:n}=o[e];t.isNote()?s.push({ref:n,authorId:a(t.getAuthor()?.getDisplayName()??``),content:t.getRichContent()??t.getContent()}):s.push({ref:n,authorId:a(`tc={${t.getId().toUpperCase()}}`),content:be(t)})}n.start(`authors`);for(let e=0;e<r.length;e++)n.start(`author`),n.text(r[e]),n.end(`author`);n.end(`authors`);let c=e.sheet.getStyles().getTheme();n.start(`commentList`);for(let e=0;e<s.length;e++){let t=s[e];n.start(`comment`,{ref:t.ref,authorId:t.authorId,shapeId:0}),n.start(`text`),xe(n,t.content,c),n.end(`text`),n.end(`comment`)}n.end(`commentList`),n.end(`comments`),n.close()}},new class extends r{constructor(){super({kind:`threadedComments`,contentType:`application/vnd.ms-excel.threadedcomments+xml`,relTypeUri:`http://schemas.microsoft.com/office/2017/10/relationships/threadedComment`,path:`../threadedComments/threadedComment{n}.xml`})}async emit(e,t){let n=t.getXMLWriter();n.decl(),n.start(`ThreadedComments`,{xmlns:`http://schemas.microsoft.com/office/spreadsheetml/2018/threadedcomments`,"xmlns:x":`http://schemas.openxmlformats.org/spreadsheetml/2006/main`});let r=e.comments;for(let e=0;e<r.length;e++){let{comment:t,ref:i}=r[e];if(t.isNote())continue;Xt(n,i,t.getId(),t.getAuthor()?.getId(),t.getCreationDate(),t.getContent(),null,t.isResolved(),t.toJSON()?.mentions);let a=t.getReplies();for(let e=0;e<a.length;e++){let r=a[e];Xt(n,i,r.getId(),r.getAuthor()?.getId(),r.getCreationDate(),r.getContent(),t.getId(),!1,r.toJSON().mentions)}}n.end(`ThreadedComments`),n.close()}},new class extends r{constructor(){super({kind:`persons`,contentType:`application/vnd.ms-excel.person+xml`,relTypeUri:`http://schemas.microsoft.com/office/2017/10/relationships/person`,path:`persons/person.xml`})}async emit(e,t){let n=t.getXMLWriter();n.decl(),n.start(`personList`,{xmlns:`http://schemas.microsoft.com/office/spreadsheetml/2018/threadedcomments`,"xmlns:x":`http://schemas.openxmlformats.org/spreadsheetml/2006/main`});let r=e.toArray();for(let e=0;e<r.length;e++){let t=r[e];n.empty(`person`,{displayName:t.getDisplayName(),id:$(t.getId()),userId:t.getUserId()??t.getDisplayName(),providerId:t.getProviderId()??`None`})}n.end(`personList`),n.close()}},new class extends r{constructor(){super({kind:`table`,contentType:`application/vnd.openxmlformats-officedocument.spreadsheetml.table+xml`,relTypeUri:`http://schemas.openxmlformats.org/officeDocument/2006/relationships/table`,path:`../tables/table{n}.xml`})}async emit(e,t){let n=t.getXMLWriter();n.decl();let r={xmlns:`http://schemas.openxmlformats.org/spreadsheetml/2006/main`,"xmlns:mc":`http://schemas.openxmlformats.org/markup-compatibility/2006`,"mc:Ignorable":`xr xr3`,"xmlns:xr":`http://schemas.microsoft.com/office/spreadsheetml/2014/revision`,"xmlns:xr3":`http://schemas.microsoft.com/office/spreadsheetml/2016/revision3`},i=e.json,a=e.model;a.isShowHeaders(),r.id=++Zt,r.name=i.name?.trim(),r.displayName=i.description??i.name,r.ref=e.ref,i.headerRowCount!==1&&(r.headerRowCount=i.headerRowCount),i.totalsRowCount!==0&&(r.totalsRowCount=i.totalsRowCount),i.totalsRowShown||a.isShowTotals()||(r.totalsRowShown=`0`),n.start(`table`,r),a.isShowHeaders()&&Je(t,n,a,i),Qt(t,n,a,i),en(t,n,a,i),n.end(`table`),n.close()}},new class extends r{constructor(){super({kind:`externalLink`,contentType:`application/vnd.openxmlformats-officedocument.spreadsheetml.externalLink+xml`,relTypeUri:`http://schemas.openxmlformats.org/officeDocument/2006/relationships/externalLink`,path:`../externalLinks/externalLink{n}.xml`})}async emit(e,t){let n=t.getXMLWriter(),r=e.sources??[],i=r.findIndex(e=>e.role===`book`);i<0&&r.length>0&&(i=0);let a=null,o=null;for(let e=0;e<r.length;e++){let n=r[e],s=t.addExternal(n.type||`http://schemas.openxmlformats.org/officeDocument/2006/relationships/externalLinkPath`,n.target).relId;e===i?a=s:n.role===`absoluteUrl`&&(o=s)}a||t.log(`External book has no path relationship; Excel cannot locate its source.`,e.sheetNames),n.decl();let s={xmlns:`http://schemas.openxmlformats.org/spreadsheetml/2006/main`};(e.mceIgnorable||o)&&(s[`xmlns:mc`]=`http://schemas.openxmlformats.org/markup-compatibility/2006`,s[`mc:Ignorable`]=`x14 xxl21`,s[`xmlns:x14`]=`http://schemas.microsoft.com/office/spreadsheetml/2009/9/main`,s[`xmlns:xxl21`]=`http://schemas.microsoft.com/office/spreadsheetml/2021/extlinks2021`),n.start(`externalLink`,s);let c={"xmlns:r":`http://schemas.openxmlformats.org/officeDocument/2006/relationships`};a&&(c[`r:id`]=a),n.start(`externalBook`,c),o&&(n.start(`xxl21:alternateUrls`),n.empty(`xxl21:absoluteUrl`,{"r:id":o}),n.end(`xxl21:alternateUrls`)),function(e,t){let n=t.sheetNames,r=n?n.length:0;if(r!==0){e.start(`sheetNames`);for(let t=0;t<r;t++)e.empty(`sheetName`,{val:n[t]});e.end(`sheetNames`)}}(n,e),function(e,t){let n=t.definedNames,r=n?n.length:0;if(r!==0){e.start(`definedNames`);for(let t=0;t<r;t++){let r=n[t],i={name:r.name,refersTo:r.refersTo};r.sheetIndex!==void 0&&(i.sheetId=``+r.sheetIndex),e.empty(`definedName`,i)}e.end(`definedNames`)}}(n,e),function(e,t){let n=t.sheetDataSet,r=n?n.length:0;if(r!==0){e.start(`sheetDataSet`);for(let t=0;t<r;t++){let r=n[t],i={sheetId:``+r.sheetIndex};r.refreshError&&(i.refreshError=`1`);let a=r.data,o=a?a.length:0;if(o!==0){e.start(`sheetData`,i);for(let t=0;t<o;t++){let[n,r]=a[t];e.start(`row`,{r:``+(n+1)});let i=r.length;for(let t=0;t<i;t++){let[i,a]=r[t],o=a.length;for(let t=0;t<o;t++)rn(e,n,i+t,a.at(t))}e.end(`row`)}e.end(`sheetData`)}else e.empty(`sheetData`,i)}e.end(`sheetDataSet`)}}(n,e),n.end(`externalBook`),n.end(`externalLink`),n.close()}},new class extends r{constructor(){super({kind:`chart`,contentType:`application/vnd.openxmlformats-officedocument.drawingml.chart+xml`,relTypeUri:`http://schemas.openxmlformats.org/officeDocument/2006/relationships/chart`,path:`../charts/chart{n}.xml`})}async emit(e,t){let n=t.getXMLWriter();n.decl(),n.pushDefaultNamespace(`c`),n.start(`chartSpace`,{"xmlns:c":`http://schemas.openxmlformats.org/drawingml/2006/chart`,"xmlns:a":`http://schemas.openxmlformats.org/drawingml/2006/main`,"xmlns:r":`http://schemas.openxmlformats.org/officeDocument/2006/relationships`,"xmlns:c16r2":`http://schemas.microsoft.com/office/drawing/2015/06/chart`}),n.empty(`date1904`,{val:`0`}),n.empty(`lang`,{val:`en-US`}),n.empty(`roundedCorners`,{val:`0`}),an(t,n,e.model,e.json),on(t,n,e.styles,e.model,e.json),sn(t,n,e.model,e.json),n.end(`chartSpace`),n.popDefaultNamespace(),n.close(),t.addPart(`chartStyle`,{styles:e.styles}),t.addPart(`chartColors`,{styles:e.styles})}},new class extends r{constructor(){super({kind:`chartStyle`,contentType:`application/vnd.ms-office.chartstyle+xml`,relTypeUri:`http://schemas.microsoft.com/office/2011/relationships/chartStyle`,path:`./style{n}.xml`})}async emit(e,t){let n=t.getXMLWriter();n.pushDefaultNamespace(`cs`),n.start(`chartStyle`,{"xmlns:cs":`http://schemas.microsoft.com/office/drawing/2012/chartStyle`,"xmlns:a":`http://schemas.openxmlformats.org/drawingml/2006/main`,id:`297`}),ln(t,n,un,e.styles),n.end(`chartStyle`),n.close()}},new class extends r{constructor(){super({kind:`chartColors`,contentType:`application/vnd.ms-office.chartcolorstyle+xml`,relTypeUri:`http://schemas.microsoft.com/office/2011/relationships/chartColorStyle`,path:`./colors{n}.xml`})}async emit(e,t){let n=t.getXMLWriter();n.pushDefaultNamespace(`cs`),n.start(`cs:colorStyle`,{"xmlns:cs":`http://schemas.microsoft.com/office/drawing/2012/chartStyle`,"xmlns:a":`http://schemas.openxmlformats.org/drawingml/2006/main`,meth:`cycle`,id:`10`}),n.empty(`a:schemeClr`,{val:`accent1`}),n.empty(`a:schemeClr`,{val:`accent2`}),n.empty(`a:schemeClr`,{val:`accent3`}),n.empty(`a:schemeClr`,{val:`accent4`}),n.empty(`a:schemeClr`,{val:`accent5`}),n.empty(`a:schemeClr`,{val:`accent6`}),dn(t,n,fn),n.end(`cs:colorStyle`),n.close()}}],mn=t=>{let n=t.getPart(`xl/_rels/workbook.xml.rels`);if(!n)return null;let r=new Map;for(let t of e.U(n.data)){if(!t.id)continue;let e=t.external?t.target:p(t.target.startsWith(`/`)?t.target:`xl/`+t.target);r.set(t.id,{type:t.type,target:e,external:t.external})}return r},hn=e=>{let t=e.getPart(`xl/workbook.xml`);return t?new TextDecoder(`utf-8`).decode(t.data):null},gn=e=>{let t=_n.get(e);if(t!==void 0)return t;let n=e.getPart(`xl/workbook.xml`),r=n?new TextDecoder(`utf-8`).decode(n.data):null;return _n.set(e,r),r},_n=new WeakMap,vn=1;exports.writeXLSX=async(t,r)=>{let a=new A;for(let e of pn)a.register(e);let o=vn,s=i.createUint8Array({lastModDate:new Date(1899,11,29,19,0,0),level:o}),c=r?.format===`Excel`||r?.format===`ExcelMacro`?e.N(t):null,l=new Map,u=c?(e=>{let t=e.getPart(`xl/workbook.xml`);if(!t)return null;let n=new TextDecoder(`utf-8`).decode(t.data.subarray(0,4096)).match(/<fileVersion\b([^>]*)\/?>/);if(!n)return null;let r={};for(let e of n[1].matchAll(/([\w:]+)="([^"]*)"/g))r[e[1]]=e[2];return Object.keys(r).length>0?r:null})(c):null;u&&(r?.macroEnabled||delete u.codeName,l.set(se,u));let d=c?(e=>{let t=gn(e)?.match(/<calcPr\b[^>]*?\bcalcId="([^"]*)"/);return t?t[1]:null})(c):null;d!==null&&l.set(`calcId`,d);let f=c?(e=>{let t=gn(e)?.match(/<ext\b[^>]*>\s*<xcalcf:calcFeatures\b[\s\S]*?<\/xcalcf:calcFeatures>\s*<\/ext>/);return t?t[0]:null})(c):null;f!==null&&l.set(`calcFeatures`,f);let p=c?(e=>{let t=hn(e);if(!t)return null;let n=/<externalReferences\b[^>]*>([\s\S]*?)<\/externalReferences>/.exec(t);if(!n)return null;let r=[...n[1].matchAll(/<externalReference\b[^>]*\sr:id="([^"]*)"/g)].map(e=>e[1]);if(r.length===0)return null;let i=mn(e);return i?r.map(e=>{let t=i.get(e);return t&&!t.external?t.target:null}):null})(c):null;p&&l.set(le,p);let m=c?(e=>{let t=hn(e),n=t?mn(e):null;if(!t||!n)return null;let r=new Map;for(let e of t.matchAll(/<sheet\b([^>]*)\/?>/g)){let t=/\bsheetId="(\d+)"/.exec(e[1])?.[1],i=/\br:id="([^"]*)"/.exec(e[1])?.[1];if(!t||!i)continue;let a=n.get(i);a&&!a.external&&a.type===`http://schemas.openxmlformats.org/officeDocument/2006/relationships/worksheet`&&r.set(parseInt(t,10),a.target)}return r.size>0?r:null})(c):null;m&&l.set(ce,m),l.set(n,new Map);let h=[],g=new k(s,a,{strictDuplicateChildren:!0,onPartEmitted:r?.onPartEmitted,onWarning:(e,t,n)=>{h.push([e,t,n])},mapState:l,sourcePackage:c,macroEnabled:r?.macroEnabled??!1});g.addPart(`workbook`,t,`/xl/workbook.xml`),await g.waitEmit(),g.addPart(`propsCore`,{}),g.addPart(`propsApp`,{model:t});let _=await g.build(),v=r?.progress?.onWarning;if(h.length&&v){let e=new Set;for(let[t,n,i]of h){let a=i??t;e.has(a)||(e.add(a),v.call(r.progress,t,n))}}return _.byteOffset===0&&_.byteLength===_.buffer.byteLength?_.buffer:_.slice().buffer};
|