@sheetxl/studio-mui 0.4.12 → 0.4.14
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/-zKDSjn55SCvCwk8.cjs +6 -0
- package/browser/cjs/AoLA7tfyPshG_mKt.cjs +6 -0
- package/browser/cjs/As7uhSEgY8VJ3I6f.cjs +90 -0
- package/browser/cjs/B1Eaz6PFZAmrWiyY.cjs +6 -0
- package/browser/cjs/B8ZfZXhvW4sSKKZs.cjs +42 -0
- package/browser/cjs/BAfNSJo7fktzFVJd.cjs +11 -0
- package/browser/cjs/BH0v7IIykugrFxaT.cjs +6 -0
- package/browser/cjs/BUwmvmcdC0xBQ97L.cjs +145 -0
- package/browser/cjs/BiBEmbWoJHdOB1li.cjs +12 -0
- package/browser/cjs/BkVtS9FZxWYNmrbU.cjs +6 -0
- package/browser/cjs/Bmifo5y7ZMJolUTY.cjs +15 -0
- package/browser/cjs/BpLu9-spCLcAFdwd.cjs +6 -0
- package/browser/cjs/BqOg0z4HGrbNaL1k.cjs +6 -0
- package/browser/cjs/C6Fk0jGWAOED60yf.cjs +161 -0
- package/browser/cjs/CRvxop0QcZL23Akb.cjs +6 -0
- package/browser/cjs/CS5USjyVh8DwPSri.cjs +7 -0
- package/browser/cjs/Chz3K3Qt8M2FNJwI.cjs +12 -0
- package/browser/cjs/D2gy3JDrJyGAMqsl.cjs +7 -0
- package/browser/cjs/DD8-ZSDUkRqk7l6y.cjs +11 -0
- package/browser/cjs/DNL88d5PGwk92LeD.cjs +6 -0
- package/browser/cjs/DTHMIHonHaHeJ0o1.cjs +18 -0
- package/browser/cjs/DZ8WTAzF6V2Tw1tW.cjs +6 -0
- package/browser/cjs/W7LR70ajtjR9Lmvl.cjs +6 -0
- package/browser/cjs/XGmQ2kUHM2qQkG1r.cjs +16 -0
- package/browser/cjs/d2jsgbPdf35xArnn.cjs +6 -0
- package/browser/cjs/index.cjs +4 -10
- package/browser/esm/4fzdzYhVH9eIXv-E.mjs +2410 -0
- package/browser/esm/B-rZWEIXFvB2W_mP.mjs +84 -0
- package/browser/esm/C4ORm_Up6Zxt92F_.mjs +1672 -0
- package/browser/esm/C5OCdRxcYIZViFzN.mjs +13391 -0
- package/browser/esm/C8po4rRYJ8127Rgb.mjs +44 -0
- package/browser/esm/CB7vnn7AtsGma4R6.mjs +3803 -0
- package/browser/esm/CBQZHZlKIiEz186r.mjs +2251 -0
- package/browser/esm/CCwOCTrf9Bira1-Y.mjs +424 -0
- package/browser/esm/CHovQU_R4AuKULmT.mjs +392 -0
- package/browser/esm/CIH3ADFJJmUiyA8p.mjs +864 -0
- package/browser/esm/CQiALmsycGGLFj1o.mjs +25 -0
- package/browser/esm/CS6uJp7phBvUmos6.mjs +1467 -0
- package/browser/esm/CSKgHJSTMvOEe2RH.mjs +19981 -0
- package/browser/esm/CYG1vk4AMMwqsul7.mjs +1366 -0
- package/browser/esm/ClmlhDf-0RC5GFV3.mjs +52 -0
- package/browser/esm/CmAnpd_SOxQuTQRL.mjs +1703 -0
- package/browser/esm/DWy4L2usallW0WdU.mjs +153 -0
- package/browser/esm/Dc1PmtvbeqsIQHq6.mjs +48 -0
- package/browser/esm/DgKsUQMTThBdEQds.mjs +59 -0
- package/browser/esm/Dk00kGaRJxiitO5-.mjs +23 -0
- package/browser/esm/FdSIHwC_mNRZpcgJ.mjs +43 -0
- package/browser/esm/Ks946bL2vmd4m743.mjs +52 -0
- package/browser/esm/TlZOl3Gt-d0Nc2a8.mjs +46 -0
- package/browser/esm/_FvE2-K7MOW_qWVS.mjs +1352 -0
- package/browser/esm/index.mjs +83 -8
- package/browser/esm/vgS9ixFRuZrPx6vq.mjs +640 -0
- package/licenses/dependencies.txt +134 -134
- package/node/esm/{B3M2CzPvK2oKOfg5.mjs → 762kbapO408ejsVC.mjs} +2 -2
- package/node/esm/{CryVonGjJnmo2dE_.mjs → B0gJGF9-J3L5yBEW.mjs} +5 -5
- package/node/esm/{CBGAl2mih9mHDt5w.mjs → BR9YJuwMP9nTMBE-.mjs} +1 -1
- package/node/esm/{D1xD8cOQDGcbjIlG.mjs → BTNBRzW8ZZbJY4GL.mjs} +1 -1
- package/node/esm/{C2P_M1JNT_WZZN3H.mjs → Bgtg4I8EL4M776SY.mjs} +8 -8
- package/node/esm/{DUfB1ollhqU-JIk5.mjs → Bi5br6yrYZqhLEiY.mjs} +4 -4
- package/node/esm/{M3UB6IrhVERZziiJ.mjs → CCygt4zw40-jO57G.mjs} +2 -2
- package/node/esm/{m8fyd2BoYkTOJlc1.mjs → CTpkd2r1aBS5d0yl.mjs} +1 -1
- package/node/esm/{kHsChOtl8GUkzj5Q.mjs → CY1qC_sXGD6av4yO.mjs} +2 -2
- package/node/esm/{Dx2vq1Hdt4pqmOF-.mjs → CZoMFCKJudiTl_Tf.mjs} +2 -2
- package/node/esm/{kIQFLB3nmEJdn_OT.mjs → CzWLA_IQgFbENkMq.mjs} +1 -1
- package/node/esm/{BJY8yNMmN_yyRtIG.mjs → D1GfRQ1jyFg-wmLD.mjs} +1 -1
- package/node/esm/{D1C8ifsmXsypL6pp.mjs → DC2dPUCWVgxEKzaS.mjs} +13 -13
- package/node/esm/{Bj8uU2shfkvN4LnE.mjs → DOUP6ynjlQE-UEJs.mjs} +6 -6
- package/node/esm/{BIRLX0-9t62Lqats.mjs → DUqIYzvmrCd67Dpx.mjs} +2 -2
- package/node/esm/{CVGxETc4rIE1gNAH.mjs → DWCxF-chq5dVi363.mjs} +38 -38
- package/node/esm/{Bt5y5wVaVAVjwHBl.mjs → DghPySv_2Ts78czJ.mjs} +1 -1
- package/node/esm/{PF5CCBvapZxEzc7k.mjs → DrujinnhlNDCosqb.mjs} +1 -1
- package/node/esm/DsD7O5j2cXyaECkB.mjs +313 -0
- package/node/esm/{wdtYNTNCynMMS4_P.mjs → VHY56h6xqQcPba6u.mjs} +1 -1
- package/node/esm/{h1y2hBFecTqRgUa-.mjs → dlEq3vDkIERtTn7Y.mjs} +25 -25
- package/node/esm/index.mjs +4999 -5264
- package/node/esm/{CKtVB9hMCfabQMxC.mjs → yB8OTWhDomxUy_SX.mjs} +2 -2
- package/node/esm/{bv_GA6NGCT0sJaXy.mjs → yP0whgIwVZApluLw.mjs} +2 -2
- package/package.json +8 -8
- package/types/index.d.ts +0 -11
- package/browser/cjs/B7qLzxylqOaybl3H.cjs +0 -7
- package/browser/cjs/BNGixOiIsu8jZlvn.cjs +0 -7
- package/browser/cjs/BUYxt7KgFkIIIMyc.cjs +0 -7
- package/browser/cjs/Bk6VhhWsnCRyBu2F.cjs +0 -7
- package/browser/cjs/BpiMMYip132x0r1O.cjs +0 -7
- package/browser/cjs/ByZ_Q-J7jgF7AoWR.cjs +0 -7
- package/browser/cjs/BzD7LV8VmFKLAJyW.cjs +0 -7
- package/browser/cjs/C6_zcNM0Efa11KEE.cjs +0 -7
- package/browser/cjs/C8Azx_ZaQa4WvAtR.cjs +0 -7
- package/browser/cjs/CITvaW7L_iZfIyAN.cjs +0 -7
- package/browser/cjs/CNDDYOoLCrGsUMYL.cjs +0 -7
- package/browser/cjs/CYbeY5OVZDqHGSOm.cjs +0 -7
- package/browser/cjs/C_SgucbRn-v9IkNO.cjs +0 -7
- package/browser/cjs/CeTd2nFbE5yFzf7T.cjs +0 -7
- package/browser/cjs/Cfe7IbPNI8-CgoDI.cjs +0 -7
- package/browser/cjs/Ctyk-ajkSsTDJuvY.cjs +0 -7
- package/browser/cjs/DBhTQLbjAtU-A1YA.cjs +0 -7
- package/browser/cjs/Dc2rbOjtcmSIm8D4.cjs +0 -7
- package/browser/cjs/DcsvUmoS8zGG5GB8.cjs +0 -7
- package/browser/cjs/DqAlQQIZIyF7HMib.cjs +0 -7
- package/browser/cjs/DuwawlAm4aRBNTBm.cjs +0 -7
- package/browser/cjs/Dx9UUJj-yeubDjm4.cjs +0 -7
- package/browser/cjs/IC19hB4Ntvw1158j.cjs +0 -7
- package/browser/cjs/reQ9miE5C5qMfbRJ.cjs +0 -7
- package/browser/esm/B1Ey4ZP8BHUzHW7G.mjs +0 -7
- package/browser/esm/B8dJHVZJta8QbNKG.mjs +0 -7
- package/browser/esm/BThbC01mtb7qq8_A.mjs +0 -7
- package/browser/esm/Bnt1M91BRyMvXrc4.mjs +0 -7
- package/browser/esm/BqN0SYrEO0RZQtv-.mjs +0 -7
- package/browser/esm/CHPXsEre3jry2-jF.mjs +0 -7
- package/browser/esm/CMCOU0nDlymDFS9l.mjs +0 -7
- package/browser/esm/Cc7y1nMDr5J8jWx-.mjs +0 -7
- package/browser/esm/CesL-3BNbMB1f_if.mjs +0 -7
- package/browser/esm/CfvNSnuQLa1SPbNL.mjs +0 -7
- package/browser/esm/CloqVDbJmTL4oFek.mjs +0 -7
- package/browser/esm/Cta0yn5UIrP2UoT4.mjs +0 -7
- package/browser/esm/CwRyQHiDoBLx5_1g.mjs +0 -7
- package/browser/esm/DI-ZGstUJFwkx4H6.mjs +0 -7
- package/browser/esm/DQTfmweCXjuIlITn.mjs +0 -7
- package/browser/esm/DUIfOO25d1fqtJzn.mjs +0 -7
- package/browser/esm/DhOXsRr8c7bDS1jM.mjs +0 -7
- package/browser/esm/JPwh2m5-pXkdPVzF.mjs +0 -7
- package/browser/esm/UkNAvQj0NVgeMpUl.mjs +0 -7
- package/browser/esm/ZUfck_LDsQb9gpvU.mjs +0 -7
- package/browser/esm/gHhqkr52cxXkga0T.mjs +0 -7
- package/browser/esm/obM68UOvA5HV7Lt1.mjs +0 -7
- package/browser/esm/x9MyDRdLE47dI9dF.mjs +0 -7
- package/browser/esm/yW9jxnamUqAhVQkJ.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.12
|
|
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("./BzD7LV8VmFKLAJyW.cjs"),e=require("./C8Azx_ZaQa4WvAtR.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.12
|
|
3
|
-
*
|
|
4
|
-
* (C) 2025-present SheetXL Inc. & Michael T. Ford
|
|
5
|
-
* License: The license can be found at https://www.sheetxl.com/license.
|
|
6
|
-
*/
|
|
7
|
-
import e,{memo as t,useState as r,useRef as n,useCallback as o,useEffect as i}from"react";function c(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function u(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function a(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?u(Object(r),!0).forEach(function(t){c(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):u(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function l(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function s(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function d(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function f(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?d(Object(r),!0).forEach(function(t){s(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):d(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function g(e){return function t(){for(var r=this,n=arguments.length,o=new Array(n),i=0;i<n;i++)o[i]=arguments[i];return o.length>=e.length?e.apply(this,o):function(){for(var e=arguments.length,n=new Array(e),i=0;i<e;i++)n[i]=arguments[i];return t.apply(r,[].concat(o,n))}}}function p(e){return{}.toString.call(e).includes("Object")}function h(e){return"function"==typeof e}var y=g(function(e,t){throw new Error(e[t]||e.default)})({initialIsRequired:"initial state is required",initialType:"initial state should be an object",initialContent:"initial state shouldn't be an empty object",handlerType:"handler should be an object or a function",handlersType:"all handlers should be a functions",selectorType:"selector should be a function",changeType:"provided value of changes should be an object",changeField:'it seams you want to change a field in the state which is not specified in the "initial" state',default:"an unknown error accured in `state-local` package"}),m=function(e,t){return p(t)||y("changeType"),Object.keys(t).some(function(t){return r=e,n=t,!Object.prototype.hasOwnProperty.call(r,n);var r,n})&&y("changeField"),t},v=function(e){h(e)||y("selectorType")},b=function(e){h(e)||p(e)||y("handlerType"),p(e)&&Object.values(e).some(function(e){return!h(e)})&&y("handlersType")},w=function(e){var t;e||y("initialIsRequired"),p(e)||y("initialType"),t=e,Object.keys(t).length||y("initialContent")};function O(e,t){return h(t)?t(e.current):t}function j(e,t){return e.current=f(f({},e.current),t),t}function M(e,t,r){return h(t)?t(e.current):Object.keys(r).forEach(function(r){var n;return null===(n=t[r])||void 0===n?void 0:n.call(t,e.current[r])}),r}var P,E=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};w(e),b(t);var r={current:e},n=g(M)(r,t),o=g(j)(r),i=g(m)(e),c=g(O)(r);return[function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:function(e){return e};return v(e),e(r.current)},function(e){!function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return function(e){return t.reduceRight(function(e,t){return t(e)},e)}}(n,o,i,c)(e)}]},S={configIsRequired:"the configuration object is required",configType:"the configuration object should be an object",default:"an unknown error accured in `@monaco-editor/loader` package",deprecation:"Deprecation warning!\n You are using deprecated way of configuration.\n\n Instead of using\n monaco.config({ urls: { monacoBase: '...' } })\n use\n monaco.config({ paths: { vs: '...' } })\n\n For more please check the link https://github.com/suren-atoyan/monaco-loader#config\n "},k=(P=function(e,t){throw new Error(e[t]||e.default)},function e(){for(var t=this,r=arguments.length,n=new Array(r),o=0;o<r;o++)n[o]=arguments[o];return n.length>=P.length?P.apply(this,n):function(){for(var r=arguments.length,o=new Array(r),i=0;i<r;i++)o[i]=arguments[i];return e.apply(t,[].concat(n,o))}})(S),x=function(e){var t;return e||k("configIsRequired"),t=e,{}.toString.call(t).includes("Object")||k("configType"),e.urls?(console.warn(S.deprecation),{paths:{vs:e.urls.monacoBase}}):e};function I(e,t){return Object.keys(t).forEach(function(r){t[r]instanceof Object&&e[r]&&Object.assign(t[r],I(e[r],t[r]))}),a(a({},e),t)}var T={type:"cancelation",msg:"operation is manually canceled"};function A(e){var t=!1,r=new Promise(function(r,n){e.then(function(e){return t?n(T):r(e)}),e.catch(n)});return r.cancel=function(){return t=!0},r}var D,V=function(e){if(Array.isArray(e))return e}(D=E({config:{paths:{vs:"https://cdn.jsdelivr.net/npm/monaco-editor@0.52.2/min/vs"}},isInitialized:!1,resolve:null,reject:null,monaco:null}))||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e)){var t=[],r=!0,n=!1,o=void 0;try{for(var i,c=e[Symbol.iterator]();!(r=(i=c.next()).done)&&(t.push(i.value),2!==t.length);r=!0);}catch(e){n=!0,o=e}finally{try{r||null==c.return||c.return()}finally{if(n)throw o}}return t}}(D)||function(e){if(e){if("string"==typeof e)return l(e,2);var t=Object.prototype.toString.call(e).slice(8,-1);return"Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t?Array.from(e):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?l(e,2):void 0}}(D)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),C=V[0],L=V[1];function R(e){return document.body.appendChild(e)}function q(e){var t,r,n=C(function(e){return{config:e.config,reject:e.reject}}),o=(t="".concat(n.config.paths.vs,"/loader.js"),r=document.createElement("script"),t&&(r.src=t),r);return o.onload=function(){return e()},o.onerror=n.reject,o}function z(){var e=C(function(e){return{config:e.config,resolve:e.resolve,reject:e.reject}}),t=window.require;t.config(e.config),t(["vs/editor/editor.main"],function(t){_(t),e.resolve(t)},function(t){e.reject(t)})}function _(e){C().monaco||L({monaco:e})}var N=new Promise(function(e,t){return L({resolve:e,reject:t})}),F={config:function(e){var t=x(e),r=t.monaco,n=function(e,t){if(null==e)return{};var r,n,o=function(e,t){if(null==e)return{};var r,n,o={},i=Object.keys(e);for(n=0;n<i.length;n++)r=i[n],t.indexOf(r)>=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n<i.length;n++)r=i[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}(t,["monaco"]);L(function(e){return{config:I(e.config,n),monaco:r}})},init:function(){var e=C(function(e){return{monaco:e.monaco,isInitialized:e.isInitialized,resolve:e.resolve}});if(!e.isInitialized){if(L({isInitialized:!0}),e.monaco)return e.resolve(e.monaco),A(N);if(window.monaco&&window.monaco.editor)return _(window.monaco),e.resolve(window.monaco),A(N);!function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return function(e){return t.reduceRight(function(e,t){return t(e)},e)}}(R,q)(z)}return A(N)},__getMonacoInstance:function(){return C(function(e){return e.monaco})}},U={display:"flex",position:"relative",textAlign:"initial"},B={width:"100%"},Y={display:"none"},$={container:{display:"flex",height:"100%",width:"100%",justifyContent:"center",alignItems:"center"}},G=function({children:t}){return e.createElement("div",{style:$.container},t)},H=t(function({width:t,height:r,isEditorReady:n,loading:o,_ref:i,className:c,wrapperProps:u}){return e.createElement("section",{style:{...U,width:t,height:r},...u},!n&&e.createElement(G,null,o),e.createElement("div",{ref:i,style:{...B,...!n&&Y},className:c}))}),J=function(e){i(e,[])},K=function(e,t,r=!0){let o=n(!0);i(o.current||!r?()=>{o.current=!1}:e,t)};function Q(){}function W(e,t,r,n){return function(e,t){return e.editor.getModel(X(e,t))}(e,n)||function(e,t,r,n){return e.editor.createModel(t,r,n?X(e,n):void 0)}(e,t,r,n)}function X(e,t){return e.Uri.parse(t)}var Z=t(function({original:t,modified:c,language:u,originalLanguage:a,modifiedLanguage:l,originalModelPath:s,modifiedModelPath:d,keepCurrentOriginalModel:f=!1,keepCurrentModifiedModel:g=!1,theme:p="light",loading:h="Loading...",options:y={},height:m="100%",width:v="100%",className:b,wrapperProps:w={},beforeMount:O=Q,onMount:j=Q}){let[M,P]=r(!1),[E,S]=r(!0),k=n(null),x=n(null),I=n(null),T=n(j),A=n(O),D=n(!1);J(()=>{let e=F.init();return e.then(e=>(x.current=e)&&S(!1)).catch(e=>"cancelation"!==e?.type&&console.error("Monaco initialization: error:",e)),()=>k.current?function(){let e=k.current?.getModel();f||e?.original?.dispose(),g||e?.modified?.dispose(),k.current?.dispose()}():e.cancel()}),K(()=>{if(k.current&&x.current){let e=k.current.getOriginalEditor(),r=W(x.current,t||"",a||u||"text",s||"");r!==e.getModel()&&e.setModel(r)}},[s],M),K(()=>{if(k.current&&x.current){let e=k.current.getModifiedEditor(),t=W(x.current,c||"",l||u||"text",d||"");t!==e.getModel()&&e.setModel(t)}},[d],M),K(()=>{let e=k.current.getModifiedEditor();e.getOption(x.current.editor.EditorOption.readOnly)?e.setValue(c||""):c!==e.getValue()&&(e.executeEdits("",[{range:e.getModel().getFullModelRange(),text:c||"",forceMoveMarkers:!0}]),e.pushUndoStop())},[c],M),K(()=>{k.current?.getModel()?.original.setValue(t||"")},[t],M),K(()=>{let{original:e,modified:t}=k.current.getModel();x.current.editor.setModelLanguage(e,a||u||"text"),x.current.editor.setModelLanguage(t,l||u||"text")},[u,a,l],M),K(()=>{x.current?.editor.setTheme(p)},[p],M),K(()=>{k.current?.updateOptions(y)},[y],M);let V=o(()=>{if(!x.current)return;A.current(x.current);let e=W(x.current,t||"",a||u||"text",s||""),r=W(x.current,c||"",l||u||"text",d||"");k.current?.setModel({original:e,modified:r})},[u,c,l,t,a,s,d]),C=o(()=>{!D.current&&I.current&&(k.current=x.current.editor.createDiffEditor(I.current,{automaticLayout:!0,...y}),V(),x.current?.editor.setTheme(p),P(!0),D.current=!0)},[y,p,V]);return i(()=>{M&&T.current(k.current,x.current)},[M]),i(()=>{!E&&!M&&C()},[E,M,C]),e.createElement(H,{width:v,height:m,isEditorReady:M,loading:h,_ref:I,className:b,wrapperProps:w})}),ee=function(){let[e,t]=r(F.__getMonacoInstance());return J(()=>{let r;return e||(r=F.init(),r.then(e=>{t(e)})),()=>r?.cancel()}),e},te=new Map,re=t(function({defaultValue:t,defaultLanguage:c,defaultPath:u,value:a,language:l,path:s,theme:d="light",line:f,loading:g="Loading...",options:p={},overrideServices:h={},saveViewState:y=!0,keepCurrentModel:m=!1,width:v="100%",height:b="100%",className:w,wrapperProps:O={},beforeMount:j=Q,onMount:M=Q,onChange:P,onValidate:E=Q}){let[S,k]=r(!1),[x,I]=r(!0),T=n(null),A=n(null),D=n(null),V=n(M),C=n(j),L=n(),R=n(a),q=function(e){let t=n();return i(()=>{t.current=e},[e]),t.current}(s),z=n(!1),_=n(!1);J(()=>{let e=F.init();return e.then(e=>(T.current=e)&&I(!1)).catch(e=>"cancelation"!==e?.type&&console.error("Monaco initialization: error:",e)),()=>A.current?(L.current?.dispose(),m?y&&te.set(s,A.current.saveViewState()):A.current.getModel()?.dispose(),void A.current.dispose()):e.cancel()}),K(()=>{let e=W(T.current,t||a||"",c||l||"",s||u||"");e!==A.current?.getModel()&&(y&&te.set(q,A.current?.saveViewState()),A.current?.setModel(e),y&&A.current?.restoreViewState(te.get(s)))},[s],S),K(()=>{A.current?.updateOptions(p)},[p],S),K(()=>{!A.current||void 0===a||(A.current.getOption(T.current.editor.EditorOption.readOnly)?A.current.setValue(a):a!==A.current.getValue()&&(_.current=!0,A.current.executeEdits("",[{range:A.current.getModel().getFullModelRange(),text:a,forceMoveMarkers:!0}]),A.current.pushUndoStop(),_.current=!1))},[a],S),K(()=>{let e=A.current?.getModel();e&&l&&T.current?.editor.setModelLanguage(e,l)},[l],S),K(()=>{void 0!==f&&A.current?.revealLine(f)},[f],S),K(()=>{T.current?.editor.setTheme(d)},[d],S);let N=o(()=>{if(D.current&&T.current&&!z.current){C.current(T.current);let e=s||u,r=W(T.current,a||t||"",c||l||"",e||"");A.current=T.current?.editor.create(D.current,{model:r,automaticLayout:!0,...p},h),y&&A.current.restoreViewState(te.get(e)),T.current.editor.setTheme(d),void 0!==f&&A.current.revealLine(f),k(!0),z.current=!0}},[t,c,u,a,l,s,p,h,y,d,f]);return i(()=>{S&&V.current(A.current,T.current)},[S]),i(()=>{!x&&!S&&N()},[x,S,N]),R.current=a,i(()=>{S&&P&&(L.current?.dispose(),L.current=A.current?.onDidChangeModelContent(e=>{_.current||P(A.current.getValue(),e)}))},[S,P]),i(()=>{if(S){let e=T.current.editor.onDidChangeMarkers(e=>{let t=A.current.getModel()?.uri;if(t&&e.find(e=>e.path===t.path)){let e=T.current.editor.getModelMarkers({resource:t});E?.(e)}});return()=>{e?.dispose()}}return()=>{}},[S,E]),e.createElement(H,{width:v,height:b,isEditorReady:S,loading:g,_ref:D,className:w,wrapperProps:O})}),ne=re;export{Z as DiffEditor,re as Editor,ne as default,F as loader,ee as useMonaco};
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license @sheetxl/studio-mui - Studio - Spreadsheet UI built with SheetXL SDK using React & MUI. - v0.4.12
|
|
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
|
-
var e,r={},t={};function n(){if(e)return t;function r(e,r){return void 0===r&&(r=Object),r&&"function"==typeof r.getOwnPropertyDescriptors&&(e=r.create(null,r.getOwnPropertyDescriptors(e))),r&&"function"==typeof r.freeze?r.freeze(e):e}function n(e,r){return Object.prototype.hasOwnProperty.call(e,r)}e=1;var o=r({allowfullscreen:!0,async:!0,autofocus:!0,autoplay:!0,checked:!0,controls:!0,default:!0,defer:!0,disabled:!0,formnovalidate:!0,hidden:!0,ismap:!0,itemscope:!0,loop:!0,multiple:!0,muted:!0,nomodule:!0,novalidate:!0,open:!0,playsinline:!0,readonly:!0,required:!0,reversed:!0,selected:!0}),a=r({area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0}),i=r({script:!1,style:!1,textarea:!0,title:!0});function s(e){return e===l.HTML}var l=r({HTML:"text/html",XML_APPLICATION:"application/xml",XML_TEXT:"text/xml",XML_XHTML_APPLICATION:"application/xhtml+xml",XML_SVG_IMAGE:"image/svg+xml"}),c=Object.keys(l).map(function(e){return l[e]}),u=r({HTML:"http://www.w3.org/1999/xhtml",SVG:"http://www.w3.org/2000/svg",XML:"http://www.w3.org/XML/1998/namespace",XMLNS:"http://www.w3.org/2000/xmlns/"});return t.assign=function(e,r){if(null===e||"object"!=typeof e)throw new TypeError("target is not an object");for(var t in r)n(r,t)&&(e[t]=r[t]);return e},t.find=function(e,r,t){if(void 0===t&&(t=Array.prototype),e&&"function"==typeof t.find)return t.find.call(e,r);for(var o=0;o<e.length;o++)if(n(e,o)){var a=e[o];if(r.call(void 0,a,o,e))return a}},t.freeze=r,t.HTML_BOOLEAN_ATTRIBUTES=o,t.HTML_RAW_TEXT_ELEMENTS=i,t.HTML_VOID_ELEMENTS=a,t.hasDefaultHTMLNamespace=function(e){return s(e)||e===l.XML_XHTML_APPLICATION},t.hasOwn=n,t.isHTMLBooleanAttribute=function(e){return n(o,e.toLowerCase())},t.isHTMLRawTextElement=function(e){var r=e.toLowerCase();return n(i,r)&&!i[r]},t.isHTMLEscapableRawTextElement=function(e){var r=e.toLowerCase();return n(i,r)&&i[r]},t.isHTMLMimeType=s,t.isHTMLVoidElement=function(e){return n(a,e.toLowerCase())},t.isValidMimeType=function(e){return c.indexOf(e)>-1},t.MIME_TYPE=l,t.NAMESPACE=u,t}var o,a={};function i(){if(o)return a;function e(e,r){e.prototype=Object.create(Error.prototype,{constructor:{value:e},name:{value:e.name,enumerable:!0,writable:r}})}o=1;var r=n().freeze({Error:"Error",IndexSizeError:"IndexSizeError",DomstringSizeError:"DomstringSizeError",HierarchyRequestError:"HierarchyRequestError",WrongDocumentError:"WrongDocumentError",InvalidCharacterError:"InvalidCharacterError",NoDataAllowedError:"NoDataAllowedError",NoModificationAllowedError:"NoModificationAllowedError",NotFoundError:"NotFoundError",NotSupportedError:"NotSupportedError",InUseAttributeError:"InUseAttributeError",InvalidStateError:"InvalidStateError",SyntaxError:"SyntaxError",InvalidModificationError:"InvalidModificationError",NamespaceError:"NamespaceError",InvalidAccessError:"InvalidAccessError",ValidationError:"ValidationError",TypeMismatchError:"TypeMismatchError",SecurityError:"SecurityError",NetworkError:"NetworkError",AbortError:"AbortError",URLMismatchError:"URLMismatchError",QuotaExceededError:"QuotaExceededError",TimeoutError:"TimeoutError",InvalidNodeTypeError:"InvalidNodeTypeError",DataCloneError:"DataCloneError",EncodingError:"EncodingError",NotReadableError:"NotReadableError",UnknownError:"UnknownError",ConstraintError:"ConstraintError",DataError:"DataError",TransactionInactiveError:"TransactionInactiveError",ReadOnlyError:"ReadOnlyError",VersionError:"VersionError",OperationError:"OperationError",NotAllowedError:"NotAllowedError",OptOutError:"OptOutError"}),t=Object.keys(r);function i(e){return"number"==typeof e&&e>=1&&e<=25}function s(e,n){var o;i(e)?(this.name=t[e],this.message=n||""):(this.message=e,this.name="string"==typeof(o=n)&&o.substring(o.length-r.Error.length)===r.Error?n:r.Error),Error.captureStackTrace&&Error.captureStackTrace(this,s)}e(s,!0),Object.defineProperties(s.prototype,{code:{enumerable:!0,get:function(){var e=t.indexOf(this.name);return i(e)?e:0}}});for(var l={INDEX_SIZE_ERR:1,DOMSTRING_SIZE_ERR:2,HIERARCHY_REQUEST_ERR:3,WRONG_DOCUMENT_ERR:4,INVALID_CHARACTER_ERR:5,NO_DATA_ALLOWED_ERR:6,NO_MODIFICATION_ALLOWED_ERR:7,NOT_FOUND_ERR:8,NOT_SUPPORTED_ERR:9,INUSE_ATTRIBUTE_ERR:10,INVALID_STATE_ERR:11,SYNTAX_ERR:12,INVALID_MODIFICATION_ERR:13,NAMESPACE_ERR:14,INVALID_ACCESS_ERR:15,VALIDATION_ERR:16,TYPE_MISMATCH_ERR:17,SECURITY_ERR:18,NETWORK_ERR:19,ABORT_ERR:20,URL_MISMATCH_ERR:21,QUOTA_EXCEEDED_ERR:22,TIMEOUT_ERR:23,INVALID_NODE_TYPE_ERR:24,DATA_CLONE_ERR:25},c=Object.entries(l),u=0;u<c.length;u++)s[c[u][0]]=c[u][1];function p(e,r){this.message=e,this.locator=r,Error.captureStackTrace&&Error.captureStackTrace(this,p)}return e(p),a.DOMException=s,a.DOMExceptionName=r,a.ExceptionCode=l,a.ParseError=p,a}var s,l,c={},u={};function p(){if(s)return u;function e(e){try{"function"!=typeof e&&(e=RegExp);var r=new e("𝌆","u").exec("𝌆");return!!r&&2===r[0].length}catch(e){}return!1}s=1;var r=e();function t(e){if("["!==e.source[0])throw new Error(e+" can not be used with chars");return e.source.slice(1,e.source.lastIndexOf("]"))}function n(e,t){if("["!==e.source[0])throw new Error("/"+e.source+"/ can not be used with chars_without");if(!t||"string"!=typeof t)throw new Error(JSON.stringify(t)+" is not a valid search");if(-1===e.source.indexOf(t))throw new Error('"'+t+'" is not is /'+e.source+"/");if("-"===t&&1!==e.source.indexOf(t))throw new Error('"'+t+'" is not at the first postion of /'+e.source+"/");return new RegExp(e.source.replace(t,""),r?"u":"")}function o(e){var t=this;return new RegExp(Array.prototype.slice.call(arguments).map(function(e){var r="string"==typeof e;if(r&&void 0===t&&"|"===e)throw new Error("use regg instead of reg to wrap expressions with `|`!");return r?e:e.source}).join(""),r?"mu":"m")}function a(e){if(0===arguments.length)throw new Error("no parameters provided");return o.apply(a,["(?:"].concat(Array.prototype.slice.call(arguments),[")"]))}var i=/[-\x09\x0A\x0D\x20-\x2C\x2E-\uD7FF\uE000-\uFFFD]/;r&&(i=o("[",t(i),"\\u{10000}-\\u{10FFFF}","]"));var l=/[\x20\x09\x0D\x0A]/,c=t(l),p=o(l,"+"),d=o(l,"*"),f=/[:_a-zA-Z\xC0-\xD6\xD8-\xF6\xF8-\u02FF\u0370-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]/;r&&(f=o("[",t(f),"\\u{10000}-\\u{10FFFF}","]"));var h=o("[",t(f),t(/[-.0-9\xB7]/),t(/[\u0300-\u036F\u203F-\u2040]/),"]"),m=o(f,h,"*"),E=o(h,"+"),g=o("&",m,";"),N=a(/&#[0-9]+;|&#x[0-9a-fA-F]+;/),T=a(g,"|",N),b=o("%",m,";"),w=a(o('"',a(/[^%&"]/,"|",b,"|",T),"*",'"'),"|",o("'",a(/[^%&']/,"|",b,"|",T),"*","'")),v=a('"',a(/[^<&"]/,"|",T),"*",'"',"|","'",a(/[^<&']/,"|",T),"*","'"),y=o(n(f,":"),n(h,":"),"*"),D=o(y,a(":",y),"?"),S=o("^",D,"$"),A=o("(",D,")"),I=a(/"[^"]*"|'[^']*'/),O=o(/^<\?/,"(",m,")",a(p,"(",i,"*?)"),"?",/\?>/),C=/[\x20\x0D\x0Aa-zA-Z0-9-'()+,./:=?;!*#@$_%]/,x=a('"',C,'*"',"|","'",n(C,"'"),"*'"),_="\x3c!--",R=o(_,a(n(i,"-"),"|",o("-",n(i,"-"))),"*","--\x3e"),L="#PCDATA",M=a(o(/\(/,d,L,a(d,/\|/,d,D),"*",d,/\)\*/),"|",o(/\(/,d,L,d,/\)/)),q=a("EMPTY","|","ANY","|",M,"|",o(/\([^>]+\)/,/[?*+]?/)),U=o("<!ELEMENT",p,a(D,"|",b),p,a(q,"|",b),d,">"),P=o("NOTATION",p,/\(/,d,m,a(d,/\|/,d,m),"*",d,/\)/),k=o(/\(/,d,E,a(d,/\|/,d,E),"*",d,/\)/),H=a(P,"|",k),V=a(/CDATA|ID|IDREF|IDREFS|ENTITY|ENTITIES|NMTOKEN|NMTOKENS/,"|",H),B=a(/#REQUIRED|#IMPLIED/,"|",a(a("#FIXED",p),"?",v)),F=o("<!ATTLIST",p,m,a(p,m,p,V,p,B),"*",d,">"),G="about:legacy-compat",Y=a('"'+G+'"',"|","'"+G+"'"),X="SYSTEM",j="PUBLIC",z=a(a(X,p,I),"|",a(j,p,x,p,I)),Q=o("^",a(a(X,p,"(?<SystemLiteralOnly>",I,")"),"|",a(j,p,"(?<PubidLiteral>",x,")",p,"(?<SystemLiteral>",I,")"))),W=a(p,"NDATA",p,m),Z="<!ENTITY",$=o(Z,p,m,p,a(w,"|",a(z,W,"?")),d,">"),J=a(w,"|",z),K=a($,"|",o(Z,p,"%",p,m,p,J,d,">")),ee=o(j,p,x),re=o("<!NOTATION",p,m,p,a(z,"|",ee),d,">"),te=o(d,"=",d),ne=/1[.]\d+/,oe=o(p,"version",te,a("'",ne,"'","|",'"',ne,'"')),ae=/[A-Za-z][-A-Za-z0-9._]*/,ie=o(/^<\?xml/,oe,a(p,"encoding",te,a('"',ae,'"',"|","'",ae,"'")),"?",a(p,"standalone",te,a("'",a("yes","|","no"),"'","|",'"',a("yes","|","no"),'"')),"?",d,/\?>/),se=o(i,"*?",/\]\]>/),le=o(/<!\[CDATA\[/,se);return u.chars=t,u.chars_without=n,u.detectUnicodeSupport=e,u.reg=o,u.regg=a,u.ABOUT_LEGACY_COMPAT=G,u.ABOUT_LEGACY_COMPAT_SystemLiteral=Y,u.AttlistDecl=F,u.CDATA_START="<![CDATA[",u.CDATA_END="]]>",u.CDSect=le,u.Char=i,u.Comment=R,u.COMMENT_START=_,u.COMMENT_END="--\x3e",u.DOCTYPE_DECL_START="<!DOCTYPE",u.elementdecl=U,u.EntityDecl=K,u.EntityValue=w,u.ExternalID=z,u.ExternalID_match=Q,u.Name=m,u.NotationDecl=re,u.Reference=T,u.PEReference=b,u.PI=O,u.PUBLIC=j,u.PubidLiteral=x,u.QName=D,u.QName_exact=S,u.QName_group=A,u.S=p,u.SChar_s=c,u.S_OPT=d,u.SYSTEM=X,u.SystemLiteral=I,u.UNICODE_REPLACEMENT_CHARACTER="�",u.UNICODE_SUPPORT=r,u.XMLDecl=ie,u}function d(){if(l)return c;l=1;var e=n(),r=e.find,t=e.hasDefaultHTMLNamespace,o=e.hasOwn,a=e.isHTMLMimeType,s=e.isHTMLRawTextElement,u=e.isHTMLVoidElement,d=e.MIME_TYPE,f=e.NAMESPACE,h=Symbol(),m=i(),E=m.DOMException,g=m.DOMExceptionName,N=p();function T(e){if(e!==h)throw new TypeError("Illegal constructor")}function b(e){return""!==e}function w(e,r){return o(e,r)||(e[r]=!0),e}function v(e){if(!e)return[];var r=function(e){return e?e.split(/[\t\n\f\r ]+/).filter(b):[]}(e);return Object.keys(r.reduce(w,{}))}function y(e){if(!N.QName_exact.test(e))throw new E(E.INVALID_CHARACTER_ERR,'invalid character in qualified name "'+e+'"')}function D(r,t){y(t),r=r||null;var n=null,o=t;if(t.indexOf(":")>=0){var a=t.split(":");n=a[0],o=a[1]}if(null!==n&&null===r)throw new E(E.NAMESPACE_ERR,"prefix is non-null and namespace is null");if("xml"===n&&r!==e.NAMESPACE.XML)throw new E(E.NAMESPACE_ERR,'prefix is "xml" and namespace is not the XML namespace');if(("xmlns"===n||"xmlns"===t)&&r!==e.NAMESPACE.XMLNS)throw new E(E.NAMESPACE_ERR,'either qualifiedName or prefix is "xmlns" and namespace is not the XMLNS namespace');if(r===e.NAMESPACE.XMLNS&&"xmlns"!==n&&"xmlns"!==t)throw new E(E.NAMESPACE_ERR,'namespace is the XMLNS namespace and neither qualifiedName nor prefix is "xmlns"');return[r,n,o]}function S(e,r){for(var t in e)o(e,t)&&(r[t]=e[t])}function A(e,r){var t=e.prototype;if(!(t instanceof r)){function n(){}n.prototype=r.prototype,S(t,n=new n),e.prototype=t=n}t.constructor!=e&&("function"!=typeof e&&console.error("unknown Class:"+e),t.constructor=e)}var I={},O=I.ELEMENT_NODE=1,C=I.ATTRIBUTE_NODE=2,x=I.TEXT_NODE=3,_=I.CDATA_SECTION_NODE=4,R=I.ENTITY_REFERENCE_NODE=5,L=I.ENTITY_NODE=6,M=I.PROCESSING_INSTRUCTION_NODE=7,q=I.COMMENT_NODE=8,U=I.DOCUMENT_NODE=9,P=I.DOCUMENT_TYPE_NODE=10,k=I.DOCUMENT_FRAGMENT_NODE=11,H=I.NOTATION_NODE=12,V=e.freeze({DOCUMENT_POSITION_DISCONNECTED:1,DOCUMENT_POSITION_PRECEDING:2,DOCUMENT_POSITION_FOLLOWING:4,DOCUMENT_POSITION_CONTAINS:8,DOCUMENT_POSITION_CONTAINED_BY:16,DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC:32});function B(e,r){if(r.length<e.length)return B(r,e);var t=null;for(var n in e){if(e[n]!==r[n])return t;t=e[n]}return t}function F(e){return e.guid||(e.guid=Math.random()),e.guid}function G(){}function Y(e,r){this._node=e,this._refresh=r,X(this)}function X(e){var r=e._node._inc||e._node.ownerDocument._inc;if(e._inc!==r){var t=e._refresh(e._node);if(xe(e,"length",t.length),!e.$$length||t.length<e.$$length)for(var n=t.length;n in e;n++)o(e,n)&&delete e[n];S(t,e),e._inc=r}}function j(){}function z(e,r){for(var t=0;t<e.length;){if(e[t]===r)return t;t++}}function Q(e,r,t){var n=z(r,t);if(n>=0){for(var o=r.length-1;n<=o;)r[n]=r[++n];if(r.length=o,e){var a=e.ownerDocument;a&&ee(a,e,t),t.ownerElement=null}}}function W(){}function Z(e){T(e)}function $(e){return("<"==e?"<":">"==e&&">")||"&"==e&&"&"||'"'==e&&"""||"&#"+e.charCodeAt()+";"}function J(e,r){if(r(e))return!0;if(e=e.firstChild)do{if(J(e,r))return!0}while(e=e.nextSibling)}function K(e,r){T(e);var t=r||{};this.ownerDocument=this,this.contentType=t.contentType||d.XML_APPLICATION,this.type=a(this.contentType)?"html":"xml"}function ee(e,r,t,n){e&&e._inc++,t.namespaceURI===f.XMLNS&&delete r._nsMap[t.prefix?t.localName:""]}function re(e,r,t){if(e&&e._inc){e._inc++;var n=r.childNodes;if(t&&!t.nextSibling)n[n.length++]=t;else{for(var o=r.firstChild,a=0;o;)n[a++]=o,o=o.nextSibling;n.length=a,delete n[n.length]}}}function te(e,r){if(e!==r.parentNode)throw new E(E.NOT_FOUND_ERR,"child's parent is not parent");var t=r.previousSibling,n=r.nextSibling;return t?t.nextSibling=n:e.firstChild=n,n?n.previousSibling=t:e.lastChild=t,re(e.ownerDocument,e),r.parentNode=null,r.previousSibling=null,r.nextSibling=null,r}function ne(e){return e&&e.nodeType===Z.DOCUMENT_TYPE_NODE}function oe(e){return e&&e.nodeType===Z.ELEMENT_NODE}function ae(e){return e&&e.nodeType===Z.TEXT_NODE}function ie(e,t){var n=e.childNodes||[];if(r(n,oe)||ne(t))return!1;var o=r(n,ne);return!(t&&o&&n.indexOf(o)>n.indexOf(t))}function se(e,t){var n=e.childNodes||[];if(r(n,function(e){return oe(e)&&e!==t}))return!1;var o=r(n,ne);return!(t&&o&&n.indexOf(o)>n.indexOf(t))}function le(e,t,n){var o=e.childNodes||[],a=t.childNodes||[];if(t.nodeType===Z.DOCUMENT_FRAGMENT_NODE){var i=a.filter(oe);if(i.length>1||r(a,ae))throw new E(E.HIERARCHY_REQUEST_ERR,"More than one element or text in fragment");if(1===i.length&&!ie(e,n))throw new E(E.HIERARCHY_REQUEST_ERR,"Element in fragment can not be inserted before doctype")}if(oe(t)&&!ie(e,n))throw new E(E.HIERARCHY_REQUEST_ERR,"Only one element can be added and only after doctype");if(ne(t)){if(r(o,ne))throw new E(E.HIERARCHY_REQUEST_ERR,"Only one doctype is allowed");var s=r(o,oe);if(n&&o.indexOf(s)<o.indexOf(n))throw new E(E.HIERARCHY_REQUEST_ERR,"Doctype can only be inserted before an element");if(!n&&s)throw new E(E.HIERARCHY_REQUEST_ERR,"Doctype can not be appended since element is present")}}function ce(e,t,n){var o=e.childNodes||[],a=t.childNodes||[];if(t.nodeType===Z.DOCUMENT_FRAGMENT_NODE){var i=a.filter(oe);if(i.length>1||r(a,ae))throw new E(E.HIERARCHY_REQUEST_ERR,"More than one element or text in fragment");if(1===i.length&&!se(e,n))throw new E(E.HIERARCHY_REQUEST_ERR,"Element in fragment can not be inserted before doctype")}if(oe(t)&&!se(e,n))throw new E(E.HIERARCHY_REQUEST_ERR,"Only one element can be added and only after doctype");if(ne(t)){function l(e){return ne(e)&&e!==n}if(r(o,l))throw new E(E.HIERARCHY_REQUEST_ERR,"Only one doctype is allowed");var s=r(o,oe);if(n&&o.indexOf(s)<o.indexOf(n))throw new E(E.HIERARCHY_REQUEST_ERR,"Doctype can only be inserted before an element")}}function ue(e,r,t,n){(function(e,r,t){if(!function(e){return e&&(e.nodeType===Z.DOCUMENT_NODE||e.nodeType===Z.DOCUMENT_FRAGMENT_NODE||e.nodeType===Z.ELEMENT_NODE)}(e))throw new E(E.HIERARCHY_REQUEST_ERR,"Unexpected parent node type "+e.nodeType);if(t&&t.parentNode!==e)throw new E(E.NOT_FOUND_ERR,"child not in parent");if(!function(e){return e&&(e.nodeType===Z.CDATA_SECTION_NODE||e.nodeType===Z.COMMENT_NODE||e.nodeType===Z.DOCUMENT_FRAGMENT_NODE||e.nodeType===Z.DOCUMENT_TYPE_NODE||e.nodeType===Z.ELEMENT_NODE||e.nodeType===Z.PROCESSING_INSTRUCTION_NODE||e.nodeType===Z.TEXT_NODE)}(r)||ne(r)&&e.nodeType!==Z.DOCUMENT_NODE)throw new E(E.HIERARCHY_REQUEST_ERR,"Unexpected node type "+r.nodeType+" for parent node type "+e.nodeType)})(e,r,t),e.nodeType===Z.DOCUMENT_NODE&&(n||le)(e,r,t);var o=r.parentNode;if(o&&o.removeChild(r),r.nodeType===k){var a=r.firstChild;if(null==a)return r;var i=r.lastChild}else a=i=r;var s=t?t.previousSibling:e.lastChild;a.previousSibling=s,i.nextSibling=t,s?s.nextSibling=a:e.firstChild=a,null==t?e.lastChild=i:t.previousSibling=i;do{a.parentNode=e}while(a!==i&&(a=a.nextSibling));return re(e.ownerDocument||e,e,r),r.nodeType==k&&(r.firstChild=r.lastChild=null),r}function pe(e){T(e),this._nsMap=Object.create(null)}function de(e){T(e),this.namespaceURI=null,this.prefix=null,this.ownerElement=null}function fe(e){T(e)}function he(e){T(e)}function me(e){T(e)}function Ee(e){T(e)}function ge(e){T(e)}function Ne(e){T(e)}function Te(e){T(e)}function be(e){T(e)}function we(e){T(e)}function ve(e){T(e)}function ye(){}function De(e){var r=[],t=this.nodeType===U&&this.documentElement||this,n=t.prefix,o=t.namespaceURI;if(o&&null==n&&null==(n=t.lookupPrefix(o)))var a=[{namespace:o,prefix:null}];return Ie(this,r,e,a),r.join("")}function Se(e,r,t){var n=e.prefix||"",o=e.namespaceURI;if(!o)return!1;if("xml"===n&&o===f.XML||o===f.XMLNS)return!1;for(var a=t.length;a--;){var i=t[a];if(i.prefix===n)return i.namespace!==o}return!0}function Ae(e,r,t){e.push(" ",r,'="',t.replace(/[<>&"\t\n\r]/g,$),'"')}function Ie(e,r,t,n){n||(n=[]);var o="html"===(e.nodeType===U?e:e.ownerDocument).type;if(t){if(!(e=t(e)))return;if("string"==typeof e)return void r.push(e)}switch(e.nodeType){case O:var a=e.attributes,i=a.length,l=e.firstChild,c=e.tagName,p=c;if(!o&&!e.prefix&&e.namespaceURI){for(var d,h=0;h<a.length;h++)if("xmlns"===a.item(h).name){d=a.item(h).value;break}if(!d)for(var m=n.length-1;m>=0;m--)if(""===(E=n[m]).prefix&&E.namespace===e.namespaceURI){d=E.namespace;break}if(d!==e.namespaceURI)for(m=n.length-1;m>=0;m--){var E;if((E=n[m]).namespace===e.namespaceURI){E.prefix&&(p=E.prefix+":"+c);break}}}r.push("<",p);for(var g=0;g<i;g++)"xmlns"==(T=a.item(g)).prefix?n.push({prefix:T.localName,namespace:T.value}):"xmlns"==T.nodeName&&n.push({prefix:"",namespace:T.value});for(g=0;g<i;g++){var T,b,w;Se(T=a.item(g),0,n)&&(Ae(r,(b=T.prefix||"")?"xmlns:"+b:"xmlns",w=T.namespaceURI),n.push({prefix:b,namespace:w})),Ie(T,r,t,n)}c===p&&Se(e,0,n)&&(Ae(r,(b=e.prefix||"")?"xmlns:"+b:"xmlns",w=e.namespaceURI),n.push({prefix:b,namespace:w}));var v=!l;if(v&&(o||e.namespaceURI===f.HTML)&&(v=u(c)),v)r.push("/>");else{if(r.push(">"),o&&s(c))for(;l;)l.data?r.push(l.data):Ie(l,r,t,n.slice()),l=l.nextSibling;else for(;l;)Ie(l,r,t,n.slice()),l=l.nextSibling;r.push("</",p,">")}return;case U:case k:for(l=e.firstChild;l;)Ie(l,r,t,n.slice()),l=l.nextSibling;return;case C:return Ae(r,e.name,e.value);case x:return r.push(e.data.replace(/[<&>]/g,$));case _:return r.push(N.CDATA_START,e.data,N.CDATA_END);case q:return r.push(N.COMMENT_START,e.data,N.COMMENT_END);case P:var y=e.publicId,D=e.systemId;return r.push(N.DOCTYPE_DECL_START," ",e.name),y?(r.push(" ",N.PUBLIC," ",y),D&&"."!==D&&r.push(" ",D)):D&&"."!==D&&r.push(" ",N.SYSTEM," ",D),e.internalSubset&&r.push(" [",e.internalSubset,"]"),void r.push(">");case M:return r.push("<?",e.target," ",e.data,"?>");case R:return r.push("&",e.nodeName,";");default:r.push("??",e.nodeName)}}function Oe(e,r,t){var n;switch(r.nodeType){case O:(n=r.cloneNode(!1)).ownerDocument=e;case k:break;case C:t=!0}if(n||(n=r.cloneNode(!1)),n.ownerDocument=e,n.parentNode=null,t)for(var o=r.firstChild;o;)n.appendChild(Oe(e,o,t)),o=o.nextSibling;return n}function Ce(e,r,t){var n=new r.constructor(h);for(var a in r)if(o(r,a)){var i=r[a];"object"!=typeof i&&i!=n[a]&&(n[a]=i)}switch(r.childNodes&&(n.childNodes=new G),n.ownerDocument=e,n.nodeType){case O:var s=r.attributes,l=n.attributes=new j,c=s.length;l._ownerElement=n;for(var u=0;u<c;u++)n.setAttributeNode(Ce(e,s.item(u),!0));break;case C:t=!0}if(t)for(var p=r.firstChild;p;)n.appendChild(Ce(e,p,t)),p=p.nextSibling;return n}function xe(e,r,t){e[r]=t}G.prototype={length:0,item:function(e){return e>=0&&e<this.length?this[e]:null},toString:function(e){for(var r=[],t=0;t<this.length;t++)Ie(this[t],r,e);return r.join("")},filter:function(e){return Array.prototype.filter.call(this,e)},indexOf:function(e){return Array.prototype.indexOf.call(this,e)}},G.prototype[Symbol.iterator]=function(){var e=this,r=0;return{next:function(){return r<e.length?{value:e[r++],done:!1}:{done:!0}},return:function(){return{done:!0}}}},Y.prototype.item=function(e){return X(this),this[e]||null},A(Y,G),j.prototype={length:0,item:G.prototype.item,getNamedItem:function(e){this._ownerElement&&this._ownerElement._isInHTMLDocumentAndNamespace()&&(e=e.toLowerCase());for(var r=0;r<this.length;){var t=this[r];if(t.nodeName===e)return t;r++}return null},setNamedItem:function(e){var r=e.ownerElement;if(r&&r!==this._ownerElement)throw new E(E.INUSE_ATTRIBUTE_ERR);var t=this.getNamedItemNS(e.namespaceURI,e.localName);return t===e?e:(function(e,r,t,n){if(n?r[z(r,n)]=t:(r[r.length]=t,r.length++),e){t.ownerElement=e;var o=e.ownerDocument;o&&(n&&ee(o,e,n),function(e,r,t){e&&e._inc++,t.namespaceURI===f.XMLNS&&(r._nsMap[t.prefix?t.localName:""]=t.value)}(o,e,t))}}(this._ownerElement,this,e,t),t)},setNamedItemNS:function(e){return this.setNamedItem(e)},removeNamedItem:function(e){var r=this.getNamedItem(e);if(!r)throw new E(E.NOT_FOUND_ERR,e);return Q(this._ownerElement,this,r),r},removeNamedItemNS:function(e,r){var t=this.getNamedItemNS(e,r);if(!t)throw new E(E.NOT_FOUND_ERR,e?e+" : "+r:r);return Q(this._ownerElement,this,t),t},getNamedItemNS:function(e,r){e||(e=null);for(var t=0;t<this.length;){var n=this[t];if(n.localName===r&&n.namespaceURI===e)return n;t++}return null}},j.prototype[Symbol.iterator]=function(){var e=this,r=0;return{next:function(){return r<e.length?{value:e[r++],done:!1}:{done:!0}},return:function(){return{done:!0}}}},W.prototype={hasFeature:function(e,r){return!0},createDocument:function(e,r,t){var n=d.XML_APPLICATION;e===f.HTML?n=d.XML_XHTML_APPLICATION:e===f.SVG&&(n=d.XML_SVG_IMAGE);var o=new K(h,{contentType:n});if(o.implementation=this,o.childNodes=new G,o.doctype=t||null,t&&o.appendChild(t),r){var a=o.createElementNS(e,r);o.appendChild(a)}return o},createDocumentType:function(e,r,t,n){y(e);var o=new ge(h);return o.name=e,o.nodeName=e,o.publicId=r||"",o.systemId=t||"",o.internalSubset=n||"",o.childNodes=new G,o},createHTMLDocument:function(e){var r=new K(h,{contentType:d.HTML});if(r.implementation=this,r.childNodes=new G,!1!==e){r.doctype=this.createDocumentType("html"),r.doctype.ownerDocument=r,r.appendChild(r.doctype);var t=r.createElement("html");r.appendChild(t);var n=r.createElement("head");if(t.appendChild(n),"string"==typeof e){var o=r.createElement("title");o.appendChild(r.createTextNode(e)),n.appendChild(o)}t.appendChild(r.createElement("body"))}return r}},Z.prototype={firstChild:null,lastChild:null,previousSibling:null,nextSibling:null,parentNode:null,get parentElement(){return this.parentNode&&this.parentNode.nodeType===this.ELEMENT_NODE?this.parentNode:null},childNodes:null,ownerDocument:null,nodeValue:null,namespaceURI:null,prefix:null,localName:null,baseURI:"about:blank",get isConnected(){var e=this.getRootNode();return e&&e.nodeType===e.DOCUMENT_NODE},contains:function(e){if(!e)return!1;var r=e;do{if(this===r)return!0;r=e.parentNode}while(r);return!1},getRootNode:function(e){var r=this;do{if(!r.parentNode)return r;r=r.parentNode}while(r)},isEqualNode:function(e){if(!e)return!1;if(this.nodeType!==e.nodeType)return!1;switch(this.nodeType){case this.DOCUMENT_TYPE_NODE:if(this.name!==e.name)return!1;if(this.publicId!==e.publicId)return!1;if(this.systemId!==e.systemId)return!1;break;case this.ELEMENT_NODE:if(this.namespaceURI!==e.namespaceURI)return!1;if(this.prefix!==e.prefix)return!1;if(this.localName!==e.localName)return!1;if(this.attributes.length!==e.attributes.length)return!1;for(var r=0;r<this.attributes.length;r++){var t=this.attributes.item(r);if(!t.isEqualNode(e.getAttributeNodeNS(t.namespaceURI,t.localName)))return!1}break;case this.ATTRIBUTE_NODE:if(this.namespaceURI!==e.namespaceURI)return!1;if(this.localName!==e.localName)return!1;if(this.value!==e.value)return!1;break;case this.PROCESSING_INSTRUCTION_NODE:if(this.target!==e.target||this.data!==e.data)return!1;break;case this.TEXT_NODE:case this.COMMENT_NODE:if(this.data!==e.data)return!1}if(this.childNodes.length!==e.childNodes.length)return!1;for(r=0;r<this.childNodes.length;r++)if(!this.childNodes[r].isEqualNode(e.childNodes[r]))return!1;return!0},isSameNode:function(e){return this===e},insertBefore:function(e,r){return ue(this,e,r)},replaceChild:function(e,r){ue(this,e,r,ce),r&&this.removeChild(r)},removeChild:function(e){return te(this,e)},appendChild:function(e){return this.insertBefore(e,null)},hasChildNodes:function(){return null!=this.firstChild},cloneNode:function(e){return Ce(this.ownerDocument||this,this,e)},normalize:function(){for(var e=this.firstChild;e;){var r=e.nextSibling;r&&r.nodeType==x&&e.nodeType==x?(this.removeChild(r),e.appendData(r.data)):(e.normalize(),e=r)}},isSupported:function(e,r){return this.ownerDocument.implementation.hasFeature(e,r)},lookupPrefix:function(e){for(var r=this;r;){var t=r._nsMap;if(t)for(var n in t)if(o(t,n)&&t[n]===e)return n;r=r.nodeType==C?r.ownerDocument:r.parentNode}return null},lookupNamespaceURI:function(e){for(var r=this;r;){var t=r._nsMap;if(t&&o(t,e))return t[e];r=r.nodeType==C?r.ownerDocument:r.parentNode}return null},isDefaultNamespace:function(e){return null==this.lookupPrefix(e)},compareDocumentPosition:function(e){if(this===e)return 0;var r=e,t=this,n=null,o=null;if(r instanceof de&&(r=(n=r).ownerElement),t instanceof de&&(t=(o=t).ownerElement,n&&r&&t===r))for(var a,i=0;a=t.attributes[i];i++){if(a===n)return V.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC+V.DOCUMENT_POSITION_PRECEDING;if(a===o)return V.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC+V.DOCUMENT_POSITION_FOLLOWING}if(!r||!t||t.ownerDocument!==r.ownerDocument)return V.DOCUMENT_POSITION_DISCONNECTED+V.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC+(F(t.ownerDocument)>F(r.ownerDocument)?V.DOCUMENT_POSITION_FOLLOWING:V.DOCUMENT_POSITION_PRECEDING);if(o&&r===t)return V.DOCUMENT_POSITION_CONTAINS+V.DOCUMENT_POSITION_PRECEDING;if(n&&r===t)return V.DOCUMENT_POSITION_CONTAINED_BY+V.DOCUMENT_POSITION_FOLLOWING;for(var s=[],l=r.parentNode;l;){if(!o&&l===t)return V.DOCUMENT_POSITION_CONTAINED_BY+V.DOCUMENT_POSITION_FOLLOWING;s.push(l),l=l.parentNode}s.reverse();for(var c=[],u=t.parentNode;u;){if(!n&&u===r)return V.DOCUMENT_POSITION_CONTAINS+V.DOCUMENT_POSITION_PRECEDING;c.push(u),u=u.parentNode}c.reverse();var p=B(s,c);for(var d in p.childNodes){var f=p.childNodes[d];if(f===t)return V.DOCUMENT_POSITION_FOLLOWING;if(f===r)return V.DOCUMENT_POSITION_PRECEDING;if(c.indexOf(f)>=0)return V.DOCUMENT_POSITION_FOLLOWING;if(s.indexOf(f)>=0)return V.DOCUMENT_POSITION_PRECEDING}return 0}},S(I,Z),S(I,Z.prototype),S(V,Z),S(V,Z.prototype),K.prototype={implementation:null,nodeName:"#document",nodeType:U,doctype:null,documentElement:null,_inc:1,insertBefore:function(e,r){if(e.nodeType===k){for(var t=e.firstChild;t;){var n=t.nextSibling;this.insertBefore(t,r),t=n}return e}return ue(this,e,r),e.ownerDocument=this,null===this.documentElement&&e.nodeType===O&&(this.documentElement=e),e},removeChild:function(e){var r=te(this,e);return r===this.documentElement&&(this.documentElement=null),r},replaceChild:function(e,r){ue(this,e,r,ce),e.ownerDocument=this,r&&this.removeChild(r),oe(e)&&(this.documentElement=e)},importNode:function(e,r){return Oe(this,e,r)},getElementById:function(e){var r=null;return J(this.documentElement,function(t){if(t.nodeType==O&&t.getAttribute("id")==e)return r=t,!0}),r},createElement:function(e){var r=new pe(h);return r.ownerDocument=this,"html"===this.type&&(e=e.toLowerCase()),t(this.contentType)&&(r.namespaceURI=f.HTML),r.nodeName=e,r.tagName=e,r.localName=e,r.childNodes=new G,(r.attributes=new j)._ownerElement=r,r},createDocumentFragment:function(){var e=new we(h);return e.ownerDocument=this,e.childNodes=new G,e},createTextNode:function(e){var r=new he(h);return r.ownerDocument=this,r.childNodes=new G,r.appendData(e),r},createComment:function(e){var r=new me(h);return r.ownerDocument=this,r.childNodes=new G,r.appendData(e),r},createCDATASection:function(e){var r=new Ee(h);return r.ownerDocument=this,r.childNodes=new G,r.appendData(e),r},createProcessingInstruction:function(e,r){var t=new ve(h);return t.ownerDocument=this,t.childNodes=new G,t.nodeName=t.target=e,t.nodeValue=t.data=r,t},createAttribute:function(e){if(!N.QName_exact.test(e))throw new E(E.INVALID_CHARACTER_ERR,'invalid character in name "'+e+'"');return"html"===this.type&&(e=e.toLowerCase()),this._createAttribute(e)},_createAttribute:function(e){var r=new de(h);return r.ownerDocument=this,r.childNodes=new G,r.name=e,r.nodeName=e,r.localName=e,r.specified=!0,r},createEntityReference:function(e){if(!N.Name.test(e))throw new E(E.INVALID_CHARACTER_ERR,'not a valid xml name "'+e+'"');if("html"===this.type)throw new E("document is an html document",g.NotSupportedError);var r=new be(h);return r.ownerDocument=this,r.childNodes=new G,r.nodeName=e,r},createElementNS:function(e,r){var t=D(e,r),n=new pe(h),o=n.attributes=new j;return n.childNodes=new G,n.ownerDocument=this,n.nodeName=r,n.tagName=r,n.namespaceURI=t[0],n.prefix=t[1],n.localName=t[2],o._ownerElement=n,n},createAttributeNS:function(e,r){var t=D(e,r),n=new de(h);return n.ownerDocument=this,n.childNodes=new G,n.nodeName=r,n.name=r,n.specified=!0,n.namespaceURI=t[0],n.prefix=t[1],n.localName=t[2],n}},A(K,Z),pe.prototype={nodeType:O,attributes:null,getQualifiedName:function(){return this.prefix?this.prefix+":"+this.localName:this.localName},_isInHTMLDocumentAndNamespace:function(){return"html"===this.ownerDocument.type&&this.namespaceURI===f.HTML},hasAttributes:function(){return!(!this.attributes||!this.attributes.length)},hasAttribute:function(e){return!!this.getAttributeNode(e)},getAttribute:function(e){var r=this.getAttributeNode(e);return r?r.value:null},getAttributeNode:function(e){return this._isInHTMLDocumentAndNamespace()&&(e=e.toLowerCase()),this.attributes.getNamedItem(e)},setAttribute:function(e,r){this._isInHTMLDocumentAndNamespace()&&(e=e.toLowerCase());var t=this.getAttributeNode(e);t?t.value=t.nodeValue=""+r:((t=this.ownerDocument._createAttribute(e)).value=t.nodeValue=""+r,this.setAttributeNode(t))},removeAttribute:function(e){var r=this.getAttributeNode(e);r&&this.removeAttributeNode(r)},setAttributeNode:function(e){return this.attributes.setNamedItem(e)},setAttributeNodeNS:function(e){return this.attributes.setNamedItemNS(e)},removeAttributeNode:function(e){return this.attributes.removeNamedItem(e.nodeName)},removeAttributeNS:function(e,r){var t=this.getAttributeNodeNS(e,r);t&&this.removeAttributeNode(t)},hasAttributeNS:function(e,r){return null!=this.getAttributeNodeNS(e,r)},getAttributeNS:function(e,r){var t=this.getAttributeNodeNS(e,r);return t?t.value:null},setAttributeNS:function(e,r,t){var n=D(e,r)[2],o=this.getAttributeNodeNS(e,n);o?o.value=o.nodeValue=""+t:((o=this.ownerDocument.createAttributeNS(e,r)).value=o.nodeValue=""+t,this.setAttributeNode(o))},getAttributeNodeNS:function(e,r){return this.attributes.getNamedItemNS(e,r)},getElementsByClassName:function(e){var r=v(e);return new Y(this,function(t){var n=[];return r.length>0&&J(t,function(o){if(o!==t&&o.nodeType===O){var a=o.getAttribute("class");if(a){var i=e===a;if(!i){var s=v(a);i=r.every((l=s,function(e){return l&&-1!==l.indexOf(e)}))}i&&n.push(o)}}var l}),n})},getElementsByTagName:function(e){var r="html"===(this.nodeType===U?this:this.ownerDocument).type,t=e.toLowerCase();return new Y(this,function(n){var o=[];return J(n,function(a){a!==n&&a.nodeType===O&&("*"===e||a.getQualifiedName()===(r&&a.namespaceURI===f.HTML?t:e))&&o.push(a)}),o})},getElementsByTagNameNS:function(e,r){return new Y(this,function(t){var n=[];return J(t,function(o){o===t||o.nodeType!==O||"*"!==e&&o.namespaceURI!==e||"*"!==r&&o.localName!=r||n.push(o)}),n})}},K.prototype.getElementsByClassName=pe.prototype.getElementsByClassName,K.prototype.getElementsByTagName=pe.prototype.getElementsByTagName,K.prototype.getElementsByTagNameNS=pe.prototype.getElementsByTagNameNS,A(pe,Z),de.prototype.nodeType=C,A(de,Z),fe.prototype={data:"",substringData:function(e,r){return this.data.substring(e,e+r)},appendData:function(e){e=this.data+e,this.nodeValue=this.data=e,this.length=e.length},insertData:function(e,r){this.replaceData(e,0,r)},deleteData:function(e,r){this.replaceData(e,r,"")},replaceData:function(e,r,t){t=this.data.substring(0,e)+t+this.data.substring(e+r),this.nodeValue=this.data=t,this.length=t.length}},A(fe,Z),he.prototype={nodeName:"#text",nodeType:x,splitText:function(e){var r=this.data,t=r.substring(e);r=r.substring(0,e),this.data=this.nodeValue=r,this.length=r.length;var n=this.ownerDocument.createTextNode(t);return this.parentNode&&this.parentNode.insertBefore(n,this.nextSibling),n}},A(he,fe),me.prototype={nodeName:"#comment",nodeType:q},A(me,fe),Ee.prototype={nodeName:"#cdata-section",nodeType:_},A(Ee,he),ge.prototype.nodeType=P,A(ge,Z),Ne.prototype.nodeType=H,A(Ne,Z),Te.prototype.nodeType=L,A(Te,Z),be.prototype.nodeType=R,A(be,Z),we.prototype.nodeName="#document-fragment",we.prototype.nodeType=k,A(we,Z),ve.prototype.nodeType=M,A(ve,fe),ye.prototype.serializeToString=function(e,r){return De.call(e,r)},Z.prototype.toString=De;try{if(Object.defineProperty){function _e(e){switch(e.nodeType){case O:case k:var r=[];for(e=e.firstChild;e;)7!==e.nodeType&&8!==e.nodeType&&r.push(_e(e)),e=e.nextSibling;return r.join("");default:return e.nodeValue}}Object.defineProperty(Y.prototype,"length",{get:function(){return X(this),this.$$length}}),Object.defineProperty(Z.prototype,"textContent",{get:function(){return _e(this)},set:function(e){switch(this.nodeType){case O:case k:for(;this.firstChild;)this.removeChild(this.firstChild);(e||String(e))&&this.appendChild(this.ownerDocument.createTextNode(e));break;default:this.data=e,this.value=e,this.nodeValue=e}}}),xe=function(e,r,t){e["$$"+r]=t}}}catch(Re){}return c._updateLiveList=X,c.Attr=de,c.CDATASection=Ee,c.CharacterData=fe,c.Comment=me,c.Document=K,c.DocumentFragment=we,c.DocumentType=ge,c.DOMImplementation=W,c.Element=pe,c.Entity=Te,c.EntityReference=be,c.LiveNodeList=Y,c.NamedNodeMap=j,c.Node=Z,c.NodeList=G,c.Notation=Ne,c.Text=he,c.ProcessingInstruction=ve,c.XMLSerializer=ye,c}var f,h={},m={};function E(){return f||(f=1,e=m,r=n().freeze,e.XML_ENTITIES=r({amp:"&",apos:"'",gt:">",lt:"<",quot:'"'}),e.HTML_ENTITIES=r({Aacute:"Á",aacute:"á",Abreve:"Ă",abreve:"ă",ac:"∾",acd:"∿",acE:"∾̳",Acirc:"Â",acirc:"â",acute:"´",Acy:"А",acy:"а",AElig:"Æ",aelig:"æ",af:"",Afr:"𝔄",afr:"𝔞",Agrave:"À",agrave:"à",alefsym:"ℵ",aleph:"ℵ",Alpha:"Α",alpha:"α",Amacr:"Ā",amacr:"ā",amalg:"⨿",AMP:"&",amp:"&",And:"⩓",and:"∧",andand:"⩕",andd:"⩜",andslope:"⩘",andv:"⩚",ang:"∠",ange:"⦤",angle:"∠",angmsd:"∡",angmsdaa:"⦨",angmsdab:"⦩",angmsdac:"⦪",angmsdad:"⦫",angmsdae:"⦬",angmsdaf:"⦭",angmsdag:"⦮",angmsdah:"⦯",angrt:"∟",angrtvb:"⊾",angrtvbd:"⦝",angsph:"∢",angst:"Å",angzarr:"⍼",Aogon:"Ą",aogon:"ą",Aopf:"𝔸",aopf:"𝕒",ap:"≈",apacir:"⩯",apE:"⩰",ape:"≊",apid:"≋",apos:"'",ApplyFunction:"",approx:"≈",approxeq:"≊",Aring:"Å",aring:"å",Ascr:"𝒜",ascr:"𝒶",Assign:"≔",ast:"*",asymp:"≈",asympeq:"≍",Atilde:"Ã",atilde:"ã",Auml:"Ä",auml:"ä",awconint:"∳",awint:"⨑",backcong:"≌",backepsilon:"϶",backprime:"‵",backsim:"∽",backsimeq:"⋍",Backslash:"∖",Barv:"⫧",barvee:"⊽",Barwed:"⌆",barwed:"⌅",barwedge:"⌅",bbrk:"⎵",bbrktbrk:"⎶",bcong:"≌",Bcy:"Б",bcy:"б",bdquo:"„",becaus:"∵",Because:"∵",because:"∵",bemptyv:"⦰",bepsi:"϶",bernou:"ℬ",Bernoullis:"ℬ",Beta:"Β",beta:"β",beth:"ℶ",between:"≬",Bfr:"𝔅",bfr:"𝔟",bigcap:"⋂",bigcirc:"◯",bigcup:"⋃",bigodot:"⨀",bigoplus:"⨁",bigotimes:"⨂",bigsqcup:"⨆",bigstar:"★",bigtriangledown:"▽",bigtriangleup:"△",biguplus:"⨄",bigvee:"⋁",bigwedge:"⋀",bkarow:"⤍",blacklozenge:"⧫",blacksquare:"▪",blacktriangle:"▴",blacktriangledown:"▾",blacktriangleleft:"◂",blacktriangleright:"▸",blank:"␣",blk12:"▒",blk14:"░",blk34:"▓",block:"█",bne:"=⃥",bnequiv:"≡⃥",bNot:"⫭",bnot:"⌐",Bopf:"𝔹",bopf:"𝕓",bot:"⊥",bottom:"⊥",bowtie:"⋈",boxbox:"⧉",boxDL:"╗",boxDl:"╖",boxdL:"╕",boxdl:"┐",boxDR:"╔",boxDr:"╓",boxdR:"╒",boxdr:"┌",boxH:"═",boxh:"─",boxHD:"╦",boxHd:"╤",boxhD:"╥",boxhd:"┬",boxHU:"╩",boxHu:"╧",boxhU:"╨",boxhu:"┴",boxminus:"⊟",boxplus:"⊞",boxtimes:"⊠",boxUL:"╝",boxUl:"╜",boxuL:"╛",boxul:"┘",boxUR:"╚",boxUr:"╙",boxuR:"╘",boxur:"└",boxV:"║",boxv:"│",boxVH:"╬",boxVh:"╫",boxvH:"╪",boxvh:"┼",boxVL:"╣",boxVl:"╢",boxvL:"╡",boxvl:"┤",boxVR:"╠",boxVr:"╟",boxvR:"╞",boxvr:"├",bprime:"‵",Breve:"˘",breve:"˘",brvbar:"¦",Bscr:"ℬ",bscr:"𝒷",bsemi:"⁏",bsim:"∽",bsime:"⋍",bsol:"\\",bsolb:"⧅",bsolhsub:"⟈",bull:"•",bullet:"•",bump:"≎",bumpE:"⪮",bumpe:"≏",Bumpeq:"≎",bumpeq:"≏",Cacute:"Ć",cacute:"ć",Cap:"⋒",cap:"∩",capand:"⩄",capbrcup:"⩉",capcap:"⩋",capcup:"⩇",capdot:"⩀",CapitalDifferentialD:"ⅅ",caps:"∩︀",caret:"⁁",caron:"ˇ",Cayleys:"ℭ",ccaps:"⩍",Ccaron:"Č",ccaron:"č",Ccedil:"Ç",ccedil:"ç",Ccirc:"Ĉ",ccirc:"ĉ",Cconint:"∰",ccups:"⩌",ccupssm:"⩐",Cdot:"Ċ",cdot:"ċ",cedil:"¸",Cedilla:"¸",cemptyv:"⦲",cent:"¢",CenterDot:"·",centerdot:"·",Cfr:"ℭ",cfr:"𝔠",CHcy:"Ч",chcy:"ч",check:"✓",checkmark:"✓",Chi:"Χ",chi:"χ",cir:"○",circ:"ˆ",circeq:"≗",circlearrowleft:"↺",circlearrowright:"↻",circledast:"⊛",circledcirc:"⊚",circleddash:"⊝",CircleDot:"⊙",circledR:"®",circledS:"Ⓢ",CircleMinus:"⊖",CirclePlus:"⊕",CircleTimes:"⊗",cirE:"⧃",cire:"≗",cirfnint:"⨐",cirmid:"⫯",cirscir:"⧂",ClockwiseContourIntegral:"∲",CloseCurlyDoubleQuote:"”",CloseCurlyQuote:"’",clubs:"♣",clubsuit:"♣",Colon:"∷",colon:":",Colone:"⩴",colone:"≔",coloneq:"≔",comma:",",commat:"@",comp:"∁",compfn:"∘",complement:"∁",complexes:"ℂ",cong:"≅",congdot:"⩭",Congruent:"≡",Conint:"∯",conint:"∮",ContourIntegral:"∮",Copf:"ℂ",copf:"𝕔",coprod:"∐",Coproduct:"∐",COPY:"©",copy:"©",copysr:"℗",CounterClockwiseContourIntegral:"∳",crarr:"↵",Cross:"⨯",cross:"✗",Cscr:"𝒞",cscr:"𝒸",csub:"⫏",csube:"⫑",csup:"⫐",csupe:"⫒",ctdot:"⋯",cudarrl:"⤸",cudarrr:"⤵",cuepr:"⋞",cuesc:"⋟",cularr:"↶",cularrp:"⤽",Cup:"⋓",cup:"∪",cupbrcap:"⩈",CupCap:"≍",cupcap:"⩆",cupcup:"⩊",cupdot:"⊍",cupor:"⩅",cups:"∪︀",curarr:"↷",curarrm:"⤼",curlyeqprec:"⋞",curlyeqsucc:"⋟",curlyvee:"⋎",curlywedge:"⋏",curren:"¤",curvearrowleft:"↶",curvearrowright:"↷",cuvee:"⋎",cuwed:"⋏",cwconint:"∲",cwint:"∱",cylcty:"⌭",Dagger:"‡",dagger:"†",daleth:"ℸ",Darr:"↡",dArr:"⇓",darr:"↓",dash:"‐",Dashv:"⫤",dashv:"⊣",dbkarow:"⤏",dblac:"˝",Dcaron:"Ď",dcaron:"ď",Dcy:"Д",dcy:"д",DD:"ⅅ",dd:"ⅆ",ddagger:"‡",ddarr:"⇊",DDotrahd:"⤑",ddotseq:"⩷",deg:"°",Del:"∇",Delta:"Δ",delta:"δ",demptyv:"⦱",dfisht:"⥿",Dfr:"𝔇",dfr:"𝔡",dHar:"⥥",dharl:"⇃",dharr:"⇂",DiacriticalAcute:"´",DiacriticalDot:"˙",DiacriticalDoubleAcute:"˝",DiacriticalGrave:"`",DiacriticalTilde:"˜",diam:"⋄",Diamond:"⋄",diamond:"⋄",diamondsuit:"♦",diams:"♦",die:"¨",DifferentialD:"ⅆ",digamma:"ϝ",disin:"⋲",div:"÷",divide:"÷",divideontimes:"⋇",divonx:"⋇",DJcy:"Ђ",djcy:"ђ",dlcorn:"⌞",dlcrop:"⌍",dollar:"$",Dopf:"𝔻",dopf:"𝕕",Dot:"¨",dot:"˙",DotDot:"⃜",doteq:"≐",doteqdot:"≑",DotEqual:"≐",dotminus:"∸",dotplus:"∔",dotsquare:"⊡",doublebarwedge:"⌆",DoubleContourIntegral:"∯",DoubleDot:"¨",DoubleDownArrow:"⇓",DoubleLeftArrow:"⇐",DoubleLeftRightArrow:"⇔",DoubleLeftTee:"⫤",DoubleLongLeftArrow:"⟸",DoubleLongLeftRightArrow:"⟺",DoubleLongRightArrow:"⟹",DoubleRightArrow:"⇒",DoubleRightTee:"⊨",DoubleUpArrow:"⇑",DoubleUpDownArrow:"⇕",DoubleVerticalBar:"∥",DownArrow:"↓",Downarrow:"⇓",downarrow:"↓",DownArrowBar:"⤓",DownArrowUpArrow:"⇵",DownBreve:"̑",downdownarrows:"⇊",downharpoonleft:"⇃",downharpoonright:"⇂",DownLeftRightVector:"⥐",DownLeftTeeVector:"⥞",DownLeftVector:"↽",DownLeftVectorBar:"⥖",DownRightTeeVector:"⥟",DownRightVector:"⇁",DownRightVectorBar:"⥗",DownTee:"⊤",DownTeeArrow:"↧",drbkarow:"⤐",drcorn:"⌟",drcrop:"⌌",Dscr:"𝒟",dscr:"𝒹",DScy:"Ѕ",dscy:"ѕ",dsol:"⧶",Dstrok:"Đ",dstrok:"đ",dtdot:"⋱",dtri:"▿",dtrif:"▾",duarr:"⇵",duhar:"⥯",dwangle:"⦦",DZcy:"Џ",dzcy:"џ",dzigrarr:"⟿",Eacute:"É",eacute:"é",easter:"⩮",Ecaron:"Ě",ecaron:"ě",ecir:"≖",Ecirc:"Ê",ecirc:"ê",ecolon:"≕",Ecy:"Э",ecy:"э",eDDot:"⩷",Edot:"Ė",eDot:"≑",edot:"ė",ee:"ⅇ",efDot:"≒",Efr:"𝔈",efr:"𝔢",eg:"⪚",Egrave:"È",egrave:"è",egs:"⪖",egsdot:"⪘",el:"⪙",Element:"∈",elinters:"⏧",ell:"ℓ",els:"⪕",elsdot:"⪗",Emacr:"Ē",emacr:"ē",empty:"∅",emptyset:"∅",EmptySmallSquare:"◻",emptyv:"∅",EmptyVerySmallSquare:"▫",emsp:" ",emsp13:" ",emsp14:" ",ENG:"Ŋ",eng:"ŋ",ensp:" ",Eogon:"Ę",eogon:"ę",Eopf:"𝔼",eopf:"𝕖",epar:"⋕",eparsl:"⧣",eplus:"⩱",epsi:"ε",Epsilon:"Ε",epsilon:"ε",epsiv:"ϵ",eqcirc:"≖",eqcolon:"≕",eqsim:"≂",eqslantgtr:"⪖",eqslantless:"⪕",Equal:"⩵",equals:"=",EqualTilde:"≂",equest:"≟",Equilibrium:"⇌",equiv:"≡",equivDD:"⩸",eqvparsl:"⧥",erarr:"⥱",erDot:"≓",Escr:"ℰ",escr:"ℯ",esdot:"≐",Esim:"⩳",esim:"≂",Eta:"Η",eta:"η",ETH:"Ð",eth:"ð",Euml:"Ë",euml:"ë",euro:"€",excl:"!",exist:"∃",Exists:"∃",expectation:"ℰ",ExponentialE:"ⅇ",exponentiale:"ⅇ",fallingdotseq:"≒",Fcy:"Ф",fcy:"ф",female:"♀",ffilig:"ffi",fflig:"ff",ffllig:"ffl",Ffr:"𝔉",ffr:"𝔣",filig:"fi",FilledSmallSquare:"◼",FilledVerySmallSquare:"▪",fjlig:"fj",flat:"♭",fllig:"fl",fltns:"▱",fnof:"ƒ",Fopf:"𝔽",fopf:"𝕗",ForAll:"∀",forall:"∀",fork:"⋔",forkv:"⫙",Fouriertrf:"ℱ",fpartint:"⨍",frac12:"½",frac13:"⅓",frac14:"¼",frac15:"⅕",frac16:"⅙",frac18:"⅛",frac23:"⅔",frac25:"⅖",frac34:"¾",frac35:"⅗",frac38:"⅜",frac45:"⅘",frac56:"⅚",frac58:"⅝",frac78:"⅞",frasl:"⁄",frown:"⌢",Fscr:"ℱ",fscr:"𝒻",gacute:"ǵ",Gamma:"Γ",gamma:"γ",Gammad:"Ϝ",gammad:"ϝ",gap:"⪆",Gbreve:"Ğ",gbreve:"ğ",Gcedil:"Ģ",Gcirc:"Ĝ",gcirc:"ĝ",Gcy:"Г",gcy:"г",Gdot:"Ġ",gdot:"ġ",gE:"≧",ge:"≥",gEl:"⪌",gel:"⋛",geq:"≥",geqq:"≧",geqslant:"⩾",ges:"⩾",gescc:"⪩",gesdot:"⪀",gesdoto:"⪂",gesdotol:"⪄",gesl:"⋛︀",gesles:"⪔",Gfr:"𝔊",gfr:"𝔤",Gg:"⋙",gg:"≫",ggg:"⋙",gimel:"ℷ",GJcy:"Ѓ",gjcy:"ѓ",gl:"≷",gla:"⪥",glE:"⪒",glj:"⪤",gnap:"⪊",gnapprox:"⪊",gnE:"≩",gne:"⪈",gneq:"⪈",gneqq:"≩",gnsim:"⋧",Gopf:"𝔾",gopf:"𝕘",grave:"`",GreaterEqual:"≥",GreaterEqualLess:"⋛",GreaterFullEqual:"≧",GreaterGreater:"⪢",GreaterLess:"≷",GreaterSlantEqual:"⩾",GreaterTilde:"≳",Gscr:"𝒢",gscr:"ℊ",gsim:"≳",gsime:"⪎",gsiml:"⪐",Gt:"≫",GT:">",gt:">",gtcc:"⪧",gtcir:"⩺",gtdot:"⋗",gtlPar:"⦕",gtquest:"⩼",gtrapprox:"⪆",gtrarr:"⥸",gtrdot:"⋗",gtreqless:"⋛",gtreqqless:"⪌",gtrless:"≷",gtrsim:"≳",gvertneqq:"≩︀",gvnE:"≩︀",Hacek:"ˇ",hairsp:" ",half:"½",hamilt:"ℋ",HARDcy:"Ъ",hardcy:"ъ",hArr:"⇔",harr:"↔",harrcir:"⥈",harrw:"↭",Hat:"^",hbar:"ℏ",Hcirc:"Ĥ",hcirc:"ĥ",hearts:"♥",heartsuit:"♥",hellip:"…",hercon:"⊹",Hfr:"ℌ",hfr:"𝔥",HilbertSpace:"ℋ",hksearow:"⤥",hkswarow:"⤦",hoarr:"⇿",homtht:"∻",hookleftarrow:"↩",hookrightarrow:"↪",Hopf:"ℍ",hopf:"𝕙",horbar:"―",HorizontalLine:"─",Hscr:"ℋ",hscr:"𝒽",hslash:"ℏ",Hstrok:"Ħ",hstrok:"ħ",HumpDownHump:"≎",HumpEqual:"≏",hybull:"⁃",hyphen:"‐",Iacute:"Í",iacute:"í",ic:"",Icirc:"Î",icirc:"î",Icy:"И",icy:"и",Idot:"İ",IEcy:"Е",iecy:"е",iexcl:"¡",iff:"⇔",Ifr:"ℑ",ifr:"𝔦",Igrave:"Ì",igrave:"ì",ii:"ⅈ",iiiint:"⨌",iiint:"∭",iinfin:"⧜",iiota:"℩",IJlig:"IJ",ijlig:"ij",Im:"ℑ",Imacr:"Ī",imacr:"ī",image:"ℑ",ImaginaryI:"ⅈ",imagline:"ℐ",imagpart:"ℑ",imath:"ı",imof:"⊷",imped:"Ƶ",Implies:"⇒",in:"∈",incare:"℅",infin:"∞",infintie:"⧝",inodot:"ı",Int:"∬",int:"∫",intcal:"⊺",integers:"ℤ",Integral:"∫",intercal:"⊺",Intersection:"⋂",intlarhk:"⨗",intprod:"⨼",InvisibleComma:"",InvisibleTimes:"",IOcy:"Ё",iocy:"ё",Iogon:"Į",iogon:"į",Iopf:"𝕀",iopf:"𝕚",Iota:"Ι",iota:"ι",iprod:"⨼",iquest:"¿",Iscr:"ℐ",iscr:"𝒾",isin:"∈",isindot:"⋵",isinE:"⋹",isins:"⋴",isinsv:"⋳",isinv:"∈",it:"",Itilde:"Ĩ",itilde:"ĩ",Iukcy:"І",iukcy:"і",Iuml:"Ï",iuml:"ï",Jcirc:"Ĵ",jcirc:"ĵ",Jcy:"Й",jcy:"й",Jfr:"𝔍",jfr:"𝔧",jmath:"ȷ",Jopf:"𝕁",jopf:"𝕛",Jscr:"𝒥",jscr:"𝒿",Jsercy:"Ј",jsercy:"ј",Jukcy:"Є",jukcy:"є",Kappa:"Κ",kappa:"κ",kappav:"ϰ",Kcedil:"Ķ",kcedil:"ķ",Kcy:"К",kcy:"к",Kfr:"𝔎",kfr:"𝔨",kgreen:"ĸ",KHcy:"Х",khcy:"х",KJcy:"Ќ",kjcy:"ќ",Kopf:"𝕂",kopf:"𝕜",Kscr:"𝒦",kscr:"𝓀",lAarr:"⇚",Lacute:"Ĺ",lacute:"ĺ",laemptyv:"⦴",lagran:"ℒ",Lambda:"Λ",lambda:"λ",Lang:"⟪",lang:"⟨",langd:"⦑",langle:"⟨",lap:"⪅",Laplacetrf:"ℒ",laquo:"«",Larr:"↞",lArr:"⇐",larr:"←",larrb:"⇤",larrbfs:"⤟",larrfs:"⤝",larrhk:"↩",larrlp:"↫",larrpl:"⤹",larrsim:"⥳",larrtl:"↢",lat:"⪫",lAtail:"⤛",latail:"⤙",late:"⪭",lates:"⪭︀",lBarr:"⤎",lbarr:"⤌",lbbrk:"❲",lbrace:"{",lbrack:"[",lbrke:"⦋",lbrksld:"⦏",lbrkslu:"⦍",Lcaron:"Ľ",lcaron:"ľ",Lcedil:"Ļ",lcedil:"ļ",lceil:"⌈",lcub:"{",Lcy:"Л",lcy:"л",ldca:"⤶",ldquo:"“",ldquor:"„",ldrdhar:"⥧",ldrushar:"⥋",ldsh:"↲",lE:"≦",le:"≤",LeftAngleBracket:"⟨",LeftArrow:"←",Leftarrow:"⇐",leftarrow:"←",LeftArrowBar:"⇤",LeftArrowRightArrow:"⇆",leftarrowtail:"↢",LeftCeiling:"⌈",LeftDoubleBracket:"⟦",LeftDownTeeVector:"⥡",LeftDownVector:"⇃",LeftDownVectorBar:"⥙",LeftFloor:"⌊",leftharpoondown:"↽",leftharpoonup:"↼",leftleftarrows:"⇇",LeftRightArrow:"↔",Leftrightarrow:"⇔",leftrightarrow:"↔",leftrightarrows:"⇆",leftrightharpoons:"⇋",leftrightsquigarrow:"↭",LeftRightVector:"⥎",LeftTee:"⊣",LeftTeeArrow:"↤",LeftTeeVector:"⥚",leftthreetimes:"⋋",LeftTriangle:"⊲",LeftTriangleBar:"⧏",LeftTriangleEqual:"⊴",LeftUpDownVector:"⥑",LeftUpTeeVector:"⥠",LeftUpVector:"↿",LeftUpVectorBar:"⥘",LeftVector:"↼",LeftVectorBar:"⥒",lEg:"⪋",leg:"⋚",leq:"≤",leqq:"≦",leqslant:"⩽",les:"⩽",lescc:"⪨",lesdot:"⩿",lesdoto:"⪁",lesdotor:"⪃",lesg:"⋚︀",lesges:"⪓",lessapprox:"⪅",lessdot:"⋖",lesseqgtr:"⋚",lesseqqgtr:"⪋",LessEqualGreater:"⋚",LessFullEqual:"≦",LessGreater:"≶",lessgtr:"≶",LessLess:"⪡",lesssim:"≲",LessSlantEqual:"⩽",LessTilde:"≲",lfisht:"⥼",lfloor:"⌊",Lfr:"𝔏",lfr:"𝔩",lg:"≶",lgE:"⪑",lHar:"⥢",lhard:"↽",lharu:"↼",lharul:"⥪",lhblk:"▄",LJcy:"Љ",ljcy:"љ",Ll:"⋘",ll:"≪",llarr:"⇇",llcorner:"⌞",Lleftarrow:"⇚",llhard:"⥫",lltri:"◺",Lmidot:"Ŀ",lmidot:"ŀ",lmoust:"⎰",lmoustache:"⎰",lnap:"⪉",lnapprox:"⪉",lnE:"≨",lne:"⪇",lneq:"⪇",lneqq:"≨",lnsim:"⋦",loang:"⟬",loarr:"⇽",lobrk:"⟦",LongLeftArrow:"⟵",Longleftarrow:"⟸",longleftarrow:"⟵",LongLeftRightArrow:"⟷",Longleftrightarrow:"⟺",longleftrightarrow:"⟷",longmapsto:"⟼",LongRightArrow:"⟶",Longrightarrow:"⟹",longrightarrow:"⟶",looparrowleft:"↫",looparrowright:"↬",lopar:"⦅",Lopf:"𝕃",lopf:"𝕝",loplus:"⨭",lotimes:"⨴",lowast:"∗",lowbar:"_",LowerLeftArrow:"↙",LowerRightArrow:"↘",loz:"◊",lozenge:"◊",lozf:"⧫",lpar:"(",lparlt:"⦓",lrarr:"⇆",lrcorner:"⌟",lrhar:"⇋",lrhard:"⥭",lrm:"",lrtri:"⊿",lsaquo:"‹",Lscr:"ℒ",lscr:"𝓁",Lsh:"↰",lsh:"↰",lsim:"≲",lsime:"⪍",lsimg:"⪏",lsqb:"[",lsquo:"‘",lsquor:"‚",Lstrok:"Ł",lstrok:"ł",Lt:"≪",LT:"<",lt:"<",ltcc:"⪦",ltcir:"⩹",ltdot:"⋖",lthree:"⋋",ltimes:"⋉",ltlarr:"⥶",ltquest:"⩻",ltri:"◃",ltrie:"⊴",ltrif:"◂",ltrPar:"⦖",lurdshar:"⥊",luruhar:"⥦",lvertneqq:"≨︀",lvnE:"≨︀",macr:"¯",male:"♂",malt:"✠",maltese:"✠",Map:"⤅",map:"↦",mapsto:"↦",mapstodown:"↧",mapstoleft:"↤",mapstoup:"↥",marker:"▮",mcomma:"⨩",Mcy:"М",mcy:"м",mdash:"—",mDDot:"∺",measuredangle:"∡",MediumSpace:" ",Mellintrf:"ℳ",Mfr:"𝔐",mfr:"𝔪",mho:"℧",micro:"µ",mid:"∣",midast:"*",midcir:"⫰",middot:"·",minus:"−",minusb:"⊟",minusd:"∸",minusdu:"⨪",MinusPlus:"∓",mlcp:"⫛",mldr:"…",mnplus:"∓",models:"⊧",Mopf:"𝕄",mopf:"𝕞",mp:"∓",Mscr:"ℳ",mscr:"𝓂",mstpos:"∾",Mu:"Μ",mu:"μ",multimap:"⊸",mumap:"⊸",nabla:"∇",Nacute:"Ń",nacute:"ń",nang:"∠⃒",nap:"≉",napE:"⩰̸",napid:"≋̸",napos:"ʼn",napprox:"≉",natur:"♮",natural:"♮",naturals:"ℕ",nbsp:" ",nbump:"≎̸",nbumpe:"≏̸",ncap:"⩃",Ncaron:"Ň",ncaron:"ň",Ncedil:"Ņ",ncedil:"ņ",ncong:"≇",ncongdot:"⩭̸",ncup:"⩂",Ncy:"Н",ncy:"н",ndash:"–",ne:"≠",nearhk:"⤤",neArr:"⇗",nearr:"↗",nearrow:"↗",nedot:"≐̸",NegativeMediumSpace:"",NegativeThickSpace:"",NegativeThinSpace:"",NegativeVeryThinSpace:"",nequiv:"≢",nesear:"⤨",nesim:"≂̸",NestedGreaterGreater:"≫",NestedLessLess:"≪",NewLine:"\n",nexist:"∄",nexists:"∄",Nfr:"𝔑",nfr:"𝔫",ngE:"≧̸",nge:"≱",ngeq:"≱",ngeqq:"≧̸",ngeqslant:"⩾̸",nges:"⩾̸",nGg:"⋙̸",ngsim:"≵",nGt:"≫⃒",ngt:"≯",ngtr:"≯",nGtv:"≫̸",nhArr:"⇎",nharr:"↮",nhpar:"⫲",ni:"∋",nis:"⋼",nisd:"⋺",niv:"∋",NJcy:"Њ",njcy:"њ",nlArr:"⇍",nlarr:"↚",nldr:"‥",nlE:"≦̸",nle:"≰",nLeftarrow:"⇍",nleftarrow:"↚",nLeftrightarrow:"⇎",nleftrightarrow:"↮",nleq:"≰",nleqq:"≦̸",nleqslant:"⩽̸",nles:"⩽̸",nless:"≮",nLl:"⋘̸",nlsim:"≴",nLt:"≪⃒",nlt:"≮",nltri:"⋪",nltrie:"⋬",nLtv:"≪̸",nmid:"∤",NoBreak:"",NonBreakingSpace:" ",Nopf:"ℕ",nopf:"𝕟",Not:"⫬",not:"¬",NotCongruent:"≢",NotCupCap:"≭",NotDoubleVerticalBar:"∦",NotElement:"∉",NotEqual:"≠",NotEqualTilde:"≂̸",NotExists:"∄",NotGreater:"≯",NotGreaterEqual:"≱",NotGreaterFullEqual:"≧̸",NotGreaterGreater:"≫̸",NotGreaterLess:"≹",NotGreaterSlantEqual:"⩾̸",NotGreaterTilde:"≵",NotHumpDownHump:"≎̸",NotHumpEqual:"≏̸",notin:"∉",notindot:"⋵̸",notinE:"⋹̸",notinva:"∉",notinvb:"⋷",notinvc:"⋶",NotLeftTriangle:"⋪",NotLeftTriangleBar:"⧏̸",NotLeftTriangleEqual:"⋬",NotLess:"≮",NotLessEqual:"≰",NotLessGreater:"≸",NotLessLess:"≪̸",NotLessSlantEqual:"⩽̸",NotLessTilde:"≴",NotNestedGreaterGreater:"⪢̸",NotNestedLessLess:"⪡̸",notni:"∌",notniva:"∌",notnivb:"⋾",notnivc:"⋽",NotPrecedes:"⊀",NotPrecedesEqual:"⪯̸",NotPrecedesSlantEqual:"⋠",NotReverseElement:"∌",NotRightTriangle:"⋫",NotRightTriangleBar:"⧐̸",NotRightTriangleEqual:"⋭",NotSquareSubset:"⊏̸",NotSquareSubsetEqual:"⋢",NotSquareSuperset:"⊐̸",NotSquareSupersetEqual:"⋣",NotSubset:"⊂⃒",NotSubsetEqual:"⊈",NotSucceeds:"⊁",NotSucceedsEqual:"⪰̸",NotSucceedsSlantEqual:"⋡",NotSucceedsTilde:"≿̸",NotSuperset:"⊃⃒",NotSupersetEqual:"⊉",NotTilde:"≁",NotTildeEqual:"≄",NotTildeFullEqual:"≇",NotTildeTilde:"≉",NotVerticalBar:"∤",npar:"∦",nparallel:"∦",nparsl:"⫽⃥",npart:"∂̸",npolint:"⨔",npr:"⊀",nprcue:"⋠",npre:"⪯̸",nprec:"⊀",npreceq:"⪯̸",nrArr:"⇏",nrarr:"↛",nrarrc:"⤳̸",nrarrw:"↝̸",nRightarrow:"⇏",nrightarrow:"↛",nrtri:"⋫",nrtrie:"⋭",nsc:"⊁",nsccue:"⋡",nsce:"⪰̸",Nscr:"𝒩",nscr:"𝓃",nshortmid:"∤",nshortparallel:"∦",nsim:"≁",nsime:"≄",nsimeq:"≄",nsmid:"∤",nspar:"∦",nsqsube:"⋢",nsqsupe:"⋣",nsub:"⊄",nsubE:"⫅̸",nsube:"⊈",nsubset:"⊂⃒",nsubseteq:"⊈",nsubseteqq:"⫅̸",nsucc:"⊁",nsucceq:"⪰̸",nsup:"⊅",nsupE:"⫆̸",nsupe:"⊉",nsupset:"⊃⃒",nsupseteq:"⊉",nsupseteqq:"⫆̸",ntgl:"≹",Ntilde:"Ñ",ntilde:"ñ",ntlg:"≸",ntriangleleft:"⋪",ntrianglelefteq:"⋬",ntriangleright:"⋫",ntrianglerighteq:"⋭",Nu:"Ν",nu:"ν",num:"#",numero:"№",numsp:" ",nvap:"≍⃒",nVDash:"⊯",nVdash:"⊮",nvDash:"⊭",nvdash:"⊬",nvge:"≥⃒",nvgt:">⃒",nvHarr:"⤄",nvinfin:"⧞",nvlArr:"⤂",nvle:"≤⃒",nvlt:"<⃒",nvltrie:"⊴⃒",nvrArr:"⤃",nvrtrie:"⊵⃒",nvsim:"∼⃒",nwarhk:"⤣",nwArr:"⇖",nwarr:"↖",nwarrow:"↖",nwnear:"⤧",Oacute:"Ó",oacute:"ó",oast:"⊛",ocir:"⊚",Ocirc:"Ô",ocirc:"ô",Ocy:"О",ocy:"о",odash:"⊝",Odblac:"Ő",odblac:"ő",odiv:"⨸",odot:"⊙",odsold:"⦼",OElig:"Œ",oelig:"œ",ofcir:"⦿",Ofr:"𝔒",ofr:"𝔬",ogon:"˛",Ograve:"Ò",ograve:"ò",ogt:"⧁",ohbar:"⦵",ohm:"Ω",oint:"∮",olarr:"↺",olcir:"⦾",olcross:"⦻",oline:"‾",olt:"⧀",Omacr:"Ō",omacr:"ō",Omega:"Ω",omega:"ω",Omicron:"Ο",omicron:"ο",omid:"⦶",ominus:"⊖",Oopf:"𝕆",oopf:"𝕠",opar:"⦷",OpenCurlyDoubleQuote:"“",OpenCurlyQuote:"‘",operp:"⦹",oplus:"⊕",Or:"⩔",or:"∨",orarr:"↻",ord:"⩝",order:"ℴ",orderof:"ℴ",ordf:"ª",ordm:"º",origof:"⊶",oror:"⩖",orslope:"⩗",orv:"⩛",oS:"Ⓢ",Oscr:"𝒪",oscr:"ℴ",Oslash:"Ø",oslash:"ø",osol:"⊘",Otilde:"Õ",otilde:"õ",Otimes:"⨷",otimes:"⊗",otimesas:"⨶",Ouml:"Ö",ouml:"ö",ovbar:"⌽",OverBar:"‾",OverBrace:"⏞",OverBracket:"⎴",OverParenthesis:"⏜",par:"∥",para:"¶",parallel:"∥",parsim:"⫳",parsl:"⫽",part:"∂",PartialD:"∂",Pcy:"П",pcy:"п",percnt:"%",period:".",permil:"‰",perp:"⊥",pertenk:"‱",Pfr:"𝔓",pfr:"𝔭",Phi:"Φ",phi:"φ",phiv:"ϕ",phmmat:"ℳ",phone:"☎",Pi:"Π",pi:"π",pitchfork:"⋔",piv:"ϖ",planck:"ℏ",planckh:"ℎ",plankv:"ℏ",plus:"+",plusacir:"⨣",plusb:"⊞",pluscir:"⨢",plusdo:"∔",plusdu:"⨥",pluse:"⩲",PlusMinus:"±",plusmn:"±",plussim:"⨦",plustwo:"⨧",pm:"±",Poincareplane:"ℌ",pointint:"⨕",Popf:"ℙ",popf:"𝕡",pound:"£",Pr:"⪻",pr:"≺",prap:"⪷",prcue:"≼",prE:"⪳",pre:"⪯",prec:"≺",precapprox:"⪷",preccurlyeq:"≼",Precedes:"≺",PrecedesEqual:"⪯",PrecedesSlantEqual:"≼",PrecedesTilde:"≾",preceq:"⪯",precnapprox:"⪹",precneqq:"⪵",precnsim:"⋨",precsim:"≾",Prime:"″",prime:"′",primes:"ℙ",prnap:"⪹",prnE:"⪵",prnsim:"⋨",prod:"∏",Product:"∏",profalar:"⌮",profline:"⌒",profsurf:"⌓",prop:"∝",Proportion:"∷",Proportional:"∝",propto:"∝",prsim:"≾",prurel:"⊰",Pscr:"𝒫",pscr:"𝓅",Psi:"Ψ",psi:"ψ",puncsp:" ",Qfr:"𝔔",qfr:"𝔮",qint:"⨌",Qopf:"ℚ",qopf:"𝕢",qprime:"⁗",Qscr:"𝒬",qscr:"𝓆",quaternions:"ℍ",quatint:"⨖",quest:"?",questeq:"≟",QUOT:'"',quot:'"',rAarr:"⇛",race:"∽̱",Racute:"Ŕ",racute:"ŕ",radic:"√",raemptyv:"⦳",Rang:"⟫",rang:"⟩",rangd:"⦒",range:"⦥",rangle:"⟩",raquo:"»",Rarr:"↠",rArr:"⇒",rarr:"→",rarrap:"⥵",rarrb:"⇥",rarrbfs:"⤠",rarrc:"⤳",rarrfs:"⤞",rarrhk:"↪",rarrlp:"↬",rarrpl:"⥅",rarrsim:"⥴",Rarrtl:"⤖",rarrtl:"↣",rarrw:"↝",rAtail:"⤜",ratail:"⤚",ratio:"∶",rationals:"ℚ",RBarr:"⤐",rBarr:"⤏",rbarr:"⤍",rbbrk:"❳",rbrace:"}",rbrack:"]",rbrke:"⦌",rbrksld:"⦎",rbrkslu:"⦐",Rcaron:"Ř",rcaron:"ř",Rcedil:"Ŗ",rcedil:"ŗ",rceil:"⌉",rcub:"}",Rcy:"Р",rcy:"р",rdca:"⤷",rdldhar:"⥩",rdquo:"”",rdquor:"”",rdsh:"↳",Re:"ℜ",real:"ℜ",realine:"ℛ",realpart:"ℜ",reals:"ℝ",rect:"▭",REG:"®",reg:"®",ReverseElement:"∋",ReverseEquilibrium:"⇋",ReverseUpEquilibrium:"⥯",rfisht:"⥽",rfloor:"⌋",Rfr:"ℜ",rfr:"𝔯",rHar:"⥤",rhard:"⇁",rharu:"⇀",rharul:"⥬",Rho:"Ρ",rho:"ρ",rhov:"ϱ",RightAngleBracket:"⟩",RightArrow:"→",Rightarrow:"⇒",rightarrow:"→",RightArrowBar:"⇥",RightArrowLeftArrow:"⇄",rightarrowtail:"↣",RightCeiling:"⌉",RightDoubleBracket:"⟧",RightDownTeeVector:"⥝",RightDownVector:"⇂",RightDownVectorBar:"⥕",RightFloor:"⌋",rightharpoondown:"⇁",rightharpoonup:"⇀",rightleftarrows:"⇄",rightleftharpoons:"⇌",rightrightarrows:"⇉",rightsquigarrow:"↝",RightTee:"⊢",RightTeeArrow:"↦",RightTeeVector:"⥛",rightthreetimes:"⋌",RightTriangle:"⊳",RightTriangleBar:"⧐",RightTriangleEqual:"⊵",RightUpDownVector:"⥏",RightUpTeeVector:"⥜",RightUpVector:"↾",RightUpVectorBar:"⥔",RightVector:"⇀",RightVectorBar:"⥓",ring:"˚",risingdotseq:"≓",rlarr:"⇄",rlhar:"⇌",rlm:"",rmoust:"⎱",rmoustache:"⎱",rnmid:"⫮",roang:"⟭",roarr:"⇾",robrk:"⟧",ropar:"⦆",Ropf:"ℝ",ropf:"𝕣",roplus:"⨮",rotimes:"⨵",RoundImplies:"⥰",rpar:")",rpargt:"⦔",rppolint:"⨒",rrarr:"⇉",Rrightarrow:"⇛",rsaquo:"›",Rscr:"ℛ",rscr:"𝓇",Rsh:"↱",rsh:"↱",rsqb:"]",rsquo:"’",rsquor:"’",rthree:"⋌",rtimes:"⋊",rtri:"▹",rtrie:"⊵",rtrif:"▸",rtriltri:"⧎",RuleDelayed:"⧴",ruluhar:"⥨",rx:"℞",Sacute:"Ś",sacute:"ś",sbquo:"‚",Sc:"⪼",sc:"≻",scap:"⪸",Scaron:"Š",scaron:"š",sccue:"≽",scE:"⪴",sce:"⪰",Scedil:"Ş",scedil:"ş",Scirc:"Ŝ",scirc:"ŝ",scnap:"⪺",scnE:"⪶",scnsim:"⋩",scpolint:"⨓",scsim:"≿",Scy:"С",scy:"с",sdot:"⋅",sdotb:"⊡",sdote:"⩦",searhk:"⤥",seArr:"⇘",searr:"↘",searrow:"↘",sect:"§",semi:";",seswar:"⤩",setminus:"∖",setmn:"∖",sext:"✶",Sfr:"𝔖",sfr:"𝔰",sfrown:"⌢",sharp:"♯",SHCHcy:"Щ",shchcy:"щ",SHcy:"Ш",shcy:"ш",ShortDownArrow:"↓",ShortLeftArrow:"←",shortmid:"∣",shortparallel:"∥",ShortRightArrow:"→",ShortUpArrow:"↑",shy:"",Sigma:"Σ",sigma:"σ",sigmaf:"ς",sigmav:"ς",sim:"∼",simdot:"⩪",sime:"≃",simeq:"≃",simg:"⪞",simgE:"⪠",siml:"⪝",simlE:"⪟",simne:"≆",simplus:"⨤",simrarr:"⥲",slarr:"←",SmallCircle:"∘",smallsetminus:"∖",smashp:"⨳",smeparsl:"⧤",smid:"∣",smile:"⌣",smt:"⪪",smte:"⪬",smtes:"⪬︀",SOFTcy:"Ь",softcy:"ь",sol:"/",solb:"⧄",solbar:"⌿",Sopf:"𝕊",sopf:"𝕤",spades:"♠",spadesuit:"♠",spar:"∥",sqcap:"⊓",sqcaps:"⊓︀",sqcup:"⊔",sqcups:"⊔︀",Sqrt:"√",sqsub:"⊏",sqsube:"⊑",sqsubset:"⊏",sqsubseteq:"⊑",sqsup:"⊐",sqsupe:"⊒",sqsupset:"⊐",sqsupseteq:"⊒",squ:"□",Square:"□",square:"□",SquareIntersection:"⊓",SquareSubset:"⊏",SquareSubsetEqual:"⊑",SquareSuperset:"⊐",SquareSupersetEqual:"⊒",SquareUnion:"⊔",squarf:"▪",squf:"▪",srarr:"→",Sscr:"𝒮",sscr:"𝓈",ssetmn:"∖",ssmile:"⌣",sstarf:"⋆",Star:"⋆",star:"☆",starf:"★",straightepsilon:"ϵ",straightphi:"ϕ",strns:"¯",Sub:"⋐",sub:"⊂",subdot:"⪽",subE:"⫅",sube:"⊆",subedot:"⫃",submult:"⫁",subnE:"⫋",subne:"⊊",subplus:"⪿",subrarr:"⥹",Subset:"⋐",subset:"⊂",subseteq:"⊆",subseteqq:"⫅",SubsetEqual:"⊆",subsetneq:"⊊",subsetneqq:"⫋",subsim:"⫇",subsub:"⫕",subsup:"⫓",succ:"≻",succapprox:"⪸",succcurlyeq:"≽",Succeeds:"≻",SucceedsEqual:"⪰",SucceedsSlantEqual:"≽",SucceedsTilde:"≿",succeq:"⪰",succnapprox:"⪺",succneqq:"⪶",succnsim:"⋩",succsim:"≿",SuchThat:"∋",Sum:"∑",sum:"∑",sung:"♪",Sup:"⋑",sup:"⊃",sup1:"¹",sup2:"²",sup3:"³",supdot:"⪾",supdsub:"⫘",supE:"⫆",supe:"⊇",supedot:"⫄",Superset:"⊃",SupersetEqual:"⊇",suphsol:"⟉",suphsub:"⫗",suplarr:"⥻",supmult:"⫂",supnE:"⫌",supne:"⊋",supplus:"⫀",Supset:"⋑",supset:"⊃",supseteq:"⊇",supseteqq:"⫆",supsetneq:"⊋",supsetneqq:"⫌",supsim:"⫈",supsub:"⫔",supsup:"⫖",swarhk:"⤦",swArr:"⇙",swarr:"↙",swarrow:"↙",swnwar:"⤪",szlig:"ß",Tab:"\t",target:"⌖",Tau:"Τ",tau:"τ",tbrk:"⎴",Tcaron:"Ť",tcaron:"ť",Tcedil:"Ţ",tcedil:"ţ",Tcy:"Т",tcy:"т",tdot:"⃛",telrec:"⌕",Tfr:"𝔗",tfr:"𝔱",there4:"∴",Therefore:"∴",therefore:"∴",Theta:"Θ",theta:"θ",thetasym:"ϑ",thetav:"ϑ",thickapprox:"≈",thicksim:"∼",ThickSpace:" ",thinsp:" ",ThinSpace:" ",thkap:"≈",thksim:"∼",THORN:"Þ",thorn:"þ",Tilde:"∼",tilde:"˜",TildeEqual:"≃",TildeFullEqual:"≅",TildeTilde:"≈",times:"×",timesb:"⊠",timesbar:"⨱",timesd:"⨰",tint:"∭",toea:"⤨",top:"⊤",topbot:"⌶",topcir:"⫱",Topf:"𝕋",topf:"𝕥",topfork:"⫚",tosa:"⤩",tprime:"‴",TRADE:"™",trade:"™",triangle:"▵",triangledown:"▿",triangleleft:"◃",trianglelefteq:"⊴",triangleq:"≜",triangleright:"▹",trianglerighteq:"⊵",tridot:"◬",trie:"≜",triminus:"⨺",TripleDot:"⃛",triplus:"⨹",trisb:"⧍",tritime:"⨻",trpezium:"⏢",Tscr:"𝒯",tscr:"𝓉",TScy:"Ц",tscy:"ц",TSHcy:"Ћ",tshcy:"ћ",Tstrok:"Ŧ",tstrok:"ŧ",twixt:"≬",twoheadleftarrow:"↞",twoheadrightarrow:"↠",Uacute:"Ú",uacute:"ú",Uarr:"↟",uArr:"⇑",uarr:"↑",Uarrocir:"⥉",Ubrcy:"Ў",ubrcy:"ў",Ubreve:"Ŭ",ubreve:"ŭ",Ucirc:"Û",ucirc:"û",Ucy:"У",ucy:"у",udarr:"⇅",Udblac:"Ű",udblac:"ű",udhar:"⥮",ufisht:"⥾",Ufr:"𝔘",ufr:"𝔲",Ugrave:"Ù",ugrave:"ù",uHar:"⥣",uharl:"↿",uharr:"↾",uhblk:"▀",ulcorn:"⌜",ulcorner:"⌜",ulcrop:"⌏",ultri:"◸",Umacr:"Ū",umacr:"ū",uml:"¨",UnderBar:"_",UnderBrace:"⏟",UnderBracket:"⎵",UnderParenthesis:"⏝",Union:"⋃",UnionPlus:"⊎",Uogon:"Ų",uogon:"ų",Uopf:"𝕌",uopf:"𝕦",UpArrow:"↑",Uparrow:"⇑",uparrow:"↑",UpArrowBar:"⤒",UpArrowDownArrow:"⇅",UpDownArrow:"↕",Updownarrow:"⇕",updownarrow:"↕",UpEquilibrium:"⥮",upharpoonleft:"↿",upharpoonright:"↾",uplus:"⊎",UpperLeftArrow:"↖",UpperRightArrow:"↗",Upsi:"ϒ",upsi:"υ",upsih:"ϒ",Upsilon:"Υ",upsilon:"υ",UpTee:"⊥",UpTeeArrow:"↥",upuparrows:"⇈",urcorn:"⌝",urcorner:"⌝",urcrop:"⌎",Uring:"Ů",uring:"ů",urtri:"◹",Uscr:"𝒰",uscr:"𝓊",utdot:"⋰",Utilde:"Ũ",utilde:"ũ",utri:"▵",utrif:"▴",uuarr:"⇈",Uuml:"Ü",uuml:"ü",uwangle:"⦧",vangrt:"⦜",varepsilon:"ϵ",varkappa:"ϰ",varnothing:"∅",varphi:"ϕ",varpi:"ϖ",varpropto:"∝",vArr:"⇕",varr:"↕",varrho:"ϱ",varsigma:"ς",varsubsetneq:"⊊︀",varsubsetneqq:"⫋︀",varsupsetneq:"⊋︀",varsupsetneqq:"⫌︀",vartheta:"ϑ",vartriangleleft:"⊲",vartriangleright:"⊳",Vbar:"⫫",vBar:"⫨",vBarv:"⫩",Vcy:"В",vcy:"в",VDash:"⊫",Vdash:"⊩",vDash:"⊨",vdash:"⊢",Vdashl:"⫦",Vee:"⋁",vee:"∨",veebar:"⊻",veeeq:"≚",vellip:"⋮",Verbar:"‖",verbar:"|",Vert:"‖",vert:"|",VerticalBar:"∣",VerticalLine:"|",VerticalSeparator:"❘",VerticalTilde:"≀",VeryThinSpace:" ",Vfr:"𝔙",vfr:"𝔳",vltri:"⊲",vnsub:"⊂⃒",vnsup:"⊃⃒",Vopf:"𝕍",vopf:"𝕧",vprop:"∝",vrtri:"⊳",Vscr:"𝒱",vscr:"𝓋",vsubnE:"⫋︀",vsubne:"⊊︀",vsupnE:"⫌︀",vsupne:"⊋︀",Vvdash:"⊪",vzigzag:"⦚",Wcirc:"Ŵ",wcirc:"ŵ",wedbar:"⩟",Wedge:"⋀",wedge:"∧",wedgeq:"≙",weierp:"℘",Wfr:"𝔚",wfr:"𝔴",Wopf:"𝕎",wopf:"𝕨",wp:"℘",wr:"≀",wreath:"≀",Wscr:"𝒲",wscr:"𝓌",xcap:"⋂",xcirc:"◯",xcup:"⋃",xdtri:"▽",Xfr:"𝔛",xfr:"𝔵",xhArr:"⟺",xharr:"⟷",Xi:"Ξ",xi:"ξ",xlArr:"⟸",xlarr:"⟵",xmap:"⟼",xnis:"⋻",xodot:"⨀",Xopf:"𝕏",xopf:"𝕩",xoplus:"⨁",xotime:"⨂",xrArr:"⟹",xrarr:"⟶",Xscr:"𝒳",xscr:"𝓍",xsqcup:"⨆",xuplus:"⨄",xutri:"△",xvee:"⋁",xwedge:"⋀",Yacute:"Ý",yacute:"ý",YAcy:"Я",yacy:"я",Ycirc:"Ŷ",ycirc:"ŷ",Ycy:"Ы",ycy:"ы",yen:"¥",Yfr:"𝔜",yfr:"𝔶",YIcy:"Ї",yicy:"ї",Yopf:"𝕐",yopf:"𝕪",Yscr:"𝒴",yscr:"𝓎",YUcy:"Ю",yucy:"ю",Yuml:"Ÿ",yuml:"ÿ",Zacute:"Ź",zacute:"ź",Zcaron:"Ž",zcaron:"ž",Zcy:"З",zcy:"з",Zdot:"Ż",zdot:"ż",zeetrf:"ℨ",ZeroWidthSpace:"",Zeta:"Ζ",zeta:"ζ",Zfr:"ℨ",zfr:"𝔷",ZHcy:"Ж",zhcy:"ж",zigrarr:"⇝",Zopf:"ℤ",zopf:"𝕫",Zscr:"𝒵",zscr:"𝓏",zwj:"",zwnj:""}),e.entityMap=e.HTML_ENTITIES),m;var e,r}var g,N,T,b={};function w(){if(g)return b;g=1;var e=n(),r=p(),t=i(),o=e.isHTMLEscapableRawTextElement,a=e.isHTMLMimeType,s=e.isHTMLRawTextElement,l=e.hasOwn,c=e.NAMESPACE,u=t.ParseError,d=t.DOMException;function f(){}f.prototype={parse:function(t,n,o){var i=this.domBuilder;i.startDocument(),w(n,n=Object.create(null)),function(t,n,o,i,s){var c=a(i.mimeType);function p(e){var t=";"===e[e.length-1]?e:e+";";if(!c&&t!==e)return s.error("EntityRef: expecting ;"),e;var n=r.Reference.exec(t);if(!n||n[0].length!==t.length)return s.error("entity not matching Reference production: "+e),e;var a=t.slice(1,-1);return l(o,a)?o[a]:"#"===a.charAt(0)?function(e){if(e>65535){var r=55296+((e-=65536)>>10),t=56320+(1023&e);return String.fromCharCode(r,t)}return String.fromCharCode(e)}(parseInt(a.substr(1).replace("x","0x"))):(s.error("entity not found:"+e),e)}function f(e){if(e>C){var r=t.substring(C,e).replace(h,p);A&&g(C),i.characters(r,0,e-C),C=e}}function g(e,r){for(;e>=w&&(r=v.exec(t));)b=r.index,w=b+r[0].length,A.lineNumber++;A.columnNumber=e-b+1}t.indexOf(r.UNICODE_REPLACEMENT_CHARACTER)>=0&&s.warning("Unicode replacement character detected, source encoding issues?");for(var b=0,w=0,v=/.*(?:\r\n?|\n)|.*$/g,A=i.locator,I=[{currentNSMap:n}],O=[],C=0;;){try{var x=t.indexOf("<",C);if(x<0){if(!c&&O.length>0)return s.fatalError("unclosed xml tag(s): "+O.join(", "));if(!t.substring(C).match(/^\s*$/)){var _=i.doc,R=_.createTextNode(t.substr(C));if(_.documentElement)return s.error("Extra content at the end of the document");_.appendChild(R),i.currentElement=R}return}if(x>C){var L=t.substring(C,x);c||0!==O.length||(L=L.replace(new RegExp(r.S_OPT.source,"g"),""))&&s.error("Unexpected content outside root element: '"+L+"'"),f(x)}switch(t.charAt(x+1)){case"/":var M=t.indexOf(">",x+2),q=t.substring(x+2,M>0?M:void 0);if(!q)return s.fatalError("end tag name missing");var U=M>0&&r.reg("^",r.QName_group,r.S_OPT,"$").exec(q);if(!U)return s.fatalError('end tag name contains invalid characters: "'+q+'"');if(!i.currentElement&&!i.doc.documentElement)return;var P=O[O.length-1]||i.currentElement.tagName||i.doc.documentElement.tagName||"";if(P!==U[1]){var k=U[1].toLowerCase();if(!c||P.toLowerCase()!==k)return s.fatalError('Opening and ending tag mismatch: "'+P+'" != "'+q+'"')}var H=I.pop();O.pop();var V=H.localNSMap;if(i.endElement(H.uri,H.localName,P),V)for(var B in V)l(V,B)&&i.endPrefixMapping(B);M++;break;case"?":A&&g(x),M=D(t,x,i,s);break;case"!":A&&g(x),M=y(t,x,i,s,c);break;default:A&&g(x);var F=new S,G=I[I.length-1].currentNSMap,Y=(M=E(t,x,F,G,p,s,c),F.length);if(F.closed||(c&&e.isHTMLVoidElement(F.tagName)?F.closed=!0:O.push(F.tagName)),A&&Y){for(var X=m(A,{}),j=0;j<Y;j++){var z=F[j];g(z.offset),z.locator=m(A,{})}i.locator=X,N(F,i,G)&&I.push(F),i.locator=A}else N(F,i,G)&&I.push(F);c&&!F.closed?M=T(t,M,F.tagName,p,i):M++}}catch(e){if(e instanceof u)throw e;if(e instanceof d)throw new u(e.name+": "+e.message,i.locator,e);s.error("element parse error: "+e),M=-1}M>C?C=M:f(Math.max(x,C)+1)}}(t,n,o,i,this.errorHandler),i.endDocument()}};var h=/&#?\w+;?/g;function m(e,r){return r.lineNumber=e.lineNumber,r.columnNumber=e.columnNumber,r}function E(e,r,t,n,o,a,i){function s(e,r,n){return l(t.attributeNames,e)?a.fatalError("Attribute "+e+" redefined"):!i&&r.indexOf("<")>=0?a.fatalError("Unescaped '<' not allowed in attributes values"):void t.addValue(e,r.replace(/[\t\n\r]/g," ").replace(h,o),n)}for(var c,u=++r,p=0;;){var d=e.charAt(u);switch(d){case"=":if(1===p)c=e.slice(r,u),p=3;else{if(2!==p)throw new Error("attribute equal must after attrName");p=3}break;case"'":case'"':if(3===p||1===p){if(1===p&&(a.warning('attribute value must after "="'),c=e.slice(r,u)),r=u+1,!((u=e.indexOf(d,r))>0))throw new Error("attribute value no end '"+d+"' match");s(c,f=e.slice(r,u),r-1),p=5}else{if(4!=p)throw new Error('attribute value must after "="');s(c,f=e.slice(r,u),r),a.warning('attribute "'+c+'" missed start quot('+d+")!!"),r=u+1,p=5}break;case"/":switch(p){case 0:t.setTagName(e.slice(r,u));case 5:case 6:case 7:p=7,t.closed=!0;case 4:case 1:break;case 2:t.closed=!0;break;default:throw new Error("attribute invalid close char('/')")}break;case"":return a.error("unexpected end of input"),0==p&&t.setTagName(e.slice(r,u)),u;case">":switch(p){case 0:t.setTagName(e.slice(r,u));case 5:case 6:case 7:break;case 4:case 1:"/"===(f=e.slice(r,u)).slice(-1)&&(t.closed=!0,f=f.slice(0,-1));case 2:2===p&&(f=c),4==p?(a.warning('attribute "'+f+'" missed quot(")!'),s(c,f,r)):(i||a.warning('attribute "'+f+'" missed value!! "'+f+'" instead!!'),s(f,f,r));break;case 3:if(!i)return a.fatalError("AttValue: ' or \" expected")}return u;case"":d=" ";default:if(d<=" ")switch(p){case 0:t.setTagName(e.slice(r,u)),p=6;break;case 1:c=e.slice(r,u),p=2;break;case 4:var f=e.slice(r,u);a.warning('attribute "'+f+'" missed quot(")!!'),s(c,f,r);case 5:p=6}else switch(p){case 2:i||a.warning('attribute "'+c+'" missed value!! "'+c+'" instead2!!'),s(c,c,r),r=u,p=1;break;case 5:a.warning('attribute space is required"'+c+'"!!');case 6:p=1,r=u;break;case 3:p=4,r=u;break;case 7:throw new Error("elements closed character '/' and '>' must be connected to")}}u++}}function N(e,r,t){for(var n=e.tagName,o=null,a=e.length;a--;){var i=e[a],s=i.qName,u=i.value;if((h=s.indexOf(":"))>0)var p=i.prefix=s.slice(0,h),d=s.slice(h+1),f="xmlns"===p&&d;else d=s,p=null,f="xmlns"===s&&"";i.localName=d,!1!==f&&(null==o&&(o=Object.create(null),w(t,t=Object.create(null))),t[f]=o[f]=u,i.uri=c.XMLNS,r.startPrefixMapping(f,u))}for(a=e.length;a--;)(i=e[a]).prefix&&("xml"===i.prefix&&(i.uri=c.XML),"xmlns"!==i.prefix&&(i.uri=t[i.prefix]));var h;(h=n.indexOf(":"))>0?(p=e.prefix=n.slice(0,h),d=e.localName=n.slice(h+1)):(p=null,d=e.localName=n);var m=e.uri=t[p||""];if(r.startElement(m,d,n,e),!e.closed)return e.currentNSMap=t,e.localNSMap=o,!0;if(r.endElement(m,d,n),o)for(p in o)l(o,p)&&r.endPrefixMapping(p)}function T(e,r,t,n,a){var i=o(t);if(i||s(t)){var l=e.indexOf("</"+t+">",r),c=e.substring(r+1,l);return i&&(c=c.replace(h,n)),a.characters(c,0,c.length),l}return r+1}function w(e,r){for(var t in e)l(e,t)&&(r[t]=e[t])}function v(e,t){var n=t;function o(r){return r=r||0,e.charAt(n+r)}function a(e){n+=e=e||1}function i(){return e.substring(n)}return{char:o,getIndex:function(){return n},getMatch:function(e){var t=r.reg("^",e).exec(i());return t?(a(t[0].length),t[0]):null},getSource:function(){return e},skip:a,skipBlanks:function(){for(var r=0;n<e.length;){var t=o();if(" "!==t&&"\n"!==t&&"\t"!==t&&"\r"!==t)return r;r++,a()}return-1},substringFromIndex:i,substringStartsWith:function(r){return e.substring(n,n+r.length)===r},substringStartsWithCaseInsensitive:function(r){return e.substring(n,n+r.length).toUpperCase()===r.toUpperCase()}}}function y(e,t,n,o,a){var i=v(e,t);switch(a?i.char(2).toUpperCase():i.char(2)){case"-":var s=i.getMatch(r.Comment);return s?(n.comment(s,r.COMMENT_START.length,s.length-r.COMMENT_START.length-r.COMMENT_END.length),i.getIndex()):o.fatalError("comment is not well-formed at position "+i.getIndex());case"[":var l=i.getMatch(r.CDSect);return l?a||n.currentElement?(n.startCDATA(),n.characters(l,r.CDATA_START.length,l.length-r.CDATA_START.length-r.CDATA_END.length),n.endCDATA(),i.getIndex()):o.fatalError("CDATA outside of element"):o.fatalError("Invalid CDATA starting at position "+t);case"D":if(n.doc&&n.doc.documentElement)return o.fatalError("Doctype not allowed inside or after documentElement at position "+i.getIndex());if(a?!i.substringStartsWithCaseInsensitive(r.DOCTYPE_DECL_START):!i.substringStartsWith(r.DOCTYPE_DECL_START))return o.fatalError("Expected "+r.DOCTYPE_DECL_START+" at position "+i.getIndex());if(i.skip(r.DOCTYPE_DECL_START.length),i.skipBlanks()<1)return o.fatalError("Expected whitespace after "+r.DOCTYPE_DECL_START+" at position "+i.getIndex());var c={name:void 0,publicId:void 0,systemId:void 0,internalSubset:void 0};if(c.name=i.getMatch(r.Name),!c.name)return o.fatalError("doctype name missing or contains unexpected characters at position "+i.getIndex());if(a&&"html"!==c.name.toLowerCase()&&o.warning("Unexpected DOCTYPE in HTML document at position "+i.getIndex()),i.skipBlanks(),i.substringStartsWith(r.PUBLIC)||i.substringStartsWith(r.SYSTEM)){var u=r.ExternalID_match.exec(i.substringFromIndex());if(!u)return o.fatalError("doctype external id is not well-formed at position "+i.getIndex());void 0!==u.groups.SystemLiteralOnly?c.systemId=u.groups.SystemLiteralOnly:(c.systemId=u.groups.SystemLiteral,c.publicId=u.groups.PubidLiteral),i.skip(u[0].length)}else if(a&&i.substringStartsWithCaseInsensitive(r.SYSTEM)){if(i.skip(r.SYSTEM.length),i.skipBlanks()<1)return o.fatalError("Expected whitespace after "+r.SYSTEM+" at position "+i.getIndex());if(c.systemId=i.getMatch(r.ABOUT_LEGACY_COMPAT_SystemLiteral),!c.systemId)return o.fatalError("Expected "+r.ABOUT_LEGACY_COMPAT+" in single or double quotes after "+r.SYSTEM+" at position "+i.getIndex())}return a&&c.systemId&&!r.ABOUT_LEGACY_COMPAT_SystemLiteral.test(c.systemId)&&o.warning("Unexpected doctype.systemId in HTML document at position "+i.getIndex()),a||(i.skipBlanks(),c.internalSubset=function(e,t){function n(e,t){var n=r.PI.exec(e.substringFromIndex());return n?"xml"===n[1].toLowerCase()?t.fatalError("xml declaration is only allowed at the start of the document, but found at position "+e.getIndex()):(e.skip(n[0].length),n[0]):t.fatalError("processing instruction is not well-formed at position "+e.getIndex())}var o=e.getSource();if("["===e.char()){e.skip(1);for(var a=e.getIndex();e.getIndex()<o.length;){if(e.skipBlanks(),"]"===e.char()){var i=o.substring(a,e.getIndex());return e.skip(1),i}var s=null;if("<"===e.char()&&"!"===e.char(1))switch(e.char(2)){case"E":"L"===e.char(3)?s=e.getMatch(r.elementdecl):"N"===e.char(3)&&(s=e.getMatch(r.EntityDecl));break;case"A":s=e.getMatch(r.AttlistDecl);break;case"N":s=e.getMatch(r.NotationDecl);break;case"-":s=e.getMatch(r.Comment)}else if("<"===e.char()&&"?"===e.char(1))s=n(e,t);else{if("%"!==e.char())return t.fatalError("Error detected in Markup declaration");s=e.getMatch(r.PEReference)}if(!s)return t.fatalError("Error in internal subset at position "+e.getIndex())}return t.fatalError("doctype internal subset is not well-formed, missing ]")}}(i,o)),i.skipBlanks(),">"!==i.char()?o.fatalError("doctype not terminated with > at position "+i.getIndex()):(i.skip(1),n.startDTD(c.name,c.publicId,c.systemId,c.internalSubset),n.endDTD(),i.getIndex());default:return o.fatalError('Not well-formed XML starting with "<!" at position '+t)}}function D(e,t,n,o){var a=e.substring(t).match(r.PI);if(!a)return o.fatalError("Invalid processing instruction starting at position "+t);if("xml"===a[1].toLowerCase()){if(t>0)return o.fatalError("processing instruction at position "+t+" is an xml declaration which is only at the start of the document");if(!r.XMLDecl.test(e.substring(t)))return o.fatalError("xml declaration is not well-formed")}return n.processingInstruction(a[1],a[2]),t+a[0].length}function S(){this.attributeNames=Object.create(null)}return S.prototype={setTagName:function(e){if(!r.QName_exact.test(e))throw new Error("invalid tagName:"+e);this.tagName=e},addValue:function(e,t,n){if(!r.QName_exact.test(e))throw new Error("invalid attribute:"+e);this.attributeNames[e]=this.length,this[this.length++]={qName:e,value:t,offset:n}},length:0,getLocalName:function(e){return this[e].localName},getLocator:function(e){return this[e].locator},getQName:function(e){return this[e].qName},getURI:function(e){return this[e].uri},getValue:function(e){return this[e].value}},b.XMLReader=f,b.parseUtils=v,b.parseDoctypeCommentOrCData=y,b}var v=function(){if(T)return r;T=1;var e=n();r.assign=e.assign,r.hasDefaultHTMLNamespace=e.hasDefaultHTMLNamespace,r.isHTMLMimeType=e.isHTMLMimeType,r.isValidMimeType=e.isValidMimeType,r.MIME_TYPE=e.MIME_TYPE,r.NAMESPACE=e.NAMESPACE;var t=i();r.DOMException=t.DOMException,r.DOMExceptionName=t.DOMExceptionName,r.ExceptionCode=t.ExceptionCode,r.ParseError=t.ParseError;var o=d();r.Attr=o.Attr,r.CDATASection=o.CDATASection,r.CharacterData=o.CharacterData,r.Comment=o.Comment,r.Document=o.Document,r.DocumentFragment=o.DocumentFragment,r.DocumentType=o.DocumentType,r.DOMImplementation=o.DOMImplementation,r.Element=o.Element,r.Entity=o.Entity,r.EntityReference=o.EntityReference,r.LiveNodeList=o.LiveNodeList,r.NamedNodeMap=o.NamedNodeMap,r.Node=o.Node,r.NodeList=o.NodeList,r.Notation=o.Notation,r.ProcessingInstruction=o.ProcessingInstruction,r.Text=o.Text,r.XMLSerializer=o.XMLSerializer;var a=function(){if(N)return h;N=1;var e=n(),r=d(),t=i(),o=E(),a=w(),s=r.DOMImplementation,l=e.hasDefaultHTMLNamespace,c=e.isHTMLMimeType,u=e.isValidMimeType,p=e.MIME_TYPE,f=e.NAMESPACE,m=t.ParseError,g=a.XMLReader;function T(e){return e.replace(/\r[\n\u0085]/g,"\n").replace(/[\r\u0085\u2028]/g,"\n")}function b(r){if(void 0===(r=r||{}).locator&&(r.locator=!0),this.assign=r.assign||e.assign,this.domHandler=r.domHandler||v,this.onError=r.onError||r.errorHandler,r.errorHandler&&"function"!=typeof r.errorHandler)throw new TypeError("errorHandler object is no longer supported, switch to onError!");r.errorHandler&&r.errorHandler("warning","The `errorHandler` option has been deprecated, use `onError` instead!",this),this.normalizeLineEndings=r.normalizeLineEndings||T,this.locator=!!r.locator,this.xmlns=this.assign(Object.create(null),r.xmlns)}function v(e){var r=e||{};this.mimeType=r.mimeType||p.XML_APPLICATION,this.defaultNamespace=r.defaultNamespace||null,this.cdata=!1,this.currentElement=void 0,this.doc=void 0,this.locator=void 0,this.onError=r.onError}function y(e,r){r.lineNumber=e.lineNumber,r.columnNumber=e.columnNumber}function D(e,r,t){return"string"==typeof e?e.substr(r,t):e.length>=r+t||r?new java.lang.String(e,r,t)+"":e}function S(e,r){e.currentElement?e.currentElement.appendChild(r):e.doc.appendChild(r)}return b.prototype.parseFromString=function(r,t){if(!u(t))throw new TypeError('DOMParser.parseFromString: the provided mimeType "'+t+'" is not valid.');var n=this.assign(Object.create(null),this.xmlns),a=o.XML_ENTITIES,i=n[""]||null;l(t)?(a=o.HTML_ENTITIES,i=f.HTML):t===p.XML_SVG_IMAGE&&(i=f.SVG),n[""]=i,n.xml=n.xml||f.XML;var s=new this.domHandler({mimeType:t,defaultNamespace:i,onError:this.onError}),c=this.locator?{}:void 0;this.locator&&s.setDocumentLocator(c);var d=new g;return d.errorHandler=s,d.domBuilder=s,!e.isHTMLMimeType(t)&&"string"!=typeof r&&d.errorHandler.fatalError("source is not a string"),d.parse(this.normalizeLineEndings(String(r)),n,a),s.doc.documentElement||d.errorHandler.fatalError("missing root element"),s.doc},v.prototype={startDocument:function(){var e=new s;this.doc=c(this.mimeType)?e.createHTMLDocument(!1):e.createDocument(this.defaultNamespace,"")},startElement:function(e,r,t,n){var o=this.doc,a=o.createElementNS(e,t||r),i=n.length;S(this,a),this.currentElement=a,this.locator&&y(this.locator,a);for(var s=0;s<i;s++){e=n.getURI(s);var l=n.getValue(s),c=(t=n.getQName(s),o.createAttributeNS(e,t));this.locator&&y(n.getLocator(s),c),c.value=c.nodeValue=l,a.setAttributeNode(c)}},endElement:function(e,r,t){this.currentElement=this.currentElement.parentNode},startPrefixMapping:function(e,r){},endPrefixMapping:function(e){},processingInstruction:function(e,r){var t=this.doc.createProcessingInstruction(e,r);this.locator&&y(this.locator,t),S(this,t)},ignorableWhitespace:function(e,r,t){},characters:function(e,r,t){if(e=D.apply(this,arguments)){if(this.cdata)var n=this.doc.createCDATASection(e);else n=this.doc.createTextNode(e);this.currentElement?this.currentElement.appendChild(n):/^\s*$/.test(e)&&this.doc.appendChild(n),this.locator&&y(this.locator,n)}},skippedEntity:function(e){},endDocument:function(){this.doc.normalize()},setDocumentLocator:function(e){e&&(e.lineNumber=0),this.locator=e},comment:function(e,r,t){e=D.apply(this,arguments);var n=this.doc.createComment(e);this.locator&&y(this.locator,n),S(this,n)},startCDATA:function(){this.cdata=!0},endCDATA:function(){this.cdata=!1},startDTD:function(e,r,t,n){var o=this.doc.implementation;if(o&&o.createDocumentType){var a=o.createDocumentType(e,r,t,n);this.locator&&y(this.locator,a),S(this,a),this.doc.doctype=a}},reportError:function(e,r){if("function"==typeof this.onError)try{this.onError(e,r,this)}catch(t){throw new m("Reporting "+e+' "'+r+'" caused '+t,this.locator)}else console.error("[xmldom "+e+"]\t"+r,function(e){if(e)return"\n@#[line:"+e.lineNumber+",col:"+e.columnNumber+"]"}(this.locator))},warning:function(e){this.reportError("warning",e)},error:function(e){this.reportError("error",e)},fatalError:function(e){throw this.reportError("fatalError",e),new m(e,this.locator)}},"endDTD,startEntity,endEntity,attributeDecl,elementDecl,externalEntityDecl,internalEntityDecl,resolveEntity,getExternalSubset,notationDecl,unparsedEntityDecl".replace(/\w+/g,function(e){v.prototype[e]=function(){return null}}),h.__DOMHandler=v,h.DOMParser=b,h.normalizeLineEndings=T,h.onErrorStopParsing=function(e){if("error"===e)throw"onErrorStopParsing"},h.onWarningStopParsing=function(){throw"onWarningStopParsing"},h}();return r.DOMParser=a.DOMParser,r.onErrorStopParsing=a.onErrorStopParsing,r.onWarningStopParsing=a.onWarningStopParsing,r}();const y=function(e,r){for(var t=0;t<r.length;t++){const n=r[t];if("string"!=typeof n&&!Array.isArray(n))for(const r in n)if("default"!==r&&!(r in e)){const t=Object.getOwnPropertyDescriptor(n,r);t&&Object.defineProperty(e,r,t.get?t:{enumerable:!0,get:()=>n[r]})}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}({__proto__:null,default:function(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}(v)},[v]);export{y as i};
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license @sheetxl/studio-mui - Studio - Spreadsheet UI built with SheetXL SDK using React & MUI. - v0.4.12
|
|
3
|
-
*
|
|
4
|
-
* (C) 2025-present SheetXL Inc. & Michael T. Ford
|
|
5
|
-
* License: The license can be found at https://www.sheetxl.com/license.
|
|
6
|
-
*/
|
|
7
|
-
import{jsx as t}from"react/jsx-runtime";import{memo as n,useMemo as o,useState as e,useCallback as a}from"react";import{Box as i,FormControl as s,TextField as r}from"@mui/material";import{B as l,p,a as c}from"./Cc7y1nMDr5J8jWx-.mjs";import{alpha as m}from"@mui/system";const u=["Ok","Cancel"],d=n(n=>{const{initialComments:d=null,onUpdateComments:g,context:f,onOption:x,onValidateOption:h,onDone:C,options:O=u,defaultOption:y=O?.[0],cancelOption:w="Cancel",sx:F,...P}=n,T=o(()=>{const t=d??f?.()?.getComments();let n="";if(t&&t.content&&t.content.runs){const o=t.content.runs;for(let t=0;t<o.length;t++){const e=o[t];n+=e?.text}}return n},[]),[k,v]=e(T),[I,b]=e(!1),D=a(async(t,n)=>null,[]),j=l(async t=>{const n=""===k?[]:k.split("\n");if(t!==w){const t=[];for(let o=0;o<n.length;o++)t.push({text:n[o]});const o={content:{runs:t}};g?.(o)}x?.(t,t===w,t===y),C?.()},[k,g,C,x,y,w]),B=l(t=>{v(t.target.value),D(t.target.value,null)},[h]),E=l(async t=>{let n=await Promise.resolve(h?.(t));try{!1!==n&&(n=await D(k,t))}catch(t){}return n??!0},[h,k]);return t(p,{title:(T?"Edit":"Insert")+" Comments",options:O,onDone:C,onOption:t=>j(t),onValidateOption:E,defaultOption:y,cancelOption:w,autoFocusSel:".autoFocus",sx:{width:"480px",...F},...P,children:t(i,{sx:{paddingTop:t=>t.spacing(1),paddingBottom:t=>t.spacing(0),rowGap:t=>t.spacing(1),display:"flex",flexDirection:"column"},children:t(s,{sx:{paddingTop:t=>t.spacing(1.5),minWidth:135,width:"100%"},size:"small",children:t(r,{label:"Comments",placeholder:"Enter a comment.",onFocus:t=>{I||t.target?.select(),b(!0)},sx:{"& .MuiFormHelperText-root":{marginTop:t=>t.spacing(.5)}},InputLabelProps:{shrink:!0},InputProps:{inputProps:{className:"autoFocus",spellCheck:!1,autoComplete:"off",sx:{paddingTop:t=>t.spacing(1.25),paddingBottom:t=>t.spacing(.75),backgroundImage:`linear-gradient(${m("#fff",c(5))}, ${m("#fff",c(5))})`}}},value:k,onChange:B,onContextMenu:t=>{t.stopPropagation()}})})})})});export{d as CommentsDialog,d as default};
|