@sheetxl/studio-vanilla 0.3.23 → 0.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/browser/cjs/{Ck8EsgvaXxoWGWIo.cjs → BCcMJErjUPdFrc0x.cjs} +1 -1
- package/browser/cjs/{cAwpZ8WIPtGrZO6Z.cjs → BK91sl4LW8-xO31z.cjs} +2 -2
- package/browser/cjs/{BZzMK8bX8rQGjjSF.cjs → BSje_Dv0w746XJ2i.cjs} +1 -1
- package/browser/cjs/{BV-ZJjmj_rGxcdgT.cjs → BT_PeMxZAeqrhLnV.cjs} +2 -2
- package/browser/cjs/{D2EeD2h3tDPA2kQP.cjs → BThtQWqe25ldI7lD.cjs} +2 -2
- package/browser/cjs/{DN04BBJX0G6Imvov.cjs → BoadQhF1bWmocz8U.cjs} +1 -1
- package/browser/cjs/{BV0L9gP18W00UBzV.cjs → Bpv1T1XshdqAwoiB.cjs} +2 -2
- package/browser/cjs/{CzvztZ4uxzxXxoJz.cjs → C-Q87xIu-cX209C7.cjs} +1 -1
- package/browser/cjs/{CrvRa0OxpqstjOap.cjs → CL1hFRnyn2F6XCp7.cjs} +3 -3
- package/browser/cjs/{B6jW4__3xi32ba5Z.cjs → COGHRF-aTQc10NMv.cjs} +1 -1
- package/browser/cjs/{CYXbh4ysBOipBqkj.cjs → CO_eB4oyDC1un47h.cjs} +2 -2
- package/browser/cjs/{x3raNMkDfaCh0EE2.cjs → CTkqnDY0cAnfopny.cjs} +2 -2
- package/browser/cjs/{1YHhQAyuEBCdnxLq.cjs → CV3lVli7wB6pyrYD.cjs} +8 -8
- package/browser/cjs/{BfF2oDUTv3b16mah.cjs → CXPgCPHgj83kZHZS.cjs} +2 -2
- package/browser/cjs/{BclC9iWDSimHqVjL.cjs → Csc4CJh9BMtFuIOu.cjs} +1 -1
- package/browser/cjs/{GIDXrrerjDR3B4EL.cjs → CvxrITsNB44QyJ9Z.cjs} +2 -2
- package/browser/cjs/{s3GJkzAMIO6cYaSZ.cjs → DBT-mwyZGVgx4jJv.cjs} +2 -2
- package/browser/cjs/{Y4LVpioiIg6LVL0s.cjs → DF77um3uIPohBL8j.cjs} +1 -1
- package/browser/cjs/{DH0zi_Wry2AW6ZUU.cjs → DMZaCVvlvSX1mHkh.cjs} +2 -2
- package/browser/cjs/{B8jcrNkTeVeivhoT.cjs → DNfPCzNGwPUADDOT.cjs} +2 -2
- package/browser/cjs/{CnnLV8wvpNYrxBu8.cjs → DaFwh8KAofYPK_94.cjs} +2 -2
- package/browser/cjs/{BvyNLM_Rh4usHxN8.cjs → Dc6_zOXYCt5wJcZg.cjs} +3 -3
- package/browser/cjs/{9UJAgr17pC52FvNS.cjs → DkbfvnJxYGRpjMfy.cjs} +1 -1
- package/browser/cjs/{BRgJMarh4Bp58iM3.cjs → FF67xyIMOWlaEe7x.cjs} +2 -2
- package/browser/cjs/{t1zHQhUwG57XvWD1.cjs → dSQsUiYfKgCeXIkX.cjs} +1 -1
- package/browser/cjs/{FG67s6xYNluXdXvC.cjs → geTLbkBKwvWbKIYJ.cjs} +4 -4
- package/browser/cjs/index.cjs +2 -2
- package/{cdn/assets/DvpoYWUaPeQoTmTt.js → browser/esm/-j_9Ce39odqMc8Bh.mjs} +2 -2
- package/{cdn/assets/CRMhlvk60mWCKMAw.js → browser/esm/B5i8IwrKY3OiZJBQ.mjs} +2 -2
- package/{cdn/assets/CZGBrCOe8WBKcNj2.js → browser/esm/B9702_wfDLgEI7Z1.mjs} +2 -2
- package/{cdn/assets/2x8k8K3PHoeCES5p.js → browser/esm/B9YiaC61ljTEWAMW.mjs} +1 -1
- package/{cdn/assets/DkbJje9GbsmAU3p5.js → browser/esm/BHTodxvCFyYSLjj-.mjs} +2 -2
- package/{cdn/assets/CouiAwxaYXEQB9xs.js → browser/esm/BTP072wnxaSWJoc2.mjs} +2 -2
- package/{cdn/assets/DAmWOxulMtL8YgeT.js → browser/esm/BY7pfm8kSm3qTcUz.mjs} +1 -1
- package/{cdn/assets/D-WM3iaA-HrrxXg1.js → browser/esm/Bxqdj3Hbaq_8AIVH.mjs} +2 -2
- package/browser/esm/{DLVmdsRKR3ocWEKQ.mjs → CMnZ-gVj_7QBy3GE.mjs} +4 -4
- package/{cdn/assets/B7RWhXxDehW7byde.js → browser/esm/CPBEWZ3HrlsvHFro.mjs} +2 -2
- package/browser/esm/{DhLjmvRs0NY_DZ3N.mjs → C_-aXLdgWQPOuQuB.mjs} +6 -6
- package/{cdn/assets/CwG8s2nD00TiULpr.js → browser/esm/CdnAckkTnCCk_Mf5.mjs} +2 -2
- package/{cdn/assets/79HTk8jodiQmQUBc.js → browser/esm/CkkFDfoYrs6MzZnr.mjs} +1 -1
- package/browser/esm/{ecAisjqAr4L--qoT.mjs → CwL_WvIy2iNvetHr.mjs} +2 -2
- package/browser/esm/{B4oAHUD6p4G0iY0R.mjs → DIR4E2mvd2q_-Wg1.mjs} +3 -3
- package/browser/esm/{DOw5s5gYeGN5hpDW.mjs → DNbFEamV7fPoOxrc.mjs} +1 -1
- package/browser/esm/{2HfJU0aTT_Bt_C1k.mjs → DRO92wDRoDLJ0hsB.mjs} +1 -1
- package/{cdn/assets/C_RhbWkUPDzsDUSf.js → browser/esm/DYB3UvB-x4KB2HwF.mjs} +1 -1
- package/{cdn/assets/CbqFTEgiQd1ugRvP.js → browser/esm/D_lYwl20Qu9Jg6XW.mjs} +2 -2
- package/browser/esm/{z-hGrI35JHwTNTP_.mjs → DxCM488RbG3D3mw6.mjs} +1 -1
- package/browser/esm/{Bxg6YZDSS6nuda9A.mjs → DxIxDdcEDTeY5cUB.mjs} +4 -4
- package/browser/esm/{BamlWP9tk7WuccNw.mjs → HCJMBSFDBg6BQE20.mjs} +1 -1
- package/browser/esm/{wDyitzkk-GLjBpKt.mjs → TEIEVAuQIZPqrJqV.mjs} +3 -3
- package/browser/esm/index.mjs +2 -2
- package/browser/esm/{Ba9xIFo2LyMdmGdT.mjs → ksQa3kzzJgw2CZI0.mjs} +9 -9
- package/browser/esm/{M2yggAbKlXnck1iP.mjs → os28-PDTJxk2ww54.mjs} +1 -1
- package/browser/esm/{ykhbZtJZIjlAsmGI.mjs → ycTg7O-H-hFgeDoE.mjs} +3 -3
- package/cdn/assets/{CpUY6_QTzTzIBkUj.js → 8ZHPKJQJ7PpoTOtV.js} +8 -8
- package/{browser/esm/CdLBlYIKGmFRx-71.mjs → cdn/assets/8Zz3Kv9SQhMsiVZO.js} +2 -2
- package/{browser/esm/2x8k8K3PHoeCES5p.mjs → cdn/assets/B9YiaC61ljTEWAMW.js} +1 -1
- package/{browser/esm/CB7Nv3qsvLLOgCdi.mjs → cdn/assets/BMQh5-KceaTPyXFb.js} +2 -2
- package/{browser/esm/-7YvwD_KW5dr0aQz.mjs → cdn/assets/BS0xi4J6qUfok6p6.js} +2 -2
- package/{browser/esm/CcrZdLwOlOP1_7C3.mjs → cdn/assets/BXAlkJ9-GXewmweA.js} +2 -2
- package/cdn/assets/{CMuuO5WoKrQkwzyW.js → BXyIF_li9FXTYtjY.js} +6 -6
- package/{browser/esm/DAmWOxulMtL8YgeT.mjs → cdn/assets/BY7pfm8kSm3qTcUz.js} +1 -1
- package/{browser/esm/DE_K645GFpnL4ivw.mjs → cdn/assets/BkXDe5SzKCNJeVes.js} +2 -2
- package/cdn/assets/{DFxHkp-72ByBi6CY.js → BrPASmAEkTJosNGX.js} +3 -3
- package/{browser/esm/D6SD1ZzY1e4yCRcj.mjs → cdn/assets/CBpN6OGwnZCHztPS.js} +2 -2
- package/cdn/assets/{D0SKJ4ubhxGJJ73M.js → CQZ8qL1DPdtTUlcG.js} +4 -4
- package/{browser/esm/CTmlmL1xPxBY8Tlb.mjs → cdn/assets/CVFODzDlZgY0MRWg.js} +2 -2
- package/cdn/assets/{A1oHO70eKwm5DSq-.js → Cev40J7_V9N1ko-c.js} +2 -2
- package/{browser/esm/79HTk8jodiQmQUBc.mjs → cdn/assets/CkkFDfoYrs6MzZnr.js} +1 -1
- package/cdn/assets/{Cv23kIrKRqUAx7-8.js → D2yHZXqGHQsuZNd9.js} +4 -4
- package/cdn/assets/{DOw5s5gYeGN5hpDW.js → DNbFEamV7fPoOxrc.js} +1 -1
- package/{browser/esm/BFEM5mApBCpmpVAr.mjs → cdn/assets/DPHn85xuMtVxOuUd.js} +2 -2
- package/{browser/esm/C89TgIJ8wXM2zzi2.mjs → cdn/assets/DP_KFVmgpbFT8kg_.js} +2 -2
- package/cdn/assets/{2HfJU0aTT_Bt_C1k.js → DRO92wDRoDLJ0hsB.js} +1 -1
- package/{browser/esm/C_RhbWkUPDzsDUSf.mjs → cdn/assets/DYB3UvB-x4KB2HwF.js} +1 -1
- package/cdn/assets/{BIfGXJcA1j3ynEgV.js → D_E8aPnewzfEqIB1.js} +3 -3
- package/cdn/assets/{4VblEpfT-PyAhsmR.js → DeC-uGBUzbt3S2Ge.js} +3 -3
- package/cdn/assets/{z-hGrI35JHwTNTP_.js → DxCM488RbG3D3mw6.js} +1 -1
- package/cdn/assets/{BamlWP9tk7WuccNw.js → HCJMBSFDBg6BQE20.js} +1 -1
- package/cdn/assets/{M2yggAbKlXnck1iP.js → os28-PDTJxk2ww54.js} +1 -1
- package/cdn/index.js +2 -2
- package/cdn/loader.js +1 -1
- package/package.json +3 -3
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
"use strict";/**
|
|
2
|
-
* @license @sheetxl/studio-vanilla - SheetXL Studio - Vanilla entry point for integrating SheetXL UI. - v0.
|
|
2
|
+
* @license @sheetxl/studio-vanilla - SheetXL Studio - Vanilla entry point for integrating SheetXL UI. - v0.4.0
|
|
3
3
|
*
|
|
4
4
|
* (C) 2025-present SheetXL Inc. & Michael T. Ford
|
|
5
5
|
* License: The license can be found at https://www.sheetxl.com/license.
|
|
6
|
-
*/Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const u=require("@sheetxl/sdk"),Ke=require("./
|
|
6
|
+
*/Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const u=require("@sheetxl/sdk"),Ke=require("./CV3lVli7wB6pyrYD.cjs"),Ye=":A-Z_a-zÀ-ÖØ-öø-˿Ͱ-ͽͿ-⁰-Ⰰ-、-豈-﷏ﷰ-�𐀀-",bs=new RegExp(`^[${Ye}][-${Ye}.0-9·̀-ͯ‿-⁀]*$`,"u");function rs(i){return i>=65&&i<=90||i>=97&&i<=122||i===58||i===95||i===8204||i===8205||i>=192&&i<=214||i>=216&&i<=246||i>=248&&i<=767||i>=880&&i<=893||i>=895&&i<=8191||i>=8304&&i<=8591||i>=11264&&i<=12271||i>=12289&&i<=55295||i>=63744&&i<=64975||i>=65008&&i<=65533||i>=65536&&i<=983039}const ts="A-Z_a-zÀ-ÖØ-öø-˿Ͱ-ͽͿ--⁰-Ⰰ-、-豈-﷏ﷰ-�𐀀-",xs=new RegExp(`^[${ts}][-${ts}.0-9·̀-ͯ‿-⁀]*$`,"u");function ns(i){return i>=65&&i<=90||i===95||i>=97&&i<=122||i>=192&&i<=214||i>=216&&i<=246||i>=248&&i<=767||i>=880&&i<=893||i>=895&&i<=8191||i>=8204&&i<=8205||i>=8304&&i<=8591||i>=11264&&i<=12271||i>=12289&&i<=55295||i>=63744&&i<=64975||i>=65008&&i<=65533||i>=65536&&i<=983039}const U=function(i){return i===32||i===10||i===13||i===9},ws=function(i){return i>=32&&i<=55295||i===10||i===13||i===9||i>=57344&&i<=65533||i>=65536&&i<=1114111},re=rs,es=function(i){return rs(i)||i>=48&&i<=57||i===45||i===46||i===183||i>=768&&i<=879||i>=8255&&i<=8256},as=[32,10,13,9],vs=bs,Ss=function(i){return i>=1&&i<=55295||i>=57344&&i<=65533||i>=65536&&i<=1114111},Cs=ns,ks=function(i){return ns(i)||i===45||i===46||i>=48&&i<=57||i===183||i>=768&&i<=879||i>=8255&&i<=8256},As=xs,ge="http://www.w3.org/XML/1998/namespace",Zt="http://www.w3.org/2000/xmlns/",Es={__proto__:null,xml:ge,xmlns:Zt},Ds={__proto__:null,amp:"&",gt:">",lt:"<",quot:'"',apos:"'"},O=-1,lt=-2,q=13,jt=33,ot=10,St=60,Gt=61,M=62,X=63,Jt=93,pe=i=>i===34||i===39,ls=[34,39],Ps=[...ls,91,M],Is=[...ls,St,Jt],Os=[Gt,X,...as],Vs=[...as,M,38,St];function ke(i,t,s){switch(t){case"xml":s!==ge&&i.fail(`xml prefix must be bound to ${ge}.`);break;case"xmlns":s!==Zt&&i.fail(`xmlns prefix must be bound to ${Zt}.`)}switch(s){case Zt:i.fail(t===""?`the default namespace may not be set to ${s}.`:`may not assign a prefix (even "xmlns") to the URI ${Zt}.`);break;case ge:switch(t){case"xml":break;case"":i.fail(`the default namespace may not be set to ${s}.`);break;default:i.fail("may not assign the xml namespace to another prefix.")}}}const Ns=i=>As.test(i),Ls=i=>vs.test(i),ss={xmldecl:"xmldeclHandler",text:"textHandler",processinginstruction:"piHandler",doctype:"doctypeHandler",comment:"commentHandler",opentagstart:"openTagStartHandler",attribute:"attributeHandler",opentag:"openTagHandler",closetag:"closeTagHandler",cdata:"cdataHandler",error:"errorHandler",end:"endHandler",ready:"readyHandler"};class Rs{constructor(t){this.i=0,this.prevI=0,this.opt=t??{},this.fragmentOpt=!!this.opt.fragment;const s=this.xmlnsOpt=!!this.opt.xmlns;if(this.trackPosition=this.opt.position!==!1,this.fileName=this.opt.fileName,s){this.nameStartCheck=Cs,this.nameCheck=ks,this.isName=Ns,this.processAttribs=this.processAttribsNS,this.pushAttrib=this.pushAttribNS,this.ns={__proto__:null,...Es};const o=this.opt.additionalNamespaces;o!=null&&(function(n,a){for(const c of Object.keys(a))ke(n,c,a[c])}(this,o),Object.assign(this.ns,o))}else this.nameStartCheck=re,this.nameCheck=es,this.isName=Ls,this.processAttribs=this.processAttribsPlain,this.pushAttrib=this.pushAttribPlain;this.stateTable=[this.sBegin,this.sBeginWhitespace,this.sDoctype,this.sDoctypeQuote,this.sDTD,this.sDTDQuoted,this.sDTDOpenWaka,this.sDTDOpenWakaBang,this.sDTDComment,this.sDTDCommentEnding,this.sDTDCommentEnded,this.sDTDPI,this.sDTDPIEnding,this.sText,this.sEntity,this.sOpenWaka,this.sOpenWakaBang,this.sComment,this.sCommentEnding,this.sCommentEnded,this.sCData,this.sCDataEnding,this.sCDataEnding2,this.sPIFirstChar,this.sPIRest,this.sPIBody,this.sPIEnding,this.sXMLDeclNameStart,this.sXMLDeclName,this.sXMLDeclEq,this.sXMLDeclValueStart,this.sXMLDeclValue,this.sXMLDeclSeparator,this.sXMLDeclEnding,this.sOpenTag,this.sOpenTagSlash,this.sAttrib,this.sAttribName,this.sAttribNameSawWhite,this.sAttribValue,this.sAttribValueQuoted,this.sAttribValueClosed,this.sAttribValueUnquoted,this.sCloseTag,this.sCloseTagSawWhite],this._init()}get closed(){return this._closed}_init(){this.openWakaBang="",this.text="",this.name="",this.piTarget="",this.entity="",this.q=null,this.tags=[],this.tag=null,this.topNS=null,this.chunk="",this.chunkPosition=0,this.i=0,this.prevI=0,this.carriedFromPrevious=void 0,this.forbiddenState=0,this.attribList=[];const{fragmentOpt:t}=this;this.state=t?q:0,this.reportedTextBeforeRoot=this.reportedTextAfterRoot=this.closedRoot=this.sawRoot=t,this.xmlDeclPossible=!t,this.xmlDeclExpects=["version"],this.entityReturnState=void 0;let{defaultXMLVersion:s}=this.opt;if(s===void 0){if(this.opt.forceXMLVersion===!0)throw new Error("forceXMLVersion set but defaultXMLVersion is not set");s="1.0"}this.setXMLVersion(s),this.positionAtNewLine=0,this.doctype=!1,this._closed=!1,this.xmlDecl={version:void 0,encoding:void 0,standalone:void 0},this.line=1,this.column=0,this.ENTITIES=Object.create(Ds),this.readyHandler?.()}get position(){return this.chunkPosition+this.i}get columnIndex(){return this.position-this.positionAtNewLine}on(t,s){this[ss[t]]=s}off(t){this[ss[t]]=void 0}makeError(t){let s=this.fileName??"";return this.trackPosition&&(s.length>0&&(s+=":"),s+=`${this.line}:${this.column}`),s.length>0&&(s+=": "),new Error(s+t)}fail(t){const s=this.makeError(t),o=this.errorHandler;if(o===void 0)throw s;return o(s),this}write(t){if(this.closed)return this.fail("cannot write after close; assign an onready handler.");let s=!1;t===null?(s=!0,t=""):typeof t=="object"&&(t=t.toString()),this.carriedFromPrevious!==void 0&&(t=`${this.carriedFromPrevious}${t}`,this.carriedFromPrevious=void 0);let o=t.length;const n=t.charCodeAt(o-1);!s&&(n===13||n>=55296&&n<=56319)&&(this.carriedFromPrevious=t[o-1],o--,t=t.slice(0,o));const{stateTable:a}=this;for(this.chunk=t,this.i=0;this.i<o;)a[this.state].call(this);return this.chunkPosition+=o,s?this.end():this}close(){return this.write(null)}getCode10(){const t=this.chunk,s=this.i;if(this.prevI=s,this.i++,s>=t.length)return O;const o=t.charCodeAt(s);if(this.column++,o<55296){if(o>=32||o===9)return o;switch(o){case ot:return this.line++,this.column=0,this.positionAtNewLine=this.position,ot;case 13:return t.charCodeAt(s+1)===ot&&(this.i=s+2),this.line++,this.column=0,this.positionAtNewLine=this.position,lt;default:return this.fail("disallowed character."),o}}if(o>56319)return o>=57344&&o<=65533||this.fail("disallowed character."),o;const n=65536+1024*(o-55296)+(t.charCodeAt(s+1)-56320);return this.i=s+2,n>1114111&&this.fail("disallowed character."),n}getCode11(){const{chunk:t,i:s}=this;if(this.prevI=s,this.i=s+1,s>=t.length)return O;const o=t.charCodeAt(s);if(this.column++,o<55296){if(o>31&&o<127||o>159&&o!==8232||o===9)return o;switch(o){case ot:return this.line++,this.column=0,this.positionAtNewLine=this.position,ot;case 13:{const a=t.charCodeAt(s+1);a!==ot&&a!==133||(this.i=s+2)}case 133:case 8232:return this.line++,this.column=0,this.positionAtNewLine=this.position,lt;default:return this.fail("disallowed character."),o}}if(o>56319)return o>=57344&&o<=65533||this.fail("disallowed character."),o;const n=65536+1024*(o-55296)+(t.charCodeAt(s+1)-56320);return this.i=s+2,n>1114111&&this.fail("disallowed character."),n}getCodeNorm(){const t=this.getCode();return t===lt?ot:t}unget(){this.i=this.prevI,this.column--}captureTo(t){let{i:s}=this;const{chunk:o}=this;for(;;){const n=this.getCode(),a=n===lt,c=a?ot:n;if(c===O||t.includes(c))return this.text+=o.slice(s,this.prevI),c;a&&(this.text+=`${o.slice(s,this.prevI)}
|
|
7
7
|
`,s=this.i)}}captureToChar(t){let{i:s}=this;const{chunk:o}=this;for(;;){let n=this.getCode();switch(n){case lt:this.text+=`${o.slice(s,this.prevI)}
|
|
8
8
|
`,s=this.i,n=ot;break;case O:return this.text+=o.slice(s),!1}if(n===t)return this.text+=o.slice(s,this.prevI),!0}}captureNameChars(){const{chunk:t,i:s}=this;for(;;){const o=this.getCode();if(o===O)return this.name+=t.slice(s),O;if(!es(o))return this.name+=t.slice(s,this.prevI),o===lt?ot:o}}skipSpaces(){for(;;){const t=this.getCodeNorm();if(t===O||!U(t))return t}}setXMLVersion(t){this.currentXMLVersion=t,t==="1.0"?(this.isChar=ws,this.getCode=this.getCode10):(this.isChar=Ss,this.getCode=this.getCode11)}sBegin(){this.chunk.charCodeAt(0)===65279&&(this.i++,this.column++),this.state=1}sBeginWhitespace(){const t=this.i,s=this.skipSpaces();switch(this.prevI!==t&&(this.xmlDeclPossible=!1),s){case St:if(this.state=15,this.text.length!==0)throw new Error("no-empty text at start");break;case O:break;default:this.unget(),this.state=q,this.xmlDeclPossible=!1}}sDoctype(){const t=this.captureTo(Ps);switch(t){case M:this.doctypeHandler?.(this.text),this.text="",this.state=q,this.doctype=!0;break;case O:break;default:this.text+=String.fromCodePoint(t),t===91?this.state=4:pe(t)&&(this.state=3,this.q=t)}}sDoctypeQuote(){const t=this.q;this.captureToChar(t)&&(this.text+=String.fromCodePoint(t),this.q=null,this.state=2)}sDTD(){const t=this.captureTo(Is);t!==O&&(this.text+=String.fromCodePoint(t),t===Jt?this.state=2:t===St?this.state=6:pe(t)&&(this.state=5,this.q=t))}sDTDQuoted(){const t=this.q;this.captureToChar(t)&&(this.text+=String.fromCodePoint(t),this.state=4,this.q=null)}sDTDOpenWaka(){const t=this.getCodeNorm();switch(this.text+=String.fromCodePoint(t),t){case 33:this.state=7,this.openWakaBang="";break;case X:this.state=11;break;default:this.state=4}}sDTDOpenWakaBang(){const t=String.fromCodePoint(this.getCodeNorm()),s=this.openWakaBang+=t;this.text+=t,s!=="-"&&(this.state=s==="--"?8:4,this.openWakaBang="")}sDTDComment(){this.captureToChar(45)&&(this.text+="-",this.state=9)}sDTDCommentEnding(){const t=this.getCodeNorm();this.text+=String.fromCodePoint(t),this.state=t===45?10:8}sDTDCommentEnded(){const t=this.getCodeNorm();this.text+=String.fromCodePoint(t),t===M?this.state=4:(this.fail("malformed comment."),this.state=8)}sDTDPI(){this.captureToChar(X)&&(this.text+="?",this.state=12)}sDTDPIEnding(){const t=this.getCodeNorm();this.text+=String.fromCodePoint(t),t===M&&(this.state=4)}sText(){this.tags.length!==0?this.handleTextInRoot():this.handleTextOutsideRoot()}sEntity(){let{i:t}=this;const{chunk:s}=this;t:for(;;)switch(this.getCode()){case lt:this.entity+=`${s.slice(t,this.prevI)}
|
|
9
9
|
`,t=this.i;break;case 59:{const{entityReturnState:o}=this,n=this.entity+s.slice(t,this.prevI);let a;this.state=o,n===""?(this.fail("empty entity name."),a="&;"):(a=this.parseEntity(n),this.entity=""),o===q&&this.textHandler===void 0||(this.text+=a);break t}case O:this.entity+=s.slice(t);break t}}sOpenWaka(){const t=this.getCode();if(re(t))this.state=34,this.unget(),this.xmlDeclPossible=!1;else switch(t){case 47:this.state=43,this.xmlDeclPossible=!1;break;case 33:this.state=16,this.openWakaBang="",this.xmlDeclPossible=!1;break;case X:this.state=23;break;default:this.fail("disallowed character in tag name"),this.state=q,this.xmlDeclPossible=!1}}sOpenWakaBang(){switch(this.openWakaBang+=String.fromCodePoint(this.getCodeNorm()),this.openWakaBang){case"[CDATA[":this.sawRoot||this.reportedTextBeforeRoot||(this.fail("text data outside of root node."),this.reportedTextBeforeRoot=!0),this.closedRoot&&!this.reportedTextAfterRoot&&(this.fail("text data outside of root node."),this.reportedTextAfterRoot=!0),this.state=20,this.openWakaBang="";break;case"--":this.state=17,this.openWakaBang="";break;case"DOCTYPE":this.state=2,(this.doctype||this.sawRoot)&&this.fail("inappropriately located doctype declaration."),this.openWakaBang="";break;default:this.openWakaBang.length>=7&&this.fail("incorrect syntax.")}}sComment(){this.captureToChar(45)&&(this.state=18)}sCommentEnding(){const t=this.getCodeNorm();t===45?(this.state=19,this.commentHandler?.(this.text),this.text=""):(this.text+=`-${String.fromCodePoint(t)}`,this.state=17)}sCommentEnded(){const t=this.getCodeNorm();t!==M?(this.fail("malformed comment."),this.text+=`--${String.fromCodePoint(t)}`,this.state=17):this.state=q}sCData(){this.captureToChar(Jt)&&(this.state=21)}sCDataEnding(){const t=this.getCodeNorm();t===Jt?this.state=22:(this.text+=`]${String.fromCodePoint(t)}`,this.state=20)}sCDataEnding2(){const t=this.getCodeNorm();switch(t){case M:this.cdataHandler?.(this.text),this.text="",this.state=q;break;case Jt:this.text+="]";break;default:this.text+=`]]${String.fromCodePoint(t)}`,this.state=20}}sPIFirstChar(){const t=this.getCodeNorm();this.nameStartCheck(t)?(this.piTarget+=String.fromCodePoint(t),this.state=24):t===X||U(t)?(this.fail("processing instruction without a target."),this.state=t===X?26:25):(this.fail("disallowed character in processing instruction name."),this.piTarget+=String.fromCodePoint(t),this.state=24)}sPIRest(){const{chunk:t,i:s}=this;for(;;){const o=this.getCodeNorm();if(o===O)return void(this.piTarget+=t.slice(s));if(!this.nameCheck(o)){this.piTarget+=t.slice(s,this.prevI);const n=o===X;n||U(o)?this.piTarget==="xml"?(this.xmlDeclPossible||this.fail("an XML declaration must be at the start of the document."),this.state=n?jt:27):this.state=n?26:25:(this.fail("disallowed character in processing instruction name."),this.piTarget+=String.fromCodePoint(o));break}}}sPIBody(){if(this.text.length===0){const t=this.getCodeNorm();t===X?this.state=26:U(t)||(this.text=String.fromCodePoint(t))}else this.captureToChar(X)&&(this.state=26)}sPIEnding(){const t=this.getCodeNorm();if(t===M){const{piTarget:s}=this;s.toLowerCase()==="xml"&&this.fail("the XML declaration must appear at the start of the document."),this.piHandler?.({target:s,body:this.text}),this.piTarget=this.text="",this.state=q}else t===X?this.text+="?":(this.text+=`?${String.fromCodePoint(t)}`,this.state=25);this.xmlDeclPossible=!1}sXMLDeclNameStart(){const t=this.skipSpaces();t!==X?t!==O&&(this.state=28,this.name=String.fromCodePoint(t)):this.state=jt}sXMLDeclName(){const t=this.captureTo(Os);if(t===X)return this.state=jt,this.name+=this.text,this.text="",void this.fail("XML declaration is incomplete.");if(U(t)||t===Gt){if(this.name+=this.text,this.text="",!this.xmlDeclExpects.includes(this.name))switch(this.name.length){case 0:this.fail("did not expect any more name/value pairs.");break;case 1:this.fail(`expected the name ${this.xmlDeclExpects[0]}.`);break;default:this.fail(`expected one of ${this.xmlDeclExpects.join(", ")}`)}this.state=t===Gt?30:29}}sXMLDeclEq(){const t=this.getCodeNorm();if(t===X)return this.state=jt,void this.fail("XML declaration is incomplete.");U(t)||(t!==Gt&&this.fail("value required."),this.state=30)}sXMLDeclValueStart(){const t=this.getCodeNorm();if(t===X)return this.state=jt,void this.fail("XML declaration is incomplete.");U(t)||(pe(t)?this.q=t:(this.fail("value must be quoted."),this.q=32),this.state=31)}sXMLDeclValue(){const t=this.captureTo([this.q,X]);if(t===X)return this.state=jt,this.text="",void this.fail("XML declaration is incomplete.");if(t===O)return;const s=this.text;switch(this.text="",this.name){case"version":{this.xmlDeclExpects=["encoding","standalone"];const o=s;this.xmlDecl.version=o,/^1\.[0-9]+$/.test(o)?this.opt.forceXMLVersion||this.setXMLVersion(o):this.fail("version number must match /^1\\.[0-9]+$/.");break}case"encoding":/^[A-Za-z][A-Za-z0-9._-]*$/.test(s)||this.fail("encoding value must match /^[A-Za-z0-9][A-Za-z0-9._-]*$/."),this.xmlDeclExpects=["standalone"],this.xmlDecl.encoding=s;break;case"standalone":s!=="yes"&&s!=="no"&&this.fail('standalone value must match "yes" or "no".'),this.xmlDeclExpects=[],this.xmlDecl.standalone=s}this.name="",this.state=32}sXMLDeclSeparator(){const t=this.getCodeNorm();t!==X?(U(t)||(this.fail("whitespace required."),this.unget()),this.state=27):this.state=jt}sXMLDeclEnding(){this.getCodeNorm()===M?(this.piTarget!=="xml"?this.fail("processing instructions are not allowed before root."):this.name!=="version"&&this.xmlDeclExpects.includes("version")&&this.fail("XML declaration must contain a version."),this.xmldeclHandler?.(this.xmlDecl),this.name="",this.piTarget=this.text="",this.state=q):this.fail("The character ? is disallowed anywhere in XML declarations."),this.xmlDeclPossible=!1}sOpenTag(){const t=this.captureNameChars();if(t===O)return;const s=this.tag={name:this.name,attributes:Object.create(null)};switch(this.name="",this.xmlnsOpt&&(this.topNS=s.ns=Object.create(null)),this.openTagStartHandler?.(s),this.sawRoot=!0,!this.fragmentOpt&&this.closedRoot&&this.fail("documents may contain only one root."),t){case M:this.openTag();break;case 47:this.state=35;break;default:U(t)||this.fail("disallowed character in tag name."),this.state=36}}sOpenTagSlash(){this.getCode()===M?this.openSelfClosingTag():(this.fail("forward-slash in opening tag not followed by >."),this.state=36)}sAttrib(){const t=this.skipSpaces();t!==O&&(re(t)?(this.unget(),this.state=37):t===M?this.openTag():t===47?this.state=35:this.fail("disallowed character in attribute name."))}sAttribName(){const t=this.captureNameChars();t===Gt?this.state=39:U(t)?this.state=38:t===M?(this.fail("attribute without value."),this.pushAttrib(this.name,this.name),this.name=this.text="",this.openTag()):t!==O&&this.fail("disallowed character in attribute name.")}sAttribNameSawWhite(){const t=this.skipSpaces();switch(t){case O:return;case Gt:this.state=39;break;default:this.fail("attribute without value."),this.text="",this.name="",t===M?this.openTag():re(t)?(this.unget(),this.state=37):(this.fail("disallowed character in attribute name."),this.state=36)}}sAttribValue(){const t=this.getCodeNorm();pe(t)?(this.q=t,this.state=40):U(t)||(this.fail("unquoted attribute value."),this.state=42,this.unget())}sAttribValueQuoted(){const{q:t,chunk:s}=this;let{i:o}=this;for(;;)switch(this.getCode()){case t:return this.pushAttrib(this.name,this.text+s.slice(o,this.prevI)),this.name=this.text="",this.q=null,void(this.state=41);case 38:return this.text+=s.slice(o,this.prevI),this.state=14,void(this.entityReturnState=40);case ot:case lt:case 9:this.text+=`${s.slice(o,this.prevI)} `,o=this.i;break;case St:return this.text+=s.slice(o,this.prevI),void this.fail("disallowed character.");case O:return void(this.text+=s.slice(o))}}sAttribValueClosed(){const t=this.getCodeNorm();U(t)?this.state=36:t===M?this.openTag():t===47?this.state=35:re(t)?(this.fail("no whitespace between attributes."),this.unget(),this.state=37):this.fail("disallowed character in attribute name.")}sAttribValueUnquoted(){const t=this.captureTo(Vs);switch(t){case 38:this.state=14,this.entityReturnState=42;break;case St:this.fail("disallowed character.");break;case O:break;default:this.text.includes("]]>")&&this.fail('the string "]]>" is disallowed in char data.'),this.pushAttrib(this.name,this.text),this.name=this.text="",t===M?this.openTag():this.state=36}}sCloseTag(){const t=this.captureNameChars();t===M?this.closeTag():U(t)?this.state=44:t!==O&&this.fail("disallowed character in closing tag.")}sCloseTagSawWhite(){switch(this.skipSpaces()){case M:this.closeTag();break;case O:break;default:this.fail("disallowed character in closing tag.")}}handleTextInRoot(){let{i:t,forbiddenState:s}=this;const{chunk:o,textHandler:n}=this;t:for(;;)switch(this.getCode()){case St:if(this.state=15,n!==void 0){const{text:a}=this,c=o.slice(t,this.prevI);a.length!==0?(n(a+c),this.text=""):c.length!==0&&n(c)}s=0;break t;case 38:this.state=14,this.entityReturnState=q,n!==void 0&&(this.text+=o.slice(t,this.prevI)),s=0;break t;case Jt:switch(s){case 0:s=1;break;case 1:s=2;break;case 2:break;default:throw new Error("impossible state")}break;case M:s===2&&this.fail('the string "]]>" is disallowed in char data.'),s=0;break;case lt:n!==void 0&&(this.text+=`${o.slice(t,this.prevI)}
|
|
10
10
|
`),t=this.i,s=0;break;case O:n!==void 0&&(this.text+=o.slice(t));break t;default:s=0}this.forbiddenState=s}handleTextOutsideRoot(){let{i:t}=this;const{chunk:s,textHandler:o}=this;let n=!1;t:for(;;){const a=this.getCode();switch(a){case St:if(this.state=15,o!==void 0){const{text:c}=this,T=s.slice(t,this.prevI);c.length!==0?(o(c+T),this.text=""):T.length!==0&&o(T)}break t;case 38:this.state=14,this.entityReturnState=q,o!==void 0&&(this.text+=s.slice(t,this.prevI)),n=!0;break t;case lt:o!==void 0&&(this.text+=`${s.slice(t,this.prevI)}
|
|
11
|
-
`),t=this.i;break;case O:o!==void 0&&(this.text+=s.slice(t));break t;default:U(a)||(n=!0)}}n&&(this.sawRoot||this.reportedTextBeforeRoot||(this.fail("text data outside of root node."),this.reportedTextBeforeRoot=!0),this.closedRoot&&!this.reportedTextAfterRoot&&(this.fail("text data outside of root node."),this.reportedTextAfterRoot=!0))}pushAttribNS(t,s){const{prefix:o,local:n}=this.qname(t),a={name:t,prefix:o,local:n,value:s};if(this.attribList.push(a),this.attributeHandler?.(a),o==="xmlns"){const c=s.trim();this.currentXMLVersion==="1.0"&&c===""&&this.fail("invalid attempt to undefine prefix in XML 1.0"),this.topNS[n]=c,ke(this,n,c)}else if(t==="xmlns"){const c=s.trim();this.topNS[""]=c,ke(this,"",c)}}pushAttribPlain(t,s){const o={name:t,value:s};this.attribList.push(o),this.attributeHandler?.(o)}end(){this.sawRoot||this.fail("document must contain a root element.");const{tags:t}=this;for(;t.length>0;){const o=t.pop();this.fail(`unclosed tag: ${o.name}`)}this.state!==0&&this.state!==q&&this.fail("unexpected end.");const{text:s}=this;return s.length!==0&&(this.textHandler?.(s),this.text=""),this._closed=!0,this.endHandler?.(),this._init(),this}resolve(t){let s=this.topNS[t];if(s!==void 0)return s;const{tags:o}=this;for(let n=o.length-1;n>=0;n--)if(s=o[n].ns[t],s!==void 0)return s;return s=this.ns[t],s!==void 0?s:this.opt.resolvePrefix?.(t)}qname(t){const s=t.indexOf(":");if(s===-1)return{prefix:"",local:t};const o=t.slice(s+1),n=t.slice(0,s);return(n===""||o===""||o.includes(":"))&&this.fail(`malformed name: ${t}.`),{prefix:n,local:o}}processAttribsNS(){const{attribList:t}=this,s=this.tag;{const{prefix:a,local:c}=this.qname(s.name);s.prefix=a,s.local=c;const T=s.uri=this.resolve(a)??"";a!==""&&(a==="xmlns"&&this.fail('tags may not have "xmlns" as prefix.'),T===""&&(this.fail(`unbound namespace prefix: ${JSON.stringify(a)}.`),s.uri=a))}if(t.length===0)return;const{attributes:o}=s,n=new Set;for(const a of t){const{name:c,prefix:T,local:S}=a;let x,w;T===""?(x=c==="xmlns"?Zt:"",w=c):(x=this.resolve(T),x===void 0&&(this.fail(`unbound namespace prefix: ${JSON.stringify(T)}.`),x=T),w=`{${x}}${S}`),n.has(w)&&this.fail(`duplicate attribute: ${w}.`),n.add(w),a.uri=x,o[c]=a}this.attribList=[]}processAttribsPlain(){const{attribList:t}=this,s=this.tag.attributes;for(const{name:o,value:n}of t)s[o]!==void 0&&this.fail(`duplicate attribute: ${o}.`),s[o]=n;this.attribList=[]}openTag(){this.processAttribs();const{tags:t}=this,s=this.tag;s.isSelfClosing=!1,this.openTagHandler?.(s),t.push(s),this.state=q,this.name=""}openSelfClosingTag(){this.processAttribs();const{tags:t}=this,s=this.tag;s.isSelfClosing=!0,this.openTagHandler?.(s),this.closeTagHandler?.(s),(this.tag=t[t.length-1]??null)===null&&(this.closedRoot=!0),this.state=q,this.name=""}closeTag(){const{tags:t,name:s}=this;if(this.state=q,this.name="",s==="")return this.fail("weird empty close tag."),void(this.text+="</>");const o=this.closeTagHandler;let n=t.length;for(;n-- >0;){const a=this.tag=t.pop();if(this.topNS=a.ns,o?.(a),a.name===s)break;this.fail("unexpected close tag.")}n===0?this.closedRoot=!0:n<0&&(this.fail(`unmatched closing tag: ${s}.`),this.text+=`</${s}>`)}parseEntity(t){if(t[0]!=="#"){const o=this.ENTITIES[t];return o!==void 0?o:(this.fail(this.isName(t)?"undefined entity.":"disallowed character in entity name."),`&${t};`)}let s=NaN;return t[1]==="x"&&/^#x[0-9a-f]+$/i.test(t)?s=parseInt(t.slice(2),16):/^#[0-9]+$/.test(t)&&(s=parseInt(t.slice(1),10)),this.isChar(s)?String.fromCodePoint(s):(this.fail("malformed character entity."),`&${t};`)}}var Ae,Tt;(Tt=Ae||(Ae={})).Events={XmlDecl:"xmldecl",Text:"text",ProcessingInstruction:"processinginstruction",Doctype:"doctype",Comment:"comment",OpenTagStart:"opentagstart",Attribute:"attribute",OpenTag:"opentag",CloseTag:"closetag",CDdata:"cdata",Error:"error",End:"end",Ready:"ready"},Tt.parseStream=async(i,t,s)=>{const o=new Rs({position:!1,...s});let n;if(t.onOpenTagStart&&o.on(Tt.Events.OpenTagStart,t.onOpenTagStart),t.onOpenTag&&o.on(Tt.Events.OpenTag,t.onOpenTag),t.onCloseTag&&o.on(Tt.Events.CloseTag,t.onCloseTag),t.onAttribute&&o.on(Tt.Events.Attribute,t.onAttribute),t.onText&&o.on(Tt.Events.Text,t.onText),t.onError&&o.on(Tt.Events.Error,t.onError),t.onEnd){t.onEnd;const a=()=>{n=t.onEnd()};o.on(Tt.Events.End,a)}for(;;){const{value:a,done:c}=await i.read();if(c)break;o.write(a)}return o.close(),n};const v=i=>i===!0||i==="1"||i==="on"||i==="true"||i!==!1&&i!=="0"&&i!=="off"&&i!=="false"&&null,E=i=>{const t=parseInt(i);return isNaN(t)?null:t},ct=i=>{const t=parseFloat(i);return isNaN(t)?null:t},A=null;class $s{constructor(){this._registeredVisitors=new Map}registerVisitor(t){this._registeredVisitors.set(t.from,t)}createEventHandler(t,s,o){const n=this._registeredVisitors,a=[];let c=null,T=null,S=null,x=null;const w=[],D={key:null,source:t};let b=null,d=!1;const P=(y,m)=>{let V=S.attributes[y];if(m){if(Array.isArray(m)){for(let H=0;H<m.length;H++)if(V==null||(V=m[H](V),V==null))return}else if(V==null||(V=m(V),V==null))return}return V},f={getSource:()=>b.source,setSource:y=>{b.source=y},setKey:y=>{b.key=y},getFrom:()=>S,getAttribute:(y,m)=>P(y,m)??null,hasAttribute:y=>f.getAttribute(y)!==null,getParent:()=>w[w.length-2].source,getPath:()=>{const y=[];for(let m=0;m<a.length;m++)y.push(a[m].local);return y.join("\\")},parseAttribute:P,copyToObject:(y,m,V,H)=>{const W=P(H??m,V);W!==void 0&&(y[m]=W)},copyTo:(y,m,V)=>{const H=P(V??y,m);H!==void 0&&(b.source[y]=H)},warn:y=>{o?o?.(y):console.warn(y)}};return{onOpenTag:y=>{let m=y.name;const V=m.indexOf(":");V!==-1&&(m=m.slice(V+1));const H=n.get(m);if(c={local:m,visitor:H,tag:y,destination:null},d)return a.push(c),T=m,void(S=y);x=c?.visitor??null,H&&(b=a.length===0?D:x?.to!==null?{key:null,source:{}}:null,c.destination=b,b&&w.push(b)),a.push(c),T=m,S=y,d=x?.to===null,x?.openTag?.(f)},onCloseTag:y=>{let m=y.name;const V=m.indexOf(":");if(V!==-1&&(m=m.slice(V+1)),m!==T)throw new Error(`mismatch open/close tag: '${m}'/'${T}'`);d||x?.closeTag?.(f);const H=a.pop()??null;c=a[a.length-1]??null;const W=H?.destination;if(W){w.pop(),b=w[w.length-1]??D;const ht=H.visitor;ht&&ht.to&&W.source!==void 0&&(Array.isArray(ht.to)?b.source.push?b.source.push(W.source):o?.(`Unable to parse array for ${ht.from} at ${f.getPath()}`):W.key?b.source[W.key]=W.source:typeof ht.to=="string"&&(b.source[ht.to]=W.source))}T=c?.local??null,S=c?.tag??null,x=c?.visitor??null,d=!c?.destination},onText:y=>{x?.text?.(y,f)},onEnd:s}}}const is=(i,t,s,o=null)=>{if(!i)return null;let n=i;n.startsWith("/")&&(n=n.substring(1));let a=o?.parsedRefs?.get(i);if(a!==void 0)return a;const c=t(n);if(!c)return null;let T=c.content;try{s&&(T=s(T))}catch(S){console.warn(S)}return o?.parsedRefs?.set(i,T),T},Ee=(i,t,s,o,n=null)=>{if(!i)return null;let a=i;a.startsWith("/")&&(a=a.substring(1));let c=n?.parsedRefs?.get(i);if(c!==void 0)return c;const T=t(a);if(!T)return null;const S=T.content;try{const x=new TextDecoder().decode(S),w=s.parseFromString(x,"text/xml"),D=o.convert(w,i,n);return n?.parsedRefs?.set(i,D),D}catch(x){console.warn(x)}return null},zt=(i,t,s,o,n=null)=>{const a=new Map;let c=t.Directory[i];const T=c?c.length:0;for(let S=0;S<T;S++){const x=c[S];if(!x)continue;let w=x;w.startsWith("/")&&(w=w.substring(1));const D=Ee(w,b=>t.files[b],s,o,n);a.set(w,D)}return a},Fs=["lt1","dk1","lt2","dk2","accent1","accent2","accent3","accent4","accent5","accent6","hlink","folHlink"],De=(i,t="dk1")=>{let s;const o=i("auto");o===void 0||o!=="1"&&o!=="true"||(s=t);const n=i("indexed");n&&(s=`index${n}`);const a=i("rgb");a&&(s=a.toLowerCase(),a.length!==8||a.startsWith("FF")||(s="FF"+a.substring(2,a.length)));const c=i("theme");c&&(s=Fs[c]);let T=i("tint");if(T&&(s+=` ${u.IColor.AdjustmentType.ETint} ${parseFloat(T)}`),s)return s},cs=i=>i&&i.replace(/^\{([\s\S]+)\}$/,"$1"),hs=i=>i==="true"||i==="1";class Ht{static{this.Collapsed=1}static{this.CustomFormat=2}static{this.CustomHeight=4}static{this.Hidden=8}static{this.Ht=16}static{this.OutlineLevel=32}static{this.Ph=64}static{this.R=128}static{this.S=256}static{this.Spans=512}static{this.ThickBot=1024}static{this.ThickTop=2048}}const Ms=(i,t,s)=>{if(i[0].value[0]===i[1].value[0])return t},os={colStart:0,colEnd:0,rowStart:0,rowEnd:0},js=Object.freeze(Object.defineProperty({__proto__:null,fromBufferXLSX:async(i,t)=>{const{password:s,onWarning:o,constructorOptions:n={},...a}=t??{},c=Promise.resolve().then(()=>require("./t1zHQhUwG57XvWD1.cjs")),T=Promise.resolve().then(()=>require("./CnnLV8wvpNYrxBu8.cjs"));let S=null;try{S=new DOMParser}catch{}let x=null;S||(x=Promise.resolve().then(()=>require("./Y4LVpioiIg6LVL0s.cjs")).then(d=>d.i));let w=null,D=null,b=null;try{const d=await Promise.all([c,T,x]);w=d[0],D=d[1],b=d[2]}catch(d){throw new Error("Unable to load XLSX parser.",{cause:d})}try{const d=w.read(i,{type:"array",sheets:[],cellStyles:!1,bookFiles:!0});if(!d.Directory)throw new Error("Unable to parse as an Excel document. Try to save as '.xlsx' and try again.");d.Directory.richstructure=["/xl/richData/rdrichvaluestructure.xml"],d.Directory.richdata=["/xl/richData/rdrichvalue.xml"];const P=new D.FromOOXMLConverter,f=S??new b.DOMParser,y=n?.resources??new u.ResourceCollection,m=y.beginPersist(),V={},H=new Set,W=new Map;W.set("richTypes",[]);const ht=new Map,Pe=[],ne=I=>d.files[I],fe=(I,z)=>{const Y=I.lastIndexOf("/"),ut=I.substring(0,Y+1)+"_rels/"+I.substring(Y+1,I.length)+".rels";let dt=z.get(ut);return dt||(dt=(($,be,xe,we,Xt=null)=>{if(!$)return null;const tt=Ee($,be,xe,we,Xt);if(!tt)return null;const et=new Map,bt=Object.keys(tt),Bt=bt.length;for(let xt=0;xt<Bt;xt++){const qt=bt[xt],kt=tt[qt];et.set(qt,kt)}return et})(ut,ne,f,P,yt),z.set(ut,dt)),dt},ae=(I,z,Y,ut=ht)=>{let dt=fe(z,ut).get(I),$=dt?.target;if(!$)return null;if(dt.targetMode==="External")return dt.target;const be=z.lastIndexOf("/"),xe=z.substring(0,be+1);$.startsWith("/")||($=xe+$),$=(tt=>{const et=tt.split(/\/+/);return et.reduce((bt,Bt,xt)=>(Bt==="."?bt.splice(xt,1):Bt===".."&&bt.splice(xt-1,2),bt),et).join("/")})($);const we=P?.getVisitorParamsState().get("dxfs");let Xt=ut.get($);if(!Xt)if(dt.type==="http://schemas.openxmlformats.org/officeDocument/2006/relationships/worksheet"){const tt={};Xt=tt;const et=async()=>{const bt=((N,G,Qt,_,J,Z,wt)=>{const h=new $s,Q=new u.Tuple.TransposedBuilder;let j=null;h.registerVisitor({from:"autoFilter",to:"filter",openTag:e=>{e.copyTo("ref",A)}}),h.registerVisitor({from:"conditionalFormatting",to:{},openTag:e=>{const r=e.getParent();r.conditionals||(r.conditionals=[]),r.conditionals.push(e.getSource());const l=e.getAttribute("sqref");l&&(e.getSource().ref=l.split(" ").join(",")),e.copyTo("pivot",v)},closeTag:e=>{const r=e.getSource();if(r.rule){const l=Object.keys(r.rule);for(let p=0;p<l.length;p++){const C=l[p];C!=="rule"&&(r[C]=r.rule[C])}}delete r.rule}}),h.registerVisitor({from:"cfRule",to:"rule",openTag:e=>{const r=e.getParent();e.copyToObject(r,"type",A),e.copyToObject(r,"priority",E),e.copyToObject(r,"stopIfTrue",v);const l=e.getAttribute("dxfId",E);if(l!==null){let p=_?.get(l);p||(Z?.(`Unable to load conditional color. Invalid dxfI: '${l}' at '${e.getPath()}'.`),p={}),r.style=p}e.copyToObject(r,"aboveAverage",v),e.copyToObject(r,"equalAverage",v),e.copyToObject(r,"stdDev",E),e.copyToObject(r,"bottom",v),e.copyToObject(r,"percent",v),e.copyToObject(r,"rank",E),e.copyToObject(r,"operator",A),e.copyToObject(r,"text",A),e.copyToObject(r,"timePeriod",A)}}),h.registerVisitor({from:"colorScale",to:"colorScale"}),h.registerVisitor({from:"dataBar",to:"dataBar",openTag:e=>{e.copyTo("maxLength",E),e.copyTo("minLength",E),e.copyTo("showValue",v)}}),h.registerVisitor({from:"iconSet",to:"iconSet",openTag:e=>{e.copyTo("iconSet",A),e.copyTo("reverse",v),e.copyTo("showValue",v)}}),h.registerVisitor({from:"formula",to:null,text:(e,r)=>{const l=r.getParent();let p=l.formulas;p||(p=[],l.formulas=p),p.push(e)}}),h.registerVisitor({from:"cfvo",to:{},openTag:e=>{const r=e.getParent();r.conditions||(r.conditions=[]),r.conditions.push(e.getSource()),e.copyTo("type",A),e.copyTo("value",ct,"val"),e.copyTo("gte",v)}}),h.registerVisitor({from:"color",to:{},openTag:e=>{const r=e.getParent();r.colors||(r.colors=[]);const l=De(p=>e.getAttribute(p));r.colors.push(l)}}),h.registerVisitor({from:"filterColumn",to:"filterColumn",openTag:e=>{const r=e.getParent();r.fields||(r.fields=[]),r.fields.push(e.getSource()),e.copyTo("offset",E,"colId"),e.copyTo("hiddenButton",v),e.copyTo("showButton",v)}}),h.registerVisitor({from:"colorFilter",to:"colorFilter",openTag:e=>{const r=e.getParent();r.criteria||(r.criteria=[]),r.criteria.push(e.getSource()),e.getSource().type=u.IAutoFilter.Type.Color,e.copyTo("cellColor",v),e.copyTo("styleId",E,"dxfId")}}),h.registerVisitor({from:"dynamicFilter",to:"dynamicFilter",openTag:e=>{const r=e.getParent();r.criteria||(r.criteria=[]),r.criteria.push(e.getSource()),e.getSource().type=u.IAutoFilter.Type.Dynamic,e.copyTo("dynamicType",A,"type"),e.copyTo("val",ct),e.copyTo("maxVal",ct,"maxVal")}}),h.registerVisitor({from:"iconFilter",to:"iconFilter",openTag:e=>{const r=e.getParent();r.criteria||(r.criteria=[]),r.criteria.push(e.getSource()),e.getSource().type=u.IAutoFilter.Type.Icon,e.copyTo("iconId",E),e.copyTo("iconSet",A)}}),h.registerVisitor({from:"top10",to:"top10",openTag:e=>{const r=e.getParent();r.criteria||(r.criteria=[]),r.criteria.push(e.getSource()),e.getSource().type=u.IAutoFilter.Type.Top10,e.copyTo("filterVal",ct),e.copyTo("percent",v),e.copyTo("top",v),e.copyTo("val",ct)}}),h.registerVisitor({from:"filters",to:"filters",openTag:e=>{const r=e.getParent();r.criteria||(r.criteria=[]),r.criteria.push(e.getSource()),e.getSource().type=u.IAutoFilter.Type.Items,e.copyTo("blank",v),e.copyTo("calendarType",A)}}),h.registerVisitor({from:"dateGroupItem",to:"dateGroupItem",openTag:e=>{const r=e.getParent();r.dateGroups||(r.dateGroups=[]),r.dateGroups.push(e.getSource()),e.copyTo("group",A,"dateTimeGrouping"),e.copyTo("day",E),e.copyTo("hour",E),e.copyTo("minute",E),e.copyTo("month",E),e.copyTo("second",E),e.copyTo("year",E)}}),h.registerVisitor({from:"filter",to:"filter",openTag:e=>{const r=e.getParent();r.items||(r.items=[]),r.items.push(e.getAttribute("val",ct))}}),h.registerVisitor({from:"customFilters",to:"customFilters",openTag:e=>{const r=e.getParent();r.criteria||(r.criteria=[]),r.criteria.push(e.getSource()),e.getSource().type=u.IAutoFilter.Type.Custom,e.copyTo("and",v)}}),h.registerVisitor({from:"customFilter",to:"customFilter",openTag:e=>{const r=e.getParent();r.filters||(r.filters=[]),r.filters.push(e.getSource()),e.copyTo("operator",A),e.copyTo("value",ct,"val")}}),h.registerVisitor({from:"sortState",to:"sort",openTag:e=>{e.copyTo("ref",A)}}),h.registerVisitor({from:"sortCondition",to:"sortCondition",openTag:e=>{const r=e.getParent();r.fields||(r.fields=[]);const l=e.getSource();r.fields.push(l),e.copyTo("sortOn",A,"sortBy"),e.copyTo("dxfId",A,"sortBy"),e.copyTo("iconSet",A),e.copyTo("customList",A);const p=e.getAttribute("ref");if(p){const C=u.AddressUtils.fastStringToRange(p,os).colStart,pt=u.AddressUtils.fastStringToRange(r.ref,os),rt=pt.colStart;l.offset=pt?C-rt:C}l.reverse=e.getAttribute("descending",v)??!1}}),h.registerVisitor({from:"AlternateContent",to:null});const ue=e=>{j=e.getSource(),e.copyTo("topLeft",A,"topLeftCell");const r=hs(e.getAttribute("defaultGridColor")),l=e.getAttribute("colorId");l===null||r||(e.getSource().gridLineColor="index"+parseFloat(l)),e.copyTo("showZeros",v),e.copyTo("showFormulas",v),e.copyTo("zoomScale",E),e.copyTo("showRowHeaders",v,"showRowColHeaders"),e.copyTo("showColumnHeaders",v,"showRowColHeaders"),e.copyTo("showRowGridlines",v,"showGridLines"),e.copyTo("showColumnGridlines",v,"showGridLines")};h.registerVisitor({from:"sheetView",to:"view",openTag:e=>{ue(e)},closeTag:()=>{j=null}}),h.registerVisitor({from:"customSheetViews",to:"customSheetViews",openTag:e=>{e.setSource([])}}),h.registerVisitor({from:"customSheetView",to:[],openTag:e=>{ue(e)},closeTag:()=>{j=null}}),h.registerVisitor({from:"selection",to:"selection",openTag:e=>{if(!j)return;e.copyTo("cell",A,"activeCell"),e.copyTo("rangeIndex",E,"activeCellId");const r=e.getAttribute("activeCell"),l=e.getAttribute("sqref");l&&l!==r&&(e.getSource().ranges=l.split(" "))}}),h.registerVisitor({from:"pane",to:"pane",openTag:e=>{if(j&&e.getAttribute("state")==="frozen"){const r={};j.freezePanes=r,e.copyToObject(r,"topLeft",A,"topLeftCell");const l=j.topLeft?u.AddressUtils.fastStringToCell(j.topLeft):{colIndex:0,rowIndex:0},p={colIndex:0,rowIndex:0};e.copyToObject(p,"colIndex",E,"xSplit"),e.copyToObject(p,"rowIndex",E,"ySplit");const C={colIndex:l.colIndex+p.colIndex,rowIndex:l.rowIndex+p.rowIndex};r.coords=u.AddressUtils.cellToString(C)}}}),h.registerVisitor({from:"tabColor",to:null,openTag:e=>{const r=De(l=>e.getAttribute(l));r&&(N.tabColor=r)}}),h.registerVisitor({from:"pageSetUpPr",to:"pageSetUpPr",openTag:e=>{}}),h.registerVisitor({from:"outlinePr",to:"outlinePr",openTag:e=>{}}),h.registerVisitor({from:"pageMargins",to:"pageMargins",openTag:e=>{}}),h.registerVisitor({from:"pageSetup",to:"pageSetup",openTag:e=>{}}),h.registerVisitor({from:"printOptions",to:"printOptions",openTag:e=>{}}),h.registerVisitor({from:"mergeCells",to:"merges",openTag:e=>{e.setSource([])}}),h.registerVisitor({from:"mergeCell",to:[],openTag:e=>{const r=e.getAttribute("ref");e.setSource(r)}}),h.registerVisitor({from:"hyperlinks",to:"hyperlinks",openTag:e=>{e.setSource([])}}),h.registerVisitor({from:"hyperlink",to:[],openTag:e=>{const r=e.getAttribute("r:id"),l=e.getAttribute("ref");if(!l)return void console.warn("No ref found for hyperlink");e.setKey(l);let p=r?G(r):"";if(typeof p!="string")return void console.warn("Invalid address ",p);const C=e.getAttribute("location");p.endsWith("\\")&&(p=p.substring(0,p.length-1));const pt=e.getAttribute("location");if(pt&&(C&&C!==pt&&console.warn("display and location are different",C,pt),p+="#"+pt),!p)return void console.warn("No address found for hyperlink. r:id",r);let rt;const At=e.getAttribute("tooltip");rt=At?{address:p,tooltip:At}:p,e.setSource({r:l,v:rt})}}),h.registerVisitor({from:"drawing",to:"movables",openTag:e=>{const r=e.getAttribute("r:id");if(!r)return;const l=G(r);l?e.setSource(l.movables):console.warn("no drawing found for rId",r)}}),h.registerVisitor({from:"tableParts",to:"tables",openTag:e=>{e.setSource([])}}),h.registerVisitor({from:"tablePart",to:[],openTag:e=>{const r=e.getAttribute("r:id");if(!r)return;const l=G(r);l?e.setSource(l):console.warn("no table found for rId",r)}}),h.registerVisitor({from:"worksheet",to:"worksheet",openTag:e=>{}}),h.registerVisitor({from:"sheetProtection",to:"protection",openTag:e=>{let r=!1;if(e.hasAttribute("sheet")&&v(e.getAttribute("sheet"))&&(r=!0),!r)return void e.setSource(void 0);const l=C=>C===!0||C==="1"||C==="on"||C==="true"||C===!1||C==="0"||C==="off"||C==="false"||null;e.copyTo("autoFilter",l),e.copyTo("deleteColumns",l),e.copyTo("formatCells",l),e.copyTo("formatColumns",l),e.copyTo("formatRows",l),e.copyTo("insertColumns",l),e.copyTo("insertHyperlinks",l),e.copyTo("insertRows",l),e.copyTo("objects",l),e.copyTo("pivotTables",l),e.copyTo("scenarios",l),e.copyTo("selectUnlockedCells",l),e.copyTo("selectUnlockedCells",l),e.copyTo("sort",l);const p={};e.copyToObject(p,"hash",A,"hashValue"),e.copyToObject(p,"algorithm",A,"algorithmName"),e.copyToObject(p,"salt",A,"saltValue"),e.copyToObject(p,"spinCount",E),Object.keys(p).length>0&&(e.getSource().password=p)}}),h.registerVisitor({from:"protectedRanges",to:"protectedRanges",openTag:e=>{e.setSource({})}}),h.registerVisitor({from:"protectedRange",to:{},openTag:e=>{const r=e.getAttribute("sqref");e.setKey(r),e.copyTo("name"),e.copyTo("securityDescriptor");const l={};e.copyToObject(l,"hash",A,"hashValue"),e.copyToObject(l,"algorithm",A,"algorithmName"),e.copyToObject(l,"salt",A,"saltValue"),e.copyToObject(l,"spinCount",E),Object.keys(l).length>0&&(e.getSource().password=l)}}),h.registerVisitor({from:"sheetFormatPr",to:"sheetFormatPr",openTag:e=>{e.copyToObject(N,"defaultColSize",ct,"defaultColWidth"),e.copyToObject(N,"outlineLevelCol",E,"outlineLevelCol");const r=e.getAttribute("customHeight");r!=="1"&&r!=="true"||e.copyToObject(N,"defaultRowSize",ct,"defaultRowHeight"),e.copyToObject(N,"outlineLevelRow",E,"outlineLevelRow")}}),h.registerVisitor({from:"cols",to:"cols",openTag:e=>{e.setSource([])}}),h.registerVisitor({from:"col",to:[],openTag:e=>{e.copyTo("min",r=>parseInt(r)-1),e.copyTo("max",r=>parseInt(r)-1),e.copyTo("sz",ct,"width"),e.copyTo("cs",v,"customWidth"),e.copyTo("h",v,"hidden"),e.copyTo("l",E,"outlineLevel"),e.copyTo("s",E,"style")}}),h.registerVisitor({from:"oleObjects",to:null,openTag:e=>{e.warn("'OLE Objects' are not supported.")}});let Kt=null;const Ts={onOpenTag:e=>{Kt===null&&(Kt="")},onText:e=>{Kt+=e},onEnd:()=>{const e=Qt(Kt);return Kt=null,e},onError:e=>{}};return((e,r,l,p,C,pt)=>{let rt=!1,At=!1,Wt=[],_t=!1,Et=null,Yt=null,de=null,nt=null,$e=null,Fe=null;const ys=pt?.get("richData")??[],Me=u.AddressUtils.normalizeA1ToR1C1,je=u.CoordUtils.createConflatingRanges(),He=new Map,ve=[];let te=null;const Xe=u.CoordUtils.createConflatingRanges();let ee,Dt=!1,B=-1,K=-1,gt=null,se=null;const Se=[];let Ce=null,Be=-2,ft=0,Ut="",Pt="",It="",Ot="",Vt="",Nt="",Lt="",qe="",We="",_e="",Ue="",ze="",Ge="",Je="",mt=!0,Rt=null;return{...l,onEnd:()=>{Se.length>0&&(r.rows=Se);let g=je.done(Ms);const k=g.length;if(k>0){const F=new Array(k);for(let L=0;L<k;L++){const at=g[L],$t=u.AddressUtils.rangeToString(at),Ft=at.value[1],ie=u.AddressUtils.resolveRelativeToA1(Ft,at.rowStart,at.colStart);F[L]=[$t,ie]}r.formulas=F}const st=Xe.done(!0),R=st.length;if(R>0){const F=new Array(R);for(let L=0;L<R;L++){const at=st[L],$t=u.AddressUtils.rangeToString(at);F[L]=$t}r.volatile=F}if(ve.length>0&&(r.dynamicArray=[...ve]),Wt.length>0){Wt.sort(u.CoordUtils.createRangeComparator(u.IRange.Orientation.Column));const F=[];let L=null,at=-1,$t=-1,Ft=-1,ie=-1,vt=null;const Ze=Wt.length;Ze>0&&(L=Wt[0],at=L.colStart,$t=L.colEnd,Ft=L.rowEnd,ie=L.value,F.push(L));for(let Mt=1;Mt<Ze;Mt++)vt=Wt[Mt],ie!==vt.value||at!==vt.colStart||$t!==vt.colEnd||Ft+1!==vt.rowEnd?(F.push(vt),L=vt,at=L.colStart,$t=L.colEnd,Ft=L.rowEnd,ie=L.value):(Ft=vt.rowEnd,L.rowEnd=Ft);let Qe=[];for(let Mt=0;Mt<F.length;Mt++){const oe=F[Mt];Qe.push({r:{colStart:oe.colStart,colEnd:oe.colEnd,rowStart:oe.rowStart,rowEnd:oe.rowEnd},v:oe.value})}r.directStyles=Qe}const it=e.build();if(it){const F=it.tuples;r.data=F}l?.onEnd?.()},onOpenTag:g=>{let k=g.name;const st=k.indexOf(":");if(st!==-1&&(k=k.slice(st+1)),ee){const R=g.attributes;switch(k){case"v":At=!0;break;case"f":switch(R.t??null){case null:case"normal":_t=!0;break;case"shared":const it=R.si;Yt=R.ref,Et=it;break;case"array":_t=!0,Yt=R.ref,te=[Yt,!1];break;case"datatable":_t=!0,Yt=R.ref,_t=!0}R.ca!==void 0&&Xe.append(B,K);break;case"is":return void(Dt=!0)}return void(Dt&&C?.onOpenTag(g))}if(rt){if(k==="c"){ee=g;const R=g.attributes.r;K=u.AddressUtils.fastStringToCol(R);const it=g.attributes.t;it===void 0?se=null:(se=it,se==="str"&&(Dt=!0));let F=g.attributes.s;F!==void 0&&(F=parseInt(F),Rt&&Rt.value===F&&Rt.colEnd+1===K?Rt.colEnd=K:(Rt={colStart:K,rowStart:B,colEnd:K,rowEnd:B,value:F},Wt.push(Rt)))}}else{if(k==="row"){rt=!0;const R=g.attributes.r;if(B=parseInt(R)-1,ft=0,Pt=g.attributes.customHeight,Pt!==void 0&&(ft|=Ht.CustomHeight),Pt!==We&&(mt=!0,We=Pt),Ut=g.attributes.ht,Ut!==void 0&&(ft|=Ht.Ht),Ut!==qe&&(mt=!0,qe=Ut),It=g.attributes.hidden,It!==void 0&&(ft|=Ht.Hidden),It!==_e&&(mt=!0,_e=It),Vt=g.attributes.s,Vt!==void 0&&(ft|=Ht.S),Vt!==ze&&(mt=!0,ze=Vt),Ot=g.attributes.customFormat,Ot!==void 0&&(ft|=Ht.CustomFormat),Ot!==Ue&&(mt=!0,Ue=Ot),Nt=g.attributes.outlineLevel,Nt!==void 0&&(ft|=Ht.OutlineLevel),Nt!==Ge&&(mt=!0,Ge=Nt),Lt=g.attributes.collapsed,Lt!==void 0&&(ft|=Ht.Collapsed),Lt!==Je&&(mt=!0,Je=Lt),ft!==0)if(Be+1!==B||mt){const it=Pt!==void 0&&(Pt==="1"||Pt==="true"),F=Ot!==void 0&&(Ot==="1"||Ot==="true");Ce={min:B,max:B,sz:it&&Ut!==void 0?parseFloat(Ut):-1,csz:it,h:It!==void 0&&(It==="1"||It==="true"),s:it&&Vt!==void 0&&Vt!=="0"?parseInt(Vt):0,cs:F,l:Nt===void 0||Nt==="0"?0:parseInt(Nt),cl:Lt!==void 0&&(Lt==="1"||Lt==="true")},Se.push(Ce)}else Ce.max=B;return Be=B,void(mt=!1)}l?.onOpenTag(g)}},onCloseTag:g=>{if(ee){let k=g.name;const st=k.indexOf(":");if(st!==-1&&(k=k.slice(st+1)),Dt)if(k==="is"||k==="v"){const R=C?.onEnd();R!==null&&e.addValue(B,K,""+R)}else C?.onCloseTag?.(g);return At&&(At=!1),void(k==="c"&&(ee=null,Dt=!1))}if(rt)return rt=!1,void(Rt=null);l?.onCloseTag(g)},onText:g=>{if(g=g.trim(),At){switch(gt=null,se){case null:case"n":gt=parseFloat(g);break;case"b":gt=g==="1"||g==="true";break;case"s":gt=g;break;case"e":if(g==="#VALUE!"){const st=ee.attributes.vm;if(st!==void 0){const R=ys[parseInt(st)-1];if(R&&R.isFormulaError){gt={t:u.ScalarType.Error,v:R.getCode()};break}}}const k=u.FormulaError.getBuiltInByLabel(g);k?gt={t:u.ScalarType.Error,v:k.getCode()}:(gt=g,p?.(`Unknown formula error '${g}' in cell ${u.AddressUtils.cellToString({colIndex:K,rowIndex:B})}`));break;case"str":case"inlineStr":Dt=!0}gt!==null&&e.addValue(B,K,gt)}if(te&&(se==="e"&&(te[1]=!0),ve.push(te),te=null),Et)if($e===Et)nt=Fe;else{if(nt=He.get(Et),!nt){const k=[];de=Me(g,B,K,k),nt=[de,k,g],He.set(Et,nt)}$e=Et,Fe=nt}if(_t){const k=[];de=Me(g,B,K,k),nt=[de,k,g]}if(nt)return je.append(B,K,nt),nt=null,_t=!1,Et=null,void(Yt=null);Dt?C?.onText(g):rt||l?.onText(g)}}})(Q,N,h.createEventHandler(N,()=>{},Z),Z,Ts,wt)})(tt,(N,G=!1)=>ae(N,$,G)??null,ds,we,0,N=>{o&&(N=$+": "+N,o?.(N))},W),Bt=is($,ne),xt=await(async(N,G=8388608)=>{await(async()=>{if(typeof ReadableStream>"u")if(typeof window>"u"){const{ReadableStream:Z}=await Promise.resolve().then(()=>require("./B6jW4__3xi32ba5Z.cjs"));globalThis.ReadableStream=Z}else console.warn("Browser does not support ReadableStream; consider loading a polyfill.")})();const Qt=new TextDecoder("utf-8");let _=0;const J=N instanceof Uint8Array?N:new Uint8Array(N);return new ReadableStream({pull(Z){if(_>=J.byteLength)return void Z.close();const wt=J.subarray(_,Math.min(_+G,J.byteLength)),h=Qt.decode(wt,{stream:_+G<J.byteLength});Z.enqueue(h),_+=wt.length}}).getReader()})(Bt);try{await Ae.parseStream(xt,bt,{xmlns:!1})}catch(N){throw console.warn(`Error parsing sheet: '${$}'`,N),new Error(`Error parsing sheet: '${$}'`,{cause:N})}const qt=fe($,ut);let kt,Re=new Map;if(qt){const N="http://schemas.microsoft.com/office/2017/10/relationships/threadedComment";let G;qt.forEach((_,J)=>{_.type===N&&(kt=ae(J,$,!1,ut)?.comments,kt&&kt.forEach(Z=>{Re.set(Z.id,Z)}))});const Qt="http://schemas.openxmlformats.org/officeDocument/2006/relationships/comments";if(qt.forEach((_,J)=>{_.type===Qt&&(G=ae(J,$,!1,ut))}),G||kt){const _=kt??[],J=G?.comments;if(J){const Z=G?.authors;for(let wt=0;wt<J.length;wt++){const h=J[wt];let Q=h.authorId!==void 0?Z[h.authorId]:void 0;if((!Q||Q.startsWith("tc="))&&(Q=cs(Q.substring(3)),Re.has(Q)))continue;let j=ce.get(Q);j||(j=Ve.get(Q)),j||(j={id:u.CommonUtils.uuidV4(),displayName:Q},Ve.set(j.displayName,j),ce.set(j.id,j)),Q=j?.id??null;const ue={id:u.CommonUtils.uuidV4(),personId:Q,ref:h.ref,done:!1,asNote:!0,content:h.content};_.push(ue)}}tt.comments=_}}};Pe.push(et())}else Xt=Y?is($,ne,tt=>{const et=y.add({buffer:tt});return et.addReference(V),H.add(et),m.toResourceId(et)},yt):Ee($,ne,f,P,yt);return Xt},yt={paramMap:W,getRefs:fe,getRef:ae,parsedRefs:ht,onWarning:o,addPerson:I=>null},le=[];let me=0;d.Strings&&(me=parseInt(d.Strings.Unique??d.Strings.length??0));const us=d.Strings??[];for(let I=0;I<me;I++)le.push(us[I]?.t??"");const Ie=new Map;let Oe=me;const ds=I=>{const z=Ie.get(I);if(z!==void 0)return z;const Y=Oe;return Ie.set(I,Oe++),le.push(I),Y},ce=(zt("richstructure",d,f,P,yt),zt("richdata",d,f,P,yt),new Map),Ve=new Map,Ne=zt("people",d,f,P);let Ct=null;if(Ne.size>0&&(Ct=Ne.entries().next()?.value?.[1]?.persons,Ct)){const I=Ct.length;for(let z=0;z<I;z++){const Y=Ct[z];ce.set(Y.id,Y),ce.set(Y.displayName,Y)}}const Te=zt("themes",d,f,P,yt);let Le=null;if(Te&&Te.entries){let I=Te.entries().next();I?.value?.[1]&&(Le=I.value[1])}const ps=new u.Theme(Le);let he=zt("styles",d,f,P,yt).entries().next()?.value[1];he&&(he=JSON.parse(u.JSONStableStringify(he)));const gs=zt("workbooks",d,f,P,yt);await Promise.all(Pe);const ye={...gs.entries().next().value[1],styles:he,theme:ps.toJSON()};le.length>0&&(ye.strings=le),Ct&&Ct.length>0&&(ye.people=Ct);const fs={...n,resources:y,json:ye},ms=new u.Workbook(fs);return H.forEach(I=>{I.deleteReference(V)}),m.endPersist(),ms}catch(d){let P="Unable to parse XLSX.";throw d instanceof u.OutOfBoundsError&&(P="Unable to open XLSX. There are too many rows or columns."),new Error(P,{cause:d})}},toBufferXLSX:async(i,t)=>{const s=await Promise.resolve().then(()=>require("./t1zHQhUwG57XvWD1.cjs")),o=await i.toJSON(!0),n=s.utils.book_new();for(let a=0;a<o.sheets.length;a++){const c=o.sheets[a],T=s.utils.json_to_sheet([{}]);s.utils.book_append_sheet(n,T,c.name);const S=c.sheet,x=i.getSheetAt(a),w=x.getUsedRange();if(w?(T["!ref"]=w.getA1(),w.forEach((D,b)=>{const d={t:"z"},P=b.getCell().getStyle();if(!P.isNormal()){let f=P.getNumberFormat();f!==u.NumberFormat.Type.General&&(f===u.NumberFormat.Type.ShortDate?f="m/d/yyyy":f===u.NumberFormat.Type.MediumDate?f="d-mmm-yy":f===u.NumberFormat.Type.LongDate?f="[$-x-sysdate]dddd, mmmm dd, yyyy":f===u.NumberFormat.Type.ShortTime?f="h:mm":f===u.NumberFormat.Type.MediumTime?f="h:mm AM/PM":f===u.NumberFormat.Type.LongTime&&(f="h:mm:ss AM/PM"),d.z=f)}if(D!==null)switch(b.getType()){case u.ScalarType.Number:d.t="n",d.v=D;break;case u.ScalarType.String:d.t="s",d.v=D;break;case u.ScalarType.Boolean:d.t="b",d.v=D;break;case u.ScalarType.Error:d.t="e",d.v=D.toString();case u.ScalarType.RichData:}T[b.getA1()]=d})):T["!ref"]="A1:A1",S.merges?.length>0){const D=[];T["!merges"]=D;for(let b=0;b<S.merges.length;b++)D.push(s.utils.decode_range(S.merges[b]))}if(S.cols?.length>0){const D=[];T["!cols"]=D;const b=S.cols,d={width:S.defaultColSize??x.getColumnWidthAsFontUnit(x.getColumnHeaders().getDefaultSize())};for(let P=0;P<b.length;P++){const f=b[P];for(let m=D.length;m<=f.min-1;m++)D.push(d);const y={};f.sz!==void 0&&(y.width=f.sz),f.h!==void 0&&(y.hidden=f.h),f.l!==void 0&&(y.level=f.l);for(let m=f.min;m<=f.max;m++)D.push(y)}}}return s.write(n,{type:"array",bookType:"xlsx"}),s.write(n,{type:"array",bookType:"xlsx"})}},Symbol.toStringTag,{value:"Module"}));exports.a=i=>parseFloat(i)/1e3,exports.b=hs,exports.c=i=>i?Ke.Jt.roundAccurately(parseFloat(i)/9525,1):null,exports.d=De,exports.i=js,exports.p=i=>parseFloat(i)/6e4,exports.r=cs,exports.t=i=>i?Ke.Jt.roundAccurately(parseFloat(i)/12700,4):null;
|
|
11
|
+
`),t=this.i;break;case O:o!==void 0&&(this.text+=s.slice(t));break t;default:U(a)||(n=!0)}}n&&(this.sawRoot||this.reportedTextBeforeRoot||(this.fail("text data outside of root node."),this.reportedTextBeforeRoot=!0),this.closedRoot&&!this.reportedTextAfterRoot&&(this.fail("text data outside of root node."),this.reportedTextAfterRoot=!0))}pushAttribNS(t,s){const{prefix:o,local:n}=this.qname(t),a={name:t,prefix:o,local:n,value:s};if(this.attribList.push(a),this.attributeHandler?.(a),o==="xmlns"){const c=s.trim();this.currentXMLVersion==="1.0"&&c===""&&this.fail("invalid attempt to undefine prefix in XML 1.0"),this.topNS[n]=c,ke(this,n,c)}else if(t==="xmlns"){const c=s.trim();this.topNS[""]=c,ke(this,"",c)}}pushAttribPlain(t,s){const o={name:t,value:s};this.attribList.push(o),this.attributeHandler?.(o)}end(){this.sawRoot||this.fail("document must contain a root element.");const{tags:t}=this;for(;t.length>0;){const o=t.pop();this.fail(`unclosed tag: ${o.name}`)}this.state!==0&&this.state!==q&&this.fail("unexpected end.");const{text:s}=this;return s.length!==0&&(this.textHandler?.(s),this.text=""),this._closed=!0,this.endHandler?.(),this._init(),this}resolve(t){let s=this.topNS[t];if(s!==void 0)return s;const{tags:o}=this;for(let n=o.length-1;n>=0;n--)if(s=o[n].ns[t],s!==void 0)return s;return s=this.ns[t],s!==void 0?s:this.opt.resolvePrefix?.(t)}qname(t){const s=t.indexOf(":");if(s===-1)return{prefix:"",local:t};const o=t.slice(s+1),n=t.slice(0,s);return(n===""||o===""||o.includes(":"))&&this.fail(`malformed name: ${t}.`),{prefix:n,local:o}}processAttribsNS(){const{attribList:t}=this,s=this.tag;{const{prefix:a,local:c}=this.qname(s.name);s.prefix=a,s.local=c;const T=s.uri=this.resolve(a)??"";a!==""&&(a==="xmlns"&&this.fail('tags may not have "xmlns" as prefix.'),T===""&&(this.fail(`unbound namespace prefix: ${JSON.stringify(a)}.`),s.uri=a))}if(t.length===0)return;const{attributes:o}=s,n=new Set;for(const a of t){const{name:c,prefix:T,local:S}=a;let x,w;T===""?(x=c==="xmlns"?Zt:"",w=c):(x=this.resolve(T),x===void 0&&(this.fail(`unbound namespace prefix: ${JSON.stringify(T)}.`),x=T),w=`{${x}}${S}`),n.has(w)&&this.fail(`duplicate attribute: ${w}.`),n.add(w),a.uri=x,o[c]=a}this.attribList=[]}processAttribsPlain(){const{attribList:t}=this,s=this.tag.attributes;for(const{name:o,value:n}of t)s[o]!==void 0&&this.fail(`duplicate attribute: ${o}.`),s[o]=n;this.attribList=[]}openTag(){this.processAttribs();const{tags:t}=this,s=this.tag;s.isSelfClosing=!1,this.openTagHandler?.(s),t.push(s),this.state=q,this.name=""}openSelfClosingTag(){this.processAttribs();const{tags:t}=this,s=this.tag;s.isSelfClosing=!0,this.openTagHandler?.(s),this.closeTagHandler?.(s),(this.tag=t[t.length-1]??null)===null&&(this.closedRoot=!0),this.state=q,this.name=""}closeTag(){const{tags:t,name:s}=this;if(this.state=q,this.name="",s==="")return this.fail("weird empty close tag."),void(this.text+="</>");const o=this.closeTagHandler;let n=t.length;for(;n-- >0;){const a=this.tag=t.pop();if(this.topNS=a.ns,o?.(a),a.name===s)break;this.fail("unexpected close tag.")}n===0?this.closedRoot=!0:n<0&&(this.fail(`unmatched closing tag: ${s}.`),this.text+=`</${s}>`)}parseEntity(t){if(t[0]!=="#"){const o=this.ENTITIES[t];return o!==void 0?o:(this.fail(this.isName(t)?"undefined entity.":"disallowed character in entity name."),`&${t};`)}let s=NaN;return t[1]==="x"&&/^#x[0-9a-f]+$/i.test(t)?s=parseInt(t.slice(2),16):/^#[0-9]+$/.test(t)&&(s=parseInt(t.slice(1),10)),this.isChar(s)?String.fromCodePoint(s):(this.fail("malformed character entity."),`&${t};`)}}var Ae,Tt;(Tt=Ae||(Ae={})).Events={XmlDecl:"xmldecl",Text:"text",ProcessingInstruction:"processinginstruction",Doctype:"doctype",Comment:"comment",OpenTagStart:"opentagstart",Attribute:"attribute",OpenTag:"opentag",CloseTag:"closetag",CDdata:"cdata",Error:"error",End:"end",Ready:"ready"},Tt.parseStream=async(i,t,s)=>{const o=new Rs({position:!1,...s});let n;if(t.onOpenTagStart&&o.on(Tt.Events.OpenTagStart,t.onOpenTagStart),t.onOpenTag&&o.on(Tt.Events.OpenTag,t.onOpenTag),t.onCloseTag&&o.on(Tt.Events.CloseTag,t.onCloseTag),t.onAttribute&&o.on(Tt.Events.Attribute,t.onAttribute),t.onText&&o.on(Tt.Events.Text,t.onText),t.onError&&o.on(Tt.Events.Error,t.onError),t.onEnd){t.onEnd;const a=()=>{n=t.onEnd()};o.on(Tt.Events.End,a)}for(;;){const{value:a,done:c}=await i.read();if(c)break;o.write(a)}return o.close(),n};const v=i=>i===!0||i==="1"||i==="on"||i==="true"||i!==!1&&i!=="0"&&i!=="off"&&i!=="false"&&null,E=i=>{const t=parseInt(i);return isNaN(t)?null:t},ct=i=>{const t=parseFloat(i);return isNaN(t)?null:t},A=null;class $s{constructor(){this._registeredVisitors=new Map}registerVisitor(t){this._registeredVisitors.set(t.from,t)}createEventHandler(t,s,o){const n=this._registeredVisitors,a=[];let c=null,T=null,S=null,x=null;const w=[],D={key:null,source:t};let b=null,d=!1;const P=(y,m)=>{let V=S.attributes[y];if(m){if(Array.isArray(m)){for(let H=0;H<m.length;H++)if(V==null||(V=m[H](V),V==null))return}else if(V==null||(V=m(V),V==null))return}return V},f={getSource:()=>b.source,setSource:y=>{b.source=y},setKey:y=>{b.key=y},getFrom:()=>S,getAttribute:(y,m)=>P(y,m)??null,hasAttribute:y=>f.getAttribute(y)!==null,getParent:()=>w[w.length-2].source,getPath:()=>{const y=[];for(let m=0;m<a.length;m++)y.push(a[m].local);return y.join("\\")},parseAttribute:P,copyToObject:(y,m,V,H)=>{const W=P(H??m,V);W!==void 0&&(y[m]=W)},copyTo:(y,m,V)=>{const H=P(V??y,m);H!==void 0&&(b.source[y]=H)},warn:y=>{o?o?.(y):console.warn(y)}};return{onOpenTag:y=>{let m=y.name;const V=m.indexOf(":");V!==-1&&(m=m.slice(V+1));const H=n.get(m);if(c={local:m,visitor:H,tag:y,destination:null},d)return a.push(c),T=m,void(S=y);x=c?.visitor??null,H&&(b=a.length===0?D:x?.to!==null?{key:null,source:{}}:null,c.destination=b,b&&w.push(b)),a.push(c),T=m,S=y,d=x?.to===null,x?.openTag?.(f)},onCloseTag:y=>{let m=y.name;const V=m.indexOf(":");if(V!==-1&&(m=m.slice(V+1)),m!==T)throw new Error(`mismatch open/close tag: '${m}'/'${T}'`);d||x?.closeTag?.(f);const H=a.pop()??null;c=a[a.length-1]??null;const W=H?.destination;if(W){w.pop(),b=w[w.length-1]??D;const ht=H.visitor;ht&&ht.to&&W.source!==void 0&&(Array.isArray(ht.to)?b.source.push?b.source.push(W.source):o?.(`Unable to parse array for ${ht.from} at ${f.getPath()}`):W.key?b.source[W.key]=W.source:typeof ht.to=="string"&&(b.source[ht.to]=W.source))}T=c?.local??null,S=c?.tag??null,x=c?.visitor??null,d=!c?.destination},onText:y=>{x?.text?.(y,f)},onEnd:s}}}const is=(i,t,s,o=null)=>{if(!i)return null;let n=i;n.startsWith("/")&&(n=n.substring(1));let a=o?.parsedRefs?.get(i);if(a!==void 0)return a;const c=t(n);if(!c)return null;let T=c.content;try{s&&(T=s(T))}catch(S){console.warn(S)}return o?.parsedRefs?.set(i,T),T},Ee=(i,t,s,o,n=null)=>{if(!i)return null;let a=i;a.startsWith("/")&&(a=a.substring(1));let c=n?.parsedRefs?.get(i);if(c!==void 0)return c;const T=t(a);if(!T)return null;const S=T.content;try{const x=new TextDecoder().decode(S),w=s.parseFromString(x,"text/xml"),D=o.convert(w,i,n);return n?.parsedRefs?.set(i,D),D}catch(x){console.warn(x)}return null},zt=(i,t,s,o,n=null)=>{const a=new Map;let c=t.Directory[i];const T=c?c.length:0;for(let S=0;S<T;S++){const x=c[S];if(!x)continue;let w=x;w.startsWith("/")&&(w=w.substring(1));const D=Ee(w,b=>t.files[b],s,o,n);a.set(w,D)}return a},Fs=["lt1","dk1","lt2","dk2","accent1","accent2","accent3","accent4","accent5","accent6","hlink","folHlink"],De=(i,t="dk1")=>{let s;const o=i("auto");o===void 0||o!=="1"&&o!=="true"||(s=t);const n=i("indexed");n&&(s=`index${n}`);const a=i("rgb");a&&(s=a.toLowerCase(),a.length!==8||a.startsWith("FF")||(s="FF"+a.substring(2,a.length)));const c=i("theme");c&&(s=Fs[c]);let T=i("tint");if(T&&(s+=` ${u.IColor.AdjustmentType.ETint} ${parseFloat(T)}`),s)return s},cs=i=>i&&i.replace(/^\{([\s\S]+)\}$/,"$1"),hs=i=>i==="true"||i==="1";class Ht{static{this.Collapsed=1}static{this.CustomFormat=2}static{this.CustomHeight=4}static{this.Hidden=8}static{this.Ht=16}static{this.OutlineLevel=32}static{this.Ph=64}static{this.R=128}static{this.S=256}static{this.Spans=512}static{this.ThickBot=1024}static{this.ThickTop=2048}}const Ms=(i,t,s)=>{if(i[0].value[0]===i[1].value[0])return t},os={colStart:0,colEnd:0,rowStart:0,rowEnd:0},js=Object.freeze(Object.defineProperty({__proto__:null,fromBufferXLSX:async(i,t)=>{const{password:s,onWarning:o,constructorOptions:n={},...a}=t??{},c=Promise.resolve().then(()=>require("./dSQsUiYfKgCeXIkX.cjs")),T=Promise.resolve().then(()=>require("./DaFwh8KAofYPK_94.cjs"));let S=null;try{S=new DOMParser}catch{}let x=null;S||(x=Promise.resolve().then(()=>require("./DF77um3uIPohBL8j.cjs")).then(d=>d.i));let w=null,D=null,b=null;try{const d=await Promise.all([c,T,x]);w=d[0],D=d[1],b=d[2]}catch(d){throw new Error("Unable to load XLSX parser.",{cause:d})}try{const d=w.read(i,{type:"array",sheets:[],cellStyles:!1,bookFiles:!0});if(!d.Directory)throw new Error("Unable to parse as an Excel document. Try to save as '.xlsx' and try again.");d.Directory.richstructure=["/xl/richData/rdrichvaluestructure.xml"],d.Directory.richdata=["/xl/richData/rdrichvalue.xml"];const P=new D.FromOOXMLConverter,f=S??new b.DOMParser,y=n?.resources??new u.ResourceCollection,m=y.beginPersist(),V={},H=new Set,W=new Map;W.set("richTypes",[]);const ht=new Map,Pe=[],ne=I=>d.files[I],fe=(I,z)=>{const Y=I.lastIndexOf("/"),ut=I.substring(0,Y+1)+"_rels/"+I.substring(Y+1,I.length)+".rels";let dt=z.get(ut);return dt||(dt=(($,be,xe,we,Xt=null)=>{if(!$)return null;const tt=Ee($,be,xe,we,Xt);if(!tt)return null;const et=new Map,bt=Object.keys(tt),Bt=bt.length;for(let xt=0;xt<Bt;xt++){const qt=bt[xt],kt=tt[qt];et.set(qt,kt)}return et})(ut,ne,f,P,yt),z.set(ut,dt)),dt},ae=(I,z,Y,ut=ht)=>{let dt=fe(z,ut).get(I),$=dt?.target;if(!$)return null;if(dt.targetMode==="External")return dt.target;const be=z.lastIndexOf("/"),xe=z.substring(0,be+1);$.startsWith("/")||($=xe+$),$=(tt=>{const et=tt.split(/\/+/);return et.reduce((bt,Bt,xt)=>(Bt==="."?bt.splice(xt,1):Bt===".."&&bt.splice(xt-1,2),bt),et).join("/")})($);const we=P?.getVisitorParamsState().get("dxfs");let Xt=ut.get($);if(!Xt)if(dt.type==="http://schemas.openxmlformats.org/officeDocument/2006/relationships/worksheet"){const tt={};Xt=tt;const et=async()=>{const bt=((N,G,Qt,_,J,Z,wt)=>{const h=new $s,Q=new u.Tuple.TransposedBuilder;let j=null;h.registerVisitor({from:"autoFilter",to:"filter",openTag:e=>{e.copyTo("ref",A)}}),h.registerVisitor({from:"conditionalFormatting",to:{},openTag:e=>{const r=e.getParent();r.conditionals||(r.conditionals=[]),r.conditionals.push(e.getSource());const l=e.getAttribute("sqref");l&&(e.getSource().ref=l.split(" ").join(",")),e.copyTo("pivot",v)},closeTag:e=>{const r=e.getSource();if(r.rule){const l=Object.keys(r.rule);for(let p=0;p<l.length;p++){const C=l[p];C!=="rule"&&(r[C]=r.rule[C])}}delete r.rule}}),h.registerVisitor({from:"cfRule",to:"rule",openTag:e=>{const r=e.getParent();e.copyToObject(r,"type",A),e.copyToObject(r,"priority",E),e.copyToObject(r,"stopIfTrue",v);const l=e.getAttribute("dxfId",E);if(l!==null){let p=_?.get(l);p||(Z?.(`Unable to load conditional color. Invalid dxfI: '${l}' at '${e.getPath()}'.`),p={}),r.style=p}e.copyToObject(r,"aboveAverage",v),e.copyToObject(r,"equalAverage",v),e.copyToObject(r,"stdDev",E),e.copyToObject(r,"bottom",v),e.copyToObject(r,"percent",v),e.copyToObject(r,"rank",E),e.copyToObject(r,"operator",A),e.copyToObject(r,"text",A),e.copyToObject(r,"timePeriod",A)}}),h.registerVisitor({from:"colorScale",to:"colorScale"}),h.registerVisitor({from:"dataBar",to:"dataBar",openTag:e=>{e.copyTo("maxLength",E),e.copyTo("minLength",E),e.copyTo("showValue",v)}}),h.registerVisitor({from:"iconSet",to:"iconSet",openTag:e=>{e.copyTo("iconSet",A),e.copyTo("reverse",v),e.copyTo("showValue",v)}}),h.registerVisitor({from:"formula",to:null,text:(e,r)=>{const l=r.getParent();let p=l.formulas;p||(p=[],l.formulas=p),p.push(e)}}),h.registerVisitor({from:"cfvo",to:{},openTag:e=>{const r=e.getParent();r.conditions||(r.conditions=[]),r.conditions.push(e.getSource()),e.copyTo("type",A),e.copyTo("value",ct,"val"),e.copyTo("gte",v)}}),h.registerVisitor({from:"color",to:{},openTag:e=>{const r=e.getParent();r.colors||(r.colors=[]);const l=De(p=>e.getAttribute(p));r.colors.push(l)}}),h.registerVisitor({from:"filterColumn",to:"filterColumn",openTag:e=>{const r=e.getParent();r.fields||(r.fields=[]),r.fields.push(e.getSource()),e.copyTo("offset",E,"colId"),e.copyTo("hiddenButton",v),e.copyTo("showButton",v)}}),h.registerVisitor({from:"colorFilter",to:"colorFilter",openTag:e=>{const r=e.getParent();r.criteria||(r.criteria=[]),r.criteria.push(e.getSource()),e.getSource().type=u.IAutoFilter.Type.Color,e.copyTo("cellColor",v),e.copyTo("styleId",E,"dxfId")}}),h.registerVisitor({from:"dynamicFilter",to:"dynamicFilter",openTag:e=>{const r=e.getParent();r.criteria||(r.criteria=[]),r.criteria.push(e.getSource()),e.getSource().type=u.IAutoFilter.Type.Dynamic,e.copyTo("dynamicType",A,"type"),e.copyTo("val",ct),e.copyTo("maxVal",ct,"maxVal")}}),h.registerVisitor({from:"iconFilter",to:"iconFilter",openTag:e=>{const r=e.getParent();r.criteria||(r.criteria=[]),r.criteria.push(e.getSource()),e.getSource().type=u.IAutoFilter.Type.Icon,e.copyTo("iconId",E),e.copyTo("iconSet",A)}}),h.registerVisitor({from:"top10",to:"top10",openTag:e=>{const r=e.getParent();r.criteria||(r.criteria=[]),r.criteria.push(e.getSource()),e.getSource().type=u.IAutoFilter.Type.Top10,e.copyTo("filterVal",ct),e.copyTo("percent",v),e.copyTo("top",v),e.copyTo("val",ct)}}),h.registerVisitor({from:"filters",to:"filters",openTag:e=>{const r=e.getParent();r.criteria||(r.criteria=[]),r.criteria.push(e.getSource()),e.getSource().type=u.IAutoFilter.Type.Items,e.copyTo("blank",v),e.copyTo("calendarType",A)}}),h.registerVisitor({from:"dateGroupItem",to:"dateGroupItem",openTag:e=>{const r=e.getParent();r.dateGroups||(r.dateGroups=[]),r.dateGroups.push(e.getSource()),e.copyTo("group",A,"dateTimeGrouping"),e.copyTo("day",E),e.copyTo("hour",E),e.copyTo("minute",E),e.copyTo("month",E),e.copyTo("second",E),e.copyTo("year",E)}}),h.registerVisitor({from:"filter",to:"filter",openTag:e=>{const r=e.getParent();r.items||(r.items=[]),r.items.push(e.getAttribute("val",ct))}}),h.registerVisitor({from:"customFilters",to:"customFilters",openTag:e=>{const r=e.getParent();r.criteria||(r.criteria=[]),r.criteria.push(e.getSource()),e.getSource().type=u.IAutoFilter.Type.Custom,e.copyTo("and",v)}}),h.registerVisitor({from:"customFilter",to:"customFilter",openTag:e=>{const r=e.getParent();r.filters||(r.filters=[]),r.filters.push(e.getSource()),e.copyTo("operator",A),e.copyTo("value",ct,"val")}}),h.registerVisitor({from:"sortState",to:"sort",openTag:e=>{e.copyTo("ref",A)}}),h.registerVisitor({from:"sortCondition",to:"sortCondition",openTag:e=>{const r=e.getParent();r.fields||(r.fields=[]);const l=e.getSource();r.fields.push(l),e.copyTo("sortOn",A,"sortBy"),e.copyTo("dxfId",A,"sortBy"),e.copyTo("iconSet",A),e.copyTo("customList",A);const p=e.getAttribute("ref");if(p){const C=u.AddressUtils.fastStringToRange(p,os).colStart,pt=u.AddressUtils.fastStringToRange(r.ref,os),rt=pt.colStart;l.offset=pt?C-rt:C}l.reverse=e.getAttribute("descending",v)??!1}}),h.registerVisitor({from:"AlternateContent",to:null});const ue=e=>{j=e.getSource(),e.copyTo("topLeft",A,"topLeftCell");const r=hs(e.getAttribute("defaultGridColor")),l=e.getAttribute("colorId");l===null||r||(e.getSource().gridLineColor="index"+parseFloat(l)),e.copyTo("showZeros",v),e.copyTo("showFormulas",v),e.copyTo("zoomScale",E),e.copyTo("showRowHeaders",v,"showRowColHeaders"),e.copyTo("showColumnHeaders",v,"showRowColHeaders"),e.copyTo("showRowGridlines",v,"showGridLines"),e.copyTo("showColumnGridlines",v,"showGridLines")};h.registerVisitor({from:"sheetView",to:"view",openTag:e=>{ue(e)},closeTag:()=>{j=null}}),h.registerVisitor({from:"customSheetViews",to:"customSheetViews",openTag:e=>{e.setSource([])}}),h.registerVisitor({from:"customSheetView",to:[],openTag:e=>{ue(e)},closeTag:()=>{j=null}}),h.registerVisitor({from:"selection",to:"selection",openTag:e=>{if(!j)return;e.copyTo("cell",A,"activeCell"),e.copyTo("rangeIndex",E,"activeCellId");const r=e.getAttribute("activeCell"),l=e.getAttribute("sqref");l&&l!==r&&(e.getSource().ranges=l.split(" "))}}),h.registerVisitor({from:"pane",to:"pane",openTag:e=>{if(j&&e.getAttribute("state")==="frozen"){const r={};j.freezePanes=r,e.copyToObject(r,"topLeft",A,"topLeftCell");const l=j.topLeft?u.AddressUtils.fastStringToCell(j.topLeft):{colIndex:0,rowIndex:0},p={colIndex:0,rowIndex:0};e.copyToObject(p,"colIndex",E,"xSplit"),e.copyToObject(p,"rowIndex",E,"ySplit");const C={colIndex:l.colIndex+p.colIndex,rowIndex:l.rowIndex+p.rowIndex};r.coords=u.AddressUtils.cellToString(C)}}}),h.registerVisitor({from:"tabColor",to:null,openTag:e=>{const r=De(l=>e.getAttribute(l));r&&(N.tabColor=r)}}),h.registerVisitor({from:"pageSetUpPr",to:"pageSetUpPr",openTag:e=>{}}),h.registerVisitor({from:"outlinePr",to:"outlinePr",openTag:e=>{}}),h.registerVisitor({from:"pageMargins",to:"pageMargins",openTag:e=>{}}),h.registerVisitor({from:"pageSetup",to:"pageSetup",openTag:e=>{}}),h.registerVisitor({from:"printOptions",to:"printOptions",openTag:e=>{}}),h.registerVisitor({from:"mergeCells",to:"merges",openTag:e=>{e.setSource([])}}),h.registerVisitor({from:"mergeCell",to:[],openTag:e=>{const r=e.getAttribute("ref");e.setSource(r)}}),h.registerVisitor({from:"hyperlinks",to:"hyperlinks",openTag:e=>{e.setSource([])}}),h.registerVisitor({from:"hyperlink",to:[],openTag:e=>{const r=e.getAttribute("r:id"),l=e.getAttribute("ref");if(!l)return void console.warn("No ref found for hyperlink");e.setKey(l);let p=r?G(r):"";if(typeof p!="string")return void console.warn("Invalid address ",p);const C=e.getAttribute("location");p.endsWith("\\")&&(p=p.substring(0,p.length-1));const pt=e.getAttribute("location");if(pt&&(C&&C!==pt&&console.warn("display and location are different",C,pt),p+="#"+pt),!p)return void console.warn("No address found for hyperlink. r:id",r);let rt;const At=e.getAttribute("tooltip");rt=At?{address:p,tooltip:At}:p,e.setSource({r:l,v:rt})}}),h.registerVisitor({from:"drawing",to:"movables",openTag:e=>{const r=e.getAttribute("r:id");if(!r)return;const l=G(r);l?e.setSource(l.movables):console.warn("no drawing found for rId",r)}}),h.registerVisitor({from:"tableParts",to:"tables",openTag:e=>{e.setSource([])}}),h.registerVisitor({from:"tablePart",to:[],openTag:e=>{const r=e.getAttribute("r:id");if(!r)return;const l=G(r);l?e.setSource(l):console.warn("no table found for rId",r)}}),h.registerVisitor({from:"worksheet",to:"worksheet",openTag:e=>{}}),h.registerVisitor({from:"sheetProtection",to:"protection",openTag:e=>{let r=!1;if(e.hasAttribute("sheet")&&v(e.getAttribute("sheet"))&&(r=!0),!r)return void e.setSource(void 0);const l=C=>C===!0||C==="1"||C==="on"||C==="true"||C===!1||C==="0"||C==="off"||C==="false"||null;e.copyTo("autoFilter",l),e.copyTo("deleteColumns",l),e.copyTo("formatCells",l),e.copyTo("formatColumns",l),e.copyTo("formatRows",l),e.copyTo("insertColumns",l),e.copyTo("insertHyperlinks",l),e.copyTo("insertRows",l),e.copyTo("objects",l),e.copyTo("pivotTables",l),e.copyTo("scenarios",l),e.copyTo("selectUnlockedCells",l),e.copyTo("selectUnlockedCells",l),e.copyTo("sort",l);const p={};e.copyToObject(p,"hash",A,"hashValue"),e.copyToObject(p,"algorithm",A,"algorithmName"),e.copyToObject(p,"salt",A,"saltValue"),e.copyToObject(p,"spinCount",E),Object.keys(p).length>0&&(e.getSource().password=p)}}),h.registerVisitor({from:"protectedRanges",to:"protectedRanges",openTag:e=>{e.setSource({})}}),h.registerVisitor({from:"protectedRange",to:{},openTag:e=>{const r=e.getAttribute("sqref");e.setKey(r),e.copyTo("name"),e.copyTo("securityDescriptor");const l={};e.copyToObject(l,"hash",A,"hashValue"),e.copyToObject(l,"algorithm",A,"algorithmName"),e.copyToObject(l,"salt",A,"saltValue"),e.copyToObject(l,"spinCount",E),Object.keys(l).length>0&&(e.getSource().password=l)}}),h.registerVisitor({from:"sheetFormatPr",to:"sheetFormatPr",openTag:e=>{e.copyToObject(N,"defaultColSize",ct,"defaultColWidth"),e.copyToObject(N,"outlineLevelCol",E,"outlineLevelCol");const r=e.getAttribute("customHeight");r!=="1"&&r!=="true"||e.copyToObject(N,"defaultRowSize",ct,"defaultRowHeight"),e.copyToObject(N,"outlineLevelRow",E,"outlineLevelRow")}}),h.registerVisitor({from:"cols",to:"cols",openTag:e=>{e.setSource([])}}),h.registerVisitor({from:"col",to:[],openTag:e=>{e.copyTo("min",r=>parseInt(r)-1),e.copyTo("max",r=>parseInt(r)-1),e.copyTo("sz",ct,"width"),e.copyTo("cs",v,"customWidth"),e.copyTo("h",v,"hidden"),e.copyTo("l",E,"outlineLevel"),e.copyTo("s",E,"style")}}),h.registerVisitor({from:"oleObjects",to:null,openTag:e=>{e.warn("'OLE Objects' are not supported.")}});let Kt=null;const Ts={onOpenTag:e=>{Kt===null&&(Kt="")},onText:e=>{Kt+=e},onEnd:()=>{const e=Qt(Kt);return Kt=null,e},onError:e=>{}};return((e,r,l,p,C,pt)=>{let rt=!1,At=!1,Wt=[],_t=!1,Et=null,Yt=null,de=null,nt=null,$e=null,Fe=null;const ys=pt?.get("richData")??[],Me=u.AddressUtils.normalizeA1ToR1C1,je=u.CoordUtils.createConflatingRanges(),He=new Map,ve=[];let te=null;const Xe=u.CoordUtils.createConflatingRanges();let ee,Dt=!1,B=-1,K=-1,gt=null,se=null;const Se=[];let Ce=null,Be=-2,ft=0,Ut="",Pt="",It="",Ot="",Vt="",Nt="",Lt="",qe="",We="",_e="",Ue="",ze="",Ge="",Je="",mt=!0,Rt=null;return{...l,onEnd:()=>{Se.length>0&&(r.rows=Se);let g=je.done(Ms);const k=g.length;if(k>0){const F=new Array(k);for(let L=0;L<k;L++){const at=g[L],$t=u.AddressUtils.rangeToString(at),Ft=at.value[1],ie=u.AddressUtils.resolveRelativeToA1(Ft,at.rowStart,at.colStart);F[L]=[$t,ie]}r.formulas=F}const st=Xe.done(!0),R=st.length;if(R>0){const F=new Array(R);for(let L=0;L<R;L++){const at=st[L],$t=u.AddressUtils.rangeToString(at);F[L]=$t}r.volatile=F}if(ve.length>0&&(r.dynamicArray=[...ve]),Wt.length>0){Wt.sort(u.CoordUtils.createRangeComparator(u.IRange.Orientation.Column));const F=[];let L=null,at=-1,$t=-1,Ft=-1,ie=-1,vt=null;const Ze=Wt.length;Ze>0&&(L=Wt[0],at=L.colStart,$t=L.colEnd,Ft=L.rowEnd,ie=L.value,F.push(L));for(let Mt=1;Mt<Ze;Mt++)vt=Wt[Mt],ie!==vt.value||at!==vt.colStart||$t!==vt.colEnd||Ft+1!==vt.rowEnd?(F.push(vt),L=vt,at=L.colStart,$t=L.colEnd,Ft=L.rowEnd,ie=L.value):(Ft=vt.rowEnd,L.rowEnd=Ft);let Qe=[];for(let Mt=0;Mt<F.length;Mt++){const oe=F[Mt];Qe.push({r:{colStart:oe.colStart,colEnd:oe.colEnd,rowStart:oe.rowStart,rowEnd:oe.rowEnd},v:oe.value})}r.directStyles=Qe}const it=e.build();if(it){const F=it.tuples;r.data=F}l?.onEnd?.()},onOpenTag:g=>{let k=g.name;const st=k.indexOf(":");if(st!==-1&&(k=k.slice(st+1)),ee){const R=g.attributes;switch(k){case"v":At=!0;break;case"f":switch(R.t??null){case null:case"normal":_t=!0;break;case"shared":const it=R.si;Yt=R.ref,Et=it;break;case"array":_t=!0,Yt=R.ref,te=[Yt,!1];break;case"datatable":_t=!0,Yt=R.ref,_t=!0}R.ca!==void 0&&Xe.append(B,K);break;case"is":return void(Dt=!0)}return void(Dt&&C?.onOpenTag(g))}if(rt){if(k==="c"){ee=g;const R=g.attributes.r;K=u.AddressUtils.fastStringToCol(R);const it=g.attributes.t;it===void 0?se=null:(se=it,se==="str"&&(Dt=!0));let F=g.attributes.s;F!==void 0&&(F=parseInt(F),Rt&&Rt.value===F&&Rt.colEnd+1===K?Rt.colEnd=K:(Rt={colStart:K,rowStart:B,colEnd:K,rowEnd:B,value:F},Wt.push(Rt)))}}else{if(k==="row"){rt=!0;const R=g.attributes.r;if(B=parseInt(R)-1,ft=0,Pt=g.attributes.customHeight,Pt!==void 0&&(ft|=Ht.CustomHeight),Pt!==We&&(mt=!0,We=Pt),Ut=g.attributes.ht,Ut!==void 0&&(ft|=Ht.Ht),Ut!==qe&&(mt=!0,qe=Ut),It=g.attributes.hidden,It!==void 0&&(ft|=Ht.Hidden),It!==_e&&(mt=!0,_e=It),Vt=g.attributes.s,Vt!==void 0&&(ft|=Ht.S),Vt!==ze&&(mt=!0,ze=Vt),Ot=g.attributes.customFormat,Ot!==void 0&&(ft|=Ht.CustomFormat),Ot!==Ue&&(mt=!0,Ue=Ot),Nt=g.attributes.outlineLevel,Nt!==void 0&&(ft|=Ht.OutlineLevel),Nt!==Ge&&(mt=!0,Ge=Nt),Lt=g.attributes.collapsed,Lt!==void 0&&(ft|=Ht.Collapsed),Lt!==Je&&(mt=!0,Je=Lt),ft!==0)if(Be+1!==B||mt){const it=Pt!==void 0&&(Pt==="1"||Pt==="true"),F=Ot!==void 0&&(Ot==="1"||Ot==="true");Ce={min:B,max:B,sz:it&&Ut!==void 0?parseFloat(Ut):-1,csz:it,h:It!==void 0&&(It==="1"||It==="true"),s:it&&Vt!==void 0&&Vt!=="0"?parseInt(Vt):0,cs:F,l:Nt===void 0||Nt==="0"?0:parseInt(Nt),cl:Lt!==void 0&&(Lt==="1"||Lt==="true")},Se.push(Ce)}else Ce.max=B;return Be=B,void(mt=!1)}l?.onOpenTag(g)}},onCloseTag:g=>{if(ee){let k=g.name;const st=k.indexOf(":");if(st!==-1&&(k=k.slice(st+1)),Dt)if(k==="is"||k==="v"){const R=C?.onEnd();R!==null&&e.addValue(B,K,""+R)}else C?.onCloseTag?.(g);return At&&(At=!1),void(k==="c"&&(ee=null,Dt=!1))}if(rt)return rt=!1,void(Rt=null);l?.onCloseTag(g)},onText:g=>{if(g=g.trim(),At){switch(gt=null,se){case null:case"n":gt=parseFloat(g);break;case"b":gt=g==="1"||g==="true";break;case"s":gt=g;break;case"e":if(g==="#VALUE!"){const st=ee.attributes.vm;if(st!==void 0){const R=ys[parseInt(st)-1];if(R&&R.isFormulaError){gt={t:u.ScalarType.Error,v:R.getCode()};break}}}const k=u.FormulaError.getBuiltInByLabel(g);k?gt={t:u.ScalarType.Error,v:k.getCode()}:(gt=g,p?.(`Unknown formula error '${g}' in cell ${u.AddressUtils.cellToString({colIndex:K,rowIndex:B})}`));break;case"str":case"inlineStr":Dt=!0}gt!==null&&e.addValue(B,K,gt)}if(te&&(se==="e"&&(te[1]=!0),ve.push(te),te=null),Et)if($e===Et)nt=Fe;else{if(nt=He.get(Et),!nt){const k=[];de=Me(g,B,K,k),nt=[de,k,g],He.set(Et,nt)}$e=Et,Fe=nt}if(_t){const k=[];de=Me(g,B,K,k),nt=[de,k,g]}if(nt)return je.append(B,K,nt),nt=null,_t=!1,Et=null,void(Yt=null);Dt?C?.onText(g):rt||l?.onText(g)}}})(Q,N,h.createEventHandler(N,()=>{},Z),Z,Ts,wt)})(tt,(N,G=!1)=>ae(N,$,G)??null,ds,we,0,N=>{o&&(N=$+": "+N,o?.(N))},W),Bt=is($,ne),xt=await(async(N,G=8388608)=>{await(async()=>{if(typeof ReadableStream>"u")if(typeof window>"u"){const{ReadableStream:Z}=await Promise.resolve().then(()=>require("./COGHRF-aTQc10NMv.cjs"));globalThis.ReadableStream=Z}else console.warn("Browser does not support ReadableStream; consider loading a polyfill.")})();const Qt=new TextDecoder("utf-8");let _=0;const J=N instanceof Uint8Array?N:new Uint8Array(N);return new ReadableStream({pull(Z){if(_>=J.byteLength)return void Z.close();const wt=J.subarray(_,Math.min(_+G,J.byteLength)),h=Qt.decode(wt,{stream:_+G<J.byteLength});Z.enqueue(h),_+=wt.length}}).getReader()})(Bt);try{await Ae.parseStream(xt,bt,{xmlns:!1})}catch(N){throw console.warn(`Error parsing sheet: '${$}'`,N),new Error(`Error parsing sheet: '${$}'`,{cause:N})}const qt=fe($,ut);let kt,Re=new Map;if(qt){const N="http://schemas.microsoft.com/office/2017/10/relationships/threadedComment";let G;qt.forEach((_,J)=>{_.type===N&&(kt=ae(J,$,!1,ut)?.comments,kt&&kt.forEach(Z=>{Re.set(Z.id,Z)}))});const Qt="http://schemas.openxmlformats.org/officeDocument/2006/relationships/comments";if(qt.forEach((_,J)=>{_.type===Qt&&(G=ae(J,$,!1,ut))}),G||kt){const _=kt??[],J=G?.comments;if(J){const Z=G?.authors;for(let wt=0;wt<J.length;wt++){const h=J[wt];let Q=h.authorId!==void 0?Z[h.authorId]:void 0;if((!Q||Q.startsWith("tc="))&&(Q=cs(Q.substring(3)),Re.has(Q)))continue;let j=ce.get(Q);j||(j=Ve.get(Q)),j||(j={id:u.CommonUtils.uuidV4(),displayName:Q},Ve.set(j.displayName,j),ce.set(j.id,j)),Q=j?.id??null;const ue={id:u.CommonUtils.uuidV4(),personId:Q,ref:h.ref,done:!1,asNote:!0,content:h.content};_.push(ue)}}tt.comments=_}}};Pe.push(et())}else Xt=Y?is($,ne,tt=>{const et=y.add({buffer:tt});return et.addReference(V),H.add(et),m.toResourceId(et)},yt):Ee($,ne,f,P,yt);return Xt},yt={paramMap:W,getRefs:fe,getRef:ae,parsedRefs:ht,onWarning:o,addPerson:I=>null},le=[];let me=0;d.Strings&&(me=parseInt(d.Strings.Unique??d.Strings.length??0));const us=d.Strings??[];for(let I=0;I<me;I++)le.push(us[I]?.t??"");const Ie=new Map;let Oe=me;const ds=I=>{const z=Ie.get(I);if(z!==void 0)return z;const Y=Oe;return Ie.set(I,Oe++),le.push(I),Y},ce=(zt("richstructure",d,f,P,yt),zt("richdata",d,f,P,yt),new Map),Ve=new Map,Ne=zt("people",d,f,P);let Ct=null;if(Ne.size>0&&(Ct=Ne.entries().next()?.value?.[1]?.persons,Ct)){const I=Ct.length;for(let z=0;z<I;z++){const Y=Ct[z];ce.set(Y.id,Y),ce.set(Y.displayName,Y)}}const Te=zt("themes",d,f,P,yt);let Le=null;if(Te&&Te.entries){let I=Te.entries().next();I?.value?.[1]&&(Le=I.value[1])}const ps=new u.Theme(Le);let he=zt("styles",d,f,P,yt).entries().next()?.value[1];he&&(he=JSON.parse(u.JSONStableStringify(he)));const gs=zt("workbooks",d,f,P,yt);await Promise.all(Pe);const ye={...gs.entries().next().value[1],styles:he,theme:ps.toJSON()};le.length>0&&(ye.strings=le),Ct&&Ct.length>0&&(ye.people=Ct);const fs={...n,resources:y,json:ye},ms=new u.Workbook(fs);return H.forEach(I=>{I.deleteReference(V)}),m.endPersist(),ms}catch(d){let P="Unable to parse XLSX.";throw d instanceof u.OutOfBoundsError&&(P="Unable to open XLSX. There are too many rows or columns."),new Error(P,{cause:d})}},toBufferXLSX:async(i,t)=>{const s=await Promise.resolve().then(()=>require("./dSQsUiYfKgCeXIkX.cjs")),o=await i.toJSON(!0),n=s.utils.book_new();for(let a=0;a<o.sheets.length;a++){const c=o.sheets[a],T=s.utils.json_to_sheet([{}]);s.utils.book_append_sheet(n,T,c.name);const S=c.sheet,x=i.getSheetAt(a),w=x.getUsedRange();if(w?(T["!ref"]=w.getA1(),w.forEach((D,b)=>{const d={t:"z"},P=b.getCell().getStyle();if(!P.isNormal()){let f=P.getNumberFormat();f!==u.NumberFormat.Type.General&&(f===u.NumberFormat.Type.ShortDate?f="m/d/yyyy":f===u.NumberFormat.Type.MediumDate?f="d-mmm-yy":f===u.NumberFormat.Type.LongDate?f="[$-x-sysdate]dddd, mmmm dd, yyyy":f===u.NumberFormat.Type.ShortTime?f="h:mm":f===u.NumberFormat.Type.MediumTime?f="h:mm AM/PM":f===u.NumberFormat.Type.LongTime&&(f="h:mm:ss AM/PM"),d.z=f)}if(D!==null)switch(b.getType()){case u.ScalarType.Number:d.t="n",d.v=D;break;case u.ScalarType.String:d.t="s",d.v=D;break;case u.ScalarType.Boolean:d.t="b",d.v=D;break;case u.ScalarType.Error:d.t="e",d.v=D.toString();case u.ScalarType.RichData:}T[b.getA1()]=d})):T["!ref"]="A1:A1",S.merges?.length>0){const D=[];T["!merges"]=D;for(let b=0;b<S.merges.length;b++)D.push(s.utils.decode_range(S.merges[b]))}if(S.cols?.length>0){const D=[];T["!cols"]=D;const b=S.cols,d={width:S.defaultColSize??x.getColumnWidthAsFontUnit(x.getColumnHeaders().getDefaultSize())};for(let P=0;P<b.length;P++){const f=b[P];for(let m=D.length;m<=f.min-1;m++)D.push(d);const y={};f.sz!==void 0&&(y.width=f.sz),f.h!==void 0&&(y.hidden=f.h),f.l!==void 0&&(y.level=f.l);for(let m=f.min;m<=f.max;m++)D.push(y)}}}return s.write(n,{type:"array",bookType:"xlsx"}),s.write(n,{type:"array",bookType:"xlsx"})}},Symbol.toStringTag,{value:"Module"}));exports.a=i=>parseFloat(i)/1e3,exports.b=hs,exports.c=i=>i?Ke.Jt.roundAccurately(parseFloat(i)/9525,1):null,exports.d=De,exports.i=js,exports.p=i=>parseFloat(i)/6e4,exports.r=cs,exports.t=i=>i?Ke.Jt.roundAccurately(parseFloat(i)/12700,4):null;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
"use strict";/**
|
|
2
|
-
* @license @sheetxl/studio-vanilla - SheetXL Studio - Vanilla entry point for integrating SheetXL UI. - v0.
|
|
2
|
+
* @license @sheetxl/studio-vanilla - SheetXL Studio - Vanilla entry point for integrating SheetXL UI. - v0.4.0
|
|
3
3
|
*
|
|
4
4
|
* (C) 2025-present SheetXL Inc. & Michael T. Ford
|
|
5
5
|
* License: The license can be found at https://www.sheetxl.com/license.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";/**
|
|
2
|
-
* @license @sheetxl/studio-vanilla - SheetXL Studio - Vanilla entry point for integrating SheetXL UI. - v0.
|
|
2
|
+
* @license @sheetxl/studio-vanilla - SheetXL Studio - Vanilla entry point for integrating SheetXL UI. - v0.4.0
|
|
3
3
|
*
|
|
4
4
|
* (C) 2025-present SheetXL Inc. & Michael T. Ford
|
|
5
5
|
* License: The license can be found at https://www.sheetxl.com/license.
|
|
6
|
-
*/Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("react/jsx-runtime"),a=require("react"),n=require("./
|
|
6
|
+
*/Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("react/jsx-runtime"),a=require("react"),n=require("./CV3lVli7wB6pyrYD.cjs"),k=["Ok","Cancel"],b=a.memo(x=>{const{tableOptions:o,context:c,onOption:p,onValidateOption:y,onDone:d,options:u=k,defaultOption:s=u?.[0],cancelOption:i="Cancel",sx:m,...h}=x,[O,f]=a.useState(!1),[l,C]=a.useState(()=>o?.hasHeader??!1),[r,j]=a.useState(()=>o?.ranges??null),S=n.me(e=>{const g={...o,hasHeader:l,ranges:r};p?.(e,e===i,e===s),d?.({option:e,tableOptions:g})},[d,p,s,i,l,r,o]),T=a.useCallback(async(e,g)=>null,[]);return t.jsx(n.b4,{title:"Insert Table",options:u,onDone:S,onValidateOption:T,defaultOption:s,cancelOption:i,autoFocusSel:".range-input input",sx:{width:"360px",...m},...h,children:t.jsxs(n.Box,{sx:{paddingTop:e=>e.spacing(1),paddingBottom:e=>e.spacing(0),rowGap:e=>e.spacing(1),display:"flex",flexDirection:"column"},children:[t.jsx(n.cM,{formName:"range",value:r,onChangeInput:e=>j(e),resolvedAddress:c.getNames().getRanges.bind(c.getNames()),onFocus:e=>{O||e.target?.select(),f(!0)}}),t.jsx(n.FormControlLabel,{control:t.jsx(n.Checkbox,{checked:l,onChange:()=>C(!l)}),label:"Table has headers",labelPlacement:"end"})]})})});exports.TableNewDialog=b,exports.default=b;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
"use strict";/**
|
|
2
|
-
* @license @sheetxl/studio-vanilla - SheetXL Studio - Vanilla entry point for integrating SheetXL UI. - v0.
|
|
2
|
+
* @license @sheetxl/studio-vanilla - SheetXL Studio - Vanilla entry point for integrating SheetXL UI. - v0.4.0
|
|
3
3
|
*
|
|
4
4
|
* (C) 2025-present SheetXL Inc. & Michael T. Ford
|
|
5
5
|
* License: The license can be found at https://www.sheetxl.com/license.
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
"use strict";/**
|
|
2
|
-
* @license @sheetxl/studio-vanilla - SheetXL Studio - Vanilla entry point for integrating SheetXL UI. - v0.
|
|
2
|
+
* @license @sheetxl/studio-vanilla - SheetXL Studio - Vanilla entry point for integrating SheetXL UI. - v0.4.0
|
|
3
3
|
*
|
|
4
4
|
* (C) 2025-present SheetXL Inc. & Michael T. Ford
|
|
5
5
|
* License: The license can be found at https://www.sheetxl.com/license.
|
|
6
|
-
*/const m=require("react/jsx-runtime"),l=require("react"),a=require("./1YHhQAyuEBCdnxLq.cjs"),Wt=require("react-dom"),ue=require("@sheetxl/sdk");function It(e){const o=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const r in e)if(r!=="default"){const t=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(o,r,t.get?t:{enumerable:!0,get:()=>e[r]})}}return o.default=e,Object.freeze(o)}const pe=It(l);function Pt(e){return a.generateUtilityClass("MuiCollapse",e)}a.generateUtilityClasses("MuiCollapse",["root","horizontal","vertical","entered","hidden","wrapper","wrapperInner"]);const Ft=a.styled("div",{name:"MuiCollapse",slot:"Root",overridesResolver:(e,o)=>{const{ownerState:r}=e;return[o.root,o[r.orientation],r.state==="entered"&&o.entered,r.state==="exited"&&!r.in&&r.collapsedSize==="0px"&&o.hidden]}})(a.memoTheme(({theme:e})=>({height:0,overflow:"hidden",transition:e.transitions.create("height"),variants:[{props:{orientation:"horizontal"},style:{height:"auto",width:0,transition:e.transitions.create("width")}},{props:{state:"entered"},style:{height:"auto",overflow:"visible"}},{props:{state:"entered",orientation:"horizontal"},style:{width:"auto"}},{props:({ownerState:o})=>o.state==="exited"&&!o.in&&o.collapsedSize==="0px",style:{visibility:"hidden"}}]}))),Nt=a.styled("div",{name:"MuiCollapse",slot:"Wrapper",overridesResolver:(e,o)=>o.wrapper})({display:"flex",width:"100%",variants:[{props:{orientation:"horizontal"},style:{width:"auto",height:"100%"}}]}),At=a.styled("div",{name:"MuiCollapse",slot:"WrapperInner",overridesResolver:(e,o)=>o.wrapperInner})({width:"100%",variants:[{props:{orientation:"horizontal"},style:{width:"auto",height:"100%"}}]}),Fe=pe.forwardRef(function(e,o){const r=a.useDefaultProps({props:e,name:"MuiCollapse"}),{addEndListener:t,children:n,className:i,collapsedSize:s="0px",component:u,easing:c,in:d,onEnter:p,onEntered:f,onEntering:x,onExit:v,onExited:y,onExiting:b,orientation:w="vertical",style:k,timeout:h=a.duration.standard,TransitionComponent:R=a.Transition,...E}=r,F={...r,orientation:w,collapsedSize:s},L=(M=>{const{orientation:O,classes:$}=M,Y={root:["root",`${O}`],entered:["entered"],hidden:["hidden"],wrapper:["wrapper",`${O}`],wrapperInner:["wrapperInner",`${O}`]};return a.composeClasses(Y,Pt,$)})(F),q=a.useTheme(),_=a.useTimeout(),I=pe.useRef(null),H=pe.useRef(),G=typeof s=="number"?`${s}px`:s,Q=w==="horizontal",N=Q?"width":"height",te=pe.useRef(null),P=a.useForkRef(o,te),S=M=>O=>{if(M){const $=te.current;O===void 0?M($):M($,O)}},j=()=>I.current?I.current[Q?"clientWidth":"clientHeight"]:0,A=S((M,O)=>{I.current&&Q&&(I.current.style.position="absolute"),M.style[N]=G,p&&p(M,O)}),T=S((M,O)=>{const $=j();I.current&&Q&&(I.current.style.position="");const{duration:Y,easing:ae}=a.getTransitionProps({style:k,timeout:h,easing:c},{mode:"enter"});if(h==="auto"){const ne=q.transitions.getAutoHeightDuration($);M.style.transitionDuration=`${ne}ms`,H.current=ne}else M.style.transitionDuration=typeof Y=="string"?Y:`${Y}ms`;M.style[N]=`${$}px`,M.style.transitionTimingFunction=ae,x&&x(M,O)}),U=S((M,O)=>{M.style[N]="auto",f&&f(M,O)}),B=S(M=>{M.style[N]=`${j()}px`,v&&v(M)}),J=S(y),z=S(M=>{const O=j(),{duration:$,easing:Y}=a.getTransitionProps({style:k,timeout:h,easing:c},{mode:"exit"});if(h==="auto"){const ae=q.transitions.getAutoHeightDuration(O);M.style.transitionDuration=`${ae}ms`,H.current=ae}else M.style.transitionDuration=typeof $=="string"?$:`${$}ms`;M.style[N]=G,M.style.transitionTimingFunction=Y,b&&b(M)});return m.jsx(R,{in:d,onEnter:A,onEntered:U,onEntering:T,onExit:B,onExited:J,onExiting:z,addEndListener:M=>{h==="auto"&&_.start(H.current||0,M),t&&t(te.current,M)},nodeRef:te,timeout:h==="auto"?null:h,...E,children:(M,{ownerState:O,...$})=>m.jsx(Ft,{as:u,className:a.clsx(L.root,i,{entered:L.entered,exited:!d&&G==="0px"&&L.hidden}[M]),style:{[Q?"minWidth":"minHeight"]:G,...k},ref:P,ownerState:{...F,state:M},...$,children:m.jsx(Nt,{ownerState:{...F,state:M},className:L.wrapper,ref:I,children:m.jsx(At,{ownerState:{...F,state:M},className:L.wrapperInner,children:n})})})})});function qt(e){return a.generateUtilityClass("MuiCard",e)}Fe&&(Fe.muiSupportAuto=!0),a.generateUtilityClasses("MuiCard",["root"]);const zt=a.styled(a.Paper,{name:"MuiCard",slot:"Root",overridesResolver:(e,o)=>o.root})({overflow:"hidden"}),Ht=pe.forwardRef(function(e,o){const r=a.useDefaultProps({props:e,name:"MuiCard"}),{className:t,raised:n=!1,...i}=r,s={...r,raised:n},u=(c=>{const{classes:d}=c;return a.composeClasses({root:["root"]},qt,d)})(s);return m.jsx(zt,{className:a.clsx(u.root,t),elevation:n?8:void 0,ref:o,ownerState:s,...i})});function Bt(e){return a.generateUtilityClass("MuiCardActions",e)}a.generateUtilityClasses("MuiCardActions",["root","spacing"]);const _t=a.styled("div",{name:"MuiCardActions",slot:"Root",overridesResolver:(e,o)=>{const{ownerState:r}=e;return[o.root,!r.disableSpacing&&o.spacing]}})({display:"flex",alignItems:"center",padding:8,variants:[{props:{disableSpacing:!1},style:{"& > :not(style) ~ :not(style)":{marginLeft:8}}}]}),Ut=pe.forwardRef(function(e,o){const r=a.useDefaultProps({props:e,name:"MuiCardActions"}),{disableSpacing:t=!1,className:n,...i}=r,s={...r,disableSpacing:t},u=(c=>{const{classes:d,disableSpacing:p}=c,f={root:["root",!p&&"spacing"]};return a.composeClasses(f,Bt,d)})(s);return m.jsx(_t,{className:a.clsx(u.root,n),ownerState:s,ref:o,...i})}),Ge=typeof a.globalCss({})=="function",$t=(e,o)=>({WebkitFontSmoothing:"antialiased",MozOsxFontSmoothing:"grayscale",boxSizing:"border-box",WebkitTextSizeAdjust:"100%",...o&&!e.vars&&{colorScheme:e.palette.mode}}),Vt=e=>({color:(e.vars||e).palette.text.primary,...e.typography.body1,backgroundColor:(e.vars||e).palette.background.default,"@media print":{backgroundColor:(e.vars||e).palette.common.white}}),tt=(e,o=!1)=>{const r={};o&&e.colorSchemes&&typeof e.getColorSchemeSelector=="function"&&Object.entries(e.colorSchemes).forEach(([i,s])=>{const u=e.getColorSchemeSelector(i);u.startsWith("@")?r[u]={":root":{colorScheme:s.palette?.mode}}:r[u.replace(/\s*&/,"")]={colorScheme:s.palette?.mode}});let t={html:$t(e,o),"*, *::before, *::after":{boxSizing:"inherit"},"strong, b":{fontWeight:e.typography.fontWeightBold},body:{margin:0,...Vt(e),"&::backdrop":{backgroundColor:(e.vars||e).palette.background.default}},...r};const n=e.components?.MuiCssBaseline?.styleOverrides;return n&&(t=[t,n]),t},Ie="mui-ecs",Kt=a.globalCss(Ge?({theme:e,enableColorScheme:o})=>tt(e,o):({theme:e})=>(o=>{const r=tt(o,!1),t=Array.isArray(r)?r[0]:r;return!o.vars&&t&&(t.html[`:root:has(${Ie})`]={colorScheme:o.palette.mode}),o.colorSchemes&&Object.entries(o.colorSchemes).forEach(([n,i])=>{const s=o.getColorSchemeSelector(n);s.startsWith("@")?t[s]={[`:root:not(:has(.${Ie}))`]:{colorScheme:i.palette?.mode}}:t[s.replace(/\s*&/,"")]={[`&:not(:has(.${Ie}))`]:{colorScheme:i.palette?.mode}}}),r})(e));function Gt(e){const o=a.useDefaultProps({props:e,name:"MuiCssBaseline"}),{children:r,enableColorScheme:t=!1}=o;return m.jsxs(pe.Fragment,{children:[Ge&&m.jsx(Kt,{enableColorScheme:t}),!Ge&&!t&&m.jsx("span",{className:Ie,style:{display:"none"}}),r]})}const Xt=a.createSvgIcon(m.jsx("path",{d:"M12 2C6.47 2 2 6.47 2 12s4.47 10 10 10 10-4.47 10-10S17.53 2 12 2m0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8m3.59-13L12 10.59 8.41 7 7 8.41 10.59 12 7 15.59 8.41 17 12 13.41 15.59 17 17 15.59 13.41 12 17 8.41z"}),"CancelOutlined"),Zt=l.createContext(null),He={didCatch:!1,error:null};class Qt extends l.Component{constructor(o){super(o),this.resetErrorBoundary=this.resetErrorBoundary.bind(this),this.state=He}static getDerivedStateFromError(o){return{didCatch:!0,error:o}}resetErrorBoundary(){const{error:o}=this.state;if(o!==null){for(var r,t,n=arguments.length,i=new Array(n),s=0;s<n;s++)i[s]=arguments[s];(r=(t=this.props).onReset)===null||r===void 0||r.call(t,{args:i,reason:"imperative-api"}),this.setState(He)}}componentDidCatch(o,r){var t,n;(t=(n=this.props).onError)===null||t===void 0||t.call(n,o,r)}componentDidUpdate(o,r){const{didCatch:t}=this.state,{resetKeys:n}=this.props;var i,s;t&&r.error!==null&&function(){let u=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],c=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[];return u.length!==c.length||u.some((d,p)=>!Object.is(d,c[p]))}(o.resetKeys,n)&&((i=(s=this.props).onReset)===null||i===void 0||i.call(s,{next:n,prev:o.resetKeys,reason:"keys"}),this.setState(He))}render(){const{children:o,fallbackRender:r,FallbackComponent:t,fallback:n}=this.props,{didCatch:i,error:s}=this.state;let u=o;if(i){const c={error:s,resetErrorBoundary:this.resetErrorBoundary};if(typeof r=="function")u=r(c);else if(t)u=l.createElement(t,c);else{if(n===void 0)throw s;u=n}}return l.createElement(Zt.Provider,{value:{didCatch:i,error:s,resetErrorBoundary:this.resetErrorBoundary}},u)}}function ht(e){var o,r,t="";if(typeof e=="string"||typeof e=="number")t+=e;else if(typeof e=="object")if(Array.isArray(e))for(o=0;o<e.length;o++)e[o]&&(r=ht(e[o]))&&(t&&(t+=" "),t+=r);else for(o in e)e[o]&&(t&&(t+=" "),t+=o);return t}function ie(){for(var e,o,r=0,t="";r<arguments.length;)(e=arguments[r++])&&(o=ht(e))&&(t&&(t+=" "),t+=o);return t}let Jt={data:""},Yt=/(?:([\u0080-\uFFFF\w-%@]+) *:? *([^{;]+?);|([^;}{]*?) *{)|(}\s*)/g,en=/\/\*[^]*?\*\/| +/g,nt=/\n+/g,de=(e,o)=>{let r="",t="",n="";for(let i in e){let s=e[i];i[0]=="@"?i[1]=="i"?r=i+" "+s+";":t+=i[1]=="f"?de(s,i):i+"{"+de(s,i[1]=="k"?"":o)+"}":typeof s=="object"?t+=de(s,o?o.replace(/([^,])+/g,u=>i.replace(/([^,]*:\S+\([^)]*\))|([^,])+/g,c=>/&/.test(c)?c.replace(/&/g,u):u?u+" "+c:c)):i):s!=null&&(i=/^--/.test(i)?i:i.replace(/[A-Z]/g,"-$&").toLowerCase(),n+=de.p?de.p(i,s):i+":"+s+";")}return r+(o&&n?o+"{"+n+"}":n)+t},oe={},gt=e=>{if(typeof e=="object"){let o="";for(let r in e)o+=r+gt(e[r]);return o}return e};function Xe(e){let o=this||{},r=e.call?e(o.p):e;return((s,u,c,d,p)=>{let f=gt(s),x=oe[f]||(oe[f]=(h=>{let R=0,E=11;for(;R<h.length;)E=101*E+h.charCodeAt(R++)>>>0;return"go"+E})(f));if(!oe[x]){let h=f!==s?s:(R=>{let E,F,L=[{}];for(;E=Yt.exec(R.replace(en,""));)E[4]?L.shift():E[3]?(F=E[3].replace(nt," ").trim(),L.unshift(L[0][F]=L[0][F]||{})):L[0][E[1]]=E[2].replace(nt," ").trim();return L[0]})(s);oe[x]=de(p?{["@keyframes "+x]:h}:h,c?"":"."+x)}let v=c&&oe.g?oe.g:null;return c&&(oe.g=oe[x]),y=oe[x],b=u,w=d,(k=v)?b.data=b.data.replace(k,y):b.data.indexOf(y)===-1&&(b.data=w?y+b.data:b.data+y),x;var y,b,w,k})(r.unshift?r.raw?(t=r,n=[].slice.call(arguments,1),i=o.p,t.reduce((s,u,c)=>{let d=n[c];if(d&&d.call){let p=d(i),f=p&&p.props&&p.props.className||/^go/.test(p)&&p;d=f?"."+f:p&&typeof p=="object"?p.props?"":de(p,""):p===!1?"":p}return s+u+(d??"")},"")):r.reduce((s,u)=>Object.assign(s,u&&u.call?u(o.p):u),{}):r,(s=>typeof window=="object"?((s?s.querySelector("#_goober"):window._goober)||Object.assign((s||document.head).appendChild(document.createElement("style")),{innerHTML:" ",id:"_goober"})).firstChild:s||Jt)(o.target),o.g,o.o,o.k);var t,n,i}function kt(e,o,r){return o&&function(t,n){for(var i=0;i<n.length;i++){var s=n[i];s.enumerable=s.enumerable||!1,s.configurable=!0,"value"in s&&(s.writable=!0),Object.defineProperty(t,s.key,s)}}(e.prototype,o),e}function D(){return D=Object.assign||function(e){for(var o=1;o<arguments.length;o++){var r=arguments[o];for(var t in r)Object.prototype.hasOwnProperty.call(r,t)&&(e[t]=r[t])}return e},D.apply(this,arguments)}function bt(e,o){e.prototype=Object.create(o.prototype),e.prototype.constructor=e,e.__proto__=o}function Se(e,o){if(e==null)return{};var r,t,n={},i=Object.keys(e);for(t=0;t<i.length;t++)r=i[t],o.indexOf(r)>=0||(n[r]=e[r]);return n}function ot(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}Xe.bind({g:1}),Xe.bind({k:1});var rt=function(){return""},xt=l.createContext({enqueueSnackbar:rt,closeSnackbar:rt}),Be="@media (max-width:599.95px)",Pe="@media (min-width:600px)",it=function(e){return e.charAt(0).toUpperCase()+e.slice(1)},Qe=function(e){return""+it(e.vertical)+it(e.horizontal)},je=function(e){return!!e||e===0},Re="unmounted",me="exited",fe="entering",ye="entered",at="exiting",Je=function(e){function o(t){var n;n=e.call(this,t)||this;var i,s=t.appear;return n.appearStatus=null,t.in?s?(i=me,n.appearStatus=fe):i=ye:i=t.unmountOnExit||t.mountOnEnter?Re:me,n.state={status:i},n.nextCallback=null,n}bt(o,e),o.getDerivedStateFromProps=function(t,n){return t.in&&n.status===Re?{status:me}:null};var r=o.prototype;return r.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},r.componentDidUpdate=function(t){var n=null;if(t!==this.props){var i=this.state.status;this.props.in?i!==fe&&i!==ye&&(n=fe):i!==fe&&i!==ye||(n=at)}this.updateStatus(!1,n)},r.componentWillUnmount=function(){this.cancelNextCallback()},r.getTimeouts=function(){var t=this.props.timeout,n=t,i=t;return t!=null&&typeof t!="number"&&typeof t!="string"&&(i=t.exit,n=t.enter),{exit:i,enter:n}},r.updateStatus=function(t,n){t===void 0&&(t=!1),n!==null?(this.cancelNextCallback(),n===fe?this.performEnter(t):this.performExit()):this.props.unmountOnExit&&this.state.status===me&&this.setState({status:Re})},r.performEnter=function(t){var n=this,i=this.props.enter,s=t,u=this.getTimeouts();t||i?(this.props.onEnter&&this.props.onEnter(this.node,s),this.safeSetState({status:fe},function(){n.props.onEntering&&n.props.onEntering(n.node,s),n.onTransitionEnd(u.enter,function(){n.safeSetState({status:ye},function(){n.props.onEntered&&n.props.onEntered(n.node,s)})})})):this.safeSetState({status:ye},function(){n.props.onEntered&&n.props.onEntered(n.node,s)})},r.performExit=function(){var t=this,n=this.props.exit,i=this.getTimeouts();n?(this.props.onExit&&this.props.onExit(this.node),this.safeSetState({status:at},function(){t.props.onExiting&&t.props.onExiting(t.node),t.onTransitionEnd(i.exit,function(){t.safeSetState({status:me},function(){t.props.onExited&&t.props.onExited(t.node)})})})):this.safeSetState({status:me},function(){t.props.onExited&&t.props.onExited(t.node)})},r.cancelNextCallback=function(){this.nextCallback!==null&&this.nextCallback.cancel&&(this.nextCallback.cancel(),this.nextCallback=null)},r.safeSetState=function(t,n){n=this.setNextCallback(n),this.setState(t,n)},r.setNextCallback=function(t){var n=this,i=!0;return this.nextCallback=function(){i&&(i=!1,n.nextCallback=null,t())},this.nextCallback.cancel=function(){i=!1},this.nextCallback},r.onTransitionEnd=function(t,n){this.setNextCallback(n);var i=t==null&&!this.props.addEndListener;this.node&&!i?(this.props.addEndListener&&this.props.addEndListener(this.node,this.nextCallback),t!=null&&setTimeout(this.nextCallback,t)):setTimeout(this.nextCallback,0)},r.render=function(){var t=this.state.status;if(t===Re)return null;var n=this.props;return(0,n.children)(t,Se(n,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]))},kt(o,[{key:"node",get:function(){var t,n=(t=this.props.nodeRef)===null||t===void 0?void 0:t.current;if(!n)throw new Error("notistack - Custom snackbar is not refForwarding");return n}}]),o}(l.Component);function he(){}function st(e,o){typeof e=="function"?e(o):e&&(e.current=o)}function Ze(e,o){return l.useMemo(function(){return e==null&&o==null?null:function(r){st(e,r),st(o,r)}},[e,o])}function Ne(e){var o=e.timeout,r=e.style,t=r===void 0?{}:r,n=e.mode;return{duration:typeof o=="object"?o[n]||0:o,easing:t.transitionTimingFunction,delay:t.transitionDelay}}Je.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:he,onEntering:he,onEntered:he,onExit:he,onExiting:he,onExited:he};var yt=function(e){e.scrollTop=e.scrollTop},lt=function(e){return Math.round(e)+"ms"};function ge(e,o){e===void 0&&(e=["all"]);var r=o||{},t=r.duration,n=t===void 0?300:t,i=r.easing,s=i===void 0?"cubic-bezier(0.4, 0, 0.2, 1)":i,u=r.delay,c=u===void 0?0:u;return(Array.isArray(e)?e:[e]).map(function(d){var p=typeof n=="string"?n:lt(n),f=typeof c=="string"?c:lt(c);return d+" "+p+" "+s+" "+f}).join(",")}function wt(e){var o;return((o=e)&&o.ownerDocument||document).defaultView||window}function Le(e,o){if(o){var r=function(t,n){var i,s=n.getBoundingClientRect(),u=wt(n);if(n.fakeTransform)i=n.fakeTransform;else{var c=u.getComputedStyle(n);i=c.getPropertyValue("-webkit-transform")||c.getPropertyValue("transform")}var d=0,p=0;if(i&&i!=="none"&&typeof i=="string"){var f=i.split("(")[1].split(")")[0].split(",");d=parseInt(f[4],10),p=parseInt(f[5],10)}switch(t){case"left":return"translateX("+(u.innerWidth+d-s.left)+"px)";case"right":return"translateX(-"+(s.left+s.width-d)+"px)";case"up":return"translateY("+(u.innerHeight+p-s.top)+"px)";default:return"translateY(-"+(s.top+s.height-p)+"px)"}}(e,o);r&&(o.style.webkitTransform=r,o.style.transform=r)}}var vt=l.forwardRef(function(e,o){var r=e.children,t=e.direction,n=t===void 0?"down":t,i=e.in,s=e.style,u=e.timeout,c=u===void 0?0:u,d=e.onEnter,p=e.onEntered,f=e.onExit,x=e.onExited,v=Se(e,["children","direction","in","style","timeout","onEnter","onEntered","onExit","onExited"]),y=l.useRef(null),b=Ze(r.ref,y),w=Ze(b,o),k=l.useCallback(function(){y.current&&Le(n,y.current)},[n]);return l.useEffect(function(){if(!i&&n!=="down"&&n!=="right"){var h=function(E,F){var L;function q(){for(var _=this,I=arguments.length,H=new Array(I),G=0;G<I;G++)H[G]=arguments[G];clearTimeout(L),L=setTimeout(function(){E.apply(_,H)},F)}return F===void 0&&(F=166),q.clear=function(){clearTimeout(L)},q}(function(){y.current&&Le(n,y.current)}),R=wt(y.current);return R.addEventListener("resize",h),function(){h.clear(),R.removeEventListener("resize",h)}}},[n,i]),l.useEffect(function(){i||k()},[i,k]),l.createElement(Je,Object.assign({appear:!0,nodeRef:y,onEnter:function(h,R){Le(n,h),yt(h),d&&d(h,R)},onEntered:p,onEntering:function(h){var R=Ne({timeout:c,mode:"enter",style:D({},s,{transitionTimingFunction:s?.transitionTimingFunction||"cubic-bezier(0.0, 0, 0.2, 1)"})});h.style.webkitTransition=ge("-webkit-transform",R),h.style.transition=ge("transform",R),h.style.webkitTransform="none",h.style.transform="none"},onExit:function(h){var R=Ne({timeout:c,mode:"exit",style:D({},s,{transitionTimingFunction:s?.transitionTimingFunction||"cubic-bezier(0.4, 0, 0.6, 1)"})});h.style.webkitTransition=ge("-webkit-transform",R),h.style.transition=ge("transform",R),Le(n,h),f&&f(h)},onExited:function(h){h.style.webkitTransition="",h.style.transition="",x&&x(h)},in:i,timeout:c},v),function(h,R){return l.cloneElement(r,D({ref:w,style:D({visibility:h!=="exited"||i?void 0:"hidden"},s,{},r.props.style)},R))})});vt.displayName="Slide";var Te=function(e){return l.createElement("svg",Object.assign({viewBox:"0 0 24 24",focusable:"false",style:{fontSize:20,marginInlineEnd:8,userSelect:"none",width:"1em",height:"1em",display:"inline-block",fill:"currentColor",flexShrink:0}},e))},ce={maxSnack:3,persist:!1,hideIconVariant:!1,disableWindowBlurListener:!1,variant:"default",autoHideDuration:5e3,iconVariant:{default:void 0,success:l.createElement(function(){return l.createElement(Te,null,l.createElement("path",{d:`M12 2C6.5 2 2 6.5 2 12S6.5 22 12 22 22 17.5 22 12 17.5 2 12 2M10 17L5 12L6.41
|
|
6
|
+
*/const m=require("react/jsx-runtime"),l=require("react"),a=require("./CV3lVli7wB6pyrYD.cjs"),Wt=require("react-dom"),ue=require("@sheetxl/sdk");function It(e){const o=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const r in e)if(r!=="default"){const t=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(o,r,t.get?t:{enumerable:!0,get:()=>e[r]})}}return o.default=e,Object.freeze(o)}const pe=It(l);function Pt(e){return a.generateUtilityClass("MuiCollapse",e)}a.generateUtilityClasses("MuiCollapse",["root","horizontal","vertical","entered","hidden","wrapper","wrapperInner"]);const Ft=a.styled("div",{name:"MuiCollapse",slot:"Root",overridesResolver:(e,o)=>{const{ownerState:r}=e;return[o.root,o[r.orientation],r.state==="entered"&&o.entered,r.state==="exited"&&!r.in&&r.collapsedSize==="0px"&&o.hidden]}})(a.memoTheme(({theme:e})=>({height:0,overflow:"hidden",transition:e.transitions.create("height"),variants:[{props:{orientation:"horizontal"},style:{height:"auto",width:0,transition:e.transitions.create("width")}},{props:{state:"entered"},style:{height:"auto",overflow:"visible"}},{props:{state:"entered",orientation:"horizontal"},style:{width:"auto"}},{props:({ownerState:o})=>o.state==="exited"&&!o.in&&o.collapsedSize==="0px",style:{visibility:"hidden"}}]}))),Nt=a.styled("div",{name:"MuiCollapse",slot:"Wrapper",overridesResolver:(e,o)=>o.wrapper})({display:"flex",width:"100%",variants:[{props:{orientation:"horizontal"},style:{width:"auto",height:"100%"}}]}),At=a.styled("div",{name:"MuiCollapse",slot:"WrapperInner",overridesResolver:(e,o)=>o.wrapperInner})({width:"100%",variants:[{props:{orientation:"horizontal"},style:{width:"auto",height:"100%"}}]}),Fe=pe.forwardRef(function(e,o){const r=a.useDefaultProps({props:e,name:"MuiCollapse"}),{addEndListener:t,children:n,className:i,collapsedSize:s="0px",component:u,easing:c,in:d,onEnter:p,onEntered:f,onEntering:x,onExit:v,onExited:y,onExiting:b,orientation:w="vertical",style:k,timeout:h=a.duration.standard,TransitionComponent:R=a.Transition,...E}=r,F={...r,orientation:w,collapsedSize:s},L=(M=>{const{orientation:O,classes:$}=M,Y={root:["root",`${O}`],entered:["entered"],hidden:["hidden"],wrapper:["wrapper",`${O}`],wrapperInner:["wrapperInner",`${O}`]};return a.composeClasses(Y,Pt,$)})(F),q=a.useTheme(),_=a.useTimeout(),I=pe.useRef(null),H=pe.useRef(),G=typeof s=="number"?`${s}px`:s,Q=w==="horizontal",N=Q?"width":"height",te=pe.useRef(null),P=a.useForkRef(o,te),S=M=>O=>{if(M){const $=te.current;O===void 0?M($):M($,O)}},j=()=>I.current?I.current[Q?"clientWidth":"clientHeight"]:0,A=S((M,O)=>{I.current&&Q&&(I.current.style.position="absolute"),M.style[N]=G,p&&p(M,O)}),T=S((M,O)=>{const $=j();I.current&&Q&&(I.current.style.position="");const{duration:Y,easing:ae}=a.getTransitionProps({style:k,timeout:h,easing:c},{mode:"enter"});if(h==="auto"){const ne=q.transitions.getAutoHeightDuration($);M.style.transitionDuration=`${ne}ms`,H.current=ne}else M.style.transitionDuration=typeof Y=="string"?Y:`${Y}ms`;M.style[N]=`${$}px`,M.style.transitionTimingFunction=ae,x&&x(M,O)}),U=S((M,O)=>{M.style[N]="auto",f&&f(M,O)}),B=S(M=>{M.style[N]=`${j()}px`,v&&v(M)}),J=S(y),z=S(M=>{const O=j(),{duration:$,easing:Y}=a.getTransitionProps({style:k,timeout:h,easing:c},{mode:"exit"});if(h==="auto"){const ae=q.transitions.getAutoHeightDuration(O);M.style.transitionDuration=`${ae}ms`,H.current=ae}else M.style.transitionDuration=typeof $=="string"?$:`${$}ms`;M.style[N]=G,M.style.transitionTimingFunction=Y,b&&b(M)});return m.jsx(R,{in:d,onEnter:A,onEntered:U,onEntering:T,onExit:B,onExited:J,onExiting:z,addEndListener:M=>{h==="auto"&&_.start(H.current||0,M),t&&t(te.current,M)},nodeRef:te,timeout:h==="auto"?null:h,...E,children:(M,{ownerState:O,...$})=>m.jsx(Ft,{as:u,className:a.clsx(L.root,i,{entered:L.entered,exited:!d&&G==="0px"&&L.hidden}[M]),style:{[Q?"minWidth":"minHeight"]:G,...k},ref:P,ownerState:{...F,state:M},...$,children:m.jsx(Nt,{ownerState:{...F,state:M},className:L.wrapper,ref:I,children:m.jsx(At,{ownerState:{...F,state:M},className:L.wrapperInner,children:n})})})})});function qt(e){return a.generateUtilityClass("MuiCard",e)}Fe&&(Fe.muiSupportAuto=!0),a.generateUtilityClasses("MuiCard",["root"]);const zt=a.styled(a.Paper,{name:"MuiCard",slot:"Root",overridesResolver:(e,o)=>o.root})({overflow:"hidden"}),Ht=pe.forwardRef(function(e,o){const r=a.useDefaultProps({props:e,name:"MuiCard"}),{className:t,raised:n=!1,...i}=r,s={...r,raised:n},u=(c=>{const{classes:d}=c;return a.composeClasses({root:["root"]},qt,d)})(s);return m.jsx(zt,{className:a.clsx(u.root,t),elevation:n?8:void 0,ref:o,ownerState:s,...i})});function Bt(e){return a.generateUtilityClass("MuiCardActions",e)}a.generateUtilityClasses("MuiCardActions",["root","spacing"]);const _t=a.styled("div",{name:"MuiCardActions",slot:"Root",overridesResolver:(e,o)=>{const{ownerState:r}=e;return[o.root,!r.disableSpacing&&o.spacing]}})({display:"flex",alignItems:"center",padding:8,variants:[{props:{disableSpacing:!1},style:{"& > :not(style) ~ :not(style)":{marginLeft:8}}}]}),Ut=pe.forwardRef(function(e,o){const r=a.useDefaultProps({props:e,name:"MuiCardActions"}),{disableSpacing:t=!1,className:n,...i}=r,s={...r,disableSpacing:t},u=(c=>{const{classes:d,disableSpacing:p}=c,f={root:["root",!p&&"spacing"]};return a.composeClasses(f,Bt,d)})(s);return m.jsx(_t,{className:a.clsx(u.root,n),ownerState:s,ref:o,...i})}),Ge=typeof a.globalCss({})=="function",$t=(e,o)=>({WebkitFontSmoothing:"antialiased",MozOsxFontSmoothing:"grayscale",boxSizing:"border-box",WebkitTextSizeAdjust:"100%",...o&&!e.vars&&{colorScheme:e.palette.mode}}),Vt=e=>({color:(e.vars||e).palette.text.primary,...e.typography.body1,backgroundColor:(e.vars||e).palette.background.default,"@media print":{backgroundColor:(e.vars||e).palette.common.white}}),tt=(e,o=!1)=>{const r={};o&&e.colorSchemes&&typeof e.getColorSchemeSelector=="function"&&Object.entries(e.colorSchemes).forEach(([i,s])=>{const u=e.getColorSchemeSelector(i);u.startsWith("@")?r[u]={":root":{colorScheme:s.palette?.mode}}:r[u.replace(/\s*&/,"")]={colorScheme:s.palette?.mode}});let t={html:$t(e,o),"*, *::before, *::after":{boxSizing:"inherit"},"strong, b":{fontWeight:e.typography.fontWeightBold},body:{margin:0,...Vt(e),"&::backdrop":{backgroundColor:(e.vars||e).palette.background.default}},...r};const n=e.components?.MuiCssBaseline?.styleOverrides;return n&&(t=[t,n]),t},Ie="mui-ecs",Kt=a.globalCss(Ge?({theme:e,enableColorScheme:o})=>tt(e,o):({theme:e})=>(o=>{const r=tt(o,!1),t=Array.isArray(r)?r[0]:r;return!o.vars&&t&&(t.html[`:root:has(${Ie})`]={colorScheme:o.palette.mode}),o.colorSchemes&&Object.entries(o.colorSchemes).forEach(([n,i])=>{const s=o.getColorSchemeSelector(n);s.startsWith("@")?t[s]={[`:root:not(:has(.${Ie}))`]:{colorScheme:i.palette?.mode}}:t[s.replace(/\s*&/,"")]={[`&:not(:has(.${Ie}))`]:{colorScheme:i.palette?.mode}}}),r})(e));function Gt(e){const o=a.useDefaultProps({props:e,name:"MuiCssBaseline"}),{children:r,enableColorScheme:t=!1}=o;return m.jsxs(pe.Fragment,{children:[Ge&&m.jsx(Kt,{enableColorScheme:t}),!Ge&&!t&&m.jsx("span",{className:Ie,style:{display:"none"}}),r]})}const Xt=a.createSvgIcon(m.jsx("path",{d:"M12 2C6.47 2 2 6.47 2 12s4.47 10 10 10 10-4.47 10-10S17.53 2 12 2m0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8m3.59-13L12 10.59 8.41 7 7 8.41 10.59 12 7 15.59 8.41 17 12 13.41 15.59 17 17 15.59 13.41 12 17 8.41z"}),"CancelOutlined"),Zt=l.createContext(null),He={didCatch:!1,error:null};class Qt extends l.Component{constructor(o){super(o),this.resetErrorBoundary=this.resetErrorBoundary.bind(this),this.state=He}static getDerivedStateFromError(o){return{didCatch:!0,error:o}}resetErrorBoundary(){const{error:o}=this.state;if(o!==null){for(var r,t,n=arguments.length,i=new Array(n),s=0;s<n;s++)i[s]=arguments[s];(r=(t=this.props).onReset)===null||r===void 0||r.call(t,{args:i,reason:"imperative-api"}),this.setState(He)}}componentDidCatch(o,r){var t,n;(t=(n=this.props).onError)===null||t===void 0||t.call(n,o,r)}componentDidUpdate(o,r){const{didCatch:t}=this.state,{resetKeys:n}=this.props;var i,s;t&&r.error!==null&&function(){let u=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],c=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[];return u.length!==c.length||u.some((d,p)=>!Object.is(d,c[p]))}(o.resetKeys,n)&&((i=(s=this.props).onReset)===null||i===void 0||i.call(s,{next:n,prev:o.resetKeys,reason:"keys"}),this.setState(He))}render(){const{children:o,fallbackRender:r,FallbackComponent:t,fallback:n}=this.props,{didCatch:i,error:s}=this.state;let u=o;if(i){const c={error:s,resetErrorBoundary:this.resetErrorBoundary};if(typeof r=="function")u=r(c);else if(t)u=l.createElement(t,c);else{if(n===void 0)throw s;u=n}}return l.createElement(Zt.Provider,{value:{didCatch:i,error:s,resetErrorBoundary:this.resetErrorBoundary}},u)}}function ht(e){var o,r,t="";if(typeof e=="string"||typeof e=="number")t+=e;else if(typeof e=="object")if(Array.isArray(e))for(o=0;o<e.length;o++)e[o]&&(r=ht(e[o]))&&(t&&(t+=" "),t+=r);else for(o in e)e[o]&&(t&&(t+=" "),t+=o);return t}function ie(){for(var e,o,r=0,t="";r<arguments.length;)(e=arguments[r++])&&(o=ht(e))&&(t&&(t+=" "),t+=o);return t}let Jt={data:""},Yt=/(?:([\u0080-\uFFFF\w-%@]+) *:? *([^{;]+?);|([^;}{]*?) *{)|(}\s*)/g,en=/\/\*[^]*?\*\/| +/g,nt=/\n+/g,de=(e,o)=>{let r="",t="",n="";for(let i in e){let s=e[i];i[0]=="@"?i[1]=="i"?r=i+" "+s+";":t+=i[1]=="f"?de(s,i):i+"{"+de(s,i[1]=="k"?"":o)+"}":typeof s=="object"?t+=de(s,o?o.replace(/([^,])+/g,u=>i.replace(/([^,]*:\S+\([^)]*\))|([^,])+/g,c=>/&/.test(c)?c.replace(/&/g,u):u?u+" "+c:c)):i):s!=null&&(i=/^--/.test(i)?i:i.replace(/[A-Z]/g,"-$&").toLowerCase(),n+=de.p?de.p(i,s):i+":"+s+";")}return r+(o&&n?o+"{"+n+"}":n)+t},oe={},gt=e=>{if(typeof e=="object"){let o="";for(let r in e)o+=r+gt(e[r]);return o}return e};function Xe(e){let o=this||{},r=e.call?e(o.p):e;return((s,u,c,d,p)=>{let f=gt(s),x=oe[f]||(oe[f]=(h=>{let R=0,E=11;for(;R<h.length;)E=101*E+h.charCodeAt(R++)>>>0;return"go"+E})(f));if(!oe[x]){let h=f!==s?s:(R=>{let E,F,L=[{}];for(;E=Yt.exec(R.replace(en,""));)E[4]?L.shift():E[3]?(F=E[3].replace(nt," ").trim(),L.unshift(L[0][F]=L[0][F]||{})):L[0][E[1]]=E[2].replace(nt," ").trim();return L[0]})(s);oe[x]=de(p?{["@keyframes "+x]:h}:h,c?"":"."+x)}let v=c&&oe.g?oe.g:null;return c&&(oe.g=oe[x]),y=oe[x],b=u,w=d,(k=v)?b.data=b.data.replace(k,y):b.data.indexOf(y)===-1&&(b.data=w?y+b.data:b.data+y),x;var y,b,w,k})(r.unshift?r.raw?(t=r,n=[].slice.call(arguments,1),i=o.p,t.reduce((s,u,c)=>{let d=n[c];if(d&&d.call){let p=d(i),f=p&&p.props&&p.props.className||/^go/.test(p)&&p;d=f?"."+f:p&&typeof p=="object"?p.props?"":de(p,""):p===!1?"":p}return s+u+(d??"")},"")):r.reduce((s,u)=>Object.assign(s,u&&u.call?u(o.p):u),{}):r,(s=>typeof window=="object"?((s?s.querySelector("#_goober"):window._goober)||Object.assign((s||document.head).appendChild(document.createElement("style")),{innerHTML:" ",id:"_goober"})).firstChild:s||Jt)(o.target),o.g,o.o,o.k);var t,n,i}function kt(e,o,r){return o&&function(t,n){for(var i=0;i<n.length;i++){var s=n[i];s.enumerable=s.enumerable||!1,s.configurable=!0,"value"in s&&(s.writable=!0),Object.defineProperty(t,s.key,s)}}(e.prototype,o),e}function D(){return D=Object.assign||function(e){for(var o=1;o<arguments.length;o++){var r=arguments[o];for(var t in r)Object.prototype.hasOwnProperty.call(r,t)&&(e[t]=r[t])}return e},D.apply(this,arguments)}function bt(e,o){e.prototype=Object.create(o.prototype),e.prototype.constructor=e,e.__proto__=o}function Se(e,o){if(e==null)return{};var r,t,n={},i=Object.keys(e);for(t=0;t<i.length;t++)r=i[t],o.indexOf(r)>=0||(n[r]=e[r]);return n}function ot(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}Xe.bind({g:1}),Xe.bind({k:1});var rt=function(){return""},xt=l.createContext({enqueueSnackbar:rt,closeSnackbar:rt}),Be="@media (max-width:599.95px)",Pe="@media (min-width:600px)",it=function(e){return e.charAt(0).toUpperCase()+e.slice(1)},Qe=function(e){return""+it(e.vertical)+it(e.horizontal)},je=function(e){return!!e||e===0},Re="unmounted",me="exited",fe="entering",ye="entered",at="exiting",Je=function(e){function o(t){var n;n=e.call(this,t)||this;var i,s=t.appear;return n.appearStatus=null,t.in?s?(i=me,n.appearStatus=fe):i=ye:i=t.unmountOnExit||t.mountOnEnter?Re:me,n.state={status:i},n.nextCallback=null,n}bt(o,e),o.getDerivedStateFromProps=function(t,n){return t.in&&n.status===Re?{status:me}:null};var r=o.prototype;return r.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},r.componentDidUpdate=function(t){var n=null;if(t!==this.props){var i=this.state.status;this.props.in?i!==fe&&i!==ye&&(n=fe):i!==fe&&i!==ye||(n=at)}this.updateStatus(!1,n)},r.componentWillUnmount=function(){this.cancelNextCallback()},r.getTimeouts=function(){var t=this.props.timeout,n=t,i=t;return t!=null&&typeof t!="number"&&typeof t!="string"&&(i=t.exit,n=t.enter),{exit:i,enter:n}},r.updateStatus=function(t,n){t===void 0&&(t=!1),n!==null?(this.cancelNextCallback(),n===fe?this.performEnter(t):this.performExit()):this.props.unmountOnExit&&this.state.status===me&&this.setState({status:Re})},r.performEnter=function(t){var n=this,i=this.props.enter,s=t,u=this.getTimeouts();t||i?(this.props.onEnter&&this.props.onEnter(this.node,s),this.safeSetState({status:fe},function(){n.props.onEntering&&n.props.onEntering(n.node,s),n.onTransitionEnd(u.enter,function(){n.safeSetState({status:ye},function(){n.props.onEntered&&n.props.onEntered(n.node,s)})})})):this.safeSetState({status:ye},function(){n.props.onEntered&&n.props.onEntered(n.node,s)})},r.performExit=function(){var t=this,n=this.props.exit,i=this.getTimeouts();n?(this.props.onExit&&this.props.onExit(this.node),this.safeSetState({status:at},function(){t.props.onExiting&&t.props.onExiting(t.node),t.onTransitionEnd(i.exit,function(){t.safeSetState({status:me},function(){t.props.onExited&&t.props.onExited(t.node)})})})):this.safeSetState({status:me},function(){t.props.onExited&&t.props.onExited(t.node)})},r.cancelNextCallback=function(){this.nextCallback!==null&&this.nextCallback.cancel&&(this.nextCallback.cancel(),this.nextCallback=null)},r.safeSetState=function(t,n){n=this.setNextCallback(n),this.setState(t,n)},r.setNextCallback=function(t){var n=this,i=!0;return this.nextCallback=function(){i&&(i=!1,n.nextCallback=null,t())},this.nextCallback.cancel=function(){i=!1},this.nextCallback},r.onTransitionEnd=function(t,n){this.setNextCallback(n);var i=t==null&&!this.props.addEndListener;this.node&&!i?(this.props.addEndListener&&this.props.addEndListener(this.node,this.nextCallback),t!=null&&setTimeout(this.nextCallback,t)):setTimeout(this.nextCallback,0)},r.render=function(){var t=this.state.status;if(t===Re)return null;var n=this.props;return(0,n.children)(t,Se(n,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]))},kt(o,[{key:"node",get:function(){var t,n=(t=this.props.nodeRef)===null||t===void 0?void 0:t.current;if(!n)throw new Error("notistack - Custom snackbar is not refForwarding");return n}}]),o}(l.Component);function he(){}function st(e,o){typeof e=="function"?e(o):e&&(e.current=o)}function Ze(e,o){return l.useMemo(function(){return e==null&&o==null?null:function(r){st(e,r),st(o,r)}},[e,o])}function Ne(e){var o=e.timeout,r=e.style,t=r===void 0?{}:r,n=e.mode;return{duration:typeof o=="object"?o[n]||0:o,easing:t.transitionTimingFunction,delay:t.transitionDelay}}Je.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:he,onEntering:he,onEntered:he,onExit:he,onExiting:he,onExited:he};var yt=function(e){e.scrollTop=e.scrollTop},lt=function(e){return Math.round(e)+"ms"};function ge(e,o){e===void 0&&(e=["all"]);var r=o||{},t=r.duration,n=t===void 0?300:t,i=r.easing,s=i===void 0?"cubic-bezier(0.4, 0, 0.2, 1)":i,u=r.delay,c=u===void 0?0:u;return(Array.isArray(e)?e:[e]).map(function(d){var p=typeof n=="string"?n:lt(n),f=typeof c=="string"?c:lt(c);return d+" "+p+" "+s+" "+f}).join(",")}function wt(e){var o;return((o=e)&&o.ownerDocument||document).defaultView||window}function Le(e,o){if(o){var r=function(t,n){var i,s=n.getBoundingClientRect(),u=wt(n);if(n.fakeTransform)i=n.fakeTransform;else{var c=u.getComputedStyle(n);i=c.getPropertyValue("-webkit-transform")||c.getPropertyValue("transform")}var d=0,p=0;if(i&&i!=="none"&&typeof i=="string"){var f=i.split("(")[1].split(")")[0].split(",");d=parseInt(f[4],10),p=parseInt(f[5],10)}switch(t){case"left":return"translateX("+(u.innerWidth+d-s.left)+"px)";case"right":return"translateX(-"+(s.left+s.width-d)+"px)";case"up":return"translateY("+(u.innerHeight+p-s.top)+"px)";default:return"translateY(-"+(s.top+s.height-p)+"px)"}}(e,o);r&&(o.style.webkitTransform=r,o.style.transform=r)}}var vt=l.forwardRef(function(e,o){var r=e.children,t=e.direction,n=t===void 0?"down":t,i=e.in,s=e.style,u=e.timeout,c=u===void 0?0:u,d=e.onEnter,p=e.onEntered,f=e.onExit,x=e.onExited,v=Se(e,["children","direction","in","style","timeout","onEnter","onEntered","onExit","onExited"]),y=l.useRef(null),b=Ze(r.ref,y),w=Ze(b,o),k=l.useCallback(function(){y.current&&Le(n,y.current)},[n]);return l.useEffect(function(){if(!i&&n!=="down"&&n!=="right"){var h=function(E,F){var L;function q(){for(var _=this,I=arguments.length,H=new Array(I),G=0;G<I;G++)H[G]=arguments[G];clearTimeout(L),L=setTimeout(function(){E.apply(_,H)},F)}return F===void 0&&(F=166),q.clear=function(){clearTimeout(L)},q}(function(){y.current&&Le(n,y.current)}),R=wt(y.current);return R.addEventListener("resize",h),function(){h.clear(),R.removeEventListener("resize",h)}}},[n,i]),l.useEffect(function(){i||k()},[i,k]),l.createElement(Je,Object.assign({appear:!0,nodeRef:y,onEnter:function(h,R){Le(n,h),yt(h),d&&d(h,R)},onEntered:p,onEntering:function(h){var R=Ne({timeout:c,mode:"enter",style:D({},s,{transitionTimingFunction:s?.transitionTimingFunction||"cubic-bezier(0.0, 0, 0.2, 1)"})});h.style.webkitTransition=ge("-webkit-transform",R),h.style.transition=ge("transform",R),h.style.webkitTransform="none",h.style.transform="none"},onExit:function(h){var R=Ne({timeout:c,mode:"exit",style:D({},s,{transitionTimingFunction:s?.transitionTimingFunction||"cubic-bezier(0.4, 0, 0.6, 1)"})});h.style.webkitTransition=ge("-webkit-transform",R),h.style.transition=ge("transform",R),Le(n,h),f&&f(h)},onExited:function(h){h.style.webkitTransition="",h.style.transition="",x&&x(h)},in:i,timeout:c},v),function(h,R){return l.cloneElement(r,D({ref:w,style:D({visibility:h!=="exited"||i?void 0:"hidden"},s,{},r.props.style)},R))})});vt.displayName="Slide";var Te=function(e){return l.createElement("svg",Object.assign({viewBox:"0 0 24 24",focusable:"false",style:{fontSize:20,marginInlineEnd:8,userSelect:"none",width:"1em",height:"1em",display:"inline-block",fill:"currentColor",flexShrink:0}},e))},ce={maxSnack:3,persist:!1,hideIconVariant:!1,disableWindowBlurListener:!1,variant:"default",autoHideDuration:5e3,iconVariant:{default:void 0,success:l.createElement(function(){return l.createElement(Te,null,l.createElement("path",{d:`M12 2C6.5 2 2 6.5 2 12S6.5 22 12 22 22 17.5 22 12 17.5 2 12 2M10 17L5 12L6.41
|
|
7
7
|
10.59L10 14.17L17.59 6.58L19 8L10 17Z`}))},null),warning:l.createElement(function(){return l.createElement(Te,null,l.createElement("path",{d:"M13,14H11V10H13M13,18H11V16H13M1,21H23L12,2L1,21Z"}))},null),error:l.createElement(function(){return l.createElement(Te,null,l.createElement("path",{d:`M12,2C17.53,2 22,6.47 22,12C22,17.53 17.53,22 12,22C6.47,22 2,17.53 2,12C2,
|
|
8
8
|
6.47 6.47,2 12,2M15.59,7L12,10.59L8.41,7L7,8.41L10.59,12L7,15.59L8.41,17L12,
|
|
9
9
|
13.41L15.59,17L17,15.59L13.41,12L17,8.41L15.59,7Z`}))},null),info:l.createElement(function(){return l.createElement(Te,null,l.createElement("path",{d:`M13,9H11V7H13M13,17H11V11H13M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,
|
|
10
|
-
0 22,12A10,10 0 0,0 12,2Z`}))},null)},anchorOrigin:{vertical:"bottom",horizontal:"left"},TransitionComponent:vt,transitionDuration:{enter:225,exit:195}};function Me(e){return Object.entries(e).reduce(function(o,r){var t,n=r[0],i=r[1];return D({},o,((t={})[n]=Xe(i),t))},{})}var Et="notistack-CollapseWrapper",tn=function(e){return"notistack-MuiContent-"+e},ct=Me({root:{height:0},entered:{height:"auto"}}),_e="0px",Ct=l.forwardRef(function(e,o){var r=e.children,t=e.in,n=e.onExited,i=l.useRef(null),s=l.useRef(null),u=Ze(o,s),c=function(){return i.current?i.current.clientHeight:0};return l.createElement(Je,{in:t,unmountOnExit:!0,onEnter:function(d){d.style.height=_e},onEntered:function(d){d.style.height="auto"},onEntering:function(d){var p=c(),f=Ne({timeout:175,mode:"enter"}),x=f.duration,v=f.easing;d.style.transitionDuration=typeof x=="string"?x:x+"ms",d.style.height=p+"px",d.style.transitionTimingFunction=v||""},onExit:function(d){d.style.height=c()+"px"},onExited:n,onExiting:function(d){yt(d);var p=Ne({timeout:175,mode:"exit"}),f=p.duration,x=p.easing;d.style.transitionDuration=typeof f=="string"?f:f+"ms",d.style.height=_e,d.style.transitionTimingFunction=x||""},nodeRef:s,timeout:175},function(d,p){return l.createElement("div",Object.assign({ref:u,className:ie(ct.root,d==="entered"&&ct.entered),style:D({pointerEvents:"all",overflow:"hidden",minHeight:_e,transition:ge("height")},d==="entered"&&{overflow:"visible"},{},d==="exited"&&!t&&{visibility:"hidden"})},p),l.createElement("div",{ref:i,className:Et,style:{display:"flex",width:"100%"}},r))})});Ct.displayName="Collapse";var ut={right:"left",left:"right",bottom:"up",top:"down"},nn=function(e){return"anchorOrigin"+Qe(e)},on=function(){};function Ce(e,o){return e.reduce(function(r,t){return t==null?r:function(){for(var n=arguments.length,i=new Array(n),s=0;s<n;s++)i[s]=arguments[s];var u=[].concat(i);o&&u.indexOf(o)===-1&&u.push(o),r.apply(this,u),t.apply(this,u)}},on)}var rn=typeof window<"u"?l.useLayoutEffect:l.useEffect;function dt(e){var o=l.useRef(e);return rn(function(){o.current=e}),l.useCallback(function(){return o.current.apply(void 0,arguments)},[])}var Ue,St=l.forwardRef(function(e,o){var r=e.children,t=e.className,n=e.autoHideDuration,i=e.disableWindowBlurListener,s=i!==void 0&&i,u=e.onClose,c=e.id,d=e.open,p=e.SnackbarProps,f=p===void 0?{}:p,x=l.useRef(),v=dt(function(){u&&u.apply(void 0,arguments)}),y=dt(function(k){u&&k!=null&&(x.current&&clearTimeout(x.current),x.current=setTimeout(function(){v(null,"timeout",c)},k))});l.useEffect(function(){return d&&y(n),function(){x.current&&clearTimeout(x.current)}},[d,n,y]);var b=function(){x.current&&clearTimeout(x.current)},w=l.useCallback(function(){n!=null&&y(.5*n)},[n,y]);return l.useEffect(function(){if(!s&&d)return window.addEventListener("focus",w),window.addEventListener("blur",b),function(){window.removeEventListener("focus",w),window.removeEventListener("blur",b)}},[s,w,d]),l.createElement("div",Object.assign({ref:o},f,{className:ie("notistack-Snackbar",t),onMouseEnter:function(k){f.onMouseEnter&&f.onMouseEnter(k),b()},onMouseLeave:function(k){f.onMouseLeave&&f.onMouseLeave(k),w()}}),r)});St.displayName="Snackbar";var an=Me({root:(Ue={display:"flex",flexWrap:"wrap",flexGrow:1},Ue[Pe]={flexGrow:"initial",minWidth:"288px"},Ue)}),Ye=l.forwardRef(function(e,o){var r=e.className,t=Se(e,["className"]);return l.createElement("div",Object.assign({ref:o,className:ie(an.root,r)},t))});Ye.displayName="SnackbarContent";var we=Me({root:{backgroundColor:"#313131",fontSize:"0.875rem",lineHeight:1.43,letterSpacing:"0.01071em",color:"#fff",alignItems:"center",padding:"6px 16px",borderRadius:"4px",boxShadow:"0px 3px 5px -1px rgba(0,0,0,0.2),0px 6px 10px 0px rgba(0,0,0,0.14),0px 1px 18px 0px rgba(0,0,0,0.12)"},lessPadding:{paddingLeft:"20px"},default:{backgroundColor:"#313131"},success:{backgroundColor:"#43a047"},error:{backgroundColor:"#d32f2f"},warning:{backgroundColor:"#ff9800"},info:{backgroundColor:"#2196f3"},message:{display:"flex",alignItems:"center",padding:"8px 0"},action:{display:"flex",alignItems:"center",marginLeft:"auto",paddingLeft:"16px",marginRight:"-8px"}}),pt="notistack-snackbar",Mt=l.forwardRef(function(e,o){var r=e.id,t=e.message,n=e.action,i=e.iconVariant,s=e.variant,u=e.hideIconVariant,c=e.style,d=e.className,p=i[s],f=n;return typeof f=="function"&&(f=f(r)),l.createElement(Ye,{ref:o,role:"alert","aria-describedby":pt,style:c,className:ie("notistack-MuiContent",tn(s),we.root,we[s],d,!u&&p&&we.lessPadding)},l.createElement("div",{id:pt,className:we.message},u?null:p,t),f&&l.createElement("div",{className:we.action},f))});Mt.displayName="MaterialDesignContent";var ve,$e,De,Oe,Ve,sn=l.memo(Mt),ln=Me({wrappedRoot:{width:"100%",position:"relative",transform:"translateX(0)",top:0,right:0,bottom:0,left:0,minWidth:"288px"}}),cn=function(e){var o=l.useRef(),r=l.useState(!0),t=r[0],n=r[1],i=Ce([e.snack.onClose,e.onClose]),s=l.useCallback(function(){o.current=setTimeout(function(){n(function(_){return!_})},125)},[]);l.useEffect(function(){return function(){o.current&&clearTimeout(o.current)}},[]);var u,c=e.snack,d=e.classes,p=e.Component,f=p===void 0?sn:p,x=l.useMemo(function(){return function(_){_===void 0&&(_={});var I={containerRoot:!0,containerAnchorOriginTopCenter:!0,containerAnchorOriginBottomCenter:!0,containerAnchorOriginTopRight:!0,containerAnchorOriginBottomRight:!0,containerAnchorOriginTopLeft:!0,containerAnchorOriginBottomLeft:!0};return Object.keys(_).filter(function(H){return!I[H]}).reduce(function(H,G){var Q;return D({},H,((Q={})[G]=_[G],Q))},{})}(d)},[d]),v=c.open,y=c.SnackbarProps,b=c.TransitionComponent,w=c.TransitionProps,k=c.transitionDuration,h=c.disableWindowBlurListener,R=c.content,E=Se(c,["open","SnackbarProps","TransitionComponent","TransitionProps","transitionDuration","disableWindowBlurListener","content","entered","requestClose","onEnter","onEntered","onExit","onExited"]),F=D({direction:(u=E.anchorOrigin,u.horizontal!=="center"?ut[u.horizontal]:ut[u.vertical]),timeout:k},w),L=R;typeof L=="function"&&(L=L(E.id,E.message));var q=["onEnter","onEntered","onExit","onExited"].reduce(function(_,I){var H;return D({},_,((H={})[I]=Ce([e.snack[I],e[I]],E.id),H))},{});return l.createElement(Ct,{in:t,onExited:q.onExited},l.createElement(St,{open:v,id:E.id,disableWindowBlurListener:h,autoHideDuration:E.autoHideDuration,className:ie(ln.wrappedRoot,x.root,x[nn(E.anchorOrigin)]),SnackbarProps:y,onClose:i},l.createElement(b,Object.assign({},F,{appear:!0,in:v,onExit:q.onExit,onExited:s,onEnter:q.onEnter,onEntered:Ce([q.onEntered,function(){e.snack.requestClose&&i(null,"instructed",e.snack.id)}],E.id)}),L||l.createElement(f,Object.assign({},E)))))},Ee=20,Ke=6,un=2,mt="."+Et,We=Me({root:(ve={boxSizing:"border-box",display:"flex",maxHeight:"100%",position:"fixed",zIndex:1400,height:"auto",width:"auto",transition:ge(["top","right","bottom","left","max-width"],{duration:300,easing:"ease"}),pointerEvents:"none"},ve[mt]={padding:Ke+"px 0px",transition:"padding 300ms ease 0ms"},ve.maxWidth="calc(100% - "+2*Ee+"px)",ve[Be]={width:"100%",maxWidth:"calc(100% - 32px)"},ve),rootDense:($e={},$e[mt]={padding:un+"px 0px"},$e),top:{top:Ee-Ke+"px",flexDirection:"column"},bottom:{bottom:Ee-Ke+"px",flexDirection:"column-reverse"},left:(De={left:Ee+"px"},De[Pe]={alignItems:"flex-start"},De[Be]={left:"16px"},De),right:(Oe={right:Ee+"px"},Oe[Pe]={alignItems:"flex-end"},Oe[Be]={right:"16px"},Oe),center:(Ve={left:"50%",transform:"translateX(-50%)"},Ve[Pe]={alignItems:"center"},Ve)}),dn=l.memo(function(e){var o=e.classes,r=o===void 0?{}:o,t=e.anchorOrigin,n=e.dense,i=e.children,s=ie("notistack-SnackbarContainer",We[t.vertical],We[t.horizontal],We.root,r.containerRoot,r["containerAnchorOrigin"+Qe(t)],n&&We.rootDense);return l.createElement("div",{className:s},i)}),ft=function(e){return!(typeof e=="string"||l.isValidElement(e))},pn=function(e){function o(r){var t;return(t=e.call(this,r)||this).enqueueSnackbar=function(n,i){if(i===void 0&&(i={}),n==null)throw new Error("enqueueSnackbar called with invalid argument");var s=ft(n)?n:i,u=ft(n)?n.message:n,c=s.key,d=s.preventDuplicate,p=Se(s,["key","preventDuplicate"]),f=je(c),x=f?c:new Date().getTime()+Math.random(),v=function(b,w){return function(k,h){return h===void 0&&(h=!1),h?D({},ce[k],{},w[k],{},b[k]):k==="autoHideDuration"?(L=b.autoHideDuration,q=w.autoHideDuration,(_=function(I){return typeof I=="number"||I===null})(L)?L:_(q)?q:ce.autoHideDuration):k==="transitionDuration"?(R=b.transitionDuration,E=w.transitionDuration,(F=function(I,H){return H.some(function(G){return typeof I===G})})(R,["string","number"])?R:F(R,["object"])?D({},ce.transitionDuration,{},F(E,["object"])&&E,{},R):F(E,["string","number"])?E:F(E,["object"])?D({},ce.transitionDuration,{},E):ce.transitionDuration):b[k]||w[k]||ce[k];var R,E,F,L,q,_}}(p,t.props),y=D({id:x},p,{message:u,open:!0,entered:!1,requestClose:!1,persist:v("persist"),action:v("action"),content:v("content"),variant:v("variant"),anchorOrigin:v("anchorOrigin"),disableWindowBlurListener:v("disableWindowBlurListener"),autoHideDuration:v("autoHideDuration"),hideIconVariant:v("hideIconVariant"),TransitionComponent:v("TransitionComponent"),transitionDuration:v("transitionDuration"),TransitionProps:v("TransitionProps",!0),iconVariant:v("iconVariant",!0),style:v("style",!0),SnackbarProps:v("SnackbarProps",!0),className:ie(t.props.className,p.className)});return y.persist&&(y.autoHideDuration=void 0),t.setState(function(b){if(d===void 0&&t.props.preventDuplicate||d){var w=function(R){return f?R.id===x:R.message===u},k=b.queue.findIndex(w)>-1,h=b.snacks.findIndex(w)>-1;if(k||h)return b}return t.handleDisplaySnack(D({},b,{queue:[].concat(b.queue,[y])}))}),x},t.handleDisplaySnack=function(n){return n.snacks.length>=t.maxSnack?t.handleDismissOldest(n):t.processQueue(n)},t.processQueue=function(n){var i=n.queue,s=n.snacks;return i.length>0?D({},n,{snacks:[].concat(s,[i[0]]),queue:i.slice(1,i.length)}):n},t.handleDismissOldest=function(n){if(n.snacks.some(function(c){return!c.open||c.requestClose}))return n;var i=!1,s=!1;n.snacks.reduce(function(c,d){return c+(d.open&&d.persist?1:0)},0)===t.maxSnack&&(s=!0);var u=n.snacks.map(function(c){return i||c.persist&&!s?D({},c):(i=!0,c.entered?(c.onClose&&c.onClose(null,"maxsnack",c.id),t.props.onClose&&t.props.onClose(null,"maxsnack",c.id),D({},c,{open:!1})):D({},c,{requestClose:!0}))});return D({},n,{snacks:u})},t.handleEnteredSnack=function(n,i,s){if(!je(s))throw new Error("handleEnteredSnack Cannot be called with undefined key");t.setState(function(u){return{snacks:u.snacks.map(function(c){return c.id===s?D({},c,{entered:!0}):D({},c)})}})},t.handleCloseSnack=function(n,i,s){t.props.onClose&&t.props.onClose(n,i,s);var u=s===void 0;t.setState(function(c){var d=c.snacks,p=c.queue;return{snacks:d.map(function(f){return u||f.id===s?f.entered?D({},f,{open:!1}):D({},f,{requestClose:!0}):D({},f)}),queue:p.filter(function(f){return f.id!==s})}})},t.closeSnackbar=function(n){var i=t.state.snacks.find(function(s){return s.id===n});je(n)&&i&&i.onClose&&i.onClose(null,"instructed",n),t.handleCloseSnack(null,"instructed",n)},t.handleExitedSnack=function(n,i){if(!je(i))throw new Error("handleExitedSnack Cannot be called with undefined key");t.setState(function(s){var u=t.processQueue(D({},s,{snacks:s.snacks.filter(function(c){return c.id!==i})}));return u.queue.length===0?u:t.handleDismissOldest(u)})},t.enqueueSnackbar,t.closeSnackbar,t.state={snacks:[],queue:[],contextValue:{enqueueSnackbar:t.enqueueSnackbar.bind(ot(t)),closeSnackbar:t.closeSnackbar.bind(ot(t))}},t}return bt(o,e),o.prototype.render=function(){var r=this,t=this.state.contextValue,n=this.props,i=n.domRoot,s=n.children,u=n.dense,c=u!==void 0&&u,d=n.Components,p=d===void 0?{}:d,f=n.classes,x=this.state.snacks.reduce(function(y,b){var w,k=Qe(b.anchorOrigin),h=y[k]||[];return D({},y,((w={})[k]=[].concat(h,[b]),w))},{}),v=Object.keys(x).map(function(y){var b=x[y],w=b[0];return l.createElement(dn,{key:y,dense:c,anchorOrigin:w.anchorOrigin,classes:f},b.map(function(k){return l.createElement(cn,{key:k.id,snack:k,classes:f,Component:p[k.variant],onClose:r.handleCloseSnack,onEnter:r.props.onEnter,onExit:r.props.onExit,onExited:Ce([r.handleExitedSnack,r.props.onExited],k.id),onEntered:Ce([r.handleEnteredSnack,r.props.onEntered],k.id)})}))});return l.createElement(xt.Provider,{value:t},s,i?Wt.createPortal(v,i):v)},kt(o,[{key:"maxSnack",get:function(){return this.props.maxSnack||ce.maxSnack}}]),o}(l.Component),jt=function(){return l.useContext(xt)};const re={card:"_card_1a398_7",actionRoot:"_actionRoot_1a398_11",icons:"_icons_1a398_16",expand:"_expand_1a398_22",expandOpen:"_expandOpen_1a398_29",stackTraceContainer:"_stackTraceContainer_1a398_33"},Rt=l.forwardRef((e,o)=>{const{id:r,message:t,iconVariant:n,error:i,hideIconVariant:s,...u}=e,{closeSnackbar:c}=jt(),d=a.E0(),[p,f]=l.useState(!1),x=l.useCallback(()=>{f(b=>!b)},[]),v=l.useCallback(()=>{c(r)},[r,c]),y=i?.message||String(t);return m.jsx(Ye,{ref:o,className:a.yo(re.root,"error-snackbar"),children:m.jsxs(Ht,{className:re.card,style:{backgroundColor:d.palette.error.dark,border:`1px solid ${d.palette.error.dark}`},children:[m.jsxs(Ut,{className:re.actionRoot,children:[s?null:n?.error,m.jsx(a.Typography,{variant:"body2",component:"div",className:re.typography,style:{color:d.palette.text.primary},children:y}),m.jsx("div",{style:{flex:"1 1 auto"}}),m.jsxs("div",{className:re.icons,children:[i?m.jsx(a.IconButton,{"aria-label":"Show more",size:"small",className:a.yo(re.expand,{[re.expandOpen]:p}),style:{color:d.palette.action.active},onClick:x,children:m.jsx(a.Xn,{})}):null,m.jsx(a.IconButton,{size:"small",className:re.expand,style:{color:d.palette.action.active},onClick:v,children:m.jsx(a._o,{fontSize:"small"})})]})]}),i?m.jsx(Fe,{in:p,timeout:"auto",unmountOnExit:!0,children:m.jsx("div",{className:re.stackTraceContainer,style:{backgroundColor:d.palette.error.light,borderTop:`1px solid ${d.palette.error.main}`},children:m.jsx(a.L9,{error:i,hideLineNumbers:!0})})}):null]})})});Rt.displayName="ToastError";const Lt=l.memo(l.forwardRef((e,o)=>{const{commands:r,commandHook:t,scope:n="workbook",disabled:i=!1,...s}=e,u=a.me(d=>{const p={variant:a.Qt.Menuitem,parentFloat:d.floatReference,commandHook:t,scope:n,disabled:i},f=m.jsxs(m.Fragment,{children:[m.jsx(a.Oe,{...p,command:r.getCommand("newWorkbook"),icon:a.ve(m.jsx(a.yR,{}))}),m.jsx(a.$t,{orientation:"horizontal"}),m.jsx(a.Oe,{...p,command:r.getCommand("openWorkbook"),icon:a.ve(m.jsx(a.bR,{}))}),m.jsx(a.Kn,{...p,commands:r,quickCommand:"saveWorkbook",icon:a.ve(m.jsx(a.wR,{})),createPopupPanel:x=>{const v={...p,parentFloat:x.floatReference,scope:"saveWorkbook"},y=[];return a.qR.getWriteFormats().forEach(b=>{if(b.isDefault)return;let w=null;b.key==="CSV"?w=a.ve(m.jsx(a.xR,{})):b.key==="Excel"&&(w=a.ve(m.jsx(a.vR,{})));const k=r.getCommand(`saveWorkbookAs${b.key}`);k?y.push(l.createElement(a.Oe,{...v,key:b.key,command:k,icon:w})):console.warn(`Unable to resolve command: 'saveWorkbookAs${b.key}'`)}),a.Fn({...x,children:y,onClick:()=>{x.closeFloatAll()}})}})]});return a.Fn({...d,children:f,onClick:x=>{x.isDefaultPrevented||d.closeFloatAll()}})},[i,r,t,n]),c="File";return m.jsx(a.Kn,{commands:r,disabled:i,commandHook:t,scope:n,label:c,tooltip:"Options for saving and loading the workbook.",sx:{paddingBottom:"0px","& button":{paddingTop:"0px",paddingBottom:"0px",height:d=>`calc(1.25rem + ${d.spacing(2)}px)`}},...s,createPopupPanel:u,icon:m.jsx(a.es,{className:"label",icon:null,label:c})})}));Lt.displayName="StandaloneFileCommandButton";const mn=m.jsx(a.ar,{label:"SheetXL",description:"Visit me at sheetxl.com.",children:m.jsx(a.Box,{sx:{width:"24px",height:"24px",marginBottom:"4px",marginLeft:"6px"},children:m.jsx(a.NR,{onClick:()=>{window?.open("https://www.sheetxl.com","_blank")},style:{width:"24px",height:"24px",cursor:"pointer"}})})}),Tt=l.memo(l.forwardRef((e,o)=>{const{commands:r,workbook:t,logo:n=mn,mainElement:i,showFileMenu:s=!0,showAppearanceMenu:u=!0,...c}=e,{reference:d}=a.N0(),[p,{width:f}]=a.fc(),x=f<530,v=s?m.jsx(Lt,{commands:r,commandHook:{beforeExecute(){d?.closeAll()},onError(k,h,R){}}}):null,y=u?m.jsx(a.HR,{commands:r,commandHook:{beforeExecute(){d?.closeAll()},onError(k,h,R){}}}):null,b=l.useMemo(()=>({paddingLeft:k=>k.spacing(1),paddingRight:k=>k.spacing(1)}),[]),w=l.useRef(null);return m.jsx(a.Box,{ref:a.h5([w,p,o]),...c,children:a.DM({commands:r,renderCompact:x,workbook:t,selectWrapper:k=>m.jsxs(a.Box,{sx:{display:"flex",flex:"1",flexDirection:"row",alignItems:"stretch",gap:h=>h.spacing(1),paddingLeft:h=>h.spacing(1),paddingRight:h=>h.spacing(1)},children:[m.jsxs(a.Box,{sx:{display:"flex",flexDirection:"row",alignItems:"center",flex:"1 1 100%",gap:h=>h.spacing(.5)},children:[n,m.jsxs(a.Box,{sx:{display:"flex",flexDirection:"row",alignItems:"center",gap:h=>h.spacing(.25)},children:[v,k]})]}),m.jsx(a.Box,{sx:{display:"flex",flexDirection:"row",flex:"1 1 300%",overflow:"hidden",alignItems:"center",justifyContent:"center"},children:i}),m.jsx(a.Box,{sx:{display:"flex",alignItems:"center",justifyContent:"end",flex:x&&!y?"0 0 auto":"1 1 100%"},children:y})]}),selectProps:b,toolbarsProps:{Home:{sx:{}}}})})}));Tt.displayName="StandaloneWorkbookToolbar";const Dt=l.memo(l.forwardRef((e,o)=>{const{workbook:r,setWorkbook:t,refWorkbookTitle:n,titleWorkbook:i,setWorkbookTitle:s,titlePlaceHolder:u,children:c,undoManager:d,commands:p,importExportDisabled:f,themeModeOptions:x}=e,v=jt(),y=v?v.enqueueSnackbar:()=>{},b=v?v.closeSnackbar:()=>{},[w,k]=l.useState({isMounted:!1,label:null,starting:new Map,running:new Map}),h=l.useCallback(()=>{k(P=>({...P,isMounted:!0}))},[]),R=l.useCallback(()=>{k(P=>({...P,isMounted:!1}))},[]),E=a.OR(),F=a.LR(),L=a.AR(),q=l.useRef(new Set),_=l.useMemo(()=>{const P=(S,j)=>{if(j?.onceKey){if(q.current.has(j.onceKey))return;const T=new Set(q.current);T.add(j.onceKey),q.current=T}const A={variant:j?.type??a.z0.Info,anchorOrigin:{vertical:"top",horizontal:"center"},preventDuplicate:j?.preventDuplicate,persist:j?.persist??j?.type===a.z0.Error,action:T=>m.jsx(a.IconButton,{onClick:()=>b(T),children:m.jsx(Xt,{})})};j?.enqueueProps&&Object.assign(A,j.enqueueProps),S||console.log("message is 'null'",j),y(S??"Alert",A)};return{showMessage:P,showBusy:(S,j)=>{let A=null;const T=new Promise(U=>{A=U});return k(U=>{const B=new Map(U.starting);return B.set(T,A),{...U,label:S,starting:B}}),T},showWindow:(S,j,A)=>{const T={...j,onKeyDown:U=>{p?.dispatchToFocusedCommand(U),U.isDefaultPrevented()||U.isPropagationStopped()||j?.onKeyDown?.(U)}};return E(S,{sort:()=>Promise.resolve().then(()=>require("./DH0zi_Wry2AW6ZUU.cjs")),numberFormat:()=>Promise.resolve().then(()=>require("./BfF2oDUTv3b16mah.cjs")),hyperlink:()=>Promise.resolve().then(()=>require("./BV0L9gP18W00UBzV.cjs")),comments:()=>Promise.resolve().then(()=>require("./CYXbh4ysBOipBqkj.cjs")),find:()=>Promise.resolve().then(()=>require("./B8jcrNkTeVeivhoT.cjs")),tableDetails:()=>Promise.resolve().then(()=>require("./BV-ZJjmj_rGxcdgT.cjs")),tableNew:()=>Promise.resolve().then(()=>require("./BRgJMarh4Bp58iM3.cjs")),namedDetails:()=>Promise.resolve().then(()=>require("./cAwpZ8WIPtGrZO6Z.cjs"))}[S],T,A)},showOptions:F,showInputOptions:L,showError:S=>{let j,A=a.z0.Error,T="Unknown Error";typeof S=="string"?T=S:S instanceof Error&&(j=S,S.message&&(T=S.message)),S instanceof ue.PartialError&&(A=a.z0.Info),P(T,{type:A,enqueueProps:{error:j}})}}},[]),I=l.useCallback(()=>{},[]),H=(P=>{const{workbook:S,setWorkbook:j,importExportDisabled:A,workbookTitle:T="export",setWorkbookTitle:U,notifier:B,requestWorkbookTitle:J,themeModeOptions:z,undoManager:M,commands:O,onExecute:$}=P,Y=a.me(z?.onForceModeChange,[z?.onForceModeChange]),ae=a.me(z?.onForceLightGridChange,[z?.onForceLightGridChange]),ne=a.me(z?.onForceLightImagesChange,[z?.onForceLightImagesChange]),Ae=a.me(async(W=null,Z=null)=>{const g=[];let C,V=null,ee=null;if(typeof W=="string"?ee=W:V=W,C=V?W:await a.Jt.openFileDialog(ee??a.qR.getAllReadFormatTypeAsString().join(",")),!C)return null;const se={source:C,constructorOptions:Z,onWarning:ze=>{g.push(ze)}},xe=await a.qR.read(se,B);return g.length>0&&(B?.showMessage?.("Some elements were not able to be imported. See console for details."),console.warn(`Import warnings:
|
|
10
|
+
0 22,12A10,10 0 0,0 12,2Z`}))},null)},anchorOrigin:{vertical:"bottom",horizontal:"left"},TransitionComponent:vt,transitionDuration:{enter:225,exit:195}};function Me(e){return Object.entries(e).reduce(function(o,r){var t,n=r[0],i=r[1];return D({},o,((t={})[n]=Xe(i),t))},{})}var Et="notistack-CollapseWrapper",tn=function(e){return"notistack-MuiContent-"+e},ct=Me({root:{height:0},entered:{height:"auto"}}),_e="0px",Ct=l.forwardRef(function(e,o){var r=e.children,t=e.in,n=e.onExited,i=l.useRef(null),s=l.useRef(null),u=Ze(o,s),c=function(){return i.current?i.current.clientHeight:0};return l.createElement(Je,{in:t,unmountOnExit:!0,onEnter:function(d){d.style.height=_e},onEntered:function(d){d.style.height="auto"},onEntering:function(d){var p=c(),f=Ne({timeout:175,mode:"enter"}),x=f.duration,v=f.easing;d.style.transitionDuration=typeof x=="string"?x:x+"ms",d.style.height=p+"px",d.style.transitionTimingFunction=v||""},onExit:function(d){d.style.height=c()+"px"},onExited:n,onExiting:function(d){yt(d);var p=Ne({timeout:175,mode:"exit"}),f=p.duration,x=p.easing;d.style.transitionDuration=typeof f=="string"?f:f+"ms",d.style.height=_e,d.style.transitionTimingFunction=x||""},nodeRef:s,timeout:175},function(d,p){return l.createElement("div",Object.assign({ref:u,className:ie(ct.root,d==="entered"&&ct.entered),style:D({pointerEvents:"all",overflow:"hidden",minHeight:_e,transition:ge("height")},d==="entered"&&{overflow:"visible"},{},d==="exited"&&!t&&{visibility:"hidden"})},p),l.createElement("div",{ref:i,className:Et,style:{display:"flex",width:"100%"}},r))})});Ct.displayName="Collapse";var ut={right:"left",left:"right",bottom:"up",top:"down"},nn=function(e){return"anchorOrigin"+Qe(e)},on=function(){};function Ce(e,o){return e.reduce(function(r,t){return t==null?r:function(){for(var n=arguments.length,i=new Array(n),s=0;s<n;s++)i[s]=arguments[s];var u=[].concat(i);o&&u.indexOf(o)===-1&&u.push(o),r.apply(this,u),t.apply(this,u)}},on)}var rn=typeof window<"u"?l.useLayoutEffect:l.useEffect;function dt(e){var o=l.useRef(e);return rn(function(){o.current=e}),l.useCallback(function(){return o.current.apply(void 0,arguments)},[])}var Ue,St=l.forwardRef(function(e,o){var r=e.children,t=e.className,n=e.autoHideDuration,i=e.disableWindowBlurListener,s=i!==void 0&&i,u=e.onClose,c=e.id,d=e.open,p=e.SnackbarProps,f=p===void 0?{}:p,x=l.useRef(),v=dt(function(){u&&u.apply(void 0,arguments)}),y=dt(function(k){u&&k!=null&&(x.current&&clearTimeout(x.current),x.current=setTimeout(function(){v(null,"timeout",c)},k))});l.useEffect(function(){return d&&y(n),function(){x.current&&clearTimeout(x.current)}},[d,n,y]);var b=function(){x.current&&clearTimeout(x.current)},w=l.useCallback(function(){n!=null&&y(.5*n)},[n,y]);return l.useEffect(function(){if(!s&&d)return window.addEventListener("focus",w),window.addEventListener("blur",b),function(){window.removeEventListener("focus",w),window.removeEventListener("blur",b)}},[s,w,d]),l.createElement("div",Object.assign({ref:o},f,{className:ie("notistack-Snackbar",t),onMouseEnter:function(k){f.onMouseEnter&&f.onMouseEnter(k),b()},onMouseLeave:function(k){f.onMouseLeave&&f.onMouseLeave(k),w()}}),r)});St.displayName="Snackbar";var an=Me({root:(Ue={display:"flex",flexWrap:"wrap",flexGrow:1},Ue[Pe]={flexGrow:"initial",minWidth:"288px"},Ue)}),Ye=l.forwardRef(function(e,o){var r=e.className,t=Se(e,["className"]);return l.createElement("div",Object.assign({ref:o,className:ie(an.root,r)},t))});Ye.displayName="SnackbarContent";var we=Me({root:{backgroundColor:"#313131",fontSize:"0.875rem",lineHeight:1.43,letterSpacing:"0.01071em",color:"#fff",alignItems:"center",padding:"6px 16px",borderRadius:"4px",boxShadow:"0px 3px 5px -1px rgba(0,0,0,0.2),0px 6px 10px 0px rgba(0,0,0,0.14),0px 1px 18px 0px rgba(0,0,0,0.12)"},lessPadding:{paddingLeft:"20px"},default:{backgroundColor:"#313131"},success:{backgroundColor:"#43a047"},error:{backgroundColor:"#d32f2f"},warning:{backgroundColor:"#ff9800"},info:{backgroundColor:"#2196f3"},message:{display:"flex",alignItems:"center",padding:"8px 0"},action:{display:"flex",alignItems:"center",marginLeft:"auto",paddingLeft:"16px",marginRight:"-8px"}}),pt="notistack-snackbar",Mt=l.forwardRef(function(e,o){var r=e.id,t=e.message,n=e.action,i=e.iconVariant,s=e.variant,u=e.hideIconVariant,c=e.style,d=e.className,p=i[s],f=n;return typeof f=="function"&&(f=f(r)),l.createElement(Ye,{ref:o,role:"alert","aria-describedby":pt,style:c,className:ie("notistack-MuiContent",tn(s),we.root,we[s],d,!u&&p&&we.lessPadding)},l.createElement("div",{id:pt,className:we.message},u?null:p,t),f&&l.createElement("div",{className:we.action},f))});Mt.displayName="MaterialDesignContent";var ve,$e,De,Oe,Ve,sn=l.memo(Mt),ln=Me({wrappedRoot:{width:"100%",position:"relative",transform:"translateX(0)",top:0,right:0,bottom:0,left:0,minWidth:"288px"}}),cn=function(e){var o=l.useRef(),r=l.useState(!0),t=r[0],n=r[1],i=Ce([e.snack.onClose,e.onClose]),s=l.useCallback(function(){o.current=setTimeout(function(){n(function(_){return!_})},125)},[]);l.useEffect(function(){return function(){o.current&&clearTimeout(o.current)}},[]);var u,c=e.snack,d=e.classes,p=e.Component,f=p===void 0?sn:p,x=l.useMemo(function(){return function(_){_===void 0&&(_={});var I={containerRoot:!0,containerAnchorOriginTopCenter:!0,containerAnchorOriginBottomCenter:!0,containerAnchorOriginTopRight:!0,containerAnchorOriginBottomRight:!0,containerAnchorOriginTopLeft:!0,containerAnchorOriginBottomLeft:!0};return Object.keys(_).filter(function(H){return!I[H]}).reduce(function(H,G){var Q;return D({},H,((Q={})[G]=_[G],Q))},{})}(d)},[d]),v=c.open,y=c.SnackbarProps,b=c.TransitionComponent,w=c.TransitionProps,k=c.transitionDuration,h=c.disableWindowBlurListener,R=c.content,E=Se(c,["open","SnackbarProps","TransitionComponent","TransitionProps","transitionDuration","disableWindowBlurListener","content","entered","requestClose","onEnter","onEntered","onExit","onExited"]),F=D({direction:(u=E.anchorOrigin,u.horizontal!=="center"?ut[u.horizontal]:ut[u.vertical]),timeout:k},w),L=R;typeof L=="function"&&(L=L(E.id,E.message));var q=["onEnter","onEntered","onExit","onExited"].reduce(function(_,I){var H;return D({},_,((H={})[I]=Ce([e.snack[I],e[I]],E.id),H))},{});return l.createElement(Ct,{in:t,onExited:q.onExited},l.createElement(St,{open:v,id:E.id,disableWindowBlurListener:h,autoHideDuration:E.autoHideDuration,className:ie(ln.wrappedRoot,x.root,x[nn(E.anchorOrigin)]),SnackbarProps:y,onClose:i},l.createElement(b,Object.assign({},F,{appear:!0,in:v,onExit:q.onExit,onExited:s,onEnter:q.onEnter,onEntered:Ce([q.onEntered,function(){e.snack.requestClose&&i(null,"instructed",e.snack.id)}],E.id)}),L||l.createElement(f,Object.assign({},E)))))},Ee=20,Ke=6,un=2,mt="."+Et,We=Me({root:(ve={boxSizing:"border-box",display:"flex",maxHeight:"100%",position:"fixed",zIndex:1400,height:"auto",width:"auto",transition:ge(["top","right","bottom","left","max-width"],{duration:300,easing:"ease"}),pointerEvents:"none"},ve[mt]={padding:Ke+"px 0px",transition:"padding 300ms ease 0ms"},ve.maxWidth="calc(100% - "+2*Ee+"px)",ve[Be]={width:"100%",maxWidth:"calc(100% - 32px)"},ve),rootDense:($e={},$e[mt]={padding:un+"px 0px"},$e),top:{top:Ee-Ke+"px",flexDirection:"column"},bottom:{bottom:Ee-Ke+"px",flexDirection:"column-reverse"},left:(De={left:Ee+"px"},De[Pe]={alignItems:"flex-start"},De[Be]={left:"16px"},De),right:(Oe={right:Ee+"px"},Oe[Pe]={alignItems:"flex-end"},Oe[Be]={right:"16px"},Oe),center:(Ve={left:"50%",transform:"translateX(-50%)"},Ve[Pe]={alignItems:"center"},Ve)}),dn=l.memo(function(e){var o=e.classes,r=o===void 0?{}:o,t=e.anchorOrigin,n=e.dense,i=e.children,s=ie("notistack-SnackbarContainer",We[t.vertical],We[t.horizontal],We.root,r.containerRoot,r["containerAnchorOrigin"+Qe(t)],n&&We.rootDense);return l.createElement("div",{className:s},i)}),ft=function(e){return!(typeof e=="string"||l.isValidElement(e))},pn=function(e){function o(r){var t;return(t=e.call(this,r)||this).enqueueSnackbar=function(n,i){if(i===void 0&&(i={}),n==null)throw new Error("enqueueSnackbar called with invalid argument");var s=ft(n)?n:i,u=ft(n)?n.message:n,c=s.key,d=s.preventDuplicate,p=Se(s,["key","preventDuplicate"]),f=je(c),x=f?c:new Date().getTime()+Math.random(),v=function(b,w){return function(k,h){return h===void 0&&(h=!1),h?D({},ce[k],{},w[k],{},b[k]):k==="autoHideDuration"?(L=b.autoHideDuration,q=w.autoHideDuration,(_=function(I){return typeof I=="number"||I===null})(L)?L:_(q)?q:ce.autoHideDuration):k==="transitionDuration"?(R=b.transitionDuration,E=w.transitionDuration,(F=function(I,H){return H.some(function(G){return typeof I===G})})(R,["string","number"])?R:F(R,["object"])?D({},ce.transitionDuration,{},F(E,["object"])&&E,{},R):F(E,["string","number"])?E:F(E,["object"])?D({},ce.transitionDuration,{},E):ce.transitionDuration):b[k]||w[k]||ce[k];var R,E,F,L,q,_}}(p,t.props),y=D({id:x},p,{message:u,open:!0,entered:!1,requestClose:!1,persist:v("persist"),action:v("action"),content:v("content"),variant:v("variant"),anchorOrigin:v("anchorOrigin"),disableWindowBlurListener:v("disableWindowBlurListener"),autoHideDuration:v("autoHideDuration"),hideIconVariant:v("hideIconVariant"),TransitionComponent:v("TransitionComponent"),transitionDuration:v("transitionDuration"),TransitionProps:v("TransitionProps",!0),iconVariant:v("iconVariant",!0),style:v("style",!0),SnackbarProps:v("SnackbarProps",!0),className:ie(t.props.className,p.className)});return y.persist&&(y.autoHideDuration=void 0),t.setState(function(b){if(d===void 0&&t.props.preventDuplicate||d){var w=function(R){return f?R.id===x:R.message===u},k=b.queue.findIndex(w)>-1,h=b.snacks.findIndex(w)>-1;if(k||h)return b}return t.handleDisplaySnack(D({},b,{queue:[].concat(b.queue,[y])}))}),x},t.handleDisplaySnack=function(n){return n.snacks.length>=t.maxSnack?t.handleDismissOldest(n):t.processQueue(n)},t.processQueue=function(n){var i=n.queue,s=n.snacks;return i.length>0?D({},n,{snacks:[].concat(s,[i[0]]),queue:i.slice(1,i.length)}):n},t.handleDismissOldest=function(n){if(n.snacks.some(function(c){return!c.open||c.requestClose}))return n;var i=!1,s=!1;n.snacks.reduce(function(c,d){return c+(d.open&&d.persist?1:0)},0)===t.maxSnack&&(s=!0);var u=n.snacks.map(function(c){return i||c.persist&&!s?D({},c):(i=!0,c.entered?(c.onClose&&c.onClose(null,"maxsnack",c.id),t.props.onClose&&t.props.onClose(null,"maxsnack",c.id),D({},c,{open:!1})):D({},c,{requestClose:!0}))});return D({},n,{snacks:u})},t.handleEnteredSnack=function(n,i,s){if(!je(s))throw new Error("handleEnteredSnack Cannot be called with undefined key");t.setState(function(u){return{snacks:u.snacks.map(function(c){return c.id===s?D({},c,{entered:!0}):D({},c)})}})},t.handleCloseSnack=function(n,i,s){t.props.onClose&&t.props.onClose(n,i,s);var u=s===void 0;t.setState(function(c){var d=c.snacks,p=c.queue;return{snacks:d.map(function(f){return u||f.id===s?f.entered?D({},f,{open:!1}):D({},f,{requestClose:!0}):D({},f)}),queue:p.filter(function(f){return f.id!==s})}})},t.closeSnackbar=function(n){var i=t.state.snacks.find(function(s){return s.id===n});je(n)&&i&&i.onClose&&i.onClose(null,"instructed",n),t.handleCloseSnack(null,"instructed",n)},t.handleExitedSnack=function(n,i){if(!je(i))throw new Error("handleExitedSnack Cannot be called with undefined key");t.setState(function(s){var u=t.processQueue(D({},s,{snacks:s.snacks.filter(function(c){return c.id!==i})}));return u.queue.length===0?u:t.handleDismissOldest(u)})},t.enqueueSnackbar,t.closeSnackbar,t.state={snacks:[],queue:[],contextValue:{enqueueSnackbar:t.enqueueSnackbar.bind(ot(t)),closeSnackbar:t.closeSnackbar.bind(ot(t))}},t}return bt(o,e),o.prototype.render=function(){var r=this,t=this.state.contextValue,n=this.props,i=n.domRoot,s=n.children,u=n.dense,c=u!==void 0&&u,d=n.Components,p=d===void 0?{}:d,f=n.classes,x=this.state.snacks.reduce(function(y,b){var w,k=Qe(b.anchorOrigin),h=y[k]||[];return D({},y,((w={})[k]=[].concat(h,[b]),w))},{}),v=Object.keys(x).map(function(y){var b=x[y],w=b[0];return l.createElement(dn,{key:y,dense:c,anchorOrigin:w.anchorOrigin,classes:f},b.map(function(k){return l.createElement(cn,{key:k.id,snack:k,classes:f,Component:p[k.variant],onClose:r.handleCloseSnack,onEnter:r.props.onEnter,onExit:r.props.onExit,onExited:Ce([r.handleExitedSnack,r.props.onExited],k.id),onEntered:Ce([r.handleEnteredSnack,r.props.onEntered],k.id)})}))});return l.createElement(xt.Provider,{value:t},s,i?Wt.createPortal(v,i):v)},kt(o,[{key:"maxSnack",get:function(){return this.props.maxSnack||ce.maxSnack}}]),o}(l.Component),jt=function(){return l.useContext(xt)};const re={card:"_card_1a398_7",actionRoot:"_actionRoot_1a398_11",icons:"_icons_1a398_16",expand:"_expand_1a398_22",expandOpen:"_expandOpen_1a398_29",stackTraceContainer:"_stackTraceContainer_1a398_33"},Rt=l.forwardRef((e,o)=>{const{id:r,message:t,iconVariant:n,error:i,hideIconVariant:s,...u}=e,{closeSnackbar:c}=jt(),d=a.E0(),[p,f]=l.useState(!1),x=l.useCallback(()=>{f(b=>!b)},[]),v=l.useCallback(()=>{c(r)},[r,c]),y=i?.message||String(t);return m.jsx(Ye,{ref:o,className:a.yo(re.root,"error-snackbar"),children:m.jsxs(Ht,{className:re.card,style:{backgroundColor:d.palette.error.dark,border:`1px solid ${d.palette.error.dark}`},children:[m.jsxs(Ut,{className:re.actionRoot,children:[s?null:n?.error,m.jsx(a.Typography,{variant:"body2",component:"div",className:re.typography,style:{color:d.palette.text.primary},children:y}),m.jsx("div",{style:{flex:"1 1 auto"}}),m.jsxs("div",{className:re.icons,children:[i?m.jsx(a.IconButton,{"aria-label":"Show more",size:"small",className:a.yo(re.expand,{[re.expandOpen]:p}),style:{color:d.palette.action.active},onClick:x,children:m.jsx(a.Xn,{})}):null,m.jsx(a.IconButton,{size:"small",className:re.expand,style:{color:d.palette.action.active},onClick:v,children:m.jsx(a._o,{fontSize:"small"})})]})]}),i?m.jsx(Fe,{in:p,timeout:"auto",unmountOnExit:!0,children:m.jsx("div",{className:re.stackTraceContainer,style:{backgroundColor:d.palette.error.light,borderTop:`1px solid ${d.palette.error.main}`},children:m.jsx(a.L9,{error:i,hideLineNumbers:!0})})}):null]})})});Rt.displayName="ToastError";const Lt=l.memo(l.forwardRef((e,o)=>{const{commands:r,commandHook:t,scope:n="workbook",disabled:i=!1,...s}=e,u=a.me(d=>{const p={variant:a.Qt.Menuitem,parentFloat:d.floatReference,commandHook:t,scope:n,disabled:i},f=m.jsxs(m.Fragment,{children:[m.jsx(a.Oe,{...p,command:r.getCommand("newWorkbook"),icon:a.ve(m.jsx(a.yR,{}))}),m.jsx(a.$t,{orientation:"horizontal"}),m.jsx(a.Oe,{...p,command:r.getCommand("openWorkbook"),icon:a.ve(m.jsx(a.bR,{}))}),m.jsx(a.Kn,{...p,commands:r,quickCommand:"saveWorkbook",icon:a.ve(m.jsx(a.wR,{})),createPopupPanel:x=>{const v={...p,parentFloat:x.floatReference,scope:"saveWorkbook"},y=[];return a.qR.getWriteFormats().forEach(b=>{if(b.isDefault)return;let w=null;b.key==="CSV"?w=a.ve(m.jsx(a.xR,{})):b.key==="Excel"&&(w=a.ve(m.jsx(a.vR,{})));const k=r.getCommand(`saveWorkbookAs${b.key}`);k?y.push(l.createElement(a.Oe,{...v,key:b.key,command:k,icon:w})):console.warn(`Unable to resolve command: 'saveWorkbookAs${b.key}'`)}),a.Fn({...x,children:y,onClick:()=>{x.closeFloatAll()}})}})]});return a.Fn({...d,children:f,onClick:x=>{x.isDefaultPrevented||d.closeFloatAll()}})},[i,r,t,n]),c="File";return m.jsx(a.Kn,{commands:r,disabled:i,commandHook:t,scope:n,label:c,tooltip:"Options for saving and loading the workbook.",sx:{paddingBottom:"0px","& button":{paddingTop:"0px",paddingBottom:"0px",height:d=>`calc(1.25rem + ${d.spacing(2)}px)`}},...s,createPopupPanel:u,icon:m.jsx(a.es,{className:"label",icon:null,label:c})})}));Lt.displayName="StandaloneFileCommandButton";const mn=m.jsx(a.ar,{label:"SheetXL",description:"Visit me at sheetxl.com.",children:m.jsx(a.Box,{sx:{width:"24px",height:"24px",marginBottom:"4px",marginLeft:"6px"},children:m.jsx(a.NR,{onClick:()=>{window?.open("https://www.sheetxl.com","_blank")},style:{width:"24px",height:"24px",cursor:"pointer"}})})}),Tt=l.memo(l.forwardRef((e,o)=>{const{commands:r,workbook:t,logo:n=mn,mainElement:i,showFileMenu:s=!0,showAppearanceMenu:u=!0,...c}=e,{reference:d}=a.N0(),[p,{width:f}]=a.fc(),x=f<530,v=s?m.jsx(Lt,{commands:r,commandHook:{beforeExecute(){d?.closeAll()},onError(k,h,R){}}}):null,y=u?m.jsx(a.HR,{commands:r,commandHook:{beforeExecute(){d?.closeAll()},onError(k,h,R){}}}):null,b=l.useMemo(()=>({paddingLeft:k=>k.spacing(1),paddingRight:k=>k.spacing(1)}),[]),w=l.useRef(null);return m.jsx(a.Box,{ref:a.h5([w,p,o]),...c,children:a.DM({commands:r,renderCompact:x,workbook:t,selectWrapper:k=>m.jsxs(a.Box,{sx:{display:"flex",flex:"1",flexDirection:"row",alignItems:"stretch",gap:h=>h.spacing(1),paddingLeft:h=>h.spacing(1),paddingRight:h=>h.spacing(1)},children:[m.jsxs(a.Box,{sx:{display:"flex",flexDirection:"row",alignItems:"center",flex:"1 1 100%",gap:h=>h.spacing(.5)},children:[n,m.jsxs(a.Box,{sx:{display:"flex",flexDirection:"row",alignItems:"center",gap:h=>h.spacing(.25)},children:[v,k]})]}),m.jsx(a.Box,{sx:{display:"flex",flexDirection:"row",flex:"1 1 300%",overflow:"hidden",alignItems:"center",justifyContent:"center"},children:i}),m.jsx(a.Box,{sx:{display:"flex",alignItems:"center",justifyContent:"end",flex:x&&!y?"0 0 auto":"1 1 100%"},children:y})]}),selectProps:b,toolbarsProps:{Home:{sx:{}}}})})}));Tt.displayName="StandaloneWorkbookToolbar";const Dt=l.memo(l.forwardRef((e,o)=>{const{workbook:r,setWorkbook:t,refWorkbookTitle:n,titleWorkbook:i,setWorkbookTitle:s,titlePlaceHolder:u,children:c,undoManager:d,commands:p,importExportDisabled:f,themeModeOptions:x}=e,v=jt(),y=v?v.enqueueSnackbar:()=>{},b=v?v.closeSnackbar:()=>{},[w,k]=l.useState({isMounted:!1,label:null,starting:new Map,running:new Map}),h=l.useCallback(()=>{k(P=>({...P,isMounted:!0}))},[]),R=l.useCallback(()=>{k(P=>({...P,isMounted:!1}))},[]),E=a.OR(),F=a.LR(),L=a.AR(),q=l.useRef(new Set),_=l.useMemo(()=>{const P=(S,j)=>{if(j?.onceKey){if(q.current.has(j.onceKey))return;const T=new Set(q.current);T.add(j.onceKey),q.current=T}const A={variant:j?.type??a.z0.Info,anchorOrigin:{vertical:"top",horizontal:"center"},preventDuplicate:j?.preventDuplicate,persist:j?.persist??j?.type===a.z0.Error,action:T=>m.jsx(a.IconButton,{onClick:()=>b(T),children:m.jsx(Xt,{})})};j?.enqueueProps&&Object.assign(A,j.enqueueProps),S||console.log("message is 'null'",j),y(S??"Alert",A)};return{showMessage:P,showBusy:(S,j)=>{let A=null;const T=new Promise(U=>{A=U});return k(U=>{const B=new Map(U.starting);return B.set(T,A),{...U,label:S,starting:B}}),T},showWindow:(S,j,A)=>{const T={...j,onKeyDown:U=>{p?.dispatchToFocusedCommand(U),U.isDefaultPrevented()||U.isPropagationStopped()||j?.onKeyDown?.(U)}};return E(S,{sort:()=>Promise.resolve().then(()=>require("./DMZaCVvlvSX1mHkh.cjs")),numberFormat:()=>Promise.resolve().then(()=>require("./CXPgCPHgj83kZHZS.cjs")),hyperlink:()=>Promise.resolve().then(()=>require("./Bpv1T1XshdqAwoiB.cjs")),comments:()=>Promise.resolve().then(()=>require("./CO_eB4oyDC1un47h.cjs")),find:()=>Promise.resolve().then(()=>require("./DNfPCzNGwPUADDOT.cjs")),tableDetails:()=>Promise.resolve().then(()=>require("./BT_PeMxZAeqrhLnV.cjs")),tableNew:()=>Promise.resolve().then(()=>require("./FF67xyIMOWlaEe7x.cjs")),namedDetails:()=>Promise.resolve().then(()=>require("./BK91sl4LW8-xO31z.cjs"))}[S],T,A)},showOptions:F,showInputOptions:L,showError:S=>{let j,A=a.z0.Error,T="Unknown Error";typeof S=="string"?T=S:S instanceof Error&&(j=S,S.message&&(T=S.message)),S instanceof ue.PartialError&&(A=a.z0.Info),P(T,{type:A,enqueueProps:{error:j}})}}},[]),I=l.useCallback(()=>{},[]),H=(P=>{const{workbook:S,setWorkbook:j,importExportDisabled:A,workbookTitle:T="export",setWorkbookTitle:U,notifier:B,requestWorkbookTitle:J,themeModeOptions:z,undoManager:M,commands:O,onExecute:$}=P,Y=a.me(z?.onForceModeChange,[z?.onForceModeChange]),ae=a.me(z?.onForceLightGridChange,[z?.onForceLightGridChange]),ne=a.me(z?.onForceLightImagesChange,[z?.onForceLightImagesChange]),Ae=a.me(async(W=null,Z=null)=>{const g=[];let C,V=null,ee=null;if(typeof W=="string"?ee=W:V=W,C=V?W:await a.Jt.openFileDialog(ee??a.qR.getAllReadFormatTypeAsString().join(",")),!C)return null;const se={source:C,constructorOptions:Z,onWarning:ze=>{g.push(ze)}},xe=await a.qR.read(se,B);return g.length>0&&(B?.showMessage?.("Some elements were not able to be imported. See console for details."),console.warn(`Import warnings:
|
|
11
11
|
`+g.join(`
|
|
12
|
-
`))),xe},[$,B,S]),ke=a.me(async(W,Z,g)=>{if(!Z&&J){const C=await J("Enter Workbook name to "+(g.isDefault?"Save.":`Export as ${g.description}.`));return C!==null&&a.qR.writeFile(C,W,{formatType:g.key})}return a.qR.writeFile(Z,W,{formatType:g.key})},[B,S,J]),K=l.useCallback(()=>({contains:W=>!0,focus(){}}),[]),le=l.useMemo(()=>{const W=[];A||(a.qR.getWriteFormats().forEach(g=>{const C=g.isDefault,V={label:C?"Save Workbook":`Save Workbook as ${g.description}`,scopedLabels:{workbook:"Save",saveWorkbook:`as ${g.description}`},tags:g.tags,description:`Save the workbook to the desktop${C?"":` as ${g.description}`}.`};C&&(V.shortcut={key:"S",modifiers:[a.Re.Ctrl]},W.push(new a.Ie("saveWorkbookAs",K,{label:"Save Workbook As…",scopedLabels:{workbook:"Save as…",saveWorkbook:"as…"},shortcut:[{key:"S",modifiers:[a.Re.Shift,a.Re.Ctrl]},{key:"F12"}],description:"Save the workbook to the desktop with the provided name."},()=>{ke(S,null,g).catch(se=>{B?.showError?.(se)})})));const ee=C?"saveWorkbook":`saveWorkbookAs${g.key}`;W.push(new a.Ie(ee,K,V,se=>{ke(S,se??T,g).catch(xe=>{B?.showError?.(xe)})}))}),W.push(new a.Ie("openWorkbook",K,{label:"Open Workbook…",scopedLabels:{workbook:"Open…"},description:"Open a workbook from the desktop.",shortcut:{key:"O",modifiers:[a.Re.Ctrl]}},async(g=null)=>{const C={date1904:S.isDate1904(),...S.options};try{const V=await Ae(g,C);if(!V)return;const ee=V.title,se=V.workbook,xe=se.getSelectedSheet();if(V.formatType.mimeType==="text/csv"){const ze=S.findValidSheetName(ee);await S.doBatch(async()=>{const et=xe.getUsedRange();et?await S.getSheets().add({name:ze,autoSelect:!0}).getRange({colStart:0,rowStart:0,colEnd:0,rowEnd:0}).copyFrom(et):B?.showMessage("The file appears to be blank.")},`Import CSV '${ee}'`)}else S?.close(),U?.(ee),j(se)}catch(V){B?.showError?.(V)}})),W.push(new a.Ie("openWorkbookFromUrl",K,{label:"Open Workbook From Web",scopedLabels:{insert:"From Web",workbook:"From Web…"},description:"Open a workbook from the web."},async function(g){if(!g){const C=await B?.showInputOptions?.({title:"Open Workbook from the Web",description:"Enter the web address for the workbook to open.",inputLabel:"Address",initialValue:"https://www.sheetxl.com/examples/features-checklist.xlsx",inputProps:{style:{minWidth:"440px"}},options:["Open"]});if(C.option!=="Open")return;g=C.input}g&&console.log("openWorkbookFromUrl",g)})));let Z=[];return z&&(Z=[new a.Ie("themeMode",K,{label:"Light/Dark Mode",scopedLabels:{appearance:"Light/Dark Mode"},description:"Toggle the application styling between light and dark mode."}),new a.Ie("defaultThemeMode",K,{label:"Use System Light/Dark Mode",scopedLabels:{appearance:"Use System Default"},description:"Use the system settings to determine styling for light and dark mode."}),new a.Ie("forceLightGrid",K,{label:"Force Light Grid",description:"Force the grid to always render in light mode if dark mode is being used. This is ensures that the grid will render the colors as specified in another tools (for example Excel)."}),new a.Ie("forceLightImages",K,{label:"Force Light Images",description:"Force the images to always render in light mode if dark mode is being used. This is ensures that the images will render the colors as specified in another tools (for example Excel). This only has any effect if the grid is in dark mode."})]),[...W,...Z,new a.Tt("help",K,{label:"Show Help",description:"Provide Help.",shortcut:{key:"F1"}},()=>{}),new a.Tt("showKeyboardShortcuts",K,{label:"Keyboard Shortcuts",description:"Show keyboard shortcuts.",shortcut:{key:"/",modifiers:[a.Re.Ctrl]}},()=>{}),new a.Ie("gotoUrlGithub",K,{label:"Github",description:"Download examples, explore source code, and leave a star."},()=>{window?.open("https://github.com/sheetxl/sheetxl")}),new a.Ie("gotoUrlDiscord",K,{label:"Discord",description:"Join our community on discord."},()=>{window?.open("https://discord.gg/NTKdwUgK9p")}),new a.Ie("gotoUrlDocumentation",K,{label:"Documentation",description:"Read the documentation."},()=>{window?.open("https://www.sheetxl.com/docs")}),new a.Ie("gotoUrlIssue",K,{label:"Create Issue",description:"Create an issue to identify a bug or a feature request."},()=>{window?.open("https://github.com/sheetxl/sheetxl/issues")})]},[S,T,B,A,z,O,M]),X=l.useMemo(()=>{let W=null;return W=O?O.createChildGroup(K,"standaloneWorkbook",!1):new a.fs(K,"standaloneWorkbook"),W.addCommands(le,!0),W},[O,le]);a.gR({manager:M,commands:X,notifier:B});const{themeMode:be}=a.UR();l.useEffect(()=>{if(!z||!X)return;const W=z.forceMode==="dark"||!z.forceMode&&be==="dark";X.getCommand("themeMode").update({state:z.forceMode??null,label:W?"Dark Mode":"Light Mode",scopedLabels:{appearance:W?"Dark Mode":"Light Mode"}}).updateCallback(()=>{Y(W?a.WR.Light:a.WR.Dark)}),X.getCommand("defaultThemeMode").update({state:!z.forceMode}).updateCallback(()=>{Y(null)}),X.getCommand("forceLightGrid").update({state:z.forceLightGrid}).updateCallback(()=>{ae(!z.forceLightGrid)}),X.getCommand("forceLightImages").update({state:z.forceLightImages}).updateCallback(()=>{ne(!z.forceLightImages)})},[be,z,le]);const{showModal:qe}=a.Bu();return l.useEffect(()=>{const W=()=>new Promise((Z,g)=>{const C=l.lazy(()=>Promise.resolve().then(()=>require("./CrvRa0OxpqstjOap.cjs"))),V=qe(C,{title:"Shortcut Keys Reference",commands:X,onDone:()=>{V.hide()},TransitionProps:{onExited:()=>{Z(!0)}}})});X.getCommand("showKeyboardShortcuts").updateCallback(()=>W()),X.getCommand("help").updateCallback(()=>W())},[le,X]),X})({workbook:r,setWorkbook:t,importExportDisabled:f,workbookTitle:i,setWorkbookTitle:s,commands:p,requestWorkbookTitle:P=>new Promise(S=>{n.current?n.current.requestWorkbookTitle((j,A)=>{S(j)},{selectAll:!0,requestReason:P}):S(u)}),themeModeOptions:x,undoManager:d,notifier:_,onExecute:I});l.useEffect(()=>{w.starting.size<=0||!w.isMounted||k(P=>{const S=new Map(P.running);return P.starting.forEach((j,A)=>{const T=()=>{k(U=>{const B=new Map(U.running);return B.delete(A),{...U,running:B}})};S.set(A,T),j(T)}),{...P,starting:new Map,running:S}})},[w]);const[G,Q]=l.useState(null);l.useEffect(()=>{w.starting.size!==0||w.running.size!==0?Q(m.jsx(a.bs,{icon:m.jsx(a.RR,{sx:{transform:"scale(0.7)",marginLeft:"-6px"}}),panel:!0,label:w.label,onMount:h,onUnmount:R,sx:{position:"absolute",left:"0",top:"0",width:"100%",height:"100%",zIndex:"9999"}})):Q(null)},[w.starting,w.running]);const N=l.useMemo(()=>m.jsx(a.$R,{commands:H,disableHover:!0,sx:{padding:"0"},buttonProps:{sx:{maxHeight:"22px"}}}),[H]),te={notifier:_,commands:H};return r&&(te.statusBarProps={childrenEnd:N}),m.jsxs(m.Fragment,{children:[G,c?l.cloneElement(c,te):null]})}));Dt.displayName="SnackbarAndCommandsWrapper";const Ot=l.memo(l.forwardRef((e,o)=>{const{className:r,sx:t,style:n,onElementLoad:i,onError:s,undoManager:u,errorPanel:c=a.xx,onKeyDown:d,workbook:p,createWorkbookOptions:f,onWorkbookChange:x,logo:v,importExportDisabled:y=!1,themeModeOptions:b,autoFocus:w=!1,commands:k,title:h,onTitleChange:R,titleProps:E,...F}=e,L=l.useRef(null),q=a.me(x,[x]),_=a.me(R??E?.onTitleChange,[R??E?.onTitleChange]),I=E?.placeHolder??"Untitled",H=b?.forceMode,{themeMode:G,source:Q}=a.UR({mode:H}),N=l.useMemo(()=>({...b,light:a.DR(!1,ue.CommonUtils.deepMerge(b?.theme??{},b?.light??{})),dark:a.DR(!0,ue.CommonUtils.deepMerge(b?.theme??{},b?.dark??{}))}),[b]),te=G===a.WR.Dark,[P,S]=l.useState(null);l.useEffect(()=>{S(u??new ue.UndoManager)},[u]);const[j,A]=l.useState(null),[T,U]=l.useState(null),B=a.Xf();l.useLayoutEffect(()=>{if(!p||Object.keys(p).length===0&&!ue.CommonUtils.isPromiseLike(p)){const g={theme:B.getDefaultTheme(),...f};U(new ue.Workbook(g))}else U(p)},[p]),l.useLayoutEffect(()=>{if(T){if(T instanceof ue.Workbook)return A({workbook:T}),void(p!==T&&q?.(T));(async()=>{try{let g,C=await Promise.resolve(T);C&&C.source&&(C=await a.qR.read(C)),C.workbook?($(C.title),g=C.workbook):g=C,q?.(g),A({workbook:g})}catch(g){q?.(null),A({error:g})}})()}},[T]);const[J,z]=l.useState(null);l.useEffect(()=>{if(!P||!j)return;P.clear();const g=j?.workbook?.getTransactions();return g?g.addListener({onCommitEnd:C=>{C.getDescription()?P.addUndoOperation({description:C.getDescription(),undo:()=>(g.revert(C.getId()),J.source?.focus(),()=>{g.restore(C.getId()),J.source?.focus()})}):console.warn("commit has no description",C)}}):void 0},[P,j,J]);const M=a.me(g=>{g?P.setRepeatableOperation({description:g.label(),repeat:async()=>g.execute()}):P.setRepeatableOperation(null)},[P]),[O,$]=l.useState(h??E?.title??"");l.useEffect(()=>{$(h??E?.title??"")},[h??E?.title]),l.useEffect(()=>{_?.(O)},[O]);const[Y,ae]=l.useState(null),ne=l.useMemo(()=>{const g=()=>({contains:C=>!0,focus(){}});return k?k.createChildGroup(g,"application",!1):new a.fs(g,"application")},[k]),Ae=a.me(g=>{ae(g.source.getViewportElement()),z(g),ne.activate("sheet"),i?.(g)},[ne]);l.useEffect(()=>{J&&w&&J.source?.focus(typeof w=="object"?w:void 0)},[J]);const ke=l.useRef(null),K=l.useCallback(g=>{let C=null;return E?.hidden||(C=m.jsx(a.eR,{...E,style:{maxWidth:"100%",...E?.style},workbook:L.current,ref:ke,title:O,placeHolder:I,onTitleChange:V=>{$(V)}})),m.jsx(Tt,{...g,logo:v,mainElement:C,showFileMenu:!y,showAppearanceMenu:!!(N?.onForceLightGridChange||N?.onForceLightImagesChange||N?.onForceModeChange)})},[v,O,E,N,y,ne]);l.useEffect(()=>{const g=C=>C.preventDefault();return L.current?.addEventListener("wheel",g,{passive:!1}),()=>{L.current?.removeEventListener("wheel",g)}},[]);const le=l.useMemo(()=>m.jsx(a.bs,{transparentBackground:!0,sx:t,style:n}),[t,n]),X=l.useCallback(({error:g})=>(s?.(g),m.jsx(c,{sx:t,style:n,error:g??"Unable to display empty workbook."})),[t,n,s]),be=l.useMemo(()=>({...t,"& .SnackbarContainer-root":{position:"absolute !important"},"& .notistack-Snackbar":{minWidth:"unset"},"& .notistack-MuiContent *":{fontFamily:g=>g.typography.fontFamily},"& #notistack-snackbar":{maxWidth:"560px",whiteSpace:"pre-wrap"},"*":{userSelect:"none"}}),[t]),qe=a.h5([L,o]),W=l.useMemo(()=>{if(!j)return le;if(j.error||!j.workbook)return X({error:j.error});let g=null,C=null,V=!1;return N&&(g=te?N.dark:N.light,C=te&&!N.forceLightGrid?N.dark:N.light,V=N.forceLightImages),m.jsx(a.JM,{sx:be,style:n,tabIndex:0,autoFocus:!0,workbook:j.workbook,ref:qe,renderToolbar:K,onElementLoad:Ae,onRepeatCommandChange:M,onKeyDown:ee=>{d?.(ee)},gridTheme:C,headersTheme:g,forceLightImages:V,className:a.yo(r,"sheetxl-workbook"),onContextMenu:ee=>ee.preventDefault(),...F},"WorkbookElement")},[j,O,P,le,N,F,K,be]);let Z=m.jsx(Qt,{fallbackRender:X,children:m.jsx(pn,{maxSnack:3,domRoot:Y,anchorOrigin:{vertical:"bottom",horizontal:"right"},autoHideDuration:3500,onClose:(g,C,V)=>{L.current?.focus()},Components:{error:Rt},iconVariant:{success:m.jsx(a.SvgIcon,{style:{marginRight:"8px"},children:m.jsx("path",{d:"M20,12A8,8 0 0,1 12,20A8,8 0 0,1 4,12A8,8 0 0,1 12,4C12.76,4 13.5,4.11 14.2, 4.31L15.77,2.74C14.61,2.26 13.34,2 12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0, 0 22,12M7.91,10.08L6.5,11.5L11,16L21,6L19.59,4.58L11,13.17L7.91,10.08Z"})}),error:m.jsx(a.MR,{style:{marginRight:"8px"}})},children:m.jsx(a.IR,{children:m.jsx(Dt,{workbook:j?.workbook,setWorkbook:U,importExportDisabled:y,titlePlaceHolder:I,titleWorkbook:O,setWorkbookTitle:$,refWorkbookTitle:ke,commands:ne,undoManager:P,themeModeOptions:N,children:W})})})});return N&&(Z=m.jsxs(a.nk,{theme:te?N.dark:N.light,children:[N.cssBaseline?m.jsx(Gt,{}):null,Z]})),Z}));Ot.displayName="EagerStandaloneWorkbook";const fn=Object.freeze(Object.defineProperty({__proto__:null,default:Ot},Symbol.toStringTag,{value:"Module"})),hn=Object.freeze(Object.defineProperty({__proto__:null,E:fn,c:ie},Symbol.toStringTag,{value:"Module"}));exports.BRa_Zmk0947GsWKY=hn,exports.Collapse=Fe,exports.fe=ie;
|
|
12
|
+
`))),xe},[$,B,S]),ke=a.me(async(W,Z,g)=>{if(!Z&&J){const C=await J("Enter Workbook name to "+(g.isDefault?"Save.":`Export as ${g.description}.`));return C!==null&&a.qR.writeFile(C,W,{formatType:g.key})}return a.qR.writeFile(Z,W,{formatType:g.key})},[B,S,J]),K=l.useCallback(()=>({contains:W=>!0,focus(){}}),[]),le=l.useMemo(()=>{const W=[];A||(a.qR.getWriteFormats().forEach(g=>{const C=g.isDefault,V={label:C?"Save Workbook":`Save Workbook as ${g.description}`,scopedLabels:{workbook:"Save",saveWorkbook:`as ${g.description}`},tags:g.tags,description:`Save the workbook to the desktop${C?"":` as ${g.description}`}.`};C&&(V.shortcut={key:"S",modifiers:[a.Re.Ctrl]},W.push(new a.Ie("saveWorkbookAs",K,{label:"Save Workbook As…",scopedLabels:{workbook:"Save as…",saveWorkbook:"as…"},shortcut:[{key:"S",modifiers:[a.Re.Shift,a.Re.Ctrl]},{key:"F12"}],description:"Save the workbook to the desktop with the provided name."},()=>{ke(S,null,g).catch(se=>{B?.showError?.(se)})})));const ee=C?"saveWorkbook":`saveWorkbookAs${g.key}`;W.push(new a.Ie(ee,K,V,se=>{ke(S,se??T,g).catch(xe=>{B?.showError?.(xe)})}))}),W.push(new a.Ie("openWorkbook",K,{label:"Open Workbook…",scopedLabels:{workbook:"Open…"},description:"Open a workbook from the desktop.",shortcut:{key:"O",modifiers:[a.Re.Ctrl]}},async(g=null)=>{const C={date1904:S.isDate1904(),...S.options};try{const V=await Ae(g,C);if(!V)return;const ee=V.title,se=V.workbook,xe=se.getSelectedSheet();if(V.formatType.mimeType==="text/csv"){const ze=S.findValidSheetName(ee);await S.doBatch(async()=>{const et=xe.getUsedRange();et?await S.getSheets().add({name:ze,autoSelect:!0}).getRange({colStart:0,rowStart:0,colEnd:0,rowEnd:0}).copyFrom(et):B?.showMessage("The file appears to be blank.")},`Import CSV '${ee}'`)}else S?.close(),U?.(ee),j(se)}catch(V){B?.showError?.(V)}})),W.push(new a.Ie("openWorkbookFromUrl",K,{label:"Open Workbook From Web",scopedLabels:{insert:"From Web",workbook:"From Web…"},description:"Open a workbook from the web."},async function(g){if(!g){const C=await B?.showInputOptions?.({title:"Open Workbook from the Web",description:"Enter the web address for the workbook to open.",inputLabel:"Address",initialValue:"https://www.sheetxl.com/examples/features-checklist.xlsx",inputProps:{style:{minWidth:"440px"}},options:["Open"]});if(C.option!=="Open")return;g=C.input}g&&console.log("openWorkbookFromUrl",g)})));let Z=[];return z&&(Z=[new a.Ie("themeMode",K,{label:"Light/Dark Mode",scopedLabels:{appearance:"Light/Dark Mode"},description:"Toggle the application styling between light and dark mode."}),new a.Ie("defaultThemeMode",K,{label:"Use System Light/Dark Mode",scopedLabels:{appearance:"Use System Default"},description:"Use the system settings to determine styling for light and dark mode."}),new a.Ie("forceLightGrid",K,{label:"Force Light Grid",description:"Force the grid to always render in light mode if dark mode is being used. This is ensures that the grid will render the colors as specified in another tools (for example Excel)."}),new a.Ie("forceLightImages",K,{label:"Force Light Images",description:"Force the images to always render in light mode if dark mode is being used. This is ensures that the images will render the colors as specified in another tools (for example Excel). This only has any effect if the grid is in dark mode."})]),[...W,...Z,new a.Tt("help",K,{label:"Show Help",description:"Provide Help.",shortcut:{key:"F1"}},()=>{}),new a.Tt("showKeyboardShortcuts",K,{label:"Keyboard Shortcuts",description:"Show keyboard shortcuts.",shortcut:{key:"/",modifiers:[a.Re.Ctrl]}},()=>{}),new a.Ie("gotoUrlGithub",K,{label:"Github",description:"Download examples, explore source code, and leave a star."},()=>{window?.open("https://github.com/sheetxl/sheetxl")}),new a.Ie("gotoUrlDiscord",K,{label:"Discord",description:"Join our community on discord."},()=>{window?.open("https://discord.gg/NTKdwUgK9p")}),new a.Ie("gotoUrlDocumentation",K,{label:"Documentation",description:"Read the documentation."},()=>{window?.open("https://www.sheetxl.com/docs")}),new a.Ie("gotoUrlIssue",K,{label:"Create Issue",description:"Create an issue to identify a bug or a feature request."},()=>{window?.open("https://github.com/sheetxl/sheetxl/issues")})]},[S,T,B,A,z,O,M]),X=l.useMemo(()=>{let W=null;return W=O?O.createChildGroup(K,"standaloneWorkbook",!1):new a.fs(K,"standaloneWorkbook"),W.addCommands(le,!0),W},[O,le]);a.gR({manager:M,commands:X,notifier:B});const{themeMode:be}=a.UR();l.useEffect(()=>{if(!z||!X)return;const W=z.forceMode==="dark"||!z.forceMode&&be==="dark";X.getCommand("themeMode").update({state:z.forceMode??null,label:W?"Dark Mode":"Light Mode",scopedLabels:{appearance:W?"Dark Mode":"Light Mode"}}).updateCallback(()=>{Y(W?a.WR.Light:a.WR.Dark)}),X.getCommand("defaultThemeMode").update({state:!z.forceMode}).updateCallback(()=>{Y(null)}),X.getCommand("forceLightGrid").update({state:z.forceLightGrid}).updateCallback(()=>{ae(!z.forceLightGrid)}),X.getCommand("forceLightImages").update({state:z.forceLightImages}).updateCallback(()=>{ne(!z.forceLightImages)})},[be,z,le]);const{showModal:qe}=a.Bu();return l.useEffect(()=>{const W=()=>new Promise((Z,g)=>{const C=l.lazy(()=>Promise.resolve().then(()=>require("./CL1hFRnyn2F6XCp7.cjs"))),V=qe(C,{title:"Shortcut Keys Reference",commands:X,onDone:()=>{V.hide()},TransitionProps:{onExited:()=>{Z(!0)}}})});X.getCommand("showKeyboardShortcuts").updateCallback(()=>W()),X.getCommand("help").updateCallback(()=>W())},[le,X]),X})({workbook:r,setWorkbook:t,importExportDisabled:f,workbookTitle:i,setWorkbookTitle:s,commands:p,requestWorkbookTitle:P=>new Promise(S=>{n.current?n.current.requestWorkbookTitle((j,A)=>{S(j)},{selectAll:!0,requestReason:P}):S(u)}),themeModeOptions:x,undoManager:d,notifier:_,onExecute:I});l.useEffect(()=>{w.starting.size<=0||!w.isMounted||k(P=>{const S=new Map(P.running);return P.starting.forEach((j,A)=>{const T=()=>{k(U=>{const B=new Map(U.running);return B.delete(A),{...U,running:B}})};S.set(A,T),j(T)}),{...P,starting:new Map,running:S}})},[w]);const[G,Q]=l.useState(null);l.useEffect(()=>{w.starting.size!==0||w.running.size!==0?Q(m.jsx(a.bs,{icon:m.jsx(a.RR,{sx:{transform:"scale(0.7)",marginLeft:"-6px"}}),panel:!0,label:w.label,onMount:h,onUnmount:R,sx:{position:"absolute",left:"0",top:"0",width:"100%",height:"100%",zIndex:"9999"}})):Q(null)},[w.starting,w.running]);const N=l.useMemo(()=>m.jsx(a.$R,{commands:H,disableHover:!0,sx:{padding:"0"},buttonProps:{sx:{maxHeight:"22px"}}}),[H]),te={notifier:_,commands:H};return r&&(te.statusBarProps={childrenEnd:N}),m.jsxs(m.Fragment,{children:[G,c?l.cloneElement(c,te):null]})}));Dt.displayName="SnackbarAndCommandsWrapper";const Ot=l.memo(l.forwardRef((e,o)=>{const{className:r,sx:t,style:n,onElementLoad:i,onError:s,undoManager:u,errorPanel:c=a.xx,onKeyDown:d,workbook:p,createWorkbookOptions:f,onWorkbookChange:x,logo:v,importExportDisabled:y=!1,themeModeOptions:b,autoFocus:w=!1,commands:k,title:h,onTitleChange:R,titleProps:E,...F}=e,L=l.useRef(null),q=a.me(x,[x]),_=a.me(R??E?.onTitleChange,[R??E?.onTitleChange]),I=E?.placeHolder??"Untitled",H=b?.forceMode,{themeMode:G,source:Q}=a.UR({mode:H}),N=l.useMemo(()=>({...b,light:a.DR(!1,ue.CommonUtils.deepMerge(b?.theme??{},b?.light??{})),dark:a.DR(!0,ue.CommonUtils.deepMerge(b?.theme??{},b?.dark??{}))}),[b]),te=G===a.WR.Dark,[P,S]=l.useState(null);l.useEffect(()=>{S(u??new ue.UndoManager)},[u]);const[j,A]=l.useState(null),[T,U]=l.useState(null),B=a.Xf();l.useLayoutEffect(()=>{if(!p||Object.keys(p).length===0&&!ue.CommonUtils.isPromiseLike(p)){const g={theme:B.getDefaultTheme(),...f};U(new ue.Workbook(g))}else U(p)},[p]),l.useLayoutEffect(()=>{if(T){if(T instanceof ue.Workbook)return A({workbook:T}),void(p!==T&&q?.(T));(async()=>{try{let g,C=await Promise.resolve(T);C&&C.source&&(C=await a.qR.read(C)),C.workbook?($(C.title),g=C.workbook):g=C,q?.(g),A({workbook:g})}catch(g){q?.(null),A({error:g})}})()}},[T]);const[J,z]=l.useState(null);l.useEffect(()=>{if(!P||!j)return;P.clear();const g=j?.workbook?.getTransactions();return g?g.addListener({onCommitEnd:C=>{C.getDescription()?P.addUndoOperation({description:C.getDescription(),undo:()=>(g.revert(C.getId()),J.source?.focus(),()=>{g.restore(C.getId()),J.source?.focus()})}):console.warn("commit has no description",C)}}):void 0},[P,j,J]);const M=a.me(g=>{g?P.setRepeatableOperation({description:g.label(),repeat:async()=>g.execute()}):P.setRepeatableOperation(null)},[P]),[O,$]=l.useState(h??E?.title??"");l.useEffect(()=>{$(h??E?.title??"")},[h??E?.title]),l.useEffect(()=>{_?.(O)},[O]);const[Y,ae]=l.useState(null),ne=l.useMemo(()=>{const g=()=>({contains:C=>!0,focus(){}});return k?k.createChildGroup(g,"application",!1):new a.fs(g,"application")},[k]),Ae=a.me(g=>{ae(g.source.getViewportElement()),z(g),ne.activate("sheet"),i?.(g)},[ne]);l.useEffect(()=>{J&&w&&J.source?.focus(typeof w=="object"?w:void 0)},[J]);const ke=l.useRef(null),K=l.useCallback(g=>{let C=null;return E?.hidden||(C=m.jsx(a.eR,{...E,style:{maxWidth:"100%",...E?.style},workbook:L.current,ref:ke,title:O,placeHolder:I,onTitleChange:V=>{$(V)}})),m.jsx(Tt,{...g,logo:v,mainElement:C,showFileMenu:!y,showAppearanceMenu:!!(N?.onForceLightGridChange||N?.onForceLightImagesChange||N?.onForceModeChange)})},[v,O,E,N,y,ne]);l.useEffect(()=>{const g=C=>C.preventDefault();return L.current?.addEventListener("wheel",g,{passive:!1}),()=>{L.current?.removeEventListener("wheel",g)}},[]);const le=l.useMemo(()=>m.jsx(a.bs,{transparentBackground:!0,sx:t,style:n}),[t,n]),X=l.useCallback(({error:g})=>(s?.(g),m.jsx(c,{sx:t,style:n,error:g??"Unable to display empty workbook."})),[t,n,s]),be=l.useMemo(()=>({...t,"& .SnackbarContainer-root":{position:"absolute !important"},"& .notistack-Snackbar":{minWidth:"unset"},"& .notistack-MuiContent *":{fontFamily:g=>g.typography.fontFamily},"& #notistack-snackbar":{maxWidth:"560px",whiteSpace:"pre-wrap"},"*":{userSelect:"none"}}),[t]),qe=a.h5([L,o]),W=l.useMemo(()=>{if(!j)return le;if(j.error||!j.workbook)return X({error:j.error});let g=null,C=null,V=!1;return N&&(g=te?N.dark:N.light,C=te&&!N.forceLightGrid?N.dark:N.light,V=N.forceLightImages),m.jsx(a.JM,{sx:be,style:n,tabIndex:0,autoFocus:!0,workbook:j.workbook,ref:qe,renderToolbar:K,onElementLoad:Ae,onRepeatCommandChange:M,onKeyDown:ee=>{d?.(ee)},gridTheme:C,headersTheme:g,forceLightImages:V,className:a.yo(r,"sheetxl-workbook"),onContextMenu:ee=>ee.preventDefault(),...F},"WorkbookElement")},[j,O,P,le,N,F,K,be]);let Z=m.jsx(Qt,{fallbackRender:X,children:m.jsx(pn,{maxSnack:3,domRoot:Y,anchorOrigin:{vertical:"bottom",horizontal:"right"},autoHideDuration:3500,onClose:(g,C,V)=>{L.current?.focus()},Components:{error:Rt},iconVariant:{success:m.jsx(a.SvgIcon,{style:{marginRight:"8px"},children:m.jsx("path",{d:"M20,12A8,8 0 0,1 12,20A8,8 0 0,1 4,12A8,8 0 0,1 12,4C12.76,4 13.5,4.11 14.2, 4.31L15.77,2.74C14.61,2.26 13.34,2 12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0, 0 22,12M7.91,10.08L6.5,11.5L11,16L21,6L19.59,4.58L11,13.17L7.91,10.08Z"})}),error:m.jsx(a.MR,{style:{marginRight:"8px"}})},children:m.jsx(a.IR,{children:m.jsx(Dt,{workbook:j?.workbook,setWorkbook:U,importExportDisabled:y,titlePlaceHolder:I,titleWorkbook:O,setWorkbookTitle:$,refWorkbookTitle:ke,commands:ne,undoManager:P,themeModeOptions:N,children:W})})})});return N&&(Z=m.jsxs(a.nk,{theme:te?N.dark:N.light,children:[N.cssBaseline?m.jsx(Gt,{}):null,Z]})),Z}));Ot.displayName="EagerStandaloneWorkbook";const fn=Object.freeze(Object.defineProperty({__proto__:null,default:Ot},Symbol.toStringTag,{value:"Module"})),hn=Object.freeze(Object.defineProperty({__proto__:null,E:fn,c:ie},Symbol.toStringTag,{value:"Module"}));exports.Bg0b0l_wsfvMdieq=hn,exports.Collapse=Fe,exports.fe=ie;
|
package/browser/cjs/index.cjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";/**
|
|
2
|
-
* @license @sheetxl/studio-vanilla - SheetXL Studio - Vanilla entry point for integrating SheetXL UI. - v0.
|
|
2
|
+
* @license @sheetxl/studio-vanilla - SheetXL Studio - Vanilla entry point for integrating SheetXL UI. - v0.4.0
|
|
3
3
|
*
|
|
4
4
|
* (C) 2025-present SheetXL Inc. & Michael T. Ford
|
|
5
5
|
* License: The license can be found at https://www.sheetxl.com/license.
|
|
6
|
-
*/require("react"),require("react/jsx-runtime"),require("react-dom/client");const e=require("./
|
|
6
|
+
*/require("react"),require("react/jsx-runtime"),require("react-dom/client");const e=require("./CV3lVli7wB6pyrYD.cjs");module.exports=e.SheetXL;
|