3 lines
371 KiB
JavaScript
3 lines
371 KiB
JavaScript
|
|
try{let be=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},H=new be.Error().stack;H&&(be._sentryDebugIds=be._sentryDebugIds||{},be._sentryDebugIds[H]="7834e1fb-ca27-43f9-a988-1bdb6317eacf",be._sentryDebugIdIdentifier="sentry-dbid-7834e1fb-ca27-43f9-a988-1bdb6317eacf")}catch(be){}{let be=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{};be.SENTRY_RELEASE={id:"22.14.4"}}(self.webpackChunk_mb2024_mb_proto=self.webpackChunk_mb2024_mb_proto||[]).push([[437],{1685:(be,H,m)=>{"use strict";m.r(H),m.d(H,{fontkitCreate:()=>Fn});const G={utf16le:"utf-16le",ucs2:"utf-16le",utf16be:"utf-16be"};class w{constructor(e){this.buffer=e,this.view=new DataView(e.buffer,e.byteOffset,e.byteLength),this.pos=0,this.length=this.buffer.length}readString(e,t){t===void 0&&(t="ascii"),t=G[t]||t;let r=this.readBuffer(e);try{return new TextDecoder(t).decode(r)}catch(n){return r}}readBuffer(e){return this.buffer.slice(this.pos,this.pos+=e)}readUInt24BE(){return(this.readUInt16BE()<<8)+this.readUInt8()}readUInt24LE(){return this.readUInt16LE()+(this.readUInt8()<<16)}readInt24BE(){return(this.readInt16BE()<<8)+this.readUInt8()}readInt24LE(){return this.readUInt16LE()+(this.readInt8()<<16)}}w.TYPES={UInt8:1,UInt16:2,UInt24:3,UInt32:4,Int8:1,Int16:2,Int24:3,Int32:4,Float:4,Double:8};for(let s of Object.getOwnPropertyNames(DataView.prototype))if(s.slice(0,3)==="get"){let e=s.slice(3).replace("Ui","UI");e==="Float32"?e="Float":e==="Float64"&&(e="Double");let t=w.TYPES[e];w.prototype["read"+e+(t===1?"":"BE")]=function(){const r=this.view[s](this.pos,!1);return this.pos+=t,r},t!==1&&(w.prototype["read"+e+"LE"]=function(){const r=this.view[s](this.pos,!0);return this.pos+=t,r})}const N=new TextEncoder,D=new Uint8Array(new Uint16Array([4660]).buffer)[0]==18;class L{constructor(e){this.buffer=e,this.view=new DataView(this.buffer.buffer,this.buffer.byteOffset,this.buffer.byteLength),this.pos=0}writeBuffer(e){this.buffer.set(e,this.pos),this.pos+=e.length}writeString(e,t){t===void 0&&(t="ascii");let r;switch(t){case"utf16le":case"utf16-le":case"ucs2":r=M(e,D);break;case"utf16be":case"utf16-be":r=M(e,!D);break;case"utf8":r=N.encode(e);break;case"ascii":r=ce(e);break;default:throw new Error("Unsupported encoding: "+t)}this.writeBuffer(r)}writeUInt24BE(e){this.buffer[this.pos++]=e>>>16&255,this.buffer[this.pos++]=e>>>8&255,this.buffer[this.pos++]=e&255}writeUInt24LE(e){this.buffer[this.pos++]=e&255,this.buffer[this.pos++]=e>>>8&255,this.buffer[this.pos++]=e>>>16&255}writeInt24BE(e){e>=0?this.writeUInt24BE(e):this.writeUInt24BE(e+16777215+1)}writeInt24LE(e){e>=0?this.writeUInt24LE(e):this.writeUInt24LE(e+16777215+1)}fill(e,t){if(t<this.buffer.length)this.buffer.fill(e,this.pos,this.pos+t),this.pos+=t;else{const r=new Uint8Array(t);r.fill(e),this.writeBuffer(r)}}}function M(s,e){let t=new Uint16Array(s.length);for(let r=0;r<s.length;r++){let n=s.charCodeAt(r);e&&(n=n>>8|(n&255)<<8),t[r]=n}return new Uint8Array(t.buffer)}function ce(s){let e=new Uint8Array(s.length);for(let t=0;t<s.length;t++)e[t]=s.charCodeAt(t);return e}for(let s of Object.getOwnPropertyNames(DataView.prototype))if(s.slice(0,3)==="set"){let e=s.slice(3).replace("Ui","UI");e==="Float32"?e="Float":e==="Float64"&&(e="Double");let t=w.TYPES[e];L.prototype["write"+e+(t===1?"":"BE")]=function(r){this.view[s](this.pos,r,!1),this.pos+=t},t!==1&&(L.prototype["write"+e+"LE"]=function(r){this.view[s](this.pos,r,!0),this.pos+=t})}class oe{fromBuffer(e){let t=new w(e);return this.decode(t)}toBuffer(e){let t=this.size(e),r=new Uint8Array(t),n=new L(r);return this.encode(n,e),r}}class $ extends oe{constructor(e,t){t===void 0&&(t="BE"),super(),this.type=e,this.endian=t,this.fn=this.type,this.type[this.type.length-1]!=="8"&&(this.fn+=this.endian)}size(){return w.TYPES[this.type]}decode(e){return e["read"+this.fn]()}encode(e,t){return e["write"+this.fn](t)}}const y=new $("UInt8"),o=new $("UInt16","BE"),R=new $("UInt16","LE"),ne=new $("UInt24","BE"),Se=new $("UInt24","LE"),p=new $("UInt32","BE"),W=new $("UI
|
||
|
|
|
||
|
|
//# sourceMappingURL=lazy-lib-fontkit-94d1920236ee8aff3185.js.map
|