@mappedin/mappedin-js 5.29.3 → 5.29.4-alpha.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1 +1 @@
1
- import{A as Re,B as Ne,C as be,D as Se,N as z,P as _e,Qa as v,V as k,Y as Ue,aa as Le,ca as O,e as de,j as ge,k as xe,l as me,m as Te,n as ye,o as we,p as Me,q as Ie,r as Ae,ra as F,x as Ee}from"./chunk-EPUV4SBJ.js";import{a as pe}from"./chunk-I5VIUPV4.js";import{a as T}from"./chunk-ZRT45YCM.js";pe();var Ce={POSITION:["byte","byte normalized","unsigned byte","unsigned byte normalized","short","short normalized","unsigned short","unsigned short normalized"],NORMAL:["byte normalized","short normalized"],TANGENT:["byte normalized","short normalized"],TEXCOORD:["byte","byte normalized","unsigned byte","short","short normalized","unsigned short"]},ee=class{constructor(){this.pluginCallbacks=[],this.register((function(e){return new Y(e)})),this.register((function(e){return new j(e)})),this.register((function(e){return new W(e)})),this.register((function(e){return new X(e)})),this.register((function(e){return new J(e)})),this.register((function(e){return new Z(e)})),this.register((function(e){return new K(e)})),this.register((function(e){return new q(e)})),this.register((function(e){return new Q(e)})),this.register((function(e){return new $(e)}))}register(e){return-1===this.pluginCallbacks.indexOf(e)&&this.pluginCallbacks.push(e),this}unregister(e){return-1!==this.pluginCallbacks.indexOf(e)&&this.pluginCallbacks.splice(this.pluginCallbacks.indexOf(e),1),this}parse(e,t,s,r){let i=new G,n=[];for(let e=0,t=this.pluginCallbacks.length;e<t;e++)n.push(this.pluginCallbacks[e](i));i.setPlugins(n),i.write(e,t,r).catch(s)}parseAsync(e,t){let s=this;return new Promise((function(r,i){s.parse(e,r,i,t)}))}};T(ee,"GLTFExporter");var P=ee,g={POINTS:0,LINES:1,LINE_LOOP:2,LINE_STRIP:3,TRIANGLES:4,TRIANGLE_STRIP:5,TRIANGLE_FAN:6,BYTE:5120,UNSIGNED_BYTE:5121,SHORT:5122,UNSIGNED_SHORT:5123,INT:5124,UNSIGNED_INT:5125,FLOAT:5126,ARRAY_BUFFER:34962,ELEMENT_ARRAY_BUFFER:34963,NEAREST:9728,LINEAR:9729,NEAREST_MIPMAP_NEAREST:9984,LINEAR_MIPMAP_NEAREST:9985,NEAREST_MIPMAP_LINEAR:9986,LINEAR_MIPMAP_LINEAR:9987,CLAMP_TO_EDGE:33071,MIRRORED_REPEAT:33648,REPEAT:10497},H="KHR_mesh_quantization",N={};N[Te]=g.NEAREST,N[ye]=g.NEAREST_MIPMAP_NEAREST,N[we]=g.NEAREST_MIPMAP_LINEAR,N[Me]=g.LINEAR,N[Ie]=g.LINEAR_MIPMAP_NEAREST,N[Ae]=g.LINEAR_MIPMAP_LINEAR,N[xe]=g.CLAMP_TO_EDGE,N[ge]=g.REPEAT,N[me]=g.MIRRORED_REPEAT;var Oe={scale:"scale",position:"translation",quaternion:"rotation",morphTargetInfluences:"weights"},Fe=new Le,ve=12,He=1179937895,Ve=2,De=8,Ge=1313821514,Ye=5130562;function D(e,t){return e.length===t.length&&e.every((function(e,s){return e===t[s]}))}function je(e){return(new TextEncoder).encode(e).buffer}function Ke(e){return D(e.elements,[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1])}function qe(e,t,s){let r={min:new Array(e.itemSize).fill(Number.POSITIVE_INFINITY),max:new Array(e.itemSize).fill(Number.NEGATIVE_INFINITY)};for(let i=t;i<t+s;i++)for(let t=0;t<e.itemSize;t++){let s;e.itemSize>4?s=e.array[i*e.itemSize+t]:(0===t?s=e.getX(i):1===t?s=e.getY(i):2===t?s=e.getZ(i):3===t&&(s=e.getW(i)),!0===e.normalized&&(s=z.normalize(s,e.array))),r.min[t]=Math.min(r.min[t],s),r.max[t]=Math.max(r.max[t],s)}return r}function Be(e){return 4*Math.ceil(e/4)}function V(e,t=0){let s=Be(e.byteLength);if(s!==e.byteLength){let r=new Uint8Array(s);if(r.set(new Uint8Array(e)),0!==t)for(let i=e.byteLength;i<s;i++)r[i]=t;return r.buffer}return e}function ze(){return typeof document>"u"&&typeof OffscreenCanvas<"u"?new OffscreenCanvas(1,1):document.createElement("canvas")}function Pe(e,t){if(void 0!==e.toBlob)return new Promise((s=>e.toBlob(s,t)));let s;return"image/jpeg"===t?s=.92:"image/webp"===t&&(s=.8),e.convertToBlob({type:t,quality:s})}T(D,"equalArray"),T(je,"stringToArrayBuffer"),T(Ke,"isIdentityMatrix"),T(qe,"getMinMax"),T(Be,"getPaddedBufferSize"),T(V,"getPaddedArrayBuffer"),T(ze,"getCanvas"),T(Pe,"getToBlobPromise");var se=class{constructor(){this.plugins=[],this.options={},this.pending=[],this.buffers=[],this.byteOffset=0,this.buffers=[],this.nodeMap=new Map,this.skins=[],this.extensionsUsed={},this.extensionsRequired={},this.uids=new Map,this.uid=0,this.json={asset:{version:"2.0",generator:"THREE.GLTFExporter"}},this.cache={meshes:new Map,attributes:new Map,attributesNormalized:new Map,materials:new Map,textures:new Map,images:new Map}}setPlugins(e){this.plugins=e}async write(e,t,s={}){this.options=Object.assign({binary:!1,trs:!1,onlyVisible:!0,maxTextureSize:1/0,animations:[],includeCustomExtensions:!1},s),this.options.animations.length>0&&(this.options.trs=!0),this.processInput(e),await Promise.all(this.pending);let r=this,i=r.buffers,n=r.json;s=r.options;let a=r.extensionsUsed,o=r.extensionsRequired,l=new Blob(i,{type:"application/octet-stream"}),u=Object.keys(a),h=Object.keys(o);if(u.length>0&&(n.extensionsUsed=u),h.length>0&&(n.extensionsRequired=h),n.buffers&&n.buffers.length>0&&(n.buffers[0].byteLength=l.size),!0===s.binary){let e=new FileReader;e.readAsArrayBuffer(l),e.onloadend=function(){let s=V(e.result),r=new DataView(new ArrayBuffer(De));r.setUint32(0,s.byteLength,!0),r.setUint32(4,Ye,!0);let i=V(je(JSON.stringify(n)),32),a=new DataView(new ArrayBuffer(De));a.setUint32(0,i.byteLength,!0),a.setUint32(4,Ge,!0);let o=new ArrayBuffer(ve),l=new DataView(o);l.setUint32(0,He,!0),l.setUint32(4,Ve,!0);let u=ve+a.byteLength+i.byteLength+r.byteLength+s.byteLength;l.setUint32(8,u,!0);let h=new Blob([o,a,i,r,s],{type:"application/octet-stream"}),c=new FileReader;c.readAsArrayBuffer(h),c.onloadend=function(){t(c.result)}}}else if(n.buffers&&n.buffers.length>0){let e=new FileReader;e.readAsDataURL(l),e.onloadend=function(){let s=e.result;n.buffers[0].uri=s,t(n)}}else t(n)}serializeUserData(e,t){if(0===Object.keys(e.userData).length)return;let s=this.options,r=this.extensionsUsed;try{let i=JSON.parse(JSON.stringify(e.userData));if(s.includeCustomExtensions&&i.gltfExtensions){void 0===t.extensions&&(t.extensions={});for(let e in i.gltfExtensions)t.extensions[e]=i.gltfExtensions[e],r[e]=!0;delete i.gltfExtensions}Object.keys(i).length>0&&(t.extras=i)}catch(t){console.warn("THREE.GLTFExporter: userData of '"+e.name+"' won't be serialized because of JSON.stringify error - "+t.message)}}getUID(e,t=!1){if(!1===this.uids.has(e)){let t=new Map;t.set(!0,this.uid++),t.set(!1,this.uid++),this.uids.set(e,t)}return this.uids.get(e).get(t)}isNormalizedNormalAttribute(e){if(this.cache.attributesNormalized.has(e))return!1;let t=new k;for(let s=0,r=e.count;s<r;s++)if(Math.abs(t.fromBufferAttribute(e,s).length()-1)>5e-4)return!1;return!0}createNormalizedNormalAttribute(e){let t=this.cache;if(t.attributesNormalized.has(e))return t.attributesNormalized.get(e);let s=e.clone(),r=new k;for(let e=0,t=s.count;e<t;e++)r.fromBufferAttribute(s,e),0===r.x&&0===r.y&&0===r.z?r.setX(1):r.normalize(),s.setXYZ(e,r.x,r.y,r.z);return t.attributesNormalized.set(e,s),s}applyTextureTransform(e,t){let s=!1,r={};(0!==t.offset.x||0!==t.offset.y)&&(r.offset=t.offset.toArray(),s=!0),0!==t.rotation&&(r.rotation=t.rotation,s=!0),(1!==t.repeat.x||1!==t.repeat.y)&&(r.scale=t.repeat.toArray(),s=!0),s&&(e.extensions=e.extensions||{},e.extensions.KHR_texture_transform=r,this.extensionsUsed.KHR_texture_transform=!0)}buildMetalRoughTexture(e,t){if(e===t)return e;function s(e){return e.encoding===Se?T((function(e){return e<.04045?.0773993808*e:Math.pow(.9478672986*e+.0521327014,2.4)}),"SRGBToLinear"):T((function(e){return e}),"LinearToLinear")}T(s,"getEncodingConversion"),console.warn("THREE.GLTFExporter: Merged metalnessMap and roughnessMap textures.");let r=e?e.image:null,i=t?t.image:null,n=Math.max(r?r.width:0,i?i.width:0),a=Math.max(r?r.height:0,i?i.height:0),o=ze();o.width=n,o.height=a;let l=o.getContext("2d");l.fillStyle="#00ffff",l.fillRect(0,0,n,a);let u=l.getImageData(0,0,n,a);if(r){l.drawImage(r,0,0,n,a);let t=s(e),i=l.getImageData(0,0,n,a).data;for(let e=2;e<i.length;e+=4)u.data[e]=256*t(i[e]/256)}if(i){l.drawImage(i,0,0,n,a);let e=s(t),r=l.getImageData(0,0,n,a).data;for(let t=1;t<r.length;t+=4)u.data[t]=256*e(r[t]/256)}l.putImageData(u,0,0);let h=(e||t).clone();return h.source=new _e(o),h.encoding=be,h}processBuffer(e){let t=this.json,s=this.buffers;return t.buffers||(t.buffers=[{byteLength:0}]),s.push(e),0}processBufferView(e,t,s,r,i){let n,a=this.json;switch(a.bufferViews||(a.bufferViews=[]),t){case g.BYTE:case g.UNSIGNED_BYTE:n=1;break;case g.SHORT:case g.UNSIGNED_SHORT:n=2;break;default:n=4}let o=Be(r*e.itemSize*n),l=new DataView(new ArrayBuffer(o)),u=0;for(let i=s;i<s+r;i++)for(let s=0;s<e.itemSize;s++){let r;e.itemSize>4?r=e.array[i*e.itemSize+s]:(0===s?r=e.getX(i):1===s?r=e.getY(i):2===s?r=e.getZ(i):3===s&&(r=e.getW(i)),!0===e.normalized&&(r=z.normalize(r,e.array))),t===g.FLOAT?l.setFloat32(u,r,!0):t===g.INT?l.setInt32(u,r,!0):t===g.UNSIGNED_INT?l.setUint32(u,r,!0):t===g.SHORT?l.setInt16(u,r,!0):t===g.UNSIGNED_SHORT?l.setUint16(u,r,!0):t===g.BYTE?l.setInt8(u,r):t===g.UNSIGNED_BYTE&&l.setUint8(u,r),u+=n}let h={buffer:this.processBuffer(l.buffer),byteOffset:this.byteOffset,byteLength:o};return void 0!==i&&(h.target=i),i===g.ARRAY_BUFFER&&(h.byteStride=e.itemSize*n),this.byteOffset+=o,a.bufferViews.push(h),{id:a.bufferViews.length-1,byteLength:0}}processBufferViewImage(e){let t=this,s=t.json;return s.bufferViews||(s.bufferViews=[]),new Promise((function(r){let i=new FileReader;i.readAsArrayBuffer(e),i.onloadend=function(){let e=V(i.result),n={buffer:t.processBuffer(e),byteOffset:t.byteOffset,byteLength:e.byteLength};t.byteOffset+=e.byteLength,r(s.bufferViews.push(n)-1)}}))}processAccessor(e,t,s,r){let i,n=this.json;if(e.array.constructor===Float32Array)i=g.FLOAT;else if(e.array.constructor===Int32Array)i=g.INT;else if(e.array.constructor===Uint32Array)i=g.UNSIGNED_INT;else if(e.array.constructor===Int16Array)i=g.SHORT;else if(e.array.constructor===Uint16Array)i=g.UNSIGNED_SHORT;else if(e.array.constructor===Int8Array)i=g.BYTE;else{if(e.array.constructor!==Uint8Array)throw new Error("THREE.GLTFExporter: Unsupported bufferAttribute component type.");i=g.UNSIGNED_BYTE}if(void 0===s&&(s=0),void 0===r&&(r=e.count),0===r)return null;let a,o=qe(e,s,r);void 0!==t&&(a=e===t.index?g.ELEMENT_ARRAY_BUFFER:g.ARRAY_BUFFER);let l=this.processBufferView(e,i,s,r,a),u={bufferView:l.id,byteOffset:l.byteOffset,componentType:i,count:r,max:o.max,min:o.min,type:{1:"SCALAR",2:"VEC2",3:"VEC3",4:"VEC4",9:"MAT3",16:"MAT4"}[e.itemSize]};return!0===e.normalized&&(u.normalized=!0),n.accessors||(n.accessors=[]),n.accessors.push(u)-1}processImage(e,t,s,r="image/png"){if(null!==e){let i=this,n=i.cache,a=i.json,o=i.options,l=i.pending;n.images.has(e)||n.images.set(e,{});let u=n.images.get(e),h=r+":flipY/"+s.toString();if(void 0!==u[h])return u[h];a.images||(a.images=[]);let c={mimeType:r},p=ze();p.width=Math.min(e.width,o.maxTextureSize),p.height=Math.min(e.height,o.maxTextureSize);let m=p.getContext("2d");if(!0===s&&(m.translate(0,p.height),m.scale(1,-1)),void 0!==e.data){t!==Ee&&console.error("GLTFExporter: Only RGBAFormat is supported."),(e.width>o.maxTextureSize||e.height>o.maxTextureSize)&&console.warn("GLTFExporter: Image size is bigger than maxTextureSize",e);let s=new Uint8ClampedArray(e.height*e.width*4);for(let t=0;t<s.length;t+=4)s[t+0]=e.data[t+0],s[t+1]=e.data[t+1],s[t+2]=e.data[t+2],s[t+3]=e.data[t+3];m.putImageData(new ImageData(s,e.width,e.height),0,0)}else m.drawImage(e,0,0,p.width,p.height);!0===o.binary?l.push(Pe(p,r).then((e=>i.processBufferViewImage(e))).then((e=>{c.bufferView=e}))):void 0!==p.toDataURL?c.uri=p.toDataURL(r):l.push(Pe(p,r).then((e=>(new FileReader).readAsDataURL(e))).then((e=>{c.uri=e})));let g=a.images.push(c)-1;return u[h]=g,g}throw new Error("THREE.GLTFExporter: No valid image data found. Unable to process texture.")}processSampler(e){let t=this.json;t.samplers||(t.samplers=[]);let s={magFilter:N[e.magFilter],minFilter:N[e.minFilter],wrapS:N[e.wrapS],wrapT:N[e.wrapT]};return t.samplers.push(s)-1}processTexture(e){let t=this.cache,s=this.json;if(t.textures.has(e))return t.textures.get(e);s.textures||(s.textures=[]);let r=e.userData.mimeType;"image/webp"===r&&(r="image/png");let i={sampler:this.processSampler(e),source:this.processImage(e.image,e.format,e.flipY,r)};e.name&&(i.name=e.name),this._invokeAll((function(t){t.writeTexture&&t.writeTexture(e,i)}));let n=s.textures.push(i)-1;return t.textures.set(e,n),n}processMaterial(e){let t=this.cache,s=this.json;if(t.materials.has(e))return t.materials.get(e);if(e.isShaderMaterial)return console.warn("GLTFExporter: THREE.ShaderMaterial not supported."),null;s.materials||(s.materials=[]);let r={pbrMetallicRoughness:{}};!0!==e.isMeshStandardMaterial&&!0!==e.isMeshBasicMaterial&&console.warn("GLTFExporter: Use MeshStandardMaterial or MeshBasicMaterial for best results.");let i=e.color.toArray().concat([e.opacity]);if(D(i,[1,1,1,1])||(r.pbrMetallicRoughness.baseColorFactor=i),e.isMeshStandardMaterial?(r.pbrMetallicRoughness.metallicFactor=e.metalness,r.pbrMetallicRoughness.roughnessFactor=e.roughness):(r.pbrMetallicRoughness.metallicFactor=.5,r.pbrMetallicRoughness.roughnessFactor=.5),e.metalnessMap||e.roughnessMap){let t=this.buildMetalRoughTexture(e.metalnessMap,e.roughnessMap),s={index:this.processTexture(t)};this.applyTextureTransform(s,t),r.pbrMetallicRoughness.metallicRoughnessTexture=s}if(e.map){let t={index:this.processTexture(e.map)};this.applyTextureTransform(t,e.map),r.pbrMetallicRoughness.baseColorTexture=t}if(e.emissive){let t=e.emissive;if(Math.max(t.r,t.g,t.b)>0&&(r.emissiveFactor=e.emissive.toArray()),e.emissiveMap){let t={index:this.processTexture(e.emissiveMap)};this.applyTextureTransform(t,e.emissiveMap),r.emissiveTexture=t}}if(e.normalMap){let t={index:this.processTexture(e.normalMap)};e.normalScale&&1!==e.normalScale.x&&(t.scale=e.normalScale.x),this.applyTextureTransform(t,e.normalMap),r.normalTexture=t}if(e.aoMap){let t={index:this.processTexture(e.aoMap),texCoord:1};1!==e.aoMapIntensity&&(t.strength=e.aoMapIntensity),this.applyTextureTransform(t,e.aoMap),r.occlusionTexture=t}e.transparent?r.alphaMode="BLEND":e.alphaTest>0&&(r.alphaMode="MASK",r.alphaCutoff=e.alphaTest),e.side===de&&(r.doubleSided=!0),""!==e.name&&(r.name=e.name),this.serializeUserData(e,r),this._invokeAll((function(t){t.writeMaterial&&t.writeMaterial(e,r)}));let n=s.materials.push(r)-1;return t.materials.set(e,n),n}processMesh(e){let t=this.cache,s=this.json,r=[e.geometry.uuid];if(Array.isArray(e.material))for(let t=0,s=e.material.length;t<s;t++)r.push(e.material[t].uuid);else r.push(e.material.uuid);let i=r.join(":");if(t.meshes.has(i))return t.meshes.get(i);let n,a=e.geometry;n=e.isLineSegments?g.LINES:e.isLineLoop?g.LINE_LOOP:e.isLine?g.LINE_STRIP:e.isPoints?g.POINTS:e.material.wireframe?g.LINES:g.TRIANGLES;let o={},l={},u=[],h=[],c={uv:"TEXCOORD_0",uv2:"TEXCOORD_1",color:"COLOR_0",skinWeight:"WEIGHTS_0",skinIndex:"JOINTS_0"},p=a.getAttribute("normal");void 0!==p&&!this.isNormalizedNormalAttribute(p)&&(console.warn("THREE.GLTFExporter: Creating normalized normal attribute from the non-normalized one."),a.setAttribute("normal",this.createNormalizedNormalAttribute(p)));let m=null;for(let e in a.attributes){if("morph"===e.slice(0,5))continue;let s=a.attributes[e];if(e=c[e]||e.toUpperCase(),/^(POSITION|NORMAL|TANGENT|TEXCOORD_\d+|COLOR_\d+|JOINTS_\d+|WEIGHTS_\d+)$/.test(e)||(e="_"+e),t.attributes.has(this.getUID(s))){l[e]=t.attributes.get(this.getUID(s));continue}m=null;let r=s.array;"JOINTS_0"===e&&!(r instanceof Uint16Array)&&!(r instanceof Uint8Array)&&(console.warn('GLTFExporter: Attribute "skinIndex" converted to type UNSIGNED_SHORT.'),m=new O(new Uint16Array(r),s.itemSize,s.normalized));let i=this.processAccessor(m||s,a);null!==i&&(e.startsWith("_")||this.detectMeshQuantization(e,s),l[e]=i,t.attributes.set(this.getUID(s),i))}if(void 0!==p&&a.setAttribute("normal",p),0===Object.keys(l).length)return null;if(void 0!==e.morphTargetInfluences&&e.morphTargetInfluences.length>0){let s=[],r=[],i={};if(void 0!==e.morphTargetDictionary)for(let t in e.morphTargetDictionary)i[e.morphTargetDictionary[t]]=t;for(let n=0;n<e.morphTargetInfluences.length;++n){let o={},l=!1;for(let e in a.morphAttributes){if("position"!==e&&"normal"!==e){l||(console.warn("GLTFExporter: Only POSITION and NORMAL morph are supported."),l=!0);continue}let s=a.morphAttributes[e][n],r=e.toUpperCase(),i=a.attributes[e];if(t.attributes.has(this.getUID(s,!0))){o[r]=t.attributes.get(this.getUID(s,!0));continue}let u=s.clone();if(!a.morphTargetsRelative)for(let e=0,t=s.count;e<t;e++)for(let t=0;t<s.itemSize;t++)0===t&&u.setX(e,s.getX(e)-i.getX(e)),1===t&&u.setY(e,s.getY(e)-i.getY(e)),2===t&&u.setZ(e,s.getZ(e)-i.getZ(e)),3===t&&u.setW(e,s.getW(e)-i.getW(e));o[r]=this.processAccessor(u,a),t.attributes.set(this.getUID(i,!0),o[r])}h.push(o),s.push(e.morphTargetInfluences[n]),void 0!==e.morphTargetDictionary&&r.push(i[n])}o.weights=s,r.length>0&&(o.extras={},o.extras.targetNames=r)}let f=Array.isArray(e.material);if(f&&0===a.groups.length)return null;let d=f?e.material:[e.material],T=f?a.groups:[{materialIndex:0,start:void 0,count:void 0}];for(let e=0,s=T.length;e<s;e++){let s={mode:n,attributes:l};if(this.serializeUserData(a,s),h.length>0&&(s.targets=h),null!==a.index){let r=this.getUID(a.index);(void 0!==T[e].start||void 0!==T[e].count)&&(r+=":"+T[e].start+":"+T[e].count),t.attributes.has(r)?s.indices=t.attributes.get(r):(s.indices=this.processAccessor(a.index,a,T[e].start,T[e].count),t.attributes.set(r,s.indices)),null===s.indices&&delete s.indices}let r=this.processMaterial(d[T[e].materialIndex]);null!==r&&(s.material=r),u.push(s)}o.primitives=u,s.meshes||(s.meshes=[]),this._invokeAll((function(t){t.writeMesh&&t.writeMesh(e,o)}));let x=s.meshes.push(o)-1;return t.meshes.set(i,x),x}detectMeshQuantization(e,t){if(this.extensionsUsed[H])return;let s;switch(t.array.constructor){case Int8Array:s="byte";break;case Uint8Array:s="unsigned byte";break;case Int16Array:s="short";break;case Uint16Array:s="unsigned short";break;default:return}t.normalized&&(s+=" normalized");let r=e.split("_",1)[0];Ce[r]&&Ce[r].includes(s)&&(this.extensionsUsed[H]=!0,this.extensionsRequired[H]=!0)}processCamera(e){let t=this.json;t.cameras||(t.cameras=[]);let s=e.isOrthographicCamera,r={type:s?"orthographic":"perspective"};return s?r.orthographic={xmag:2*e.right,ymag:2*e.top,zfar:e.far<=0?.001:e.far,znear:e.near<0?0:e.near}:r.perspective={aspectRatio:e.aspect,yfov:z.degToRad(e.fov),zfar:e.far<=0?.001:e.far,znear:e.near<0?0:e.near},""!==e.name&&(r.name=e.type),t.cameras.push(r)-1}processAnimation(e,t){let s=this.json,r=this.nodeMap;s.animations||(s.animations=[]);let i=(e=P.Utils.mergeMorphTargetTracks(e.clone(),t)).tracks,n=[],a=[];for(let e=0;e<i.length;++e){let s=i[e],o=v.parseTrackName(s.name),l=v.findNode(t,o.nodeName),u=Oe[o.propertyName];if("bones"===o.objectName&&(l=!0===l.isSkinnedMesh?l.skeleton.getBoneByName(o.objectIndex):void 0),!l||!u)return console.warn('THREE.GLTFExporter: Could not export animation track "%s".',s.name),null;let h,c=1,p=s.values.length/s.times.length;u===Oe.morphTargetInfluences&&(p/=l.morphTargetInfluences.length),!0===s.createInterpolant.isInterpolantFactoryMethodGLTFCubicSpline?(h="CUBICSPLINE",p/=3):h=s.getInterpolation()===Re?"STEP":"LINEAR",a.push({input:this.processAccessor(new O(s.times,c)),output:this.processAccessor(new O(s.values,p)),interpolation:h}),n.push({sampler:a.length-1,target:{node:r.get(l),path:u}})}return s.animations.push({name:e.name||"clip_"+s.animations.length,samplers:a,channels:n}),s.animations.length-1}processSkin(e){let t=this.json,s=this.nodeMap,r=t.nodes[s.get(e)],i=e.skeleton;if(void 0===i)return null;let n=e.skeleton.bones[0];if(void 0===n)return null;let a=[],o=new Float32Array(16*i.bones.length),l=new Ue;for(let t=0;t<i.bones.length;++t)a.push(s.get(i.bones[t])),l.copy(i.boneInverses[t]),l.multiply(e.bindMatrix).toArray(o,16*t);return void 0===t.skins&&(t.skins=[]),t.skins.push({inverseBindMatrices:this.processAccessor(new O(o,16)),joints:a,skeleton:s.get(n)}),r.skin=t.skins.length-1}processNode(e){let t=this.json,s=this.options,r=this.nodeMap;t.nodes||(t.nodes=[]);let i={};if(s.trs){let t=e.quaternion.toArray(),s=e.position.toArray(),r=e.scale.toArray();D(t,[0,0,0,1])||(i.rotation=t),D(s,[0,0,0])||(i.translation=s),D(r,[1,1,1])||(i.scale=r)}else e.matrixAutoUpdate&&e.updateMatrix(),!1===Ke(e.matrix)&&(i.matrix=e.matrix.elements);if(""!==e.name&&(i.name=String(e.name)),this.serializeUserData(e,i),e.isMesh||e.isLine||e.isPoints){let t=this.processMesh(e);null!==t&&(i.mesh=t)}else e.isCamera&&(i.camera=this.processCamera(e));if(e.isSkinnedMesh&&this.skins.push(e),e.children.length>0){let t=[];for(let r=0,i=e.children.length;r<i;r++){let i=e.children[r];if(i.visible||!1===s.onlyVisible){let e=this.processNode(i);null!==e&&t.push(e)}}t.length>0&&(i.children=t)}this._invokeAll((function(t){t.writeNode&&t.writeNode(e,i)}));let n=t.nodes.push(i)-1;return r.set(e,n),n}processScene(e){let t=this.json,s=this.options;t.scenes||(t.scenes=[],t.scene=0);let r={};""!==e.name&&(r.name=e.name),t.scenes.push(r);let i=[];for(let t=0,r=e.children.length;t<r;t++){let r=e.children[t];if(r.visible||!1===s.onlyVisible){let e=this.processNode(r);null!==e&&i.push(e)}}i.length>0&&(r.nodes=i),this.serializeUserData(e,r)}processObjects(e){let t=new F;t.name="AuxScene";for(let s=0;s<e.length;s++)t.children.push(e[s]);this.processScene(t)}processInput(e){let t=this.options;e=e instanceof Array?e:[e],this._invokeAll((function(t){t.beforeParse&&t.beforeParse(e)}));let s=[];for(let t=0;t<e.length;t++)e[t]instanceof F?this.processScene(e[t]):s.push(e[t]);s.length>0&&this.processObjects(s);for(let e=0;e<this.skins.length;++e)this.processSkin(this.skins[e]);for(let s=0;s<t.animations.length;++s)this.processAnimation(t.animations[s],e[0]);this._invokeAll((function(t){t.afterParse&&t.afterParse(e)}))}_invokeAll(e){for(let t=0,s=this.plugins.length;t<s;t++)e(this.plugins[t])}};T(se,"GLTFWriter");var G=se,te=class{constructor(e){this.writer=e,this.name="KHR_lights_punctual"}writeNode(e,t){if(!e.isLight)return;if(!e.isDirectionalLight&&!e.isPointLight&&!e.isSpotLight)return void console.warn("THREE.GLTFExporter: Only directional, point, and spot lights are supported.",e);let s=this.writer,r=s.json,i=s.extensionsUsed,n={};e.name&&(n.name=e.name),n.color=e.color.toArray(),n.intensity=e.intensity,e.isDirectionalLight?n.type="directional":e.isPointLight?(n.type="point",e.distance>0&&(n.range=e.distance)):e.isSpotLight&&(n.type="spot",e.distance>0&&(n.range=e.distance),n.spot={},n.spot.innerConeAngle=(e.penumbra-1)*e.angle*-1,n.spot.outerConeAngle=e.angle),void 0!==e.decay&&2!==e.decay&&console.warn("THREE.GLTFExporter: Light decay may be lost. glTF is physically-based, and expects light.decay=2."),e.target&&(e.target.parent!==e||0!==e.target.position.x||0!==e.target.position.y||-1!==e.target.position.z)&&console.warn("THREE.GLTFExporter: Light direction may be lost. For best results, make light.target a child of the light with position 0,0,-1."),i[this.name]||(r.extensions=r.extensions||{},r.extensions[this.name]={lights:[]},i[this.name]=!0);let a=r.extensions[this.name].lights;a.push(n),t.extensions=t.extensions||{},t.extensions[this.name]={light:a.length-1}}};T(te,"GLTFLightExtension");var Y=te,ne=class{constructor(e){this.writer=e,this.name="KHR_materials_unlit"}writeMaterial(e,t){if(!e.isMeshBasicMaterial)return;let s=this.writer.extensionsUsed;t.extensions=t.extensions||{},t.extensions[this.name]={},s[this.name]=!0,t.pbrMetallicRoughness.metallicFactor=0,t.pbrMetallicRoughness.roughnessFactor=.9}};T(ne,"GLTFMaterialsUnlitExtension");var j=ne,ie=class{constructor(e){this.writer=e,this.name="KHR_materials_clearcoat"}writeMaterial(e,t){if(!e.isMeshPhysicalMaterial||0===e.clearcoat)return;let s=this.writer,r=s.extensionsUsed,i={};if(i.clearcoatFactor=e.clearcoat,e.clearcoatMap){let t={index:s.processTexture(e.clearcoatMap)};s.applyTextureTransform(t,e.clearcoatMap),i.clearcoatTexture=t}if(i.clearcoatRoughnessFactor=e.clearcoatRoughness,e.clearcoatRoughnessMap){let t={index:s.processTexture(e.clearcoatRoughnessMap)};s.applyTextureTransform(t,e.clearcoatRoughnessMap),i.clearcoatRoughnessTexture=t}if(e.clearcoatNormalMap){let t={index:s.processTexture(e.clearcoatNormalMap)};s.applyTextureTransform(t,e.clearcoatNormalMap),i.clearcoatNormalTexture=t}t.extensions=t.extensions||{},t.extensions[this.name]=i,r[this.name]=!0}};T(ie,"GLTFMaterialsClearcoatExtension");var K=ie,re=class{constructor(e){this.writer=e,this.name="KHR_materials_iridescence"}writeMaterial(e,t){if(!e.isMeshPhysicalMaterial||0===e.iridescence)return;let s=this.writer,r=s.extensionsUsed,i={};if(i.iridescenceFactor=e.iridescence,e.iridescenceMap){let t={index:s.processTexture(e.iridescenceMap)};s.applyTextureTransform(t,e.iridescenceMap),i.iridescenceTexture=t}if(i.iridescenceIor=e.iridescenceIOR,i.iridescenceThicknessMinimum=e.iridescenceThicknessRange[0],i.iridescenceThicknessMaximum=e.iridescenceThicknessRange[1],e.iridescenceThicknessMap){let t={index:s.processTexture(e.iridescenceThicknessMap)};s.applyTextureTransform(t,e.iridescenceThicknessMap),i.iridescenceThicknessTexture=t}t.extensions=t.extensions||{},t.extensions[this.name]=i,r[this.name]=!0}};T(re,"GLTFMaterialsIridescenceExtension");var q=re,oe=class{constructor(e){this.writer=e,this.name="KHR_materials_transmission"}writeMaterial(e,t){if(!e.isMeshPhysicalMaterial||0===e.transmission)return;let s=this.writer,r=s.extensionsUsed,i={};if(i.transmissionFactor=e.transmission,e.transmissionMap){let t={index:s.processTexture(e.transmissionMap)};s.applyTextureTransform(t,e.transmissionMap),i.transmissionTexture=t}t.extensions=t.extensions||{},t.extensions[this.name]=i,r[this.name]=!0}};T(oe,"GLTFMaterialsTransmissionExtension");var W=oe,ae=class{constructor(e){this.writer=e,this.name="KHR_materials_volume"}writeMaterial(e,t){if(!e.isMeshPhysicalMaterial||0===e.transmission)return;let s=this.writer,r=s.extensionsUsed,i={};if(i.thicknessFactor=e.thickness,e.thicknessMap){let t={index:s.processTexture(e.thicknessMap)};s.applyTextureTransform(t,e.thicknessMap),i.thicknessTexture=t}i.attenuationDistance=e.attenuationDistance,i.attenuationColor=e.attenuationColor.toArray(),t.extensions=t.extensions||{},t.extensions[this.name]=i,r[this.name]=!0}};T(ae,"GLTFMaterialsVolumeExtension");var X=ae,ce=class{constructor(e){this.writer=e,this.name="KHR_materials_ior"}writeMaterial(e,t){if(!e.isMeshPhysicalMaterial||1.5===e.ior)return;let s=this.writer.extensionsUsed,r={};r.ior=e.ior,t.extensions=t.extensions||{},t.extensions[this.name]=r,s[this.name]=!0}};T(ce,"GLTFMaterialsIorExtension");var J=ce,ue=class{constructor(e){this.writer=e,this.name="KHR_materials_specular"}writeMaterial(e,t){if(!e.isMeshPhysicalMaterial||1===e.specularIntensity&&e.specularColor.equals(Fe)&&!e.specularIntensityMap&&!e.specularColorTexture)return;let s=this.writer,r=s.extensionsUsed,i={};if(e.specularIntensityMap){let t={index:s.processTexture(e.specularIntensityMap)};s.applyTextureTransform(t,e.specularIntensityMap),i.specularTexture=t}if(e.specularColorMap){let t={index:s.processTexture(e.specularColorMap)};s.applyTextureTransform(t,e.specularColorMap),i.specularColorTexture=t}i.specularFactor=e.specularIntensity,i.specularColorFactor=e.specularColor.toArray(),t.extensions=t.extensions||{},t.extensions[this.name]=i,r[this.name]=!0}};T(ue,"GLTFMaterialsSpecularExtension");var Z=ue,le=class{constructor(e){this.writer=e,this.name="KHR_materials_sheen"}writeMaterial(e,t){if(!e.isMeshPhysicalMaterial||0==e.sheen)return;let s=this.writer,r=s.extensionsUsed,i={};if(e.sheenRoughnessMap){let t={index:s.processTexture(e.sheenRoughnessMap)};s.applyTextureTransform(t,e.sheenRoughnessMap),i.sheenRoughnessTexture=t}if(e.sheenColorMap){let t={index:s.processTexture(e.sheenColorMap)};s.applyTextureTransform(t,e.sheenColorMap),i.sheenColorTexture=t}i.sheenRoughnessFactor=e.sheenRoughness,i.sheenColorFactor=e.sheenColor.toArray(),t.extensions=t.extensions||{},t.extensions[this.name]=i,r[this.name]=!0}};T(le,"GLTFMaterialsSheenExtension");var Q=le,fe=class{constructor(e){this.writer=e,this.name="KHR_materials_emissive_strength"}writeMaterial(e,t){if(!e.isMeshStandardMaterial||1===e.emissiveIntensity)return;let s=this.writer.extensionsUsed,r={};r.emissiveStrength=e.emissiveIntensity,t.extensions=t.extensions||{},t.extensions[this.name]=r,s[this.name]=!0}};T(fe,"GLTFMaterialsEmissiveStrengthExtension");var $=fe;P.Utils={insertKeyframe:function(e,t){let s,r=e.getValueSize(),i=new e.TimeBufferType(e.times.length+1),n=new e.ValueBufferType(e.values.length+r),a=e.createInterpolant(new e.ValueBufferType(r));if(0===e.times.length){i[0]=t;for(let e=0;e<r;e++)n[e]=0;s=0}else if(t<e.times[0]){if(Math.abs(e.times[0]-t)<.001)return 0;i[0]=t,i.set(e.times,1),n.set(a.evaluate(t),0),n.set(e.values,r),s=0}else if(t>e.times[e.times.length-1]){if(Math.abs(e.times[e.times.length-1]-t)<.001)return e.times.length-1;i[i.length-1]=t,i.set(e.times,0),n.set(e.values,0),n.set(a.evaluate(t),e.values.length),s=i.length-1}else for(let o=0;o<e.times.length;o++){if(Math.abs(e.times[o]-t)<.001)return o;if(e.times[o]<t&&e.times[o+1]>t){i.set(e.times.slice(0,o+1),0),i[o+1]=t,i.set(e.times.slice(o+1),o+2),n.set(e.values.slice(0,(o+1)*r),0),n.set(a.evaluate(t),(o+1)*r),n.set(e.values.slice((o+1)*r),(o+2)*r),s=o+1;break}}return e.times=i,e.values=n,s},mergeMorphTargetTracks:function(e,t){let s=[],r={},i=e.tracks;for(let e=0;e<i.length;++e){let n=i[e],a=v.parseTrackName(n.name),o=v.findNode(t,a.nodeName);if("morphTargetInfluences"!==a.propertyName||void 0===a.propertyIndex){s.push(n);continue}if(n.createInterpolant!==n.InterpolantFactoryMethodDiscrete&&n.createInterpolant!==n.InterpolantFactoryMethodLinear){if(n.createInterpolant.isInterpolantFactoryMethodGLTFCubicSpline)throw new Error("THREE.GLTFExporter: Cannot merge tracks with glTF CUBICSPLINE interpolation.");console.warn("THREE.GLTFExporter: Morph target interpolation mode not yet supported. Using LINEAR instead."),n=n.clone(),n.setInterpolation(Ne)}let l,u=o.morphTargetInfluences.length,h=o.morphTargetDictionary[a.propertyIndex];if(void 0===h)throw new Error("THREE.GLTFExporter: Morph target name not found: "+a.propertyIndex);if(void 0===r[o.uuid]){l=n.clone();let e=new l.ValueBufferType(u*l.times.length);for(let t=0;t<l.times.length;t++)e[t*u+h]=l.values[t];l.name=(a.nodeName||"")+".morphTargetInfluences",l.values=e,r[o.uuid]=l,s.push(l);continue}let c=n.createInterpolant(new n.ValueBufferType(1));l=r[o.uuid];for(let e=0;e<l.times.length;e++)l.values[e*u+h]=c.evaluate(l.times[e]);for(let e=0;e<n.times.length;e++){let t=this.insertKeyframe(l,n.times[e]);l.values[t*u+h]=n.values[e]}}return e.tracks=s,e}};export{P as GLTFExporter};
1
+ import{A as Re,B as Ne,C as be,D as Se,N as z,P as _e,Qa as v,V as k,Y as Ue,aa as Le,ca as O,e as de,j as ge,k as xe,l as me,m as Te,n as ye,o as we,p as Me,q as Ie,r as Ae,ra as F,x as Ee}from"./chunk-7RVQDTA7.js";import{a as pe}from"./chunk-ZD2MIN35.js";import{a as T}from"./chunk-ZRT45YCM.js";pe();var Ce={POSITION:["byte","byte normalized","unsigned byte","unsigned byte normalized","short","short normalized","unsigned short","unsigned short normalized"],NORMAL:["byte normalized","short normalized"],TANGENT:["byte normalized","short normalized"],TEXCOORD:["byte","byte normalized","unsigned byte","short","short normalized","unsigned short"]},ee=class{constructor(){this.pluginCallbacks=[],this.register((function(e){return new Y(e)})),this.register((function(e){return new j(e)})),this.register((function(e){return new W(e)})),this.register((function(e){return new X(e)})),this.register((function(e){return new J(e)})),this.register((function(e){return new Z(e)})),this.register((function(e){return new K(e)})),this.register((function(e){return new q(e)})),this.register((function(e){return new Q(e)})),this.register((function(e){return new $(e)}))}register(e){return-1===this.pluginCallbacks.indexOf(e)&&this.pluginCallbacks.push(e),this}unregister(e){return-1!==this.pluginCallbacks.indexOf(e)&&this.pluginCallbacks.splice(this.pluginCallbacks.indexOf(e),1),this}parse(e,t,s,r){let i=new G,n=[];for(let e=0,t=this.pluginCallbacks.length;e<t;e++)n.push(this.pluginCallbacks[e](i));i.setPlugins(n),i.write(e,t,r).catch(s)}parseAsync(e,t){let s=this;return new Promise((function(r,i){s.parse(e,r,i,t)}))}};T(ee,"GLTFExporter");var P=ee,g={POINTS:0,LINES:1,LINE_LOOP:2,LINE_STRIP:3,TRIANGLES:4,TRIANGLE_STRIP:5,TRIANGLE_FAN:6,BYTE:5120,UNSIGNED_BYTE:5121,SHORT:5122,UNSIGNED_SHORT:5123,INT:5124,UNSIGNED_INT:5125,FLOAT:5126,ARRAY_BUFFER:34962,ELEMENT_ARRAY_BUFFER:34963,NEAREST:9728,LINEAR:9729,NEAREST_MIPMAP_NEAREST:9984,LINEAR_MIPMAP_NEAREST:9985,NEAREST_MIPMAP_LINEAR:9986,LINEAR_MIPMAP_LINEAR:9987,CLAMP_TO_EDGE:33071,MIRRORED_REPEAT:33648,REPEAT:10497},H="KHR_mesh_quantization",N={};N[Te]=g.NEAREST,N[ye]=g.NEAREST_MIPMAP_NEAREST,N[we]=g.NEAREST_MIPMAP_LINEAR,N[Me]=g.LINEAR,N[Ie]=g.LINEAR_MIPMAP_NEAREST,N[Ae]=g.LINEAR_MIPMAP_LINEAR,N[xe]=g.CLAMP_TO_EDGE,N[ge]=g.REPEAT,N[me]=g.MIRRORED_REPEAT;var Oe={scale:"scale",position:"translation",quaternion:"rotation",morphTargetInfluences:"weights"},Fe=new Le,ve=12,He=1179937895,Ve=2,De=8,Ge=1313821514,Ye=5130562;function D(e,t){return e.length===t.length&&e.every((function(e,s){return e===t[s]}))}function je(e){return(new TextEncoder).encode(e).buffer}function Ke(e){return D(e.elements,[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1])}function qe(e,t,s){let r={min:new Array(e.itemSize).fill(Number.POSITIVE_INFINITY),max:new Array(e.itemSize).fill(Number.NEGATIVE_INFINITY)};for(let i=t;i<t+s;i++)for(let t=0;t<e.itemSize;t++){let s;e.itemSize>4?s=e.array[i*e.itemSize+t]:(0===t?s=e.getX(i):1===t?s=e.getY(i):2===t?s=e.getZ(i):3===t&&(s=e.getW(i)),!0===e.normalized&&(s=z.normalize(s,e.array))),r.min[t]=Math.min(r.min[t],s),r.max[t]=Math.max(r.max[t],s)}return r}function Be(e){return 4*Math.ceil(e/4)}function V(e,t=0){let s=Be(e.byteLength);if(s!==e.byteLength){let r=new Uint8Array(s);if(r.set(new Uint8Array(e)),0!==t)for(let i=e.byteLength;i<s;i++)r[i]=t;return r.buffer}return e}function ze(){return typeof document>"u"&&typeof OffscreenCanvas<"u"?new OffscreenCanvas(1,1):document.createElement("canvas")}function Pe(e,t){if(void 0!==e.toBlob)return new Promise((s=>e.toBlob(s,t)));let s;return"image/jpeg"===t?s=.92:"image/webp"===t&&(s=.8),e.convertToBlob({type:t,quality:s})}T(D,"equalArray"),T(je,"stringToArrayBuffer"),T(Ke,"isIdentityMatrix"),T(qe,"getMinMax"),T(Be,"getPaddedBufferSize"),T(V,"getPaddedArrayBuffer"),T(ze,"getCanvas"),T(Pe,"getToBlobPromise");var se=class{constructor(){this.plugins=[],this.options={},this.pending=[],this.buffers=[],this.byteOffset=0,this.buffers=[],this.nodeMap=new Map,this.skins=[],this.extensionsUsed={},this.extensionsRequired={},this.uids=new Map,this.uid=0,this.json={asset:{version:"2.0",generator:"THREE.GLTFExporter"}},this.cache={meshes:new Map,attributes:new Map,attributesNormalized:new Map,materials:new Map,textures:new Map,images:new Map}}setPlugins(e){this.plugins=e}async write(e,t,s={}){this.options=Object.assign({binary:!1,trs:!1,onlyVisible:!0,maxTextureSize:1/0,animations:[],includeCustomExtensions:!1},s),this.options.animations.length>0&&(this.options.trs=!0),this.processInput(e),await Promise.all(this.pending);let r=this,i=r.buffers,n=r.json;s=r.options;let a=r.extensionsUsed,o=r.extensionsRequired,l=new Blob(i,{type:"application/octet-stream"}),u=Object.keys(a),h=Object.keys(o);if(u.length>0&&(n.extensionsUsed=u),h.length>0&&(n.extensionsRequired=h),n.buffers&&n.buffers.length>0&&(n.buffers[0].byteLength=l.size),!0===s.binary){let e=new FileReader;e.readAsArrayBuffer(l),e.onloadend=function(){let s=V(e.result),r=new DataView(new ArrayBuffer(De));r.setUint32(0,s.byteLength,!0),r.setUint32(4,Ye,!0);let i=V(je(JSON.stringify(n)),32),a=new DataView(new ArrayBuffer(De));a.setUint32(0,i.byteLength,!0),a.setUint32(4,Ge,!0);let o=new ArrayBuffer(ve),l=new DataView(o);l.setUint32(0,He,!0),l.setUint32(4,Ve,!0);let u=ve+a.byteLength+i.byteLength+r.byteLength+s.byteLength;l.setUint32(8,u,!0);let h=new Blob([o,a,i,r,s],{type:"application/octet-stream"}),c=new FileReader;c.readAsArrayBuffer(h),c.onloadend=function(){t(c.result)}}}else if(n.buffers&&n.buffers.length>0){let e=new FileReader;e.readAsDataURL(l),e.onloadend=function(){let s=e.result;n.buffers[0].uri=s,t(n)}}else t(n)}serializeUserData(e,t){if(0===Object.keys(e.userData).length)return;let s=this.options,r=this.extensionsUsed;try{let i=JSON.parse(JSON.stringify(e.userData));if(s.includeCustomExtensions&&i.gltfExtensions){void 0===t.extensions&&(t.extensions={});for(let e in i.gltfExtensions)t.extensions[e]=i.gltfExtensions[e],r[e]=!0;delete i.gltfExtensions}Object.keys(i).length>0&&(t.extras=i)}catch(t){console.warn("THREE.GLTFExporter: userData of '"+e.name+"' won't be serialized because of JSON.stringify error - "+t.message)}}getUID(e,t=!1){if(!1===this.uids.has(e)){let t=new Map;t.set(!0,this.uid++),t.set(!1,this.uid++),this.uids.set(e,t)}return this.uids.get(e).get(t)}isNormalizedNormalAttribute(e){if(this.cache.attributesNormalized.has(e))return!1;let t=new k;for(let s=0,r=e.count;s<r;s++)if(Math.abs(t.fromBufferAttribute(e,s).length()-1)>5e-4)return!1;return!0}createNormalizedNormalAttribute(e){let t=this.cache;if(t.attributesNormalized.has(e))return t.attributesNormalized.get(e);let s=e.clone(),r=new k;for(let e=0,t=s.count;e<t;e++)r.fromBufferAttribute(s,e),0===r.x&&0===r.y&&0===r.z?r.setX(1):r.normalize(),s.setXYZ(e,r.x,r.y,r.z);return t.attributesNormalized.set(e,s),s}applyTextureTransform(e,t){let s=!1,r={};(0!==t.offset.x||0!==t.offset.y)&&(r.offset=t.offset.toArray(),s=!0),0!==t.rotation&&(r.rotation=t.rotation,s=!0),(1!==t.repeat.x||1!==t.repeat.y)&&(r.scale=t.repeat.toArray(),s=!0),s&&(e.extensions=e.extensions||{},e.extensions.KHR_texture_transform=r,this.extensionsUsed.KHR_texture_transform=!0)}buildMetalRoughTexture(e,t){if(e===t)return e;function s(e){return e.encoding===Se?T((function(e){return e<.04045?.0773993808*e:Math.pow(.9478672986*e+.0521327014,2.4)}),"SRGBToLinear"):T((function(e){return e}),"LinearToLinear")}T(s,"getEncodingConversion"),console.warn("THREE.GLTFExporter: Merged metalnessMap and roughnessMap textures.");let r=e?e.image:null,i=t?t.image:null,n=Math.max(r?r.width:0,i?i.width:0),a=Math.max(r?r.height:0,i?i.height:0),o=ze();o.width=n,o.height=a;let l=o.getContext("2d");l.fillStyle="#00ffff",l.fillRect(0,0,n,a);let u=l.getImageData(0,0,n,a);if(r){l.drawImage(r,0,0,n,a);let t=s(e),i=l.getImageData(0,0,n,a).data;for(let e=2;e<i.length;e+=4)u.data[e]=256*t(i[e]/256)}if(i){l.drawImage(i,0,0,n,a);let e=s(t),r=l.getImageData(0,0,n,a).data;for(let t=1;t<r.length;t+=4)u.data[t]=256*e(r[t]/256)}l.putImageData(u,0,0);let h=(e||t).clone();return h.source=new _e(o),h.encoding=be,h}processBuffer(e){let t=this.json,s=this.buffers;return t.buffers||(t.buffers=[{byteLength:0}]),s.push(e),0}processBufferView(e,t,s,r,i){let n,a=this.json;switch(a.bufferViews||(a.bufferViews=[]),t){case g.BYTE:case g.UNSIGNED_BYTE:n=1;break;case g.SHORT:case g.UNSIGNED_SHORT:n=2;break;default:n=4}let o=Be(r*e.itemSize*n),l=new DataView(new ArrayBuffer(o)),u=0;for(let i=s;i<s+r;i++)for(let s=0;s<e.itemSize;s++){let r;e.itemSize>4?r=e.array[i*e.itemSize+s]:(0===s?r=e.getX(i):1===s?r=e.getY(i):2===s?r=e.getZ(i):3===s&&(r=e.getW(i)),!0===e.normalized&&(r=z.normalize(r,e.array))),t===g.FLOAT?l.setFloat32(u,r,!0):t===g.INT?l.setInt32(u,r,!0):t===g.UNSIGNED_INT?l.setUint32(u,r,!0):t===g.SHORT?l.setInt16(u,r,!0):t===g.UNSIGNED_SHORT?l.setUint16(u,r,!0):t===g.BYTE?l.setInt8(u,r):t===g.UNSIGNED_BYTE&&l.setUint8(u,r),u+=n}let h={buffer:this.processBuffer(l.buffer),byteOffset:this.byteOffset,byteLength:o};return void 0!==i&&(h.target=i),i===g.ARRAY_BUFFER&&(h.byteStride=e.itemSize*n),this.byteOffset+=o,a.bufferViews.push(h),{id:a.bufferViews.length-1,byteLength:0}}processBufferViewImage(e){let t=this,s=t.json;return s.bufferViews||(s.bufferViews=[]),new Promise((function(r){let i=new FileReader;i.readAsArrayBuffer(e),i.onloadend=function(){let e=V(i.result),n={buffer:t.processBuffer(e),byteOffset:t.byteOffset,byteLength:e.byteLength};t.byteOffset+=e.byteLength,r(s.bufferViews.push(n)-1)}}))}processAccessor(e,t,s,r){let i,n=this.json;if(e.array.constructor===Float32Array)i=g.FLOAT;else if(e.array.constructor===Int32Array)i=g.INT;else if(e.array.constructor===Uint32Array)i=g.UNSIGNED_INT;else if(e.array.constructor===Int16Array)i=g.SHORT;else if(e.array.constructor===Uint16Array)i=g.UNSIGNED_SHORT;else if(e.array.constructor===Int8Array)i=g.BYTE;else{if(e.array.constructor!==Uint8Array)throw new Error("THREE.GLTFExporter: Unsupported bufferAttribute component type.");i=g.UNSIGNED_BYTE}if(void 0===s&&(s=0),void 0===r&&(r=e.count),0===r)return null;let a,o=qe(e,s,r);void 0!==t&&(a=e===t.index?g.ELEMENT_ARRAY_BUFFER:g.ARRAY_BUFFER);let l=this.processBufferView(e,i,s,r,a),u={bufferView:l.id,byteOffset:l.byteOffset,componentType:i,count:r,max:o.max,min:o.min,type:{1:"SCALAR",2:"VEC2",3:"VEC3",4:"VEC4",9:"MAT3",16:"MAT4"}[e.itemSize]};return!0===e.normalized&&(u.normalized=!0),n.accessors||(n.accessors=[]),n.accessors.push(u)-1}processImage(e,t,s,r="image/png"){if(null!==e){let i=this,n=i.cache,a=i.json,o=i.options,l=i.pending;n.images.has(e)||n.images.set(e,{});let u=n.images.get(e),h=r+":flipY/"+s.toString();if(void 0!==u[h])return u[h];a.images||(a.images=[]);let c={mimeType:r},p=ze();p.width=Math.min(e.width,o.maxTextureSize),p.height=Math.min(e.height,o.maxTextureSize);let m=p.getContext("2d");if(!0===s&&(m.translate(0,p.height),m.scale(1,-1)),void 0!==e.data){t!==Ee&&console.error("GLTFExporter: Only RGBAFormat is supported."),(e.width>o.maxTextureSize||e.height>o.maxTextureSize)&&console.warn("GLTFExporter: Image size is bigger than maxTextureSize",e);let s=new Uint8ClampedArray(e.height*e.width*4);for(let t=0;t<s.length;t+=4)s[t+0]=e.data[t+0],s[t+1]=e.data[t+1],s[t+2]=e.data[t+2],s[t+3]=e.data[t+3];m.putImageData(new ImageData(s,e.width,e.height),0,0)}else m.drawImage(e,0,0,p.width,p.height);!0===o.binary?l.push(Pe(p,r).then((e=>i.processBufferViewImage(e))).then((e=>{c.bufferView=e}))):void 0!==p.toDataURL?c.uri=p.toDataURL(r):l.push(Pe(p,r).then((e=>(new FileReader).readAsDataURL(e))).then((e=>{c.uri=e})));let g=a.images.push(c)-1;return u[h]=g,g}throw new Error("THREE.GLTFExporter: No valid image data found. Unable to process texture.")}processSampler(e){let t=this.json;t.samplers||(t.samplers=[]);let s={magFilter:N[e.magFilter],minFilter:N[e.minFilter],wrapS:N[e.wrapS],wrapT:N[e.wrapT]};return t.samplers.push(s)-1}processTexture(e){let t=this.cache,s=this.json;if(t.textures.has(e))return t.textures.get(e);s.textures||(s.textures=[]);let r=e.userData.mimeType;"image/webp"===r&&(r="image/png");let i={sampler:this.processSampler(e),source:this.processImage(e.image,e.format,e.flipY,r)};e.name&&(i.name=e.name),this._invokeAll((function(t){t.writeTexture&&t.writeTexture(e,i)}));let n=s.textures.push(i)-1;return t.textures.set(e,n),n}processMaterial(e){let t=this.cache,s=this.json;if(t.materials.has(e))return t.materials.get(e);if(e.isShaderMaterial)return console.warn("GLTFExporter: THREE.ShaderMaterial not supported."),null;s.materials||(s.materials=[]);let r={pbrMetallicRoughness:{}};!0!==e.isMeshStandardMaterial&&!0!==e.isMeshBasicMaterial&&console.warn("GLTFExporter: Use MeshStandardMaterial or MeshBasicMaterial for best results.");let i=e.color.toArray().concat([e.opacity]);if(D(i,[1,1,1,1])||(r.pbrMetallicRoughness.baseColorFactor=i),e.isMeshStandardMaterial?(r.pbrMetallicRoughness.metallicFactor=e.metalness,r.pbrMetallicRoughness.roughnessFactor=e.roughness):(r.pbrMetallicRoughness.metallicFactor=.5,r.pbrMetallicRoughness.roughnessFactor=.5),e.metalnessMap||e.roughnessMap){let t=this.buildMetalRoughTexture(e.metalnessMap,e.roughnessMap),s={index:this.processTexture(t)};this.applyTextureTransform(s,t),r.pbrMetallicRoughness.metallicRoughnessTexture=s}if(e.map){let t={index:this.processTexture(e.map)};this.applyTextureTransform(t,e.map),r.pbrMetallicRoughness.baseColorTexture=t}if(e.emissive){let t=e.emissive;if(Math.max(t.r,t.g,t.b)>0&&(r.emissiveFactor=e.emissive.toArray()),e.emissiveMap){let t={index:this.processTexture(e.emissiveMap)};this.applyTextureTransform(t,e.emissiveMap),r.emissiveTexture=t}}if(e.normalMap){let t={index:this.processTexture(e.normalMap)};e.normalScale&&1!==e.normalScale.x&&(t.scale=e.normalScale.x),this.applyTextureTransform(t,e.normalMap),r.normalTexture=t}if(e.aoMap){let t={index:this.processTexture(e.aoMap),texCoord:1};1!==e.aoMapIntensity&&(t.strength=e.aoMapIntensity),this.applyTextureTransform(t,e.aoMap),r.occlusionTexture=t}e.transparent?r.alphaMode="BLEND":e.alphaTest>0&&(r.alphaMode="MASK",r.alphaCutoff=e.alphaTest),e.side===de&&(r.doubleSided=!0),""!==e.name&&(r.name=e.name),this.serializeUserData(e,r),this._invokeAll((function(t){t.writeMaterial&&t.writeMaterial(e,r)}));let n=s.materials.push(r)-1;return t.materials.set(e,n),n}processMesh(e){let t=this.cache,s=this.json,r=[e.geometry.uuid];if(Array.isArray(e.material))for(let t=0,s=e.material.length;t<s;t++)r.push(e.material[t].uuid);else r.push(e.material.uuid);let i=r.join(":");if(t.meshes.has(i))return t.meshes.get(i);let n,a=e.geometry;n=e.isLineSegments?g.LINES:e.isLineLoop?g.LINE_LOOP:e.isLine?g.LINE_STRIP:e.isPoints?g.POINTS:e.material.wireframe?g.LINES:g.TRIANGLES;let o={},l={},u=[],h=[],c={uv:"TEXCOORD_0",uv2:"TEXCOORD_1",color:"COLOR_0",skinWeight:"WEIGHTS_0",skinIndex:"JOINTS_0"},p=a.getAttribute("normal");void 0!==p&&!this.isNormalizedNormalAttribute(p)&&(console.warn("THREE.GLTFExporter: Creating normalized normal attribute from the non-normalized one."),a.setAttribute("normal",this.createNormalizedNormalAttribute(p)));let m=null;for(let e in a.attributes){if("morph"===e.slice(0,5))continue;let s=a.attributes[e];if(e=c[e]||e.toUpperCase(),/^(POSITION|NORMAL|TANGENT|TEXCOORD_\d+|COLOR_\d+|JOINTS_\d+|WEIGHTS_\d+)$/.test(e)||(e="_"+e),t.attributes.has(this.getUID(s))){l[e]=t.attributes.get(this.getUID(s));continue}m=null;let r=s.array;"JOINTS_0"===e&&!(r instanceof Uint16Array)&&!(r instanceof Uint8Array)&&(console.warn('GLTFExporter: Attribute "skinIndex" converted to type UNSIGNED_SHORT.'),m=new O(new Uint16Array(r),s.itemSize,s.normalized));let i=this.processAccessor(m||s,a);null!==i&&(e.startsWith("_")||this.detectMeshQuantization(e,s),l[e]=i,t.attributes.set(this.getUID(s),i))}if(void 0!==p&&a.setAttribute("normal",p),0===Object.keys(l).length)return null;if(void 0!==e.morphTargetInfluences&&e.morphTargetInfluences.length>0){let s=[],r=[],i={};if(void 0!==e.morphTargetDictionary)for(let t in e.morphTargetDictionary)i[e.morphTargetDictionary[t]]=t;for(let n=0;n<e.morphTargetInfluences.length;++n){let o={},l=!1;for(let e in a.morphAttributes){if("position"!==e&&"normal"!==e){l||(console.warn("GLTFExporter: Only POSITION and NORMAL morph are supported."),l=!0);continue}let s=a.morphAttributes[e][n],r=e.toUpperCase(),i=a.attributes[e];if(t.attributes.has(this.getUID(s,!0))){o[r]=t.attributes.get(this.getUID(s,!0));continue}let u=s.clone();if(!a.morphTargetsRelative)for(let e=0,t=s.count;e<t;e++)for(let t=0;t<s.itemSize;t++)0===t&&u.setX(e,s.getX(e)-i.getX(e)),1===t&&u.setY(e,s.getY(e)-i.getY(e)),2===t&&u.setZ(e,s.getZ(e)-i.getZ(e)),3===t&&u.setW(e,s.getW(e)-i.getW(e));o[r]=this.processAccessor(u,a),t.attributes.set(this.getUID(i,!0),o[r])}h.push(o),s.push(e.morphTargetInfluences[n]),void 0!==e.morphTargetDictionary&&r.push(i[n])}o.weights=s,r.length>0&&(o.extras={},o.extras.targetNames=r)}let f=Array.isArray(e.material);if(f&&0===a.groups.length)return null;let d=f?e.material:[e.material],T=f?a.groups:[{materialIndex:0,start:void 0,count:void 0}];for(let e=0,s=T.length;e<s;e++){let s={mode:n,attributes:l};if(this.serializeUserData(a,s),h.length>0&&(s.targets=h),null!==a.index){let r=this.getUID(a.index);(void 0!==T[e].start||void 0!==T[e].count)&&(r+=":"+T[e].start+":"+T[e].count),t.attributes.has(r)?s.indices=t.attributes.get(r):(s.indices=this.processAccessor(a.index,a,T[e].start,T[e].count),t.attributes.set(r,s.indices)),null===s.indices&&delete s.indices}let r=this.processMaterial(d[T[e].materialIndex]);null!==r&&(s.material=r),u.push(s)}o.primitives=u,s.meshes||(s.meshes=[]),this._invokeAll((function(t){t.writeMesh&&t.writeMesh(e,o)}));let x=s.meshes.push(o)-1;return t.meshes.set(i,x),x}detectMeshQuantization(e,t){if(this.extensionsUsed[H])return;let s;switch(t.array.constructor){case Int8Array:s="byte";break;case Uint8Array:s="unsigned byte";break;case Int16Array:s="short";break;case Uint16Array:s="unsigned short";break;default:return}t.normalized&&(s+=" normalized");let r=e.split("_",1)[0];Ce[r]&&Ce[r].includes(s)&&(this.extensionsUsed[H]=!0,this.extensionsRequired[H]=!0)}processCamera(e){let t=this.json;t.cameras||(t.cameras=[]);let s=e.isOrthographicCamera,r={type:s?"orthographic":"perspective"};return s?r.orthographic={xmag:2*e.right,ymag:2*e.top,zfar:e.far<=0?.001:e.far,znear:e.near<0?0:e.near}:r.perspective={aspectRatio:e.aspect,yfov:z.degToRad(e.fov),zfar:e.far<=0?.001:e.far,znear:e.near<0?0:e.near},""!==e.name&&(r.name=e.type),t.cameras.push(r)-1}processAnimation(e,t){let s=this.json,r=this.nodeMap;s.animations||(s.animations=[]);let i=(e=P.Utils.mergeMorphTargetTracks(e.clone(),t)).tracks,n=[],a=[];for(let e=0;e<i.length;++e){let s=i[e],o=v.parseTrackName(s.name),l=v.findNode(t,o.nodeName),u=Oe[o.propertyName];if("bones"===o.objectName&&(l=!0===l.isSkinnedMesh?l.skeleton.getBoneByName(o.objectIndex):void 0),!l||!u)return console.warn('THREE.GLTFExporter: Could not export animation track "%s".',s.name),null;let h,c=1,p=s.values.length/s.times.length;u===Oe.morphTargetInfluences&&(p/=l.morphTargetInfluences.length),!0===s.createInterpolant.isInterpolantFactoryMethodGLTFCubicSpline?(h="CUBICSPLINE",p/=3):h=s.getInterpolation()===Re?"STEP":"LINEAR",a.push({input:this.processAccessor(new O(s.times,c)),output:this.processAccessor(new O(s.values,p)),interpolation:h}),n.push({sampler:a.length-1,target:{node:r.get(l),path:u}})}return s.animations.push({name:e.name||"clip_"+s.animations.length,samplers:a,channels:n}),s.animations.length-1}processSkin(e){let t=this.json,s=this.nodeMap,r=t.nodes[s.get(e)],i=e.skeleton;if(void 0===i)return null;let n=e.skeleton.bones[0];if(void 0===n)return null;let a=[],o=new Float32Array(16*i.bones.length),l=new Ue;for(let t=0;t<i.bones.length;++t)a.push(s.get(i.bones[t])),l.copy(i.boneInverses[t]),l.multiply(e.bindMatrix).toArray(o,16*t);return void 0===t.skins&&(t.skins=[]),t.skins.push({inverseBindMatrices:this.processAccessor(new O(o,16)),joints:a,skeleton:s.get(n)}),r.skin=t.skins.length-1}processNode(e){let t=this.json,s=this.options,r=this.nodeMap;t.nodes||(t.nodes=[]);let i={};if(s.trs){let t=e.quaternion.toArray(),s=e.position.toArray(),r=e.scale.toArray();D(t,[0,0,0,1])||(i.rotation=t),D(s,[0,0,0])||(i.translation=s),D(r,[1,1,1])||(i.scale=r)}else e.matrixAutoUpdate&&e.updateMatrix(),!1===Ke(e.matrix)&&(i.matrix=e.matrix.elements);if(""!==e.name&&(i.name=String(e.name)),this.serializeUserData(e,i),e.isMesh||e.isLine||e.isPoints){let t=this.processMesh(e);null!==t&&(i.mesh=t)}else e.isCamera&&(i.camera=this.processCamera(e));if(e.isSkinnedMesh&&this.skins.push(e),e.children.length>0){let t=[];for(let r=0,i=e.children.length;r<i;r++){let i=e.children[r];if(i.visible||!1===s.onlyVisible){let e=this.processNode(i);null!==e&&t.push(e)}}t.length>0&&(i.children=t)}this._invokeAll((function(t){t.writeNode&&t.writeNode(e,i)}));let n=t.nodes.push(i)-1;return r.set(e,n),n}processScene(e){let t=this.json,s=this.options;t.scenes||(t.scenes=[],t.scene=0);let r={};""!==e.name&&(r.name=e.name),t.scenes.push(r);let i=[];for(let t=0,r=e.children.length;t<r;t++){let r=e.children[t];if(r.visible||!1===s.onlyVisible){let e=this.processNode(r);null!==e&&i.push(e)}}i.length>0&&(r.nodes=i),this.serializeUserData(e,r)}processObjects(e){let t=new F;t.name="AuxScene";for(let s=0;s<e.length;s++)t.children.push(e[s]);this.processScene(t)}processInput(e){let t=this.options;e=e instanceof Array?e:[e],this._invokeAll((function(t){t.beforeParse&&t.beforeParse(e)}));let s=[];for(let t=0;t<e.length;t++)e[t]instanceof F?this.processScene(e[t]):s.push(e[t]);s.length>0&&this.processObjects(s);for(let e=0;e<this.skins.length;++e)this.processSkin(this.skins[e]);for(let s=0;s<t.animations.length;++s)this.processAnimation(t.animations[s],e[0]);this._invokeAll((function(t){t.afterParse&&t.afterParse(e)}))}_invokeAll(e){for(let t=0,s=this.plugins.length;t<s;t++)e(this.plugins[t])}};T(se,"GLTFWriter");var G=se,te=class{constructor(e){this.writer=e,this.name="KHR_lights_punctual"}writeNode(e,t){if(!e.isLight)return;if(!e.isDirectionalLight&&!e.isPointLight&&!e.isSpotLight)return void console.warn("THREE.GLTFExporter: Only directional, point, and spot lights are supported.",e);let s=this.writer,r=s.json,i=s.extensionsUsed,n={};e.name&&(n.name=e.name),n.color=e.color.toArray(),n.intensity=e.intensity,e.isDirectionalLight?n.type="directional":e.isPointLight?(n.type="point",e.distance>0&&(n.range=e.distance)):e.isSpotLight&&(n.type="spot",e.distance>0&&(n.range=e.distance),n.spot={},n.spot.innerConeAngle=(e.penumbra-1)*e.angle*-1,n.spot.outerConeAngle=e.angle),void 0!==e.decay&&2!==e.decay&&console.warn("THREE.GLTFExporter: Light decay may be lost. glTF is physically-based, and expects light.decay=2."),e.target&&(e.target.parent!==e||0!==e.target.position.x||0!==e.target.position.y||-1!==e.target.position.z)&&console.warn("THREE.GLTFExporter: Light direction may be lost. For best results, make light.target a child of the light with position 0,0,-1."),i[this.name]||(r.extensions=r.extensions||{},r.extensions[this.name]={lights:[]},i[this.name]=!0);let a=r.extensions[this.name].lights;a.push(n),t.extensions=t.extensions||{},t.extensions[this.name]={light:a.length-1}}};T(te,"GLTFLightExtension");var Y=te,ne=class{constructor(e){this.writer=e,this.name="KHR_materials_unlit"}writeMaterial(e,t){if(!e.isMeshBasicMaterial)return;let s=this.writer.extensionsUsed;t.extensions=t.extensions||{},t.extensions[this.name]={},s[this.name]=!0,t.pbrMetallicRoughness.metallicFactor=0,t.pbrMetallicRoughness.roughnessFactor=.9}};T(ne,"GLTFMaterialsUnlitExtension");var j=ne,ie=class{constructor(e){this.writer=e,this.name="KHR_materials_clearcoat"}writeMaterial(e,t){if(!e.isMeshPhysicalMaterial||0===e.clearcoat)return;let s=this.writer,r=s.extensionsUsed,i={};if(i.clearcoatFactor=e.clearcoat,e.clearcoatMap){let t={index:s.processTexture(e.clearcoatMap)};s.applyTextureTransform(t,e.clearcoatMap),i.clearcoatTexture=t}if(i.clearcoatRoughnessFactor=e.clearcoatRoughness,e.clearcoatRoughnessMap){let t={index:s.processTexture(e.clearcoatRoughnessMap)};s.applyTextureTransform(t,e.clearcoatRoughnessMap),i.clearcoatRoughnessTexture=t}if(e.clearcoatNormalMap){let t={index:s.processTexture(e.clearcoatNormalMap)};s.applyTextureTransform(t,e.clearcoatNormalMap),i.clearcoatNormalTexture=t}t.extensions=t.extensions||{},t.extensions[this.name]=i,r[this.name]=!0}};T(ie,"GLTFMaterialsClearcoatExtension");var K=ie,re=class{constructor(e){this.writer=e,this.name="KHR_materials_iridescence"}writeMaterial(e,t){if(!e.isMeshPhysicalMaterial||0===e.iridescence)return;let s=this.writer,r=s.extensionsUsed,i={};if(i.iridescenceFactor=e.iridescence,e.iridescenceMap){let t={index:s.processTexture(e.iridescenceMap)};s.applyTextureTransform(t,e.iridescenceMap),i.iridescenceTexture=t}if(i.iridescenceIor=e.iridescenceIOR,i.iridescenceThicknessMinimum=e.iridescenceThicknessRange[0],i.iridescenceThicknessMaximum=e.iridescenceThicknessRange[1],e.iridescenceThicknessMap){let t={index:s.processTexture(e.iridescenceThicknessMap)};s.applyTextureTransform(t,e.iridescenceThicknessMap),i.iridescenceThicknessTexture=t}t.extensions=t.extensions||{},t.extensions[this.name]=i,r[this.name]=!0}};T(re,"GLTFMaterialsIridescenceExtension");var q=re,oe=class{constructor(e){this.writer=e,this.name="KHR_materials_transmission"}writeMaterial(e,t){if(!e.isMeshPhysicalMaterial||0===e.transmission)return;let s=this.writer,r=s.extensionsUsed,i={};if(i.transmissionFactor=e.transmission,e.transmissionMap){let t={index:s.processTexture(e.transmissionMap)};s.applyTextureTransform(t,e.transmissionMap),i.transmissionTexture=t}t.extensions=t.extensions||{},t.extensions[this.name]=i,r[this.name]=!0}};T(oe,"GLTFMaterialsTransmissionExtension");var W=oe,ae=class{constructor(e){this.writer=e,this.name="KHR_materials_volume"}writeMaterial(e,t){if(!e.isMeshPhysicalMaterial||0===e.transmission)return;let s=this.writer,r=s.extensionsUsed,i={};if(i.thicknessFactor=e.thickness,e.thicknessMap){let t={index:s.processTexture(e.thicknessMap)};s.applyTextureTransform(t,e.thicknessMap),i.thicknessTexture=t}i.attenuationDistance=e.attenuationDistance,i.attenuationColor=e.attenuationColor.toArray(),t.extensions=t.extensions||{},t.extensions[this.name]=i,r[this.name]=!0}};T(ae,"GLTFMaterialsVolumeExtension");var X=ae,ce=class{constructor(e){this.writer=e,this.name="KHR_materials_ior"}writeMaterial(e,t){if(!e.isMeshPhysicalMaterial||1.5===e.ior)return;let s=this.writer.extensionsUsed,r={};r.ior=e.ior,t.extensions=t.extensions||{},t.extensions[this.name]=r,s[this.name]=!0}};T(ce,"GLTFMaterialsIorExtension");var J=ce,ue=class{constructor(e){this.writer=e,this.name="KHR_materials_specular"}writeMaterial(e,t){if(!e.isMeshPhysicalMaterial||1===e.specularIntensity&&e.specularColor.equals(Fe)&&!e.specularIntensityMap&&!e.specularColorTexture)return;let s=this.writer,r=s.extensionsUsed,i={};if(e.specularIntensityMap){let t={index:s.processTexture(e.specularIntensityMap)};s.applyTextureTransform(t,e.specularIntensityMap),i.specularTexture=t}if(e.specularColorMap){let t={index:s.processTexture(e.specularColorMap)};s.applyTextureTransform(t,e.specularColorMap),i.specularColorTexture=t}i.specularFactor=e.specularIntensity,i.specularColorFactor=e.specularColor.toArray(),t.extensions=t.extensions||{},t.extensions[this.name]=i,r[this.name]=!0}};T(ue,"GLTFMaterialsSpecularExtension");var Z=ue,le=class{constructor(e){this.writer=e,this.name="KHR_materials_sheen"}writeMaterial(e,t){if(!e.isMeshPhysicalMaterial||0==e.sheen)return;let s=this.writer,r=s.extensionsUsed,i={};if(e.sheenRoughnessMap){let t={index:s.processTexture(e.sheenRoughnessMap)};s.applyTextureTransform(t,e.sheenRoughnessMap),i.sheenRoughnessTexture=t}if(e.sheenColorMap){let t={index:s.processTexture(e.sheenColorMap)};s.applyTextureTransform(t,e.sheenColorMap),i.sheenColorTexture=t}i.sheenRoughnessFactor=e.sheenRoughness,i.sheenColorFactor=e.sheenColor.toArray(),t.extensions=t.extensions||{},t.extensions[this.name]=i,r[this.name]=!0}};T(le,"GLTFMaterialsSheenExtension");var Q=le,fe=class{constructor(e){this.writer=e,this.name="KHR_materials_emissive_strength"}writeMaterial(e,t){if(!e.isMeshStandardMaterial||1===e.emissiveIntensity)return;let s=this.writer.extensionsUsed,r={};r.emissiveStrength=e.emissiveIntensity,t.extensions=t.extensions||{},t.extensions[this.name]=r,s[this.name]=!0}};T(fe,"GLTFMaterialsEmissiveStrengthExtension");var $=fe;P.Utils={insertKeyframe:function(e,t){let s,r=e.getValueSize(),i=new e.TimeBufferType(e.times.length+1),n=new e.ValueBufferType(e.values.length+r),a=e.createInterpolant(new e.ValueBufferType(r));if(0===e.times.length){i[0]=t;for(let e=0;e<r;e++)n[e]=0;s=0}else if(t<e.times[0]){if(Math.abs(e.times[0]-t)<.001)return 0;i[0]=t,i.set(e.times,1),n.set(a.evaluate(t),0),n.set(e.values,r),s=0}else if(t>e.times[e.times.length-1]){if(Math.abs(e.times[e.times.length-1]-t)<.001)return e.times.length-1;i[i.length-1]=t,i.set(e.times,0),n.set(e.values,0),n.set(a.evaluate(t),e.values.length),s=i.length-1}else for(let o=0;o<e.times.length;o++){if(Math.abs(e.times[o]-t)<.001)return o;if(e.times[o]<t&&e.times[o+1]>t){i.set(e.times.slice(0,o+1),0),i[o+1]=t,i.set(e.times.slice(o+1),o+2),n.set(e.values.slice(0,(o+1)*r),0),n.set(a.evaluate(t),(o+1)*r),n.set(e.values.slice((o+1)*r),(o+2)*r),s=o+1;break}}return e.times=i,e.values=n,s},mergeMorphTargetTracks:function(e,t){let s=[],r={},i=e.tracks;for(let e=0;e<i.length;++e){let n=i[e],a=v.parseTrackName(n.name),o=v.findNode(t,a.nodeName);if("morphTargetInfluences"!==a.propertyName||void 0===a.propertyIndex){s.push(n);continue}if(n.createInterpolant!==n.InterpolantFactoryMethodDiscrete&&n.createInterpolant!==n.InterpolantFactoryMethodLinear){if(n.createInterpolant.isInterpolantFactoryMethodGLTFCubicSpline)throw new Error("THREE.GLTFExporter: Cannot merge tracks with glTF CUBICSPLINE interpolation.");console.warn("THREE.GLTFExporter: Morph target interpolation mode not yet supported. Using LINEAR instead."),n=n.clone(),n.setInterpolation(Ne)}let l,u=o.morphTargetInfluences.length,h=o.morphTargetDictionary[a.propertyIndex];if(void 0===h)throw new Error("THREE.GLTFExporter: Morph target name not found: "+a.propertyIndex);if(void 0===r[o.uuid]){l=n.clone();let e=new l.ValueBufferType(u*l.times.length);for(let t=0;t<l.times.length;t++)e[t*u+h]=l.values[t];l.name=(a.nodeName||"")+".morphTargetInfluences",l.values=e,r[o.uuid]=l,s.push(l);continue}let c=n.createInterpolant(new n.ValueBufferType(1));l=r[o.uuid];for(let e=0;e<l.times.length;e++)l.values[e*u+h]=c.evaluate(l.times[e]);for(let e=0;e<n.times.length;e++){let t=this.insertKeyframe(l,n.times[e]);l.values[t*u+h]=n.values[e]}}return e.tracks=s,e}};export{P as GLTFExporter};
@@ -1 +1 @@
1
- import{N as C}from"./chunk-EPUV4SBJ.js";import{a as S}from"./chunk-I5VIUPV4.js";import{a as o,f as e}from"./chunk-ZRT45YCM.js";S();var F,y,P=class{constructor(t){e(this,"_currentStats",{fps:0,ms:0,mb:0}),e(this,"view"),e(this,"timer"),e(this,"counter"),e(this,"onFPSChangeArray"),e(this,"onFPSChangeIndex"),e(this,"lastFPS",0),e(this,"SECONDS_TO_DECIDE",3),e(this,"MIN_FPS",38),e(this,"CRITICAL_FPS",24),e(this,"MAX_FPS",120),e(this,"MAX_MS",200),e(this,"MAX_MB",((null==(y=null==(F=window.performance)?void 0:F.memory)?void 0:y.jsHeapSizeLimit)||1/0)/1048576),e(this,"updateMappedinDevtools",o((()=>{let t="__MAPPEDIN_DEVTOOLS__";window[t]=window[t]||{};let e=window[t];e.showPerformancePanelArray=e.showPerformancePanelArray||[],e.hidePerformancePanelArray=e.hidePerformancePanelArray||[],e.showPerformancePanelArray.push((()=>this.showPerformancePanel())),e.hidePerformancePanelArray.push((()=>this.hidePerformancePanel()))}),"updateMappedinDevtools"));let{MAX_FPS:i,MAX_MS:s,MAX_MB:n}=this,a={fps:i,ms:s,mb:n};this.view=new d(t.debug,t.container,a),this.timer=new c,this.counter=new u,this.onFPSChangeArray=t.onFPSChangeArray,this.onFPSChangeIndex=t.dynamicPerformance?t.onFPSChangeArray.length:-1,this.updateMappedinDevtools()}static getDefaultOnFPSChangeArray(t){let{effectComposer:e}=t.renderer.implementation;return[()=>{null==e||e.setAntialiasConfiguration({antialias:!1}),t.paths.pathSegments.forEach((({arrowAnimationTween:t})=>{t.stop()}));for(let e in t.polygonMeshesById){let{material:i}=t.polygonMeshesById[e];i.map&&(i.map.anisotropy=1,i.needsUpdate=!0)}t.tryRendering()},()=>{null==e||e.setAmbientOcclusionConfiguration({aoEnabled:!1}),t.tryRendering()}]}updateStats(t){var e,i;let s=(null==(i=null==(e=window.performance)?void 0:e.memory)?void 0:i.usedJSHeapSize)||0;this._currentStats.fps=Math.min(t,this.MAX_FPS),this._currentStats.ms=Math.min(1e3/t,this.MAX_MS),this._currentStats.mb=Math.min(s/1048576,this.MAX_MB),this.view.updatePanels(this._currentStats)}isFPSSpiked(t){return Math.abs(this.lastFPS-t)/this.lastFPS>.1}updateOnFPSChangeIndex(t,e){let i=this.onFPSChangeIndex;return e&&i>0?i=0:t&&(i-=1),this.onFPSChangeIndex=C.clamp(i,-1,this.onFPSChangeArray.length),this.onFPSChangeIndex}handleFPSChange(t,e){let i=this.onFPSChangeIndex,s=this.updateOnFPSChangeIndex(t,e),n=this.onFPSChangeArray[s];!n||s===i||n(this.currentStats)}update(){let{fps:t,duration:e}=this.timer.update();if(e>=1e3){if(!this.isFPSSpiked(t)){let{lowFPS:e,criticalFPS:i}=this.counter.update(t,this.MIN_FPS,this.CRITICAL_FPS,this.SECONDS_TO_DECIDE);this.updateStats(t),this.handleFPSChange(e,i)}this.lastFPS=t,this.timer.reset()}}get currentStats(){return{...this._currentStats}}get dom(){return this.view.dom}hidePerformancePanel(){this.view.hidePerformancePanel()}showPerformancePanel(){this.view.showPerformancePanel()}};o(P,"PerformanceController");var b=P,m=class{constructor(){e(this,"beginTime",performance.now()),e(this,"frames",0),e(this,"duration",0)}reset(){this.duration=0,this.frames=0}update(){let t=performance.now(),e=t-this.beginTime;return this.frames++,this.duration+=e,this.beginTime=t,{duration:this.duration,fps:this.frames/(this.duration/1e3)}}};o(m,"PerformanceTimer");var c=m,f=class{constructor(){e(this,"criticalFpsCounter",0),e(this,"lowFpsCounter",0),e(this,"highFpsCounter",0)}update(t,e,i,s){let n=t<e,a=t<i;return this.criticalFpsCounter=a?this.criticalFpsCounter+1:0,this.lowFpsCounter=n?this.lowFpsCounter+1:0,this.highFpsCounter=n?0:this.highFpsCounter+1,this.lowFpsCounter===s?(this.lowFpsCounter=0,this.criticalFpsCounter===s?(this.criticalFpsCounter=0,{lowFPS:!0,highFPS:!1,criticalFPS:!0}):{lowFPS:!0,highFPS:!1,criticalFPS:!1}):this.highFpsCounter===s?(this.highFpsCounter=0,{lowFPS:!1,highFPS:!0,criticalFPS:!1}):(n?this.highFpsCounter=0:(this.lowFpsCounter=0,this.criticalFpsCounter=0),{lowFPS:!1,highFPS:!1,criticalFPS:!1})}};o(f,"PerformanceCounter");var u=f,g=class{constructor(t,i,s){var n;e(this,"mode",-1),e(this,"panels",[]),e(this,"appContainer"),e(this,"maxValues"),e(this,"debug"),e(this,"stats"),e(this,"container"),this.debug=t,this.appContainer=i,this.maxValues=s,this.container=this.createContainer(),this.addPanel(new l({name:"FPS",foregroundColor:"#0ff",backgroundColor:"#002"})),this.addPanel(new l({name:"MS",foregroundColor:"#0f0",backgroundColor:"#020"})),null!=(n=window.performance)&&n.memory&&this.addPanel(new l({name:"MB",foregroundColor:"#f08",backgroundColor:"#201"})),this.debug&&this.showPerformancePanel()}createContainer(){let t=document.createElement("div");return t.style.cssText="position:absolute;top:0;right:0;cursor:pointer;opacity:0.9;z-index:10000",t.addEventListener("click",(t=>{t.preventDefault(),this.showPanel(++this.mode%this.panels.length)})),t}addPanel(t){this.panels.push(t),this.container.appendChild(t.dom)}showPanel(t){this.panels.forEach(((e,i)=>{e.dom.style.display=i===t?"block":"none"})),this.mode=t}hidePerformancePanel(){this.container.parentNode&&(this.debug=!1,this.appContainer.removeChild(this.container))}showPerformancePanel(){this.container.parentNode||(this.debug=!0,this.stats&&this.updatePanels(this.stats),this.appContainer.appendChild(this.container))}updatePanels(t){this.stats=t,this.debug&&this.panels.forEach(((e,i)=>{0===i?e.update(t.fps,this.maxValues.fps):1===i?e.update(t.ms,this.maxValues.ms):2===i&&e.update(t.mb,this.maxValues.mb)}))}get dom(){return this.container}};o(g,"PerformanceView");var d=g,v=class{constructor(t){this.config=t,e(this,"min",1/0),e(this,"max",0),e(this,"canvas"),e(this,"context"),e(this,"PR",Math.round(window.devicePixelRatio||1)),e(this,"WIDTH",80*this.PR),e(this,"HEIGHT",48*this.PR),e(this,"TEXT_X",3*this.PR),e(this,"TEXT_Y",2*this.PR),e(this,"GRAPH_X",3*this.PR),e(this,"GRAPH_Y",15*this.PR),e(this,"GRAPH_WIDTH",74*this.PR),e(this,"GRAPH_HEIGHT",30*this.PR),this.canvas=document.createElement("canvas"),this.context=this.canvas.getContext("2d"),this.setupCanvas()}setupCanvas(){this.canvas.dataset.name=this.config.name,this.canvas.width=this.WIDTH,this.canvas.height=this.HEIGHT,this.canvas.style.width="".concat(this.WIDTH/this.PR,"px"),this.canvas.style.height="".concat(this.HEIGHT/this.PR,"px"),this.context.font="bold ".concat(9*this.PR,"px Helvetica,Arial,sans-serif"),this.context.textBaseline="top",this.context.fillStyle=this.config.backgroundColor,this.context.fillRect(0,0,this.WIDTH,this.HEIGHT),this.context.fillStyle=this.config.foregroundColor,this.context.fillText(this.config.name,this.TEXT_X,this.TEXT_Y),this.context.fillRect(this.GRAPH_X,this.GRAPH_Y,this.GRAPH_WIDTH,this.GRAPH_HEIGHT),this.context.fillStyle=this.config.backgroundColor,this.context.globalAlpha=.9,this.context.fillRect(this.GRAPH_X,this.GRAPH_Y,this.GRAPH_WIDTH,this.GRAPH_HEIGHT)}get dom(){return this.canvas}update(t,e){this.min=Math.min(this.min,t),this.max=Math.max(this.max,t);let{context:i,WIDTH:s,GRAPH_Y:n,GRAPH_WIDTH:a,GRAPH_HEIGHT:h,PR:o}=this;i.fillStyle=this.config.backgroundColor,i.globalAlpha=1,i.fillRect(0,0,s,n),i.fillStyle=this.config.foregroundColor,i.fillText("".concat(Math.round(t)," ").concat(this.config.name," (").concat(Math.round(this.min),"-").concat(Math.round(this.max),")"),this.TEXT_X,this.TEXT_Y),i.drawImage(this.canvas,this.GRAPH_X+o,this.GRAPH_Y,a-o,h,this.GRAPH_X,this.GRAPH_Y,a-o,h),i.fillRect(this.GRAPH_X+a-o,this.GRAPH_Y,o,h),i.fillStyle=this.config.backgroundColor,i.globalAlpha=.9,i.fillRect(this.GRAPH_X+a-o,this.GRAPH_Y,o,Math.round((1-t/e)*h))}};o(v,"Panel");var l=v;export{b as PerformanceController,d as PerformanceView};
1
+ import{N as C}from"./chunk-7RVQDTA7.js";import{a as S}from"./chunk-ZD2MIN35.js";import{a as o,f as e}from"./chunk-ZRT45YCM.js";S();var F,y,P=class{constructor(t){e(this,"_currentStats",{fps:0,ms:0,mb:0}),e(this,"view"),e(this,"timer"),e(this,"counter"),e(this,"onFPSChangeArray"),e(this,"onFPSChangeIndex"),e(this,"lastFPS",0),e(this,"SECONDS_TO_DECIDE",3),e(this,"MIN_FPS",38),e(this,"CRITICAL_FPS",24),e(this,"MAX_FPS",120),e(this,"MAX_MS",200),e(this,"MAX_MB",((null==(y=null==(F=window.performance)?void 0:F.memory)?void 0:y.jsHeapSizeLimit)||1/0)/1048576),e(this,"updateMappedinDevtools",o((()=>{let t="__MAPPEDIN_DEVTOOLS__";window[t]=window[t]||{};let e=window[t];e.showPerformancePanelArray=e.showPerformancePanelArray||[],e.hidePerformancePanelArray=e.hidePerformancePanelArray||[],e.showPerformancePanelArray.push((()=>this.showPerformancePanel())),e.hidePerformancePanelArray.push((()=>this.hidePerformancePanel()))}),"updateMappedinDevtools"));let{MAX_FPS:i,MAX_MS:s,MAX_MB:n}=this,a={fps:i,ms:s,mb:n};this.view=new d(t.debug,t.container,a),this.timer=new c,this.counter=new u,this.onFPSChangeArray=t.onFPSChangeArray,this.onFPSChangeIndex=t.dynamicPerformance?t.onFPSChangeArray.length:-1,this.updateMappedinDevtools()}static getDefaultOnFPSChangeArray(t){let{effectComposer:e}=t.renderer.implementation;return[()=>{null==e||e.setAntialiasConfiguration({antialias:!1}),t.paths.pathSegments.forEach((({arrowAnimationTween:t})=>{t.stop()}));for(let e in t.polygonMeshesById){let{material:i}=t.polygonMeshesById[e];i.map&&(i.map.anisotropy=1,i.needsUpdate=!0)}t.tryRendering()},()=>{null==e||e.setAmbientOcclusionConfiguration({aoEnabled:!1}),t.tryRendering()}]}updateStats(t){var e,i;let s=(null==(i=null==(e=window.performance)?void 0:e.memory)?void 0:i.usedJSHeapSize)||0;this._currentStats.fps=Math.min(t,this.MAX_FPS),this._currentStats.ms=Math.min(1e3/t,this.MAX_MS),this._currentStats.mb=Math.min(s/1048576,this.MAX_MB),this.view.updatePanels(this._currentStats)}isFPSSpiked(t){return Math.abs(this.lastFPS-t)/this.lastFPS>.1}updateOnFPSChangeIndex(t,e){let i=this.onFPSChangeIndex;return e&&i>0?i=0:t&&(i-=1),this.onFPSChangeIndex=C.clamp(i,-1,this.onFPSChangeArray.length),this.onFPSChangeIndex}handleFPSChange(t,e){let i=this.onFPSChangeIndex,s=this.updateOnFPSChangeIndex(t,e),n=this.onFPSChangeArray[s];!n||s===i||n(this.currentStats)}update(){let{fps:t,duration:e}=this.timer.update();if(e>=1e3){if(!this.isFPSSpiked(t)){let{lowFPS:e,criticalFPS:i}=this.counter.update(t,this.MIN_FPS,this.CRITICAL_FPS,this.SECONDS_TO_DECIDE);this.updateStats(t),this.handleFPSChange(e,i)}this.lastFPS=t,this.timer.reset()}}get currentStats(){return{...this._currentStats}}get dom(){return this.view.dom}hidePerformancePanel(){this.view.hidePerformancePanel()}showPerformancePanel(){this.view.showPerformancePanel()}};o(P,"PerformanceController");var b=P,m=class{constructor(){e(this,"beginTime",performance.now()),e(this,"frames",0),e(this,"duration",0)}reset(){this.duration=0,this.frames=0}update(){let t=performance.now(),e=t-this.beginTime;return this.frames++,this.duration+=e,this.beginTime=t,{duration:this.duration,fps:this.frames/(this.duration/1e3)}}};o(m,"PerformanceTimer");var c=m,f=class{constructor(){e(this,"criticalFpsCounter",0),e(this,"lowFpsCounter",0),e(this,"highFpsCounter",0)}update(t,e,i,s){let n=t<e,a=t<i;return this.criticalFpsCounter=a?this.criticalFpsCounter+1:0,this.lowFpsCounter=n?this.lowFpsCounter+1:0,this.highFpsCounter=n?0:this.highFpsCounter+1,this.lowFpsCounter===s?(this.lowFpsCounter=0,this.criticalFpsCounter===s?(this.criticalFpsCounter=0,{lowFPS:!0,highFPS:!1,criticalFPS:!0}):{lowFPS:!0,highFPS:!1,criticalFPS:!1}):this.highFpsCounter===s?(this.highFpsCounter=0,{lowFPS:!1,highFPS:!0,criticalFPS:!1}):(n?this.highFpsCounter=0:(this.lowFpsCounter=0,this.criticalFpsCounter=0),{lowFPS:!1,highFPS:!1,criticalFPS:!1})}};o(f,"PerformanceCounter");var u=f,g=class{constructor(t,i,s){var n;e(this,"mode",-1),e(this,"panels",[]),e(this,"appContainer"),e(this,"maxValues"),e(this,"debug"),e(this,"stats"),e(this,"container"),this.debug=t,this.appContainer=i,this.maxValues=s,this.container=this.createContainer(),this.addPanel(new l({name:"FPS",foregroundColor:"#0ff",backgroundColor:"#002"})),this.addPanel(new l({name:"MS",foregroundColor:"#0f0",backgroundColor:"#020"})),null!=(n=window.performance)&&n.memory&&this.addPanel(new l({name:"MB",foregroundColor:"#f08",backgroundColor:"#201"})),this.debug&&this.showPerformancePanel()}createContainer(){let t=document.createElement("div");return t.style.cssText="position:absolute;top:0;right:0;cursor:pointer;opacity:0.9;z-index:10000",t.addEventListener("click",(t=>{t.preventDefault(),this.showPanel(++this.mode%this.panels.length)})),t}addPanel(t){this.panels.push(t),this.container.appendChild(t.dom)}showPanel(t){this.panels.forEach(((e,i)=>{e.dom.style.display=i===t?"block":"none"})),this.mode=t}hidePerformancePanel(){this.container.parentNode&&(this.debug=!1,this.appContainer.removeChild(this.container))}showPerformancePanel(){this.container.parentNode||(this.debug=!0,this.stats&&this.updatePanels(this.stats),this.appContainer.appendChild(this.container))}updatePanels(t){this.stats=t,this.debug&&this.panels.forEach(((e,i)=>{0===i?e.update(t.fps,this.maxValues.fps):1===i?e.update(t.ms,this.maxValues.ms):2===i&&e.update(t.mb,this.maxValues.mb)}))}get dom(){return this.container}};o(g,"PerformanceView");var d=g,v=class{constructor(t){this.config=t,e(this,"min",1/0),e(this,"max",0),e(this,"canvas"),e(this,"context"),e(this,"PR",Math.round(window.devicePixelRatio||1)),e(this,"WIDTH",80*this.PR),e(this,"HEIGHT",48*this.PR),e(this,"TEXT_X",3*this.PR),e(this,"TEXT_Y",2*this.PR),e(this,"GRAPH_X",3*this.PR),e(this,"GRAPH_Y",15*this.PR),e(this,"GRAPH_WIDTH",74*this.PR),e(this,"GRAPH_HEIGHT",30*this.PR),this.canvas=document.createElement("canvas"),this.context=this.canvas.getContext("2d"),this.setupCanvas()}setupCanvas(){this.canvas.dataset.name=this.config.name,this.canvas.width=this.WIDTH,this.canvas.height=this.HEIGHT,this.canvas.style.width="".concat(this.WIDTH/this.PR,"px"),this.canvas.style.height="".concat(this.HEIGHT/this.PR,"px"),this.context.font="bold ".concat(9*this.PR,"px Helvetica,Arial,sans-serif"),this.context.textBaseline="top",this.context.fillStyle=this.config.backgroundColor,this.context.fillRect(0,0,this.WIDTH,this.HEIGHT),this.context.fillStyle=this.config.foregroundColor,this.context.fillText(this.config.name,this.TEXT_X,this.TEXT_Y),this.context.fillRect(this.GRAPH_X,this.GRAPH_Y,this.GRAPH_WIDTH,this.GRAPH_HEIGHT),this.context.fillStyle=this.config.backgroundColor,this.context.globalAlpha=.9,this.context.fillRect(this.GRAPH_X,this.GRAPH_Y,this.GRAPH_WIDTH,this.GRAPH_HEIGHT)}get dom(){return this.canvas}update(t,e){this.min=Math.min(this.min,t),this.max=Math.max(this.max,t);let{context:i,WIDTH:s,GRAPH_Y:n,GRAPH_WIDTH:a,GRAPH_HEIGHT:h,PR:o}=this;i.fillStyle=this.config.backgroundColor,i.globalAlpha=1,i.fillRect(0,0,s,n),i.fillStyle=this.config.foregroundColor,i.fillText("".concat(Math.round(t)," ").concat(this.config.name," (").concat(Math.round(this.min),"-").concat(Math.round(this.max),")"),this.TEXT_X,this.TEXT_Y),i.drawImage(this.canvas,this.GRAPH_X+o,this.GRAPH_Y,a-o,h,this.GRAPH_X,this.GRAPH_Y,a-o,h),i.fillRect(this.GRAPH_X+a-o,this.GRAPH_Y,o,h),i.fillStyle=this.config.backgroundColor,i.globalAlpha=.9,i.fillRect(this.GRAPH_X+a-o,this.GRAPH_Y,o,Math.round((1-t/e)*h))}};o(v,"Panel");var l=v;export{b as PerformanceController,d as PerformanceView};
@@ -1 +1 @@
1
- import{a as hn}from"./chunk-I5VIUPV4.js";import{a as u}from"./chunk-ZRT45YCM.js";hn();var ln={},Qn=u((function(n,t,r,e,i){var a=new Worker(ln[t]||(ln[t]=URL.createObjectURL(new Blob([n+';addEventListener("error",function(e){e=e.error;postMessage({$e$:[e.message,e.code,e.stack]})})'],{type:"text/javascript"}))));return a.onmessage=function(n){var t=n.data,r=t.$e$;if(r){var e=new Error(r[0]);e.code=r[1],e.stack=r[2],i(e,null)}else i(null,t)},a.postMessage(r,e),a}),"wk"),D=Uint8Array,q=Uint16Array,gr=Uint32Array,yr=new D([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0]),wr=new D([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0]),Ur=new D([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),xn=u((function(n,t){for(var r=new q(31),e=0;e<31;++e)r[e]=t+=1<<n[e-1];var i=new gr(r[30]);for(e=1;e<30;++e)for(var a=r[e];a<r[e+1];++a)i[a]=a-r[e]<<5|e;return[r,i]}),"freb"),zn=xn(yr,2),dr=zn[0],Or=zn[1];dr[28]=258,Or[258]=28;var An=xn(wr,0),Mn=An[0],Yr=An[1],Dr=new q(32768);for(E=0;E<32768;++E)tr=(61680&(tr=(52428&(tr=(43690&E)>>>1|(21845&E)<<1))>>>2|(13107&tr)<<2))>>>4|(3855&tr)<<4,Dr[E]=((65280&tr)>>>8|(255&tr)<<8)>>>1;var tr,X=u((function(n,t,r){for(var e=n.length,i=0,a=new q(t);i<e;++i)n[i]&&++a[n[i]-1];var o,u=new q(t);for(i=0;i<t;++i)u[i]=u[i-1]+a[i-1]<<1;if(r){o=new q(1<<t);var s=15-t;for(i=0;i<e;++i)if(n[i])for(var f=i<<4|n[i],h=t-n[i],c=u[n[i]-1]++<<h,l=c|(1<<h)-1;c<=l;++c)o[Dr[c]>>>s]=f}else for(o=new q(e),i=0;i<e;++i)n[i]&&(o[i]=Dr[u[n[i]-1]++]>>>15-n[i]);return o}),"hMap"),ir=new D(288);for(E=0;E<144;++E)ir[E]=8;for(E=144;E<256;++E)ir[E]=9;for(E=256;E<280;++E)ir[E]=7;for(E=280;E<288;++E)ir[E]=8;var cr=new D(32);for(E=0;E<32;++E)cr[E]=5;var E,Tn=X(ir,9,0),Un=X(ir,9,1),Dn=X(cr,5,0),Sn=X(cr,5,1),Zr=u((function(n){for(var t=n[0],r=1;r<n.length;++r)n[r]>t&&(t=n[r]);return t}),"max"),V=u((function(n,t,r){var e=t/8|0;return(n[e]|n[e+1]<<8)>>(7&t)&r}),"bits"),kr=u((function(n,t){var r=t/8|0;return(n[r]|n[r+1]<<8|n[r+2]<<16)>>(7&t)}),"bits16"),Sr=u((function(n){return(n+7)/8|0}),"shft"),d=u((function(n,t,r){(null==t||t<0)&&(t=0),(null==r||r>n.length)&&(r=n.length);var e=new(2==n.BYTES_PER_ELEMENT?q:4==n.BYTES_PER_ELEMENT?gr:D)(r-t);return e.set(n.subarray(t,r)),e}),"slc"),at={UnexpectedEOF:0,InvalidBlockType:1,InvalidLengthLiteral:2,InvalidDistance:3,StreamFinished:4,NoStreamHandler:5,InvalidHeader:6,NoCallback:7,InvalidUTF8:8,ExtraFieldTooLong:9,InvalidDate:10,FilenameTooLong:11,StreamFinishing:12,InvalidZipData:13,UnknownCompressionMethod:14},Cn=["unexpected EOF","invalid block type","invalid length/literal","invalid distance","stream finished","no stream handler",,"no callback","invalid UTF-8 data","extra field too long","date not in range 1980-2099","filename too long","stream finishing","invalid zip data"],g=u((function(n,t,r){var e=new Error(t||Cn[n]);if(e.code=n,Error.captureStackTrace&&Error.captureStackTrace(e,g),!r)throw e;return e}),"err"),Cr=u((function(n,t,r){var e=n.length;if(!e||r&&r.f&&!r.l)return t||new D(0);var i=!t||r,a=!r||r.i;r||(r={}),t||(t=new D(3*e));var o=u((function(n){var r=t.length;if(n>r){var e=new D(Math.max(2*r,n));e.set(t),t=e}}),"cbuf"),s=r.f||0,f=r.p||0,h=r.b||0,c=r.l,l=r.d,p=r.m,v=r.n,y=8*e;do{if(!c){s=V(n,f,1);var m=V(n,f+1,3);if(f+=3,!m){var b=n[(N=Sr(f)+4)-4]|n[N-3]<<8,w=N+b;if(w>e){a&&g(0);break}i&&o(h+b),t.set(n.subarray(N,w),h),r.b=h+=b,r.p=f=8*w,r.f=s;continue}if(1==m)c=Un,l=Sn,p=9,v=5;else if(2==m){var z=V(n,f,31)+257,E=V(n,f+10,15)+4,I=z+V(n,f+5,31)+1;f+=14;for(var k=new D(I),S=new D(19),A=0;A<E;++A)S[Ur[A]]=V(n,f+3*A,7);f+=3*E;var M=Zr(S),x=(1<<M)-1,U=X(S,M,1);for(A=0;A<I;){var N,T=U[V(n,f,x)];if(f+=15&T,(N=T>>>4)<16)k[A++]=N;else{var C=0,F=0;for(16==N?(F=3+V(n,f,3),f+=2,C=k[A-1]):17==N?(F=3+V(n,f,7),f+=3):18==N&&(F=11+V(n,f,127),f+=7);F--;)k[A++]=C}}var Z=k.subarray(0,z),W=k.subarray(z);p=Zr(Z),v=Zr(W),c=X(Z,p,1),l=X(W,v,1)}else g(1);if(f>y){a&&g(0);break}}i&&o(h+131072);for(var q=(1<<p)-1,K=(1<<v)-1,G=f;;G=f){var _=(C=c[kr(n,f)&q])>>>4;if((f+=15&C)>y){a&&g(0);break}if(C||g(2),_<256)t[h++]=_;else{if(256==_){G=f,c=null;break}var L=_-254;if(_>264){var O=yr[A=_-257];L=V(n,f,(1<<O)-1)+dr[A],f+=O}var P=l[kr(n,f)&K],R=P>>>4;P||g(3),f+=15&P;W=Mn[R];if(R>3){O=wr[R];W+=kr(n,f)&(1<<O)-1,f+=O}if(f>y){a&&g(0);break}i&&o(h+131072);for(var $=h+L;h<$;h+=4)t[h]=t[h-W],t[h+1]=t[h+1-W],t[h+2]=t[h+2-W],t[h+3]=t[h+3-W];h=$}}r.l=c,r.p=G,r.b=h,r.f=s,c&&(s=1,r.m=p,r.d=l,r.n=v)}while(!s);return h==t.length?t:d(t,0,h)}),"inflt"),nr=u((function(n,t,r){r<<=7&t;var e=t/8|0;n[e]|=r,n[e+1]|=r>>>8}),"wbits"),hr=u((function(n,t,r){r<<=7&t;var e=t/8|0;n[e]|=r,n[e+1]|=r>>>8,n[e+2]|=r>>>16}),"wbits16"),Gr=u((function(n,t){for(var r=[],e=0;e<n.length;++e)n[e]&&r.push({s:e,f:n[e]});var i=r.length,a=r.slice();if(!i)return[er,0];if(1==i){var o=new D(r[0].s+1);return o[r[0].s]=1,[o,1]}r.sort((function(n,t){return n.f-t.f})),r.push({s:-1,f:25001});var u=r[0],s=r[1],f=0,h=1,c=2;for(r[0]={s:-1,f:u.f+s.f,l:u,r:s};h!=i-1;)u=r[r[f].f<r[c].f?f++:c++],s=r[f!=h&&r[f].f<r[c].f?f++:c++],r[h++]={s:-1,f:u.f+s.f,l:u,r:s};var l=a[0].s;for(e=1;e<i;++e)a[e].s>l&&(l=a[e].s);var p=new q(l+1),v=Lr(r[h-1],p,0);if(v>t){e=0;var g=0,d=v-t,y=1<<d;for(a.sort((function(n,t){return p[t.s]-p[n.s]||n.f-t.f}));e<i;++e){var m=a[e].s;if(!(p[m]>t))break;g+=y-(1<<v-p[m]),p[m]=t}for(g>>>=d;g>0;){var b=a[e].s;p[b]<t?g-=1<<t-p[b]++-1:++e}for(;e>=0&&g;--e){var w=a[e].s;p[w]==t&&(--p[w],++g)}v=t}return[new D(p),v]}),"hTree"),Lr=u((function(n,t,r){return-1==n.s?Math.max(Lr(n.l,t,r+1),Lr(n.r,t,r+1)):t[n.s]=r}),"ln"),Wr=u((function(n){for(var t=n.length;t&&!n[--t];);for(var r=new q(++t),e=0,i=n[0],a=1,o=u((function(n){r[e++]=n}),"w"),s=1;s<=t;++s)if(n[s]==i&&s!=t)++a;else{if(!i&&a>2){for(;a>138;a-=138)o(32754);a>2&&(o(a>10?a-11<<5|28690:a-3<<5|12305),a=0)}else if(a>3){for(o(i),--a;a>6;a-=6)o(8304);a>2&&(o(a-3<<5|8208),a=0)}for(;a--;)o(i);a=1,i=n[s]}return[r.subarray(0,e),t]}),"lc"),lr=u((function(n,t){for(var r=0,e=0;e<t.length;++e)r+=n[e]*t[e];return r}),"clen"),Pr=u((function(n,t,r){var e=r.length,i=Sr(t+2);n[i]=255&e,n[i+1]=e>>>8,n[i+2]=255^n[i],n[i+3]=255^n[i+1];for(var a=0;a<e;++a)n[i+a+4]=r[a];return 8*(i+4+e)}),"wfblk"),jr=u((function(n,t,r,e,i,a,o,u,s,f,h){nr(t,h++,r),++i[256];for(var c=Gr(i,15),l=c[0],p=c[1],v=Gr(a,15),g=v[0],d=v[1],y=Wr(l),m=y[0],b=y[1],w=Wr(g),z=w[0],D=w[1],E=new q(19),I=0;I<m.length;++I)E[31&m[I]]++;for(I=0;I<z.length;++I)E[31&z[I]]++;for(var k=Gr(E,7),S=k[0],A=k[1],M=19;M>4&&!S[Ur[M-1]];--M);var x,U,N,T,C=f+5<<3,F=lr(i,ir)+lr(a,cr)+o,Z=lr(i,l)+lr(a,g)+o+14+3*M+lr(E,S)+(2*E[16]+3*E[17]+7*E[18]);if(C<=F&&C<=Z)return Pr(t,h,n.subarray(s,s+f));if(nr(t,h,1+(Z<F)),h+=2,Z<F){x=X(l,p,0),U=l,N=X(g,d,0),T=g;var W=X(S,A,0);nr(t,h,b-257),nr(t,h+5,D-1),nr(t,h+10,M-4),h+=14;for(I=0;I<M;++I)nr(t,h+3*I,S[Ur[I]]);h+=3*M;for(var V=[m,z],K=0;K<2;++K){var G=V[K];for(I=0;I<G.length;++I){var _=31&G[I];nr(t,h,W[_]),h+=S[_],_>15&&(nr(t,h,G[I]>>>5&127),h+=G[I]>>>12)}}}else x=Tn,U=ir,N=Dn,T=cr;for(I=0;I<u;++I)if(e[I]>255){_=e[I]>>>18&31;hr(t,h,x[_+257]),h+=U[_+257],_>7&&(nr(t,h,e[I]>>>23&31),h+=yr[_]);var L=31&e[I];hr(t,h,N[L]),h+=T[L],L>3&&(hr(t,h,e[I]>>>5&8191),h+=wr[L])}else hr(t,h,x[e[I]]),h+=U[e[I]];return hr(t,h,x[256]),h+U[256]}),"wblk"),En=new gr([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),er=new D(0),Fn=u((function(n,t,r,e,i,a){var o=n.length,s=new D(e+o+5*(1+Math.ceil(o/7e3))+i),f=s.subarray(e,s.length-i),h=0;if(!t||o<8)for(var c=0;c<=o;c+=65535){var l=c+65535;l>=o&&(f[h>>3]=a),h=Pr(f,h+1,n.subarray(c,l))}else{for(var p=En[t-1],v=p>>>13,g=8191&p,y=(1<<r)-1,m=new q(32768),b=new q(y+1),w=Math.ceil(r/3),z=2*w,E=u((function(t){return(n[t]^n[t+1]<<w^n[t+2]<<z)&y}),"hsh"),I=new gr(25e3),k=new q(288),S=new q(32),A=0,M=0,x=(c=0,0),U=0,N=0;c<o;++c){var T=E(c),C=32767&c,F=b[T];if(m[C]=F,b[T]=C,U<=c){var Z=o-c;if((A>7e3||x>24576)&&Z>423){h=jr(n,f,0,I,k,S,M,x,N,c-N,h),x=A=M=0,N=c;for(var W=0;W<286;++W)k[W]=0;for(W=0;W<30;++W)S[W]=0}var V=2,K=0,X=g,G=C-F&32767;if(Z>2&&T==E(c-G))for(var _=Math.min(v,Z)-1,L=Math.min(32767,c),O=Math.min(258,Z);G<=L&&--X&&C!=F;){if(n[c+V]==n[c+V-G]){for(var P=0;P<O&&n[c+P]==n[c+P-G];++P);if(P>V){if(V=P,K=G,P>_)break;var R=Math.min(G,P-2),$=0;for(W=0;W<R;++W){var j=c-G+W+32768&32767,B=j-m[j]+32768&32767;B>$&&($=B,F=j)}}}G+=(C=F)-(F=m[C])+32768&32767}if(K){I[x++]=268435456|Or[V]<<18|Yr[K];var H=31&Or[V],Y=31&Yr[K];M+=yr[H]+wr[Y],++k[257+H],++S[Y],U=c+V,++A}else I[x++]=n[c],++k[n[c]]}}h=jr(n,f,a,I,k,S,M,x,N,c-N,h),!a&&7&h&&(h=Pr(f,h+1,er))}return d(s,0,e+Sr(h)+i)}),"dflt"),In=function(){for(var n=new Int32Array(256),t=0;t<256;++t){for(var r=t,e=9;--e;)r=(1&r&&-306674912)^r>>>1;n[t]=r}return n}(),mr=u((function(){var n=-1;return{p:function(t){for(var r=n,e=0;e<t.length;++e)r=In[255&r^t[e]]^r>>>8;n=r},d:function(){return~n}}}),"crc"),br=u((function(){var n=1,t=0;return{p:function(r){for(var e=n,i=t,a=0|r.length,o=0;o!=a;){for(var u=Math.min(o+2655,a);o<u;++o)i+=e+=r[o];e=(65535&e)+15*(e>>16),i=(65535&i)+15*(i>>16)}n=e,t=i},d:function(){return(255&(n%=65521))<<24|n>>>8<<16|(255&(t%=65521))<<8|t>>>8}}}),"adler"),ur=u((function(n,t,r,e,i){return Fn(n,null==t.level?6:t.level,null==t.mem?Math.ceil(1.5*Math.max(8,Math.min(13,Math.log(n.length)))):12+t.mem,r,e,!i)}),"dopt"),Er=u((function(n,t){var r={};for(var e in n)r[e]=n[e];for(var e in t)r[e]=t[e];return r}),"mrg"),cn=u((function(n,t,r){for(var e=n(),i=n.toString(),a=i.slice(i.indexOf("[")+1,i.lastIndexOf("]")).replace(/\s+/g,"").split(","),o=0;o<e.length;++o){var u=e[o],s=a[o];if("function"==typeof u){t+=";"+s+"=";var f=u.toString();if(u.prototype)if(-1!=f.indexOf("[native code]")){var h=f.indexOf(" ",8)+1;t+=f.slice(h,f.indexOf("(",h))}else for(var c in t+=f,u.prototype)t+=";"+s+".prototype."+c+"="+u.prototype[c].toString();else t+=f}else r[s]=u}return[t,r]}),"wcln"),Br=[],Vn=u((function(n){var t=[];for(var r in n)n[r].buffer&&t.push((n[r]=new n[r].constructor(n[r])).buffer);return t}),"cbfs"),Bn=u((function(n,t,r,e){var i;if(!Br[r]){for(var a="",o={},u=n.length-1,s=0;s<u;++s)a=(i=cn(n[s],a,o))[0],o=i[1];Br[r]=cn(n[u],a,o)}var f=Er({},Br[r][1]);return Qn(Br[r][0]+";onmessage=function(e){for(var k in e.data)self[k]=e.data[k];onmessage="+t.toString()+"}",r,f,Vn(f),e)}),"wrkr"),xr=u((function(){return[D,q,gr,yr,wr,Ur,dr,Mn,Un,Sn,Dr,Cn,X,Zr,V,kr,Sr,d,g,Cr,Fr,fr,_r]}),"bInflt"),zr=u((function(){return[D,q,gr,yr,wr,Ur,Or,Yr,Tn,ir,Dn,cr,Dr,En,er,X,nr,hr,Gr,Lr,Wr,lr,Pr,jr,Sr,d,Fn,ur,$r,fr]}),"bDflt"),Zn=u((function(){return[rn,tn,I,mr,In]}),"gze"),kn=u((function(){return[nn,Ln]}),"guze"),Gn=u((function(){return[en,I,br]}),"zle"),On=u((function(){return[Pn]}),"zule"),fr=u((function(n){return postMessage(n,[n.buffer])}),"pbf"),_r=u((function(n){return n&&n.size&&new D(n.size)}),"gu8"),Ar=u((function(n,t,r,e,i,a){var o=Bn(r,e,i,(function(n,t){o.terminate(),a(n,t)}));return o.postMessage([n,t],t.consume?[n.buffer]:[]),function(){o.terminate()}}),"cbify"),b=u((function(n){return n.ondata=function(n,t){return postMessage([n,t],[n.buffer])},function(t){return n.push(t.data[0],t.data[1])}}),"astrm"),Mr=u((function(n,t,r,e,i){var a,o=Bn(n,e,i,(function(n,r){n?(o.terminate(),t.ondata.call(t,n)):(r[1]&&o.terminate(),t.ondata.call(t,n,r[0],r[1]))}));o.postMessage(r),t.push=function(n,r){t.ondata||g(5),a&&t.ondata(g(4,0,1),null,!!r),o.postMessage([n,a=r],[n.buffer])},t.terminate=function(){o.terminate()}}),"astrmify"),W=u((function(n,t){return n[t]|n[t+1]<<8}),"b2"),N=u((function(n,t){return(n[t]|n[t+1]<<8|n[t+2]<<16|n[t+3]<<24)>>>0}),"b4"),Hr=u((function(n,t){return N(n,t)+4294967296*N(n,t+4)}),"b8"),I=u((function(n,t,r){for(;r;++t)n[t]=r,r>>>=8}),"wbytes"),rn=u((function(n,t){var r=t.filename;if(n[0]=31,n[1]=139,n[2]=8,n[8]=t.level<2?4:9==t.level?2:0,n[9]=3,0!=t.mtime&&I(n,4,Math.floor(new Date(t.mtime||Date.now())/1e3)),r){n[3]=8;for(var e=0;e<=r.length;++e)n[e+10]=r.charCodeAt(e)}}),"gzh"),nn=u((function(n){(31!=n[0]||139!=n[1]||8!=n[2])&&g(6,"invalid gzip data");var t=n[3],r=10;4&t&&(r+=n[10]|2+(n[11]<<8));for(var e=(t>>3&1)+(t>>4&1);e>0;e-=!n[r++]);return r+(2&t)}),"gzs"),Ln=u((function(n){var t=n.length;return(n[t-4]|n[t-3]<<8|n[t-2]<<16|n[t-1]<<24)>>>0}),"gzl"),tn=u((function(n){return 10+(n.filename&&n.filename.length+1||0)}),"gzhl"),en=u((function(n,t){var r=t.level,e=0==r?0:r<6?1:9==r?3:2;n[0]=120,n[1]=e<<6|(e?32-2*e:1)}),"zlh"),Pn=u((function(n){(8!=(15&n[0])||n[0]>>>4>7||(n[0]<<8|n[1])%31)&&g(6,"invalid zlib data"),32&n[1]&&g(6,"invalid zlib data: preset dictionaries not supported")}),"zlv");function an(n,t){return!t&&"function"==typeof n&&(t=n,n={}),this.ondata=t,n}u(an,"AsyncCmpStrm");var ar=function(){function n(n,t){!t&&"function"==typeof n&&(t=n,n={}),this.ondata=t,this.o=n||{}}return u(n,"Deflate"),n.prototype.p=function(n,t){this.ondata(ur(n,this.o,0,0,!t),t)},n.prototype.push=function(n,t){this.ondata||g(5),this.d&&g(4),this.d=t,this.p(n,t||!1)},n}(),Xn=function(){function n(n,t){Mr([zr,function(){return[b,ar]}],this,an.call(this,n,t),(function(n){var t=new ar(n.data);onmessage=b(t)}),6)}return u(n,"AsyncDeflate"),n}();function dn(n,t,r){return r||(r=t,t={}),"function"!=typeof r&&g(7),Ar(n,t,[zr],(function(n){return fr($r(n.data[0],n.data[1]))}),0,r)}function $r(n,t){return ur(n,t||{},0,0)}u(dn,"deflate"),u($r,"deflateSync");var K=function(){function n(n){this.s={},this.p=new D(0),this.ondata=n}return u(n,"Inflate"),n.prototype.e=function(n){this.ondata||g(5),this.d&&g(4);var t=this.p.length,r=new D(t+n.length);r.set(this.p),r.set(n,t),this.p=r},n.prototype.c=function(n){this.d=this.s.i=n||!1;var t=this.s.b,r=Cr(this.p,this.o,this.s);this.ondata(d(r,t,this.s.b),this.d),this.o=d(r,this.s.b-32768),this.s.b=this.o.length,this.p=d(this.p,this.s.p/8|0),this.s.p&=7},n.prototype.push=function(n,t){this.e(n),this.c(t)},n}(),Nn=function(){function n(n){this.ondata=n,Mr([xr,function(){return[b,K]}],this,0,(function(){var n=new K;onmessage=b(n)}),7)}return u(n,"AsyncInflate"),n}();function Rn(n,t,r){return r||(r=t,t={}),"function"!=typeof r&&g(7),Ar(n,t,[xr],(function(n){return fr(Fr(n.data[0],_r(n.data[1])))}),1,r)}function Fr(n,t){return Cr(n,t)}u(Rn,"inflate"),u(Fr,"inflateSync");var pn=function(){function n(n,t){this.c=mr(),this.l=0,this.v=1,ar.call(this,n,t)}return u(n,"Gzip"),n.prototype.push=function(n,t){ar.prototype.push.call(this,n,t)},n.prototype.p=function(n,t){this.c.p(n),this.l+=n.length;var r=ur(n,this.o,this.v&&tn(this.o),t&&8,!t);this.v&&(rn(r,this.o),this.v=0),t&&(I(r,r.length-8,this.c.d()),I(r,r.length-4,this.l)),this.ondata(r,t)},n}(),ot=function(){function n(n,t){Mr([zr,Zn,function(){return[b,ar,pn]}],this,an.call(this,n,t),(function(n){var t=new pn(n.data);onmessage=b(t)}),8)}return u(n,"AsyncGzip"),n}();function ft(n,t,r){return r||(r=t,t={}),"function"!=typeof r&&g(7),Ar(n,t,[zr,Zn,function(){return[gn]}],(function(n){return fr(gn(n.data[0],n.data[1]))}),2,r)}function gn(n,t){t||(t={});var r=mr(),e=n.length;r.p(n);var i=ur(n,t,tn(t),8),a=i.length;return rn(i,t),I(i,a-8,r.d()),I(i,a-4,e),i}u(ft,"gzip"),u(gn,"gzipSync");var Jr=function(){function n(n){this.v=1,K.call(this,n)}return u(n,"Gunzip"),n.prototype.push=function(n,t){if(K.prototype.e.call(this,n),this.v){var r=this.p.length>3?nn(this.p):4;if(r>=this.p.length&&!t)return;this.p=this.p.subarray(r),this.v=0}t&&(this.p.length<8&&g(6,"invalid gzip data"),this.p=this.p.subarray(0,-8)),K.prototype.c.call(this,t)},n}(),bn=function(){function n(n){this.ondata=n,Mr([xr,kn,function(){return[b,K,Jr]}],this,0,(function(){var n=new Jr;onmessage=b(n)}),9)}return u(n,"AsyncGunzip"),n}();function _n(n,t,r){return r||(r=t,t={}),"function"!=typeof r&&g(7),Ar(n,t,[xr,kn,function(){return[Kr]}],(function(n){return fr(Kr(n.data[0]))}),3,r)}function Kr(n,t){return Cr(n.subarray(nn(n),-8),t||new D(Ln(n)))}u(_n,"gunzip"),u(Kr,"gunzipSync");var yn=function(){function n(n,t){this.c=br(),this.v=1,ar.call(this,n,t)}return u(n,"Zlib"),n.prototype.push=function(n,t){ar.prototype.push.call(this,n,t)},n.prototype.p=function(n,t){this.c.p(n);var r=ur(n,this.o,this.v&&2,t&&4,!t);this.v&&(en(r,this.o),this.v=0),t&&I(r,r.length-4,this.c.d()),this.ondata(r,t)},n}(),st=function(){function n(n,t){Mr([zr,Gn,function(){return[b,ar,yn]}],this,an.call(this,n,t),(function(n){var t=new yn(n.data);onmessage=b(t)}),10)}return u(n,"AsyncZlib"),n}();function ut(n,t,r){return r||(r=t,t={}),"function"!=typeof r&&g(7),Ar(n,t,[zr,Gn,function(){return[wn]}],(function(n){return fr(wn(n.data[0],n.data[1]))}),4,r)}function wn(n,t){t||(t={});var r=br();r.p(n);var e=ur(n,t,2,4);return en(e,t),I(e,e.length-4,r.d()),e}u(ut,"zlib"),u(wn,"zlibSync");var Qr=function(){function n(n){this.v=1,K.call(this,n)}return u(n,"Unzlib"),n.prototype.push=function(n,t){if(K.prototype.e.call(this,n),this.v){if(this.p.length<2&&!t)return;this.p=this.p.subarray(2),this.v=0}t&&(this.p.length<4&&g(6,"invalid zlib data"),this.p=this.p.subarray(0,-4)),K.prototype.c.call(this,t)},n}(),rt=function(){function n(n){this.ondata=n,Mr([xr,On,function(){return[b,K,Qr]}],this,0,(function(){var n=new Qr;onmessage=b(n)}),11)}return u(n,"AsyncUnzlib"),n}();function nt(n,t,r){return r||(r=t,t={}),"function"!=typeof r&&g(7),Ar(n,t,[xr,On,function(){return[Vr]}],(function(n){return fr(Vr(n.data[0],_r(n.data[1])))}),5,r)}function Vr(n,t){return Cr((Pn(n),n.subarray(2,-4)),t)}u(nt,"unzlib"),u(Vr,"unzlibSync");var tt=function(){function n(n){this.G=Jr,this.I=K,this.Z=Qr,this.ondata=n}return u(n,"Decompress"),n.prototype.push=function(n,t){if(this.ondata||g(5),this.s)this.s.push(n,t);else{if(this.p&&this.p.length){var r=new D(this.p.length+n.length);r.set(this.p),r.set(n,this.p.length)}else this.p=n;if(this.p.length>2){var e=this,i=u((function(){e.ondata.apply(e,arguments)}),"cb");this.s=31==this.p[0]&&139==this.p[1]&&8==this.p[2]?new this.G(i):8!=(15&this.p[0])||this.p[0]>>4>7||(this.p[0]<<8|this.p[1])%31?new this.I(i):new this.Z(i),this.s.push(this.p,t),this.p=null}}},n}(),vt=function(){function n(n){this.G=bn,this.I=Nn,this.Z=rt,this.ondata=n}return u(n,"AsyncDecompress"),n.prototype.push=function(n,t){tt.prototype.push.call(this,n,t)},n}();function ht(n,t,r){return r||(r=t,t={}),"function"!=typeof r&&g(7),31==n[0]&&139==n[1]&&8==n[2]?_n(n,t,r):8!=(15&n[0])||n[0]>>4>7||(n[0]<<8|n[1])%31?Rn(n,t,r):nt(n,t,r)}function lt(n,t){return 31==n[0]&&139==n[1]&&8==n[2]?Kr(n,t):8!=(15&n[0])||n[0]>>4>7||(n[0]<<8|n[1])%31?Fr(n,t):Vr(n,t)}u(ht,"decompress"),u(lt,"decompressSync");var on=u((function(n,t,r,e){for(var i in n){var a=n[i],o=t+i,u=e;Array.isArray(a)&&(u=Er(e,a[1]),a=a[0]),a instanceof D?r[o]=[a,u]:(r[o+="/"]=[new D(0),u],on(a,o,r,e))}}),"fltn"),mn=typeof TextEncoder<"u"&&new TextEncoder,Xr=typeof TextDecoder<"u"&&new TextDecoder,$n=0;try{Xr.decode(er,{stream:!0}),$n=1}catch{}var qn=u((function(n){for(var t="",r=0;;){var e=n[r++],i=(e>127)+(e>223)+(e>239);if(r+i>n.length)return[t,d(n,r-1)];i?3==i?(e=((15&e)<<18|(63&n[r++])<<12|(63&n[r++])<<6|63&n[r++])-65536,t+=String.fromCharCode(55296|e>>10,56320|1023&e)):t+=1&i?String.fromCharCode((31&e)<<6|63&n[r++]):String.fromCharCode((15&e)<<12|(63&n[r++])<<6|63&n[r++]):t+=String.fromCharCode(e)}}),"dutf8"),ct=function(){function n(n){this.ondata=n,$n?this.t=new TextDecoder:this.p=er}return u(n,"DecodeUTF8"),n.prototype.push=function(n,t){if(this.ondata||g(5),t=!!t,this.t)return this.ondata(this.t.decode(n,{stream:!0}),t),void(t&&(this.t.decode().length&&g(8),this.t=null));this.p||g(4);var r=new D(this.p.length+n.length);r.set(this.p),r.set(n,this.p.length);var e=qn(r),i=e[0],a=e[1];t?(a.length&&g(8),this.p=null):this.p=a,this.ondata(i,t)},n}(),pt=function(){function n(n){this.ondata=n}return u(n,"EncodeUTF8"),n.prototype.push=function(n,t){this.ondata||g(5),this.d&&g(4),this.ondata(sr(n),this.d=t||!1)},n}();function sr(n,t){if(t){for(var r=new D(n.length),e=0;e<n.length;++e)r[e]=n.charCodeAt(e);return r}if(mn)return mn.encode(n);var i=n.length,a=new D(n.length+(n.length>>1)),o=0,s=u((function(n){a[o++]=n}),"w");for(e=0;e<i;++e){if(o+5>a.length){var f=new D(o+8+(i-e<<1));f.set(a),a=f}var h=n.charCodeAt(e);h<128||t?s(h):h<2048?(s(192|h>>6),s(128|63&h)):h>55295&&h<57344?(s(240|(h=65536+(1047552&h)|1023&n.charCodeAt(++e))>>18),s(128|h>>12&63),s(128|h>>6&63),s(128|63&h)):(s(224|h>>12),s(128|h>>6&63),s(128|63&h))}return d(a,0,o)}function Hn(n,t){if(t){for(var r="",e=0;e<n.length;e+=16384)r+=String.fromCharCode.apply(null,n.subarray(e,e+16384));return r}if(Xr)return Xr.decode(n);var i=qn(n),a=i[0];return i[1].length&&g(8),a}u(sr,"strToU8"),u(Hn,"strFromU8");var Yn=u((function(n){return 1==n?3:n<6?2:9==n?1:0}),"dbf"),Wn=u((function(n,t){return t+30+W(n,t+26)+W(n,t+28)}),"slzh"),jn=u((function(n,t,r){var e=W(n,t+28),i=Hn(n.subarray(t+46,t+46+e),!(2048&W(n,t+8))),a=t+46+e,o=N(n,t+20),u=r&&4294967295==o?Jn(n,a):[o,N(n,t+24),N(n,t+42)],s=u[0],f=u[1],h=u[2];return[W(n,t+10),s,f,i,a+W(n,t+30)+W(n,t+32),h]}),"zh"),Jn=u((function(n,t){for(;1!=W(n,t);t+=4+W(n,t+2));return[Hr(n,t+12),Hr(n,t+4),Hr(n,t+20)]}),"z64e"),or=u((function(n){var t=0;if(n)for(var r in n){var e=n[r].length;e>65535&&g(9),t+=e+4}return t}),"exfl"),pr=u((function(n,t,r,e,i,a,o,u){var s=e.length,f=r.extra,h=u&&u.length,c=or(f);I(n,t,null!=o?33639248:67324752),t+=4,null!=o&&(n[t++]=20,n[t++]=r.os),n[t]=20,t+=2,n[t++]=r.flag<<1|(null==a&&8),n[t++]=i&&8,n[t++]=255&r.compression,n[t++]=r.compression>>8;var l=new Date(null==r.mtime?Date.now():r.mtime),p=l.getFullYear()-1980;if((p<0||p>119)&&g(10),I(n,t,p<<25|l.getMonth()+1<<21|l.getDate()<<16|l.getHours()<<11|l.getMinutes()<<5|l.getSeconds()>>>1),t+=4,null!=a&&(I(n,t,r.crc),I(n,t+4,a),I(n,t+8,r.size)),I(n,t+12,s),I(n,t+14,c),t+=16,null!=o&&(I(n,t,h),I(n,t+6,r.attrs),I(n,t+10,o),t+=14),n.set(e,t),t+=s,c)for(var v in f){var d=f[v],y=d.length;I(n,t,+v),I(n,t+2,y),n.set(d,t+4),t+=4+y}return h&&(n.set(u,t),t+=h),t}),"wzh"),fn=u((function(n,t,r,e,i){I(n,t,101010256),I(n,t+8,r),I(n,t+10,r),I(n,t+12,e),I(n,t+16,i)}),"wzf"),Nr=function(){function n(n){this.filename=n,this.c=mr(),this.size=0,this.compression=0}return u(n,"ZipPassThrough"),n.prototype.process=function(n,t){this.ondata(null,n,t)},n.prototype.push=function(n,t){this.ondata||g(5),this.c.p(n),this.size+=n.length,t&&(this.crc=this.c.d()),this.process(n,t||!1)},n}(),gt=function(){function n(n,t){var r=this;t||(t={}),Nr.call(this,n),this.d=new ar(t,(function(n,t){r.ondata(null,n,t)})),this.compression=8,this.flag=Yn(t.level)}return u(n,"ZipDeflate"),n.prototype.process=function(n,t){try{this.d.push(n,t)}catch(n){this.ondata(n,null,t)}},n.prototype.push=function(n,t){Nr.prototype.push.call(this,n,t)},n}(),yt=function(){function n(n,t){var r=this;t||(t={}),Nr.call(this,n),this.d=new Xn(t,(function(n,t,e){r.ondata(n,t,e)})),this.compression=8,this.flag=Yn(t.level),this.terminate=this.d.terminate}return u(n,"AsyncZipDeflate"),n.prototype.process=function(n,t){this.d.push(n,t)},n.prototype.push=function(n,t){Nr.prototype.push.call(this,n,t)},n}(),wt=function(){function n(n){this.ondata=n,this.u=[],this.d=1}return u(n,"Zip"),n.prototype.add=function(n){var t=this;if(this.ondata||g(5),2&this.d)this.ondata(g(4+8*(1&this.d),0,1),null,!1);else{var r=sr(n.filename),e=r.length,i=n.comment,a=i&&sr(i),o=e!=n.filename.length||a&&i.length!=a.length,s=e+or(n.extra)+30;e>65535&&this.ondata(g(11,0,1),null,!1);var f=new D(s);pr(f,0,n,r,o);var h=[f],c=u((function(){for(var n=0,r=h;n<r.length;n++){var e=r[n];t.ondata(null,e,!1)}h=[]}),"pAll_1"),l=this.d;this.d=0;var p=this.u.length,v=Er(n,{f:r,u:o,o:a,t:function(){n.terminate&&n.terminate()},r:function(){if(c(),l){var n=t.u[p+1];n?n.r():t.d=1}l=1}}),d=0;n.ondata=function(r,e,i){if(r)t.ondata(r,e,i),t.terminate();else if(d+=e.length,h.push(e),i){var a=new D(16);I(a,0,134695760),I(a,4,n.crc),I(a,8,d),I(a,12,n.size),h.push(a),v.c=d,v.b=s+d+16,v.crc=n.crc,v.size=n.size,l&&v.r(),l=1}else l&&c()},this.u.push(v)}},n.prototype.end=function(){var n=this;2&this.d?this.ondata(g(4+8*(1&this.d),0,1),null,!0):(this.d?this.e():this.u.push({r:function(){1&n.d&&(n.u.splice(-1,1),n.e())},t:function(){}}),this.d=3)},n.prototype.e=function(){for(var n=0,t=0,r=0,e=0,i=this.u;e<i.length;e++){r+=46+(s=i[e]).f.length+or(s.extra)+(s.o?s.o.length:0)}for(var a=new D(r+22),o=0,u=this.u;o<u.length;o++){var s=u[o];pr(a,n,s,s.f,s.u,s.c,t,s.o),n+=46+s.f.length+or(s.extra)+(s.o?s.o.length:0),t+=s.b}fn(a,n,this.u.length,r,t),this.ondata(null,a,!0),this.d=2},n.prototype.terminate=function(){for(var n=0,t=this.u;n<t.length;n++){t[n].t()}this.d=2},n}();function mt(n,t,r){r||(r=t,t={}),"function"!=typeof r&&g(7);var e={};on(n,"",e,t);var i=Object.keys(e),a=i.length,o=0,s=0,f=a,h=new Array(a),c=[],l=u((function(){for(var n=0;n<c.length;++n)c[n]()}),"tAll"),p=u((function(n,t){Rr((function(){r(n,t)}))}),"cbd");Rr((function(){p=r}));var v=u((function(){var n=new D(s+22),t=o,r=s-o;s=0;for(var e=0;e<f;++e){var i=h[e];try{var a=i.c.length;pr(n,s,i,i.f,i.u,a);var u=30+i.f.length+or(i.extra),c=s+u;n.set(i.c,c),pr(n,o,i,i.f,i.u,a,s,i.m),o+=16+u+(i.m?i.m.length:0),s=c+a}catch(n){return p(n,null)}}fn(n,o,h.length,r,t),p(null,n)}),"cbf");a||v();for(var d=u((function(n){var t=i[n],r=e[t],f=r[0],d=r[1],y=mr(),m=f.length;y.p(f);var b=sr(t),w=b.length,z=d.comment,D=z&&sr(z),E=D&&D.length,I=or(d.extra),k=0==d.level?0:8,S=u((function(r,e){if(r)l(),p(r,null);else{var i=e.length;h[n]=Er(d,{size:m,crc:y.d(),c:e,f:b,m:D,u:w!=t.length||D&&z.length!=E,compression:k}),o+=30+w+I+i,s+=76+2*(w+I)+(E||0)+i,--a||v()}}),"cbl");if(w>65535&&S(g(11,0,1),null),k)if(m<16e4)try{S(null,$r(f,d))}catch(n){S(n,null)}else c.push(dn(f,d,S));else S(null,f)}),"_loop_1"),y=0;y<f;++y)d(y);return l}function xt(n,t){t||(t={});var r={},e=[];on(n,"",r,t);var i=0,a=0;for(var o in r){var u=r[o],s=u[0],f=u[1],h=0==f.level?0:8,c=(k=sr(o)).length,l=f.comment,p=l&&sr(l),v=p&&p.length,d=or(f.extra);c>65535&&g(11);var y=h?$r(s,f):s,m=y.length,b=mr();b.p(s),e.push(Er(f,{size:s.length,crc:b.d(),c:y,f:k,m:p,u:c!=o.length||p&&l.length!=v,o:i,compression:h})),i+=30+c+d+m,a+=76+2*(c+d)+(v||0)+m}for(var w=new D(a+22),z=i,E=a-i,I=0;I<e.length;++I){var k=e[I];pr(w,k.o,k,k.f,k.u,k.c.length);var S=30+k.f.length+or(k.extra);w.set(k.c,k.o+S),pr(w,i,k,k.f,k.u,k.c.length,k.o,k.m),i+=16+S+(k.m?k.m.length:0)}return fn(w,i,e.length,E,z),w}u(mt,"zip"),u(xt,"zipSync");var et=function(){function n(){}return u(n,"UnzipPassThrough"),n.prototype.push=function(n,t){this.ondata(null,n,t)},n.compression=0,n}(),zt=function(){function n(){var n=this;this.i=new K((function(t,r){n.ondata(null,t,r)}))}return u(n,"UnzipInflate"),n.prototype.push=function(n,t){try{this.i.push(n,t)}catch(n){this.ondata(n,null,t)}},n.compression=8,n}(),At=function(){function n(n,t){var r=this;t<32e4?this.i=new K((function(n,t){r.ondata(null,n,t)})):(this.i=new Nn((function(n,t,e){r.ondata(n,t,e)})),this.terminate=this.i.terminate)}return u(n,"AsyncUnzipInflate"),n.prototype.push=function(n,t){this.i.terminate&&(n=d(n,0)),this.i.push(n,t)},n.compression=8,n}(),Mt=function(){function n(n){this.onfile=n,this.k=[],this.o={0:et},this.p=er}return u(n,"Unzip"),n.prototype.push=function(n,t){var r=this;if(this.onfile||g(5),this.p||g(4),this.c>0){var e=Math.min(this.c,n.length),i=n.subarray(0,e);if(this.c-=e,this.d?this.d.push(i,!this.c):this.k[0].push(i),(n=n.subarray(e)).length)return this.push(n,t)}else{var a=0,o=0,s=void 0,f=void 0;this.p.length?n.length?((f=new D(this.p.length+n.length)).set(this.p),f.set(n,this.p.length)):f=this.p:f=n;for(var h=f.length,c=this.c,l=c&&this.d,p=u((function(){var n,t=N(f,o);if(67324752==t){a=1,s=o,v.d=null,v.c=0;var e=W(f,o+6),i=W(f,o+8),u=2048&e,l=8&e,p=W(f,o+26),d=W(f,o+28);if(h>o+30+p+d){var y=[];v.k.unshift(y),a=2;var m=N(f,o+18),b=N(f,o+22),w=Hn(f.subarray(o+30,o+=30+p),!u);4294967295==m?(n=l?[-2]:Jn(f,o),m=n[0],b=n[1]):l&&(m=-1),o+=d,v.c=m;var z,D={name:w,compression:i,start:function(){if(D.ondata||g(5),m){var n=r.o[i];n||D.ondata(g(14,"unknown compression type "+i,1),null,!1),(z=m<0?new n(w):new n(w,m,b)).ondata=function(n,t,r){D.ondata(n,t,r)};for(var t=0,e=y;t<e.length;t++){var a=e[t];z.push(a,!1)}r.k[0]==y&&r.c?r.d=z:z.push(er,!0)}else D.ondata(null,er,!0)},terminate:function(){z&&z.terminate&&z.terminate()}};m>=0&&(D.size=m,D.originalSize=b),v.onfile(D)}return"break"}if(c){if(134695760==t)return s=o+=12+(-2==c&&8),a=3,v.c=0,"break";if(33639248==t)return s=o-=4,a=3,v.c=0,"break"}}),"_loop_2"),v=this;o<h-4;++o){if("break"===p())break}if(this.p=er,c<0){var d=a?f.subarray(0,s-12-(-2==c&&8)-(134695760==N(f,s-16)&&4)):f.subarray(0,o);l?l.push(d,!!a):this.k[+(2==a)].push(d)}if(2&a)return this.push(f.subarray(o),t);this.p=f.subarray(o)}t&&(this.c&&g(13),this.p=null)},n.prototype.register=function(n){this.o[n.compression]=n},n}(),Rr="function"==typeof queueMicrotask?queueMicrotask:"function"==typeof setTimeout?setTimeout:function(n){n()};function Tt(n,t,r){r||(r=t,t={}),"function"!=typeof r&&g(7);var e=[],i=u((function(){for(var n=0;n<e.length;++n)e[n]()}),"tAll"),a={},o=u((function(n,t){Rr((function(){r(n,t)}))}),"cbd");Rr((function(){o=r}));for(var s=n.length-22;101010256!=N(n,s);--s)if(!s||n.length-s>65558)return o(g(13,0,1),null),i;var f=W(n,s+8);if(f){var h=f,c=N(n,s+16),l=4294967295==c;if(l){if(s=N(n,s-12),101075792!=N(n,s))return o(g(13,0,1),null),i;h=f=N(n,s+32),c=N(n,s+48)}for(var p=t&&t.filter,v=u((function(t){var r=jn(n,c,l),s=r[0],h=r[1],v=r[2],y=r[3],m=r[4],b=r[5],w=Wn(n,b);c=m;var z=u((function(n,t){n?(i(),o(n,null)):(t&&(a[y]=t),--f||o(null,a))}),"cbl");if(!p||p({name:y,size:h,originalSize:v,compression:s}))if(s)if(8==s){var E=n.subarray(w,w+h);if(h<32e4)try{z(null,Fr(E,new D(v)))}catch(n){z(n,null)}else e.push(Rn(E,{size:v},z))}else z(g(14,"unknown compression type "+s,1),null);else z(null,d(n,w,w+h));else z(null,null)}),"_loop_3"),y=0;y<h;++y)v(y)}else o(null,{});return i}function Ut(n,t){for(var r={},e=n.length-22;101010256!=N(n,e);--e)(!e||n.length-e>65558)&&g(13);var i=W(n,e+8);if(!i)return{};var a=N(n,e+16),o=4294967295==a;o&&(e=N(n,e-12),101075792!=N(n,e)&&g(13),i=N(n,e+32),a=N(n,e+48));for(var u=t&&t.filter,s=0;s<i;++s){var f=jn(n,a,o),h=f[0],c=f[1],l=f[2],p=f[3],v=f[4],y=f[5],m=Wn(n,y);a=v,(!u||u({name:p,size:c,originalSize:l,compression:h}))&&(h?8==h?r[p]=Fr(n.subarray(m,m+c),new D(l)):g(14,"unknown compression type "+h):r[p]=d(n,m,m+c))}return r}u(Tt,"unzip"),u(Ut,"unzipSync");export{ot as AsyncCompress,vt as AsyncDecompress,Xn as AsyncDeflate,bn as AsyncGunzip,ot as AsyncGzip,Nn as AsyncInflate,At as AsyncUnzipInflate,rt as AsyncUnzlib,yt as AsyncZipDeflate,st as AsyncZlib,pn as Compress,ct as DecodeUTF8,tt as Decompress,ar as Deflate,pt as EncodeUTF8,at as FlateErrorCode,Jr as Gunzip,pn as Gzip,K as Inflate,Mt as Unzip,zt as UnzipInflate,et as UnzipPassThrough,Qr as Unzlib,wt as Zip,gt as ZipDeflate,Nr as ZipPassThrough,yn as Zlib,ft as compress,gn as compressSync,ht as decompress,lt as decompressSync,dn as deflate,$r as deflateSync,_n as gunzip,Kr as gunzipSync,ft as gzip,gn as gzipSync,Rn as inflate,Fr as inflateSync,Hn as strFromU8,sr as strToU8,Tt as unzip,Ut as unzipSync,nt as unzlib,Vr as unzlibSync,mt as zip,xt as zipSync,ut as zlib,wn as zlibSync};
1
+ import{a as hn}from"./chunk-ZD2MIN35.js";import{a as u}from"./chunk-ZRT45YCM.js";hn();var ln={},Qn=u((function(n,t,r,e,i){var a=new Worker(ln[t]||(ln[t]=URL.createObjectURL(new Blob([n+';addEventListener("error",function(e){e=e.error;postMessage({$e$:[e.message,e.code,e.stack]})})'],{type:"text/javascript"}))));return a.onmessage=function(n){var t=n.data,r=t.$e$;if(r){var e=new Error(r[0]);e.code=r[1],e.stack=r[2],i(e,null)}else i(null,t)},a.postMessage(r,e),a}),"wk"),D=Uint8Array,q=Uint16Array,gr=Uint32Array,yr=new D([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0]),wr=new D([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0]),Ur=new D([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),xn=u((function(n,t){for(var r=new q(31),e=0;e<31;++e)r[e]=t+=1<<n[e-1];var i=new gr(r[30]);for(e=1;e<30;++e)for(var a=r[e];a<r[e+1];++a)i[a]=a-r[e]<<5|e;return[r,i]}),"freb"),zn=xn(yr,2),dr=zn[0],Or=zn[1];dr[28]=258,Or[258]=28;var An=xn(wr,0),Mn=An[0],Yr=An[1],Dr=new q(32768);for(E=0;E<32768;++E)tr=(61680&(tr=(52428&(tr=(43690&E)>>>1|(21845&E)<<1))>>>2|(13107&tr)<<2))>>>4|(3855&tr)<<4,Dr[E]=((65280&tr)>>>8|(255&tr)<<8)>>>1;var tr,X=u((function(n,t,r){for(var e=n.length,i=0,a=new q(t);i<e;++i)n[i]&&++a[n[i]-1];var o,u=new q(t);for(i=0;i<t;++i)u[i]=u[i-1]+a[i-1]<<1;if(r){o=new q(1<<t);var s=15-t;for(i=0;i<e;++i)if(n[i])for(var f=i<<4|n[i],h=t-n[i],c=u[n[i]-1]++<<h,l=c|(1<<h)-1;c<=l;++c)o[Dr[c]>>>s]=f}else for(o=new q(e),i=0;i<e;++i)n[i]&&(o[i]=Dr[u[n[i]-1]++]>>>15-n[i]);return o}),"hMap"),ir=new D(288);for(E=0;E<144;++E)ir[E]=8;for(E=144;E<256;++E)ir[E]=9;for(E=256;E<280;++E)ir[E]=7;for(E=280;E<288;++E)ir[E]=8;var cr=new D(32);for(E=0;E<32;++E)cr[E]=5;var E,Tn=X(ir,9,0),Un=X(ir,9,1),Dn=X(cr,5,0),Sn=X(cr,5,1),Zr=u((function(n){for(var t=n[0],r=1;r<n.length;++r)n[r]>t&&(t=n[r]);return t}),"max"),V=u((function(n,t,r){var e=t/8|0;return(n[e]|n[e+1]<<8)>>(7&t)&r}),"bits"),kr=u((function(n,t){var r=t/8|0;return(n[r]|n[r+1]<<8|n[r+2]<<16)>>(7&t)}),"bits16"),Sr=u((function(n){return(n+7)/8|0}),"shft"),d=u((function(n,t,r){(null==t||t<0)&&(t=0),(null==r||r>n.length)&&(r=n.length);var e=new(2==n.BYTES_PER_ELEMENT?q:4==n.BYTES_PER_ELEMENT?gr:D)(r-t);return e.set(n.subarray(t,r)),e}),"slc"),at={UnexpectedEOF:0,InvalidBlockType:1,InvalidLengthLiteral:2,InvalidDistance:3,StreamFinished:4,NoStreamHandler:5,InvalidHeader:6,NoCallback:7,InvalidUTF8:8,ExtraFieldTooLong:9,InvalidDate:10,FilenameTooLong:11,StreamFinishing:12,InvalidZipData:13,UnknownCompressionMethod:14},Cn=["unexpected EOF","invalid block type","invalid length/literal","invalid distance","stream finished","no stream handler",,"no callback","invalid UTF-8 data","extra field too long","date not in range 1980-2099","filename too long","stream finishing","invalid zip data"],g=u((function(n,t,r){var e=new Error(t||Cn[n]);if(e.code=n,Error.captureStackTrace&&Error.captureStackTrace(e,g),!r)throw e;return e}),"err"),Cr=u((function(n,t,r){var e=n.length;if(!e||r&&r.f&&!r.l)return t||new D(0);var i=!t||r,a=!r||r.i;r||(r={}),t||(t=new D(3*e));var o=u((function(n){var r=t.length;if(n>r){var e=new D(Math.max(2*r,n));e.set(t),t=e}}),"cbuf"),s=r.f||0,f=r.p||0,h=r.b||0,c=r.l,l=r.d,p=r.m,v=r.n,y=8*e;do{if(!c){s=V(n,f,1);var m=V(n,f+1,3);if(f+=3,!m){var b=n[(N=Sr(f)+4)-4]|n[N-3]<<8,w=N+b;if(w>e){a&&g(0);break}i&&o(h+b),t.set(n.subarray(N,w),h),r.b=h+=b,r.p=f=8*w,r.f=s;continue}if(1==m)c=Un,l=Sn,p=9,v=5;else if(2==m){var z=V(n,f,31)+257,E=V(n,f+10,15)+4,I=z+V(n,f+5,31)+1;f+=14;for(var k=new D(I),S=new D(19),A=0;A<E;++A)S[Ur[A]]=V(n,f+3*A,7);f+=3*E;var M=Zr(S),x=(1<<M)-1,U=X(S,M,1);for(A=0;A<I;){var N,T=U[V(n,f,x)];if(f+=15&T,(N=T>>>4)<16)k[A++]=N;else{var C=0,F=0;for(16==N?(F=3+V(n,f,3),f+=2,C=k[A-1]):17==N?(F=3+V(n,f,7),f+=3):18==N&&(F=11+V(n,f,127),f+=7);F--;)k[A++]=C}}var Z=k.subarray(0,z),W=k.subarray(z);p=Zr(Z),v=Zr(W),c=X(Z,p,1),l=X(W,v,1)}else g(1);if(f>y){a&&g(0);break}}i&&o(h+131072);for(var q=(1<<p)-1,K=(1<<v)-1,G=f;;G=f){var _=(C=c[kr(n,f)&q])>>>4;if((f+=15&C)>y){a&&g(0);break}if(C||g(2),_<256)t[h++]=_;else{if(256==_){G=f,c=null;break}var L=_-254;if(_>264){var O=yr[A=_-257];L=V(n,f,(1<<O)-1)+dr[A],f+=O}var R=l[kr(n,f)&K],P=R>>>4;R||g(3),f+=15&R;W=Mn[P];if(P>3){O=wr[P];W+=kr(n,f)&(1<<O)-1,f+=O}if(f>y){a&&g(0);break}i&&o(h+131072);for(var $=h+L;h<$;h+=4)t[h]=t[h-W],t[h+1]=t[h+1-W],t[h+2]=t[h+2-W],t[h+3]=t[h+3-W];h=$}}r.l=c,r.p=G,r.b=h,r.f=s,c&&(s=1,r.m=p,r.d=l,r.n=v)}while(!s);return h==t.length?t:d(t,0,h)}),"inflt"),nr=u((function(n,t,r){r<<=7&t;var e=t/8|0;n[e]|=r,n[e+1]|=r>>>8}),"wbits"),hr=u((function(n,t,r){r<<=7&t;var e=t/8|0;n[e]|=r,n[e+1]|=r>>>8,n[e+2]|=r>>>16}),"wbits16"),Gr=u((function(n,t){for(var r=[],e=0;e<n.length;++e)n[e]&&r.push({s:e,f:n[e]});var i=r.length,a=r.slice();if(!i)return[er,0];if(1==i){var o=new D(r[0].s+1);return o[r[0].s]=1,[o,1]}r.sort((function(n,t){return n.f-t.f})),r.push({s:-1,f:25001});var u=r[0],s=r[1],f=0,h=1,c=2;for(r[0]={s:-1,f:u.f+s.f,l:u,r:s};h!=i-1;)u=r[r[f].f<r[c].f?f++:c++],s=r[f!=h&&r[f].f<r[c].f?f++:c++],r[h++]={s:-1,f:u.f+s.f,l:u,r:s};var l=a[0].s;for(e=1;e<i;++e)a[e].s>l&&(l=a[e].s);var p=new q(l+1),v=Lr(r[h-1],p,0);if(v>t){e=0;var g=0,d=v-t,y=1<<d;for(a.sort((function(n,t){return p[t.s]-p[n.s]||n.f-t.f}));e<i;++e){var m=a[e].s;if(!(p[m]>t))break;g+=y-(1<<v-p[m]),p[m]=t}for(g>>>=d;g>0;){var b=a[e].s;p[b]<t?g-=1<<t-p[b]++-1:++e}for(;e>=0&&g;--e){var w=a[e].s;p[w]==t&&(--p[w],++g)}v=t}return[new D(p),v]}),"hTree"),Lr=u((function(n,t,r){return-1==n.s?Math.max(Lr(n.l,t,r+1),Lr(n.r,t,r+1)):t[n.s]=r}),"ln"),Wr=u((function(n){for(var t=n.length;t&&!n[--t];);for(var r=new q(++t),e=0,i=n[0],a=1,o=u((function(n){r[e++]=n}),"w"),s=1;s<=t;++s)if(n[s]==i&&s!=t)++a;else{if(!i&&a>2){for(;a>138;a-=138)o(32754);a>2&&(o(a>10?a-11<<5|28690:a-3<<5|12305),a=0)}else if(a>3){for(o(i),--a;a>6;a-=6)o(8304);a>2&&(o(a-3<<5|8208),a=0)}for(;a--;)o(i);a=1,i=n[s]}return[r.subarray(0,e),t]}),"lc"),lr=u((function(n,t){for(var r=0,e=0;e<t.length;++e)r+=n[e]*t[e];return r}),"clen"),Pr=u((function(n,t,r){var e=r.length,i=Sr(t+2);n[i]=255&e,n[i+1]=e>>>8,n[i+2]=255^n[i],n[i+3]=255^n[i+1];for(var a=0;a<e;++a)n[i+a+4]=r[a];return 8*(i+4+e)}),"wfblk"),jr=u((function(n,t,r,e,i,a,o,u,s,f,h){nr(t,h++,r),++i[256];for(var c=Gr(i,15),l=c[0],p=c[1],v=Gr(a,15),g=v[0],d=v[1],y=Wr(l),m=y[0],b=y[1],w=Wr(g),z=w[0],D=w[1],E=new q(19),I=0;I<m.length;++I)E[31&m[I]]++;for(I=0;I<z.length;++I)E[31&z[I]]++;for(var k=Gr(E,7),S=k[0],A=k[1],M=19;M>4&&!S[Ur[M-1]];--M);var x,U,N,T,C=f+5<<3,F=lr(i,ir)+lr(a,cr)+o,Z=lr(i,l)+lr(a,g)+o+14+3*M+lr(E,S)+(2*E[16]+3*E[17]+7*E[18]);if(C<=F&&C<=Z)return Pr(t,h,n.subarray(s,s+f));if(nr(t,h,1+(Z<F)),h+=2,Z<F){x=X(l,p,0),U=l,N=X(g,d,0),T=g;var W=X(S,A,0);nr(t,h,b-257),nr(t,h+5,D-1),nr(t,h+10,M-4),h+=14;for(I=0;I<M;++I)nr(t,h+3*I,S[Ur[I]]);h+=3*M;for(var K=[m,z],V=0;V<2;++V){var G=K[V];for(I=0;I<G.length;++I){var _=31&G[I];nr(t,h,W[_]),h+=S[_],_>15&&(nr(t,h,G[I]>>>5&127),h+=G[I]>>>12)}}}else x=Tn,U=ir,N=Dn,T=cr;for(I=0;I<u;++I)if(e[I]>255){_=e[I]>>>18&31;hr(t,h,x[_+257]),h+=U[_+257],_>7&&(nr(t,h,e[I]>>>23&31),h+=yr[_]);var L=31&e[I];hr(t,h,N[L]),h+=T[L],L>3&&(hr(t,h,e[I]>>>5&8191),h+=wr[L])}else hr(t,h,x[e[I]]),h+=U[e[I]];return hr(t,h,x[256]),h+U[256]}),"wblk"),En=new gr([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),er=new D(0),Fn=u((function(n,t,r,e,i,a){var o=n.length,s=new D(e+o+5*(1+Math.ceil(o/7e3))+i),f=s.subarray(e,s.length-i),h=0;if(!t||o<8)for(var c=0;c<=o;c+=65535){var l=c+65535;l>=o&&(f[h>>3]=a),h=Pr(f,h+1,n.subarray(c,l))}else{for(var p=En[t-1],v=p>>>13,g=8191&p,y=(1<<r)-1,m=new q(32768),b=new q(y+1),w=Math.ceil(r/3),z=2*w,E=u((function(t){return(n[t]^n[t+1]<<w^n[t+2]<<z)&y}),"hsh"),I=new gr(25e3),k=new q(288),S=new q(32),A=0,M=0,x=(c=0,0),U=0,N=0;c<o;++c){var T=E(c),C=32767&c,F=b[T];if(m[C]=F,b[T]=C,U<=c){var Z=o-c;if((A>7e3||x>24576)&&Z>423){h=jr(n,f,0,I,k,S,M,x,N,c-N,h),x=A=M=0,N=c;for(var W=0;W<286;++W)k[W]=0;for(W=0;W<30;++W)S[W]=0}var K=2,V=0,X=g,G=C-F&32767;if(Z>2&&T==E(c-G))for(var _=Math.min(v,Z)-1,L=Math.min(32767,c),O=Math.min(258,Z);G<=L&&--X&&C!=F;){if(n[c+K]==n[c+K-G]){for(var R=0;R<O&&n[c+R]==n[c+R-G];++R);if(R>K){if(K=R,V=G,R>_)break;var P=Math.min(G,R-2),$=0;for(W=0;W<P;++W){var j=c-G+W+32768&32767,B=j-m[j]+32768&32767;B>$&&($=B,F=j)}}}G+=(C=F)-(F=m[C])+32768&32767}if(V){I[x++]=268435456|Or[K]<<18|Yr[V];var H=31&Or[K],Y=31&Yr[V];M+=yr[H]+wr[Y],++k[257+H],++S[Y],U=c+K,++A}else I[x++]=n[c],++k[n[c]]}}h=jr(n,f,a,I,k,S,M,x,N,c-N,h),!a&&7&h&&(h=Pr(f,h+1,er))}return d(s,0,e+Sr(h)+i)}),"dflt"),In=function(){for(var n=new Int32Array(256),t=0;t<256;++t){for(var r=t,e=9;--e;)r=(1&r&&-306674912)^r>>>1;n[t]=r}return n}(),mr=u((function(){var n=-1;return{p:function(t){for(var r=n,e=0;e<t.length;++e)r=In[255&r^t[e]]^r>>>8;n=r},d:function(){return~n}}}),"crc"),br=u((function(){var n=1,t=0;return{p:function(r){for(var e=n,i=t,a=0|r.length,o=0;o!=a;){for(var u=Math.min(o+2655,a);o<u;++o)i+=e+=r[o];e=(65535&e)+15*(e>>16),i=(65535&i)+15*(i>>16)}n=e,t=i},d:function(){return(255&(n%=65521))<<24|n>>>8<<16|(255&(t%=65521))<<8|t>>>8}}}),"adler"),ur=u((function(n,t,r,e,i){return Fn(n,null==t.level?6:t.level,null==t.mem?Math.ceil(1.5*Math.max(8,Math.min(13,Math.log(n.length)))):12+t.mem,r,e,!i)}),"dopt"),Er=u((function(n,t){var r={};for(var e in n)r[e]=n[e];for(var e in t)r[e]=t[e];return r}),"mrg"),cn=u((function(n,t,r){for(var e=n(),i=n.toString(),a=i.slice(i.indexOf("[")+1,i.lastIndexOf("]")).replace(/\s+/g,"").split(","),o=0;o<e.length;++o){var u=e[o],s=a[o];if("function"==typeof u){t+=";"+s+"=";var f=u.toString();if(u.prototype)if(-1!=f.indexOf("[native code]")){var h=f.indexOf(" ",8)+1;t+=f.slice(h,f.indexOf("(",h))}else for(var c in t+=f,u.prototype)t+=";"+s+".prototype."+c+"="+u.prototype[c].toString();else t+=f}else r[s]=u}return[t,r]}),"wcln"),Br=[],Vn=u((function(n){var t=[];for(var r in n)n[r].buffer&&t.push((n[r]=new n[r].constructor(n[r])).buffer);return t}),"cbfs"),Bn=u((function(n,t,r,e){var i;if(!Br[r]){for(var a="",o={},u=n.length-1,s=0;s<u;++s)a=(i=cn(n[s],a,o))[0],o=i[1];Br[r]=cn(n[u],a,o)}var f=Er({},Br[r][1]);return Qn(Br[r][0]+";onmessage=function(e){for(var k in e.data)self[k]=e.data[k];onmessage="+t.toString()+"}",r,f,Vn(f),e)}),"wrkr"),xr=u((function(){return[D,q,gr,yr,wr,Ur,dr,Mn,Un,Sn,Dr,Cn,X,Zr,V,kr,Sr,d,g,Cr,Fr,fr,_r]}),"bInflt"),zr=u((function(){return[D,q,gr,yr,wr,Ur,Or,Yr,Tn,ir,Dn,cr,Dr,En,er,X,nr,hr,Gr,Lr,Wr,lr,Pr,jr,Sr,d,Fn,ur,$r,fr]}),"bDflt"),Zn=u((function(){return[rn,tn,I,mr,In]}),"gze"),kn=u((function(){return[nn,Ln]}),"guze"),Gn=u((function(){return[en,I,br]}),"zle"),On=u((function(){return[Pn]}),"zule"),fr=u((function(n){return postMessage(n,[n.buffer])}),"pbf"),_r=u((function(n){return n&&n.size&&new D(n.size)}),"gu8"),Ar=u((function(n,t,r,e,i,a){var o=Bn(r,e,i,(function(n,t){o.terminate(),a(n,t)}));return o.postMessage([n,t],t.consume?[n.buffer]:[]),function(){o.terminate()}}),"cbify"),b=u((function(n){return n.ondata=function(n,t){return postMessage([n,t],[n.buffer])},function(t){return n.push(t.data[0],t.data[1])}}),"astrm"),Mr=u((function(n,t,r,e,i){var a,o=Bn(n,e,i,(function(n,r){n?(o.terminate(),t.ondata.call(t,n)):(r[1]&&o.terminate(),t.ondata.call(t,n,r[0],r[1]))}));o.postMessage(r),t.push=function(n,r){t.ondata||g(5),a&&t.ondata(g(4,0,1),null,!!r),o.postMessage([n,a=r],[n.buffer])},t.terminate=function(){o.terminate()}}),"astrmify"),W=u((function(n,t){return n[t]|n[t+1]<<8}),"b2"),N=u((function(n,t){return(n[t]|n[t+1]<<8|n[t+2]<<16|n[t+3]<<24)>>>0}),"b4"),Hr=u((function(n,t){return N(n,t)+4294967296*N(n,t+4)}),"b8"),I=u((function(n,t,r){for(;r;++t)n[t]=r,r>>>=8}),"wbytes"),rn=u((function(n,t){var r=t.filename;if(n[0]=31,n[1]=139,n[2]=8,n[8]=t.level<2?4:9==t.level?2:0,n[9]=3,0!=t.mtime&&I(n,4,Math.floor(new Date(t.mtime||Date.now())/1e3)),r){n[3]=8;for(var e=0;e<=r.length;++e)n[e+10]=r.charCodeAt(e)}}),"gzh"),nn=u((function(n){(31!=n[0]||139!=n[1]||8!=n[2])&&g(6,"invalid gzip data");var t=n[3],r=10;4&t&&(r+=n[10]|2+(n[11]<<8));for(var e=(t>>3&1)+(t>>4&1);e>0;e-=!n[r++]);return r+(2&t)}),"gzs"),Ln=u((function(n){var t=n.length;return(n[t-4]|n[t-3]<<8|n[t-2]<<16|n[t-1]<<24)>>>0}),"gzl"),tn=u((function(n){return 10+(n.filename&&n.filename.length+1||0)}),"gzhl"),en=u((function(n,t){var r=t.level,e=0==r?0:r<6?1:9==r?3:2;n[0]=120,n[1]=e<<6|(e?32-2*e:1)}),"zlh"),Pn=u((function(n){(8!=(15&n[0])||n[0]>>>4>7||(n[0]<<8|n[1])%31)&&g(6,"invalid zlib data"),32&n[1]&&g(6,"invalid zlib data: preset dictionaries not supported")}),"zlv");function an(n,t){return!t&&"function"==typeof n&&(t=n,n={}),this.ondata=t,n}u(an,"AsyncCmpStrm");var ar=function(){function n(n,t){!t&&"function"==typeof n&&(t=n,n={}),this.ondata=t,this.o=n||{}}return u(n,"Deflate"),n.prototype.p=function(n,t){this.ondata(ur(n,this.o,0,0,!t),t)},n.prototype.push=function(n,t){this.ondata||g(5),this.d&&g(4),this.d=t,this.p(n,t||!1)},n}(),Xn=function(){function n(n,t){Mr([zr,function(){return[b,ar]}],this,an.call(this,n,t),(function(n){var t=new ar(n.data);onmessage=b(t)}),6)}return u(n,"AsyncDeflate"),n}();function dn(n,t,r){return r||(r=t,t={}),"function"!=typeof r&&g(7),Ar(n,t,[zr],(function(n){return fr($r(n.data[0],n.data[1]))}),0,r)}function $r(n,t){return ur(n,t||{},0,0)}u(dn,"deflate"),u($r,"deflateSync");var K=function(){function n(n){this.s={},this.p=new D(0),this.ondata=n}return u(n,"Inflate"),n.prototype.e=function(n){this.ondata||g(5),this.d&&g(4);var t=this.p.length,r=new D(t+n.length);r.set(this.p),r.set(n,t),this.p=r},n.prototype.c=function(n){this.d=this.s.i=n||!1;var t=this.s.b,r=Cr(this.p,this.o,this.s);this.ondata(d(r,t,this.s.b),this.d),this.o=d(r,this.s.b-32768),this.s.b=this.o.length,this.p=d(this.p,this.s.p/8|0),this.s.p&=7},n.prototype.push=function(n,t){this.e(n),this.c(t)},n}(),Nn=function(){function n(n){this.ondata=n,Mr([xr,function(){return[b,K]}],this,0,(function(){var n=new K;onmessage=b(n)}),7)}return u(n,"AsyncInflate"),n}();function Rn(n,t,r){return r||(r=t,t={}),"function"!=typeof r&&g(7),Ar(n,t,[xr],(function(n){return fr(Fr(n.data[0],_r(n.data[1])))}),1,r)}function Fr(n,t){return Cr(n,t)}u(Rn,"inflate"),u(Fr,"inflateSync");var pn=function(){function n(n,t){this.c=mr(),this.l=0,this.v=1,ar.call(this,n,t)}return u(n,"Gzip"),n.prototype.push=function(n,t){ar.prototype.push.call(this,n,t)},n.prototype.p=function(n,t){this.c.p(n),this.l+=n.length;var r=ur(n,this.o,this.v&&tn(this.o),t&&8,!t);this.v&&(rn(r,this.o),this.v=0),t&&(I(r,r.length-8,this.c.d()),I(r,r.length-4,this.l)),this.ondata(r,t)},n}(),ot=function(){function n(n,t){Mr([zr,Zn,function(){return[b,ar,pn]}],this,an.call(this,n,t),(function(n){var t=new pn(n.data);onmessage=b(t)}),8)}return u(n,"AsyncGzip"),n}();function ft(n,t,r){return r||(r=t,t={}),"function"!=typeof r&&g(7),Ar(n,t,[zr,Zn,function(){return[gn]}],(function(n){return fr(gn(n.data[0],n.data[1]))}),2,r)}function gn(n,t){t||(t={});var r=mr(),e=n.length;r.p(n);var i=ur(n,t,tn(t),8),a=i.length;return rn(i,t),I(i,a-8,r.d()),I(i,a-4,e),i}u(ft,"gzip"),u(gn,"gzipSync");var Jr=function(){function n(n){this.v=1,K.call(this,n)}return u(n,"Gunzip"),n.prototype.push=function(n,t){if(K.prototype.e.call(this,n),this.v){var r=this.p.length>3?nn(this.p):4;if(r>=this.p.length&&!t)return;this.p=this.p.subarray(r),this.v=0}t&&(this.p.length<8&&g(6,"invalid gzip data"),this.p=this.p.subarray(0,-8)),K.prototype.c.call(this,t)},n}(),bn=function(){function n(n){this.ondata=n,Mr([xr,kn,function(){return[b,K,Jr]}],this,0,(function(){var n=new Jr;onmessage=b(n)}),9)}return u(n,"AsyncGunzip"),n}();function _n(n,t,r){return r||(r=t,t={}),"function"!=typeof r&&g(7),Ar(n,t,[xr,kn,function(){return[Kr]}],(function(n){return fr(Kr(n.data[0]))}),3,r)}function Kr(n,t){return Cr(n.subarray(nn(n),-8),t||new D(Ln(n)))}u(_n,"gunzip"),u(Kr,"gunzipSync");var yn=function(){function n(n,t){this.c=br(),this.v=1,ar.call(this,n,t)}return u(n,"Zlib"),n.prototype.push=function(n,t){ar.prototype.push.call(this,n,t)},n.prototype.p=function(n,t){this.c.p(n);var r=ur(n,this.o,this.v&&2,t&&4,!t);this.v&&(en(r,this.o),this.v=0),t&&I(r,r.length-4,this.c.d()),this.ondata(r,t)},n}(),st=function(){function n(n,t){Mr([zr,Gn,function(){return[b,ar,yn]}],this,an.call(this,n,t),(function(n){var t=new yn(n.data);onmessage=b(t)}),10)}return u(n,"AsyncZlib"),n}();function ut(n,t,r){return r||(r=t,t={}),"function"!=typeof r&&g(7),Ar(n,t,[zr,Gn,function(){return[wn]}],(function(n){return fr(wn(n.data[0],n.data[1]))}),4,r)}function wn(n,t){t||(t={});var r=br();r.p(n);var e=ur(n,t,2,4);return en(e,t),I(e,e.length-4,r.d()),e}u(ut,"zlib"),u(wn,"zlibSync");var Qr=function(){function n(n){this.v=1,K.call(this,n)}return u(n,"Unzlib"),n.prototype.push=function(n,t){if(K.prototype.e.call(this,n),this.v){if(this.p.length<2&&!t)return;this.p=this.p.subarray(2),this.v=0}t&&(this.p.length<4&&g(6,"invalid zlib data"),this.p=this.p.subarray(0,-4)),K.prototype.c.call(this,t)},n}(),rt=function(){function n(n){this.ondata=n,Mr([xr,On,function(){return[b,K,Qr]}],this,0,(function(){var n=new Qr;onmessage=b(n)}),11)}return u(n,"AsyncUnzlib"),n}();function nt(n,t,r){return r||(r=t,t={}),"function"!=typeof r&&g(7),Ar(n,t,[xr,On,function(){return[Vr]}],(function(n){return fr(Vr(n.data[0],_r(n.data[1])))}),5,r)}function Vr(n,t){return Cr((Pn(n),n.subarray(2,-4)),t)}u(nt,"unzlib"),u(Vr,"unzlibSync");var tt=function(){function n(n){this.G=Jr,this.I=K,this.Z=Qr,this.ondata=n}return u(n,"Decompress"),n.prototype.push=function(n,t){if(this.ondata||g(5),this.s)this.s.push(n,t);else{if(this.p&&this.p.length){var r=new D(this.p.length+n.length);r.set(this.p),r.set(n,this.p.length)}else this.p=n;if(this.p.length>2){var e=this,i=u((function(){e.ondata.apply(e,arguments)}),"cb");this.s=31==this.p[0]&&139==this.p[1]&&8==this.p[2]?new this.G(i):8!=(15&this.p[0])||this.p[0]>>4>7||(this.p[0]<<8|this.p[1])%31?new this.I(i):new this.Z(i),this.s.push(this.p,t),this.p=null}}},n}(),vt=function(){function n(n){this.G=bn,this.I=Nn,this.Z=rt,this.ondata=n}return u(n,"AsyncDecompress"),n.prototype.push=function(n,t){tt.prototype.push.call(this,n,t)},n}();function ht(n,t,r){return r||(r=t,t={}),"function"!=typeof r&&g(7),31==n[0]&&139==n[1]&&8==n[2]?_n(n,t,r):8!=(15&n[0])||n[0]>>4>7||(n[0]<<8|n[1])%31?Rn(n,t,r):nt(n,t,r)}function lt(n,t){return 31==n[0]&&139==n[1]&&8==n[2]?Kr(n,t):8!=(15&n[0])||n[0]>>4>7||(n[0]<<8|n[1])%31?Fr(n,t):Vr(n,t)}u(ht,"decompress"),u(lt,"decompressSync");var on=u((function(n,t,r,e){for(var i in n){var a=n[i],o=t+i,u=e;Array.isArray(a)&&(u=Er(e,a[1]),a=a[0]),a instanceof D?r[o]=[a,u]:(r[o+="/"]=[new D(0),u],on(a,o,r,e))}}),"fltn"),mn=typeof TextEncoder<"u"&&new TextEncoder,Xr=typeof TextDecoder<"u"&&new TextDecoder,$n=0;try{Xr.decode(er,{stream:!0}),$n=1}catch{}var qn=u((function(n){for(var t="",r=0;;){var e=n[r++],i=(e>127)+(e>223)+(e>239);if(r+i>n.length)return[t,d(n,r-1)];i?3==i?(e=((15&e)<<18|(63&n[r++])<<12|(63&n[r++])<<6|63&n[r++])-65536,t+=String.fromCharCode(55296|e>>10,56320|1023&e)):t+=1&i?String.fromCharCode((31&e)<<6|63&n[r++]):String.fromCharCode((15&e)<<12|(63&n[r++])<<6|63&n[r++]):t+=String.fromCharCode(e)}}),"dutf8"),ct=function(){function n(n){this.ondata=n,$n?this.t=new TextDecoder:this.p=er}return u(n,"DecodeUTF8"),n.prototype.push=function(n,t){if(this.ondata||g(5),t=!!t,this.t)return this.ondata(this.t.decode(n,{stream:!0}),t),void(t&&(this.t.decode().length&&g(8),this.t=null));this.p||g(4);var r=new D(this.p.length+n.length);r.set(this.p),r.set(n,this.p.length);var e=qn(r),i=e[0],a=e[1];t?(a.length&&g(8),this.p=null):this.p=a,this.ondata(i,t)},n}(),pt=function(){function n(n){this.ondata=n}return u(n,"EncodeUTF8"),n.prototype.push=function(n,t){this.ondata||g(5),this.d&&g(4),this.ondata(sr(n),this.d=t||!1)},n}();function sr(n,t){if(t){for(var r=new D(n.length),e=0;e<n.length;++e)r[e]=n.charCodeAt(e);return r}if(mn)return mn.encode(n);var i=n.length,a=new D(n.length+(n.length>>1)),o=0,s=u((function(n){a[o++]=n}),"w");for(e=0;e<i;++e){if(o+5>a.length){var f=new D(o+8+(i-e<<1));f.set(a),a=f}var h=n.charCodeAt(e);h<128||t?s(h):h<2048?(s(192|h>>6),s(128|63&h)):h>55295&&h<57344?(s(240|(h=65536+(1047552&h)|1023&n.charCodeAt(++e))>>18),s(128|h>>12&63),s(128|h>>6&63),s(128|63&h)):(s(224|h>>12),s(128|h>>6&63),s(128|63&h))}return d(a,0,o)}function Hn(n,t){if(t){for(var r="",e=0;e<n.length;e+=16384)r+=String.fromCharCode.apply(null,n.subarray(e,e+16384));return r}if(Xr)return Xr.decode(n);var i=qn(n),a=i[0];return i[1].length&&g(8),a}u(sr,"strToU8"),u(Hn,"strFromU8");var Yn=u((function(n){return 1==n?3:n<6?2:9==n?1:0}),"dbf"),Wn=u((function(n,t){return t+30+W(n,t+26)+W(n,t+28)}),"slzh"),jn=u((function(n,t,r){var e=W(n,t+28),i=Hn(n.subarray(t+46,t+46+e),!(2048&W(n,t+8))),a=t+46+e,o=N(n,t+20),u=r&&4294967295==o?Jn(n,a):[o,N(n,t+24),N(n,t+42)],s=u[0],f=u[1],h=u[2];return[W(n,t+10),s,f,i,a+W(n,t+30)+W(n,t+32),h]}),"zh"),Jn=u((function(n,t){for(;1!=W(n,t);t+=4+W(n,t+2));return[Hr(n,t+12),Hr(n,t+4),Hr(n,t+20)]}),"z64e"),or=u((function(n){var t=0;if(n)for(var r in n){var e=n[r].length;e>65535&&g(9),t+=e+4}return t}),"exfl"),pr=u((function(n,t,r,e,i,a,o,u){var s=e.length,f=r.extra,h=u&&u.length,c=or(f);I(n,t,null!=o?33639248:67324752),t+=4,null!=o&&(n[t++]=20,n[t++]=r.os),n[t]=20,t+=2,n[t++]=r.flag<<1|(null==a&&8),n[t++]=i&&8,n[t++]=255&r.compression,n[t++]=r.compression>>8;var l=new Date(null==r.mtime?Date.now():r.mtime),p=l.getFullYear()-1980;if((p<0||p>119)&&g(10),I(n,t,p<<25|l.getMonth()+1<<21|l.getDate()<<16|l.getHours()<<11|l.getMinutes()<<5|l.getSeconds()>>>1),t+=4,null!=a&&(I(n,t,r.crc),I(n,t+4,a),I(n,t+8,r.size)),I(n,t+12,s),I(n,t+14,c),t+=16,null!=o&&(I(n,t,h),I(n,t+6,r.attrs),I(n,t+10,o),t+=14),n.set(e,t),t+=s,c)for(var v in f){var d=f[v],y=d.length;I(n,t,+v),I(n,t+2,y),n.set(d,t+4),t+=4+y}return h&&(n.set(u,t),t+=h),t}),"wzh"),fn=u((function(n,t,r,e,i){I(n,t,101010256),I(n,t+8,r),I(n,t+10,r),I(n,t+12,e),I(n,t+16,i)}),"wzf"),Nr=function(){function n(n){this.filename=n,this.c=mr(),this.size=0,this.compression=0}return u(n,"ZipPassThrough"),n.prototype.process=function(n,t){this.ondata(null,n,t)},n.prototype.push=function(n,t){this.ondata||g(5),this.c.p(n),this.size+=n.length,t&&(this.crc=this.c.d()),this.process(n,t||!1)},n}(),gt=function(){function n(n,t){var r=this;t||(t={}),Nr.call(this,n),this.d=new ar(t,(function(n,t){r.ondata(null,n,t)})),this.compression=8,this.flag=Yn(t.level)}return u(n,"ZipDeflate"),n.prototype.process=function(n,t){try{this.d.push(n,t)}catch(n){this.ondata(n,null,t)}},n.prototype.push=function(n,t){Nr.prototype.push.call(this,n,t)},n}(),yt=function(){function n(n,t){var r=this;t||(t={}),Nr.call(this,n),this.d=new Xn(t,(function(n,t,e){r.ondata(n,t,e)})),this.compression=8,this.flag=Yn(t.level),this.terminate=this.d.terminate}return u(n,"AsyncZipDeflate"),n.prototype.process=function(n,t){this.d.push(n,t)},n.prototype.push=function(n,t){Nr.prototype.push.call(this,n,t)},n}(),wt=function(){function n(n){this.ondata=n,this.u=[],this.d=1}return u(n,"Zip"),n.prototype.add=function(n){var t=this;if(this.ondata||g(5),2&this.d)this.ondata(g(4+8*(1&this.d),0,1),null,!1);else{var r=sr(n.filename),e=r.length,i=n.comment,a=i&&sr(i),o=e!=n.filename.length||a&&i.length!=a.length,s=e+or(n.extra)+30;e>65535&&this.ondata(g(11,0,1),null,!1);var f=new D(s);pr(f,0,n,r,o);var h=[f],c=u((function(){for(var n=0,r=h;n<r.length;n++){var e=r[n];t.ondata(null,e,!1)}h=[]}),"pAll_1"),l=this.d;this.d=0;var p=this.u.length,v=Er(n,{f:r,u:o,o:a,t:function(){n.terminate&&n.terminate()},r:function(){if(c(),l){var n=t.u[p+1];n?n.r():t.d=1}l=1}}),d=0;n.ondata=function(r,e,i){if(r)t.ondata(r,e,i),t.terminate();else if(d+=e.length,h.push(e),i){var a=new D(16);I(a,0,134695760),I(a,4,n.crc),I(a,8,d),I(a,12,n.size),h.push(a),v.c=d,v.b=s+d+16,v.crc=n.crc,v.size=n.size,l&&v.r(),l=1}else l&&c()},this.u.push(v)}},n.prototype.end=function(){var n=this;2&this.d?this.ondata(g(4+8*(1&this.d),0,1),null,!0):(this.d?this.e():this.u.push({r:function(){1&n.d&&(n.u.splice(-1,1),n.e())},t:function(){}}),this.d=3)},n.prototype.e=function(){for(var n=0,t=0,r=0,e=0,i=this.u;e<i.length;e++){r+=46+(s=i[e]).f.length+or(s.extra)+(s.o?s.o.length:0)}for(var a=new D(r+22),o=0,u=this.u;o<u.length;o++){var s=u[o];pr(a,n,s,s.f,s.u,s.c,t,s.o),n+=46+s.f.length+or(s.extra)+(s.o?s.o.length:0),t+=s.b}fn(a,n,this.u.length,r,t),this.ondata(null,a,!0),this.d=2},n.prototype.terminate=function(){for(var n=0,t=this.u;n<t.length;n++){t[n].t()}this.d=2},n}();function mt(n,t,r){r||(r=t,t={}),"function"!=typeof r&&g(7);var e={};on(n,"",e,t);var i=Object.keys(e),a=i.length,o=0,s=0,f=a,h=new Array(a),c=[],l=u((function(){for(var n=0;n<c.length;++n)c[n]()}),"tAll"),p=u((function(n,t){Rr((function(){r(n,t)}))}),"cbd");Rr((function(){p=r}));var v=u((function(){var n=new D(s+22),t=o,r=s-o;s=0;for(var e=0;e<f;++e){var i=h[e];try{var a=i.c.length;pr(n,s,i,i.f,i.u,a);var u=30+i.f.length+or(i.extra),c=s+u;n.set(i.c,c),pr(n,o,i,i.f,i.u,a,s,i.m),o+=16+u+(i.m?i.m.length:0),s=c+a}catch(n){return p(n,null)}}fn(n,o,h.length,r,t),p(null,n)}),"cbf");a||v();for(var d=u((function(n){var t=i[n],r=e[t],f=r[0],d=r[1],y=mr(),m=f.length;y.p(f);var b=sr(t),w=b.length,z=d.comment,D=z&&sr(z),E=D&&D.length,I=or(d.extra),k=0==d.level?0:8,S=u((function(r,e){if(r)l(),p(r,null);else{var i=e.length;h[n]=Er(d,{size:m,crc:y.d(),c:e,f:b,m:D,u:w!=t.length||D&&z.length!=E,compression:k}),o+=30+w+I+i,s+=76+2*(w+I)+(E||0)+i,--a||v()}}),"cbl");if(w>65535&&S(g(11,0,1),null),k)if(m<16e4)try{S(null,$r(f,d))}catch(n){S(n,null)}else c.push(dn(f,d,S));else S(null,f)}),"_loop_1"),y=0;y<f;++y)d(y);return l}function xt(n,t){t||(t={});var r={},e=[];on(n,"",r,t);var i=0,a=0;for(var o in r){var u=r[o],s=u[0],f=u[1],h=0==f.level?0:8,c=(k=sr(o)).length,l=f.comment,p=l&&sr(l),v=p&&p.length,d=or(f.extra);c>65535&&g(11);var y=h?$r(s,f):s,m=y.length,b=mr();b.p(s),e.push(Er(f,{size:s.length,crc:b.d(),c:y,f:k,m:p,u:c!=o.length||p&&l.length!=v,o:i,compression:h})),i+=30+c+d+m,a+=76+2*(c+d)+(v||0)+m}for(var w=new D(a+22),z=i,E=a-i,I=0;I<e.length;++I){var k=e[I];pr(w,k.o,k,k.f,k.u,k.c.length);var S=30+k.f.length+or(k.extra);w.set(k.c,k.o+S),pr(w,i,k,k.f,k.u,k.c.length,k.o,k.m),i+=16+S+(k.m?k.m.length:0)}return fn(w,i,e.length,E,z),w}u(mt,"zip"),u(xt,"zipSync");var et=function(){function n(){}return u(n,"UnzipPassThrough"),n.prototype.push=function(n,t){this.ondata(null,n,t)},n.compression=0,n}(),zt=function(){function n(){var n=this;this.i=new K((function(t,r){n.ondata(null,t,r)}))}return u(n,"UnzipInflate"),n.prototype.push=function(n,t){try{this.i.push(n,t)}catch(n){this.ondata(n,null,t)}},n.compression=8,n}(),At=function(){function n(n,t){var r=this;t<32e4?this.i=new K((function(n,t){r.ondata(null,n,t)})):(this.i=new Nn((function(n,t,e){r.ondata(n,t,e)})),this.terminate=this.i.terminate)}return u(n,"AsyncUnzipInflate"),n.prototype.push=function(n,t){this.i.terminate&&(n=d(n,0)),this.i.push(n,t)},n.compression=8,n}(),Mt=function(){function n(n){this.onfile=n,this.k=[],this.o={0:et},this.p=er}return u(n,"Unzip"),n.prototype.push=function(n,t){var r=this;if(this.onfile||g(5),this.p||g(4),this.c>0){var e=Math.min(this.c,n.length),i=n.subarray(0,e);if(this.c-=e,this.d?this.d.push(i,!this.c):this.k[0].push(i),(n=n.subarray(e)).length)return this.push(n,t)}else{var a=0,o=0,s=void 0,f=void 0;this.p.length?n.length?((f=new D(this.p.length+n.length)).set(this.p),f.set(n,this.p.length)):f=this.p:f=n;for(var h=f.length,c=this.c,l=c&&this.d,p=u((function(){var n,t=N(f,o);if(67324752==t){a=1,s=o,v.d=null,v.c=0;var e=W(f,o+6),i=W(f,o+8),u=2048&e,l=8&e,p=W(f,o+26),d=W(f,o+28);if(h>o+30+p+d){var y=[];v.k.unshift(y),a=2;var m=N(f,o+18),b=N(f,o+22),w=Hn(f.subarray(o+30,o+=30+p),!u);4294967295==m?(n=l?[-2]:Jn(f,o),m=n[0],b=n[1]):l&&(m=-1),o+=d,v.c=m;var z,D={name:w,compression:i,start:function(){if(D.ondata||g(5),m){var n=r.o[i];n||D.ondata(g(14,"unknown compression type "+i,1),null,!1),(z=m<0?new n(w):new n(w,m,b)).ondata=function(n,t,r){D.ondata(n,t,r)};for(var t=0,e=y;t<e.length;t++){var a=e[t];z.push(a,!1)}r.k[0]==y&&r.c?r.d=z:z.push(er,!0)}else D.ondata(null,er,!0)},terminate:function(){z&&z.terminate&&z.terminate()}};m>=0&&(D.size=m,D.originalSize=b),v.onfile(D)}return"break"}if(c){if(134695760==t)return s=o+=12+(-2==c&&8),a=3,v.c=0,"break";if(33639248==t)return s=o-=4,a=3,v.c=0,"break"}}),"_loop_2"),v=this;o<h-4;++o){if("break"===p())break}if(this.p=er,c<0){var d=a?f.subarray(0,s-12-(-2==c&&8)-(134695760==N(f,s-16)&&4)):f.subarray(0,o);l?l.push(d,!!a):this.k[+(2==a)].push(d)}if(2&a)return this.push(f.subarray(o),t);this.p=f.subarray(o)}t&&(this.c&&g(13),this.p=null)},n.prototype.register=function(n){this.o[n.compression]=n},n}(),Rr="function"==typeof queueMicrotask?queueMicrotask:"function"==typeof setTimeout?setTimeout:function(n){n()};function Tt(n,t,r){r||(r=t,t={}),"function"!=typeof r&&g(7);var e=[],i=u((function(){for(var n=0;n<e.length;++n)e[n]()}),"tAll"),a={},o=u((function(n,t){Rr((function(){r(n,t)}))}),"cbd");Rr((function(){o=r}));for(var s=n.length-22;101010256!=N(n,s);--s)if(!s||n.length-s>65558)return o(g(13,0,1),null),i;var f=W(n,s+8);if(f){var h=f,c=N(n,s+16),l=4294967295==c;if(l){if(s=N(n,s-12),101075792!=N(n,s))return o(g(13,0,1),null),i;h=f=N(n,s+32),c=N(n,s+48)}for(var p=t&&t.filter,v=u((function(t){var r=jn(n,c,l),s=r[0],h=r[1],v=r[2],y=r[3],m=r[4],b=r[5],w=Wn(n,b);c=m;var z=u((function(n,t){n?(i(),o(n,null)):(t&&(a[y]=t),--f||o(null,a))}),"cbl");if(!p||p({name:y,size:h,originalSize:v,compression:s}))if(s)if(8==s){var E=n.subarray(w,w+h);if(h<32e4)try{z(null,Fr(E,new D(v)))}catch(n){z(n,null)}else e.push(Rn(E,{size:v},z))}else z(g(14,"unknown compression type "+s,1),null);else z(null,d(n,w,w+h));else z(null,null)}),"_loop_3"),y=0;y<h;++y)v(y)}else o(null,{});return i}function Ut(n,t){for(var r={},e=n.length-22;101010256!=N(n,e);--e)(!e||n.length-e>65558)&&g(13);var i=W(n,e+8);if(!i)return{};var a=N(n,e+16),o=4294967295==a;o&&(e=N(n,e-12),101075792!=N(n,e)&&g(13),i=N(n,e+32),a=N(n,e+48));for(var u=t&&t.filter,s=0;s<i;++s){var f=jn(n,a,o),h=f[0],c=f[1],l=f[2],p=f[3],v=f[4],y=f[5],m=Wn(n,y);a=v,(!u||u({name:p,size:c,originalSize:l,compression:h}))&&(h?8==h?r[p]=Fr(n.subarray(m,m+c),new D(l)):g(14,"unknown compression type "+h):r[p]=d(n,m,m+c))}return r}u(Tt,"unzip"),u(Ut,"unzipSync");export{ot as AsyncCompress,vt as AsyncDecompress,Xn as AsyncDeflate,bn as AsyncGunzip,ot as AsyncGzip,Nn as AsyncInflate,At as AsyncUnzipInflate,rt as AsyncUnzlib,yt as AsyncZipDeflate,st as AsyncZlib,pn as Compress,ct as DecodeUTF8,tt as Decompress,ar as Deflate,pt as EncodeUTF8,at as FlateErrorCode,Jr as Gunzip,pn as Gzip,K as Inflate,Mt as Unzip,zt as UnzipInflate,et as UnzipPassThrough,Qr as Unzlib,wt as Zip,gt as ZipDeflate,Nr as ZipPassThrough,yn as Zlib,ft as compress,gn as compressSync,ht as decompress,lt as decompressSync,dn as deflate,$r as deflateSync,_n as gunzip,Kr as gunzipSync,ft as gzip,gn as gzipSync,Rn as inflate,Fr as inflateSync,Hn as strFromU8,sr as strToU8,Tt as unzip,Ut as unzipSync,nt as unzlib,Vr as unzlibSync,mt as zip,xt as zipSync,ut as zlib,wn as zlibSync};