var bn=Object.defineProperty;var vn=(Ft,jt,Rt)=>jt in Ft?bn(Ft,jt,{enumerable:!0,configurable:!0,writable:!0,value:Rt}):Ft[jt]=Rt;var Pt=(Ft,jt,Rt)=>(vn(Ft,typeof jt!="symbol"?jt+"":jt,Rt),Rt);(function(){"use strict";function Ft(X,Z){Z=Z||{};var c=Z.pos||0,T=!!Z.keepComments,O=!!Z.keepWhitespace,y="<",p="<".charCodeAt(0),v=">",d=">".charCodeAt(0),m="-".charCodeAt(0),f="/".charCodeAt(0),h="!".charCodeAt(0),s="'".charCodeAt(0),i='"'.charCodeAt(0),e="[".charCodeAt(0),t="]".charCodeAt(0);function r(R){for(var A=[];X[c];)if(X.charCodeAt(c)==p){if(X.charCodeAt(c+1)===f){var j=c+2;c=X.indexOf(v,c);var P=X.substring(j,c);if(P.indexOf(R)==-1){var _=X.substring(0,c).split(` `);throw new Error(`Unexpected close tag Line: `+(_.length-1)+` Column: `+(_[_.length-1].length+1)+` Char: `+X[c])}return c+1&&(c+=1),A}else if(X.charCodeAt(c+1)===h){if(X.charCodeAt(c+2)==m){const M=c;for(;c!==-1&&!(X.charCodeAt(c)===d&&X.charCodeAt(c-1)==m&&X.charCodeAt(c-2)==m&&c!=-1);)c=X.indexOf(v,c+1);c===-1&&(c=X.length),T&&A.push(X.substring(M,c+1))}else if(X.charCodeAt(c+2)===e&&X.charCodeAt(c+8)===e&&X.substr(c+3,5).toLowerCase()==="cdata"){var S=X.indexOf("]]>",c);S==-1?(A.push(X.substr(c+9)),c=X.length):(A.push(X.substring(c+9,S)),c=S+3);continue}else{const M=c+1;c+=2;for(var g=!1;(X.charCodeAt(c)!==d||g===!0)&&X[c];)X.charCodeAt(c)===e?g=!0:g===!0&&X.charCodeAt(c)===t&&(g=!1),c++;A.push(X.substring(M,c))}c++;continue}var E=l();A.push(E),E.tagName[0]==="?"&&(A.push(...E.children),E.children=[])}else{var k=o();if(O)k.length>0&&A.push(k);else{var x=k.trim();x.length>0&&A.push(x)}c++}return A}function o(){var R=c;return c=X.indexOf(y,c)-1,c===-2&&(c=X.length),X.slice(R,c+1)}var n=`\r >/= `;function a(){for(var R=c;n.indexOf(X[c])===-1&&X[c];)c++;return X.slice(R,c)}var u=Z.noChildNodes||["img","br","input","meta","link","hr"];function l(){c++;const R=a(),A={};let j=[];for(;X.charCodeAt(c)!==d&&X[c];){var P=X.charCodeAt(c);if(P>64&&P<91||P>96&&P<123){for(var _=a(),S=X.charCodeAt(c);S&&S!==s&&S!==i&&!(S>64&&S<91||S>96&&S<123)&&S!==d;)c++,S=X.charCodeAt(c);if(S===s||S===i){var g=b();if(c===-1)return{tagName:R,attributes:A,children:j}}else g=null,c--;A[_]=g}c++}if(X.charCodeAt(c-1)!==f)if(R=="script"){var E=c+1;c=X.indexOf("<\/script>",c),j=[X.slice(E,c)],c+=9}else if(R=="style"){var E=c+1;c=X.indexOf("",c),j=[X.slice(E,c)],c+=8}else u.indexOf(R)===-1?(c++,j=r(R)):c++;else c++;return{tagName:R,attributes:A,children:j}}function b(){var R=X[c],A=c+1;return c=X.indexOf(R,A),X.slice(A,c)}function w(){var R=new RegExp("\\s"+Z.attrName+`\\s*=['"]`+Z.attrValue+`['"]`).exec(X);return R?R.index:-1}var C=null;if(Z.attrValue!==void 0){Z.attrName=Z.attrName||"id";for(var C=[];(c=w())!==-1;)c=X.lastIndexOf("<",c),c!==-1&&C.push(l()),X=X.substr(c),c=0}else Z.parseNode?C=l():C=r("");return Z.filter&&(C=Rt(C,Z.filter)),Z.simplify?jt(Array.isArray(C)?C:[C]):(Z.setPos&&(C.pos=c),C)}function jt(X){var Z={};if(!X.length)return"";if(X.length===1&&typeof X[0]=="string")return X[0];X.forEach(function(T){if(typeof T=="object"){Z[T.tagName]||(Z[T.tagName]=[]);var O=jt(T.children);Z[T.tagName].push(O),Object.keys(T.attributes).length&&typeof O!="string"&&(O._attributes=T.attributes)}});for(var c in Z)Z[c].length==1&&(Z[c]=Z[c][0]);return Z}function Rt(X,Z,c=0,T=""){var O=[];return X.forEach(function(y,p){if(typeof y=="object"&&Z(y,p,c,T)&&O.push(y),y.children){var v=Rt(y.children,Z,c+1,(T?T+".":"")+p+"."+y.tagName);O=O.concat(v)}}),O}function Wt(X){return Wt=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(Z){return typeof Z}:function(Z){return Z&&typeof Symbol=="function"&&Z.constructor===Symbol&&Z!==Symbol.prototype?"symbol":typeof Z},Wt(X)}var Or=/^\s+/,jr=/\s+$/;function De(X,Z){if(X=X||"",Z=Z||{},X instanceof De)return X;if(!(this instanceof De))return new De(X,Z);var c=Er(X);this._originalInput=X,this._r=c.r,this._g=c.g,this._b=c.b,this._a=c.a,this._roundA=Math.round(100*this._a)/100,this._format=Z.format||c.format,this._gradientType=Z.gradientType,this._r<1&&(this._r=Math.round(this._r)),this._g<1&&(this._g=Math.round(this._g)),this._b<1&&(this._b=Math.round(this._b)),this._ok=c.ok}De.prototype={isDark:function(){return this.getBrightness()<128},isLight:function(){return!this.isDark()},isValid:function(){return this._ok},getOriginalInput:function(){return this._originalInput},getFormat:function(){return this._format},getAlpha:function(){return this._a},getBrightness:function(){var Z=this.toRgb();return(Z.r*299+Z.g*587+Z.b*114)/1e3},getLuminance:function(){var Z=this.toRgb(),c,T,O,y,p,v;return c=Z.r/255,T=Z.g/255,O=Z.b/255,c<=.03928?y=c/12.92:y=Math.pow((c+.055)/1.055,2.4),T<=.03928?p=T/12.92:p=Math.pow((T+.055)/1.055,2.4),O<=.03928?v=O/12.92:v=Math.pow((O+.055)/1.055,2.4),.2126*y+.7152*p+.0722*v},setAlpha:function(Z){return this._a=dr(Z),this._roundA=Math.round(100*this._a)/100,this},toHsv:function(){var Z=cr(this._r,this._g,this._b);return{h:Z.h*360,s:Z.s,v:Z.v,a:this._a}},toHsvString:function(){var Z=cr(this._r,this._g,this._b),c=Math.round(Z.h*360),T=Math.round(Z.s*100),O=Math.round(Z.v*100);return this._a==1?"hsv("+c+", "+T+"%, "+O+"%)":"hsva("+c+", "+T+"%, "+O+"%, "+this._roundA+")"},toHsl:function(){var Z=ur(this._r,this._g,this._b);return{h:Z.h*360,s:Z.s,l:Z.l,a:this._a}},toHslString:function(){var Z=ur(this._r,this._g,this._b),c=Math.round(Z.h*360),T=Math.round(Z.s*100),O=Math.round(Z.l*100);return this._a==1?"hsl("+c+", "+T+"%, "+O+"%)":"hsla("+c+", "+T+"%, "+O+"%, "+this._roundA+")"},toHex:function(Z){return fr(this._r,this._g,this._b,Z)},toHexString:function(Z){return"#"+this.toHex(Z)},toHex8:function(Z){return Mr(this._r,this._g,this._b,this._a,Z)},toHex8String:function(Z){return"#"+this.toHex8(Z)},toRgb:function(){return{r:Math.round(this._r),g:Math.round(this._g),b:Math.round(this._b),a:this._a}},toRgbString:function(){return this._a==1?"rgb("+Math.round(this._r)+", "+Math.round(this._g)+", "+Math.round(this._b)+")":"rgba("+Math.round(this._r)+", "+Math.round(this._g)+", "+Math.round(this._b)+", "+this._roundA+")"},toPercentageRgb:function(){return{r:Math.round(ht(this._r,255)*100)+"%",g:Math.round(ht(this._g,255)*100)+"%",b:Math.round(ht(this._b,255)*100)+"%",a:this._a}},toPercentageRgbString:function(){return this._a==1?"rgb("+Math.round(ht(this._r,255)*100)+"%, "+Math.round(ht(this._g,255)*100)+"%, "+Math.round(ht(this._b,255)*100)+"%)":"rgba("+Math.round(ht(this._r,255)*100)+"%, "+Math.round(ht(this._g,255)*100)+"%, "+Math.round(ht(this._b,255)*100)+"%, "+this._roundA+")"},toName:function(){return this._a===0?"transparent":this._a<1?!1:Vr[fr(this._r,this._g,this._b,!0)]||!1},toFilter:function(Z){var c="#"+lr(this._r,this._g,this._b,this._a),T=c,O=this._gradientType?"GradientType = 1, ":"";if(Z){var y=De(Z);T="#"+lr(y._r,y._g,y._b,y._a)}return"progid:DXImageTransform.Microsoft.gradient("+O+"startColorstr="+c+",endColorstr="+T+")"},toString:function(Z){var c=!!Z;Z=Z||this._format;var T=!1,O=this._a<1&&this._a>=0,y=!c&&O&&(Z==="hex"||Z==="hex6"||Z==="hex3"||Z==="hex4"||Z==="hex8"||Z==="name");return y?Z==="name"&&this._a===0?this.toName():this.toRgbString():(Z==="rgb"&&(T=this.toRgbString()),Z==="prgb"&&(T=this.toPercentageRgbString()),(Z==="hex"||Z==="hex6")&&(T=this.toHexString()),Z==="hex3"&&(T=this.toHexString(!0)),Z==="hex4"&&(T=this.toHex8String(!0)),Z==="hex8"&&(T=this.toHex8String()),Z==="name"&&(T=this.toName()),Z==="hsl"&&(T=this.toHslString()),Z==="hsv"&&(T=this.toHsvString()),T||this.toHexString())},clone:function(){return De(this.toString())},_applyModification:function(Z,c){var T=Z.apply(null,[this].concat([].slice.call(c)));return this._r=T._r,this._g=T._g,this._b=T._b,this.setAlpha(T._a),this},lighten:function(){return this._applyModification(Nr,arguments)},brighten:function(){return this._applyModification(Dr,arguments)},darken:function(){return this._applyModification(Fr,arguments)},desaturate:function(){return this._applyModification(Pr,arguments)},saturate:function(){return this._applyModification(Ar,arguments)},greyscale:function(){return this._applyModification(Ir,arguments)},spin:function(){return this._applyModification(Br,arguments)},_applyCombination:function(Z,c){return Z.apply(null,[this].concat([].slice.call(c)))},analogous:function(){return this._applyCombination(Ur,arguments)},complement:function(){return this._applyCombination(Lr,arguments)},monochromatic:function(){return this._applyCombination(Hr,arguments)},splitcomplement:function(){return this._applyCombination(zr,arguments)},triad:function(){return this._applyCombination(hr,[3])},tetrad:function(){return this._applyCombination(hr,[4])}},De.fromRatio=function(X,Z){if(Wt(X)=="object"){var c={};for(var T in X)X.hasOwnProperty(T)&&(T==="a"?c[T]=X[T]:c[T]=Vt(X[T]));X=c}return De(X,Z)};function Er(X){var Z={r:0,g:0,b:0},c=1,T=null,O=null,y=null,p=!1,v=!1;return typeof X=="string"&&(X=Xr(X)),Wt(X)=="object"&&(Ct(X.r)&&Ct(X.g)&&Ct(X.b)?(Z=Rr(X.r,X.g,X.b),p=!0,v=String(X.r).substr(-1)==="%"?"prgb":"rgb"):Ct(X.h)&&Ct(X.s)&&Ct(X.v)?(T=Vt(X.s),O=Vt(X.v),Z=Tr(X.h,T,O),p=!0,v="hsv"):Ct(X.h)&&Ct(X.s)&&Ct(X.l)&&(T=Vt(X.s),y=Vt(X.l),Z=Cr(X.h,T,y),p=!0,v="hsl"),X.hasOwnProperty("a")&&(c=X.a)),c=dr(c),{ok:p,format:X.format||v,r:Math.min(255,Math.max(Z.r,0)),g:Math.min(255,Math.max(Z.g,0)),b:Math.min(255,Math.max(Z.b,0)),a:c}}function Rr(X,Z,c){return{r:ht(X,255)*255,g:ht(Z,255)*255,b:ht(c,255)*255}}function ur(X,Z,c){X=ht(X,255),Z=ht(Z,255),c=ht(c,255);var T=Math.max(X,Z,c),O=Math.min(X,Z,c),y,p,v=(T+O)/2;if(T==O)y=p=0;else{var d=T-O;switch(p=v>.5?d/(2-T-O):d/(T+O),T){case X:y=(Z-c)/d+(Z1&&(h-=1),h<1/6?m+(f-m)*6*h:h<1/2?f:h<2/3?m+(f-m)*(2/3-h)*6:m}if(Z===0)T=O=y=c;else{var v=c<.5?c*(1+Z):c+Z-c*Z,d=2*c-v;T=p(d,v,X+1/3),O=p(d,v,X),y=p(d,v,X-1/3)}return{r:T*255,g:O*255,b:y*255}}function cr(X,Z,c){X=ht(X,255),Z=ht(Z,255),c=ht(c,255);var T=Math.max(X,Z,c),O=Math.min(X,Z,c),y,p,v=T,d=T-O;if(p=T===0?0:d/T,T==O)y=0;else{switch(T){case X:y=(Z-c)/d+(Z>1)+720)%360;--Z;)T.h=(T.h+O)%360,y.push(De(T));return y}function Hr(X,Z){Z=Z||6;for(var c=De(X).toHsv(),T=c.h,O=c.s,y=c.v,p=[],v=1/Z;Z--;)p.push(De({h:T,s:O,v:y})),y=(y+v)%1;return p}De.mix=function(X,Z,c){c=c===0?0:c||50;var T=De(X).toRgb(),O=De(Z).toRgb(),y=c/100,p={r:(O.r-T.r)*y+T.r,g:(O.g-T.g)*y+T.g,b:(O.b-T.b)*y+T.b,a:(O.a-T.a)*y+T.a};return De(p)},De.readability=function(X,Z){var c=De(X),T=De(Z);return(Math.max(c.getLuminance(),T.getLuminance())+.05)/(Math.min(c.getLuminance(),T.getLuminance())+.05)},De.isReadable=function(X,Z,c){var T=De.readability(X,Z),O,y;switch(y=!1,O=Kr(c),O.level+O.size){case"AAsmall":case"AAAlarge":y=T>=4.5;break;case"AAlarge":y=T>=3;break;case"AAAsmall":y=T>=7;break}return y},De.mostReadable=function(X,Z,c){var T=null,O=0,y,p,v,d;c=c||{},p=c.includeFallbackColors,v=c.level,d=c.size;for(var m=0;mO&&(O=y,T=De(Z[m]));return De.isReadable(X,T,{level:v,size:d})||!p?T:(c.includeFallbackColors=!1,De.mostReadable(X,["#fff","#000"],c))};var rr=De.names={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"0ff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000",blanchedalmond:"ffebcd",blue:"00f",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",burntsienna:"ea7e5d",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"0ff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkgrey:"a9a9a9",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkslategrey:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dimgrey:"696969",dodgerblue:"1e90ff",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"f0f",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",grey:"808080",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgray:"d3d3d3",lightgreen:"90ee90",lightgrey:"d3d3d3",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslategray:"789",lightslategrey:"789",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"0f0",limegreen:"32cd32",linen:"faf0e6",magenta:"f0f",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370db",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"db7093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",rebeccapurple:"663399",red:"f00",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",slategrey:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",wheat:"f5deb3",white:"fff",whitesmoke:"f5f5f5",yellow:"ff0",yellowgreen:"9acd32"},Vr=De.hexNames=qr(rr);function qr(X){var Z={};for(var c in X)X.hasOwnProperty(c)&&(Z[X[c]]=c);return Z}function dr(X){return X=parseFloat(X),(isNaN(X)||X<0||X>1)&&(X=1),X}function ht(X,Z){Wr(X)&&(X="100%");var c=$r(X);return X=Math.min(Z,Math.max(0,parseFloat(X))),c&&(X=parseInt(X*Z,10)/100),Math.abs(X-Z)<1e-6?1:X%Z/parseFloat(Z)}function $t(X){return Math.min(1,Math.max(0,X))}function _t(X){return parseInt(X,16)}function Wr(X){return typeof X=="string"&&X.indexOf(".")!=-1&&parseFloat(X)===1}function $r(X){return typeof X=="string"&&X.indexOf("%")!=-1}function xt(X){return X.length==1?"0"+X:""+X}function Vt(X){return X<=1&&(X=X*100+"%"),X}function pr(X){return Math.round(parseFloat(X)*255).toString(16)}function mr(X){return _t(X)/255}var St=function(){var X="[-\\+]?\\d+%?",Z="[-\\+]?\\d*\\.\\d+%?",c="(?:"+Z+")|(?:"+X+")",T="[\\s|\\(]+("+c+")[,|\\s]+("+c+")[,|\\s]+("+c+")\\s*\\)?",O="[\\s|\\(]+("+c+")[,|\\s]+("+c+")[,|\\s]+("+c+")[,|\\s]+("+c+")\\s*\\)?";return{CSS_UNIT:new RegExp(c),rgb:new RegExp("rgb"+T),rgba:new RegExp("rgba"+O),hsl:new RegExp("hsl"+T),hsla:new RegExp("hsla"+O),hsv:new RegExp("hsv"+T),hsva:new RegExp("hsva"+O),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/}}();function Ct(X){return!!St.CSS_UNIT.exec(X)}function Xr(X){X=X.replace(Or,"").replace(jr,"").toLowerCase();var Z=!1;if(rr[X])X=rr[X],Z=!0;else if(X=="transparent")return{r:0,g:0,b:0,a:0,format:"name"};var c;return(c=St.rgb.exec(X))?{r:c[1],g:c[2],b:c[3]}:(c=St.rgba.exec(X))?{r:c[1],g:c[2],b:c[3],a:c[4]}:(c=St.hsl.exec(X))?{h:c[1],s:c[2],l:c[3]}:(c=St.hsla.exec(X))?{h:c[1],s:c[2],l:c[3],a:c[4]}:(c=St.hsv.exec(X))?{h:c[1],s:c[2],v:c[3]}:(c=St.hsva.exec(X))?{h:c[1],s:c[2],v:c[3],a:c[4]}:(c=St.hex8.exec(X))?{r:_t(c[1]),g:_t(c[2]),b:_t(c[3]),a:mr(c[4]),format:Z?"name":"hex8"}:(c=St.hex6.exec(X))?{r:_t(c[1]),g:_t(c[2]),b:_t(c[3]),format:Z?"name":"hex"}:(c=St.hex4.exec(X))?{r:_t(c[1]+""+c[1]),g:_t(c[2]+""+c[2]),b:_t(c[3]+""+c[3]),a:mr(c[4]+""+c[4]),format:Z?"name":"hex8"}:(c=St.hex3.exec(X))?{r:_t(c[1]+""+c[1]),g:_t(c[2]+""+c[2]),b:_t(c[3]+""+c[3]),format:Z?"name":"hex"}:!1}function Kr(X){var Z,c;return X=X||{level:"AA",size:"small"},Z=(X.level||"AA").toUpperCase(),c=(X.size||"small").toLowerCase(),Z!=="AA"&&Z!=="AAA"&&(Z="AA"),c!=="small"&&c!=="large"&&(c="small"),{level:Z,size:c}}const Zr=["FF000000","FFFFFFFF","FFFF0000","FF00FF00","FF0000FF","FFFFFF00","FFFF00FF","FF00FFFF","FF000000","FFFFFFFF","FFFF0000","FF00FF00","FF0000FF","FFFFFF00","FFFF00FF","FF00FFFF","FF800000","FF008000","FF000080","FF808000","FF800080","FF008080","FFC0C0C0","FF808080","FF9999FF","FF993366","FFFFFFCC","FFCCFFFF","FF660066","FFFF8080","FF0066CC","FFCCCCFF","FF000080","FFFF00FF","FFFFFF00","FF00FFFF","FF800080","FF800000","FF008080","FF0000FF","FF00CCFF","FFCCFFFF","FFCCFFCC","FFFFFF99","FF99CCFF","FFFF99CC","FFCC99FF","FFFFCC99","FF3366FF","FF33CCCC","FF99CC00","FFFFCC00","FFFF9900","FFFF6600","FF666699","FF969696","FF003366","FF339966","FF003300","FF333300","FF993300","FF993366","FF333399","FF333333"],At=240,nr=255;function Yr(X,Z,c){const T=Math.max(X,Z,c),O=Math.min(X,Z,c),y=T+O,p=T-O,v=y/2;let d,m;if(O==T)return[0,v,0];v<=.5?m=p/y:m=p/(2-y);const f=(T-X)/p,h=(T-Z)/p,s=(T-c)/p;return X==T?d=s-h:Z===T?d=2+f-s:d=4+h-f,d=d/6%1,[d,v,m]}function Gr(X){X.length>6&&(X=X.substring(2));const Z=parseInt(X.slice(0,2),16)/nr,c=parseInt(X.slice(2,4),16)/nr,T=parseInt(X.slice(4,6),16)/nr,[O,y,p]=Yr(Z,c,T);return[Math.round(O*At),Math.round(y*At),Math.round(p*At)]}function Jr(X,Z,c){return De({h:X/At*360,s:c/At,l:Z/At}).toHex().toUpperCase()}function Qr(X,Z){return X<=0?Math.round(Z*(1+X)):Math.round(Z*(1-X)+(At-At*(1-X)))}function en(X,Z){if(!X)return X;const[c,T,O]=Gr(X);return`FF${Jr(c,Qr(Z,T),O)}`}function tn(X){const Z=X.values;return Array.isArray(Z)?(Z.shift(),Z):Object.keys(Z).map(c=>Z[c])}function yr(X){if(X){if(X instanceof Date)return X.toLocaleDateString();if(typeof X=="object"){if("text"in X)return X.text;if("richText"in X)return X.richText.map(Z=>Z.text).join("");if("formula"in X||"sharedFormula"in X)return yr(X.result);if("error"in X)return""}return String(X)}return""}function ir(X,Z){if(X){const{theme:c,argb:T,indexed:O,tint:y}=X;let p;if(typeof c<"u"?(p=Z[c],y&&(p=en(p,y))):T?p=T:O&&(p=O&&Zr[O]),p)return p.length>6?`#${rn(p)}`:`#${p}`}}function rn(X){return X.substring(2)+X.substring(0,2)}function br({horizontal:X,vertical:Z}){return[X,Z].filter(c=>c).map(c=>{const T=c??"";return`ht${T.charAt(0).toUpperCase()}${T.slice(1)}`}).join(" ")}function nn(X,Z){for(const c of X)for(let T=0;Tc!==0?vr(Z):Z).join("")}const an=["lt1","dk1","lt2","dk2","accent1","accent2","accent3","accent4","accent5","accent6"];let gr=[],wr,_r=[];const Tt={set themeColors(X){gr=an.map(Z=>X[Z])},get themeColors(){return gr},get workbook(){return wr},set workbook(X){wr=X},get sheets(){return _r},set sheets(X){_r=X}},sn=["left","right","top","bottom"],un=(X,Z)=>`${X}-${Z}`,cn=X=>{const{style:{border:Z,fill:c,font:T}}=X,O={},y=Tt.themeColors;if(T&&(T.bold&&(O.fontWeight="bold"),T.size&&(O.fontSize=`${T.size}px`),T.color&&(O.color=ir(T.color,y))),c&&("bgColor"in c&&c.bgColor&&(O.backgroundColor=ir(c.bgColor,y)),"fgColor"in c&&!O.backgroundColor&&(O.backgroundColor=ir(c.fgColor,y))),Z&&sn.map(p=>({key:p,value:Z[p]})).filter(p=>p.value).forEach(p=>{const{key:v,value:d}=p,m=`border${vr(v)}`;(d==null?void 0:d.style)==="thin"?O[`${m}Width`]="0.5px":O[`${m}Width`]="1px",O[`${m}Style`]="solid",O[`${m}Color`]="#000"}),"css"in X){const{css:p}=X;Object.keys(p).forEach(v=>{const d=on(v);O[d]=p[v]})}return O};class or{constructor(Z){Pt(this,"_ws");Pt(this,"_defaults");Pt(this,"_data");Pt(this,"_cell");Pt(this,"_merge");Pt(this,"_rowHeights");Pt(this,"_colWidths");Pt(this,"_columns");this._ws=Z}static create(Z){return new or(Z)}get ws(){return this._ws}get defaults(){return this._defaults??(this._defaults=this.getDefaults())}get data(){return this._data??(this._data=this.getData())}get cell(){return this._cell??(this._cell=this.getCell())}get merge(){return this._merge??(this._merge=this.getMerge())}get rowHeights(){return this._rowHeights??(this._rowHeights=this.getRowHeights())}get colWidths(){return this._colWidths??(this._colWidths=this.getColWidths())}get columns(){return this._columns??(this._columns=this.getColumns())}getDefaults(){const Z=this.ws.properties;return{rowHeight:(Z==null?void 0:Z.defaultRowHeight)||20,colWidth:((Z==null?void 0:Z.defaultColWidth)||10)*7}}getData(){var T;const Z=this.ws,c=((T=Z.getRows(1,Z.actualRowCount))==null?void 0:T.map(O=>{var y;return(y=tn(O))==null?void 0:y.map(yr)}))||[[]];return nn(c,this.columns.length||0)}getCell(){var c;const Z=this.ws;return(c=Z.getRows(1,Z.actualRowCount))==null?void 0:c.reduce((T,O,y)=>{var v;return(v=(O.model||{cells:[]}).cells)==null||v.filter(d=>d&&d.style).forEach((d,m)=>{const{alignment:f}=d.style;T[un(y,m)]={...f?{className:br(f)}:{},style:cn(d)}}),T},{})}getMerge(){const Z=this.ws,{_merges:c}=Z;return Object.values(c).map(T=>{const{top:O,left:y,bottom:p,right:v}=T;return{row:O-1,col:y-1,rowspan:p-O+1,colspan:v-y+1}})}getRowHeights(){const{rowHeight:Z}=this.defaults,c=this.ws,T=c.getRows(1,c.actualRowCount),O=(T==null?void 0:T.map(y=>y.height||Z))||[];return O.length===1?O[0]:O.length?O:Z}getColWidths(){const{colWidth:Z}=this.defaults,c=this.ws.columns.map(T=>T.width?T.width*7:Z);return c.length===1?c[0]:c.length?c:Z}getColumns(){return this.ws.columns.map(Z=>({key:Z.number??0,title:Z.letter??"",editor:!1,className:br(Z.alignment||{}),renderer:"styleRender"}))}toObject(){const{defaults:Z,data:c,cell:T,merge:O,rowHeights:y,colWidths:p,columns:v}=this;return{defaults:Z,data:c,cell:T,merge:O,rowHeights:y,colWidths:p,columns:v}}}var et=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function fn(X){return X&&X.__esModule&&Object.prototype.hasOwnProperty.call(X,"default")?X.default:X}function Xt(X){throw new Error('Could not dynamically require "'+X+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var ar={},ln={get exports(){return ar},set exports(X){ar=X}};/*! ExcelJS 21-08-2021 */(function(X,Z){(function(c){X.exports=c()})(function(){return function c(T,O,y){function p(m,f){if(!O[m]){if(!T[m]){var h=typeof Xt=="function"&&Xt;if(!f&&h)return h(m,!0);if(v)return v(m,!0);var s=new Error("Cannot find module '"+m+"'");throw s.code="MODULE_NOT_FOUND",s}var i=O[m]={exports:{}};T[m][0].call(i.exports,function(e){return p(T[m][1][e]||e)},i,i.exports,c,T,O,y)}return O[m].exports}for(var v=typeof Xt=="function"&&Xt,d=0;d2&&arguments[2]!==void 0?arguments[2]:0;if(y(this,m),e)if(typeof e=="string"){var r=v.decodeAddress(e);this.nativeCol=r.col+t,this.nativeColOff=0,this.nativeRow=r.row+t,this.nativeRowOff=0}else e.nativeCol!==void 0?(this.nativeCol=e.nativeCol||0,this.nativeColOff=e.nativeColOff||0,this.nativeRow=e.nativeRow||0,this.nativeRowOff=e.nativeRowOff||0):e.col!==void 0?(this.col=e.col+t,this.row=e.row+t):(this.nativeCol=0,this.nativeColOff=0,this.nativeRow=0,this.nativeRowOff=0);else this.nativeCol=0,this.nativeColOff=0,this.nativeRow=0,this.nativeRowOff=0;this.worksheet=i}var f,h,s;return f=m,s=[{key:"asInstance",value:function(i){return i instanceof m||i==null?i:new m(i)}}],(h=[{key:"col",get:function(){return this.nativeCol+Math.min(this.colWidth-1,this.nativeColOff)/this.colWidth},set:function(i){this.nativeCol=Math.floor(i),this.nativeColOff=Math.floor((i-this.nativeCol)*this.colWidth)}},{key:"row",get:function(){return this.nativeRow+Math.min(this.rowHeight-1,this.nativeRowOff)/this.rowHeight},set:function(i){this.nativeRow=Math.floor(i),this.nativeRowOff=Math.floor((i-this.nativeRow)*this.rowHeight)}},{key:"colWidth",get:function(){return this.worksheet&&this.worksheet.getColumn(this.nativeCol+1)&&this.worksheet.getColumn(this.nativeCol+1).isCustomWidth?Math.floor(1e4*this.worksheet.getColumn(this.nativeCol+1).width):64e4}},{key:"rowHeight",get:function(){return this.worksheet&&this.worksheet.getRow(this.nativeRow+1)&&this.worksheet.getRow(this.nativeRow+1).height?Math.floor(1e4*this.worksheet.getRow(this.nativeRow+1).height):18e4}},{key:"model",get:function(){return{nativeCol:this.nativeCol,nativeColOff:this.nativeColOff,nativeRow:this.nativeRow,nativeRowOff:this.nativeRowOff}},set:function(i){this.nativeCol=i.nativeCol,this.nativeColOff=i.nativeColOff,this.nativeRow=i.nativeRow,this.nativeRowOff=i.nativeRowOff}}])&&p(f.prototype,h),s&&p(f,s),m}();T.exports=d},{"../utils/col-cache":19}],3:[function(c,T,O){function y(j,P){if(!(j instanceof P))throw new TypeError("Cannot call a class as a function")}function p(j,P){for(var _=0;_0||this.type===j.Types.Merge}},{key:"master",get:function(){return this.type===j.Types.Merge?this._value.master:this}},{key:"isHyperlink",get:function(){return this._value.type===j.Types.Hyperlink}},{key:"hyperlink",get:function(){return this._value.hyperlink}},{key:"value",get:function(){return this._value.value},set:function(P){this.type!==j.Types.Merge?(this._value.release(),this._value=A.create(A.getType(P),this,P)):this._value.master.value=P}},{key:"note",get:function(){return this._comment&&this._comment.note},set:function(P){this._comment=new s(P)}},{key:"text",get:function(){return this._value.toString()}},{key:"html",get:function(){return m.escapeHtml(this.text)}},{key:"formula",get:function(){return this._value.formula}},{key:"result",get:function(){return this._value.result}},{key:"formulaType",get:function(){return this._value.formulaType}},{key:"fullAddress",get:function(){return{sheetName:this._row.worksheet.name,address:this.address,row:this.row,col:this.col}}},{key:"name",get:function(){return this.names[0]},set:function(P){this.names=[P]}},{key:"names",get:function(){return this.workbook.definedNames.getNamesEx(this.fullAddress)},set:function(P){var _=this,S=this.workbook.definedNames;S.removeAllNames(this.fullAddress),P.forEach(function(g){S.addEx(_.fullAddress,g)})}},{key:"_dataValidations",get:function(){return this.worksheet.dataValidations}},{key:"dataValidation",get:function(){return this._dataValidations.find(this.address)},set:function(P){this._dataValidations.add(this.address,P)}},{key:"model",get:function(){var P=this._value.model;return P.style=this.style,this._comment&&(P.comment=this._comment.model),P},set:function(P){if(this._value.release(),this._value=A.create(P.type,this),this._value.model=P,P.comment)switch(P.comment.type){case"note":this._comment=s.fromModel(P.comment)}P.style?this.style=P.style:this.style={}}}]),j}();i.Types=f.ValueType;var e=function(){function j(P){y(this,j),this.model={address:P.address,type:i.Types.Null}}return v(j,[{key:"toCsvString",value:function(){return""}},{key:"release",value:function(){}},{key:"toString",value:function(){return""}},{key:"value",get:function(){return null},set:function(P){}},{key:"type",get:function(){return i.Types.Null}},{key:"effectiveType",get:function(){return i.Types.Null}},{key:"address",get:function(){return this.model.address},set:function(P){this.model.address=P}}]),j}(),t=function(){function j(P,_){y(this,j),this.model={address:P.address,type:i.Types.Number,value:_}}return v(j,[{key:"toCsvString",value:function(){return this.model.value.toString()}},{key:"release",value:function(){}},{key:"toString",value:function(){return this.model.value.toString()}},{key:"value",get:function(){return this.model.value},set:function(P){this.model.value=P}},{key:"type",get:function(){return i.Types.Number}},{key:"effectiveType",get:function(){return i.Types.Number}},{key:"address",get:function(){return this.model.address},set:function(P){this.model.address=P}}]),j}(),r=function(){function j(P,_){y(this,j),this.model={address:P.address,type:i.Types.String,value:_}}return v(j,[{key:"toCsvString",value:function(){return'"'.concat(this.model.value.replace(/"/g,'""'),'"')}},{key:"release",value:function(){}},{key:"toString",value:function(){return this.model.value}},{key:"value",get:function(){return this.model.value},set:function(P){this.model.value=P}},{key:"type",get:function(){return i.Types.String}},{key:"effectiveType",get:function(){return i.Types.String}},{key:"address",get:function(){return this.model.address},set:function(P){this.model.address=P}}]),j}(),o=function(){function j(P,_){y(this,j),this.model={address:P.address,type:i.Types.String,value:_}}return v(j,[{key:"toString",value:function(){return this.model.value.richText.map(function(P){return P.text}).join("")}},{key:"toCsvString",value:function(){return'"'.concat(this.text.replace(/"/g,'""'),'"')}},{key:"release",value:function(){}},{key:"value",get:function(){return this.model.value},set:function(P){this.model.value=P}},{key:"type",get:function(){return i.Types.RichText}},{key:"effectiveType",get:function(){return i.Types.RichText}},{key:"address",get:function(){return this.model.address},set:function(P){this.model.address=P}}]),j}(),n=function(){function j(P,_){y(this,j),this.model={address:P.address,type:i.Types.Date,value:_}}return v(j,[{key:"toCsvString",value:function(){return this.model.value.toISOString()}},{key:"release",value:function(){}},{key:"toString",value:function(){return this.model.value.toString()}},{key:"value",get:function(){return this.model.value},set:function(P){this.model.value=P}},{key:"type",get:function(){return i.Types.Date}},{key:"effectiveType",get:function(){return i.Types.Date}},{key:"address",get:function(){return this.model.address},set:function(P){this.model.address=P}}]),j}(),a=function(){function j(P,_){y(this,j),this.model={address:P.address,type:i.Types.Hyperlink,text:_?_.text:void 0,hyperlink:_?_.hyperlink:void 0},_&&_.tooltip&&(this.model.tooltip=_.tooltip)}return v(j,[{key:"toCsvString",value:function(){return this.model.hyperlink}},{key:"release",value:function(){}},{key:"toString",value:function(){return this.model.text}},{key:"value",get:function(){var P={text:this.model.text,hyperlink:this.model.hyperlink};return this.model.tooltip&&(P.tooltip=this.model.tooltip),P},set:function(P){this.model={text:P.text,hyperlink:P.hyperlink},P.tooltip&&(this.model.tooltip=P.tooltip)}},{key:"text",get:function(){return this.model.text},set:function(P){this.model.text=P}},{key:"hyperlink",get:function(){return this.model.hyperlink},set:function(P){this.model.hyperlink=P}},{key:"type",get:function(){return i.Types.Hyperlink}},{key:"effectiveType",get:function(){return i.Types.Hyperlink}},{key:"address",get:function(){return this.model.address},set:function(P){this.model.address=P}}]),j}(),u=function(){function j(P,_){y(this,j),this.model={address:P.address,type:i.Types.Merge,master:_?_.address:void 0},this._master=_,_&&_.addMergeRef()}return v(j,[{key:"isMergedTo",value:function(P){return P===this._master}},{key:"toCsvString",value:function(){return""}},{key:"release",value:function(){this._master.releaseMergeRef()}},{key:"toString",value:function(){return this.value.toString()}},{key:"value",get:function(){return this._master.value},set:function(P){P instanceof i?(this._master&&this._master.releaseMergeRef(),P.addMergeRef(),this._master=P):this._master.value=P}},{key:"master",get:function(){return this._master}},{key:"type",get:function(){return i.Types.Merge}},{key:"effectiveType",get:function(){return this._master.effectiveType}},{key:"address",get:function(){return this.model.address},set:function(P){this.model.address=P}}]),j}(),l=function(){function j(P,_){y(this,j),this.cell=P,this.model={address:P.address,type:i.Types.Formula,shareType:_?_.shareType:void 0,ref:_?_.ref:void 0,formula:_?_.formula:void 0,sharedFormula:_?_.sharedFormula:void 0,result:_?_.result:void 0}}return v(j,[{key:"_copyModel",value:function(P){var _={},S=function(g){var E=P[g];E&&(_[g]=E)};return S("formula"),S("result"),S("ref"),S("shareType"),S("sharedFormula"),_}},{key:"validate",value:function(P){switch(A.getType(P)){case i.Types.Null:case i.Types.String:case i.Types.Number:case i.Types.Date:break;case i.Types.Hyperlink:case i.Types.Formula:default:throw new Error("Cannot process that type of result value")}}},{key:"_getTranslatedFormula",value:function(){if(!this._translatedFormula&&this.model.sharedFormula){var P=this.cell.worksheet.findCell(this.model.sharedFormula);this._translatedFormula=P&&h(P.formula,P.address,this.model.address)}return this._translatedFormula}},{key:"toCsvString",value:function(){return"".concat(this.model.result||"")}},{key:"release",value:function(){}},{key:"toString",value:function(){return this.model.result?this.model.result.toString():""}},{key:"value",get:function(){return this._copyModel(this.model)},set:function(P){this.model=this._copyModel(P)}},{key:"dependencies",get:function(){return{ranges:this.formula.match(/([a-zA-Z0-9]+!)?[A-Z]{1,3}\d{1,4}:[A-Z]{1,3}\d{1,4}/g),cells:this.formula.replace(/([a-zA-Z0-9]+!)?[A-Z]{1,3}\d{1,4}:[A-Z]{1,3}\d{1,4}/g,"").match(/([a-zA-Z0-9]+!)?[A-Z]{1,3}\d{1,4}/g)}}},{key:"formula",get:function(){return this.model.formula||this._getTranslatedFormula()},set:function(P){this.model.formula=P}},{key:"formulaType",get:function(){return this.model.formula?f.FormulaType.Master:this.model.sharedFormula?f.FormulaType.Shared:f.FormulaType.None}},{key:"result",get:function(){return this.model.result},set:function(P){this.model.result=P}},{key:"type",get:function(){return i.Types.Formula}},{key:"effectiveType",get:function(){var P=this.model.result;return P==null?f.ValueType.Null:P instanceof String||typeof P=="string"?f.ValueType.String:typeof P=="number"?f.ValueType.Number:P instanceof Date?f.ValueType.Date:P.text&&P.hyperlink?f.ValueType.Hyperlink:P.formula?f.ValueType.Formula:f.ValueType.Null}},{key:"address",get:function(){return this.model.address},set:function(P){this.model.address=P}}]),j}(),b=function(){function j(P,_){y(this,j),this.model={address:P.address,type:i.Types.SharedString,value:_}}return v(j,[{key:"toCsvString",value:function(){return this.model.value.toString()}},{key:"release",value:function(){}},{key:"toString",value:function(){return this.model.value.toString()}},{key:"value",get:function(){return this.model.value},set:function(P){this.model.value=P}},{key:"type",get:function(){return i.Types.SharedString}},{key:"effectiveType",get:function(){return i.Types.SharedString}},{key:"address",get:function(){return this.model.address},set:function(P){this.model.address=P}}]),j}(),w=function(){function j(P,_){y(this,j),this.model={address:P.address,type:i.Types.Boolean,value:_}}return v(j,[{key:"toCsvString",value:function(){return this.model.value?1:0}},{key:"release",value:function(){}},{key:"toString",value:function(){return this.model.value.toString()}},{key:"value",get:function(){return this.model.value},set:function(P){this.model.value=P}},{key:"type",get:function(){return i.Types.Boolean}},{key:"effectiveType",get:function(){return i.Types.Boolean}},{key:"address",get:function(){return this.model.address},set:function(P){this.model.address=P}}]),j}(),C=function(){function j(P,_){y(this,j),this.model={address:P.address,type:i.Types.Error,value:_}}return v(j,[{key:"toCsvString",value:function(){return this.toString()}},{key:"release",value:function(){}},{key:"toString",value:function(){return this.model.value.error.toString()}},{key:"value",get:function(){return this.model.value},set:function(P){this.model.value=P}},{key:"type",get:function(){return i.Types.Error}},{key:"effectiveType",get:function(){return i.Types.Error}},{key:"address",get:function(){return this.model.address},set:function(P){this.model.address=P}}]),j}(),R=function(){function j(P,_){y(this,j),this.model={address:P.address,type:i.Types.String,value:JSON.stringify(_),rawValue:_}}return v(j,[{key:"toCsvString",value:function(){return this.model.value}},{key:"release",value:function(){}},{key:"toString",value:function(){return this.model.value}},{key:"value",get:function(){return this.model.rawValue},set:function(P){this.model.rawValue=P,this.model.value=JSON.stringify(P)}},{key:"type",get:function(){return i.Types.String}},{key:"effectiveType",get:function(){return i.Types.String}},{key:"address",get:function(){return this.model.address},set:function(P){this.model.address=P}}]),j}(),A={getType:function(j){return j==null?i.Types.Null:j instanceof String||typeof j=="string"?i.Types.String:typeof j=="number"?i.Types.Number:typeof j=="boolean"?i.Types.Boolean:j instanceof Date?i.Types.Date:j.text&&j.hyperlink?i.Types.Hyperlink:j.formula||j.sharedFormula?i.Types.Formula:j.richText?i.Types.RichText:j.sharedString?i.Types.SharedString:j.error?i.Types.Error:i.Types.JSON},types:[{t:i.Types.Null,f:e},{t:i.Types.Number,f:t},{t:i.Types.String,f:r},{t:i.Types.Date,f:n},{t:i.Types.Hyperlink,f:a},{t:i.Types.Formula,f:l},{t:i.Types.Merge,f:u},{t:i.Types.JSON,f:R},{t:i.Types.SharedString,f:b},{t:i.Types.RichText,f:o},{t:i.Types.Boolean,f:w},{t:i.Types.Error,f:C}].reduce(function(j,P){return j[P.t]=P.f,j},[]),create:function(j,P,_){var S=this.types[j];if(!S)throw new Error("Could not create Value of type ".concat(j));return new S(P,_)}};T.exports=i},{"../utils/col-cache":19,"../utils/shared-formula":22,"../utils/under-dash":25,"./enums":7,"./note":9}],4:[function(c,T,O){function y(f,h){for(var s=0;s=this._worksheet.properties.outlineLevelCol)}},{key:"isDefault",get:function(){if(this.isCustomWidth||this.hidden||this.outlineLevel)return!1;var e=this.style;return!e||!(e.font||e.numFmt||e.alignment||e.border||e.fill||e.protection)}},{key:"headerCount",get:function(){return this.headers.length}},{key:"values",get:function(){var e=[];return this.eachCell(function(t,r){t&&t.type!==v.ValueType.Null&&(e[r]=t.value)}),e},set:function(e){var t=this;if(e){var r=this.number,o=0;e.hasOwnProperty("0")&&(o=1),e.forEach(function(n,a){t._worksheet.getCell(a+o,r).value=n})}}},{key:"numFmt",get:function(){return this.style.numFmt},set:function(e){this._applyStyle("numFmt",e)}},{key:"font",get:function(){return this.style.font},set:function(e){this._applyStyle("font",e)}},{key:"alignment",get:function(){return this.style.alignment},set:function(e){this._applyStyle("alignment",e)}},{key:"protection",get:function(){return this.style.protection},set:function(e){this._applyStyle("protection",e)}},{key:"border",get:function(){return this.style.border},set:function(e){this._applyStyle("border",e)}},{key:"fill",get:function(){return this.style.fill},set:function(e){this._applyStyle("fill",e)}}])&&y(h.prototype,s),i&&y(h,i),f}();T.exports=m},{"../utils/col-cache":19,"../utils/under-dash":25,"./enums":7}],5:[function(c,T,O){function y(v,d){for(var m=0;mthis.bottom)&&(this.bottom=e),(!this.model.right||t>this.right)&&(this.right=t)}},{key:"expandRow",value:function(s){if(s){var i=s.dimensions,e=s.number;i&&this.expand(e,i.min,e,i.max)}}},{key:"expandToAddress",value:function(s){var i=v.decodeEx(s);this.expand(i.row,i.col,i.row,i.col)}},{key:"toString",value:function(){return this.range}},{key:"intersects",value:function(s){return!(s.sheetName&&this.sheetName&&s.sheetName!==this.sheetName||s.bottomthis.bottom||s.rightthis.right)}},{key:"contains",value:function(s){var i=v.decodeEx(s);return this.containsEx(i)}},{key:"containsEx",value:function(s){return(!s.sheetName||!this.sheetName||s.sheetName===this.sheetName)&&s.row>=this.top&&s.row<=this.bottom&&s.col>=this.left&&s.col<=this.right}},{key:"forEachAddress",value:function(s){for(var i=this.left;i<=this.right;i++)for(var e=this.top;e<=this.bottom;e++)s(v.encodeAddress(e,i),e,i)}},{key:"top",get:function(){return this.model.top||1},set:function(s){this.model.top=s}},{key:"left",get:function(){return this.model.left||1},set:function(s){this.model.left=s}},{key:"bottom",get:function(){return this.model.bottom||1},set:function(s){this.model.bottom=s}},{key:"right",get:function(){return this.model.right||1},set:function(s){this.model.right=s}},{key:"sheetName",get:function(){return this.model.sheetName},set:function(s){this.model.sheetName=s}},{key:"_serialisedSheetName",get:function(){var s=this.model.sheetName;return s?/^[a-zA-Z0-9]*$/.test(s)?"".concat(s,"!"):"'".concat(s,"'!"):""}},{key:"tl",get:function(){return v.n2l(this.left)+this.top}},{key:"$t$l",get:function(){return"$".concat(v.n2l(this.left),"$").concat(this.top)}},{key:"br",get:function(){return v.n2l(this.right)+this.bottom}},{key:"$b$r",get:function(){return"$".concat(v.n2l(this.right),"$").concat(this.bottom)}},{key:"range",get:function(){return"".concat(this._serialisedSheetName+this.tl,":").concat(this.br)}},{key:"$range",get:function(){return"".concat(this._serialisedSheetName+this.$t$l,":").concat(this.$b$r)}},{key:"shortRange",get:function(){return this.count>1?this.range:this._serialisedSheetName+this.tl}},{key:"$shortRange",get:function(){return this.count>1?this.$range:this._serialisedSheetName+this.$t$l}},{key:"count",get:function(){return(1+this.bottom-this.top)*(1+this.right-this.left)}}])&&p(f.prototype,h),m}();T.exports=d},{"../utils/col-cache":19}],11:[function(c,T,O){function y(h,s){for(var i=0;i2?o-2:0),a=2;a0)for(u=C;u>=r;u--)(l=this._cells[u-1])?((b=this.getCell(u+w)).value=l.value,b.style=l.style,b._comment=l._comment):this._cells[u+w-1]=void 0;for(u=0;ur.col)&&(e=r.col),t0?{min:e,max:t}:null}},{key:"numFmt",get:function(){return this.style.numFmt},set:function(e){this._applyStyle("numFmt",e)}},{key:"font",get:function(){return this.style.font},set:function(e){this._applyStyle("font",e)}},{key:"alignment",get:function(){return this.style.alignment},set:function(e){this._applyStyle("alignment",e)}},{key:"protection",get:function(){return this.style.protection},set:function(e){this._applyStyle("protection",e)}},{key:"border",get:function(){return this.style.border},set:function(e){this._applyStyle("border",e)}},{key:"fill",get:function(){return this.style.fill},set:function(e){this._applyStyle("fill",e)}},{key:"hidden",get:function(){return!!this._hidden},set:function(e){this._hidden=e}},{key:"outlineLevel",get:function(){return this._outlineLevel||0},set:function(e){this._outlineLevel=e}},{key:"collapsed",get:function(){return!!(this._outlineLevel&&this._outlineLevel>=this._worksheet.properties.outlineLevelRow)}},{key:"model",get:function(){var e=[],t=0,r=0;return this._cells.forEach(function(o){if(o){var n=o.model;n&&((!t||t>o.col)&&(t=o.col),r0,"Table must be on valid row"),t(n>0,"Table must be on valid col");var a=this.width,u=this.filterHeight,l=this.tableHeight;i.autoFilterRef=d.encode(o,n,o+u-1,n+a-1),i.tableRef=d.encode(o,n,o+l-1,n+a-1),i.columns.forEach(function(b,w){t(b.name,"Column ".concat(w," must have a name")),w===0?e(b,"totalsRowLabel","Total"):(e(b,"totalsRowFunction","none"),b.totalsRowFormula=s.getFormula(b))})}},{key:"store",value:function(){var s=this,i=function(b,w){w&&Object.keys(w).forEach(function(C){b[C]=w[C]})},e=this.worksheet,t=this.table,r=t.tl,o=r.row,n=r.col,a=0;if(t.headerRow){var u=e.getRow(o+a++);t.columns.forEach(function(b,w){var C=b.style,R=b.name,A=u.getCell(n+w);A.value=R,i(A,C)})}if(t.rows.forEach(function(b){var w=e.getRow(o+a++);b.forEach(function(C,R){var A=w.getCell(n+R);A.value=C,i(A,t.columns[R].style)})}),t.totalsRow){var l=e.getRow(o+a++);t.columns.forEach(function(b,w){var C=l.getCell(n+w);if(w===0)C.value=b.totalsRowLabel;else{var R=s.getFormula(b);C.value=R?{formula:b.totalsRowFormula,result:b.totalsRowResult}:null}i(C,b.style)})}}},{key:"load",value:function(s){var i=this,e=this.table,t=e.tl,r=t.row,o=t.col,n=0;if(e.headerRow){var a=s.getRow(r+n++);e.columns.forEach(function(l,b){a.getCell(o+b).value=l.name})}if(e.rows.forEach(function(l){var b=s.getRow(r+n++);l.forEach(function(w,C){b.getCell(o+C).value=w})}),e.totalsRow){var u=s.getRow(r+n++);e.columns.forEach(function(l,b){var w=u.getCell(o+b);b===0?w.value=l.totalsRowLabel:i.getFormula(l)&&(w.value={formula:l.totalsRowFormula,result:l.totalsRowResult})})}}},{key:"cacheState",value:function(){this._cache||(this._cache={ref:this.ref,width:this.width,tableHeight:this.tableHeight})}},{key:"commit",value:function(){if(this._cache){this.validate();var s=d.decodeAddress(this._cache.ref);if(this.ref!==this._cache.ref)for(var i=0;i1&&arguments[1]!==void 0?arguments[1]:1;this.cacheState(),this.table.rows.splice(s,i)}},{key:"getColumn",value:function(s){var i=this.table.columns[s];return new m(this,i,s)}},{key:"addColumn",value:function(s,i,e){this.cacheState(),e===void 0?(this.table.columns.push(s),this.table.rows.forEach(function(t,r){t.push(i[r])})):(this.table.columns.splice(e,0,s),this.table.rows.forEach(function(t,r){t.splice(e,0,i[r])}))}},{key:"removeColumns",value:function(s){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1;this.cacheState(),this.table.columns.splice(s,i),this.table.rows.forEach(function(e){e.splice(s,i)})}},{key:"_assign",value:function(s,i,e){this.cacheState(),s[i]=e}},{key:"width",get:function(){return this.table.columns.length}},{key:"height",get:function(){return this.table.rows.length}},{key:"filterHeight",get:function(){return this.height+(this.table.headerRow?1:0)}},{key:"tableHeight",get:function(){return this.filterHeight+(this.table.totalsRow?1:0)}},{key:"model",get:function(){return this.table},set:function(s){this.table=s}},{key:"ref",get:function(){return this.table.ref},set:function(s){this._assign(this.table,"ref",s)}},{key:"name",get:function(){return this.table.name},set:function(s){this.table.name=s}},{key:"displayName",get:function(){return this.table.displyName||this.table.name}},{key:"displayNamename",set:function(s){this.table.displayName=s}},{key:"headerRow",get:function(){return this.table.headerRow},set:function(s){this._assign(this.table,"headerRow",s)}},{key:"totalsRow",get:function(){return this.table.totalsRow},set:function(s){this._assign(this.table,"totalsRow",s)}},{key:"theme",get:function(){return this.table.style.name},set:function(s){this.table.style.name=s}},{key:"showFirstColumn",get:function(){return this.table.style.showFirstColumn},set:function(s){this.table.style.showFirstColumn=s}},{key:"showLastColumn",get:function(){return this.table.style.showLastColumn},set:function(s){this.table.style.showLastColumn=s}},{key:"showRowStripes",get:function(){return this.table.style.showRowStripes},set:function(s){this.table.style.showRowStripes=s}},{key:"showColumnStripes",get:function(){return this.table.style.showColumnStripes},set:function(s){this.table.style.showColumnStripes=s}}]),h}();T.exports=f},{"../utils/col-cache":19}],13:[function(c,T,O){function y(h,s){for(var i=0;i31&&console.warn("Worksheet name ".concat(e," exceeds 31 chars. This will be truncated")),/[*?:/\\[\]]/.test(e))throw new Error("Worksheet name ".concat(e," cannot include any of the following characters: * ? : \\ / [ ]"));if(/(^')|('$)/.test(e))throw new Error("The first or last character of worksheet name cannot be a single quotation mark: ".concat(e));if(e=(e||"sheet".concat(r)).substring(0,31),this._worksheets.find(function(u){return u&&u.name.toLowerCase()===e.toLowerCase()}))throw new Error("Worksheet name already exists: ".concat(e));t&&(typeof t=="string"?(console.trace('tabColor argument is now deprecated. Please use workbook.addWorksheet(name, {properties: { tabColor: { argb: "rbg value" } }'),t={properties:{tabColor:{argb:t}}}):(t.argb||t.theme||t.indexed)&&(console.trace("tabColor argument is now deprecated. Please use workbook.addWorksheet(name, {properties: { tabColor: { ... } }"),t={properties:{tabColor:t}}));var o=this._worksheets.reduce(function(u,l){return(l&&l.orderNo)>u?l.orderNo:u},0),n=Object.assign({},t,{id:r,name:e,orderNo:o+1,workbook:this}),a=new p(n);return this._worksheets[r]=a,a}},{key:"removeWorksheetEx",value:function(e){delete this._worksheets[e.id]}},{key:"removeWorksheet",value:function(e){var t=this.getWorksheet(e);t&&t.destroy()}},{key:"getWorksheet",value:function(e){return e===void 0?this._worksheets.find(Boolean):typeof e=="number"?this._worksheets[e]:typeof e=="string"?this._worksheets.find(function(t){return t&&t.name===e}):void 0}},{key:"eachSheet",value:function(e){this.worksheets.forEach(function(t){e(t,t.id)})}},{key:"clearThemes",value:function(){this._themes=void 0}},{key:"addImage",value:function(e){var t=this.media.length;return this.media.push(Object.assign({},e,{type:"image"})),t}},{key:"getImage",value:function(e){return this.media[e]}},{key:"xlsx",get:function(){return this._xlsx||(this._xlsx=new d(this)),this._xlsx}},{key:"csv",get:function(){return this._csv||(this._csv=new m(this)),this._csv}},{key:"nextId",get:function(){for(var e=1;eb.length)&&(w=b.length);for(var C=0,R=new Array(w);Cthis._columns.length)for(var j=this._columns.length+1;j<=R;)this._columns.push(new t(this,j++));return this._columns[R-1]}},{key:"spliceColumns",value:function(R,A){for(var j=this,P=this._rows,_=P.length,S=arguments.length,g=new Array(S>2?S-2:0),E=2;E0)for(var k=function(V){var q=[R,A];g.forEach(function(L){q.push(L[V]||null)});var $=j.getRow(V+1);$.splice.apply($,q)},x=0;x<_;x++)k(x);else this._rows.forEach(function(V){V&&V.splice(R,A)});var M=g.length-A,D=R+A,B=this._columns.length;if(M<0)for(var F=R+g.length;F<=B;F++)this.getColumn(F).defn=this.getColumn(F-M).defn;else if(M>0)for(var U=B;U>=D;U--)this.getColumn(U+M).defn=this.getColumn(U).defn;for(var H=R;H1&&arguments[1]!==void 0?arguments[1]:"n",j=this._nextRow,P=this.getRow(j);return P.values=R,this._setStyleOption(j,A[0]==="i"?A:"n"),P}},{key:"addRows",value:function(R){var A=this,j=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"n",P=[];return R.forEach(function(_){P.push(A.addRow(_,j))}),P}},{key:"insertRow",value:function(R,A){var j=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"n";return this.spliceRows(R,0,A),this._setStyleOption(R,j),this.getRow(R)}},{key:"insertRows",value:function(R,A){var j=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"n";if(this.spliceRows.apply(this,[R,0].concat(d(A))),j!=="n")for(var P=0;P1&&arguments[1]!==void 0?arguments[1]:"n";A[0]==="o"&&this.findRow(R+1)!==void 0?this._copyStyle(R+1,R,A[1]==="+"):A[0]==="i"&&this.findRow(R-1)!==void 0&&this._copyStyle(R-1,R,A[1]==="+")}},{key:"_copyStyle",value:function(R,A){var j=arguments.length>2&&arguments[2]!==void 0&&arguments[2],P=this.getRow(R),_=this.getRow(A);_.style=Object.freeze(p({},P.style)),P.eachCell({includeEmpty:j},function(S,g){_.getCell(g).style=Object.freeze(p({},S.style))}),_.height=P.height}},{key:"duplicateRow",value:function(R,A){var j=this,P=arguments.length>2&&arguments[2]!==void 0&&arguments[2],_=this._rows[R-1],S=new Array(A).fill(_.values);this.spliceRows.apply(this,[R+1,P?0:A].concat(d(S)));for(var g=function(k){var x=j._rows[R+k];x.style=_.style,x.height=_.height,_.eachCell({includeEmpty:!0},function(M,D){x.getCell(D).style=M.style})},E=0;E2?_-2:0),g=2;g<_;g++)S[g-2]=arguments[g];var E,k,x=S.length,M=x-A,D=this._rows.length;if(M<0)for(E=P;E<=D;E++)(k=this._rows[E-1])?function(){var F=j.getRow(E+M);F.values=k.values,F.style=k.style,F.height=k.height,k.eachCell({includeEmpty:!0},function(U,H){F.getCell(H).style=U.style}),j._rows[E-1]=void 0}():this._rows[E+M-1]=void 0;else if(M>0)for(E=D;E>=P;E--)(k=this._rows[E-1])?function(){var F=j.getRow(E+M);F.values=k.values,F.style=k.style,F.height=k.height,k.eachCell({includeEmpty:!0},function(U,H){if(F.getCell(H).style=U.style,U._value.constructor.name==="MergeValue"){var V=j.getRow(U._row._number+x).getCell(H),q=U._value._master,$=j.getRow(q._row._number+x).getCell(q._column._number);V.merge($)}})}():this._rows[E+M-1]=void 0;for(E=0;ER.top||_>R.left)&&this.getCell(P,_).merge(j,A);this._merges[j.address]=R}},{key:"_unMergeMaster",value:function(R){var A=this._merges[R.address];if(A){for(var j=A.top;j<=A.bottom;j++)for(var P=A.left;P<=A.right;P++)this.getCell(j,P).unmerge();delete this._merges[R.address]}}},{key:"unMergeCells",value:function(){for(var R=arguments.length,A=new Array(R),j=0;j3&&arguments[3]!==void 0?arguments[3]:"shared",S=s.decode(R),g=S.top,E=S.left,k=S.bottom,x=S.right,M=x-E+1,D=s.encodeAddress(g,E),B=_==="shared";P=typeof j=="function"?j:Array.isArray(j)?Array.isArray(j[0])?function(V,q){return j[V-g][q-E]}:function(V,q){return j[(V-g)*M+(q-E)]}:function(){};for(var F=!0,U=g;U<=k;U++)for(var H=E;H<=x;H++)F?(this.getCell(U,H).value={shareType:_,formula:A,ref:R,result:P(U,H)},F=!1):this.getCell(U,H).value=B?{sharedFormula:D,result:P(U,H)}:P(U,H)}},{key:"addImage",value:function(R,A){var j={type:"image",imageId:R,range:A};this._media.push(new o(this,j))}},{key:"getImages",value:function(){return this._media.filter(function(R){return R.type==="image"})}},{key:"addBackgroundImage",value:function(R){var A={type:"background",imageId:R};this._media.push(new o(this,A))}},{key:"getBackgroundImageId",value:function(){var R=this._media.find(function(A){return A.type==="background"});return R&&R.imageId}},{key:"protect",value:function(R,A){var j=this;return new Promise(function(P){j.sheetProtection={sheet:!0},A&&"spinCount"in A&&(A.spinCount=Number.isFinite(A.spinCount)?Math.round(Math.max(0,A.spinCount)):1e5),R&&(j.sheetProtection.algorithmName="SHA-512",j.sheetProtection.saltValue=u.randomBytes(16).toString("base64"),j.sheetProtection.spinCount=A&&"spinCount"in A?A.spinCount:1e5,j.sheetProtection.hashValue=u.convertPasswordToHash(R,"SHA512",j.sheetProtection.saltValue,j.sheetProtection.spinCount)),A&&(j.sheetProtection=Object.assign(j.sheetProtection,A),!R&&"spinCount"in A&&delete j.sheetProtection.spinCount),P()})}},{key:"unprotect",value:function(){this.sheetProtection=null}},{key:"addTable",value:function(R){var A=new n(this,R);return this.tables[R.name]=A,A}},{key:"getTable",value:function(R){return this.tables[R]}},{key:"removeTable",value:function(R){delete this.tables[R]}},{key:"getTables",value:function(){return Object.values(this.tables)}},{key:"addConditionalFormatting",value:function(R){this.conditionalFormattings.push(R)}},{key:"removeConditionalFormatting",value:function(R){typeof R=="number"?this.conditionalFormattings.splice(R,1):this.conditionalFormattings=R instanceof Function?this.conditionalFormattings.filter(R):[]}},{key:"_parseRows",value:function(R){var A=this;this._rows=[],R.rows.forEach(function(j){var P=new e(A,j.number);A._rows[P.number-1]=P,P.model=j})}},{key:"_parseMergeCells",value:function(R){var A=this;h.each(R.mergeCells,function(j){A.mergeCellsWithoutStyle(j)})}},{key:"workbook",get:function(){return this._workbook}},{key:"dimensions",get:function(){var R=new i;return this._rows.forEach(function(A){if(A){var j=A.dimensions;j&&R.expand(A.number,j.min,A.number,j.max)}}),R}},{key:"columns",get:function(){return this._columns},set:function(R){var A=this;this._headerRowCount=R.reduce(function(_,S){var g=(S.header?1:S.headers&&S.headers.length)||0;return Math.max(_,g)},0);var j=1,P=this._columns=[];R.forEach(function(_){var S=new t(A,j++,!1);P.push(S),S.defn=_})}},{key:"lastColumn",get:function(){return this.getColumn(this.columnCount)}},{key:"columnCount",get:function(){var R=0;return this.eachRow(function(A){R=Math.max(R,A.cellCount)}),R}},{key:"actualColumnCount",get:function(){var R=[],A=0;return this.eachRow(function(j){j.eachCell(function(P){var _=P.col;R[_]||(R[_]=!0,A++)})}),A}},{key:"_lastRowNumber",get:function(){for(var R=this._rows,A=R.length;A>0&&R[A-1]===void 0;)A--;return A}},{key:"_nextRow",get:function(){return this._lastRowNumber+1}},{key:"lastRow",get:function(){if(this._rows.length)return this._rows[this._rows.length-1]}},{key:"rowCount",get:function(){return this._lastRowNumber}},{key:"actualRowCount",get:function(){var R=0;return this.eachRow(function(){R++}),R}},{key:"hasMerges",get:function(){return h.some(this._merges,Boolean)}},{key:"tabColor",get:function(){return console.trace("worksheet.tabColor property is now deprecated. Please use worksheet.properties.tabColor"),this.properties.tabColor},set:function(R){console.trace("worksheet.tabColor property is now deprecated. Please use worksheet.properties.tabColor"),this.properties.tabColor=R}},{key:"model",get:function(){var R={id:this.id,name:this.name,dataValidations:this.dataValidations.model,properties:this.properties,state:this.state,pageSetup:this.pageSetup,headerFooter:this.headerFooter,rowBreaks:this.rowBreaks,views:this.views,autoFilter:this.autoFilter,media:this._media.map(function(P){return P.model}),sheetProtection:this.sheetProtection,tables:Object.values(this.tables).map(function(P){return P.model}),conditionalFormattings:this.conditionalFormattings};R.cols=t.toModel(this.columns);var A=R.rows=[],j=R.dimensions=new i;return this._rows.forEach(function(P){var _=P&&P.model;_&&(j.expand(_.number,_.min,_.number,_.max),A.push(_))}),R.merges=[],h.each(this._merges,function(P){R.merges.push(P.range)}),R},set:function(R){var A=this;this.name=R.name,this._columns=t.fromModel(this,R.cols),this._parseRows(R),this._parseMergeCells(R),this.dataValidations=new a(R.dataValidations),this.properties=R.properties,this.pageSetup=R.pageSetup,this.headerFooter=R.headerFooter,this.views=R.views,this.autoFilter=R.autoFilter,this._media=R.media.map(function(j){return new o(A,j)}),this.sheetProtection=R.sheetProtection,this.tables=R.tables.reduce(function(j,P){var _=new n;return _.model=P,j[P.name]=_,j},{}),this.conditionalFormattings=R.conditionalFormattings}}])&&f(w.prototype,C),b}();T.exports=l},{"../utils/col-cache":19,"../utils/encryptor":20,"../utils/under-dash":25,"./column":4,"./data-validations":5,"./enums":7,"./image":8,"./range":10,"./row":11,"./table":12}],15:[function(c,T,O){c("core-js/modules/es.promise"),c("core-js/modules/es.object.assign"),c("core-js/modules/es.object.keys"),c("core-js/modules/es.object.values"),c("core-js/modules/es.symbol"),c("core-js/modules/es.symbol.async-iterator"),c("core-js/modules/es.array.iterator"),c("core-js/modules/es.array.includes"),c("core-js/modules/es.array.find-index"),c("core-js/modules/es.array.find"),c("core-js/modules/es.string.from-code-point"),c("core-js/modules/es.string.includes"),c("core-js/modules/es.number.is-nan"),c("regenerator-runtime/runtime");var y={Workbook:c("./doc/workbook")},p=c("./doc/enums");Object.keys(p).forEach(function(v){y[v]=p[v]}),T.exports=y},{"./doc/enums":7,"./doc/workbook":13,"core-js/modules/es.array.find":316,"core-js/modules/es.array.find-index":315,"core-js/modules/es.array.includes":317,"core-js/modules/es.array.iterator":318,"core-js/modules/es.number.is-nan":319,"core-js/modules/es.object.assign":320,"core-js/modules/es.object.keys":321,"core-js/modules/es.object.values":322,"core-js/modules/es.promise":323,"core-js/modules/es.string.from-code-point":324,"core-js/modules/es.string.includes":325,"core-js/modules/es.symbol":327,"core-js/modules/es.symbol.async-iterator":326,"regenerator-runtime/runtime":492}],16:[function(c,T,O){var y=typeof TextDecoder>"u"?null:new TextDecoder("utf-8");O.bufferToString=function(p){return typeof p=="string"?p:y?y.decode(p):p.toString()}},{}],17:[function(c,T,O){var y=typeof TextEncoder>"u"?null:new TextEncoder("utf-8"),p=c("buffer").Buffer;O.stringToBuffer=function(v){return typeof v!="string"?v:y?p.from(y.encode(v).buffer):p.from(v)}},{buffer:216}],18:[function(c,T,O){function y(m,f){for(var h=0;h"u"||!(Symbol.iterator in Object(i)))){var t=[],r=!0,o=!1,n=void 0;try{for(var a,u=i[Symbol.iterator]();!(r=(a=u.next()).done)&&(t.push(a.value),!e||t.length!==e);r=!0);}catch(l){o=!0,n=l}finally{try{r||u.return==null||u.return()}finally{if(o)throw n}}return t}}(h,s)||function(i,e){if(i){if(typeof i=="string")return p(i,e);var t=Object.prototype.toString.call(i).slice(8,-1);if(t==="Object"&&i.constructor&&(t=i.constructor.name),t==="Map"||t==="Set")return Array.from(i);if(t==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return p(i,e)}}(h,s)||function(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function p(h,s){(s==null||s>h.length)&&(s=h.length);for(var i=0,e=new Array(s);i=4)throw new Error("Out of bounds. Excel supports columns from 1 to 16384");if(this._l2nFill<1&&h>=1){for(;o<=26;)s=this._dictionary[o-1],this._n2l[o]=s,this._l2n[s]=o,o++;this._l2nFill=1}if(this._l2nFill<2&&h>=2){for(o=27;o<=702;)e=(i=o-27)%26,t=Math.floor(i/26),s=this._dictionary[t]+this._dictionary[e],this._n2l[o]=s,this._l2n[s]=o,o++;this._l2nFill=2}if(this._l2nFill<3&&h>=3){for(o=703;o<=16384;)e=(i=o-703)%26,t=Math.floor(i/26)%26,r=Math.floor(i/676),s=this._dictionary[r]+this._dictionary[t]+this._dictionary[e],this._n2l[o]=s,this._l2n[s]=o,o++;this._l2nFill=3}},l2n:function(h){if(this._l2n[h]||this._fill(h.length),!this._l2n[h])throw new Error("Out of bounds. Invalid column letter: ".concat(h));return this._l2n[h]},n2l:function(h){if(h<1||h>16384)throw new Error("".concat(h," is out of bounds. Excel supports columns from 1 to 16384"));return this._n2l[h]||this._fill(this._level(h)),this._n2l[h]},_hash:{},validateAddress:function(h){if(!m.test(h))throw new Error("Invalid Address: ".concat(h));return!0},decodeAddress:function(h){var s=h.length<5&&this._hash[h];if(s)return s;for(var i,e=!1,t="",r=0,o=!1,n="",a=0,u=0;u=65&&i<=90)e=!0,t+=h[u],r=26*r+i-64;else if(i>=48&&i<=57)o=!0,n+=h[u],a=10*a+i-48;else if(o&&e&&i!==36)break;if(e){if(r>16384)throw new Error("Out of bounds. Invalid column letter: ".concat(t))}else r=void 0;o||(a=void 0);var l={address:h=t+n,col:r,row:a,$col$row:"$".concat(t,"$").concat(n)};return r<=100&&a<=100&&(this._hash[h]=l,this._hash[l.$col$row]=l),l},getAddress:function(h,s){if(s){var i=this.n2l(s)+h;return this.decodeAddress(i)}return this.decodeAddress(h)},decode:function(h){var s=h.split(":");if(s.length===2){var i=this.decodeAddress(s[0]),e=this.decodeAddress(s[1]),t={top:Math.min(i.row,e.row),left:Math.min(i.col,e.col),bottom:Math.max(i.row,e.row),right:Math.max(i.col,e.col)};return t.tl=this.n2l(t.left)+t.top,t.br=this.n2l(t.right)+t.bottom,t.dimensions="".concat(t.tl,":").concat(t.br),t}return this.decodeAddress(h)},decodeEx:function(h){var s=h.match(/(?:(?:(?:'((?:[^']|'')*)')|([^'^ !]*))!)?(.*)/),i=s[1]||s[2],e=s[3],t=e.split(":");if(t.length>1){var r=this.decodeAddress(t[0]),o=this.decodeAddress(t[1]),n=Math.min(r.row,o.row),a=Math.min(r.col,o.col),u=Math.max(r.row,o.row),l=Math.max(r.col,o.col);return r=this.n2l(a)+n,o=this.n2l(l)+u,{top:n,left:a,bottom:u,right:l,sheetName:i,tl:{address:r,col:a,row:n,$col$row:"$".concat(this.n2l(a),"$").concat(n),sheetName:i},br:{address:o,col:l,row:u,$col$row:"$".concat(this.n2l(l),"$").concat(u),sheetName:i},dimensions:"".concat(r,":").concat(o)}}if(e.startsWith("#"))return i?{sheetName:i,error:e}:{error:e};var b=this.decodeAddress(e);return i?function(w){for(var C=1;C=e&&a<=r&&u>=t&&u<=o}};T.exports=f},{}],20:[function(c,T,O){(function(y){var p=c("crypto"),v={hash:function(d){for(var m=p.createHash(d),f=arguments.length,h=new Array(f>1?f-1:0),s=1;s3||u.length===3&&u>"XFD")return i;var w=y.l2n(u),C=parseInt(b,10);return a||(w+=s.col-h.col),l||(C+=s.row-h.row),(e||"")+(a||"")+y.n2l(w)+(l||"")+C}return i})}}},{"./col-cache":19}],23:[function(c,T,O){(function(y,p){function v(u,l,b,w,C,R,A){try{var j=u[R](A),P=j.value}catch(_){return void b(_)}j.done?l(P):Promise.resolve(P).then(w,C)}function d(u){return function(){var l=this,b=arguments;return new Promise(function(w,C){var R=u.apply(l,b);function A(P){v(R,w,C,A,j,"next",P)}function j(P){v(R,w,C,A,j,"throw",P)}A(void 0)})}}function m(u,l){if(!(u instanceof l))throw new TypeError("Cannot call a class as a function")}function f(u,l){for(var b=0;b=this.length?(b=this.toBuffer(),this.iRead=this.iWrite,b):(b=p.alloc(l),this.buffer.copy(b,0,this.iRead,l),this.iRead+=l,b)}},{key:"write",value:function(l,b,w){var C=Math.min(w,this.size-this.iWrite);return l.copy(this.buffer,this.iWrite,b,b+C),this.iWrite+=C,C}},{key:"length",get:function(){return this.iWrite-this.iRead}},{key:"eod",get:function(){return this.iRead===this.iWrite}},{key:"full",get:function(){return this.iWrite===this.size}}]),u}(),a=function(u){u=u||{},this.bufSize=u.bufSize||1048576,this.buffers=[],this.batch=u.batch||!1,this.corked=!1,this.inPos=0,this.outPos=0,this.pipes=[],this.paused=!1,this.encoding=null};i.inherits(a,s.Duplex,{toBuffer:function(){switch(this.buffers.length){case 0:return null;case 1:return this.buffers[0].toBuffer();default:return p.concat(this.buffers.map(function(u){return u.toBuffer()}))}},_getWritableBuffer:function(){if(this.buffers.length){var u=this.buffers[this.buffers.length-1];if(!u.full)return u}var l=new n(this.bufSize);return this.buffers.push(l),l},_pipe:function(u){var l=this;return d(regeneratorRuntime.mark(function b(){var w;return regeneratorRuntime.wrap(function(C){for(;;)switch(C.prev=C.next){case 0:return w=function(R){return new Promise(function(A){R.write(u.toBuffer(),function(){A()})})},C.next=3,Promise.all(l.pipes.map(w));case 3:case"end":return C.stop()}},b)}))()},_writeToBuffers:function(u){for(var l=0,b=u.length;l1;)w._pipe(w.buffers.shift());A.next=29;break;case 21:if(w.corked){A.next=27;break}return A.next=24,w._pipe(R);case 24:b(),A.next=29;break;case 27:w._writeToBuffers(R),y.nextTick(b);case 29:A.next=34;break;case 31:w.paused||w.emit("data",R.toBuffer()),w._writeToBuffers(R),w.emit("readable");case 34:return A.abrupt("return",!0);case 35:case"end":return A.stop()}},C)}))()},cork:function(){this.corked=!0},_flush:function(){if(this.pipes.length)for(;this.buffers.length;)this._pipe(this.buffers.shift())},uncork:function(){this.corked=!1,this._flush()},end:function(u,l,b){var w=this,C=function(R){R?b(R):(w._flush(),w.pipes.forEach(function(A){A.end()}),w.emit("finish"))};u?this.write(u,l,C):C()},read:function(u){var l;if(u){for(l=[];u&&this.buffers.length&&!this.buffers[0].eod;){var b=this.buffers[0],w=b.read(u);u-=w.length,l.push(w),b.eod&&b.full&&this.buffers.shift()}return p.concat(l)}return l=this.buffers.map(function(C){return C.toBuffer()}).filter(Boolean),this.buffers=[],p.concat(l)},setEncoding:function(u){this.encoding=u},pause:function(){this.paused=!0},resume:function(){this.paused=!1},isPaused:function(){return!!this.paused},pipe:function(u){this.pipes.push(u),!this.paused&&this.buffers.length&&this.end()},unpipe:function(u){this.pipes=this.pipes.filter(function(l){return l!==u})},unshift:function(){throw new Error("Not Implemented")},wrap:function(){throw new Error("Not Implemented")}}),T.exports=a}).call(this,c("_process"),c("buffer").Buffer)},{"./string-buf":24,"./utils":26,_process:467,buffer:216,"readable-stream":491}],24:[function(c,T,O){(function(y){function p(d,m){for(var f=0;f=this._buf.length-4;)this._grow(this._inPos+h.length),s=this._inPos+this._buf.write(h,this._inPos,this._encoding);this._inPos=s}},{key:"addStringBuf",value:function(h){h.length&&(this._buffer=void 0,this.length+h.length>this.capacity&&this._grow(this.length+h.length),h._buf.copy(this._buf,this._inPos,0,h.length),this._inPos+=h.length)}},{key:"length",get:function(){return this._inPos}},{key:"capacity",get:function(){return this._buf.length}},{key:"buffer",get:function(){return this._buf}}])&&p(m.prototype,f),d}();T.exports=v}).call(this,c("buffer").Buffer)},{buffer:216}],25:[function(c,T,O){function y(m){return(y=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(f){return typeof f}:function(f){return f&&typeof Symbol=="function"&&f.constructor===Symbol&&f!==Symbol.prototype?"symbol":typeof f})(m)}var p=Object.prototype.toString,v=/["&<>]/,d={each:function(m,f){m&&(Array.isArray(m)?m.forEach(f):Object.keys(m).forEach(function(h){f(m[h],h)}))},some:function(m,f){return!!m&&(Array.isArray(m)?m.some(f):Object.keys(m).some(function(h){return f(m[h],h)}))},every:function(m,f){return!m||(Array.isArray(m)?m.every(f):Object.keys(m).every(function(h){return f(m[h],h)}))},map:function(m,f){return m?Array.isArray(m)?m.map(f):Object.keys(m).map(function(h){return f(m[h],h)}):[]},keyBy:function(m,f){return m.reduce(function(h,s){return h[s[f]]=s,h},{})},isEqual:function(m,f){var h=y(m),s=y(f),i=Array.isArray(m),e=Array.isArray(f);if(h!==s)return!1;switch(y(m)){case"object":return i||e?!(!i||!e)&&m.length===f.length&&m.every(function(t,r){var o=f[r];return d.isEqual(t,o)}):d.every(m,function(t,r){var o=f[r];return d.isEqual(t,o)});default:return m===f}},escapeHtml:function(m){var f=v.exec(m);if(!f)return m;for(var h="",s="",i=0,e=f.index;e":s=">";break;default:continue}i!==e&&(h+=m.substring(i,e)),i=e+1,h+=s}return i!==e?h+m.substring(i,e):h},strcmp:function(m,f){return mf?1:0},isUndefined:function(m){return p.call(m)==="[object Undefined]"},isObject:function(m){return p.call(m)==="[object Object]"},deepMerge:function(){var m,f,h,s=arguments[0]||{},i=arguments.length;function e(r,o){m=s[o],h=Array.isArray(r),d.isObject(r)||h?(h?(h=!1,f=m&&Array.isArray(m)?m:[]):f=m&&d.isObject(m)?m:{},s[o]=d.deepMerge(f,r)):d.isUndefined(r)||(s[o]=r)}for(var t=0;t&'"\x7F\x00-\x08\x0B-\x0C\x0E-\x1F]/,m={nop:function(){},promiseImmediate:function(f){return new Promise(function(h){y.setImmediate?p(function(){h(f)}):setTimeout(function(){h(f)},1)})},inherits:function(f,h,s,i){f.super_=h,i||(i=s,s=null),s&&Object.keys(s).forEach(function(t){Object.defineProperty(f,t,Object.getOwnPropertyDescriptor(s,t))});var e={constructor:{value:f,enumerable:!1,writable:!1,configurable:!0}};i&&Object.keys(i).forEach(function(t){e[t]=Object.getOwnPropertyDescriptor(i,t)}),f.prototype=Object.create(h.prototype,e)},dateToExcel:function(f,h){return 25569+f.getTime()/864e5-(h?1462:0)},excelToDate:function(f,h){var s=Math.round(24*(f-25569+(h?1462:0))*3600*1e3);return new Date(s)},parsePath:function(f){var h=f.lastIndexOf("/");return{path:f.substring(0,h),name:f.substring(h+1)}},getRelsPath:function(f){var h=m.parsePath(f);return"".concat(h.path,"/_rels/").concat(h.name,".rels")},xmlEncode:function(f){var h=d.exec(f);if(!h)return f;for(var s="",i="",e=0,t=h.index;t=11&&r!==13)){i="";break}continue}e!==t&&(s+=f.substring(e,t)),e=t+1,i&&(s+=i)}return e!==t?s+f.substring(e,t):s},xmlDecode:function(f){return f.replace(/&([a-z]*);/g,function(h){switch(h){case"<":return"<";case">":return">";case"&":return"&";case"'":return"'";case""":return'"';default:return h}})},validInt:function(f){var h=parseInt(f,10);return Number.isNaN(h)?0:h},isDateFmt:function(f){return!!f&&(f=(f=f.replace(/\[[^\]]*]/g,"")).replace(/"[^"]*"/g,"")).match(/[ymdhMsb]+/)!==null},fs:{exists:function(f){return new Promise(function(h){v.access(f,v.constants.F_OK,function(s){h(!s)})})}},toIsoDateString:function(f){return f.toIsoString().subsstr(0,10)}};T.exports=m}).call(this,typeof et<"u"?et:typeof self<"u"?self:typeof window<"u"?window:{},c("timers").setImmediate)},{fs:215,timers:521}],27:[function(c,T,O){function y(h,s){for(var i=0;i `)}},{key:"openNode",value:function(e,t){var r=this.tos,o=this._xml;r&&this.open&&o.push(">"),this._stack.push(e),o.push("<"),o.push(e),m(o,t),this.leaf=!0,this.open=!0}},{key:"addAttribute",value:function(e,t){if(!this.open)throw new Error("Cannot write attributes to node if it is not open");t!==void 0&&d(this._xml,e,t)}},{key:"addAttributes",value:function(e){if(!this.open)throw new Error("Cannot write attributes to node if it is not open");m(this._xml,e)}},{key:"writeText",value:function(e){var t=this._xml;this.open&&(t.push(">"),this.open=!1),this.leaf=!1,t.push(v.xmlEncode(e.toString()))}},{key:"writeXml",value:function(e){this.open&&(this._xml.push(">"),this.open=!1),this.leaf=!1,this._xml.push(e)}},{key:"closeNode",value:function(){var e=this._stack.pop(),t=this._xml;this.leaf?t.push("/>"):(t.push("")),this.open=!1,this.leaf=!1}},{key:"leafNode",value:function(e,t,r){this.openNode(e,t),r!==void 0&&this.writeText(r),this.closeNode()}},{key:"closeAll",value:function(){for(;this._stack.length;)this.closeNode()}},{key:"addRollback",value:function(){return this._rollbacks.push({xml:this._xml.length,stack:this._stack.length,leaf:this.leaf,open:this.open}),this.cursor}},{key:"commit",value:function(){this._rollbacks.pop()}},{key:"rollback",value:function(){var e=this._rollbacks.pop();this._xml.length>e.xml&&this._xml.splice(e.xml,this._xml.length-e.xml),this._stack.length>e.stack&&this._stack.splice(e.stack,this._stack.length-e.stack),this.leaf=e.leaf,this.open=e.open}},{key:"tos",get:function(){return this._stack.length?this._stack[this._stack.length-1]:void 0}},{key:"cursor",get:function(){return this._xml.length}},{key:"xml",get:function(){return this.closeAll(),this._xml.join("")}}])&&y(s.prototype,i),h}();f.StdDocAttributes={version:"1.0",encoding:"UTF-8",standalone:"yes"},T.exports=f},{"./under-dash":25,"./utils":26}],28:[function(c,T,O){(function(y){function p(n){return(p=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(a){return typeof a}:function(a){return a&&typeof Symbol=="function"&&a.constructor===Symbol&&a!==Symbol.prototype?"symbol":typeof a})(n)}function v(n,a,u,l,b,w,C){try{var R=n[w](C),A=R.value}catch(j){return void u(j)}R.done?a(A):Promise.resolve(A).then(l,b)}function d(n,a){for(var u=0;u"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}();return function(){var u,l=s(n);if(a){var b=s(this).constructor;u=Reflect.construct(l,arguments,b)}else u=l.apply(this,arguments);return h(this,u)}}function h(n,a){return!a||p(a)!=="object"&&typeof a!="function"?function(u){if(u===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return u}(n):a}function s(n){return(s=Object.setPrototypeOf?Object.getPrototypeOf:function(a){return a.__proto__||Object.getPrototypeOf(a)})(n)}var i=c("events"),e=c("jszip"),t=c("./stream-buf"),r=c("./browser-buffer-encode").stringToBuffer,o=function(n){(function(R,A){if(typeof A!="function"&&A!==null)throw new TypeError("Super expression must either be null or a function");R.prototype=Object.create(A&&A.prototype,{constructor:{value:R,writable:!0,configurable:!0}}),A&&m(R,A)})(C,n);var a,u,l,b,w=f(C);function C(R){var A;return function(j,P){if(!(j instanceof P))throw new TypeError("Cannot call a class as a function")}(this,C),(A=w.call(this)).options=Object.assign({type:"nodebuffer",compression:"DEFLATE"},R),A.zip=new e,A.stream=new t,A}return a=C,(u=[{key:"append",value:function(R,A){A.hasOwnProperty("base64")&&A.base64?this.zip.file(A.name,R,{base64:!0}):(y.browser&&typeof R=="string"&&(R=r(R)),this.zip.file(A.name,R))}},{key:"finalize",value:(l=regeneratorRuntime.mark(function R(){var A;return regeneratorRuntime.wrap(function(j){for(;;)switch(j.prev=j.next){case 0:return j.next=2,this.zip.generateAsync(this.options);case 2:A=j.sent,this.stream.end(A),this.emit("finish");case 5:case"end":return j.stop()}},R,this)}),b=function(){var R=this,A=arguments;return new Promise(function(j,P){var _=l.apply(R,A);function S(E){v(_,j,P,S,g,"next",E)}function g(E){v(_,j,P,S,g,"throw",E)}S(void 0)})},function(){return b.apply(this,arguments)})},{key:"read",value:function(R){return this.stream.read(R)}},{key:"setEncoding",value:function(R){return this.stream.setEncoding(R)}},{key:"pause",value:function(){return this.stream.pause()}},{key:"resume",value:function(){return this.stream.resume()}},{key:"isPaused",value:function(){return this.stream.isPaused()}},{key:"pipe",value:function(R,A){return this.stream.pipe(R,A)}},{key:"unpipe",value:function(R){return this.stream.unpipe(R)}},{key:"unshift",value:function(R){return this.stream.unshift(R)}},{key:"wrap",value:function(R){return this.stream.wrap(R)}}])&&d(a.prototype,u),C}(i.EventEmitter);T.exports={ZipWriter:o}}).call(this,c("_process"))},{"./browser-buffer-encode":17,"./stream-buf":23,_process:467,events:367,jszip:399}],29:[function(c,T,O){T.exports={0:{f:"General"},1:{f:"0"},2:{f:"0.00"},3:{f:"#,##0"},4:{f:"#,##0.00"},9:{f:"0%"},10:{f:"0.00%"},11:{f:"0.00E+00"},12:{f:"# ?/?"},13:{f:"# ??/??"},14:{f:"mm-dd-yy"},15:{f:"d-mmm-yy"},16:{f:"d-mmm"},17:{f:"mmm-yy"},18:{f:"h:mm AM/PM"},19:{f:"h:mm:ss AM/PM"},20:{f:"h:mm"},21:{f:"h:mm:ss"},22:{f:'m/d/yy "h":mm'},27:{"zh-tw":"[$-404]e/m/d","zh-cn":'yyyy"年"m"月"',"ja-jp":"[$-411]ge.m.d","ko-kr":'yyyy"年" mm"月" dd"日"'},28:{"zh-tw":'[$-404]e"年"m"月"d"日"',"zh-cn":'m"月"d"日"',"ja-jp":'[$-411]ggge"年"m"月"d"日"',"ko-kr":"mm-dd"},29:{"zh-tw":'[$-404]e"年"m"月"d"日"',"zh-cn":'m"月"d"日"',"ja-jp":'[$-411]ggge"年"m"月"d"日"',"ko-kr":"mm-dd"},30:{"zh-tw":"m/d/yy ","zh-cn":"m-d-yy","ja-jp":"m/d/yy","ko-kr":"mm-dd-yy"},31:{"zh-tw":'yyyy"年"m"月"d"日"',"zh-cn":'yyyy"年"m"月"d"日"',"ja-jp":'yyyy"年"m"月"d"日"',"ko-kr":'yyyy"년" mm"월" dd"일"'},32:{"zh-tw":'hh"時"mm"分"',"zh-cn":'h"时"mm"分"',"ja-jp":'h"時"mm"分"',"ko-kr":'h"시" mm"분"'},33:{"zh-tw":'hh"時"mm"分"ss"秒"',"zh-cn":'h"时"mm"分"ss"秒"',"ja-jp":'h"時"mm"分"ss"秒"',"ko-kr":'h"시" mm"분" ss"초"'},34:{"zh-tw":'上午/下午 hh"時"mm"分"',"zh-cn":'上午/下午 h"时"mm"分"',"ja-jp":'yyyy"年"m"月"',"ko-kr":"yyyy-mm-dd"},35:{"zh-tw":'上午/下午 hh"時"mm"分"ss"秒"',"zh-cn":'上午/下午 h"时"mm"分"ss"秒"',"ja-jp":'m"月"d"日"',"ko-kr":"yyyy-mm-dd"},36:{"zh-tw":"[$-404]e/m/d","zh-cn":'yyyy"年"m"月"',"ja-jp":"[$-411]ge.m.d","ko-kr":'yyyy"年" mm"月" dd"日"'},37:{f:"#,##0 ;(#,##0)"},38:{f:"#,##0 ;[Red](#,##0)"},39:{f:"#,##0.00 ;(#,##0.00)"},40:{f:"#,##0.00 ;[Red](#,##0.00)"},45:{f:"mm:ss"},46:{f:"[h]:mm:ss"},47:{f:"mmss.0"},48:{f:"##0.0E+0"},49:{f:"@"},50:{"zh-tw":"[$-404]e/m/d","zh-cn":'yyyy"年"m"月"',"ja-jp":"[$-411]ge.m.d","ko-kr":'yyyy"年" mm"月" dd"日"'},51:{"zh-tw":'[$-404]e"年"m"月"d"日"',"zh-cn":'m"月"d"日"',"ja-jp":'[$-411]ggge"年"m"月"d"日"',"ko-kr":"mm-dd"},52:{"zh-tw":'上午/下午 hh"時"mm"分"',"zh-cn":'yyyy"年"m"月"',"ja-jp":'yyyy"年"m"月"',"ko-kr":"yyyy-mm-dd"},53:{"zh-tw":'上午/下午 hh"時"mm"分"ss"秒"',"zh-cn":'m"月"d"日"',"ja-jp":'m"月"d"日"',"ko-kr":"yyyy-mm-dd"},54:{"zh-tw":'[$-404]e"年"m"月"d"日"',"zh-cn":'m"月"d"日"',"ja-jp":'[$-411]ggge"年"m"月"d"日"',"ko-kr":"mm-dd"},55:{"zh-tw":'上午/下午 hh"時"mm"分"',"zh-cn":'上午/下午 h"时"mm"分"',"ja-jp":'yyyy"年"m"月"',"ko-kr":"yyyy-mm-dd"},56:{"zh-tw":'上午/下午 hh"時"mm"分"ss"秒"',"zh-cn":'上午/下午 h"时"mm"分"ss"秒"',"ja-jp":'m"月"d"日"',"ko-kr":"yyyy-mm-dd"},57:{"zh-tw":"[$-404]e/m/d","zh-cn":'yyyy"年"m"月"',"ja-jp":"[$-411]ge.m.d","ko-kr":'yyyy"年" mm"月" dd"日"'},58:{"zh-tw":'[$-404]e"年"m"月"d"日"',"zh-cn":'m"月"d"日"',"ja-jp":'[$-411]ggge"年"m"月"d"日"',"ko-kr":"mm-dd"},59:{"th-th":"t0"},60:{"th-th":"t0.00"},61:{"th-th":"t#,##0"},62:{"th-th":"t#,##0.00"},67:{"th-th":"t0%"},68:{"th-th":"t0.00%"},69:{"th-th":"t# ?/?"},70:{"th-th":"t# ??/??"},81:{"th-th":"d/m/bb"}}},{}],30:[function(c,T,O){T.exports={OfficeDocument:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/officeDocument",Worksheet:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/worksheet",CalcChain:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/calcChain",SharedStrings:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/sharedStrings",Styles:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/styles",Theme:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/theme",Hyperlink:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/hyperlink",Image:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/image",CoreProperties:"http://schemas.openxmlformats.org/package/2006/relationships/metadata/core-properties",ExtenderProperties:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/extended-properties",Comments:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/comments",VmlDrawing:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/vmlDrawing",Table:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/table"}},{}],31:[function(c,T,O){function y(e,t){var r;if(typeof Symbol>"u"||e[Symbol.iterator]==null){if(Array.isArray(e)||(r=function(b,w){if(b){if(typeof b=="string")return p(b,w);var C=Object.prototype.toString.call(b).slice(8,-1);if(C==="Object"&&b.constructor&&(C=b.constructor.name),C==="Map"||C==="Set")return Array.from(b);if(C==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(C))return p(b,w)}}(e))||t&&e&&typeof e.length=="number"){r&&(e=r);var o=0,n=function(){};return{s:n,n:function(){return o>=e.length?{done:!0}:{done:!1,value:e[o++]}},e:function(b){throw b},f:n}}throw new TypeError(`Invalid attempt to iterate non-iterable instance. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var a,u=!0,l=!1;return{s:function(){r=e[Symbol.iterator]()},n:function(){var b=r.next();return u=b.done,b},e:function(b){l=!0,a=b},f:function(){try{u||r.return==null||r.return()}finally{if(l)throw a}}}}function p(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,o=new Array(t);r2&&arguments[2]!==void 0&&arguments[2];if(u===void 0){if(b)return l}else if(b||u!==l)return u.toString()}},{key:"toStringAttribute",value:function(u,l){var b=arguments.length>2&&arguments[2]!==void 0&&arguments[2];return e.toAttribute(u,l,b)}},{key:"toStringValue",value:function(u,l){return u===void 0?l:u}},{key:"toBoolAttribute",value:function(u,l){var b=arguments.length>2&&arguments[2]!==void 0&&arguments[2];if(u===void 0){if(b)return l}else if(b||u!==l)return u?"1":"0"}},{key:"toBoolValue",value:function(u,l){return u===void 0?l:u==="1"}},{key:"toIntAttribute",value:function(u,l){var b=arguments.length>2&&arguments[2]!==void 0&&arguments[2];return e.toAttribute(u,l,b)}},{key:"toIntValue",value:function(u,l){return u===void 0?l:parseInt(u,10)}},{key:"toFloatAttribute",value:function(u,l){var b=arguments.length>2&&arguments[2]!==void 0&&arguments[2];return e.toAttribute(u,l,b)}},{key:"toFloatValue",value:function(u,l){return u===void 0?l:parseFloat(u)}}],r&&m(t.prototype,r),o&&m(t,o),e}();T.exports=i},{"../../utils/parse-sax":21,"../../utils/xml-stream":27}],32:[function(c,T,O){function y(o){return(y=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n})(o)}function p(o,n){if(!(o instanceof n))throw new TypeError("Cannot call a class as a function")}function v(o,n){for(var a=0;a"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}();return function(){var a,u=h(o);if(n){var l=h(this).constructor;a=Reflect.construct(u,arguments,l)}else a=u.apply(this,arguments);return f(this,a)}}function f(o,n){return!n||y(n)!=="object"&&typeof n!="function"?function(a){if(a===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return a}(o):n}function h(o){return(h=Object.setPrototypeOf?Object.getPrototypeOf:function(n){return n.__proto__||Object.getPrototypeOf(n)})(o)}var s=c("../base-xform"),i=c("../../../utils/col-cache"),e=function(o){(function(b,w){if(typeof w!="function"&&w!==null)throw new TypeError("Super expression must either be null or a function");b.prototype=Object.create(w&&w.prototype,{constructor:{value:b,writable:!0,configurable:!0}}),w&&d(b,w)})(l,o);var n,a,u=m(l);function l(){return p(this,l),u.apply(this,arguments)}return n=l,(a=[{key:"render",value:function(b,w){b.openNode("definedName",{name:w.name,localSheetId:w.localSheetId}),b.writeText(w.ranges.join(",")),b.closeNode()}},{key:"parseOpen",value:function(b){switch(b.name){case"definedName":return this._parsedName=b.attributes.name,this._parsedLocalSheetId=b.attributes.localSheetId,this._parsedText=[],!0;default:return!1}}},{key:"parseText",value:function(b){this._parsedText.push(b)}},{key:"parseClose",value:function(){return this.model={name:this._parsedName,ranges:r(this._parsedText.join(""))},this._parsedLocalSheetId!==void 0&&(this.model.localSheetId=parseInt(this._parsedLocalSheetId,10)),!1}}])&&v(n.prototype,a),l}(s);function t(o){try{return i.decodeEx(o),!0}catch{return!1}}function r(o){var n=[],a=!1,u="";return o.split(",").forEach(function(l){if(l){var b=(l.match(/'/g)||[]).length;if(b){var w=b%2==0;!a&&w&&t(l)?n.push(l):a&&!w?(a=!1,t(u+l)&&n.push(u+l),u=""):(a=!0,u+="".concat(l,","))}else a?u+="".concat(l,","):t(l)&&n.push(l)}}),n}T.exports=e},{"../../../utils/col-cache":19,"../base-xform":31}],33:[function(c,T,O){function y(e){return(y=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(e)}function p(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function v(e,t){for(var r=0;r"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}();return function(){var r,o=h(e);if(t){var n=h(this).constructor;r=Reflect.construct(o,arguments,n)}else r=o.apply(this,arguments);return f(this,r)}}function f(e,t){return!t||y(t)!=="object"&&typeof t!="function"?function(r){if(r===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return r}(e):t}function h(e){return(h=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(e)}var s=c("../../../utils/utils"),i=function(e){(function(a,u){if(typeof u!="function"&&u!==null)throw new TypeError("Super expression must either be null or a function");a.prototype=Object.create(u&&u.prototype,{constructor:{value:a,writable:!0,configurable:!0}}),u&&d(a,u)})(n,e);var t,r,o=m(n);function n(){return p(this,n),o.apply(this,arguments)}return t=n,(r=[{key:"render",value:function(a,u){a.leafNode("sheet",{sheetId:u.id,name:u.name,state:u.state,"r:id":u.rId})}},{key:"parseOpen",value:function(a){return a.name==="sheet"&&(this.model={name:s.xmlDecode(a.attributes.name),id:parseInt(a.attributes.sheetId,10),state:a.attributes.state,rId:a.attributes["r:id"]},!0)}},{key:"parseText",value:function(){}},{key:"parseClose",value:function(){return!1}}])&&v(t.prototype,r),n}(c("../base-xform"));T.exports=i},{"../../../utils/utils":26,"../base-xform":31}],34:[function(c,T,O){function y(i){return(y=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(i)}function p(i,e){if(!(i instanceof e))throw new TypeError("Cannot call a class as a function")}function v(i,e){for(var t=0;t"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}();return function(){var t,r=h(i);if(e){var o=h(this).constructor;t=Reflect.construct(r,arguments,o)}else t=r.apply(this,arguments);return f(this,t)}}function f(i,e){return!e||y(e)!=="object"&&typeof e!="function"?function(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(i):e}function h(i){return(h=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(i)}var s=function(i){(function(n,a){if(typeof a!="function"&&a!==null)throw new TypeError("Super expression must either be null or a function");n.prototype=Object.create(a&&a.prototype,{constructor:{value:n,writable:!0,configurable:!0}}),a&&d(n,a)})(o,i);var e,t,r=m(o);function o(){return p(this,o),r.apply(this,arguments)}return e=o,(t=[{key:"render",value:function(n,a){n.leafNode("calcPr",{calcId:171027,fullCalcOnLoad:a.fullCalcOnLoad?1:void 0})}},{key:"parseOpen",value:function(n){return n.name==="calcPr"&&(this.model={},!0)}},{key:"parseText",value:function(){}},{key:"parseClose",value:function(){return!1}}])&&v(e.prototype,t),o}(c("../base-xform"));T.exports=s},{"../base-xform":31}],35:[function(c,T,O){function y(i){return(y=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(i)}function p(i,e){if(!(i instanceof e))throw new TypeError("Cannot call a class as a function")}function v(i,e){for(var t=0;t"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}();return function(){var t,r=h(i);if(e){var o=h(this).constructor;t=Reflect.construct(r,arguments,o)}else t=r.apply(this,arguments);return f(this,t)}}function f(i,e){return!e||y(e)!=="object"&&typeof e!="function"?function(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(i):e}function h(i){return(h=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(i)}var s=function(i){(function(n,a){if(typeof a!="function"&&a!==null)throw new TypeError("Super expression must either be null or a function");n.prototype=Object.create(a&&a.prototype,{constructor:{value:n,writable:!0,configurable:!0}}),a&&d(n,a)})(o,i);var e,t,r=m(o);function o(){return p(this,o),r.apply(this,arguments)}return e=o,(t=[{key:"render",value:function(n,a){n.leafNode("workbookPr",{date1904:a.date1904?1:void 0,defaultThemeVersion:164011,filterPrivacy:1})}},{key:"parseOpen",value:function(n){return n.name==="workbookPr"&&(this.model={date1904:n.attributes.date1904==="1"},!0)}},{key:"parseText",value:function(){}},{key:"parseClose",value:function(){return!1}}])&&v(e.prototype,t),o}(c("../base-xform"));T.exports=s},{"../base-xform":31}],36:[function(c,T,O){function y(i){return(y=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(i)}function p(i,e){if(!(i instanceof e))throw new TypeError("Cannot call a class as a function")}function v(i,e){for(var t=0;t"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}();return function(){var t,r=h(i);if(e){var o=h(this).constructor;t=Reflect.construct(r,arguments,o)}else t=r.apply(this,arguments);return f(this,t)}}function f(i,e){return!e||y(e)!=="object"&&typeof e!="function"?function(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(i):e}function h(i){return(h=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(i)}var s=function(i){(function(n,a){if(typeof a!="function"&&a!==null)throw new TypeError("Super expression must either be null or a function");n.prototype=Object.create(a&&a.prototype,{constructor:{value:n,writable:!0,configurable:!0}}),a&&d(n,a)})(o,i);var e,t,r=m(o);function o(){return p(this,o),r.apply(this,arguments)}return e=o,(t=[{key:"render",value:function(n,a){var u={xWindow:a.x||0,yWindow:a.y||0,windowWidth:a.width||12e3,windowHeight:a.height||24e3,firstSheet:a.firstSheet,activeTab:a.activeTab};a.visibility&&a.visibility!=="visible"&&(u.visibility=a.visibility),n.leafNode("workbookView",u)}},{key:"parseOpen",value:function(n){if(n.name==="workbookView"){var a=this.model={},u=function(R,A,j){var P=A!==void 0?a[R]=parseInt(A,10):j;P!==void 0&&(a[R]=P)};return u("x",n.attributes.xWindow,0),u("y",n.attributes.yWindow,0),u("width",n.attributes.windowWidth,25e3),u("height",n.attributes.windowHeight,1e4),l="visibility",b=n.attributes.visibility,w="visible",(C=b!==void 0?a[l]=b:w)!==void 0&&(a[l]=C),u("activeTab",n.attributes.activeTab,void 0),u("firstSheet",n.attributes.firstSheet,void 0),!0}var l,b,w,C;return!1}},{key:"parseText",value:function(){}},{key:"parseClose",value:function(){return!1}}])&&v(e.prototype,t),o}(c("../base-xform"));T.exports=s},{"../base-xform":31}],37:[function(c,T,O){function y(w){return(y=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(C){return typeof C}:function(C){return C&&typeof Symbol=="function"&&C.constructor===Symbol&&C!==Symbol.prototype?"symbol":typeof C})(w)}function p(w,C){for(var R=0;R"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}();return function(){var R,A=f(w);if(C){var j=f(this).constructor;R=Reflect.construct(A,arguments,j)}else R=A.apply(this,arguments);return m(this,R)}}function m(w,C){return!C||y(C)!=="object"&&typeof C!="function"?function(R){if(R===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return R}(w):C}function f(w){return(f=Object.setPrototypeOf?Object.getPrototypeOf:function(C){return C.__proto__||Object.getPrototypeOf(C)})(w)}var h=c("../../../utils/under-dash"),s=c("../../../utils/col-cache"),i=c("../../../utils/xml-stream"),e=c("../base-xform"),t=c("../static-xform"),r=c("../list-xform"),o=c("./defined-name-xform"),n=c("./sheet-xform"),a=c("./workbook-view-xform"),u=c("./workbook-properties-xform"),l=c("./workbook-calc-properties-xform"),b=function(w){(function(P,_){if(typeof _!="function"&&_!==null)throw new TypeError("Super expression must either be null or a function");P.prototype=Object.create(_&&_.prototype,{constructor:{value:P,writable:!0,configurable:!0}}),_&&v(P,_)})(j,w);var C,R,A=d(j);function j(){var P;return function(_,S){if(!(_ instanceof S))throw new TypeError("Cannot call a class as a function")}(this,j),(P=A.call(this)).map={fileVersion:j.STATIC_XFORMS.fileVersion,workbookPr:new u,bookViews:new r({tag:"bookViews",count:!1,childXform:new a}),sheets:new r({tag:"sheets",count:!1,childXform:new n}),definedNames:new r({tag:"definedNames",count:!1,childXform:new o}),calcPr:new l},P}return C=j,(R=[{key:"prepare",value:function(P){P.sheets=P.worksheets;var _=[],S=0;P.sheets.forEach(function(g){if(g.pageSetup&&g.pageSetup.printArea&&g.pageSetup.printArea.split("&&").forEach(function(D){var B=D.split(":"),F={name:"_xlnm.Print_Area",ranges:["'".concat(g.name,"'!$").concat(B[0],":$").concat(B[1])],localSheetId:S};_.push(F)}),g.pageSetup&&(g.pageSetup.printTitlesRow||g.pageSetup.printTitlesColumn)){var E=[];if(g.pageSetup.printTitlesColumn){var k=g.pageSetup.printTitlesColumn.split(":");E.push("'".concat(g.name,"'!$").concat(k[0],":$").concat(k[1]))}if(g.pageSetup.printTitlesRow){var x=g.pageSetup.printTitlesRow.split(":");E.push("'".concat(g.name,"'!$").concat(x[0],":$").concat(x[1]))}var M={name:"_xlnm.Print_Titles",ranges:E,localSheetId:S};_.push(M)}S++}),_.length&&(P.definedNames=P.definedNames.concat(_)),(P.media||[]).forEach(function(g,E){g.name=g.type+(E+1)})}},{key:"render",value:function(P,_){P.openXml(i.StdDocAttributes),P.openNode("workbook",j.WORKBOOK_ATTRIBUTES),this.map.fileVersion.render(P),this.map.workbookPr.render(P,_.properties),this.map.bookViews.render(P,_.views),this.map.sheets.render(P,_.sheets),this.map.definedNames.render(P,_.definedNames),this.map.calcPr.render(P,_.calcProperties),P.closeNode()}},{key:"parseOpen",value:function(P){if(this.parser)return this.parser.parseOpen(P),!0;switch(P.name){case"workbook":return!0;default:return this.parser=this.map[P.name],this.parser&&this.parser.parseOpen(P),!0}}},{key:"parseText",value:function(P){this.parser&&this.parser.parseText(P)}},{key:"parseClose",value:function(P){if(this.parser)return this.parser.parseClose(P)||(this.parser=void 0),!0;switch(P){case"workbook":return this.model={sheets:this.map.sheets.model,properties:this.map.workbookPr.model||{},views:this.map.bookViews.model,calcProperties:{}},this.map.definedNames.model&&(this.model.definedNames=this.map.definedNames.model),!1;default:return!0}}},{key:"reconcile",value:function(P){var _,S=(P.workbookRels||[]).reduce(function(x,M){return x[M.Id]=M,x},{}),g=[],E=0;(P.sheets||[]).forEach(function(x){var M=S[x.rId];M&&(_=P.worksheetHash["xl/".concat(M.Target.replace(/^(\s|\/xl\/)+/,""))])&&(_.name=x.name,_.id=x.id,_.state=x.state,g[E++]=_)});var k=[];h.each(P.definedNames,function(x){if(x.name==="_xlnm.Print_Area"){if(_=g[x.localSheetId]){_.pageSetup||(_.pageSetup={});var M=s.decodeEx(x.ranges[0]);_.pageSetup.printArea=_.pageSetup.printArea?"".concat(_.pageSetup.printArea,"&&").concat(M.dimensions):M.dimensions}}else if(x.name==="_xlnm.Print_Titles"){if(_=g[x.localSheetId]){_.pageSetup||(_.pageSetup={});var D=x.ranges.join(","),B=/\$/g,F=D.match(/\$\d+:\$\d+/);if(F&&F.length){var U=F[0];_.pageSetup.printTitlesRow=U.replace(B,"")}var H=D.match(/\$[A-Z]+:\$[A-Z]+/);if(H&&H.length){var V=H[0];_.pageSetup.printTitlesColumn=V.replace(B,"")}}}else k.push(x)}),P.definedNames=k,P.media.forEach(function(x,M){x.index=M})}}])&&p(C.prototype,R),j}(e);b.WORKBOOK_ATTRIBUTES={xmlns:"http://schemas.openxmlformats.org/spreadsheetml/2006/main","xmlns:r":"http://schemas.openxmlformats.org/officeDocument/2006/relationships","xmlns:mc":"http://schemas.openxmlformats.org/markup-compatibility/2006","mc:Ignorable":"x15","xmlns:x15":"http://schemas.microsoft.com/office/spreadsheetml/2010/11/main"},b.STATIC_XFORMS={fileVersion:new t({tag:"fileVersion",$:{appName:"xl",lastEdited:5,lowestEdited:5,rupBuild:9303}})},T.exports=b},{"../../../utils/col-cache":19,"../../../utils/under-dash":25,"../../../utils/xml-stream":27,"../base-xform":31,"../list-xform":70,"../static-xform":119,"./defined-name-xform":32,"./sheet-xform":33,"./workbook-calc-properties-xform":34,"./workbook-properties-xform":35,"./workbook-view-xform":36}],38:[function(c,T,O){function y(h,s){var i=Object.keys(h);if(Object.getOwnPropertySymbols){var e=Object.getOwnPropertySymbols(h);s&&(e=e.filter(function(t){return Object.getOwnPropertyDescriptor(h,t).enumerable})),i.push.apply(i,e)}return i}function p(h,s,i){return s in h?Object.defineProperty(h,s,{value:i,enumerable:!0,configurable:!0,writable:!0}):h[s]=i,h}var v=c("../strings/rich-text-xform"),d=c("../../../utils/utils"),m=c("../base-xform"),f=T.exports=function(h){this.model=h};d.inherits(f,m,{get tag(){return"r"},get richTextXform(){return this._richTextXform||(this._richTextXform=new v),this._richTextXform},render:function(h,s){var i=this;s=s||this.model,h.openNode("comment",{ref:s.ref,authorId:0}),h.openNode("text"),s&&s.note&&s.note.texts&&s.note.texts.forEach(function(e){i.richTextXform.render(h,e)}),h.closeNode(),h.closeNode()},parseOpen:function(h){if(this.parser)return this.parser.parseOpen(h),!0;switch(h.name){case"comment":return this.model=function(s){for(var i=1;i"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}();return function(){var e,t=f(s);if(i){var r=f(this).constructor;e=Reflect.construct(t,arguments,r)}else e=t.apply(this,arguments);return m(this,e)}}function m(s,i){return!i||y(i)!=="object"&&typeof i!="function"?function(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(s):i}function f(s){return(f=Object.setPrototypeOf?Object.getPrototypeOf:function(i){return i.__proto__||Object.getPrototypeOf(i)})(s)}var h=function(s){(function(o,n){if(typeof n!="function"&&n!==null)throw new TypeError("Super expression must either be null or a function");o.prototype=Object.create(n&&n.prototype,{constructor:{value:o,writable:!0,configurable:!0}}),n&&v(o,n)})(r,s);var i,e,t=d(r);function r(o){var n;return function(a,u){if(!(a instanceof u))throw new TypeError("Cannot call a class as a function")}(this,r),(n=t.call(this))._model=o,n}return i=r,(e=[{key:"render",value:function(o,n,a){(n===a[2]||this.tag==="x:SizeWithCells"&&n===a[1])&&o.leafNode(this.tag)}},{key:"parseOpen",value:function(o){switch(o.name){case this.tag:return this.model={},this.model[this.tag]=!0,!0;default:return!1}}},{key:"parseText",value:function(){}},{key:"parseClose",value:function(){return!1}},{key:"tag",get:function(){return this._model&&this._model.tag}}])&&p(i.prototype,e),r}(c("../../base-xform"));T.exports=h},{"../../base-xform":31}],41:[function(c,T,O){function y(s){return(y=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(i){return typeof i}:function(i){return i&&typeof Symbol=="function"&&i.constructor===Symbol&&i!==Symbol.prototype?"symbol":typeof i})(s)}function p(s,i){for(var e=0;e"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}();return function(){var e,t=f(s);if(i){var r=f(this).constructor;e=Reflect.construct(t,arguments,r)}else e=t.apply(this,arguments);return m(this,e)}}function m(s,i){return!i||y(i)!=="object"&&typeof i!="function"?function(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(s):i}function f(s){return(f=Object.setPrototypeOf?Object.getPrototypeOf:function(i){return i.__proto__||Object.getPrototypeOf(i)})(s)}var h=function(s){(function(o,n){if(typeof n!="function"&&n!==null)throw new TypeError("Super expression must either be null or a function");o.prototype=Object.create(n&&n.prototype,{constructor:{value:o,writable:!0,configurable:!0}}),n&&v(o,n)})(r,s);var i,e,t=d(r);function r(o){var n;return function(a,u){if(!(a instanceof u))throw new TypeError("Cannot call a class as a function")}(this,r),(n=t.call(this))._model=o,n}return i=r,(e=[{key:"render",value:function(o,n){o.leafNode(this.tag,null,n)}},{key:"parseOpen",value:function(o){switch(o.name){case this.tag:return this.text="",!0;default:return!1}}},{key:"parseText",value:function(o){this.text=o}},{key:"parseClose",value:function(){return!1}},{key:"tag",get:function(){return this._model&&this._model.tag}}])&&p(i.prototype,e),r}(c("../../base-xform"));T.exports=h},{"../../base-xform":31}],42:[function(c,T,O){function y(i){return(y=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(i)}function p(i,e){if(!(i instanceof e))throw new TypeError("Cannot call a class as a function")}function v(i,e){for(var t=0;t"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}();return function(){var t,r=h(i);if(e){var o=h(this).constructor;t=Reflect.construct(r,arguments,o)}else t=r.apply(this,arguments);return f(this,t)}}function f(i,e){return!e||y(e)!=="object"&&typeof e!="function"?function(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(i):e}function h(i){return(h=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(i)}var s=function(i){(function(n,a){if(typeof a!="function"&&a!==null)throw new TypeError("Super expression must either be null or a function");n.prototype=Object.create(a&&a.prototype,{constructor:{value:n,writable:!0,configurable:!0}}),a&&d(n,a)})(o,i);var e,t,r=m(o);function o(){return p(this,o),r.apply(this,arguments)}return e=o,(t=[{key:"getAnchorRect",value:function(n){var a=Math.floor(n.left),u=Math.floor(68*(n.left-a)),l=Math.floor(n.top),b=Math.floor(18*(n.top-l)),w=Math.floor(n.right),C=Math.floor(68*(n.right-w)),R=Math.floor(n.bottom);return[a,u,l,b,w,C,R,Math.floor(18*(n.bottom-R))]}},{key:"getDefaultRect",value:function(n){var a=n.col,u=Math.max(n.row-2,0);return[a,6,u,14,a+2,2,u+4,16]}},{key:"render",value:function(n,a){var u=a.anchor?this.getAnchorRect(a.anchor):this.getDefaultRect(a.refAddress);n.leafNode("x:Anchor",null,u.join(", "))}},{key:"parseOpen",value:function(n){switch(n.name){case this.tag:return this.text="",!0;default:return!1}}},{key:"parseText",value:function(n){this.text=n}},{key:"parseClose",value:function(){return!1}},{key:"tag",get:function(){return"x:Anchor"}}])&&v(e.prototype,t),o}(c("../base-xform"));T.exports=s},{"../base-xform":31}],43:[function(c,T,O){function y(o){return(y=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n})(o)}function p(o,n){for(var a=0;a"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}();return function(){var a,u=f(o);if(n){var l=f(this).constructor;a=Reflect.construct(u,arguments,l)}else a=u.apply(this,arguments);return m(this,a)}}function m(o,n){return!n||y(n)!=="object"&&typeof n!="function"?function(a){if(a===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return a}(o):n}function f(o){return(f=Object.setPrototypeOf?Object.getPrototypeOf:function(n){return n.__proto__||Object.getPrototypeOf(n)})(o)}var h=c("../base-xform"),s=c("./vml-anchor-xform"),i=c("./style/vml-protection-xform"),e=c("./style/vml-position-xform"),t=["twoCells","oneCells","absolute"],r=function(o){(function(b,w){if(typeof w!="function"&&w!==null)throw new TypeError("Super expression must either be null or a function");b.prototype=Object.create(w&&w.prototype,{constructor:{value:b,writable:!0,configurable:!0}}),w&&v(b,w)})(l,o);var n,a,u=d(l);function l(){var b;return function(w,C){if(!(w instanceof C))throw new TypeError("Cannot call a class as a function")}(this,l),(b=u.call(this)).map={"x:Anchor":new s,"x:Locked":new i({tag:"x:Locked"}),"x:LockText":new i({tag:"x:LockText"}),"x:SizeWithCells":new e({tag:"x:SizeWithCells"}),"x:MoveWithCells":new e({tag:"x:MoveWithCells"})},b}return n=l,(a=[{key:"render",value:function(b,w){var C=w.note,R=C.protection,A=C.editAs;b.openNode(this.tag,{ObjectType:"Note"}),this.map["x:MoveWithCells"].render(b,A,t),this.map["x:SizeWithCells"].render(b,A,t),this.map["x:Anchor"].render(b,w),this.map["x:Locked"].render(b,R.locked),b.leafNode("x:AutoFill",null,"False"),this.map["x:LockText"].render(b,R.lockText),b.leafNode("x:Row",null,w.refAddress.row-1),b.leafNode("x:Column",null,w.refAddress.col-1),b.closeNode()}},{key:"parseOpen",value:function(b){switch(b.name){case this.tag:this.reset(),this.model={anchor:[],protection:{},editAs:""};break;default:this.parser=this.map[b.name],this.parser&&this.parser.parseOpen(b)}return!0}},{key:"parseText",value:function(b){this.parser&&this.parser.parseText(b)}},{key:"parseClose",value:function(b){if(this.parser)return this.parser.parseClose(b)||(this.parser=void 0),!0;switch(b){case this.tag:return this.normalizeModel(),!1;default:return!0}}},{key:"normalizeModel",value:function(){var b=Object.assign({},this.map["x:MoveWithCells"].model,this.map["x:SizeWithCells"].model),w=Object.keys(b).length;this.model.editAs=t[w],this.model.anchor=this.map["x:Anchor"].text,this.model.protection.locked=this.map["x:Locked"].text,this.model.protection.lockText=this.map["x:LockText"].text}},{key:"tag",get:function(){return"x:ClientData"}}])&&p(n.prototype,a),l}(h);T.exports=r},{"../base-xform":31,"./style/vml-position-xform":40,"./style/vml-protection-xform":41,"./vml-anchor-xform":42}],44:[function(c,T,O){function y(t){return(y=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r})(t)}function p(t,r){for(var o=0;o"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}();return function(){var o,n=f(t);if(r){var a=f(this).constructor;o=Reflect.construct(n,arguments,a)}else o=n.apply(this,arguments);return m(this,o)}}function m(t,r){return!r||y(r)!=="object"&&typeof r!="function"?function(o){if(o===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return o}(t):r}function f(t){return(f=Object.setPrototypeOf?Object.getPrototypeOf:function(r){return r.__proto__||Object.getPrototypeOf(r)})(t)}var h=c("../../../utils/xml-stream"),s=c("../base-xform"),i=c("./vml-shape-xform"),e=function(t){(function(u,l){if(typeof l!="function"&&l!==null)throw new TypeError("Super expression must either be null or a function");u.prototype=Object.create(l&&l.prototype,{constructor:{value:u,writable:!0,configurable:!0}}),l&&v(u,l)})(a,t);var r,o,n=d(a);function a(){var u;return function(l,b){if(!(l instanceof b))throw new TypeError("Cannot call a class as a function")}(this,a),(u=n.call(this)).map={"v:shape":new i},u}return r=a,(o=[{key:"render",value:function(u,l){var b=this;u.openXml(h.StdDocAttributes),u.openNode(this.tag,a.DRAWING_ATTRIBUTES),u.openNode("o:shapelayout",{"v:ext":"edit"}),u.leafNode("o:idmap",{"v:ext":"edit",data:1}),u.closeNode(),u.openNode("v:shapetype",{id:"_x0000_t202",coordsize:"21600,21600","o:spt":202,path:"m,l,21600r21600,l21600,xe"}),u.leafNode("v:stroke",{joinstyle:"miter"}),u.leafNode("v:path",{gradientshapeok:"t","o:connecttype":"rect"}),u.closeNode(),l.comments.forEach(function(w,C){b.map["v:shape"].render(u,w,C)}),u.closeNode()}},{key:"parseOpen",value:function(u){if(this.parser)return this.parser.parseOpen(u),!0;switch(u.name){case this.tag:this.reset(),this.model={comments:[]};break;default:this.parser=this.map[u.name],this.parser&&this.parser.parseOpen(u)}return!0}},{key:"parseText",value:function(u){this.parser&&this.parser.parseText(u)}},{key:"parseClose",value:function(u){if(this.parser)return this.parser.parseClose(u)||(this.model.comments.push(this.parser.model),this.parser=void 0),!0;switch(u){case this.tag:return!1;default:return!0}}},{key:"reconcile",value:function(u,l){var b=this;u.anchors.forEach(function(w){w.br?b.map["xdr:twoCellAnchor"].reconcile(w,l):b.map["xdr:oneCellAnchor"].reconcile(w,l)})}},{key:"tag",get:function(){return"xml"}}])&&p(r.prototype,o),a}(s);e.DRAWING_ATTRIBUTES={"xmlns:v":"urn:schemas-microsoft-com:vml","xmlns:o":"urn:schemas-microsoft-com:office:office","xmlns:x":"urn:schemas-microsoft-com:office:excel"},T.exports=e},{"../../../utils/xml-stream":27,"../base-xform":31,"./vml-shape-xform":45}],45:[function(c,T,O){function y(t){return(y=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r})(t)}function p(t,r){for(var o=0;o"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}();return function(){var o,n=f(t);if(r){var a=f(this).constructor;o=Reflect.construct(n,arguments,a)}else o=n.apply(this,arguments);return m(this,o)}}function m(t,r){return!r||y(r)!=="object"&&typeof r!="function"?function(o){if(o===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return o}(t):r}function f(t){return(f=Object.setPrototypeOf?Object.getPrototypeOf:function(r){return r.__proto__||Object.getPrototypeOf(r)})(t)}var h=c("../base-xform"),s=c("./vml-textbox-xform"),i=c("./vml-client-data-xform"),e=function(t){(function(u,l){if(typeof l!="function"&&l!==null)throw new TypeError("Super expression must either be null or a function");u.prototype=Object.create(l&&l.prototype,{constructor:{value:u,writable:!0,configurable:!0}}),l&&v(u,l)})(a,t);var r,o,n=d(a);function a(){var u;return function(l,b){if(!(l instanceof b))throw new TypeError("Cannot call a class as a function")}(this,a),(u=n.call(this)).map={"v:textbox":new s,"x:ClientData":new i},u}return r=a,(o=[{key:"render",value:function(u,l,b){u.openNode("v:shape",a.V_SHAPE_ATTRIBUTES(l,b)),u.leafNode("v:fill",{color2:"infoBackground [80]"}),u.leafNode("v:shadow",{color:"none [81]",obscured:"t"}),u.leafNode("v:path",{"o:connecttype":"none"}),this.map["v:textbox"].render(u,l),this.map["x:ClientData"].render(u,l),u.closeNode()}},{key:"parseOpen",value:function(u){if(this.parser)return this.parser.parseOpen(u),!0;switch(u.name){case this.tag:this.reset(),this.model={margins:{insetmode:u.attributes["o:insetmode"]},anchor:"",editAs:"",protection:{}};break;default:this.parser=this.map[u.name],this.parser&&this.parser.parseOpen(u)}return!0}},{key:"parseText",value:function(u){this.parser&&this.parser.parseText(u)}},{key:"parseClose",value:function(u){if(this.parser)return this.parser.parseClose(u)||(this.parser=void 0),!0;switch(u){case this.tag:return this.model.margins.inset=this.map["v:textbox"].model&&this.map["v:textbox"].model.inset,this.model.protection=this.map["x:ClientData"].model&&this.map["x:ClientData"].model.protection,this.model.anchor=this.map["x:ClientData"].model&&this.map["x:ClientData"].model.anchor,this.model.editAs=this.map["x:ClientData"].model&&this.map["x:ClientData"].model.editAs,!1;default:return!0}}},{key:"tag",get:function(){return"v:shape"}}])&&p(r.prototype,o),a}(h);e.V_SHAPE_ATTRIBUTES=function(t,r){return{id:"_x0000_s".concat(1025+r),type:"#_x0000_t202",style:"position:absolute; margin-left:105.3pt;margin-top:10.5pt;width:97.8pt;height:59.1pt;z-index:1;visibility:hidden",fillcolor:"infoBackground [80]",strokecolor:"none [81]","o:insetmode":t.note.margins&&t.note.margins.insetmode}},T.exports=e},{"../base-xform":31,"./vml-client-data-xform":43,"./vml-textbox-xform":46}],46:[function(c,T,O){function y(i){return(y=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(i)}function p(i,e){if(!(i instanceof e))throw new TypeError("Cannot call a class as a function")}function v(i,e){for(var t=0;t"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}();return function(){var t,r=h(i);if(e){var o=h(this).constructor;t=Reflect.construct(r,arguments,o)}else t=r.apply(this,arguments);return f(this,t)}}function f(i,e){return!e||y(e)!=="object"&&typeof e!="function"?function(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(i):e}function h(i){return(h=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(i)}var s=function(i){(function(n,a){if(typeof a!="function"&&a!==null)throw new TypeError("Super expression must either be null or a function");n.prototype=Object.create(a&&a.prototype,{constructor:{value:n,writable:!0,configurable:!0}}),a&&d(n,a)})(o,i);var e,t,r=m(o);function o(){return p(this,o),r.apply(this,arguments)}return e=o,(t=[{key:"conversionUnit",value:function(n,a,u){return"".concat(parseFloat(n)*a.toFixed(2)).concat(u)}},{key:"reverseConversionUnit",value:function(n){var a=this;return(n||"").split(",").map(function(u){return Number(parseFloat(a.conversionUnit(parseFloat(u),.1,"")).toFixed(2))})}},{key:"render",value:function(n,a){var u=this,l={style:"mso-direction-alt:auto"};if(a&&a.note){var b=(a.note&&a.note.margins).inset;Array.isArray(b)&&(b=b.map(function(w){return u.conversionUnit(w,10,"mm")}).join(",")),b&&(l.inset=b)}n.openNode("v:textbox",l),n.leafNode("div",{style:"text-align:left"}),n.closeNode()}},{key:"parseOpen",value:function(n){switch(n.name){case this.tag:return this.model={inset:this.reverseConversionUnit(n.attributes.inset)},!0;default:return!0}}},{key:"parseText",value:function(){}},{key:"parseClose",value:function(n){switch(n){case this.tag:return!1;default:return!0}}},{key:"tag",get:function(){return"v:textbox"}}])&&v(e.prototype,t),o}(c("../base-xform"));T.exports=s},{"../base-xform":31}],47:[function(c,T,O){function y(i){return(y=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(i)}function p(i,e){if(!(i instanceof e))throw new TypeError("Cannot call a class as a function")}function v(i,e){for(var t=0;t"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}();return function(){var t,r=h(i);if(e){var o=h(this).constructor;t=Reflect.construct(r,arguments,o)}else t=r.apply(this,arguments);return f(this,t)}}function f(i,e){return!e||y(e)!=="object"&&typeof e!="function"?function(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(i):e}function h(i){return(h=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(i)}var s=function(i){(function(n,a){if(typeof a!="function"&&a!==null)throw new TypeError("Super expression must either be null or a function");n.prototype=Object.create(a&&a.prototype,{constructor:{value:n,writable:!0,configurable:!0}}),a&&d(n,a)})(o,i);var e,t,r=m(o);function o(){return p(this,o),r.apply(this,arguments)}return e=o,(t=[{key:"createNewModel",value:function(n){return{}}},{key:"parseOpen",value:function(n){return this.parser=this.parser||this.map[n.name],this.parser?(this.parser.parseOpen(n),!0):n.name===this.tag&&(this.model=this.createNewModel(n),!0)}},{key:"parseText",value:function(n){this.parser&&this.parser.parseText(n)}},{key:"onParserClose",value:function(n,a){this.model[n]=a.model}},{key:"parseClose",value:function(n){return this.parser?(this.parser.parseClose(n)||(this.onParserClose(n,this.parser),this.parser=void 0),!0):n!==this.tag}}])&&v(e.prototype,t),o}(c("./base-xform"));T.exports=s},{"./base-xform":31}],48:[function(c,T,O){function y(i){return(y=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(i)}function p(i,e){if(!(i instanceof e))throw new TypeError("Cannot call a class as a function")}function v(i,e){for(var t=0;t"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}();return function(){var t,r=h(i);if(e){var o=h(this).constructor;t=Reflect.construct(r,arguments,o)}else t=r.apply(this,arguments);return f(this,t)}}function f(i,e){return!e||y(e)!=="object"&&typeof e!="function"?function(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(i):e}function h(i){return(h=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(i)}var s=function(i){(function(n,a){if(typeof a!="function"&&a!==null)throw new TypeError("Super expression must either be null or a function");n.prototype=Object.create(a&&a.prototype,{constructor:{value:n,writable:!0,configurable:!0}}),a&&d(n,a)})(o,i);var e,t,r=m(o);function o(){return p(this,o),r.apply(this,arguments)}return e=o,(t=[{key:"render",value:function(n,a){n.openNode("HeadingPairs"),n.openNode("vt:vector",{size:2,baseType:"variant"}),n.openNode("vt:variant"),n.leafNode("vt:lpstr",void 0,"Worksheets"),n.closeNode(),n.openNode("vt:variant"),n.leafNode("vt:i4",void 0,a.length),n.closeNode(),n.closeNode(),n.closeNode()}},{key:"parseOpen",value:function(n){return n.name==="HeadingPairs"}},{key:"parseText",value:function(){}},{key:"parseClose",value:function(n){return n!=="HeadingPairs"}}])&&v(e.prototype,t),o}(c("../base-xform"));T.exports=s},{"../base-xform":31}],49:[function(c,T,O){function y(i){return(y=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(i)}function p(i,e){if(!(i instanceof e))throw new TypeError("Cannot call a class as a function")}function v(i,e){for(var t=0;t"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}();return function(){var t,r=h(i);if(e){var o=h(this).constructor;t=Reflect.construct(r,arguments,o)}else t=r.apply(this,arguments);return f(this,t)}}function f(i,e){return!e||y(e)!=="object"&&typeof e!="function"?function(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(i):e}function h(i){return(h=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(i)}var s=function(i){(function(n,a){if(typeof a!="function"&&a!==null)throw new TypeError("Super expression must either be null or a function");n.prototype=Object.create(a&&a.prototype,{constructor:{value:n,writable:!0,configurable:!0}}),a&&d(n,a)})(o,i);var e,t,r=m(o);function o(){return p(this,o),r.apply(this,arguments)}return e=o,(t=[{key:"render",value:function(n,a){n.openNode("TitlesOfParts"),n.openNode("vt:vector",{size:a.length,baseType:"lpstr"}),a.forEach(function(u){n.leafNode("vt:lpstr",void 0,u.name)}),n.closeNode(),n.closeNode()}},{key:"parseOpen",value:function(n){return n.name==="TitlesOfParts"}},{key:"parseText",value:function(){}},{key:"parseClose",value:function(n){return n!=="TitlesOfParts"}}])&&v(e.prototype,t),o}(c("../base-xform"));T.exports=s},{"../base-xform":31}],50:[function(c,T,O){function y(o){return(y=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n})(o)}function p(o,n){for(var a=0;a"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}();return function(){var a,u=f(o);if(n){var l=f(this).constructor;a=Reflect.construct(u,arguments,l)}else a=u.apply(this,arguments);return m(this,a)}}function m(o,n){return!n||y(n)!=="object"&&typeof n!="function"?function(a){if(a===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return a}(o):n}function f(o){return(f=Object.setPrototypeOf?Object.getPrototypeOf:function(n){return n.__proto__||Object.getPrototypeOf(n)})(o)}var h=c("../../../utils/xml-stream"),s=c("../base-xform"),i=c("../simple/string-xform"),e=c("./app-heading-pairs-xform"),t=c("./app-titles-of-parts-xform"),r=function(o){(function(b,w){if(typeof w!="function"&&w!==null)throw new TypeError("Super expression must either be null or a function");b.prototype=Object.create(w&&w.prototype,{constructor:{value:b,writable:!0,configurable:!0}}),w&&v(b,w)})(l,o);var n,a,u=d(l);function l(){var b;return function(w,C){if(!(w instanceof C))throw new TypeError("Cannot call a class as a function")}(this,l),(b=u.call(this)).map={Company:new i({tag:"Company"}),Manager:new i({tag:"Manager"}),HeadingPairs:new e,TitleOfParts:new t},b}return n=l,(a=[{key:"render",value:function(b,w){b.openXml(h.StdDocAttributes),b.openNode("Properties",l.PROPERTY_ATTRIBUTES),b.leafNode("Application",void 0,"Microsoft Excel"),b.leafNode("DocSecurity",void 0,"0"),b.leafNode("ScaleCrop",void 0,"false"),this.map.HeadingPairs.render(b,w.worksheets),this.map.TitleOfParts.render(b,w.worksheets),this.map.Company.render(b,w.company||""),this.map.Manager.render(b,w.manager),b.leafNode("LinksUpToDate",void 0,"false"),b.leafNode("SharedDoc",void 0,"false"),b.leafNode("HyperlinksChanged",void 0,"false"),b.leafNode("AppVersion",void 0,"16.0300"),b.closeNode()}},{key:"parseOpen",value:function(b){if(this.parser)return this.parser.parseOpen(b),!0;switch(b.name){case"Properties":return!0;default:return this.parser=this.map[b.name],!!this.parser&&(this.parser.parseOpen(b),!0)}}},{key:"parseText",value:function(b){this.parser&&this.parser.parseText(b)}},{key:"parseClose",value:function(b){if(this.parser)return this.parser.parseClose(b)||(this.parser=void 0),!0;switch(b){case"Properties":return this.model={worksheets:this.map.TitleOfParts.model,company:this.map.Company.model,manager:this.map.Manager.model},!1;default:return!0}}}])&&p(n.prototype,a),l}(s);r.DateFormat=function(o){return o.toISOString().replace(/[.]\d{3,6}/,"")},r.DateAttrs={"xsi:type":"dcterms:W3CDTF"},r.PROPERTY_ATTRIBUTES={xmlns:"http://schemas.openxmlformats.org/officeDocument/2006/extended-properties","xmlns:vt":"http://schemas.openxmlformats.org/officeDocument/2006/docPropsVTypes"},T.exports=r},{"../../../utils/xml-stream":27,"../base-xform":31,"../simple/string-xform":118,"./app-heading-pairs-xform":48,"./app-titles-of-parts-xform":49}],51:[function(c,T,O){function y(e){return(y=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(e)}function p(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function v(e,t){for(var r=0;r"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}();return function(){var r,o=h(e);if(t){var n=h(this).constructor;r=Reflect.construct(o,arguments,n)}else r=o.apply(this,arguments);return f(this,r)}}function f(e,t){return!t||y(t)!=="object"&&typeof t!="function"?function(r){if(r===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return r}(e):t}function h(e){return(h=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(e)}var s=c("../../../utils/xml-stream"),i=function(e){(function(a,u){if(typeof u!="function"&&u!==null)throw new TypeError("Super expression must either be null or a function");a.prototype=Object.create(u&&u.prototype,{constructor:{value:a,writable:!0,configurable:!0}}),u&&d(a,u)})(n,e);var t,r,o=m(n);function n(){return p(this,n),o.apply(this,arguments)}return t=n,(r=[{key:"render",value:function(a,u){a.openXml(s.StdDocAttributes),a.openNode("Types",n.PROPERTY_ATTRIBUTES);var l={};(u.media||[]).forEach(function(b){if(b.type==="image"){var w=b.extension;l[w]||(l[w]=!0,a.leafNode("Default",{Extension:w,ContentType:"image/".concat(w)}))}}),a.leafNode("Default",{Extension:"rels",ContentType:"application/vnd.openxmlformats-package.relationships+xml"}),a.leafNode("Default",{Extension:"xml",ContentType:"application/xml"}),a.leafNode("Override",{PartName:"/xl/workbook.xml",ContentType:"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet.main+xml"}),u.worksheets.forEach(function(b){var w="/xl/worksheets/sheet".concat(b.id,".xml");a.leafNode("Override",{PartName:w,ContentType:"application/vnd.openxmlformats-officedocument.spreadsheetml.worksheet+xml"})}),a.leafNode("Override",{PartName:"/xl/theme/theme1.xml",ContentType:"application/vnd.openxmlformats-officedocument.theme+xml"}),a.leafNode("Override",{PartName:"/xl/styles.xml",ContentType:"application/vnd.openxmlformats-officedocument.spreadsheetml.styles+xml"}),u.sharedStrings&&u.sharedStrings.count&&a.leafNode("Override",{PartName:"/xl/sharedStrings.xml",ContentType:"application/vnd.openxmlformats-officedocument.spreadsheetml.sharedStrings+xml"}),u.tables&&u.tables.forEach(function(b){a.leafNode("Override",{PartName:"/xl/tables/".concat(b.target),ContentType:"application/vnd.openxmlformats-officedocument.spreadsheetml.table+xml"})}),u.drawings&&u.drawings.forEach(function(b){a.leafNode("Override",{PartName:"/xl/drawings/".concat(b.name,".xml"),ContentType:"application/vnd.openxmlformats-officedocument.drawing+xml"})}),u.commentRefs&&(a.leafNode("Default",{Extension:"vml",ContentType:"application/vnd.openxmlformats-officedocument.vmlDrawing"}),u.commentRefs.forEach(function(b){var w=b.commentName;a.leafNode("Override",{PartName:"/xl/".concat(w,".xml"),ContentType:"application/vnd.openxmlformats-officedocument.spreadsheetml.comments+xml"})})),a.leafNode("Override",{PartName:"/docProps/core.xml",ContentType:"application/vnd.openxmlformats-package.core-properties+xml"}),a.leafNode("Override",{PartName:"/docProps/app.xml",ContentType:"application/vnd.openxmlformats-officedocument.extended-properties+xml"}),a.closeNode()}},{key:"parseOpen",value:function(){return!1}},{key:"parseText",value:function(){}},{key:"parseClose",value:function(){return!1}}])&&v(t.prototype,r),n}(c("../base-xform"));i.PROPERTY_ATTRIBUTES={xmlns:"http://schemas.openxmlformats.org/package/2006/content-types"},T.exports=i},{"../../../utils/xml-stream":27,"../base-xform":31}],52:[function(c,T,O){function y(o){return(y=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n})(o)}function p(o,n){for(var a=0;a"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}();return function(){var a,u=f(o);if(n){var l=f(this).constructor;a=Reflect.construct(u,arguments,l)}else a=u.apply(this,arguments);return m(this,a)}}function m(o,n){return!n||y(n)!=="object"&&typeof n!="function"?function(a){if(a===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return a}(o):n}function f(o){return(f=Object.setPrototypeOf?Object.getPrototypeOf:function(n){return n.__proto__||Object.getPrototypeOf(n)})(o)}var h=c("../../../utils/xml-stream"),s=c("../base-xform"),i=c("../simple/date-xform"),e=c("../simple/string-xform"),t=c("../simple/integer-xform"),r=function(o){(function(b,w){if(typeof w!="function"&&w!==null)throw new TypeError("Super expression must either be null or a function");b.prototype=Object.create(w&&w.prototype,{constructor:{value:b,writable:!0,configurable:!0}}),w&&v(b,w)})(l,o);var n,a,u=d(l);function l(){var b;return function(w,C){if(!(w instanceof C))throw new TypeError("Cannot call a class as a function")}(this,l),(b=u.call(this)).map={"dc:creator":new e({tag:"dc:creator"}),"dc:title":new e({tag:"dc:title"}),"dc:subject":new e({tag:"dc:subject"}),"dc:description":new e({tag:"dc:description"}),"dc:identifier":new e({tag:"dc:identifier"}),"dc:language":new e({tag:"dc:language"}),"cp:keywords":new e({tag:"cp:keywords"}),"cp:category":new e({tag:"cp:category"}),"cp:lastModifiedBy":new e({tag:"cp:lastModifiedBy"}),"cp:lastPrinted":new i({tag:"cp:lastPrinted",format:l.DateFormat}),"cp:revision":new t({tag:"cp:revision"}),"cp:version":new e({tag:"cp:version"}),"cp:contentStatus":new e({tag:"cp:contentStatus"}),"cp:contentType":new e({tag:"cp:contentType"}),"dcterms:created":new i({tag:"dcterms:created",attrs:l.DateAttrs,format:l.DateFormat}),"dcterms:modified":new i({tag:"dcterms:modified",attrs:l.DateAttrs,format:l.DateFormat})},b}return n=l,(a=[{key:"render",value:function(b,w){b.openXml(h.StdDocAttributes),b.openNode("cp:coreProperties",l.CORE_PROPERTY_ATTRIBUTES),this.map["dc:creator"].render(b,w.creator),this.map["dc:title"].render(b,w.title),this.map["dc:subject"].render(b,w.subject),this.map["dc:description"].render(b,w.description),this.map["dc:identifier"].render(b,w.identifier),this.map["dc:language"].render(b,w.language),this.map["cp:keywords"].render(b,w.keywords),this.map["cp:category"].render(b,w.category),this.map["cp:lastModifiedBy"].render(b,w.lastModifiedBy),this.map["cp:lastPrinted"].render(b,w.lastPrinted),this.map["cp:revision"].render(b,w.revision),this.map["cp:version"].render(b,w.version),this.map["cp:contentStatus"].render(b,w.contentStatus),this.map["cp:contentType"].render(b,w.contentType),this.map["dcterms:created"].render(b,w.created),this.map["dcterms:modified"].render(b,w.modified),b.closeNode()}},{key:"parseOpen",value:function(b){if(this.parser)return this.parser.parseOpen(b),!0;switch(b.name){case"cp:coreProperties":case"coreProperties":return!0;default:if(this.parser=this.map[b.name],this.parser)return this.parser.parseOpen(b),!0;throw new Error("Unexpected xml node in parseOpen: ".concat(JSON.stringify(b)))}}},{key:"parseText",value:function(b){this.parser&&this.parser.parseText(b)}},{key:"parseClose",value:function(b){if(this.parser)return this.parser.parseClose(b)||(this.parser=void 0),!0;switch(b){case"cp:coreProperties":case"coreProperties":return this.model={creator:this.map["dc:creator"].model,title:this.map["dc:title"].model,subject:this.map["dc:subject"].model,description:this.map["dc:description"].model,identifier:this.map["dc:identifier"].model,language:this.map["dc:language"].model,keywords:this.map["cp:keywords"].model,category:this.map["cp:category"].model,lastModifiedBy:this.map["cp:lastModifiedBy"].model,lastPrinted:this.map["cp:lastPrinted"].model,revision:this.map["cp:revision"].model,contentStatus:this.map["cp:contentStatus"].model,contentType:this.map["cp:contentType"].model,created:this.map["dcterms:created"].model,modified:this.map["dcterms:modified"].model},!1;default:throw new Error("Unexpected xml node in parseClose: ".concat(b))}}}])&&p(n.prototype,a),l}(s);r.DateFormat=function(o){return o.toISOString().replace(/[.]\d{3}/,"")},r.DateAttrs={"xsi:type":"dcterms:W3CDTF"},r.CORE_PROPERTY_ATTRIBUTES={"xmlns:cp":"http://schemas.openxmlformats.org/package/2006/metadata/core-properties","xmlns:dc":"http://purl.org/dc/elements/1.1/","xmlns:dcterms":"http://purl.org/dc/terms/","xmlns:dcmitype":"http://purl.org/dc/dcmitype/","xmlns:xsi":"http://www.w3.org/2001/XMLSchema-instance"},T.exports=r},{"../../../utils/xml-stream":27,"../base-xform":31,"../simple/date-xform":116,"../simple/integer-xform":117,"../simple/string-xform":118}],53:[function(c,T,O){function y(i){return(y=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(i)}function p(i,e){if(!(i instanceof e))throw new TypeError("Cannot call a class as a function")}function v(i,e){for(var t=0;t"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}();return function(){var t,r=h(i);if(e){var o=h(this).constructor;t=Reflect.construct(r,arguments,o)}else t=r.apply(this,arguments);return f(this,t)}}function f(i,e){return!e||y(e)!=="object"&&typeof e!="function"?function(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(i):e}function h(i){return(h=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(i)}var s=function(i){(function(n,a){if(typeof a!="function"&&a!==null)throw new TypeError("Super expression must either be null or a function");n.prototype=Object.create(a&&a.prototype,{constructor:{value:n,writable:!0,configurable:!0}}),a&&d(n,a)})(o,i);var e,t,r=m(o);function o(){return p(this,o),r.apply(this,arguments)}return e=o,(t=[{key:"render",value:function(n,a){n.leafNode("Relationship",a)}},{key:"parseOpen",value:function(n){switch(n.name){case"Relationship":return this.model=n.attributes,!0;default:return!1}}},{key:"parseText",value:function(){}},{key:"parseClose",value:function(){return!1}}])&&v(e.prototype,t),o}(c("../base-xform"));T.exports=s},{"../base-xform":31}],54:[function(c,T,O){function y(t){return(y=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r})(t)}function p(t,r){for(var o=0;o"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}();return function(){var o,n=f(t);if(r){var a=f(this).constructor;o=Reflect.construct(n,arguments,a)}else o=n.apply(this,arguments);return m(this,o)}}function m(t,r){return!r||y(r)!=="object"&&typeof r!="function"?function(o){if(o===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return o}(t):r}function f(t){return(f=Object.setPrototypeOf?Object.getPrototypeOf:function(r){return r.__proto__||Object.getPrototypeOf(r)})(t)}var h=c("../../../utils/xml-stream"),s=c("../base-xform"),i=c("./relationship-xform"),e=function(t){(function(u,l){if(typeof l!="function"&&l!==null)throw new TypeError("Super expression must either be null or a function");u.prototype=Object.create(l&&l.prototype,{constructor:{value:u,writable:!0,configurable:!0}}),l&&v(u,l)})(a,t);var r,o,n=d(a);function a(){var u;return function(l,b){if(!(l instanceof b))throw new TypeError("Cannot call a class as a function")}(this,a),(u=n.call(this)).map={Relationship:new i},u}return r=a,(o=[{key:"render",value:function(u,l){var b=this;l=l||this._values,u.openXml(h.StdDocAttributes),u.openNode("Relationships",a.RELATIONSHIPS_ATTRIBUTES),l.forEach(function(w){b.map.Relationship.render(u,w)}),u.closeNode()}},{key:"parseOpen",value:function(u){if(this.parser)return this.parser.parseOpen(u),!0;switch(u.name){case"Relationships":return this.model=[],!0;default:if(this.parser=this.map[u.name],this.parser)return this.parser.parseOpen(u),!0;throw new Error("Unexpected xml node in parseOpen: ".concat(JSON.stringify(u)))}}},{key:"parseText",value:function(u){this.parser&&this.parser.parseText(u)}},{key:"parseClose",value:function(u){if(this.parser)return this.parser.parseClose(u)||(this.model.push(this.parser.model),this.parser=void 0),!0;switch(u){case"Relationships":return!1;default:throw new Error("Unexpected xml node in parseClose: ".concat(u))}}}])&&p(r.prototype,o),a}(s);e.RELATIONSHIPS_ATTRIBUTES={xmlns:"http://schemas.openxmlformats.org/package/2006/relationships"},T.exports=e},{"../../../utils/xml-stream":27,"../base-xform":31,"./relationship-xform":53}],55:[function(c,T,O){function y(i){return(y=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(i)}function p(i,e){if(!(i instanceof e))throw new TypeError("Cannot call a class as a function")}function v(i,e){for(var t=0;t"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}();return function(){var t,r=h(i);if(e){var o=h(this).constructor;t=Reflect.construct(r,arguments,o)}else t=r.apply(this,arguments);return f(this,t)}}function f(i,e){return!e||y(e)!=="object"&&typeof e!="function"?function(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(i):e}function h(i){return(h=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(i)}var s=function(i){(function(n,a){if(typeof a!="function"&&a!==null)throw new TypeError("Super expression must either be null or a function");n.prototype=Object.create(a&&a.prototype,{constructor:{value:n,writable:!0,configurable:!0}}),a&&d(n,a)})(o,i);var e,t,r=m(o);function o(){return p(this,o),r.apply(this,arguments)}return e=o,(t=[{key:"parseOpen",value:function(n){if(this.parser)return this.parser.parseOpen(n),!0;switch(n.name){case this.tag:this.reset(),this.model={range:{editAs:n.attributes.editAs||"oneCell"}};break;default:this.parser=this.map[n.name],this.parser&&this.parser.parseOpen(n)}return!0}},{key:"parseText",value:function(n){this.parser&&this.parser.parseText(n)}},{key:"reconcilePicture",value:function(n,a){if(n&&n.rId){var u=a.rels[n.rId].Target.match(/.*\/media\/(.+[.][a-zA-Z]{3,4})/);if(u){var l=u[1],b=a.mediaIndex[l];return a.media[b]}}}}])&&v(e.prototype,t),o}(c("../base-xform"));T.exports=s},{"../base-xform":31}],56:[function(c,T,O){function y(e){return(y=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(e)}function p(e,t){for(var r=0;r"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}();return function(){var r,o=f(e);if(t){var n=f(this).constructor;r=Reflect.construct(o,arguments,n)}else r=o.apply(this,arguments);return m(this,r)}}function m(e,t){return!t||y(t)!=="object"&&typeof t!="function"?function(r){if(r===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return r}(e):t}function f(e){return(f=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(e)}var h=c("../base-xform"),s=c("./blip-xform"),i=function(e){(function(a,u){if(typeof u!="function"&&u!==null)throw new TypeError("Super expression must either be null or a function");a.prototype=Object.create(u&&u.prototype,{constructor:{value:a,writable:!0,configurable:!0}}),u&&v(a,u)})(n,e);var t,r,o=d(n);function n(){var a;return function(u,l){if(!(u instanceof l))throw new TypeError("Cannot call a class as a function")}(this,n),(a=o.call(this)).map={"a:blip":new s},a}return t=n,(r=[{key:"render",value:function(a,u){a.openNode(this.tag),this.map["a:blip"].render(a,u),a.openNode("a:stretch"),a.leafNode("a:fillRect"),a.closeNode(),a.closeNode()}},{key:"parseOpen",value:function(a){if(this.parser)return this.parser.parseOpen(a),!0;switch(a.name){case this.tag:this.reset();break;default:this.parser=this.map[a.name],this.parser&&this.parser.parseOpen(a)}return!0}},{key:"parseText",value:function(){}},{key:"parseClose",value:function(a){if(this.parser)return this.parser.parseClose(a)||(this.parser=void 0),!0;switch(a){case this.tag:return this.model=this.map["a:blip"].model,!1;default:return!0}}},{key:"tag",get:function(){return"xdr:blipFill"}}])&&p(t.prototype,r),n}(h);T.exports=i},{"../base-xform":31,"./blip-xform":57}],57:[function(c,T,O){function y(i){return(y=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(i)}function p(i,e){if(!(i instanceof e))throw new TypeError("Cannot call a class as a function")}function v(i,e){for(var t=0;t"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}();return function(){var t,r=h(i);if(e){var o=h(this).constructor;t=Reflect.construct(r,arguments,o)}else t=r.apply(this,arguments);return f(this,t)}}function f(i,e){return!e||y(e)!=="object"&&typeof e!="function"?function(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(i):e}function h(i){return(h=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(i)}var s=function(i){(function(n,a){if(typeof a!="function"&&a!==null)throw new TypeError("Super expression must either be null or a function");n.prototype=Object.create(a&&a.prototype,{constructor:{value:n,writable:!0,configurable:!0}}),a&&d(n,a)})(o,i);var e,t,r=m(o);function o(){return p(this,o),r.apply(this,arguments)}return e=o,(t=[{key:"render",value:function(n,a){n.leafNode(this.tag,{"xmlns:r":"http://schemas.openxmlformats.org/officeDocument/2006/relationships","r:embed":a.rId,cstate:"print"})}},{key:"parseOpen",value:function(n){switch(n.name){case this.tag:return this.model={rId:n.attributes["r:embed"]},!0;default:return!0}}},{key:"parseText",value:function(){}},{key:"parseClose",value:function(n){switch(n){case this.tag:return!1;default:return!0}}},{key:"tag",get:function(){return"a:blip"}}])&&v(e.prototype,t),o}(c("../base-xform"));T.exports=s},{"../base-xform":31}],58:[function(c,T,O){function y(i){return(y=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(i)}function p(i,e){if(!(i instanceof e))throw new TypeError("Cannot call a class as a function")}function v(i,e){for(var t=0;t"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}();return function(){var t,r=h(i);if(e){var o=h(this).constructor;t=Reflect.construct(r,arguments,o)}else t=r.apply(this,arguments);return f(this,t)}}function f(i,e){return!e||y(e)!=="object"&&typeof e!="function"?function(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(i):e}function h(i){return(h=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(i)}var s=function(i){(function(n,a){if(typeof a!="function"&&a!==null)throw new TypeError("Super expression must either be null or a function");n.prototype=Object.create(a&&a.prototype,{constructor:{value:n,writable:!0,configurable:!0}}),a&&d(n,a)})(o,i);var e,t,r=m(o);function o(){return p(this,o),r.apply(this,arguments)}return e=o,(t=[{key:"render",value:function(n){n.openNode(this.tag),n.leafNode("a:picLocks",{noChangeAspect:"1"}),n.closeNode()}},{key:"parseOpen",value:function(n){switch(n.name){case this.tag:default:return!0}}},{key:"parseText",value:function(){}},{key:"parseClose",value:function(n){switch(n){case this.tag:return!1;default:return!0}}},{key:"tag",get:function(){return"xdr:cNvPicPr"}}])&&v(e.prototype,t),o}(c("../base-xform"));T.exports=s},{"../base-xform":31}],59:[function(c,T,O){function y(t){return(y=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r})(t)}function p(t,r){for(var o=0;o"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}();return function(){var o,n=f(t);if(r){var a=f(this).constructor;o=Reflect.construct(n,arguments,a)}else o=n.apply(this,arguments);return m(this,o)}}function m(t,r){return!r||y(r)!=="object"&&typeof r!="function"?function(o){if(o===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return o}(t):r}function f(t){return(f=Object.setPrototypeOf?Object.getPrototypeOf:function(r){return r.__proto__||Object.getPrototypeOf(r)})(t)}var h=c("../base-xform"),s=c("./hlink-click-xform"),i=c("./ext-lst-xform"),e=function(t){(function(u,l){if(typeof l!="function"&&l!==null)throw new TypeError("Super expression must either be null or a function");u.prototype=Object.create(l&&l.prototype,{constructor:{value:u,writable:!0,configurable:!0}}),l&&v(u,l)})(a,t);var r,o,n=d(a);function a(){var u;return function(l,b){if(!(l instanceof b))throw new TypeError("Cannot call a class as a function")}(this,a),(u=n.call(this)).map={"a:hlinkClick":new s,"a:extLst":new i},u}return r=a,(o=[{key:"render",value:function(u,l){u.openNode(this.tag,{id:l.index,name:"Picture ".concat(l.index)}),this.map["a:hlinkClick"].render(u,l),this.map["a:extLst"].render(u,l),u.closeNode()}},{key:"parseOpen",value:function(u){if(this.parser)return this.parser.parseOpen(u),!0;switch(u.name){case this.tag:this.reset();break;default:this.parser=this.map[u.name],this.parser&&this.parser.parseOpen(u)}return!0}},{key:"parseText",value:function(){}},{key:"parseClose",value:function(u){if(this.parser)return this.parser.parseClose(u)||(this.parser=void 0),!0;switch(u){case this.tag:return this.model=this.map["a:hlinkClick"].model,!1;default:return!0}}},{key:"tag",get:function(){return"xdr:cNvPr"}}])&&p(r.prototype,o),a}(h);T.exports=e},{"../base-xform":31,"./ext-lst-xform":62,"./hlink-click-xform":64}],60:[function(c,T,O){function y(e){return(y=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(e)}function p(e,t){for(var r=0;r"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}();return function(){var r,o=f(e);if(t){var n=f(this).constructor;r=Reflect.construct(o,arguments,n)}else r=o.apply(this,arguments);return m(this,r)}}function m(e,t){return!t||y(t)!=="object"&&typeof t!="function"?function(r){if(r===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return r}(e):t}function f(e){return(f=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(e)}var h=c("../base-xform"),s=c("../simple/integer-xform"),i=function(e){(function(a,u){if(typeof u!="function"&&u!==null)throw new TypeError("Super expression must either be null or a function");a.prototype=Object.create(u&&u.prototype,{constructor:{value:a,writable:!0,configurable:!0}}),u&&v(a,u)})(n,e);var t,r,o=d(n);function n(a){var u;return function(l,b){if(!(l instanceof b))throw new TypeError("Cannot call a class as a function")}(this,n),(u=o.call(this)).tag=a.tag,u.map={"xdr:col":new s({tag:"xdr:col",zero:!0}),"xdr:colOff":new s({tag:"xdr:colOff",zero:!0}),"xdr:row":new s({tag:"xdr:row",zero:!0}),"xdr:rowOff":new s({tag:"xdr:rowOff",zero:!0})},u}return t=n,(r=[{key:"render",value:function(a,u){a.openNode(this.tag),this.map["xdr:col"].render(a,u.nativeCol),this.map["xdr:colOff"].render(a,u.nativeColOff),this.map["xdr:row"].render(a,u.nativeRow),this.map["xdr:rowOff"].render(a,u.nativeRowOff),a.closeNode()}},{key:"parseOpen",value:function(a){if(this.parser)return this.parser.parseOpen(a),!0;switch(a.name){case this.tag:this.reset();break;default:this.parser=this.map[a.name],this.parser&&this.parser.parseOpen(a)}return!0}},{key:"parseText",value:function(a){this.parser&&this.parser.parseText(a)}},{key:"parseClose",value:function(a){if(this.parser)return this.parser.parseClose(a)||(this.parser=void 0),!0;switch(a){case this.tag:return this.model={nativeCol:this.map["xdr:col"].model,nativeColOff:this.map["xdr:colOff"].model,nativeRow:this.map["xdr:row"].model,nativeRowOff:this.map["xdr:rowOff"].model},!1;default:return!0}}}])&&p(t.prototype,r),n}(h);T.exports=i},{"../base-xform":31,"../simple/integer-xform":117}],61:[function(c,T,O){function y(o){return(y=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n})(o)}function p(o,n){for(var a=0;a"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}();return function(){var a,u=f(o);if(n){var l=f(this).constructor;a=Reflect.construct(u,arguments,l)}else a=u.apply(this,arguments);return m(this,a)}}function m(o,n){return!n||y(n)!=="object"&&typeof n!="function"?function(a){if(a===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return a}(o):n}function f(o){return(f=Object.setPrototypeOf?Object.getPrototypeOf:function(n){return n.__proto__||Object.getPrototypeOf(n)})(o)}var h=c("../../../utils/col-cache"),s=c("../../../utils/xml-stream"),i=c("../base-xform"),e=c("./two-cell-anchor-xform"),t=c("./one-cell-anchor-xform"),r=function(o){(function(b,w){if(typeof w!="function"&&w!==null)throw new TypeError("Super expression must either be null or a function");b.prototype=Object.create(w&&w.prototype,{constructor:{value:b,writable:!0,configurable:!0}}),w&&v(b,w)})(l,o);var n,a,u=d(l);function l(){var b;return function(w,C){if(!(w instanceof C))throw new TypeError("Cannot call a class as a function")}(this,l),(b=u.call(this)).map={"xdr:twoCellAnchor":new e,"xdr:oneCellAnchor":new t},b}return n=l,(a=[{key:"prepare",value:function(b){var w=this;b.anchors.forEach(function(C,R){C.anchorType=function(A){return(typeof A.range=="string"?h.decode(A.range):A.range).br?"xdr:twoCellAnchor":"xdr:oneCellAnchor"}(C),w.map[C.anchorType].prepare(C,{index:R})})}},{key:"render",value:function(b,w){var C=this;b.openXml(s.StdDocAttributes),b.openNode(this.tag,l.DRAWING_ATTRIBUTES),w.anchors.forEach(function(R){C.map[R.anchorType].render(b,R)}),b.closeNode()}},{key:"parseOpen",value:function(b){if(this.parser)return this.parser.parseOpen(b),!0;switch(b.name){case this.tag:this.reset(),this.model={anchors:[]};break;default:this.parser=this.map[b.name],this.parser&&this.parser.parseOpen(b)}return!0}},{key:"parseText",value:function(b){this.parser&&this.parser.parseText(b)}},{key:"parseClose",value:function(b){if(this.parser)return this.parser.parseClose(b)||(this.model.anchors.push(this.parser.model),this.parser=void 0),!0;switch(b){case this.tag:return!1;default:return!0}}},{key:"reconcile",value:function(b,w){var C=this;b.anchors.forEach(function(R){R.br?C.map["xdr:twoCellAnchor"].reconcile(R,w):C.map["xdr:oneCellAnchor"].reconcile(R,w)})}},{key:"tag",get:function(){return"xdr:wsDr"}}])&&p(n.prototype,a),l}(i);r.DRAWING_ATTRIBUTES={"xmlns:xdr":"http://schemas.openxmlformats.org/drawingml/2006/spreadsheetDrawing","xmlns:a":"http://schemas.openxmlformats.org/drawingml/2006/main"},T.exports=r},{"../../../utils/col-cache":19,"../../../utils/xml-stream":27,"../base-xform":31,"./one-cell-anchor-xform":66,"./two-cell-anchor-xform":69}],62:[function(c,T,O){function y(i){return(y=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(i)}function p(i,e){if(!(i instanceof e))throw new TypeError("Cannot call a class as a function")}function v(i,e){for(var t=0;t"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}();return function(){var t,r=h(i);if(e){var o=h(this).constructor;t=Reflect.construct(r,arguments,o)}else t=r.apply(this,arguments);return f(this,t)}}function f(i,e){return!e||y(e)!=="object"&&typeof e!="function"?function(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(i):e}function h(i){return(h=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(i)}var s=function(i){(function(n,a){if(typeof a!="function"&&a!==null)throw new TypeError("Super expression must either be null or a function");n.prototype=Object.create(a&&a.prototype,{constructor:{value:n,writable:!0,configurable:!0}}),a&&d(n,a)})(o,i);var e,t,r=m(o);function o(){return p(this,o),r.apply(this,arguments)}return e=o,(t=[{key:"render",value:function(n){n.openNode(this.tag),n.openNode("a:ext",{uri:"{FF2B5EF4-FFF2-40B4-BE49-F238E27FC236}"}),n.leafNode("a16:creationId",{"xmlns:a16":"http://schemas.microsoft.com/office/drawing/2014/main",id:"{00000000-0008-0000-0000-000002000000}"}),n.closeNode(),n.closeNode()}},{key:"parseOpen",value:function(n){switch(n.name){case this.tag:default:return!0}}},{key:"parseText",value:function(){}},{key:"parseClose",value:function(n){switch(n){case this.tag:return!1;default:return!0}}},{key:"tag",get:function(){return"a:extLst"}}])&&v(e.prototype,t),o}(c("../base-xform"));T.exports=s},{"../base-xform":31}],63:[function(c,T,O){function y(i){return(y=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(i)}function p(i,e){for(var t=0;t"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}();return function(){var t,r=f(i);if(e){var o=f(this).constructor;t=Reflect.construct(r,arguments,o)}else t=r.apply(this,arguments);return m(this,t)}}function m(i,e){return!e||y(e)!=="object"&&typeof e!="function"?function(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(i):e}function f(i){return(f=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(i)}var h=c("../base-xform"),s=function(i){(function(n,a){if(typeof a!="function"&&a!==null)throw new TypeError("Super expression must either be null or a function");n.prototype=Object.create(a&&a.prototype,{constructor:{value:n,writable:!0,configurable:!0}}),a&&v(n,a)})(o,i);var e,t,r=d(o);function o(n){var a;return function(u,l){if(!(u instanceof l))throw new TypeError("Cannot call a class as a function")}(this,o),(a=r.call(this)).tag=n.tag,a.map={},a}return e=o,(t=[{key:"render",value:function(n,a){n.openNode(this.tag);var u=Math.floor(9525*a.width),l=Math.floor(9525*a.height);n.addAttribute("cx",u),n.addAttribute("cy",l),n.closeNode()}},{key:"parseOpen",value:function(n){return n.name===this.tag&&(this.model={width:parseInt(n.attributes.cx||"0",10)/9525,height:parseInt(n.attributes.cy||"0",10)/9525},!0)}},{key:"parseText",value:function(){}},{key:"parseClose",value:function(){return!1}}])&&p(e.prototype,t),o}(h);T.exports=s},{"../base-xform":31}],64:[function(c,T,O){function y(i){return(y=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(i)}function p(i,e){if(!(i instanceof e))throw new TypeError("Cannot call a class as a function")}function v(i,e){for(var t=0;t"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}();return function(){var t,r=h(i);if(e){var o=h(this).constructor;t=Reflect.construct(r,arguments,o)}else t=r.apply(this,arguments);return f(this,t)}}function f(i,e){return!e||y(e)!=="object"&&typeof e!="function"?function(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(i):e}function h(i){return(h=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(i)}var s=function(i){(function(n,a){if(typeof a!="function"&&a!==null)throw new TypeError("Super expression must either be null or a function");n.prototype=Object.create(a&&a.prototype,{constructor:{value:n,writable:!0,configurable:!0}}),a&&d(n,a)})(o,i);var e,t,r=m(o);function o(){return p(this,o),r.apply(this,arguments)}return e=o,(t=[{key:"render",value:function(n,a){a.hyperlinks&&a.hyperlinks.rId&&n.leafNode(this.tag,{"xmlns:r":"http://schemas.openxmlformats.org/officeDocument/2006/relationships","r:id":a.hyperlinks.rId,tooltip:a.hyperlinks.tooltip})}},{key:"parseOpen",value:function(n){switch(n.name){case this.tag:return this.model={hyperlinks:{rId:n.attributes["r:id"],tooltip:n.attributes.tooltip}},!0;default:return!0}}},{key:"parseText",value:function(){}},{key:"parseClose",value:function(){return!1}},{key:"tag",get:function(){return"a:hlinkClick"}}])&&v(e.prototype,t),o}(c("../base-xform"));T.exports=s},{"../base-xform":31}],65:[function(c,T,O){function y(t){return(y=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r})(t)}function p(t,r){for(var o=0;o"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}();return function(){var o,n=f(t);if(r){var a=f(this).constructor;o=Reflect.construct(n,arguments,a)}else o=n.apply(this,arguments);return m(this,o)}}function m(t,r){return!r||y(r)!=="object"&&typeof r!="function"?function(o){if(o===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return o}(t):r}function f(t){return(f=Object.setPrototypeOf?Object.getPrototypeOf:function(r){return r.__proto__||Object.getPrototypeOf(r)})(t)}var h=c("../base-xform"),s=c("./c-nv-pr-xform"),i=c("./c-nv-pic-pr-xform"),e=function(t){(function(u,l){if(typeof l!="function"&&l!==null)throw new TypeError("Super expression must either be null or a function");u.prototype=Object.create(l&&l.prototype,{constructor:{value:u,writable:!0,configurable:!0}}),l&&v(u,l)})(a,t);var r,o,n=d(a);function a(){var u;return function(l,b){if(!(l instanceof b))throw new TypeError("Cannot call a class as a function")}(this,a),(u=n.call(this)).map={"xdr:cNvPr":new s,"xdr:cNvPicPr":new i},u}return r=a,(o=[{key:"render",value:function(u,l){u.openNode(this.tag),this.map["xdr:cNvPr"].render(u,l),this.map["xdr:cNvPicPr"].render(u,l),u.closeNode()}},{key:"parseOpen",value:function(u){if(this.parser)return this.parser.parseOpen(u),!0;switch(u.name){case this.tag:this.reset();break;default:this.parser=this.map[u.name],this.parser&&this.parser.parseOpen(u)}return!0}},{key:"parseText",value:function(){}},{key:"parseClose",value:function(u){if(this.parser)return this.parser.parseClose(u)||(this.parser=void 0),!0;switch(u){case this.tag:return this.model=this.map["xdr:cNvPr"].model,!1;default:return!0}}},{key:"tag",get:function(){return"xdr:nvPicPr"}}])&&p(r.prototype,o),a}(h);T.exports=e},{"../base-xform":31,"./c-nv-pic-pr-xform":58,"./c-nv-pr-xform":59}],66:[function(c,T,O){function y(o){return(y=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n})(o)}function p(o,n){for(var a=0;a"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}();return function(){var a,u=f(o);if(n){var l=f(this).constructor;a=Reflect.construct(u,arguments,l)}else a=u.apply(this,arguments);return m(this,a)}}function m(o,n){return!n||y(n)!=="object"&&typeof n!="function"?function(a){if(a===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return a}(o):n}function f(o){return(f=Object.setPrototypeOf?Object.getPrototypeOf:function(n){return n.__proto__||Object.getPrototypeOf(n)})(o)}var h=c("./base-cell-anchor-xform"),s=c("../static-xform"),i=c("./cell-position-xform"),e=c("./ext-xform"),t=c("./pic-xform"),r=function(o){(function(b,w){if(typeof w!="function"&&w!==null)throw new TypeError("Super expression must either be null or a function");b.prototype=Object.create(w&&w.prototype,{constructor:{value:b,writable:!0,configurable:!0}}),w&&v(b,w)})(l,o);var n,a,u=d(l);function l(){var b;return function(w,C){if(!(w instanceof C))throw new TypeError("Cannot call a class as a function")}(this,l),(b=u.call(this)).map={"xdr:from":new i({tag:"xdr:from"}),"xdr:ext":new e({tag:"xdr:ext"}),"xdr:pic":new t,"xdr:clientData":new s({tag:"xdr:clientData"})},b}return n=l,(a=[{key:"prepare",value:function(b,w){this.map["xdr:pic"].prepare(b.picture,w)}},{key:"render",value:function(b,w){b.openNode(this.tag,{editAs:w.range.editAs||"oneCell"}),this.map["xdr:from"].render(b,w.range.tl),this.map["xdr:ext"].render(b,w.range.ext),this.map["xdr:pic"].render(b,w.picture),this.map["xdr:clientData"].render(b,{}),b.closeNode()}},{key:"parseClose",value:function(b){if(this.parser)return this.parser.parseClose(b)||(this.parser=void 0),!0;switch(b){case this.tag:return this.model.range.tl=this.map["xdr:from"].model,this.model.range.ext=this.map["xdr:ext"].model,this.model.picture=this.map["xdr:pic"].model,!1;default:return!0}}},{key:"reconcile",value:function(b,w){b.medium=this.reconcilePicture(b.picture,w)}},{key:"tag",get:function(){return"xdr:oneCellAnchor"}}])&&p(n.prototype,a),l}(h);T.exports=r},{"../static-xform":119,"./base-cell-anchor-xform":55,"./cell-position-xform":60,"./ext-xform":63,"./pic-xform":67}],67:[function(c,T,O){function y(o){return(y=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n})(o)}function p(o,n){for(var a=0;a"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}();return function(){var a,u=f(o);if(n){var l=f(this).constructor;a=Reflect.construct(u,arguments,l)}else a=u.apply(this,arguments);return m(this,a)}}function m(o,n){return!n||y(n)!=="object"&&typeof n!="function"?function(a){if(a===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return a}(o):n}function f(o){return(f=Object.setPrototypeOf?Object.getPrototypeOf:function(n){return n.__proto__||Object.getPrototypeOf(n)})(o)}var h=c("../base-xform"),s=c("../static-xform"),i=c("./blip-fill-xform"),e=c("./nv-pic-pr-xform"),t=c("./sp-pr"),r=function(o){(function(b,w){if(typeof w!="function"&&w!==null)throw new TypeError("Super expression must either be null or a function");b.prototype=Object.create(w&&w.prototype,{constructor:{value:b,writable:!0,configurable:!0}}),w&&v(b,w)})(l,o);var n,a,u=d(l);function l(){var b;return function(w,C){if(!(w instanceof C))throw new TypeError("Cannot call a class as a function")}(this,l),(b=u.call(this)).map={"xdr:nvPicPr":new e,"xdr:blipFill":new i,"xdr:spPr":new s(t)},b}return n=l,(a=[{key:"prepare",value:function(b,w){b.index=w.index+1}},{key:"render",value:function(b,w){b.openNode(this.tag),this.map["xdr:nvPicPr"].render(b,w),this.map["xdr:blipFill"].render(b,w),this.map["xdr:spPr"].render(b,w),b.closeNode()}},{key:"parseOpen",value:function(b){if(this.parser)return this.parser.parseOpen(b),!0;switch(b.name){case this.tag:this.reset();break;default:this.parser=this.map[b.name],this.parser&&this.parser.parseOpen(b)}return!0}},{key:"parseText",value:function(){}},{key:"parseClose",value:function(b){if(this.parser)return this.parser.parseClose(b)||(this.mergeModel(this.parser.model),this.parser=void 0),!0;switch(b){case this.tag:return!1;default:return!0}}},{key:"tag",get:function(){return"xdr:pic"}}])&&p(n.prototype,a),l}(h);T.exports=r},{"../base-xform":31,"../static-xform":119,"./blip-fill-xform":56,"./nv-pic-pr-xform":65,"./sp-pr":68}],68:[function(c,T,O){T.exports={tag:"xdr:spPr",c:[{tag:"a:xfrm",c:[{tag:"a:off",$:{x:"0",y:"0"}},{tag:"a:ext",$:{cx:"0",cy:"0"}}]},{tag:"a:prstGeom",$:{prst:"rect"},c:[{tag:"a:avLst"}]}]}},{}],69:[function(c,T,O){function y(r){return(y=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(o){return typeof o}:function(o){return o&&typeof Symbol=="function"&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o})(r)}function p(r,o){for(var n=0;n"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}();return function(){var n,a=f(r);if(o){var u=f(this).constructor;n=Reflect.construct(a,arguments,u)}else n=a.apply(this,arguments);return m(this,n)}}function m(r,o){return!o||y(o)!=="object"&&typeof o!="function"?function(n){if(n===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return n}(r):o}function f(r){return(f=Object.setPrototypeOf?Object.getPrototypeOf:function(o){return o.__proto__||Object.getPrototypeOf(o)})(r)}var h=c("./base-cell-anchor-xform"),s=c("../static-xform"),i=c("./cell-position-xform"),e=c("./pic-xform"),t=function(r){(function(l,b){if(typeof b!="function"&&b!==null)throw new TypeError("Super expression must either be null or a function");l.prototype=Object.create(b&&b.prototype,{constructor:{value:l,writable:!0,configurable:!0}}),b&&v(l,b)})(u,r);var o,n,a=d(u);function u(){var l;return function(b,w){if(!(b instanceof w))throw new TypeError("Cannot call a class as a function")}(this,u),(l=a.call(this)).map={"xdr:from":new i({tag:"xdr:from"}),"xdr:to":new i({tag:"xdr:to"}),"xdr:pic":new e,"xdr:clientData":new s({tag:"xdr:clientData"})},l}return o=u,(n=[{key:"prepare",value:function(l,b){this.map["xdr:pic"].prepare(l.picture,b)}},{key:"render",value:function(l,b){l.openNode(this.tag,{editAs:b.range.editAs||"oneCell"}),this.map["xdr:from"].render(l,b.range.tl),this.map["xdr:to"].render(l,b.range.br),this.map["xdr:pic"].render(l,b.picture),this.map["xdr:clientData"].render(l,{}),l.closeNode()}},{key:"parseClose",value:function(l){if(this.parser)return this.parser.parseClose(l)||(this.parser=void 0),!0;switch(l){case this.tag:return this.model.range.tl=this.map["xdr:from"].model,this.model.range.br=this.map["xdr:to"].model,this.model.picture=this.map["xdr:pic"].model,!1;default:return!0}}},{key:"reconcile",value:function(l,b){l.medium=this.reconcilePicture(l.picture,b)}},{key:"tag",get:function(){return"xdr:twoCellAnchor"}}])&&p(o.prototype,n),u}(h);T.exports=t},{"../static-xform":119,"./base-cell-anchor-xform":55,"./cell-position-xform":60,"./pic-xform":67}],70:[function(c,T,O){function y(s){return(y=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(i){return typeof i}:function(i){return i&&typeof Symbol=="function"&&i.constructor===Symbol&&i!==Symbol.prototype?"symbol":typeof i})(s)}function p(s,i){for(var e=0;e"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}();return function(){var e,t=f(s);if(i){var r=f(this).constructor;e=Reflect.construct(t,arguments,r)}else e=t.apply(this,arguments);return m(this,e)}}function m(s,i){return!i||y(i)!=="object"&&typeof i!="function"?function(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(s):i}function f(s){return(f=Object.setPrototypeOf?Object.getPrototypeOf:function(i){return i.__proto__||Object.getPrototypeOf(i)})(s)}var h=function(s){(function(o,n){if(typeof n!="function"&&n!==null)throw new TypeError("Super expression must either be null or a function");o.prototype=Object.create(n&&n.prototype,{constructor:{value:o,writable:!0,configurable:!0}}),n&&v(o,n)})(r,s);var i,e,t=d(r);function r(o){var n;return function(a,u){if(!(a instanceof u))throw new TypeError("Cannot call a class as a function")}(this,r),(n=t.call(this)).tag=o.tag,n.always=!!o.always,n.count=o.count,n.empty=o.empty,n.$count=o.$count||"count",n.$=o.$,n.childXform=o.childXform,n.maxItems=o.maxItems,n}return i=r,(e=[{key:"prepare",value:function(o,n){var a=this.childXform;o&&o.forEach(function(u,l){n.index=l,a.prepare(u,n)})}},{key:"render",value:function(o,n){if(this.always||n&&n.length){o.openNode(this.tag,this.$),this.count&&o.addAttribute(this.$count,n&&n.length||0);var a=this.childXform;(n||[]).forEach(function(u,l){a.render(o,u,l)}),o.closeNode()}else this.empty&&o.leafNode(this.tag)}},{key:"parseOpen",value:function(o){if(this.parser)return this.parser.parseOpen(o),!0;switch(o.name){case this.tag:return this.model=[],!0;default:return!!this.childXform.parseOpen(o)&&(this.parser=this.childXform,!0)}}},{key:"parseText",value:function(o){this.parser&&this.parser.parseText(o)}},{key:"parseClose",value:function(o){if(this.parser){if(!this.parser.parseClose(o)&&(this.model.push(this.parser.model),this.parser=void 0,this.maxItems&&this.model.length>this.maxItems))throw new Error("Max ".concat(this.childXform.tag," count (").concat(this.maxItems,") exceeded"));return!0}return!1}},{key:"reconcile",value:function(o,n){if(o){var a=this.childXform;o.forEach(function(u){a.reconcile(u,n)})}}}])&&p(i.prototype,e),r}(c("./base-xform"));T.exports=h},{"./base-xform":31}],71:[function(c,T,O){function y(e){return(y=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(e)}function p(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function v(e,t){for(var r=0;r"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}();return function(){var r,o=h(e);if(t){var n=h(this).constructor;r=Reflect.construct(o,arguments,n)}else r=o.apply(this,arguments);return f(this,r)}}function f(e,t){return!t||y(t)!=="object"&&typeof t!="function"?function(r){if(r===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return r}(e):t}function h(e){return(h=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(e)}var s=c("../../../utils/col-cache"),i=function(e){(function(a,u){if(typeof u!="function"&&u!==null)throw new TypeError("Super expression must either be null or a function");a.prototype=Object.create(u&&u.prototype,{constructor:{value:a,writable:!0,configurable:!0}}),u&&d(a,u)})(n,e);var t,r,o=m(n);function n(){return p(this,n),o.apply(this,arguments)}return t=n,(r=[{key:"render",value:function(a,u){if(u)if(typeof u=="string")a.leafNode("autoFilter",{ref:u});else{var l=function(C){return typeof C=="string"?C:s.getAddress(C.row,C.column).address},b=l(u.from),w=l(u.to);b&&w&&a.leafNode("autoFilter",{ref:"".concat(b,":").concat(w)})}}},{key:"parseOpen",value:function(a){a.name==="autoFilter"&&(this.model=a.attributes.ref)}},{key:"tag",get:function(){return"autoFilter"}}])&&v(t.prototype,r),n}(c("../base-xform"));T.exports=i},{"../../../utils/col-cache":19,"../base-xform":31}],72:[function(c,T,O){function y(l){return(y=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(b){return typeof b}:function(b){return b&&typeof Symbol=="function"&&b.constructor===Symbol&&b!==Symbol.prototype?"symbol":typeof b})(l)}function p(l,b){var w=Object.keys(l);if(Object.getOwnPropertySymbols){var C=Object.getOwnPropertySymbols(l);b&&(C=C.filter(function(R){return Object.getOwnPropertyDescriptor(l,R).enumerable})),w.push.apply(w,C)}return w}function v(l){for(var b=1;b"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}();return function(){var w,C=i(l);if(b){var R=i(this).constructor;w=Reflect.construct(C,arguments,R)}else w=C.apply(this,arguments);return s(this,w)}}function s(l,b){return!b||y(b)!=="object"&&typeof b!="function"?function(w){if(w===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return w}(l):b}function i(l){return(i=Object.setPrototypeOf?Object.getPrototypeOf:function(b){return b.__proto__||Object.getPrototypeOf(b)})(l)}var e=c("../../../utils/utils"),t=c("../base-xform"),r=c("../../../doc/range"),o=c("../../../doc/enums"),n=c("../strings/rich-text-xform");function a(l){if(l==null)return o.ValueType.Null;if(l instanceof String||typeof l=="string")return o.ValueType.String;if(typeof l=="number")return o.ValueType.Number;if(typeof l=="boolean")return o.ValueType.Boolean;if(l instanceof Date)return o.ValueType.Date;if(l.text&&l.hyperlink)return o.ValueType.Hyperlink;if(l.formula)return o.ValueType.Formula;if(l.error)return o.ValueType.Error;throw new Error("I could not understand type of value")}var u=function(l){(function(A,j){if(typeof j!="function"&&j!==null)throw new TypeError("Super expression must either be null or a function");A.prototype=Object.create(j&&j.prototype,{constructor:{value:A,writable:!0,configurable:!0}}),j&&f(A,j)})(R,l);var b,w,C=h(R);function R(){var A;return function(j,P){if(!(j instanceof P))throw new TypeError("Cannot call a class as a function")}(this,R),(A=C.call(this)).richTextXForm=new n,A}return b=R,(w=[{key:"prepare",value:function(A,j){var P=j.styles.addStyleModel(A.style||{},function(S){switch(S.type){case o.ValueType.Formula:return a(S.result);default:return S.type}}(A));switch(P&&(A.styleId=P),A.comment&&j.comments.push(v(v({},A.comment),{},{ref:A.address})),A.type){case o.ValueType.String:case o.ValueType.RichText:j.sharedStrings&&(A.ssId=j.sharedStrings.add(A.value));break;case o.ValueType.Date:j.date1904&&(A.date1904=!0);break;case o.ValueType.Hyperlink:j.sharedStrings&&A.text!==void 0&&A.text!==null&&(A.ssId=j.sharedStrings.add(A.text)),j.hyperlinks.push({address:A.address,target:A.hyperlink,tooltip:A.tooltip});break;case o.ValueType.Merge:j.merges.add(A);break;case o.ValueType.Formula:if(j.date1904&&(A.date1904=!0),A.shareType==="shared"&&(A.si=j.siFormulae++),A.formula)j.formulae[A.address]=A;else if(A.sharedFormula){var _=j.formulae[A.sharedFormula];if(!_)throw new Error("Shared Formula master must exist above and or left of clone for cell ".concat(A.address));_.si===void 0?(_.shareType="shared",_.si=j.siFormulae++,_.range=new r(_.address,A.address)):_.range&&_.range.expandToAddress(A.address),A.si=_.si}}}},{key:"renderFormula",value:function(A,j){var P=null;switch(j.shareType){case"shared":P={t:"shared",ref:j.ref||j.range.range,si:j.si};break;case"array":P={t:"array",ref:j.ref};break;default:j.si!==void 0&&(P={t:"shared",si:j.si})}switch(a(j.result)){case o.ValueType.Null:A.leafNode("f",P,j.formula);break;case o.ValueType.String:A.addAttribute("t","str"),A.leafNode("f",P,j.formula),A.leafNode("v",null,j.result);break;case o.ValueType.Number:A.leafNode("f",P,j.formula),A.leafNode("v",null,j.result);break;case o.ValueType.Boolean:A.addAttribute("t","b"),A.leafNode("f",P,j.formula),A.leafNode("v",null,j.result?1:0);break;case o.ValueType.Error:A.addAttribute("t","e"),A.leafNode("f",P,j.formula),A.leafNode("v",null,j.result.error);break;case o.ValueType.Date:A.leafNode("f",P,j.formula),A.leafNode("v",null,e.dateToExcel(j.result,j.date1904));break;default:throw new Error("I could not understand type of value")}}},{key:"render",value:function(A,j){var P=this;if(j.type!==o.ValueType.Null||j.styleId){switch(A.openNode("c"),A.addAttribute("r",j.address),j.styleId&&A.addAttribute("s",j.styleId),j.type){case o.ValueType.Null:break;case o.ValueType.Number:A.leafNode("v",null,j.value);break;case o.ValueType.Boolean:A.addAttribute("t","b"),A.leafNode("v",null,j.value?"1":"0");break;case o.ValueType.Error:A.addAttribute("t","e"),A.leafNode("v",null,j.value.error);break;case o.ValueType.String:case o.ValueType.RichText:j.ssId!==void 0?(A.addAttribute("t","s"),A.leafNode("v",null,j.ssId)):j.value&&j.value.richText?(A.addAttribute("t","inlineStr"),A.openNode("is"),j.value.richText.forEach(function(_){P.richTextXForm.render(A,_)}),A.closeNode("is")):(A.addAttribute("t","str"),A.leafNode("v",null,j.value));break;case o.ValueType.Date:A.leafNode("v",null,e.dateToExcel(j.value,j.date1904));break;case o.ValueType.Hyperlink:j.ssId!==void 0?(A.addAttribute("t","s"),A.leafNode("v",null,j.ssId)):(A.addAttribute("t","str"),A.leafNode("v",null,j.text));break;case o.ValueType.Formula:this.renderFormula(A,j);break;case o.ValueType.Merge:}A.closeNode()}}},{key:"parseOpen",value:function(A){if(this.parser)return this.parser.parseOpen(A),!0;switch(A.name){case"c":return this.model={address:A.attributes.r},this.t=A.attributes.t,A.attributes.s&&(this.model.styleId=parseInt(A.attributes.s,10)),!0;case"f":return this.currentNode="f",this.model.si=A.attributes.si,this.model.shareType=A.attributes.t,this.model.ref=A.attributes.ref,!0;case"v":return this.currentNode="v",!0;case"t":return this.currentNode="t",!0;case"r":return this.parser=this.richTextXForm,this.parser.parseOpen(A),!0;default:return!1}}},{key:"parseText",value:function(A){if(this.parser)this.parser.parseText(A);else switch(this.currentNode){case"f":this.model.formula=this.model.formula?this.model.formula+A:A;break;case"v":case"t":this.model.value&&this.model.value.richText?this.model.value.richText.text=this.model.value.richText.text?this.model.value.richText.text+A:A:this.model.value=this.model.value?this.model.value+A:A}}},{key:"parseClose",value:function(A){switch(A){case"c":var j=this.model;if(j.formula||j.shareType)j.type=o.ValueType.Formula,j.value&&(this.t==="str"?j.result=e.xmlDecode(j.value):this.t==="b"?j.result=parseInt(j.value,10)!==0:this.t==="e"?j.result={error:j.value}:j.result=parseFloat(j.value),j.value=void 0);else if(j.value!==void 0)switch(this.t){case"s":j.type=o.ValueType.String,j.value=parseInt(j.value,10);break;case"str":j.type=o.ValueType.String,j.value=e.xmlDecode(j.value);break;case"inlineStr":j.type=o.ValueType.String;break;case"b":j.type=o.ValueType.Boolean,j.value=parseInt(j.value,10)!==0;break;case"e":j.type=o.ValueType.Error,j.value={error:j.value};break;default:j.type=o.ValueType.Number,j.value=parseFloat(j.value)}else j.styleId?j.type=o.ValueType.Null:j.type=o.ValueType.Merge;return!1;case"f":case"v":case"is":return this.currentNode=void 0,!0;case"t":return this.parser?(this.parser.parseClose(A),!0):(this.currentNode=void 0,!0);case"r":return this.model.value=this.model.value||{},this.model.value.richText=this.model.value.richText||[],this.model.value.richText.push(this.parser.model),this.parser=void 0,this.currentNode=void 0,!0;default:return!!this.parser&&(this.parser.parseClose(A),!0)}}},{key:"reconcile",value:function(A,j){var P=A.styleId&&j.styles&&j.styles.getStyleModel(A.styleId);switch(P&&(A.style=P),A.styleId!==void 0&&(A.styleId=void 0),A.type){case o.ValueType.String:typeof A.value=="number"&&j.sharedStrings&&(A.value=j.sharedStrings.getString(A.value)),A.value.richText&&(A.type=o.ValueType.RichText);break;case o.ValueType.Number:P&&e.isDateFmt(P.numFmt)&&(A.type=o.ValueType.Date,A.value=e.excelToDate(A.value,j.date1904));break;case o.ValueType.Formula:A.result!==void 0&&P&&e.isDateFmt(P.numFmt)&&(A.result=e.excelToDate(A.result,j.date1904)),A.shareType==="shared"&&(A.ref?j.formulae[A.si]=A.address:(A.sharedFormula=j.formulae[A.si],delete A.shareType),delete A.si)}var _=j.hyperlinkMap[A.address];_&&(A.type===o.ValueType.Formula?(A.text=A.result,A.result=void 0):(A.text=A.value,A.value=void 0),A.type=o.ValueType.Hyperlink,A.hyperlink=_);var S=j.commentsMap&&j.commentsMap[A.address];S&&(A.comment=S)}},{key:"tag",get:function(){return"c"}}])&&m(b.prototype,w),R}(t);T.exports=u},{"../../../doc/enums":7,"../../../doc/range":10,"../../../utils/utils":26,"../base-xform":31,"../strings/rich-text-xform":121}],73:[function(c,T,O){function y(e){return(y=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(e)}function p(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function v(e,t){for(var r=0;r"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}();return function(){var r,o=h(e);if(t){var n=h(this).constructor;r=Reflect.construct(o,arguments,n)}else r=o.apply(this,arguments);return f(this,r)}}function f(e,t){return!t||y(t)!=="object"&&typeof t!="function"?function(r){if(r===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return r}(e):t}function h(e){return(h=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(e)}var s=c("../../base-xform"),i=function(e){(function(a,u){if(typeof u!="function"&&u!==null)throw new TypeError("Super expression must either be null or a function");a.prototype=Object.create(u&&u.prototype,{constructor:{value:a,writable:!0,configurable:!0}}),u&&d(a,u)})(n,e);var t,r,o=m(n);function n(){return p(this,n),o.apply(this,arguments)}return t=n,(r=[{key:"render",value:function(a,u){a.leafNode(this.tag,{iconSet:u.iconSet,iconId:u.iconId})}},{key:"parseOpen",value:function(a){var u=a.attributes;this.model={iconSet:u.iconSet,iconId:s.toIntValue(u.iconId)}}},{key:"parseClose",value:function(a){return a!==this.tag}},{key:"tag",get:function(){return"x14:cfIcon"}}])&&v(t.prototype,r),n}(s);T.exports=i},{"../../base-xform":31}],74:[function(c,T,O){function y(n){return(y=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(a){return typeof a}:function(a){return a&&typeof Symbol=="function"&&a.constructor===Symbol&&a!==Symbol.prototype?"symbol":typeof a})(n)}function p(n,a){for(var u=0;u"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}();return function(){var u,l=f(n);if(a){var b=f(this).constructor;u=Reflect.construct(l,arguments,b)}else u=l.apply(this,arguments);return m(this,u)}}function m(n,a){return!a||y(a)!=="object"&&typeof a!="function"?function(u){if(u===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return u}(n):a}function f(n){return(f=Object.setPrototypeOf?Object.getPrototypeOf:function(a){return a.__proto__||Object.getPrototypeOf(a)})(n)}var h=c("uuid").v4,s=c("../../base-xform"),i=c("../../composite-xform"),e=c("./databar-ext-xform"),t=c("./icon-set-ext-xform"),r={"3Triangles":!0,"3Stars":!0,"5Boxes":!0},o=function(n){(function(C,R){if(typeof R!="function"&&R!==null)throw new TypeError("Super expression must either be null or a function");C.prototype=Object.create(R&&R.prototype,{constructor:{value:C,writable:!0,configurable:!0}}),R&&v(C,R)})(w,n);var a,u,l,b=d(w);function w(){var C;return function(R,A){if(!(R instanceof A))throw new TypeError("Cannot call a class as a function")}(this,w),(C=b.call(this)).map={"x14:dataBar":C.databarXform=new e,"x14:iconSet":C.iconSetXform=new t},C}return a=w,l=[{key:"isExt",value:function(C){return C.type==="dataBar"?e.isExt(C):!(C.type!=="iconSet"||!C.custom&&!r[C.iconSet])}}],(u=[{key:"prepare",value:function(C){w.isExt(C)&&(C.x14Id="{".concat(h(),"}").toUpperCase())}},{key:"render",value:function(C,R){if(w.isExt(R))switch(R.type){case"dataBar":this.renderDataBar(C,R);break;case"iconSet":this.renderIconSet(C,R)}}},{key:"renderDataBar",value:function(C,R){C.openNode(this.tag,{type:"dataBar",id:R.x14Id}),this.databarXform.render(C,R),C.closeNode()}},{key:"renderIconSet",value:function(C,R){C.openNode(this.tag,{type:"iconSet",priority:R.priority,id:R.x14Id||"{".concat(h(),"}")}),this.iconSetXform.render(C,R),C.closeNode()}},{key:"createNewModel",value:function(C){var R=C.attributes;return{type:R.type,x14Id:R.id,priority:s.toIntValue(R.priority)}}},{key:"onParserClose",value:function(C,R){Object.assign(this.model,R.model)}},{key:"tag",get:function(){return"x14:cfRule"}}])&&p(a.prototype,u),l&&p(a,l),w}(i);T.exports=o},{"../../base-xform":31,"../../composite-xform":47,"./databar-ext-xform":78,"./icon-set-ext-xform":80,uuid:526}],75:[function(c,T,O){function y(e){return(y=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(e)}function p(e,t){for(var r=0;r"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}();return function(){var r,o=f(e);if(t){var n=f(this).constructor;r=Reflect.construct(o,arguments,n)}else r=o.apply(this,arguments);return m(this,r)}}function m(e,t){return!t||y(t)!=="object"&&typeof t!="function"?function(r){if(r===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return r}(e):t}function f(e){return(f=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(e)}var h=c("../../composite-xform"),s=c("./f-ext-xform"),i=function(e){(function(a,u){if(typeof u!="function"&&u!==null)throw new TypeError("Super expression must either be null or a function");a.prototype=Object.create(u&&u.prototype,{constructor:{value:a,writable:!0,configurable:!0}}),u&&v(a,u)})(n,e);var t,r,o=d(n);function n(){var a;return function(u,l){if(!(u instanceof l))throw new TypeError("Cannot call a class as a function")}(this,n),(a=o.call(this)).map={"xm:f":a.fExtXform=new s},a}return t=n,(r=[{key:"render",value:function(a,u){a.openNode(this.tag,{type:u.type}),u.value!==void 0&&this.fExtXform.render(a,u.value),a.closeNode()}},{key:"createNewModel",value:function(a){return{type:a.attributes.type}}},{key:"onParserClose",value:function(a,u){switch(a){case"xm:f":this.model.value=u.model?parseFloat(u.model):0}}},{key:"tag",get:function(){return"x14:cfvo"}}])&&p(t.prototype,r),n}(h);T.exports=i},{"../../composite-xform":47,"./f-ext-xform":79}],76:[function(c,T,O){function y(t){return(y=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r})(t)}function p(t,r){for(var o=0;o"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}();return function(){var o,n=f(t);if(r){var a=f(this).constructor;o=Reflect.construct(n,arguments,a)}else o=n.apply(this,arguments);return m(this,o)}}function m(t,r){return!r||y(r)!=="object"&&typeof r!="function"?function(o){if(o===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return o}(t):r}function f(t){return(f=Object.setPrototypeOf?Object.getPrototypeOf:function(r){return r.__proto__||Object.getPrototypeOf(r)})(t)}var h=c("../../composite-xform"),s=c("./sqref-ext-xform"),i=c("./cf-rule-ext-xform"),e=function(t){(function(u,l){if(typeof l!="function"&&l!==null)throw new TypeError("Super expression must either be null or a function");u.prototype=Object.create(l&&l.prototype,{constructor:{value:u,writable:!0,configurable:!0}}),l&&v(u,l)})(a,t);var r,o,n=d(a);function a(){var u;return function(l,b){if(!(l instanceof b))throw new TypeError("Cannot call a class as a function")}(this,a),(u=n.call(this)).map={"xm:sqref":u.sqRef=new s,"x14:cfRule":u.cfRule=new i},u}return r=a,(o=[{key:"prepare",value:function(u,l){var b=this;u.rules.forEach(function(w){b.cfRule.prepare(w,l)})}},{key:"render",value:function(u,l){var b=this;l.rules.some(i.isExt)&&(u.openNode(this.tag,{"xmlns:xm":"http://schemas.microsoft.com/office/excel/2006/main"}),l.rules.filter(i.isExt).forEach(function(w){return b.cfRule.render(u,w)}),this.sqRef.render(u,l.ref),u.closeNode())}},{key:"createNewModel",value:function(){return{rules:[]}}},{key:"onParserClose",value:function(u,l){switch(u){case"xm:sqref":this.model.ref=l.model;break;case"x14:cfRule":this.model.rules.push(l.model)}}},{key:"tag",get:function(){return"x14:conditionalFormatting"}}])&&p(r.prototype,o),a}(h);T.exports=e},{"../../composite-xform":47,"./cf-rule-ext-xform":74,"./sqref-ext-xform":81}],77:[function(c,T,O){function y(t){return(y=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r})(t)}function p(t,r){for(var o=0;o"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}();return function(){var o,n=f(t);if(r){var a=f(this).constructor;o=Reflect.construct(n,arguments,a)}else o=n.apply(this,arguments);return m(this,o)}}function m(t,r){return!r||y(r)!=="object"&&typeof r!="function"?function(o){if(o===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return o}(t):r}function f(t){return(f=Object.setPrototypeOf?Object.getPrototypeOf:function(r){return r.__proto__||Object.getPrototypeOf(r)})(t)}var h=c("../../composite-xform"),s=c("./cf-rule-ext-xform"),i=c("./conditional-formatting-ext-xform"),e=function(t){(function(u,l){if(typeof l!="function"&&l!==null)throw new TypeError("Super expression must either be null or a function");u.prototype=Object.create(l&&l.prototype,{constructor:{value:u,writable:!0,configurable:!0}}),l&&v(u,l)})(a,t);var r,o,n=d(a);function a(){var u;return function(l,b){if(!(l instanceof b))throw new TypeError("Cannot call a class as a function")}(this,a),(u=n.call(this)).map={"x14:conditionalFormatting":u.cfXform=new i},u}return r=a,(o=[{key:"hasContent",value:function(u){return u.hasExtContent===void 0&&(u.hasExtContent=u.some(function(l){return l.rules.some(s.isExt)})),u.hasExtContent}},{key:"prepare",value:function(u,l){var b=this;u.forEach(function(w){b.cfXform.prepare(w,l)})}},{key:"render",value:function(u,l){var b=this;this.hasContent(l)&&(u.openNode(this.tag),l.forEach(function(w){return b.cfXform.render(u,w)}),u.closeNode())}},{key:"createNewModel",value:function(){return[]}},{key:"onParserClose",value:function(u,l){this.model.push(l.model)}},{key:"tag",get:function(){return"x14:conditionalFormattings"}}])&&p(r.prototype,o),a}(h);T.exports=e},{"../../composite-xform":47,"./cf-rule-ext-xform":74,"./conditional-formatting-ext-xform":76}],78:[function(c,T,O){function y(n){return(y=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(a){return typeof a}:function(a){return a&&typeof Symbol=="function"&&a.constructor===Symbol&&a!==Symbol.prototype?"symbol":typeof a})(n)}function p(n,a){return function(u){if(Array.isArray(u))return u}(n)||function(u,l){if(!(typeof Symbol>"u"||!(Symbol.iterator in Object(u)))){var b=[],w=!0,C=!1,R=void 0;try{for(var A,j=u[Symbol.iterator]();!(w=(A=j.next()).done)&&(b.push(A.value),!l||b.length!==l);w=!0);}catch(P){C=!0,R=P}finally{try{w||j.return==null||j.return()}finally{if(C)throw R}}return b}}(n,a)||function(u,l){if(u){if(typeof u=="string")return v(u,l);var b=Object.prototype.toString.call(u).slice(8,-1);if(b==="Object"&&u.constructor&&(b=u.constructor.name),b==="Map"||b==="Set")return Array.from(u);if(b==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(b))return v(u,l)}}(n,a)||function(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function v(n,a){(a==null||a>n.length)&&(a=n.length);for(var u=0,l=new Array(a);u"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}();return function(){var u,l=s(n);if(a){var b=s(this).constructor;u=Reflect.construct(l,arguments,b)}else u=l.apply(this,arguments);return h(this,u)}}function h(n,a){return!a||y(a)!=="object"&&typeof a!="function"?function(u){if(u===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return u}(n):a}function s(n){return(s=Object.setPrototypeOf?Object.getPrototypeOf:function(a){return a.__proto__||Object.getPrototypeOf(a)})(n)}var i=c("../../base-xform"),e=c("../../composite-xform"),t=c("../../style/color-xform"),r=c("./cfvo-ext-xform"),o=function(n){(function(C,R){if(typeof R!="function"&&R!==null)throw new TypeError("Super expression must either be null or a function");C.prototype=Object.create(R&&R.prototype,{constructor:{value:C,writable:!0,configurable:!0}}),R&&m(C,R)})(w,n);var a,u,l,b=f(w);function w(){var C;return function(R,A){if(!(R instanceof A))throw new TypeError("Cannot call a class as a function")}(this,w),(C=b.call(this)).map={"x14:cfvo":C.cfvoXform=new r,"x14:borderColor":C.borderColorXform=new t("x14:borderColor"),"x14:negativeBorderColor":C.negativeBorderColorXform=new t("x14:negativeBorderColor"),"x14:negativeFillColor":C.negativeFillColorXform=new t("x14:negativeFillColor"),"x14:axisColor":C.axisColorXform=new t("x14:axisColor")},C}return a=w,l=[{key:"isExt",value:function(C){return!C.gradient}}],(u=[{key:"render",value:function(C,R){var A=this;C.openNode(this.tag,{minLength:i.toIntAttribute(R.minLength,0,!0),maxLength:i.toIntAttribute(R.maxLength,100,!0),border:i.toBoolAttribute(R.border,!1),gradient:i.toBoolAttribute(R.gradient,!0),negativeBarColorSameAsPositive:i.toBoolAttribute(R.negativeBarColorSameAsPositive,!0),negativeBarBorderColorSameAsPositive:i.toBoolAttribute(R.negativeBarBorderColorSameAsPositive,!0),axisPosition:i.toAttribute(R.axisPosition,"auto"),direction:i.toAttribute(R.direction,"leftToRight")}),R.cfvo.forEach(function(j){A.cfvoXform.render(C,j)}),this.borderColorXform.render(C,R.borderColor),this.negativeBorderColorXform.render(C,R.negativeBorderColor),this.negativeFillColorXform.render(C,R.negativeFillColor),this.axisColorXform.render(C,R.axisColor),C.closeNode()}},{key:"createNewModel",value:function(C){var R=C.attributes;return{cfvo:[],minLength:i.toIntValue(R.minLength,0),maxLength:i.toIntValue(R.maxLength,100),border:i.toBoolValue(R.border,!1),gradient:i.toBoolValue(R.gradient,!0),negativeBarColorSameAsPositive:i.toBoolValue(R.negativeBarColorSameAsPositive,!0),negativeBarBorderColorSameAsPositive:i.toBoolValue(R.negativeBarBorderColorSameAsPositive,!0),axisPosition:i.toStringValue(R.axisPosition,"auto"),direction:i.toStringValue(R.direction,"leftToRight")}}},{key:"onParserClose",value:function(C,R){var A=p(C.split(":"),2)[1];switch(A){case"cfvo":this.model.cfvo.push(R.model);break;default:this.model[A]=R.model}}},{key:"tag",get:function(){return"x14:dataBar"}}])&&d(a.prototype,u),l&&d(a,l),w}(e);T.exports=o},{"../../base-xform":31,"../../composite-xform":47,"../../style/color-xform":127,"./cfvo-ext-xform":75}],79:[function(c,T,O){function y(i){return(y=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(i)}function p(i,e){if(!(i instanceof e))throw new TypeError("Cannot call a class as a function")}function v(i,e){for(var t=0;t"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}();return function(){var t,r=h(i);if(e){var o=h(this).constructor;t=Reflect.construct(r,arguments,o)}else t=r.apply(this,arguments);return f(this,t)}}function f(i,e){return!e||y(e)!=="object"&&typeof e!="function"?function(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(i):e}function h(i){return(h=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(i)}var s=function(i){(function(n,a){if(typeof a!="function"&&a!==null)throw new TypeError("Super expression must either be null or a function");n.prototype=Object.create(a&&a.prototype,{constructor:{value:n,writable:!0,configurable:!0}}),a&&d(n,a)})(o,i);var e,t,r=m(o);function o(){return p(this,o),r.apply(this,arguments)}return e=o,(t=[{key:"render",value:function(n,a){n.leafNode(this.tag,null,a)}},{key:"parseOpen",value:function(){this.model=""}},{key:"parseText",value:function(n){this.model+=n}},{key:"parseClose",value:function(n){return n!==this.tag}},{key:"tag",get:function(){return"xm:f"}}])&&v(e.prototype,t),o}(c("../../base-xform"));T.exports=s},{"../../base-xform":31}],80:[function(c,T,O){function y(n){return(y=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(a){return typeof a}:function(a){return a&&typeof Symbol=="function"&&a.constructor===Symbol&&a!==Symbol.prototype?"symbol":typeof a})(n)}function p(n,a){return function(u){if(Array.isArray(u))return u}(n)||function(u,l){if(!(typeof Symbol>"u"||!(Symbol.iterator in Object(u)))){var b=[],w=!0,C=!1,R=void 0;try{for(var A,j=u[Symbol.iterator]();!(w=(A=j.next()).done)&&(b.push(A.value),!l||b.length!==l);w=!0);}catch(P){C=!0,R=P}finally{try{w||j.return==null||j.return()}finally{if(C)throw R}}return b}}(n,a)||function(u,l){if(u){if(typeof u=="string")return v(u,l);var b=Object.prototype.toString.call(u).slice(8,-1);if(b==="Object"&&u.constructor&&(b=u.constructor.name),b==="Map"||b==="Set")return Array.from(u);if(b==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(b))return v(u,l)}}(n,a)||function(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function v(n,a){(a==null||a>n.length)&&(a=n.length);for(var u=0,l=new Array(a);u"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}();return function(){var u,l=s(n);if(a){var b=s(this).constructor;u=Reflect.construct(l,arguments,b)}else u=l.apply(this,arguments);return h(this,u)}}function h(n,a){return!a||y(a)!=="object"&&typeof a!="function"?function(u){if(u===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return u}(n):a}function s(n){return(s=Object.setPrototypeOf?Object.getPrototypeOf:function(a){return a.__proto__||Object.getPrototypeOf(a)})(n)}var i=c("../../base-xform"),e=c("../../composite-xform"),t=c("./cfvo-ext-xform"),r=c("./cf-icon-ext-xform"),o=function(n){(function(w,C){if(typeof C!="function"&&C!==null)throw new TypeError("Super expression must either be null or a function");w.prototype=Object.create(C&&C.prototype,{constructor:{value:w,writable:!0,configurable:!0}}),C&&m(w,C)})(b,n);var a,u,l=f(b);function b(){var w;return function(C,R){if(!(C instanceof R))throw new TypeError("Cannot call a class as a function")}(this,b),(w=l.call(this)).map={"x14:cfvo":w.cfvoXform=new t,"x14:cfIcon":w.cfIconXform=new r},w}return a=b,(u=[{key:"render",value:function(w,C){var R=this;w.openNode(this.tag,{iconSet:i.toStringAttribute(C.iconSet),reverse:i.toBoolAttribute(C.reverse,!1),showValue:i.toBoolAttribute(C.showValue,!0),custom:i.toBoolAttribute(C.icons,!1)}),C.cfvo.forEach(function(A){R.cfvoXform.render(w,A)}),C.icons&&C.icons.forEach(function(A,j){A.iconId=j,R.cfIconXform.render(w,A)}),w.closeNode()}},{key:"createNewModel",value:function(w){var C=w.attributes;return{cfvo:[],iconSet:i.toStringValue(C.iconSet,"3TrafficLights"),reverse:i.toBoolValue(C.reverse,!1),showValue:i.toBoolValue(C.showValue,!0)}}},{key:"onParserClose",value:function(w,C){var R=p(w.split(":"),2)[1];switch(R){case"cfvo":this.model.cfvo.push(C.model);break;case"cfIcon":this.model.icons||(this.model.icons=[]),this.model.icons.push(C.model);break;default:this.model[R]=C.model}}},{key:"tag",get:function(){return"x14:iconSet"}}])&&d(a.prototype,u),b}(e);T.exports=o},{"../../base-xform":31,"../../composite-xform":47,"./cf-icon-ext-xform":73,"./cfvo-ext-xform":75}],81:[function(c,T,O){function y(i){return(y=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(i)}function p(i,e){if(!(i instanceof e))throw new TypeError("Cannot call a class as a function")}function v(i,e){for(var t=0;t"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}();return function(){var t,r=h(i);if(e){var o=h(this).constructor;t=Reflect.construct(r,arguments,o)}else t=r.apply(this,arguments);return f(this,t)}}function f(i,e){return!e||y(e)!=="object"&&typeof e!="function"?function(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(i):e}function h(i){return(h=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(i)}var s=function(i){(function(n,a){if(typeof a!="function"&&a!==null)throw new TypeError("Super expression must either be null or a function");n.prototype=Object.create(a&&a.prototype,{constructor:{value:n,writable:!0,configurable:!0}}),a&&d(n,a)})(o,i);var e,t,r=m(o);function o(){return p(this,o),r.apply(this,arguments)}return e=o,(t=[{key:"render",value:function(n,a){n.leafNode(this.tag,null,a)}},{key:"parseOpen",value:function(){this.model=""}},{key:"parseText",value:function(n){this.model+=n}},{key:"parseClose",value:function(n){return n!==this.tag}},{key:"tag",get:function(){return"xm:sqref"}}])&&v(e.prototype,t),o}(c("../../base-xform"));T.exports=s},{"../../base-xform":31}],82:[function(c,T,O){function y(C){return(y=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(R){return typeof R}:function(R){return R&&typeof Symbol=="function"&&R.constructor===Symbol&&R!==Symbol.prototype?"symbol":typeof R})(C)}function p(C,R){var A=Object.keys(C);if(Object.getOwnPropertySymbols){var j=Object.getOwnPropertySymbols(C);R&&(j=j.filter(function(P){return Object.getOwnPropertyDescriptor(C,P).enumerable})),A.push.apply(A,j)}return A}function v(C){for(var R=1;R"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}();return function(){var A,j=i(C);if(R){var P=i(this).constructor;A=Reflect.construct(j,arguments,P)}else A=j.apply(this,arguments);return s(this,A)}}function s(C,R){return!R||y(R)!=="object"&&typeof R!="function"?function(A){if(A===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return A}(C):R}function i(C){return(i=Object.setPrototypeOf?Object.getPrototypeOf:function(R){return R.__proto__||Object.getPrototypeOf(R)})(C)}var e=c("../../base-xform"),t=c("../../composite-xform"),r=c("../../../../doc/range"),o=c("./databar-xform"),n=c("./ext-lst-ref-xform"),a=c("./formula-xform"),u=c("./color-scale-xform"),l=c("./icon-set-xform"),b={"3Triangles":!0,"3Stars":!0,"5Boxes":!0},w=function(C){(function(S,g){if(typeof g!="function"&&g!==null)throw new TypeError("Super expression must either be null or a function");S.prototype=Object.create(g&&g.prototype,{constructor:{value:S,writable:!0,configurable:!0}}),g&&f(S,g)})(_,C);var R,A,j,P=h(_);function _(){var S;return function(g,E){if(!(g instanceof E))throw new TypeError("Cannot call a class as a function")}(this,_),(S=P.call(this)).map={dataBar:S.databarXform=new o,extLst:S.extLstRefXform=new n,formula:S.formulaXform=new a,colorScale:S.colorScaleXform=new u,iconSet:S.iconSetXform=new l},S}return R=_,j=[{key:"isPrimitive",value:function(S){return S.type!=="iconSet"||!S.custom&&!b[S.iconSet]}}],(A=[{key:"render",value:function(S,g){switch(g.type){case"expression":this.renderExpression(S,g);break;case"cellIs":this.renderCellIs(S,g);break;case"top10":this.renderTop10(S,g);break;case"aboveAverage":this.renderAboveAverage(S,g);break;case"dataBar":this.renderDataBar(S,g);break;case"colorScale":this.renderColorScale(S,g);break;case"iconSet":this.renderIconSet(S,g);break;case"containsText":this.renderText(S,g);break;case"timePeriod":this.renderTimePeriod(S,g)}}},{key:"renderExpression",value:function(S,g){S.openNode(this.tag,{type:"expression",dxfId:g.dxfId,priority:g.priority}),this.formulaXform.render(S,g.formulae[0]),S.closeNode()}},{key:"renderCellIs",value:function(S,g){var E=this;S.openNode(this.tag,{type:"cellIs",dxfId:g.dxfId,priority:g.priority,operator:g.operator}),g.formulae.forEach(function(k){E.formulaXform.render(S,k)}),S.closeNode()}},{key:"renderTop10",value:function(S,g){S.leafNode(this.tag,{type:"top10",dxfId:g.dxfId,priority:g.priority,percent:e.toBoolAttribute(g.percent,!1),bottom:e.toBoolAttribute(g.bottom,!1),rank:e.toIntValue(g.rank,10,!0)})}},{key:"renderAboveAverage",value:function(S,g){S.leafNode(this.tag,{type:"aboveAverage",dxfId:g.dxfId,priority:g.priority,aboveAverage:e.toBoolAttribute(g.aboveAverage,!0)})}},{key:"renderDataBar",value:function(S,g){S.openNode(this.tag,{type:"dataBar",priority:g.priority}),this.databarXform.render(S,g),this.extLstRefXform.render(S,g),S.closeNode()}},{key:"renderColorScale",value:function(S,g){S.openNode(this.tag,{type:"colorScale",priority:g.priority}),this.colorScaleXform.render(S,g),S.closeNode()}},{key:"renderIconSet",value:function(S,g){_.isPrimitive(g)&&(S.openNode(this.tag,{type:"iconSet",priority:g.priority}),this.iconSetXform.render(S,g),S.closeNode())}},{key:"renderText",value:function(S,g){S.openNode(this.tag,{type:g.operator,dxfId:g.dxfId,priority:g.priority,operator:e.toStringAttribute(g.operator,"containsText")});var E=function(k){if(k.formulae&&k.formulae[0])return k.formulae[0];var x=new r(k.ref).tl;switch(k.operator){case"containsText":return'NOT(ISERROR(SEARCH("'.concat(k.text,'",').concat(x,")))");case"containsBlanks":return"LEN(TRIM(".concat(x,"))=0");case"notContainsBlanks":return"LEN(TRIM(".concat(x,"))>0");case"containsErrors":return"ISERROR(".concat(x,")");case"notContainsErrors":return"NOT(ISERROR(".concat(x,"))");default:return}}(g);E&&this.formulaXform.render(S,E),S.closeNode()}},{key:"renderTimePeriod",value:function(S,g){S.openNode(this.tag,{type:"timePeriod",dxfId:g.dxfId,priority:g.priority,timePeriod:g.timePeriod});var E=function(k){if(k.formulae&&k.formulae[0])return k.formulae[0];var x=new r(k.ref).tl;switch(k.timePeriod){case"thisWeek":return"AND(TODAY()-ROUNDDOWN(".concat(x,",0)<=WEEKDAY(TODAY())-1,ROUNDDOWN(").concat(x,",0)-TODAY()<=7-WEEKDAY(TODAY()))");case"lastWeek":return"AND(TODAY()-ROUNDDOWN(".concat(x,",0)>=(WEEKDAY(TODAY())),TODAY()-ROUNDDOWN(").concat(x,",0)<(WEEKDAY(TODAY())+7))");case"nextWeek":return"AND(ROUNDDOWN(".concat(x,",0)-TODAY()>(7-WEEKDAY(TODAY())),ROUNDDOWN(").concat(x,",0)-TODAY()<(15-WEEKDAY(TODAY())))");case"yesterday":return"FLOOR(".concat(x,",1)=TODAY()-1");case"today":return"FLOOR(".concat(x,",1)=TODAY()");case"tomorrow":return"FLOOR(".concat(x,",1)=TODAY()+1");case"last7Days":return"AND(TODAY()-FLOOR(".concat(x,",1)<=6,FLOOR(").concat(x,",1)<=TODAY())");case"lastMonth":return"AND(MONTH(".concat(x,")=MONTH(EDATE(TODAY(),0-1)),YEAR(").concat(x,")=YEAR(EDATE(TODAY(),0-1)))");case"thisMonth":return"AND(MONTH(".concat(x,")=MONTH(TODAY()),YEAR(").concat(x,")=YEAR(TODAY()))");case"nextMonth":return"AND(MONTH(".concat(x,")=MONTH(EDATE(TODAY(),0+1)),YEAR(").concat(x,")=YEAR(EDATE(TODAY(),0+1)))");default:return}}(g);E&&this.formulaXform.render(S,E),S.closeNode()}},{key:"createNewModel",value:function(S){var g=S.attributes;return v(v({},function(E){var k=E.type,x=E.operator;switch(k){case"containsText":case"containsBlanks":case"notContainsBlanks":case"containsErrors":case"notContainsErrors":return{type:"containsText",operator:k};default:return{type:k,operator:x}}}(g)),{},{dxfId:e.toIntValue(g.dxfId),priority:e.toIntValue(g.priority),timePeriod:g.timePeriod,percent:e.toBoolValue(g.percent),bottom:e.toBoolValue(g.bottom),rank:e.toIntValue(g.rank),aboveAverage:e.toBoolValue(g.aboveAverage)})}},{key:"onParserClose",value:function(S,g){switch(S){case"dataBar":case"extLst":case"colorScale":case"iconSet":Object.assign(this.model,g.model);break;case"formula":this.model.formulae=this.model.formulae||[],this.model.formulae.push(g.model)}}},{key:"tag",get:function(){return"cfRule"}}])&&m(R.prototype,A),j&&m(R,j),_}(t);T.exports=w},{"../../../../doc/range":10,"../../base-xform":31,"../../composite-xform":47,"./color-scale-xform":84,"./databar-xform":87,"./ext-lst-ref-xform":88,"./formula-xform":89,"./icon-set-xform":90}],83:[function(c,T,O){function y(e){return(y=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(e)}function p(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function v(e,t){for(var r=0;r"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}();return function(){var r,o=h(e);if(t){var n=h(this).constructor;r=Reflect.construct(o,arguments,n)}else r=o.apply(this,arguments);return f(this,r)}}function f(e,t){return!t||y(t)!=="object"&&typeof t!="function"?function(r){if(r===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return r}(e):t}function h(e){return(h=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(e)}var s=c("../../base-xform"),i=function(e){(function(a,u){if(typeof u!="function"&&u!==null)throw new TypeError("Super expression must either be null or a function");a.prototype=Object.create(u&&u.prototype,{constructor:{value:a,writable:!0,configurable:!0}}),u&&d(a,u)})(n,e);var t,r,o=m(n);function n(){return p(this,n),o.apply(this,arguments)}return t=n,(r=[{key:"render",value:function(a,u){a.leafNode(this.tag,{type:u.type,val:u.value})}},{key:"parseOpen",value:function(a){this.model={type:a.attributes.type,value:s.toFloatValue(a.attributes.val)}}},{key:"parseClose",value:function(a){return a!==this.tag}},{key:"tag",get:function(){return"cfvo"}}])&&v(t.prototype,r),n}(s);T.exports=i},{"../../base-xform":31}],84:[function(c,T,O){function y(t){return(y=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r})(t)}function p(t,r){for(var o=0;o"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}();return function(){var o,n=f(t);if(r){var a=f(this).constructor;o=Reflect.construct(n,arguments,a)}else o=n.apply(this,arguments);return m(this,o)}}function m(t,r){return!r||y(r)!=="object"&&typeof r!="function"?function(o){if(o===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return o}(t):r}function f(t){return(f=Object.setPrototypeOf?Object.getPrototypeOf:function(r){return r.__proto__||Object.getPrototypeOf(r)})(t)}var h=c("../../composite-xform"),s=c("../../style/color-xform"),i=c("./cfvo-xform"),e=function(t){(function(u,l){if(typeof l!="function"&&l!==null)throw new TypeError("Super expression must either be null or a function");u.prototype=Object.create(l&&l.prototype,{constructor:{value:u,writable:!0,configurable:!0}}),l&&v(u,l)})(a,t);var r,o,n=d(a);function a(){var u;return function(l,b){if(!(l instanceof b))throw new TypeError("Cannot call a class as a function")}(this,a),(u=n.call(this)).map={cfvo:u.cfvoXform=new i,color:u.colorXform=new s},u}return r=a,(o=[{key:"render",value:function(u,l){var b=this;u.openNode(this.tag),l.cfvo.forEach(function(w){b.cfvoXform.render(u,w)}),l.color.forEach(function(w){b.colorXform.render(u,w)}),u.closeNode()}},{key:"createNewModel",value:function(u){return{cfvo:[],color:[]}}},{key:"onParserClose",value:function(u,l){this.model[u].push(l.model)}},{key:"tag",get:function(){return"colorScale"}}])&&p(r.prototype,o),a}(h);T.exports=e},{"../../composite-xform":47,"../../style/color-xform":127,"./cfvo-xform":83}],85:[function(c,T,O){function y(e){return(y=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(e)}function p(e,t){for(var r=0;r"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}();return function(){var r,o=f(e);if(t){var n=f(this).constructor;r=Reflect.construct(o,arguments,n)}else r=o.apply(this,arguments);return m(this,r)}}function m(e,t){return!t||y(t)!=="object"&&typeof t!="function"?function(r){if(r===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return r}(e):t}function f(e){return(f=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(e)}var h=c("../../composite-xform"),s=c("./cf-rule-xform"),i=function(e){(function(a,u){if(typeof u!="function"&&u!==null)throw new TypeError("Super expression must either be null or a function");a.prototype=Object.create(u&&u.prototype,{constructor:{value:a,writable:!0,configurable:!0}}),u&&v(a,u)})(n,e);var t,r,o=d(n);function n(){var a;return function(u,l){if(!(u instanceof l))throw new TypeError("Cannot call a class as a function")}(this,n),(a=o.call(this)).map={cfRule:new s},a}return t=n,(r=[{key:"render",value:function(a,u){var l=this;u.rules.some(s.isPrimitive)&&(a.openNode(this.tag,{sqref:u.ref}),u.rules.forEach(function(b){s.isPrimitive(b)&&(b.ref=u.ref,l.map.cfRule.render(a,b))}),a.closeNode())}},{key:"createNewModel",value:function(a){return{ref:a.attributes.sqref,rules:[]}}},{key:"onParserClose",value:function(a,u){this.model.rules.push(u.model)}},{key:"tag",get:function(){return"conditionalFormatting"}}])&&p(t.prototype,r),n}(h);T.exports=i},{"../../composite-xform":47,"./cf-rule-xform":82}],86:[function(c,T,O){function y(r){return(y=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(o){return typeof o}:function(o){return o&&typeof Symbol=="function"&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o})(r)}function p(r){return function(o){if(Array.isArray(o))return v(o)}(r)||function(o){if(typeof Symbol<"u"&&Symbol.iterator in Object(o))return Array.from(o)}(r)||function(o,n){if(o){if(typeof o=="string")return v(o,n);var a=Object.prototype.toString.call(o).slice(8,-1);if(a==="Object"&&o.constructor&&(a=o.constructor.name),a==="Map"||a==="Set")return Array.from(o);if(a==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a))return v(o,n)}}(r)||function(){throw new TypeError(`Invalid attempt to spread non-iterable instance. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function v(r,o){(o==null||o>r.length)&&(o=r.length);for(var n=0,a=new Array(o);n"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}();return function(){var n,a=s(r);if(o){var u=s(this).constructor;n=Reflect.construct(a,arguments,u)}else n=a.apply(this,arguments);return h(this,n)}}function h(r,o){return!o||y(o)!=="object"&&typeof o!="function"?function(n){if(n===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return n}(r):o}function s(r){return(s=Object.setPrototypeOf?Object.getPrototypeOf:function(o){return o.__proto__||Object.getPrototypeOf(o)})(r)}var i=c("../../base-xform"),e=c("./conditional-formatting-xform"),t=function(r){(function(l,b){if(typeof b!="function"&&b!==null)throw new TypeError("Super expression must either be null or a function");l.prototype=Object.create(b&&b.prototype,{constructor:{value:l,writable:!0,configurable:!0}}),b&&m(l,b)})(u,r);var o,n,a=f(u);function u(){var l;return function(b,w){if(!(b instanceof w))throw new TypeError("Cannot call a class as a function")}(this,u),(l=a.call(this)).cfXform=new e,l}return o=u,(n=[{key:"reset",value:function(){this.model=[]}},{key:"prepare",value:function(l,b){var w=l.reduce(function(C,R){return Math.max.apply(Math,[C].concat(p(R.rules.map(function(A){return A.priority||0}))))},1);l.forEach(function(C){C.rules.forEach(function(R){R.priority||(R.priority=w++),R.style&&(R.dxfId=b.styles.addDxfStyle(R.style))})})}},{key:"render",value:function(l,b){var w=this;b.forEach(function(C){w.cfXform.render(l,C)})}},{key:"parseOpen",value:function(l){if(this.parser)return this.parser.parseOpen(l),!0;switch(l.name){case"conditionalFormatting":return this.parser=this.cfXform,this.parser.parseOpen(l),!0;default:return!1}}},{key:"parseText",value:function(l){this.parser&&this.parser.parseText(l)}},{key:"parseClose",value:function(l){return!(!this.parser||!this.parser.parseClose(l)&&(this.model.push(this.parser.model),this.parser=void 0,1))}},{key:"reconcile",value:function(l,b){l.forEach(function(w){w.rules.forEach(function(C){C.dxfId!==void 0&&(C.style=b.styles.getDxfStyle(C.dxfId),delete C.dxfId)})})}},{key:"tag",get:function(){return"conditionalFormatting"}}])&&d(o.prototype,n),u}(i);T.exports=t},{"../../base-xform":31,"./conditional-formatting-xform":85}],87:[function(c,T,O){function y(t){return(y=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r})(t)}function p(t,r){for(var o=0;o"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}();return function(){var o,n=f(t);if(r){var a=f(this).constructor;o=Reflect.construct(n,arguments,a)}else o=n.apply(this,arguments);return m(this,o)}}function m(t,r){return!r||y(r)!=="object"&&typeof r!="function"?function(o){if(o===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return o}(t):r}function f(t){return(f=Object.setPrototypeOf?Object.getPrototypeOf:function(r){return r.__proto__||Object.getPrototypeOf(r)})(t)}var h=c("../../composite-xform"),s=c("../../style/color-xform"),i=c("./cfvo-xform"),e=function(t){(function(u,l){if(typeof l!="function"&&l!==null)throw new TypeError("Super expression must either be null or a function");u.prototype=Object.create(l&&l.prototype,{constructor:{value:u,writable:!0,configurable:!0}}),l&&v(u,l)})(a,t);var r,o,n=d(a);function a(){var u;return function(l,b){if(!(l instanceof b))throw new TypeError("Cannot call a class as a function")}(this,a),(u=n.call(this)).map={cfvo:u.cfvoXform=new i,color:u.colorXform=new s},u}return r=a,(o=[{key:"render",value:function(u,l){var b=this;u.openNode(this.tag),l.cfvo.forEach(function(w){b.cfvoXform.render(u,w)}),this.colorXform.render(u,l.color),u.closeNode()}},{key:"createNewModel",value:function(){return{cfvo:[]}}},{key:"onParserClose",value:function(u,l){switch(u){case"cfvo":this.model.cfvo.push(l.model);break;case"color":this.model.color=l.model}}},{key:"tag",get:function(){return"dataBar"}}])&&p(r.prototype,o),a}(h);T.exports=e},{"../../composite-xform":47,"../../style/color-xform":127,"./cfvo-xform":83}],88:[function(c,T,O){function y(a){return(y=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(u){return typeof u}:function(u){return u&&typeof Symbol=="function"&&u.constructor===Symbol&&u!==Symbol.prototype?"symbol":typeof u})(a)}function p(a,u){if(!(a instanceof u))throw new TypeError("Cannot call a class as a function")}function v(a,u){for(var l=0;l"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}();return function(){var l,b=i(a);if(u){var w=i(this).constructor;l=Reflect.construct(b,arguments,w)}else l=b.apply(this,arguments);return s(this,l)}}function s(a,u){return!u||y(u)!=="object"&&typeof u!="function"?function(l){if(l===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return l}(a):u}function i(a){return(i=Object.setPrototypeOf?Object.getPrototypeOf:function(u){return u.__proto__||Object.getPrototypeOf(u)})(a)}var e=c("../../base-xform"),t=c("../../composite-xform"),r=function(a){m(l,a);var u=h(l);function l(){return p(this,l),u.apply(this,arguments)}return d(l,[{key:"render",value:function(b,w){b.leafNode(this.tag,null,w)}},{key:"parseOpen",value:function(){this.model=""}},{key:"parseText",value:function(b){this.model+=b}},{key:"parseClose",value:function(b){return b!==this.tag}},{key:"tag",get:function(){return"x14:id"}}]),l}(e),o=function(a){m(l,a);var u=h(l);function l(){var b;return p(this,l),(b=u.call(this)).map={"x14:id":b.idXform=new r},b}return d(l,[{key:"render",value:function(b,w){b.openNode(this.tag,{uri:"{B025F937-C7B1-47D3-B67F-A62EFF666E3E}","xmlns:x14":"http://schemas.microsoft.com/office/spreadsheetml/2009/9/main"}),this.idXform.render(b,w.x14Id),b.closeNode()}},{key:"createNewModel",value:function(){return{}}},{key:"onParserClose",value:function(b,w){this.model.x14Id=w.model}},{key:"tag",get:function(){return"ext"}}]),l}(t),n=function(a){m(l,a);var u=h(l);function l(){var b;return p(this,l),(b=u.call(this)).map={ext:new o},b}return d(l,[{key:"render",value:function(b,w){b.openNode(this.tag),this.map.ext.render(b,w),b.closeNode()}},{key:"createNewModel",value:function(){return{}}},{key:"onParserClose",value:function(b,w){Object.assign(this.model,w.model)}},{key:"tag",get:function(){return"extLst"}}]),l}(t);T.exports=n},{"../../base-xform":31,"../../composite-xform":47}],89:[function(c,T,O){function y(i){return(y=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(i)}function p(i,e){if(!(i instanceof e))throw new TypeError("Cannot call a class as a function")}function v(i,e){for(var t=0;t"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}();return function(){var t,r=h(i);if(e){var o=h(this).constructor;t=Reflect.construct(r,arguments,o)}else t=r.apply(this,arguments);return f(this,t)}}function f(i,e){return!e||y(e)!=="object"&&typeof e!="function"?function(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(i):e}function h(i){return(h=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(i)}var s=function(i){(function(n,a){if(typeof a!="function"&&a!==null)throw new TypeError("Super expression must either be null or a function");n.prototype=Object.create(a&&a.prototype,{constructor:{value:n,writable:!0,configurable:!0}}),a&&d(n,a)})(o,i);var e,t,r=m(o);function o(){return p(this,o),r.apply(this,arguments)}return e=o,(t=[{key:"render",value:function(n,a){n.leafNode(this.tag,null,a)}},{key:"parseOpen",value:function(){this.model=""}},{key:"parseText",value:function(n){this.model+=n}},{key:"parseClose",value:function(n){return n!==this.tag}},{key:"tag",get:function(){return"formula"}}])&&v(e.prototype,t),o}(c("../../base-xform"));T.exports=s},{"../../base-xform":31}],90:[function(c,T,O){function y(t){return(y=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r})(t)}function p(t,r){for(var o=0;o"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}();return function(){var o,n=f(t);if(r){var a=f(this).constructor;o=Reflect.construct(n,arguments,a)}else o=n.apply(this,arguments);return m(this,o)}}function m(t,r){return!r||y(r)!=="object"&&typeof r!="function"?function(o){if(o===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return o}(t):r}function f(t){return(f=Object.setPrototypeOf?Object.getPrototypeOf:function(r){return r.__proto__||Object.getPrototypeOf(r)})(t)}var h=c("../../base-xform"),s=c("../../composite-xform"),i=c("./cfvo-xform"),e=function(t){(function(u,l){if(typeof l!="function"&&l!==null)throw new TypeError("Super expression must either be null or a function");u.prototype=Object.create(l&&l.prototype,{constructor:{value:u,writable:!0,configurable:!0}}),l&&v(u,l)})(a,t);var r,o,n=d(a);function a(){var u;return function(l,b){if(!(l instanceof b))throw new TypeError("Cannot call a class as a function")}(this,a),(u=n.call(this)).map={cfvo:u.cfvoXform=new i},u}return r=a,(o=[{key:"render",value:function(u,l){var b=this;u.openNode(this.tag,{iconSet:h.toStringAttribute(l.iconSet,"3TrafficLights"),reverse:h.toBoolAttribute(l.reverse,!1),showValue:h.toBoolAttribute(l.showValue,!0)}),l.cfvo.forEach(function(w){b.cfvoXform.render(u,w)}),u.closeNode()}},{key:"createNewModel",value:function(u){var l=u.attributes;return{iconSet:h.toStringValue(l.iconSet,"3TrafficLights"),reverse:h.toBoolValue(l.reverse),showValue:h.toBoolValue(l.showValue),cfvo:[]}}},{key:"onParserClose",value:function(u,l){this.model[u].push(l.model)}},{key:"tag",get:function(){return"iconSet"}}])&&p(r.prototype,o),a}(s);T.exports=e},{"../../base-xform":31,"../../composite-xform":47,"./cfvo-xform":83}],91:[function(c,T,O){function y(i){return(y=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(i)}function p(i,e){if(!(i instanceof e))throw new TypeError("Cannot call a class as a function")}function v(i,e){for(var t=0;t"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}();return function(){var t,r=h(i);if(e){var o=h(this).constructor;t=Reflect.construct(r,arguments,o)}else t=r.apply(this,arguments);return f(this,t)}}function f(i,e){return!e||y(e)!=="object"&&typeof e!="function"?function(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(i):e}function h(i){return(h=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(i)}var s=function(i){(function(n,a){if(typeof a!="function"&&a!==null)throw new TypeError("Super expression must either be null or a function");n.prototype=Object.create(a&&a.prototype,{constructor:{value:n,writable:!0,configurable:!0}}),a&&d(n,a)})(o,i);var e,t,r=m(o);function o(){return p(this,o),r.apply(this,arguments)}return e=o,(t=[{key:"prepare",value:function(n,a){var u=a.styles.addStyleModel(n.style||{});u&&(n.styleId=u)}},{key:"render",value:function(n,a){n.openNode("col"),n.addAttribute("min",a.min),n.addAttribute("max",a.max),a.width&&n.addAttribute("width",a.width),a.styleId&&n.addAttribute("style",a.styleId),a.hidden&&n.addAttribute("hidden","1"),a.bestFit&&n.addAttribute("bestFit","1"),a.outlineLevel&&n.addAttribute("outlineLevel",a.outlineLevel),a.collapsed&&n.addAttribute("collapsed","1"),n.addAttribute("customWidth","1"),n.closeNode()}},{key:"parseOpen",value:function(n){if(n.name==="col"){var a=this.model={min:parseInt(n.attributes.min||"0",10),max:parseInt(n.attributes.max||"0",10),width:n.attributes.width===void 0?void 0:parseFloat(n.attributes.width||"0")};return n.attributes.style&&(a.styleId=parseInt(n.attributes.style,10)),n.attributes.hidden!==!0&&n.attributes.hidden!=="true"&&n.attributes.hidden!==1&&n.attributes.hidden!=="1"||(a.hidden=!0),n.attributes.bestFit&&(a.bestFit=!0),n.attributes.outlineLevel&&(a.outlineLevel=parseInt(n.attributes.outlineLevel,10)),n.attributes.collapsed&&(a.collapsed=!0),!0}return!1}},{key:"parseText",value:function(){}},{key:"parseClose",value:function(){return!1}},{key:"reconcile",value:function(n,a){n.styleId&&(n.style=a.styles.getStyleModel(n.styleId))}},{key:"tag",get:function(){return"col"}}])&&v(e.prototype,t),o}(c("../base-xform"));T.exports=s},{"../base-xform":31}],92:[function(c,T,O){function y(w){return(y=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(C){return typeof C}:function(C){return C&&typeof Symbol=="function"&&C.constructor===Symbol&&C!==Symbol.prototype?"symbol":typeof C})(w)}function p(w,C){if(!(w instanceof C))throw new TypeError("Cannot call a class as a function")}function v(w,C){for(var R=0;R"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}();return function(){var R,A=h(w);if(C){var j=h(this).constructor;R=Reflect.construct(A,arguments,j)}else R=A.apply(this,arguments);return f(this,R)}}function f(w,C){return!C||y(C)!=="object"&&typeof C!="function"?function(R){if(R===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return R}(w):C}function h(w){return(h=Object.setPrototypeOf?Object.getPrototypeOf:function(C){return C.__proto__||Object.getPrototypeOf(C)})(w)}function s(w,C){var R=Object.keys(w);if(Object.getOwnPropertySymbols){var A=Object.getOwnPropertySymbols(w);C&&(A=A.filter(function(j){return Object.getOwnPropertyDescriptor(w,j).enumerable})),R.push.apply(R,A)}return R}function i(w){for(var C=1;C1||U>1){var q=D.row+(B-1),$=D.col+(U-1);return i(i({},M.dataValidation),{},{sqref:"".concat(M.address,":").concat(o.encodeAddress(q,$))})}return i(i({},M.dataValidation),{},{sqref:M.address})}return null}).filter(Boolean)}(_);S.length&&(P.openNode("dataValidations",{count:S.length}),S.forEach(function(g){P.openNode("dataValidation"),g.type!=="any"&&(P.addAttribute("type",g.type),g.operator&&g.type!=="list"&&g.operator!=="between"&&P.addAttribute("operator",g.operator),g.allowBlank&&P.addAttribute("allowBlank","1")),g.showInputMessage&&P.addAttribute("showInputMessage","1"),g.promptTitle&&P.addAttribute("promptTitle",g.promptTitle),g.prompt&&P.addAttribute("prompt",g.prompt),g.showErrorMessage&&P.addAttribute("showErrorMessage","1"),g.errorStyle&&P.addAttribute("errorStyle",g.errorStyle),g.errorTitle&&P.addAttribute("errorTitle",g.errorTitle),g.error&&P.addAttribute("error",g.error),P.addAttribute("sqref",g.sqref),(g.formulae||[]).forEach(function(E,k){P.openNode("formula".concat(k+1)),g.type==="date"?P.writeText(r.dateToExcel(new Date(E))):P.writeText(E),P.closeNode()}),P.closeNode()}),P.closeNode())}},{key:"parseOpen",value:function(P){switch(P.name){case"dataValidations":return this.model={},!0;case"dataValidation":this._address=P.attributes.sqref;var _={type:P.attributes.type||"any",formulae:[]};switch(P.attributes.type&&l(_,P.attributes,"allowBlank"),l(_,P.attributes,"showInputMessage"),l(_,P.attributes,"showErrorMessage"),_.type){case"any":case"list":case"custom":break;default:u(_,P.attributes,"operator","between")}return u(_,P.attributes,"promptTitle"),u(_,P.attributes,"prompt"),u(_,P.attributes,"errorStyle"),u(_,P.attributes,"errorTitle"),u(_,P.attributes,"error"),this._dataValidation=_,!0;case"formula1":case"formula2":return this._formula=[],!0;default:return!1}}},{key:"parseText",value:function(P){this._formula&&this._formula.push(P)}},{key:"parseClose",value:function(P){var _=this;switch(P){case"dataValidations":return!1;case"dataValidation":return this._dataValidation.formulae&&this._dataValidation.formulae.length||(delete this._dataValidation.formulae,delete this._dataValidation.operator),(this._address.split(/\s+/g)||[]).forEach(function(g){g.includes(":")?new a(g).forEachAddress(function(E){_.model[E]=_._dataValidation}):_.model[g]=_._dataValidation}),!0;case"formula1":case"formula2":var S=this._formula.join("");switch(this._dataValidation.type){case"whole":case"textLength":S=parseInt(S,10);break;case"decimal":S=parseFloat(S);break;case"date":S=r.excelToDate(parseFloat(S))}return this._dataValidation.formulae.push(S),this._formula=void 0,!0;default:return!0}}},{key:"tag",get:function(){return"dataValidations"}}])&&v(C.prototype,R),j}(n);T.exports=b},{"../../../doc/range":10,"../../../utils/col-cache":19,"../../../utils/under-dash":25,"../../../utils/utils":26,"../base-xform":31}],93:[function(c,T,O){function y(i){return(y=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(i)}function p(i,e){if(!(i instanceof e))throw new TypeError("Cannot call a class as a function")}function v(i,e){for(var t=0;t"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}();return function(){var t,r=h(i);if(e){var o=h(this).constructor;t=Reflect.construct(r,arguments,o)}else t=r.apply(this,arguments);return f(this,t)}}function f(i,e){return!e||y(e)!=="object"&&typeof e!="function"?function(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(i):e}function h(i){return(h=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(i)}var s=function(i){(function(n,a){if(typeof a!="function"&&a!==null)throw new TypeError("Super expression must either be null or a function");n.prototype=Object.create(a&&a.prototype,{constructor:{value:n,writable:!0,configurable:!0}}),a&&d(n,a)})(o,i);var e,t,r=m(o);function o(){return p(this,o),r.apply(this,arguments)}return e=o,(t=[{key:"render",value:function(n,a){a&&n.leafNode("dimension",{ref:a})}},{key:"parseOpen",value:function(n){return n.name==="dimension"&&(this.model=n.attributes.ref,!0)}},{key:"parseText",value:function(){}},{key:"parseClose",value:function(){return!1}},{key:"tag",get:function(){return"dimension"}}])&&v(e.prototype,t),o}(c("../base-xform"));T.exports=s},{"../base-xform":31}],94:[function(c,T,O){function y(i){return(y=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(i)}function p(i,e){if(!(i instanceof e))throw new TypeError("Cannot call a class as a function")}function v(i,e){for(var t=0;t"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}();return function(){var t,r=h(i);if(e){var o=h(this).constructor;t=Reflect.construct(r,arguments,o)}else t=r.apply(this,arguments);return f(this,t)}}function f(i,e){return!e||y(e)!=="object"&&typeof e!="function"?function(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(i):e}function h(i){return(h=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(i)}var s=function(i){(function(n,a){if(typeof a!="function"&&a!==null)throw new TypeError("Super expression must either be null or a function");n.prototype=Object.create(a&&a.prototype,{constructor:{value:n,writable:!0,configurable:!0}}),a&&d(n,a)})(o,i);var e,t,r=m(o);function o(){return p(this,o),r.apply(this,arguments)}return e=o,(t=[{key:"render",value:function(n,a){a&&n.leafNode(this.tag,{"r:id":a.rId})}},{key:"parseOpen",value:function(n){switch(n.name){case this.tag:return this.model={rId:n.attributes["r:id"]},!0;default:return!1}}},{key:"parseText",value:function(){}},{key:"parseClose",value:function(){return!1}},{key:"tag",get:function(){return"drawing"}}])&&v(e.prototype,t),o}(c("../base-xform"));T.exports=s},{"../base-xform":31}],95:[function(c,T,O){function y(n){return(y=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(a){return typeof a}:function(a){return a&&typeof Symbol=="function"&&a.constructor===Symbol&&a!==Symbol.prototype?"symbol":typeof a})(n)}function p(n,a){if(!(n instanceof a))throw new TypeError("Cannot call a class as a function")}function v(n,a){for(var u=0;u"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}();return function(){var u,l=i(n);if(a){var b=i(this).constructor;u=Reflect.construct(l,arguments,b)}else u=l.apply(this,arguments);return s(this,u)}}function s(n,a){return!a||y(a)!=="object"&&typeof a!="function"?function(u){if(u===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return u}(n):a}function i(n){return(i=Object.setPrototypeOf?Object.getPrototypeOf:function(a){return a.__proto__||Object.getPrototypeOf(a)})(n)}var e=c("../composite-xform"),t=c("./cf-ext/conditional-formattings-ext-xform"),r=function(n){m(u,n);var a=h(u);function u(){var l;return p(this,u),(l=a.call(this)).map={"x14:conditionalFormattings":l.conditionalFormattings=new t},l}return d(u,[{key:"hasContent",value:function(l){return this.conditionalFormattings.hasContent(l.conditionalFormattings)}},{key:"prepare",value:function(l,b){this.conditionalFormattings.prepare(l.conditionalFormattings,b)}},{key:"render",value:function(l,b){l.openNode("ext",{uri:"{78C0D931-6437-407d-A8EE-F0AAD7539E65}","xmlns:x14":"http://schemas.microsoft.com/office/spreadsheetml/2009/9/main"}),this.conditionalFormattings.render(l,b.conditionalFormattings),l.closeNode()}},{key:"createNewModel",value:function(){return{}}},{key:"onParserClose",value:function(l,b){this.model[l]=b.model}},{key:"tag",get:function(){return"ext"}}]),u}(e),o=function(n){m(u,n);var a=h(u);function u(){var l;return p(this,u),(l=a.call(this)).map={ext:l.ext=new r},l}return d(u,[{key:"prepare",value:function(l,b){this.ext.prepare(l,b)}},{key:"hasContent",value:function(l){return this.ext.hasContent(l)}},{key:"render",value:function(l,b){this.hasContent(b)&&(l.openNode("extLst"),this.ext.render(l,b),l.closeNode())}},{key:"createNewModel",value:function(){return{}}},{key:"onParserClose",value:function(l,b){Object.assign(this.model,b.model)}},{key:"tag",get:function(){return"extLst"}}]),u}(e);T.exports=o},{"../composite-xform":47,"./cf-ext/conditional-formattings-ext-xform":77}],96:[function(c,T,O){function y(i){return(y=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(i)}function p(i,e){if(!(i instanceof e))throw new TypeError("Cannot call a class as a function")}function v(i,e){for(var t=0;t"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}();return function(){var t,r=h(i);if(e){var o=h(this).constructor;t=Reflect.construct(r,arguments,o)}else t=r.apply(this,arguments);return f(this,t)}}function f(i,e){return!e||y(e)!=="object"&&typeof e!="function"?function(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(i):e}function h(i){return(h=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(i)}var s=function(i){(function(n,a){if(typeof a!="function"&&a!==null)throw new TypeError("Super expression must either be null or a function");n.prototype=Object.create(a&&a.prototype,{constructor:{value:n,writable:!0,configurable:!0}}),a&&d(n,a)})(o,i);var e,t,r=m(o);function o(){return p(this,o),r.apply(this,arguments)}return e=o,(t=[{key:"render",value:function(n,a){if(a){n.addRollback();var u=!1;n.openNode("headerFooter"),a.differentFirst&&(n.addAttribute("differentFirst","1"),u=!0),a.differentOddEven&&(n.addAttribute("differentOddEven","1"),u=!0),a.oddHeader&&typeof a.oddHeader=="string"&&(n.leafNode("oddHeader",null,a.oddHeader),u=!0),a.oddFooter&&typeof a.oddFooter=="string"&&(n.leafNode("oddFooter",null,a.oddFooter),u=!0),a.evenHeader&&typeof a.evenHeader=="string"&&(n.leafNode("evenHeader",null,a.evenHeader),u=!0),a.evenFooter&&typeof a.evenFooter=="string"&&(n.leafNode("evenFooter",null,a.evenFooter),u=!0),a.firstHeader&&typeof a.firstHeader=="string"&&(n.leafNode("firstHeader",null,a.firstHeader),u=!0),a.firstFooter&&typeof a.firstFooter=="string"&&(n.leafNode("firstFooter",null,a.firstFooter),u=!0),u?(n.closeNode(),n.commit()):n.rollback()}}},{key:"parseOpen",value:function(n){switch(n.name){case"headerFooter":return this.model={},n.attributes.differentFirst&&(this.model.differentFirst=parseInt(n.attributes.differentFirst,0)===1),n.attributes.differentOddEven&&(this.model.differentOddEven=parseInt(n.attributes.differentOddEven,0)===1),!0;case"oddHeader":return this.currentNode="oddHeader",!0;case"oddFooter":return this.currentNode="oddFooter",!0;case"evenHeader":return this.currentNode="evenHeader",!0;case"evenFooter":return this.currentNode="evenFooter",!0;case"firstHeader":return this.currentNode="firstHeader",!0;case"firstFooter":return this.currentNode="firstFooter",!0;default:return!1}}},{key:"parseText",value:function(n){switch(this.currentNode){case"oddHeader":this.model.oddHeader=n;break;case"oddFooter":this.model.oddFooter=n;break;case"evenHeader":this.model.evenHeader=n;break;case"evenFooter":this.model.evenFooter=n;break;case"firstHeader":this.model.firstHeader=n;break;case"firstFooter":this.model.firstFooter=n}}},{key:"parseClose",value:function(){switch(this.currentNode){case"oddHeader":case"oddFooter":case"evenHeader":case"evenFooter":case"firstHeader":case"firstFooter":return this.currentNode=void 0,!0;default:return!1}}},{key:"tag",get:function(){return"headerFooter"}}])&&v(e.prototype,t),o}(c("../base-xform"));T.exports=s},{"../base-xform":31}],97:[function(c,T,O){function y(i){return(y=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(i)}function p(i,e){if(!(i instanceof e))throw new TypeError("Cannot call a class as a function")}function v(i,e){for(var t=0;t"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}();return function(){var t,r=h(i);if(e){var o=h(this).constructor;t=Reflect.construct(r,arguments,o)}else t=r.apply(this,arguments);return f(this,t)}}function f(i,e){return!e||y(e)!=="object"&&typeof e!="function"?function(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(i):e}function h(i){return(h=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(i)}var s=function(i){(function(n,a){if(typeof a!="function"&&a!==null)throw new TypeError("Super expression must either be null or a function");n.prototype=Object.create(a&&a.prototype,{constructor:{value:n,writable:!0,configurable:!0}}),a&&d(n,a)})(o,i);var e,t,r=m(o);function o(){return p(this,o),r.apply(this,arguments)}return e=o,(t=[{key:"render",value:function(n,a){n.leafNode("hyperlink",{ref:a.address,"r:id":a.rId,tooltip:a.tooltip})}},{key:"parseOpen",value:function(n){return n.name==="hyperlink"&&(this.model={address:n.attributes.ref,rId:n.attributes["r:id"],tooltip:n.attributes.tooltip},!0)}},{key:"parseText",value:function(){}},{key:"parseClose",value:function(){return!1}},{key:"tag",get:function(){return"hyperlink"}}])&&v(e.prototype,t),o}(c("../base-xform"));T.exports=s},{"../base-xform":31}],98:[function(c,T,O){function y(i){return(y=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(i)}function p(i,e){if(!(i instanceof e))throw new TypeError("Cannot call a class as a function")}function v(i,e){for(var t=0;t"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}();return function(){var t,r=h(i);if(e){var o=h(this).constructor;t=Reflect.construct(r,arguments,o)}else t=r.apply(this,arguments);return f(this,t)}}function f(i,e){return!e||y(e)!=="object"&&typeof e!="function"?function(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(i):e}function h(i){return(h=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(i)}var s=function(i){(function(n,a){if(typeof a!="function"&&a!==null)throw new TypeError("Super expression must either be null or a function");n.prototype=Object.create(a&&a.prototype,{constructor:{value:n,writable:!0,configurable:!0}}),a&&d(n,a)})(o,i);var e,t,r=m(o);function o(){return p(this,o),r.apply(this,arguments)}return e=o,(t=[{key:"render",value:function(n,a){n.leafNode("mergeCell",{ref:a})}},{key:"parseOpen",value:function(n){return n.name==="mergeCell"&&(this.model=n.attributes.ref,!0)}},{key:"parseText",value:function(){}},{key:"parseClose",value:function(){return!1}},{key:"tag",get:function(){return"mergeCell"}}])&&v(e.prototype,t),o}(c("../base-xform"));T.exports=s},{"../base-xform":31}],99:[function(c,T,O){function y(h,s){for(var i=0;i"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}();return function(){var o,n=h(t);if(r){var a=h(this).constructor;o=Reflect.construct(n,arguments,a)}else o=n.apply(this,arguments);return f(this,o)}}function f(t,r){return!r||y(r)!=="object"&&typeof r!="function"?function(o){if(o===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return o}(t):r}function h(t){return(h=Object.setPrototypeOf?Object.getPrototypeOf:function(r){return r.__proto__||Object.getPrototypeOf(r)})(t)}var s=c("../base-xform"),i=function(t){return t!==void 0},e=function(t){(function(u,l){if(typeof l!="function"&&l!==null)throw new TypeError("Super expression must either be null or a function");u.prototype=Object.create(l&&l.prototype,{constructor:{value:u,writable:!0,configurable:!0}}),l&&d(u,l)})(a,t);var r,o,n=m(a);function a(){return p(this,a),n.apply(this,arguments)}return r=a,(o=[{key:"render",value:function(u,l){return!(!l||!i(l.summaryBelow)&&!i(l.summaryRight)||(u.leafNode(this.tag,{summaryBelow:i(l.summaryBelow)?Number(l.summaryBelow):void 0,summaryRight:i(l.summaryRight)?Number(l.summaryRight):void 0}),0))}},{key:"parseOpen",value:function(u){return u.name===this.tag&&(this.model={summaryBelow:i(u.attributes.summaryBelow)?!!Number(u.attributes.summaryBelow):void 0,summaryRight:i(u.attributes.summaryRight)?!!Number(u.attributes.summaryRight):void 0},!0)}},{key:"parseText",value:function(){}},{key:"parseClose",value:function(){return!1}},{key:"tag",get:function(){return"outlinePr"}}])&&v(r.prototype,o),a}(s);T.exports=e},{"../base-xform":31}],101:[function(c,T,O){function y(i){return(y=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(i)}function p(i,e){if(!(i instanceof e))throw new TypeError("Cannot call a class as a function")}function v(i,e){for(var t=0;t"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}();return function(){var t,r=h(i);if(e){var o=h(this).constructor;t=Reflect.construct(r,arguments,o)}else t=r.apply(this,arguments);return f(this,t)}}function f(i,e){return!e||y(e)!=="object"&&typeof e!="function"?function(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(i):e}function h(i){return(h=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(i)}var s=function(i){(function(n,a){if(typeof a!="function"&&a!==null)throw new TypeError("Super expression must either be null or a function");n.prototype=Object.create(a&&a.prototype,{constructor:{value:n,writable:!0,configurable:!0}}),a&&d(n,a)})(o,i);var e,t,r=m(o);function o(){return p(this,o),r.apply(this,arguments)}return e=o,(t=[{key:"render",value:function(n,a){n.leafNode("brk",a)}},{key:"parseOpen",value:function(n){return n.name==="brk"&&(this.model=n.attributes.ref,!0)}},{key:"parseText",value:function(){}},{key:"parseClose",value:function(){return!1}},{key:"tag",get:function(){return"brk"}}])&&v(e.prototype,t),o}(c("../base-xform"));T.exports=s},{"../base-xform":31}],102:[function(c,T,O){function y(e){return(y=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(e)}function p(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function v(e,t){for(var r=0;r"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}();return function(){var r,o=h(e);if(t){var n=h(this).constructor;r=Reflect.construct(o,arguments,n)}else r=o.apply(this,arguments);return f(this,r)}}function f(e,t){return!t||y(t)!=="object"&&typeof t!="function"?function(r){if(r===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return r}(e):t}function h(e){return(h=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(e)}var s=c("../../../utils/under-dash"),i=function(e){(function(a,u){if(typeof u!="function"&&u!==null)throw new TypeError("Super expression must either be null or a function");a.prototype=Object.create(u&&u.prototype,{constructor:{value:a,writable:!0,configurable:!0}}),u&&d(a,u)})(n,e);var t,r,o=m(n);function n(){return p(this,n),o.apply(this,arguments)}return t=n,(r=[{key:"render",value:function(a,u){if(u){var l={left:u.left,right:u.right,top:u.top,bottom:u.bottom,header:u.header,footer:u.footer};s.some(l,function(b){return b!==void 0})&&a.leafNode(this.tag,l)}}},{key:"parseOpen",value:function(a){switch(a.name){case this.tag:return this.model={left:parseFloat(a.attributes.left||.7),right:parseFloat(a.attributes.right||.7),top:parseFloat(a.attributes.top||.75),bottom:parseFloat(a.attributes.bottom||.75),header:parseFloat(a.attributes.header||.3),footer:parseFloat(a.attributes.footer||.3)},!0;default:return!1}}},{key:"parseText",value:function(){}},{key:"parseClose",value:function(){return!1}},{key:"tag",get:function(){return"pageMargins"}}])&&v(t.prototype,r),n}(c("../base-xform"));T.exports=i},{"../../../utils/under-dash":25,"../base-xform":31}],103:[function(c,T,O){function y(i){return(y=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(i)}function p(i,e){if(!(i instanceof e))throw new TypeError("Cannot call a class as a function")}function v(i,e){for(var t=0;t"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}();return function(){var t,r=h(i);if(e){var o=h(this).constructor;t=Reflect.construct(r,arguments,o)}else t=r.apply(this,arguments);return f(this,t)}}function f(i,e){return!e||y(e)!=="object"&&typeof e!="function"?function(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(i):e}function h(i){return(h=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(i)}var s=function(i){(function(n,a){if(typeof a!="function"&&a!==null)throw new TypeError("Super expression must either be null or a function");n.prototype=Object.create(a&&a.prototype,{constructor:{value:n,writable:!0,configurable:!0}}),a&&d(n,a)})(o,i);var e,t,r=m(o);function o(){return p(this,o),r.apply(this,arguments)}return e=o,(t=[{key:"render",value:function(n,a){return!(!a||!a.fitToPage||(n.leafNode(this.tag,{fitToPage:a.fitToPage?"1":void 0}),0))}},{key:"parseOpen",value:function(n){return n.name===this.tag&&(this.model={fitToPage:n.attributes.fitToPage==="1"},!0)}},{key:"parseText",value:function(){}},{key:"parseClose",value:function(){return!1}},{key:"tag",get:function(){return"pageSetUpPr"}}])&&v(e.prototype,t),o}(c("../base-xform"));T.exports=s},{"../base-xform":31}],104:[function(c,T,O){function y(n){return(y=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(a){return typeof a}:function(a){return a&&typeof Symbol=="function"&&a.constructor===Symbol&&a!==Symbol.prototype?"symbol":typeof a})(n)}function p(n,a){if(!(n instanceof a))throw new TypeError("Cannot call a class as a function")}function v(n,a){for(var u=0;u"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}();return function(){var u,l=h(n);if(a){var b=h(this).constructor;u=Reflect.construct(l,arguments,b)}else u=l.apply(this,arguments);return f(this,u)}}function f(n,a){return!a||y(a)!=="object"&&typeof a!="function"?function(u){if(u===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return u}(n):a}function h(n){return(h=Object.setPrototypeOf?Object.getPrototypeOf:function(a){return a.__proto__||Object.getPrototypeOf(a)})(n)}var s=c("../../../utils/under-dash");function i(n){return n?"1":void 0}function e(n){switch(n){case"overThenDown":return n;default:return}}function t(n){switch(n){case"atEnd":case"asDisplyed":return n;default:return}}function r(n){switch(n){case"dash":case"blank":case"NA":return n;default:return}}var o=function(n){(function(w,C){if(typeof C!="function"&&C!==null)throw new TypeError("Super expression must either be null or a function");w.prototype=Object.create(C&&C.prototype,{constructor:{value:w,writable:!0,configurable:!0}}),C&&d(w,C)})(b,n);var a,u,l=m(b);function b(){return p(this,b),l.apply(this,arguments)}return a=b,(u=[{key:"render",value:function(w,C){if(C){var R={paperSize:C.paperSize,orientation:C.orientation,horizontalDpi:C.horizontalDpi,verticalDpi:C.verticalDpi,pageOrder:e(C.pageOrder),blackAndWhite:i(C.blackAndWhite),draft:i(C.draft),cellComments:t(C.cellComments),errors:r(C.errors),scale:C.scale,fitToWidth:C.fitToWidth,fitToHeight:C.fitToHeight,firstPageNumber:C.firstPageNumber,useFirstPageNumber:i(C.firstPageNumber),usePrinterDefaults:i(C.usePrinterDefaults),copies:C.copies};s.some(R,function(A){return A!==void 0})&&w.leafNode(this.tag,R)}}},{key:"parseOpen",value:function(w){switch(w.name){case this.tag:return this.model={paperSize:(C=w.attributes.paperSize,C!==void 0?parseInt(C,10):void 0),orientation:w.attributes.orientation||"portrait",horizontalDpi:parseInt(w.attributes.horizontalDpi||"4294967295",10),verticalDpi:parseInt(w.attributes.verticalDpi||"4294967295",10),pageOrder:w.attributes.pageOrder||"downThenOver",blackAndWhite:w.attributes.blackAndWhite==="1",draft:w.attributes.draft==="1",cellComments:w.attributes.cellComments||"None",errors:w.attributes.errors||"displayed",scale:parseInt(w.attributes.scale||"100",10),fitToWidth:parseInt(w.attributes.fitToWidth||"1",10),fitToHeight:parseInt(w.attributes.fitToHeight||"1",10),firstPageNumber:parseInt(w.attributes.firstPageNumber||"1",10),useFirstPageNumber:w.attributes.useFirstPageNumber==="1",usePrinterDefaults:w.attributes.usePrinterDefaults==="1",copies:parseInt(w.attributes.copies||"1",10)},!0;default:return!1}var C}},{key:"parseText",value:function(){}},{key:"parseClose",value:function(){return!1}},{key:"tag",get:function(){return"pageSetup"}}])&&v(a.prototype,u),b}(c("../base-xform"));T.exports=o},{"../../../utils/under-dash":25,"../base-xform":31}],105:[function(c,T,O){function y(i){return(y=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(i)}function p(i,e){if(!(i instanceof e))throw new TypeError("Cannot call a class as a function")}function v(i,e){for(var t=0;t"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}();return function(){var t,r=h(i);if(e){var o=h(this).constructor;t=Reflect.construct(r,arguments,o)}else t=r.apply(this,arguments);return f(this,t)}}function f(i,e){return!e||y(e)!=="object"&&typeof e!="function"?function(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(i):e}function h(i){return(h=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(i)}var s=function(i){(function(n,a){if(typeof a!="function"&&a!==null)throw new TypeError("Super expression must either be null or a function");n.prototype=Object.create(a&&a.prototype,{constructor:{value:n,writable:!0,configurable:!0}}),a&&d(n,a)})(o,i);var e,t,r=m(o);function o(){return p(this,o),r.apply(this,arguments)}return e=o,(t=[{key:"render",value:function(n,a){a&&n.leafNode(this.tag,{"r:id":a.rId})}},{key:"parseOpen",value:function(n){switch(n.name){case this.tag:return this.model={rId:n.attributes["r:id"]},!0;default:return!1}}},{key:"parseText",value:function(){}},{key:"parseClose",value:function(){return!1}},{key:"tag",get:function(){return"picture"}}])&&v(e.prototype,t),o}(c("../base-xform"));T.exports=s},{"../base-xform":31}],106:[function(c,T,O){function y(t){return(y=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r})(t)}function p(t,r){if(!(t instanceof r))throw new TypeError("Cannot call a class as a function")}function v(t,r){for(var o=0;o"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}();return function(){var o,n=h(t);if(r){var a=h(this).constructor;o=Reflect.construct(n,arguments,a)}else o=n.apply(this,arguments);return f(this,o)}}function f(t,r){return!r||y(r)!=="object"&&typeof r!="function"?function(o){if(o===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return o}(t):r}function h(t){return(h=Object.setPrototypeOf?Object.getPrototypeOf:function(r){return r.__proto__||Object.getPrototypeOf(r)})(t)}var s=c("../../../utils/under-dash");function i(t){return t?"1":void 0}var e=function(t){(function(u,l){if(typeof l!="function"&&l!==null)throw new TypeError("Super expression must either be null or a function");u.prototype=Object.create(l&&l.prototype,{constructor:{value:u,writable:!0,configurable:!0}}),l&&d(u,l)})(a,t);var r,o,n=m(a);function a(){return p(this,a),n.apply(this,arguments)}return r=a,(o=[{key:"render",value:function(u,l){if(l){var b={headings:i(l.showRowColHeaders),gridLines:i(l.showGridLines),horizontalCentered:i(l.horizontalCentered),verticalCentered:i(l.verticalCentered)};s.some(b,function(w){return w!==void 0})&&u.leafNode(this.tag,b)}}},{key:"parseOpen",value:function(u){switch(u.name){case this.tag:return this.model={showRowColHeaders:u.attributes.headings==="1",showGridLines:u.attributes.gridLines==="1",horizontalCentered:u.attributes.horizontalCentered==="1",verticalCentered:u.attributes.verticalCentered==="1"},!0;default:return!1}}},{key:"parseText",value:function(){}},{key:"parseClose",value:function(){return!1}},{key:"tag",get:function(){return"printOptions"}}])&&v(r.prototype,o),a}(c("../base-xform"));T.exports=e},{"../../../utils/under-dash":25,"../base-xform":31}],107:[function(c,T,O){function y(i){return(y=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(i)}function p(i,e){for(var t=0;t"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}();return function(){var t,r=f(i);if(e){var o=f(this).constructor;t=Reflect.construct(r,arguments,o)}else t=r.apply(this,arguments);return m(this,t)}}function m(i,e){return!e||y(e)!=="object"&&typeof e!="function"?function(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(i):e}function f(i){return(f=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(i)}var h=c("./page-breaks-xform"),s=function(i){(function(n,a){if(typeof a!="function"&&a!==null)throw new TypeError("Super expression must either be null or a function");n.prototype=Object.create(a&&a.prototype,{constructor:{value:n,writable:!0,configurable:!0}}),a&&v(n,a)})(o,i);var e,t,r=d(o);function o(){(function(a,u){if(!(a instanceof u))throw new TypeError("Cannot call a class as a function")})(this,o);var n={tag:"rowBreaks",count:!0,childXform:new h};return r.call(this,n)}return e=o,(t=[{key:"render",value:function(n,a){if(a&&a.length){n.openNode(this.tag,this.$),this.count&&(n.addAttribute(this.$count,a.length),n.addAttribute("manualBreakCount",a.length));var u=this.childXform;a.forEach(function(l){u.render(n,l)}),n.closeNode()}else this.empty&&n.leafNode(this.tag)}}])&&p(e.prototype,t),o}(c("../list-xform"));T.exports=s},{"../list-xform":70,"./page-breaks-xform":101}],108:[function(c,T,O){function y(e){return(y=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(e)}function p(e,t){for(var r=0;r"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}();return function(){var r,o=f(e);if(t){var n=f(this).constructor;r=Reflect.construct(o,arguments,n)}else r=o.apply(this,arguments);return m(this,r)}}function m(e,t){return!t||y(t)!=="object"&&typeof t!="function"?function(r){if(r===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return r}(e):t}function f(e){return(f=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(e)}var h=c("../base-xform"),s=c("./cell-xform"),i=function(e){(function(a,u){if(typeof u!="function"&&u!==null)throw new TypeError("Super expression must either be null or a function");a.prototype=Object.create(u&&u.prototype,{constructor:{value:a,writable:!0,configurable:!0}}),u&&v(a,u)})(n,e);var t,r,o=d(n);function n(a){var u;return function(l,b){if(!(l instanceof b))throw new TypeError("Cannot call a class as a function")}(this,n),(u=o.call(this)).maxItems=a&&a.maxItems,u.map={c:new s},u}return t=n,(r=[{key:"prepare",value:function(a,u){var l=u.styles.addStyleModel(a.style);l&&(a.styleId=l);var b=this.map.c;a.cells.forEach(function(w){b.prepare(w,u)})}},{key:"render",value:function(a,u,l){a.openNode("row"),a.addAttribute("r",u.number),u.height&&(a.addAttribute("ht",u.height),a.addAttribute("customHeight","1")),u.hidden&&a.addAttribute("hidden","1"),u.min>0&&u.max>0&&u.min<=u.max&&a.addAttribute("spans","".concat(u.min,":").concat(u.max)),u.styleId&&(a.addAttribute("s",u.styleId),a.addAttribute("customFormat","1")),a.addAttribute("x14ac:dyDescent","0.25"),u.outlineLevel&&a.addAttribute("outlineLevel",u.outlineLevel),u.collapsed&&a.addAttribute("collapsed","1");var b=this.map.c;u.cells.forEach(function(w){b.render(a,w,l)}),a.closeNode()}},{key:"parseOpen",value:function(a){if(this.parser)return this.parser.parseOpen(a),!0;if(a.name==="row"){this.numRowsSeen+=1;var u=a.attributes.spans?a.attributes.spans.split(":").map(function(b){return parseInt(b,10)}):[void 0,void 0],l=this.model={number:parseInt(a.attributes.r,10),min:u[0],max:u[1],cells:[]};return a.attributes.s&&(l.styleId=parseInt(a.attributes.s,10)),a.attributes.hidden!==!0&&a.attributes.hidden!=="true"&&a.attributes.hidden!==1&&a.attributes.hidden!=="1"||(l.hidden=!0),a.attributes.bestFit&&(l.bestFit=!0),a.attributes.ht&&(l.height=parseFloat(a.attributes.ht)),a.attributes.outlineLevel&&(l.outlineLevel=parseInt(a.attributes.outlineLevel,10)),a.attributes.collapsed&&(l.collapsed=!0),!0}return this.parser=this.map[a.name],!!this.parser&&(this.parser.parseOpen(a),!0)}},{key:"parseText",value:function(a){this.parser&&this.parser.parseText(a)}},{key:"parseClose",value:function(a){if(this.parser){if(!this.parser.parseClose(a)){if(this.model.cells.push(this.parser.model),this.maxItems&&this.model.cells.length>this.maxItems)throw new Error("Max column count (".concat(this.maxItems,") exceeded"));this.parser=void 0}return!0}return!1}},{key:"reconcile",value:function(a,u){a.style=a.styleId?u.styles.getStyleModel(a.styleId):{},a.styleId!==void 0&&(a.styleId=void 0);var l=this.map.c;a.cells.forEach(function(b){l.reconcile(b,u)})}},{key:"tag",get:function(){return"row"}}])&&p(t.prototype,r),n}(h);T.exports=i},{"../base-xform":31,"./cell-xform":72}],109:[function(c,T,O){function y(e){return(y=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(e)}function p(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function v(e,t){for(var r=0;r"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}();return function(){var r,o=h(e);if(t){var n=h(this).constructor;r=Reflect.construct(o,arguments,n)}else r=o.apply(this,arguments);return f(this,r)}}function f(e,t){return!t||y(t)!=="object"&&typeof t!="function"?function(r){if(r===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return r}(e):t}function h(e){return(h=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(e)}var s=c("../../../utils/under-dash"),i=function(e){(function(a,u){if(typeof u!="function"&&u!==null)throw new TypeError("Super expression must either be null or a function");a.prototype=Object.create(u&&u.prototype,{constructor:{value:a,writable:!0,configurable:!0}}),u&&d(a,u)})(n,e);var t,r,o=m(n);function n(){return p(this,n),o.apply(this,arguments)}return t=n,(r=[{key:"render",value:function(a,u){if(u){var l={defaultRowHeight:u.defaultRowHeight,outlineLevelRow:u.outlineLevelRow,outlineLevelCol:u.outlineLevelCol,"x14ac:dyDescent":u.dyDescent};u.defaultColWidth&&(l.defaultColWidth=u.defaultColWidth),u.defaultRowHeight&&u.defaultRowHeight===15||(l.customHeight="1"),s.some(l,function(b){return b!==void 0})&&a.leafNode("sheetFormatPr",l)}}},{key:"parseOpen",value:function(a){return a.name==="sheetFormatPr"&&(this.model={defaultRowHeight:parseFloat(a.attributes.defaultRowHeight||"0"),dyDescent:parseFloat(a.attributes["x14ac:dyDescent"]||"0"),outlineLevelRow:parseInt(a.attributes.outlineLevelRow||"0",10),outlineLevelCol:parseInt(a.attributes.outlineLevelCol||"0",10)},a.attributes.defaultColWidth&&(this.model.defaultColWidth=parseFloat(a.attributes.defaultColWidth)),!0)}},{key:"parseText",value:function(){}},{key:"parseClose",value:function(){return!1}},{key:"tag",get:function(){return"sheetFormatPr"}}])&&v(t.prototype,r),n}(c("../base-xform"));T.exports=i},{"../../../utils/under-dash":25,"../base-xform":31}],110:[function(c,T,O){function y(r){return(y=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(o){return typeof o}:function(o){return o&&typeof Symbol=="function"&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o})(r)}function p(r,o){for(var n=0;n"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}();return function(){var n,a=f(r);if(o){var u=f(this).constructor;n=Reflect.construct(a,arguments,u)}else n=a.apply(this,arguments);return m(this,n)}}function m(r,o){return!o||y(o)!=="object"&&typeof o!="function"?function(n){if(n===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return n}(r):o}function f(r){return(f=Object.setPrototypeOf?Object.getPrototypeOf:function(o){return o.__proto__||Object.getPrototypeOf(o)})(r)}var h=c("../base-xform"),s=c("../style/color-xform"),i=c("./page-setup-properties-xform"),e=c("./outline-properties-xform"),t=function(r){(function(l,b){if(typeof b!="function"&&b!==null)throw new TypeError("Super expression must either be null or a function");l.prototype=Object.create(b&&b.prototype,{constructor:{value:l,writable:!0,configurable:!0}}),b&&v(l,b)})(u,r);var o,n,a=d(u);function u(){var l;return function(b,w){if(!(b instanceof w))throw new TypeError("Cannot call a class as a function")}(this,u),(l=a.call(this)).map={tabColor:new s("tabColor"),pageSetUpPr:new i,outlinePr:new e},l}return o=u,(n=[{key:"render",value:function(l,b){if(b){l.addRollback(),l.openNode("sheetPr");var w=!1;w=this.map.tabColor.render(l,b.tabColor)||w,w=this.map.pageSetUpPr.render(l,b.pageSetup)||w,(w=this.map.outlinePr.render(l,b.outlineProperties)||w)?(l.closeNode(),l.commit()):l.rollback()}}},{key:"parseOpen",value:function(l){return this.parser?(this.parser.parseOpen(l),!0):l.name===this.tag?(this.reset(),!0):!!this.map[l.name]&&(this.parser=this.map[l.name],this.parser.parseOpen(l),!0)}},{key:"parseText",value:function(l){return!!this.parser&&(this.parser.parseText(l),!0)}},{key:"parseClose",value:function(l){return this.parser?(this.parser.parseClose(l)||(this.parser=void 0),!0):(this.map.tabColor.model||this.map.pageSetUpPr.model||this.map.outlinePr.model?(this.model={},this.map.tabColor.model&&(this.model.tabColor=this.map.tabColor.model),this.map.pageSetUpPr.model&&(this.model.pageSetup=this.map.pageSetUpPr.model),this.map.outlinePr.model&&(this.model.outlineProperties=this.map.outlinePr.model)):this.model=null,!1)}},{key:"tag",get:function(){return"sheetPr"}}])&&p(o.prototype,n),u}(h);T.exports=t},{"../base-xform":31,"../style/color-xform":127,"./outline-properties-xform":100,"./page-setup-properties-xform":103}],111:[function(c,T,O){function y(r){return(y=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(o){return typeof o}:function(o){return o&&typeof Symbol=="function"&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o})(r)}function p(r,o){if(!(r instanceof o))throw new TypeError("Cannot call a class as a function")}function v(r,o){for(var n=0;n"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}();return function(){var n,a=h(r);if(o){var u=h(this).constructor;n=Reflect.construct(a,arguments,u)}else n=a.apply(this,arguments);return f(this,n)}}function f(r,o){return!o||y(o)!=="object"&&typeof o!="function"?function(n){if(n===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return n}(r):o}function h(r){return(h=Object.setPrototypeOf?Object.getPrototypeOf:function(o){return o.__proto__||Object.getPrototypeOf(o)})(r)}var s=c("../../../utils/under-dash");function i(r,o){return r?o:void 0}function e(r,o){return r===o||void 0}var t=function(r){(function(l,b){if(typeof b!="function"&&b!==null)throw new TypeError("Super expression must either be null or a function");l.prototype=Object.create(b&&b.prototype,{constructor:{value:l,writable:!0,configurable:!0}}),b&&d(l,b)})(u,r);var o,n,a=m(u);function u(){return p(this,u),a.apply(this,arguments)}return o=u,(n=[{key:"render",value:function(l,b){if(b){var w={sheet:i(b.sheet,"1"),selectLockedCells:b.selectLockedCells===!1?"1":void 0,selectUnlockedCells:b.selectUnlockedCells===!1?"1":void 0,formatCells:i(b.formatCells,"0"),formatColumns:i(b.formatColumns,"0"),formatRows:i(b.formatRows,"0"),insertColumns:i(b.insertColumns,"0"),insertRows:i(b.insertRows,"0"),insertHyperlinks:i(b.insertHyperlinks,"0"),deleteColumns:i(b.deleteColumns,"0"),deleteRows:i(b.deleteRows,"0"),sort:i(b.sort,"0"),autoFilter:i(b.autoFilter,"0"),pivotTables:i(b.pivotTables,"0")};b.sheet&&(w.algorithmName=b.algorithmName,w.hashValue=b.hashValue,w.saltValue=b.saltValue,w.spinCount=b.spinCount,w.objects=i(b.objects===!1,"1"),w.scenarios=i(b.scenarios===!1,"1")),s.some(w,function(C){return C!==void 0})&&l.leafNode(this.tag,w)}}},{key:"parseOpen",value:function(l){switch(l.name){case this.tag:return this.model={sheet:e(l.attributes.sheet,"1"),objects:l.attributes.objects!=="1"&&void 0,scenarios:l.attributes.scenarios!=="1"&&void 0,selectLockedCells:l.attributes.selectLockedCells!=="1"&&void 0,selectUnlockedCells:l.attributes.selectUnlockedCells!=="1"&&void 0,formatCells:e(l.attributes.formatCells,"0"),formatColumns:e(l.attributes.formatColumns,"0"),formatRows:e(l.attributes.formatRows,"0"),insertColumns:e(l.attributes.insertColumns,"0"),insertRows:e(l.attributes.insertRows,"0"),insertHyperlinks:e(l.attributes.insertHyperlinks,"0"),deleteColumns:e(l.attributes.deleteColumns,"0"),deleteRows:e(l.attributes.deleteRows,"0"),sort:e(l.attributes.sort,"0"),autoFilter:e(l.attributes.autoFilter,"0"),pivotTables:e(l.attributes.pivotTables,"0")},l.attributes.algorithmName&&(this.model.algorithmName=l.attributes.algorithmName,this.model.hashValue=l.attributes.hashValue,this.model.saltValue=l.attributes.saltValue,this.model.spinCount=parseInt(l.attributes.spinCount,10)),!0;default:return!1}}},{key:"parseText",value:function(){}},{key:"parseClose",value:function(){return!1}},{key:"tag",get:function(){return"sheetProtection"}}])&&v(o.prototype,n),u}(c("../base-xform"));T.exports=t},{"../../../utils/under-dash":25,"../base-xform":31}],112:[function(c,T,O){function y(r){return(y=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(o){return typeof o}:function(o){return o&&typeof Symbol=="function"&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o})(r)}function p(r,o){if(!(r instanceof o))throw new TypeError("Cannot call a class as a function")}function v(r,o){for(var n=0;n"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}();return function(){var n,a=h(r);if(o){var u=h(this).constructor;n=Reflect.construct(a,arguments,u)}else n=a.apply(this,arguments);return f(this,n)}}function f(r,o){return!o||y(o)!=="object"&&typeof o!="function"?function(n){if(n===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return n}(r):o}function h(r){return(h=Object.setPrototypeOf?Object.getPrototypeOf:function(o){return o.__proto__||Object.getPrototypeOf(o)})(r)}var s=c("../../../utils/col-cache"),i=c("../base-xform"),e={frozen:"frozen",frozenSplit:"frozen",split:"split"},t=function(r){(function(l,b){if(typeof b!="function"&&b!==null)throw new TypeError("Super expression must either be null or a function");l.prototype=Object.create(b&&b.prototype,{constructor:{value:l,writable:!0,configurable:!0}}),b&&d(l,b)})(u,r);var o,n,a=m(u);function u(){return p(this,u),a.apply(this,arguments)}return o=u,(n=[{key:"prepare",value:function(l){switch(l.state){case"frozen":case"split":break;default:l.state="normal"}}},{key:"render",value:function(l,b){l.openNode("sheetView",{workbookViewId:b.workbookViewId||0});var w,C,R,A,j=function(P,_,S){S&&l.addAttribute(P,_)};switch(j("rightToLeft","1",b.rightToLeft===!0),j("tabSelected","1",b.tabSelected),j("showRuler","0",b.showRuler===!1),j("showRowColHeaders","0",b.showRowColHeaders===!1),j("showGridLines","0",b.showGridLines===!1),j("zoomScale",b.zoomScale,b.zoomScale),j("zoomScaleNormal",b.zoomScaleNormal,b.zoomScaleNormal),j("view",b.style,b.style),b.state){case"frozen":C=b.xSplit||0,R=b.ySplit||0,w=b.topLeftCell||s.getAddress(R+1,C+1).address,A=(b.xSplit&&b.ySplit?"bottomRight":b.xSplit&&"topRight")||"bottomLeft",l.leafNode("pane",{xSplit:b.xSplit||void 0,ySplit:b.ySplit||void 0,topLeftCell:w,activePane:A,state:"frozen"}),l.leafNode("selection",{pane:A,activeCell:b.activeCell,sqref:b.activeCell});break;case"split":b.activePane==="topLeft"&&(b.activePane=void 0),l.leafNode("pane",{xSplit:b.xSplit||void 0,ySplit:b.ySplit||void 0,topLeftCell:b.topLeftCell,activePane:b.activePane}),l.leafNode("selection",{pane:b.activePane,activeCell:b.activeCell,sqref:b.activeCell});break;case"normal":b.activeCell&&l.leafNode("selection",{activeCell:b.activeCell,sqref:b.activeCell})}l.closeNode()}},{key:"parseOpen",value:function(l){switch(l.name){case"sheetView":return this.sheetView={workbookViewId:parseInt(l.attributes.workbookViewId,10),rightToLeft:l.attributes.rightToLeft==="1",tabSelected:l.attributes.tabSelected==="1",showRuler:l.attributes.showRuler!=="0",showRowColHeaders:l.attributes.showRowColHeaders!=="0",showGridLines:l.attributes.showGridLines!=="0",zoomScale:parseInt(l.attributes.zoomScale||"100",10),zoomScaleNormal:parseInt(l.attributes.zoomScaleNormal||"100",10),style:l.attributes.view},this.pane=void 0,this.selections={},!0;case"pane":return this.pane={xSplit:parseInt(l.attributes.xSplit||"0",10),ySplit:parseInt(l.attributes.ySplit||"0",10),topLeftCell:l.attributes.topLeftCell,activePane:l.attributes.activePane||"topLeft",state:l.attributes.state},!0;case"selection":var b=l.attributes.pane||"topLeft";return this.selections[b]={pane:b,activeCell:l.attributes.activeCell},!0;default:return!1}}},{key:"parseText",value:function(){}},{key:"parseClose",value:function(l){var b,w;switch(l){case"sheetView":return this.sheetView&&this.pane?(b=this.model={workbookViewId:this.sheetView.workbookViewId,rightToLeft:this.sheetView.rightToLeft,state:e[this.pane.state]||"split",xSplit:this.pane.xSplit,ySplit:this.pane.ySplit,topLeftCell:this.pane.topLeftCell,showRuler:this.sheetView.showRuler,showRowColHeaders:this.sheetView.showRowColHeaders,showGridLines:this.sheetView.showGridLines,zoomScale:this.sheetView.zoomScale,zoomScaleNormal:this.sheetView.zoomScaleNormal},this.model.state==="split"&&(b.activePane=this.pane.activePane),(w=this.selections[this.pane.activePane])&&w.activeCell&&(b.activeCell=w.activeCell),this.sheetView.style&&(b.style=this.sheetView.style)):(b=this.model={workbookViewId:this.sheetView.workbookViewId,rightToLeft:this.sheetView.rightToLeft,state:"normal",showRuler:this.sheetView.showRuler,showRowColHeaders:this.sheetView.showRowColHeaders,showGridLines:this.sheetView.showGridLines,zoomScale:this.sheetView.zoomScale,zoomScaleNormal:this.sheetView.zoomScaleNormal},(w=this.selections.topLeft)&&w.activeCell&&(b.activeCell=w.activeCell),this.sheetView.style&&(b.style=this.sheetView.style)),!1;default:return!0}}},{key:"reconcile",value:function(){}},{key:"tag",get:function(){return"sheetView"}}])&&v(o.prototype,n),u}(i);T.exports=t},{"../../../utils/col-cache":19,"../base-xform":31}],113:[function(c,T,O){function y(i){return(y=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(i)}function p(i,e){if(!(i instanceof e))throw new TypeError("Cannot call a class as a function")}function v(i,e){for(var t=0;t"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}();return function(){var t,r=h(i);if(e){var o=h(this).constructor;t=Reflect.construct(r,arguments,o)}else t=r.apply(this,arguments);return f(this,t)}}function f(i,e){return!e||y(e)!=="object"&&typeof e!="function"?function(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(i):e}function h(i){return(h=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(i)}var s=function(i){(function(n,a){if(typeof a!="function"&&a!==null)throw new TypeError("Super expression must either be null or a function");n.prototype=Object.create(a&&a.prototype,{constructor:{value:n,writable:!0,configurable:!0}}),a&&d(n,a)})(o,i);var e,t,r=m(o);function o(){return p(this,o),r.apply(this,arguments)}return e=o,(t=[{key:"render",value:function(n,a){a&&n.leafNode(this.tag,{"r:id":a.rId})}},{key:"parseOpen",value:function(n){switch(n.name){case this.tag:return this.model={rId:n.attributes["r:id"]},!0;default:return!1}}},{key:"parseText",value:function(){}},{key:"parseClose",value:function(){return!1}},{key:"tag",get:function(){return"tablePart"}}])&&v(e.prototype,t),o}(c("../base-xform"));T.exports=s},{"../base-xform":31}],114:[function(c,T,O){function y(V){return(y=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(q){return typeof q}:function(q){return q&&typeof Symbol=="function"&&q.constructor===Symbol&&q!==Symbol.prototype?"symbol":typeof q})(V)}function p(V,q){for(var $=0;$"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}();return function(){var $,L=f(V);if(q){var I=f(this).constructor;$=Reflect.construct(L,arguments,I)}else $=L.apply(this,arguments);return m(this,$)}}function m(V,q){return!q||y(q)!=="object"&&typeof q!="function"?function($){if($===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return $}(V):q}function f(V){return(f=Object.setPrototypeOf?Object.getPrototypeOf:function(q){return q.__proto__||Object.getPrototypeOf(q)})(V)}var h=c("../../../utils/under-dash"),s=c("../../../utils/col-cache"),i=c("../../../utils/xml-stream"),e=c("../../rel-type"),t=c("./merges"),r=c("../base-xform"),o=c("../list-xform"),n=c("./row-xform"),a=c("./col-xform"),u=c("./dimension-xform"),l=c("./hyperlink-xform"),b=c("./merge-cell-xform"),w=c("./data-validations-xform"),C=c("./sheet-properties-xform"),R=c("./sheet-format-properties-xform"),A=c("./sheet-view-xform"),j=c("./sheet-protection-xform"),P=c("./page-margins-xform"),_=c("./page-setup-xform"),S=c("./print-options-xform"),g=c("./auto-filter-xform"),E=c("./picture-xform"),k=c("./drawing-xform"),x=c("./table-part-xform"),M=c("./row-breaks-xform"),D=c("./header-footer-xform"),B=c("./cf/conditional-formattings-xform"),F=c("./ext-lst-xform"),U=function(V,q){if(!q||!q.length)return V;if(!V||!V.length)return q;var $={},L={};return V.forEach(function(I){$[I.ref]=I,I.rules.forEach(function(N){var z=N.x14Id;z&&(L[z]=N)})}),q.forEach(function(I){I.rules.forEach(function(N){var z=L[N.x14Id];z?function(W,K){Object.keys(K).forEach(function(Y){var ae=W[Y],te=K[Y];ae===void 0&&te!==void 0&&(W[Y]=te)})}(z,N):$[I.ref]?$[I.ref].rules.push(N):V.push({ref:I.ref,rules:[N]})})}),V},H=function(V){(function(N,z){if(typeof z!="function"&&z!==null)throw new TypeError("Super expression must either be null or a function");N.prototype=Object.create(z&&z.prototype,{constructor:{value:N,writable:!0,configurable:!0}}),z&&v(N,z)})(I,V);var q,$,L=d(I);function I(N){var z;(function(ae,te){if(!(ae instanceof te))throw new TypeError("Cannot call a class as a function")})(this,I),z=L.call(this);var W=N||{},K=W.maxRows,Y=W.maxCols;return z.map={sheetPr:new C,dimension:new u,sheetViews:new o({tag:"sheetViews",count:!1,childXform:new A}),sheetFormatPr:new R,cols:new o({tag:"cols",count:!1,childXform:new a}),sheetData:new o({tag:"sheetData",count:!1,empty:!0,childXform:new n({maxItems:Y}),maxItems:K}),autoFilter:new g,mergeCells:new o({tag:"mergeCells",count:!0,childXform:new b}),rowBreaks:new M,hyperlinks:new o({tag:"hyperlinks",count:!1,childXform:new l}),pageMargins:new P,dataValidations:new w,pageSetup:new _,headerFooter:new D,printOptions:new S,picture:new E,drawing:new k,sheetProtection:new j,tableParts:new o({tag:"tableParts",count:!0,childXform:new x}),conditionalFormatting:new B,extLst:new F},z}return q=I,($=[{key:"prepare",value:function(N,z){var W=this;z.merges=new t,N.hyperlinks=z.hyperlinks=[],N.comments=z.comments=[],z.formulae={},z.siFormulae=0,this.map.cols.prepare(N.cols,z),this.map.sheetData.prepare(N.rows,z),this.map.conditionalFormatting.prepare(N.conditionalFormattings,z),N.mergeCells=z.merges.mergeCells;var K=N.rels=[];function Y(le){return"rId".concat(le.length+1)}if(N.hyperlinks.forEach(function(le){var Ce=Y(K);le.rId=Ce,K.push({Id:Ce,Type:e.Hyperlink,Target:le.target,TargetMode:"External"})}),N.comments.length>0){var ae={Id:Y(K),Type:e.Comments,Target:"../comments".concat(N.id,".xml")};K.push(ae);var te={Id:Y(K),Type:e.VmlDrawing,Target:"../drawings/vmlDrawing".concat(N.id,".vml")};K.push(te),N.comments.forEach(function(le){le.refAddress=s.decodeAddress(le.ref)}),z.commentRefs.push({commentName:"comments".concat(N.id),vmlDrawing:"vmlDrawing".concat(N.id)})}var fe,me=[];N.media.forEach(function(le){if(le.type==="background"){var Ce=Y(K);fe=z.media[le.imageId],K.push({Id:Ce,Type:e.Image,Target:"../media/".concat(fe.name,".").concat(fe.extension)}),N.background={rId:Ce},N.image=z.media[le.imageId]}else if(le.type==="image"){var xe=N.drawing;fe=z.media[le.imageId],xe||(xe=N.drawing={rId:Y(K),name:"drawing".concat(++z.drawingsCount),anchors:[],rels:[]},z.drawings.push(xe),K.push({Id:xe.rId,Type:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/drawing",Target:"../drawings/".concat(xe.name,".xml")}));var we=W.preImageId===le.imageId?me[le.imageId]:me[xe.rels.length];we||(we=Y(xe.rels),me[xe.rels.length]=we,xe.rels.push({Id:we,Type:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/image",Target:"../media/".concat(fe.name,".").concat(fe.extension)}));var Se={picture:{rId:we},range:le.range};if(le.hyperlinks&&le.hyperlinks.hyperlink){var Te=Y(xe.rels);me[xe.rels.length]=Te,Se.picture.hyperlinks={tooltip:le.hyperlinks.tooltip,rId:Te},xe.rels.push({Id:Te,Type:e.Hyperlink,Target:le.hyperlinks.hyperlink,TargetMode:"External"})}W.preImageId=le.imageId,xe.anchors.push(Se)}}),N.tables.forEach(function(le){var Ce=Y(K);le.rId=Ce,K.push({Id:Ce,Type:e.Table,Target:"../tables/".concat(le.target)}),le.columns.forEach(function(xe){var we=xe.style;we&&(xe.dxfId=z.styles.addDxfStyle(we))})}),this.map.extLst.prepare(N,z)}},{key:"render",value:function(N,z){N.openXml(i.StdDocAttributes),N.openNode("worksheet",I.WORKSHEET_ATTRIBUTES);var W=z.properties?{defaultRowHeight:z.properties.defaultRowHeight,dyDescent:z.properties.dyDescent,outlineLevelCol:z.properties.outlineLevelCol,outlineLevelRow:z.properties.outlineLevelRow}:void 0;z.properties&&z.properties.defaultColWidth&&(W.defaultColWidth=z.properties.defaultColWidth);var K={outlineProperties:z.properties&&z.properties.outlineProperties,tabColor:z.properties&&z.properties.tabColor,pageSetup:z.pageSetup&&z.pageSetup.fitToPage?{fitToPage:z.pageSetup.fitToPage}:void 0},Y=z.pageSetup&&z.pageSetup.margins,ae={showRowColHeaders:z.pageSetup&&z.pageSetup.showRowColHeaders,showGridLines:z.pageSetup&&z.pageSetup.showGridLines,horizontalCentered:z.pageSetup&&z.pageSetup.horizontalCentered,verticalCentered:z.pageSetup&&z.pageSetup.verticalCentered},te=z.sheetProtection;this.map.sheetPr.render(N,K),this.map.dimension.render(N,z.dimensions),this.map.sheetViews.render(N,z.views),this.map.sheetFormatPr.render(N,W),this.map.cols.render(N,z.cols),this.map.sheetData.render(N,z.rows),this.map.sheetProtection.render(N,te),this.map.autoFilter.render(N,z.autoFilter),this.map.mergeCells.render(N,z.mergeCells),this.map.conditionalFormatting.render(N,z.conditionalFormattings),this.map.dataValidations.render(N,z.dataValidations),this.map.hyperlinks.render(N,z.hyperlinks),this.map.printOptions.render(N,ae),this.map.pageMargins.render(N,Y),this.map.pageSetup.render(N,z.pageSetup),this.map.headerFooter.render(N,z.headerFooter),this.map.rowBreaks.render(N,z.rowBreaks),this.map.drawing.render(N,z.drawing),this.map.picture.render(N,z.background),this.map.tableParts.render(N,z.tables),this.map.extLst.render(N,z),z.rels&&z.rels.forEach(function(fe){fe.Type===e.VmlDrawing&&N.leafNode("legacyDrawing",{"r:id":fe.Id})}),N.closeNode()}},{key:"parseOpen",value:function(N){return this.parser?(this.parser.parseOpen(N),!0):N.name==="worksheet"?(h.each(this.map,function(z){z.reset()}),!0):(this.parser=this.map[N.name],this.parser&&this.parser.parseOpen(N),!0)}},{key:"parseText",value:function(N){this.parser&&this.parser.parseText(N)}},{key:"parseClose",value:function(N){if(this.parser)return this.parser.parseClose(N)||(this.parser=void 0),!0;switch(N){case"worksheet":var z=this.map.sheetFormatPr.model||{};this.map.sheetPr.model&&this.map.sheetPr.model.tabColor&&(z.tabColor=this.map.sheetPr.model.tabColor),this.map.sheetPr.model&&this.map.sheetPr.model.outlineProperties&&(z.outlineProperties=this.map.sheetPr.model.outlineProperties);var W={fitToPage:this.map.sheetPr.model&&this.map.sheetPr.model.pageSetup&&this.map.sheetPr.model.pageSetup.fitToPage||!1,margins:this.map.pageMargins.model},K=Object.assign(W,this.map.pageSetup.model,this.map.printOptions.model),Y=U(this.map.conditionalFormatting.model,this.map.extLst.model&&this.map.extLst.model["x14:conditionalFormattings"]);return this.model={dimensions:this.map.dimension.model,cols:this.map.cols.model,rows:this.map.sheetData.model,mergeCells:this.map.mergeCells.model,hyperlinks:this.map.hyperlinks.model,dataValidations:this.map.dataValidations.model,properties:z,views:this.map.sheetViews.model,pageSetup:K,headerFooter:this.map.headerFooter.model,background:this.map.picture.model,drawing:this.map.drawing.model,tables:this.map.tableParts.model,conditionalFormattings:Y},this.map.autoFilter.model&&(this.model.autoFilter=this.map.autoFilter.model),this.map.sheetProtection.model&&(this.model.sheetProtection=this.map.sheetProtection.model),!1;default:return!0}}},{key:"reconcile",value:function(N,z){var W=(N.relationships||[]).reduce(function(me,le){if(me[le.Id]=le,le.Type===e.Comments&&(N.comments=z.comments[le.Target].comments),le.Type===e.VmlDrawing&&N.comments&&N.comments.length){var Ce=z.vmlDrawings[le.Target].comments;N.comments.forEach(function(xe,we){xe.note=Object.assign({},xe.note,Ce[we])})}return me},{});if(z.commentsMap=(N.comments||[]).reduce(function(me,le){return le.ref&&(me[le.ref]=le),me},{}),z.hyperlinkMap=(N.hyperlinks||[]).reduce(function(me,le){return le.rId&&(me[le.address]=W[le.rId].Target),me},{}),z.formulae={},N.rows=N.rows&&N.rows.filter(Boolean)||[],N.rows.forEach(function(me){me.cells=me.cells&&me.cells.filter(Boolean)||[]}),this.map.cols.reconcile(N.cols,z),this.map.sheetData.reconcile(N.rows,z),this.map.conditionalFormatting.reconcile(N.conditionalFormattings,z),N.media=[],N.drawing){var K=W[N.drawing.rId].Target.match(/\/drawings\/([a-zA-Z0-9]+)[.][a-zA-Z]{3,4}$/);if(K){var Y=K[1];z.drawings[Y].anchors.forEach(function(me){if(me.medium){var le={type:"image",imageId:me.medium.index,range:me.range,hyperlinks:me.picture.hyperlinks};N.media.push(le)}})}}var ae=N.background&&W[N.background.rId];if(ae){var te=ae.Target.split("/media/")[1],fe=z.mediaIndex&&z.mediaIndex[te];fe!==void 0&&N.media.push({type:"background",imageId:fe})}N.tables=(N.tables||[]).map(function(me){var le=W[me.rId];return z.tables[le.Target]}),delete N.relationships,delete N.hyperlinks,delete N.comments}}])&&p(q.prototype,$),I}(r);H.WORKSHEET_ATTRIBUTES={xmlns:"http://schemas.openxmlformats.org/spreadsheetml/2006/main","xmlns:r":"http://schemas.openxmlformats.org/officeDocument/2006/relationships","xmlns:mc":"http://schemas.openxmlformats.org/markup-compatibility/2006","mc:Ignorable":"x14ac","xmlns:x14ac":"http://schemas.microsoft.com/office/spreadsheetml/2009/9/ac"},T.exports=H},{"../../../utils/col-cache":19,"../../../utils/under-dash":25,"../../../utils/xml-stream":27,"../../rel-type":30,"../base-xform":31,"../list-xform":70,"./auto-filter-xform":71,"./cf/conditional-formattings-xform":86,"./col-xform":91,"./data-validations-xform":92,"./dimension-xform":93,"./drawing-xform":94,"./ext-lst-xform":95,"./header-footer-xform":96,"./hyperlink-xform":97,"./merge-cell-xform":98,"./merges":99,"./page-margins-xform":102,"./page-setup-xform":104,"./picture-xform":105,"./print-options-xform":106,"./row-breaks-xform":107,"./row-xform":108,"./sheet-format-properties-xform":109,"./sheet-properties-xform":110,"./sheet-protection-xform":111,"./sheet-view-xform":112,"./table-part-xform":113}],115:[function(c,T,O){function y(s){return(y=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(i){return typeof i}:function(i){return i&&typeof Symbol=="function"&&i.constructor===Symbol&&i!==Symbol.prototype?"symbol":typeof i})(s)}function p(s,i){for(var e=0;e"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}();return function(){var e,t=f(s);if(i){var r=f(this).constructor;e=Reflect.construct(t,arguments,r)}else e=t.apply(this,arguments);return m(this,e)}}function m(s,i){return!i||y(i)!=="object"&&typeof i!="function"?function(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(s):i}function f(s){return(f=Object.setPrototypeOf?Object.getPrototypeOf:function(i){return i.__proto__||Object.getPrototypeOf(i)})(s)}var h=function(s){(function(o,n){if(typeof n!="function"&&n!==null)throw new TypeError("Super expression must either be null or a function");o.prototype=Object.create(n&&n.prototype,{constructor:{value:o,writable:!0,configurable:!0}}),n&&v(o,n)})(r,s);var i,e,t=d(r);function r(o){var n;return function(a,u){if(!(a instanceof u))throw new TypeError("Cannot call a class as a function")}(this,r),(n=t.call(this)).tag=o.tag,n.attr=o.attr,n}return i=r,(e=[{key:"render",value:function(o,n){n&&(o.openNode(this.tag),o.closeNode())}},{key:"parseOpen",value:function(o){o.name===this.tag&&(this.model=!0)}},{key:"parseText",value:function(){}},{key:"parseClose",value:function(){return!1}}])&&p(i.prototype,e),r}(c("../base-xform"));T.exports=h},{"../base-xform":31}],116:[function(c,T,O){function y(s){return(y=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(i){return typeof i}:function(i){return i&&typeof Symbol=="function"&&i.constructor===Symbol&&i!==Symbol.prototype?"symbol":typeof i})(s)}function p(s,i){for(var e=0;e"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}();return function(){var e,t=f(s);if(i){var r=f(this).constructor;e=Reflect.construct(t,arguments,r)}else e=t.apply(this,arguments);return m(this,e)}}function m(s,i){return!i||y(i)!=="object"&&typeof i!="function"?function(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(s):i}function f(s){return(f=Object.setPrototypeOf?Object.getPrototypeOf:function(i){return i.__proto__||Object.getPrototypeOf(i)})(s)}var h=function(s){(function(o,n){if(typeof n!="function"&&n!==null)throw new TypeError("Super expression must either be null or a function");o.prototype=Object.create(n&&n.prototype,{constructor:{value:o,writable:!0,configurable:!0}}),n&&v(o,n)})(r,s);var i,e,t=d(r);function r(o){var n;return function(a,u){if(!(a instanceof u))throw new TypeError("Cannot call a class as a function")}(this,r),(n=t.call(this)).tag=o.tag,n.attr=o.attr,n.attrs=o.attrs,n._format=o.format||function(a){try{return Number.isNaN(a.getTime())?"":a.toISOString()}catch{return""}},n._parse=o.parse||function(a){return new Date(a)},n}return i=r,(e=[{key:"render",value:function(o,n){n&&(o.openNode(this.tag),this.attrs&&o.addAttributes(this.attrs),this.attr?o.addAttribute(this.attr,this._format(n)):o.writeText(this._format(n)),o.closeNode())}},{key:"parseOpen",value:function(o){o.name===this.tag&&(this.attr?this.model=this._parse(o.attributes[this.attr]):this.text=[])}},{key:"parseText",value:function(o){this.attr||this.text.push(o)}},{key:"parseClose",value:function(){return this.attr||(this.model=this._parse(this.text.join(""))),!1}}])&&p(i.prototype,e),r}(c("../base-xform"));T.exports=h},{"../base-xform":31}],117:[function(c,T,O){function y(s){return(y=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(i){return typeof i}:function(i){return i&&typeof Symbol=="function"&&i.constructor===Symbol&&i!==Symbol.prototype?"symbol":typeof i})(s)}function p(s,i){for(var e=0;e"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}();return function(){var e,t=f(s);if(i){var r=f(this).constructor;e=Reflect.construct(t,arguments,r)}else e=t.apply(this,arguments);return m(this,e)}}function m(s,i){return!i||y(i)!=="object"&&typeof i!="function"?function(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(s):i}function f(s){return(f=Object.setPrototypeOf?Object.getPrototypeOf:function(i){return i.__proto__||Object.getPrototypeOf(i)})(s)}var h=function(s){(function(o,n){if(typeof n!="function"&&n!==null)throw new TypeError("Super expression must either be null or a function");o.prototype=Object.create(n&&n.prototype,{constructor:{value:o,writable:!0,configurable:!0}}),n&&v(o,n)})(r,s);var i,e,t=d(r);function r(o){var n;return function(a,u){if(!(a instanceof u))throw new TypeError("Cannot call a class as a function")}(this,r),(n=t.call(this)).tag=o.tag,n.attr=o.attr,n.attrs=o.attrs,n.zero=o.zero,n}return i=r,(e=[{key:"render",value:function(o,n){(n||this.zero)&&(o.openNode(this.tag),this.attrs&&o.addAttributes(this.attrs),this.attr?o.addAttribute(this.attr,n):o.writeText(n),o.closeNode())}},{key:"parseOpen",value:function(o){return o.name===this.tag&&(this.attr?this.model=parseInt(o.attributes[this.attr],10):this.text=[],!0)}},{key:"parseText",value:function(o){this.attr||this.text.push(o)}},{key:"parseClose",value:function(){return this.attr||(this.model=parseInt(this.text.join("")||0,10)),!1}}])&&p(i.prototype,e),r}(c("../base-xform"));T.exports=h},{"../base-xform":31}],118:[function(c,T,O){function y(s){return(y=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(i){return typeof i}:function(i){return i&&typeof Symbol=="function"&&i.constructor===Symbol&&i!==Symbol.prototype?"symbol":typeof i})(s)}function p(s,i){for(var e=0;e"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}();return function(){var e,t=f(s);if(i){var r=f(this).constructor;e=Reflect.construct(t,arguments,r)}else e=t.apply(this,arguments);return m(this,e)}}function m(s,i){return!i||y(i)!=="object"&&typeof i!="function"?function(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(s):i}function f(s){return(f=Object.setPrototypeOf?Object.getPrototypeOf:function(i){return i.__proto__||Object.getPrototypeOf(i)})(s)}var h=function(s){(function(o,n){if(typeof n!="function"&&n!==null)throw new TypeError("Super expression must either be null or a function");o.prototype=Object.create(n&&n.prototype,{constructor:{value:o,writable:!0,configurable:!0}}),n&&v(o,n)})(r,s);var i,e,t=d(r);function r(o){var n;return function(a,u){if(!(a instanceof u))throw new TypeError("Cannot call a class as a function")}(this,r),(n=t.call(this)).tag=o.tag,n.attr=o.attr,n.attrs=o.attrs,n}return i=r,(e=[{key:"render",value:function(o,n){n!==void 0&&(o.openNode(this.tag),this.attrs&&o.addAttributes(this.attrs),this.attr?o.addAttribute(this.attr,n):o.writeText(n),o.closeNode())}},{key:"parseOpen",value:function(o){o.name===this.tag&&(this.attr?this.model=o.attributes[this.attr]:this.text=[])}},{key:"parseText",value:function(o){this.attr||this.text.push(o)}},{key:"parseClose",value:function(){return this.attr||(this.model=this.text.join("")),!1}}])&&p(i.prototype,e),r}(c("../base-xform"));T.exports=h},{"../base-xform":31}],119:[function(c,T,O){function y(e){return(y=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(e)}function p(e,t){for(var r=0;r"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}();return function(){var r,o=f(e);if(t){var n=f(this).constructor;r=Reflect.construct(o,arguments,n)}else r=o.apply(this,arguments);return m(this,r)}}function m(e,t){return!t||y(t)!=="object"&&typeof t!="function"?function(r){if(r===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return r}(e):t}function f(e){return(f=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(e)}var h=c("./base-xform"),s=c("../../utils/xml-stream"),i=function(e){(function(a,u){if(typeof u!="function"&&u!==null)throw new TypeError("Super expression must either be null or a function");a.prototype=Object.create(u&&u.prototype,{constructor:{value:a,writable:!0,configurable:!0}}),u&&v(a,u)})(n,e);var t,r,o=d(n);function n(a){var u;return function(l,b){if(!(l instanceof b))throw new TypeError("Cannot call a class as a function")}(this,n),(u=o.call(this))._model=a,u}return t=n,(r=[{key:"render",value:function(a){if(!this._xml){var u=new s;(function l(b,w){b.openNode(w.tag,w.$),w.c&&w.c.forEach(function(C){l(b,C)}),w.t&&b.writeText(w.t),b.closeNode()})(u,this._model),this._xml=u.xml}a.writeXml(this._xml)}},{key:"parseOpen",value:function(){return!0}},{key:"parseText",value:function(){}},{key:"parseClose",value:function(a){switch(a){case this._model.tag:return!1;default:return!0}}}])&&p(t.prototype,r),n}(h);T.exports=i},{"../../utils/xml-stream":27,"./base-xform":31}],120:[function(c,T,O){function y(e){return(y=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(e)}function p(e,t){for(var r=0;r"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}();return function(){var r,o=f(e);if(t){var n=f(this).constructor;r=Reflect.construct(o,arguments,n)}else r=o.apply(this,arguments);return m(this,r)}}function m(e,t){return!t||y(t)!=="object"&&typeof t!="function"?function(r){if(r===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return r}(e):t}function f(e){return(f=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(e)}var h=c("./text-xform"),s=c("./rich-text-xform"),i=function(e){(function(a,u){if(typeof u!="function"&&u!==null)throw new TypeError("Super expression must either be null or a function");a.prototype=Object.create(u&&u.prototype,{constructor:{value:a,writable:!0,configurable:!0}}),u&&v(a,u)})(n,e);var t,r,o=d(n);function n(){var a;return function(u,l){if(!(u instanceof l))throw new TypeError("Cannot call a class as a function")}(this,n),(a=o.call(this)).map={r:new s,t:new h},a}return t=n,(r=[{key:"render",value:function(a,u){if(a.openNode(this.tag,{sb:u.sb||0,eb:u.eb||0}),u&&u.hasOwnProperty("richText")&&u.richText){var l=this.map.r;u.richText.forEach(function(b){l.render(a,b)})}else u&&this.map.t.render(a,u.text);a.closeNode()}},{key:"parseOpen",value:function(a){var u=a.name;return this.parser?(this.parser.parseOpen(a),!0):u===this.tag?(this.model={sb:parseInt(a.attributes.sb,10),eb:parseInt(a.attributes.eb,10)},!0):(this.parser=this.map[u],!!this.parser&&(this.parser.parseOpen(a),!0))}},{key:"parseText",value:function(a){this.parser&&this.parser.parseText(a)}},{key:"parseClose",value:function(a){if(this.parser){if(!this.parser.parseClose(a)){switch(a){case"r":var u=this.model.richText;u||(u=this.model.richText=[]),u.push(this.parser.model);break;case"t":this.model.text=this.parser.model}this.parser=void 0}return!0}switch(a){case this.tag:return!1;default:return!0}}},{key:"tag",get:function(){return"rPh"}}])&&p(t.prototype,r),n}(c("../base-xform"));T.exports=i},{"../base-xform":31,"./rich-text-xform":121,"./text-xform":124}],121:[function(c,T,O){function y(e){return(y=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(e)}function p(e,t){for(var r=0;r"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}();return function(){var r,o=f(e);if(t){var n=f(this).constructor;r=Reflect.construct(o,arguments,n)}else r=o.apply(this,arguments);return m(this,r)}}function m(e,t){return!t||y(t)!=="object"&&typeof t!="function"?function(r){if(r===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return r}(e):t}function f(e){return(f=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(e)}var h=c("./text-xform"),s=c("../style/font-xform"),i=function(e){(function(a,u){if(typeof u!="function"&&u!==null)throw new TypeError("Super expression must either be null or a function");a.prototype=Object.create(u&&u.prototype,{constructor:{value:a,writable:!0,configurable:!0}}),u&&v(a,u)})(n,e);var t,r,o=d(n);function n(a){var u;return function(l,b){if(!(l instanceof b))throw new TypeError("Cannot call a class as a function")}(this,n),(u=o.call(this)).model=a,u}return t=n,(r=[{key:"render",value:function(a,u){u=u||this.model,a.openNode("r"),u.font&&this.fontXform.render(a,u.font),this.textXform.render(a,u.text),a.closeNode()}},{key:"parseOpen",value:function(a){if(this.parser)return this.parser.parseOpen(a),!0;switch(a.name){case"r":return this.model={},!0;case"t":return this.parser=this.textXform,this.parser.parseOpen(a),!0;case"rPr":return this.parser=this.fontXform,this.parser.parseOpen(a),!0;default:return!1}}},{key:"parseText",value:function(a){this.parser&&this.parser.parseText(a)}},{key:"parseClose",value:function(a){switch(a){case"r":return!1;case"t":return this.model.text=this.parser.model,this.parser=void 0,!0;case"rPr":return this.model.font=this.parser.model,this.parser=void 0,!0;default:return this.parser&&this.parser.parseClose(a),!0}}},{key:"tag",get:function(){return"r"}},{key:"textXform",get:function(){return this._textXform||(this._textXform=new h)}},{key:"fontXform",get:function(){return this._fontXform||(this._fontXform=new s(n.FONT_OPTIONS))}}])&&p(t.prototype,r),n}(c("../base-xform"));i.FONT_OPTIONS={tagName:"rPr",fontNameTag:"rFont"},T.exports=i},{"../base-xform":31,"../style/font-xform":130,"./text-xform":124}],122:[function(c,T,O){function y(t){return(y=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r})(t)}function p(t,r){for(var o=0;o"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}();return function(){var o,n=f(t);if(r){var a=f(this).constructor;o=Reflect.construct(n,arguments,a)}else o=n.apply(this,arguments);return m(this,o)}}function m(t,r){return!r||y(r)!=="object"&&typeof r!="function"?function(o){if(o===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return o}(t):r}function f(t){return(f=Object.setPrototypeOf?Object.getPrototypeOf:function(r){return r.__proto__||Object.getPrototypeOf(r)})(t)}var h=c("./text-xform"),s=c("./rich-text-xform"),i=c("./phonetic-text-xform"),e=function(t){(function(u,l){if(typeof l!="function"&&l!==null)throw new TypeError("Super expression must either be null or a function");u.prototype=Object.create(l&&l.prototype,{constructor:{value:u,writable:!0,configurable:!0}}),l&&v(u,l)})(a,t);var r,o,n=d(a);function a(u){var l;return function(b,w){if(!(b instanceof w))throw new TypeError("Cannot call a class as a function")}(this,a),(l=n.call(this)).model=u,l.map={r:new s,t:new h,rPh:new i},l}return r=a,(o=[{key:"render",value:function(u,l){var b=this;u.openNode(this.tag),l&&l.hasOwnProperty("richText")&&l.richText?l.richText.length?l.richText.forEach(function(w){b.map.r.render(u,w)}):this.map.t.render(u,""):l!=null&&this.map.t.render(u,l),u.closeNode()}},{key:"parseOpen",value:function(u){var l=u.name;return this.parser?(this.parser.parseOpen(u),!0):l===this.tag?(this.model={},!0):(this.parser=this.map[l],!!this.parser&&(this.parser.parseOpen(u),!0))}},{key:"parseText",value:function(u){this.parser&&this.parser.parseText(u)}},{key:"parseClose",value:function(u){if(this.parser){if(!this.parser.parseClose(u)){switch(u){case"r":var l=this.model.richText;l||(l=this.model.richText=[]),l.push(this.parser.model);break;case"t":this.model=this.parser.model}this.parser=void 0}return!0}switch(u){case this.tag:return!1;default:return!0}}},{key:"tag",get:function(){return"si"}}])&&p(r.prototype,o),a}(c("../base-xform"));T.exports=e},{"../base-xform":31,"./phonetic-text-xform":120,"./rich-text-xform":121,"./text-xform":124}],123:[function(c,T,O){function y(t){return(y=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r})(t)}function p(t,r){for(var o=0;o"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}();return function(){var o,n=f(t);if(r){var a=f(this).constructor;o=Reflect.construct(n,arguments,a)}else o=n.apply(this,arguments);return m(this,o)}}function m(t,r){return!r||y(r)!=="object"&&typeof r!="function"?function(o){if(o===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return o}(t):r}function f(t){return(f=Object.setPrototypeOf?Object.getPrototypeOf:function(r){return r.__proto__||Object.getPrototypeOf(r)})(t)}var h=c("../../../utils/xml-stream"),s=c("../base-xform"),i=c("./shared-string-xform"),e=function(t){(function(u,l){if(typeof l!="function"&&l!==null)throw new TypeError("Super expression must either be null or a function");u.prototype=Object.create(l&&l.prototype,{constructor:{value:u,writable:!0,configurable:!0}}),l&&v(u,l)})(a,t);var r,o,n=d(a);function a(u){var l;return function(b,w){if(!(b instanceof w))throw new TypeError("Cannot call a class as a function")}(this,a),(l=n.call(this)).model=u||{values:[],count:0},l.hash=Object.create(null),l.rich=Object.create(null),l}return r=a,(o=[{key:"getString",value:function(u){return this.model.values[u]}},{key:"add",value:function(u){return u.richText?this.addRichText(u):this.addText(u)}},{key:"addText",value:function(u){var l=this.hash[u];return l===void 0&&(l=this.hash[u]=this.model.values.length,this.model.values.push(u)),this.model.count++,l}},{key:"addRichText",value:function(u){var l=this.sharedStringXform.toXml(u),b=this.rich[l];return b===void 0&&(b=this.rich[l]=this.model.values.length,this.model.values.push(u)),this.model.count++,b}},{key:"render",value:function(u,l){l=l||this._values,u.openXml(h.StdDocAttributes),u.openNode("sst",{xmlns:"http://schemas.openxmlformats.org/spreadsheetml/2006/main",count:l.count,uniqueCount:l.values.length});var b=this.sharedStringXform;l.values.forEach(function(w){b.render(u,w)}),u.closeNode()}},{key:"parseOpen",value:function(u){if(this.parser)return this.parser.parseOpen(u),!0;switch(u.name){case"sst":return!0;case"si":return this.parser=this.sharedStringXform,this.parser.parseOpen(u),!0;default:throw new Error("Unexpected xml node in parseOpen: ".concat(JSON.stringify(u)))}}},{key:"parseText",value:function(u){this.parser&&this.parser.parseText(u)}},{key:"parseClose",value:function(u){if(this.parser)return this.parser.parseClose(u)||(this.model.values.push(this.parser.model),this.model.count++,this.parser=void 0),!0;switch(u){case"sst":return!1;default:throw new Error("Unexpected xml node in parseClose: ".concat(u))}}},{key:"sharedStringXform",get:function(){return this._sharedStringXform||(this._sharedStringXform=new i)}},{key:"values",get:function(){return this.model.values}},{key:"uniqueCount",get:function(){return this.model.values.length}},{key:"count",get:function(){return this.model.count}}])&&p(r.prototype,o),a}(s);T.exports=e},{"../../../utils/xml-stream":27,"../base-xform":31,"./shared-string-xform":122}],124:[function(c,T,O){function y(i){return(y=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(i)}function p(i,e){if(!(i instanceof e))throw new TypeError("Cannot call a class as a function")}function v(i,e){for(var t=0;t"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}();return function(){var t,r=h(i);if(e){var o=h(this).constructor;t=Reflect.construct(r,arguments,o)}else t=r.apply(this,arguments);return f(this,t)}}function f(i,e){return!e||y(e)!=="object"&&typeof e!="function"?function(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(i):e}function h(i){return(h=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(i)}var s=function(i){(function(n,a){if(typeof a!="function"&&a!==null)throw new TypeError("Super expression must either be null or a function");n.prototype=Object.create(a&&a.prototype,{constructor:{value:n,writable:!0,configurable:!0}}),a&&d(n,a)})(o,i);var e,t,r=m(o);function o(){return p(this,o),r.apply(this,arguments)}return e=o,(t=[{key:"render",value:function(n,a){n.openNode("t"),/^\s|\n|\s$/.test(a)&&n.addAttribute("xml:space","preserve"),n.writeText(a),n.closeNode()}},{key:"parseOpen",value:function(n){switch(n.name){case"t":return this._text=[],!0;default:return!1}}},{key:"parseText",value:function(n){this._text.push(n)}},{key:"parseClose",value:function(){return!1}},{key:"tag",get:function(){return"t"}},{key:"model",get:function(){return this._text.join("").replace(/_x([0-9A-F]{4})_/g,function(n,a){return String.fromCharCode(parseInt(a,16))})}}])&&v(e.prototype,t),o}(c("../base-xform"));T.exports=s},{"../base-xform":31}],125:[function(c,T,O){function y(a){return(y=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(u){return typeof u}:function(u){return u&&typeof Symbol=="function"&&u.constructor===Symbol&&u!==Symbol.prototype?"symbol":typeof u})(a)}function p(a,u){if(!(a instanceof u))throw new TypeError("Cannot call a class as a function")}function v(a,u){for(var l=0;l"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}();return function(){var l,b=h(a);if(u){var w=h(this).constructor;l=Reflect.construct(b,arguments,w)}else l=b.apply(this,arguments);return f(this,l)}}function f(a,u){return!u||y(u)!=="object"&&typeof u!="function"?function(l){if(l===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return l}(a):u}function h(a){return(h=Object.setPrototypeOf?Object.getPrototypeOf:function(u){return u.__proto__||Object.getPrototypeOf(u)})(a)}var s=c("../../../doc/enums"),i=c("../../../utils/utils"),e=c("../base-xform"),t={horizontalValues:["left","center","right","fill","centerContinuous","distributed","justify"].reduce(function(a,u){return a[u]=!0,a},{}),horizontal:function(a){return this.horizontalValues[a]?a:void 0},verticalValues:["top","middle","bottom","distributed","justify"].reduce(function(a,u){return a[u]=!0,a},{}),vertical:function(a){return a==="middle"?"center":this.verticalValues[a]?a:void 0},wrapText:function(a){return!!a||void 0},shrinkToFit:function(a){return!!a||void 0},textRotation:function(a){switch(a){case"vertical":return a;default:return(a=i.validInt(a))>=-90&&a<=90?a:void 0}},indent:function(a){return a=i.validInt(a),Math.max(0,a)},readingOrder:function(a){switch(a){case"ltr":return s.ReadingOrder.LeftToRight;case"rtl":return s.ReadingOrder.RightToLeft;default:return}}},r=function(a){if(a=t.textRotation(a)){if(a==="vertical")return 255;var u=Math.round(a);if(u>=0&&u<=90)return u;if(u<0&&u>=-90)return 90-u}},o=function(a){var u=i.validInt(a);if(u!==void 0){if(u===255)return"vertical";if(u>=0&&u<=90)return u;if(u>90&&u<=180)return 90-u}},n=function(a){(function(C,R){if(typeof R!="function"&&R!==null)throw new TypeError("Super expression must either be null or a function");C.prototype=Object.create(R&&R.prototype,{constructor:{value:C,writable:!0,configurable:!0}}),R&&d(C,R)})(w,a);var u,l,b=m(w);function w(){return p(this,w),b.apply(this,arguments)}return u=w,(l=[{key:"render",value:function(C,R){C.addRollback(),C.openNode("alignment");var A=!1;function j(P,_){_&&(C.addAttribute(P,_),A=!0)}j("horizontal",t.horizontal(R.horizontal)),j("vertical",t.vertical(R.vertical)),j("wrapText",!!t.wrapText(R.wrapText)&&"1"),j("shrinkToFit",!!t.shrinkToFit(R.shrinkToFit)&&"1"),j("indent",t.indent(R.indent)),j("textRotation",r(R.textRotation)),j("readingOrder",t.readingOrder(R.readingOrder)),C.closeNode(),A?C.commit():C.rollback()}},{key:"parseOpen",value:function(C){var R={},A=!1;function j(P,_,S){P&&(R[_]=S,A=!0)}j(C.attributes.horizontal,"horizontal",C.attributes.horizontal),j(C.attributes.vertical,"vertical",C.attributes.vertical==="center"?"middle":C.attributes.vertical),j(C.attributes.wrapText,"wrapText",!!C.attributes.wrapText),j(C.attributes.shrinkToFit,"shrinkToFit",!!C.attributes.shrinkToFit),j(C.attributes.indent,"indent",parseInt(C.attributes.indent,10)),j(C.attributes.textRotation,"textRotation",o(C.attributes.textRotation)),j(C.attributes.readingOrder,"readingOrder",C.attributes.readingOrder==="2"?"rtl":"ltr"),this.model=A?R:null}},{key:"parseText",value:function(){}},{key:"parseClose",value:function(){return!1}},{key:"tag",get:function(){return"alignment"}}])&&v(u.prototype,l),w}(e);T.exports=n},{"../../../doc/enums":7,"../../../utils/utils":26,"../base-xform":31}],126:[function(c,T,O){function y(l,b){var w=Object.keys(l);if(Object.getOwnPropertySymbols){var C=Object.getOwnPropertySymbols(l);b&&(C=C.filter(function(R){return Object.getOwnPropertyDescriptor(l,R).enumerable})),w.push.apply(w,C)}return w}function p(l){for(var b=1;b"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}();return function(){var w,C=r(l);if(b){var R=r(this).constructor;w=Reflect.construct(C,arguments,R)}else w=C.apply(this,arguments);return t(this,w)}}function t(l,b){return!b||d(b)!=="object"&&typeof b!="function"?function(w){if(w===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return w}(l):b}function r(l){return(r=Object.setPrototypeOf?Object.getPrototypeOf:function(b){return b.__proto__||Object.getPrototypeOf(b)})(l)}var o=c("../base-xform"),n=c("./color-xform"),a=function(l){s(w,l);var b=e(w);function w(C){var R;return m(this,w),(R=b.call(this)).name=C,R.map={color:new n},R}return h(w,[{key:"render",value:function(C,R,A){var j=R&&R.color||A||this.defaultColor;C.openNode(this.name),R&&R.style&&(C.addAttribute("style",R.style),j&&this.map.color.render(C,j)),C.closeNode()}},{key:"parseOpen",value:function(C){if(this.parser)return this.parser.parseOpen(C),!0;switch(C.name){case this.name:var R=C.attributes.style;return this.model=R?{style:R}:void 0,!0;case"color":return this.parser=this.map.color,this.parser.parseOpen(C),!0;default:return!1}}},{key:"parseText",value:function(C){this.parser&&this.parser.parseText(C)}},{key:"parseClose",value:function(C){return this.parser?(this.parser.parseClose(C)||(this.parser=void 0),!0):(C===this.name&&this.map.color.model&&(this.model||(this.model={}),this.model.color=this.map.color.model),!1)}},{key:"validStyle",value:function(C){return w.validStyleValues[C]}},{key:"tag",get:function(){return this.name}}]),w}(o);a.validStyleValues=["thin","dotted","dashDot","hair","dashDotDot","slantDashDot","mediumDashed","mediumDashDotDot","mediumDashDot","medium","double","thick"].reduce(function(l,b){return l[b]=!0,l},{});var u=function(l){s(w,l);var b=e(w);function w(){var C;return m(this,w),(C=b.call(this)).map={top:new a("top"),left:new a("left"),bottom:new a("bottom"),right:new a("right"),diagonal:new a("diagonal")},C}return h(w,[{key:"render",value:function(C,R){var A=R.color;function j(P,_){P&&!P.color&&R.color&&(P=p(p({},P),{},{color:R.color})),_.render(C,P,A)}C.openNode("border"),R.diagonal&&R.diagonal.style&&(R.diagonal.up&&C.addAttribute("diagonalUp","1"),R.diagonal.down&&C.addAttribute("diagonalDown","1")),j(R.left,this.map.left),j(R.right,this.map.right),j(R.top,this.map.top),j(R.bottom,this.map.bottom),j(R.diagonal,this.map.diagonal),C.closeNode()}},{key:"parseOpen",value:function(C){if(this.parser)return this.parser.parseOpen(C),!0;switch(C.name){case"border":return this.reset(),this.diagonalUp=!!C.attributes.diagonalUp,this.diagonalDown=!!C.attributes.diagonalDown,!0;default:return this.parser=this.map[C.name],!!this.parser&&(this.parser.parseOpen(C),!0)}}},{key:"parseText",value:function(C){this.parser&&this.parser.parseText(C)}},{key:"parseClose",value:function(C){if(this.parser)return this.parser.parseClose(C)||(this.parser=void 0),!0;if(C==="border"){var R=this.model={},A=function(j,P,_){P&&(_&&Object.assign(P,_),R[j]=P)};A("left",this.map.left.model),A("right",this.map.right.model),A("top",this.map.top.model),A("bottom",this.map.bottom.model),A("diagonal",this.map.diagonal.model,{up:this.diagonalUp,down:this.diagonalDown})}return!1}}]),w}(o);T.exports=u},{"../base-xform":31,"./color-xform":127}],127:[function(c,T,O){function y(s){return(y=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(i){return typeof i}:function(i){return i&&typeof Symbol=="function"&&i.constructor===Symbol&&i!==Symbol.prototype?"symbol":typeof i})(s)}function p(s,i){for(var e=0;e"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}();return function(){var e,t=f(s);if(i){var r=f(this).constructor;e=Reflect.construct(t,arguments,r)}else e=t.apply(this,arguments);return m(this,e)}}function m(s,i){return!i||y(i)!=="object"&&typeof i!="function"?function(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(s):i}function f(s){return(f=Object.setPrototypeOf?Object.getPrototypeOf:function(i){return i.__proto__||Object.getPrototypeOf(i)})(s)}var h=function(s){(function(o,n){if(typeof n!="function"&&n!==null)throw new TypeError("Super expression must either be null or a function");o.prototype=Object.create(n&&n.prototype,{constructor:{value:o,writable:!0,configurable:!0}}),n&&v(o,n)})(r,s);var i,e,t=d(r);function r(o){var n;return function(a,u){if(!(a instanceof u))throw new TypeError("Cannot call a class as a function")}(this,r),(n=t.call(this)).name=o||"color",n}return i=r,(e=[{key:"render",value:function(o,n){return!!n&&(o.openNode(this.name),n.argb?o.addAttribute("rgb",n.argb):n.theme!==void 0?(o.addAttribute("theme",n.theme),n.tint!==void 0&&o.addAttribute("tint",n.tint)):n.indexed!==void 0?o.addAttribute("indexed",n.indexed):o.addAttribute("auto","1"),o.closeNode(),!0)}},{key:"parseOpen",value:function(o){return o.name===this.name&&(o.attributes.rgb?this.model={argb:o.attributes.rgb}:o.attributes.theme?(this.model={theme:parseInt(o.attributes.theme,10)},o.attributes.tint&&(this.model.tint=parseFloat(o.attributes.tint))):o.attributes.indexed?this.model={indexed:parseInt(o.attributes.indexed,10)}:this.model=void 0,!0)}},{key:"parseText",value:function(){}},{key:"parseClose",value:function(){return!1}},{key:"tag",get:function(){return this.name}}])&&p(i.prototype,e),r}(c("../base-xform"));T.exports=h},{"../base-xform":31}],128:[function(c,T,O){function y(a){return(y=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(u){return typeof u}:function(u){return u&&typeof Symbol=="function"&&u.constructor===Symbol&&u!==Symbol.prototype?"symbol":typeof u})(a)}function p(a,u){for(var l=0;l"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}();return function(){var l,b=f(a);if(u){var w=f(this).constructor;l=Reflect.construct(b,arguments,w)}else l=b.apply(this,arguments);return m(this,l)}}function m(a,u){return!u||y(u)!=="object"&&typeof u!="function"?function(l){if(l===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return l}(a):u}function f(a){return(f=Object.setPrototypeOf?Object.getPrototypeOf:function(u){return u.__proto__||Object.getPrototypeOf(u)})(a)}var h=c("../base-xform"),s=c("./alignment-xform"),i=c("./border-xform"),e=c("./fill-xform"),t=c("./font-xform"),r=c("./numfmt-xform"),o=c("./protection-xform"),n=function(a){(function(C,R){if(typeof R!="function"&&R!==null)throw new TypeError("Super expression must either be null or a function");C.prototype=Object.create(R&&R.prototype,{constructor:{value:C,writable:!0,configurable:!0}}),R&&v(C,R)})(w,a);var u,l,b=d(w);function w(){var C;return function(R,A){if(!(R instanceof A))throw new TypeError("Cannot call a class as a function")}(this,w),(C=b.call(this)).map={alignment:new s,border:new i,fill:new e,font:new t,numFmt:new r,protection:new o},C}return u=w,(l=[{key:"render",value:function(C,R){C.openNode(this.tag),R.font&&this.map.font.render(C,R.font),R.numFmt&&this.map.numFmt.render(C,R.numFmt),R.fill&&this.map.fill.render(C,R.fill),R.alignment&&this.map.alignment.render(C,R.alignment),R.border&&this.map.border.render(C,R.border),R.protection&&this.map.protection.render(C,R.protection),C.closeNode()}},{key:"parseOpen",value:function(C){if(this.parser)return this.parser.parseOpen(C),!0;switch(C.name){case this.tag:return this.reset(),!0;default:return this.parser=this.map[C.name],this.parser&&this.parser.parseOpen(C),!0}}},{key:"parseText",value:function(C){this.parser&&this.parser.parseText(C)}},{key:"parseClose",value:function(C){return this.parser?(this.parser.parseClose(C)||(this.parser=void 0),!0):C!==this.tag||(this.model={alignment:this.map.alignment.model,border:this.map.border.model,fill:this.map.fill.model,font:this.map.font.model,numFmt:this.map.numFmt.model,protection:this.map.protection.model},!1)}},{key:"tag",get:function(){return"dxf"}}])&&p(u.prototype,l),w}(h);T.exports=n},{"../base-xform":31,"./alignment-xform":125,"./border-xform":126,"./fill-xform":129,"./font-xform":130,"./numfmt-xform":131,"./protection-xform":132}],129:[function(c,T,O){function y(u){return(y=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(l){return typeof l}:function(l){return l&&typeof Symbol=="function"&&l.constructor===Symbol&&l!==Symbol.prototype?"symbol":typeof l})(u)}function p(u,l){if(!(u instanceof l))throw new TypeError("Cannot call a class as a function")}function v(u,l){for(var b=0;b"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}();return function(){var b,w=i(u);if(l){var C=i(this).constructor;b=Reflect.construct(w,arguments,C)}else b=w.apply(this,arguments);return s(this,b)}}function s(u,l){return!l||y(l)!=="object"&&typeof l!="function"?function(b){if(b===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return b}(u):l}function i(u){return(i=Object.setPrototypeOf?Object.getPrototypeOf:function(l){return l.__proto__||Object.getPrototypeOf(l)})(u)}var e=c("../base-xform"),t=c("./color-xform"),r=function(u){m(b,u);var l=h(b);function b(){var w;return p(this,b),(w=l.call(this)).map={color:new t},w}return d(b,[{key:"render",value:function(w,C){w.openNode("stop"),w.addAttribute("position",C.position),this.map.color.render(w,C.color),w.closeNode()}},{key:"parseOpen",value:function(w){if(this.parser)return this.parser.parseOpen(w),!0;switch(w.name){case"stop":return this.model={position:parseFloat(w.attributes.position)},!0;case"color":return this.parser=this.map.color,this.parser.parseOpen(w),!0;default:return!1}}},{key:"parseText",value:function(){}},{key:"parseClose",value:function(w){return!!this.parser&&(this.parser.parseClose(w)||(this.model.color=this.parser.model,this.parser=void 0),!0)}},{key:"tag",get:function(){return"stop"}}]),b}(e),o=function(u){m(b,u);var l=h(b);function b(){var w;return p(this,b),(w=l.call(this)).map={fgColor:new t("fgColor"),bgColor:new t("bgColor")},w}return d(b,[{key:"render",value:function(w,C){w.openNode("patternFill"),w.addAttribute("patternType",C.pattern),C.fgColor&&this.map.fgColor.render(w,C.fgColor),C.bgColor&&this.map.bgColor.render(w,C.bgColor),w.closeNode()}},{key:"parseOpen",value:function(w){if(this.parser)return this.parser.parseOpen(w),!0;switch(w.name){case"patternFill":return this.model={type:"pattern",pattern:w.attributes.patternType},!0;default:return this.parser=this.map[w.name],!!this.parser&&(this.parser.parseOpen(w),!0)}}},{key:"parseText",value:function(w){this.parser&&this.parser.parseText(w)}},{key:"parseClose",value:function(w){return!!this.parser&&(this.parser.parseClose(w)||(this.parser.model&&(this.model[w]=this.parser.model),this.parser=void 0),!0)}},{key:"name",get:function(){return"pattern"}},{key:"tag",get:function(){return"patternFill"}}]),b}(e),n=function(u){m(b,u);var l=h(b);function b(){var w;return p(this,b),(w=l.call(this)).map={stop:new r},w}return d(b,[{key:"render",value:function(w,C){switch(w.openNode("gradientFill"),C.gradient){case"angle":w.addAttribute("degree",C.degree);break;case"path":w.addAttribute("type","path"),C.center.left&&(w.addAttribute("left",C.center.left),C.center.right===void 0&&w.addAttribute("right",C.center.left)),C.center.right&&w.addAttribute("right",C.center.right),C.center.top&&(w.addAttribute("top",C.center.top),C.center.bottom===void 0&&w.addAttribute("bottom",C.center.top)),C.center.bottom&&w.addAttribute("bottom",C.center.bottom)}var R=this.map.stop;C.stops.forEach(function(A){R.render(w,A)}),w.closeNode()}},{key:"parseOpen",value:function(w){if(this.parser)return this.parser.parseOpen(w),!0;switch(w.name){case"gradientFill":var C=this.model={stops:[]};return w.attributes.degree?(C.gradient="angle",C.degree=parseInt(w.attributes.degree,10)):w.attributes.type==="path"&&(C.gradient="path",C.center={left:w.attributes.left?parseFloat(w.attributes.left):0,top:w.attributes.top?parseFloat(w.attributes.top):0},w.attributes.right!==w.attributes.left&&(C.center.right=w.attributes.right?parseFloat(w.attributes.right):0),w.attributes.bottom!==w.attributes.top&&(C.center.bottom=w.attributes.bottom?parseFloat(w.attributes.bottom):0)),!0;case"stop":return this.parser=this.map.stop,this.parser.parseOpen(w),!0;default:return!1}}},{key:"parseText",value:function(w){this.parser&&this.parser.parseText(w)}},{key:"parseClose",value:function(w){return!!this.parser&&(this.parser.parseClose(w)||(this.model.stops.push(this.parser.model),this.parser=void 0),!0)}},{key:"name",get:function(){return"gradient"}},{key:"tag",get:function(){return"gradientFill"}}]),b}(e),a=function(u){m(b,u);var l=h(b);function b(){var w;return p(this,b),(w=l.call(this)).map={patternFill:new o,gradientFill:new n},w}return d(b,[{key:"render",value:function(w,C){switch(w.addRollback(),w.openNode("fill"),C.type){case"pattern":this.map.patternFill.render(w,C);break;case"gradient":this.map.gradientFill.render(w,C);break;default:return void w.rollback()}w.closeNode(),w.commit()}},{key:"parseOpen",value:function(w){if(this.parser)return this.parser.parseOpen(w),!0;switch(w.name){case"fill":return this.model={},!0;default:return this.parser=this.map[w.name],!!this.parser&&(this.parser.parseOpen(w),!0)}}},{key:"parseText",value:function(w){this.parser&&this.parser.parseText(w)}},{key:"parseClose",value:function(w){return!!this.parser&&(this.parser.parseClose(w)||(this.model=this.parser.model,this.model.type=this.parser.name,this.parser=void 0),!0)}},{key:"validStyle",value:function(w){return b.validPatternValues[w]}},{key:"tag",get:function(){return"fill"}}]),b}(e);a.validPatternValues=["none","solid","darkVertical","darkGray","mediumGray","lightGray","gray125","gray0625","darkHorizontal","darkVertical","darkDown","darkUp","darkGrid","darkTrellis","lightHorizontal","lightVertical","lightDown","lightUp","lightGrid","lightTrellis","lightGrid"].reduce(function(u,l){return u[l]=!0,u},{}),a.StopXform=r,a.PatternFillXform=o,a.GradientFillXform=n,T.exports=a},{"../base-xform":31,"./color-xform":127}],130:[function(c,T,O){function y(n){return(y=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(a){return typeof a}:function(a){return a&&typeof Symbol=="function"&&a.constructor===Symbol&&a!==Symbol.prototype?"symbol":typeof a})(n)}function p(n,a){for(var u=0;u"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}();return function(){var u,l=f(n);if(a){var b=f(this).constructor;u=Reflect.construct(l,arguments,b)}else u=l.apply(this,arguments);return m(this,u)}}function m(n,a){return!a||y(a)!=="object"&&typeof a!="function"?function(u){if(u===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return u}(n):a}function f(n){return(f=Object.setPrototypeOf?Object.getPrototypeOf:function(a){return a.__proto__||Object.getPrototypeOf(a)})(n)}var h=c("./color-xform"),s=c("../simple/boolean-xform"),i=c("../simple/integer-xform"),e=c("../simple/string-xform"),t=c("./underline-xform"),r=c("../../../utils/under-dash"),o=function(n){(function(w,C){if(typeof C!="function"&&C!==null)throw new TypeError("Super expression must either be null or a function");w.prototype=Object.create(C&&C.prototype,{constructor:{value:w,writable:!0,configurable:!0}}),C&&v(w,C)})(b,n);var a,u,l=d(b);function b(w){var C;return function(R,A){if(!(R instanceof A))throw new TypeError("Cannot call a class as a function")}(this,b),(C=l.call(this)).options=w||b.OPTIONS,C.map={b:{prop:"bold",xform:new s({tag:"b",attr:"val"})},i:{prop:"italic",xform:new s({tag:"i",attr:"val"})},u:{prop:"underline",xform:new t},charset:{prop:"charset",xform:new i({tag:"charset",attr:"val"})},color:{prop:"color",xform:new h},condense:{prop:"condense",xform:new s({tag:"condense",attr:"val"})},extend:{prop:"extend",xform:new s({tag:"extend",attr:"val"})},family:{prop:"family",xform:new i({tag:"family",attr:"val"})},outline:{prop:"outline",xform:new s({tag:"outline",attr:"val"})},vertAlign:{prop:"vertAlign",xform:new e({tag:"vertAlign",attr:"val"})},scheme:{prop:"scheme",xform:new e({tag:"scheme",attr:"val"})},shadow:{prop:"shadow",xform:new s({tag:"shadow",attr:"val"})},strike:{prop:"strike",xform:new s({tag:"strike",attr:"val"})},sz:{prop:"size",xform:new i({tag:"sz",attr:"val"})}},C.map[C.options.fontNameTag]={prop:"name",xform:new e({tag:C.options.fontNameTag,attr:"val"})},C}return a=b,(u=[{key:"render",value:function(w,C){var R=this.map;w.openNode(this.options.tagName),r.each(this.map,function(A,j){R[j].xform.render(w,C[A.prop])}),w.closeNode()}},{key:"parseOpen",value:function(w){if(this.parser)return this.parser.parseOpen(w),!0;if(this.map[w.name])return this.parser=this.map[w.name].xform,this.parser.parseOpen(w);switch(w.name){case this.options.tagName:return this.model={},!0;default:return!1}}},{key:"parseText",value:function(w){this.parser&&this.parser.parseText(w)}},{key:"parseClose",value:function(w){if(this.parser&&!this.parser.parseClose(w)){var C=this.map[w];return this.parser.model&&(this.model[C.prop]=this.parser.model),this.parser=void 0,!0}switch(w){case this.options.tagName:return!1;default:return!0}}},{key:"tag",get:function(){return this.options.tagName}}])&&p(a.prototype,u),b}(c("../base-xform"));o.OPTIONS={tagName:"font",fontNameTag:"name"},T.exports=o},{"../../../utils/under-dash":25,"../base-xform":31,"../simple/boolean-xform":115,"../simple/integer-xform":117,"../simple/string-xform":118,"./color-xform":127,"./underline-xform":135}],131:[function(c,T,O){function y(o){return(y=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n})(o)}function p(o,n){for(var a=0;a"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}();return function(){var a,u=f(o);if(n){var l=f(this).constructor;a=Reflect.construct(u,arguments,l)}else a=u.apply(this,arguments);return m(this,a)}}function m(o,n){return!n||y(n)!=="object"&&typeof n!="function"?function(a){if(a===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return a}(o):n}function f(o){return(f=Object.setPrototypeOf?Object.getPrototypeOf:function(n){return n.__proto__||Object.getPrototypeOf(n)})(o)}var h=c("../../../utils/under-dash"),s=c("../../defaultnumformats"),i=c("../base-xform"),e,t=(e={},h.each(s,function(o,n){o.f&&(e[o.f]=parseInt(n,10))}),e),r=function(o){(function(b,w){if(typeof w!="function"&&w!==null)throw new TypeError("Super expression must either be null or a function");b.prototype=Object.create(w&&w.prototype,{constructor:{value:b,writable:!0,configurable:!0}}),w&&v(b,w)})(l,o);var n,a,u=d(l);function l(b,w){var C;return function(R,A){if(!(R instanceof A))throw new TypeError("Cannot call a class as a function")}(this,l),(C=u.call(this)).id=b,C.formatCode=w,C}return n=l,(a=[{key:"render",value:function(b,w){b.leafNode("numFmt",{numFmtId:w.id,formatCode:w.formatCode})}},{key:"parseOpen",value:function(b){switch(b.name){case"numFmt":return this.model={id:parseInt(b.attributes.numFmtId,10),formatCode:b.attributes.formatCode.replace(/[\\](.)/g,"$1")},!0;default:return!1}}},{key:"parseText",value:function(){}},{key:"parseClose",value:function(){return!1}},{key:"tag",get:function(){return"numFmt"}}])&&p(n.prototype,a),l}(i);r.getDefaultFmtId=function(o){return t[o]},r.getDefaultFmtCode=function(o){return s[o]&&s[o].f},T.exports=r},{"../../../utils/under-dash":25,"../../defaultnumformats":29,"../base-xform":31}],132:[function(c,T,O){function y(t){return(y=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r})(t)}function p(t,r){if(!(t instanceof r))throw new TypeError("Cannot call a class as a function")}function v(t,r){for(var o=0;o"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}();return function(){var o,n=h(t);if(r){var a=h(this).constructor;o=Reflect.construct(n,arguments,a)}else o=n.apply(this,arguments);return f(this,o)}}function f(t,r){return!r||y(r)!=="object"&&typeof r!="function"?function(o){if(o===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return o}(t):r}function h(t){return(h=Object.setPrototypeOf?Object.getPrototypeOf:function(r){return r.__proto__||Object.getPrototypeOf(r)})(t)}var s=c("../base-xform"),i=function(t,r){return t===void 0?r:t},e=function(t){(function(u,l){if(typeof l!="function"&&l!==null)throw new TypeError("Super expression must either be null or a function");u.prototype=Object.create(l&&l.prototype,{constructor:{value:u,writable:!0,configurable:!0}}),l&&d(u,l)})(a,t);var r,o,n=m(a);function a(){return p(this,a),n.apply(this,arguments)}return r=a,(o=[{key:"render",value:function(u,l){u.addRollback(),u.openNode("protection");var b=!1;function w(C,R){R!==void 0&&(u.addAttribute(C,R),b=!0)}w("locked",i(l.locked,!0)?void 0:"0"),w("hidden",i(l.hidden,!1)?"1":void 0),u.closeNode(),b?u.commit():u.rollback()}},{key:"parseOpen",value:function(u){var l={locked:u.attributes.locked!=="0",hidden:u.attributes.hidden==="1"},b=!l.locked||l.hidden;this.model=b?l:null}},{key:"parseText",value:function(){}},{key:"parseClose",value:function(){return!1}},{key:"tag",get:function(){return"protection"}}])&&v(r.prototype,o),a}(s);T.exports=e},{"../base-xform":31}],133:[function(c,T,O){function y(t){return(y=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r})(t)}function p(t,r){for(var o=0;o"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}();return function(){var o,n=f(t);if(r){var a=f(this).constructor;o=Reflect.construct(n,arguments,a)}else o=n.apply(this,arguments);return m(this,o)}}function m(t,r){return!r||y(r)!=="object"&&typeof r!="function"?function(o){if(o===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return o}(t):r}function f(t){return(f=Object.setPrototypeOf?Object.getPrototypeOf:function(r){return r.__proto__||Object.getPrototypeOf(r)})(t)}var h=c("../base-xform"),s=c("./alignment-xform"),i=c("./protection-xform"),e=function(t){(function(u,l){if(typeof l!="function"&&l!==null)throw new TypeError("Super expression must either be null or a function");u.prototype=Object.create(l&&l.prototype,{constructor:{value:u,writable:!0,configurable:!0}}),l&&v(u,l)})(a,t);var r,o,n=d(a);function a(u){var l;return function(b,w){if(!(b instanceof w))throw new TypeError("Cannot call a class as a function")}(this,a),(l=n.call(this)).xfId=!(!u||!u.xfId),l.map={alignment:new s,protection:new i},l}return r=a,(o=[{key:"render",value:function(u,l){u.openNode("xf",{numFmtId:l.numFmtId||0,fontId:l.fontId||0,fillId:l.fillId||0,borderId:l.borderId||0}),this.xfId&&u.addAttribute("xfId",l.xfId||0),l.numFmtId&&u.addAttribute("applyNumberFormat","1"),l.fontId&&u.addAttribute("applyFont","1"),l.fillId&&u.addAttribute("applyFill","1"),l.borderId&&u.addAttribute("applyBorder","1"),l.alignment&&u.addAttribute("applyAlignment","1"),l.protection&&u.addAttribute("applyProtection","1"),l.alignment&&this.map.alignment.render(u,l.alignment),l.protection&&this.map.protection.render(u,l.protection),u.closeNode()}},{key:"parseOpen",value:function(u){if(this.parser)return this.parser.parseOpen(u),!0;switch(u.name){case"xf":return this.model={numFmtId:parseInt(u.attributes.numFmtId,10),fontId:parseInt(u.attributes.fontId,10),fillId:parseInt(u.attributes.fillId,10),borderId:parseInt(u.attributes.borderId,10)},this.xfId&&(this.model.xfId=parseInt(u.attributes.xfId,10)),!0;case"alignment":return this.parser=this.map.alignment,this.parser.parseOpen(u),!0;case"protection":return this.parser=this.map.protection,this.parser.parseOpen(u),!0;default:return!1}}},{key:"parseText",value:function(u){this.parser&&this.parser.parseText(u)}},{key:"parseClose",value:function(u){return this.parser?(this.parser.parseClose(u)||(this.map.protection===this.parser?this.model.protection=this.parser.model:this.model.alignment=this.parser.model,this.parser=void 0),!0):u!=="xf"}},{key:"tag",get:function(){return"xf"}}])&&p(r.prototype,o),a}(h);T.exports=e},{"../base-xform":31,"./alignment-xform":125,"./protection-xform":132}],134:[function(c,T,O){function y(j){return(y=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(P){return typeof P}:function(P){return P&&typeof Symbol=="function"&&P.constructor===Symbol&&P!==Symbol.prototype?"symbol":typeof P})(j)}function p(j,P){if(!(j instanceof P))throw new TypeError("Cannot call a class as a function")}function v(j,P){for(var _=0;_"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}();return function(){var _,S=i(j);if(P){var g=i(this).constructor;_=Reflect.construct(S,arguments,g)}else _=S.apply(this,arguments);return s(this,_)}}function s(j,P){return!P||y(P)!=="object"&&typeof P!="function"?function(_){if(_===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return _}(j):P}function i(j){return(i=Object.setPrototypeOf?Object.getPrototypeOf:function(P){return P.__proto__||Object.getPrototypeOf(P)})(j)}var e=c("../../../doc/enums"),t=c("../../../utils/xml-stream"),r=c("../base-xform"),o=c("../static-xform"),n=c("../list-xform"),a=c("./font-xform"),u=c("./fill-xform"),l=c("./border-xform"),b=c("./numfmt-xform"),w=c("./style-xform"),C=c("./dxf-xform"),R=function(j){m(_,j);var P=h(_);function _(S){var g;return p(this,_),(g=P.call(this)).map={numFmts:new n({tag:"numFmts",count:!0,childXform:new b}),fonts:new n({tag:"fonts",count:!0,childXform:new a,$:{"x14ac:knownFonts":1}}),fills:new n({tag:"fills",count:!0,childXform:new u}),borders:new n({tag:"borders",count:!0,childXform:new l}),cellStyleXfs:new n({tag:"cellStyleXfs",count:!0,childXform:new w}),cellXfs:new n({tag:"cellXfs",count:!0,childXform:new w({xfId:!0})}),dxfs:new n({tag:"dxfs",always:!0,count:!0,childXform:new C}),numFmt:new b,font:new a,fill:new u,border:new l,style:new w({xfId:!0}),cellStyles:_.STATIC_XFORMS.cellStyles,tableStyles:_.STATIC_XFORMS.tableStyles,extLst:_.STATIC_XFORMS.extLst},S&&g.init(),g}return d(_,[{key:"initIndex",value:function(){this.index={style:{},numFmt:{},numFmtNextId:164,font:{},border:{},fill:{}}}},{key:"init",value:function(){this.model={styles:[],numFmts:[],fonts:[],borders:[],fills:[],dxfs:[]},this.initIndex(),this._addBorder({}),this._addStyle({numFmtId:0,fontId:0,fillId:0,borderId:0,xfId:0}),this._addFill({type:"pattern",pattern:"none"}),this._addFill({type:"pattern",pattern:"gray125"}),this.weakMap=new WeakMap}},{key:"render",value:function(S,g){g=g||this.model,S.openXml(t.StdDocAttributes),S.openNode("styleSheet",_.STYLESHEET_ATTRIBUTES),this.index?(g.numFmts&&g.numFmts.length&&(S.openNode("numFmts",{count:g.numFmts.length}),g.numFmts.forEach(function(E){S.writeXml(E)}),S.closeNode()),g.fonts.length||this._addFont({size:11,color:{theme:1},name:"Calibri",family:2,scheme:"minor"}),S.openNode("fonts",{count:g.fonts.length,"x14ac:knownFonts":1}),g.fonts.forEach(function(E){S.writeXml(E)}),S.closeNode(),S.openNode("fills",{count:g.fills.length}),g.fills.forEach(function(E){S.writeXml(E)}),S.closeNode(),S.openNode("borders",{count:g.borders.length}),g.borders.forEach(function(E){S.writeXml(E)}),S.closeNode(),this.map.cellStyleXfs.render(S,[{numFmtId:0,fontId:0,fillId:0,borderId:0,xfId:0}]),S.openNode("cellXfs",{count:g.styles.length}),g.styles.forEach(function(E){S.writeXml(E)}),S.closeNode()):(this.map.numFmts.render(S,g.numFmts),this.map.fonts.render(S,g.fonts),this.map.fills.render(S,g.fills),this.map.borders.render(S,g.borders),this.map.cellStyleXfs.render(S,[{numFmtId:0,fontId:0,fillId:0,borderId:0,xfId:0}]),this.map.cellXfs.render(S,g.styles)),_.STATIC_XFORMS.cellStyles.render(S),this.map.dxfs.render(S,g.dxfs),_.STATIC_XFORMS.tableStyles.render(S),_.STATIC_XFORMS.extLst.render(S),S.closeNode()}},{key:"parseOpen",value:function(S){if(this.parser)return this.parser.parseOpen(S),!0;switch(S.name){case"styleSheet":return this.initIndex(),!0;default:return this.parser=this.map[S.name],this.parser&&this.parser.parseOpen(S),!0}}},{key:"parseText",value:function(S){this.parser&&this.parser.parseText(S)}},{key:"parseClose",value:function(S){var g=this;if(this.parser)return this.parser.parseClose(S)||(this.parser=void 0),!0;switch(S){case"styleSheet":this.model={};var E=function(x,M){M.model&&M.model.length&&(g.model[x]=M.model)};if(E("numFmts",this.map.numFmts),E("fonts",this.map.fonts),E("fills",this.map.fills),E("borders",this.map.borders),E("styles",this.map.cellXfs),E("dxfs",this.map.dxfs),this.index={model:[],numFmt:[]},this.model.numFmts){var k=this.index.numFmt;this.model.numFmts.forEach(function(x){k[x.id]=x.formatCode})}return!1;default:return!0}}},{key:"addStyleModel",value:function(S,g){if(!S)return 0;if(this.model.fonts.length||this._addFont({size:11,color:{theme:1},name:"Calibri",family:2,scheme:"minor"}),this.weakMap&&this.weakMap.has(S))return this.weakMap.get(S);var E={};if(g=g||e.ValueType.Number,S.numFmt)E.numFmtId=this._addNumFmtStr(S.numFmt);else switch(g){case e.ValueType.Number:E.numFmtId=this._addNumFmtStr("General");break;case e.ValueType.Date:E.numFmtId=this._addNumFmtStr("mm-dd-yy")}S.font&&(E.fontId=this._addFont(S.font)),S.border&&(E.borderId=this._addBorder(S.border)),S.fill&&(E.fillId=this._addFill(S.fill)),S.alignment&&(E.alignment=S.alignment),S.protection&&(E.protection=S.protection);var k=this._addStyle(E);return this.weakMap&&this.weakMap.set(S,k),k}},{key:"getStyleModel",value:function(S){var g=this.model.styles[S];if(!g)return null;var E=this.index.model[S];if(E)return E;if(E=this.index.model[S]={},g.numFmtId){var k=this.index.numFmt[g.numFmtId]||b.getDefaultFmtCode(g.numFmtId);k&&(E.numFmt=k)}function x(M,D,B){if(B||B===0){var F=D[B];F&&(E[M]=F)}}return x("font",this.model.fonts,g.fontId),x("border",this.model.borders,g.borderId),x("fill",this.model.fills,g.fillId),g.alignment&&(E.alignment=g.alignment),g.protection&&(E.protection=g.protection),E}},{key:"addDxfStyle",value:function(S){return this.model.dxfs.push(S),this.model.dxfs.length-1}},{key:"getDxfStyle",value:function(S){return this.model.dxfs[S]}},{key:"_addStyle",value:function(S){var g=this.map.style.toXml(S),E=this.index.style[g];return E===void 0&&(E=this.index.style[g]=this.model.styles.length,this.model.styles.push(g)),E}},{key:"_addNumFmtStr",value:function(S){var g=b.getDefaultFmtId(S);if(g!==void 0||(g=this.index.numFmt[S])!==void 0)return g;g=this.index.numFmt[S]=164+this.model.numFmts.length;var E=this.map.numFmt.toXml({id:g,formatCode:S});return this.model.numFmts.push(E),g}},{key:"_addFont",value:function(S){var g=this.map.font.toXml(S),E=this.index.font[g];return E===void 0&&(E=this.index.font[g]=this.model.fonts.length,this.model.fonts.push(g)),E}},{key:"_addBorder",value:function(S){var g=this.map.border.toXml(S),E=this.index.border[g];return E===void 0&&(E=this.index.border[g]=this.model.borders.length,this.model.borders.push(g)),E}},{key:"_addFill",value:function(S){var g=this.map.fill.toXml(S),E=this.index.fill[g];return E===void 0&&(E=this.index.fill[g]=this.model.fills.length,this.model.fills.push(g)),E}}]),_}(r);R.STYLESHEET_ATTRIBUTES={xmlns:"http://schemas.openxmlformats.org/spreadsheetml/2006/main","xmlns:mc":"http://schemas.openxmlformats.org/markup-compatibility/2006","mc:Ignorable":"x14ac x16r2","xmlns:x14ac":"http://schemas.microsoft.com/office/spreadsheetml/2009/9/ac","xmlns:x16r2":"http://schemas.microsoft.com/office/spreadsheetml/2015/02/main"},R.STATIC_XFORMS={cellStyles:new o({tag:"cellStyles",$:{count:1},c:[{tag:"cellStyle",$:{name:"Normal",xfId:0,builtinId:0}}]}),dxfs:new o({tag:"dxfs",$:{count:0}}),tableStyles:new o({tag:"tableStyles",$:{count:0,defaultTableStyle:"TableStyleMedium2",defaultPivotStyle:"PivotStyleLight16"}}),extLst:new o({tag:"extLst",c:[{tag:"ext",$:{uri:"{EB79DEF2-80B8-43e5-95BD-54CBDDF9020C}","xmlns:x14":"http://schemas.microsoft.com/office/spreadsheetml/2009/9/main"},c:[{tag:"x14:slicerStyles",$:{defaultSlicerStyle:"SlicerStyleLight1"}}]},{tag:"ext",$:{uri:"{9260A510-F301-46a8-8635-F512D64BE5F5}","xmlns:x15":"http://schemas.microsoft.com/office/spreadsheetml/2010/11/main"},c:[{tag:"x15:timelineStyles",$:{defaultTimelineStyle:"TimeSlicerStyleLight1"}}]}]})};var A=function(j){m(_,j);var P=h(_);function _(){var S;return p(this,_),(S=P.call(this)).model={styles:[{numFmtId:0,fontId:0,fillId:0,borderId:0,xfId:0}],numFmts:[],fonts:[{size:11,color:{theme:1},name:"Calibri",family:2,scheme:"minor"}],borders:[{}],fills:[{type:"pattern",pattern:"none"},{type:"pattern",pattern:"gray125"}]},S}return d(_,[{key:"parseStream",value:function(S){return S.autodrain(),Promise.resolve()}},{key:"addStyleModel",value:function(S,g){switch(g){case e.ValueType.Date:return this.dateStyleId;default:return 0}}},{key:"getStyleModel",value:function(){return{}}},{key:"dateStyleId",get:function(){if(!this._dateStyleId){var S={numFmtId:b.getDefaultFmtId("mm-dd-yy")};this._dateStyleId=this.model.styles.length,this.model.styles.push(S)}return this._dateStyleId}}]),_}(R);R.Mock=A,T.exports=R},{"../../../doc/enums":7,"../../../utils/xml-stream":27,"../base-xform":31,"../list-xform":70,"../static-xform":119,"./border-xform":126,"./dxf-xform":128,"./fill-xform":129,"./font-xform":130,"./numfmt-xform":131,"./style-xform":133}],135:[function(c,T,O){function y(s){return(y=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(i){return typeof i}:function(i){return i&&typeof Symbol=="function"&&i.constructor===Symbol&&i!==Symbol.prototype?"symbol":typeof i})(s)}function p(s,i){for(var e=0;e"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}();return function(){var e,t=f(s);if(i){var r=f(this).constructor;e=Reflect.construct(t,arguments,r)}else e=t.apply(this,arguments);return m(this,e)}}function m(s,i){return!i||y(i)!=="object"&&typeof i!="function"?function(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(s):i}function f(s){return(f=Object.setPrototypeOf?Object.getPrototypeOf:function(i){return i.__proto__||Object.getPrototypeOf(i)})(s)}var h=function(s){(function(o,n){if(typeof n!="function"&&n!==null)throw new TypeError("Super expression must either be null or a function");o.prototype=Object.create(n&&n.prototype,{constructor:{value:o,writable:!0,configurable:!0}}),n&&v(o,n)})(r,s);var i,e,t=d(r);function r(o){var n;return function(a,u){if(!(a instanceof u))throw new TypeError("Cannot call a class as a function")}(this,r),(n=t.call(this)).model=o,n}return i=r,(e=[{key:"render",value:function(o,n){if((n=n||this.model)===!0)o.leafNode("u");else{var a=r.Attributes[n];a&&o.leafNode("u",a)}}},{key:"parseOpen",value:function(o){o.name==="u"&&(this.model=o.attributes.val||!0)}},{key:"parseText",value:function(){}},{key:"parseClose",value:function(){return!1}},{key:"tag",get:function(){return"u"}}])&&p(i.prototype,e),r}(c("../base-xform"));h.Attributes={single:{},double:{val:"double"},singleAccounting:{val:"singleAccounting"},doubleAccounting:{val:"doubleAccounting"}},T.exports=h},{"../base-xform":31}],136:[function(c,T,O){function y(e){return(y=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(e)}function p(e,t){for(var r=0;r"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}();return function(){var r,o=f(e);if(t){var n=f(this).constructor;r=Reflect.construct(o,arguments,n)}else r=o.apply(this,arguments);return m(this,r)}}function m(e,t){return!t||y(t)!=="object"&&typeof t!="function"?function(r){if(r===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return r}(e):t}function f(e){return(f=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(e)}var h=c("../base-xform"),s=c("./filter-column-xform"),i=function(e){(function(a,u){if(typeof u!="function"&&u!==null)throw new TypeError("Super expression must either be null or a function");a.prototype=Object.create(u&&u.prototype,{constructor:{value:a,writable:!0,configurable:!0}}),u&&v(a,u)})(n,e);var t,r,o=d(n);function n(){var a;return function(u,l){if(!(u instanceof l))throw new TypeError("Cannot call a class as a function")}(this,n),(a=o.call(this)).map={filterColumn:new s},a}return t=n,(r=[{key:"prepare",value:function(a){var u=this;a.columns.forEach(function(l,b){u.map.filterColumn.prepare(l,{index:b})})}},{key:"render",value:function(a,u){var l=this;return a.openNode(this.tag,{ref:u.autoFilterRef}),u.columns.forEach(function(b){l.map.filterColumn.render(a,b)}),a.closeNode(),!0}},{key:"parseOpen",value:function(a){if(this.parser)return this.parser.parseOpen(a),!0;switch(a.name){case this.tag:return this.model={autoFilterRef:a.attributes.ref,columns:[]},!0;default:if(this.parser=this.map[a.name],this.parser)return this.parseOpen(a),!0;throw new Error("Unexpected xml node in parseOpen: ".concat(JSON.stringify(a)))}}},{key:"parseText",value:function(a){this.parser&&this.parser.parseText(a)}},{key:"parseClose",value:function(a){if(this.parser)return this.parser.parseClose(a)||(this.model.columns.push(this.parser.model),this.parser=void 0),!0;switch(a){case this.tag:return!1;default:throw new Error("Unexpected xml node in parseClose: ".concat(a))}}},{key:"tag",get:function(){return"autoFilter"}}])&&p(t.prototype,r),n}(h);T.exports=i},{"../base-xform":31,"./filter-column-xform":137}],137:[function(c,T,O){function y(i){return(y=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(i)}function p(i,e){if(!(i instanceof e))throw new TypeError("Cannot call a class as a function")}function v(i,e){for(var t=0;t"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}();return function(){var t,r=h(i);if(e){var o=h(this).constructor;t=Reflect.construct(r,arguments,o)}else t=r.apply(this,arguments);return f(this,t)}}function f(i,e){return!e||y(e)!=="object"&&typeof e!="function"?function(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(i):e}function h(i){return(h=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(i)}var s=function(i){(function(n,a){if(typeof a!="function"&&a!==null)throw new TypeError("Super expression must either be null or a function");n.prototype=Object.create(a&&a.prototype,{constructor:{value:n,writable:!0,configurable:!0}}),a&&d(n,a)})(o,i);var e,t,r=m(o);function o(){return p(this,o),r.apply(this,arguments)}return e=o,(t=[{key:"prepare",value:function(n,a){n.colId=a.index.toString()}},{key:"render",value:function(n,a){return n.leafNode(this.tag,{colId:a.colId,hiddenButton:a.filterButton?"0":"1"}),!0}},{key:"parseOpen",value:function(n){if(n.name===this.tag){var a=n.attributes;return this.model={filterButton:a.hiddenButton==="0"},!0}return!1}},{key:"parseText",value:function(){}},{key:"parseClose",value:function(){return!1}},{key:"tag",get:function(){return"filterColumn"}}])&&v(e.prototype,t),o}(c("../base-xform"));T.exports=s},{"../base-xform":31}],138:[function(c,T,O){function y(i){return(y=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(i)}function p(i,e){if(!(i instanceof e))throw new TypeError("Cannot call a class as a function")}function v(i,e){for(var t=0;t"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}();return function(){var t,r=h(i);if(e){var o=h(this).constructor;t=Reflect.construct(r,arguments,o)}else t=r.apply(this,arguments);return f(this,t)}}function f(i,e){return!e||y(e)!=="object"&&typeof e!="function"?function(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(i):e}function h(i){return(h=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(i)}var s=function(i){(function(n,a){if(typeof a!="function"&&a!==null)throw new TypeError("Super expression must either be null or a function");n.prototype=Object.create(a&&a.prototype,{constructor:{value:n,writable:!0,configurable:!0}}),a&&d(n,a)})(o,i);var e,t,r=m(o);function o(){return p(this,o),r.apply(this,arguments)}return e=o,(t=[{key:"prepare",value:function(n,a){n.id=a.index+1}},{key:"render",value:function(n,a){return n.leafNode(this.tag,{id:a.id.toString(),name:a.name,totalsRowLabel:a.totalsRowLabel,totalsRowFunction:a.totalsRowFunction,dxfId:a.dxfId}),!0}},{key:"parseOpen",value:function(n){if(n.name===this.tag){var a=n.attributes;return this.model={name:a.name,totalsRowLabel:a.totalsRowLabel,totalsRowFunction:a.totalsRowFunction,dxfId:a.dxfId},!0}return!1}},{key:"parseText",value:function(){}},{key:"parseClose",value:function(){return!1}},{key:"tag",get:function(){return"tableColumn"}}])&&v(e.prototype,t),o}(c("../base-xform"));T.exports=s},{"../base-xform":31}],139:[function(c,T,O){function y(i){return(y=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(i)}function p(i,e){if(!(i instanceof e))throw new TypeError("Cannot call a class as a function")}function v(i,e){for(var t=0;t"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}();return function(){var t,r=h(i);if(e){var o=h(this).constructor;t=Reflect.construct(r,arguments,o)}else t=r.apply(this,arguments);return f(this,t)}}function f(i,e){return!e||y(e)!=="object"&&typeof e!="function"?function(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(i):e}function h(i){return(h=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(i)}var s=function(i){(function(n,a){if(typeof a!="function"&&a!==null)throw new TypeError("Super expression must either be null or a function");n.prototype=Object.create(a&&a.prototype,{constructor:{value:n,writable:!0,configurable:!0}}),a&&d(n,a)})(o,i);var e,t,r=m(o);function o(){return p(this,o),r.apply(this,arguments)}return e=o,(t=[{key:"render",value:function(n,a){return n.leafNode(this.tag,{name:a.theme?a.theme:void 0,showFirstColumn:a.showFirstColumn?"1":"0",showLastColumn:a.showLastColumn?"1":"0",showRowStripes:a.showRowStripes?"1":"0",showColumnStripes:a.showColumnStripes?"1":"0"}),!0}},{key:"parseOpen",value:function(n){if(n.name===this.tag){var a=n.attributes;return this.model={theme:a.name?a.name:null,showFirstColumn:a.showFirstColumn==="1",showLastColumn:a.showLastColumn==="1",showRowStripes:a.showRowStripes==="1",showColumnStripes:a.showColumnStripes==="1"},!0}return!1}},{key:"parseText",value:function(){}},{key:"parseClose",value:function(){return!1}},{key:"tag",get:function(){return"tableStyleInfo"}}])&&v(e.prototype,t),o}(c("../base-xform"));T.exports=s},{"../base-xform":31}],140:[function(c,T,O){function y(l){return(y=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(b){return typeof b}:function(b){return b&&typeof Symbol=="function"&&b.constructor===Symbol&&b!==Symbol.prototype?"symbol":typeof b})(l)}function p(l,b){var w=Object.keys(l);if(Object.getOwnPropertySymbols){var C=Object.getOwnPropertySymbols(l);b&&(C=C.filter(function(R){return Object.getOwnPropertyDescriptor(l,R).enumerable})),w.push.apply(w,C)}return w}function v(l){for(var b=1;b"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}();return function(){var w,C=i(l);if(b){var R=i(this).constructor;w=Reflect.construct(C,arguments,R)}else w=C.apply(this,arguments);return s(this,w)}}function s(l,b){return!b||y(b)!=="object"&&typeof b!="function"?function(w){if(w===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return w}(l):b}function i(l){return(i=Object.setPrototypeOf?Object.getPrototypeOf:function(b){return b.__proto__||Object.getPrototypeOf(b)})(l)}var e=c("../../../utils/xml-stream"),t=c("../base-xform"),r=c("../list-xform"),o=c("./auto-filter-xform"),n=c("./table-column-xform"),a=c("./table-style-info-xform"),u=function(l){(function(A,j){if(typeof j!="function"&&j!==null)throw new TypeError("Super expression must either be null or a function");A.prototype=Object.create(j&&j.prototype,{constructor:{value:A,writable:!0,configurable:!0}}),j&&f(A,j)})(R,l);var b,w,C=h(R);function R(){var A;return function(j,P){if(!(j instanceof P))throw new TypeError("Cannot call a class as a function")}(this,R),(A=C.call(this)).map={autoFilter:new o,tableColumns:new r({tag:"tableColumns",count:!0,empty:!0,childXform:new n}),tableStyleInfo:new a},A}return b=R,(w=[{key:"prepare",value:function(A,j){this.map.autoFilter.prepare(A),this.map.tableColumns.prepare(A.columns,j)}},{key:"render",value:function(A,j){A.openXml(e.StdDocAttributes),A.openNode(this.tag,v(v({},R.TABLE_ATTRIBUTES),{},{id:j.id,name:j.name,displayName:j.displayName||j.name,ref:j.tableRef,totalsRowCount:j.totalsRow?"1":void 0,totalsRowShown:j.totalsRow?void 0:"1",headerRowCount:j.headerRow?"1":"0"})),this.map.autoFilter.render(A,j),this.map.tableColumns.render(A,j.columns),this.map.tableStyleInfo.render(A,j.style),A.closeNode()}},{key:"parseOpen",value:function(A){if(this.parser)return this.parser.parseOpen(A),!0;var j=A.name,P=A.attributes;switch(j){case this.tag:this.reset(),this.model={name:P.name,displayName:P.displayName||P.name,tableRef:P.ref,totalsRow:P.totalsRowCount==="1",headerRow:P.headerRowCount==="1"};break;default:this.parser=this.map[A.name],this.parser&&this.parser.parseOpen(A)}return!0}},{key:"parseText",value:function(A){this.parser&&this.parser.parseText(A)}},{key:"parseClose",value:function(A){var j=this;if(this.parser)return this.parser.parseClose(A)||(this.parser=void 0),!0;switch(A){case this.tag:return this.model.columns=this.map.tableColumns.model,this.map.autoFilter.model&&(this.model.autoFilterRef=this.map.autoFilter.model.autoFilterRef,this.map.autoFilter.model.columns.forEach(function(P,_){j.model.columns[_].filterButton=P.filterButton})),this.model.style=this.map.tableStyleInfo.model,!1;default:return!0}}},{key:"reconcile",value:function(A,j){A.columns.forEach(function(P){P.dxfId!==void 0&&(P.style=j.styles.getDxfStyle(P.dxfId))})}},{key:"tag",get:function(){return"table"}}])&&m(b.prototype,w),R}(t);u.TABLE_ATTRIBUTES={xmlns:"http://schemas.openxmlformats.org/spreadsheetml/2006/main","xmlns:mc":"http://schemas.openxmlformats.org/markup-compatibility/2006","mc:Ignorable":"xr xr3","xmlns:xr":"http://schemas.microsoft.com/office/spreadsheetml/2014/revision","xmlns:xr3":"http://schemas.microsoft.com/office/spreadsheetml/2016/revision3"},T.exports=u},{"../../../utils/xml-stream":27,"../base-xform":31,"../list-xform":70,"./auto-filter-xform":136,"./table-column-xform":138,"./table-style-info-xform":139}],141:[function(c,T,O){(function(y,p){function v(x,M,D,B,F,U,H){try{var V=x[U](H),q=V.value}catch($){return void D($)}V.done?M(q):Promise.resolve(q).then(B,F)}function d(x){return function(){var M=this,D=arguments;return new Promise(function(B,F){var U=x.apply(M,D);function H(q){v(U,B,F,H,V,"next",q)}function V(q){v(U,B,F,H,V,"throw",q)}H(void 0)})}}function m(x,M){for(var D=0;D=1)){pe.next=6;break}return ue=se.substr(oe+1),ie=se.substr(0,oe),pe.next=6,new Promise(function(de,ye){var je=new t;je.on("finish",function(){ee.mediaIndex[se]=ee.media.length,ee.mediaIndex[ie]=ee.media.length;var _e={type:"image",name:ie,extension:ue,buffer:je.toBuffer()};ee.media.push(_e),de()}),re.on("error",function(_e){ye(_e)}),re.pipe(je)});case 6:case"end":return pe.stop()}},G)})),function(G,re,ee){return Ce.apply(this,arguments)})},{key:"_processDrawingEntry",value:(le=d(regeneratorRuntime.mark(function G(re,ee,se){var oe,ue;return regeneratorRuntime.wrap(function(ie){for(;;)switch(ie.prev=ie.next){case 0:return oe=new j,ie.next=3,oe.parseStream(re);case 3:ue=ie.sent,ee.drawings[se]=ue;case 5:case"end":return ie.stop()}},G)})),function(G,re,ee){return le.apply(this,arguments)})},{key:"_processDrawingRelsEntry",value:(me=d(regeneratorRuntime.mark(function G(re,ee,se){var oe,ue;return regeneratorRuntime.wrap(function(ie){for(;;)switch(ie.prev=ie.next){case 0:return oe=new b,ie.next=3,oe.parseStream(re);case 3:ue=ie.sent,ee.drawingRels[se]=ue;case 5:case"end":return ie.stop()}},G)})),function(G,re,ee){return me.apply(this,arguments)})},{key:"_processVmlDrawingEntry",value:(fe=d(regeneratorRuntime.mark(function G(re,ee,se){var oe,ue;return regeneratorRuntime.wrap(function(ie){for(;;)switch(ie.prev=ie.next){case 0:return oe=new S,ie.next=3,oe.parseStream(re);case 3:ue=ie.sent,ee.vmlDrawings["../drawings/".concat(se,".vml")]=ue;case 5:case"end":return ie.stop()}},G)})),function(G,re,ee){return fe.apply(this,arguments)})},{key:"_processThemeEntry",value:(te=d(regeneratorRuntime.mark(function G(re,ee,se){return regeneratorRuntime.wrap(function(oe){for(;;)switch(oe.prev=oe.next){case 0:return oe.next=2,new Promise(function(ue,ie){var pe=new t;re.on("error",ie),pe.on("error",ie),pe.on("finish",function(){ee.themes[se]=pe.read().toString(),ue()}),re.pipe(pe)});case 2:case"end":return oe.stop()}},G)})),function(G,re,ee){return te.apply(this,arguments)})},{key:"createInputStream",value:function(){throw new Error("`XLSX#createInputStream` is deprecated. You should use `XLSX#read` instead. This method will be removed in version 5.0. Please follow upgrade instruction: https://github.com/exceljs/exceljs/blob/master/UPGRADE-4.0.md")}},{key:"read",value:(ae=d(regeneratorRuntime.mark(function G(re,ee){var se,oe,ue,ie,pe,de,ye,je;return regeneratorRuntime.wrap(function(_e){for(;;)switch(_e.prev=_e.next){case 0:!re[Symbol.asyncIterator]&&re.pipe&&(re=re.pipe(new i)),se=[],oe=!0,ue=!1,_e.prev=4,pe=f(re);case 6:return _e.next=8,pe.next();case 8:return de=_e.sent,oe=de.done,_e.next=12,de.value;case 12:if(ye=_e.sent,oe){_e.next=19;break}je=ye,se.push(je);case 16:oe=!0,_e.next=6;break;case 19:_e.next=25;break;case 21:_e.prev=21,_e.t0=_e.catch(4),ue=!0,ie=_e.t0;case 25:if(_e.prev=25,_e.prev=26,oe||pe.return==null){_e.next=30;break}return _e.next=30,pe.return();case 30:if(_e.prev=30,!ue){_e.next=33;break}throw ie;case 33:return _e.finish(30);case 34:return _e.finish(25);case 35:return _e.abrupt("return",this.load(p.concat(se),ee));case 36:case"end":return _e.stop()}},G,this,[[4,21,25,35],[26,,30,34]])})),function(G,re){return ae.apply(this,arguments)})},{key:"load",value:(Y=d(regeneratorRuntime.mark(function G(re,ee){var se,oe,ue,ie,pe,de,ye,je,_e,Le,Ne,ze,Je,ot,Fe,Ve;return regeneratorRuntime.wrap(function(be){for(;;)switch(be.prev=be.next){case 0:return se=ee&&ee.base64?p.from(re.toString(),"base64"):re,oe={worksheets:[],worksheetHash:{},worksheetRels:[],themes:{},media:[],mediaIndex:{},drawings:{},drawingRels:{},comments:{},tables:{},vmlDrawings:{}},be.next=4,s.loadAsync(se);case 4:ue=be.sent,ie=0,pe=Object.values(ue.files);case 6:if(!(ie0&&(ye=new o,ue.render(ye,de),re.append(ye.xml,{name:"xl/comments".concat(de.id,".xml")}),ye=new o,ie.render(ye,de),re.append(ye.xml,{name:"xl/drawings/vmlDrawing".concat(de.id,".vml")}))});case 5:case"end":return pe.stop()}},G)})),function(G,re){return U.apply(this,arguments)})},{key:"_finalize",value:function(G){var re=this;return new Promise(function(ee,se){G.on("finish",function(){ee(re)}),G.on("error",se),G.finalize()})}},{key:"prepareModel",value:function(G,re){G.creator=G.creator||"ExcelJS",G.lastModifiedBy=G.lastModifiedBy||"ExcelJS",G.created=G.created||new Date,G.modified=G.modified||new Date,G.useSharedStrings=re.useSharedStrings===void 0||re.useSharedStrings,G.useStyles=re.useStyles===void 0||re.useStyles,G.sharedStrings=new l,G.styles=G.useStyles?new a(!0):new a.Mock;var ee=new R,se=new A;ee.prepare(G);var oe={sharedStrings:G.sharedStrings,styles:G.styles,date1904:G.properties.date1904,drawingsCount:0,media:G.media};oe.drawings=G.drawings=[],oe.commentRefs=G.commentRefs=[];var ue=0;G.tables=[],G.worksheets.forEach(function(ie){ie.tables.forEach(function(pe){ue++,pe.target="table".concat(ue,".xml"),pe.id=ue,G.tables.push(pe)}),se.prepare(ie,oe)})}},{key:"write",value:(F=d(regeneratorRuntime.mark(function G(re,ee){var se,oe;return regeneratorRuntime.wrap(function(ue){for(;;)switch(ue.prev=ue.next){case 0:return ee=ee||{},se=this.workbook.model,(oe=new e.ZipWriter(ee.zip)).pipe(re),this.prepareModel(se,ee),ue.next=7,this.addContentTypes(oe,se);case 7:return ue.next=9,this.addOfficeRels(oe,se);case 9:return ue.next=11,this.addWorkbookRels(oe,se);case 11:return ue.next=13,this.addWorksheets(oe,se);case 13:return ue.next=15,this.addSharedStrings(oe,se);case 15:return ue.next=17,this.addDrawings(oe,se);case 17:return ue.next=19,this.addTables(oe,se);case 19:return ue.next=21,Promise.all([this.addThemes(oe,se),this.addStyles(oe,se)]);case 21:return ue.next=23,this.addMedia(oe,se);case 23:return ue.next=25,Promise.all([this.addApp(oe,se),this.addCore(oe,se)]);case 25:return ue.next=27,this.addWorkbook(oe,se);case 27:return ue.abrupt("return",this._finalize(oe));case 28:case"end":return ue.stop()}},G,this)})),function(G,re){return F.apply(this,arguments)})},{key:"writeFile",value:function(G,re){var ee=this,se=h.createWriteStream(G);return new Promise(function(oe,ue){se.on("finish",function(){oe()}),se.on("error",function(ie){ue(ie)}),ee.write(se,re).then(function(){se.end()})})}},{key:"writeBuffer",value:(B=d(regeneratorRuntime.mark(function G(re){var ee;return regeneratorRuntime.wrap(function(se){for(;;)switch(se.prev=se.next){case 0:return ee=new t,se.next=3,this.write(ee,re);case 3:return se.abrupt("return",ee.read());case 4:case"end":return se.stop()}},G,this)})),function(G){return B.apply(this,arguments)})}])&&m(M.prototype,D),x}();k.RelType=c("./rel-type"),T.exports=k}).call(this,c("_process"),c("buffer").Buffer)},{"../utils/browser-buffer-decode":16,"../utils/stream-buf":23,"../utils/utils":26,"../utils/xml-stream":27,"../utils/zip-stream":28,"./rel-type":30,"./xform/book/workbook-xform":37,"./xform/comment/comments-xform":39,"./xform/comment/vml-notes-xform":44,"./xform/core/app-xform":50,"./xform/core/content-types-xform":51,"./xform/core/core-xform":52,"./xform/core/relationships-xform":54,"./xform/drawing/drawing-xform":61,"./xform/sheet/worksheet-xform":114,"./xform/strings/shared-strings-xform":123,"./xform/style/styles-xform":134,"./xform/table/table-xform":140,"./xml/theme1.js":142,_process:467,buffer:216,fs:215,jszip:399,"readable-stream":491}],142:[function(c,T,O){T.exports=` `},{}],143:[function(c,T,O){(function(y){function p(t){return(p=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r})(t)}function v(t,r){for(var o=0;o"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}();return function(){var o,n=h(t);if(r){var a=h(this).constructor;o=Reflect.construct(n,arguments,a)}else o=n.apply(this,arguments);return f(this,o)}}function f(t,r){return!r||p(r)!=="object"&&typeof r!="function"?function(o){if(o===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return o}(t):r}function h(t){return(h=Object.setPrototypeOf?Object.getPrototypeOf:function(r){return r.__proto__||Object.getPrototypeOf(r)})(t)}Object.defineProperty(O,"__esModule",{value:!0}),O.CsvFormatterStream=void 0;var s=c("stream"),i=c("./formatter"),e=function(t){(function(u,l){if(typeof l!="function"&&l!==null)throw new TypeError("Super expression must either be null or a function");u.prototype=Object.create(l&&l.prototype,{constructor:{value:u,writable:!0,configurable:!0}}),l&&d(u,l)})(a,t);var r,o,n=m(a);function a(u){var l;return function(b,w){if(!(b instanceof w))throw new TypeError("Cannot call a class as a function")}(this,a),(l=n.call(this,{writableObjectMode:u.objectMode})).hasWrittenBOM=!1,l.formatterOptions=u,l.rowFormatter=new i.RowFormatter(u),l.hasWrittenBOM=!u.writeBOM,l}return r=a,(o=[{key:"transform",value:function(u){return this.rowFormatter.rowTransform=u,this}},{key:"_transform",value:function(u,l,b){var w=this,C=!1;try{this.hasWrittenBOM||(this.push(this.formatterOptions.BOM),this.hasWrittenBOM=!0),this.rowFormatter.format(u,function(R,A){return R?(C=!0,b(R)):(A&&A.forEach(function(j){w.push(y.from(j,"utf8"))}),C=!0,b())})}catch(R){if(C)throw R;b(R)}}},{key:"_flush",value:function(u){var l=this;this.rowFormatter.finish(function(b,w){return b?u(b):(w&&w.forEach(function(C){l.push(y.from(C,"utf8"))}),u())})}}])&&v(r.prototype,o),a}(s.Transform);O.CsvFormatterStream=e}).call(this,c("buffer").Buffer)},{"./formatter":147,buffer:216,stream:506}],144:[function(c,T,O){function y(p,v){if(!(p instanceof v))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(O,"__esModule",{value:!0}),O.FormatterOptions=void 0,O.FormatterOptions=function p(){var v,d=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};y(this,p),this.objectMode=!0,this.delimiter=",",this.rowDelimiter=` `,this.quote='"',this.escape=this.quote,this.quoteColumns=!1,this.quoteHeaders=this.quoteColumns,this.headers=null,this.includeEndRowDelimiter=!1,this.writeBOM=!1,this.BOM="\uFEFF",this.alwaysWriteHeaders=!1,Object.assign(this,d||{}),(d==null?void 0:d.quoteHeaders)===void 0&&(this.quoteHeaders=this.quoteColumns),(d==null?void 0:d.quote)===!0?this.quote='"':(d==null?void 0:d.quote)===!1&&(this.quote=""),typeof(d==null?void 0:d.escape)!="string"&&(this.escape=this.quote),this.shouldWriteHeaders=!!this.headers&&((v=d.writeHeaders)===null||v===void 0||v),this.headers=Array.isArray(this.headers)?this.headers:null,this.escapedQuote="".concat(this.escape).concat(this.quote)}},{}],145:[function(c,T,O){function y(h,s){for(var i=0;i1&&arguments[1]!==void 0?arguments[1]:{},a=[],u=new h.Writable({write:function(l,b,w){a.push(l),w()}});return new Promise(function(l,b){u.on("error",b).on("finish",function(){return l(y.concat(a))}),O.write(o,n).pipe(u)})},O.writeToString=function(o,n){return O.writeToBuffer(o,n).then(function(a){return a.toString()})},O.writeToPath=function(o,n,a){var u=s.createWriteStream(o,{encoding:"utf8"});return O.write(n,a).pipe(u)}}).call(this,c("buffer").Buffer)},{"./CsvFormatterStream":143,"./FormatterOptions":144,"./types":149,buffer:216,fs:215,stream:506,util:525}],149:[function(c,T,O){Object.defineProperty(O,"__esModule",{value:!0}),O.isSyncTransform=void 0,O.isSyncTransform=function(y){return y.length===1}},{}],150:[function(c,T,O){(function(y){function p(n){return(p=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(a){return typeof a}:function(a){return a&&typeof Symbol=="function"&&a.constructor===Symbol&&a!==Symbol.prototype?"symbol":typeof a})(n)}function v(n,a){for(var u=0;u"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}();return function(){var u,l=s(n);if(a){var b=s(this).constructor;u=Reflect.construct(l,arguments,b)}else u=l.apply(this,arguments);return h(this,u)}}function h(n,a){return!a||p(a)!=="object"&&typeof a!="function"?function(u){if(u===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return u}(n):a}function s(n){return(s=Object.setPrototypeOf?Object.getPrototypeOf:function(a){return a.__proto__||Object.getPrototypeOf(a)})(n)}Object.defineProperty(O,"__esModule",{value:!0}),O.CsvParserStream=void 0;var i=c("string_decoder"),e=c("stream"),t=c("./transforms"),r=c("./parser"),o=function(n){(function(w,C){if(typeof C!="function"&&C!==null)throw new TypeError("Super expression must either be null or a function");w.prototype=Object.create(C&&C.prototype,{constructor:{value:w,writable:!0,configurable:!0}}),C&&m(w,C)})(b,n);var a,u,l=f(b);function b(w){var C;return function(R,A){if(!(R instanceof A))throw new TypeError("Cannot call a class as a function")}(this,b),(C=l.call(this,{objectMode:w.objectMode})).lines="",C.rowCount=0,C.parsedRowCount=0,C.parsedLineCount=0,C.endEmitted=!1,C.headersEmitted=!1,C.parserOptions=w,C.parser=new r.Parser(w),C.headerTransformer=new t.HeaderTransformer(w),C.decoder=new i.StringDecoder(w.encoding),C.rowTransformerValidator=new t.RowTransformerValidator,C}return a=b,(u=[{key:"transform",value:function(w){return this.rowTransformerValidator.rowTransform=w,this}},{key:"validate",value:function(w){return this.rowTransformerValidator.rowValidator=w,this}},{key:"emit",value:function(w){var C;if(w==="end")return this.endEmitted||(this.endEmitted=!0,d(s(b.prototype),"emit",this).call(this,"end",this.rowCount)),!1;for(var R=arguments.length,A=new Array(R>1?R-1:0),j=1;j=A||R.hasHitRowLimit)return C();if(R.parsedLineCount+=1,R.shouldSkipLine)return _();var S=w[P];R.rowCount+=1,R.parsedRowCount+=1;var g=R.rowCount;return R.transformRow(S,function(E,k){if(E)return R.rowCount-=1,_(E);if(!k)return _(new Error("expected transform result"));if(k.isValid){if(k.row)return R.pushRow(k.row,_)}else R.emit("data-invalid",k.row,g,k.reason);return _()})})(0)}},{key:"transformRow",value:function(w,C){var R=this;try{this.headerTransformer.transform(w,function(A,j){return A?C(A):j?j.isValid?j.row?R.shouldEmitRows?R.rowTransformerValidator.transformAndValidate(j.row,C):R.skipRow(C):(R.rowCount-=1,R.parsedRowCount-=1,C(null,{row:null,isValid:!0})):R.shouldEmitRows?C(null,{isValid:!1,row:w}):R.skipRow(C):C(new Error("Expected result from header transform"))})}catch(A){C(A)}}},{key:"checkAndEmitHeaders",value:function(){!this.headersEmitted&&this.headerTransformer.headers&&(this.headersEmitted=!0,this.emit("headers",this.headerTransformer.headers))}},{key:"skipRow",value:function(w){return this.rowCount-=1,w(null,{row:null,isValid:!0})}},{key:"pushRow",value:function(w,C){try{this.parserOptions.objectMode?this.push(w):this.push(JSON.stringify(w)),C()}catch(R){C(R)}}},{key:"hasHitRowLimit",get:function(){return this.parserOptions.limitRows&&this.rowCount>=this.parserOptions.maxRows}},{key:"shouldEmitRows",get:function(){return this.parsedRowCount>this.parserOptions.skipRows}},{key:"shouldSkipLine",get:function(){return this.parsedLineCount<=this.parserOptions.skipLines}}])&&v(a.prototype,u),b}(e.Transform);O.CsvParserStream=o}).call(this,c("timers").setImmediate)},{"./parser":162,"./transforms":165,stream:506,string_decoder:520,timers:521}],151:[function(c,T,O){var y=function(d){return d&&d.__esModule?d:{default:d}};Object.defineProperty(O,"__esModule",{value:!0}),O.ParserOptions=void 0;var p=y(c("lodash.escaperegexp")),v=y(c("lodash.isnil"));O.ParserOptions=function d(m){var f;if(function(h,s){if(!(h instanceof s))throw new TypeError("Cannot call a class as a function")}(this,d),this.objectMode=!0,this.delimiter=",",this.ignoreEmpty=!1,this.quote='"',this.escape=null,this.escapeChar=this.quote,this.comment=null,this.supportsComments=!1,this.ltrim=!1,this.rtrim=!1,this.trim=!1,this.headers=null,this.renameHeaders=!1,this.strictColumnHandling=!1,this.discardUnmappedColumns=!1,this.carriageReturn="\r",this.encoding="utf8",this.limitRows=!1,this.maxRows=0,this.skipLines=0,this.skipRows=0,Object.assign(this,m||{}),this.delimiter.length>1)throw new Error("delimiter option must be one character long");this.escapedDelimiter=p.default(this.delimiter),this.escapeChar=(f=this.escape)!==null&&f!==void 0?f:this.quote,this.supportsComments=!v.default(this.comment),this.NEXT_TOKEN_REGEXP=new RegExp("([^\\s]|\\r\\n|\\n|\\r|".concat(this.escapedDelimiter,")")),this.maxRows>0&&(this.limitRows=!0)}},{"lodash.escaperegexp":426,"lodash.isnil":431}],152:[function(c,T,O){var y=Object.create?function(t,r,o,n){n===void 0&&(n=o),Object.defineProperty(t,n,{enumerable:!0,get:function(){return r[o]}})}:function(t,r,o,n){n===void 0&&(n=o),t[n]=r[o]},p=Object.create?function(t,r){Object.defineProperty(t,"default",{enumerable:!0,value:r})}:function(t,r){t.default=r},v=function(t){if(t&&t.__esModule)return t;var r={};if(t!=null)for(var o in t)o!=="default"&&Object.hasOwnProperty.call(t,o)&&y(r,t,o);return p(r,t),r},d=function(t,r){for(var o in t)o==="default"||r.hasOwnProperty(o)||y(r,t,o)};Object.defineProperty(O,"__esModule",{value:!0}),O.parseString=O.parseFile=O.parseStream=O.parse=void 0;var m=v(c("fs")),f=c("stream"),h=c("./ParserOptions"),s=c("./CsvParserStream");d(c("./types"),O);var i=c("./CsvParserStream");Object.defineProperty(O,"CsvParserStream",{enumerable:!0,get:function(){return i.CsvParserStream}});var e=c("./ParserOptions");Object.defineProperty(O,"ParserOptions",{enumerable:!0,get:function(){return e.ParserOptions}}),O.parse=function(t){return new s.CsvParserStream(new h.ParserOptions(t))},O.parseStream=function(t,r){return t.pipe(new s.CsvParserStream(new h.ParserOptions(r)))},O.parseFile=function(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return m.createReadStream(t).pipe(new s.CsvParserStream(new h.ParserOptions(r)))},O.parseString=function(t,r){var o=new f.Readable;return o.push(t),o.push(null),o.pipe(new s.CsvParserStream(new h.ParserOptions(r)))}},{"./CsvParserStream":150,"./ParserOptions":151,"./types":166,fs:215,stream:506}],153:[function(c,T,O){function y(h,s){for(var i=0;ithis.cursor}},{key:"nextNonSpaceToken",get:function(){var s=this.lineFromCursor,i=this.parserOptions.NEXT_TOKEN_REGEXP;if(s.search(i)===-1)return null;var e=i.exec(s);if(e==null)return null;var t=e[1],r=this.cursor+(e.index||0);return new p.Token({token:t,startCursor:r,endCursor:r+t.length-1})}},{key:"nextCharacterToken",get:function(){var s=this.cursor;return this.lineLength<=s?null:new p.Token({token:this.line[s],startCursor:s,endCursor:s})}},{key:"lineFromCursor",get:function(){return this.line.substr(this.cursor)}}])&&y(f.prototype,h),m}();O.Scanner=d},{"./Token":156}],156:[function(c,T,O){function y(v,d){for(var m=0;mthis.headersLength){if(!r.strictColumnHandling)throw new Error("Unexpected Error: column header mismatch expected: ".concat(this.headersLength," columns got: ").concat(t.length));return{row:t,isValid:!1,reason:"Column header mismatch expected: ".concat(this.headersLength," columns got: ").concat(t.length)}}return r.strictColumnHandling&&t.length1});throw new Error("Duplicate headers found ".concat(JSON.stringify(a)))}this.headers=t,this.receivedHeaders=!0,this.headersLength=((r=this.headers)===null||r===void 0?void 0:r.length)||0}}])&&y(i.prototype,e),s}();O.HeaderTransformer=h},{"lodash.groupby":427,"lodash.isfunction":430,"lodash.isundefined":432,"lodash.uniq":433}],164:[function(c,T,O){function y(f,h){for(var s=0;s>6],n=(32&r)==0;if((31&r)==31){var a=r;for(r=0;(128&a)==128;){if(a=e.readUInt8(t),e.isError(a))return a;r<<=7,r|=127&a}}else r&=31;return{cls:o,primitive:n,tag:r,tagStr:m.tag[r]}}function i(e,t,r){var o=e.readUInt8(r);if(e.isError(o))return o;if(!t&&o===128)return null;if(!(128&o))return o;var n=127&o;if(n>4)return e.error("length octect is too long");o=0;for(var a=0;a=31?A.error("Multi-octet tag encoding unsupported"):(C||(j|=32),j|=d.tagClassByName[R||"universal"]<<6)}(s,i,e,this.reporter);if(t.length<128){var o=p.alloc(2);return o[0]=r,o[1]=t.length,this._createEncoderBuffer([o,t])}for(var n=1,a=t.length;a>=256;a>>=8)n++;var u=p.alloc(2+n);u[0]=r,u[1]=128|n;for(var l=1+n,b=t.length;b>0;l--,b>>=8)u[l]=255&b;return this._createEncoderBuffer([u,t])},f.prototype._encodeStr=function(s,i){if(i==="bitstr")return this._createEncoderBuffer([0|s.unused,s.data]);if(i==="bmpstr"){for(var e=p.alloc(2*s.length),t=0;t=40)return this.reporter.error("Second objid identifier OOB");s.splice(0,2,40*s[0]+s[1])}for(var o=0,n=0;n=128;a>>=7)o++}for(var u=p.alloc(o),l=u.length-1,b=s.length-1;b>=0;b--){var w=s[b];for(u[l--]=127&w;(w>>=7)>0;)u[l--]=128|127&w}return this._createEncoderBuffer(u)},f.prototype._encodeTime=function(s,i){var e,t=new Date(s);return i==="gentime"?e=[h(t.getUTCFullYear()),h(t.getUTCMonth()+1),h(t.getUTCDate()),h(t.getUTCHours()),h(t.getUTCMinutes()),h(t.getUTCSeconds()),"Z"].join(""):i==="utctime"?e=[h(t.getUTCFullYear()%100),h(t.getUTCMonth()+1),h(t.getUTCDate()),h(t.getUTCHours()),h(t.getUTCMinutes()),h(t.getUTCSeconds()),"Z"].join(""):this.reporter.error("Encoding "+i+" time is not supported yet"),this._encodeStr(e,"octstr")},f.prototype._encodeNull=function(){return this._createEncoderBuffer("")},f.prototype._encodeInt=function(s,i){if(typeof s=="string"){if(!i)return this.reporter.error("String int or enum given, but no values map");if(!i.hasOwnProperty(s))return this.reporter.error("Values map doesn't contain: "+JSON.stringify(s));s=i[s]}if(typeof s!="number"&&!p.isBuffer(s)){var e=s.toArray();!s.sign&&128&e[0]&&e.unshift(0),s=p.from(e)}if(p.isBuffer(s)){var t=s.length;s.length===0&&t++;var r=p.alloc(t);return s.copy(r),s.length===0&&(r[0]=0),this._createEncoderBuffer(r)}if(s<128)return this._createEncoderBuffer(s);if(s<256)return this._createEncoderBuffer([0,s]);for(var o=1,n=s;n>=256;n>>=8)o++;for(var a=new Array(o),u=a.length-1;u>=0;u--)a[u]=255&s,s>>=8;return 128&a[0]&&a.unshift(0),this._createEncoderBuffer(p.from(a))},f.prototype._encodeBool=function(s){return this._createEncoderBuffer(s?255:0)},f.prototype._use=function(s,i){return typeof s=="function"&&(s=s(i)),s._getEncoder("der").tree},f.prototype._skipDefault=function(s,i,e){var t,r=this._baseState;if(r.default===null)return!1;var o=s.join();if(r.defaultBuffer===void 0&&(r.defaultBuffer=this._encodeValue(r.default,i,e).join()),o.length!==r.defaultBuffer.length)return!1;for(t=0;t=49&&M<=54?M-49+10:M>=17&&M<=22?M-17+10:15&M}return E}function i(_,S,g,E){for(var k=0,x=Math.min(_.length,g),M=S;M=49?D-49+10:D>=17?D-17+10:D}return k}f.isBN=function(_){return _ instanceof f||_!==null&&y(_)==="object"&&_.constructor.wordSize===f.wordSize&&Array.isArray(_.words)},f.max=function(_,S){return _.cmp(S)>0?_:S},f.min=function(_,S){return _.cmp(S)<0?_:S},f.prototype._init=function(_,S,g){if(typeof _=="number")return this._initNumber(_,S,g);if(y(_)==="object")return this._initArray(_,S,g);S==="hex"&&(S=16),d(S===(0|S)&&S>=2&&S<=36);var E=0;(_=_.toString().replace(/\s+/g,""))[0]==="-"&&E++,S===16?this._parseHex(_,E):this._parseBase(_,S,E),_[0]==="-"&&(this.negative=1),this.strip(),g==="le"&&this._initArray(this.toArray(),S,g)},f.prototype._initNumber=function(_,S,g){_<0&&(this.negative=1,_=-_),_<67108864?(this.words=[67108863&_],this.length=1):_<4503599627370496?(this.words=[67108863&_,_/67108864&67108863],this.length=2):(d(_<9007199254740992),this.words=[67108863&_,_/67108864&67108863,1],this.length=3),g==="le"&&this._initArray(this.toArray(),S,g)},f.prototype._initArray=function(_,S,g){if(d(typeof _.length=="number"),_.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(_.length/3),this.words=new Array(this.length);for(var E=0;E=0;E-=3)x=_[E]|_[E-1]<<8|_[E-2]<<16,this.words[k]|=x<>>26-M&67108863,(M+=24)>=26&&(M-=26,k++);else if(g==="le")for(E=0,k=0;E<_.length;E+=3)x=_[E]|_[E+1]<<8|_[E+2]<<16,this.words[k]|=x<>>26-M&67108863,(M+=24)>=26&&(M-=26,k++);return this.strip()},f.prototype._parseHex=function(_,S){this.length=Math.ceil((_.length-S)/6),this.words=new Array(this.length);for(var g=0;g=S;g-=6)k=s(_,g,g+6),this.words[E]|=k<>>26-x&4194303,(x+=24)>=26&&(x-=26,E++);g+6!==S&&(k=s(_,S,g+6),this.words[E]|=k<>>26-x&4194303),this.strip()},f.prototype._parseBase=function(_,S,g){this.words=[0],this.length=1;for(var E=0,k=1;k<=67108863;k*=S)E++;E--,k=k/S|0;for(var x=_.length-g,M=x%E,D=Math.min(x,x-M)+g,B=0,F=g;F1&&this.words[this.length-1]===0;)this.length--;return this._normSign()},f.prototype._normSign=function(){return this.length===1&&this.words[0]===0&&(this.negative=0),this},f.prototype.inspect=function(){return(this.red?""};var e=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],t=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],r=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];function o(_,S,g){g.negative=S.negative^_.negative;var E=_.length+S.length|0;g.length=E,E=E-1|0;var k=0|_.words[0],x=0|S.words[0],M=k*x,D=67108863&M,B=M/67108864|0;g.words[0]=D;for(var F=1;F>>26,H=67108863&B,V=Math.min(F,S.length-1),q=Math.max(0,F-_.length+1);q<=V;q++){var $=F-q|0;U+=(M=(k=0|_.words[$])*(x=0|S.words[q])+H)/67108864|0,H=67108863&M}g.words[F]=0|H,B=0|U}return B!==0?g.words[F]=0|B:g.length--,g.strip()}f.prototype.toString=function(_,S){var g;if(S=0|S||1,(_=_||10)===16||_==="hex"){g="";for(var E=0,k=0,x=0;x>>24-E&16777215)!==0||x!==this.length-1?e[6-D.length]+D+g:D+g,(E+=2)>=26&&(E-=26,x--)}for(k!==0&&(g=k.toString(16)+g);g.length%S!=0;)g="0"+g;return this.negative!==0&&(g="-"+g),g}if(_===(0|_)&&_>=2&&_<=36){var B=t[_],F=r[_];g="";var U=this.clone();for(U.negative=0;!U.isZero();){var H=U.modn(F).toString(_);g=(U=U.idivn(F)).isZero()?H+g:e[B-H.length]+H+g}for(this.isZero()&&(g="0"+g);g.length%S!=0;)g="0"+g;return this.negative!==0&&(g="-"+g),g}d(!1,"Base should be between 2 and 36")},f.prototype.toNumber=function(){var _=this.words[0];return this.length===2?_+=67108864*this.words[1]:this.length===3&&this.words[2]===1?_+=4503599627370496+67108864*this.words[1]:this.length>2&&d(!1,"Number can only safely store up to 53 bits"),this.negative!==0?-_:_},f.prototype.toJSON=function(){return this.toString(16)},f.prototype.toBuffer=function(_,S){return d(h!==void 0),this.toArrayLike(h,_,S)},f.prototype.toArray=function(_,S){return this.toArrayLike(Array,_,S)},f.prototype.toArrayLike=function(_,S,g){var E=this.byteLength(),k=g||Math.max(1,E);d(E<=k,"byte array longer than desired length"),d(k>0,"Requested array length <= 0"),this.strip();var x,M,D=S==="le",B=new _(k),F=this.clone();if(D){for(M=0;!F.isZero();M++)x=F.andln(255),F.iushrn(8),B[M]=x;for(;M=4096&&(g+=13,S>>>=13),S>=64&&(g+=7,S>>>=7),S>=8&&(g+=4,S>>>=4),S>=2&&(g+=2,S>>>=2),g+S},f.prototype._zeroBits=function(_){if(_===0)return 26;var S=_,g=0;return!(8191&S)&&(g+=13,S>>>=13),!(127&S)&&(g+=7,S>>>=7),!(15&S)&&(g+=4,S>>>=4),!(3&S)&&(g+=2,S>>>=2),!(1&S)&&g++,g},f.prototype.bitLength=function(){var _=this.words[this.length-1],S=this._countBits(_);return 26*(this.length-1)+S},f.prototype.zeroBits=function(){if(this.isZero())return 0;for(var _=0,S=0;S_.length?this.clone().ior(_):_.clone().ior(this)},f.prototype.uor=function(_){return this.length>_.length?this.clone().iuor(_):_.clone().iuor(this)},f.prototype.iuand=function(_){var S;S=this.length>_.length?_:this;for(var g=0;g_.length?this.clone().iand(_):_.clone().iand(this)},f.prototype.uand=function(_){return this.length>_.length?this.clone().iuand(_):_.clone().iuand(this)},f.prototype.iuxor=function(_){var S,g;this.length>_.length?(S=this,g=_):(S=_,g=this);for(var E=0;E_.length?this.clone().ixor(_):_.clone().ixor(this)},f.prototype.uxor=function(_){return this.length>_.length?this.clone().iuxor(_):_.clone().iuxor(this)},f.prototype.inotn=function(_){d(typeof _=="number"&&_>=0);var S=0|Math.ceil(_/26),g=_%26;this._expand(S),g>0&&S--;for(var E=0;E0&&(this.words[E]=~this.words[E]&67108863>>26-g),this.strip()},f.prototype.notn=function(_){return this.clone().inotn(_)},f.prototype.setn=function(_,S){d(typeof _=="number"&&_>=0);var g=_/26|0,E=_%26;return this._expand(g+1),this.words[g]=S?this.words[g]|1<_.length?(g=this,E=_):(g=_,E=this);for(var k=0,x=0;x>>26;for(;k!==0&&x>>26;if(this.length=g.length,k!==0)this.words[this.length]=k,this.length++;else if(g!==this)for(;x_.length?this.clone().iadd(_):_.clone().iadd(this)},f.prototype.isub=function(_){if(_.negative!==0){_.negative=0;var S=this.iadd(_);return _.negative=1,S._normSign()}if(this.negative!==0)return this.negative=0,this.iadd(_),this.negative=1,this._normSign();var g,E,k=this.cmp(_);if(k===0)return this.negative=0,this.length=1,this.words[0]=0,this;k>0?(g=this,E=_):(g=_,E=this);for(var x=0,M=0;M>26,this.words[M]=67108863&S;for(;x!==0&&M>26,this.words[M]=67108863&S;if(x===0&&M>>13,q=0|M[1],$=8191&q,L=q>>>13,I=0|M[2],N=8191&I,z=I>>>13,W=0|M[3],K=8191&W,Y=W>>>13,ae=0|M[4],te=8191&ae,fe=ae>>>13,me=0|M[5],le=8191&me,Ce=me>>>13,xe=0|M[6],we=8191&xe,Se=xe>>>13,Te=0|M[7],he=8191&Te,G=Te>>>13,re=0|M[8],ee=8191&re,se=re>>>13,oe=0|M[9],ue=8191&oe,ie=oe>>>13,pe=0|D[0],de=8191&pe,ye=pe>>>13,je=0|D[1],_e=8191&je,Le=je>>>13,Ne=0|D[2],ze=8191&Ne,Je=Ne>>>13,ot=0|D[3],Fe=8191&ot,Ve=ot>>>13,be=0|D[4],Ue=8191&be,tt=be>>>13,Qe=0|D[5],We=8191&Qe,it=Qe>>>13,nt=0|D[6],$e=8191&nt,ut=nt>>>13,Q=0|D[7],ne=8191&Q,ge=Q>>>13,Re=0|D[8],Me=8191&Re,Ae=Re>>>13,He=0|D[9],Pe=8191&He,Ge=He>>>13;g.negative=_.negative^S.negative,g.length=19;var Xe=(F+(E=Math.imul(H,de))|0)+((8191&(k=(k=Math.imul(H,ye))+Math.imul(V,de)|0))<<13)|0;F=((x=Math.imul(V,ye))+(k>>>13)|0)+(Xe>>>26)|0,Xe&=67108863,E=Math.imul($,de),k=(k=Math.imul($,ye))+Math.imul(L,de)|0,x=Math.imul(L,ye);var qe=(F+(E=E+Math.imul(H,_e)|0)|0)+((8191&(k=(k=k+Math.imul(H,Le)|0)+Math.imul(V,_e)|0))<<13)|0;F=((x=x+Math.imul(V,Le)|0)+(k>>>13)|0)+(qe>>>26)|0,qe&=67108863,E=Math.imul(N,de),k=(k=Math.imul(N,ye))+Math.imul(z,de)|0,x=Math.imul(z,ye),E=E+Math.imul($,_e)|0,k=(k=k+Math.imul($,Le)|0)+Math.imul(L,_e)|0,x=x+Math.imul(L,Le)|0;var pt=(F+(E=E+Math.imul(H,ze)|0)|0)+((8191&(k=(k=k+Math.imul(H,Je)|0)+Math.imul(V,ze)|0))<<13)|0;F=((x=x+Math.imul(V,Je)|0)+(k>>>13)|0)+(pt>>>26)|0,pt&=67108863,E=Math.imul(K,de),k=(k=Math.imul(K,ye))+Math.imul(Y,de)|0,x=Math.imul(Y,ye),E=E+Math.imul(N,_e)|0,k=(k=k+Math.imul(N,Le)|0)+Math.imul(z,_e)|0,x=x+Math.imul(z,Le)|0,E=E+Math.imul($,ze)|0,k=(k=k+Math.imul($,Je)|0)+Math.imul(L,ze)|0,x=x+Math.imul(L,Je)|0;var mt=(F+(E=E+Math.imul(H,Fe)|0)|0)+((8191&(k=(k=k+Math.imul(H,Ve)|0)+Math.imul(V,Fe)|0))<<13)|0;F=((x=x+Math.imul(V,Ve)|0)+(k>>>13)|0)+(mt>>>26)|0,mt&=67108863,E=Math.imul(te,de),k=(k=Math.imul(te,ye))+Math.imul(fe,de)|0,x=Math.imul(fe,ye),E=E+Math.imul(K,_e)|0,k=(k=k+Math.imul(K,Le)|0)+Math.imul(Y,_e)|0,x=x+Math.imul(Y,Le)|0,E=E+Math.imul(N,ze)|0,k=(k=k+Math.imul(N,Je)|0)+Math.imul(z,ze)|0,x=x+Math.imul(z,Je)|0,E=E+Math.imul($,Fe)|0,k=(k=k+Math.imul($,Ve)|0)+Math.imul(L,Fe)|0,x=x+Math.imul(L,Ve)|0;var ct=(F+(E=E+Math.imul(H,Ue)|0)|0)+((8191&(k=(k=k+Math.imul(H,tt)|0)+Math.imul(V,Ue)|0))<<13)|0;F=((x=x+Math.imul(V,tt)|0)+(k>>>13)|0)+(ct>>>26)|0,ct&=67108863,E=Math.imul(le,de),k=(k=Math.imul(le,ye))+Math.imul(Ce,de)|0,x=Math.imul(Ce,ye),E=E+Math.imul(te,_e)|0,k=(k=k+Math.imul(te,Le)|0)+Math.imul(fe,_e)|0,x=x+Math.imul(fe,Le)|0,E=E+Math.imul(K,ze)|0,k=(k=k+Math.imul(K,Je)|0)+Math.imul(Y,ze)|0,x=x+Math.imul(Y,Je)|0,E=E+Math.imul(N,Fe)|0,k=(k=k+Math.imul(N,Ve)|0)+Math.imul(z,Fe)|0,x=x+Math.imul(z,Ve)|0,E=E+Math.imul($,Ue)|0,k=(k=k+Math.imul($,tt)|0)+Math.imul(L,Ue)|0,x=x+Math.imul(L,tt)|0;var bt=(F+(E=E+Math.imul(H,We)|0)|0)+((8191&(k=(k=k+Math.imul(H,it)|0)+Math.imul(V,We)|0))<<13)|0;F=((x=x+Math.imul(V,it)|0)+(k>>>13)|0)+(bt>>>26)|0,bt&=67108863,E=Math.imul(we,de),k=(k=Math.imul(we,ye))+Math.imul(Se,de)|0,x=Math.imul(Se,ye),E=E+Math.imul(le,_e)|0,k=(k=k+Math.imul(le,Le)|0)+Math.imul(Ce,_e)|0,x=x+Math.imul(Ce,Le)|0,E=E+Math.imul(te,ze)|0,k=(k=k+Math.imul(te,Je)|0)+Math.imul(fe,ze)|0,x=x+Math.imul(fe,Je)|0,E=E+Math.imul(K,Fe)|0,k=(k=k+Math.imul(K,Ve)|0)+Math.imul(Y,Fe)|0,x=x+Math.imul(Y,Ve)|0,E=E+Math.imul(N,Ue)|0,k=(k=k+Math.imul(N,tt)|0)+Math.imul(z,Ue)|0,x=x+Math.imul(z,tt)|0,E=E+Math.imul($,We)|0,k=(k=k+Math.imul($,it)|0)+Math.imul(L,We)|0,x=x+Math.imul(L,it)|0;var vt=(F+(E=E+Math.imul(H,$e)|0)|0)+((8191&(k=(k=k+Math.imul(H,ut)|0)+Math.imul(V,$e)|0))<<13)|0;F=((x=x+Math.imul(V,ut)|0)+(k>>>13)|0)+(vt>>>26)|0,vt&=67108863,E=Math.imul(he,de),k=(k=Math.imul(he,ye))+Math.imul(G,de)|0,x=Math.imul(G,ye),E=E+Math.imul(we,_e)|0,k=(k=k+Math.imul(we,Le)|0)+Math.imul(Se,_e)|0,x=x+Math.imul(Se,Le)|0,E=E+Math.imul(le,ze)|0,k=(k=k+Math.imul(le,Je)|0)+Math.imul(Ce,ze)|0,x=x+Math.imul(Ce,Je)|0,E=E+Math.imul(te,Fe)|0,k=(k=k+Math.imul(te,Ve)|0)+Math.imul(fe,Fe)|0,x=x+Math.imul(fe,Ve)|0,E=E+Math.imul(K,Ue)|0,k=(k=k+Math.imul(K,tt)|0)+Math.imul(Y,Ue)|0,x=x+Math.imul(Y,tt)|0,E=E+Math.imul(N,We)|0,k=(k=k+Math.imul(N,it)|0)+Math.imul(z,We)|0,x=x+Math.imul(z,it)|0,E=E+Math.imul($,$e)|0,k=(k=k+Math.imul($,ut)|0)+Math.imul(L,$e)|0,x=x+Math.imul(L,ut)|0;var wt=(F+(E=E+Math.imul(H,ne)|0)|0)+((8191&(k=(k=k+Math.imul(H,ge)|0)+Math.imul(V,ne)|0))<<13)|0;F=((x=x+Math.imul(V,ge)|0)+(k>>>13)|0)+(wt>>>26)|0,wt&=67108863,E=Math.imul(ee,de),k=(k=Math.imul(ee,ye))+Math.imul(se,de)|0,x=Math.imul(se,ye),E=E+Math.imul(he,_e)|0,k=(k=k+Math.imul(he,Le)|0)+Math.imul(G,_e)|0,x=x+Math.imul(G,Le)|0,E=E+Math.imul(we,ze)|0,k=(k=k+Math.imul(we,Je)|0)+Math.imul(Se,ze)|0,x=x+Math.imul(Se,Je)|0,E=E+Math.imul(le,Fe)|0,k=(k=k+Math.imul(le,Ve)|0)+Math.imul(Ce,Fe)|0,x=x+Math.imul(Ce,Ve)|0,E=E+Math.imul(te,Ue)|0,k=(k=k+Math.imul(te,tt)|0)+Math.imul(fe,Ue)|0,x=x+Math.imul(fe,tt)|0,E=E+Math.imul(K,We)|0,k=(k=k+Math.imul(K,it)|0)+Math.imul(Y,We)|0,x=x+Math.imul(Y,it)|0,E=E+Math.imul(N,$e)|0,k=(k=k+Math.imul(N,ut)|0)+Math.imul(z,$e)|0,x=x+Math.imul(z,ut)|0,E=E+Math.imul($,ne)|0,k=(k=k+Math.imul($,ge)|0)+Math.imul(L,ne)|0,x=x+Math.imul(L,ge)|0;var J=(F+(E=E+Math.imul(H,Me)|0)|0)+((8191&(k=(k=k+Math.imul(H,Ae)|0)+Math.imul(V,Me)|0))<<13)|0;F=((x=x+Math.imul(V,Ae)|0)+(k>>>13)|0)+(J>>>26)|0,J&=67108863,E=Math.imul(ue,de),k=(k=Math.imul(ue,ye))+Math.imul(ie,de)|0,x=Math.imul(ie,ye),E=E+Math.imul(ee,_e)|0,k=(k=k+Math.imul(ee,Le)|0)+Math.imul(se,_e)|0,x=x+Math.imul(se,Le)|0,E=E+Math.imul(he,ze)|0,k=(k=k+Math.imul(he,Je)|0)+Math.imul(G,ze)|0,x=x+Math.imul(G,Je)|0,E=E+Math.imul(we,Fe)|0,k=(k=k+Math.imul(we,Ve)|0)+Math.imul(Se,Fe)|0,x=x+Math.imul(Se,Ve)|0,E=E+Math.imul(le,Ue)|0,k=(k=k+Math.imul(le,tt)|0)+Math.imul(Ce,Ue)|0,x=x+Math.imul(Ce,tt)|0,E=E+Math.imul(te,We)|0,k=(k=k+Math.imul(te,it)|0)+Math.imul(fe,We)|0,x=x+Math.imul(fe,it)|0,E=E+Math.imul(K,$e)|0,k=(k=k+Math.imul(K,ut)|0)+Math.imul(Y,$e)|0,x=x+Math.imul(Y,ut)|0,E=E+Math.imul(N,ne)|0,k=(k=k+Math.imul(N,ge)|0)+Math.imul(z,ne)|0,x=x+Math.imul(z,ge)|0,E=E+Math.imul($,Me)|0,k=(k=k+Math.imul($,Ae)|0)+Math.imul(L,Me)|0,x=x+Math.imul(L,Ae)|0;var ce=(F+(E=E+Math.imul(H,Pe)|0)|0)+((8191&(k=(k=k+Math.imul(H,Ge)|0)+Math.imul(V,Pe)|0))<<13)|0;F=((x=x+Math.imul(V,Ge)|0)+(k>>>13)|0)+(ce>>>26)|0,ce&=67108863,E=Math.imul(ue,_e),k=(k=Math.imul(ue,Le))+Math.imul(ie,_e)|0,x=Math.imul(ie,Le),E=E+Math.imul(ee,ze)|0,k=(k=k+Math.imul(ee,Je)|0)+Math.imul(se,ze)|0,x=x+Math.imul(se,Je)|0,E=E+Math.imul(he,Fe)|0,k=(k=k+Math.imul(he,Ve)|0)+Math.imul(G,Fe)|0,x=x+Math.imul(G,Ve)|0,E=E+Math.imul(we,Ue)|0,k=(k=k+Math.imul(we,tt)|0)+Math.imul(Se,Ue)|0,x=x+Math.imul(Se,tt)|0,E=E+Math.imul(le,We)|0,k=(k=k+Math.imul(le,it)|0)+Math.imul(Ce,We)|0,x=x+Math.imul(Ce,it)|0,E=E+Math.imul(te,$e)|0,k=(k=k+Math.imul(te,ut)|0)+Math.imul(fe,$e)|0,x=x+Math.imul(fe,ut)|0,E=E+Math.imul(K,ne)|0,k=(k=k+Math.imul(K,ge)|0)+Math.imul(Y,ne)|0,x=x+Math.imul(Y,ge)|0,E=E+Math.imul(N,Me)|0,k=(k=k+Math.imul(N,Ae)|0)+Math.imul(z,Me)|0,x=x+Math.imul(z,Ae)|0;var ve=(F+(E=E+Math.imul($,Pe)|0)|0)+((8191&(k=(k=k+Math.imul($,Ge)|0)+Math.imul(L,Pe)|0))<<13)|0;F=((x=x+Math.imul(L,Ge)|0)+(k>>>13)|0)+(ve>>>26)|0,ve&=67108863,E=Math.imul(ue,ze),k=(k=Math.imul(ue,Je))+Math.imul(ie,ze)|0,x=Math.imul(ie,Je),E=E+Math.imul(ee,Fe)|0,k=(k=k+Math.imul(ee,Ve)|0)+Math.imul(se,Fe)|0,x=x+Math.imul(se,Ve)|0,E=E+Math.imul(he,Ue)|0,k=(k=k+Math.imul(he,tt)|0)+Math.imul(G,Ue)|0,x=x+Math.imul(G,tt)|0,E=E+Math.imul(we,We)|0,k=(k=k+Math.imul(we,it)|0)+Math.imul(Se,We)|0,x=x+Math.imul(Se,it)|0,E=E+Math.imul(le,$e)|0,k=(k=k+Math.imul(le,ut)|0)+Math.imul(Ce,$e)|0,x=x+Math.imul(Ce,ut)|0,E=E+Math.imul(te,ne)|0,k=(k=k+Math.imul(te,ge)|0)+Math.imul(fe,ne)|0,x=x+Math.imul(fe,ge)|0,E=E+Math.imul(K,Me)|0,k=(k=k+Math.imul(K,Ae)|0)+Math.imul(Y,Me)|0,x=x+Math.imul(Y,Ae)|0;var ke=(F+(E=E+Math.imul(N,Pe)|0)|0)+((8191&(k=(k=k+Math.imul(N,Ge)|0)+Math.imul(z,Pe)|0))<<13)|0;F=((x=x+Math.imul(z,Ge)|0)+(k>>>13)|0)+(ke>>>26)|0,ke&=67108863,E=Math.imul(ue,Fe),k=(k=Math.imul(ue,Ve))+Math.imul(ie,Fe)|0,x=Math.imul(ie,Ve),E=E+Math.imul(ee,Ue)|0,k=(k=k+Math.imul(ee,tt)|0)+Math.imul(se,Ue)|0,x=x+Math.imul(se,tt)|0,E=E+Math.imul(he,We)|0,k=(k=k+Math.imul(he,it)|0)+Math.imul(G,We)|0,x=x+Math.imul(G,it)|0,E=E+Math.imul(we,$e)|0,k=(k=k+Math.imul(we,ut)|0)+Math.imul(Se,$e)|0,x=x+Math.imul(Se,ut)|0,E=E+Math.imul(le,ne)|0,k=(k=k+Math.imul(le,ge)|0)+Math.imul(Ce,ne)|0,x=x+Math.imul(Ce,ge)|0,E=E+Math.imul(te,Me)|0,k=(k=k+Math.imul(te,Ae)|0)+Math.imul(fe,Me)|0,x=x+Math.imul(fe,Ae)|0;var Ie=(F+(E=E+Math.imul(K,Pe)|0)|0)+((8191&(k=(k=k+Math.imul(K,Ge)|0)+Math.imul(Y,Pe)|0))<<13)|0;F=((x=x+Math.imul(Y,Ge)|0)+(k>>>13)|0)+(Ie>>>26)|0,Ie&=67108863,E=Math.imul(ue,Ue),k=(k=Math.imul(ue,tt))+Math.imul(ie,Ue)|0,x=Math.imul(ie,tt),E=E+Math.imul(ee,We)|0,k=(k=k+Math.imul(ee,it)|0)+Math.imul(se,We)|0,x=x+Math.imul(se,it)|0,E=E+Math.imul(he,$e)|0,k=(k=k+Math.imul(he,ut)|0)+Math.imul(G,$e)|0,x=x+Math.imul(G,ut)|0,E=E+Math.imul(we,ne)|0,k=(k=k+Math.imul(we,ge)|0)+Math.imul(Se,ne)|0,x=x+Math.imul(Se,ge)|0,E=E+Math.imul(le,Me)|0,k=(k=k+Math.imul(le,Ae)|0)+Math.imul(Ce,Me)|0,x=x+Math.imul(Ce,Ae)|0;var Oe=(F+(E=E+Math.imul(te,Pe)|0)|0)+((8191&(k=(k=k+Math.imul(te,Ge)|0)+Math.imul(fe,Pe)|0))<<13)|0;F=((x=x+Math.imul(fe,Ge)|0)+(k>>>13)|0)+(Oe>>>26)|0,Oe&=67108863,E=Math.imul(ue,We),k=(k=Math.imul(ue,it))+Math.imul(ie,We)|0,x=Math.imul(ie,it),E=E+Math.imul(ee,$e)|0,k=(k=k+Math.imul(ee,ut)|0)+Math.imul(se,$e)|0,x=x+Math.imul(se,ut)|0,E=E+Math.imul(he,ne)|0,k=(k=k+Math.imul(he,ge)|0)+Math.imul(G,ne)|0,x=x+Math.imul(G,ge)|0,E=E+Math.imul(we,Me)|0,k=(k=k+Math.imul(we,Ae)|0)+Math.imul(Se,Me)|0,x=x+Math.imul(Se,Ae)|0;var Ee=(F+(E=E+Math.imul(le,Pe)|0)|0)+((8191&(k=(k=k+Math.imul(le,Ge)|0)+Math.imul(Ce,Pe)|0))<<13)|0;F=((x=x+Math.imul(Ce,Ge)|0)+(k>>>13)|0)+(Ee>>>26)|0,Ee&=67108863,E=Math.imul(ue,$e),k=(k=Math.imul(ue,ut))+Math.imul(ie,$e)|0,x=Math.imul(ie,ut),E=E+Math.imul(ee,ne)|0,k=(k=k+Math.imul(ee,ge)|0)+Math.imul(se,ne)|0,x=x+Math.imul(se,ge)|0,E=E+Math.imul(he,Me)|0,k=(k=k+Math.imul(he,Ae)|0)+Math.imul(G,Me)|0,x=x+Math.imul(G,Ae)|0;var Ye=(F+(E=E+Math.imul(we,Pe)|0)|0)+((8191&(k=(k=k+Math.imul(we,Ge)|0)+Math.imul(Se,Pe)|0))<<13)|0;F=((x=x+Math.imul(Se,Ge)|0)+(k>>>13)|0)+(Ye>>>26)|0,Ye&=67108863,E=Math.imul(ue,ne),k=(k=Math.imul(ue,ge))+Math.imul(ie,ne)|0,x=Math.imul(ie,ge),E=E+Math.imul(ee,Me)|0,k=(k=k+Math.imul(ee,Ae)|0)+Math.imul(se,Me)|0,x=x+Math.imul(se,Ae)|0;var Ze=(F+(E=E+Math.imul(he,Pe)|0)|0)+((8191&(k=(k=k+Math.imul(he,Ge)|0)+Math.imul(G,Pe)|0))<<13)|0;F=((x=x+Math.imul(G,Ge)|0)+(k>>>13)|0)+(Ze>>>26)|0,Ze&=67108863,E=Math.imul(ue,Me),k=(k=Math.imul(ue,Ae))+Math.imul(ie,Me)|0,x=Math.imul(ie,Ae);var Ke=(F+(E=E+Math.imul(ee,Pe)|0)|0)+((8191&(k=(k=k+Math.imul(ee,Ge)|0)+Math.imul(se,Pe)|0))<<13)|0;F=((x=x+Math.imul(se,Ge)|0)+(k>>>13)|0)+(Ke>>>26)|0,Ke&=67108863;var Be=(F+(E=Math.imul(ue,Pe))|0)+((8191&(k=(k=Math.imul(ue,Ge))+Math.imul(ie,Pe)|0))<<13)|0;return F=((x=Math.imul(ie,Ge))+(k>>>13)|0)+(Be>>>26)|0,Be&=67108863,B[0]=Xe,B[1]=qe,B[2]=pt,B[3]=mt,B[4]=ct,B[5]=bt,B[6]=vt,B[7]=wt,B[8]=J,B[9]=ce,B[10]=ve,B[11]=ke,B[12]=Ie,B[13]=Oe,B[14]=Ee,B[15]=Ye,B[16]=Ze,B[17]=Ke,B[18]=Be,F!==0&&(B[19]=F,g.length++),g};function a(_,S,g){return new u().mulp(_,S,g)}function u(_,S){this.x=_,this.y=S}Math.imul||(n=o),f.prototype.mulTo=function(_,S){var g=this.length+_.length;return this.length===10&&_.length===10?n(this,_,S):g<63?o(this,_,S):g<1024?function(E,k,x){x.negative=k.negative^E.negative,x.length=E.length+k.length;for(var M=0,D=0,B=0;B>>26)|0)>>>26,F&=67108863}x.words[B]=U,M=F,F=D}return M!==0?x.words[B]=M:x.length--,x.strip()}(this,_,S):a(this,_,S)},u.prototype.makeRBT=function(_){for(var S=new Array(_),g=f.prototype._countBits(_)-1,E=0;E<_;E++)S[E]=this.revBin(E,g,_);return S},u.prototype.revBin=function(_,S,g){if(_===0||_===g-1)return _;for(var E=0,k=0;k>=1;return E},u.prototype.permute=function(_,S,g,E,k,x){for(var M=0;M>>=1)k++;return 1<>>=13,g[2*x+1]=8191&k,k>>>=13;for(x=2*S;x>=26,S+=E/67108864|0,S+=k>>>26,this.words[g]=67108863&k}return S!==0&&(this.words[g]=S,this.length++),this},f.prototype.muln=function(_){return this.clone().imuln(_)},f.prototype.sqr=function(){return this.mul(this)},f.prototype.isqr=function(){return this.imul(this.clone())},f.prototype.pow=function(_){var S=function(x){for(var M=new Array(x.bitLength()),D=0;D>>F}return M}(_);if(S.length===0)return new f(1);for(var g=this,E=0;E=0);var S,g=_%26,E=(_-g)/26,k=67108863>>>26-g<<26-g;if(g!==0){var x=0;for(S=0;S>>26-g}x&&(this.words[S]=x,this.length++)}if(E!==0){for(S=this.length-1;S>=0;S--)this.words[S+E]=this.words[S];for(S=0;S=0),E=S?(S-S%26)/26:0;var k=_%26,x=Math.min((_-k)/26,this.length),M=67108863^67108863>>>k<x)for(this.length-=x,B=0;B=0&&(F!==0||B>=E);B--){var U=0|this.words[B];this.words[B]=F<<26-k|U>>>k,F=U&M}return D&&F!==0&&(D.words[D.length++]=F),this.length===0&&(this.words[0]=0,this.length=1),this.strip()},f.prototype.ishrn=function(_,S,g){return d(this.negative===0),this.iushrn(_,S,g)},f.prototype.shln=function(_){return this.clone().ishln(_)},f.prototype.ushln=function(_){return this.clone().iushln(_)},f.prototype.shrn=function(_){return this.clone().ishrn(_)},f.prototype.ushrn=function(_){return this.clone().iushrn(_)},f.prototype.testn=function(_){d(typeof _=="number"&&_>=0);var S=_%26,g=(_-S)/26,E=1<=0);var S=_%26,g=(_-S)/26;if(d(this.negative===0,"imaskn works only with positive numbers"),this.length<=g)return this;if(S!==0&&g++,this.length=Math.min(g,this.length),S!==0){var E=67108863^67108863>>>S<=67108864;S++)this.words[S]-=67108864,S===this.length-1?this.words[S+1]=1:this.words[S+1]++;return this.length=Math.max(this.length,S+1),this},f.prototype.isubn=function(_){if(d(typeof _=="number"),d(_<67108864),_<0)return this.iaddn(-_);if(this.negative!==0)return this.negative=0,this.iaddn(_),this.negative=1,this;if(this.words[0]-=_,this.length===1&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var S=0;S>26)-(D/67108864|0),this.words[E+g]=67108863&k}for(;E>26,this.words[E+g]=67108863&k;if(M===0)return this.strip();for(d(M===-1),M=0,E=0;E>26,this.words[E]=67108863&k;return this.negative=1,this.strip()},f.prototype._wordDiv=function(_,S){var g=(this.length,_.length),E=this.clone(),k=_,x=0|k.words[k.length-1];(g=26-this._countBits(x))!==0&&(k=k.ushln(g),E.iushln(g),x=0|k.words[k.length-1]);var M,D=E.length-k.length;if(S!=="mod"){(M=new f(null)).length=D+1,M.words=new Array(M.length);for(var B=0;B=0;U--){var H=67108864*(0|E.words[k.length+U])+(0|E.words[k.length+U-1]);for(H=Math.min(H/x|0,67108863),E._ishlnsubmul(k,H,U);E.negative!==0;)H--,E.negative=0,E._ishlnsubmul(k,1,U),E.isZero()||(E.negative^=1);M&&(M.words[U]=H)}return M&&M.strip(),E.strip(),S!=="div"&&g!==0&&E.iushrn(g),{div:M||null,mod:E}},f.prototype.divmod=function(_,S,g){return d(!_.isZero()),this.isZero()?{div:new f(0),mod:new f(0)}:this.negative!==0&&_.negative===0?(x=this.neg().divmod(_,S),S!=="mod"&&(E=x.div.neg()),S!=="div"&&(k=x.mod.neg(),g&&k.negative!==0&&k.iadd(_)),{div:E,mod:k}):this.negative===0&&_.negative!==0?(x=this.divmod(_.neg(),S),S!=="mod"&&(E=x.div.neg()),{div:E,mod:x.mod}):this.negative&_.negative?(x=this.neg().divmod(_.neg(),S),S!=="div"&&(k=x.mod.neg(),g&&k.negative!==0&&k.isub(_)),{div:x.div,mod:k}):_.length>this.length||this.cmp(_)<0?{div:new f(0),mod:this}:_.length===1?S==="div"?{div:this.divn(_.words[0]),mod:null}:S==="mod"?{div:null,mod:new f(this.modn(_.words[0]))}:{div:this.divn(_.words[0]),mod:new f(this.modn(_.words[0]))}:this._wordDiv(_,S);var E,k,x},f.prototype.div=function(_){return this.divmod(_,"div",!1).div},f.prototype.mod=function(_){return this.divmod(_,"mod",!1).mod},f.prototype.umod=function(_){return this.divmod(_,"mod",!0).mod},f.prototype.divRound=function(_){var S=this.divmod(_);if(S.mod.isZero())return S.div;var g=S.div.negative!==0?S.mod.isub(_):S.mod,E=_.ushrn(1),k=_.andln(1),x=g.cmp(E);return x<0||k===1&&x===0?S.div:S.div.negative!==0?S.div.isubn(1):S.div.iaddn(1)},f.prototype.modn=function(_){d(_<=67108863);for(var S=(1<<26)%_,g=0,E=this.length-1;E>=0;E--)g=(S*g+(0|this.words[E]))%_;return g},f.prototype.idivn=function(_){d(_<=67108863);for(var S=0,g=this.length-1;g>=0;g--){var E=(0|this.words[g])+67108864*S;this.words[g]=E/_|0,S=E%_}return this.strip()},f.prototype.divn=function(_){return this.clone().idivn(_)},f.prototype.egcd=function(_){d(_.negative===0),d(!_.isZero());var S=this,g=_.clone();S=S.negative!==0?S.umod(_):S.clone();for(var E=new f(1),k=new f(0),x=new f(0),M=new f(1),D=0;S.isEven()&&g.isEven();)S.iushrn(1),g.iushrn(1),++D;for(var B=g.clone(),F=S.clone();!S.isZero();){for(var U=0,H=1;!(S.words[0]&H)&&U<26;++U,H<<=1);if(U>0)for(S.iushrn(U);U-- >0;)(E.isOdd()||k.isOdd())&&(E.iadd(B),k.isub(F)),E.iushrn(1),k.iushrn(1);for(var V=0,q=1;!(g.words[0]&q)&&V<26;++V,q<<=1);if(V>0)for(g.iushrn(V);V-- >0;)(x.isOdd()||M.isOdd())&&(x.iadd(B),M.isub(F)),x.iushrn(1),M.iushrn(1);S.cmp(g)>=0?(S.isub(g),E.isub(x),k.isub(M)):(g.isub(S),x.isub(E),M.isub(k))}return{a:x,b:M,gcd:g.iushln(D)}},f.prototype._invmp=function(_){d(_.negative===0),d(!_.isZero());var S=this,g=_.clone();S=S.negative!==0?S.umod(_):S.clone();for(var E,k=new f(1),x=new f(0),M=g.clone();S.cmpn(1)>0&&g.cmpn(1)>0;){for(var D=0,B=1;!(S.words[0]&B)&&D<26;++D,B<<=1);if(D>0)for(S.iushrn(D);D-- >0;)k.isOdd()&&k.iadd(M),k.iushrn(1);for(var F=0,U=1;!(g.words[0]&U)&&F<26;++F,U<<=1);if(F>0)for(g.iushrn(F);F-- >0;)x.isOdd()&&x.iadd(M),x.iushrn(1);S.cmp(g)>=0?(S.isub(g),k.isub(x)):(g.isub(S),x.isub(k))}return(E=S.cmpn(1)===0?k:x).cmpn(0)<0&&E.iadd(_),E},f.prototype.gcd=function(_){if(this.isZero())return _.abs();if(_.isZero())return this.abs();var S=this.clone(),g=_.clone();S.negative=0,g.negative=0;for(var E=0;S.isEven()&&g.isEven();E++)S.iushrn(1),g.iushrn(1);for(;;){for(;S.isEven();)S.iushrn(1);for(;g.isEven();)g.iushrn(1);var k=S.cmp(g);if(k<0){var x=S;S=g,g=x}else if(k===0||g.cmpn(1)===0)break;S.isub(g)}return g.iushln(E)},f.prototype.invm=function(_){return this.egcd(_).a.umod(_)},f.prototype.isEven=function(){return(1&this.words[0])==0},f.prototype.isOdd=function(){return(1&this.words[0])==1},f.prototype.andln=function(_){return this.words[0]&_},f.prototype.bincn=function(_){d(typeof _=="number");var S=_%26,g=(_-S)/26,E=1<>>26,M&=67108863,this.words[x]=M}return k!==0&&(this.words[x]=k,this.length++),this},f.prototype.isZero=function(){return this.length===1&&this.words[0]===0},f.prototype.cmpn=function(_){var S,g=_<0;if(this.negative!==0&&!g)return-1;if(this.negative===0&&g)return 1;if(this.strip(),this.length>1)S=1;else{g&&(_=-_),d(_<=67108863,"Number is too big");var E=0|this.words[0];S=E===_?0:E<_?-1:1}return this.negative!==0?0|-S:S},f.prototype.cmp=function(_){if(this.negative!==0&&_.negative===0)return-1;if(this.negative===0&&_.negative!==0)return 1;var S=this.ucmp(_);return this.negative!==0?0|-S:S},f.prototype.ucmp=function(_){if(this.length>_.length)return 1;if(this.length<_.length)return-1;for(var S=0,g=this.length-1;g>=0;g--){var E=0|this.words[g],k=0|_.words[g];if(E!==k){Ek&&(S=1);break}}return S},f.prototype.gtn=function(_){return this.cmpn(_)===1},f.prototype.gt=function(_){return this.cmp(_)===1},f.prototype.gten=function(_){return this.cmpn(_)>=0},f.prototype.gte=function(_){return this.cmp(_)>=0},f.prototype.ltn=function(_){return this.cmpn(_)===-1},f.prototype.lt=function(_){return this.cmp(_)===-1},f.prototype.lten=function(_){return this.cmpn(_)<=0},f.prototype.lte=function(_){return this.cmp(_)<=0},f.prototype.eqn=function(_){return this.cmpn(_)===0},f.prototype.eq=function(_){return this.cmp(_)===0},f.red=function(_){return new j(_)},f.prototype.toRed=function(_){return d(!this.red,"Already a number in reduction context"),d(this.negative===0,"red works only with positives"),_.convertTo(this)._forceRed(_)},f.prototype.fromRed=function(){return d(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},f.prototype._forceRed=function(_){return this.red=_,this},f.prototype.forceRed=function(_){return d(!this.red,"Already a number in reduction context"),this._forceRed(_)},f.prototype.redAdd=function(_){return d(this.red,"redAdd works only with red numbers"),this.red.add(this,_)},f.prototype.redIAdd=function(_){return d(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,_)},f.prototype.redSub=function(_){return d(this.red,"redSub works only with red numbers"),this.red.sub(this,_)},f.prototype.redISub=function(_){return d(this.red,"redISub works only with red numbers"),this.red.isub(this,_)},f.prototype.redShl=function(_){return d(this.red,"redShl works only with red numbers"),this.red.shl(this,_)},f.prototype.redMul=function(_){return d(this.red,"redMul works only with red numbers"),this.red._verify2(this,_),this.red.mul(this,_)},f.prototype.redIMul=function(_){return d(this.red,"redMul works only with red numbers"),this.red._verify2(this,_),this.red.imul(this,_)},f.prototype.redSqr=function(){return d(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},f.prototype.redISqr=function(){return d(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},f.prototype.redSqrt=function(){return d(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},f.prototype.redInvm=function(){return d(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},f.prototype.redNeg=function(){return d(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},f.prototype.redPow=function(_){return d(this.red&&!_.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,_)};var l={k256:null,p224:null,p192:null,p25519:null};function b(_,S){this.name=_,this.p=new f(S,16),this.n=this.p.bitLength(),this.k=new f(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function w(){b.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function C(){b.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function R(){b.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function A(){b.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function j(_){if(typeof _=="string"){var S=f._prime(_);this.m=S.p,this.prime=S}else d(_.gtn(1),"modulus must be greater than 1"),this.m=_,this.prime=null}function P(_){j.call(this,_),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new f(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}b.prototype._tmp=function(){var _=new f(null);return _.words=new Array(Math.ceil(this.n/13)),_},b.prototype.ireduce=function(_){var S,g=_;do this.split(g,this.tmp),S=(g=(g=this.imulK(g)).iadd(this.tmp)).bitLength();while(S>this.n);var E=S0?g.isub(this.p):g.strip!==void 0?g.strip():g._strip(),g},b.prototype.split=function(_,S){_.iushrn(this.n,0,S)},b.prototype.imulK=function(_){return _.imul(this.k)},m(w,b),w.prototype.split=function(_,S){for(var g=Math.min(_.length,9),E=0;E>>22,k=x}k>>>=22,_.words[E-10]=k,k===0&&_.length>10?_.length-=10:_.length-=9},w.prototype.imulK=function(_){_.words[_.length]=0,_.words[_.length+1]=0,_.length+=2;for(var S=0,g=0;g<_.length;g++){var E=0|_.words[g];S+=977*E,_.words[g]=67108863&S,S=64*E+(S/67108864|0)}return _.words[_.length-1]===0&&(_.length--,_.words[_.length-1]===0&&_.length--),_},m(C,b),m(R,b),m(A,b),A.prototype.imulK=function(_){for(var S=0,g=0;g<_.length;g++){var E=19*(0|_.words[g])+S,k=67108863&E;E>>>=26,_.words[g]=k,S=E}return S!==0&&(_.words[_.length++]=S),_},f._prime=function(_){if(l[_])return l[_];var S;if(_==="k256")S=new w;else if(_==="p224")S=new C;else if(_==="p192")S=new R;else{if(_!=="p25519")throw new Error("Unknown prime "+_);S=new A}return l[_]=S,S},j.prototype._verify1=function(_){d(_.negative===0,"red works only with positives"),d(_.red,"red works only with red numbers")},j.prototype._verify2=function(_,S){d((_.negative|S.negative)==0,"red works only with positives"),d(_.red&&_.red===S.red,"red works only with red numbers")},j.prototype.imod=function(_){return this.prime?this.prime.ireduce(_)._forceRed(this):_.umod(this.m)._forceRed(this)},j.prototype.neg=function(_){return _.isZero()?_.clone():this.m.sub(_)._forceRed(this)},j.prototype.add=function(_,S){this._verify2(_,S);var g=_.add(S);return g.cmp(this.m)>=0&&g.isub(this.m),g._forceRed(this)},j.prototype.iadd=function(_,S){this._verify2(_,S);var g=_.iadd(S);return g.cmp(this.m)>=0&&g.isub(this.m),g},j.prototype.sub=function(_,S){this._verify2(_,S);var g=_.sub(S);return g.cmpn(0)<0&&g.iadd(this.m),g._forceRed(this)},j.prototype.isub=function(_,S){this._verify2(_,S);var g=_.isub(S);return g.cmpn(0)<0&&g.iadd(this.m),g},j.prototype.shl=function(_,S){return this._verify1(_),this.imod(_.ushln(S))},j.prototype.imul=function(_,S){return this._verify2(_,S),this.imod(_.imul(S))},j.prototype.mul=function(_,S){return this._verify2(_,S),this.imod(_.mul(S))},j.prototype.isqr=function(_){return this.imul(_,_.clone())},j.prototype.sqr=function(_){return this.mul(_,_)},j.prototype.sqrt=function(_){if(_.isZero())return _.clone();var S=this.m.andln(3);if(d(S%2==1),S===3){var g=this.m.add(new f(1)).iushrn(2);return this.pow(_,g)}for(var E=this.m.subn(1),k=0;!E.isZero()&&E.andln(1)===0;)k++,E.iushrn(1);d(!E.isZero());var x=new f(1).toRed(this),M=x.redNeg(),D=this.m.subn(1).iushrn(1),B=this.m.bitLength();for(B=new f(2*B*B).toRed(this);this.pow(B,D).cmp(M)!==0;)B.redIAdd(M);for(var F=this.pow(B,E),U=this.pow(_,E.addn(1).iushrn(1)),H=this.pow(_,E),V=k;H.cmp(x)!==0;){for(var q=H,$=0;q.cmp(x)!==0;$++)q=q.redSqr();d($=0;E--){for(var B=S.words[E],F=D-1;F>=0;F--){var U=B>>F&1;k!==g[0]&&(k=this.sqr(k)),U!==0||x!==0?(x<<=1,x|=U,(++M===4||E===0&&F===0)&&(k=this.mul(k,g[x]),M=0,x=0)):M=0}D=26}return k},j.prototype.convertTo=function(_){var S=_.umod(this.m);return S===_?S.clone():S},j.prototype.convertFrom=function(_){var S=_.clone();return S.red=null,S},f.mont=function(_){return new P(_)},m(P,j),P.prototype.convertTo=function(_){return this.imod(_.ushln(this.shift))},P.prototype.convertFrom=function(_){var S=this.imod(_.mul(this.rinv));return S.red=null,S},P.prototype.imul=function(_,S){if(_.isZero()||S.isZero())return _.words[0]=0,_.length=1,_;var g=_.imul(S),E=g.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),k=g.isub(E).iushrn(this.shift),x=k;return k.cmp(this.m)>=0?x=k.isub(this.m):k.cmpn(0)<0&&(x=k.iadd(this.m)),x._forceRed(this)},P.prototype.mul=function(_,S){if(_.isZero()||S.isZero())return new f(0)._forceRed(this);var g=_.mul(S),E=g.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),k=g.isub(E).iushrn(this.shift),x=k;return k.cmp(this.m)>=0?x=k.isub(this.m):k.cmpn(0)<0&&(x=k.iadd(this.m)),x._forceRed(this)},P.prototype.invm=function(_){return this.imod(_._invmp(this.m).mul(this.r2))._forceRed(this)}})(T===void 0||T)},{buffer:185}],182:[function(c,T,O){O.byteLength=function(i){var e=h(i),t=e[0],r=e[1];return 3*(t+r)/4-r},O.toByteArray=function(i){var e,t,r=h(i),o=r[0],n=r[1],a=new v(function(b,w,C){return 3*(w+C)/4-C}(0,o,n)),u=0,l=n>0?o-4:o;for(t=0;t>16&255,a[u++]=e>>8&255,a[u++]=255&e;return n===2&&(e=p[i.charCodeAt(t)]<<2|p[i.charCodeAt(t+1)]>>4,a[u++]=255&e),n===1&&(e=p[i.charCodeAt(t)]<<10|p[i.charCodeAt(t+1)]<<4|p[i.charCodeAt(t+2)]>>2,a[u++]=e>>8&255,a[u++]=255&e),a},O.fromByteArray=function(i){for(var e,t=i.length,r=t%3,o=[],n=0,a=t-r;na?a:n+16383));return r===1?(e=i[t-1],o.push(y[e>>2]+y[e<<4&63]+"==")):r===2&&(e=(i[t-2]<<8)+i[t-1],o.push(y[e>>10]+y[e>>4&63]+y[e<<2&63]+"=")),o.join("")};for(var y=[],p=[],v=typeof Uint8Array<"u"?Uint8Array:Array,d="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",m=0,f=d.length;m0)throw new Error("Invalid string. Length must be a multiple of 4");var t=i.indexOf("=");return t===-1&&(t=e),[t,t===e?0:4-t%4]}function s(i,e,t){for(var r,o,n=[],a=e;a>18&63]+y[o>>12&63]+y[o>>6&63]+y[63&o]);return n.join("")}p["-".charCodeAt(0)]=62,p["_".charCodeAt(0)]=63},{}],183:[function(c,T,O){function y(p){return(y=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(v){return typeof v}:function(v){return v&&typeof Symbol=="function"&&v.constructor===Symbol&&v!==Symbol.prototype?"symbol":typeof v})(p)}(function(p,v){function d(g,E){if(!g)throw new Error(E||"Assertion failed")}function m(g,E){g.super_=E;var k=function(){};k.prototype=E.prototype,g.prototype=new k,g.prototype.constructor=g}function f(g,E,k){if(f.isBN(g))return g;this.negative=0,this.words=null,this.length=0,this.red=null,g!==null&&(E!=="le"&&E!=="be"||(k=E,E=10),this._init(g||0,E||10,k||"be"))}var h;y(p)==="object"?p.exports=f:(void 0).BN=f,f.BN=f,f.wordSize=26;try{h=c("buffer").Buffer}catch{}function s(g,E,k){for(var x=0,M=Math.min(g.length,k),D=0,B=E;B=49&&U<=54?U-49+10:U>=17&&U<=22?U-17+10:U,D|=F}return d(!(240&D),"Invalid character in "+g),x}function i(g,E,k,x){for(var M=0,D=0,B=Math.min(g.length,k),F=E;F=49?U-49+10:U>=17?U-17+10:U,d(U>=0&&D0?g:E},f.min=function(g,E){return g.cmp(E)<0?g:E},f.prototype._init=function(g,E,k){if(typeof g=="number")return this._initNumber(g,E,k);if(y(g)==="object")return this._initArray(g,E,k);E==="hex"&&(E=16),d(E===(0|E)&&E>=2&&E<=36);var x=0;(g=g.toString().replace(/\s+/g,""))[0]==="-"&&x++,E===16?this._parseHex(g,x):this._parseBase(g,E,x),g[0]==="-"&&(this.negative=1),this._strip(),k==="le"&&this._initArray(this.toArray(),E,k)},f.prototype._initNumber=function(g,E,k){g<0&&(this.negative=1,g=-g),g<67108864?(this.words=[67108863&g],this.length=1):g<4503599627370496?(this.words=[67108863&g,g/67108864&67108863],this.length=2):(d(g<9007199254740992),this.words=[67108863&g,g/67108864&67108863,1],this.length=3),k==="le"&&this._initArray(this.toArray(),E,k)},f.prototype._initArray=function(g,E,k){if(d(typeof g.length=="number"),g.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(g.length/3),this.words=new Array(this.length);for(var x=0;x=0;x-=3)D=g[x]|g[x-1]<<8|g[x-2]<<16,this.words[M]|=D<>>26-B&67108863,(B+=24)>=26&&(B-=26,M++);else if(k==="le")for(x=0,M=0;x>>26-B&67108863,(B+=24)>=26&&(B-=26,M++);return this._strip()},f.prototype._parseHex=function(g,E){this.length=Math.ceil((g.length-E)/6),this.words=new Array(this.length);for(var k=0;k=E;k-=6)M=s(g,k,k+6),this.words[x]|=M<>>26-D&4194303,(D+=24)>=26&&(D-=26,x++);k+6!==E&&(M=s(g,E,k+6),this.words[x]|=M<>>26-D&4194303),this._strip()},f.prototype._parseBase=function(g,E,k){this.words=[0],this.length=1;for(var x=0,M=1;M<=67108863;M*=E)x++;x--,M=M/E|0;for(var D=g.length-k,B=D%x,F=Math.min(D,D-B)+k,U=0,H=k;H1&&this.words[this.length-1]===0;)this.length--;return this._normSign()},f.prototype._normSign=function(){return this.length===1&&this.words[0]===0&&(this.negative=0),this},typeof Symbol<"u"&&typeof Symbol.for=="function")try{f.prototype[Symbol.for("nodejs.util.inspect.custom")]=t}catch{f.prototype.inspect=t}else f.prototype.inspect=t;function t(){return(this.red?""}var r=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],o=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],n=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];f.prototype.toString=function(g,E){var k;if(E=0|E||1,(g=g||10)===16||g==="hex"){k="";for(var x=0,M=0,D=0;D>>24-x&16777215)!==0||D!==this.length-1?r[6-F.length]+F+k:F+k,(x+=2)>=26&&(x-=26,D--)}for(M!==0&&(k=M.toString(16)+k);k.length%E!=0;)k="0"+k;return this.negative!==0&&(k="-"+k),k}if(g===(0|g)&&g>=2&&g<=36){var U=o[g],H=n[g];k="";var V=this.clone();for(V.negative=0;!V.isZero();){var q=V.modrn(H).toString(g);k=(V=V.idivn(H)).isZero()?q+k:r[U-q.length]+q+k}for(this.isZero()&&(k="0"+k);k.length%E!=0;)k="0"+k;return this.negative!==0&&(k="-"+k),k}d(!1,"Base should be between 2 and 36")},f.prototype.toNumber=function(){var g=this.words[0];return this.length===2?g+=67108864*this.words[1]:this.length===3&&this.words[2]===1?g+=4503599627370496+67108864*this.words[1]:this.length>2&&d(!1,"Number can only safely store up to 53 bits"),this.negative!==0?-g:g},f.prototype.toJSON=function(){return this.toString(16,2)},h&&(f.prototype.toBuffer=function(g,E){return this.toArrayLike(h,g,E)}),f.prototype.toArray=function(g,E){return this.toArrayLike(Array,g,E)};function a(g,E,k){k.negative=E.negative^g.negative;var x=g.length+E.length|0;k.length=x,x=x-1|0;var M=0|g.words[0],D=0|E.words[0],B=M*D,F=67108863&B,U=B/67108864|0;k.words[0]=F;for(var H=1;H>>26,q=67108863&U,$=Math.min(H,E.length-1),L=Math.max(0,H-g.length+1);L<=$;L++){var I=H-L|0;V+=(B=(M=0|g.words[I])*(D=0|E.words[L])+q)/67108864|0,q=67108863&B}k.words[H]=0|q,U=0|V}return U!==0?k.words[H]=0|U:k.length--,k._strip()}f.prototype.toArrayLike=function(g,E,k){this._strip();var x=this.byteLength(),M=k||Math.max(1,x);d(x<=M,"byte array longer than desired length"),d(M>0,"Requested array length <= 0");var D=function(B,F){return B.allocUnsafe?B.allocUnsafe(F):new B(F)}(g,M);return this["_toArrayLike"+(E==="le"?"LE":"BE")](D,x),D},f.prototype._toArrayLikeLE=function(g,E){for(var k=0,x=0,M=0,D=0;M>8&255),k>16&255),D===6?(k>24&255),x=0,D=0):(x=B>>>24,D+=2)}if(k=0&&(g[k--]=B>>8&255),k>=0&&(g[k--]=B>>16&255),D===6?(k>=0&&(g[k--]=B>>24&255),x=0,D=0):(x=B>>>24,D+=2)}if(k>=0)for(g[k--]=x;k>=0;)g[k--]=0},Math.clz32?f.prototype._countBits=function(g){return 32-Math.clz32(g)}:f.prototype._countBits=function(g){var E=g,k=0;return E>=4096&&(k+=13,E>>>=13),E>=64&&(k+=7,E>>>=7),E>=8&&(k+=4,E>>>=4),E>=2&&(k+=2,E>>>=2),k+E},f.prototype._zeroBits=function(g){if(g===0)return 26;var E=g,k=0;return!(8191&E)&&(k+=13,E>>>=13),!(127&E)&&(k+=7,E>>>=7),!(15&E)&&(k+=4,E>>>=4),!(3&E)&&(k+=2,E>>>=2),!(1&E)&&k++,k},f.prototype.bitLength=function(){var g=this.words[this.length-1],E=this._countBits(g);return 26*(this.length-1)+E},f.prototype.zeroBits=function(){if(this.isZero())return 0;for(var g=0,E=0;Eg.length?this.clone().ior(g):g.clone().ior(this)},f.prototype.uor=function(g){return this.length>g.length?this.clone().iuor(g):g.clone().iuor(this)},f.prototype.iuand=function(g){var E;E=this.length>g.length?g:this;for(var k=0;kg.length?this.clone().iand(g):g.clone().iand(this)},f.prototype.uand=function(g){return this.length>g.length?this.clone().iuand(g):g.clone().iuand(this)},f.prototype.iuxor=function(g){var E,k;this.length>g.length?(E=this,k=g):(E=g,k=this);for(var x=0;xg.length?this.clone().ixor(g):g.clone().ixor(this)},f.prototype.uxor=function(g){return this.length>g.length?this.clone().iuxor(g):g.clone().iuxor(this)},f.prototype.inotn=function(g){d(typeof g=="number"&&g>=0);var E=0|Math.ceil(g/26),k=g%26;this._expand(E),k>0&&E--;for(var x=0;x0&&(this.words[x]=~this.words[x]&67108863>>26-k),this._strip()},f.prototype.notn=function(g){return this.clone().inotn(g)},f.prototype.setn=function(g,E){d(typeof g=="number"&&g>=0);var k=g/26|0,x=g%26;return this._expand(k+1),this.words[k]=E?this.words[k]|1<g.length?(k=this,x=g):(k=g,x=this);for(var M=0,D=0;D>>26;for(;M!==0&&D>>26;if(this.length=k.length,M!==0)this.words[this.length]=M,this.length++;else if(k!==this)for(;Dg.length?this.clone().iadd(g):g.clone().iadd(this)},f.prototype.isub=function(g){if(g.negative!==0){g.negative=0;var E=this.iadd(g);return g.negative=1,E._normSign()}if(this.negative!==0)return this.negative=0,this.iadd(g),this.negative=1,this._normSign();var k,x,M=this.cmp(g);if(M===0)return this.negative=0,this.length=1,this.words[0]=0,this;M>0?(k=this,x=g):(k=g,x=this);for(var D=0,B=0;B>26,this.words[B]=67108863&E;for(;D!==0&&B>26,this.words[B]=67108863&E;if(D===0&&B>>13,L=0|B[1],I=8191&L,N=L>>>13,z=0|B[2],W=8191&z,K=z>>>13,Y=0|B[3],ae=8191&Y,te=Y>>>13,fe=0|B[4],me=8191&fe,le=fe>>>13,Ce=0|B[5],xe=8191&Ce,we=Ce>>>13,Se=0|B[6],Te=8191&Se,he=Se>>>13,G=0|B[7],re=8191&G,ee=G>>>13,se=0|B[8],oe=8191&se,ue=se>>>13,ie=0|B[9],pe=8191&ie,de=ie>>>13,ye=0|F[0],je=8191&ye,_e=ye>>>13,Le=0|F[1],Ne=8191&Le,ze=Le>>>13,Je=0|F[2],ot=8191&Je,Fe=Je>>>13,Ve=0|F[3],be=8191&Ve,Ue=Ve>>>13,tt=0|F[4],Qe=8191&tt,We=tt>>>13,it=0|F[5],nt=8191&it,$e=it>>>13,ut=0|F[6],Q=8191&ut,ne=ut>>>13,ge=0|F[7],Re=8191&ge,Me=ge>>>13,Ae=0|F[8],He=8191&Ae,Pe=Ae>>>13,Ge=0|F[9],Xe=8191&Ge,qe=Ge>>>13;k.negative=g.negative^E.negative,k.length=19;var pt=(H+(x=Math.imul(q,je))|0)+((8191&(M=(M=Math.imul(q,_e))+Math.imul($,je)|0))<<13)|0;H=((D=Math.imul($,_e))+(M>>>13)|0)+(pt>>>26)|0,pt&=67108863,x=Math.imul(I,je),M=(M=Math.imul(I,_e))+Math.imul(N,je)|0,D=Math.imul(N,_e);var mt=(H+(x=x+Math.imul(q,Ne)|0)|0)+((8191&(M=(M=M+Math.imul(q,ze)|0)+Math.imul($,Ne)|0))<<13)|0;H=((D=D+Math.imul($,ze)|0)+(M>>>13)|0)+(mt>>>26)|0,mt&=67108863,x=Math.imul(W,je),M=(M=Math.imul(W,_e))+Math.imul(K,je)|0,D=Math.imul(K,_e),x=x+Math.imul(I,Ne)|0,M=(M=M+Math.imul(I,ze)|0)+Math.imul(N,Ne)|0,D=D+Math.imul(N,ze)|0;var ct=(H+(x=x+Math.imul(q,ot)|0)|0)+((8191&(M=(M=M+Math.imul(q,Fe)|0)+Math.imul($,ot)|0))<<13)|0;H=((D=D+Math.imul($,Fe)|0)+(M>>>13)|0)+(ct>>>26)|0,ct&=67108863,x=Math.imul(ae,je),M=(M=Math.imul(ae,_e))+Math.imul(te,je)|0,D=Math.imul(te,_e),x=x+Math.imul(W,Ne)|0,M=(M=M+Math.imul(W,ze)|0)+Math.imul(K,Ne)|0,D=D+Math.imul(K,ze)|0,x=x+Math.imul(I,ot)|0,M=(M=M+Math.imul(I,Fe)|0)+Math.imul(N,ot)|0,D=D+Math.imul(N,Fe)|0;var bt=(H+(x=x+Math.imul(q,be)|0)|0)+((8191&(M=(M=M+Math.imul(q,Ue)|0)+Math.imul($,be)|0))<<13)|0;H=((D=D+Math.imul($,Ue)|0)+(M>>>13)|0)+(bt>>>26)|0,bt&=67108863,x=Math.imul(me,je),M=(M=Math.imul(me,_e))+Math.imul(le,je)|0,D=Math.imul(le,_e),x=x+Math.imul(ae,Ne)|0,M=(M=M+Math.imul(ae,ze)|0)+Math.imul(te,Ne)|0,D=D+Math.imul(te,ze)|0,x=x+Math.imul(W,ot)|0,M=(M=M+Math.imul(W,Fe)|0)+Math.imul(K,ot)|0,D=D+Math.imul(K,Fe)|0,x=x+Math.imul(I,be)|0,M=(M=M+Math.imul(I,Ue)|0)+Math.imul(N,be)|0,D=D+Math.imul(N,Ue)|0;var vt=(H+(x=x+Math.imul(q,Qe)|0)|0)+((8191&(M=(M=M+Math.imul(q,We)|0)+Math.imul($,Qe)|0))<<13)|0;H=((D=D+Math.imul($,We)|0)+(M>>>13)|0)+(vt>>>26)|0,vt&=67108863,x=Math.imul(xe,je),M=(M=Math.imul(xe,_e))+Math.imul(we,je)|0,D=Math.imul(we,_e),x=x+Math.imul(me,Ne)|0,M=(M=M+Math.imul(me,ze)|0)+Math.imul(le,Ne)|0,D=D+Math.imul(le,ze)|0,x=x+Math.imul(ae,ot)|0,M=(M=M+Math.imul(ae,Fe)|0)+Math.imul(te,ot)|0,D=D+Math.imul(te,Fe)|0,x=x+Math.imul(W,be)|0,M=(M=M+Math.imul(W,Ue)|0)+Math.imul(K,be)|0,D=D+Math.imul(K,Ue)|0,x=x+Math.imul(I,Qe)|0,M=(M=M+Math.imul(I,We)|0)+Math.imul(N,Qe)|0,D=D+Math.imul(N,We)|0;var wt=(H+(x=x+Math.imul(q,nt)|0)|0)+((8191&(M=(M=M+Math.imul(q,$e)|0)+Math.imul($,nt)|0))<<13)|0;H=((D=D+Math.imul($,$e)|0)+(M>>>13)|0)+(wt>>>26)|0,wt&=67108863,x=Math.imul(Te,je),M=(M=Math.imul(Te,_e))+Math.imul(he,je)|0,D=Math.imul(he,_e),x=x+Math.imul(xe,Ne)|0,M=(M=M+Math.imul(xe,ze)|0)+Math.imul(we,Ne)|0,D=D+Math.imul(we,ze)|0,x=x+Math.imul(me,ot)|0,M=(M=M+Math.imul(me,Fe)|0)+Math.imul(le,ot)|0,D=D+Math.imul(le,Fe)|0,x=x+Math.imul(ae,be)|0,M=(M=M+Math.imul(ae,Ue)|0)+Math.imul(te,be)|0,D=D+Math.imul(te,Ue)|0,x=x+Math.imul(W,Qe)|0,M=(M=M+Math.imul(W,We)|0)+Math.imul(K,Qe)|0,D=D+Math.imul(K,We)|0,x=x+Math.imul(I,nt)|0,M=(M=M+Math.imul(I,$e)|0)+Math.imul(N,nt)|0,D=D+Math.imul(N,$e)|0;var J=(H+(x=x+Math.imul(q,Q)|0)|0)+((8191&(M=(M=M+Math.imul(q,ne)|0)+Math.imul($,Q)|0))<<13)|0;H=((D=D+Math.imul($,ne)|0)+(M>>>13)|0)+(J>>>26)|0,J&=67108863,x=Math.imul(re,je),M=(M=Math.imul(re,_e))+Math.imul(ee,je)|0,D=Math.imul(ee,_e),x=x+Math.imul(Te,Ne)|0,M=(M=M+Math.imul(Te,ze)|0)+Math.imul(he,Ne)|0,D=D+Math.imul(he,ze)|0,x=x+Math.imul(xe,ot)|0,M=(M=M+Math.imul(xe,Fe)|0)+Math.imul(we,ot)|0,D=D+Math.imul(we,Fe)|0,x=x+Math.imul(me,be)|0,M=(M=M+Math.imul(me,Ue)|0)+Math.imul(le,be)|0,D=D+Math.imul(le,Ue)|0,x=x+Math.imul(ae,Qe)|0,M=(M=M+Math.imul(ae,We)|0)+Math.imul(te,Qe)|0,D=D+Math.imul(te,We)|0,x=x+Math.imul(W,nt)|0,M=(M=M+Math.imul(W,$e)|0)+Math.imul(K,nt)|0,D=D+Math.imul(K,$e)|0,x=x+Math.imul(I,Q)|0,M=(M=M+Math.imul(I,ne)|0)+Math.imul(N,Q)|0,D=D+Math.imul(N,ne)|0;var ce=(H+(x=x+Math.imul(q,Re)|0)|0)+((8191&(M=(M=M+Math.imul(q,Me)|0)+Math.imul($,Re)|0))<<13)|0;H=((D=D+Math.imul($,Me)|0)+(M>>>13)|0)+(ce>>>26)|0,ce&=67108863,x=Math.imul(oe,je),M=(M=Math.imul(oe,_e))+Math.imul(ue,je)|0,D=Math.imul(ue,_e),x=x+Math.imul(re,Ne)|0,M=(M=M+Math.imul(re,ze)|0)+Math.imul(ee,Ne)|0,D=D+Math.imul(ee,ze)|0,x=x+Math.imul(Te,ot)|0,M=(M=M+Math.imul(Te,Fe)|0)+Math.imul(he,ot)|0,D=D+Math.imul(he,Fe)|0,x=x+Math.imul(xe,be)|0,M=(M=M+Math.imul(xe,Ue)|0)+Math.imul(we,be)|0,D=D+Math.imul(we,Ue)|0,x=x+Math.imul(me,Qe)|0,M=(M=M+Math.imul(me,We)|0)+Math.imul(le,Qe)|0,D=D+Math.imul(le,We)|0,x=x+Math.imul(ae,nt)|0,M=(M=M+Math.imul(ae,$e)|0)+Math.imul(te,nt)|0,D=D+Math.imul(te,$e)|0,x=x+Math.imul(W,Q)|0,M=(M=M+Math.imul(W,ne)|0)+Math.imul(K,Q)|0,D=D+Math.imul(K,ne)|0,x=x+Math.imul(I,Re)|0,M=(M=M+Math.imul(I,Me)|0)+Math.imul(N,Re)|0,D=D+Math.imul(N,Me)|0;var ve=(H+(x=x+Math.imul(q,He)|0)|0)+((8191&(M=(M=M+Math.imul(q,Pe)|0)+Math.imul($,He)|0))<<13)|0;H=((D=D+Math.imul($,Pe)|0)+(M>>>13)|0)+(ve>>>26)|0,ve&=67108863,x=Math.imul(pe,je),M=(M=Math.imul(pe,_e))+Math.imul(de,je)|0,D=Math.imul(de,_e),x=x+Math.imul(oe,Ne)|0,M=(M=M+Math.imul(oe,ze)|0)+Math.imul(ue,Ne)|0,D=D+Math.imul(ue,ze)|0,x=x+Math.imul(re,ot)|0,M=(M=M+Math.imul(re,Fe)|0)+Math.imul(ee,ot)|0,D=D+Math.imul(ee,Fe)|0,x=x+Math.imul(Te,be)|0,M=(M=M+Math.imul(Te,Ue)|0)+Math.imul(he,be)|0,D=D+Math.imul(he,Ue)|0,x=x+Math.imul(xe,Qe)|0,M=(M=M+Math.imul(xe,We)|0)+Math.imul(we,Qe)|0,D=D+Math.imul(we,We)|0,x=x+Math.imul(me,nt)|0,M=(M=M+Math.imul(me,$e)|0)+Math.imul(le,nt)|0,D=D+Math.imul(le,$e)|0,x=x+Math.imul(ae,Q)|0,M=(M=M+Math.imul(ae,ne)|0)+Math.imul(te,Q)|0,D=D+Math.imul(te,ne)|0,x=x+Math.imul(W,Re)|0,M=(M=M+Math.imul(W,Me)|0)+Math.imul(K,Re)|0,D=D+Math.imul(K,Me)|0,x=x+Math.imul(I,He)|0,M=(M=M+Math.imul(I,Pe)|0)+Math.imul(N,He)|0,D=D+Math.imul(N,Pe)|0;var ke=(H+(x=x+Math.imul(q,Xe)|0)|0)+((8191&(M=(M=M+Math.imul(q,qe)|0)+Math.imul($,Xe)|0))<<13)|0;H=((D=D+Math.imul($,qe)|0)+(M>>>13)|0)+(ke>>>26)|0,ke&=67108863,x=Math.imul(pe,Ne),M=(M=Math.imul(pe,ze))+Math.imul(de,Ne)|0,D=Math.imul(de,ze),x=x+Math.imul(oe,ot)|0,M=(M=M+Math.imul(oe,Fe)|0)+Math.imul(ue,ot)|0,D=D+Math.imul(ue,Fe)|0,x=x+Math.imul(re,be)|0,M=(M=M+Math.imul(re,Ue)|0)+Math.imul(ee,be)|0,D=D+Math.imul(ee,Ue)|0,x=x+Math.imul(Te,Qe)|0,M=(M=M+Math.imul(Te,We)|0)+Math.imul(he,Qe)|0,D=D+Math.imul(he,We)|0,x=x+Math.imul(xe,nt)|0,M=(M=M+Math.imul(xe,$e)|0)+Math.imul(we,nt)|0,D=D+Math.imul(we,$e)|0,x=x+Math.imul(me,Q)|0,M=(M=M+Math.imul(me,ne)|0)+Math.imul(le,Q)|0,D=D+Math.imul(le,ne)|0,x=x+Math.imul(ae,Re)|0,M=(M=M+Math.imul(ae,Me)|0)+Math.imul(te,Re)|0,D=D+Math.imul(te,Me)|0,x=x+Math.imul(W,He)|0,M=(M=M+Math.imul(W,Pe)|0)+Math.imul(K,He)|0,D=D+Math.imul(K,Pe)|0;var Ie=(H+(x=x+Math.imul(I,Xe)|0)|0)+((8191&(M=(M=M+Math.imul(I,qe)|0)+Math.imul(N,Xe)|0))<<13)|0;H=((D=D+Math.imul(N,qe)|0)+(M>>>13)|0)+(Ie>>>26)|0,Ie&=67108863,x=Math.imul(pe,ot),M=(M=Math.imul(pe,Fe))+Math.imul(de,ot)|0,D=Math.imul(de,Fe),x=x+Math.imul(oe,be)|0,M=(M=M+Math.imul(oe,Ue)|0)+Math.imul(ue,be)|0,D=D+Math.imul(ue,Ue)|0,x=x+Math.imul(re,Qe)|0,M=(M=M+Math.imul(re,We)|0)+Math.imul(ee,Qe)|0,D=D+Math.imul(ee,We)|0,x=x+Math.imul(Te,nt)|0,M=(M=M+Math.imul(Te,$e)|0)+Math.imul(he,nt)|0,D=D+Math.imul(he,$e)|0,x=x+Math.imul(xe,Q)|0,M=(M=M+Math.imul(xe,ne)|0)+Math.imul(we,Q)|0,D=D+Math.imul(we,ne)|0,x=x+Math.imul(me,Re)|0,M=(M=M+Math.imul(me,Me)|0)+Math.imul(le,Re)|0,D=D+Math.imul(le,Me)|0,x=x+Math.imul(ae,He)|0,M=(M=M+Math.imul(ae,Pe)|0)+Math.imul(te,He)|0,D=D+Math.imul(te,Pe)|0;var Oe=(H+(x=x+Math.imul(W,Xe)|0)|0)+((8191&(M=(M=M+Math.imul(W,qe)|0)+Math.imul(K,Xe)|0))<<13)|0;H=((D=D+Math.imul(K,qe)|0)+(M>>>13)|0)+(Oe>>>26)|0,Oe&=67108863,x=Math.imul(pe,be),M=(M=Math.imul(pe,Ue))+Math.imul(de,be)|0,D=Math.imul(de,Ue),x=x+Math.imul(oe,Qe)|0,M=(M=M+Math.imul(oe,We)|0)+Math.imul(ue,Qe)|0,D=D+Math.imul(ue,We)|0,x=x+Math.imul(re,nt)|0,M=(M=M+Math.imul(re,$e)|0)+Math.imul(ee,nt)|0,D=D+Math.imul(ee,$e)|0,x=x+Math.imul(Te,Q)|0,M=(M=M+Math.imul(Te,ne)|0)+Math.imul(he,Q)|0,D=D+Math.imul(he,ne)|0,x=x+Math.imul(xe,Re)|0,M=(M=M+Math.imul(xe,Me)|0)+Math.imul(we,Re)|0,D=D+Math.imul(we,Me)|0,x=x+Math.imul(me,He)|0,M=(M=M+Math.imul(me,Pe)|0)+Math.imul(le,He)|0,D=D+Math.imul(le,Pe)|0;var Ee=(H+(x=x+Math.imul(ae,Xe)|0)|0)+((8191&(M=(M=M+Math.imul(ae,qe)|0)+Math.imul(te,Xe)|0))<<13)|0;H=((D=D+Math.imul(te,qe)|0)+(M>>>13)|0)+(Ee>>>26)|0,Ee&=67108863,x=Math.imul(pe,Qe),M=(M=Math.imul(pe,We))+Math.imul(de,Qe)|0,D=Math.imul(de,We),x=x+Math.imul(oe,nt)|0,M=(M=M+Math.imul(oe,$e)|0)+Math.imul(ue,nt)|0,D=D+Math.imul(ue,$e)|0,x=x+Math.imul(re,Q)|0,M=(M=M+Math.imul(re,ne)|0)+Math.imul(ee,Q)|0,D=D+Math.imul(ee,ne)|0,x=x+Math.imul(Te,Re)|0,M=(M=M+Math.imul(Te,Me)|0)+Math.imul(he,Re)|0,D=D+Math.imul(he,Me)|0,x=x+Math.imul(xe,He)|0,M=(M=M+Math.imul(xe,Pe)|0)+Math.imul(we,He)|0,D=D+Math.imul(we,Pe)|0;var Ye=(H+(x=x+Math.imul(me,Xe)|0)|0)+((8191&(M=(M=M+Math.imul(me,qe)|0)+Math.imul(le,Xe)|0))<<13)|0;H=((D=D+Math.imul(le,qe)|0)+(M>>>13)|0)+(Ye>>>26)|0,Ye&=67108863,x=Math.imul(pe,nt),M=(M=Math.imul(pe,$e))+Math.imul(de,nt)|0,D=Math.imul(de,$e),x=x+Math.imul(oe,Q)|0,M=(M=M+Math.imul(oe,ne)|0)+Math.imul(ue,Q)|0,D=D+Math.imul(ue,ne)|0,x=x+Math.imul(re,Re)|0,M=(M=M+Math.imul(re,Me)|0)+Math.imul(ee,Re)|0,D=D+Math.imul(ee,Me)|0,x=x+Math.imul(Te,He)|0,M=(M=M+Math.imul(Te,Pe)|0)+Math.imul(he,He)|0,D=D+Math.imul(he,Pe)|0;var Ze=(H+(x=x+Math.imul(xe,Xe)|0)|0)+((8191&(M=(M=M+Math.imul(xe,qe)|0)+Math.imul(we,Xe)|0))<<13)|0;H=((D=D+Math.imul(we,qe)|0)+(M>>>13)|0)+(Ze>>>26)|0,Ze&=67108863,x=Math.imul(pe,Q),M=(M=Math.imul(pe,ne))+Math.imul(de,Q)|0,D=Math.imul(de,ne),x=x+Math.imul(oe,Re)|0,M=(M=M+Math.imul(oe,Me)|0)+Math.imul(ue,Re)|0,D=D+Math.imul(ue,Me)|0,x=x+Math.imul(re,He)|0,M=(M=M+Math.imul(re,Pe)|0)+Math.imul(ee,He)|0,D=D+Math.imul(ee,Pe)|0;var Ke=(H+(x=x+Math.imul(Te,Xe)|0)|0)+((8191&(M=(M=M+Math.imul(Te,qe)|0)+Math.imul(he,Xe)|0))<<13)|0;H=((D=D+Math.imul(he,qe)|0)+(M>>>13)|0)+(Ke>>>26)|0,Ke&=67108863,x=Math.imul(pe,Re),M=(M=Math.imul(pe,Me))+Math.imul(de,Re)|0,D=Math.imul(de,Me),x=x+Math.imul(oe,He)|0,M=(M=M+Math.imul(oe,Pe)|0)+Math.imul(ue,He)|0,D=D+Math.imul(ue,Pe)|0;var Be=(H+(x=x+Math.imul(re,Xe)|0)|0)+((8191&(M=(M=M+Math.imul(re,qe)|0)+Math.imul(ee,Xe)|0))<<13)|0;H=((D=D+Math.imul(ee,qe)|0)+(M>>>13)|0)+(Be>>>26)|0,Be&=67108863,x=Math.imul(pe,He),M=(M=Math.imul(pe,Pe))+Math.imul(de,He)|0,D=Math.imul(de,Pe);var ft=(H+(x=x+Math.imul(oe,Xe)|0)|0)+((8191&(M=(M=M+Math.imul(oe,qe)|0)+Math.imul(ue,Xe)|0))<<13)|0;H=((D=D+Math.imul(ue,qe)|0)+(M>>>13)|0)+(ft>>>26)|0,ft&=67108863;var lt=(H+(x=Math.imul(pe,Xe))|0)+((8191&(M=(M=Math.imul(pe,qe))+Math.imul(de,Xe)|0))<<13)|0;return H=((D=Math.imul(de,qe))+(M>>>13)|0)+(lt>>>26)|0,lt&=67108863,U[0]=pt,U[1]=mt,U[2]=ct,U[3]=bt,U[4]=vt,U[5]=wt,U[6]=J,U[7]=ce,U[8]=ve,U[9]=ke,U[10]=Ie,U[11]=Oe,U[12]=Ee,U[13]=Ye,U[14]=Ze,U[15]=Ke,U[16]=Be,U[17]=ft,U[18]=lt,H!==0&&(U[19]=H,k.length++),k};function l(g,E,k){k.negative=E.negative^g.negative,k.length=g.length+E.length;for(var x=0,M=0,D=0;D>>26)|0)>>>26,B&=67108863}k.words[D]=F,x=B,B=M}return x!==0?k.words[D]=x:k.length--,k._strip()}function b(g,E,k){return l(g,E,k)}Math.imul||(u=a),f.prototype.mulTo=function(g,E){var k=this.length+g.length;return this.length===10&&g.length===10?u(this,g,E):k<63?a(this,g,E):k<1024?l(this,g,E):b(this,g,E)},f.prototype.mul=function(g){var E=new f(null);return E.words=new Array(this.length+g.length),this.mulTo(g,E)},f.prototype.mulf=function(g){var E=new f(null);return E.words=new Array(this.length+g.length),b(this,g,E)},f.prototype.imul=function(g){return this.clone().mulTo(g,this)},f.prototype.imuln=function(g){var E=g<0;E&&(g=-g),d(typeof g=="number"),d(g<67108864);for(var k=0,x=0;x>=26,k+=M/67108864|0,k+=D>>>26,this.words[x]=67108863&D}return k!==0&&(this.words[x]=k,this.length++),E?this.ineg():this},f.prototype.muln=function(g){return this.clone().imuln(g)},f.prototype.sqr=function(){return this.mul(this)},f.prototype.isqr=function(){return this.imul(this.clone())},f.prototype.pow=function(g){var E=function(D){for(var B=new Array(D.bitLength()),F=0;F>>H&1}return B}(g);if(E.length===0)return new f(1);for(var k=this,x=0;x=0);var E,k=g%26,x=(g-k)/26,M=67108863>>>26-k<<26-k;if(k!==0){var D=0;for(E=0;E>>26-k}D&&(this.words[E]=D,this.length++)}if(x!==0){for(E=this.length-1;E>=0;E--)this.words[E+x]=this.words[E];for(E=0;E=0),x=E?(E-E%26)/26:0;var M=g%26,D=Math.min((g-M)/26,this.length),B=67108863^67108863>>>M<D)for(this.length-=D,U=0;U=0&&(H!==0||U>=x);U--){var V=0|this.words[U];this.words[U]=H<<26-M|V>>>M,H=V&B}return F&&H!==0&&(F.words[F.length++]=H),this.length===0&&(this.words[0]=0,this.length=1),this._strip()},f.prototype.ishrn=function(g,E,k){return d(this.negative===0),this.iushrn(g,E,k)},f.prototype.shln=function(g){return this.clone().ishln(g)},f.prototype.ushln=function(g){return this.clone().iushln(g)},f.prototype.shrn=function(g){return this.clone().ishrn(g)},f.prototype.ushrn=function(g){return this.clone().iushrn(g)},f.prototype.testn=function(g){d(typeof g=="number"&&g>=0);var E=g%26,k=(g-E)/26,x=1<=0);var E=g%26,k=(g-E)/26;if(d(this.negative===0,"imaskn works only with positive numbers"),this.length<=k)return this;if(E!==0&&k++,this.length=Math.min(k,this.length),E!==0){var x=67108863^67108863>>>E<=67108864;E++)this.words[E]-=67108864,E===this.length-1?this.words[E+1]=1:this.words[E+1]++;return this.length=Math.max(this.length,E+1),this},f.prototype.isubn=function(g){if(d(typeof g=="number"),d(g<67108864),g<0)return this.iaddn(-g);if(this.negative!==0)return this.negative=0,this.iaddn(g),this.negative=1,this;if(this.words[0]-=g,this.length===1&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var E=0;E>26)-(F/67108864|0),this.words[x+k]=67108863&M}for(;x>26,this.words[x+k]=67108863&M;if(B===0)return this._strip();for(d(B===-1),B=0,x=0;x>26,this.words[x]=67108863&M;return this.negative=1,this._strip()},f.prototype._wordDiv=function(g,E){var k=(this.length,g.length),x=this.clone(),M=g,D=0|M.words[M.length-1];(k=26-this._countBits(D))!==0&&(M=M.ushln(k),x.iushln(k),D=0|M.words[M.length-1]);var B,F=x.length-M.length;if(E!=="mod"){(B=new f(null)).length=F+1,B.words=new Array(B.length);for(var U=0;U=0;V--){var q=67108864*(0|x.words[M.length+V])+(0|x.words[M.length+V-1]);for(q=Math.min(q/D|0,67108863),x._ishlnsubmul(M,q,V);x.negative!==0;)q--,x.negative=0,x._ishlnsubmul(M,1,V),x.isZero()||(x.negative^=1);B&&(B.words[V]=q)}return B&&B._strip(),x._strip(),E!=="div"&&k!==0&&x.iushrn(k),{div:B||null,mod:x}},f.prototype.divmod=function(g,E,k){return d(!g.isZero()),this.isZero()?{div:new f(0),mod:new f(0)}:this.negative!==0&&g.negative===0?(D=this.neg().divmod(g,E),E!=="mod"&&(x=D.div.neg()),E!=="div"&&(M=D.mod.neg(),k&&M.negative!==0&&M.iadd(g)),{div:x,mod:M}):this.negative===0&&g.negative!==0?(D=this.divmod(g.neg(),E),E!=="mod"&&(x=D.div.neg()),{div:x,mod:D.mod}):this.negative&g.negative?(D=this.neg().divmod(g.neg(),E),E!=="div"&&(M=D.mod.neg(),k&&M.negative!==0&&M.isub(g)),{div:D.div,mod:M}):g.length>this.length||this.cmp(g)<0?{div:new f(0),mod:this}:g.length===1?E==="div"?{div:this.divn(g.words[0]),mod:null}:E==="mod"?{div:null,mod:new f(this.modrn(g.words[0]))}:{div:this.divn(g.words[0]),mod:new f(this.modrn(g.words[0]))}:this._wordDiv(g,E);var x,M,D},f.prototype.div=function(g){return this.divmod(g,"div",!1).div},f.prototype.mod=function(g){return this.divmod(g,"mod",!1).mod},f.prototype.umod=function(g){return this.divmod(g,"mod",!0).mod},f.prototype.divRound=function(g){var E=this.divmod(g);if(E.mod.isZero())return E.div;var k=E.div.negative!==0?E.mod.isub(g):E.mod,x=g.ushrn(1),M=g.andln(1),D=k.cmp(x);return D<0||M===1&&D===0?E.div:E.div.negative!==0?E.div.isubn(1):E.div.iaddn(1)},f.prototype.modrn=function(g){var E=g<0;E&&(g=-g),d(g<=67108863);for(var k=(1<<26)%g,x=0,M=this.length-1;M>=0;M--)x=(k*x+(0|this.words[M]))%g;return E?-x:x},f.prototype.modn=function(g){return this.modrn(g)},f.prototype.idivn=function(g){var E=g<0;E&&(g=-g),d(g<=67108863);for(var k=0,x=this.length-1;x>=0;x--){var M=(0|this.words[x])+67108864*k;this.words[x]=M/g|0,k=M%g}return this._strip(),E?this.ineg():this},f.prototype.divn=function(g){return this.clone().idivn(g)},f.prototype.egcd=function(g){d(g.negative===0),d(!g.isZero());var E=this,k=g.clone();E=E.negative!==0?E.umod(g):E.clone();for(var x=new f(1),M=new f(0),D=new f(0),B=new f(1),F=0;E.isEven()&&k.isEven();)E.iushrn(1),k.iushrn(1),++F;for(var U=k.clone(),H=E.clone();!E.isZero();){for(var V=0,q=1;!(E.words[0]&q)&&V<26;++V,q<<=1);if(V>0)for(E.iushrn(V);V-- >0;)(x.isOdd()||M.isOdd())&&(x.iadd(U),M.isub(H)),x.iushrn(1),M.iushrn(1);for(var $=0,L=1;!(k.words[0]&L)&&$<26;++$,L<<=1);if($>0)for(k.iushrn($);$-- >0;)(D.isOdd()||B.isOdd())&&(D.iadd(U),B.isub(H)),D.iushrn(1),B.iushrn(1);E.cmp(k)>=0?(E.isub(k),x.isub(D),M.isub(B)):(k.isub(E),D.isub(x),B.isub(M))}return{a:D,b:B,gcd:k.iushln(F)}},f.prototype._invmp=function(g){d(g.negative===0),d(!g.isZero());var E=this,k=g.clone();E=E.negative!==0?E.umod(g):E.clone();for(var x,M=new f(1),D=new f(0),B=k.clone();E.cmpn(1)>0&&k.cmpn(1)>0;){for(var F=0,U=1;!(E.words[0]&U)&&F<26;++F,U<<=1);if(F>0)for(E.iushrn(F);F-- >0;)M.isOdd()&&M.iadd(B),M.iushrn(1);for(var H=0,V=1;!(k.words[0]&V)&&H<26;++H,V<<=1);if(H>0)for(k.iushrn(H);H-- >0;)D.isOdd()&&D.iadd(B),D.iushrn(1);E.cmp(k)>=0?(E.isub(k),M.isub(D)):(k.isub(E),D.isub(M))}return(x=E.cmpn(1)===0?M:D).cmpn(0)<0&&x.iadd(g),x},f.prototype.gcd=function(g){if(this.isZero())return g.abs();if(g.isZero())return this.abs();var E=this.clone(),k=g.clone();E.negative=0,k.negative=0;for(var x=0;E.isEven()&&k.isEven();x++)E.iushrn(1),k.iushrn(1);for(;;){for(;E.isEven();)E.iushrn(1);for(;k.isEven();)k.iushrn(1);var M=E.cmp(k);if(M<0){var D=E;E=k,k=D}else if(M===0||k.cmpn(1)===0)break;E.isub(k)}return k.iushln(x)},f.prototype.invm=function(g){return this.egcd(g).a.umod(g)},f.prototype.isEven=function(){return(1&this.words[0])==0},f.prototype.isOdd=function(){return(1&this.words[0])==1},f.prototype.andln=function(g){return this.words[0]&g},f.prototype.bincn=function(g){d(typeof g=="number");var E=g%26,k=(g-E)/26,x=1<>>26,B&=67108863,this.words[D]=B}return M!==0&&(this.words[D]=M,this.length++),this},f.prototype.isZero=function(){return this.length===1&&this.words[0]===0},f.prototype.cmpn=function(g){var E,k=g<0;if(this.negative!==0&&!k)return-1;if(this.negative===0&&k)return 1;if(this._strip(),this.length>1)E=1;else{k&&(g=-g),d(g<=67108863,"Number is too big");var x=0|this.words[0];E=x===g?0:xg.length)return 1;if(this.length=0;k--){var x=0|this.words[k],M=0|g.words[k];if(x!==M){xM&&(E=1);break}}return E},f.prototype.gtn=function(g){return this.cmpn(g)===1},f.prototype.gt=function(g){return this.cmp(g)===1},f.prototype.gten=function(g){return this.cmpn(g)>=0},f.prototype.gte=function(g){return this.cmp(g)>=0},f.prototype.ltn=function(g){return this.cmpn(g)===-1},f.prototype.lt=function(g){return this.cmp(g)===-1},f.prototype.lten=function(g){return this.cmpn(g)<=0},f.prototype.lte=function(g){return this.cmp(g)<=0},f.prototype.eqn=function(g){return this.cmpn(g)===0},f.prototype.eq=function(g){return this.cmp(g)===0},f.red=function(g){return new _(g)},f.prototype.toRed=function(g){return d(!this.red,"Already a number in reduction context"),d(this.negative===0,"red works only with positives"),g.convertTo(this)._forceRed(g)},f.prototype.fromRed=function(){return d(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},f.prototype._forceRed=function(g){return this.red=g,this},f.prototype.forceRed=function(g){return d(!this.red,"Already a number in reduction context"),this._forceRed(g)},f.prototype.redAdd=function(g){return d(this.red,"redAdd works only with red numbers"),this.red.add(this,g)},f.prototype.redIAdd=function(g){return d(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,g)},f.prototype.redSub=function(g){return d(this.red,"redSub works only with red numbers"),this.red.sub(this,g)},f.prototype.redISub=function(g){return d(this.red,"redISub works only with red numbers"),this.red.isub(this,g)},f.prototype.redShl=function(g){return d(this.red,"redShl works only with red numbers"),this.red.shl(this,g)},f.prototype.redMul=function(g){return d(this.red,"redMul works only with red numbers"),this.red._verify2(this,g),this.red.mul(this,g)},f.prototype.redIMul=function(g){return d(this.red,"redMul works only with red numbers"),this.red._verify2(this,g),this.red.imul(this,g)},f.prototype.redSqr=function(){return d(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},f.prototype.redISqr=function(){return d(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},f.prototype.redSqrt=function(){return d(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},f.prototype.redInvm=function(){return d(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},f.prototype.redNeg=function(){return d(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},f.prototype.redPow=function(g){return d(this.red&&!g.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,g)};var w={k256:null,p224:null,p192:null,p25519:null};function C(g,E){this.name=g,this.p=new f(E,16),this.n=this.p.bitLength(),this.k=new f(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function R(){C.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function A(){C.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function j(){C.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function P(){C.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function _(g){if(typeof g=="string"){var E=f._prime(g);this.m=E.p,this.prime=E}else d(g.gtn(1),"modulus must be greater than 1"),this.m=g,this.prime=null}function S(g){_.call(this,g),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new f(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}C.prototype._tmp=function(){var g=new f(null);return g.words=new Array(Math.ceil(this.n/13)),g},C.prototype.ireduce=function(g){var E,k=g;do this.split(k,this.tmp),E=(k=(k=this.imulK(k)).iadd(this.tmp)).bitLength();while(E>this.n);var x=E0?k.isub(this.p):k.strip!==void 0?k.strip():k._strip(),k},C.prototype.split=function(g,E){g.iushrn(this.n,0,E)},C.prototype.imulK=function(g){return g.imul(this.k)},m(R,C),R.prototype.split=function(g,E){for(var k=Math.min(g.length,9),x=0;x>>22,M=D}M>>>=22,g.words[x-10]=M,M===0&&g.length>10?g.length-=10:g.length-=9},R.prototype.imulK=function(g){g.words[g.length]=0,g.words[g.length+1]=0,g.length+=2;for(var E=0,k=0;k>>=26,g.words[k]=M,E=x}return E!==0&&(g.words[g.length++]=E),g},f._prime=function(g){if(w[g])return w[g];var E;if(g==="k256")E=new R;else if(g==="p224")E=new A;else if(g==="p192")E=new j;else{if(g!=="p25519")throw new Error("Unknown prime "+g);E=new P}return w[g]=E,E},_.prototype._verify1=function(g){d(g.negative===0,"red works only with positives"),d(g.red,"red works only with red numbers")},_.prototype._verify2=function(g,E){d((g.negative|E.negative)==0,"red works only with positives"),d(g.red&&g.red===E.red,"red works only with red numbers")},_.prototype.imod=function(g){return this.prime?this.prime.ireduce(g)._forceRed(this):(e(g,g.umod(this.m)._forceRed(this)),g)},_.prototype.neg=function(g){return g.isZero()?g.clone():this.m.sub(g)._forceRed(this)},_.prototype.add=function(g,E){this._verify2(g,E);var k=g.add(E);return k.cmp(this.m)>=0&&k.isub(this.m),k._forceRed(this)},_.prototype.iadd=function(g,E){this._verify2(g,E);var k=g.iadd(E);return k.cmp(this.m)>=0&&k.isub(this.m),k},_.prototype.sub=function(g,E){this._verify2(g,E);var k=g.sub(E);return k.cmpn(0)<0&&k.iadd(this.m),k._forceRed(this)},_.prototype.isub=function(g,E){this._verify2(g,E);var k=g.isub(E);return k.cmpn(0)<0&&k.iadd(this.m),k},_.prototype.shl=function(g,E){return this._verify1(g),this.imod(g.ushln(E))},_.prototype.imul=function(g,E){return this._verify2(g,E),this.imod(g.imul(E))},_.prototype.mul=function(g,E){return this._verify2(g,E),this.imod(g.mul(E))},_.prototype.isqr=function(g){return this.imul(g,g.clone())},_.prototype.sqr=function(g){return this.mul(g,g)},_.prototype.sqrt=function(g){if(g.isZero())return g.clone();var E=this.m.andln(3);if(d(E%2==1),E===3){var k=this.m.add(new f(1)).iushrn(2);return this.pow(g,k)}for(var x=this.m.subn(1),M=0;!x.isZero()&&x.andln(1)===0;)M++,x.iushrn(1);d(!x.isZero());var D=new f(1).toRed(this),B=D.redNeg(),F=this.m.subn(1).iushrn(1),U=this.m.bitLength();for(U=new f(2*U*U).toRed(this);this.pow(U,F).cmp(B)!==0;)U.redIAdd(B);for(var H=this.pow(U,x),V=this.pow(g,x.addn(1).iushrn(1)),q=this.pow(g,x),$=M;q.cmp(D)!==0;){for(var L=q,I=0;L.cmp(D)!==0;I++)L=L.redSqr();d(I<$);var N=this.pow(H,new f(1).iushln($-I-1));V=V.redMul(N),H=N.redSqr(),q=q.redMul(H),$=I}return V},_.prototype.invm=function(g){var E=g._invmp(this.m);return E.negative!==0?(E.negative=0,this.imod(E).redNeg()):this.imod(E)},_.prototype.pow=function(g,E){if(E.isZero())return new f(1).toRed(this);if(E.cmpn(1)===0)return g.clone();var k=new Array(16);k[0]=new f(1).toRed(this),k[1]=g;for(var x=2;x=0;x--){for(var U=E.words[x],H=F-1;H>=0;H--){var V=U>>H&1;M!==k[0]&&(M=this.sqr(M)),V!==0||D!==0?(D<<=1,D|=V,(++B===4||x===0&&H===0)&&(M=this.mul(M,k[D]),B=0,D=0)):B=0}F=26}return M},_.prototype.convertTo=function(g){var E=g.umod(this.m);return E===g?E.clone():E},_.prototype.convertFrom=function(g){var E=g.clone();return E.red=null,E},f.mont=function(g){return new S(g)},m(S,_),S.prototype.convertTo=function(g){return this.imod(g.ushln(this.shift))},S.prototype.convertFrom=function(g){var E=this.imod(g.mul(this.rinv));return E.red=null,E},S.prototype.imul=function(g,E){if(g.isZero()||E.isZero())return g.words[0]=0,g.length=1,g;var k=g.imul(E),x=k.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),M=k.isub(x).iushrn(this.shift),D=M;return M.cmp(this.m)>=0?D=M.isub(this.m):M.cmpn(0)<0&&(D=M.iadd(this.m)),D._forceRed(this)},S.prototype.mul=function(g,E){if(g.isZero()||E.isZero())return new f(0)._forceRed(this);var k=g.mul(E),x=k.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),M=k.isub(x).iushrn(this.shift),D=M;return M.cmp(this.m)>=0?D=M.isub(this.m):M.cmpn(0)<0&&(D=M.iadd(this.m)),D._forceRed(this)},S.prototype.invm=function(g){return this.imod(g._invmp(this.m).mul(this.r2))._forceRed(this)}})(T===void 0||T)},{buffer:185}],184:[function(c,T,O){function y(m){return(y=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(f){return typeof f}:function(f){return f&&typeof Symbol=="function"&&f.constructor===Symbol&&f!==Symbol.prototype?"symbol":typeof f})(m)}var p;function v(m){this.rand=m}if(T.exports=function(m){return p||(p=new v(null)),p.generate(m)},T.exports.Rand=v,v.prototype.generate=function(m){return this._rand(m)},v.prototype._rand=function(m){if(this.rand.getBytes)return this.rand.getBytes(m);for(var f=new Uint8Array(m),h=0;h"u"?"undefined":y(self))==="object")self.crypto&&self.crypto.getRandomValues?v.prototype._rand=function(m){var f=new Uint8Array(m);return self.crypto.getRandomValues(f),f}:self.msCrypto&&self.msCrypto.getRandomValues?v.prototype._rand=function(m){var f=new Uint8Array(m);return self.msCrypto.getRandomValues(f),f}:(typeof window>"u"?"undefined":y(window))==="object"&&(v.prototype._rand=function(){throw new Error("Not implemented yet")});else try{var d=c("crypto");if(typeof d.randomBytes!="function")throw new Error("Not supported");v.prototype._rand=function(m){return d.randomBytes(m)}}catch{}},{crypto:185}],185:[function(c,T,O){},{}],186:[function(c,T,O){var y=c("safe-buffer").Buffer;function p(s){y.isBuffer(s)||(s=y.from(s));for(var i=s.length/4|0,e=new Array(i),t=0;t>>24]^b[A>>>16&255]^w[j>>>8&255]^C[255&P]^i[_++],n=l[A>>>24]^b[j>>>16&255]^w[P>>>8&255]^C[255&R]^i[_++],a=l[j>>>24]^b[P>>>16&255]^w[R>>>8&255]^C[255&A]^i[_++],u=l[P>>>24]^b[R>>>16&255]^w[A>>>8&255]^C[255&j]^i[_++],R=o,A=n,j=a,P=u;return o=(t[R>>>24]<<24|t[A>>>16&255]<<16|t[j>>>8&255]<<8|t[255&P])^i[_++],n=(t[A>>>24]<<24|t[j>>>16&255]<<16|t[P>>>8&255]<<8|t[255&R])^i[_++],a=(t[j>>>24]<<24|t[P>>>16&255]<<16|t[R>>>8&255]<<8|t[255&A])^i[_++],u=(t[P>>>24]<<24|t[R>>>16&255]<<16|t[A>>>8&255]<<8|t[255&j])^i[_++],[o>>>=0,n>>>=0,a>>>=0,u>>>=0]}var m=[0,1,2,4,8,16,32,64,128,27,54],f=function(){for(var s=new Array(256),i=0;i<256;i++)s[i]=i<128?i<<1:i<<1^283;for(var e=[],t=[],r=[[],[],[],[]],o=[[],[],[],[]],n=0,a=0,u=0;u<256;++u){var l=a^a<<1^a<<2^a<<3^a<<4;l=l>>>8^255&l^99,e[n]=l,t[l]=n;var b=s[n],w=s[b],C=s[w],R=257*s[l]^16843008*l;r[0][n]=R<<24|R>>>8,r[1][n]=R<<16|R>>>16,r[2][n]=R<<8|R>>>24,r[3][n]=R,R=16843009*C^65537*w^257*b^16843008*n,o[0][l]=R<<24|R>>>8,o[1][l]=R<<16|R>>>16,o[2][l]=R<<8|R>>>24,o[3][l]=R,n===0?n=a=1:(n=b^s[s[s[C^b]]],a^=s[s[a]])}return{SBOX:e,INV_SBOX:t,SUB_MIX:r,INV_SUB_MIX:o}}();function h(s){this._key=p(s),this._reset()}h.blockSize=16,h.keySize=32,h.prototype.blockSize=h.blockSize,h.prototype.keySize=h.keySize,h.prototype._reset=function(){for(var s=this._key,i=s.length,e=i+6,t=4*(e+1),r=[],o=0;o>>24,n=f.SBOX[n>>>24]<<24|f.SBOX[n>>>16&255]<<16|f.SBOX[n>>>8&255]<<8|f.SBOX[255&n],n^=m[o/i|0]<<24):i>6&&o%i==4&&(n=f.SBOX[n>>>24]<<24|f.SBOX[n>>>16&255]<<16|f.SBOX[n>>>8&255]<<8|f.SBOX[255&n]),r[o]=r[o-i]^n}for(var a=[],u=0;u>>24]]^f.INV_SUB_MIX[1][f.SBOX[b>>>16&255]]^f.INV_SUB_MIX[2][f.SBOX[b>>>8&255]]^f.INV_SUB_MIX[3][f.SBOX[255&b]]}this._nRounds=e,this._keySchedule=r,this._invKeySchedule=a},h.prototype.encryptBlockRaw=function(s){return d(s=p(s),this._keySchedule,f.SUB_MIX,f.SBOX,this._nRounds)},h.prototype.encryptBlock=function(s){var i=this.encryptBlockRaw(s),e=y.allocUnsafe(16);return e.writeUInt32BE(i[0],0),e.writeUInt32BE(i[1],4),e.writeUInt32BE(i[2],8),e.writeUInt32BE(i[3],12),e},h.prototype.decryptBlock=function(s){var i=(s=p(s))[1];s[1]=s[3],s[3]=i;var e=d(s,this._invKeySchedule,f.INV_SUB_MIX,f.INV_SBOX,this._nRounds),t=y.allocUnsafe(16);return t.writeUInt32BE(e[0],0),t.writeUInt32BE(e[3],4),t.writeUInt32BE(e[2],8),t.writeUInt32BE(e[1],12),t},h.prototype.scrub=function(){v(this._keySchedule),v(this._invKeySchedule),v(this._key)},T.exports.AES=h},{"safe-buffer":494}],187:[function(c,T,O){var y=c("./aes"),p=c("safe-buffer").Buffer,v=c("cipher-base"),d=c("inherits"),m=c("./ghash"),f=c("buffer-xor"),h=c("./incr32");function s(i,e,t,r){v.call(this);var o=p.alloc(4,0);this._cipher=new y.AES(e);var n=this._cipher.encryptBlock(o);this._ghash=new m(n),t=function(a,u,l){if(u.length===12)return a._finID=p.concat([u,p.from([0,0,0,1])]),p.concat([u,p.from([0,0,0,2])]);var b=new m(l),w=u.length,C=w%16;b.update(u),C&&(C=16-C,b.update(p.alloc(C,0))),b.update(p.alloc(8,0));var R=8*w,A=p.alloc(8);A.writeUIntBE(R,0,8),b.update(A),a._finID=b.state;var j=p.from(a._finID);return h(j),j}(this,t,n),this._prev=p.from(t),this._cache=p.allocUnsafe(0),this._secCache=p.allocUnsafe(0),this._decrypt=r,this._alen=0,this._len=0,this._mode=i,this._authTag=null,this._called=!1}d(s,v),s.prototype._update=function(i){if(!this._called&&this._alen){var e=16-this._alen%16;e<16&&(e=p.alloc(e,0),this._ghash.update(e))}this._called=!0;var t=this._mode.encrypt(this,i);return this._decrypt?this._ghash.update(i):this._ghash.update(t),this._len+=i.length,t},s.prototype._final=function(){if(this._decrypt&&!this._authTag)throw new Error("Unsupported state or unable to authenticate data");var i=f(this._ghash.final(8*this._alen,8*this._len),this._cipher.encryptBlock(this._finID));if(this._decrypt&&function(e,t){var r=0;e.length!==t.length&&r++;for(var o=Math.min(e.length,t.length),n=0;n16)throw new Error("unable to decrypt data");for(var n=-1;++n16)return r=this.cache.slice(0,16),this.cache=this.cache.slice(16),r}else if(this.cache.length>=16)return r=this.cache.slice(0,16),this.cache=this.cache.slice(16),r;return null},i.prototype.flush=function(){if(this.cache.length)return this.cache},O.createDecipher=function(t,r){var o=v[t.toLowerCase()];if(!o)throw new TypeError("invalid suite type");var n=h(r,!1,o.key,o.iv);return e(t,n.key,n.iv)},O.createDecipheriv=e},{"./aes":186,"./authCipher":187,"./modes":199,"./streamCipher":202,"cipher-base":218,evp_bytestokey:368,inherits:387,"safe-buffer":494}],190:[function(c,T,O){var y=c("./modes"),p=c("./authCipher"),v=c("safe-buffer").Buffer,d=c("./streamCipher"),m=c("cipher-base"),f=c("./aes"),h=c("evp_bytestokey");function s(r,o,n){m.call(this),this._cache=new e,this._cipher=new f.AES(o),this._prev=v.from(n),this._mode=r,this._autopadding=!0}c("inherits")(s,m),s.prototype._update=function(r){var o,n;this._cache.add(r);for(var a=[];o=this._cache.get();)n=this._mode.encrypt(this,o),a.push(n);return v.concat(a)};var i=v.alloc(16,16);function e(){this.cache=v.allocUnsafe(0)}function t(r,o,n){var a=y[r.toLowerCase()];if(!a)throw new TypeError("invalid suite type");if(typeof o=="string"&&(o=v.from(o)),o.length!==a.key/8)throw new TypeError("invalid key length "+o.length);if(typeof n=="string"&&(n=v.from(n)),a.mode!=="GCM"&&n.length!==a.iv)throw new TypeError("invalid iv length "+n.length);return a.type==="stream"?new d(a.module,o,n):a.type==="auth"?new p(a.module,o,n):new s(a.module,o,n)}s.prototype._final=function(){var r=this._cache.flush();if(this._autopadding)return r=this._mode.encrypt(this,r),this._cipher.scrub(),r;if(!r.equals(i))throw this._cipher.scrub(),new Error("data not multiple of block length")},s.prototype.setAutoPadding=function(r){return this._autopadding=!!r,this},e.prototype.add=function(r){this.cache=v.concat([this.cache,r])},e.prototype.get=function(){if(this.cache.length>15){var r=this.cache.slice(0,16);return this.cache=this.cache.slice(16),r}return null},e.prototype.flush=function(){for(var r=16-this.cache.length,o=v.allocUnsafe(r),n=-1;++n>>0,0),f.writeUInt32BE(m[1]>>>0,4),f.writeUInt32BE(m[2]>>>0,8),f.writeUInt32BE(m[3]>>>0,12),f}function d(m){this.h=m,this.state=y.alloc(16,0),this.cache=y.allocUnsafe(0)}d.prototype.ghash=function(m){for(var f=-1;++f0;f--)s[f]=s[f]>>>1|(1&s[f-1])<<31;s[0]=s[0]>>>1,h&&(s[0]=s[0]^225<<24)}this.state=v(i)},d.prototype.update=function(m){var f;for(this.cache=y.concat([this.cache,m]);this.cache.length>=16;)f=this.cache.slice(0,16),this.cache=this.cache.slice(16),this.ghash(f)},d.prototype.final=function(m,f){return this.cache.length&&this.ghash(y.concat([this.cache,p],16)),this.ghash(v([0,m,0,f])),this.state},T.exports=d},{"safe-buffer":494}],192:[function(c,T,O){T.exports=function(y){for(var p,v=y.length;v--;){if((p=y.readUInt8(v))!==255){p++,y.writeUInt8(p,v);break}y.writeUInt8(0,v)}}},{}],193:[function(c,T,O){var y=c("buffer-xor");O.encrypt=function(p,v){var d=y(v,p._prev);return p._prev=p._cipher.encryptBlock(d),p._prev},O.decrypt=function(p,v){var d=p._prev;p._prev=v;var m=p._cipher.decryptBlock(v);return y(m,d)}},{"buffer-xor":217}],194:[function(c,T,O){var y=c("safe-buffer").Buffer,p=c("buffer-xor");function v(d,m,f){var h=m.length,s=p(m,d._cache);return d._cache=d._cache.slice(h),d._prev=y.concat([d._prev,f?m:s]),s}O.encrypt=function(d,m,f){for(var h,s=y.allocUnsafe(0);m.length;){if(d._cache.length===0&&(d._cache=d._cipher.encryptBlock(d._prev),d._prev=y.allocUnsafe(0)),!(d._cache.length<=m.length)){s=y.concat([s,v(d,m,f)]);break}h=d._cache.length,s=y.concat([s,v(d,m.slice(0,h),f)]),m=m.slice(h)}return s}},{"buffer-xor":217,"safe-buffer":494}],195:[function(c,T,O){var y=c("safe-buffer").Buffer;function p(d,m,f){for(var h,s,i=-1,e=0;++i<8;)h=m&1<<7-i?128:0,e+=(128&(s=d._cipher.encryptBlock(d._prev)[0]^h))>>i%8,d._prev=v(d._prev,f?h:s);return e}function v(d,m){var f=d.length,h=-1,s=y.allocUnsafe(d.length);for(d=y.concat([d,y.from([m])]);++h>7;return s}O.encrypt=function(d,m,f){for(var h=m.length,s=y.allocUnsafe(h),i=-1;++i=0||!s.umod(f.prime1)||!s.umod(f.prime2);)s=new p(v(h));return s}T.exports=d,d.getr=m}).call(this,c("buffer").Buffer)},{"bn.js":207,buffer:216,randombytes:475}],207:[function(c,T,O){arguments[4][181][0].apply(O,arguments)},{buffer:185,dup:181}],208:[function(c,T,O){T.exports=c("./browser/algorithms.json")},{"./browser/algorithms.json":209}],209:[function(c,T,O){T.exports={sha224WithRSAEncryption:{sign:"rsa",hash:"sha224",id:"302d300d06096086480165030402040500041c"},"RSA-SHA224":{sign:"ecdsa/rsa",hash:"sha224",id:"302d300d06096086480165030402040500041c"},sha256WithRSAEncryption:{sign:"rsa",hash:"sha256",id:"3031300d060960864801650304020105000420"},"RSA-SHA256":{sign:"ecdsa/rsa",hash:"sha256",id:"3031300d060960864801650304020105000420"},sha384WithRSAEncryption:{sign:"rsa",hash:"sha384",id:"3041300d060960864801650304020205000430"},"RSA-SHA384":{sign:"ecdsa/rsa",hash:"sha384",id:"3041300d060960864801650304020205000430"},sha512WithRSAEncryption:{sign:"rsa",hash:"sha512",id:"3051300d060960864801650304020305000440"},"RSA-SHA512":{sign:"ecdsa/rsa",hash:"sha512",id:"3051300d060960864801650304020305000440"},"RSA-SHA1":{sign:"rsa",hash:"sha1",id:"3021300906052b0e03021a05000414"},"ecdsa-with-SHA1":{sign:"ecdsa",hash:"sha1",id:""},sha256:{sign:"ecdsa",hash:"sha256",id:""},sha224:{sign:"ecdsa",hash:"sha224",id:""},sha384:{sign:"ecdsa",hash:"sha384",id:""},sha512:{sign:"ecdsa",hash:"sha512",id:""},"DSA-SHA":{sign:"dsa",hash:"sha1",id:""},"DSA-SHA1":{sign:"dsa",hash:"sha1",id:""},DSA:{sign:"dsa",hash:"sha1",id:""},"DSA-WITH-SHA224":{sign:"dsa",hash:"sha224",id:""},"DSA-SHA224":{sign:"dsa",hash:"sha224",id:""},"DSA-WITH-SHA256":{sign:"dsa",hash:"sha256",id:""},"DSA-SHA256":{sign:"dsa",hash:"sha256",id:""},"DSA-WITH-SHA384":{sign:"dsa",hash:"sha384",id:""},"DSA-SHA384":{sign:"dsa",hash:"sha384",id:""},"DSA-WITH-SHA512":{sign:"dsa",hash:"sha512",id:""},"DSA-SHA512":{sign:"dsa",hash:"sha512",id:""},"DSA-RIPEMD160":{sign:"dsa",hash:"rmd160",id:""},ripemd160WithRSA:{sign:"rsa",hash:"rmd160",id:"3021300906052b2403020105000414"},"RSA-RIPEMD160":{sign:"rsa",hash:"rmd160",id:"3021300906052b2403020105000414"},md5WithRSAEncryption:{sign:"rsa",hash:"md5",id:"3020300c06082a864886f70d020505000410"},"RSA-MD5":{sign:"rsa",hash:"md5",id:"3020300c06082a864886f70d020505000410"}}},{}],210:[function(c,T,O){T.exports={"1.3.132.0.10":"secp256k1","1.3.132.0.33":"p224","1.2.840.10045.3.1.1":"p192","1.2.840.10045.3.1.7":"p256","1.3.132.0.34":"p384","1.3.132.0.35":"p521"}},{}],211:[function(c,T,O){var y=c("safe-buffer").Buffer,p=c("create-hash"),v=c("readable-stream"),d=c("inherits"),m=c("./sign"),f=c("./verify"),h=c("./algorithms.json");function s(r){v.Writable.call(this);var o=h[r];if(!o)throw new Error("Unknown message digest");this._hashType=o.hash,this._hash=p(o.hash),this._tag=o.id,this._signType=o.sign}function i(r){v.Writable.call(this);var o=h[r];if(!o)throw new Error("Unknown message digest");this._hash=p(o.hash),this._tag=o.id,this._signType=o.sign}function e(r){return new s(r)}function t(r){return new i(r)}Object.keys(h).forEach(function(r){h[r].id=y.from(h[r].id,"hex"),h[r.toLowerCase()]=h[r]}),d(s,v.Writable),s.prototype._write=function(r,o,n){this._hash.update(r),n()},s.prototype.update=function(r,o){return typeof r=="string"&&(r=y.from(r,o)),this._hash.update(r),this},s.prototype.sign=function(r,o){this.end();var n=this._hash.digest(),a=m(n,r,this._hashType,this._signType,this._tag);return o?a.toString(o):a},d(i,v.Writable),i.prototype._write=function(r,o,n){this._hash.update(r),n()},i.prototype.update=function(r,o){return typeof r=="string"&&(r=y.from(r,o)),this._hash.update(r),this},i.prototype.verify=function(r,o,n){typeof o=="string"&&(o=y.from(o,n)),this.end();var a=this._hash.digest();return f(o,a,r,this._signType,this._tag)},T.exports={Sign:e,Verify:t,createSign:e,createVerify:t}},{"./algorithms.json":209,"./sign":212,"./verify":213,"create-hash":331,inherits:387,"readable-stream":491,"safe-buffer":214}],212:[function(c,T,O){var y=c("safe-buffer").Buffer,p=c("create-hmac"),v=c("browserify-rsa"),d=c("elliptic").ec,m=c("bn.js"),f=c("parse-asn1"),h=c("./curves.json");function s(r,o,n,a){if((r=y.from(r.toArray())).length0&&n.ishrn(a),n}function e(r,o,n){var a,u;do{for(a=y.alloc(0);8*a.length=s)throw new Error("invalid sig")}T.exports=function(h,s,i,e,t){var r=d(i);if(r.type==="ec"){if(e!=="ecdsa"&&e!=="ecdsa/rsa")throw new Error("wrong public key type");return function(w,C,R){var A=m[R.data.algorithm.curve.join(".")];if(!A)throw new Error("unknown curve "+R.data.algorithm.curve.join("."));var j=new v(A),P=R.data.subjectPrivateKey.data;return j.verify(C,w,P)}(h,s,r)}if(r.type==="dsa"){if(e!=="dsa")throw new Error("wrong public key type");return function(w,C,R){var A=R.data.p,j=R.data.q,P=R.data.g,_=R.data.pub_key,S=d.signature.decode(w,"der"),g=S.s,E=S.r;f(g,j),f(E,j);var k=p.mont(A),x=g.invm(j);return P.toRed(k).redPow(new p(C).mul(x).mod(j)).fromRed().mul(_.toRed(k).redPow(E.mul(x).mod(j)).fromRed()).mod(A).mod(j).cmp(E)===0}(h,s,r)}if(e!=="rsa"&&e!=="ecdsa/rsa")throw new Error("wrong public key type");s=y.concat([t,s]);for(var o=r.modulus.byteLength(),n=[1],a=0;s.length+n.length+2 */var y=c("buffer"),p=y.Buffer;function v(m,f){for(var h in m)f[h]=m[h]}function d(m,f,h){return p(m,f,h)}p.from&&p.alloc&&p.allocUnsafe&&p.allocUnsafeSlow?T.exports=y:(v(y,O),O.Buffer=d),d.prototype=Object.create(p.prototype),v(p,d),d.from=function(m,f,h){if(typeof m=="number")throw new TypeError("Argument must not be a number");return p(m,f,h)},d.alloc=function(m,f,h){if(typeof m!="number")throw new TypeError("Argument must be a number");var s=p(m);return f!==void 0?typeof h=="string"?s.fill(f,h):s.fill(f):s.fill(0),s},d.allocUnsafe=function(m){if(typeof m!="number")throw new TypeError("Argument must be a number");return p(m)},d.allocUnsafeSlow=function(m){if(typeof m!="number")throw new TypeError("Argument must be a number");return y.SlowBuffer(m)}},{buffer:216}],215:[function(c,T,O){arguments[4][185][0].apply(O,arguments)},{dup:185}],216:[function(c,T,O){(function(f){function p(I){return(p=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(N){return typeof N}:function(N){return N&&typeof Symbol=="function"&&N.constructor===Symbol&&N!==Symbol.prototype?"symbol":typeof N})(I)}var v=c("base64-js"),d=c("ieee754");O.Buffer=f,O.SlowBuffer=function(I){return+I!=I&&(I=0),f.alloc(+I)},O.INSPECT_MAX_BYTES=50;function m(I){if(I>2147483647)throw new RangeError('The value "'+I+'" is invalid for option "size"');var N=new Uint8Array(I);return N.__proto__=f.prototype,N}function f(I,N,z){if(typeof I=="number"){if(typeof N=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return i(I)}return h(I,N,z)}function h(I,N,z){if(typeof I=="string")return function(Y,ae){if(typeof ae=="string"&&ae!==""||(ae="utf8"),!f.isEncoding(ae))throw new TypeError("Unknown encoding: "+ae);var te=0|r(Y,ae),fe=m(te),me=fe.write(Y,ae);return me!==te&&(fe=fe.slice(0,me)),fe}(I,N);if(ArrayBuffer.isView(I))return e(I);if(I==null)throw TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+p(I));if($(I,ArrayBuffer)||I&&$(I.buffer,ArrayBuffer))return function(Y,ae,te){if(ae<0||Y.byteLength=2147483647)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+2147483647 .toString(16)+" bytes");return 0|I}function r(I,N){if(f.isBuffer(I))return I.length;if(ArrayBuffer.isView(I)||$(I,ArrayBuffer))return I.byteLength;if(typeof I!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+p(I));var z=I.length,W=arguments.length>2&&arguments[2]===!0;if(!W&&z===0)return 0;for(var K=!1;;)switch(N){case"ascii":case"latin1":case"binary":return z;case"utf8":case"utf-8":return H(I).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*z;case"hex":return z>>>1;case"base64":return V(I).length;default:if(K)return W?-1:H(I).length;N=(""+N).toLowerCase(),K=!0}}function o(I,N,z){var W=!1;if((N===void 0||N<0)&&(N=0),N>this.length||((z===void 0||z>this.length)&&(z=this.length),z<=0)||(z>>>=0)<=(N>>>=0))return"";for(I||(I="utf8");;)switch(I){case"hex":return g(this,N,z);case"utf8":case"utf-8":return P(this,N,z);case"ascii":return _(this,N,z);case"latin1":case"binary":return S(this,N,z);case"base64":return j(this,N,z);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return E(this,N,z);default:if(W)throw new TypeError("Unknown encoding: "+I);I=(I+"").toLowerCase(),W=!0}}function n(I,N,z){var W=I[N];I[N]=I[z],I[z]=W}function a(I,N,z,W,K){if(I.length===0)return-1;if(typeof z=="string"?(W=z,z=0):z>2147483647?z=2147483647:z<-2147483648&&(z=-2147483648),L(z=+z)&&(z=K?0:I.length-1),z<0&&(z=I.length+z),z>=I.length){if(K)return-1;z=I.length-1}else if(z<0){if(!K)return-1;z=0}if(typeof N=="string"&&(N=f.from(N,W)),f.isBuffer(N))return N.length===0?-1:u(I,N,z,W,K);if(typeof N=="number")return N&=255,typeof Uint8Array.prototype.indexOf=="function"?K?Uint8Array.prototype.indexOf.call(I,N,z):Uint8Array.prototype.lastIndexOf.call(I,N,z):u(I,[N],z,W,K);throw new TypeError("val must be string, number or Buffer")}function u(I,N,z,W,K){var Y,ae=1,te=I.length,fe=N.length;if(W!==void 0&&((W=String(W).toLowerCase())==="ucs2"||W==="ucs-2"||W==="utf16le"||W==="utf-16le")){if(I.length<2||N.length<2)return-1;ae=2,te/=2,fe/=2,z/=2}function me(we,Se){return ae===1?we[Se]:we.readUInt16BE(Se*ae)}if(K){var le=-1;for(Y=z;Yte&&(z=te-fe),Y=z;Y>=0;Y--){for(var Ce=!0,xe=0;xeK&&(W=K):W=K;var Y=N.length;W>Y/2&&(W=Y/2);for(var ae=0;ae>8,fe=ae%256,me.push(fe),me.push(te);return me}(N,I.length-z),I,z,W)}function j(I,N,z){return N===0&&z===I.length?v.fromByteArray(I):v.fromByteArray(I.slice(N,z))}function P(I,N,z){z=Math.min(I.length,z);for(var W=[],K=N;K239?4:me>223?3:me>191?2:1;if(K+Ce<=z)switch(Ce){case 1:me<128&&(le=me);break;case 2:(192&(Y=I[K+1]))==128&&(fe=(31&me)<<6|63&Y)>127&&(le=fe);break;case 3:Y=I[K+1],ae=I[K+2],(192&Y)==128&&(192&ae)==128&&(fe=(15&me)<<12|(63&Y)<<6|63&ae)>2047&&(fe<55296||fe>57343)&&(le=fe);break;case 4:Y=I[K+1],ae=I[K+2],te=I[K+3],(192&Y)==128&&(192&ae)==128&&(192&te)==128&&(fe=(15&me)<<18|(63&Y)<<12|(63&ae)<<6|63&te)>65535&&fe<1114112&&(le=fe)}le===null?(le=65533,Ce=1):le>65535&&(le-=65536,W.push(le>>>10&1023|55296),le=56320|1023&le),W.push(le),K+=Ce}return function(xe){var we=xe.length;if(we<=4096)return String.fromCharCode.apply(String,xe);for(var Se="",Te=0;Te"u"||typeof console.error!="function"||console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support."),Object.defineProperty(f.prototype,"parent",{enumerable:!0,get:function(){if(f.isBuffer(this))return this.buffer}}),Object.defineProperty(f.prototype,"offset",{enumerable:!0,get:function(){if(f.isBuffer(this))return this.byteOffset}}),typeof Symbol<"u"&&Symbol.species!=null&&f[Symbol.species]===f&&Object.defineProperty(f,Symbol.species,{value:null,configurable:!0,enumerable:!1,writable:!1}),f.poolSize=8192,f.from=function(I,N,z){return h(I,N,z)},f.prototype.__proto__=Uint8Array.prototype,f.__proto__=Uint8Array,f.alloc=function(I,N,z){return function(W,K,Y){return s(W),W<=0?m(W):K!==void 0?typeof Y=="string"?m(W).fill(K,Y):m(W).fill(K):m(W)}(I,N,z)},f.allocUnsafe=function(I){return i(I)},f.allocUnsafeSlow=function(I){return i(I)},f.isBuffer=function(I){return I!=null&&I._isBuffer===!0&&I!==f.prototype},f.compare=function(I,N){if($(I,Uint8Array)&&(I=f.from(I,I.offset,I.byteLength)),$(N,Uint8Array)&&(N=f.from(N,N.offset,N.byteLength)),!f.isBuffer(I)||!f.isBuffer(N))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(I===N)return 0;for(var z=I.length,W=N.length,K=0,Y=Math.min(z,W);KN&&(I+=" ... "),""},f.prototype.compare=function(I,N,z,W,K){if($(I,Uint8Array)&&(I=f.from(I,I.offset,I.byteLength)),!f.isBuffer(I))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+p(I));if(N===void 0&&(N=0),z===void 0&&(z=I?I.length:0),W===void 0&&(W=0),K===void 0&&(K=this.length),N<0||z>I.length||W<0||K>this.length)throw new RangeError("out of range index");if(W>=K&&N>=z)return 0;if(W>=K)return-1;if(N>=z)return 1;if(this===I)return 0;for(var Y=(K>>>=0)-(W>>>=0),ae=(z>>>=0)-(N>>>=0),te=Math.min(Y,ae),fe=this.slice(W,K),me=I.slice(N,z),le=0;le>>=0,isFinite(z)?(z>>>=0,W===void 0&&(W="utf8")):(W=z,z=void 0)}var K=this.length-N;if((z===void 0||z>K)&&(z=K),I.length>0&&(z<0||N<0)||N>this.length)throw new RangeError("Attempt to write outside buffer bounds");W||(W="utf8");for(var Y=!1;;)switch(W){case"hex":return l(this,I,N,z);case"utf8":case"utf-8":return b(this,I,N,z);case"ascii":return w(this,I,N,z);case"latin1":case"binary":return C(this,I,N,z);case"base64":return R(this,I,N,z);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return A(this,I,N,z);default:if(Y)throw new TypeError("Unknown encoding: "+W);W=(""+W).toLowerCase(),Y=!0}},f.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function _(I,N,z){var W="";z=Math.min(I.length,z);for(var K=N;KW)&&(z=W);for(var K="",Y=N;Yz)throw new RangeError("Trying to access beyond buffer length")}function x(I,N,z,W,K,Y){if(!f.isBuffer(I))throw new TypeError('"buffer" argument must be a Buffer instance');if(N>K||NI.length)throw new RangeError("Index out of range")}function M(I,N,z,W,K,Y){if(z+W>I.length)throw new RangeError("Index out of range");if(z<0)throw new RangeError("Index out of range")}function D(I,N,z,W,K){return N=+N,z>>>=0,K||M(I,0,z,4),d.write(I,N,z,W,23,4),z+4}function B(I,N,z,W,K){return N=+N,z>>>=0,K||M(I,0,z,8),d.write(I,N,z,W,52,8),z+8}f.prototype.slice=function(I,N){var z=this.length;(I=~~I)<0?(I+=z)<0&&(I=0):I>z&&(I=z),(N=N===void 0?z:~~N)<0?(N+=z)<0&&(N=0):N>z&&(N=z),N>>=0,N>>>=0,z||k(I,N,this.length);for(var W=this[I],K=1,Y=0;++Y>>=0,N>>>=0,z||k(I,N,this.length);for(var W=this[I+--N],K=1;N>0&&(K*=256);)W+=this[I+--N]*K;return W},f.prototype.readUInt8=function(I,N){return I>>>=0,N||k(I,1,this.length),this[I]},f.prototype.readUInt16LE=function(I,N){return I>>>=0,N||k(I,2,this.length),this[I]|this[I+1]<<8},f.prototype.readUInt16BE=function(I,N){return I>>>=0,N||k(I,2,this.length),this[I]<<8|this[I+1]},f.prototype.readUInt32LE=function(I,N){return I>>>=0,N||k(I,4,this.length),(this[I]|this[I+1]<<8|this[I+2]<<16)+16777216*this[I+3]},f.prototype.readUInt32BE=function(I,N){return I>>>=0,N||k(I,4,this.length),16777216*this[I]+(this[I+1]<<16|this[I+2]<<8|this[I+3])},f.prototype.readIntLE=function(I,N,z){I>>>=0,N>>>=0,z||k(I,N,this.length);for(var W=this[I],K=1,Y=0;++Y=(K*=128)&&(W-=Math.pow(2,8*N)),W},f.prototype.readIntBE=function(I,N,z){I>>>=0,N>>>=0,z||k(I,N,this.length);for(var W=N,K=1,Y=this[I+--W];W>0&&(K*=256);)Y+=this[I+--W]*K;return Y>=(K*=128)&&(Y-=Math.pow(2,8*N)),Y},f.prototype.readInt8=function(I,N){return I>>>=0,N||k(I,1,this.length),128&this[I]?-1*(255-this[I]+1):this[I]},f.prototype.readInt16LE=function(I,N){I>>>=0,N||k(I,2,this.length);var z=this[I]|this[I+1]<<8;return 32768&z?4294901760|z:z},f.prototype.readInt16BE=function(I,N){I>>>=0,N||k(I,2,this.length);var z=this[I+1]|this[I]<<8;return 32768&z?4294901760|z:z},f.prototype.readInt32LE=function(I,N){return I>>>=0,N||k(I,4,this.length),this[I]|this[I+1]<<8|this[I+2]<<16|this[I+3]<<24},f.prototype.readInt32BE=function(I,N){return I>>>=0,N||k(I,4,this.length),this[I]<<24|this[I+1]<<16|this[I+2]<<8|this[I+3]},f.prototype.readFloatLE=function(I,N){return I>>>=0,N||k(I,4,this.length),d.read(this,I,!0,23,4)},f.prototype.readFloatBE=function(I,N){return I>>>=0,N||k(I,4,this.length),d.read(this,I,!1,23,4)},f.prototype.readDoubleLE=function(I,N){return I>>>=0,N||k(I,8,this.length),d.read(this,I,!0,52,8)},f.prototype.readDoubleBE=function(I,N){return I>>>=0,N||k(I,8,this.length),d.read(this,I,!1,52,8)},f.prototype.writeUIntLE=function(I,N,z,W){I=+I,N>>>=0,z>>>=0,W||x(this,I,N,z,Math.pow(2,8*z)-1,0);var K=1,Y=0;for(this[N]=255&I;++Y>>=0,z>>>=0,W||x(this,I,N,z,Math.pow(2,8*z)-1,0);var K=z-1,Y=1;for(this[N+K]=255&I;--K>=0&&(Y*=256);)this[N+K]=I/Y&255;return N+z},f.prototype.writeUInt8=function(I,N,z){return I=+I,N>>>=0,z||x(this,I,N,1,255,0),this[N]=255&I,N+1},f.prototype.writeUInt16LE=function(I,N,z){return I=+I,N>>>=0,z||x(this,I,N,2,65535,0),this[N]=255&I,this[N+1]=I>>>8,N+2},f.prototype.writeUInt16BE=function(I,N,z){return I=+I,N>>>=0,z||x(this,I,N,2,65535,0),this[N]=I>>>8,this[N+1]=255&I,N+2},f.prototype.writeUInt32LE=function(I,N,z){return I=+I,N>>>=0,z||x(this,I,N,4,4294967295,0),this[N+3]=I>>>24,this[N+2]=I>>>16,this[N+1]=I>>>8,this[N]=255&I,N+4},f.prototype.writeUInt32BE=function(I,N,z){return I=+I,N>>>=0,z||x(this,I,N,4,4294967295,0),this[N]=I>>>24,this[N+1]=I>>>16,this[N+2]=I>>>8,this[N+3]=255&I,N+4},f.prototype.writeIntLE=function(I,N,z,W){if(I=+I,N>>>=0,!W){var K=Math.pow(2,8*z-1);x(this,I,N,z,K-1,-K)}var Y=0,ae=1,te=0;for(this[N]=255&I;++Y>0)-te&255;return N+z},f.prototype.writeIntBE=function(I,N,z,W){if(I=+I,N>>>=0,!W){var K=Math.pow(2,8*z-1);x(this,I,N,z,K-1,-K)}var Y=z-1,ae=1,te=0;for(this[N+Y]=255&I;--Y>=0&&(ae*=256);)I<0&&te===0&&this[N+Y+1]!==0&&(te=1),this[N+Y]=(I/ae>>0)-te&255;return N+z},f.prototype.writeInt8=function(I,N,z){return I=+I,N>>>=0,z||x(this,I,N,1,127,-128),I<0&&(I=255+I+1),this[N]=255&I,N+1},f.prototype.writeInt16LE=function(I,N,z){return I=+I,N>>>=0,z||x(this,I,N,2,32767,-32768),this[N]=255&I,this[N+1]=I>>>8,N+2},f.prototype.writeInt16BE=function(I,N,z){return I=+I,N>>>=0,z||x(this,I,N,2,32767,-32768),this[N]=I>>>8,this[N+1]=255&I,N+2},f.prototype.writeInt32LE=function(I,N,z){return I=+I,N>>>=0,z||x(this,I,N,4,2147483647,-2147483648),this[N]=255&I,this[N+1]=I>>>8,this[N+2]=I>>>16,this[N+3]=I>>>24,N+4},f.prototype.writeInt32BE=function(I,N,z){return I=+I,N>>>=0,z||x(this,I,N,4,2147483647,-2147483648),I<0&&(I=4294967295+I+1),this[N]=I>>>24,this[N+1]=I>>>16,this[N+2]=I>>>8,this[N+3]=255&I,N+4},f.prototype.writeFloatLE=function(I,N,z){return D(this,I,N,!0,z)},f.prototype.writeFloatBE=function(I,N,z){return D(this,I,N,!1,z)},f.prototype.writeDoubleLE=function(I,N,z){return B(this,I,N,!0,z)},f.prototype.writeDoubleBE=function(I,N,z){return B(this,I,N,!1,z)},f.prototype.copy=function(I,N,z,W){if(!f.isBuffer(I))throw new TypeError("argument should be a Buffer");if(z||(z=0),W||W===0||(W=this.length),N>=I.length&&(N=I.length),N||(N=0),W>0&&W=this.length)throw new RangeError("Index out of range");if(W<0)throw new RangeError("sourceEnd out of bounds");W>this.length&&(W=this.length),I.length-N=0;--Y)I[Y+N]=this[Y+z];else Uint8Array.prototype.set.call(I,this.subarray(z,W),N);return K},f.prototype.fill=function(I,N,z,W){if(typeof I=="string"){if(typeof N=="string"?(W=N,N=0,z=this.length):typeof z=="string"&&(W=z,z=this.length),W!==void 0&&typeof W!="string")throw new TypeError("encoding must be a string");if(typeof W=="string"&&!f.isEncoding(W))throw new TypeError("Unknown encoding: "+W);if(I.length===1){var K=I.charCodeAt(0);(W==="utf8"&&K<128||W==="latin1")&&(I=K)}}else typeof I=="number"&&(I&=255);if(N<0||this.length>>=0,z=z===void 0?this.length:z>>>0,I||(I=0),typeof I=="number")for(Y=N;Y55295&&z<57344){if(!K){if(z>56319){(N-=3)>-1&&Y.push(239,191,189);continue}if(ae+1===W){(N-=3)>-1&&Y.push(239,191,189);continue}K=z;continue}if(z<56320){(N-=3)>-1&&Y.push(239,191,189),K=z;continue}z=65536+(K-55296<<10|z-56320)}else K&&(N-=3)>-1&&Y.push(239,191,189);if(K=null,z<128){if((N-=1)<0)break;Y.push(z)}else if(z<2048){if((N-=2)<0)break;Y.push(z>>6|192,63&z|128)}else if(z<65536){if((N-=3)<0)break;Y.push(z>>12|224,z>>6&63|128,63&z|128)}else{if(!(z<1114112))throw new Error("Invalid code point");if((N-=4)<0)break;Y.push(z>>18|240,z>>12&63|128,z>>6&63|128,63&z|128)}}return Y}function V(I){return v.toByteArray(function(N){if((N=(N=N.split("=")[0]).trim().replace(F,"")).length<2)return"";for(;N.length%4!=0;)N+="=";return N}(I))}function q(I,N,z,W){for(var K=0;K=N.length||K>=I.length);++K)N[K+z]=I[K];return K}function $(I,N){return I instanceof N||I!=null&&I.constructor!=null&&I.constructor.name!=null&&I.constructor.name===N.name}function L(I){return I!=I}}).call(this,c("buffer").Buffer)},{"base64-js":182,buffer:216,ieee754:385}],217:[function(c,T,O){(function(y){T.exports=function(p,v){for(var d=Math.min(p.length,v.length),m=new y(d),f=0;fr;)if((i=e[r++])!=i)return!0}else for(;t>r;r++)if((m||r in e)&&e[r]===h)return m||r||0;return!m&&-1}};T.exports={includes:d(!0),indexOf:d(!1)}},{"../internals/to-absolute-index":304,"../internals/to-indexed-object":305,"../internals/to-length":307}],225:[function(c,T,O){var y=c("../internals/function-bind-context"),p=c("../internals/indexed-object"),v=c("../internals/to-object"),d=c("../internals/to-length"),m=c("../internals/array-species-create"),f=[].push,h=function(s){var i=s==1,e=s==2,t=s==3,r=s==4,o=s==6,n=s==5||o;return function(a,u,l,b){for(var w,C,R=v(a),A=p(R),j=y(u,l,3),P=d(A.length),_=0,S=b||m,g=i?S(a,P):e?S(a,0):void 0;P>_;_++)if((n||_ in A)&&(C=j(w=A[_],_,R),s)){if(i)g[_]=C;else if(C)switch(s){case 3:return!0;case 5:return w;case 6:return _;case 2:f.call(g,w)}else if(r)return!1}return o?-1:t||r?r:g}};T.exports={forEach:h(0),map:h(1),filter:h(2),some:h(3),every:h(4),find:h(5),findIndex:h(6)}},{"../internals/array-species-create":227,"../internals/function-bind-context":248,"../internals/indexed-object":257,"../internals/to-length":307,"../internals/to-object":308}],226:[function(c,T,O){var y=c("../internals/descriptors"),p=c("../internals/fails"),v=c("../internals/has"),d=Object.defineProperty,m={},f=function(h){throw h};T.exports=function(h,s){if(v(m,h))return m[h];s||(s={});var i=[][h],e=!!v(s,"ACCESSORS")&&s.ACCESSORS,t=v(s,0)?s[0]:f,r=v(s,1)?s[1]:void 0;return m[h]=!!i&&!p(function(){if(e&&!y)return!0;var o={length:-1};e?d(o,1,{enumerable:!0,get:f}):o[1]=1,i.call(o,t,r)})}},{"../internals/descriptors":240,"../internals/fails":247,"../internals/has":252}],227:[function(c,T,O){var y=c("../internals/is-object"),p=c("../internals/is-array"),v=c("../internals/well-known-symbol")("species");T.exports=function(d,m){var f;return p(d)&&(typeof(f=d.constructor)!="function"||f!==Array&&!p(f.prototype)?y(f)&&(f=f[v])===null&&(f=void 0):f=void 0),new(f===void 0?Array:f)(m===0?0:m)}},{"../internals/is-array":261,"../internals/is-object":263,"../internals/well-known-symbol":314}],228:[function(c,T,O){var y=c("../internals/an-object");T.exports=function(p,v,d,m){try{return m?v(y(d)[0],d[1]):v(d)}catch(h){var f=p.return;throw f!==void 0&&y(f.call(p)),h}}},{"../internals/an-object":223}],229:[function(c,T,O){var y=c("../internals/well-known-symbol")("iterator"),p=!1;try{var v=0,d={next:function(){return{done:!!v++}},return:function(){p=!0}};d[y]=function(){return this},Array.from(d,function(){throw 2})}catch{}T.exports=function(m,f){if(!f&&!p)return!1;var h=!1;try{var s={};s[y]=function(){return{next:function(){return{done:h=!0}}}},m(s)}catch{}return h}},{"../internals/well-known-symbol":314}],230:[function(c,T,O){var y={}.toString;T.exports=function(p){return y.call(p).slice(8,-1)}},{}],231:[function(c,T,O){var y=c("../internals/to-string-tag-support"),p=c("../internals/classof-raw"),v=c("../internals/well-known-symbol")("toStringTag"),d=p(function(){return arguments}())=="Arguments";T.exports=y?p:function(m){var f,h,s;return m===void 0?"Undefined":m===null?"Null":typeof(h=function(i,e){try{return i[e]}catch{}}(f=Object(m),v))=="string"?h:d?p(f):(s=p(f))=="Object"&&typeof f.callee=="function"?"Arguments":s}},{"../internals/classof-raw":230,"../internals/to-string-tag-support":310,"../internals/well-known-symbol":314}],232:[function(c,T,O){var y=c("../internals/has"),p=c("../internals/own-keys"),v=c("../internals/object-get-own-property-descriptor"),d=c("../internals/object-define-property");T.exports=function(m,f){for(var h=p(f),s=d.f,i=v.f,e=0;e=74)&&(y=d.match(/Chrome\/(\d+)/))&&(p=y[1]),T.exports=p&&+p},{"../internals/engine-user-agent":243,"../internals/global":251}],245:[function(c,T,O){T.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},{}],246:[function(c,T,O){var y=c("../internals/global"),p=c("../internals/object-get-own-property-descriptor").f,v=c("../internals/create-non-enumerable-property"),d=c("../internals/redefine"),m=c("../internals/set-global"),f=c("../internals/copy-constructor-properties"),h=c("../internals/is-forced");T.exports=function(s,i){var e,t,r,o,n,a=s.target,u=s.global,l=s.stat;if(e=u?y:l?y[a]||m(a,{}):(y[a]||{}).prototype)for(t in i){if(o=i[t],r=s.noTargetGet?(n=p(e,t))&&n.value:e[t],!h(u?t:a+(l?".":"#")+t,s.forced)&&r!==void 0){if(typeof o==typeof r)continue;f(o,r)}(s.sham||r&&r.sham)&&v(o,"sham",!0),d(e,t,o,s)}}},{"../internals/copy-constructor-properties":232,"../internals/create-non-enumerable-property":236,"../internals/global":251,"../internals/is-forced":262,"../internals/object-get-own-property-descriptor":279,"../internals/redefine":294,"../internals/set-global":296}],247:[function(c,T,O){T.exports=function(y){try{return!!y()}catch{return!0}}},{}],248:[function(c,T,O){var y=c("../internals/a-function");T.exports=function(p,v,d){if(y(p),v===void 0)return p;switch(d){case 0:return function(){return p.call(v)};case 1:return function(m){return p.call(v,m)};case 2:return function(m,f){return p.call(v,m,f)};case 3:return function(m,f,h){return p.call(v,m,f,h)}}return function(){return p.apply(v,arguments)}}},{"../internals/a-function":219}],249:[function(c,T,O){var y=c("../internals/path"),p=c("../internals/global"),v=function(d){return typeof d=="function"?d:void 0};T.exports=function(d,m){return arguments.length<2?v(y[d])||v(p[d]):y[d]&&y[d][m]||p[d]&&p[d][m]}},{"../internals/global":251,"../internals/path":290}],250:[function(c,T,O){var y=c("../internals/classof"),p=c("../internals/iterators"),v=c("../internals/well-known-symbol")("iterator");T.exports=function(d){if(d!=null)return d[v]||d["@@iterator"]||p[y(d)]}},{"../internals/classof":231,"../internals/iterators":268,"../internals/well-known-symbol":314}],251:[function(c,T,O){(function(y){var p=function(v){return v&&v.Math==Math&&v};T.exports=p(typeof globalThis=="object"&&globalThis)||p(typeof window=="object"&&window)||p(typeof self=="object"&&self)||p(typeof y=="object"&&y)||Function("return this")()}).call(this,typeof et<"u"?et:typeof self<"u"?self:typeof window<"u"?window:{})},{}],252:[function(c,T,O){var y={}.hasOwnProperty;T.exports=function(p,v){return y.call(p,v)}},{}],253:[function(c,T,O){T.exports={}},{}],254:[function(c,T,O){var y=c("../internals/global");T.exports=function(p,v){var d=y.console;d&&d.error&&(arguments.length===1?d.error(p):d.error(p,v))}},{"../internals/global":251}],255:[function(c,T,O){var y=c("../internals/get-built-in");T.exports=y("document","documentElement")},{"../internals/get-built-in":249}],256:[function(c,T,O){var y=c("../internals/descriptors"),p=c("../internals/fails"),v=c("../internals/document-create-element");T.exports=!y&&!p(function(){return Object.defineProperty(v("div"),"a",{get:function(){return 7}}).a!=7})},{"../internals/descriptors":240,"../internals/document-create-element":241,"../internals/fails":247}],257:[function(c,T,O){var y=c("../internals/fails"),p=c("../internals/classof-raw"),v="".split;T.exports=y(function(){return!Object("z").propertyIsEnumerable(0)})?function(d){return p(d)=="String"?v.call(d,""):Object(d)}:Object},{"../internals/classof-raw":230,"../internals/fails":247}],258:[function(c,T,O){var y=c("../internals/shared-store"),p=Function.toString;typeof y.inspectSource!="function"&&(y.inspectSource=function(v){return p.call(v)}),T.exports=y.inspectSource},{"../internals/shared-store":300}],259:[function(c,T,O){var y,p,v,d=c("../internals/native-weak-map"),m=c("../internals/global"),f=c("../internals/is-object"),h=c("../internals/create-non-enumerable-property"),s=c("../internals/has"),i=c("../internals/shared-key"),e=c("../internals/hidden-keys"),t=m.WeakMap;if(d){var r=new t,o=r.get,n=r.has,a=r.set;y=function(l,b){return a.call(r,l,b),b},p=function(l){return o.call(r,l)||{}},v=function(l){return n.call(r,l)}}else{var u=i("state");e[u]=!0,y=function(l,b){return h(l,u,b),b},p=function(l){return s(l,u)?l[u]:{}},v=function(l){return s(l,u)}}T.exports={set:y,get:p,has:v,enforce:function(l){return v(l)?p(l):y(l,{})},getterFor:function(l){return function(b){var w;if(!f(b)||(w=p(b)).type!==l)throw TypeError("Incompatible receiver, "+l+" required");return w}}}},{"../internals/create-non-enumerable-property":236,"../internals/global":251,"../internals/has":252,"../internals/hidden-keys":253,"../internals/is-object":263,"../internals/native-weak-map":272,"../internals/shared-key":299}],260:[function(c,T,O){var y=c("../internals/well-known-symbol"),p=c("../internals/iterators"),v=y("iterator"),d=Array.prototype;T.exports=function(m){return m!==void 0&&(p.Array===m||d[v]===m)}},{"../internals/iterators":268,"../internals/well-known-symbol":314}],261:[function(c,T,O){var y=c("../internals/classof-raw");T.exports=Array.isArray||function(p){return y(p)=="Array"}},{"../internals/classof-raw":230}],262:[function(c,T,O){var y=c("../internals/fails"),p=/#|\.prototype\./,v=function(s,i){var e=m[d(s)];return e==h||e!=f&&(typeof i=="function"?y(i):!!i)},d=v.normalize=function(s){return String(s).replace(p,".").toLowerCase()},m=v.data={},f=v.NATIVE="N",h=v.POLYFILL="P";T.exports=v},{"../internals/fails":247}],263:[function(c,T,O){T.exports=function(y){return typeof y=="object"?y!==null:typeof y=="function"}},{}],264:[function(c,T,O){T.exports=!1},{}],265:[function(c,T,O){var y=c("../internals/is-object"),p=c("../internals/classof-raw"),v=c("../internals/well-known-symbol")("match");T.exports=function(d){var m;return y(d)&&((m=d[v])!==void 0?!!m:p(d)=="RegExp")}},{"../internals/classof-raw":230,"../internals/is-object":263,"../internals/well-known-symbol":314}],266:[function(c,T,O){var y=c("../internals/an-object"),p=c("../internals/is-array-iterator-method"),v=c("../internals/to-length"),d=c("../internals/function-bind-context"),m=c("../internals/get-iterator-method"),f=c("../internals/call-with-safe-iteration-closing"),h=function(s,i){this.stopped=s,this.result=i};(T.exports=function(s,i,e,t,r){var o,n,a,u,l,b,w,C=d(i,e,t?2:1);if(r)o=s;else{if(typeof(n=m(s))!="function")throw TypeError("Target is not iterable");if(p(n)){for(a=0,u=v(s.length);u>a;a++)if((l=t?C(y(w=s[a])[0],w[1]):C(s[a]))&&l instanceof h)return l;return new h(!1)}o=n.call(s)}for(b=o.next;!(w=b.call(o)).done;)if(typeof(l=f(o,C,w.value,t))=="object"&&l&&l instanceof h)return l;return new h(!1)}).stop=function(s){return new h(!0,s)}},{"../internals/an-object":223,"../internals/call-with-safe-iteration-closing":228,"../internals/function-bind-context":248,"../internals/get-iterator-method":250,"../internals/is-array-iterator-method":260,"../internals/to-length":307}],267:[function(c,T,O){var y,p,v,d=c("../internals/object-get-prototype-of"),m=c("../internals/create-non-enumerable-property"),f=c("../internals/has"),h=c("../internals/well-known-symbol"),s=c("../internals/is-pure"),i=h("iterator"),e=!1;[].keys&&("next"in(v=[].keys())?(p=d(d(v)))!==Object.prototype&&(y=p):e=!0),y==null&&(y={}),s||f(y,i)||m(y,i,function(){return this}),T.exports={IteratorPrototype:y,BUGGY_SAFARI_ITERATORS:e}},{"../internals/create-non-enumerable-property":236,"../internals/has":252,"../internals/is-pure":264,"../internals/object-get-prototype-of":283,"../internals/well-known-symbol":314}],268:[function(c,T,O){arguments[4][253][0].apply(O,arguments)},{dup:253}],269:[function(c,T,O){var y,p,v,d,m,f,h,s,i=c("../internals/global"),e=c("../internals/object-get-own-property-descriptor").f,t=c("../internals/classof-raw"),r=c("../internals/task").set,o=c("../internals/engine-is-ios"),n=i.MutationObserver||i.WebKitMutationObserver,a=i.process,u=i.Promise,l=t(a)=="process",b=e(i,"queueMicrotask"),w=b&&b.value;w||(y=function(){var C,R;for(l&&(C=a.domain)&&C.exit();p;){R=p.fn,p=p.next;try{R()}catch(A){throw p?d():v=void 0,A}}v=void 0,C&&C.enter()},l?d=function(){a.nextTick(y)}:n&&!o?(m=!0,f=document.createTextNode(""),new n(y).observe(f,{characterData:!0}),d=function(){f.data=m=!m}):u&&u.resolve?(h=u.resolve(void 0),s=h.then,d=function(){s.call(h,y)}):d=function(){r.call(i,y)}),T.exports=w||function(C){var R={fn:C,next:void 0};v&&(v.next=R),p||(p=R,d()),v=R}},{"../internals/classof-raw":230,"../internals/engine-is-ios":242,"../internals/global":251,"../internals/object-get-own-property-descriptor":279,"../internals/task":303}],270:[function(c,T,O){var y=c("../internals/global");T.exports=y.Promise},{"../internals/global":251}],271:[function(c,T,O){var y=c("../internals/fails");T.exports=!!Object.getOwnPropertySymbols&&!y(function(){return!String(Symbol())})},{"../internals/fails":247}],272:[function(c,T,O){var y=c("../internals/global"),p=c("../internals/inspect-source"),v=y.WeakMap;T.exports=typeof v=="function"&&/native code/.test(p(v))},{"../internals/global":251,"../internals/inspect-source":258}],273:[function(c,T,O){var y=c("../internals/a-function"),p=function(v){var d,m;this.promise=new v(function(f,h){if(d!==void 0||m!==void 0)throw TypeError("Bad Promise constructor");d=f,m=h}),this.resolve=y(d),this.reject=y(m)};T.exports.f=function(v){return new p(v)}},{"../internals/a-function":219}],274:[function(c,T,O){var y=c("../internals/is-regexp");T.exports=function(p){if(y(p))throw TypeError("The method doesn't accept regular expressions");return p}},{"../internals/is-regexp":265}],275:[function(c,T,O){var y=c("../internals/descriptors"),p=c("../internals/fails"),v=c("../internals/object-keys"),d=c("../internals/object-get-own-property-symbols"),m=c("../internals/object-property-is-enumerable"),f=c("../internals/to-object"),h=c("../internals/indexed-object"),s=Object.assign,i=Object.defineProperty;T.exports=!s||p(function(){if(y&&s({b:1},s(i({},"a",{enumerable:!0,get:function(){i(this,"b",{value:3,enumerable:!1})}}),{b:2})).b!==1)return!0;var e={},t={},r=Symbol();return e[r]=7,"abcdefghijklmnopqrst".split("").forEach(function(o){t[o]=o}),s({},e)[r]!=7||v(s({},t)).join("")!="abcdefghijklmnopqrst"})?function(e,t){for(var r=f(e),o=arguments.length,n=1,a=d.f,u=m.f;o>n;)for(var l,b=h(arguments[n++]),w=a?v(b).concat(a(b)):v(b),C=w.length,R=0;C>R;)l=w[R++],y&&!u.call(b,l)||(r[l]=b[l]);return r}:s},{"../internals/descriptors":240,"../internals/fails":247,"../internals/indexed-object":257,"../internals/object-get-own-property-symbols":282,"../internals/object-keys":285,"../internals/object-property-is-enumerable":286,"../internals/to-object":308}],276:[function(c,T,O){var y,p=c("../internals/an-object"),v=c("../internals/object-define-properties"),d=c("../internals/enum-bug-keys"),m=c("../internals/hidden-keys"),f=c("../internals/html"),h=c("../internals/document-create-element"),s=c("../internals/shared-key"),i=s("IE_PROTO"),e=function(){},t=function(o){return"