@sheetxl/io-xlsx 0.8.0-beta.4 → 0.8.0-beta.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (38) hide show
  1. package/browser/cjs/{DtBN3UOzNJjYBwJ6.cjs → 17tMBnuyu4YIxixh.cjs} +1 -1
  2. package/browser/cjs/BxU-OlZIQViQl7gX.cjs +1 -0
  3. package/browser/cjs/DHKWtqZ0vQfXrbq1.cjs +2 -0
  4. package/browser/cjs/DpZr07y7ifaZGvJ9.cjs +5 -0
  5. package/browser/cjs/{DULsYP_GcPGLVYSE.cjs → MqKQ_B5qRARrRbO4.cjs} +16 -3
  6. package/browser/cjs/index.cjs +1 -1
  7. package/browser/cjs/{D50I1kjDGjKtdscP.cjs → qb-YQ8mGwpogSP08.cjs} +1 -1
  8. package/browser/esm/{DcyhtW-b0Qc61fSF.mjs → 96C1ntelYWh7kQtW.mjs} +1 -1
  9. package/browser/esm/{CScanThyP_Zsuop7.mjs → B0E-_6m23g4BDnX6.mjs} +2 -2
  10. package/browser/esm/{DAH4QJQjfQWROftE.mjs → B3cYXnqV2Zjaw6Jp.mjs} +4 -4
  11. package/browser/esm/{P7pcaTdFuHdaP8Kr.mjs → BLEHoDT0SLbo8OO2.mjs} +1236 -1150
  12. package/browser/esm/{DvdG4L2_fIWYsiBZ.mjs → BYENv_UE3Hv5ghGD.mjs} +599 -597
  13. package/browser/esm/{Bt6u8hf00JM6h1Bc.mjs → CGgjL7wM5WHZA6Dt.mjs} +2 -2
  14. package/browser/esm/{Da9idUIQdRehyj4z.mjs → D01fs7vrCLlmdHoW.mjs} +899 -795
  15. package/browser/esm/{BEt-Vea7AfSKkqyd.mjs → DdTgGiFy8nAZTQ0d.mjs} +2 -2
  16. package/browser/esm/{DnPeZEWNe3KK1iBE.mjs → FwrsLfi1iEAQGIjj.mjs} +246 -154
  17. package/browser/esm/{Cu9aJ-sbk2TGdPvz.mjs → gicSNvWtBLkvLsIw.mjs} +3 -3
  18. package/browser/esm/index.mjs +2 -2
  19. package/browser/esm/{Cts9z7LQzph22lHy.mjs → k-aEFzUZ8aU9FPf4.mjs} +1 -1
  20. package/node/esm/{Bavd2-tTgTN4_ZH1.mjs → B-g20MoPHbZFapp8.mjs} +1652 -1545
  21. package/node/esm/{tB6NSRNVVsqPxD_r.mjs → Bu9QkKpBW4G2ULAg.mjs} +177 -83
  22. package/node/esm/{BAJ6Fs6QF59doAxx.mjs → CHl-WFsto0oTmBtB.mjs} +380 -288
  23. package/node/esm/{B1b4DNt8_H2KX57m.mjs → Co5_sjvEk9d-x9gx.mjs} +576 -574
  24. package/node/esm/{BBIL2I6FEUYTjeLE.mjs → D-l0hqYTXUIEFoTg.mjs} +2 -2
  25. package/node/esm/{BkLZKUzDOysb70y8.mjs → DWF_5NYPdrlTVvHi.mjs} +1 -1
  26. package/node/esm/{TxGIt5Le6PspY1cY.mjs → ZWSOYqmTKEmEOz2u.mjs} +2 -2
  27. package/node/esm/{BwAH8Xl-b1anYXZ1.mjs → am47EU_k1uSVm7yW.mjs} +2 -2
  28. package/node/esm/index.mjs +4 -4
  29. package/package.json +3 -3
  30. package/types/src/reader/domVisitors/CommentVisitor.d.ts +7 -2
  31. package/types/src/reader/domVisitors/DrawingElementVisitor.d.ts +4 -0
  32. package/types/src/reader/domVisitors/ThreadedCommentVisitor.d.ts +9 -0
  33. package/types/src/utils/VmlNoteShapes.d.ts +82 -22
  34. package/types/src/writer/emitters/CommentsEmitter.d.ts +9 -3
  35. package/types/src/writer/emitters/ThreadedCommentsEmitter.d.ts +7 -1
  36. package/browser/cjs/C8oC1tPbhgR0Dqtx.cjs +0 -2
  37. package/browser/cjs/Dlmxsx4kOACcqvc3.cjs +0 -5
  38. package/browser/cjs/sNZR19Wk-XQ2xZ9E.cjs +0 -1
