@sheetxl/studio-mui 0.4.13 → 0.4.15
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/BNHQPLsVdLmkPgyG.cjs +6 -0
- package/browser/cjs/BUU_z9x81l1Qnv1t.cjs +6 -0
- package/browser/cjs/BX8hkPMsPd9PSv0Z.cjs +161 -0
- package/browser/cjs/BknKSPzyXctJohHb.cjs +6 -0
- package/browser/cjs/Blfxp7Ec3Yjx3gNU.cjs +6 -0
- package/browser/cjs/BqFEcpPZjpwULlZk.cjs +6 -0
- package/browser/cjs/C-pPuqiWtgMU4NgZ.cjs +15 -0
- package/browser/cjs/C9eqE9OnPkiI-5Zd.cjs +7 -0
- package/browser/cjs/CB6DGRkCA3BLDEFr.cjs +6 -0
- package/browser/cjs/CO4rZgb0ObTZh6NO.cjs +6 -0
- package/browser/cjs/CU900NraHPDHMGJt.cjs +18 -0
- package/browser/cjs/Cpo-h2pMpScosT7r.cjs +6 -0
- package/browser/cjs/Cq2L49XjSKiIAsND.cjs +11 -0
- package/browser/cjs/D9X3UXVH6b_NJFeo.cjs +12 -0
- package/browser/cjs/DZJO-_8PnMFRZMpg.cjs +6 -0
- package/browser/cjs/DmCCEKhedSOg163M.cjs +6 -0
- package/browser/cjs/DpZ5HlIMG95q2uIe.cjs +96 -0
- package/browser/cjs/DwLcsRl4-LumKl6l.cjs +42 -0
- package/browser/cjs/Dy2vYVhrEqTHdzfD.cjs +11 -0
- package/browser/cjs/Gj8MlEhOCg_o7idM.cjs +6 -0
- package/browser/cjs/IllnWqWVClWDW1ot.cjs +6 -0
- package/browser/cjs/J3xq71qTV9LqCUzu.cjs +145 -0
- package/browser/cjs/X9sJMKafafBPpNpK.cjs +16 -0
- package/browser/cjs/index.cjs +4 -10
- package/browser/cjs/klnhoS0cqBpCC5fo.cjs +7 -0
- package/browser/esm/BQNKKCtIvfOMph3T.mjs +2250 -0
- package/browser/esm/BiQfhG8JMHeWuT63.mjs +1672 -0
- package/browser/esm/Btyp6us1Vzz3ZfHk.mjs +13391 -0
- package/browser/esm/Bvr3QlWdnOSnskWL.mjs +392 -0
- package/browser/esm/CYpvNksOw1PyhLpA.mjs +52 -0
- package/browser/esm/CcZUaOkODU7h0onP.mjs +25 -0
- package/browser/esm/CnXUhdLB8blNUvSr.mjs +84 -0
- package/browser/esm/CwjVlrJJqEGZX6q2.mjs +52 -0
- package/browser/esm/D0v3VaJtA3LjHpWR.mjs +20816 -0
- package/browser/esm/D4DvAg7aaaWl0TPV.mjs +1467 -0
- package/browser/esm/DAZNeiMI9sOM-xd8.mjs +1366 -0
- package/browser/esm/DGUm6rEOgO8WrVtT.mjs +23 -0
- package/browser/esm/DGoy2q9hDB7kive6.mjs +44 -0
- package/browser/esm/DSCE3cCea5d5Ip-N.mjs +1703 -0
- package/browser/esm/DrTLuc1VQWQfDAej.mjs +59 -0
- package/browser/esm/DuzycndVID_eag8V.mjs +1352 -0
- package/browser/esm/FZoe4QJ2ecSD1pjB.mjs +43 -0
- package/browser/esm/HI5oLhcn8kfiky1k.mjs +3803 -0
- package/browser/esm/T2YlNqs-LGJBm08C.mjs +46 -0
- package/browser/esm/UCJVaz3qX1u53mgI.mjs +640 -0
- package/browser/esm/UWejV3W_nMwWqnxY.mjs +48 -0
- package/browser/esm/VpP_qw0lmgCaHdHR.mjs +153 -0
- package/browser/esm/YS19x3zzRUKQqXu_.mjs +2410 -0
- package/browser/esm/index.mjs +84 -8
- package/browser/esm/jqoS02EUPE2WEY1t.mjs +424 -0
- package/licenses/dependencies.txt +6 -6
- package/node/esm/{BO6cKQ_efCO2YTyW.mjs → 3htalFC0z5xbRnmH.mjs} +1 -1
- package/node/esm/{DKho7vhsoPr3NuMl.mjs → B-pzKiKMkbB9Es-9.mjs} +1 -1
- package/node/esm/{BZ8BYhQCAcmtqV_l.mjs → BFxzGj5sPFwrklFi.mjs} +3 -3
- package/node/esm/{DvKUmpzXvELOJbAq.mjs → BGYSS0lvjSMTtreq.mjs} +1 -1
- package/node/esm/{BxJ8RdpZW49RjtqB.mjs → BGZpuIQG7RsGY_HH.mjs} +1 -1
- package/node/esm/{BEWR_Oinb-P8gswu.mjs → BTnlaEz7yZqa7QHP.mjs} +1 -1
- package/node/esm/{DW7i1Qv4kcmwOTvD.mjs → BfUEFSGuAZXw2fvO.mjs} +1 -1
- package/node/esm/{BqcpB9wQAjq0QKR1.mjs → BiJ5CZBAxg4-QDHh.mjs} +1 -1
- package/node/esm/{nmVSg6Qpwj9V1oA0.mjs → Bnkt1wiWaLEq8xla.mjs} +1 -1
- package/node/esm/{-mcJjjdCwl8lh-eg.mjs → BwbOSLs2gcxOaV0i.mjs} +1 -1
- package/node/esm/{RpUFmc_WL9-PMYhx.mjs → CAWLE2N0nA-FjUkH.mjs} +1 -1
- package/node/esm/{uAAAbPd_k3kmgO5f.mjs → CSnI8PJEgxEQEj1B.mjs} +1 -1
- package/node/esm/{VnhwCsWDUmo5-K5N.mjs → CvYpf-Km1Rvg15q4.mjs} +1 -1
- package/node/esm/{BqsJ9biuGwjU2xgY.mjs → CxhzSvAqksnasp3g.mjs} +1 -1
- package/node/esm/{CdLN7JEivNllaQ6w.mjs → DCrdGvQ_vOB2o-ca.mjs} +1 -1
- package/node/esm/{CfO2Xok0ch8kylzr.mjs → DhGXQOOW9FBpgCqI.mjs} +1 -1
- package/node/esm/{CsPaYpANdd8Rpel-.mjs → DkhnVkboeZsdMJxH.mjs} +1 -1
- package/node/esm/{4WfRn0Og_yApP_Q8.mjs → DnMRqYWKDGXlNm42.mjs} +1 -1
- package/node/esm/{CQ1mTChRFSKFU2O1.mjs → DsS5U5rJ5tNVEGXs.mjs} +1 -1
- package/node/esm/{CcOchU9ZOmdG4JFr.mjs → DuyHq4Fs-_RQkwF_.mjs} +1 -1
- package/node/esm/{o-JVx3HFrRjVjKmi.mjs → FzVegyt0upYkLobF.mjs} +2 -2
- package/node/esm/{BPG7zfcXK20urqr_.mjs → imk332niB0MxWuGl.mjs} +5 -5
- package/node/esm/index.mjs +11 -11
- package/package.json +8 -8
- package/browser/cjs/34mwIxXhbXYv5xsc.cjs +0 -7
- package/browser/cjs/3OIgTi54FC0IBzyK.cjs +0 -7
- package/browser/cjs/B-Aq2h8aSDrc_0iZ.cjs +0 -7
- package/browser/cjs/BDhT8qcsUqUILki7.cjs +0 -7
- package/browser/cjs/BKJsMQHem8u-jMiR.cjs +0 -7
- package/browser/cjs/BO7LEbRChpLg-xKv.cjs +0 -7
- package/browser/cjs/BZR-qDCIYdiDtD-U.cjs +0 -7
- package/browser/cjs/BfE1_C2EpBrmB7bt.cjs +0 -7
- package/browser/cjs/Brij8vl9GntSQBer.cjs +0 -7
- package/browser/cjs/C61z_849Y2mg6eYL.cjs +0 -7
- package/browser/cjs/CaKjImRkCm3-QSAI.cjs +0 -7
- package/browser/cjs/Cw7iXqLfwZMRGb3J.cjs +0 -7
- package/browser/cjs/CwwItA5xvSx0QgDn.cjs +0 -7
- package/browser/cjs/DPTcPoZ3PiOOW7lp.cjs +0 -7
- package/browser/cjs/DhmN913n5MBAZsij.cjs +0 -7
- package/browser/cjs/DhoDW4ohnPkwiE_o.cjs +0 -7
- package/browser/cjs/Dj_PjsvImW3tjX0i.cjs +0 -7
- package/browser/cjs/Dl4WPIJFTvpCXOs3.cjs +0 -7
- package/browser/cjs/QCtfu4qn-ovJa_wL.cjs +0 -7
- package/browser/cjs/VQ4Cuzvkmtel1iE_.cjs +0 -7
- package/browser/cjs/VTMW1yjPzEJGyBmh.cjs +0 -7
- package/browser/cjs/hY59MepmKCIoN0hM.cjs +0 -7
- package/browser/cjs/pKp_fof7vGupYAM2.cjs +0 -7
- package/browser/cjs/t-9gaLqrOnGiw-3T.cjs +0 -7
- package/browser/esm/5U4XS5qxb3oJ33qK.mjs +0 -7
- package/browser/esm/BPMMuKIe5xb3-D8V.mjs +0 -7
- package/browser/esm/BXartMrqQuAXu0Qz.mjs +0 -7
- package/browser/esm/Bc8N72T3wtTApPEG.mjs +0 -7
- package/browser/esm/BjoQXBQuDry5Fgc_.mjs +0 -7
- package/browser/esm/BlUq84tk9v01SQgx.mjs +0 -7
- package/browser/esm/C5iuJTeAtknnUEIE.mjs +0 -7
- package/browser/esm/CN67iG3xuQhXAPad.mjs +0 -7
- package/browser/esm/CQgUOqCEwTc61uuT.mjs +0 -7
- package/browser/esm/Cq1DtQcbtmTtKOc4.mjs +0 -7
- package/browser/esm/Cqz35dsi-gZArS0S.mjs +0 -7
- package/browser/esm/D9wzPAaUYfW5yKFN.mjs +0 -7
- package/browser/esm/DRRzJ8Ep6_Tyd6ne.mjs +0 -7
- package/browser/esm/DSGJzNzS8OeMxUW1.mjs +0 -7
- package/browser/esm/DSIpyed_o2mrjd0r.mjs +0 -7
- package/browser/esm/DWgrVUwlK4kwFJn-.mjs +0 -7
- package/browser/esm/Dr6QLJSwckbF9K_u.mjs +0 -7
- package/browser/esm/DuSF-rjIFFvyCoo8.mjs +0 -7
- package/browser/esm/EiBc8VBUeU8VXEhw.mjs +0 -7
- package/browser/esm/R3CPiIXdp_rdc-Bw.mjs +0 -7
- package/browser/esm/eXqnYk6V-QI6pGI5.mjs +0 -7
- package/browser/esm/hdx26DrfopUuM4j1.mjs +0 -7
- package/browser/esm/oXfsh9SiDjQuu2ZE.mjs +0 -7
- package/browser/esm/zBIGDTI8z3bRbFxO.mjs +0 -7
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license @sheetxl/studio-mui - Studio - Spreadsheet UI built with SheetXL SDK using React & MUI. - v0.4.13
|
|
3
|
-
*
|
|
4
|
-
* (C) 2025-present SheetXL Inc. & Michael T. Ford
|
|
5
|
-
* License: The license can be found at https://www.sheetxl.com/license.
|
|
6
|
-
*/
|
|
7
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("@sheetxl/sdk"),e=require("./Brij8vl9GntSQBer.cjs"),s=":A-Z_a-zÀ-ÖØ-öø-˿Ͱ-ͽͿ-⁰-Ⰰ-、-豈-﷏ﷰ-�𐀀-",i=new RegExp(`^[${s}][-${s}.0-9·̀-ͯ‿-⁀]*$`,"u");function o(t){return t>=65&&t<=90||t>=97&&t<=122||58===t||95===t||8204===t||8205===t||t>=192&&t<=214||t>=216&&t<=246||t>=248&&t<=767||t>=880&&t<=893||t>=895&&t<=8191||t>=8304&&t<=8591||t>=11264&&t<=12271||t>=12289&&t<=55295||t>=63744&&t<=64975||t>=65008&&t<=65533||t>=65536&&t<=983039}const r="A-Z_a-zÀ-ÖØ-öø-˿Ͱ-ͽͿ--⁰-Ⰰ-、-豈-﷏ﷰ-�𐀀-",n=new RegExp(`^[${r}][-${r}.0-9·̀-ͯ‿-⁀]*$`,"u");function a(t){return t>=65&&t<=90||95===t||t>=97&&t<=122||t>=192&&t<=214||t>=216&&t<=246||t>=248&&t<=767||t>=880&&t<=893||t>=895&&t<=8191||t>=8204&&t<=8205||t>=8304&&t<=8591||t>=11264&&t<=12271||t>=12289&&t<=55295||t>=63744&&t<=64975||t>=65008&&t<=65533||t>=65536&&t<=983039}const l=function(t){return 32===t||10===t||13===t||9===t},c=function(t){return t>=32&&t<=55295||10===t||13===t||9===t||t>=57344&&t<=65533||t>=65536&&t<=1114111},h=o,u=function(t){return o(t)||t>=48&&t<=57||45===t||46===t||183===t||t>=768&&t<=879||t>=8255&&t<=8256},d=[32,10,13,9],p=i,g=function(t){return t>=1&&t<=55295||t>=57344&&t<=65533||t>=65536&&t<=1114111},f=a,m=function(t){return a(t)||45===t||46===t||t>=48&&t<=57||183===t||t>=768&&t<=879||t>=8255&&t<=8256},T=n,y="http://www.w3.org/XML/1998/namespace",b="http://www.w3.org/2000/xmlns/",x={__proto__:null,xml:y,xmlns:b},w={__proto__:null,amp:"&",gt:">",lt:"<",quot:'"',apos:"'"},v=-1,S=-2,C=13,k=33,A=10,E=60,D=61,P=62,I=63,O=93,V=t=>34===t||39===t,N=[34,39],L=[...N,91,P],R=[...N,E,O],$=[D,I,...d],F=[...d,P,38,E];function M(t,e,s){switch(e){case"xml":s!==y&&t.fail(`xml prefix must be bound to ${y}.`);break;case"xmlns":s!==b&&t.fail(`xmlns prefix must be bound to ${b}.`)}switch(s){case b:t.fail(""===e?`the default namespace may not be set to ${s}.`:`may not assign a prefix (even "xmlns") to the URI ${b}.`);break;case y:switch(e){case"xml":break;case"":t.fail(`the default namespace may not be set to ${s}.`);break;default:t.fail("may not assign the xml namespace to another prefix.")}}}const j=t=>T.test(t),H=t=>p.test(t),X={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 B{constructor(t){this.i=0,this.prevI=0,this.opt=t??{},this.fragmentOpt=!!this.opt.fragment;const e=this.xmlnsOpt=!!this.opt.xmlns;if(this.trackPosition=!1!==this.opt.position,this.fileName=this.opt.fileName,e){this.nameStartCheck=f,this.nameCheck=m,this.isName=j,this.processAttribs=this.processAttribsNS,this.pushAttrib=this.pushAttribNS,this.ns={__proto__:null,...x};const t=this.opt.additionalNamespaces;null!=t&&(function(t,e){for(const s of Object.keys(e))M(t,s,e[s])}(this,t),Object.assign(this.ns,t))}else this.nameStartCheck=h,this.nameCheck=u,this.isName=H,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?C:0,this.reportedTextBeforeRoot=this.reportedTextAfterRoot=this.closedRoot=this.sawRoot=t,this.xmlDeclPossible=!t,this.xmlDeclExpects=["version"],this.entityReturnState=void 0;let{defaultXMLVersion:e}=this.opt;if(void 0===e){if(!0===this.opt.forceXMLVersion)throw new Error("forceXMLVersion set but defaultXMLVersion is not set");e="1.0"}this.setXMLVersion(e),this.positionAtNewLine=0,this.doctype=!1,this._closed=!1,this.xmlDecl={version:void 0,encoding:void 0,standalone:void 0},this.line=1,this.column=0,this.ENTITIES=Object.create(w),this.readyHandler?.()}get position(){return this.chunkPosition+this.i}get columnIndex(){return this.position-this.positionAtNewLine}on(t,e){this[X[t]]=e}off(t){this[X[t]]=void 0}makeError(t){let e=this.fileName??"";return this.trackPosition&&(e.length>0&&(e+=":"),e+=`${this.line}:${this.column}`),e.length>0&&(e+=": "),new Error(e+t)}fail(t){const e=this.makeError(t),s=this.errorHandler;if(void 0===s)throw e;return s(e),this}write(t){if(this.closed)return this.fail("cannot write after close; assign an onready handler.");let e=!1;null===t?(e=!0,t=""):"object"==typeof t&&(t=t.toString()),void 0!==this.carriedFromPrevious&&(t=`${this.carriedFromPrevious}${t}`,this.carriedFromPrevious=void 0);let s=t.length;const i=t.charCodeAt(s-1);!e&&(13===i||i>=55296&&i<=56319)&&(this.carriedFromPrevious=t[s-1],s--,t=t.slice(0,s));const{stateTable:o}=this;for(this.chunk=t,this.i=0;this.i<s;)o[this.state].call(this);return this.chunkPosition+=s,e?this.end():this}close(){return this.write(null)}getCode10(){const t=this.chunk,e=this.i;if(this.prevI=e,this.i++,e>=t.length)return v;const s=t.charCodeAt(e);if(this.column++,s<55296){if(s>=32||9===s)return s;switch(s){case A:return this.line++,this.column=0,this.positionAtNewLine=this.position,A;case 13:return t.charCodeAt(e+1)===A&&(this.i=e+2),this.line++,this.column=0,this.positionAtNewLine=this.position,S;default:return this.fail("disallowed character."),s}}if(s>56319)return s>=57344&&s<=65533||this.fail("disallowed character."),s;const i=65536+1024*(s-55296)+(t.charCodeAt(e+1)-56320);return this.i=e+2,i>1114111&&this.fail("disallowed character."),i}getCode11(){const{chunk:t,i:e}=this;if(this.prevI=e,this.i=e+1,e>=t.length)return v;const s=t.charCodeAt(e);if(this.column++,s<55296){if(s>31&&s<127||s>159&&8232!==s||9===s)return s;switch(s){case A:return this.line++,this.column=0,this.positionAtNewLine=this.position,A;case 13:{const s=t.charCodeAt(e+1);s!==A&&133!==s||(this.i=e+2)}case 133:case 8232:return this.line++,this.column=0,this.positionAtNewLine=this.position,S;default:return this.fail("disallowed character."),s}}if(s>56319)return s>=57344&&s<=65533||this.fail("disallowed character."),s;const i=65536+1024*(s-55296)+(t.charCodeAt(e+1)-56320);return this.i=e+2,i>1114111&&this.fail("disallowed character."),i}getCodeNorm(){const t=this.getCode();return t===S?A:t}unget(){this.i=this.prevI,this.column--}captureTo(t){let{i:e}=this;const{chunk:s}=this;for(;;){const i=this.getCode(),o=i===S,r=o?A:i;if(r===v||t.includes(r))return this.text+=s.slice(e,this.prevI),r;o&&(this.text+=`${s.slice(e,this.prevI)}\n`,e=this.i)}}captureToChar(t){let{i:e}=this;const{chunk:s}=this;for(;;){let i=this.getCode();switch(i){case S:this.text+=`${s.slice(e,this.prevI)}\n`,e=this.i,i=A;break;case v:return this.text+=s.slice(e),!1}if(i===t)return this.text+=s.slice(e,this.prevI),!0}}captureNameChars(){const{chunk:t,i:e}=this;for(;;){const s=this.getCode();if(s===v)return this.name+=t.slice(e),v;if(!u(s))return this.name+=t.slice(e,this.prevI),s===S?A:s}}skipSpaces(){for(;;){const t=this.getCodeNorm();if(t===v||!l(t))return t}}setXMLVersion(t){this.currentXMLVersion=t,"1.0"===t?(this.isChar=c,this.getCode=this.getCode10):(this.isChar=g,this.getCode=this.getCode11)}sBegin(){65279===this.chunk.charCodeAt(0)&&(this.i++,this.column++),this.state=1}sBeginWhitespace(){const t=this.i,e=this.skipSpaces();switch(this.prevI!==t&&(this.xmlDeclPossible=!1),e){case E:if(this.state=15,0!==this.text.length)throw new Error("no-empty text at start");break;case v:break;default:this.unget(),this.state=C,this.xmlDeclPossible=!1}}sDoctype(){const t=this.captureTo(L);switch(t){case P:this.doctypeHandler?.(this.text),this.text="",this.state=C,this.doctype=!0;break;case v:break;default:this.text+=String.fromCodePoint(t),91===t?this.state=4:V(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(R);t!==v&&(this.text+=String.fromCodePoint(t),t===O?this.state=2:t===E?this.state=6:V(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 I:this.state=11;break;default:this.state=4}}sDTDOpenWakaBang(){const t=String.fromCodePoint(this.getCodeNorm()),e=this.openWakaBang+=t;this.text+=t,"-"!==e&&(this.state="--"===e?8:4,this.openWakaBang="")}sDTDComment(){this.captureToChar(45)&&(this.text+="-",this.state=9)}sDTDCommentEnding(){const t=this.getCodeNorm();this.text+=String.fromCodePoint(t),this.state=45===t?10:8}sDTDCommentEnded(){const t=this.getCodeNorm();this.text+=String.fromCodePoint(t),t===P?this.state=4:(this.fail("malformed comment."),this.state=8)}sDTDPI(){this.captureToChar(I)&&(this.text+="?",this.state=12)}sDTDPIEnding(){const t=this.getCodeNorm();this.text+=String.fromCodePoint(t),t===P&&(this.state=4)}sText(){0!==this.tags.length?this.handleTextInRoot():this.handleTextOutsideRoot()}sEntity(){let{i:t}=this;const{chunk:e}=this;t:for(;;)switch(this.getCode()){case S:this.entity+=`${e.slice(t,this.prevI)}\n`,t=this.i;break;case 59:{const{entityReturnState:s}=this,i=this.entity+e.slice(t,this.prevI);let o;this.state=s,""===i?(this.fail("empty entity name."),o="&;"):(o=this.parseEntity(i),this.entity=""),s===C&&void 0===this.textHandler||(this.text+=o);break t}case v:this.entity+=e.slice(t);break t}}sOpenWaka(){const t=this.getCode();if(h(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 I:this.state=23;break;default:this.fail("disallowed character in tag name"),this.state=C,this.xmlDeclPossible=!1}}sOpenWakaBang(){switch(this.openWakaBang+=String.fromCodePoint(this.getCodeNorm()),this.openWakaBang){case"[CDATA[":this.sawRoot||this.reportedTextBeforeRoot||(this.fail("text data outside of root node."),this.reportedTextBeforeRoot=!0),this.closedRoot&&!this.reportedTextAfterRoot&&(this.fail("text data outside of root node."),this.reportedTextAfterRoot=!0),this.state=20,this.openWakaBang="";break;case"--":this.state=17,this.openWakaBang="";break;case"DOCTYPE":this.state=2,(this.doctype||this.sawRoot)&&this.fail("inappropriately located doctype declaration."),this.openWakaBang="";break;default:this.openWakaBang.length>=7&&this.fail("incorrect syntax.")}}sComment(){this.captureToChar(45)&&(this.state=18)}sCommentEnding(){const t=this.getCodeNorm();45===t?(this.state=19,this.commentHandler?.(this.text),this.text=""):(this.text+=`-${String.fromCodePoint(t)}`,this.state=17)}sCommentEnded(){const t=this.getCodeNorm();t!==P?(this.fail("malformed comment."),this.text+=`--${String.fromCodePoint(t)}`,this.state=17):this.state=C}sCData(){this.captureToChar(O)&&(this.state=21)}sCDataEnding(){const t=this.getCodeNorm();t===O?this.state=22:(this.text+=`]${String.fromCodePoint(t)}`,this.state=20)}sCDataEnding2(){const t=this.getCodeNorm();switch(t){case P:this.cdataHandler?.(this.text),this.text="",this.state=C;break;case O: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===I||l(t)?(this.fail("processing instruction without a target."),this.state=t===I?26:25):(this.fail("disallowed character in processing instruction name."),this.piTarget+=String.fromCodePoint(t),this.state=24)}sPIRest(){const{chunk:t,i:e}=this;for(;;){const s=this.getCodeNorm();if(s===v)return void(this.piTarget+=t.slice(e));if(!this.nameCheck(s)){this.piTarget+=t.slice(e,this.prevI);const i=s===I;i||l(s)?"xml"===this.piTarget?(this.xmlDeclPossible||this.fail("an XML declaration must be at the start of the document."),this.state=i?k:27):this.state=i?26:25:(this.fail("disallowed character in processing instruction name."),this.piTarget+=String.fromCodePoint(s));break}}}sPIBody(){if(0===this.text.length){const t=this.getCodeNorm();t===I?this.state=26:l(t)||(this.text=String.fromCodePoint(t))}else this.captureToChar(I)&&(this.state=26)}sPIEnding(){const t=this.getCodeNorm();if(t===P){const{piTarget:t}=this;"xml"===t.toLowerCase()&&this.fail("the XML declaration must appear at the start of the document."),this.piHandler?.({target:t,body:this.text}),this.piTarget=this.text="",this.state=C}else t===I?this.text+="?":(this.text+=`?${String.fromCodePoint(t)}`,this.state=25);this.xmlDeclPossible=!1}sXMLDeclNameStart(){const t=this.skipSpaces();t!==I?t!==v&&(this.state=28,this.name=String.fromCodePoint(t)):this.state=k}sXMLDeclName(){const t=this.captureTo($);if(t===I)return this.state=k,this.name+=this.text,this.text="",void this.fail("XML declaration is incomplete.");if(l(t)||t===D){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===D?30:29}}sXMLDeclEq(){const t=this.getCodeNorm();if(t===I)return this.state=k,void this.fail("XML declaration is incomplete.");l(t)||(t!==D&&this.fail("value required."),this.state=30)}sXMLDeclValueStart(){const t=this.getCodeNorm();if(t===I)return this.state=k,void this.fail("XML declaration is incomplete.");l(t)||(V(t)?this.q=t:(this.fail("value must be quoted."),this.q=32),this.state=31)}sXMLDeclValue(){const t=this.captureTo([this.q,I]);if(t===I)return this.state=k,this.text="",void this.fail("XML declaration is incomplete.");if(t===v)return;const e=this.text;switch(this.text="",this.name){case"version":{this.xmlDeclExpects=["encoding","standalone"];const t=e;this.xmlDecl.version=t,/^1\.[0-9]+$/.test(t)?this.opt.forceXMLVersion||this.setXMLVersion(t):this.fail("version number must match /^1\\.[0-9]+$/.");break}case"encoding":/^[A-Za-z][A-Za-z0-9._-]*$/.test(e)||this.fail("encoding value must match /^[A-Za-z0-9][A-Za-z0-9._-]*$/."),this.xmlDeclExpects=["standalone"],this.xmlDecl.encoding=e;break;case"standalone":"yes"!==e&&"no"!==e&&this.fail('standalone value must match "yes" or "no".'),this.xmlDeclExpects=[],this.xmlDecl.standalone=e}this.name="",this.state=32}sXMLDeclSeparator(){const t=this.getCodeNorm();t!==I?(l(t)||(this.fail("whitespace required."),this.unget()),this.state=27):this.state=k}sXMLDeclEnding(){this.getCodeNorm()===P?("xml"!==this.piTarget?this.fail("processing instructions are not allowed before root."):"version"!==this.name&&this.xmlDeclExpects.includes("version")&&this.fail("XML declaration must contain a version."),this.xmldeclHandler?.(this.xmlDecl),this.name="",this.piTarget=this.text="",this.state=C):this.fail("The character ? is disallowed anywhere in XML declarations."),this.xmlDeclPossible=!1}sOpenTag(){const t=this.captureNameChars();if(t===v)return;const e=this.tag={name:this.name,attributes:Object.create(null)};switch(this.name="",this.xmlnsOpt&&(this.topNS=e.ns=Object.create(null)),this.openTagStartHandler?.(e),this.sawRoot=!0,!this.fragmentOpt&&this.closedRoot&&this.fail("documents may contain only one root."),t){case P:this.openTag();break;case 47:this.state=35;break;default:l(t)||this.fail("disallowed character in tag name."),this.state=36}}sOpenTagSlash(){this.getCode()===P?this.openSelfClosingTag():(this.fail("forward-slash in opening tag not followed by >."),this.state=36)}sAttrib(){const t=this.skipSpaces();t!==v&&(h(t)?(this.unget(),this.state=37):t===P?this.openTag():47===t?this.state=35:this.fail("disallowed character in attribute name."))}sAttribName(){const t=this.captureNameChars();t===D?this.state=39:l(t)?this.state=38:t===P?(this.fail("attribute without value."),this.pushAttrib(this.name,this.name),this.name=this.text="",this.openTag()):t!==v&&this.fail("disallowed character in attribute name.")}sAttribNameSawWhite(){const t=this.skipSpaces();switch(t){case v:return;case D:this.state=39;break;default:this.fail("attribute without value."),this.text="",this.name="",t===P?this.openTag():h(t)?(this.unget(),this.state=37):(this.fail("disallowed character in attribute name."),this.state=36)}}sAttribValue(){const t=this.getCodeNorm();V(t)?(this.q=t,this.state=40):l(t)||(this.fail("unquoted attribute value."),this.state=42,this.unget())}sAttribValueQuoted(){const{q:t,chunk:e}=this;let{i:s}=this;for(;;)switch(this.getCode()){case t:return this.pushAttrib(this.name,this.text+e.slice(s,this.prevI)),this.name=this.text="",this.q=null,void(this.state=41);case 38:return this.text+=e.slice(s,this.prevI),this.state=14,void(this.entityReturnState=40);case A:case S:case 9:this.text+=`${e.slice(s,this.prevI)} `,s=this.i;break;case E:return this.text+=e.slice(s,this.prevI),void this.fail("disallowed character.");case v:return void(this.text+=e.slice(s))}}sAttribValueClosed(){const t=this.getCodeNorm();l(t)?this.state=36:t===P?this.openTag():47===t?this.state=35:h(t)?(this.fail("no whitespace between attributes."),this.unget(),this.state=37):this.fail("disallowed character in attribute name.")}sAttribValueUnquoted(){const t=this.captureTo(F);switch(t){case 38:this.state=14,this.entityReturnState=42;break;case E:this.fail("disallowed character.");break;case v: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===P?this.openTag():this.state=36}}sCloseTag(){const t=this.captureNameChars();t===P?this.closeTag():l(t)?this.state=44:t!==v&&this.fail("disallowed character in closing tag.")}sCloseTagSawWhite(){switch(this.skipSpaces()){case P:this.closeTag();break;case v:break;default:this.fail("disallowed character in closing tag.")}}handleTextInRoot(){let{i:t,forbiddenState:e}=this;const{chunk:s,textHandler:i}=this;t:for(;;)switch(this.getCode()){case E:if(this.state=15,void 0!==i){const{text:e}=this,o=s.slice(t,this.prevI);0!==e.length?(i(e+o),this.text=""):0!==o.length&&i(o)}e=0;break t;case 38:this.state=14,this.entityReturnState=C,void 0!==i&&(this.text+=s.slice(t,this.prevI)),e=0;break t;case O:switch(e){case 0:e=1;break;case 1:e=2;break;case 2:break;default:throw new Error("impossible state")}break;case P:2===e&&this.fail('the string "]]>" is disallowed in char data.'),e=0;break;case S:void 0!==i&&(this.text+=`${s.slice(t,this.prevI)}\n`),t=this.i,e=0;break;case v:void 0!==i&&(this.text+=s.slice(t));break t;default:e=0}this.forbiddenState=e}handleTextOutsideRoot(){let{i:t}=this;const{chunk:e,textHandler:s}=this;let i=!1;t:for(;;){const o=this.getCode();switch(o){case E:if(this.state=15,void 0!==s){const{text:i}=this,o=e.slice(t,this.prevI);0!==i.length?(s(i+o),this.text=""):0!==o.length&&s(o)}break t;case 38:this.state=14,this.entityReturnState=C,void 0!==s&&(this.text+=e.slice(t,this.prevI)),i=!0;break t;case S:void 0!==s&&(this.text+=`${e.slice(t,this.prevI)}\n`),t=this.i;break;case v:void 0!==s&&(this.text+=e.slice(t));break t;default:l(o)||(i=!0)}}i&&(this.sawRoot||this.reportedTextBeforeRoot||(this.fail("text data outside of root node."),this.reportedTextBeforeRoot=!0),this.closedRoot&&!this.reportedTextAfterRoot&&(this.fail("text data outside of root node."),this.reportedTextAfterRoot=!0))}pushAttribNS(t,e){const{prefix:s,local:i}=this.qname(t),o={name:t,prefix:s,local:i,value:e};if(this.attribList.push(o),this.attributeHandler?.(o),"xmlns"===s){const t=e.trim();"1.0"===this.currentXMLVersion&&""===t&&this.fail("invalid attempt to undefine prefix in XML 1.0"),this.topNS[i]=t,M(this,i,t)}else if("xmlns"===t){const t=e.trim();this.topNS[""]=t,M(this,"",t)}}pushAttribPlain(t,e){const s={name:t,value:e};this.attribList.push(s),this.attributeHandler?.(s)}end(){this.sawRoot||this.fail("document must contain a root element.");const{tags:t}=this;for(;t.length>0;){const e=t.pop();this.fail(`unclosed tag: ${e.name}`)}0!==this.state&&this.state!==C&&this.fail("unexpected end.");const{text:e}=this;return 0!==e.length&&(this.textHandler?.(e),this.text=""),this._closed=!0,this.endHandler?.(),this._init(),this}resolve(t){let e=this.topNS[t];if(void 0!==e)return e;const{tags:s}=this;for(let i=s.length-1;i>=0;i--)if(e=s[i].ns[t],void 0!==e)return e;return e=this.ns[t],void 0!==e?e:this.opt.resolvePrefix?.(t)}qname(t){const e=t.indexOf(":");if(-1===e)return{prefix:"",local:t};const s=t.slice(e+1),i=t.slice(0,e);return(""===i||""===s||s.includes(":"))&&this.fail(`malformed name: ${t}.`),{prefix:i,local:s}}processAttribsNS(){const{attribList:t}=this,e=this.tag;{const{prefix:t,local:s}=this.qname(e.name);e.prefix=t,e.local=s;const i=e.uri=this.resolve(t)??"";""!==t&&("xmlns"===t&&this.fail('tags may not have "xmlns" as prefix.'),""===i&&(this.fail(`unbound namespace prefix: ${JSON.stringify(t)}.`),e.uri=t))}if(0===t.length)return;const{attributes:s}=e,i=new Set;for(const e of t){const{name:t,prefix:o,local:r}=e;let n,a;""===o?(n="xmlns"===t?b:"",a=t):(n=this.resolve(o),void 0===n&&(this.fail(`unbound namespace prefix: ${JSON.stringify(o)}.`),n=o),a=`{${n}}${r}`),i.has(a)&&this.fail(`duplicate attribute: ${a}.`),i.add(a),e.uri=n,s[t]=e}this.attribList=[]}processAttribsPlain(){const{attribList:t}=this,e=this.tag.attributes;for(const{name:s,value:i}of t)void 0!==e[s]&&this.fail(`duplicate attribute: ${s}.`),e[s]=i;this.attribList=[]}openTag(){this.processAttribs();const{tags:t}=this,e=this.tag;e.isSelfClosing=!1,this.openTagHandler?.(e),t.push(e),this.state=C,this.name=""}openSelfClosingTag(){this.processAttribs();const{tags:t}=this,e=this.tag;e.isSelfClosing=!0,this.openTagHandler?.(e),this.closeTagHandler?.(e),null===(this.tag=t[t.length-1]??null)&&(this.closedRoot=!0),this.state=C,this.name=""}closeTag(){const{tags:t,name:e}=this;if(this.state=C,this.name="",""===e)return this.fail("weird empty close tag."),void(this.text+="</>");const s=this.closeTagHandler;let i=t.length;for(;i-- >0;){const i=this.tag=t.pop();if(this.topNS=i.ns,s?.(i),i.name===e)break;this.fail("unexpected close tag.")}0===i?this.closedRoot=!0:i<0&&(this.fail(`unmatched closing tag: ${e}.`),this.text+=`</${e}>`)}parseEntity(t){if("#"!==t[0]){const e=this.ENTITIES[t];return void 0!==e?e:(this.fail(this.isName(t)?"undefined entity.":"disallowed character in entity name."),`&${t};`)}let e=NaN;return"x"===t[1]&&/^#x[0-9a-f]+$/i.test(t)?e=parseInt(t.slice(2),16):/^#[0-9]+$/.test(t)&&(e=parseInt(t.slice(1),10)),this.isChar(e)?String.fromCodePoint(e):(this.fail("malformed character entity."),`&${t};`)}}var W,q;(q=W||(W={})).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"},q.parseStream=async(t,e,s)=>{const i=new B({position:!1,...s});let o;if(e.onOpenTagStart&&i.on(q.Events.OpenTagStart,e.onOpenTagStart),e.onOpenTag&&i.on(q.Events.OpenTag,e.onOpenTag),e.onCloseTag&&i.on(q.Events.CloseTag,e.onCloseTag),e.onAttribute&&i.on(q.Events.Attribute,e.onAttribute),e.onText&&i.on(q.Events.Text,e.onText),e.onError&&i.on(q.Events.Error,e.onError),e.onEnd){e.onEnd;const t=()=>{o=e.onEnd()};i.on(q.Events.End,t)}for(;;){const{value:e,done:s}=await t.read();if(s)break;i.write(e)}return i.close(),o};const _=t=>!0===t||"1"===t||"on"===t||"true"===t||!1!==t&&"0"!==t&&"off"!==t&&"false"!==t&&null,U=t=>{const e=parseInt(t);return isNaN(e)?null:e},z=t=>{const e=parseFloat(t);return isNaN(e)?null:e},G=null;class Z{constructor(){this._registeredVisitors=new Map}registerVisitor(t){this._registeredVisitors.set(t.from,t)}createEventHandler(t,e,s){const i=this._registeredVisitors,o=[];let r=null,n=null,a=null,l=null;const c=[],h={key:null,source:t};let u=null,d=!1;const p=(t,e)=>{let s=a.attributes[t];if(e)if(Array.isArray(e))for(let t=0;t<e.length;t++){if(null==s)return;if(s=e[t](s),null==s)return}else{if(null==s)return;if(s=e(s),null==s)return}return s},g={getSource:()=>u.source,setSource:t=>{u.source=t},setKey:t=>{u.key=t},getFrom:()=>a,getAttribute:(t,e)=>p(t,e)??null,hasAttribute:t=>null!==g.getAttribute(t),getParent:()=>c[c.length-2].source,getPath:()=>{const t=[];for(let e=0;e<o.length;e++)t.push(o[e].local);return t.join("\\")},parseAttribute:p,copyToObject:(t,e,s,i)=>{const o=p(i??e,s);void 0!==o&&(t[e]=o)},copyTo:(t,e,s)=>{const i=p(s??t,e);void 0!==i&&(u.source[t]=i)},warn:t=>{s?s?.(t):console.warn(t)}};return{onOpenTag:t=>{let e=t.name;const s=e.indexOf(":");-1!==s&&(e=e.slice(s+1));const p=i.get(e);if(r={local:e,visitor:p,tag:t,destination:null},d)return o.push(r),n=e,void(a=t);l=r?.visitor??null,p&&(u=0===o.length?h:null!==l?.to?{key:null,source:{}}:null,r.destination=u,u&&c.push(u)),o.push(r),n=e,a=t,d=null===l?.to,l?.openTag?.(g)},onCloseTag:t=>{let e=t.name;const i=e.indexOf(":");if(-1!==i&&(e=e.slice(i+1)),e!==n)throw new Error(`mismatch open/close tag: '${e}'/'${n}'`);d||l?.closeTag?.(g);const p=o.pop()??null;r=o[o.length-1]??null;const f=p?.destination;if(f){c.pop(),u=c[c.length-1]??h;const t=p.visitor;t&&t.to&&void 0!==f.source&&(Array.isArray(t.to)?u.source.push?u.source.push(f.source):s?.(`Unable to parse array for ${t.from} at ${g.getPath()}`):f.key?u.source[f.key]=f.source:"string"==typeof t.to&&(u.source[t.to]=f.source))}n=r?.local??null,a=r?.tag??null,l=r?.visitor??null,d=!r?.destination},onText:t=>{l?.text?.(t,g)},onEnd:e}}}const J=(t,e,s,i=null)=>{if(!t)return null;let o=t;o.startsWith("/")&&(o=o.substring(1));let r=i?.parsedRefs?.get(t);if(void 0!==r)return r;const n=e(o);if(!n)return null;let a=n.content;try{s&&(a=s(a))}catch(t){console.warn(t)}return i?.parsedRefs?.set(t,a),a},Q=(t,e,s,i,o=null)=>{if(!t)return null;let r=t;r.startsWith("/")&&(r=r.substring(1));let n=o?.parsedRefs?.get(t);if(void 0!==n)return n;const a=e(r);if(!a)return null;const l=a.content;try{const e=(new TextDecoder).decode(l),r=s.parseFromString(e,"text/xml"),n=i.convert(r,t,o);return o?.parsedRefs?.set(t,n),n}catch(t){console.warn(t)}return null},K=(t,e,s,i,o=null)=>{const r=new Map;let n=e.Directory[t];const a=n?n.length:0;for(let t=0;t<a;t++){const a=n[t];if(!a)continue;let l=a;l.startsWith("/")&&(l=l.substring(1));const c=Q(l,t=>e.files[t],s,i,o);r.set(l,c)}return r},Y=["lt1","dk1","lt2","dk2","accent1","accent2","accent3","accent4","accent5","accent6","hlink","folHlink"],tt=(e,s="dk1")=>{let i;const o=e("auto");void 0===o||"1"!==o&&"true"!==o||(i=s);const r=e("indexed");r&&(i=`index${r}`);const n=e("rgb");n&&(i=n.toLowerCase(),8!==n.length||n.startsWith("FF")||(i="FF"+n.substring(2,n.length)));const a=e("theme");a&&(i=Y[a]);let l=e("tint");if(l&&(i+=` ${t.IColor.AdjustmentType.ETint} ${parseFloat(l)}`),i)return i},et=t=>t?t.replace(/^\{([\s\S]+)\}$/,"$1"):t,st=t=>"true"===t||"1"===t;class it{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 ot=(t,e,s)=>{if(t[0].value[0]===t[1].value[0])return e},rt={colStart:0,colEnd:0,rowStart:0,rowEnd:0},nt=Object.freeze(Object.defineProperty({__proto__:null,fromBufferXLSX:async(e,s)=>{const{password:i,onWarning:o,createWorkbookOptions:r={},...n}=s??{},a=Promise.resolve().then(()=>require("./BKJsMQHem8u-jMiR.cjs")),l=Promise.resolve().then(()=>require("./Cw7iXqLfwZMRGb3J.cjs"));let c=null;try{c=new DOMParser}catch(e){}let h=null;c||(h=Promise.resolve().then(()=>require("./BDhT8qcsUqUILki7.cjs")).then(t=>t.i));let u=null,d=null,p=null;try{const t=await Promise.all([a,l,h]);u=t[0],d=t[1],p=t[2]}catch(e){throw new Error("Unable to load XLSX parser.",{cause:e})}try{const s=u.read(e,{type:"array",sheets:[],cellStyles:!1,bookFiles:!0});if(!s.Directory)throw new Error("Unable to parse as an Excel document. Try to save as '.xlsx' and try again.");s.Directory.richstructure=["/xl/richData/rdrichvaluestructure.xml"],s.Directory.richdata=["/xl/richData/rdrichvalue.xml"];const i=new d.FromOOXMLConverter,n=c??new p.DOMParser,a=r?.resources??new t.ResourceCollection,l=a.beginPersist(),h={},g=new Set,f=new Map;f.set("richTypes",[]);const m=new Map,T=[],y=t=>s.files[t],b=(t,e)=>{const s=t.lastIndexOf("/"),o=t.substring(0,s+1)+"_rels/"+t.substring(s+1,t.length)+".rels";let r=e.get(o);return r||(r=((t,e,s,i,o=null)=>{if(!t)return null;const r=Q(t,e,s,i,o);if(!r)return null;const n=new Map,a=Object.keys(r),l=a.length;for(let t=0;t<l;t++){const e=a[t],s=r[e];n.set(e,s)}return n})(o,y,n,i,w),e.set(o,r)),r},x=(e,s,r,c=m)=>{let u=b(s,c).get(e),d=u?.target;if(!d)return null;if("External"===u.targetMode)return u.target;const p=s.lastIndexOf("/"),v=s.substring(0,p+1);d.startsWith("/")||(d=v+d),d=(t=>{const e=t.split(/\/+/),s=e.reduce((t,e,s)=>("."===e?t.splice(s,1):".."===e&&t.splice(s-1,2),t),e);return s.join("/")})(d);const S=i?.getVisitorParamsState().get("dxfs");let C=c.get(d);if(!C){const e="http://schemas.openxmlformats.org/officeDocument/2006/relationships/worksheet";if(u.type===e){const e={};C=e;const s=async()=>{const s=((e,s,i,o,r,n,a)=>{const l=new Z,c=new t.Tuple.TransposedBuilder;let h=null;l.registerVisitor({from:"autoFilter",to:"filter",openTag:t=>{t.copyTo("ref",G)}}),l.registerVisitor({from:"conditionalFormatting",to:{},openTag:t=>{const e=t.getParent();e.conditionals||(e.conditionals=[]),e.conditionals.push(t.getSource());const s=t.getAttribute("sqref");s&&(t.getSource().ref=s.split(" ").join(",")),t.copyTo("pivot",_)},closeTag:t=>{const e=t.getSource();if(e.rule){const t=Object.keys(e.rule);for(let s=0;s<t.length;s++){const i=t[s];"rule"!==i&&(e[i]=e.rule[i])}}delete e.rule}}),l.registerVisitor({from:"cfRule",to:"rule",openTag:t=>{const e=t.getParent();t.copyToObject(e,"type",G),t.copyToObject(e,"priority",U),t.copyToObject(e,"stopIfTrue",_);const s=t.getAttribute("dxfId",U);if(null!==s){let i=o?.get(s);i||(n?.(`Unable to load conditional color. Invalid dxfI: '${s}' at '${t.getPath()}'.`),i={}),e.style=i}t.copyToObject(e,"aboveAverage",_),t.copyToObject(e,"equalAverage",_),t.copyToObject(e,"stdDev",U),t.copyToObject(e,"bottom",_),t.copyToObject(e,"percent",_),t.copyToObject(e,"rank",U),t.copyToObject(e,"operator",G),t.copyToObject(e,"text",G),t.copyToObject(e,"timePeriod",G)}}),l.registerVisitor({from:"colorScale",to:"colorScale"}),l.registerVisitor({from:"dataBar",to:"dataBar",openTag:t=>{t.copyTo("maxLength",U),t.copyTo("minLength",U),t.copyTo("showValue",_)}}),l.registerVisitor({from:"iconSet",to:"iconSet",openTag:t=>{t.copyTo("iconSet",G),t.copyTo("reverse",_),t.copyTo("showValue",_)}}),l.registerVisitor({from:"formula",to:null,text:(t,e)=>{const s=e.getParent();let i=s.formulas;i||(i=[],s.formulas=i),i.push(t)}}),l.registerVisitor({from:"cfvo",to:{},openTag:t=>{const e=t.getParent();e.conditions||(e.conditions=[]),e.conditions.push(t.getSource()),t.copyTo("type",G),t.copyTo("value",z,"val"),t.copyTo("gte",_)}}),l.registerVisitor({from:"color",to:{},openTag:t=>{const e=t.getParent();e.colors||(e.colors=[]);const s=tt(e=>t.getAttribute(e));e.colors.push(s)}}),l.registerVisitor({from:"filterColumn",to:"filterColumn",openTag:t=>{const e=t.getParent();e.fields||(e.fields=[]),e.fields.push(t.getSource()),t.copyTo("offset",U,"colId"),t.copyTo("hiddenButton",_),t.copyTo("showButton",_)}}),l.registerVisitor({from:"colorFilter",to:"colorFilter",openTag:e=>{const s=e.getParent();s.criteria||(s.criteria=[]),s.criteria.push(e.getSource()),e.getSource().type=t.IAutoFilter.Type.Color,e.copyTo("cellColor",_),e.copyTo("styleId",U,"dxfId")}}),l.registerVisitor({from:"dynamicFilter",to:"dynamicFilter",openTag:e=>{const s=e.getParent();s.criteria||(s.criteria=[]),s.criteria.push(e.getSource()),e.getSource().type=t.IAutoFilter.Type.Dynamic,e.copyTo("dynamicType",G,"type"),e.copyTo("val",z),e.copyTo("maxVal",z,"maxVal")}}),l.registerVisitor({from:"iconFilter",to:"iconFilter",openTag:e=>{const s=e.getParent();s.criteria||(s.criteria=[]),s.criteria.push(e.getSource()),e.getSource().type=t.IAutoFilter.Type.Icon,e.copyTo("iconId",U),e.copyTo("iconSet",G)}}),l.registerVisitor({from:"top10",to:"top10",openTag:e=>{const s=e.getParent();s.criteria||(s.criteria=[]),s.criteria.push(e.getSource()),e.getSource().type=t.IAutoFilter.Type.Top10,e.copyTo("filterVal",z),e.copyTo("percent",_),e.copyTo("top",_),e.copyTo("val",z)}}),l.registerVisitor({from:"filters",to:"filters",openTag:e=>{const s=e.getParent();s.criteria||(s.criteria=[]),s.criteria.push(e.getSource()),e.getSource().type=t.IAutoFilter.Type.Items,e.copyTo("blank",_),e.copyTo("calendarType",G)}}),l.registerVisitor({from:"dateGroupItem",to:"dateGroupItem",openTag:t=>{const e=t.getParent();e.dateGroups||(e.dateGroups=[]),e.dateGroups.push(t.getSource()),t.copyTo("group",G,"dateTimeGrouping"),t.copyTo("day",U),t.copyTo("hour",U),t.copyTo("minute",U),t.copyTo("month",U),t.copyTo("second",U),t.copyTo("year",U)}}),l.registerVisitor({from:"filter",to:"filter",openTag:t=>{const e=t.getParent();e.items||(e.items=[]),e.items.push(t.getAttribute("val",z))}}),l.registerVisitor({from:"customFilters",to:"customFilters",openTag:e=>{const s=e.getParent();s.criteria||(s.criteria=[]),s.criteria.push(e.getSource()),e.getSource().type=t.IAutoFilter.Type.Custom,e.copyTo("and",_)}}),l.registerVisitor({from:"customFilter",to:"customFilter",openTag:t=>{const e=t.getParent();e.filters||(e.filters=[]),e.filters.push(t.getSource()),t.copyTo("operator",G),t.copyTo("value",z,"val")}}),l.registerVisitor({from:"sortState",to:"sort",openTag:t=>{t.copyTo("ref",G)}}),l.registerVisitor({from:"sortCondition",to:"sortCondition",openTag:e=>{const s=e.getParent();s.fields||(s.fields=[]);const i=e.getSource();s.fields.push(i),e.copyTo("sortOn",G,"sortBy"),e.copyTo("dxfId",G,"sortBy"),e.copyTo("iconSet",G),e.copyTo("customList",G);const o=e.getAttribute("ref");if(o){const e=t.AddressUtils.fastStringToRange(o,rt).colStart,r=t.AddressUtils.fastStringToRange(s.ref,rt),n=r.colStart;i.offset=r?e-n:e}i.reverse=e.getAttribute("descending",_)??!1}}),l.registerVisitor({from:"AlternateContent",to:null});const u=t=>{h=t.getSource(),t.copyTo("topLeft",G,"topLeftCell");const e=st(t.getAttribute("defaultGridColor")),s=t.getAttribute("colorId");null===s||e||(t.getSource().gridLineColor="index"+parseFloat(s)),t.copyTo("showZeros",_),t.copyTo("showFormulas",_),t.copyTo("zoomScale",U),t.copyTo("showRowHeaders",_,"showRowColHeaders"),t.copyTo("showColumnHeaders",_,"showRowColHeaders"),t.copyTo("showRowGridlines",_,"showGridLines"),t.copyTo("showColumnGridlines",_,"showGridLines")};l.registerVisitor({from:"sheetView",to:"view",openTag:t=>{u(t)},closeTag:()=>{h=null}}),l.registerVisitor({from:"customSheetViews",to:"customSheetViews",openTag:t=>{t.setSource([])}}),l.registerVisitor({from:"customSheetView",to:[],openTag:t=>{u(t)},closeTag:()=>{h=null}}),l.registerVisitor({from:"selection",to:"selection",openTag:t=>{if(!h)return;t.copyTo("cell",G,"activeCell"),t.copyTo("rangeIndex",U,"activeCellId");const e=t.getAttribute("activeCell"),s=t.getAttribute("sqref");s&&s!==e&&(t.getSource().ranges=s.split(" "))}}),l.registerVisitor({from:"pane",to:"pane",openTag:e=>{if(h&&"frozen"===e.getAttribute("state")){const s={};h.freezePanes=s,e.copyToObject(s,"topLeft",G,"topLeftCell");const i=h.topLeft?t.AddressUtils.fastStringToCell(h.topLeft):{colIndex:0,rowIndex:0},o={colIndex:0,rowIndex:0};e.copyToObject(o,"colIndex",U,"xSplit"),e.copyToObject(o,"rowIndex",U,"ySplit");const r={colIndex:i.colIndex+o.colIndex,rowIndex:i.rowIndex+o.rowIndex};s.coords=t.AddressUtils.cellToString(r)}}}),l.registerVisitor({from:"tabColor",to:null,openTag:t=>{const s=tt(e=>t.getAttribute(e));s&&(e.tabColor=s)}}),l.registerVisitor({from:"pageSetUpPr",to:"pageSetUpPr",openTag:t=>{}}),l.registerVisitor({from:"outlinePr",to:"outlinePr",openTag:t=>{}}),l.registerVisitor({from:"pageMargins",to:"pageMargins",openTag:t=>{}}),l.registerVisitor({from:"pageSetup",to:"pageSetup",openTag:t=>{}}),l.registerVisitor({from:"printOptions",to:"printOptions",openTag:t=>{}}),l.registerVisitor({from:"mergeCells",to:"merges",openTag:t=>{t.setSource([])}}),l.registerVisitor({from:"mergeCell",to:[],openTag:t=>{const e=t.getAttribute("ref");t.setSource(e)}}),l.registerVisitor({from:"hyperlinks",to:"hyperlinks",openTag:t=>{t.setSource([])}}),l.registerVisitor({from:"hyperlink",to:[],openTag:t=>{const e=t.getAttribute("r:id"),i=t.getAttribute("ref");if(!i)return void console.warn("No ref found for hyperlink");t.setKey(i);let o=e?s(e):"";if("string"!=typeof o)return void console.warn("Invalid address ",o);const r=t.getAttribute("location");o.endsWith("\\")&&(o=o.substring(0,o.length-1));const n=t.getAttribute("location");if(n&&(r&&r!==n&&console.warn("display and location are different",r,n),o+="#"+n),!o)return void console.warn("No address found for hyperlink. r:id",e);let a;const l=t.getAttribute("tooltip");a=l?{address:o,tooltip:l}:o,t.setSource({r:i,v:a})}}),l.registerVisitor({from:"drawing",to:"movables",openTag:t=>{const e=t.getAttribute("r:id");if(!e)return;const i=s(e);i?t.setSource(i.movables):console.warn("no drawing found for rId",e)}}),l.registerVisitor({from:"tableParts",to:"tables",openTag:t=>{t.setSource([])}}),l.registerVisitor({from:"tablePart",to:[],openTag:t=>{const e=t.getAttribute("r:id");if(!e)return;const i=s(e);i?t.setSource(i):console.warn("no table found for rId",e)}}),l.registerVisitor({from:"worksheet",to:"worksheet",openTag:t=>{}}),l.registerVisitor({from:"sheetProtection",to:"protection",openTag:t=>{let e=!1;if(t.hasAttribute("sheet")&&_(t.getAttribute("sheet"))&&(e=!0),!e)return void t.setSource(void 0);const s=t=>!0===t||"1"===t||"on"===t||"true"===t||!1===t||"0"===t||"off"===t||"false"===t||null;t.copyTo("autoFilter",s),t.copyTo("deleteColumns",s),t.copyTo("formatCells",s),t.copyTo("formatColumns",s),t.copyTo("formatRows",s),t.copyTo("insertColumns",s),t.copyTo("insertHyperlinks",s),t.copyTo("insertRows",s),t.copyTo("objects",s),t.copyTo("pivotTables",s),t.copyTo("scenarios",s),t.copyTo("selectUnlockedCells",s),t.copyTo("selectUnlockedCells",s),t.copyTo("sort",s);const i={};t.copyToObject(i,"hash",G,"hashValue"),t.copyToObject(i,"algorithm",G,"algorithmName"),t.copyToObject(i,"salt",G,"saltValue"),t.copyToObject(i,"spinCount",U),Object.keys(i).length>0&&(t.getSource().password=i)}}),l.registerVisitor({from:"protectedRanges",to:"protectedRanges",openTag:t=>{t.setSource({})}}),l.registerVisitor({from:"protectedRange",to:{},openTag:t=>{const e=t.getAttribute("sqref");t.setKey(e),t.copyTo("name"),t.copyTo("securityDescriptor");const s={};t.copyToObject(s,"hash",G,"hashValue"),t.copyToObject(s,"algorithm",G,"algorithmName"),t.copyToObject(s,"salt",G,"saltValue"),t.copyToObject(s,"spinCount",U),Object.keys(s).length>0&&(t.getSource().password=s)}}),l.registerVisitor({from:"sheetFormatPr",to:"sheetFormatPr",openTag:t=>{t.copyToObject(e,"defaultColSize",z,"defaultColWidth"),t.copyToObject(e,"outlineLevelCol",U,"outlineLevelCol");const s=t.getAttribute("customHeight");"1"!==s&&"true"!==s||t.copyToObject(e,"defaultRowSize",z,"defaultRowHeight"),t.copyToObject(e,"outlineLevelRow",U,"outlineLevelRow")}}),l.registerVisitor({from:"cols",to:"cols",openTag:t=>{t.setSource([])}}),l.registerVisitor({from:"col",to:[],openTag:t=>{t.copyTo("min",t=>parseInt(t)-1),t.copyTo("max",t=>parseInt(t)-1),t.copyTo("sz",z,"width"),t.copyTo("cs",_,"customWidth"),t.copyTo("h",_,"hidden"),t.copyTo("l",U,"outlineLevel"),t.copyTo("s",U,"style")}}),l.registerVisitor({from:"oleObjects",to:null,openTag:t=>{t.warn("'OLE Objects' are not supported.")}});let d=null;const p={onOpenTag:t=>{null===d&&(d="")},onText:t=>{d+=t},onEnd:()=>{const t=i(d);return d=null,t},onError:t=>{}};return((e,s,i,o,r,n)=>{let a=!1,l=!1,c=[],h=!1,u=null,d=null,p=null,g=null,f=null,m=null;const T=n?.get("richData")??[],y=t.AddressUtils.normalizeA1ToR1C1,b=t.CoordUtils.createConflatingRanges(),x=new Map,w=[];let v=null;const S=t.CoordUtils.createConflatingRanges();let C,k=!1,A=-1,E=-1,D=null,P=null;const I=[];let O=null,V=-2,N=0,L="",R="",$="",F="",M="",j="",H="",X="",B="",W="",q="",_="",U="",z="",G=!0,Z=null;return{...i,onEnd:()=>{I.length>0&&(s.rows=I);let o=b.done(ot);const r=o.length;if(r>0){const e=new Array(r);for(let s=0;s<r;s++){const i=o[s],r=t.AddressUtils.rangeToString(i),n=i.value[1],a=t.AddressUtils.resolveRelativeToA1(n,i.rowStart,i.colStart);e[s]=[r,a]}s.formulas=e}const n=S.done(!0),a=n.length;if(a>0){const e=new Array(a);for(let s=0;s<a;s++){const i=n[s],o=t.AddressUtils.rangeToString(i);e[s]=o}s.volatile=e}if(w.length>0&&(s.dynamicArray=[...w]),c.length>0){c.sort(t.CoordUtils.createRangeComparator(t.IRange.Orientation.Column));const e=[];let i=null,o=-1,r=-1,n=-1,a=-1,l=null;const h=c.length;h>0&&(i=c[0],o=i.colStart,r=i.colEnd,n=i.rowEnd,a=i.value,e.push(i));for(let t=1;t<h;t++)l=c[t],a!==l.value||o!==l.colStart||r!==l.colEnd||n+1!==l.rowEnd?(e.push(l),i=l,o=i.colStart,r=i.colEnd,n=i.rowEnd,a=i.value):(n=l.rowEnd,i.rowEnd=n);let u=[];for(let t=0;t<e.length;t++){const s=e[t];u.push({r:{colStart:s.colStart,colEnd:s.colEnd,rowStart:s.rowStart,rowEnd:s.rowEnd},v:s.value})}s.directStyles=u}const l=e.build();if(l){const t=l.tuples;s.data=t}i?.onEnd?.()},onOpenTag:e=>{let s=e.name;const o=s.indexOf(":");if(-1!==o&&(s=s.slice(o+1)),C){const t=e.attributes;switch(s){case"v":l=!0;break;case"f":switch(t.t??null){case null:case"normal":h=!0;break;case"shared":const e=t.si;d=t.ref,u=e;break;case"array":h=!0,d=t.ref,v=[d,!1];break;case"datatable":h=!0,d=t.ref,h=!0}void 0!==t.ca&&S.append(A,E);break;case"is":return void(k=!0)}return void(k&&r?.onOpenTag(e))}if(a){if("c"===s){C=e;const s=e.attributes.r;E=t.AddressUtils.fastStringToCol(s);const i=e.attributes.t;void 0===i?P=null:(P=i,"str"===P&&(k=!0));let o=e.attributes.s;void 0!==o&&(o=parseInt(o),Z&&Z.value===o&&Z.colEnd+1===E?Z.colEnd=E:(Z={colStart:E,rowStart:A,colEnd:E,rowEnd:A,value:o},c.push(Z)))}}else{if("row"===s){a=!0;const t=e.attributes.r;if(A=parseInt(t)-1,N=0,R=e.attributes.customHeight,void 0!==R&&(N|=it.CustomHeight),R!==B&&(G=!0,B=R),L=e.attributes.ht,void 0!==L&&(N|=it.Ht),L!==X&&(G=!0,X=L),$=e.attributes.hidden,void 0!==$&&(N|=it.Hidden),$!==W&&(G=!0,W=$),M=e.attributes.s,void 0!==M&&(N|=it.S),M!==_&&(G=!0,_=M),F=e.attributes.customFormat,void 0!==F&&(N|=it.CustomFormat),F!==q&&(G=!0,q=F),j=e.attributes.outlineLevel,void 0!==j&&(N|=it.OutlineLevel),j!==U&&(G=!0,U=j),H=e.attributes.collapsed,void 0!==H&&(N|=it.Collapsed),H!==z&&(G=!0,z=H),0!==N)if(V+1!==A||G){const t=void 0!==R&&("1"===R||"true"===R),e=void 0!==F&&("1"===F||"true"===F);O={min:A,max:A,sz:t&&void 0!==L?parseFloat(L):-1,csz:t,h:void 0!==$&&("1"===$||"true"===$),s:t&&void 0!==M&&"0"!==M?parseInt(M):0,cs:e,l:void 0===j||"0"===j?0:parseInt(j),cl:void 0!==H&&("1"===H||"true"===H)},I.push(O)}else O.max=A;return V=A,void(G=!1)}i?.onOpenTag(e)}},onCloseTag:t=>{if(C){let s=t.name;const i=s.indexOf(":");if(-1!==i&&(s=s.slice(i+1)),k)if("is"===s||"v"===s){const t=r?.onEnd();null!==t&&e.addValue(A,E,""+t)}else r?.onCloseTag?.(t);return l&&(l=!1),void("c"===s&&(C=null,k=!1))}if(a)return a=!1,void(Z=null);i?.onCloseTag(t)},onText:s=>{if(s=s.trim(),l){switch(D=null,P){case null:case"n":D=parseFloat(s);break;case"b":D="1"===s||"true"===s;break;case"s":D=s;break;case"e":if("#VALUE!"===s){const e=C.attributes.vm;if(void 0!==e){const s=T[parseInt(e)-1];if(s&&s.isFormulaError){D={t:t.ScalarType.Error,v:s.getCode()};break}}}const e=t.FormulaError.getBuiltInByLabel(s);e?D={t:t.ScalarType.Error,v:e.getCode()}:(D=s,o?.(`Unknown formula error '${s}' in cell ${t.AddressUtils.cellToString({colIndex:E,rowIndex:A})}`));break;case"str":case"inlineStr":k=!0}null!==D&&e.addValue(A,E,D)}if(v&&("e"===P&&(v[1]=!0),w.push(v),v=null),u)if(f===u)g=m;else{if(g=x.get(u),!g){const t=[];p=y(s,A,E,t),g=[p,t,s],x.set(u,g)}f=u,m=g}if(h){const t=[];p=y(s,A,E,t),g=[p,t,s]}if(g)return b.append(A,E,g),g=null,h=!1,u=null,void(d=null);k?r?.onText(s):a||i?.onText(s)}}})(c,e,l.createEventHandler(e,()=>{},n),n,p,a)})(e,(t,e=!1)=>x(t,d,e)??null,E,S,0,t=>{o&&(t=d+": "+t,o?.(t))},f),i=J(d,y),r=await(async(t,e=8388608)=>{await(async()=>{if("undefined"==typeof ReadableStream)if("undefined"==typeof window){const{ReadableStream:t}=await Promise.resolve().then(()=>require("./BZR-qDCIYdiDtD-U.cjs"));globalThis.ReadableStream=t}else console.warn("Browser does not support ReadableStream; consider loading a polyfill.")})();const s=new TextDecoder("utf-8");let i=0;const o=t instanceof Uint8Array?t:new Uint8Array(t);return new ReadableStream({pull(t){if(i>=o.byteLength)return void t.close();const r=o.subarray(i,Math.min(i+e,o.byteLength)),n=s.decode(r,{stream:i+e<o.byteLength});t.enqueue(n),i+=r.length}}).getReader()})(i);try{await W.parseStream(r,s,{xmlns:!1})}catch(t){throw console.warn(`Error parsing sheet: '${d}'`,t),new Error(`Error parsing sheet: '${d}'`,{cause:t})}const n=b(d,c);let a,l=new Map;if(n){const s="http://schemas.microsoft.com/office/2017/10/relationships/threadedComment";let i;n.forEach((t,e)=>{if(t.type===s){const t=x(e,d,!1,c);a=t?.comments,a&&a.forEach(t=>{l.set(t.id,t)})}});const o="http://schemas.openxmlformats.org/officeDocument/2006/relationships/comments";if(n.forEach((t,e)=>{if(t.type===o){const t=x(e,d,!1,c);i=t}}),i||a){const s=a??[],o=i?.comments;if(o){const e=i?.authors;for(let i=0;i<o.length;i++){const r=o[i];let n=void 0!==r.authorId?e[r.authorId]:void 0;if((!n||n.startsWith("tc="))&&(n=et(n.substring(3)),l.has(n)))continue;let a=D.get(n);a||(a=P.get(n)),a||(a={id:t.CommonUtils.uuidV4(),displayName:n},P.set(a.displayName,a),D.set(a.id,a)),n=a?.id??null;const c={id:t.CommonUtils.uuidV4(),personId:n,ref:r.ref,done:!1,asNote:!0,content:r.content};s.push(c)}}e.comments=s}}};T.push(s())}else C=r?J(d,y,t=>{const e=a.add({buffer:t});return e.addReference(h),g.add(e),l.toResourceId(e)},w):Q(d,y,n,i,w)}return C},w={paramMap:f,getRefs:b,getRef:x,parsedRefs:m,onWarning:o,addPerson:t=>null},v=[];let S=0;s.Strings&&(S=parseInt(s.Strings.Unique??s.Strings.length??0));const C=s.Strings??[];for(let t=0;t<S;t++)v.push(C[t]?.t??"");const k=new Map;let A=S;const E=t=>{const e=k.get(t);if(void 0!==e)return e;const s=A;return k.set(t,A++),v.push(t),s},D=(K("richstructure",s,n,i,w),K("richdata",s,n,i,w),new Map),P=new Map,I=K("people",s,n,i);let O=null;if(I.size>0&&(O=I.entries().next()?.value?.[1]?.persons,O)){const t=O.length;for(let e=0;e<t;e++){const t=O[e];D.set(t.id,t),D.set(t.displayName,t)}}const V=K("themes",s,n,i,w);let N=null;if(V&&V.entries){let t=V.entries().next();t?.value?.[1]&&(N=t.value[1])}const L=new t.Theme(N),R=K("styles",s,n,i,w);let $=R.entries().next()?.value[1];$&&($=JSON.parse(t.JSONStableStringify($)));const F=K("workbooks",s,n,i,w);await Promise.all(T);const M={...F.entries().next().value[1],styles:$,theme:L.toJSON()};v.length>0&&(M.strings=v),O&&O.length>0&&(M.people=O);const j={...r,resources:a,json:M},H=new t.Workbook(j);return g.forEach(t=>{t.deleteReference(h)}),l.endPersist(),H}catch(e){let s="Unable to parse XLSX.";throw e instanceof t.OutOfBoundsError&&(s="Unable to open XLSX. There are too many rows or columns."),new Error(s,{cause:e})}},toBufferXLSX:async(e,s)=>{const i=await Promise.resolve().then(()=>require("./BKJsMQHem8u-jMiR.cjs")),o=await e.toJSON(!0),r=i.utils.book_new();for(let s=0;s<o.sheets.length;s++){const n=o.sheets[s],a=i.utils.json_to_sheet([{}]);i.utils.book_append_sheet(r,a,n.name);const l=n.sheet,c=e.getSheetAt(s),h=c.getUsedRange();if(h?(a["!ref"]=h.getA1(),h.forEach((e,s)=>{const i={t:"z"},o=s.getCell().getStyle();if(!o.isNormal()){let e=o.getNumberFormat();e!==t.NumberFormat.Type.General&&(e===t.NumberFormat.Type.ShortDate?e="m/d/yyyy":e===t.NumberFormat.Type.MediumDate?e="d-mmm-yy":e===t.NumberFormat.Type.LongDate?e="[$-x-sysdate]dddd, mmmm dd, yyyy":e===t.NumberFormat.Type.ShortTime?e="h:mm":e===t.NumberFormat.Type.MediumTime?e="h:mm AM/PM":e===t.NumberFormat.Type.LongTime&&(e="h:mm:ss AM/PM"),i.z=e)}if(null!==e)switch(s.getType()){case t.ScalarType.Number:i.t="n",i.v=e;break;case t.ScalarType.String:i.t="s",i.v=e;break;case t.ScalarType.Boolean:i.t="b",i.v=e;break;case t.ScalarType.Error:i.t="e",i.v=e.toString();case t.ScalarType.RichData:}a[s.getA1()]=i})):a["!ref"]="A1:A1",l.merges?.length>0){const t=[];a["!merges"]=t;for(let e=0;e<l.merges.length;e++)t.push(i.utils.decode_range(l.merges[e]))}if(l.cols?.length>0){const t=[];a["!cols"]=t;const e=l.cols,s={width:l.defaultColSize??c.getColumnWidthAsFontUnit(c.getColumnHeaders().getDefaultSize())};for(let i=0;i<e.length;i++){const o=e[i];for(let e=t.length;e<=o.min-1;e++)t.push(s);const r={};void 0!==o.sz&&(r.width=o.sz),void 0!==o.h&&(r.hidden=o.h),void 0!==o.l&&(r.level=o.l);for(let e=o.min;e<=o.max;e++)t.push(r)}}}return i.write(r,{type:"array",bookType:"xlsx"}),i.write(r,{type:"array",bookType:"xlsx"})}},Symbol.toStringTag,{value:"Module"}));exports.a=t=>parseFloat(t)/1e3,exports.b=st,exports.c=t=>t?e.et.roundAccurately(parseFloat(t)/9525,1):null,exports.d=tt,exports.i=nt,exports.p=t=>parseFloat(t)/6e4,exports.r=et,exports.t=t=>t?e.et.roundAccurately(parseFloat(t)/12700,4):null;
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license @sheetxl/studio-mui - Studio - Spreadsheet UI built with SheetXL SDK using React & MUI. - v0.4.13
|
|
3
|
-
*
|
|
4
|
-
* (C) 2025-present SheetXL Inc. & Michael T. Ford
|
|
5
|
-
* License: The license can be found at https://www.sheetxl.com/license.
|
|
6
|
-
*/
|
|
7
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),t=require("react"),a=require("@mui/material"),n=require("./Brij8vl9GntSQBer.cjs"),l=["Ok","Cancel"],o=t.memo(o=>{const{value:s=null,context:r,onOption:i,onValidateOption:u,onDone:d,onUpdate:p,options:c=l,defaultOption:m=c?.[0],cancelOption:g="Cancel",sx:x,...f}=o,N=t.useMemo(()=>r?.getNames().findValidName("Range1"),[]),y=t.useMemo(()=>{if(!s)return!0},[]),[T,O]=t.useState({displayText:s?.getName()??N,errorText:null}),[V,C]=t.useState({displayValue:s?.getRanges()??r?.selection()??null,errorText:null}),[R,h]=t.useState(!1),j=t.useCallback(async e=>!T.errorText&&!V.errorText,[r]),v=n.B((e,t,a)=>{if(!t){let e=null;y?e=r?.getNames().addReference(T?.displayText,V?.displayValue,!1):("reference"===s.getType()&&s.doBatch(()=>{s.setName(T?.displayText),s.setReference(V?.displayValue)},`Edit Named '${T?.displayText}'`),e=s),e&&(e.select(),p(e,y))}i?.(e,t,a),d?.()},[r,T,V,d,i,m,g,p]),B=n.B(e=>{let t=null;try{r?.getNames().validateName(e)}catch(e){t=e.message}O({displayText:e,errorText:t})},[]),S=n.B(e=>{s&&s.getName().toLowerCase()===e.toLowerCase()||r?.getNames().validateName(e)},[r,s]),b=t.useCallback(e=>{C({displayValue:e??null,errorText:null})},[]);return e.jsx(n.pm,{title:(y?"Define":"Edit")+" Range",options:c,onOption:v,onValidateOption:j,defaultOption:m,cancelOption:g,autoFocusSel:".autoFocus",sx:{width:"460px",...x},...f,children:e.jsxs(a.Box,{sx:{paddingTop:e=>e.spacing(1),paddingBottom:e=>e.spacing(0),rowGap:e=>e.spacing(1),range:"flex",flexDirection:"column"},children:[e.jsx(n.NamedInput,{formName:"name",defaultInput:N,value:T.displayText,onChangeInput:B,onValidate:S,onFocus:e=>{R||e.target?.select(),h(!0)}}),e.jsx(n.RangeInput,{formName:"range",value:V.displayValue,onChangeInput:b,resolvedAddress:r.getNames().getRanges.bind(r.getNames()),onFocus:e=>{R||e.target?.select(),h(!0)}})]})})});exports.NamedReferenceDialog=o,exports.default=o;
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license @sheetxl/studio-mui - Studio - Spreadsheet UI built with SheetXL SDK using React & MUI. - v0.4.13
|
|
3
|
-
*
|
|
4
|
-
* (C) 2025-present SheetXL Inc. & Michael T. Ford
|
|
5
|
-
* License: The license can be found at https://www.sheetxl.com/license.
|
|
6
|
-
*/
|
|
7
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("./Brij8vl9GntSQBer.cjs"),e=require("./C61z_849Y2mg6eYL.cjs"),s=require("@sheetxl/sdk");class r{constructor(t){this.list=t}get length(){return this.list.length}item(t){return this.list[t]}forEach(t,e){for(let e=0;e<this.list.length;e++)t(this.list[e],e,this)}}const o=t=>!0===t||"1"===t||"on"===t||"true"===t||!1!==t&&"0"!==t&&"off"!==t&&"false"!==t&&null,i=t=>{const e=parseInt(t);return isNaN(e)?null:e},n=t=>{const e=parseFloat(t);return isNaN(e)?null:e},l=new Map;class a{constructor(t,e,s,r,o,i=null,n){const l=(t,e,s)=>n?.getRef?.(t,e,s,n?.parsedRefs),a=t=>n?.getRefs?.(t,n?.parsedRefs);this._parent=t,this.sharedShared=e,this.currentPath=s,this.elemRoot=r,this.jsonRoot=o,t?(this._fileLocation=t._fileLocation,this._getRef=t._getRef,this._getRefs=t._getRefs):(i&&(this._fileLocation=i),l&&a&&(this._getRef=l),a&&(this._getRefs=a),this._onWarning=n?.onWarning,this._addPerson=n?.addPerson)}getRef(t,e=!1){return this._getRef?.(t,this._fileLocation,e)??null}getRelationships(){return this._getRefs(this._fileLocation)??l}getPath(){return this.currentPath}getElemRoot(){return this.elemRoot}getJsonRoot(){return this.jsonRoot}warn(t){this._onWarning?this._onWarning(t):this._parent?this._parent?.warn?.(t):console.warn(t)}addPerson(t){return this._addPerson?this._addPerson(t):this._parent?this._parent?._addPerson?.(t):null}getVisitorParamsState(){return this.sharedShared.getVisitorParamsState()}evaluate(t,e){if(!t)return e;let s=[e];const o=t.split("/");for(let t=0;t<o.length;t++){const e=o[t];if(""===e||"."===e)continue;let r=[];for(let t=0;t<s.length;t++){const o=s[t],i=o.childNodes;for(let t=0;i&&t<i.length;t++){const s=o.childNodes[t];s.localName!==e&&"*"!==e||r.push(s)}}s=r}return 1===s.length?s[0]:0===s.length?null:new r(s)}getFromPath(e,s){return t.et.getFromPath(e,s)}setToPath(e,s,r){return t.et.setToPath(e,s,r)}getValAttrAsString(t,e){let s=this.evaluate(t,e);return s&&s.hasAttribute("val")?s.getAttribute("val")??null:null}getValAttrAsBoolean(t,e,s=!1){let r=this.evaluate(t,e);if(!r)return null;const o=r.hasAttribute("val")?r.getAttribute("val"):void 0;return null==o?s:"1"===o||"on"===o||"true"===o||"0"!==o&&"off"!==o&&"false"!==o&&s}getValAttrAsInteger(t,e){let s=this.evaluate(t,e);return s&&s.hasAttribute("val")?parseInt(s.getAttribute("val"))??null:null}getValAttrAsFloat(t,e){let s=this.evaluate(t,e);return s&&s.hasAttribute("val")?parseFloat(s.getAttribute("val"))??null:null}get BOOLEAN_COPY(){return o}get INT_COPY(){return i}get FLOAT_COPY(){return n}copyFromAttribute(t,e,s,r=e,o=null){if(!t||!s||!t.hasAttribute(e))return;let i=t.getAttribute(e);if(o)if(Array.isArray(o))for(let t=0;t<o.length;t++){if(null==i)return;if(i=o[t](i),null==i)return}else{if(null==i)return;if(i=o(i),null==i)return}this.setToPath(s,r,i)}}class c{constructor(t){this.jsonKey=t}visit(t,e,s){const r={};return s[this.jsonKey]=r,r}}class u{visit(t,e,s){if(!e)return;const r=e.childNodes;for(let e=0;e<r.length;e++){const o=r.item(e);1===o.nodeType&&"Relationship"===o.localName&&this.processRelationship(t,o,s)}return s}processRelationship(t,e,s){const r={};t.copyFromAttribute(e,"Target",r,"target"),t.copyFromAttribute(e,"Type",r,"type"),t.copyFromAttribute(e,"TargetMode",r,"targetMode"),s[e.getAttribute("Id")]=r}}const h=(s,r)=>{if(s||!s.hasAttribute("rot"))return;const o=s.getAttribute("rot"),i=t.et.roundAccurately(e.p(o),2);-1e3!==i&&(r.rotation=i)},p=(t,e,s,r,o)=>{const i=t.getValAttrAsString(r,e);null!==i&&(s[o]=i)},g=(t,e,s,r,o=r,i=null)=>{const n=t.getValAttrAsBoolean(r,e,i);null!==n&&(s[o]=n)},d=(t,e,s,r,o)=>{const i=t.getValAttrAsInteger(r,e);null!==i&&(s[o]=i)},m=(t,e,s,r,o,i=1)=>{const n=t.getValAttrAsFloat(r,e);null!==n&&(s[o]=n*i)};class b{visit(t,e,s){return g(t,e,s,"roundedCorners","roundedCorners"),d(t,e,s,".//AlternateContent/Fallback/style","styleId"),s.range=null,s}afterVisit(t,e,s){let r={};s.types=r;let o={},i=0,n={},l=0,a=t.getVisitorParamsState().get("axes");const c=t.getVisitorParamsState().get("types");for(let t=0;t<c.length;t++){const e=c[t];if(e.xAxisId){const r=e.xAxisId,n=a.get(r);o[t+""]=n,e.offsetXAxis=t,delete e.xAxisId,s.xAxes=o,o.length=++i}if(e.yAxisId){const r=e.yAxisId,o=a.get(r);n[t+""]=o,e.offsetYAxis=t,delete e.yAxisId,s.yAxes=n,n.length=++l}r[t+""]=e}r.length=c.length;const u=t.getVisitorParamsState().get("series");if(!u||0===u.length)return;const h={};s.series=h;for(let t=0;t<u.length;t++)h[t+""]=u[t];h.length=u.length}}class A{visit(t,e,s){return g(t,e,s,"plotVisOnly","plotVisOnly"),p(t,e,s,"dispBlanksAs","dispBlanksAs"),g(t,e,s,".//extLst/ext/dataDisplayOptions16/dispNaAsBlank","dispNaAsBlank"),g(t,e,s,"showDLblsOverMax","showDLblsOverMax"),s}afterVisit(t,e,s){try{const r=t.getValAttrAsBoolean("autoTitleDeleted",e),o=t.evaluate("title",e);t.setToPath(s,"title.shown",!(!0===r||!o));const i=t.evaluate("legend",e);t.setToPath(s,"legend.shown",null!==i)}catch(t){throw new Error("Unexpected Error parsing Chart: "+t)}}}class f{visit(t,e,s){let r={};return s.plotArea=r,r}}class y{EnumMappings(){}static fromOoxmlGradientType(t){return"circle"===t?"radial":t}static fromOoxmlLineCap(t){if("rnd"===t)return"round";if("flat"===t)return"butt";if("sq"===t)return"square";throw new Error("Invalid lineCap type: "+t)}static fromOoxmlCompound(t){return"sng"===t?"single":t}static fromOoxmlAlignment(t){return"ctr"===t?"center":t}}class v{visit(t,e,s){}processStroke(t,s,r){const o={},i=t.evaluate("ln",s);if(i){i.hasAttribute("algn")&&(o.align=y.fromOoxmlAlignment(i.getAttribute("algn"))),i.hasAttribute("cap")&&(o.lineCap=y.fromOoxmlLineCap(i.getAttribute("cap"))),i.hasAttribute("cmpd")&&(o.compound=y.fromOoxmlCompound(i.getAttribute("cmpd"))),i.hasAttribute("w")&&(o.width=e.t(i.getAttribute("w")));const s=t.evaluate("miter",i);s&&(o.lineJoin="miter",s.hasAttribute("lim")&&(o.miter=parseFloat(s.getAttribute("lim")))),t.evaluate("bevel",i)&&(o.lineJoin="bevel"),t.evaluate("round",i)&&(o.lineJoin="round");const n=t.evaluate("custDash",i);if(n){const s=t.evaluate("ds",n);if(s&&s.length>0){let t="";for(let r=0;r<s.length;r++){const o=s.item(r);t+=e.a(o.getAttribute("d"))+","+e.a(o.getAttribute("sp"))}o.dash=t}}const l=t.evaluate("prstDash",i);l&&l.hasAttribute("val")&&(o.dash=l.getAttribute("val")),this.parseEndElement(t,i,o,"headEnd","head"),this.parseEndElement(t,i,o,"tailEnd","tail");const a=this.processFill(t,i,r);o.fill=a}return o}parseEndElement(t,e,s,r,o){const i=t.evaluate(r,e);if(i&&(i.hasAttribute("type")&&(s[o+"Type"]=i.getAttribute("type")),i.hasAttribute("len")||i.hasAttribute("w"))){const t=i.getAttribute("len")?i.getAttribute("len"):"med",e=i.getAttribute("w")?i.getAttribute("w"):"med";s[o+"Size"]=t+"-"+e}}processFill(t,s,r){const o={};if(t.evaluate("noFill",s))return o.none=!0,o;const i=t.evaluate("solidFill",s);if(i){const e=this.processAdjColor(t,i);return e&&(o.solid=e),o}const n=t.evaluate("gradFill",s);if(n){n.hasAttribute("rotWithShape")&&(o.isRotated="1"===n.getAttribute("rotWithShape"));const e=this.processGradFill(t,n);return o.gradient=e,o}const l=t.evaluate("pattFill",s);if(l){const e=this.processPatternFill(t,l);return o.pattern=e,o}const a=t.evaluate("blipFill",s);if(a){a.hasAttribute("rotWithShape")&&(o.isRotated=e.b(a.getAttribute("rotWithShape"))),a.hasAttribute("dpi")&&(o.dpi=a.getAttribute("dpi"));const s=this.processImageFill(t,a);return o.image=s,o}return o.none=!0,o}processGradFill(t,s){const r={},o=t.evaluate("lin",s);if(o){if(r.type="linear",o.hasAttribute("ang")){const t=e.p(o.getAttribute("ang"));r.angle=t}if(o.hasAttribute("scaled")){const t=e.b(o.getAttribute("scaled"));r.scaled=t}}const i={};s.hasAttribute("flip")&&(i.mirror=s.getAttribute("flip")),Object.keys(i).length>0&&(r.tile=i);const n=t.evaluate("path",s);if(n){n.hasAttribute("path")&&(r.type=y.fromOoxmlGradientType(n.getAttribute("path")));const e=t.evaluate("fillToRect",n);e&&(r.fillTo=this.getRect(e))}const l=t.evaluate("tileRect",s);l&&(r.tile.bounds=this.getRect(l));const a=[],c=t.evaluate("gsLst/gs",s);for(let s=0;c&&s<c.length;s++){const r=c.item(s),o={offset:e.a(r.getAttribute("pos")),color:this.processAdjColor(t,r)};a.push(o)}return a.length>0&&(r.stops=a),r}getRect(t){const s={};return t.hasAttribute("t")&&(s.t=e.a(t.getAttribute("t"))),t.hasAttribute("l")&&(s.l=e.a(t.getAttribute("l"))),t.hasAttribute("b")&&(s.b=e.a(t.getAttribute("b"))),t.hasAttribute("r")&&(s.r=e.a(t.getAttribute("r"))),0===Object.keys(s).length?null:s}processImageFill(t,e){return{ref:"https://www.sheetxl.com/logo-color-padded-white.jpg",tile:!1}}processPatternFill(t,e){const s={},r=e.getAttribute("prst");s.type=r;const o=t.evaluate("bgClr",e);if(o){const e=this.processAdjColor(t,o);e&&(s.background=e)}const i=t.evaluate("fgClr",e);if(i){let e=this.processAdjColor(t,i);e&&(s.foreground=e)}return s}processAdjColor(t,e){const s=t.evaluate("hslClr",e);if(s)return this.processHslClr(t,s);const r=t.evaluate("prstClr",e);if(r)return this.processClrWithValAttribute(t,r);const o=t.evaluate("schemeClr",e);if(o)return this.processClrWithValAttribute(t,o);const i=t.evaluate("sysClr",e);if(i)return this.processClrWithValAttribute(t,i);const n=t.evaluate("scrgbClr",e);if(n)return this.processScrgbClrElement(t,n);const l=t.evaluate("srgbClr",e);return l?this.processSrgbClrElement(t,l):null}processScrgbClrElement(t,s){let r="lrgba("+e.a(s.getAttribute("r"))+","+e.a(s.getAttribute("g"))+","+e.a(s.getAttribute("b"))+")";return r+=this.processAdjustments(t,s),r}processSrgbClrElement(t,e){let s=e.getAttribute("val");return s+=this.processAdjustments(t,e),s}processHslClr(t,s){let r="hsl("+e.p(s.getAttribute("hue"))+","+e.a(s.getAttribute("sat"))+","+e.a(s.getAttribute("lum"))+")";return r+=this.processAdjustments(t,s),r}processClrWithValAttribute(t,e){const s=e.getAttribute("val");if(!s)return;let r=s;return r+=this.processAdjustments(t,e),r}processAdjustments(t,e){let s="";const r=e.childNodes;for(let o=0;o<r.length;o++){const i=r.item(o);if(1===i.nodeType){let r=i.localName;s+="hue"===r||"hueOff"===r||"hueMod"===r?this.processAdjustmentElement(t,e,r,6e4):"gray"===r||"comp"===r||"inv"===r||"gamma"===r||"invGamma"===r?this.processAdjustmentElement(t,e,r,1):this.processAdjustmentElement(t,e,r)}}return s}processAdjustmentElement(t,e,s,r=1e3){const o=t.evaluate(s,e);if(!o)return"";const i=o.getAttribute("val");return i?` ${s} ${!i||parseFloat(i)/r}`:` ${s}`}}class F extends v{visit(t,s,r){try{const o=t.evaluate("xfrm",s);if(o){h(o,r);const s={x:0,y:0,width:0,height:0},i=t.evaluate("off",o);i&&(s.x=e.c(i.getAttribute("x"))??0,s.y=e.c(i.getAttribute("y"))??0);const n=t.evaluate("ext",o);i&&(s.width=e.c(n.getAttribute("cx"))??0,s.height=e.c(n.getAttribute("cy"))??0),r.bounds=s}const i=t.evaluate("prstGeom",s);i?.hasAttribute("prst")?r.geometry=i?.getAttribute("prst"):t.evaluate("customGeom",s)&&console.warn("customGeom not supported yet");const n=this.processFill(t,s,r);n&&Object.keys(n).length>0&&(r.fill=n);const l=this.processStroke(t,s,r);return l&&Object.keys(l).length>0&&(r.stroke=l),r}catch(t){throw console.warn(t),new Error("Unexpected Error parsing Shape Properties element")}}}class C{visit(t,e,s){let r={};if(p(t,e,r,"grouping","grouping"),g(t,e,r,"varyColors","varyColors"),m(t,e,r,"gapWidth","gapWidth",.01),m(t,e,r,"overlap","overlap",.01),this.parseType(t,e,r),d(t,e,r,"bubbleScale","bubbleScale"),g(t,e,r,"showNegBubbles","showNegativeBubbleValues"),g(t,e,r,"sizeRepresents","bubbleSizeRepresentsWidth"),d(t,e,r,"firstSliceAng","startAngle"),d(t,e,r,"holeSize","holeSize"),p(t,e,r,"scatterStyle","scatterStyle"),this.parseAxisIds(t,e,r),Object.keys(r).length>0){let e=t.getVisitorParamsState().get("types");e||(e=[],t.getVisitorParamsState().set("types",e)),e.push(r)}return r}parseType(t,e,s){switch(e.localName){case"areaChart":s.type="area";break;case"bubbleChart":s.type="bubble";break;case"doughnutChart":case"ofPieType":case"pieChart":s.type="pie";break;case"lineChart":s.type="line";break;case"scatterChart":s.type="scatter"}}parseAxisIds(t,e,s){const r=t.evaluate("axId",e);if(0===r.length)return;const o=r.item(0).getAttribute("val");s.xAxisId=o;const i=r.item(1).getAttribute("val");s.yAxisId=i}}class w extends C{parseType(t,e,s){const r=t.getValAttrAsString("barDir",e);r&&(s.type="col"===r?"column":"bar")}}class P{constructor(t){this.jsonKey=t}visit(t,e,s){let r={},o=r,i=t.getValAttrAsString("idx",e);null!==i&&(o={},o[i]=r);const n=t.getValAttrAsBoolean("delete",e);this.parseNumFormat(t,e,r),!0===n?(r.showBubbleSize=!1,r.showCatName=!1,r.showLeaderLines=!1,r.showPercentage=!1,r.showSerName=!1,r.showVal=!1,r.showLegendKey=!1):(g(t,e,r,"showBubbleSize","showBubbleSize"),g(t,e,r,"showCatName","showCatName"),g(t,e,r,"showLeaderLines","showLeaderLines"),g(t,e,r,"showPercent","showPercentage"),g(t,e,r,"showSerName","showSerName"),g(t,e,r,"showVal","showVal"),g(t,e,r,"showLegendKey","showLegendKey"));const l=t.evaluate("separator",e);return null!==l&&(r.separator=l.textContent),p(t,e,r,"dLblPos","position"),s[this.jsonKey]=o,r}parseNumFormat(t,e,s){const r=t.evaluate("numFmt",e);if(r){const t=r.getAttribute("formatCode");s.formatCode=t,r.hasAttribute("sourceLinked")&&(s.sourceLinked="1"===r.getAttribute("sourceLinked"))}}}const N=(t,e,s)=>{if(!0===t.getValAttrAsBoolean("invertIfNegative",e))if(t.evaluate("extLst/ext/invertSolidFillFmt",e)){if(s.fill&&s.fillNegative){const e=t.getFromPath(s,"fill.solid.adjs");e&&t.setToPath(s,"fillNegative.solid.adjs",e)}}else{const t={val:"FFFFFF"},e={};e.solid=t,s.fillNegative=e;const r={val:"000000"},o={};o.solid=r;const i={};i.fill=o,s.strokeNegative=i}};class O{visit(t,e,s){const r={};d(t,e,r,"explosion","explosion");let o=t.evaluate("cat/*/f",e);o||(o=t.evaluate("xVal/*/f",e));let i=null;null!==o&&null!==o.firstChild&&(i=o.firstChild.nodeValue),o||(o=t.evaluate("cat/strLit",e),o||(o=t.evaluate("cat/numLit",e)),o&&(i=this.parsePointsAsString(t,o))),null!==i&&(r.xRange=i);let n=t.evaluate("val/*/f",e);n||(n=t.evaluate("yVal/*/f",e));let l=null;n&&n.firstChild&&(l=n.firstChild.nodeValue),n||(n=t.evaluate("val/numLit",e),null!==n&&(l=this.parsePointsAsString(t,n))),null!==l&&(r.valRange=l),this.parseTitleRangeOrValue(t,e,r),d(t,e,r,"idx","idx"),g(t,e,r,"smooth","smooth");const a=t.getVisitorParamsState().get("types").length-1;r.offsetChart=a;let c=t.getVisitorParamsState().get("series");return c||(c=[],t.getVisitorParamsState().set("series",c)),c.push(r),r}parseTitleRangeOrValue(t,e,s){const r=t.evaluate("tx/strRef/f",e);if(null!==r){const e=r.firstChild.nodeValue;t.setToPath(s,"title.range",e)}else{const r=t.evaluate("tx/v",e);null!==r&&t.setToPath(s,"title.text.simpleRun",r.firstChild.nodeValue)}}parsePointsAsString(t,e){let s="{";const r=t.getValAttrAsInteger("ptCount",e),o=t.evaluate("pt",e),i=[];for(let s=0;o&&r&&s<r;s++){let r=null,o=t.evaluate("pt[@idx='"+s+"']/v",e);o instanceof Node&&(r=o.textContent),i[s]=r}for(let t=0;t<i.length;t++)t>0&&(s+=","),void 0!==i[t]&&(s+=i[t]);return s+="}",s}afterVisit(t,e,s){N(t,e,s);let r=t.getFromPath(s,"points");if(r){const e=Object.keys(r);for(let o=0;o<e.length;o++){const i=e[o],n=t.getFromPath(r,i);if(!n)continue;let l=t.getFromPath(n,"markers");l&&(t.setToPath(s,"markers.points."+i,l),delete n.markers)}}}}class T{DataPointVisitor(){}visit(t,e,s){let r=t.getFromPath(s,"points"),o=null;r?o=r:(o={},t.setToPath(s,"points",o));let i={},n=t.getValAttrAsString("idx",e);return null!==n&&(o[n]=i),g(t,e,i,"bubble3D","bubble3D"),d(t,e,i,"explosion","explosion"),N(t,e,i),i}}class S{visit(t,e,s){const r=e.parentNode.localName;if("ser"===r||"dPt"===r){const r={},o=t.getValAttrAsString("size",e);null!==o&&(r.size=o);const i=t.getValAttrAsString("symbol",e);return i&&(r.type=i),s.markers=r,r}return null}}class V{visit(t,e,s){let r={};this.parseScaling(t,e,r),m(t,e,r,"majorUnit","majorUnits"),m(t,e,r,"minorUnit","minorUnits"),g(t,e,r,"delete","shown"),this.parseOrientation(t,e,r),this.parseNumFormat(t,e,r),p(t,e,r,"majorTickMark","majorTickMarks"),p(t,e,r,"minorTickMark","minorTickMarks"),p(t,e,r,"crosses","crosses"),m(t,e,r,"crossesAt","crosses"),p(t,e,r,"crossBetween","crossBetween"),this.parseLabelAlign(t,e,r),d(t,e,r,"lblOffset","labelOffset"),p(t,e,r,"tickLblPos","labelPosition");const o=t.getValAttrAsInteger("noMultiLvlLbl",e);r.labelMultiLevel=null!==o&&0===o,d(t,e,r,"tickMarkSkip","tickMarkSkip"),d(t,e,r,"tickLblSkip","labelInterval"),this.parseDisplayCustOrBuiltInUnit(e,t,r),this.parseTimeUnits(t,e,r,"majorUnitDates","majorTimeUnit","majorUnit"),this.parseTimeUnits(t,e,r,"minorUnitDates","minorTimeUnit","minorUnit"),p(t,e,r,"baseTimeUnit","baseUnitDates"),t.getVisitorParamsState().get("axes")||t.getVisitorParamsState().set("axes",new Map);const i=t.getValAttrAsString("axId",e);return t.getVisitorParamsState().get("axes").set(i,r),r}parseTimeUnits(t,e,s,r,o,i){const n={};let l=t.getValAttrAsString(o,e);if(null!==l){n.dem=l;let s=t.getValAttrAsString(i,e);n.amt=s}Object.keys(n).length>0&&(s[r]=n)}parseDisplayCustOrBuiltInUnit(t,e,s){let r=e.getValAttrAsString("dispUnits/builtInUnit",t);r||(r=e.getValAttrAsString("dispUnits/custUnit",t)),r&&(s.displayUnits=r)}parseLabelAlign(t,e,s){let r=t.getValAttrAsString("lblAlgn",e);null!==r&&("ctr"===r?s.labelAlign="center":"l"===r?s.labelAlign="left":"r"===r&&(s.labelAlign="right"))}parseOrientation(t,e,s){const r=t.getValAttrAsString("AxPos",e);null!==r&&("b"===r?s.orientation="bottom":"l"===r?s.orientation="left":"r"===r?s.orientation="right":"t"===r&&(s.orientation="top"))}parseNumFormat(t,e,s){const r={},o=t.evaluate("numFmt",e);null!==o&&(o.hasAttribute("formatCode")&&(r.formatCode=o.getAttribute("formatCode")),o.hasAttribute("sourceLinked")&&(r.sourceLinked="1"===o.getAttribute("sourceLinked"))),Object.keys(r).length>0&&(s.labels=r)}parseScaling(t,e,s){const r=t.getValAttrAsString("scaling/orientation",e);null!==r&&(s.inverted="minMax"!==r);const o=t.getValAttrAsFloat("scaling/logBase",e);null!==o&&(s.logBase=o,s.scaleType="log"),m(t,e,s,"scaling/max","max"),m(t,e,s,"scaling/min","min")}afterVisit(t,e,s){s.fill&&s.labels&&(s.labels.fill=s.fill,delete s.fill);let r=t.getValAttrAsBoolean("delete",e);null!==r&&(t.setToPath(s,"labels.shown",!0!==r),t.setToPath(s,"shown",!0!==r));const o=t.getFromPath(s,"dispUnits.displayUnitsLabel");o&&(t.setToPath(s,"displayUnitsLabel",o),delete s.dispUnits);const i=t.evaluate("title",e);t.setToPath(s,"title.shown",null!==i);const n=t.evaluate("minorGridlines",e);t.setToPath(s,"gridLinesMinor.shown",null!==n);const l=t.evaluate("majorGridlines",e);t.setToPath(s,"gridLinesMajor.shown",null!==l)}}class x{constructor(t="text"){this._jsonKey=t}getTextPath(){return this._jsonKey}visit(t,e,s){let r=t.getFromPath(s,this.getTextPath());return r||(r={}),this.parseTextElement(t,e,r,!1),Object.keys(r).length>0&&t.setToPath(s,this.getTextPath(),r),s}parseTextElement(t,e,s,r){const o=t.evaluate("p/pPr/defRPr",e)??t.evaluate("defRPr",e);o&&(this.parseTextProperties(t,o,s),(new F).visit(t,o,s));let i=[],n=t.evaluate("p/r",e)??t.evaluate("r",e);const l=e=>{const s={};let r=t.evaluate("t",e);const o=t.evaluate("rPr",e);o&&this.parseTextProperties(t,o,s),r?s.text=r.firstChild.textContent??"":e.textContent&&(s.text=e.textContent??""),i.push(s)};if(void 0!==n?.length)for(let t=0;n&&t<n.length;t++)l(n.item(t));else l(n||e);i.length>0&&(s.runs=i);const a=t.evaluate("bodyPr",e);a&&h(a,s)}parseTextProperties(t,e,r){if(!e)return;e.hasAttribute("sz")&&(r.size=parseFloat(e.getAttribute("sz"))/100),e.hasAttribute("b")&&(r.weight="1"===e.getAttribute("b")?700:400),e.hasAttribute("i")&&(r.italic="1"===e.getAttribute("i")),e.hasAttribute("u")&&(r.underline=e.getAttribute("u")),e.hasAttribute("strike")&&(r.strike=e.getAttribute("strike"));const o=t.evaluate("latin",e);if(o&&!o.getAttribute("typeface").startsWith("+")){const t=r.font??{};if(o.hasAttribute("typeface")&&(t.family=o.getAttribute("typeface")),o.hasAttribute("panose")){const e=o.getAttribute("panose");e&&(t.fallbacks=[s.IFont.getPanoseFallback(e)])}o.hasAttribute("pitchFamily")&&(t.pitch=o.getAttribute("pitchFamily")),o.hasAttribute("charset")&&(t.charset=o.getAttribute("charset")),Object.keys(t).length>0&&(r.font=t)}}}class k{visit(t,e,s){let r=t.getVisitorParamsState().get("series")[t.getValAttrAsInteger("idx",e)];if(r){let s=t.getFromPath(r,"title");s||(s={},t.setToPath(r,"title",s));let o=s,i=t.getValAttrAsBoolean("delete",e);return null!==i&&(o.shown=!i),o}return s}}class I{visit(t,e,s){const r={};return g(t,e,r,"overlay","overlay"),p(t,e,r,"legendPos","position"),s.legend=r,r}}class L extends F{visit(t,e,s){const r=this.processFill(t,e,s);Object.keys(r).length>0&&(s.fillNegative=r);const o=this.processStroke(t,e,s);return Object.keys(o).length>0&&(s.strokeNegative=o),s}}class B extends x{constructor(t="title"){super(t)}parseTitleRangeOrValue(t,e,s){let r=t.evaluate("tx/strRef/f",e)??null;if(r){const e=r.firstElementChild.nodeValue;t.setToPath(s,"range",e)}}visit(t,e,s){const r={};g(t,e,r,"overlay","overlay"),s[this._jsonKey]=r;let o=t.getFromPath(r,this.getTextPath());o||(o={}),this.parseTitleRangeOrValue(t,e,r);const i=t.evaluate("txPr",e);i&&this.parseTextElement(t,i,o,!1);const n=t.evaluate("tx/rich",e);return n&&this.parseTextElement(t,n,o,!0),Object.keys(o).length>0&&t.setToPath(r,this.getTextPath(),o),r}afterVisit(t,e,s){if(s?.text){const t=s.text?.rotation??null;null!==t&&(s.rotation=parseInt(t),delete s.title.rotation)}}}class j{visit(t,e,s){const r=t.evaluate("manualLayout",e);if(r){let e={};m(t,r,e,"x","x"),m(t,r,e,"y","y"),m(t,r,e,"w","w"),m(t,r,e,"h","h"),p(t,r,e,"xMode","xMode"),p(t,r,e,"yMode","yMode"),p(t,r,e,"wMode","wMode"),p(t,r,e,"hMode","hMode"),Object.keys(e).length>0&&(s.manualLayout=e)}return s}}class _{visit(t,e,s){return s.name=e.getAttribute("name"),s}}class R extends v{visit(t,e,s){const r={};r.name=e.getAttribute("name");const o=e.childNodes;for(let s=0;s<o.length;s++){const i=o.item(s);if(1===i.nodeType){let s=i.localName;const o=t.evaluate(s,e),n=this.processAdjColor(t,o);r[s]=n}}return Object.keys(r).length>0&&(s.colors=r),r}}class E{visit(t,e,s){const r={};r.name=e.getAttribute("name");const o=t.evaluate("majorFont",e),i=this.processFontElement(t,o,{});r.majorFont=i.family,i.fallbacks&&(r.majorFallbacks=i.fallbacks);const n=t.evaluate("minorFont",e),l=this.processFontElement(t,n,{});return r.minorFont=l.family,i.fallbacks&&(r.minorFallbacks=l.fallbacks),s.fonts=r,r}processFontElement(t,e,r){if(!e)return;const o=t.evaluate("latin",e);if(!o)return;const i=o.getAttribute("typeface");i&&(r.family=i);const n=o.getAttribute("panose");return n&&(r.fallbacks=[s.IFont.getPanoseFallback(n)]),r}}class Y{visit(t,e,s){if(!e)return;const r={},o=e.getAttribute("r:id");if(o){const e=t.getRef(o);"string"==typeof e&&(r.address=e)}return t.copyFromAttribute(e,"tooltip",r),t.copyFromAttribute(e,"history",r,"history",t.BOOLEAN_COPY),t.copyFromAttribute(e,"tgtFrame",r,"target"),s.hyperlink=r,r}}class D{visit(t,e,s){if(!e)return;const r={};return t.copyFromAttribute(e,"ref",r),this.processFilterColumns(t,e,r),Object.keys(r).length>0&&(s.filter=r),r}processColorFilter(t,e){const r={type:s.IAutoFilter.Type.Color};return t.copyFromAttribute(e,"cellColor",r,"cellColor",t.BOOLEAN_COPY),t.copyFromAttribute(e,"dxfId",r,"styleId",t.INT_COPY),r}processCustomFilter(t,e){const s={};return t.copyFromAttribute(e,"operator",s,"operator",t.BOOLEAN_COPY),t.copyFromAttribute(e,"val",s,"val"),s}processCustomFilters(t,e){const r={type:s.IAutoFilter.Type.Custom};t.copyFromAttribute(e,"and",r,"and",t.BOOLEAN_COPY);const o=e.childNodes;r.filters=[];for(let e=0;e<o.length;e++){const s=o.item(e);if(1!==s.nodeType)continue;let i=null;"customFilter"===s.localName&&(i=this.processCustomFilter(t,s)),i&&r.filters.push(i)}return r}processDynamicFilter(t,e){const r={type:s.IAutoFilter.Type.Dynamic};return t.copyFromAttribute(e,"type",r,"dynamicType"),t.copyFromAttribute(e,"val",r,"val",t.INT_COPY),t.copyFromAttribute(e,"maxVal",r,"maxVal",t.INT_COPY),r}processDateGroupItem(t,e){const s={};return t.copyFromAttribute(e,"dateTimeGrouping",s,"group"),t.copyFromAttribute(e,"day",s,"day",t.INT_COPY),t.copyFromAttribute(e,"hour",s,"hour",t.INT_COPY),t.copyFromAttribute(e,"minute",s,"minute",t.INT_COPY),t.copyFromAttribute(e,"month",s,"month",t.INT_COPY),t.copyFromAttribute(e,"second",s,"second",t.INT_COPY),t.copyFromAttribute(e,"year",s,"year",t.INT_COPY),s}processFilterItem(t,e){if(e.hasAttribute("val"))return e.getAttribute("val")}processFilters(t,e){const r={type:s.IAutoFilter.Type.Items};t.copyFromAttribute(e,"blank",r,"blank",t.BOOLEAN_COPY),t.copyFromAttribute(e,"calendarType",r,"calendarType");let o=[],i=[];const n=e.childNodes;for(let e=0;e<n.length;e++){const s=n.item(e);if(1===s.nodeType)if("dateGroupItem"===s.localName){const e=this.processDateGroupItem(t,s);e&&o.push(e)}else if("filter"===s.localName){const e=this.processFilterItem(t,s);void 0!==e&&i.push(e)}}return o.length>0&&(r.dateGroups=o),i.length>0&&(r.items=i),r}processIcon(t,e){const r={type:s.IAutoFilter.Type.Icon};return t.copyFromAttribute(e,"iconId",r,"iconId",t.INT_COPY),t.copyFromAttribute(e,"iconSet",r),r}processTop10(t,e){const r={type:s.IAutoFilter.Type.Top10};return t.copyFromAttribute(e,"filterVal",r,"filterVal",t.FLOAT_COPY),t.copyFromAttribute(e,"percent",r,"percent",t.BOOLEAN_COPY),t.copyFromAttribute(e,"top",r,"top",t.BOOLEAN_COPY),t.copyFromAttribute(e,"val",r,"val",t.FLOAT_COPY),r}processFilterCriteria(t,e,s){if(!e)return;const r=e.childNodes,o=[];for(let e=0;e<r.length;e++){const s=r.item(e);if(1!==s.nodeType)continue;let i=null;"colorFilter"===s.localName?i=this.processColorFilter(t,s):"customFilters"===s.localName?i=this.processCustomFilters(t,s):"dynamicFilter"===s.localName?i=this.processDynamicFilter(t,s):"filters"===s.localName?i=this.processFilters(t,s):"iconFilter"===s.localName?i=this.processIcon(t,s):"top10"===s.localName&&(i=this.processTop10(t,s)),i&&o.push(i)}return o.length>0&&(s.criteria=o),o}processFilterColumn(t,s){if(!s)return null;const r={};if(!s.hasAttribute("colId"))return;r.offset=parseInt(s.getAttribute("colId"));let o=!1;return s.hasAttribute("hiddenButton")&&(o=e.b(s.getAttribute("hiddenButton"))),o&&(r.hiddenButton=!0),s.hasAttribute("showButton")&&(r.showButton=e.b(s.getAttribute("showButton"))),this.processFilterCriteria(t,s,r),r}processFilterColumns(t,e,s){if(!e)return;const r=e.childNodes,o=[];for(let e=0;e<r.length;e++){const s=r.item(e);if(1===s.nodeType&&"filterColumn"===s.localName){const e=this.processFilterColumn(t,s);e&&o.push(e)}}return o.length>0&&(s.fields=o),o}}class M{visit(t,r,o){if(!r)return;const i={};if(t.copyFromAttribute(r,"ref",i),r.hasAttribute("caseSensitive")){const t=e.b(r.getAttribute("caseSensitive"));i.collatorOptions=t?s.Sort.CaseSensitiveOptions:s.Sort.CaseInsensitiveOptions}const n=r.getAttribute("sortMethod");null!=n&&"none"!==n&&("stroke"===n?i.collatorOptions={...i.collatorOptions,collation:"stroke"}:"pinYin"===n&&(i.collatorOptions={...i.collatorOptions,collation:"pinyin"})),r.hasAttribute("columnSort")&&e.b(r.getAttribute("columnSort"))&&(i.orientation=s.IRange.Orientation.Column);const l=s.AddressUtils.fastStringToRange(i.ref);return this.processSortConditions(t,r,i,l),Object.keys(i).length>0&&(o.sort=i),i}processSortCondition(t,r,o){if(!r)return null;const i={};if(r.hasAttribute("ref")){if(r.hasAttribute("ref")){const t=r.getAttribute("ref"),e=s.AddressUtils.fastStringToRange(t);i.offset=o?e.colStart-o.colStart:e.colStart}return i.reverse=!1,r.hasAttribute("descending")&&(i.reverse=e.b(r.getAttribute("descending"))),t.copyFromAttribute(r,"sortBy",i,"sortOn"),t.copyFromAttribute(r,"dxfId",i),t.copyFromAttribute(r,"iconSet",i),t.copyFromAttribute(r,"customList",i),i}console.warn("no ref for sort conditional",t.getPath())}processSortConditions(t,e,s,r){if(!e)return;const o=e.childNodes,i=[];for(let e=0;e<o.length;e++){const s=o.item(e);if(1===s.nodeType&&"sortCondition"===s.localName){const e=this.processSortCondition(t,s,r);e&&i.push(e)}}return i.length>0&&(s.fields=i),i}}class U{visit(t,e,s){}processDataBarColor(t,s,r,o,i="dk1"){if(!s)return;const n=e.d(t=>s.getAttribute(t),i);return n&&(r[o]=n),r}processFonts(t,e,s){if(!e)return;const r=e.childNodes;let o=0;for(let e=0;e<r.length;e++){const i=r.item(e);if(1===i.nodeType&&"font"===i.localName){const e={};this.processFont(t,i,e),s[o++]=e}}return s}processFont(t,e,r){t.getValAttrAsBoolean("b",e,!0)&&(r.weight=700),t.getValAttrAsBoolean("i",e,!0)&&(r.style=s.IFont.Style.Italic),t.getValAttrAsBoolean("strike",e,!0)&&(r.strike=!0);const o=t.evaluate("u",e);if(o){const t=o.getAttribute("val");r.underline=t||s.IFont.UnderlineStyle.Single}p(t,e,r,"vertAlign","verticalAlign"),"superscript"===r.verticalAlign?r.verticalAlign=s.IFont.VerticalAlignment.Super:"subscript"===r.verticalAlign&&(r.verticalAlign=s.IFont.VerticalAlignment.Sub),m(t,e,r,"sz","size");const i=t.evaluate("color",e);this.processDataBarColor(t,i,r,"fill"),r.fill||(r.fill="dk1"),p(t,e,r,"name","family"),p(t,e,r,"rFont","family");const n=t.evaluate("family",e);if(n){const t=n.getAttribute("val");if(t)switch(t){case"1":r.fallbacks=["serif"];break;case"2":r.fallbacks=["sans-serif"];break;case"3":r.fallbacks=["monospace"];break;case"4":r.fallbacks=["cursive"];break;case"5":r.fallbacks=["fantasy"]}}return p(t,e,r,"scheme","scheme"),g(t,e,r,"shadow","shadow",!0),g(t,e,r,"outline","outline",!0),t.getValAttrAsBoolean("condense",e,!0)&&(r.letterSpacing=-1),t.getValAttrAsBoolean("extend",e,!0)&&(r.letterSpacing=1),p(t,e,r,"charset","charset"),r}processFills(t,e,s){if(!e)return;const r=e.childNodes;let o=0;for(let e=0;e<r.length;e++){const i=r.item(e);1===i.nodeType&&"fill"===i.localName&&this.processFill(t,i,s,o++)}return s}processFill(t,e,r,o){const i={type:s.IFill.Type.None},n=e.childNodes;let l=!1;for(let e=0;!l&&e<n.length;e++){const s=n.item(e);1===s.nodeType&&("gradientFill"===s.localName?(this.processGradientFill(t,s,i),l=!0):"patternFill"===s.localName&&(this.processPatternFill(t,s,i),l=!0))}return r[o]=i,r}processGradientFill(t,e,r){if(!e)return;r.type=s.IFill.Type.Gradient;const o=[];r.stops=o,r.angle=90+(e.hasAttribute("degree")?parseFloat(e.getAttribute("degree")):0);const i=e.getAttribute("type");i&&(r.gradientType=i);const n=t=>{if(!t)return 0;const e=parseFloat(t);return isNaN(e)?0:e};(e.hasAttribute("left")||e.hasAttribute("top")||e.hasAttribute("right")||e.hasAttribute("bottom"))&&(r.fillTo={left:n(e.getAttribute("left")),top:n(e.getAttribute("top")),right:n(e.getAttribute("right")),bottom:n(e.getAttribute("bottom"))});const l=e.childNodes;for(let e=0;e<l.length;e++){const s=l.item(e);if(1===s.nodeType&&"stop"===s.localName){const e={};o.push(e);const r=parseFloat(s.getAttribute("position"));e.offset=r;const i=t.evaluate("color",s);this.processDataBarColor(t,i,e,"color")}}return r}processPatternFill(t,e,r){if(!e)return;const o=t.getVisitorParamsState().get("processingDXFs"),i=e.getAttribute("patternType")||(o?s.IFill.BuiltInSheetPattern.Solid:s.IFill.BuiltInSheetPattern.None);if(i===s.IFill.BuiltInSheetPattern.None)return{none:!0};r.type=s.IFill.Type.Pattern,i&&(r.patternType=i);let n,l="foreground",a="background";const c=r.patternType===s.IFill.BuiltInSheetPattern.Solid&&o;if(c){n="lt1";const t=l;l=a,a=t}const u=t.evaluate("fgColor",e);this.processDataBarColor(t,u,r,l,n);const h=t.evaluate("bgColor",e);return this.processDataBarColor(t,h,r,a,n),c&&!r.foreground&&(r.foreground=n),r}processBorders(t,e,s,r){if(!e)return;const o=e.childNodes;let i=0;for(let e=0;e<o.length;e++){const n=o.item(e);1===n.nodeType&&"border"===n.localName&&this.processBorder(t,n,s,i++,r)}return s}processBorder(t,e,r,o,i){if(!e)return;const n={};return this.processBorderStroke(t,e,n,s.IBorder.Edge.Left),this.processBorderStroke(t,e,n,s.IBorder.Edge.Right),i?(n.right||n.left)&&(n.right?n.vertical={...n.right}:n.vertical={...n.left}):this.processBorderStroke(t,e,n,s.IBorder.Edge.Vertical),this.processBorderStroke(t,e,n,s.IBorder.Edge.Top),this.processBorderStroke(t,e,n,s.IBorder.Edge.Bottom),i?(n.bottom||n.top)&&(n.right?n.horizontal={...n.bottom}:n.horizontal={...n.top}):this.processBorderStroke(t,e,n,s.IBorder.Edge.Horizontal),r[o]=n,r}processBorderStroke(t,e,s,r){if(!e)return;const o=t.evaluate(r,e);if(!o)return;const i={};o.hasAttribute("style")&&(i.style=o.getAttribute("style"));const n=t.evaluate("color",o);return n&&this.processDataBarColor(t,n,i,"color"),Object.keys(i).length>0?s[r]=i:null}}class z extends U{visit(t,e,r){this.processNumFmts(t,t.evaluate("numFmts",e),null),t.getVisitorParamsState().set("colorsToProcess",new Set);const o={fills:{},fonts:{},borders:{}};this.processFonts(t,t.evaluate("fonts",e),o.fonts),this.processFills(t,t.evaluate("fills",e),o.fills),this.processBorders(t,t.evaluate("borders",e),o.borders,!0),o.fills[0]={type:s.IFill.Type.None},o.fills[1]={type:s.IFill.Type.Pattern,patternType:s.IFill.BuiltInSheetPattern.Gray125},o.borders[0]={};const i=[];this.processXFs(t,t.evaluate("cellStyleXfs",e),i,o,null,!1);const n=new Map;if(i.length>0){const s=[];this.processCellStyles(t,t.evaluate("cellStyles",e),s,i,n),r.named=s}const l=[];this.processXFs(t,t.evaluate("cellXfs",e),l,o,n),Object.keys(l).length>0&&(r.direct=l);const a=[];return this.processDXFs(t,t.evaluate("dxfs",e),a),this.processTableStyles(t,t.evaluate("tableStyles",e),r,a),this.processIndexColors(t,t.evaluate("colors/indexedColors",e),r),this.processMruColors(t,t.evaluate("colors/mruColors",e),r),r}processIndexColors(t,e,s){if(!e)return;const r=[],o=e.childNodes;for(let e=0;e<o.length;e++){const s=o.item(e);if(1===s.nodeType&&"rgbColor"===s.localName){const e={color:null};this.processDataBarColor(t,s,e,"color"),e.color&&r.push(e.color)}}s.indexedColors=r}processMruColors(t,e,s){if(!e)return;const r=[],o=e.childNodes;for(let e=0;e<o.length;e++){const s=o.item(e);if(1===s.nodeType&&"color"===s.localName){const e={color:null};this.processDataBarColor(t,s,e,"color"),e.color&&r.push(e.color)}}r.length>0&&(s.mruColors=r)}processNumFmts(t,e,s){if(!e)return;const r=new Map;if(t.getVisitorParamsState().set("numFmts",r),!e)return;const o=e.childNodes;for(let t=0;t<o.length;t++){const e=o.item(t);if(1===e.nodeType&&"numFmt"===e.localName){const t=e.getAttribute("numFmtId"),s=e.getAttribute("formatCode");if(t&&s){const e=s.replace(/\\(.)/g,"$1");r.set(parseInt(t),e)}}}}processXFs(t,e,s,r,o=null,i=!0){if(!e)return;const n=e.childNodes;for(let e=0;e<n.length;e++){const l=n.item(e);if(1===l.nodeType&&"xf"===l.localName){const e={};this.processXF(t,l,e,r,o,i),s.push(e)}}}processXF(t,r,o,i,n,l){if(!r)return;const a=r.getAttribute("xfId");if(a&&n){const t=n.get(parseInt(a));t&&t!==s.IStyle.BuiltInName.Normal&&(o.named=t)}const c=t=>!(!l&&r.hasAttribute(t))||e.b(r.getAttribute("applyFont"));if(c("applyFont")){const t=i.fonts[r.getAttribute("fontId")];t&&(o.font=t)}if(c("applyFill")){const t=i.fills[r.getAttribute("fillId")];t&&Object.keys(t).length>0&&(o.fill=t)}if(c("applyBorder")){const t=i.borders[r.getAttribute("borderId")];t&&Object.keys(t).length>0&&(o.border=t)}if(c("applyNumberFormat")){const e=r.getAttribute("numFmtId");if(e){const s=parseInt(e);let r;const i=t.getVisitorParamsState();if(i){const t=i.get("numFmts");t&&(r=t.get(s)),o.numberFormat=r??s}else console.warn("no visitor params state")}}c("applyAlignment")&&this.processAlignment(t,t.evaluate("alignment",r),o),c("applyProtection")&&this.processProtection(t,t.evaluate("protection",r),o);const u=e.b(r.getAttribute("quotePrefix"));u&&(o.quotePrefix=u)}processAlignment(t,r,o){const i={};if(r?.hasAttribute("horizontal")?i.horizontal=r.getAttribute("horizontal"):i.horizontal=s.ITextFrame.HorizontalAlignment.General,r?.hasAttribute("vertical")?i.vertical=r.getAttribute("vertical"):i.vertical=s.ITextFrame.VerticalAlignment.Bottom,r?.hasAttribute("indent")?i.indent=parseInt(r.getAttribute("indent")):i.indent=0,r?.hasAttribute("relativeIndent")?i.relativeIndent=parseInt(r.getAttribute("relativeIndent")):i.relativeIndent=0,e.b(r?.getAttribute("wrapText"))?i.overflow=s.ITextFrame.Overflow.Wrap:i.overflow=s.ITextFrame.Overflow.Visible,e.b(r?.getAttribute("shrinkToFit"))&&(i.overflow=s.ITextFrame.Overflow.Shrink),r?.hasAttribute("textRotation")){let t=parseFloat(r.getAttribute("textRotation"));t>0&&t<=90?t=360-t:t>90&&t<=180?t-=90:255===t&&(t=0,i.stacked=!0),i.rotation=t}else i.rotation=0;r?.hasAttribute("justifyLastLine")&&(i.justifyLastLine=e.b(r.getAttribute("justifyLastLine")));const n=r?.getAttribute("readingOrder");return n&&("0"===n?i.readingDirection=s.ITextFrame.ReadingDirection.Auto:"1"===n?i.readingDirection=s.ITextFrame.ReadingDirection.LeftToRight:"2"===n?i.readingDirection=s.ITextFrame.ReadingDirection.RightToLeft:console.warn(`invalid readingOrder: ${n}`)),Object.keys(i).length>0&&(o.alignment=i),o}processProtection(t,s,r){if(!s)return;const o={},i=s.getAttribute("locked");i&&!e.b(i)&&(o.edit=!0);const n=s.getAttribute("hidden");return n&&e.b(n)&&(o.formulaHidden=!0),Object.keys(o).length>0&&(r.protection=o),r}processDXF(t,e,s){if(!e)return;const r=e.childNodes;for(let e=0;e<r.length;e++){const o=r.item(e);if(1===o.nodeType&&"font"===o.localName){const e={};this.processFont(t,o,e),s.font=e}else if(1===o.nodeType&&"fill"===o.localName){const e=[];this.processFill(t,o,e,0),e.length>0&&e[0]&&(s.fill=e[0])}else if(1===o.nodeType&&"border"===o.localName){const e=[];this.processBorder(t,o,e,0,!1),e.length>0&&e[0]&&(s.border=e[0])}}}processDXFs(t,e,s){if(!e)return;t.getVisitorParamsState().set("processingDXFs",!0);const r=new Map;t.getVisitorParamsState().set("dxfs",r);const o=e.childNodes;for(let e=0;e<o.length;e++){const i=o.item(e);if(1===i.nodeType&&"dxf"===i.localName){const e={};this.processDXF(t,i,e);const o=s.length;r.set(o,e),s.push(e)}}t.getVisitorParamsState().delete("processingDXFs")}processTableStyle(t,s,r,o,i=!1){const n=s.getAttribute("name"),l={name:n};s.hasAttribute("table")&&(l.table=e.b(s.getAttribute("table"))),s.hasAttribute("pivot")&&(l.pivot=e.b(s.getAttribute("pivot"))),i&&!l.pivot&&o.unshift(null);const a=s.childNodes;for(let t=0;t<a.length;t++){const e=a.item(t);if(1===e.nodeType&&"tableStyleElement"===e.localName){const t=e.getAttribute("type"),s=e.getAttribute("dxfId");let r=o?.[s];r||(console.warn("invalid dfx id",s),r={}),l[t]=r;let i=null;e.hasAttribute("size")&&(i=parseInt(e.getAttribute("size"))),i&&!isNaN(i)&&(r.size=i)}}delete l.name,r[n]=l}processTableStyles(t,e,s,r,o){if(!e)return;const i={},n=e.getAttribute("defaultTableStyle");n&&(i.defaultTableStyle=n);const l=e.getAttribute("defaultPivotStyle");l&&(i.defaultPivotStyle=l);const a=e.childNodes,c={};for(let e=0;e<a.length;e++){const s=a.item(e);1===s.nodeType&&"tableStyle"===s.localName&&this.processTableStyle(t,s,c,r,o)}return Object.keys(c).length>0&&(i.styles=c),Object.keys(i).length>0&&(s.tables=i),s}processCellStyles(t,s,r,o,i){if(!s)return;const n=s.childNodes;for(let t=0;t<n.length;t++){const s=n.item(t);if(1===s.nodeType&&"cellStyle"===s.localName){const t=parseInt(s.getAttribute("xfId")),n=s.getAttribute("name");if(i.set(t,n),!o[t])continue;const l={name:n,style:o[t]};s.getAttribute("hidden")&&(l.hidden=e.b(s.getAttribute("hidden"))),s.getAttribute("iLevel")&&(l.iLevel=parseInt(s.getAttribute("iLevel"))),r.push(l)}}}afterVisit(t,e,s){}}class G extends U{visit(t,e,s){return this.processSheetRefs(t,t.evaluate("sheets",e),s),this.processBookViews(t,t.evaluate("bookViews",e),s),this.processDefinedNames(t,t.evaluate("definedNames",e),s),this.processCalcPr(t,t.evaluate("calcPr",e),s),this.processWorkbookProtection(t,t.evaluate("workbookProtection",e),s),this.processWorkbookPr(t,t.evaluate("workbookPr",e),s),s}processPassword(t,e,s,r="password"){if(!e)return;const o={};t.copyFromAttribute(e,"algorithmName",o,"algorithmName"),t.copyFromAttribute(e,"hashValue",o,"hashValue"),t.copyFromAttribute(e,"saltValue",o,"saltValue",t.BOOLEAN_COPY),t.copyFromAttribute(e,"spinCount",o,"spinCount",t.INT_COPY),Object.keys(o).length>0&&(s[r]=o)}processWorkbookProtection(t,e,s){if(!e)return;const r={};this.processPassword(t,t.evaluate("workbookPassword",e),r),this.processPassword(t,t.evaluate("revisionsPassword",e),r,"revisionsPassword");const o=t=>!0!==t&&"1"!==t&&"on"!==t&&"true"!==t&&(!1===t||"0"===t||"off"===t||"false"===t||null);return t.copyFromAttribute(e,"lockStructure",r,"structure",o),t.copyFromAttribute(e,"lockWindows",r,"windows",o),t.copyFromAttribute(e,"lockRevision",r,"revision",o),s.protection=r,s}processCalcPr(t,e,s){e&&(s.calc={})}processSheetRefs(t,e,s){if(!e)return;const r=[],o=e.childNodes;for(let e=0;e<o.length;e++){const s=o.item(e);1===s.nodeType&&"sheet"===s.localName&&this.processSheetRef(t,s,r)}s.sheets=r}processSheetRef(t,e,s){const r={};t.copyFromAttribute(e,"name",r,"name"),t.copyFromAttribute(e,"state",r,"visibility");const o=e.getAttribute("r:id"),i=t.getRef(o);i&&(r.sheet=i),s.push(r)}processBookViews(t,e,s){if(!e)return;const r=e.childNodes;let o=0;for(let i=0;o<1&&i<e.childNodes.length;i++){const e=r.item(i);1===e.nodeType&&"workbookView"===e.localName&&(this.processWorkbookView(t,e,s),o++)}}processWorkbookView(t,e,s){if(!e)return;const r={};t.copyFromAttribute(e,"activeTab",r,"activeSheetId",[t.INT_COPY,t=>t+1]),e.hasAttribute("activeTab")||(r.activeSheetId=1),t.copyFromAttribute(e,"showHorizontalScroll",r,"showHorizontalScrollbar",t.BOOLEAN_COPY),t.copyFromAttribute(e,"showVerticalScroll",r,"showVerticalScrollbar",t.BOOLEAN_COPY),t.copyFromAttribute(e,"showSheetTabs",r,"showTabs",t.BOOLEAN_COPY),t.copyFromAttribute(e,"tabRatio",r,"tabRatio",[t.FLOAT_COPY,t=>t]),Object.keys(r).length>0&&(s.view=r)}processDefineName(t,e,s,r){if(!e)return;const o={},i=e.firstChild;if(i&&3===i.nodeType&&(o.ref=i.textContent),t.copyFromAttribute(e,"name",o),t.copyFromAttribute(e,"comment",o),t.copyFromAttribute(e,"hidden",o,"hidden",t.BOOLEAN_COPY),e.hasAttribute("localSheetId")){const t=e.getAttribute("localSheetId");if(!r[t]?.name)return void console.warn(`Defined name '${e.getAttribute("name")}' references a sheet with localSheetId '${t}' which does not exist.`);o.scope=r[t].name}t.copyFromAttribute(e,"customMenu",o),t.copyFromAttribute(e,"description",o),t.copyFromAttribute(e,"statusBar",o),t.copyFromAttribute(e,"help",o),t.copyFromAttribute(e,"shortcutKey",o),t.copyFromAttribute(e,"function",o,"function",t.BOOLEAN_COPY),t.copyFromAttribute(e,"functionGroupId",o,"functionGroupId",t.INT_COPY),t.copyFromAttribute(e,"publishToServer",o,"publishToServer",t.BOOLEAN_COPY),t.copyFromAttribute(e,"vbProcedure",o,"vbProcedure",t.BOOLEAN_COPY),t.copyFromAttribute(e,"xlm",o,"xlm",t.BOOLEAN_COPY),Object.keys(o).length>0&&s.push(o)}processDefinedNames(t,e,s){if(!e)return;const r=[],o=e.childNodes;for(let e=0;e<o.length;e++){const i=o.item(e);1===i.nodeType&&"definedName"===i.localName&&this.processDefineName(t,i,r,s.sheets)}r.length>0&&(s.names=r)}processWorkbookPr(t,e,s){e&&t.copyFromAttribute(e,"date1904",s,"date1904",t.BOOLEAN_COPY)}afterVisit(t,e,s){}}class W{visit(t,e,s){return t.copyFromAttribute(e,"name",s),t.copyFromAttribute(e,"displayName",s),t.copyFromAttribute(e,"ref",s),t.copyFromAttribute(e,"headerRowCount",s,"headerRowCount",t.INT_COPY),t.copyFromAttribute(e,"totalsRowCount",s,"totalsRowCount",t.INT_COPY),this.processTableColumns(t,e,s),this.processTableStyleInfo(t,e,s),s}processTableStyleInfo(t,e,s){if(!e)return;const r=e.childNodes,o={};for(let e=0;e<r.length;e++){const s=r.item(e);1===s.nodeType&&"tableStyleInfo"===s.localName&&(t.copyFromAttribute(s,"name",o),t.copyFromAttribute(s,"showColumnStripes",o,"showColumnStripes",t.BOOLEAN_COPY),t.copyFromAttribute(s,"showFirstColumn",o,"showFirstColumn",t.BOOLEAN_COPY),t.copyFromAttribute(s,"showLastColumn",o,"showLastColumn",t.BOOLEAN_COPY),t.copyFromAttribute(s,"showRowStripes",o,"showRowStripes",t.BOOLEAN_COPY))}Object.keys(o).length>0&&(s.styleOptions=o)}processTableColumn(t,e,s){if(!e)return null;const r=e.childNodes;for(let e=0;e<r.length;e++){const o=r.item(e);if(1===o.nodeType&&"tableColumn"===o.localName){const e={};t.copyFromAttribute(o,"name",e),t.copyFromAttribute(o,"uniqueName",e),s.push(e)}}return s}processTableColumns(t,e,s){const r=e.childNodes,o=[];for(let e=0;e<r.length;e++){const s=r.item(e);1===s.nodeType&&"tableColumns"===s.localName&&this.processTableColumn(t,s,o)}o.length>0&&(s.columns=o)}}class X{visit(t,e,s){return s}}class ${visit(t,e,s){if(!e)return;const r={};return t.copyFromAttribute(e,"editAs",r,"anchorType"),r.anchor={},this.processOffsetCoord(t,t.evaluate("from",e),r.anchor,"from"),this.processOffsetCoord(t,t.evaluate("to",e),r.anchor,"to"),s.movables||(s.movables=[]),s.movables.push(r),r}processOffsetCoord(t,s,r,o){if(!s)return;const i={c:0,r:0,x:0,y:0};return t.evaluate("col",s)&&(i.c=parseInt(t.evaluate("col",s).textContent)),t.evaluate("row",s)&&(i.r=parseInt(t.evaluate("row",s).textContent)),t.evaluate("colOff",s)&&(i.x=e.c(t.evaluate("colOff",s).textContent)),t.evaluate("rowOff",s)&&(i.y=e.c(t.evaluate("rowOff",s).textContent)),"from"===o?r.tl=i:r.br=i,r}}class K{visit(t,e,s){if(!e)return;const r=t.evaluate("*/cNvPr",e);return r&&(t.copyFromAttribute(r,"name",s),t.copyFromAttribute(r,"desc",s),t.copyFromAttribute(r,"hidden",s,"hidden",t.BOOLEAN_COPY),t.copyFromAttribute(r,"id",s)),s}}class H extends K{visit(t,e,s){if(!e)return;s=super.visit(t,e,s);const r=t.evaluate("nvGraphicFramePr/cNvGraphicFramePr",e);if(r){const e=t.evaluate("graphicFrameLocks",r);if(e){e.hasAttribute("noChangeAspect")&&(s.lockAspect="1"===e.getAttribute("noChangeAspect"));const t={};Object.keys(t).length>0&&(s.locks=t)}}let o={type:"graphicFrame",json:{}};const i=t.evaluate("graphic/graphicData",e).childNodes;for(let e=0;e<i.length;e++){const s=i.item(e);if(1===s.nodeType)try{let e=s.localName;"chart"===e&&(e="chart"),o.type=e;const r=s.getAttribute("r:id");r&&(o.json=t.getRef(r))}catch(t){console.warn("Unable to parse graphicFrame",t)}}return o&&(s.content=o),o}}class q extends K{visit(t,e,s){if(!e)return;s=super.visit(t,e,s);const r=t.evaluate("nvSpPr/cNvSpPr",e);if(r){const e=t.evaluate("spLocks",r);if(e){e.hasAttribute("noChangeAspect")&&(s.lockAspect="1"===e.getAttribute("noChangeAspect"));const t={};Object.keys(t).length>0&&(s.locks=t)}}t.warn(`Unable to import '${s.name}', shapes are not supported.`);const o={};return s.content={type:"sp",json:o},o}}class J extends K{visit(t,e,s){if(!e)return;const r=super.visit(t,e,s),o=t.evaluate("nvPicPr/cNvPicPr",e);if(o){t.copyFromAttribute(e,"preferRelativeResize",r,"preferRelativeResize",t.BOOLEAN_COPY);const s=t.evaluate("picLocks",o);if(s){s.hasAttribute("noChangeAspect")&&(r.lockAspect="1"===s.getAttribute("noChangeAspect"));const e={};t.copyFromAttribute(s,"noChangeArrowheads",r,"noChangeArrowheads",t.BOOLEAN_COPY),t.copyFromAttribute(s,"noChangeShapeType",r,"noChangeShapeType",t.BOOLEAN_COPY),t.copyFromAttribute(s,"noEditPoints",r,"noEditPoints",t.BOOLEAN_COPY),t.copyFromAttribute(s,"noAdjustHandles",r,"noAdjustHandles",t.BOOLEAN_COPY),t.copyFromAttribute(s,"noCrop",r,"noCrop",t.BOOLEAN_COPY),t.copyFromAttribute(s,"noGrp",r,"noGrp",t.BOOLEAN_COPY),t.copyFromAttribute(s,"noMove",r,"noMove",t.BOOLEAN_COPY),t.copyFromAttribute(s,"noResize",r,"noResize",t.BOOLEAN_COPY),t.copyFromAttribute(s,"noRot",r,"noRot",t.BOOLEAN_COPY),t.copyFromAttribute(s,"noSelect",r,"noSelect",t.BOOLEAN_COPY),Object.keys(e).length>0&&(r.locks=e)}}const i=t.evaluate("blipFill/blip",e);let n;if(i){const e=i.getAttribute("r:embed")??i.getAttribute("embed");if(!e)return void console.warn("no rId found for blip",i);n=t.getRef(e,!0)}const l={resId:n};return s.content={type:"picture",json:l},r}}class Q extends q{visit(t,e,s){if(!e)return;s=super.visit(t,e,s);const r=t.evaluate("nvGrpSpPr/cNvGrpSpPr",e);if(r){const e=t.evaluate("grpSpLocks",r);if(e){e.hasAttribute("noChangeAspect")&&(s.lockAspect="1"===e.getAttribute("noChangeAspect"));const t={};Object.keys(t).length>0&&(s.locks=t)}}t.warn(`Unable to import '${s.name}', group shapes are not supported.`);const o={};return s.content={type:"grpSp",json:o},o}}class Z extends q{visit(t,e,s){if(!e)return;s=super.visit(t,e,s);const r=t.evaluate("nvCxnSpPr/cNvCxnSpPr",e);if(r){const e=t.evaluate("cxnSpLocks",r);if(e){e.hasAttribute("noChangeAspect")&&(s.lockAspect="1"===e.getAttribute("noChangeAspect"));const t={};Object.keys(t).length>0&&(s.locks=t)}}t.warn(`Unable to import '${s.name}', connection shapes are not supported.`);const o={};return s.content={type:"cxnSp",json:o},o}}const tt="richTypes";class et{visit(t,e,s){let r=t.getVisitorParamsState().get(tt);r||(r=[],t.getVisitorParamsState().set(tt,r));const o=e.childNodes,i=o.length;for(let e=0;e<i;e++){const s=o.item(e);if(1===s.nodeType&&"s"===s.localName){const e={type:s.getAttribute("t")??"n",keys:[]};this.processKeys(t,s,e),r.push(e)}}return s.richTypes=r,r}processKeys(t,e,s){const r=e.childNodes,o=r.length,i=s.keys;for(let t=0;t<o;t++){const e=r.item(t);if(1===e.nodeType&&"k"===e.localName){const t=e.getAttribute("n"),s=e.getAttribute("t");i.push([t,s])}}}}const st="richData";class rt{visit(t,e,s){let r=t.getVisitorParamsState().get("richTypes");if(!r)return void t.warn("RichValueFound but not type.");let o=t.getVisitorParamsState().get(st);o||(o=[],t.getVisitorParamsState().set(st,o));const i=e.childNodes,n=i.length;for(let e=0;e<n;e++){const s=i.item(e);if(1===s.nodeType&&"rv"===s.localName){const e=r[s.getAttribute("s")],i={type:e.type};this.processValues(t,s,i,e);const n=this.mapType(t,i);o.push(n)}}return s.richData=o,o}mapType(t,e){if("_error"===e.type){const r=e.errorType;if(r)try{e=s.FormulaError.getBuiltInById(r+1)}catch(t){}}return e}processValues(t,e,s,r){const o=e.childNodes,i=o.length;r.type;const n=r.keys;for(let e=0;e<i;e++){const r=o.item(e);if(1===r.nodeType&&"v"===r.localName){const o=n[e];if(!o)return void t.warn("Invalid richData");const i=o[0],l=o[1];let a=r.textContent;"i"===l&&(a=Number(a)),s[i]=a}}}}class ot{visit(t,e,s){if(!e)return;const r=[];return this.processAuthors(t,t.evaluate("authors",e),r),r.length>0&&(s.authors=r),s.comments=[],s}processAuthors(t,e,s){if(!e)return;const r=e.childNodes;for(let t=0;t<r.length;t++){const e=r.item(t);if(1===e.nodeType&&"author"===e.localName){const t=e.firstChild;t&&3===t.nodeType&&s.push(t.textContent)}}}}class it{visit(t,e,s){if(!e)return;const r={};return t.copyFromAttribute(e,"ref",r),t.copyFromAttribute(e,"authorId",r,"authorId",t.INT_COPY),r.asNote=!0,s.comments||(s.comments=[]),s.comments.push(r),r}}class nt{visit(t,e,s){if(!e)return;const r=[];return s.comments=r,r}}class lt{visit(t,s,r){if(!s)return;const o={};return t.copyFromAttribute(s,"id",o,"id",e.r),t.copyFromAttribute(s,"personId",o,"personId",e.r),t.copyFromAttribute(s,"ref",o),t.copyFromAttribute(s,"parentId",o,"parentId",e.r),t.copyFromAttribute(s,"dT",o),s.hasAttribute("done")&&(o.done=e.b(s.getAttribute("done"))),r.push(o),o}}class at{visit(t,s,r){const o=[],i=s.childNodes;for(let s=0;s<i.length;s++){const r=i.item(s);if(1===r.nodeType&&"person"===r.localName){const s={};t.copyFromAttribute(r,"id",s,"id",e.r),t.copyFromAttribute(r,"displayName",s),t.copyFromAttribute(r,"userId",s,"userId",e.r),t.copyFromAttribute(r,"providerId",s),o.push(s)}}return o.length>0&&(r.persons=o),o}}const ct={};class ut{constructor(t,e){this.path=t,this.visitor=e}}class ht{constructor(){this.visitorsByXmlTagName=new Map,this.scopedVisitorsByXmlTagName=new Map,this.visitorParamsState=null,this.registerVisitor("Relationships",new u),this.registerVisitor("spPr",new F),this.registerVisitor("txBody",new x),this.registerVisitor("txPr",new x),this.registerVisitor("c:chartSpace",new b),this.registerVisitor("c:chartSpace",new A,"chart"),this.registerVisitor("c:plotArea",new f),this.registerVisitor("c:barChart",new w),this.registerVisitor("c:doughnutChart",new C),this.registerVisitor("c:lineChart",new C),this.registerVisitor("c:ofPieType",new C),this.registerVisitor("c:pieChart",new C),this.registerVisitor("c:scatterChart",new C),this.registerVisitor("c:barChart",new P("dataLabels"),"dLbls"),this.registerVisitor("c:doughnutChart",new P("dataLabels"),"dLbls"),this.registerVisitor("c:lineChart",new P("dataLabels"),"dLbls"),this.registerVisitor("c:ofPieType",new P("dataLabels"),"dLbls"),this.registerVisitor("c:pieChart",new P("dataLabels"),"dLbls"),this.registerVisitor("c:scatterChart",new P("dataLabels"),"dLbls"),this.registerVisitor("c:ser",new O),this.registerVisitor("c:dPt",new T),this.registerVisitor("c:marker",new S),this.registerVisitor("c:catAx",new V),this.registerVisitor("c:valAx",new V),this.registerVisitor("c:dateAx",new V),this.registerVisitor("c:majorGridlines",new c("gridLinesMajor")),this.registerVisitor("c:minorGridlines",new c("gridLinesMinor")),this.registerVisitor("c:chartSpace",null,"txPr"),this.registerVisitor("c:catAx",new x("labels.text"),"txPr"),this.registerVisitor("c:valAx",new x("labels.text"),"txPr"),this.registerVisitor("c:dateAx",new x("labels.text"),"txPr"),this.registerVisitor("c:legend",new I),this.registerVisitor("c:legend",new x("labels.text"),"txPr"),this.registerVisitor("c:legendEntry",new k),this.registerVisitor("c:ser",new L,"extLst/ext/invertSolidFillFmt/spPr"),this.registerVisitor("c:ser",new P("labels"),"dLbls"),this.registerVisitor("c:dLbl",new P("points")),this.registerVisitor("c:title",new B),this.registerVisitor("c:title",null,"tx/rich"),this.registerVisitor("c:title",null,"txPr"),this.registerVisitor("c:layout",new j),this.registerVisitor("c:dispUnits",new c("dispUnits")),this.registerVisitor("c:dispUnitsLbl",new B("displayUnitsLabel")),this.registerVisitor("c:dispUnitsLbl",new x,"tx/rich"),this.registerVisitor("a:theme",new _),this.registerVisitor("a:theme",new R,"themeElements/clrScheme"),this.registerVisitor("a:theme",new E,"themeElements/fontScheme"),this.registerVisitor("autoFilter",new D),this.registerVisitor("sortState",new M),this.registerVisitor("s:workbook",new G),this.registerVisitor("styleSheet",new z),this.registerVisitor("table",new W),this.registerVisitor("hlinkClick",new Y),this.registerVisitor("wsDr",new X),this.registerVisitor("twoCellAnchor",new $),this.registerVisitor("oneCellAnchor",new $),this.registerVisitor("absoluteAnchor",new $),this.registerVisitor("graphicFrame",new H),this.registerVisitor("sp",new q),this.registerVisitor("grpSp",new Q),this.registerVisitor("cxnSp",new Z),this.registerVisitor("pic",new J),this.registerVisitor("rvStructures",new et),this.registerVisitor("rvData",new rt),this.registerVisitor("comments",new ot),this.registerVisitor("commentList",new it,"comment"),this.registerVisitor("comment",new x("content"),"text"),this.registerVisitor("ThreadedComments",new nt),this.registerVisitor("threadedComment",new lt),this.registerVisitor("threadedComment",new x("content"),"text"),this.registerVisitor("personList",new at)}registerVisitor(t,e,s=null){-1===t.indexOf(":")&&(t="*:"+t);const r=t.split(":"),o=r.length>1?r[1]:r[0];if(!s)return this.visitorsByXmlTagName.set(o,e),void this.visitorsByXmlTagName.set(t,e);let i=this.scopedVisitorsByXmlTagName.get(o);i||(i=[],this.scopedVisitorsByXmlTagName.set(o,i),this.scopedVisitorsByXmlTagName.set(t,i)),i.push(new ut(s,e))}getVisitorParamsState(){return this.visitorParamsState}convert(t,e,s=ct){const r=t.documentElement;this.visitorParamsState&&!s?.paramMap||(this.visitorParamsState=s?.paramMap??new Map);const o={};let i=this.visitorsByXmlTagName.get(r.nodeName);if(i||(i=this.visitorsByXmlTagName.get(r.localName)),!i)throw new Error(`A visitor for the root element: '${r.nodeName}' or '${r.localName}' must be registered.`);const n="/"+r.localName,l=new a(null,this,n,r,o,e,s),c=[];this._doWalk(i,l,c,r,o,e,s);for(let e=0;e<c.length;e++){const s=c[e];try{s.visitor?.afterVisit?.(s.context,s.elemParent,s.jsonParent)}catch(t){console.warn(`Error in afterVisit: ${s.context.getPath()}`,t)}}return o}_walkScoped(t,e,s,r,o,i,n){const l=this.scopedVisitorsByXmlTagName.get(t);for(let c=0;l&&c<l.length;c++){const u=l[c];let h=null;try{h=e.evaluate(u.path,r)}catch(e){console.warn(`"Invalid path '${u.path}' for '${t}'.`)}if(!h)continue;const p=t=>{let l=t.localName,c=t.parentNode;for(;c&&c!==r;)l=c.localName+"/"+l,c=c.parentNode;const h=e.getPath()+"/"+l;if(u.visitor){const r=new a(e,this,h,e.getElemRoot(),e.getJsonRoot(),i,n);this._doWalk(u.visitor,r,s,t,o,i,n)}};if(h.length>0){const t=h;for(let e=0;e<t.length;e++)p(t.item(e))}else p(h)}}_doWalk(t,e,s,r,o,i,n){let l=null;t&&(s.push({visitor:t,context:e,elemParent:r,jsonParent:o}),l=t.visit(e,r,o)),l||(l=o);const c=r.localName;this._walkScoped(c,e,s,r,l,i,n);const u=r.childNodes;for(let t=0;t<u.length;t++){const r=u.item(t);if(1===r.nodeType){const t=r,c=t.localName,u=this.visitorsByXmlTagName.get(c),h=e.getPath()+"/"+c,p=new a(e,this,h,e.getElemRoot(),e.getJsonRoot(),i,n);this._doWalk(u,p,s,t,l??o,i,n)}}return l}}exports.FromOOXMLConverter=ht,exports.default=ht;
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license @sheetxl/studio-mui - Studio - Spreadsheet UI built with SheetXL SDK using React & MUI. - v0.4.13
|
|
3
|
-
*
|
|
4
|
-
* (C) 2025-present SheetXL Inc. & Michael T. Ford
|
|
5
|
-
* License: The license can be found at https://www.sheetxl.com/license.
|
|
6
|
-
*/
|
|
7
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),t=require("react"),a=require("@mui/material"),n=require("./Brij8vl9GntSQBer.cjs"),o=require("@mui/system"),l=["Ok","Cancel"],s=t.memo(s=>{const{initialHyperlink:i=null,initialDisplay:r=null,onUpdateHyperlink:p,context:u,onOption:c,onValidateOption:d,onDone:g,options:x=l,defaultOption:m=x?.[0],cancelOption:h="Cancel",sx:f,...y}=s,T=t.useMemo(()=>null!==(i??u?.()?.getHyperlink()),[]),k=t.useMemo(()=>{let e=null,t=null;i&&("string"==typeof i?t=i:e=i);const a=e??u?.()?.getHyperlink();return{address:t??a?.getAddress()??"",textToDisplay:a?.getDisplayText()??""}},[i,u]),[C,O]=t.useState(k.address),[b,v]=t.useState(()=>{const e=u?.().toTextUnformatted()??r;return e===k.address?"":e}),[F,P]=t.useState(!1),j=t.useCallback(e=>{v(e.target.value)},[]),D=t.useCallback(async(e,t)=>null,[]),B=n.B(async e=>{const t=""===C?null:{address:C};e!==h&&p?.(t,b),c?.(e,e===h,e===m),g?.()},[C,b,p,g,c,m,h]),H=n.B(e=>{O(e.target.value),D(e.target.value,null)},[d]),I=n.B(async e=>{let t=await Promise.resolve(d?.(e));try{!1!==t&&(t=await D(C,e))}catch(e){}return t??!0},[d]);return e.jsx(n.pm,{title:(T?"Edit":"Insert")+" Link",options:x,onDone:g,onOption:e=>B(e),onValidateOption:I,defaultOption:m,cancelOption:h,autoFocusSel:".autoFocus",sx:{width:"480px",...f},...y,children:e.jsxs(a.Box,{sx:{paddingTop:e=>e.spacing(1),paddingBottom:e=>e.spacing(0),rowGap:e=>e.spacing(1),display:"flex",flexDirection:"column"},children:[e.jsx(a.FormControl,{sx:{paddingTop:e=>e.spacing(1.5),minWidth:135,width:"100%"},size:"small",children:e.jsx(a.TextField,{label:"Address",placeholder:"Enter a url or cell reference.",onFocus:e=>{F||e.target?.select(),P(!0)},sx:{"& .MuiFormHelperText-root":{marginTop:e=>e.spacing(.5)}},InputLabelProps:{shrink:!0},InputProps:{inputProps:{className:"autoFocus",spellCheck:!1,autoComplete:"off",sx:{paddingTop:e=>e.spacing(1.25),paddingBottom:e=>e.spacing(.75),backgroundImage:`linear-gradient(${o.alpha("#fff",n.getOverlayAlpha(5))}, ${o.alpha("#fff",n.getOverlayAlpha(5))})`}}},value:C,onChange:H,onContextMenu:e=>{e.stopPropagation()}})}),e.jsx(a.FormControl,{sx:{paddingTop:e=>e.spacing(1.5),minWidth:135,width:"100%"},size:"small",children:e.jsx(a.TextField,{label:"Display Text",placeholder:C?.startsWith("#")?C.substring(1):C,onFocus:()=>{P(!0)},sx:{"& .MuiFormHelperText-root":{marginTop:e=>e.spacing(.5)}},InputLabelProps:{shrink:!0},InputProps:{inputProps:{spellCheck:!1,autoComplete:"off",sx:{paddingTop:e=>e.spacing(1.25),paddingBottom:e=>e.spacing(.75),backgroundImage:`linear-gradient(${o.alpha("#fff",n.getOverlayAlpha(5))}, ${o.alpha("#fff",n.getOverlayAlpha(5))})`}}},value:b,onChange:j,onContextMenu:e=>{e.stopPropagation()}})})]})})});exports.HyperlinkDialog=s,exports.default=s;
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license @sheetxl/studio-mui - Studio - Spreadsheet UI built with SheetXL SDK using React & MUI. - v0.4.13
|
|
3
|
-
*
|
|
4
|
-
* (C) 2025-present SheetXL Inc. & Michael T. Ford
|
|
5
|
-
* License: The license can be found at https://www.sheetxl.com/license.
|
|
6
|
-
*/
|
|
7
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("react/jsx-runtime"),e=require("react"),r=require("@mui/material"),n=require("./Brij8vl9GntSQBer.cjs");var o=n.requirePropTypes();const i=n.getDefaultExportFromCjs(o);function a(t){return a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},a(t)}var u=/^\s+/,s=/\s+$/;function c(t,e){if(e=e||{},(t=t||"")instanceof c)return t;if(!(this instanceof c))return new c(t,e);var r=function(t){var e={r:0,g:0,b:0},r=1,n=null,o=null,i=null,c=!1,f=!1;"string"==typeof t&&(t=function(t){t=t.replace(u,"").replace(s,"").toLowerCase();var e,r=!1;if(S[t])t=S[t],r=!0;else if("transparent"==t)return{r:0,g:0,b:0,a:0,format:"name"};if(e=B.rgb.exec(t))return{r:e[1],g:e[2],b:e[3]};if(e=B.rgba.exec(t))return{r:e[1],g:e[2],b:e[3],a:e[4]};if(e=B.hsl.exec(t))return{h:e[1],s:e[2],l:e[3]};if(e=B.hsla.exec(t))return{h:e[1],s:e[2],l:e[3],a:e[4]};if(e=B.hsv.exec(t))return{h:e[1],s:e[2],v:e[3]};if(e=B.hsva.exec(t))return{h:e[1],s:e[2],v:e[3],a:e[4]};if(e=B.hex8.exec(t))return{r:R(e[1]),g:R(e[2]),b:R(e[3]),a:U(e[4]),format:r?"name":"hex8"};if(e=B.hex6.exec(t))return{r:R(e[1]),g:R(e[2]),b:R(e[3]),format:r?"name":"hex"};if(e=B.hex4.exec(t))return{r:R(e[1]+""+e[1]),g:R(e[2]+""+e[2]),b:R(e[3]+""+e[3]),a:U(e[4]+""+e[4]),format:r?"name":"hex8"};if(e=B.hex3.exec(t))return{r:R(e[1]+""+e[1]),g:R(e[2]+""+e[2]),b:R(e[3]+""+e[3]),format:r?"name":"hex"};return!1}(t));"object"==a(t)&&(H(t.r)&&H(t.g)&&H(t.b)?(l=t.r,h=t.g,p=t.b,e={r:255*A(l,255),g:255*A(h,255),b:255*A(p,255)},c=!0,f="%"===String(t.r).substr(-1)?"prgb":"rgb"):H(t.h)&&H(t.s)&&H(t.v)?(n=T(t.s),o=T(t.v),e=function(t,e,r){t=6*A(t,360),e=A(e,100),r=A(r,100);var n=Math.floor(t),o=t-n,i=r*(1-e),a=r*(1-o*e),u=r*(1-(1-o)*e),s=n%6,c=[r,a,i,i,u,r][s],f=[u,r,r,a,i,i][s],l=[i,i,u,r,r,a][s];return{r:255*c,g:255*f,b:255*l}}(t.h,n,o),c=!0,f="hsv"):H(t.h)&&H(t.s)&&H(t.l)&&(n=T(t.s),i=T(t.l),e=function(t,e,r){var n,o,i;function a(t,e,r){return r<0&&(r+=1),r>1&&(r-=1),r<1/6?t+6*(e-t)*r:r<.5?e:r<2/3?t+(e-t)*(2/3-r)*6:t}if(t=A(t,360),e=A(e,100),r=A(r,100),0===e)n=o=i=r;else{var u=r<.5?r*(1+e):r+e-r*e,s=2*r-u;n=a(s,u,t+1/3),o=a(s,u,t),i=a(s,u,t-1/3)}return{r:255*n,g:255*o,b:255*i}}(t.h,n,i),c=!0,f="hsl"),t.hasOwnProperty("a")&&(r=t.a));var l,h,p;return r=C(r),{ok:c,format:t.format||f,r:Math.min(255,Math.max(e.r,0)),g:Math.min(255,Math.max(e.g,0)),b:Math.min(255,Math.max(e.b,0)),a:r}}(t);this._originalInput=t,this._r=r.r,this._g=r.g,this._b=r.b,this._a=r.a,this._roundA=Math.round(100*this._a)/100,this._format=e.format||r.format,this._gradientType=e.gradientType,this._r<1&&(this._r=Math.round(this._r)),this._g<1&&(this._g=Math.round(this._g)),this._b<1&&(this._b=Math.round(this._b)),this._ok=r.ok}function f(t,e,r){t=A(t,255),e=A(e,255),r=A(r,255);var n,o,i=Math.max(t,e,r),a=Math.min(t,e,r),u=(i+a)/2;if(i==a)n=o=0;else{var s=i-a;switch(o=u>.5?s/(2-i-a):s/(i+a),i){case t:n=(e-r)/s+(e<r?6:0);break;case e:n=(r-t)/s+2;break;case r:n=(t-e)/s+4}n/=6}return{h:n,s:o,l:u}}function l(t,e,r){t=A(t,255),e=A(e,255),r=A(r,255);var n,o,i=Math.max(t,e,r),a=Math.min(t,e,r),u=i,s=i-a;if(o=0===i?0:s/i,i==a)n=0;else{switch(i){case t:n=(e-r)/s+(e<r?6:0);break;case e:n=(r-t)/s+2;break;case r:n=(t-e)/s+4}n/=6}return{h:n,s:o,v:u}}function h(t,e,r,n){var o=[P(Math.round(t).toString(16)),P(Math.round(e).toString(16)),P(Math.round(r).toString(16))];return n&&o[0].charAt(0)==o[0].charAt(1)&&o[1].charAt(0)==o[1].charAt(1)&&o[2].charAt(0)==o[2].charAt(1)?o[0].charAt(0)+o[1].charAt(0)+o[2].charAt(0):o.join("")}function p(t,e,r,n){return[P(L(n)),P(Math.round(t).toString(16)),P(Math.round(e).toString(16)),P(Math.round(r).toString(16))].join("")}function d(t,e){e=0===e?0:e||10;var r=c(t).toHsl();return r.s-=e/100,r.s=E(r.s),c(r)}function b(t,e){e=0===e?0:e||10;var r=c(t).toHsl();return r.s+=e/100,r.s=E(r.s),c(r)}function v(t){return c(t).desaturate(100)}function g(t,e){e=0===e?0:e||10;var r=c(t).toHsl();return r.l+=e/100,r.l=E(r.l),c(r)}function y(t,e){e=0===e?0:e||10;var r=c(t).toRgb();return r.r=Math.max(0,Math.min(255,r.r-Math.round(-e/100*255))),r.g=Math.max(0,Math.min(255,r.g-Math.round(-e/100*255))),r.b=Math.max(0,Math.min(255,r.b-Math.round(-e/100*255))),c(r)}function m(t,e){e=0===e?0:e||10;var r=c(t).toHsl();return r.l-=e/100,r.l=E(r.l),c(r)}function w(t,e){var r=c(t).toHsl(),n=(r.h+e)%360;return r.h=n<0?360+n:n,c(r)}function _(t){var e=c(t).toHsl();return e.h=(e.h+180)%360,c(e)}function x(t,e){if(isNaN(e)||e<=0)throw new Error("Argument to polyad must be a positive number");for(var r=c(t).toHsl(),n=[c(t)],o=360/e,i=1;i<e;i++)n.push(c({h:(r.h+i*o)%360,s:r.s,l:r.l}));return n}function j(t){var e=c(t).toHsl(),r=e.h;return[c(t),c({h:(r+72)%360,s:e.s,l:e.l}),c({h:(r+216)%360,s:e.s,l:e.l})]}function O(t,e,r){e=e||6,r=r||30;var n=c(t).toHsl(),o=360/r,i=[c(t)];for(n.h=(n.h-(o*e>>1)+720)%360;--e;)n.h=(n.h+o)%360,i.push(c(n));return i}function M(t,e){e=e||6;for(var r=c(t).toHsv(),n=r.h,o=r.s,i=r.v,a=[],u=1/e;e--;)a.push(c({h:n,s:o,v:i})),i=(i+u)%1;return a}c.prototype={isDark:function(){return this.getBrightness()<128},isLight:function(){return!this.isDark()},isValid:function(){return this._ok},getOriginalInput:function(){return this._originalInput},getFormat:function(){return this._format},getAlpha:function(){return this._a},getBrightness:function(){var t=this.toRgb();return(299*t.r+587*t.g+114*t.b)/1e3},getLuminance:function(){var t,e,r,n=this.toRgb();return t=n.r/255,e=n.g/255,r=n.b/255,.2126*(t<=.03928?t/12.92:Math.pow((t+.055)/1.055,2.4))+.7152*(e<=.03928?e/12.92:Math.pow((e+.055)/1.055,2.4))+.0722*(r<=.03928?r/12.92:Math.pow((r+.055)/1.055,2.4))},setAlpha:function(t){return this._a=C(t),this._roundA=Math.round(100*this._a)/100,this},toHsv:function(){var t=l(this._r,this._g,this._b);return{h:360*t.h,s:t.s,v:t.v,a:this._a}},toHsvString:function(){var t=l(this._r,this._g,this._b),e=Math.round(360*t.h),r=Math.round(100*t.s),n=Math.round(100*t.v);return 1==this._a?"hsv("+e+", "+r+"%, "+n+"%)":"hsva("+e+", "+r+"%, "+n+"%, "+this._roundA+")"},toHsl:function(){var t=f(this._r,this._g,this._b);return{h:360*t.h,s:t.s,l:t.l,a:this._a}},toHslString:function(){var t=f(this._r,this._g,this._b),e=Math.round(360*t.h),r=Math.round(100*t.s),n=Math.round(100*t.l);return 1==this._a?"hsl("+e+", "+r+"%, "+n+"%)":"hsla("+e+", "+r+"%, "+n+"%, "+this._roundA+")"},toHex:function(t){return h(this._r,this._g,this._b,t)},toHexString:function(t){return"#"+this.toHex(t)},toHex8:function(t){return function(t,e,r,n,o){var i=[P(Math.round(t).toString(16)),P(Math.round(e).toString(16)),P(Math.round(r).toString(16)),P(L(n))];if(o&&i[0].charAt(0)==i[0].charAt(1)&&i[1].charAt(0)==i[1].charAt(1)&&i[2].charAt(0)==i[2].charAt(1)&&i[3].charAt(0)==i[3].charAt(1))return i[0].charAt(0)+i[1].charAt(0)+i[2].charAt(0)+i[3].charAt(0);return i.join("")}(this._r,this._g,this._b,this._a,t)},toHex8String:function(t){return"#"+this.toHex8(t)},toRgb:function(){return{r:Math.round(this._r),g:Math.round(this._g),b:Math.round(this._b),a:this._a}},toRgbString:function(){return 1==this._a?"rgb("+Math.round(this._r)+", "+Math.round(this._g)+", "+Math.round(this._b)+")":"rgba("+Math.round(this._r)+", "+Math.round(this._g)+", "+Math.round(this._b)+", "+this._roundA+")"},toPercentageRgb:function(){return{r:Math.round(100*A(this._r,255))+"%",g:Math.round(100*A(this._g,255))+"%",b:Math.round(100*A(this._b,255))+"%",a:this._a}},toPercentageRgbString:function(){return 1==this._a?"rgb("+Math.round(100*A(this._r,255))+"%, "+Math.round(100*A(this._g,255))+"%, "+Math.round(100*A(this._b,255))+"%)":"rgba("+Math.round(100*A(this._r,255))+"%, "+Math.round(100*A(this._g,255))+"%, "+Math.round(100*A(this._b,255))+"%, "+this._roundA+")"},toName:function(){return 0===this._a?"transparent":!(this._a<1)&&(k[h(this._r,this._g,this._b,!0)]||!1)},toFilter:function(t){var e="#"+p(this._r,this._g,this._b,this._a),r=e,n=this._gradientType?"GradientType = 1, ":"";if(t){var o=c(t);r="#"+p(o._r,o._g,o._b,o._a)}return"progid:DXImageTransform.Microsoft.gradient("+n+"startColorstr="+e+",endColorstr="+r+")"},toString:function(t){var e=!!t;t=t||this._format;var r=!1,n=this._a<1&&this._a>=0;return e||!n||"hex"!==t&&"hex6"!==t&&"hex3"!==t&&"hex4"!==t&&"hex8"!==t&&"name"!==t?("rgb"===t&&(r=this.toRgbString()),"prgb"===t&&(r=this.toPercentageRgbString()),"hex"!==t&&"hex6"!==t||(r=this.toHexString()),"hex3"===t&&(r=this.toHexString(!0)),"hex4"===t&&(r=this.toHex8String(!0)),"hex8"===t&&(r=this.toHex8String()),"name"===t&&(r=this.toName()),"hsl"===t&&(r=this.toHslString()),"hsv"===t&&(r=this.toHsvString()),r||this.toHexString()):"name"===t&&0===this._a?this.toName():this.toRgbString()},clone:function(){return c(this.toString())},_applyModification:function(t,e){var r=t.apply(null,[this].concat([].slice.call(e)));return this._r=r._r,this._g=r._g,this._b=r._b,this.setAlpha(r._a),this},lighten:function(){return this._applyModification(g,arguments)},brighten:function(){return this._applyModification(y,arguments)},darken:function(){return this._applyModification(m,arguments)},desaturate:function(){return this._applyModification(d,arguments)},saturate:function(){return this._applyModification(b,arguments)},greyscale:function(){return this._applyModification(v,arguments)},spin:function(){return this._applyModification(w,arguments)},_applyCombination:function(t,e){return t.apply(null,[this].concat([].slice.call(e)))},analogous:function(){return this._applyCombination(O,arguments)},complement:function(){return this._applyCombination(_,arguments)},monochromatic:function(){return this._applyCombination(M,arguments)},splitcomplement:function(){return this._applyCombination(j,arguments)},triad:function(){return this._applyCombination(x,[3])},tetrad:function(){return this._applyCombination(x,[4])}},c.fromRatio=function(t,e){if("object"==a(t)){var r={};for(var n in t)t.hasOwnProperty(n)&&(r[n]="a"===n?t[n]:T(t[n]));t=r}return c(t,e)},c.equals=function(t,e){return!(!t||!e)&&c(t).toRgbString()==c(e).toRgbString()},c.random=function(){return c.fromRatio({r:Math.random(),g:Math.random(),b:Math.random()})},c.mix=function(t,e,r){r=0===r?0:r||50;var n=c(t).toRgb(),o=c(e).toRgb(),i=r/100;return c({r:(o.r-n.r)*i+n.r,g:(o.g-n.g)*i+n.g,b:(o.b-n.b)*i+n.b,a:(o.a-n.a)*i+n.a})},c.readability=function(t,e){var r=c(t),n=c(e);return(Math.max(r.getLuminance(),n.getLuminance())+.05)/(Math.min(r.getLuminance(),n.getLuminance())+.05)},c.isReadable=function(t,e,r){var n,o,i=c.readability(t,e);switch(o=!1,(n=function(t){var e,r;e=((t=t||{level:"AA",size:"small"}).level||"AA").toUpperCase(),r=(t.size||"small").toLowerCase(),"AA"!==e&&"AAA"!==e&&(e="AA");"small"!==r&&"large"!==r&&(r="small");return{level:e,size:r}}(r)).level+n.size){case"AAsmall":case"AAAlarge":o=i>=4.5;break;case"AAlarge":o=i>=3;break;case"AAAsmall":o=i>=7}return o},c.mostReadable=function(t,e,r){var n,o,i,a,u=null,s=0;o=(r=r||{}).includeFallbackColors,i=r.level,a=r.size;for(var f=0;f<e.length;f++)(n=c.readability(t,e[f]))>s&&(s=n,u=c(e[f]));return c.isReadable(t,u,{level:i,size:a})||!o?u:(r.includeFallbackColors=!1,c.mostReadable(t,["#fff","#000"],r))};var S=c.names={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"0ff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000",blanchedalmond:"ffebcd",blue:"00f",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",burntsienna:"ea7e5d",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"0ff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkgrey:"a9a9a9",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkslategrey:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dimgrey:"696969",dodgerblue:"1e90ff",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"f0f",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",grey:"808080",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgray:"d3d3d3",lightgreen:"90ee90",lightgrey:"d3d3d3",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslategray:"789",lightslategrey:"789",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"0f0",limegreen:"32cd32",linen:"faf0e6",magenta:"f0f",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370db",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"db7093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",rebeccapurple:"663399",red:"f00",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",slategrey:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",wheat:"f5deb3",white:"fff",whitesmoke:"f5f5f5",yellow:"ff0",yellowgreen:"9acd32"},k=c.hexNames=function(t){var e={};for(var r in t)t.hasOwnProperty(r)&&(e[t[r]]=r);return e}(S);function C(t){return t=parseFloat(t),(isNaN(t)||t<0||t>1)&&(t=1),t}function A(t,e){(function(t){return"string"==typeof t&&-1!=t.indexOf(".")&&1===parseFloat(t)})(t)&&(t="100%");var r=function(t){return"string"==typeof t&&-1!=t.indexOf("%")}(t);return t=Math.min(e,Math.max(0,parseFloat(t))),r&&(t=parseInt(t*e,10)/100),Math.abs(t-e)<1e-6?1:t%e/parseFloat(e)}function E(t){return Math.min(1,Math.max(0,t))}function R(t){return parseInt(t,16)}function P(t){return 1==t.length?"0"+t:""+t}function T(t){return t<=1&&(t=100*t+"%"),t}function L(t){return Math.round(255*parseFloat(t)).toString(16)}function U(t){return R(t)/255}var F,D,z,B=(D="[\\s|\\(]+("+(F="(?:[-\\+]?\\d*\\.\\d+%?)|(?:[-\\+]?\\d+%?)")+")[,|\\s]+("+F+")[,|\\s]+("+F+")\\s*\\)?",z="[\\s|\\(]+("+F+")[,|\\s]+("+F+")[,|\\s]+("+F+")[,|\\s]+("+F+")\\s*\\)?",{CSS_UNIT:new RegExp(F),rgb:new RegExp("rgb"+D),rgba:new RegExp("rgba"+z),hsl:new RegExp("hsl"+D),hsla:new RegExp("hsla"+z),hsv:new RegExp("hsv"+D),hsva:new RegExp("hsva"+z),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/});function H(t){return!!B.CSS_UNIT.exec(t)}var W,$,N,I,V,X,q,Y,G,K,J,Q,Z,tt,et,rt,nt,ot,it,at,ut,st,ct,ft,lt,ht,pt,dt,bt={},vt={};function gt(){if($)return W;$=1;var t="object"==typeof n.commonjsGlobal&&n.commonjsGlobal&&n.commonjsGlobal.Object===Object&&n.commonjsGlobal;return W=t}function yt(){if(I)return N;I=1;var t=gt(),e="object"==typeof self&&self&&self.Object===Object&&self,r=t||e||Function("return this")();return N=r}function mt(){if(X)return V;X=1;var t=yt().Symbol;return V=t}function wt(){if(Q)return J;Q=1;var t=mt(),e=function(){if(Y)return q;Y=1;var t=mt(),e=Object.prototype,r=e.hasOwnProperty,n=e.toString,o=t?t.toStringTag:void 0;return q=function(t){var e=r.call(t,o),i=t[o];try{t[o]=void 0;var a=!0}catch(t){}var u=n.call(t);return a&&(e?t[o]=i:delete t[o]),u}}(),r=function(){if(K)return G;K=1;var t=Object.prototype.toString;return G=function(e){return t.call(e)}}(),n=t?t.toStringTag:void 0;return J=function(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":n&&n in Object(t)?e(t):r(t)}}function _t(){if(tt)return Z;tt=1;var t=Array.isArray;return Z=t}function xt(){if(rt)return et;return rt=1,et=function(t){return null!=t&&"object"==typeof t}}function jt(){if(st)return ut;st=1;var t=(at||(at=1,it=function(t){return function(e,r,n){for(var o=-1,i=Object(e),a=n(e),u=a.length;u--;){var s=a[t?u:++o];if(!1===r(i[s],s,i))break}return e}}),it),e=t();return ut=e}function Ot(){if(dt)return pt;dt=1;var t=function(){if(ht)return lt;ht=1;var t=wt(),e=xt();return lt=function(r){return e(r)&&"[object Arguments]"==t(r)}}(),e=xt(),r=Object.prototype,n=r.hasOwnProperty,o=r.propertyIsEnumerable,i=t(function(){return arguments}())?t:function(t){return e(t)&&n.call(t,"callee")&&!o.call(t,"callee")};return pt=i}var Mt,St,kt,Ct,At,Et,Rt,Pt,Tt,Lt,Ut,Ft={exports:{}};function Dt(){return kt||(kt=1,function(t,e){var r=yt(),n=St?Mt:(St=1,Mt=function(){return!1}),o=e&&!e.nodeType&&e,i=o&&t&&!t.nodeType&&t,a=i&&i.exports===o?r.Buffer:void 0,u=(a?a.isBuffer:void 0)||n;t.exports=u}(Ft,Ft.exports)),Ft.exports}function zt(){if(At)return Ct;At=1;var t=/^(?:0|[1-9]\d*)$/;return Ct=function(e,r){var n=typeof e;return!!(r=null==r?9007199254740991:r)&&("number"==n||"symbol"!=n&&t.test(e))&&e>-1&&e%1==0&&e<r}}function Bt(){if(Rt)return Et;Rt=1;return Et=function(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=9007199254740991}}function Ht(){if(Ut)return Lt;return Ut=1,Lt=function(t){return function(e){return t(e)}}}var Wt,$t,Nt,It,Vt,Xt,qt,Yt,Gt,Kt,Jt,Qt,Zt,te,ee,re,ne,oe,ie,ae,ue,se,ce,fe,le,he,pe,de,be,ve,ge,ye,me,we,_e,xe,je,Oe,Me,Se,ke,Ce,Ae,Ee,Re,Pe,Te,Le,Ue,Fe,De,ze,Be,He,We,$e,Ne,Ie,Ve,Xe,qe,Ye,Ge,Ke,Je,Qe,Ze,tr,er,rr,nr,or,ir,ar,ur,sr,cr,fr,lr,hr,pr,dr,br,vr,gr,yr,mr,wr,_r,xr,jr,Or,Mr,Sr,kr,Cr,Ar,Er,Rr,Pr,Tr,Lr,Ur,Fr,Dr,zr,Br,Hr,Wr,$r,Nr,Ir,Vr,Xr,qr,Yr,Gr,Kr,Jr,Qr,Zr,tn,en,rn,nn,on,an,un,sn,cn,fn,ln,hn,pn,dn,bn,vn,gn,yn,mn,wn,_n,xn,jn,On,Mn,Sn,kn,Cn,An,En,Rn,Pn,Tn,Ln,Un,Fn,Dn,zn,Bn,Hn,Wn,$n,Nn,In,Vn,Xn,qn,Yn,Gn,Kn,Jn,Qn,Zn,to,eo,ro,no,oo,io,ao,uo,so,co,fo,lo,ho,po,bo,vo,go,yo,mo,wo,_o,xo,jo,Oo,Mo,So,ko,Co,Ao,Eo,Ro,Po,To,Lo,Uo,Fo,Do,zo,Bo={exports:{}};function Ho(){return Wt||(Wt=1,function(t,e){var r=gt(),n=e&&!e.nodeType&&e,o=n&&t&&!t.nodeType&&t,i=o&&o.exports===n&&r.process,a=function(){try{var t=o&&o.require&&o.require("util").types;return t||i&&i.binding&&i.binding("util")}catch(t){}}();t.exports=a}(Bo,Bo.exports)),Bo.exports}function Wo(){if(Nt)return $t;Nt=1;var t=function(){if(Tt)return Pt;Tt=1;var t=wt(),e=Bt(),r=xt(),n={};return n["[object Float32Array]"]=n["[object Float64Array]"]=n["[object Int8Array]"]=n["[object Int16Array]"]=n["[object Int32Array]"]=n["[object Uint8Array]"]=n["[object Uint8ClampedArray]"]=n["[object Uint16Array]"]=n["[object Uint32Array]"]=!0,n["[object Arguments]"]=n["[object Array]"]=n["[object ArrayBuffer]"]=n["[object Boolean]"]=n["[object DataView]"]=n["[object Date]"]=n["[object Error]"]=n["[object Function]"]=n["[object Map]"]=n["[object Number]"]=n["[object Object]"]=n["[object RegExp]"]=n["[object Set]"]=n["[object String]"]=n["[object WeakMap]"]=!1,Pt=function(o){return r(o)&&e(o.length)&&!!n[t(o)]}}(),e=Ht(),r=Ho(),n=r&&r.isTypedArray,o=n?e(n):t;return $t=o}function $o(){if(Vt)return It;Vt=1;var t=(ft||(ft=1,ct=function(t,e){for(var r=-1,n=Array(t);++r<t;)n[r]=e(r);return n}),ct),e=Ot(),r=_t(),n=Dt(),o=zt(),i=Wo(),a=Object.prototype.hasOwnProperty;return It=function(u,s){var c=r(u),f=!c&&e(u),l=!c&&!f&&n(u),h=!c&&!f&&!l&&i(u),p=c||f||l||h,d=p?t(u.length,String):[],b=d.length;for(var v in u)!s&&!a.call(u,v)||p&&("length"==v||l&&("offset"==v||"parent"==v)||h&&("buffer"==v||"byteLength"==v||"byteOffset"==v)||o(v,b))||d.push(v);return d}}function No(){if(qt)return Xt;qt=1;var t=Object.prototype;return Xt=function(e){var r=e&&e.constructor;return e===("function"==typeof r&&r.prototype||t)}}function Io(){if(Gt)return Yt;return Gt=1,Yt=function(t,e){return function(r){return t(e(r))}}}function Vo(){if(Zt)return Qt;Zt=1;var t=No(),e=function(){if(Jt)return Kt;Jt=1;var t=Io()(Object.keys,Object);return Kt=t}(),r=Object.prototype.hasOwnProperty;return Qt=function(n){if(!t(n))return e(n);var o=[];for(var i in Object(n))r.call(n,i)&&"constructor"!=i&&o.push(i);return o}}function Xo(){if(ee)return te;return ee=1,te=function(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}}function qo(){if(ne)return re;ne=1;var t=wt(),e=Xo();return re=function(r){if(!e(r))return!1;var n=t(r);return"[object Function]"==n||"[object GeneratorFunction]"==n||"[object AsyncFunction]"==n||"[object Proxy]"==n}}function Yo(){if(ie)return oe;ie=1;var t=qo(),e=Bt();return oe=function(r){return null!=r&&e(r.length)&&!t(r)}}function Go(){if(ue)return ae;ue=1;var t=$o(),e=Vo(),r=Yo();return ae=function(n){return r(n)?t(n):e(n)}}function Ko(){if(ce)return se;ce=1;var t=jt(),e=Go();return se=function(r,n){return r&&t(r,n,e)}}function Jo(){if(le)return fe;return le=1,fe=function(t){return t}}function Qo(){if(be)return de;be=1;var t=Ko(),e=function(){if(pe)return he;pe=1;var t=Jo();return he=function(e){return"function"==typeof e?e:t}}();return de=function(r,n){return r&&t(r,e(n))}}function Zo(){if(ge)return ve;ge=1;var t=Io()(Object.getPrototypeOf,Object);return ve=t}function ti(){if(_e)return we;return _e=1,we=function(t,e){for(var r=-1,n=null==t?0:t.length,o=Array(n);++r<n;)o[r]=e(t[r],r,t);return o},we}function ei(){if(Me)return Oe;return Me=1,Oe=function(t,e){return t===e||t!=t&&e!=e}}function ri(){if(ke)return Se;ke=1;var t=ei();return Se=function(e,r){for(var n=e.length;n--;)if(t(e[n][0],r))return n;return-1}}function ni(){if(De)return Fe;De=1;var t=je?xe:(je=1,xe=function(){this.__data__=[],this.size=0}),e=function(){if(Ae)return Ce;Ae=1;var t=ri(),e=Array.prototype.splice;return Ce=function(r){var n=this.__data__,o=t(n,r);return!(o<0||(o==n.length-1?n.pop():e.call(n,o,1),--this.size,0))},Ce}(),r=function(){if(Re)return Ee;Re=1;var t=ri();return Ee=function(e){var r=this.__data__,n=t(r,e);return n<0?void 0:r[n][1]},Ee}(),n=function(){if(Te)return Pe;Te=1;var t=ri();return Pe=function(e){return t(this.__data__,e)>-1}}(),o=function(){if(Ue)return Le;Ue=1;var t=ri();return Le=function(e,r){var n=this.__data__,o=t(n,e);return o<0?(++this.size,n.push([e,r])):n[o][1]=r,this},Le}();function i(t){var e=-1,r=null==t?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}return i.prototype.clear=t,i.prototype.delete=e,i.prototype.get=r,i.prototype.has=n,i.prototype.set=o,Fe=i}function oi(){if(Ge)return Ye;Ge=1;var t,e=function(){if(qe)return Xe;qe=1;var t=yt()["__core-js_shared__"];return Xe=t}(),r=(t=/[^.]+$/.exec(e&&e.keys&&e.keys.IE_PROTO||""))?"Symbol(src)_1."+t:"";return Ye=function(t){return!!r&&r in t}}function ii(){if(Je)return Ke;Je=1;var t=Function.prototype.toString;return Ke=function(e){if(null!=e){try{return t.call(e)}catch(t){}try{return e+""}catch(t){}}return""}}function ai(){if(nr)return rr;nr=1;var t=function(){if(Ze)return Qe;Ze=1;var t=qo(),e=oi(),r=Xo(),n=ii(),o=/^\[object .+?Constructor\]$/,i=Function.prototype,a=Object.prototype,u=i.toString,s=a.hasOwnProperty,c=RegExp("^"+u.call(s).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");return Qe=function(i){return!(!r(i)||e(i))&&(t(i)?c:o).test(n(i))}}(),e=er?tr:(er=1,tr=function(t,e){return null==t?void 0:t[e]});return rr=function(r,n){var o=e(r,n);return t(o)?o:void 0}}function ui(){if(ir)return or;ir=1;var t=ai()(yt(),"Map");return or=t}function si(){if(ur)return ar;ur=1;var t=ai()(Object,"create");return ar=t}function ci(){if(mr)return yr;mr=1;var t=function(){if(cr)return sr;cr=1;var t=si();return sr=function(){this.__data__=t?t(null):{},this.size=0}}(),e=lr?fr:(lr=1,fr=function(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e}),r=function(){if(pr)return hr;pr=1;var t=si(),e=Object.prototype.hasOwnProperty;return hr=function(r){var n=this.__data__;if(t){var o=n[r];return"__lodash_hash_undefined__"===o?void 0:o}return e.call(n,r)?n[r]:void 0}}(),n=function(){if(br)return dr;br=1;var t=si(),e=Object.prototype.hasOwnProperty;return dr=function(r){var n=this.__data__;return t?void 0!==n[r]:e.call(n,r)}}(),o=function(){if(gr)return vr;gr=1;var t=si();return vr=function(e,r){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=t&&void 0===r?"__lodash_hash_undefined__":r,this}}();function i(t){var e=-1,r=null==t?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}return i.prototype.clear=t,i.prototype.delete=e,i.prototype.get=r,i.prototype.has=n,i.prototype.set=o,yr=i}function fi(){if(Mr)return Or;Mr=1;var t=jr?xr:(jr=1,xr=function(t){var e=typeof t;return"string"==e||"number"==e||"symbol"==e||"boolean"==e?"__proto__"!==t:null===t});return Or=function(e,r){var n=e.__data__;return t(r)?n["string"==typeof r?"string":"hash"]:n.map}}function li(){if(Ur)return Lr;Ur=1;var t=function(){if(_r)return wr;_r=1;var t=ci(),e=ni(),r=ui();return wr=function(){this.size=0,this.__data__={hash:new t,map:new(r||e),string:new t}}}(),e=function(){if(kr)return Sr;kr=1;var t=fi();return Sr=function(e){var r=t(this,e).delete(e);return this.size-=r?1:0,r}}(),r=function(){if(Ar)return Cr;Ar=1;var t=fi();return Cr=function(e){return t(this,e).get(e)}}(),n=function(){if(Rr)return Er;Rr=1;var t=fi();return Er=function(e){return t(this,e).has(e)}}(),o=function(){if(Tr)return Pr;Tr=1;var t=fi();return Pr=function(e,r){var n=t(this,e),o=n.size;return n.set(e,r),this.size+=n.size==o?0:1,this}}();function i(t){var e=-1,r=null==t?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}return i.prototype.clear=t,i.prototype.delete=e,i.prototype.get=r,i.prototype.has=n,i.prototype.set=o,Lr=i}function hi(){if(Br)return zr;Br=1;var t=ni(),e=function(){if(Be)return ze;Be=1;var t=ni();return ze=function(){this.__data__=new t,this.size=0}}(),r=We?He:(We=1,He=function(t){var e=this.__data__,r=e.delete(t);return this.size=e.size,r}),n=Ne?$e:(Ne=1,$e=function(t){return this.__data__.get(t)}),o=Ve?Ie:(Ve=1,Ie=function(t){return this.__data__.has(t)}),i=function(){if(Dr)return Fr;Dr=1;var t=ni(),e=ui(),r=li();return Fr=function(n,o){var i=this.__data__;if(i instanceof t){var a=i.__data__;if(!e||a.length<199)return a.push([n,o]),this.size=++i.size,this;i=this.__data__=new r(a)}return i.set(n,o),this.size=i.size,this}}();function a(e){var r=this.__data__=new t(e);this.size=r.size}return a.prototype.clear=e,a.prototype.delete=r,a.prototype.get=n,a.prototype.has=o,a.prototype.set=i,zr=a}function pi(){if(Vr)return Ir;Vr=1;var t=li(),e=Wr?Hr:(Wr=1,Hr=function(t){return this.__data__.set(t,"__lodash_hash_undefined__"),this}),r=Nr?$r:(Nr=1,$r=function(t){return this.__data__.has(t)});function n(e){var r=-1,n=null==e?0:e.length;for(this.__data__=new t;++r<n;)this.add(e[r])}return n.prototype.add=n.prototype.push=e,n.prototype.has=r,Ir=n}function di(){if(Jr)return Kr;Jr=1;var t=pi(),e=(qr||(qr=1,Xr=function(t,e){for(var r=-1,n=null==t?0:t.length;++r<n;)if(e(t[r],r,t))return!0;return!1}),Xr),r=Gr?Yr:(Gr=1,Yr=function(t,e){return t.has(e)});return Kr=function(n,o,i,a,u,s){var c=1&i,f=n.length,l=o.length;if(f!=l&&!(c&&l>f))return!1;var h=s.get(n),p=s.get(o);if(h&&p)return h==o&&p==n;var d=-1,b=!0,v=2&i?new t:void 0;for(s.set(n,o),s.set(o,n);++d<f;){var g=n[d],y=o[d];if(a)var m=c?a(y,g,d,o,n,s):a(g,y,d,n,o,s);if(void 0!==m){if(m)continue;b=!1;break}if(v){if(!e(o,function(t,e){if(!r(v,e)&&(g===t||u(g,t,i,a,s)))return v.push(e)})){b=!1;break}}else if(g!==y&&!u(g,y,i,a,s)){b=!1;break}}return s.delete(n),s.delete(o),b},Kr}function bi(){if(Zr)return Qr;Zr=1;var t=yt().Uint8Array;return Qr=t}function vi(){if(an)return on;an=1;var t=mt(),e=bi(),r=ei(),n=di(),o=(en||(en=1,tn=function(t){var e=-1,r=Array(t.size);return t.forEach(function(t,n){r[++e]=[n,t]}),r}),tn),i=(nn||(nn=1,rn=function(t){var e=-1,r=Array(t.size);return t.forEach(function(t){r[++e]=t}),r}),rn),a=t?t.prototype:void 0,u=a?a.valueOf:void 0;return on=function(t,a,s,c,f,l,h){switch(s){case"[object DataView]":if(t.byteLength!=a.byteLength||t.byteOffset!=a.byteOffset)return!1;t=t.buffer,a=a.buffer;case"[object ArrayBuffer]":return!(t.byteLength!=a.byteLength||!l(new e(t),new e(a)));case"[object Boolean]":case"[object Date]":case"[object Number]":return r(+t,+a);case"[object Error]":return t.name==a.name&&t.message==a.message;case"[object RegExp]":case"[object String]":return t==a+"";case"[object Map]":var p=o;case"[object Set]":var d=1&c;if(p||(p=i),t.size!=a.size&&!d)return!1;var b=h.get(t);if(b)return b==a;c|=2,h.set(t,a);var v=n(p(t),p(a),c,f,l,h);return h.delete(t),v;case"[object Symbol]":if(u)return u.call(t)==u.call(a)}return!1}}function gi(){if(sn)return un;return sn=1,un=function(t,e){for(var r=-1,n=e.length,o=t.length;++r<n;)t[o+r]=e[r];return t},un}function yi(){if(fn)return cn;fn=1;var t=gi(),e=_t();return cn=function(r,n,o){var i=n(r);return e(r)?i:t(i,o(r))}}function mi(){if(dn)return pn;return dn=1,pn=function(){return[]}}function wi(){if(vn)return bn;vn=1;var t=(hn||(hn=1,ln=function(t,e){for(var r=-1,n=null==t?0:t.length,o=0,i=[];++r<n;){var a=t[r];e(a,r,t)&&(i[o++]=a)}return i}),ln),e=mi(),r=Object.prototype.propertyIsEnumerable,n=Object.getOwnPropertySymbols;return bn=n?function(e){return null==e?[]:(e=Object(e),t(n(e),function(t){return r.call(e,t)}))}:e}function _i(){if(yn)return gn;yn=1;var t=yi(),e=wi(),r=Go();return gn=function(n){return t(n,r,e)}}function xi(){if(En)return An;En=1;var t=function(){if(xn)return _n;xn=1;var t=ai()(yt(),"DataView");return _n=t}(),e=ui(),r=function(){if(On)return jn;On=1;var t=ai()(yt(),"Promise");return jn=t}(),n=function(){if(Sn)return Mn;Sn=1;var t=ai()(yt(),"Set");return Mn=t}(),o=function(){if(Cn)return kn;Cn=1;var t=ai()(yt(),"WeakMap");return kn=t}(),i=wt(),a=ii(),u="[object Map]",s="[object Promise]",c="[object Set]",f="[object WeakMap]",l="[object DataView]",h=a(t),p=a(e),d=a(r),b=a(n),v=a(o),g=i;return(t&&g(new t(new ArrayBuffer(1)))!=l||e&&g(new e)!=u||r&&g(r.resolve())!=s||n&&g(new n)!=c||o&&g(new o)!=f)&&(g=function(t){var e=i(t),r="[object Object]"==e?t.constructor:void 0,n=r?a(r):"";if(n)switch(n){case h:return l;case p:return u;case d:return s;case b:return c;case v:return f}return e}),An=g}function ji(){if(Pn)return Rn;Pn=1;var t=hi(),e=di(),r=vi(),n=function(){if(wn)return mn;wn=1;var t=_i(),e=Object.prototype.hasOwnProperty;return mn=function(r,n,o,i,a,u){var s=1&o,c=t(r),f=c.length;if(f!=t(n).length&&!s)return!1;for(var l=f;l--;){var h=c[l];if(!(s?h in n:e.call(n,h)))return!1}var p=u.get(r),d=u.get(n);if(p&&d)return p==n&&d==r;var b=!0;u.set(r,n),u.set(n,r);for(var v=s;++l<f;){var g=r[h=c[l]],y=n[h];if(i)var m=s?i(y,g,h,n,r,u):i(g,y,h,r,n,u);if(!(void 0===m?g===y||a(g,y,o,i,u):m)){b=!1;break}v||(v="constructor"==h)}if(b&&!v){var w=r.constructor,_=n.constructor;w==_||!("constructor"in r)||!("constructor"in n)||"function"==typeof w&&w instanceof w&&"function"==typeof _&&_ instanceof _||(b=!1)}return u.delete(r),u.delete(n),b},mn}(),o=xi(),i=_t(),a=Dt(),u=Wo(),s="[object Arguments]",c="[object Array]",f="[object Object]",l=Object.prototype.hasOwnProperty;return Rn=function(h,p,d,b,v,g){var y=i(h),m=i(p),w=y?c:o(h),_=m?c:o(p),x=(w=w==s?f:w)==f,j=(_=_==s?f:_)==f,O=w==_;if(O&&a(h)){if(!a(p))return!1;y=!0,x=!1}if(O&&!x)return g||(g=new t),y||u(h)?e(h,p,d,b,v,g):r(h,p,w,d,b,v,g);if(!(1&d)){var M=x&&l.call(h,"__wrapped__"),S=j&&l.call(p,"__wrapped__");if(M||S){var k=M?h.value():h,C=S?p.value():p;return g||(g=new t),v(k,C,d,b,g)}}return!!O&&(g||(g=new t),n(h,p,d,b,v,g))}}function Oi(){if(Ln)return Tn;Ln=1;var t=ji(),e=xt();return Tn=function r(n,o,i,a,u){return n===o||(null==n||null==o||!e(n)&&!e(o)?n!=n&&o!=o:t(n,o,i,a,r,u))},Tn}function Mi(){if(zn)return Dn;zn=1;var t=Xo();return Dn=function(e){return e==e&&!t(e)}}function Si(){if($n)return Wn;return $n=1,Wn=function(t,e){return function(r){return null!=r&&(r[t]===e&&(void 0!==e||t in Object(r)))}}}function ki(){if(In)return Nn;In=1;var t=function(){if(Fn)return Un;Fn=1;var t=hi(),e=Oi();return Un=function(r,n,o,i){var a=o.length,u=a,s=!i;if(null==r)return!u;for(r=Object(r);a--;){var c=o[a];if(s&&c[2]?c[1]!==r[c[0]]:!(c[0]in r))return!1}for(;++a<u;){var f=(c=o[a])[0],l=r[f],h=c[1];if(s&&c[2]){if(void 0===l&&!(f in r))return!1}else{var p=new t;if(i)var d=i(l,h,f,r,n,p);if(!(void 0===d?e(h,l,3,i,p):d))return!1}}return!0},Un}(),e=function(){if(Hn)return Bn;Hn=1;var t=Mi(),e=Go();return Bn=function(r){for(var n=e(r),o=n.length;o--;){var i=n[o],a=r[i];n[o]=[i,a,t(a)]}return n}}(),r=Si();return Nn=function(n){var o=e(n);return 1==o.length&&o[0][2]?r(o[0][0],o[0][1]):function(e){return e===n||t(e,n,o)}}}function Ci(){if(Xn)return Vn;Xn=1;var t=wt(),e=xt();return Vn=function(r){return"symbol"==typeof r||e(r)&&"[object Symbol]"==t(r)}}function Ai(){if(Yn)return qn;Yn=1;var t=_t(),e=Ci(),r=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,n=/^\w*$/;return qn=function(o,i){if(t(o))return!1;var a=typeof o;return!("number"!=a&&"symbol"!=a&&"boolean"!=a&&null!=o&&!e(o))||(n.test(o)||!r.test(o)||null!=i&&o in Object(i))}}function Ei(){if(Qn)return Jn;Qn=1;var t=function(){if(Kn)return Gn;Kn=1;var t=li();function e(r,n){if("function"!=typeof r||null!=n&&"function"!=typeof n)throw new TypeError("Expected a function");var o=function(){var t=arguments,e=n?n.apply(this,t):t[0],i=o.cache;if(i.has(e))return i.get(e);var a=r.apply(this,t);return o.cache=i.set(e,a)||i,a};return o.cache=new(e.Cache||t),o}return e.Cache=t,Gn=e}();return Jn=function(e){var r=t(e,function(t){return 500===n.size&&n.clear(),t}),n=r.cache;return r}}function Ri(){if(oo)return no;oo=1;var t=function(){if(ro)return eo;ro=1;var t=mt(),e=ti(),r=_t(),n=Ci(),o=t?t.prototype:void 0,i=o?o.toString:void 0;return eo=function t(o){if("string"==typeof o)return o;if(r(o))return e(o,t)+"";if(n(o))return i?i.call(o):"";var a=o+"";return"0"==a&&1/o==-1/0?"-0":a},eo}();return no=function(e){return null==e?"":t(e)}}function Pi(){if(ao)return io;ao=1;var t=_t(),e=Ai(),r=function(){if(to)return Zn;to=1;var t=Ei(),e=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,r=/\\(\\)?/g,n=t(function(t){var n=[];return 46===t.charCodeAt(0)&&n.push(""),t.replace(e,function(t,e,o,i){n.push(o?i.replace(r,"$1"):e||t)}),n});return Zn=n}(),n=Ri();return io=function(o,i){return t(o)?o:e(o,i)?[o]:r(n(o))}}function Ti(){if(so)return uo;so=1;var t=Ci();return uo=function(e){if("string"==typeof e||t(e))return e;var r=e+"";return"0"==r&&1/e==-1/0?"-0":r}}function Li(){if(fo)return co;fo=1;var t=Pi(),e=Ti();return co=function(r,n){for(var o=0,i=(n=t(n,r)).length;null!=r&&o<i;)r=r[e(n[o++])];return o&&o==i?r:void 0},co}function Ui(){if(mo)return yo;mo=1;var t=bo?po:(bo=1,po=function(t,e){return null!=t&&e in Object(t)}),e=function(){if(go)return vo;go=1;var t=Pi(),e=Ot(),r=_t(),n=zt(),o=Bt(),i=Ti();return vo=function(a,u,s){for(var c=-1,f=(u=t(u,a)).length,l=!1;++c<f;){var h=i(u[c]);if(!(l=null!=a&&s(a,h)))break;a=a[h]}return l||++c!=f?l:!!(f=null==a?0:a.length)&&o(f)&&n(h,f)&&(r(a)||e(a))},vo}();return yo=function(r,n){return null!=r&&e(r,n,t)}}function Fi(){if(_o)return wo;_o=1;var t=Oi(),e=function(){if(ho)return lo;ho=1;var t=Li();return lo=function(e,r,n){var o=null==e?void 0:t(e,r);return void 0===o?n:o}}(),r=Ui(),n=Ai(),o=Mi(),i=Si(),a=Ti();return wo=function(u,s){return n(u)&&o(s)?i(a(u),s):function(n){var o=e(n,u);return void 0===o&&o===s?r(n,u):t(s,o,3)}}}function Di(){if(ko)return So;ko=1;var t=jo?xo:(jo=1,xo=function(t){return function(e){return null==e?void 0:e[t]}}),e=function(){if(Mo)return Oo;Mo=1;var t=Li();return Oo=function(e){return function(r){return t(r,e)}}}(),r=Ai(),n=Ti();return So=function(o){return r(o)?t(n(o)):e(o)}}function zi(){if(To)return Po;To=1;var t=Ko(),e=function(){if(Ro)return Eo;Ro=1;var t=Yo();return Eo=function(e,r){return function(n,o){if(null==n)return n;if(!t(n))return e(n,o);for(var i=n.length,a=r?i:-1,u=Object(n);(r?a--:++a<i)&&!1!==o(u[a],a,u););return n}},Eo}(),r=e(t);return Po=r}function Bi(){if(Do)return Fo;Do=1;var t=ti(),e=function(){if(Ao)return Co;Ao=1;var t=ki(),e=Fi(),r=Jo(),n=_t(),o=Di();return Co=function(i){return"function"==typeof i?i:null==i?r:"object"==typeof i?n(i)?e(i[0],i[1]):t(i):o(i)}}(),r=function(){if(Uo)return Lo;Uo=1;var t=zi(),e=Yo();return Lo=function(r,n){var o=-1,i=e(r)?Array(r.length):[];return t(r,function(t,e,r){i[++o]=n(t,e,r)}),i},Lo}(),n=_t();return Fo=function(o,i){return(n(o)?t:r)(o,e(i,3))}}function Hi(){if(zo)return vt;zo=1,Object.defineProperty(vt,"__esModule",{value:!0}),vt.flattenNames=void 0;var t=function(){if(ot)return nt;ot=1;var t=wt(),e=_t(),r=xt();return nt=function(n){return"string"==typeof n||!e(n)&&r(n)&&"[object String]"==t(n)}}(),e=a(t),r=a(Qo()),n=function(){if(me)return ye;me=1;var t=wt(),e=Zo(),r=xt(),n=Function.prototype,o=Object.prototype,i=n.toString,a=o.hasOwnProperty,u=i.call(Object);return ye=function(n){if(!r(n)||"[object Object]"!=t(n))return!1;var o=e(n);if(null===o)return!0;var s=a.call(o,"constructor")&&o.constructor;return"function"==typeof s&&s instanceof s&&i.call(s)==u}}(),o=a(n),i=a(Bi());function a(t){return t&&t.__esModule?t:{default:t}}var u=vt.flattenNames=function t(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],a=[];return(0,i.default)(n,function(n){Array.isArray(n)?t(n).map(function(t){return a.push(t)}):(0,o.default)(n)?(0,r.default)(n,function(t,e){!0===t&&a.push(e),a.push(e+"-"+t)}):(0,e.default)(n)&&a.push(n)}),a};return vt.default=u,vt}var Wi,$i,Ni,Ii,Vi,Xi,qi,Yi,Gi,Ki,Ji,Qi,Zi,ta,ea,ra,na,oa,ia,aa,ua={};function sa(){if(Xi)return Vi;Xi=1;var t=function(){if(Ii)return Ni;Ii=1;var t=ai(),e=function(){try{var e=t(Object,"defineProperty");return e({},"",{}),e}catch(t){}}();return Ni=e}();return Vi=function(e,r,n){"__proto__"==r&&t?t(e,r,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[r]=n}}function ca(){if(Yi)return qi;Yi=1;var t=sa(),e=ei(),r=Object.prototype.hasOwnProperty;return qi=function(n,o,i){var a=n[o];r.call(n,o)&&e(a,i)&&(void 0!==i||o in n)||t(n,o,i)}}function fa(){if(Ki)return Gi;Ki=1;var t=ca(),e=sa();return Gi=function(r,n,o,i){var a=!o;o||(o={});for(var u=-1,s=n.length;++u<s;){var c=n[u],f=i?i(o[c],r[c],c,o,r):void 0;void 0===f&&(f=r[c]),a?e(o,c,f):t(o,c,f)}return o},Gi}function la(){if(ra)return ea;ra=1;var t=Xo(),e=No(),r=ta?Zi:(ta=1,Zi=function(t){var e=[];if(null!=t)for(var r in Object(t))e.push(r);return e}),n=Object.prototype.hasOwnProperty;return ea=function(o){if(!t(o))return r(o);var i=e(o),a=[];for(var u in o)("constructor"!=u||!i&&n.call(o,u))&&a.push(u);return a}}function ha(){if(oa)return na;oa=1;var t=$o(),e=la(),r=Yo();return na=function(n){return r(n)?t(n,!0):e(n)}}var pa,da,ba,va,ga,ya,ma,wa,_a,xa,ja,Oa,Ma,Sa,ka,Ca,Aa,Ea,Ra,Pa,Ta,La,Ua,Fa,Da,za,Ba,Ha,Wa,$a,Na,Ia,Va,Xa,qa,Ya,Ga,Ka,Ja,Qa,Za,tu,eu={exports:{}};function ru(){if(ma)return ya;ma=1;var t=gi(),e=Zo(),r=wi(),n=mi(),o=Object.getOwnPropertySymbols;return ya=o?function(n){for(var o=[];n;)t(o,r(n)),n=e(n);return o}:n}function nu(){if(ka)return Sa;ka=1;var t=bi();return Sa=function(e){var r=new e.constructor(e.byteLength);return new t(r).set(new t(e)),r}}function ou(){if(Da)return Fa;Da=1;var t=nu(),e=function(){if(Aa)return Ca;Aa=1;var t=nu();return Ca=function(e,r){var n=r?t(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)}}(),r=function(){if(Ra)return Ea;Ra=1;var t=/\w*$/;return Ea=function(e){var r=new e.constructor(e.source,t.exec(e));return r.lastIndex=e.lastIndex,r}}(),n=function(){if(Ta)return Pa;Ta=1;var t=mt(),e=t?t.prototype:void 0,r=e?e.valueOf:void 0;return Pa=function(t){return r?Object(r.call(t)):{}}}(),o=function(){if(Ua)return La;Ua=1;var t=nu();return La=function(e,r){var n=r?t(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}}();return Fa=function(i,a,u){var s=i.constructor;switch(a){case"[object ArrayBuffer]":return t(i);case"[object Boolean]":case"[object Date]":return new s(+i);case"[object DataView]":return e(i,u);case"[object Float32Array]":case"[object Float64Array]":case"[object Int8Array]":case"[object Int16Array]":case"[object Int32Array]":case"[object Uint8Array]":case"[object Uint8ClampedArray]":case"[object Uint16Array]":case"[object Uint32Array]":return o(i,u);case"[object Map]":case"[object Set]":return new s;case"[object Number]":case"[object String]":return new s(i);case"[object RegExp]":return r(i);case"[object Symbol]":return n(i)}}}function iu(){if(Wa)return Ha;Wa=1;var t=function(){if(Ba)return za;Ba=1;var t=Xo(),e=Object.create,r=function(){function r(){}return function(n){if(!t(n))return{};if(e)return e(n);r.prototype=n;var o=new r;return r.prototype=void 0,o}}();return za=r}(),e=Zo(),r=No();return Ha=function(n){return"function"!=typeof n.constructor||r(n)?{}:t(e(n))}}function au(){if(Va)return Ia;Va=1;var t=function(){if(Na)return $a;Na=1;var t=xi(),e=xt();return $a=function(r){return e(r)&&"[object Map]"==t(r)}}(),e=Ht(),r=Ho(),n=r&&r.isMap,o=n?e(n):t;return Ia=o}function uu(){if(Ga)return Ya;Ga=1;var t=function(){if(qa)return Xa;qa=1;var t=xi(),e=xt();return Xa=function(r){return e(r)&&"[object Set]"==t(r)}}(),e=Ht(),r=Ho(),n=r&&r.isSet,o=n?e(n):t;return Ya=o}function su(){if(Ja)return Ka;Ja=1;var t=hi(),e=($i||($i=1,Wi=function(t,e){for(var r=-1,n=null==t?0:t.length;++r<n&&!1!==e(t[r],r,t););return t}),Wi),r=ca(),n=function(){if(Qi)return Ji;Qi=1;var t=fa(),e=Go();return Ji=function(r,n){return r&&t(n,e(n),r)}}(),o=function(){if(aa)return ia;aa=1;var t=fa(),e=ha();return ia=function(r,n){return r&&t(n,e(n),r)}}(),i=(pa||(pa=1,function(t,e){var r=yt(),n=e&&!e.nodeType&&e,o=n&&t&&!t.nodeType&&t,i=o&&o.exports===n?r.Buffer:void 0,a=i?i.allocUnsafe:void 0;t.exports=function(t,e){if(e)return t.slice();var r=t.length,n=a?a(r):new t.constructor(r);return t.copy(n),n}}(eu,eu.exports)),eu.exports),a=(ba||(ba=1,da=function(t,e){var r=-1,n=t.length;for(e||(e=Array(n));++r<n;)e[r]=t[r];return e}),da),u=function(){if(ga)return va;ga=1;var t=fa(),e=wi();return va=function(r,n){return t(r,e(r),n)}}(),s=function(){if(_a)return wa;_a=1;var t=fa(),e=ru();return wa=function(r,n){return t(r,e(r),n)}}(),c=_i(),f=function(){if(ja)return xa;ja=1;var t=yi(),e=ru(),r=ha();return xa=function(n){return t(n,r,e)}}(),l=xi(),h=function(){if(Ma)return Oa;Ma=1;var t=Object.prototype.hasOwnProperty;return Oa=function(e){var r=e.length,n=new e.constructor(r);return r&&"string"==typeof e[0]&&t.call(e,"index")&&(n.index=e.index,n.input=e.input),n}}(),p=ou(),d=iu(),b=_t(),v=Dt(),g=au(),y=Xo(),m=uu(),w=Go(),_=ha(),x="[object Arguments]",j="[object Function]",O="[object Object]",M={};return M[x]=M["[object Array]"]=M["[object ArrayBuffer]"]=M["[object DataView]"]=M["[object Boolean]"]=M["[object Date]"]=M["[object Float32Array]"]=M["[object Float64Array]"]=M["[object Int8Array]"]=M["[object Int16Array]"]=M["[object Int32Array]"]=M["[object Map]"]=M["[object Number]"]=M[O]=M["[object RegExp]"]=M["[object Set]"]=M["[object String]"]=M["[object Symbol]"]=M["[object Uint8Array]"]=M["[object Uint8ClampedArray]"]=M["[object Uint16Array]"]=M["[object Uint32Array]"]=!0,M["[object Error]"]=M[j]=M["[object WeakMap]"]=!1,Ka=function S(k,C,A,E,R,P){var T,L=1&C,U=2&C,F=4&C;if(A&&(T=R?A(k,E,R,P):A(k)),void 0!==T)return T;if(!y(k))return k;var D=b(k);if(D){if(T=h(k),!L)return a(k,T)}else{var z=l(k),B=z==j||"[object GeneratorFunction]"==z;if(v(k))return i(k,L);if(z==O||z==x||B&&!R){if(T=U||B?{}:d(k),!L)return U?s(k,o(T,k)):u(k,n(T,k))}else{if(!M[z])return R?k:{};T=p(k,z,L)}}P||(P=new t);var H=P.get(k);if(H)return H;P.set(k,T),m(k)?k.forEach(function(t){T.add(S(t,C,A,t,k,P))}):g(k)&&k.forEach(function(t,e){T.set(e,S(t,C,A,e,k,P))});var W=D?void 0:(F?U?f:c:U?_:w)(k);return e(W||k,function(t,e){W&&(t=k[e=t]),r(T,e,S(t,C,A,e,k,P))}),T},Ka}function cu(){if(tu)return ua;tu=1,Object.defineProperty(ua,"__esModule",{value:!0}),ua.mergeClasses=void 0;var t=n(Qo()),e=n(function(){if(Za)return Qa;Za=1;var t=su();return Qa=function(e){return t(e,5)}}()),r=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t};function n(t){return t&&t.__esModule?t:{default:t}}var o=ua.mergeClasses=function(n){var o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],i=n.default&&(0,e.default)(n.default)||{};return o.map(function(e){var o=n[e];return o&&(0,t.default)(o,function(t,e){i[e]||(i[e]={}),i[e]=r({},i[e],o[e])}),e}),i};return ua.default=o,ua}var fu,lu={};var hu,pu={};function du(){if(hu)return pu;hu=1,Object.defineProperty(pu,"__esModule",{value:!0}),pu.hover=void 0;var t,r=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},n=(t=e)&&t.__esModule?t:{default:t};function o(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}var i=pu.hover=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"span";return function(i){function a(){var i,u,s;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,a);for(var c=arguments.length,f=Array(c),l=0;l<c;l++)f[l]=arguments[l];return u=s=o(this,(i=a.__proto__||Object.getPrototypeOf(a)).call.apply(i,[this].concat(f))),s.state={hover:!1},s.handleMouseOver=function(){return s.setState({hover:!0})},s.handleMouseOut=function(){return s.setState({hover:!1})},s.render=function(){return n.default.createElement(e,{onMouseOver:s.handleMouseOver,onMouseOut:s.handleMouseOut},n.default.createElement(t,r({},s.props,s.state)))},o(s,u)}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(a,i),a}(n.default.Component)};return pu.default=i,pu}var bu,vu={};function gu(){if(bu)return vu;bu=1,Object.defineProperty(vu,"__esModule",{value:!0}),vu.active=void 0;var t,r=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},n=(t=e)&&t.__esModule?t:{default:t};function o(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}var i=vu.active=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"span";return function(i){function a(){var i,u,s;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,a);for(var c=arguments.length,f=Array(c),l=0;l<c;l++)f[l]=arguments[l];return u=s=o(this,(i=a.__proto__||Object.getPrototypeOf(a)).call.apply(i,[this].concat(f))),s.state={active:!1},s.handleMouseDown=function(){return s.setState({active:!0})},s.handleMouseUp=function(){return s.setState({active:!1})},s.render=function(){return n.default.createElement(e,{onMouseDown:s.handleMouseDown,onMouseUp:s.handleMouseUp},n.default.createElement(t,r({},s.props,s.state)))},o(s,u)}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(a,i),a}(n.default.Component)};return vu.default=i,vu}var yu,mu,wu={};var _u=function(){if(mu)return bt;mu=1,Object.defineProperty(bt,"__esModule",{value:!0}),bt.ReactCSS=bt.loop=bt.handleActive=bt.handleHover=bt.hover=void 0;var t=u(Hi()),e=u(cu()),r=function(){if(fu)return lu;fu=1,Object.defineProperty(lu,"__esModule",{value:!0}),lu.autoprefix=void 0;var t,e=Qo(),r=(t=e)&&t.__esModule?t:{default:t},n=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},o={borderRadius:function(t){return{msBorderRadius:t,MozBorderRadius:t,OBorderRadius:t,WebkitBorderRadius:t,borderRadius:t}},boxShadow:function(t){return{msBoxShadow:t,MozBoxShadow:t,OBoxShadow:t,WebkitBoxShadow:t,boxShadow:t}},userSelect:function(t){return{WebkitTouchCallout:t,KhtmlUserSelect:t,MozUserSelect:t,msUserSelect:t,WebkitUserSelect:t,userSelect:t}},flex:function(t){return{WebkitBoxFlex:t,MozBoxFlex:t,WebkitFlex:t,msFlex:t,flex:t}},flexBasis:function(t){return{WebkitFlexBasis:t,flexBasis:t}},justifyContent:function(t){return{WebkitJustifyContent:t,justifyContent:t}},transition:function(t){return{msTransition:t,MozTransition:t,OTransition:t,WebkitTransition:t,transition:t}},transform:function(t){return{msTransform:t,MozTransform:t,OTransform:t,WebkitTransform:t,transform:t}},absolute:function(t){var e=t&&t.split(" ");return{position:"absolute",top:e&&e[0],right:e&&e[1],bottom:e&&e[2],left:e&&e[3]}},extend:function(t,e){return e[t]||{extend:t}}},i=lu.autoprefix=function(t){var e={};return(0,r.default)(t,function(t,i){var a={};(0,r.default)(t,function(t,e){var r=o[e];r?a=n({},a,r(t)):a[e]=t}),e[i]=a}),e};return lu.default=i,lu}(),n=u(r),o=u(du()),i=u(gu()),a=u((yu||(yu=1,Object.defineProperty(wu,"__esModule",{value:!0}),wu.default=function(t,e){var r={},n=function(t){var e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];r[t]=e};return 0===t&&n("first-child"),t===e-1&&n("last-child"),(0===t||t%2==0)&&n("even"),1===Math.abs(t%2)&&n("odd"),n("nth-child",t),r}),wu));function u(t){return t&&t.__esModule?t:{default:t}}bt.hover=o.default,bt.handleHover=o.default,bt.handleActive=i.default,bt.loop=a.default;var s=bt.ReactCSS=function(r){for(var o=arguments.length,i=Array(o>1?o-1:0),a=1;a<o;a++)i[a-1]=arguments[a];var u=(0,t.default)(i),s=(0,e.default)(r,u);return(0,n.default)(s)};return bt.default=s,bt}();const xu=n.getDefaultExportFromCjs(_u);var ju={},Ou=function(t,e,r,n){var o=t+"-"+e+"-"+r+(n?"-server":"");if(ju[o])return ju[o];var i=function(t,e,r,n){if("undefined"==typeof document&&!n)return null;var o=n?new n:document.createElement("canvas");o.width=2*r,o.height=2*r;var i=o.getContext("2d");return i?(i.fillStyle=t,i.fillRect(0,0,o.width,o.height),i.fillStyle=e,i.fillRect(0,0,r,r),i.translate(r,r),i.fillRect(0,0,r,r),o.toDataURL()):null}(t,e,r,n);return ju[o]=i,i},Mu=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},Su=function(t){var r=t.white,n=t.grey,o=t.size,i=t.renderers,a=t.borderRadius,u=t.boxShadow,s=t.children,c=xu({default:{grid:{borderRadius:a,boxShadow:u,absolute:"0px 0px 0px 0px",background:"url("+Ou(r,n,o,i.canvas)+") center left"}}});return e.isValidElement(s)?e.cloneElement(s,Mu({},s.props,{style:Mu({},s.props.style,c.grid)})):e.createElement("div",{style:c.grid})};Su.defaultProps={size:8,white:"transparent",grey:"rgba(0,0,0,.08)",renderers:{}};var ku=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},Cu=function(){function t(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}return function(e,r,n){return r&&t(e.prototype,r),n&&t(e,n),e}}();function Au(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}var Eu=function(){function t(){var e,r,n;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t);for(var o=arguments.length,i=Array(o),a=0;a<o;a++)i[a]=arguments[a];return r=n=Au(this,(e=t.__proto__||Object.getPrototypeOf(t)).call.apply(e,[this].concat(i))),n.handleChange=function(t){var e=function(t,e,r,n,o){var i=o.clientWidth,a=o.clientHeight,u="number"==typeof t.pageX?t.pageX:t.touches[0].pageX,s="number"==typeof t.pageY?t.pageY:t.touches[0].pageY,c=u-(o.getBoundingClientRect().left+window.pageXOffset),f=s-(o.getBoundingClientRect().top+window.pageYOffset);if("vertical"===r){var l=void 0;if(l=f<0?0:f>a?1:Math.round(100*f/a)/100,e.a!==l)return{h:e.h,s:e.s,l:e.l,a:l,source:"rgb"}}else{var h=void 0;if(n!==(h=c<0?0:c>i?1:Math.round(100*c/i)/100))return{h:e.h,s:e.s,l:e.l,a:h,source:"rgb"}}return null}(t,n.props.hsl,n.props.direction,n.props.a,n.container);e&&"function"==typeof n.props.onChange&&n.props.onChange(e,t)},n.handleMouseDown=function(t){n.handleChange(t),window.addEventListener("mousemove",n.handleChange),window.addEventListener("mouseup",n.handleMouseUp)},n.handleMouseUp=function(){n.unbindEventListeners()},n.unbindEventListeners=function(){window.removeEventListener("mousemove",n.handleChange),window.removeEventListener("mouseup",n.handleMouseUp)},Au(n,r)}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(t,e.PureComponent||e.Component),Cu(t,[{key:"componentWillUnmount",value:function(){this.unbindEventListeners()}},{key:"render",value:function(){var t=this,r=this.props.rgb,n=xu({default:{alpha:{absolute:"0px 0px 0px 0px",borderRadius:this.props.radius},checkboard:{absolute:"0px 0px 0px 0px",overflow:"hidden",borderRadius:this.props.radius},gradient:{absolute:"0px 0px 0px 0px",background:"linear-gradient(to right, rgba("+r.r+","+r.g+","+r.b+", 0) 0%,\n rgba("+r.r+","+r.g+","+r.b+", 1) 100%)",boxShadow:this.props.shadow,borderRadius:this.props.radius},container:{position:"relative",height:"100%",margin:"0 3px"},pointer:{position:"absolute",left:100*r.a+"%"},slider:{width:"4px",borderRadius:"1px",height:"8px",boxShadow:"0 0 2px rgba(0, 0, 0, .6)",background:"#fff",marginTop:"1px",transform:"translateX(-2px)"}},vertical:{gradient:{background:"linear-gradient(to bottom, rgba("+r.r+","+r.g+","+r.b+", 0) 0%,\n rgba("+r.r+","+r.g+","+r.b+", 1) 100%)"},pointer:{left:0,top:100*r.a+"%"}},overwrite:ku({},this.props.style)},{vertical:"vertical"===this.props.direction,overwrite:!0});return e.createElement("div",{style:n.alpha},e.createElement("div",{style:n.checkboard},e.createElement(Su,{renderers:this.props.renderers})),e.createElement("div",{style:n.gradient}),e.createElement("div",{style:n.container,ref:function(e){return t.container=e},onMouseDown:this.handleMouseDown,onTouchMove:this.handleChange,onTouchStart:this.handleChange},e.createElement("div",{style:n.pointer},this.props.pointer?e.createElement(this.props.pointer,this.props):e.createElement("div",{style:n.slider}))))}}]),t}(),Ru=function(){function t(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}return function(e,r,n){return r&&t(e.prototype,r),n&&t(e,n),e}}();var Pu=[38,40],Tu=1,Lu=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t);var r=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return r.handleBlur=function(){r.state.blurValue&&r.setState({value:r.state.blurValue,blurValue:null})},r.handleChange=function(t){r.setUpdatedValue(t.target.value,t)},r.handleKeyDown=function(t){var e,n=function(t){return Number(String(t).replace(/%/g,""))}(t.target.value);if(!isNaN(n)&&(e=t.keyCode,Pu.indexOf(e)>-1)){var o=r.getArrowOffset(),i=38===t.keyCode?n+o:n-o;r.setUpdatedValue(i,t)}},r.handleDrag=function(t){if(r.props.dragLabel){var e=Math.round(r.props.value+t.movementX);e>=0&&e<=r.props.dragMax&&r.props.onChange&&r.props.onChange(r.getValueObjectWithLabel(e),t)}},r.handleMouseDown=function(t){r.props.dragLabel&&(t.preventDefault(),r.handleDrag(t),window.addEventListener("mousemove",r.handleDrag),window.addEventListener("mouseup",r.handleMouseUp))},r.handleMouseUp=function(){r.unbindEventListeners()},r.unbindEventListeners=function(){window.removeEventListener("mousemove",r.handleDrag),window.removeEventListener("mouseup",r.handleMouseUp)},r.state={value:String(e.value).toUpperCase(),blurValue:String(e.value).toUpperCase()},r.inputId="rc-editable-input-"+Tu++,r}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(t,e.PureComponent||e.Component),Ru(t,[{key:"componentDidUpdate",value:function(t,e){this.props.value===this.state.value||t.value===this.props.value&&e.value===this.state.value||(this.input===document.activeElement?this.setState({blurValue:String(this.props.value).toUpperCase()}):this.setState({value:String(this.props.value).toUpperCase(),blurValue:!this.state.blurValue&&String(this.props.value).toUpperCase()}))}},{key:"componentWillUnmount",value:function(){this.unbindEventListeners()}},{key:"getValueObjectWithLabel",value:function(t){return function(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}({},this.props.label,t)}},{key:"getArrowOffset",value:function(){return this.props.arrowOffset||1}},{key:"setUpdatedValue",value:function(t,e){var r=this.props.label?this.getValueObjectWithLabel(t):t;this.props.onChange&&this.props.onChange(r,e),this.setState({value:t})}},{key:"render",value:function(){var t=this,r=xu({default:{wrap:{position:"relative"}},"user-override":{wrap:this.props.style&&this.props.style.wrap?this.props.style.wrap:{},input:this.props.style&&this.props.style.input?this.props.style.input:{},label:this.props.style&&this.props.style.label?this.props.style.label:{}},"dragLabel-true":{label:{cursor:"ew-resize"}}},{"user-override":!0},this.props);return e.createElement("div",{style:r.wrap},e.createElement("input",{id:this.inputId,style:r.input,ref:function(e){return t.input=e},value:this.state.value,onKeyDown:this.handleKeyDown,onChange:this.handleChange,onBlur:this.handleBlur,placeholder:this.props.placeholder,spellCheck:"false"}),this.props.label&&!this.props.hideLabel?e.createElement("label",{htmlFor:this.inputId,style:r.label,onMouseDown:this.handleMouseDown},this.props.label):null)}}]),t}(),Uu=function(){function t(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}return function(e,r,n){return r&&t(e.prototype,r),n&&t(e,n),e}}();function Fu(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}var Du=function(){function t(){var e,r,n;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t);for(var o=arguments.length,i=Array(o),a=0;a<o;a++)i[a]=arguments[a];return r=n=Fu(this,(e=t.__proto__||Object.getPrototypeOf(t)).call.apply(e,[this].concat(i))),n.handleChange=function(t){var e=function(t,e,r,n){var o=n.clientWidth,i=n.clientHeight,a="number"==typeof t.pageX?t.pageX:t.touches[0].pageX,u="number"==typeof t.pageY?t.pageY:t.touches[0].pageY,s=a-(n.getBoundingClientRect().left+window.pageXOffset),c=u-(n.getBoundingClientRect().top+window.pageYOffset);if("vertical"===e){var f=void 0;if(f=c<0?359:c>i?0:360*(-100*c/i+100)/100,r.h!==f)return{h:f,s:r.s,l:r.l,a:r.a,source:"hsl"}}else{var l=void 0;if(l=s<0?0:s>o?359:100*s/o*360/100,r.h!==l)return{h:l,s:r.s,l:r.l,a:r.a,source:"hsl"}}return null}(t,n.props.direction,n.props.hsl,n.container);e&&"function"==typeof n.props.onChange&&n.props.onChange(e,t)},n.handleMouseDown=function(t){n.handleChange(t),window.addEventListener("mousemove",n.handleChange),window.addEventListener("mouseup",n.handleMouseUp)},n.handleMouseUp=function(){n.unbindEventListeners()},Fu(n,r)}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(t,e.PureComponent||e.Component),Uu(t,[{key:"componentWillUnmount",value:function(){this.unbindEventListeners()}},{key:"unbindEventListeners",value:function(){window.removeEventListener("mousemove",this.handleChange),window.removeEventListener("mouseup",this.handleMouseUp)}},{key:"render",value:function(){var t=this,r=this.props.direction,n=void 0===r?"horizontal":r,o=xu({default:{hue:{absolute:"0px 0px 0px 0px",borderRadius:this.props.radius,boxShadow:this.props.shadow},container:{padding:"0 2px",position:"relative",height:"100%",borderRadius:this.props.radius},pointer:{position:"absolute",left:100*this.props.hsl.h/360+"%"},slider:{marginTop:"1px",width:"4px",borderRadius:"1px",height:"8px",boxShadow:"0 0 2px rgba(0, 0, 0, .6)",background:"#fff",transform:"translateX(-2px)"}},vertical:{pointer:{left:"0px",top:-100*this.props.hsl.h/360+100+"%"}}},{vertical:"vertical"===n});return e.createElement("div",{style:o.hue},e.createElement("div",{className:"hue-"+n,style:o.container,ref:function(e){return t.container=e},onMouseDown:this.handleMouseDown,onTouchMove:this.handleChange,onTouchStart:this.handleChange},e.createElement("style",null,"\n .hue-horizontal {\n background: linear-gradient(to right, #f00 0%, #ff0 17%, #0f0\n 33%, #0ff 50%, #00f 67%, #f0f 83%, #f00 100%);\n background: -webkit-linear-gradient(to right, #f00 0%, #ff0\n 17%, #0f0 33%, #0ff 50%, #00f 67%, #f0f 83%, #f00 100%);\n }\n\n .hue-vertical {\n background: linear-gradient(to top, #f00 0%, #ff0 17%, #0f0 33%,\n #0ff 50%, #00f 67%, #f0f 83%, #f00 100%);\n background: -webkit-linear-gradient(to top, #f00 0%, #ff0 17%,\n #0f0 33%, #0ff 50%, #00f 67%, #f0f 83%, #f00 100%);\n }\n "),e.createElement("div",{style:o.pointer},this.props.pointer?e.createElement(this.props.pointer,this.props):e.createElement("div",{style:o.slider}))))}}]),t}(),zu="object"==typeof global&&global&&global.Object===Object&&global,Bu="object"==typeof self&&self&&self.Object===Object&&self,Hu=zu||Bu||Function("return this")(),Wu=Hu.Symbol,$u=Object.prototype,Nu=$u.hasOwnProperty,Iu=$u.toString,Vu=Wu?Wu.toStringTag:void 0;var Xu=Object.prototype.toString;var qu=Wu?Wu.toStringTag:void 0;function Yu(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":qu&&qu in Object(t)?function(t){var e=Nu.call(t,Vu),r=t[Vu];try{t[Vu]=void 0;var n=!0}catch(t){}var o=Iu.call(t);return n&&(e?t[Vu]=r:delete t[Vu]),o}(t):function(t){return Xu.call(t)}(t)}function Gu(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}i.string,i.oneOf([0,1,2,3,4,5]),i.number,i.object;var Ku=function(){return Hu.Date.now()},Ju=/\s/;var Qu=/^\s+/;function Zu(t){return t?t.slice(0,function(t){for(var e=t.length;e--&&Ju.test(t.charAt(e)););return e}(t)+1).replace(Qu,""):t}var ts=/^[-+]0x[0-9a-f]+$/i,es=/^0b[01]+$/i,rs=/^0o[0-7]+$/i,ns=parseInt;function os(t){if("number"==typeof t)return t;if(function(t){return"symbol"==typeof t||function(t){return null!=t&&"object"==typeof t}(t)&&"[object Symbol]"==Yu(t)}(t))return NaN;if(Gu(t)){var e="function"==typeof t.valueOf?t.valueOf():t;t=Gu(e)?e+"":e}if("string"!=typeof t)return 0===t?t:+t;t=Zu(t);var r=es.test(t);return r||rs.test(t)?ns(t.slice(2),r?2:8):ts.test(t)?NaN:+t}var is=Math.max,as=Math.min;function us(t,e,r){var n,o,i,a,u,s,c=0,f=!1,l=!1,h=!0;if("function"!=typeof t)throw new TypeError("Expected a function");function p(e){var r=n,i=o;return n=o=void 0,c=e,a=t.apply(i,r)}function d(t){var r=t-s;return void 0===s||r>=e||r<0||l&&t-c>=i}function b(){var t=Ku();if(d(t))return v(t);u=setTimeout(b,function(t){var r=e-(t-s);return l?as(r,i-(t-c)):r}(t))}function v(t){return u=void 0,h&&n?p(t):(n=o=void 0,a)}function g(){var t=Ku(),r=d(t);if(n=arguments,o=this,s=t,r){if(void 0===u)return function(t){return c=t,u=setTimeout(b,e),f?p(t):a}(s);if(l)return clearTimeout(u),u=setTimeout(b,e),p(s)}return void 0===u&&(u=setTimeout(b,e)),a}return e=os(e)||0,Gu(r)&&(f=!!r.leading,i=(l="maxWait"in r)?is(os(r.maxWait)||0,e):i,h="trailing"in r?!!r.trailing:h),g.cancel=function(){void 0!==u&&clearTimeout(u),c=0,n=s=o=u=void 0},g.flush=function(){return void 0===u?a:v(Ku())},g}var ss=function(){function t(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}return function(e,r,n){return r&&t(e.prototype,r),n&&t(e,n),e}}();!function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t);var r=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return r.handleChange=function(t){"function"==typeof r.props.onChange&&r.throttle(r.props.onChange,function(t,e,r){var n=r.getBoundingClientRect(),o=n.width,i=n.height,a="number"==typeof t.pageX?t.pageX:t.touches[0].pageX,u="number"==typeof t.pageY?t.pageY:t.touches[0].pageY,s=a-(r.getBoundingClientRect().left+window.pageXOffset),c=u-(r.getBoundingClientRect().top+window.pageYOffset);s<0?s=0:s>o&&(s=o),c<0?c=0:c>i&&(c=i);var f=s/o,l=1-c/i;return{h:e.h,s:f,v:l,a:e.a,source:"hsv"}}(t,r.props.hsl,r.container),t)},r.handleMouseDown=function(t){r.handleChange(t);var e=r.getContainerRenderWindow();e.addEventListener("mousemove",r.handleChange),e.addEventListener("mouseup",r.handleMouseUp)},r.handleMouseUp=function(){r.unbindEventListeners()},r.throttle=function(t,e,r){var n=!0,o=!0;if("function"!=typeof t)throw new TypeError("Expected a function");return Gu(r)&&(n="leading"in r?!!r.leading:n,o="trailing"in r?!!r.trailing:o),us(t,e,{leading:n,maxWait:e,trailing:o})}(function(t,e,r){t(e,r)},50),r}(function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)})(t,e.PureComponent||e.Component),ss(t,[{key:"componentWillUnmount",value:function(){this.throttle.cancel(),this.unbindEventListeners()}},{key:"getContainerRenderWindow",value:function(){for(var t=this.container,e=window;!e.document.contains(t)&&e.parent!==e;)e=e.parent;return e}},{key:"unbindEventListeners",value:function(){var t=this.getContainerRenderWindow();t.removeEventListener("mousemove",this.handleChange),t.removeEventListener("mouseup",this.handleMouseUp)}},{key:"render",value:function(){var t=this,r=this.props.style||{},n=r.color,o=r.white,i=r.black,a=r.pointer,u=r.circle,s=xu({default:{color:{absolute:"0px 0px 0px 0px",background:"hsl("+this.props.hsl.h+",100%, 50%)",borderRadius:this.props.radius},white:{absolute:"0px 0px 0px 0px",borderRadius:this.props.radius},black:{absolute:"0px 0px 0px 0px",boxShadow:this.props.shadow,borderRadius:this.props.radius},pointer:{position:"absolute",top:-100*this.props.hsv.v+100+"%",left:100*this.props.hsv.s+"%",cursor:"default"},circle:{width:"4px",height:"4px",boxShadow:"0 0 0 1.5px #fff, inset 0 0 1px 1px rgba(0,0,0,.3),\n 0 0 1px 2px rgba(0,0,0,.4)",borderRadius:"50%",cursor:"hand",transform:"translate(-2px, -2px)"}},custom:{color:n,white:o,black:i,pointer:a,circle:u}},{custom:!!this.props.style});return e.createElement("div",{style:s.color,ref:function(e){return t.container=e},onMouseDown:this.handleMouseDown,onTouchMove:this.handleChange,onTouchStart:this.handleChange},e.createElement("style",null,"\n .saturation-white {\n background: -webkit-linear-gradient(to right, #fff, rgba(255,255,255,0));\n background: linear-gradient(to right, #fff, rgba(255,255,255,0));\n }\n .saturation-black {\n background: -webkit-linear-gradient(to top, #000, rgba(0,0,0,0));\n background: linear-gradient(to top, #000, rgba(0,0,0,0));\n }\n "),e.createElement("div",{style:s.white,className:"saturation-white"},e.createElement("div",{style:s.black,className:"saturation-black"}),e.createElement("div",{style:s.pointer},this.props.pointer?e.createElement(this.props.pointer,this.props):e.createElement("div",{style:s.circle}))))}}])}();var cs=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},fs=function(){function t(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}return function(e,r,n){return r&&t(e.prototype,r),n&&t(e,n),e}}();function ls(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}var hs=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t};!function(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"span";(function(){function n(){var t,e,r;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,n);for(var o=arguments.length,i=Array(o),a=0;a<o;a++)i[a]=arguments[a];return e=r=ls(this,(t=n.__proto__||Object.getPrototypeOf(n)).call.apply(t,[this].concat(i))),r.state={focus:!1},r.handleFocus=function(){return r.setState({focus:!0})},r.handleBlur=function(){return r.setState({focus:!1})},ls(r,e)}(function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)})(n,e.Component),fs(n,[{key:"render",value:function(){return e.createElement(r,{onFocus:this.handleFocus,onBlur:this.handleBlur},e.createElement(t,cs({},this.props,this.state)))}}])})()}(function(t){var r=t.color,n=t.style,o=t.onClick,i=void 0===o?function(){}:o,a=t.onHover,u=t.title,s=void 0===u?r:u,c=t.children,f=t.focus,l=t.focusStyle,h="transparent"===r,p=xu({default:{swatch:hs({background:r,height:"100%",width:"100%",cursor:"pointer",position:"relative",outline:"none"},n,f?void 0===l?{}:l:{})}}),d={};return a&&(d.onMouseOver=function(t){return a(r,t)}),e.createElement("div",hs({style:p.swatch,onClick:function(t){return i(r,t)},title:s,tabIndex:0,onKeyDown:function(t){return 13===t.keyCode&&i(r,t)}},d),c,h&&e.createElement(Su,{borderRadius:p.swatch.borderRadius,boxShadow:"inset 0 0 0 1px rgba(0,0,0,0.1)"}))});var ps=function(t){var r=t.onChange,n=t.rgb,o=t.hsl,i=t.hex,a=t.disableAlpha,u=xu({default:{fields:{display:"flex",paddingTop:"4px"},single:{flex:"1",paddingLeft:"6px"},alpha:{flex:"1",paddingLeft:"6px"},double:{flex:"2"},input:{width:"80%",padding:"4px 10% 3px",border:"none",boxShadow:"inset 0 0 0 1px #ccc",fontSize:"11px"},label:{display:"block",textAlign:"center",fontSize:"11px",color:"#222",paddingTop:"3px",paddingBottom:"4px",textTransform:"capitalize"}},disableAlpha:{alpha:{display:"none"}}},{disableAlpha:a}),s=function(t,e){t.hex?function(t){if("transparent"===t)return!0;var e="#"===String(t).charAt(0)?1:0;return t.length!==4+e&&t.length<7+e&&c(t).isValid()}(t.hex)&&r({hex:t.hex,source:"hex"},e):t.r||t.g||t.b?r({r:t.r||n.r,g:t.g||n.g,b:t.b||n.b,a:n.a,source:"rgb"},e):t.a&&(t.a<0?t.a=0:t.a>100&&(t.a=100),t.a/=100,r({h:o.h,s:o.s,l:o.l,a:t.a,source:"rgb"},e))};return e.createElement("div",{style:u.fields,className:"flexbox-fix"},e.createElement("div",{style:u.double},e.createElement(Lu,{style:{input:u.input,label:u.label},label:"hex",value:i.replace("#",""),onChange:s})),e.createElement("div",{style:u.single},e.createElement(Lu,{style:{input:u.input,label:u.label},label:"r",value:n.r,onChange:s,dragLabel:"true",dragMax:"255"})),e.createElement("div",{style:u.single},e.createElement(Lu,{style:{input:u.input,label:u.label},label:"g",value:n.g,onChange:s,dragLabel:"true",dragMax:"255"})),e.createElement("div",{style:u.single},e.createElement(Lu,{style:{input:u.input,label:u.label},label:"b",value:n.b,onChange:s,dragLabel:"true",dragMax:"255"})),e.createElement("div",{style:u.alpha},e.createElement(Lu,{style:{input:u.input,label:u.label},label:"a",value:Math.round(100*n.a),onChange:s,dragLabel:"true",dragMax:"100"})))};class ds extends(e.PureComponent||e.Component){constructor(t){super(t),this.handleChange=t=>{"function"==typeof this.props.onChange&&this.throttle(this.props.onChange,((t,e,r)=>{var n=r.getBoundingClientRect(),o=n.width,i=n.height,a="number"==typeof t.pageX?t.pageX:t.touches[0].pageX,u="number"==typeof t.pageY?t.pageY:t.touches[0].pageY,s=a-(r.getBoundingClientRect().left+window.pageXOffset),c=u-(r.getBoundingClientRect().top+window.pageYOffset);s<0?s=0:s>o&&(s=o),c<0?c=0:c>i&&(c=i);var f=s/o,l=1-c/i;return{h:e.h,s:f,v:l,a:e.a,source:"hsv"}})(t,this.props.hsl,this.container),t),t.preventDefault()},this.handleMouseDown=t=>{this.handleChange(t);const e=this.getContainerRenderWindow();e.addEventListener("mousemove",this.handleChange),e.addEventListener("mouseup",this.handleMouseUp)},this.handleMouseUp=t=>{t.preventDefault(),this.unbindEventListeners()},this.throttle=function(t,e,r){let n,o,i,a;var u=0;r||(r={});let s=function(){u=!1===r.leading?0:Date.now(),n=null,a=t.apply(o,i),n||(o=i=null)},c=function(){var c=Date.now();u||!1!==r.leading||(u=c);var f=e-(c-u);return o=this,i=arguments,f<=0||f>e?(n&&(clearTimeout(n),n=null),u=c,a=t.apply(o,i),n||(o=i=null)):n||!1===r.trailing||(n=setTimeout(s,f)),a};return c.cancel=function(){clearTimeout(n),u=0,n=o=i=null},c}((t,e,r)=>{t(e,r)},50)}componentWillUnmount(){this.throttle.cancel(),this.unbindEventListeners()}getContainerRenderWindow(){const{container:t}=this;let e=window;for(;!e.document.contains(t)&&e.parent!==e;)e=e.parent;return e}unbindEventListeners(){const t=this.getContainerRenderWindow();t.removeEventListener("mousemove",this.handleChange),t.removeEventListener("mouseup",this.handleMouseUp)}render(){const{color:e,white:r,black:n,pointer:o,circle:i}=this.props||{},a={position:"absolute",top:"0px",left:"0px",right:"0px",bottom:"0px"},u={color:{...a,backgroundColor:`hsl(${this.props.hsl?.h},100%, 50%)`,borderRadius:this.props.style?.borderRadius},white:{...a,borderRadius:this.props.style?.borderRadius},black:{...a,boxShadow:this.props.style?.boxShadow,borderRadius:this.props.style?.borderRadius},pointer:{...a,top:-100*this.props.hsv?.v+100+"%",left:100*this.props.hsv?.s+"%",cursor:"default"},circle:{width:"4px",height:"4px",boxShadow:"0 0 0 1.5px #fff, inset 0 0 1px 1px rgba(0,0,0,.3),\n 0 0 1px 2px rgba(0,0,0,.4)",borderRadius:"50%",cursor:"hand",transform:"translate(-2px, -2px)"}};return t.jsxs("div",{style:u.color,ref:t=>this.container=t,onMouseDown:this.handleMouseDown,onTouchMove:this.handleChange,onTouchStart:this.handleChange,children:[t.jsx("style",{children:"\n .saturation-white {\n background: -webkit-linear-gradient(to right, #fff, rgba(255,255,255,0));\n background: linear-gradient(to right, #fff, rgba(255,255,255,0));\n }\n .saturation-black {\n background: -webkit-linear-gradient(to top, #000, rgba(0,0,0,0));\n background: linear-gradient(to top, #000, rgba(0,0,0,0));\n }\n "}),t.jsxs("div",{style:u.white,className:"saturation-white",children:[t.jsx("div",{style:u.black,className:"saturation-black"}),t.jsx("div",{style:u.pointer,children:this.props.pointer?t.jsx(this.props.pointer,{...this.props}):t.jsx("div",{style:u.circle})})]})]})}}const bs=(t,e=null)=>{const r=t.hex?c(t.hex):c(t||"transparent"),n=r.toHsl(),o=r.toHsv(),i=r.toRgb(),a=r.toHex();return 0===n.s&&(n.h=e??0,o.h=e??0),{hsl:n,hex:"#"+a,rgb:i,hsv:o,source:t.source}},vs=e.memo(o=>{const{selectedColor:i,onColorChange:a,renderers:u,disableAlpha:s=!1,style:c=n.yt.EmptyCssProperties,...f}=o,l=n.useTheme(),[h,p]=e.useState(()=>bs(i)),[d,b]=e.useState(h.hsl.h??0),v=e.useCallback(t=>{let e=bs(t,d);return b(e.hsl.h??0),p(e),e},[d]),g=e.useCallback(t=>{const e=v(t),r=`rgba(${e.rgb.r},${e.rgb.g},${e.rgb.b},${s?1:e.rgb.a})`;a?.(r)},[a,v,s]);e.useLayoutEffect(()=>{v(i)},[i,v]);const y=t.jsx("div",{style:{position:"relative",minHeight:"10px",maxHeight:"10px",width:"100%"},children:t.jsx(Eu,{style:{radius:"2px",shadow:"inset 0 0 0 1px rgba(0,0,0,.15), inset 0 0 4px rgba(0,0,0,.25)"},rgb:h.rgb,hsl:h.hsl,renderers:u,onChange:g})});return t.jsxs("div",{style:{display:"flex",flexDirection:"column",...c},...f,children:[t.jsx("div",{style:{width:"100%",flex:"1 1 100%",position:"relative",overflow:"hidden"},children:t.jsx(ds,{style:{borderRadius:"3px",boxShadow:"inset 0 0 0 1px rgba(0,0,0,.15), inset 0 0 4px rgba(0,0,0,.25)"},hsl:h.hsl,hsv:h.hsv,onChange:g})}),t.jsxs("div",{style:{marginTop:"4px",display:"flex",gap:"4px"},children:[t.jsxs("div",{style:{flex:"1",display:"flex",flexDirection:s?"row":"column",justifyContent:"space-between",alignItems:"center"},children:[t.jsx("div",{style:{position:"relative",minHeight:"10px",maxHeight:"10px",width:"100%"},children:t.jsx(Du,{style:{radius:"2px",shadow:"inset 0 0 0 1px rgba(0,0,0,.15), inset 0 0 4px rgba(0,0,0,.25)"},hsl:h.hsl,onChange:g})}),s?null:y]}),t.jsxs("div",{style:{minWidth:"24px",maxWidth:"24px",minHeight:"24px",maxHeight:"24px",position:"relative",borderRadius:"1px",overflow:"hidden"},children:[t.jsx(n.Checkboard,{grey:l.palette.text.icon??l.palette.action.active}),t.jsx("div",{style:{position:"absolute",height:"100%",width:"100%",background:`rgba(${h.rgb.r},${h.rgb.g},${h.rgb.b},${s?1:h.rgb.a})`,boxShadow:"inset 0 0 0 1px rgba(0,0,0,.15), inset 0 0 4px rgba(0,0,0,.25)"}})]})]}),t.jsx(r.Box,{sx:{marginBottom:"4px","& label":{fontFamily:t=>`${t.typography.fontFamily} !important`,color:t=>`${t.palette.text.secondary} !important`},"& *":{fontFamily:t=>`${t.typography.fontFamily} !important`,userSelect:"none"},"& input":{paddingLeft:t=>`${t.spacing(.5)} !important`,paddingRight:t=>`${t.spacing(.5)} !important`,outline:"none",boxSizing:"border-box",width:"100% !important",textAlign:"center"}},children:t.jsx(ps,{rgb:h.rgb,hsl:h.hsl,hex:h.hex,disableAlpha:s,onChange:g})})]})});exports.CustomColorPanel=vs,exports.default=vs,exports.toState=bs;
|