You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
2 lines
17 KiB
2 lines
17 KiB
2 months ago
|
/*! wmf.js (C) 2020-present SheetJS LLC -- https://sheetjs.com */
|
||
|
module.exports=function(r){var i={};function s(t){if(i[t])return i[t].exports;var e=i[t]={i:t,l:!1,exports:{}};return r[t].call(e.exports,e,e.exports,s),e.l=!0,e.exports}return s.m=r,s.c=i,s.d=function(t,e,r){s.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:r})},s.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},s.t=function(e,t){if(1&t&&(e=s(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(s.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)s.d(r,i,function(t){return e[t]}.bind(null,i));return r},s.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return s.d(e,"a",e),e},s.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},s.p="",s(s.s=2)}([function(t,a,e){"use strict";Object.defineProperty(a,"__esModule",{value:!0});var r,c=!("undefined"==typeof Buffer||"undefined"==typeof process||void 0===process.versions||!process.versions.node);if(a.has_buf=c,a.Buffer_from=r,"undefined"!=typeof Buffer){var i=!Buffer.from;if(!i)try{Buffer.from("foo","utf8")}catch(t){i=!0}a.Buffer_from=r=i?function(t,e){return e?new Buffer(t,e):new Buffer(t)}:Buffer.from.bind(Buffer),Buffer.alloc||(Buffer.alloc=function(t){return new Buffer(t)}),Buffer.allocUnsafe||(Buffer.allocUnsafe=function(t){return new Buffer(t)})}a.new_raw_buf=function(t){return c?Buffer.alloc(t):new Array(t)},a.new_unsafe_buf=function(t){return c?Buffer.allocUnsafe(t):new Array(t)},a._chr=function(t){return String.fromCharCode(t)},a.chr0=/\u0000/g,a.chr1=/[\u0001-\u0006]/g;var l,s,u=function(t,e){return t[e]},d=function(t,e){return 256*t[e+1]+t[e]},_=function(t,e){var r=256*t[e+1]+t[e];return r<32768?r:-1*(65535-r+1)},p=function(t,e){return t[e+3]*(1<<24)+(t[e+2]<<16)+(t[e+1]<<8)+t[e]},E=function(t,e){return t[e+3]<<24|t[e+2]<<16|t[e+1]<<8|t[e]},g=function(t,e){return t[e]<<24|t[e+1]<<16|t[e+2]<<8|t[e+3]},b=function(t,e,r){for(var i=[],s=e;s<r;s+=2)i.push(String.fromCharCode(d(t,s)));return i.join("").replace(a.chr0,"")},n=a.__utf16le=b,v=function(t,e,r){for(var i=[],s=e;s<e+r;++s)i.push(("0"+t[s].toString(16)).slice(-2));return i.join("")},f=v,T=function(t,e,r){for(var i=[],s=e;s<r;s++)i.push(String.fromCharCode(u(t,s)));return i.join("")},h=T,S=function(t,e){var r=p(t,e);return 0<r?T(t,e+4,e+4+r-1):""},o=S,C=function(t,e){var r=p(t,e);return 0<r?T(t,e+4,e+4+r-1):""},M=C,y=function(t,e){var r=2*p(t,e);return 0<r?T(t,e+4,e+4+r-1):""},A=y;l=s=function(t,e){var r=p(t,e);return 0<r?b(t,e+4,e+4+r):""};function w(t,e){var r=p(t,e);return 0<r?T(t,e+4,e+4+r):""}function B(t,e){return function(t,e){for(var r=1-2*(t[e+7]>>>7),i=((127&t[e+7])<<4)+(t[e+6]>>>4&15),s=15&t[e+6],a=5;0<=a;--a)s=256*s+t[e+a];return 2047==i?0==s?1/0*r:NaN:(0==i?i=-1022:(i-=1023,s+=Math.pow(2,52)),r*Math.pow(2,i-52)*s)}(t,e)}var m=w,O=B;function k(t,e){var r,i,s,a,n,f="",h=0,o=[];switch(e){case"dbcs":if(n=this.l,c&&Buffer.isBuffer(this))f=this.slice(this.l,this.l+2*t).toString("utf16le");else for(a=0;a<t;++a)f+=String.fromCharCode(d(this,n)),n+=2;t*=2;break;case"utf8":f=T(this,this.l,this.l+t);break;case"utf16le":t*=2,f=b(this,this.l,this.l+t);break;case"wstr":return k.call(this,t,"dbcs");case"lpstr-ansi":f=S(this,this.l),t=4+p(this,this.l);break;case"lpstr-cp":f=C(this,this.l),t=4+p(this,this.l);break;case"lpwstr":f=y(this,this.l),t=4+2*p(this,this.l);break;case"lpp4":t=4+p(this,this.l),f=l(this,this.l),2&t&&(t+=2);break;case"8lpp4":t=4+p(this,this.l),f=m(this,this.l),3&t&&(t+=4-(3&t));break;case"cstr":for(t=0,f="";0!==(i=u(this,this.l+t++));)o.push(String.fromCharCode(i));f=o.join("");break;case"_wstr":for(t=0,f="";0!==(i=d(this,this.l+t));)o.push(String.fromCharCode(i)),t+=2;t+=2,f=o.join("");break;case"dbcs-cont":for(f="",n=this.l,a=0;a<t;++a){if(this.lens&&-1!==this.lens.indexOf(n))return i=u(this,n),this.l=n+1,s=k.call(this,t-a,i?"dbcs-cont":"sbcs-cont"),o.join("")+s;o.push(String.fromCharCode(d(this,n))),n+=2}f=o.join(""),t*=2
|