@@ -1 +1 @@
1
- const e=require("./B7_pDFYCVzt-3hUs.cjs"),t=require("./DULsYP_GcPGLVYSE.cjs");let n=require("@sheetxl/utils"),r=require("@sheetxl/sdk");var i=(e,t,n)=>{let r=`Unable to read '${e}': ${t?.message??t}`;n?.onWarning?n.onWarning(r,e):console.warn(r)},a=(e,t,n,r=null)=>{if(!e)return null;let a=e;a.startsWith(`/`)&&(a=a.substring(1));let o=r?.parsedRefs?.get(e);if(o!==void 0)return o;let s=t(a);if(!s)return null;let c=s.content;try{n&&(c=n(c,e))}catch(t){i(e,t,r)}return r?.parsedRefs?.set(e,c),c},o=(e,t,r,a,o=null)=>{if(!e)return null;let s=e;s.startsWith(`/`)&&(s=s.substring(1));let c=o?.parsedRefs?.get(e);if(c!==void 0)return c;let l=t(s);if(!l)return null;let u=l.content;try{let t=new TextDecoder().decode(u),i=r.parseFromString(t,`text/xml`),s=a.transform(i,e,o??n.CommonUtils.EmptyObject);return o?.parsedRefs?.set(e,s),s}catch(t){i(e,t,o)}return null},s=(e,t,n,r,i=null)=>{if(!e)return null;let a=o(e,t,n,r,i);if(!a)return null;let s=new Map,c=Object.keys(a),l=c.length;for(let e=0;e<l;e++){let t=c[e],n=a[t];s.set(t,n)}return s},c=(e,t,n,r,i,a=null)=>{let s=new Map,c=t[e],l=c?c.length:0;for(let e=0;e<l;e++){let t=c[e];if(!t)continue;let l=t;l.startsWith(`/`)&&(l=l.substring(1));let u=o(l,n,r,i,a);s.set(l,u)}return s},l=e=>{let t=e.split(/\/+/);return t.reduce((e,t,n)=>(t===`.`?e.splice(n,1):t===`..`&&e.splice(n-1,2),e),t).join(`/`)},u=Object.freeze([`lt1`,`dk1`,`lt2`,`dk2`,`accent1`,`accent2`,`accent3`,`accent4`,`accent5`,`accent6`,`hlink`,`folHlink`]),d=(e,t=`auto`)=>{let n,i=e(`auto`);i===void 0||i!==`1`&&i!==`true`||(n=t);let a=e(`indexed`);a&&(n=a===`64`?`auto`:`index${a}`);let o=e(`rgb`);o&&(n=o.toLowerCase(),o.length!==8||o.startsWith(`FF`)||(n=`FF`+o.substring(2,o.length)));let s=e(`theme`);s&&(n=u[Number(s)]);let c=e(`tint`);if(c&&(n+=` ${r.IColor.AdjustmentType.ETint} ${parseFloat(c)}`),n)return n},f=e=>e&&e.replace(/^\{([\s\S]+)\}$/,`$1`),p=e.n({EMU_PER_PIXEL:()=>h,EMU_PER_POINT:()=>m,fixedPointToDouble:()=>v,parseAngle:()=>b,parseAsBoolean:()=>x,parsePercentage:()=>y,toPixels:()=>_,toPoints:()=>g}),m=12700,h=9525,g=e=>e?n.CommonUtils.roundAccurately(parseFloat(e)/m,4):null,_=e=>e?n.CommonUtils.roundAccurately(parseFloat(e)/h,1):null,v=e=>(e>>16)+(65535&e)/65536,y=e=>parseFloat(e)/1e3,b=e=>parseFloat(e)/6e4,x=e=>e===`true`||e===`1`,S=e=>(Array.isArray(e)?e[1]:e?.v)?.s,C=e=>{if(!e||e.length===0)return!1;let n=r.AddressUtils.refsToRuns(e,!0),i=0;for(let e of n){if(e.min>i||e.value?.s===void 0)return!1;i=Math.max(i,e.max+1)}return i>t.t},w=(e,t)=>{e.protection={...e.protection,showFormulas:t}},T=(e,t)=>{if(!t||t.size===0)return;let n=e.styles;if(!n)return;let i=new Set,a=new Set;for(let n of e.sheets??[]){let e=n?.sheet;if(!e)continue;let r=new Set;C(e.cols)||r.add(0);for(let t of e.directStyles??[])r.add(Array.isArray(t)?t[1]:t.v);for(let t of e.rows??[]){let e=S(t);e!==void 0&&r.add(e)}for(let t of e.cols??[]){let e=S(t);e!==void 0&&r.add(e)}let o=!1;for(let e of r)if(t.has(e)){o=!0;break}if(o){e.protection={...e.protection??{sheet:!0},showFormulas:!1};for(let e of r)(t.has(e)?a:i).add(e)}}if(i.size===0)return;let o=n.direct??=[];for(let e of i)e!==0&&w(o[e]??(o[e]={}),!0);for(let e of a)e!==0&&w(o[e]??(o[e]={}),!1);if(i.has(0)){let e=n.named??=[],t=r.IStyle.BuiltInName.Normal.toLowerCase(),i=e.find(e=>e.name?.toLowerCase()===t);i||(i={name:r.IStyle.BuiltInName.Normal,style:{}},e.push(i)),w(i.style,!0)}};Object.defineProperty(exports,"a",{enumerable:!0,get:function(){return x}}),Object.defineProperty(exports,"c",{enumerable:!0,get:function(){return g}}),Object.defineProperty(exports,"d",{enumerable:!0,get:function(){return o}}),Object.defineProperty(exports,"f",{enumerable:!0,get:function(){return c}}),Object.defineProperty(exports,"h",{enumerable:!0,get:function(){return l}}),Object.defineProperty(exports,"i",{enumerable:!0,get:function(){return b}}),Object.defineProperty(exports,"l",{enumerable:!0,get:function(){return s}}),Object.defineProperty(exports,"m",{enumerable:!0,get:function(){return f}}),Object.defineProperty(exports,"n",{enumerable:!0,get:function(){return T}}),Object.defineProperty(exports,"o",{enumerable:!0,get:function(){return y}}),Object.defineProperty(exports,"p",{enumerable:!0,get:function(){return d}}),Object.defineProperty(exports,"r",{enumerable:!0,get:function(){return p}}),Object.defineProperty(exports,"s",{enumerable:!0,get:function(){return _}}),Object.defineProperty(exports,"t",{enumerable:!0,get:function(){return`hiddenXfs`}}),Object.defineProperty(exports,"u",{enumerable:!0,get:function(){return a}});
1
+ const e=require("./B7_pDFYCVzt-3hUs.cjs"),t=require("./MqKQ_B5qRARrRbO4.cjs");let n=require("@sheetxl/utils"),r=require("@sheetxl/sdk");var i=(e,t,n)=>{let r=`Unable to read '${e}': ${t?.message??t}`;n?.onWarning?n.onWarning(r,e):console.warn(r)},a=(e,t,n,r=null)=>{if(!e)return null;let a=e;a.startsWith(`/`)&&(a=a.substring(1));let o=r?.parsedRefs?.get(e);if(o!==void 0)return o;let s=t(a);if(!s)return null;let c=s.content;try{n&&(c=n(c,e))}catch(t){i(e,t,r)}return r?.parsedRefs?.set(e,c),c},o=(e,t,r,a,o=null)=>{if(!e)return null;let s=e;s.startsWith(`/`)&&(s=s.substring(1));let c=o?.parsedRefs?.get(e);if(c!==void 0)return c;let l=t(s);if(!l)return null;let u=l.content;try{let t=new TextDecoder().decode(u),i=r.parseFromString(t,`text/xml`),s=a.transform(i,e,o??n.CommonUtils.EmptyObject);return o?.parsedRefs?.set(e,s),s}catch(t){i(e,t,o)}return null},s=(e,t,n,r,i=null)=>{if(!e)return null;let a=o(e,t,n,r,i);if(!a)return null;let s=new Map,c=Object.keys(a),l=c.length;for(let e=0;e<l;e++){let t=c[e],n=a[t];s.set(t,n)}return s},c=(e,t,n,r,i,a=null)=>{let s=new Map,c=t[e],l=c?c.length:0;for(let e=0;e<l;e++){let t=c[e];if(!t)continue;let l=t;l.startsWith(`/`)&&(l=l.substring(1));let u=o(l,n,r,i,a);s.set(l,u)}return s},l=e=>{let t=e.split(/\/+/);return t.reduce((e,t,n)=>(t===`.`?e.splice(n,1):t===`..`&&e.splice(n-1,2),e),t).join(`/`)},u=Object.freeze([`lt1`,`dk1`,`lt2`,`dk2`,`accent1`,`accent2`,`accent3`,`accent4`,`accent5`,`accent6`,`hlink`,`folHlink`]),d=(e,t=`auto`)=>{let n,i=e(`auto`);i===void 0||i!==`1`&&i!==`true`||(n=t);let a=e(`indexed`);a&&(n=a===`64`?`auto`:`index${a}`);let o=e(`rgb`);o&&(n=o.toLowerCase(),o.length!==8||o.startsWith(`FF`)||(n=`FF`+o.substring(2,o.length)));let s=e(`theme`);s&&(n=u[Number(s)]);let c=e(`tint`);if(c&&(n+=` ${r.IColor.AdjustmentType.ETint} ${parseFloat(c)}`),n)return n},f=e=>e&&e.replace(/^\{([\s\S]+)\}$/,`$1`),p=e.n({EMU_PER_PIXEL:()=>h,EMU_PER_POINT:()=>m,fixedPointToDouble:()=>v,parseAngle:()=>b,parseAsBoolean:()=>x,parsePercentage:()=>y,toPixels:()=>_,toPoints:()=>g}),m=12700,h=9525,g=e=>e?n.CommonUtils.roundAccurately(parseFloat(e)/m,4):null,_=e=>e?n.CommonUtils.roundAccurately(parseFloat(e)/h,1):null,v=e=>(e>>16)+(65535&e)/65536,y=e=>parseFloat(e)/1e3,b=e=>parseFloat(e)/6e4,x=e=>e===`true`||e===`1`,S=e=>(Array.isArray(e)?e[1]:e?.v)?.s,C=e=>{if(!e||e.length===0)return!1;let n=r.AddressUtils.refsToRuns(e,!0),i=0;for(let e of n){if(e.min>i||e.value?.s===void 0)return!1;i=Math.max(i,e.max+1)}return i>t.t},w=(e,t)=>{e.protection={...e.protection,showFormulas:t}},T=(e,t)=>{if(!t||t.size===0)return;let n=e.styles;if(!n)return;let i=new Set,a=new Set;for(let n of e.sheets??[]){let e=n?.sheet;if(!e)continue;let r=new Set;C(e.cols)||r.add(0);for(let t of e.directStyles??[])r.add(Array.isArray(t)?t[1]:t.v);for(let t of e.rows??[]){let e=S(t);e!==void 0&&r.add(e)}for(let t of e.cols??[]){let e=S(t);e!==void 0&&r.add(e)}let o=!1;for(let e of r)if(t.has(e)){o=!0;break}if(o){e.protection={...e.protection??{sheet:!0},showFormulas:!1};for(let e of r)(t.has(e)?a:i).add(e)}}if(i.size===0)return;let o=n.direct??=[];for(let e of i)e!==0&&w(o[e]??(o[e]={}),!0);for(let e of a)e!==0&&w(o[e]??(o[e]={}),!1);if(i.has(0)){let e=n.named??=[],t=r.IStyle.BuiltInName.Normal.toLowerCase(),i=e.find(e=>e.name?.toLowerCase()===t);i||(i={name:r.IStyle.BuiltInName.Normal,style:{}},e.push(i)),w(i.style,!0)}};Object.defineProperty(exports,"a",{enumerable:!0,get:function(){return x}}),Object.defineProperty(exports,"c",{enumerable:!0,get:function(){return g}}),Object.defineProperty(exports,"d",{enumerable:!0,get:function(){return o}}),Object.defineProperty(exports,"f",{enumerable:!0,get:function(){return c}}),Object.defineProperty(exports,"h",{enumerable:!0,get:function(){return l}}),Object.defineProperty(exports,"i",{enumerable:!0,get:function(){return b}}),Object.defineProperty(exports,"l",{enumerable:!0,get:function(){return s}}),Object.defineProperty(exports,"m",{enumerable:!0,get:function(){return f}}),Object.defineProperty(exports,"n",{enumerable:!0,get:function(){return T}}),Object.defineProperty(exports,"o",{enumerable:!0,get:function(){return y}}),Object.defineProperty(exports,"p",{enumerable:!0,get:function(){return d}}),Object.defineProperty(exports,"r",{enumerable:!0,get:function(){return p}}),Object.defineProperty(exports,"s",{enumerable:!0,get:function(){return _}}),Object.defineProperty(exports,"t",{enumerable:!0,get:function(){return`hiddenXfs`}}),Object.defineProperty(exports,"u",{enumerable:!0,get:function(){return a}});
@@ -0,0 +1 @@
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=class{constructor(e){this.list=e}get length(){return this.list.length}item(e){return this.list[e]}forEach(e,t){let n=this.list,r=n.length;for(let t=0;t<r;t++)e(n[t],t,this)}entries(){return this.list.entries()}keys(){return this.list.keys()}values(){return this.list.values()}[Symbol.iterator](){return this.list.values()}},o=e=>!0===e||e===`1`||e===`on`||e===`true`||!1!==e&&e!==`0`&&e!==`off`&&e!==`false`&&null,s=e=>{let t=parseInt(e);return isNaN(t)?null:t},c=e=>{let t=parseFloat(e);return isNaN(t)?null:t},l=new Map,u=class{constructor(e,t,n,i,a,o=null,s=r.CommonUtils.EmptyObject){this._fileLocation=``;let c=(e,t,n)=>s?.getRef?.(e,t,n,s?.parsedRefs),l=e=>s?.getRefs?.(e,s?.parsedRefs);this._parent=e,this.sharedShared=t,this.currentPath=n,this.elemRoot=i,this.jsonRoot=a,e?(this._fileLocation=e._fileLocation,this._getRef=e._getRef,this._getRefs=e._getRefs,this._serializeElement=e._serializeElement,this._readEmbeddedPart=e._readEmbeddedPart):(o&&(this._fileLocation=o),s?.getRef&&(this._getRef=c),s?.getRefs&&(this._getRefs=l),this._onWarning=s?.onWarning,this._addPerson=s?.addPerson,this._serializeElement=s?.serializeElement,this._readEmbeddedPart=s?.readEmbeddedPart)}getRef(e,t=!1){return this._getRef?.(e,this._fileLocation,t)??null}readEmbeddedPart(e){return this._readEmbeddedPart?.(e,this._fileLocation)??null}getRelationships(){return this._getRefs?.(this._fileLocation)??l}getPath(){return this.currentPath}getFileLocation(){return this._fileLocation}getElemRoot(){return this.elemRoot}getJsonRoot(){return this.jsonRoot}warn(e,t){this._raiseWarning(e,this.getFileLocation(),t?.onceKey)}_raiseWarning(e,t,n){this._onWarning?this._onWarning(e,t,n):this._parent?this._parent._raiseWarning(e,t,n):console.warn(e)}serializeElement(e){return this._serializeElement?.(e)??null}addPerson(e){return typeof e==`string`&&(e={displayName:e}),this._addPerson?this._addPerson(e):this._parent?this._parent?._addPerson?.(e)??null:null}getVisitorParamsState(){return this.sharedShared.getVisitorParamsState()}evaluate(e,t){if(!e)return t;let n=[t],r=e.split(`/`),i=r.length;for(let e=0;e<i;e++){let t=r[e];if(t===``||t===`.`)continue;let a=[],o=(t===`*`||t===`**`)&&e!==i-1;for(let i of n)if(i)if(o){let t=r[e+1];t&&t!==``&&t!==`.`&&(this._findDescendants(i,t,a),e++)}else if(t===`*`||t===`**`){if(!i.childNodes)continue;let e=i.childNodes,t=e.length;for(let n=0;n<t;n++){let t=e[n];t.nodeType===1&&a.push(t)}}else{if(!i.childNodes)continue;let e=i.childNodes,n=e.length;for(let r=0;r<n;r++){let n=e[r];if(n.nodeType!==1)continue;let i=n;this._matchesElementName(i,t)&&a.push(i)}}if(n=a,n.length===0)return null}return n.length===1?n[0]:n.length===0?null:new a(n)}_matchesElementName(e,t){return t.includes(`:`)?(e.tagName||e.nodeName)===t:e.localName===t}_findDescendants(e,t,n){if(!e||!e.childNodes)return;let r=e.childNodes,i=r.length;for(let e=0;e<i;e++){let i=r[e];if(i.nodeType!==1)continue;let a=i;this._matchesElementName(a,t)&&n.push(a),this._findDescendants(a,t,n)}}getFromPath(e,t){return r.CommonUtils.getFromPath(e,t)}setToPath(e,t,n){return r.CommonUtils.setToPath(e,t,n)}getValAttrAsString(e,t){let n=this.evaluate(e,t);return n&&n.hasAttribute(`val`)?n.getAttribute(`val`)??null:null}getValAttrAsBoolean(e,t,n=!1){let r=this.evaluate(e,t);if(!r)return null;let i=r.hasAttribute(`val`)?r.getAttribute(`val`):void 0;return i==null?n:i===`1`||i===`on`||i===`true`||i!==`0`&&i!==`off`&&i!==`false`&&n}getValAttrAsInteger(e,t){let n=this.evaluate(e,t);return n&&n.hasAttribute(`val`)?parseInt(n.getAttribute(`val`))??null:null}getValAttrAsFloat(e,t){let n=this.evaluate(e,t);return n&&n.hasAttribute(`val`)?parseFloat(n.getAttribute(`val`))??null:null}get BOOLEAN_COPY(){return o}get INT_COPY(){return s}get FLOAT_COPY(){return c}copyFromAttribute(e,t,n,r=t,i=null){if(!e||!n||!e.hasAttribute(t))return;let a=e.getAttribute(t);if(i){if(Array.isArray(i)){let e=i.length;for(let t=0;t<e;t++)if(a==null||(a=i[t](a),a==null))return}else if(a==null||(a=i(a),a==null))return}this.setToPath(n,r,a)}},d=e.n({isBlank:()=>_,isNotBlank:()=>v,length:()=>y,parseRotation:()=>f,parseValAttrAsBoolean:()=>m,parseValAttrAsFloat:()=>g,parseValAttrAsInteger:()=>h,parseValAttrAsString:()=>p}),f=(e,t)=>{if(!e||!e.hasAttribute(`rot`))return;let i=e.getAttribute(`rot`),a=r.CommonUtils.roundAccurately(n.i(i),2);a!==-1e3&&(t.rotation=a)},p=(e,t,n,r,i)=>{let a=e.getValAttrAsString(r,t);a!==null&&(n[i]=a)},m=(e,t,n,r,i=r,a=null)=>{let o=e.getValAttrAsBoolean(r,t,a);o!==null&&(n[i]=o)},h=(e,t,n,r,i)=>{let a=e.getValAttrAsInteger(r,t);a!==null&&(n[i]=a)},g=(e,t,n,r,i,a=1)=>{let o=e.getValAttrAsFloat(r,t);o!==null&&(n[i]=o*a)},_=e=>!e||e.trim().length===0,v=e=>!_(e),y=e=>e?.length??0,b=class{constructor(e){this.jsonKey=e}visit(e,t,n){let r={};return n[this.jsonKey]=r,r}},x=class{visit(e,t,n){}getStroke(e,t){let n=e.evaluate(`ln`,t);return n?this.parseLn(e,n):{}}parseLn(e,t){let r={};t.hasAttribute(`algn`)&&(r.align=t.getAttribute(`algn`)),t.hasAttribute(`cap`)&&(r.lineCap=C(t.getAttribute(`cap`))),t.hasAttribute(`cmpd`)&&(r.compound=t.getAttribute(`cmpd`)),t.hasAttribute(`w`)&&(r.width=n.c(t.getAttribute(`w`)));let i=e.evaluate(`miter`,t);i&&(r.lineJoin=`miter`,i.hasAttribute(`lim`)&&(r.miterLimit=parseFloat(i.getAttribute(`lim`))/1e5)),e.evaluate(`bevel`,t)&&(r.lineJoin=`bevel`),e.evaluate(`round`,t)&&(r.lineJoin=`round`);let a=e.evaluate(`custDash`,t);if(a){let t=e.evaluate(`ds`,a);if(t&&t.length>0){let e=[];for(let r=0;r<t.length;r++){let i=t.item(r);e.push(n.o(i.getAttribute(`d`)??``)),e.push(n.o(i.getAttribute(`sp`)??``))}r.dash=e}}let o=e.evaluate(`prstDash`,t);o&&o.hasAttribute(`val`)&&(r.dash=o.getAttribute(`val`)),this.parseEndElement(e,t,r,`headEnd`,`head`),this.parseEndElement(e,t,r,`tailEnd`,`tail`);let s=this.getFill(e,t);return s&&(r.fill=s),r}parseEndElement(e,t,n,r,i){let a=e.evaluate(r,t);if(a&&(a.hasAttribute(`type`)&&(n[i+`Type`]=a.getAttribute(`type`)),a.hasAttribute(`len`)||a.hasAttribute(`w`))){let e=a.getAttribute(`len`)||`med`,t=a.getAttribute(`w`)||`med`;n[i+`Size`]=e+`-`+t}}getEffects(e,t){let n=e.evaluate(`effectLst`,t);if(!n)return null;let r=[],i=n.childNodes,a=i.length;for(let t=0;t<a;t++){let n=i.item(t);if(n.nodeType!==1)continue;let a=this.processEffectElement(e,n,n.localName);if(a===void 0)return;r.push(a)}return r}processEffectElement(e,t,r){switch(r){case`outerShdw`:{let r={type:i.IEffect.Type.OuterShadow,color:this.processAdjColor(e,t)};return t.hasAttribute(`dist`)&&(r.distance=n.c(t.getAttribute(`dist`))),t.hasAttribute(`dir`)&&(r.angle=n.i(t.getAttribute(`dir`))),t.hasAttribute(`blurRad`)&&(r.blur=n.c(t.getAttribute(`blurRad`))),t.hasAttribute(`algn`)&&(r.alignment=t.getAttribute(`algn`)),t.hasAttribute(`rotWithShape`)&&(r.isRotatedWithShape=n.a(t.getAttribute(`rotWithShape`))),t.hasAttribute(`sx`)&&(r.scaleX=n.o(t.getAttribute(`sx`))),t.hasAttribute(`sy`)&&(r.scaleY=n.o(t.getAttribute(`sy`))),t.hasAttribute(`kx`)&&(r.skewX=n.i(t.getAttribute(`kx`))),t.hasAttribute(`ky`)&&(r.skewY=n.i(t.getAttribute(`ky`))),r}case`innerShdw`:{let r={type:i.IEffect.Type.InnerShadow,color:this.processAdjColor(e,t)};return t.hasAttribute(`dist`)&&(r.distance=n.c(t.getAttribute(`dist`))),t.hasAttribute(`dir`)&&(r.angle=n.i(t.getAttribute(`dir`))),t.hasAttribute(`blurRad`)&&(r.blur=n.c(t.getAttribute(`blurRad`))),r}case`prstShdw`:{let r={type:i.IEffect.Type.PresetShadow,color:this.processAdjColor(e,t),preset:t.getAttribute(`prst`)??void 0};return t.hasAttribute(`dist`)&&(r.distance=n.c(t.getAttribute(`dist`))),t.hasAttribute(`dir`)&&(r.angle=n.i(t.getAttribute(`dir`))),r}case`glow`:{let r={type:i.IEffect.Type.Glow,color:this.processAdjColor(e,t)};return t.hasAttribute(`rad`)&&(r.radius=n.c(t.getAttribute(`rad`))),r}case`softEdge`:{let e={type:i.IEffect.Type.SoftEdge};return t.hasAttribute(`rad`)&&(e.radius=n.c(t.getAttribute(`rad`))),e}case`reflection`:{let e={type:i.IEffect.Type.Reflection};return t.hasAttribute(`blurRad`)&&(e.blur=n.c(t.getAttribute(`blurRad`))),t.hasAttribute(`dist`)&&(e.distance=n.c(t.getAttribute(`dist`))),t.hasAttribute(`dir`)&&(e.angle=n.i(t.getAttribute(`dir`))),t.hasAttribute(`fadeDir`)&&(e.fadeAngle=n.i(t.getAttribute(`fadeDir`))),t.hasAttribute(`stA`)&&(e.startAlpha=n.o(t.getAttribute(`stA`))),t.hasAttribute(`stPos`)&&(e.startPosition=n.o(t.getAttribute(`stPos`))),t.hasAttribute(`endA`)&&(e.endAlpha=n.o(t.getAttribute(`endA`))),t.hasAttribute(`endPos`)&&(e.endPosition=n.o(t.getAttribute(`endPos`))),t.hasAttribute(`sx`)&&(e.scaleX=n.o(t.getAttribute(`sx`))),t.hasAttribute(`sy`)&&(e.scaleY=n.o(t.getAttribute(`sy`))),t.hasAttribute(`kx`)&&(e.skewX=n.i(t.getAttribute(`kx`))),t.hasAttribute(`ky`)&&(e.skewY=n.i(t.getAttribute(`ky`))),t.hasAttribute(`algn`)&&(e.alignment=t.getAttribute(`algn`)),t.hasAttribute(`rotWithShape`)&&(e.isRotatedWithShape=n.a(t.getAttribute(`rotWithShape`))),e}default:return}}getFill(e,t){if(e.evaluate(`noFill`,t))return{type:i.IFill.Type.None};let n=e.evaluate(`solidFill`,t);if(n){let t=this.processAdjColor(e,n);if(t)return{type:i.IFill.Type.Solid,color:t}}let r=e.evaluate(`gradFill`,t);if(r)return this.processGradFill(e,r);let a=e.evaluate(`pattFill`,t);if(a)return this.processPatternFill(e,a);let o=e.evaluate(`blipFill`,t);return o?this.processImageFill(e,o):null}processGradFill(e,t){let r={type:i.IFill.Type.Gradient};t.hasAttribute(`rotWithShape`)&&(r.isRotatedWithShape=t.getAttribute(`rotWithShape`)===`1`);let a=e.evaluate(`lin`,t);a&&(r.gradientType=i.IFill.GradientType.Linear,a.hasAttribute(`ang`)&&(r.angle=n.i(a.getAttribute(`ang`))),a.hasAttribute(`scaled`)&&(r.scaled=n.a(a.getAttribute(`scaled`))));let o={};t.hasAttribute(`flip`)&&(o.mirror=t.getAttribute(`flip`)),Object.keys(o).length>0&&(r.tile=o);let s=e.evaluate(`path`,t);if(s){s.hasAttribute(`path`)&&(r.gradientType=S(s.getAttribute(`path`)));let t=e.evaluate(`fillToRect`,s);t&&(r.focus=this.getRect(t))}let c=e.evaluate(`tileRect`,t);c&&(r.tile||={},r.tile.bounds=this.getRect(c));let l=[],u=e.evaluate(`gsLst/gs`,t),d=u?u.length:0;for(let t=0;t<d;t++){let r=u.item(t),i={offset:n.o(r.getAttribute(`pos`)??``),color:this.processAdjColor(e,r)};l.push(i)}return l.length>0&&(r.stops=l),r}getRect(e){let t={};return e.hasAttribute(`t`)&&(t.t=n.o(e.getAttribute(`t`))),e.hasAttribute(`l`)&&(t.l=n.o(e.getAttribute(`l`))),e.hasAttribute(`b`)&&(t.b=n.o(e.getAttribute(`b`))),e.hasAttribute(`r`)&&(t.r=n.o(e.getAttribute(`r`))),Object.keys(t).length===0?null:t}processImageFill(e,t){let r={type:i.IFill.Type.Image};return t.hasAttribute(`rotWithShape`)&&(r.isRotatedWithShape=n.a(t.getAttribute(`rotWithShape`))),t.hasAttribute(`dpi`)&&(r.dpi=t.getAttribute(`dpi`)),r.ref=`https://www.sheetxl.com/logo-color-padded-white.jpg`,r.tile=!1,r}processPatternFill(e,t){let n={type:i.IFill.Type.Pattern};n.patternType=t.getAttribute(`prst`);let r=e.evaluate(`bgClr`,t);if(r){let t=this.processAdjColor(e,r);t&&(n.background=t)}let a=e.evaluate(`fgClr`,t);if(a){let t=this.processAdjColor(e,a);t&&(n.foreground=t)}return n}processAdjColor(e,t){let n=e.evaluate(`hslClr`,t);if(n)return this.processHslClr(e,n);let r=e.evaluate(`prstClr`,t);if(r)return this.processClrWithValAttribute(e,r);let i=e.evaluate(`schemeClr`,t);if(i)return this.processClrWithValAttribute(e,i);let a=e.evaluate(`sysClr`,t);if(a){let t=this.processClrWithValAttribute(e,a),n=a.getAttribute(`lastClr`);return t&&n&&(t+=` lastClr ${n}`),t}let o=e.evaluate(`scrgbClr`,t);if(o)return this.processScrgbClrElement(e,o);let s=e.evaluate(`srgbClr`,t);return s?this.processSrgbClrElement(e,s):null}processScrgbClrElement(e,t){let r=`lrgba(`+n.o(t.getAttribute(`r`)??``)+`,`+n.o(t.getAttribute(`g`)??``)+`,`+n.o(t.getAttribute(`b`)??``)+`)`;return r+=this.processAdjustments(e,t),r}processSrgbClrElement(e,t){let n=t.getAttribute(`val`);return n+=this.processAdjustments(e,t),n}processHslClr(e,t){let r=`hsl(`+n.i(t.getAttribute(`hue`)??``)+`,`+n.o(t.getAttribute(`sat`)??``)+`,`+n.o(t.getAttribute(`lum`)??``)+`)`;return r+=this.processAdjustments(e,t),r}processClrWithValAttribute(e,t){let n=t.getAttribute(`val`);if(!n)return null;let r=n;return r+=this.processAdjustments(e,t),r}processAdjustments(e,t){let n=``,r=t.childNodes,i=r.length;for(let t=0;t<i;t++){let i=r.item(t);if(i.nodeType===1){let t=i.localName;n+=t===`hue`||t===`hueOff`||t===`hueMod`?this.processAdjustmentElement(e,i,t,6e4):t===`gray`||t===`comp`||t===`inv`||t===`gamma`||t===`invGamma`?this.processAdjustmentElement(e,i,t,1):t===`alpha`||t===`alphaOff`||t===`alphaMod`?this.processAdjustmentElement(e,i,t,1e5):this.processAdjustmentElement(e,i,t)}}return n}processAdjustmentElement(e,t,n,r=1e3){let i=t.getAttribute(`val`);return i?` ${n} ${!i||parseFloat(i)/r}`:` ${n}`}},S=e=>e===`circle`?`radial`:e,C=e=>{if(e===`rnd`)return`round`;if(e===`flat`)return`butt`;if(e===`sq`)return`square`;throw Error(`Invalid lineCap type: `+e)},w=class extends x{visit(e,t,r){try{let i=e.evaluate(`xfrm`,t);if(i){f(i,r);let t={x:0,y:0,width:0,height:0},a=e.evaluate(`off`,i);a&&(t.x=n.s(a.getAttribute(`x`))??0,t.y=n.s(a.getAttribute(`y`))??0);let o=e.evaluate(`ext`,i);a&&(t.width=n.s(o.getAttribute(`cx`))??0,t.height=n.s(o.getAttribute(`cy`))??0),r.bounds=t}let a=e.evaluate(`prstGeom`,t);a?.hasAttribute(`prst`)?r.geometry=a?.getAttribute(`prst`):e.evaluate(`customGeom`,t)&&e.warn(`Custom shape geometry is not supported; the shape keeps its bounds only.`,{onceKey:`xlsx.shape.customGeometry`});let o=this.getFill(e,t);o&&Object.keys(o).length>0&&(r.fill=o);let s=this.getStroke(e,t);return s&&Object.keys(s).length>0&&(r.stroke=s),r}catch(t){e.warn(`Unable to read shape properties: ${t?.message??t}`,{onceKey:`xlsx.shape.unreadable`})}}},T=class{visit(e,t,n){let r={};if(p(e,t,r,`grouping`,`grouping`),m(e,t,r,`varyColors`,`varyColors`),g(e,t,r,`gapWidth`,`gapWidth`,.01),g(e,t,r,`overlap`,`overlap`,.01),this.parseType(e,t,r),h(e,t,r,`bubbleScale`,`bubbleScale`),m(e,t,r,`showNegBubbles`,`showNegativeBubbleValues`),m(e,t,r,`sizeRepresents`,`bubbleSizeRepresentsWidth`),h(e,t,r,`firstSliceAng`,`startAngle`),h(e,t,r,`holeSize`,`holeSize`),p(e,t,r,`scatterStyle`,`scatterStyle`),this.parseAxisIds(e,t,r),Object.keys(r).length>0){let t=e.getVisitorParamsState().get(`types`);t||(e.warn(`A chart type was read outside a chart; its types were started fresh.`,{onceKey:`xlsx.chart.typesState`}),t=[],e.getVisitorParamsState().set(`types`,t)),t.push(r)}return r}parseType(e,t,n){switch(t.localName){case`areaChart`:n.type=`area`;break;case`bubbleChart`:n.type=`bubble`;break;case`doughnutChart`:case`ofPieType`:case`pieChart`:n.type=`pie`;break;case`lineChart`:n.type=`line`;break;case`scatterChart`:n.type=`scatter`}}parseAxisIds(e,t,n){let r=e.evaluate(`axId`,t);r&&r.length!==0&&(n.xAxisId=r.item(0).getAttribute(`val`),n.yAxisId=r.item(1).getAttribute(`val`))}},E=(e,t,n)=>{if(!0===e.getValAttrAsBoolean(`invertIfNegative`,t))if(e.evaluate(`extLst/ext/invertSolidFillFmt`,t)){if(n.fill&&n.fillNegative){let t=e.getFromPath(n,`fill.solid.adjs`);t&&e.setToPath(n,`fillNegative.solid.adjs`,t)}}else{let e={val:`FFFFFF`},t={};t.solid=e,n.fillNegative=t;let r={val:`000000`},i={};i.solid=r;let a={};a.fill=i,n.strokeNegative=a}},D=class extends x{constructor(e=`text`){super(),this._jsonKey=e}getTextPath(){return this._jsonKey}visit(e,t,n){let r=e.getFromPath(n,this.getTextPath());return r||={},this.parseTextElement(e,t,r,!1),Object.keys(r).length>0&&e.setToPath(n,this.getTextPath(),r),n}parseTextElement(e,t,n,r){let i=e.evaluate(`p/pPr/defRPr`,t)??e.evaluate(`defRPr`,t),a=i?.length===void 0?i:i.item(0);a&&(this.parseTextProperties(e,a,n),new w().visit(e,a,n));let o=n.runs??[],s=e.evaluate(`p/r`,t)??e.evaluate(`r`,t),c=t=>{let n={},r=e.evaluate(`t`,t),i=e.evaluate(`rPr`,t);i&&this.parseTextProperties(e,i,n),r&&r.firstChild?n.text=r.firstChild.textContent??``:t.textContent&&(n.text=t.textContent??``),Object.keys(n).length>0&&o.push(n)};if(s?.length!==void 0)for(let e=0;s&&e<s.length;e++)c(s.item(e));else c(s||t);o.length>0&&(n.runs=o);let l=e.evaluate(`bodyPr`,t);l&&f(l,n)}parseTextProperties(e,t,n){if(!t)return;t.hasAttribute(`sz`)&&(n.size=parseFloat(t.getAttribute(`sz`))/100),t.hasAttribute(`b`)&&(n.weight=t.getAttribute(`b`)===`1`?700:400),t.hasAttribute(`i`)&&(n.italic=t.getAttribute(`i`)===`1`),t.hasAttribute(`u`)&&(n.underline=t.getAttribute(`u`)),t.hasAttribute(`strike`)&&(n.strike=t.getAttribute(`strike`));let r=this.getFill(e,t);r&&Object.keys(r).length>0&&(n.color=r);let a=e.evaluate(`latin`,t);if(a&&!a.getAttribute(`typeface`).startsWith(`+`)){let e=n.font??{};if(a.hasAttribute(`typeface`)&&(e.family=a.getAttribute(`typeface`)),a.hasAttribute(`panose`)){let t=a.getAttribute(`panose`);t&&(e.fallbacks=[i.IFont.getPanoseFallback(t)])}a.hasAttribute(`pitchFamily`)&&(e.pitch=a.getAttribute(`pitchFamily`)),a.hasAttribute(`charset`)&&(e.charset=a.getAttribute(`charset`)),Object.keys(e).length>0&&(n.font=e)}}},O=class{visit(e,t,n){}processDataBarColor(e,t,r,i,a=`auto`){if(!t)return;let o=n.p(e=>t.getAttribute(e),a);return o&&(r[i]=o),r}processFonts(e,t,n){if(!t)return;let r=t.childNodes,i=0,a=r.length;for(let t=0;t<a;t++){let a=r.item(t);if(a.nodeType===1&&a.localName===`font`){let t={};this.processFont(e,a,t),n[i++]=t}}return n}processFont(e,t,n){e.getValAttrAsBoolean(`b`,t,!0)&&(n.weight=700),e.getValAttrAsBoolean(`i`,t,!0)&&(n.style=i.IFont.Style.Italic),e.getValAttrAsBoolean(`strike`,t,!0)&&(n.strike=!0);let r=e.evaluate(`u`,t);r&&(n.underline=r.getAttribute(`val`)||i.IFont.UnderlineStyle.Single),p(e,t,n,`vertAlign`,`verticalAlign`),n.verticalAlign===`superscript`?n.verticalAlign=i.IFont.VerticalAlignment.Super:n.verticalAlign===`subscript`&&(n.verticalAlign=i.IFont.VerticalAlignment.Sub),g(e,t,n,`sz`,`size`);let a=e.evaluate(`color`,t);this.processDataBarColor(e,a,n,`color`),n.color||=`auto`,p(e,t,n,`name`,`family`),p(e,t,n,`rFont`,`family`);let o=e.evaluate(`family`,t);if(o){let e=o.getAttribute(`val`);if(e)switch(e){case`1`:n.fallbacks=[`serif`];break;case`2`:n.fallbacks=[`sans-serif`];break;case`3`:n.fallbacks=[`monospace`];break;case`4`:n.fallbacks=[`cursive`];break;case`5`:n.fallbacks=[`fantasy`]}}return p(e,t,n,`scheme`,`scheme`),n.family!==void 0&&n.scheme===void 0&&(n.scheme=i.IFont.Scheme.None),m(e,t,n,`shadow`,`shadow`,!0),m(e,t,n,`outline`,`outline`,!0),e.getValAttrAsBoolean(`condense`,t,!0)&&(n.letterSpacing=-1),e.getValAttrAsBoolean(`extend`,t,!0)&&(n.letterSpacing=1),h(e,t,n,`charset`,`charset`),n}processFills(e,t,n){if(!t)return;let r=t.childNodes,i=0,a=r.length;for(let t=0;t<a;t++){let a=r.item(t);a.nodeType===1&&a.localName===`fill`&&this.processFill(e,a,n,i++)}return n}processFill(e,t,n,r){let a={type:i.IFill.Type.None},o=t.childNodes,s=!1,c=o.length;for(let t=0;!s&&t<c;t++){let n=o.item(t);n.nodeType===1&&(n.localName===`gradientFill`?(this.processGradientFill(e,n,a),s=!0):n.localName===`patternFill`&&(this.processPatternFill(e,n,a),s=!0))}return n[r]=a,n}processGradientFill(e,t,n){if(!t)return;n.type=i.IFill.Type.Gradient;let r=[];n.stops=r;let a=t.getAttribute(`type`);a&&(n.gradientType=a);let o=t.hasAttribute(`degree`)?parseFloat(t.getAttribute(`degree`)):0;(o+90)%360!=0&&(n.angle=(o+90)%360),(t.hasAttribute(`left`)||t.hasAttribute(`top`)||t.hasAttribute(`right`)||t.hasAttribute(`bottom`))&&(n.focus={left:k(t.getAttribute(`left`)),top:k(t.getAttribute(`top`)),right:k(t.getAttribute(`right`)),bottom:k(t.getAttribute(`bottom`))});let s=t.childNodes,c=s.length;for(let t=0;t<c;t++){let n=s.item(t);if(n.nodeType===1&&n.localName===`stop`){let t={};r.push(t),t.offset=parseFloat(n.getAttribute(`position`)??``);let i=e.evaluate(`color`,n);this.processDataBarColor(e,i,t,`color`)}}return n}processPatternFill(e,t,n){if(!t)return;let r=e.getVisitorParamsState().get(`processingDXFs`),a=t.getAttribute(`patternType`)||(r?i.IFill.BuiltInSheetPattern.Solid:i.IFill.BuiltInSheetPattern.None);if(a===i.IFill.BuiltInSheetPattern.None)return{none:!0};n.type=i.IFill.Type.Pattern,a&&(n.patternType=a);let o=`foreground`,s=`background`,c=n.patternType===i.IFill.BuiltInSheetPattern.Solid&&r,l=c?`dk1`:`lt1`,u=c?`lt1`:`dk1`;if(c){let e=o;o=s,s=e}let d=e.evaluate(`fgColor`,t);this.processDataBarColor(e,d,n,o,l);let f=e.evaluate(`bgColor`,t);return this.processDataBarColor(e,f,n,s,u),c&&(n.foreground||=`lt1`,n.background||=`dk1`),n}processBorders(e,t,n,r){if(!t)return;let i=t.childNodes,a=0,o=i.length;for(let t=0;t<o;t++){let o=i.item(t);o.nodeType===1&&o.localName===`border`&&this.processBorder(e,o,n,a++,r)}return n}processBorder(e,t,n,r,a){if(!t)return;let o={};return this.processBorderStroke(e,t,o,i.IBorders.Edge.Left),this.processBorderStroke(e,t,o,i.IBorders.Edge.Right),a?(o.right||o.left)&&(o.right?o.vertical={...o.right}:o.vertical={...o.left}):this.processBorderStroke(e,t,o,i.IBorders.Edge.Vertical),this.processBorderStroke(e,t,o,i.IBorders.Edge.Top),this.processBorderStroke(e,t,o,i.IBorders.Edge.Bottom),a?(o.bottom||o.top)&&(o.bottom?o.horizontal={...o.bottom}:o.horizontal={...o.top}):this.processBorderStroke(e,t,o,i.IBorders.Edge.Horizontal),n[r]=o,n}processBorderStroke(e,t,n,r){if(!t)return;let a=e.evaluate(r,t);if(!a)return;let o={};a.hasAttribute(`style`)?o.style=a.getAttribute(`style`):e.getVisitorParamsState().get(`processingDXFs`)&&(o.style=i.IBorders.StrokeStyle.None);let s=e.evaluate(`color`,a);return s&&this.processDataBarColor(e,s,o,`color`),Object.keys(o).length>0?n[r]=o:null}},k=e=>{if(!e)return 0;let t=parseFloat(e);return isNaN(t)?0:t},ee={auto:`auto`,autoNoTable:`automaticExceptTables`,manual:`manual`},A=class{visit(e,t,n){if(!t)return;let r=e.evaluate(`*/cNvPr`,t);return r.item&&(r=r.item(0)),r&&(e.copyFromAttribute(r,`name`,n),e.copyFromAttribute(r,`descr`,n,`description`),e.copyFromAttribute(r,`hidden`,n,`hidden`,e.BOOLEAN_COPY),e.copyFromAttribute(r,`id`,n)),n}setContent(e,t){let n=e;n.name!==void 0&&(t.name=n.name,delete n.name),n.description!==void 0&&(t.description=n.description,delete n.description),e.content=t}},j=class extends A{visit(e,t,n){if(!t)return;if(e.getPath().includes(`Fallback`)&&n.content){let r=n.content.json;return n.content.type===`sp`&&r?.xml&&r.fallbackXml===void 0&&(r.fallbackXml=e.serializeElement(t)??void 0),n}n=super.visit(e,t,n);let r=e.evaluate(`nvSpPr/cNvSpPr`,t);if(r){let t=e.evaluate(`spLocks`,r);if(t){t.hasAttribute(`noChangeAspect`)&&(n.lockAspect=t.getAttribute(`noChangeAspect`)===`1`);let e={};Object.keys(e).length>0&&(n.locks=e)}}let i=e.evaluate(`*/cNvPr`,t);i?.item&&(i=i.item(0));let a=i?.getAttribute?.(`id`),o=a?parseInt(a,10):void 0,s={type:`sp`,xml:e.serializeElement(t)??void 0,sourceId:o===void 0||isNaN(o)?void 0:o};return this.setContent(n,{type:`sp`,json:s}),s}},M=`richTypes`,N=`richData`,P=e=>{let t=e.getAttribute(`val`);return t!==`0`&&t!==`false`},te={1:`serif`,2:`sans-serif`,3:`monospace`,4:`cursive`,5:`fantasy`};function ne(e){let t={},r=e.childNodes;for(let e=0;e<r.length;e++){let a=r.item(e);if(a.nodeType===1)switch(a.localName){case`b`:t.weight=P(a)?700:400;break;case`i`:t.style=P(a)?i.IFont.Style.Italic:i.IFont.Style.Normal;break;case`strike`:t.strike=P(a);break;case`outline`:t.outline=P(a);break;case`shadow`:t.shadow=P(a);break;case`extend`:t.extend=P(a);break;case`u`:t.underline=a.getAttribute(`val`)||i.IFont.UnderlineStyle.Single;break;case`vertAlign`:{let e=a.getAttribute(`val`);e===`superscript`?t.verticalAlign=i.IFont.VerticalAlignment.Super:e===`subscript`?t.verticalAlign=i.IFont.VerticalAlignment.Sub:e===`baseline`&&(t.verticalAlign=i.IFont.VerticalAlignment.Baseline);break}case`sz`:{let e=parseFloat(a.getAttribute(`val`)??``);isNaN(e)||(t.size=e);break}case`rFont`:{let e=a.getAttribute(`val`);e&&(t.family=e);break}case`family`:{let e=te[a.getAttribute(`val`)??``];e&&(t.fallbacks=[e]);break}case`charset`:{let e=parseInt(a.getAttribute(`val`)??``,10);isNaN(e)||(t.charset=e);break}case`scheme`:{let e=a.getAttribute(`val`);e&&(t.scheme=e);break}case`color`:{let e=a.getAttribute(`rgb`);if(e&&!a.hasAttribute(`theme`)){t.color=`#`+(e.length===8?e.substring(2):e).toUpperCase();break}let r=n.p(e=>a.getAttribute(e));r&&(t.color=r);break}}}return Object.keys(t).length>0?t:null}var re=class{visit(e,t,n){if(!t)return;let r=t.childNodes,i=r.length;for(let t=0;t<i;t++){let i=r.item(t);i.nodeType===1&&i.localName===`Relationship`&&this.processRelationship(e,i,n)}return n}processRelationship(e,t,n){let r={};e.copyFromAttribute(t,`Target`,r,`target`),e.copyFromAttribute(t,`Type`,r,`type`),e.copyFromAttribute(t,`TargetMode`,r,`targetMode`),n[t.getAttribute(`Id`)]=r}},ie=class{visit(e,t,n){let r=[],i=t.childNodes,a=i.length;for(let t=0;t<a;t++){let n=i.item(t);if(n.nodeType!==1)continue;let a=this.processProperty(e,n);a&&r.push(a)}return r.length>0&&(n.properties=r),r}processProperty(e,t){if(t)return t.getAttribute(`xsi:type`),{key:t.localName,value:t.textContent||``}}},F=class{visit(e,t,n){let r=[],i=t.childNodes,a=i.length;for(let t=0;t<a;t++){let n=i.item(t);if(n.nodeType!==1)continue;let a=this.processProperty(e,n);a&&r.push(a)}return r.length>0&&(n.properties=r),r}processProperty(e,t){if(t)return{key:t.localName,value:t.textContent||``}}},I=class{visit(e,t,n){return m(e,t,n,`roundedCorners`,`roundedCorners`),h(e,t,n,`.//AlternateContent/Fallback/style`,`styleId`),e.getVisitorParamsState().set(`types`,[]),e.getVisitorParamsState().set(`axes`,new Map),n.range=null,n}afterVisit(e,t,n){let r={};n.types=r;let i={},a=0,o={},s=0,c=e.getVisitorParamsState().get(`axes`),l=e.getVisitorParamsState().get(`types`),u=l.length;for(let e=0;e<u;e++){let t=l[e];if(t.xAxisId){let r=t.xAxisId,o=c.get(r);i[e+``]=o,t.offsetXAxis=e,delete t.xAxisId,n.xAxes=i,i.length=++a}if(t.yAxisId){let r=t.yAxisId,i=c.get(r);o[e+``]=i,t.offsetYAxis=e,delete t.yAxisId,n.yAxes=o,o.length=++s}r[e+``]=t}r.length=l.length;let d=e.getVisitorParamsState().get(`series`);if(!d||d.length===0)return;let f={};n.series=f;let p=d.length;for(let e=0;e<p;e++)f[e+``]=d[e];f.length=p,e.getVisitorParamsState().delete(`types`),e.getVisitorParamsState().delete(`axes`),e.getVisitorParamsState().delete(`series`)}},L=class{visit(e,t,n){let r={};return n.plotArea=r,r}},R=w,z=class extends T{parseType(e,t,n){let r=e.getValAttrAsString(`barDir`,t);r&&(n.type=r===`col`?`column`:`bar`)}},B=T,V=class{constructor(e){this.jsonKey=e}visit(e,t,n){let r={},i=r,a=e.getValAttrAsString(`idx`,t);a!==null&&(i={},i[a]=r);let o=e.getValAttrAsBoolean(`delete`,t);this.parseNumFormat(e,t,r),!0===o?(r.showBubbleSize=!1,r.showCatName=!1,r.showLeaderLines=!1,r.showPercentage=!1,r.showSerName=!1,r.showVal=!1,r.showLegendKey=!1):(m(e,t,r,`showBubbleSize`,`showBubbleSize`),m(e,t,r,`showCatName`,`showCatName`),m(e,t,r,`showLeaderLines`,`showLeaderLines`),m(e,t,r,`showPercent`,`showPercentage`),m(e,t,r,`showSerName`,`showSerName`),m(e,t,r,`showVal`,`showVal`),m(e,t,r,`showLegendKey`,`showLegendKey`));let s=e.evaluate(`separator`,t);return s!==null&&(r.separator=s.textContent),p(e,t,r,`dLblPos`,`position`),n[this.jsonKey]=i,r}parseNumFormat(e,t,n){let r=e.evaluate(`numFmt`,t);r&&(n.formatCode=r.getAttribute(`formatCode`),r.hasAttribute(`sourceLinked`)&&(n.sourceLinked=r.getAttribute(`sourceLinked`)===`1`))}},H=class{visit(e,t,n){let r={};h(e,t,r,`explosion`,`explosion`);let i=e.evaluate(`cat/*/f`,t);i||=e.evaluate(`xVal/*/f`,t);let a=null;i!==null&&i.firstChild!==null&&(a=i.firstChild.nodeValue),i||(i=e.evaluate(`cat/strLit`,t),i||=e.evaluate(`cat/numLit`,t),i&&(a=this.parsePointsAsString(e,i))),a!==null&&(r.xRange=a);let o=e.evaluate(`val/*/f`,t);o||=e.evaluate(`yVal/*/f`,t);let s=null;o&&o.firstChild&&(s=o.firstChild.nodeValue),o||(o=e.evaluate(`val/numLit`,t),o!==null&&(s=this.parsePointsAsString(e,o))),s!==null&&(r.valRange=s),this.parseTitleRangeOrValue(e,t,r),h(e,t,r,`idx`,`idx`),m(e,t,r,`smooth`,`smooth`),r.offsetChart=e.getVisitorParamsState().get(`types`).length-1;let c=e.getVisitorParamsState().get(`series`);return c||(c=[],e.getVisitorParamsState().set(`series`,c)),c.push(r),r}parseTitleRangeOrValue(e,t,n){let r=e.evaluate(`tx/strRef/f`,t);if(r!==null){let t=r.firstChild.nodeValue;e.setToPath(n,`title.range`,t)}else{let r=e.evaluate(`tx/v`,t);r!==null&&e.setToPath(n,`title.text.simpleRun`,r.firstChild.nodeValue)}}parsePointsAsString(e,t){let n=`{`,r=e.getValAttrAsInteger(`ptCount`,t),i=e.evaluate(`pt`,t),a=[];for(let n=0;i&&r&&n<r;n++){let r=null,i=e.evaluate(`pt[@idx='`+n+`']/v`,t);i&&(r=i.textContent),a[n]=r}for(let e=0;e<a.length;e++)e>0&&(n+=`,`),a[e]!==void 0&&(n+=a[e]);return n+=`}`,n}afterVisit(e,t,n){E(e,t,n);let r=e.getFromPath(n,`points`);if(r){let t=Object.keys(r);for(let i=0;i<t.length;i++){let a=t[i],o=e.getFromPath(r,a);if(!o)continue;let s=e.getFromPath(o,`markers`);s&&(e.setToPath(n,`markers.points.`+a,s),delete o.markers)}}}},U=class{DataPointVisitor(){}visit(e,t,n){let r=e.getFromPath(n,`points`),i=null;r?i=r:(i={},e.setToPath(n,`points`,i));let a={},o=e.getValAttrAsString(`idx`,t);return o!==null&&(i[o]=a),m(e,t,a,`bubble3D`,`bubble3D`),h(e,t,a,`explosion`,`explosion`),E(e,t,a),a}},W=class{visit(e,t,n){let r=t.parentNode.localName;if(r===`ser`||r===`dPt`){let r={},i=e.getValAttrAsString(`size`,t);i!==null&&(r.size=i);let a=e.getValAttrAsString(`symbol`,t);return a&&(r.type=a),n.markers=r,r}return null}},G=class{visit(e,t,n){let r={};this.parseScaling(e,t,r),g(e,t,r,`majorUnit`,`majorUnits`),g(e,t,r,`minorUnit`,`minorUnits`),m(e,t,r,`delete`,`shown`),this.parseOrientation(e,t,r),this.parseNumFormat(e,t,r),p(e,t,r,`majorTickMark`,`majorTickMarks`),p(e,t,r,`minorTickMark`,`minorTickMarks`),p(e,t,r,`crosses`,`crosses`),g(e,t,r,`crossesAt`,`crosses`),p(e,t,r,`crossBetween`,`crossBetween`),this.parseLabelAlign(e,t,r),h(e,t,r,`lblOffset`,`labelOffset`),p(e,t,r,`tickLblPos`,`labelPosition`);let i=e.getValAttrAsInteger(`noMultiLvlLbl`,t);r.labelMultiLevel=i!==null&&i===0,h(e,t,r,`tickMarkSkip`,`tickMarkSkip`),h(e,t,r,`tickLblSkip`,`labelInterval`),this.parseDisplayCustOrBuiltInUnit(t,e,r),this.parseTimeUnits(e,t,r,`majorUnitDates`,`majorTimeUnit`,`majorUnit`),this.parseTimeUnits(e,t,r,`minorUnitDates`,`minorTimeUnit`,`minorUnit`),p(e,t,r,`baseTimeUnit`,`baseUnitDates`),e.getVisitorParamsState().get(`axes`)||(e.warn(`An axis was read outside a chart; its axes were started fresh.`,{onceKey:`xlsx.chart.axesState`}),e.getVisitorParamsState().set(`axes`,new Map));let a=e.getValAttrAsString(`axId`,t);return e.getVisitorParamsState().get(`axes`).set(a,r),r}parseTimeUnits(e,t,n,r,i,a){let o={},s=e.getValAttrAsString(i,t);s!==null&&(o.dem=s,o.amt=e.getValAttrAsString(a,t)),Object.keys(o).length>0&&(n[r]=o)}parseDisplayCustOrBuiltInUnit(e,t,n){let r=t.getValAttrAsString(`dispUnits/builtInUnit`,e);r||=t.getValAttrAsString(`dispUnits/custUnit`,e),r&&(n.displayUnits=r)}parseLabelAlign(e,t,n){let r=e.getValAttrAsString(`lblAlgn`,t);r!==null&&(r===`ctr`?n.labelAlign=`center`:r===`l`?n.labelAlign=`left`:r===`r`&&(n.labelAlign=`right`))}parseOrientation(e,t,n){let r=e.getValAttrAsString(`AxPos`,t);r!==null&&(r===`b`?n.orientation=`bottom`:r===`l`?n.orientation=`left`:r===`r`?n.orientation=`right`:r===`t`&&(n.orientation=`top`))}parseNumFormat(e,t,n){let r={},i=e.evaluate(`numFmt`,t);i!==null&&(i.hasAttribute(`formatCode`)&&(r.formatCode=i.getAttribute(`formatCode`)),i.hasAttribute(`sourceLinked`)&&(r.sourceLinked=i.getAttribute(`sourceLinked`)===`1`)),Object.keys(r).length>0&&(n.labels=r)}parseScaling(e,t,n){let r=e.getValAttrAsString(`scaling/orientation`,t);r!==null&&(n.inverted=r!==`minMax`);let i=e.getValAttrAsFloat(`scaling/logBase`,t);i!==null&&(n.logBase=i,n.scaleType=`log`),g(e,t,n,`scaling/max`,`max`),g(e,t,n,`scaling/min`,`min`)}afterVisit(e,t,n){n.fill&&n.labels&&(n.labels.fill=n.fill,delete n.fill);let r=e.getValAttrAsBoolean(`delete`,t);r!==null&&(e.setToPath(n,`labels.shown`,!0!==r),e.setToPath(n,`shown`,!0!==r));let i=e.getFromPath(n,`dispUnits.displayUnitsLabel`);i&&(e.setToPath(n,`displayUnitsLabel`,i),delete n.dispUnits);let a=e.evaluate(`title`,t);e.setToPath(n,`title.shown`,a!==null);let o=e.evaluate(`minorGridlines`,t);e.setToPath(n,`gridLinesMinor.shown`,o!==null);let s=e.evaluate(`majorGridlines`,t);e.setToPath(n,`gridLinesMajor.shown`,s!==null)}},K=D,q=class{visit(e,t,n){let r=e.getVisitorParamsState().get(`series`),i=e.getValAttrAsInteger(`idx`,t),a=i===null?void 0:r[i];if(a){let n=e.getFromPath(a,`title`);n||(n={},e.setToPath(a,`title`,n));let r=n,i=e.getValAttrAsBoolean(`delete`,t);return i!==null&&(r.shown=!i),r}return n}},J=class{visit(e,t,n){let r={};return m(e,t,r,`overlay`,`overlay`),p(e,t,r,`legendPos`,`position`),n.legend=r,r}},Y=class extends w{visit(e,t,n){let r=this.getFill(e,t);Object.keys(r).length>0&&(n.fillNegative=r);let i=this.getStroke(e,t);return Object.keys(i).length>0&&(n.strokeNegative=i),n}},X=class extends D{constructor(e=`title`){super(e)}parseTitleRangeOrValue(e,t,n){let r=e.evaluate(`tx/strRef/f`,t)??null;if(r){let t=r.firstElementChild.nodeValue;e.setToPath(n,`range`,t)}}visit(e,t,n){let r={};m(e,t,r,`overlay`,`overlay`),n[this._jsonKey]=r;let i=e.getFromPath(r,this.getTextPath());i||={},this.parseTitleRangeOrValue(e,t,r);let a=e.evaluate(`txPr`,t);a&&this.parseTextElement(e,a,i,!1);let o=e.evaluate(`tx/rich`,t);return o&&this.parseTextElement(e,o,i,!0),Object.keys(i).length>0&&e.setToPath(r,`text`,i),r}afterVisit(e,t,n){if(n?.text){let e=n.text?.rotation??null;e!==null&&(n.rotation=parseInt(e),delete n.title.rotation)}}},ae=class{visit(e,t,n){let r=e.evaluate(`manualLayout`,t);if(r){let t={};g(e,r,t,`x`,`x`),g(e,r,t,`y`,`y`),g(e,r,t,`w`,`w`),g(e,r,t,`h`,`h`),p(e,r,t,`xMode`,`xMode`),p(e,r,t,`yMode`,`yMode`),p(e,r,t,`wMode`,`wMode`),p(e,r,t,`hMode`,`hMode`),Object.keys(t).length>0&&(n.manualLayout=t)}return n}},oe=class{visit(e,t,n){return n.name=t.getAttribute(`name`),n}},se=class extends x{visit(e,t,n){let r={};r.name=t.getAttribute(`name`);let i=t.childNodes,a=i.length;for(let n=0;n<a;n++){let a=i.item(n);if(a.nodeType===1){let n=a.localName,i=e.evaluate(n,t);r[n]=this.processAdjColor(e,i)}}return Object.keys(r).length>0&&(n.colors=r),r}},ce=class{visit(e,t,n){let r={};r.name=t.getAttribute(`name`);let i=e.evaluate(`majorFont`,t),a=this.processFontElement(e,i,{});a&&(r.majorFont=a.family,a.fallbacks&&(r.majorFallbacks=a.fallbacks));let o=e.evaluate(`minorFont`,t),s=this.processFontElement(e,o,{});return s&&(r.minorFont=s.family,s.fallbacks&&(r.minorFallbacks=s.fallbacks)),n.fonts=r,r}processFontElement(e,t,n){if(!t)return;let r=e.evaluate(`latin`,t);if(!r)return;let a=r.getAttribute(`typeface`);a&&(n.family=a);let o=r.getAttribute(`panose`);return o&&(n.fallbacks=[i.IFont.getPanoseFallback(o)]),n}},le=class extends x{visit(e,t,n){let r=this.parseFillList(e,t,`fillStyleLst`),i=this.parseLnList(e,t,`lnStyleLst`),a=this.parseEffectStyleList(e,t,`effectStyleLst`),o=this.parseFillList(e,t,`bgFillStyleLst`);if(r&&i&&a&&o)return n.fillStyleLst=r,n.lnStyleLst=i,n.effectStyleLst=a,void(n.bgFillStyleLst=o);let s=e.serializeElement(t);s&&(n.formatSchemeXml=s)}parseFillList(e,t,n){let r=e.evaluate(n,t);if(!r)return;let i=[],a=r.childNodes,o=a.length;for(let t=0;t<o;t++){let n=a.item(t);if(n.nodeType!==1)continue;let r=this.parseFillListItem(e,n);if(r===void 0)return;i.push(r)}return i}parseFillListItem(e,t){switch(t.localName){case`noFill`:return{type:i.IFill.Type.None};case`solidFill`:{let n=this.processAdjColor(e,t);return n?{type:i.IFill.Type.Solid,color:n}:void 0}case`gradFill`:return this.processGradFill(e,t);case`pattFill`:return this.processPatternFill(e,t);default:return}}parseLnList(e,t,n){let r=e.evaluate(n,t);if(!r)return;let i=[],a=r.childNodes,o=a.length;for(let t=0;t<o;t++){let n=a.item(t);if(n.nodeType===1){if(e.evaluate(`headEnd`,n)||e.evaluate(`tailEnd`,n))return;i.push(this.parseLn(e,n))}}return i}parseEffectStyleList(e,t,n){let r=e.evaluate(n,t);if(!r)return;let i=[],a=r.childNodes,o=a.length;for(let t=0;t<o;t++){let n=a.item(t);if(n.nodeType!==1)continue;if(e.evaluate(`scene3d`,n)||e.evaluate(`sp3d`,n))return;let r=this.getEffects(e,n);if(r===void 0)return;i.push(r??[])}return i}},ue=class{visit(e,t,n){if(!t)return;let r={},i=t.getAttribute(`r:id`);if(i){let t=e.getRef(i);typeof t==`string`&&(r.address=t)}return e.copyFromAttribute(t,`tooltip`,r,`screenTip`),e.copyFromAttribute(t,`history`,r,`history`,e.BOOLEAN_COPY),e.copyFromAttribute(t,`tgtFrame`,r,`target`),n.hyperlink=r,r}},de=class{visit(e,t,n){if(!t)return;let r={},i=[];return this.processFilterColumns(e,t,i,n),i.length>0&&(r.conditions=i),Object.keys(r).length>0&&(n.filter=r),r}processColorFilter(e,t){let n={},r={operator:i.ICondition.BuiltInOperatorNames.Color,param:n};return e.copyFromAttribute(t,`cellColor`,n,`cellColor`,e.BOOLEAN_COPY),e.copyFromAttribute(t,`dxfId`,n,`styleId`,e.INT_COPY),r}processCustomFilter(e,n){return t.h({operator:n.getAttribute(`operator`),val:n.getAttribute(`val`)})}processCustomFilters(e,t){let n=t.getAttribute(`and`),r=n===`and`||n===`1`;t.getAttribute(`val`);let a=[],o={operator:r?i.ICondition.BuiltInOperatorNames.And:i.ICondition.BuiltInOperatorNames.Or,param:a},s=t.childNodes,c=s.length;for(let t=0;t<c;t++){let n=s.item(t);if(n.nodeType!==1)continue;let r=null;n.localName===`customFilter`&&(r=this.processCustomFilter(e,n)),r&&a.push(r)}return a.length===1?a[0]:o}processDynamicFilter(e,t){let n={},r={operator:i.ICondition.BuiltInOperatorNames.TimePeriod,param:n},a=t.getAttribute(`type`);return a===`aboveAverage`?a=i.ICondition.AverageType.Above:a===`belowAverage`&&(a=i.ICondition.AverageType.Below),Object.values(i.ICondition.AverageType).includes(a)?(r.operator=i.ICondition.BuiltInOperatorNames.Average,e.copyFromAttribute(t,`val`,n,`stdDevs`,e.INT_COPY)):e.copyFromAttribute(t,`val`,n,`anchorDate`,e.INT_COPY),e.copyFromAttribute(t,`type`,n,`operator`),e.copyFromAttribute(t,`maxVal`,n,`maxVal`,e.INT_COPY),r}processDateGroupItem(e,t){let n={};return e.copyFromAttribute(t,`dateTimeGrouping`,n,`group`),e.copyFromAttribute(t,`day`,n,`day`,e.INT_COPY),e.copyFromAttribute(t,`hour`,n,`hour`,e.INT_COPY),e.copyFromAttribute(t,`minute`,n,`minute`,e.INT_COPY),e.copyFromAttribute(t,`month`,n,`month`,e.INT_COPY),e.copyFromAttribute(t,`second`,n,`second`,e.INT_COPY),e.copyFromAttribute(t,`year`,n,`year`,e.INT_COPY),n}processFilterItem(e,t){if(t.hasAttribute(`val`))return t.getAttribute(`val`)}processFilters(e,t){let n={},r={operator:i.ICondition.BuiltInOperatorNames.InSet,param:n};e.copyFromAttribute(t,`blank`,r,`blank`,e.BOOLEAN_COPY),e.copyFromAttribute(t,`calendarType`,r,`calendarType`);let a=[],o=[],s=t.childNodes,c=s.length;for(let t=0;t<c;t++){let n=s.item(t);if(n.nodeType===1){if(n.localName===`dateGroupItem`){let t=this.processDateGroupItem(e,n);t&&a.push(t)}else if(n.localName===`filter`){let t=this.processFilterItem(e,n);t!==void 0&&o.push(t)}}}return a.length>0&&(n.dateGroups=a),o.length>0&&(n.items=o),r}processIcon(e,t){let n={},r={operator:i.ICondition.BuiltInOperatorNames.Icon,param:n};return e.copyFromAttribute(t,`iconId`,n,`iconId`,e.INT_COPY),e.copyFromAttribute(t,`iconSet`,n),r}processTop10(e,t){let n={},r={operator:i.ICondition.BuiltInOperatorNames.TopN,param:n};return e.copyFromAttribute(t,`filterVal`,n,`filterVal`,e.FLOAT_COPY),e.copyFromAttribute(t,`percent`,n,`percent`,e.BOOLEAN_COPY),e.copyFromAttribute(t,`top`,n,`top`,e.BOOLEAN_COPY),e.copyFromAttribute(t,`val`,n,`val`,e.FLOAT_COPY),r}processFilterCriteria(e,t){if(!t)return;let n=t.childNodes,r,i=n.length;for(let t=0;t<i;t++){let i=n.item(t);i.nodeType===1&&(i.localName===`colorFilter`?r=this.processColorFilter(e,i):i.localName===`customFilters`?r=this.processCustomFilters(e,i):i.localName===`dynamicFilter`?r=this.processDynamicFilter(e,i):i.localName===`filters`?r=this.processFilters(e,i):i.localName===`iconFilter`?r=this.processIcon(e,i):i.localName===`top10`&&(r=this.processTop10(e,i)))}return r}processFilterColumn(e,t,r){if(!t)return null;if(!t.hasAttribute(`colId`))return;let i=parseInt(t.getAttribute(`colId`)),a=!1;if(t.hasAttribute(`hiddenButton`)&&(a=n.a(t.getAttribute(`hiddenButton`))),a&&r){let e=r.hiddenButtons;e||(e=[],r.hiddenButtons=e),e.push(i)}let o=!1;if(t.hasAttribute(`showButton`)&&(o=n.a(t.getAttribute(`showButton`))),o&&r){let e=r.showButtons;!0!==e&&(e||(e=[],r.showButtons=e),e[i]=!0)}let s=this.processFilterCriteria(e,t);return s?(s.index=i,s):null}processFilterColumns(e,t,n,r){if(!t)return;let i=t.childNodes,a=i.length;for(let t=0;t<a;t++){let a=i.item(t);if(a.nodeType===1&&a.localName===`filterColumn`){let t=this.processFilterColumn(e,a,r);t&&n.push(t)}}return n}},fe=class{visit(e,t,r){if(!t)return;let a=t.getAttribute(`ref`),o={};t.hasAttribute(`caseSensitive`)&&(o.collatorOptions=n.a(t.getAttribute(`caseSensitive`))?i.Sort.CaseSensitiveOptions:i.Sort.CaseInsensitiveOptions);let s=t.getAttribute(`sortMethod`);s!=null&&s!==`none`&&(s===`stroke`?o.collatorOptions={...o.collatorOptions,collation:`stroke`}:s===`pinYin`&&(o.collatorOptions={...o.collatorOptions,collation:`pinyin`}));let c={};t.hasAttribute(`columnSort`)&&n.a(t.getAttribute(`columnSort`))&&(c.axis=i.IRange.Axis.Column);let l=i.AddressUtils.fastStringToRange(a),u=[];return this.processSortConditions(e,t,u,l,o),u.length>0&&(c.sorts=u),Object.keys(u).length>0&&(r.sort=c),c}processSortCondition(e,t,r,a){if(!t)return null;let o={};if(!t.hasAttribute(`ref`))return void e.warn(`A sort condition has no ref; it was dropped.`,{onceKey:`xlsx.sheet.sort.noRef`});if(t.hasAttribute(`ref`)){let e=t.getAttribute(`ref`),n=i.AddressUtils.fastStringToRange(e);o.index=r?n.colStart-r.colStart:n.colStart}let s={...a};return o.criteria=s,s.reverse=!1,t.hasAttribute(`descending`)&&(s.reverse=n.a(t.getAttribute(`descending`))),e.copyFromAttribute(t,`sortBy`,s,`sortOn`),e.copyFromAttribute(t,`dxfId`,s),e.copyFromAttribute(t,`iconSet`,s),e.copyFromAttribute(t,`customList`,s),o}processSortConditions(e,t,n,r,i){if(!t)return;let a=t.childNodes,o=a.length;for(let t=0;t<o;t++){let o=a.item(t);if(o.nodeType===1&&o.localName===`sortCondition`){let t=this.processSortCondition(e,o,r,i);t&&n.push(t)}}}},Z=class extends O{visit(e,t,r){this.processNumFmts(e,e.evaluate(`numFmts`,t),null),e.getVisitorParamsState().set(`colorsToProcess`,new Set);let a={fills:{},fonts:{},borders:{}};this.processFonts(e,e.evaluate(`fonts`,t),a.fonts),this.processFills(e,e.evaluate(`fills`,t),a.fills),this.processBorders(e,e.evaluate(`borders`,t),a.borders,!0),a.fills[0]={type:i.IFill.Type.None},a.fills[1]={type:i.IFill.Type.Pattern,patternType:i.IFill.BuiltInSheetPattern.Gray125},a.borders[0]={bottom:{style:i.IBorders.StrokeStyle.None},left:{style:i.IBorders.StrokeStyle.None},right:{style:i.IBorders.StrokeStyle.None},top:{style:i.IBorders.StrokeStyle.None}};let o=[];this.processXFs(e,e.evaluate(`cellStyleXfs`,t),o,a,null,!1);let s=new Map;if(o.length>0){let n=[];this.processCellStyles(e,e.evaluate(`cellStyles`,t),n,o,s),r.named=n}let c=[];this.processXFs(e,e.evaluate(`cellXfs`,t),c,a,s),Object.keys(c).length>0&&(r.direct=c);let l=this.collectHiddenXfs(e.evaluate(`cellXfs`,t));l.size>0&&e.getVisitorParamsState().set(n.t,l);let u=[];return this.processDXFs(e,e.evaluate(`dxfs`,t),u),this.processTableStyles(e,e.evaluate(`tableStyles`,t),r,u),this.processIndexColors(e,e.evaluate(`colors/indexedColors`,t),r),this.processMruColors(e,e.evaluate(`colors/mruColors`,t),r),r}processIndexColors(e,t,n){if(!t)return;let r=[],i=t.childNodes,a=i.length;for(let t=0;t<a;t++){let n=i.item(t);if(n.nodeType===1&&n.localName===`rgbColor`){let t={color:null};this.processDataBarColor(e,n,t,`color`),t.color&&r.push(t.color)}}n.indexedColors=r}processMruColors(e,t,n){if(!t)return;let r=[],i=t.childNodes,a=i.length;for(let t=0;t<a;t++){let n=i.item(t);if(n.nodeType===1&&n.localName===`color`){let t={color:null};this.processDataBarColor(e,n,t,`color`),t.color&&r.push(t.color)}}r.length>0&&(n.mruColors=r)}processNumFmts(e,t,n){if(!t)return;let r=new Map;if(e.getVisitorParamsState().set(`numFmts`,r),!t)return;let i=t.childNodes,a=i.length;for(let e=0;e<a;e++){let t=i.item(e);if(t.nodeType===1&&t.localName===`numFmt`){let e=t.getAttribute(`numFmtId`),n=t.getAttribute(`formatCode`);if(e&&n){let t=n;r.set(parseInt(e),t)}}}}processXFs(e,t,n,r,i=null,a=!0){if(!t)return;let o=t.childNodes,s=o.length;for(let t=0;t<s;t++){let s=o.item(t);if(s.nodeType===1&&s.localName===`xf`){let t={};this.processXF(e,s,t,r,i,a),n.push(t)}}}processXF(e,t,r,a,o,s){if(!t)return;let c=t.getAttribute(`xfId`);if(c&&o){let e=o.get(parseInt(c));e&&e!==i.IStyle.BuiltInName.Normal&&(r.named=e)}let l=e=>!(!s&&t.hasAttribute(e))||n.a(t.getAttribute(e)),u=e=>!s||t.hasAttribute(e)&&n.a(t.getAttribute(e)),d=s?`0`:void 0;if(l(`applyFont`)){let e=t.getAttribute(`fontId`)??d;if(e!==void 0&&(e!==`0`||u(`applyFont`))){let t=a.fonts[e];t!==void 0&&(r.font=t)}}if(l(`applyFill`)){let e=t.getAttribute(`fillId`)??d;if(e!==void 0&&(e!==`0`||u(`applyFill`))){let t=a.fills[e];t!==void 0&&Object.keys(t).length>0&&(r.fill=t)}}if(l(`applyBorder`)){let e=t.getAttribute(`borderId`)??d;if(e!==void 0&&(e!==`0`||u(`applyBorder`))){let t=a.borders[e];t!==void 0&&(r.borders=t)}}if(l(`applyNumberFormat`)){let n=t.getAttribute(`numFmtId`)??d;if(n!==void 0&&(n!==`0`||u(`applyNumberFormat`))){let t=parseInt(n),i,a=e.getVisitorParamsState();if(a){let e=a.get(`numFmts`);e&&(i=e.get(t)),r.numberFormat=i??t}else e.warn(`Number formats were unavailable; a cell format was not read.`,{onceKey:`xlsx.style.numberFormat.state`})}}if(l(`applyAlignment`)){let n=e.evaluate(`alignment`,t);(n||u(`applyAlignment`))&&this.processAlignment(e,n,r)}if(l(`applyProtection`)){let n=e.evaluate(`protection`,t);(n||u(`applyProtection`))&&this.processProtection(e,n,r)}let f=n.a(t.getAttribute(`quotePrefix`)??``);f&&(r.quotePrefix=f)}processAlignment(e,t,r){let a={};if(t?.hasAttribute(`horizontal`)?a.horizontal=t.getAttribute(`horizontal`):a.horizontal=i.ITextFrame.HorizontalAlignment.General,t?.hasAttribute(`vertical`)?a.vertical=t.getAttribute(`vertical`):a.vertical=i.ITextFrame.VerticalAlignment.Bottom,t?.hasAttribute(`indent`)?a.indent=parseInt(t.getAttribute(`indent`)):a.indent=0,t?.hasAttribute(`relativeIndent`)?a.relativeIndent=parseInt(t.getAttribute(`relativeIndent`)):a.relativeIndent=0,n.a(t?.getAttribute(`wrapText`)??``)?a.overflow=i.ITextFrame.Overflow.Wrap:a.overflow=i.ITextFrame.Overflow.Visible,n.a(t?.getAttribute(`shrinkToFit`)??``)&&(a.overflow=i.ITextFrame.Overflow.Shrink),t?.hasAttribute(`textRotation`)){let e=parseFloat(t.getAttribute(`textRotation`));e>0&&e<=90?e=360-e:e>90&&e<=180?e-=90:e===255&&(e=0,a.stacked=!0),a.rotation=e}else a.rotation=0;t?.hasAttribute(`justifyLastLine`)&&(a.justifyLastLine=n.a(t.getAttribute(`justifyLastLine`)));let o=t?.getAttribute(`readingOrder`);return o&&(o===`0`?a.readingDirection=i.ITextFrame.ReadingDirection.Auto:o===`1`?a.readingDirection=i.ITextFrame.ReadingDirection.LeftToRight:o===`2`?a.readingDirection=i.ITextFrame.ReadingDirection.RightToLeft:e.warn(`Invalid readingOrder '${o}'; the direction was left automatic.`,{onceKey:`xlsx.style.readingOrder`})),Object.keys(a).length>0&&(r.alignment=a),r}collectHiddenXfs(e){let t=new Set;if(!e)return t;let r=e.childNodes,i=0;for(let e=0;e<r.length;e++){let a=r.item(e);if(a.nodeType!==1||a.localName!==`xf`)continue;let o=a.childNodes;for(let e=0;e<o.length;e++){let r=o.item(e);r.nodeType===1&&r.localName===`protection`&&n.a(r.getAttribute(`hidden`)??``)&&t.add(i)}i++}return t}processProtection(e,t,r){if(!t)return;let i=t.getAttribute(`locked`);return r.protection={alwaysUnlocked:!!i&&!n.a(i)},r}processDXF(e,t,n){if(!t)return;let r=t.childNodes,i=r.length;for(let t=0;t<i;t++){let i=r.item(t);if(i.nodeType===1&&i.localName===`font`){let t={};this.processFont(e,i,t),n.font=t}else if(i.nodeType===1&&i.localName===`fill`){let t=[];this.processFill(e,i,t,0),t.length>0&&t[0]&&(n.fill=t[0])}else if(i.nodeType===1&&i.localName===`border`){let t=[];this.processBorder(e,i,t,0,!1),t.length>0&&t[0]&&(n.borders=t[0])}else if(i.nodeType===1&&i.localName===`numFmt`){let e=i.getAttribute(`formatCode`);if(e)n.numberFormat=e;else{let e=i.getAttribute(`numFmtId`);e&&(n.numberFormat=Number(e))}}else i.nodeType===1&&i.localName===`alignment`&&this.processAlignment(e,i,n)}}processDXFs(e,t,n){if(!t)return;e.getVisitorParamsState().set(`processingDXFs`,!0);let r=new Map;e.getVisitorParamsState().set(`dxfs`,r);let i=t.childNodes,a=i.length;for(let t=0;t<a;t++){let a=i.item(t);if(a.nodeType===1&&a.localName===`dxf`){let t={};this.processDXF(e,a,t);let i=n.length;r.set(i,t),n.push(t)}}e.getVisitorParamsState().delete(`processingDXFs`)}processTableStyle(e,t,r,i,a=!1){let o=t.getAttribute(`name`),s={name:o};t.hasAttribute(`table`)&&(s.table=n.a(t.getAttribute(`table`))),t.hasAttribute(`pivot`)&&(s.pivot=n.a(t.getAttribute(`pivot`))),a&&!s.pivot&&i.unshift(null);let c=t.childNodes,l=c.length;for(let t=0;t<l;t++){let n=c.item(t);if(n.nodeType===1&&n.localName===`tableStyleElement`){let t=n.getAttribute(`type`),r=n.getAttribute(`dxfId`),a=r==null?void 0:i?.[r];a||=(e.warn(`A table style names a format that does not exist (dxfId '${r}').`,{onceKey:`xlsx.style.tableStyle.dxf`}),{}),s[t]=a;let o=null;n.hasAttribute(`size`)&&(o=parseInt(n.getAttribute(`size`))),o&&!isNaN(o)&&(a.size=o)}}delete s.name,r[o]=s}processTableStyles(e,t,n,r,i){if(!t)return;let a={},o=t.getAttribute(`defaultTableStyle`);o&&(a.defaultTableStyle=o);let s=t.getAttribute(`defaultPivotStyle`);s&&(a.defaultPivotStyle=s);let c=t.childNodes,l={},u=c.length;for(let t=0;t<u;t++){let n=c.item(t);n.nodeType===1&&n.localName===`tableStyle`&&this.processTableStyle(e,n,l,r,i)}return Object.keys(l).length>0&&(a.styles=l),Object.keys(a).length>0&&(n.tables=a),n}processCellStyles(e,t,r,a,o){if(!t)return;let s=t.childNodes,c=s.length;for(let e=0;e<c;e++){let t=s.item(e);if(t.nodeType===1&&t.localName===`cellStyle`){let e=parseInt(t.getAttribute(`xfId`)??``),s=t.getAttribute(`name`),c=t.getAttribute(`builtinId`),l=s;if(c!==null){let e=i.IStyle.builtInNameFromId(parseInt(c));e!==void 0&&(l=e)}if(o.set(e,l),!a[e])continue;let u={name:l,style:a[e]};t.getAttribute(`hidden`)&&(u.hidden=n.a(t.getAttribute(`hidden`))),t.getAttribute(`iLevel`)&&(u.iLevel=parseInt(t.getAttribute(`iLevel`))),r.push(u)}}}afterVisit(e,t,n){}},pe=class extends O{visit(e,t,n){return this.processSheetRefs(e,e.evaluate(`sheets`,t),n),this.processExternalReferences(e,e.evaluate(`externalReferences`,t),n),this.processBookViews(e,e.evaluate(`bookViews`,t),n),this.processDefinedNames(e,e.evaluate(`definedNames`,t),n),this.processCalcPr(e,e.evaluate(`calcPr`,t),n),this.processPivotCaches(e,e.evaluate(`pivotCaches`,t),n),this.processWorkbookProtection(e,e.evaluate(`workbookProtection`,t),n),this.processWorkbookPr(e,e.evaluate(`workbookPr`,t),n),n}processPassword(e,t,n,r=`workbook`,i=`password`){if(!t)return;let a={};e.copyFromAttribute(t,`${r}AlgorithmName`,a,`algorithm`),e.copyFromAttribute(t,`${r}HashValue`,a,`hash`),e.copyFromAttribute(t,`${r}SaltValue`,a,`salt`),e.copyFromAttribute(t,`${r}SpinCount`,a,`spinCount`,e.INT_COPY),Object.keys(a).length>0&&(n[i]=a)}processWorkbookProtection(e,n,r){if(!n)return;let i={};this.processPassword(e,n,i,`workbook`,`password`),this.processPassword(e,n,i,`revisions`,`revisionsPassword`);for(let e of t.y)i[e.key]=t.b(e,n.getAttribute(e.attribute));return r.protection=i,r}processCalcPr(e,t,n){if(!t)return;let r={};e.copyFromAttribute(t,`calcMode`,r,`calcMode`,e=>ee[e]??null),e.copyFromAttribute(t,`fullCalcOnLoad`,r,`fullCalcOnLoad`,e.BOOLEAN_COPY),e.copyFromAttribute(t,`calcOnSave`,r,`calcOnSave`,e.BOOLEAN_COPY),e.copyFromAttribute(t,`calcCompleted`,r,`calcCompleted`,e.BOOLEAN_COPY),e.copyFromAttribute(t,`fullPrecision`,r,`fullPrecision`,e.BOOLEAN_COPY),e.copyFromAttribute(t,`forceFullCalc`,r,`forceFullCalc`,e.BOOLEAN_COPY),e.copyFromAttribute(t,`concurrentCalc`,r,`concurrentCalc`,e.BOOLEAN_COPY),e.copyFromAttribute(t,`refMode`,r,`refMode`),e.copyFromAttribute(t,`iterate`,r,`iterate`,e.BOOLEAN_COPY),e.copyFromAttribute(t,`iterateCount`,r,`maxIteration`,e.INT_COPY),e.copyFromAttribute(t,`iterateDelta`,r,`maxIterateChange`,e.FLOAT_COPY);let i=t.getAttribute(`calcId`);i!==null&&e.getVisitorParamsState().set(`calcId`,i),n.calc=r}processSheetRefs(e,t,n){if(!t)return;let r=[],i=t.childNodes,a=i.length;for(let t=0;t<a;t++){let n=i.item(t);n.nodeType===1&&n.localName===`sheet`&&this.processSheetRef(e,n,r)}n.sheets=r}processSheetRef(e,t,n){let r={};e.copyFromAttribute(t,`name`,r,`name`),e.copyFromAttribute(t,`state`,r,`visibility`),e.copyFromAttribute(t,`sheetId`,r,`sheetId`,e.INT_COPY);let i=t.getAttribute(`r:id`),a=e.getRef(i);a&&(r.sheet=a),n.push(r)}processExternalReferences(e,t,n){if(!t)return;let r=[],i=t.childNodes,a=i.length;for(let t=0;t<a;t++){let n=i.item(t);if(n.nodeType===1&&n.localName===`externalReference`){let t=n.getAttribute(`r:id`),i=t?e.getRef(t):null;r.push(i??null)}}r.length>0&&(n.externalBooks=r)}processPivotCaches(e,t,n){if(!t)return;let r=[],i=t.childNodes,a=i.length;for(let t=0;t<a;t++){let n=i.item(t);if(n.nodeType!==1||n.localName!==`pivotCache`)continue;let a=parseInt(n.getAttribute(`cacheId`)??``,10),o=n.getAttribute(`r:id`);if(isNaN(a)||!o)continue;let s=e.readEmbeddedPart(o);s&&r.push({cacheId:a,part:s})}r.length>0&&(n.pivotCaches=r)}processBookViews(e,t,n){if(!t)return;let r=t.childNodes,i=0,a=r.length;for(let t=0;i<1&&t<a;t++){let a=r.item(t);a.nodeType===1&&a.localName===`workbookView`&&(this.processWorkbookView(e,a,n),i++)}}processWorkbookView(e,t,n){if(!t)return;let r={};e.copyFromAttribute(t,`activeTab`,r,`activeSheetId`,[e.INT_COPY,e=>e]),t.hasAttribute(`activeTab`)||(r.activeSheetId=0),e.copyFromAttribute(t,`showHorizontalScroll`,r,`showHorizontalScrollbar`,e.BOOLEAN_COPY),e.copyFromAttribute(t,`showVerticalScroll`,r,`showVerticalScrollbar`,e.BOOLEAN_COPY),e.copyFromAttribute(t,`showSheetTabs`,r,`showTabs`,e.BOOLEAN_COPY),e.copyFromAttribute(t,`tabRatio`,r,`tabRatio`,[e.FLOAT_COPY,e=>e]),Object.keys(r).length>0&&(n.view=r)}processDefineName(e,t,n,r){if(!t)return;let i={},a=t.firstChild;if(a&&a.nodeType===3&&(i.ref=a.textContent),e.copyFromAttribute(t,`name`,i),e.copyFromAttribute(t,`comment`,i),e.copyFromAttribute(t,`hidden`,i,`hidden`,e.BOOLEAN_COPY),t.hasAttribute(`localSheetId`)){let n=t.getAttribute(`localSheetId`);if(!r[n]?.name)return void e.warn(`Defined name '${t.getAttribute(`name`)}' references a sheet with localSheetId '${n}' which does not exist.`);i.scope=r[n].name}e.copyFromAttribute(t,`customMenu`,i),e.copyFromAttribute(t,`description`,i),e.copyFromAttribute(t,`statusBar`,i),e.copyFromAttribute(t,`help`,i),e.copyFromAttribute(t,`shortcutKey`,i),e.copyFromAttribute(t,`function`,i,`function`,e.BOOLEAN_COPY),e.copyFromAttribute(t,`functionGroupId`,i,`functionGroupId`,e.INT_COPY),e.copyFromAttribute(t,`publishToServer`,i,`publishToServer`,e.BOOLEAN_COPY),e.copyFromAttribute(t,`vbProcedure`,i,`vbProcedure`,e.BOOLEAN_COPY),e.copyFromAttribute(t,`xlm`,i,`xlm`,e.BOOLEAN_COPY),Object.keys(i).length>0&&n.push(i)}processDefinedNames(e,t,n){if(!t)return;let r=[],i=t.childNodes,a=i.length;for(let t=0;t<a;t++){let a=i.item(t);a.nodeType===1&&a.localName===`definedName`&&this.processDefineName(e,a,r,n.sheets)}r.length>0&&(n.names=r)}processWorkbookPr(e,t,n){t&&(e.copyFromAttribute(t,`date1904`,n,`date1904`,e.BOOLEAN_COPY),e.copyFromAttribute(t,`codeName`,n,`codeName`),e.copyFromAttribute(t,`updateLinks`,n,`updateLinks`))}afterVisit(e,t,n){}},me=class{visit(e,t,n){let r={};return e.copyFromAttribute(t,`ref`,n,`r`),e.getVisitorParamsState().set(`ref`,n.r),n.v=r,e.copyFromAttribute(t,`name`,r),e.copyFromAttribute(t,`displayName`,r),e.copyFromAttribute(t,`headerRowCount`,r,`headerRowCount`,e.INT_COPY),e.copyFromAttribute(t,`totalsRowCount`,r,`totalsRowCount`,e.INT_COPY),this.processTableColumns(e,t,r),this.processTableStyleInfo(e,t,r),e.copyFromAttribute(t,`id`,r),e.copyFromAttribute(t,`comment`,r,`description`),e.copyFromAttribute(t,`connectionId`,r,`connectionId`,e.INT_COPY),e.copyFromAttribute(t,`tableType`,r),e.copyFromAttribute(t,`published`,r,`published`,e.BOOLEAN_COPY),e.copyFromAttribute(t,`insertRow`,r,`insertRow`,e.BOOLEAN_COPY),e.copyFromAttribute(t,`insertRowShift`,r,`insertRowShift`,e.BOOLEAN_COPY),r.totalsRowShown=t.getAttribute(`totalsRowShown`)!==`0`,r}afterVisit(e,t,n){let r=n.v;if(e.evaluate(`autoFilter`,t)){if(Array.isArray(r.hiddenButtons)){let e=r.hiddenButtons.length;e===0?r.hiddenButtons=!1:e===r.columns?.length&&(r.hiddenButtons=!0)}}else r.hiddenButtons=!0,r.showButtons=!1;return r}processTableStyleInfo(e,t,n){if(!t)return;let r=t.childNodes,i={},a=r.length;for(let t=0;t<a;t++){let n=r.item(t);n.nodeType===1&&n.localName===`tableStyleInfo`&&(e.copyFromAttribute(n,`name`,i),e.copyFromAttribute(n,`showColumnStripes`,i,`showColumnStripes`,e.BOOLEAN_COPY),e.copyFromAttribute(n,`showFirstColumn`,i,`showFirstColumn`,e.BOOLEAN_COPY),e.copyFromAttribute(n,`showLastColumn`,i,`showLastColumn`,e.BOOLEAN_COPY),e.copyFromAttribute(n,`showRowStripes`,i,`showRowStripes`,e.BOOLEAN_COPY))}Object.keys(i).length>0&&(n.style=i)}processTableColumn(e,t,n){if(!t)return null;let r=t.childNodes,i=r.length;for(let t=0;t<i;t++){let i=r.item(t);if(i.nodeType===1&&i.localName===`tableColumn`){let t={};e.copyFromAttribute(i,`name`,t),e.copyFromAttribute(i,`id`,t),e.copyFromAttribute(i,`uniqueName`,t),e.copyFromAttribute(i,`queryTableFieldId`,t),e.copyFromAttribute(i,`totalsRowLabel`,t);let r=i.getAttribute(`totalsRowFunction`);if(r!==null)if(r===`custom`){let n=e.evaluate(`totalsRowFormula`,i);n&&(t.totalsRowFormula=n.textContent)}else t.totalsRowFormula=r;e.copyFromAttribute(i,`totalsRowLabel`,t);let a=e.evaluate(`calculatedColumnFormula`,i);a?.textContent&&(t.calculatedColumnFormula=a.textContent),n.push(t)}}return n}processTableColumns(e,t,n){let r=t.childNodes,i=[],a=r.length;for(let t=0;t<a;t++){let n=r.item(t);n.nodeType===1&&n.localName===`tableColumns`&&this.processTableColumn(e,n,i)}i.length>0&&(n.columns=i)}},he=class{visit(e,t,n){let r=e.getVisitorParamsState().get(`ref`);if(r){let n=e.getVisitorParamsState().get(`descriptions`);n&&(n.add(r,t.getAttribute(`altText`)),n.add(r,t.getAttribute(`altTextSummary`)))}return e.copyFromAttribute(t,`altText`,n),e.copyFromAttribute(t,`altTextSummary`,n),n}},ge=class{visit(e,t,n){let r=t.childNodes,i=r.length,a=null;for(let e=0;e<i;e++){let t=r.item(e);if(t.nodeType===1){t.localName===`externalBook`&&(a=t);break}}if(!a)return n;t.getAttribute(`mc:Ignorable`)&&(n.mceIgnorable=!0);let o=a.getAttribute(`r:id`);o&&(n.__bookRelId=o);let s=this._findAbsoluteUrlRelId(a);return s&&(n.__absoluteUrlRelId=s),n.sheetNames=[],this.processSheetNames(e,a,n),this.processDefinedNames(e,a,n),this.processSheetDataSet(e,a,n),n}processSheetNames(e,t,n){let r=this._findChild(t,`sheetNames`);if(!r)return;let i=r.childNodes,a=i.length;for(let e=0;e<a;e++){let t=i.item(e);t.nodeType===1&&t.localName===`sheetName`&&n.sheetNames.push(t.getAttribute(`val`)??``)}}processDefinedNames(e,t,n){let r=this._findChild(t,`definedNames`);if(!r)return;let i=[],a=r.childNodes,o=a.length;for(let e=0;e<o;e++){let t=a.item(e);if(t.nodeType!==1||t.localName!==`definedName`)continue;let n=t.getAttribute(`name`);if(!n)continue;let r={name:n,refersTo:t.getAttribute(`refersTo`)??``},o=t.getAttribute(`sheetId`);o!==null&&(r.sheetIndex=parseInt(o,10)),i.push(r)}i.length>0&&(n.definedNames=i)}processSheetDataSet(e,t,n){let r=this._findChild(t,`sheetDataSet`);if(!r)return;let i=[],a=r.childNodes,o=a.length;for(let t=0;t<o;t++){let n=a.item(t);if(n.nodeType!==1||n.localName!==`sheetData`)continue;let r=n.getAttribute(`sheetId`);if(r===null)continue;let o=this.processSheetData(e,n);o.sheetIndex=parseInt(r,10),n.getAttribute(`refreshError`)===`1`&&(o.refreshError=!0),i.push(o)}i.length>0&&(n.sheetDataSet=i)}processSheetData(e,t){let n=new i.Tuple.Builder,r=t.childNodes,a=r.length;for(let e=0;e<a;e++){let t=r.item(e);if(t.nodeType!==1||t.localName!==`row`)continue;let a=t.childNodes,o=a.length;for(let e=0;e<o;e++){let t=a.item(e);if(t.nodeType!==1||t.localName!==`cell`)continue;let r=t.getAttribute(`r`);if(!r)continue;let o=i.AddressUtils.fastStringToCell(r);if(o?.rowIndex===void 0||o?.colIndex===void 0)continue;let s=this._readCellValue(t);s!==void 0&&n.pushAt(o.rowIndex,o.colIndex,s)}}return{sheetIndex:-1,data:n.build()?.tuples??[]}}_readCellValue(e){let t=this._findChild(e,`v`)?.textContent?.trim();if(t!==void 0&&t!==``)switch(e.getAttribute(`t`)){case null:case`n`:return parseFloat(t);case`b`:return t===`1`||t===`true`;case`str`:default:return t;case`e`:{let e=i.FormulaError.getBuiltInByLabel(t);return e?{t:`e`,v:e.getCode()}:t}}}_findChild(e,t){let n=e.childNodes,r=n.length;for(let e=0;e<r;e++){let r=n.item(e);if(r.nodeType===1&&r.localName===t)return r}return null}_findAbsoluteUrlRelId(e){let t=this._findChild(e,`alternateUrls`);return t?this._findChild(t,`absoluteUrl`)?.getAttribute(`r:id`)??null:null}},_e=class{visit(e,t,n){e.copyFromAttribute(t,`name`,n),e.copyFromAttribute(t,`sourceName`,n);let r=e.evaluate(`*/tableSlicerCache`,t);return r?(e.copyFromAttribute(r,`tableId`,n),e.copyFromAttribute(r,`column`,n,`columnId`),e.copyFromAttribute(r,`crossFilter`,n),n):(e.warn(`A slicer names no table; it was not imported.`,{onceKey:`xlsx.slicer.cacheDefinition`}),n)}},ve=class{visit(e,t,n){let r=n.slicers;r||(r={},n.slicers=r);let i=t.childNodes,a=i.length;for(let t=0;t<a;t++){let n=i.item(t);n.nodeType===1&&n.localName===`slicer`&&this.processSlicer(e,n,r)}return r}processSlicer(e,t,n){if(!t)return;let r={};n[t.getAttribute(`name`)]=r;let i=t.getAttribute(`cache`),a=e.getVisitorParamsState().get(`slicerCaches`);if(i){let e=a.get(i);e&&(r.columnId=e.columnId,r.tableId=e.tableId)}e.copyFromAttribute(t,`caption`,r),e.copyFromAttribute(t,`startItem`,r,`startItem`,e.INT_COPY),e.copyFromAttribute(t,`columnCount`,r,`columnCount`,e.INT_COPY),e.copyFromAttribute(t,`showCaption`,r,`showCaption`,e.BOOLEAN_COPY),e.copyFromAttribute(t,`level`,r,`level`,e.INT_COPY),e.copyFromAttribute(t,`style`,r),e.copyFromAttribute(t,`locked`,r,`locked`,e.BOOLEAN_COPY),e.copyFromAttribute(t,`rowHeight`,r,`rowHeight`,e.INT_COPY)}},ye=class{visit(e,t,n){return n}},Q=class{visit(e,t,n){if(!t)return;let r={};return e.copyFromAttribute(t,`editAs`,r,`anchorType`),r.anchor={},t.localName===`absoluteAnchor`?(r.anchorType=`absolute`,this.processAbsoluteCoord(e,e.evaluate(`xdr:pos`,t),r.anchor,`from`,`x`,`y`),this.processAbsoluteCoord(e,e.evaluate(`xdr:ext`,t),r.anchor,`to`,`cx`,`cy`)):t.localName===`oneCellAnchor`?(this.processOffsetCoord(e,e.evaluate(`from`,t),r.anchor,`from`),this.processAbsoluteCoord(e,e.evaluate(`xdr:ext`,t),r.anchor,`to`,`cx`,`cy`)):(this.processOffsetCoord(e,e.evaluate(`from`,t),r.anchor,`from`),this.processOffsetCoord(e,e.evaluate(`to`,t),r.anchor,`to`)),n.movables||=[],n.movables.push(r),r}processAbsoluteCoord(e,t,r,i,a,o){if(!t)return;let s={x:0,y:0};return s.x=n.s(t.getAttribute(a)),s.y=n.s(t.getAttribute(o)),i===`from`?r.tl=s:r.br=s,r}processOffsetCoord(e,t,r,i){if(!t)return;let a={c:0,r:0,x:0,y:0};return e.evaluate(`col`,t)&&(a.c=parseInt(e.evaluate(`col`,t).textContent)),e.evaluate(`row`,t)&&(a.r=parseInt(e.evaluate(`row`,t).textContent)),e.evaluate(`colOff`,t)&&(a.x=n.s(e.evaluate(`colOff`,t).textContent)),e.evaluate(`rowOff`,t)&&(a.y=n.s(e.evaluate(`rowOff`,t).textContent)),i===`from`?r.tl=a:r.br=a,r}},be=class extends A{visit(e,t,n){if(!t)return;n=super.visit(e,t,n);let r=e.evaluate(`nvGraphicFramePr/cNvGraphicFramePr`,t);if(r){let t=e.evaluate(`graphicFrameLocks`,r);if(t){t.hasAttribute(`noChangeAspect`)&&(n.lockAspect=t.getAttribute(`noChangeAspect`)===`1`);let e={};Object.keys(e).length>0&&(n.locks=e)}}let i={type:`graphicFrame`,json:{}},a=e.evaluate(`graphic/graphicData`,t).childNodes,o=a.length;for(let n=0;n<o;n++){let r=a.item(n);if(r.nodeType===1)try{let n=r.localName;n===`chart`?n=`chart`:n===`slicer`&&(n=`slicer`),i.type=n;let a=r.getAttribute(`r:id`);if(n===`chart`&&a){let n=e.evaluate(`*/cNvPr`,t);n?.item&&(n=n.item(0));let r=n?.getAttribute?.(`id`),o=r?parseInt(r,10):void 0;i.json={xml:e.serializeElement(t)??void 0,sourceId:o===void 0||isNaN(o)?void 0:o,part:e.readEmbeddedPart(a)??void 0}}else a&&(i.json=e.getRef(a))}catch(t){e.warn(`Unable to read a graphic frame: ${t?.message??t}`,{onceKey:`xlsx.drawing.graphicFrame`})}}return i&&this.setContent(n,i),i}},$=j,xe=class extends A{visit(e,t,n){if(!t)return;let r=super.visit(e,t,n),i=e.evaluate(`nvPicPr/cNvPicPr`,t);if(i){e.copyFromAttribute(t,`preferRelativeResize`,r,`preferRelativeResize`,e.BOOLEAN_COPY);let n=e.evaluate(`picLocks`,i);if(n){n.hasAttribute(`noChangeAspect`)&&(r.lockAspect=n.getAttribute(`noChangeAspect`)===`1`);let t={};e.copyFromAttribute(n,`noChangeArrowheads`,r,`noChangeArrowheads`,e.BOOLEAN_COPY),e.copyFromAttribute(n,`noChangeShapeType`,r,`noChangeShapeType`,e.BOOLEAN_COPY),e.copyFromAttribute(n,`noEditPoints`,r,`noEditPoints`,e.BOOLEAN_COPY),e.copyFromAttribute(n,`noAdjustHandles`,r,`noAdjustHandles`,e.BOOLEAN_COPY),e.copyFromAttribute(n,`noCrop`,r,`noCrop`,e.BOOLEAN_COPY),e.copyFromAttribute(n,`noGrp`,r,`noGrp`,e.BOOLEAN_COPY),e.copyFromAttribute(n,`noMove`,r,`noMove`,e.BOOLEAN_COPY),e.copyFromAttribute(n,`noResize`,r,`noResize`,e.BOOLEAN_COPY),e.copyFromAttribute(n,`noRot`,r,`noRot`,e.BOOLEAN_COPY),e.copyFromAttribute(n,`noSelect`,r,`noSelect`,e.BOOLEAN_COPY),Object.keys(t).length>0&&(r.locks=t)}}let a=e.evaluate(`blipFill/blip`,t),o;if(a){let t;if(t=a.getAttribute(`r:embed`)??a.getAttribute(`embed`),t||=a.getAttribute(`r:link`)??a.getAttribute(`link`),!t)return void e.warn(`A picture names no image; it was not imported.`,{onceKey:`xlsx.drawing.picture.noRel`});o=e.getRef(t,!0)}let s={resId:o};return this.setContent(n,{type:`picture`,json:s}),r}},Se=class extends j{visit(e,t,n){if(!t)return;let r=n;n=super.visit(e,t,n);let i=e.evaluate(`nvGrpSpPr/cNvGrpSpPr`,t);if(i){let t=e.evaluate(`grpSpLocks`,i);if(t){t.hasAttribute(`noChangeAspect`)&&(n.lockAspect=t.getAttribute(`noChangeAspect`)===`1`);let e={};Object.keys(e).length>0&&(n.locks=e)}}e.warn(`Unable to import '${r.content?.name}', group shapes are not supported.`);let a={};return n.content={type:`grpSp`,json:a},a}},Ce=class extends j{visit(e,t,n){if(!t)return;n=super.visit(e,t,n);let r=e.evaluate(`nvCxnSpPr/cNvCxnSpPr`,t);if(r){let t=e.evaluate(`cxnSpLocks`,r);if(t){t.hasAttribute(`noChangeAspect`)&&(n.lockAspect=t.getAttribute(`noChangeAspect`)===`1`);let e={};Object.keys(e).length>0&&(n.locks=e)}}let i=e.evaluate(`*/cNvPr`,t);i?.item&&(i=i.item(0));let a=i?.getAttribute?.(`id`),o=a?parseInt(a,10):void 0,s={type:`cxnSp`,xml:e.serializeElement(t)??void 0,sourceId:o===void 0||isNaN(o)?void 0:o};return n.content={type:`cxnSp`,json:s},s}},we=class{visit(e,t,n){let r=[],i=new Map,a={cells:[],values:[]},o=t.childNodes;for(let e=0;e<o.length;e++){let t=o.item(e);if(t.nodeType===1)switch(t.localName){case`metadataTypes`:this._parseMetadataTypes(t,r,i);break;case`futureMetadata`:this._attachFutureMetadata(t,i);break;case`cellMetadata`:this._resolveBlocks(t,r,a.cells);break;case`valueMetadata`:this._resolveBlocks(t,r,a.values)}}return n.metadata=a,a}_parseMetadataTypes(e,t,n){let r=e.childNodes;for(let e=0;e<r.length;e++){let i=r.item(e);if(i.nodeType===1&&i.localName===`metadataType`){let e=this._parseMetadataType(i);t.push(e),n.set(e.name,e)}}}_parseMetadataType(e){let t={name:e.getAttribute(`name`)??``,_blocks:[]},n=e.getAttribute(`minSupportedVersion`);n!=null&&(t.minSupportedVersion=Number(n));for(let n of[`copy`,`pasteAll`,`pasteValues`,`merge`,`splitFirst`,`splitAll`,`rowColShift`,`clearFormats`,`clearComments`,`assign`,`coerce`,`cellMeta`,`adjust`,`trans`,`delete`,`edit`])e.getAttribute(n)===`1`&&(t[n]=!0);return t}_attachFutureMetadata(e,t){let n=e.getAttribute(`name`)??``,r=t.get(n);if(!r)return;let i=e.childNodes;for(let e=0;e<i.length;e++){let t=i.item(e);t.nodeType===1&&t.localName===`bk`&&r._blocks.push(this._parseFutureBlock(t))}}_parseFutureBlock(e){let t={},n=e.childNodes;for(let e=0;e<n.length;e++){let r=n.item(e);if(r.nodeType!==1||r.localName!==`extLst`)continue;let i=r.childNodes;for(let e=0;e<i.length;e++){let n=i.item(e);if(n.nodeType!==1||n.localName!==`ext`)continue;let r=n.childNodes;for(let e=0;e<r.length;e++){let n=r.item(e);n.nodeType===1&&(n.localName===`dynamicArrayProperties`?(t.fDynamic=n.getAttribute(`fDynamic`)===`1`,t.fCollapsed=n.getAttribute(`fCollapsed`)===`1`):n.localName===`rvb`&&(t.richValueIndex=Number(n.getAttribute(`i`)??`0`)))}}}return t}_resolveBlocks(e,t,n){let r=e.childNodes;for(let e=0;e<r.length;e++){let i=r.item(e);i.nodeType===1&&i.localName===`bk`&&n.push(this._resolveBlock(i,t))}}_resolveBlock(e,t){let n=new Map,r=e.childNodes;for(let e=0;e<r.length;e++){let i=r.item(e);if(i.nodeType!==1||i.localName!==`rc`)continue;let a=Number(i.getAttribute(`t`)),o=Number(i.getAttribute(`v`)),s=t[a-1];if(!s)continue;let{_blocks:c,...l}=s,u={...l};for(let e of Object.keys(u))u[e]===void 0&&delete u[e];let d=c[o];d&&(d.fDynamic!==void 0&&(u.fDynamic=d.fDynamic,u.fCollapsed=d.fCollapsed??!1),d.richValueIndex!==void 0&&(u.richValueIndex=d.richValueIndex)),n.set(s.name,u)}return n}},Te=class{visit(e,t,n){let r=e.getVisitorParamsState().get(M);r||(r=[],e.getVisitorParamsState().set(M,r));let i=t.childNodes,a=i.length;for(let t=0;t<a;t++){let n=i.item(t);if(n.nodeType===1&&n.localName===`s`){let t={type:n.getAttribute(`t`)??`n`,keys:[]};this.processKeys(e,n,t),r.push(t)}}return n.richTypes=r,r}processKeys(e,t,n){let r=t.childNodes,i=r.length,a=n.keys;for(let e=0;e<i;e++){let t=r.item(e);if(t.nodeType===1&&t.localName===`k`){let e=t.getAttribute(`n`),n=t.getAttribute(`t`);a.push([e,n])}}}},Ee=class{visit(e,t,n){let r=e.getVisitorParamsState().get(`richTypes`);if(!r)return void e.warn(`RichValueFound but not type.`);let i=e.getVisitorParamsState().get(N);i||(i=[],e.getVisitorParamsState().set(N,i));let a=t.childNodes,o=a.length;for(let t=0;t<o;t++){let n=a.item(t);if(n.nodeType===1&&n.localName===`rv`){let t=r[n.getAttribute(`s`)],a={type:t.type};this.processValues(e,n,a,t);let o=this.mapType(e,a);i.push(o)}}return n.richData=i,i}mapType(e,t){if(t.type===`_error`){let e=t.errorType;if(e)try{t=i.FormulaError.getBuiltInByCode(e+1)??i.FormulaError.BuiltIn.Unknown}catch{}}return t}processValues(e,t,n,r){let i=t.childNodes,a=i.length;r.type;let o=r.keys;for(let t=0;t<a;t++){let r=i.item(t);if(r.nodeType===1&&r.localName===`v`){let i=o[t];if(!i)return void e.warn(`Invalid richData`);let a=i[0],s=i[1],c=r.textContent;s===`i`&&(c=Number(c)),n[a]=c}}}},De=class{visit(e,t,n){if(!t)return;let r=[];this.processAuthors(e,e.evaluate(`authors`,t),r),r.length>0&&(n.authors=r);let i=[];return n.comments=i,i}processAuthors(e,t,n){if(!t)return;let r=t.childNodes,i=r.length;for(let e=0;e<i;e++){let t=r.item(e);if(t.nodeType===1&&t.localName===`author`){let e=t.firstChild;e&&e.nodeType===3&&n.push(e.textContent)}}}},Oe=class{visit(e,t,n){if(!t)return;let r=t.getAttribute(`ref`);if(!r)return;let i={content:``};if(t.hasAttribute(`authorId`)){let e=parseInt(t.getAttribute(`authorId`),10);isNaN(e)||(i.authorId=e)}return i.content=function(e){if(!e)return``;let t=[],n=!0,r=e.childNodes;for(let e=0;e<r.length;e++){let i=r.item(e);if(i.nodeType===1){if(i.localName===`t`)t.push({text:i.textContent??``});else if(i.localName===`r`){let e={text:``},r=i.childNodes;for(let t=0;t<r.length;t++){let n=r.item(t);if(n.nodeType===1){if(n.localName===`t`)e.text+=n.textContent??``;else if(n.localName===`rPr`){let t=ne(n);t&&(e.font=t)}}}e.font&&(n=!1),t.push(e)}}}return t.length===0?e.textContent??``:n?t.map(e=>e.text).join(``):{runs:t}}(e.evaluate(`text`,t)),n.push({r,v:i}),i}},ke=class{visit(e,t,n){if(!t)return;let r=[];return n.comments=r,r}},Ae=class{visit(e,t,r){if(!t)return;let i={};e.copyFromAttribute(t,`id`,i,`id`,n.m);let a=t.getAttribute(`ref`);e.copyFromAttribute(t,`personId`,i,`personId`,n.m),e.copyFromAttribute(t,`parentId`,i,`parentId`,n.m);let o=t.getAttribute(`dT`);o&&(i.dt=function(e){let t=/^(.*T\d{2}:\d{2}:\d{2})(?:\.(\d+))?(Z|[+-]\d{2}:?\d{2})?$/i.exec(e.trim());if(!t)return e;let[,n,r,i]=t;return`${n}${r?`.${(r+`00`).substring(0,3)}`:``}${i??`Z`}`}(o)),t.hasAttribute(`done`)&&(i.done=n.a(t.getAttribute(`done`)));let s=function(e){let t,r=e.childNodes;for(let e=0;e<r.length;e++){let i=r.item(e);if(i.nodeType!==1||i.localName!==`mentions`)continue;let a=i.childNodes;for(let e=0;e<a.length;e++){let r=a.item(e);if(r.nodeType!==1||r.localName!==`mention`)continue;let i=r.getAttribute(`mentionId`),o=r.getAttribute(`mentionpersonId`);if(!i||!o)continue;let s={id:n.m(i),personId:n.m(o)},c=parseInt(r.getAttribute(`startIndex`)??``,10);isNaN(c)||(s.startIndex=c);let l=parseInt(r.getAttribute(`length`)??``,10);isNaN(l)||(s.length=l),(t??=[]).push(s)}}return t}(t);return s&&(i.mentions=s),r.push({r:a,v:i}),i}},je=class{visit(e,t,r){let i=[],a=t.childNodes,o=a.length;for(let t=0;t<o;t++){let r=a.item(t);if(r.nodeType===1&&r.localName===`person`){let t={};e.copyFromAttribute(r,`id`,t,`id`,n.m),e.copyFromAttribute(r,`displayName`,t),e.copyFromAttribute(r,`userId`,t,`userId`,n.m),e.copyFromAttribute(r,`providerId`,t),i.push(t)}}return i.length>0&&(r.persons=i),i}},Me=class{constructor(e,t){this.path=e,this.visitor=t}};exports.DOMTransformer=class{constructor(){this.visitorsByXmlTagName=new Map,this.scopedVisitorsByXmlTagName=new Map,this.visitorParamsState=null,this.registerVisitor(`Relationships`,new re),this.registerVisitor(`cp:coreProperties`,new ie),this.registerVisitor(`Properties`,new F),this.registerVisitor(`spPr`,new R),this.registerVisitor(`txBody`,new K),this.registerVisitor(`txPr`,new K),this.registerVisitor(`c:chartSpace`,new I),this.registerVisitor(`c:plotArea`,new L),this.registerVisitor(`c:barChart`,new z),this.registerVisitor(`c:doughnutChart`,new B),this.registerVisitor(`c:lineChart`,new B),this.registerVisitor(`c:ofPieType`,new B),this.registerVisitor(`c:pieChart`,new B),this.registerVisitor(`c:scatterChart`,new B),this.registerVisitor(`c:barChart`,new V(`dataLabels`),`dLbls`),this.registerVisitor(`c:doughnutChart`,new V(`dataLabels`),`dLbls`),this.registerVisitor(`c:lineChart`,new V(`dataLabels`),`dLbls`),this.registerVisitor(`c:ofPieType`,new V(`dataLabels`),`dLbls`),this.registerVisitor(`c:pieChart`,new V(`dataLabels`),`dLbls`),this.registerVisitor(`c:scatterChart`,new V(`dataLabels`),`dLbls`),this.registerVisitor(`c:ser`,new H),this.registerVisitor(`c:dPt`,new U),this.registerVisitor(`c:marker`,new W),this.registerVisitor(`c:catAx`,new G),this.registerVisitor(`c:valAx`,new G),this.registerVisitor(`c:dateAx`,new G),this.registerVisitor(`c:majorGridlines`,new b(`gridLinesMajor`)),this.registerVisitor(`c:minorGridlines`,new b(`gridLinesMinor`)),this.registerVisitor(`c:chartSpace`,null,`txPr`),this.registerVisitor(`c:catAx`,new K(`labels.text`),`txPr`),this.registerVisitor(`c:valAx`,new K(`labels.text`),`txPr`),this.registerVisitor(`c:dateAx`,new K(`labels.text`),`txPr`),this.registerVisitor(`c:legend`,new J),this.registerVisitor(`c:legend`,new K(`labels.text`),`txPr`),this.registerVisitor(`c:legendEntry`,new q),this.registerVisitor(`c:ser`,new Y,`extLst/ext/invertSolidFillFmt/spPr`),this.registerVisitor(`c:ser`,new V(`labels`),`dLbls`),this.registerVisitor(`c:dLbl`,new V(`points`)),this.registerVisitor(`c:title`,new X),this.registerVisitor(`c:title`,null,`tx/rich`),this.registerVisitor(`c:title`,null,`txPr`),this.registerVisitor(`c:layout`,new ae),this.registerVisitor(`c:dispUnits`,new b(`dispUnits`)),this.registerVisitor(`c:dispUnitsLbl`,new X(`displayUnitsLabel`)),this.registerVisitor(`c:dispUnitsLbl`,new K,`tx/rich`),this.registerVisitor(`a:theme`,new oe),this.registerVisitor(`a:theme`,new se,`themeElements/clrScheme`),this.registerVisitor(`a:theme`,new ce,`themeElements/fontScheme`),this.registerVisitor(`a:theme`,new le,`themeElements/fmtScheme`),this.registerVisitor(`autoFilter`,new de),this.registerVisitor(`sortState`,new fe),this.registerVisitor(`s:workbook`,new pe),this.registerVisitor(`styleSheet`,new Z),this.registerVisitor(`x14:table`,new he),this.registerVisitor(`table`,new me),this.registerVisitor(`externalLink`,new ge),this.registerVisitor(`hlinkClick`,new ue),this.registerVisitor(`wsDr`,new ye),this.registerVisitor(`twoCellAnchor`,new Q),this.registerVisitor(`oneCellAnchor`,new Q),this.registerVisitor(`absoluteAnchor`,new Q),this.registerVisitor(`graphicFrame`,new be),this.registerVisitor(`sp`,new $),this.registerVisitor(`grpSp`,new Se),this.registerVisitor(`cxnSp`,new Ce),this.registerVisitor(`pic`,new xe),this.registerVisitor(`metadata`,new we),this.registerVisitor(`rvStructures`,new Te),this.registerVisitor(`rvData`,new Ee),this.registerVisitor(`comments`,new De),this.registerVisitor(`comment`,new Oe),this.registerVisitor(`ThreadedComments`,new ke),this.registerVisitor(`threadedComment`,new Ae),this.registerVisitor(`threadedComment`,new K(`content`),`text`),this.registerVisitor(`personList`,new je),this.registerVisitor(`slicerCacheDefinition`,new _e),this.registerVisitor(`slicers`,new ve)}registerVisitor(e,t,n=null){e.indexOf(`:`)===-1&&(e=`*:`+e);let r=e.split(`:`),i=r.length>1?r[1]:r[0];if(!n)return this.visitorsByXmlTagName.set(i,t),void this.visitorsByXmlTagName.set(e,t);let a=this.scopedVisitorsByXmlTagName.get(i);a||(a=[],this.scopedVisitorsByXmlTagName.set(i,a),this.scopedVisitorsByXmlTagName.set(e,a)),a.push(new Me(n,t))}parseDxf(e,t=``,n=r.CommonUtils.EmptyObject){this.visitorParamsState||=new Map;let i=this.visitorParamsState,a=i.get(`processingDXFs`);i.set(`processingDXFs`,!0);try{let r=new u(null,this,`/dxf`,e,{},t,n),i={};return new Z().processDXF(r,e,i),i}finally{a===void 0?i.delete(`processingDXFs`):i.set(`processingDXFs`,a)}}getVisitorParamsState(){return this.visitorParamsState}transform(e,t,n=r.CommonUtils.EmptyObject){let i=e.documentElement;this.visitorParamsState&&!n?.paramMap||(this.visitorParamsState=n?.paramMap??new Map);let a={},o=this.visitorsByXmlTagName.get(i.nodeName);if(o||=this.visitorsByXmlTagName.get(i.localName),!o)throw Error(`A visitor for the root element: '${i.nodeName}' or '${i.localName}' must be registered.`);let s=`/`+i.localName,c=new u(null,this,s,i,a,t,n),l=[];this._doWalk(o,c,l,i,a,t,n);let d=l.length;for(let e=0;e<d;e++){let t=l[e];try{t.visitor?.afterVisit?.(t.context,t.elemParent,t.jsonParent)}catch(e){t.context.warn(`Unable to finish reading '${t.context.getPath()}': ${e?.message??e}`,{onceKey:`xlsx.transform.afterVisit`})}}return a}_walkScoped(e,t,n,r,i,a,o){let s=this.scopedVisitorsByXmlTagName.get(e),c=s?s.length:0;for(let l=0;l<c;l++){let c=s[l],d=null;try{d=t.evaluate(c.path,r)}catch{t.warn(`Invalid path '${c.path}' for '${e}'.`,{onceKey:`xlsx.transform.invalidPath`})}if(!d)continue;let f=e=>{let s=e.localName,l=e.parentNode;for(;l&&l!==r;)s=l.localName+`/`+s,l=l.parentNode;let d=t.getPath()+`/`+s;if(c.visitor){let r=new u(t,this,d,t.getElemRoot(),t.getJsonRoot(),a,o);this._doWalk(c.visitor,r,n,e,i,a,o)}};if(d.length>0){let e=d,t=e.length;for(let n=0;n<t;n++)f(e.item(n))}else f(d)}}_doWalk(e,t,n,r,i,a,o){let s=null;e&&(n.push({visitor:e,context:t,elemParent:r,jsonParent:i}),s=e.visit(t,r,i)),s||=i;let c=r.localName;this._walkScoped(c,t,n,r,s,a,o);let l=this.visitorsByXmlTagName,d=t.getElemRoot(),f=t.getJsonRoot(),p=r.childNodes,m=p.length;for(let e=0;e<m;e++){let r=p.item(e);if(r.nodeType!==1)continue;let c=r,m=c.nodeName,h=l.get(m);h||=(m=c.localName,l.get(m));let g=t.getPath()+`/`+m,_=new u(t,this,g,d,f,a,o);this._doWalk(h,_,n,c,s??i,a,o)}return s}},exports.ExecutionContext=u,Object.defineProperty(exports,"NumberUtils",{enumerable:!0,get:function(){return n.r}}),Object.defineProperty(exports,"VisitorUtils",{enumerable:!0,get:function(){return d}});
@@ -0,0 +1,2 @@
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,`&amp;`).replace(/</g,`&lt;`).replace(/>/g,`&gt;`),ve=e=>Q(e).replace(/"/g,`&quot;`),$=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(()=>{})}};