@mappedin/mappedin-js 6.0.1-beta.3 → 6.0.1-beta.30

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.
Files changed (36) hide show
  1. package/README.md +6 -6
  2. package/THIRD_PARTY_LICENSES.txt +362 -4
  3. package/lib/esm/GLTFExporter-2HAV72SJ.js +1 -0
  4. package/lib/esm/GLTFLoader-IS3L5KUS.js +1 -0
  5. package/lib/esm/browser-64MRL2ZR.js +1 -0
  6. package/lib/esm/chunk-A3CEQIQD.js +1 -0
  7. package/lib/esm/chunk-H2E2454S.js +1 -0
  8. package/lib/esm/chunk-JNSM5T55.js +1 -0
  9. package/lib/esm/chunk-ODQ3775R.js +1 -0
  10. package/lib/esm/chunk-OFHRQORP.js +1 -0
  11. package/lib/esm/chunk-OSMCRNNF.js +1 -0
  12. package/lib/esm/chunk-VD44EZOA.js +1 -0
  13. package/lib/esm/index.css +1 -1
  14. package/lib/esm/index.d.ts +9210 -3869
  15. package/lib/esm/index.js +1 -1
  16. package/lib/esm/inspector-D2RCHDOY.css +1 -0
  17. package/lib/esm/inspector-RQUC7XBE.js +1 -0
  18. package/lib/esm/internal-55777EMI.css +1 -0
  19. package/lib/esm/internal-FFMF4P2Y.js +1 -0
  20. package/lib/esm/outdoor-context-v4-E3KR4IBA.js +1 -0
  21. package/lib/esm/roboto-regular-YXLENGLP.js +1 -0
  22. package/lib/esm/text3d-7MFD4QFJ.js +1 -0
  23. package/lib/esm/text3d-Q7FFP3YS.css +1 -0
  24. package/lib/index.css +1 -1
  25. package/package.json +9 -10
  26. package/lib/esm/GLTFExporter-DJTLMZRS.js +0 -18
  27. package/lib/esm/GLTFLoader-EMLQBTUW.js +0 -1
  28. package/lib/esm/browser-VJJYXKCR.js +0 -1
  29. package/lib/esm/chunk-5TYPWFBI.js +0 -1
  30. package/lib/esm/chunk-5VLYPNGJ.js +0 -950
  31. package/lib/esm/chunk-AIZ6PN4T.js +0 -577
  32. package/lib/esm/chunk-BCE6HB4T.js +0 -1
  33. package/lib/esm/chunk-YPHGW2KF.js +0 -3799
  34. package/lib/esm/inspector-GIOP4ZXY.js +0 -425
  35. package/lib/esm/inspector-XYNFPRUR.css +0 -1
  36. package/lib/esm/outdoor-context-v4-DXPG5QBY.js +0 -1
@@ -0,0 +1 @@
1
+ import{b as oe}from"./chunk-VD44EZOA.js";import{$ as $e,A as Q,C as Z,E as J,Fa as te,G as $,Ga as N,H as C,I as We,Ia as ht,J as Ye,Ja as ne,K as F,Ka as se,La as re,M as ee,Ma as pt,N as M,Na as mt,O as K,Oa as ie,P as k,Pa as At,Q as G,Qa as gt,R as Qe,Ra as Tt,S as Ze,Sa as Rt,Ua as H,Wa as _t,X as Je,Ya as Et,b as He,ca as V,d as Be,e as j,f as ve,g as Fe,ga as et,h as Ue,ha as tt,i as je,ia as nt,j as Ke,ja as st,k as q,l as Ge,la as rt,m as W,ma as it,na as ot,p as Ve,pa as at,q as Y,qa as ct,ra as ut,s as Xe,sa as lt,t as ze,ta as ft,ua as dt,w as P,x as w,z as qe}from"./chunk-JNSM5T55.js";import{a as ke}from"./chunk-OSMCRNNF.js";import"./chunk-H2E2454S.js";ke();var xt=class extends mt{constructor(t){super(t),this.dracoLoader=null,this.ktx2Loader=null,this.meshoptDecoder=null,this.pluginCallbacks=[],this.register(function(e){return new he(e)}),this.register(function(e){return new xe(e)}),this.register(function(e){return new Se(e)}),this.register(function(e){return new ye(e)}),this.register(function(e){return new me(e)}),this.register(function(e){return new Ae(e)}),this.register(function(e){return new ge(e)}),this.register(function(e){return new Te(e)}),this.register(function(e){return new de(e)}),this.register(function(e){return new Re(e)}),this.register(function(e){return new pe(e)}),this.register(function(e){return new Ee(e)}),this.register(function(e){return new _e(e)}),this.register(function(e){return new le(e)}),this.register(function(e){return new we(e)}),this.register(function(e){return new Ne(e)})}load(t,e,r,n){let s=this,i;if(this.resourcePath!=="")i=this.resourcePath;else if(this.path!==""){let c=H.extractUrlBase(t);i=H.resolveURL(c,this.path)}else i=H.extractUrlBase(t);this.manager.itemStart(t);let a=function(c){n?n(c):console.error(c),s.manager.itemError(t),s.manager.itemEnd(t)},o=new ie(this.manager);o.setPath(this.path),o.setResponseType("arraybuffer"),o.setRequestHeader(this.requestHeader),o.setWithCredentials(this.withCredentials),o.load(t,function(c){try{s.parse(c,i,function(l){e(l),s.manager.itemEnd(t)},a)}catch(l){a(l)}},r,a)}setDRACOLoader(t){return this.dracoLoader=t,this}setDDSLoader(){throw new Error('THREE.GLTFLoader: "MSFT_texture_dds" no longer supported. Please update to "KHR_texture_basisu".')}setKTX2Loader(t){return this.ktx2Loader=t,this}setMeshoptDecoder(t){return this.meshoptDecoder=t,this}register(t){return this.pluginCallbacks.indexOf(t)===-1&&this.pluginCallbacks.push(t),this}unregister(t){return this.pluginCallbacks.indexOf(t)!==-1&&this.pluginCallbacks.splice(this.pluginCallbacks.indexOf(t),1),this}parse(t,e,r,n){let s,i={},a={},o=new TextDecoder;if(typeof t=="string")s=JSON.parse(t);else if(t instanceof ArrayBuffer)if(o.decode(new Uint8Array(t,0,4))===bt){try{i[A.KHR_BINARY_GLTF]=new be(t)}catch(u){n&&n(u);return}s=JSON.parse(i[A.KHR_BINARY_GLTF].content)}else s=JSON.parse(o.decode(t));else s=t;if(s.asset===void 0||s.asset.version[0]<2){n&&n(new Error("THREE.GLTFLoader: Unsupported asset. glTF versions >=2.0 are supported."));return}let c=new Pe(s,{path:e||this.resourcePath||"",crossOrigin:this.crossOrigin,requestHeader:this.requestHeader,manager:this.manager,ktx2Loader:this.ktx2Loader,meshoptDecoder:this.meshoptDecoder});c.fileLoader.setRequestHeader(this.requestHeader);for(let l=0;l<this.pluginCallbacks.length;l++){let u=this.pluginCallbacks[l](c);u.name||console.error("THREE.GLTFLoader: Invalid plugin found: missing name"),a[u.name]=u,i[u.name]=!0}if(s.extensionsUsed)for(let l=0;l<s.extensionsUsed.length;++l){let u=s.extensionsUsed[l],f=s.extensionsRequired||[];switch(u){case A.KHR_MATERIALS_UNLIT:i[u]=new fe;break;case A.KHR_DRACO_MESH_COMPRESSION:i[u]=new Le(s,this.dracoLoader);break;case A.KHR_TEXTURE_TRANSFORM:i[u]=new Me;break;case A.KHR_MESH_QUANTIZATION:i[u]=new Ie;break;default:f.indexOf(u)>=0&&a[u]===void 0&&console.warn('THREE.GLTFLoader: Unknown extension "'+u+'".')}}c.setExtensions(i),c.setPlugins(a),c.parse(r,n)}parseAsync(t,e){let r=this;return new Promise(function(n,s){r.parse(t,e,n,s)})}};function Lt(){let d={};return{get:function(t){return d[t]},add:function(t,e){d[t]=e},remove:function(t){delete d[t]},removeAll:function(){d={}}}}var A={KHR_BINARY_GLTF:"KHR_binary_glTF",KHR_DRACO_MESH_COMPRESSION:"KHR_draco_mesh_compression",KHR_LIGHTS_PUNCTUAL:"KHR_lights_punctual",KHR_MATERIALS_CLEARCOAT:"KHR_materials_clearcoat",KHR_MATERIALS_IOR:"KHR_materials_ior",KHR_MATERIALS_SHEEN:"KHR_materials_sheen",KHR_MATERIALS_SPECULAR:"KHR_materials_specular",KHR_MATERIALS_TRANSMISSION:"KHR_materials_transmission",KHR_MATERIALS_IRIDESCENCE:"KHR_materials_iridescence",KHR_MATERIALS_ANISOTROPY:"KHR_materials_anisotropy",KHR_MATERIALS_UNLIT:"KHR_materials_unlit",KHR_MATERIALS_VOLUME:"KHR_materials_volume",KHR_TEXTURE_BASISU:"KHR_texture_basisu",KHR_TEXTURE_TRANSFORM:"KHR_texture_transform",KHR_MESH_QUANTIZATION:"KHR_mesh_quantization",KHR_MATERIALS_EMISSIVE_STRENGTH:"KHR_materials_emissive_strength",EXT_MATERIALS_BUMP:"EXT_materials_bump",EXT_TEXTURE_WEBP:"EXT_texture_webp",EXT_TEXTURE_AVIF:"EXT_texture_avif",EXT_MESHOPT_COMPRESSION:"EXT_meshopt_compression",EXT_MESH_GPU_INSTANCING:"EXT_mesh_gpu_instancing"},le=class{constructor(t){this.parser=t,this.name=A.KHR_LIGHTS_PUNCTUAL,this.cache={refs:{},uses:{}}}_markDefs(){let t=this.parser,e=this.parser.json.nodes||[];for(let r=0,n=e.length;r<n;r++){let s=e[r];s.extensions&&s.extensions[this.name]&&s.extensions[this.name].light!==void 0&&t._addNodeRef(this.cache,s.extensions[this.name].light)}}_loadLight(t){let e=this.parser,r="light:"+t,n=e.cache.get(r);if(n)return n;let s=e.json,o=((s.extensions&&s.extensions[this.name]||{}).lights||[])[t],c,l=new M(16777215);o.color!==void 0&&l.setRGB(o.color[0],o.color[1],o.color[2],w);let u=o.range!==void 0?o.range:0;switch(o.type){case"directional":c=new Rt(l),c.target.position.set(0,0,-1),c.add(c.target);break;case"point":c=new Tt(l),c.distance=u;break;case"spot":c=new gt(l),c.distance=u,o.spot=o.spot||{},o.spot.innerConeAngle=o.spot.innerConeAngle!==void 0?o.spot.innerConeAngle:0,o.spot.outerConeAngle=o.spot.outerConeAngle!==void 0?o.spot.outerConeAngle:Math.PI/4,c.angle=o.spot.outerConeAngle,c.penumbra=1-o.spot.innerConeAngle/o.spot.outerConeAngle,c.target.position.set(0,0,-1),c.add(c.target);break;default:throw new Error("THREE.GLTFLoader: Unexpected light type: "+o.type)}return c.position.set(0,0,0),c.decay=2,O(c,o),o.intensity!==void 0&&(c.intensity=o.intensity),c.name=e.createUniqueName(o.name||"light_"+t),n=Promise.resolve(c),e.cache.add(r,n),n}getDependency(t,e){if(t==="light")return this._loadLight(e)}createNodeAttachment(t){let e=this,r=this.parser,s=r.json.nodes[t],a=(s.extensions&&s.extensions[this.name]||{}).light;return a===void 0?null:this._loadLight(a).then(function(o){return r._getNodeRef(e.cache,a,o)})}},fe=class{constructor(){this.name=A.KHR_MATERIALS_UNLIT}getMaterialType(){return k}extendParams(t,e,r){let n=[];t.color=new M(1,1,1),t.opacity=1;let s=e.pbrMetallicRoughness;if(s){if(Array.isArray(s.baseColorFactor)){let i=s.baseColorFactor;t.color.setRGB(i[0],i[1],i[2],w),t.opacity=i[3]}s.baseColorTexture!==void 0&&n.push(r.assignTexture(t,"map",s.baseColorTexture,P))}return Promise.all(n)}},de=class{constructor(t){this.parser=t,this.name=A.KHR_MATERIALS_EMISSIVE_STRENGTH}extendMaterialParams(t,e){let n=this.parser.json.materials[t];if(!n.extensions||!n.extensions[this.name])return Promise.resolve();let s=n.extensions[this.name].emissiveStrength;return s!==void 0&&(e.emissiveIntensity=s),Promise.resolve()}},he=class{constructor(t){this.parser=t,this.name=A.KHR_MATERIALS_CLEARCOAT}getMaterialType(t){let r=this.parser.json.materials[t];return!r.extensions||!r.extensions[this.name]?null:N}extendMaterialParams(t,e){let r=this.parser,n=r.json.materials[t];if(!n.extensions||!n.extensions[this.name])return Promise.resolve();let s=[],i=n.extensions[this.name];if(i.clearcoatFactor!==void 0&&(e.clearcoat=i.clearcoatFactor),i.clearcoatTexture!==void 0&&s.push(r.assignTexture(e,"clearcoatMap",i.clearcoatTexture)),i.clearcoatRoughnessFactor!==void 0&&(e.clearcoatRoughness=i.clearcoatRoughnessFactor),i.clearcoatRoughnessTexture!==void 0&&s.push(r.assignTexture(e,"clearcoatRoughnessMap",i.clearcoatRoughnessTexture)),i.clearcoatNormalTexture!==void 0&&(s.push(r.assignTexture(e,"clearcoatNormalMap",i.clearcoatNormalTexture)),i.clearcoatNormalTexture.scale!==void 0)){let a=i.clearcoatNormalTexture.scale;e.clearcoatNormalScale=new Q(a,a)}return Promise.all(s)}},pe=class{constructor(t){this.parser=t,this.name=A.KHR_MATERIALS_IRIDESCENCE}getMaterialType(t){let r=this.parser.json.materials[t];return!r.extensions||!r.extensions[this.name]?null:N}extendMaterialParams(t,e){let r=this.parser,n=r.json.materials[t];if(!n.extensions||!n.extensions[this.name])return Promise.resolve();let s=[],i=n.extensions[this.name];return i.iridescenceFactor!==void 0&&(e.iridescence=i.iridescenceFactor),i.iridescenceTexture!==void 0&&s.push(r.assignTexture(e,"iridescenceMap",i.iridescenceTexture)),i.iridescenceIor!==void 0&&(e.iridescenceIOR=i.iridescenceIor),e.iridescenceThicknessRange===void 0&&(e.iridescenceThicknessRange=[100,400]),i.iridescenceThicknessMinimum!==void 0&&(e.iridescenceThicknessRange[0]=i.iridescenceThicknessMinimum),i.iridescenceThicknessMaximum!==void 0&&(e.iridescenceThicknessRange[1]=i.iridescenceThicknessMaximum),i.iridescenceThicknessTexture!==void 0&&s.push(r.assignTexture(e,"iridescenceThicknessMap",i.iridescenceThicknessTexture)),Promise.all(s)}},me=class{constructor(t){this.parser=t,this.name=A.KHR_MATERIALS_SHEEN}getMaterialType(t){let r=this.parser.json.materials[t];return!r.extensions||!r.extensions[this.name]?null:N}extendMaterialParams(t,e){let r=this.parser,n=r.json.materials[t];if(!n.extensions||!n.extensions[this.name])return Promise.resolve();let s=[];e.sheenColor=new M(0,0,0),e.sheenRoughness=0,e.sheen=1;let i=n.extensions[this.name];if(i.sheenColorFactor!==void 0){let a=i.sheenColorFactor;e.sheenColor.setRGB(a[0],a[1],a[2],w)}return i.sheenRoughnessFactor!==void 0&&(e.sheenRoughness=i.sheenRoughnessFactor),i.sheenColorTexture!==void 0&&s.push(r.assignTexture(e,"sheenColorMap",i.sheenColorTexture,P)),i.sheenRoughnessTexture!==void 0&&s.push(r.assignTexture(e,"sheenRoughnessMap",i.sheenRoughnessTexture)),Promise.all(s)}},Ae=class{constructor(t){this.parser=t,this.name=A.KHR_MATERIALS_TRANSMISSION}getMaterialType(t){let r=this.parser.json.materials[t];return!r.extensions||!r.extensions[this.name]?null:N}extendMaterialParams(t,e){let r=this.parser,n=r.json.materials[t];if(!n.extensions||!n.extensions[this.name])return Promise.resolve();let s=[],i=n.extensions[this.name];return i.transmissionFactor!==void 0&&(e.transmission=i.transmissionFactor),i.transmissionTexture!==void 0&&s.push(r.assignTexture(e,"transmissionMap",i.transmissionTexture)),Promise.all(s)}},ge=class{constructor(t){this.parser=t,this.name=A.KHR_MATERIALS_VOLUME}getMaterialType(t){let r=this.parser.json.materials[t];return!r.extensions||!r.extensions[this.name]?null:N}extendMaterialParams(t,e){let r=this.parser,n=r.json.materials[t];if(!n.extensions||!n.extensions[this.name])return Promise.resolve();let s=[],i=n.extensions[this.name];e.thickness=i.thicknessFactor!==void 0?i.thicknessFactor:0,i.thicknessTexture!==void 0&&s.push(r.assignTexture(e,"thicknessMap",i.thicknessTexture)),e.attenuationDistance=i.attenuationDistance||1/0;let a=i.attenuationColor||[1,1,1];return e.attenuationColor=new M().setRGB(a[0],a[1],a[2],w),Promise.all(s)}},Te=class{constructor(t){this.parser=t,this.name=A.KHR_MATERIALS_IOR}getMaterialType(t){let r=this.parser.json.materials[t];return!r.extensions||!r.extensions[this.name]?null:N}extendMaterialParams(t,e){let n=this.parser.json.materials[t];if(!n.extensions||!n.extensions[this.name])return Promise.resolve();let s=n.extensions[this.name];return e.ior=s.ior!==void 0?s.ior:1.5,Promise.resolve()}},Re=class{constructor(t){this.parser=t,this.name=A.KHR_MATERIALS_SPECULAR}getMaterialType(t){let r=this.parser.json.materials[t];return!r.extensions||!r.extensions[this.name]?null:N}extendMaterialParams(t,e){let r=this.parser,n=r.json.materials[t];if(!n.extensions||!n.extensions[this.name])return Promise.resolve();let s=[],i=n.extensions[this.name];e.specularIntensity=i.specularFactor!==void 0?i.specularFactor:1,i.specularTexture!==void 0&&s.push(r.assignTexture(e,"specularIntensityMap",i.specularTexture));let a=i.specularColorFactor||[1,1,1];return e.specularColor=new M().setRGB(a[0],a[1],a[2],w),i.specularColorTexture!==void 0&&s.push(r.assignTexture(e,"specularColorMap",i.specularColorTexture,P)),Promise.all(s)}},_e=class{constructor(t){this.parser=t,this.name=A.EXT_MATERIALS_BUMP}getMaterialType(t){let r=this.parser.json.materials[t];return!r.extensions||!r.extensions[this.name]?null:N}extendMaterialParams(t,e){let r=this.parser,n=r.json.materials[t];if(!n.extensions||!n.extensions[this.name])return Promise.resolve();let s=[],i=n.extensions[this.name];return e.bumpScale=i.bumpFactor!==void 0?i.bumpFactor:1,i.bumpTexture!==void 0&&s.push(r.assignTexture(e,"bumpMap",i.bumpTexture)),Promise.all(s)}},Ee=class{constructor(t){this.parser=t,this.name=A.KHR_MATERIALS_ANISOTROPY}getMaterialType(t){let r=this.parser.json.materials[t];return!r.extensions||!r.extensions[this.name]?null:N}extendMaterialParams(t,e){let r=this.parser,n=r.json.materials[t];if(!n.extensions||!n.extensions[this.name])return Promise.resolve();let s=[],i=n.extensions[this.name];return i.anisotropyStrength!==void 0&&(e.anisotropy=i.anisotropyStrength),i.anisotropyRotation!==void 0&&(e.anisotropyRotation=i.anisotropyRotation),i.anisotropyTexture!==void 0&&s.push(r.assignTexture(e,"anisotropyMap",i.anisotropyTexture)),Promise.all(s)}},xe=class{constructor(t){this.parser=t,this.name=A.KHR_TEXTURE_BASISU}loadTexture(t){let e=this.parser,r=e.json,n=r.textures[t];if(!n.extensions||!n.extensions[this.name])return null;let s=n.extensions[this.name],i=e.options.ktx2Loader;if(!i){if(r.extensionsRequired&&r.extensionsRequired.indexOf(this.name)>=0)throw new Error("THREE.GLTFLoader: setKTX2Loader must be called before loading KTX2 textures");return null}return e.loadTextureImage(t,s.source,i)}},Se=class{constructor(t){this.parser=t,this.name=A.EXT_TEXTURE_WEBP,this.isSupported=null}loadTexture(t){let e=this.name,r=this.parser,n=r.json,s=n.textures[t];if(!s.extensions||!s.extensions[e])return null;let i=s.extensions[e],a=n.images[i.source],o=r.textureLoader;if(a.uri){let c=r.options.manager.getHandler(a.uri);c!==null&&(o=c)}return this.detectSupport().then(function(c){if(c)return r.loadTextureImage(t,i.source,o);if(n.extensionsRequired&&n.extensionsRequired.indexOf(e)>=0)throw new Error("THREE.GLTFLoader: WebP required by asset but unsupported.");return r.loadTexture(t)})}detectSupport(){return this.isSupported||(this.isSupported=new Promise(function(t){let e=new Image;e.src="data:image/webp;base64,UklGRiIAAABXRUJQVlA4IBYAAAAwAQCdASoBAAEADsD+JaQAA3AAAAAA",e.onload=e.onerror=function(){t(e.height===1)}})),this.isSupported}},ye=class{constructor(t){this.parser=t,this.name=A.EXT_TEXTURE_AVIF,this.isSupported=null}loadTexture(t){let e=this.name,r=this.parser,n=r.json,s=n.textures[t];if(!s.extensions||!s.extensions[e])return null;let i=s.extensions[e],a=n.images[i.source],o=r.textureLoader;if(a.uri){let c=r.options.manager.getHandler(a.uri);c!==null&&(o=c)}return this.detectSupport().then(function(c){if(c)return r.loadTextureImage(t,i.source,o);if(n.extensionsRequired&&n.extensionsRequired.indexOf(e)>=0)throw new Error("THREE.GLTFLoader: AVIF required by asset but unsupported.");return r.loadTexture(t)})}detectSupport(){return this.isSupported||(this.isSupported=new Promise(function(t){let e=new Image;e.src="data:image/avif;base64,AAAAIGZ0eXBhdmlmAAAAAGF2aWZtaWYxbWlhZk1BMUIAAADybWV0YQAAAAAAAAAoaGRscgAAAAAAAAAAcGljdAAAAAAAAAAAAAAAAGxpYmF2aWYAAAAADnBpdG0AAAAAAAEAAAAeaWxvYwAAAABEAAABAAEAAAABAAABGgAAABcAAAAoaWluZgAAAAAAAQAAABppbmZlAgAAAAABAABhdjAxQ29sb3IAAAAAamlwcnAAAABLaXBjbwAAABRpc3BlAAAAAAAAAAEAAAABAAAAEHBpeGkAAAAAAwgICAAAAAxhdjFDgQAMAAAAABNjb2xybmNseAACAAIABoAAAAAXaXBtYQAAAAAAAAABAAEEAQKDBAAAAB9tZGF0EgAKCBgABogQEDQgMgkQAAAAB8dSLfI=",e.onload=e.onerror=function(){t(e.height===1)}})),this.isSupported}},we=class{constructor(t){this.name=A.EXT_MESHOPT_COMPRESSION,this.parser=t}loadBufferView(t){let e=this.parser.json,r=e.bufferViews[t];if(r.extensions&&r.extensions[this.name]){let n=r.extensions[this.name],s=this.parser.getDependency("buffer",n.buffer),i=this.parser.options.meshoptDecoder;if(!i||!i.supported){if(e.extensionsRequired&&e.extensionsRequired.indexOf(this.name)>=0)throw new Error("THREE.GLTFLoader: setMeshoptDecoder must be called before loading compressed files");return null}return s.then(function(a){let o=n.byteOffset||0,c=n.byteLength||0,l=n.count,u=n.byteStride,f=new Uint8Array(a,o,c);return i.decodeGltfBufferAsync?i.decodeGltfBufferAsync(l,u,f,n.mode,n.filter).then(function(h){return h.buffer}):i.ready.then(function(){let h=new ArrayBuffer(l*u);return i.decodeGltfBuffer(new Uint8Array(h),l,u,f,n.mode,n.filter),h})})}else return null}},Ne=class{constructor(t){this.name=A.EXT_MESH_GPU_INSTANCING,this.parser=t}createNodeMesh(t){let e=this.parser.json,r=e.nodes[t];if(!r.extensions||!r.extensions[this.name]||r.mesh===void 0)return null;let n=e.meshes[r.mesh];for(let c of n.primitives)if(c.mode!==x.TRIANGLES&&c.mode!==x.TRIANGLE_STRIP&&c.mode!==x.TRIANGLE_FAN&&c.mode!==void 0)return null;let i=r.extensions[this.name].attributes,a=[],o={};for(let c in i)a.push(this.parser.getDependency("accessor",i[c]).then(l=>(o[c]=l,o[c])));return a.length<1?null:(a.push(this.parser.createNodeMesh(t)),Promise.all(a).then(c=>{let l=c.pop(),u=l.isGroup?l.children:[l],f=c[0].count,h=[];for(let p of u){let T=new F,m=new C,g=new $,_=new C(1,1,1),E=new ot(p.geometry,p.material,f);for(let R=0;R<f;R++)o.TRANSLATION&&m.fromBufferAttribute(o.TRANSLATION,R),o.ROTATION&&g.fromBufferAttribute(o.ROTATION,R),o.SCALE&&_.fromBufferAttribute(o.SCALE,R),E.setMatrixAt(R,T.compose(m,g,_));for(let R in o)if(R==="_COLOR_0"){let y=o[R];E.instanceColor=new it(y.array,y.itemSize,y.normalized)}else R!=="TRANSLATION"&&R!=="ROTATION"&&R!=="SCALE"&&p.geometry.setAttribute(R,o[R]);ee.prototype.copy.call(E,p),this.parser.assignFinalMaterial(E),h.push(E)}return l.isGroup?(l.clear(),l.add(...h),l):h[0]}))}},bt="glTF",U=12,St={JSON:1313821514,BIN:5130562},be=class{constructor(t){this.name=A.KHR_BINARY_GLTF,this.content=null,this.body=null;let e=new DataView(t,0,U),r=new TextDecoder;if(this.header={magic:r.decode(new Uint8Array(t.slice(0,4))),version:e.getUint32(4,!0),length:e.getUint32(8,!0)},this.header.magic!==bt)throw new Error("THREE.GLTFLoader: Unsupported glTF-Binary header.");if(this.header.version<2)throw new Error("THREE.GLTFLoader: Legacy binary file detected.");let n=this.header.length-U,s=new DataView(t,U),i=0;for(;i<n;){let a=s.getUint32(i,!0);i+=4;let o=s.getUint32(i,!0);if(i+=4,o===St.JSON){let c=new Uint8Array(t,U+i,a);this.content=r.decode(c)}else if(o===St.BIN){let c=U+i;this.body=t.slice(c,c+a)}i+=a}if(this.content===null)throw new Error("THREE.GLTFLoader: JSON content not found.")}},Le=class{constructor(t,e){if(!e)throw new Error("THREE.GLTFLoader: No DRACOLoader instance provided.");this.name=A.KHR_DRACO_MESH_COMPRESSION,this.json=t,this.dracoLoader=e,this.dracoLoader.preload()}decodePrimitive(t,e){let r=this.json,n=this.dracoLoader,s=t.extensions[this.name].bufferView,i=t.extensions[this.name].attributes,a={},o={},c={};for(let l in i){let u=Ce[l]||l.toLowerCase();a[u]=i[l]}for(let l in t.attributes){let u=Ce[l]||l.toLowerCase();if(i[l]!==void 0){let f=r.accessors[t.attributes[l]],h=B[f.componentType];c[u]=h.name,o[u]=f.normalized===!0}}return e.getDependency("bufferView",s).then(function(l){return new Promise(function(u,f){n.decodeDracoFile(l,function(h){for(let p in h.attributes){let T=h.attributes[p],m=o[p];m!==void 0&&(T.normalized=m)}u(h)},a,c,w,f)})})}},Me=class{constructor(){this.name=A.KHR_TEXTURE_TRANSFORM}extendTexture(t,e){return(e.texCoord===void 0||e.texCoord===t.channel)&&e.offset===void 0&&e.rotation===void 0&&e.scale===void 0||(t=t.clone(),e.texCoord!==void 0&&(t.channel=e.texCoord),e.offset!==void 0&&t.offset.fromArray(e.offset),e.rotation!==void 0&&(t.rotation=e.rotation),e.scale!==void 0&&t.repeat.fromArray(e.scale),t.needsUpdate=!0),t}},Ie=class{constructor(){this.name=A.KHR_MESH_QUANTIZATION}},X=class extends ht{constructor(t,e,r,n){super(t,e,r,n)}copySampleValue_(t){let e=this.resultBuffer,r=this.sampleValues,n=this.valueSize,s=t*n*3+n;for(let i=0;i!==n;i++)e[i]=r[s+i];return e}interpolate_(t,e,r,n){let s=this.resultBuffer,i=this.sampleValues,a=this.valueSize,o=a*2,c=a*3,l=n-e,u=(r-e)/l,f=u*u,h=f*u,p=t*c,T=p-c,m=-2*h+3*f,g=h-f,_=1-m,E=g-f+u;for(let R=0;R!==a;R++){let y=i[T+R+a],b=i[T+R+o]*l,S=i[p+R+a],v=i[p+R]*l;s[R]=_*y+E*b+m*S+g*v}return s}},Mt=new $,Oe=class extends X{interpolate_(t,e,r,n){let s=super.interpolate_(t,e,r,n);return Mt.fromArray(s).normalize().toArray(s),s}},x={FLOAT:5126,FLOAT_MAT3:35675,FLOAT_MAT4:35676,FLOAT_VEC2:35664,FLOAT_VEC3:35665,FLOAT_VEC4:35666,LINEAR:9729,REPEAT:10497,SAMPLER_2D:35678,POINTS:0,LINES:1,LINE_LOOP:2,LINE_STRIP:3,TRIANGLES:4,TRIANGLE_STRIP:5,TRIANGLE_FAN:6,UNSIGNED_BYTE:5121,UNSIGNED_SHORT:5123},B={5120:Int8Array,5121:Uint8Array,5122:Int16Array,5123:Uint16Array,5125:Uint32Array,5126:Float32Array},yt={9728:Ue,9729:q,9984:je,9985:Ge,9986:Ke,9987:W},wt={33071:ve,33648:Fe,10497:j},ae={SCALAR:1,VEC2:2,VEC3:3,VEC4:4,MAT2:4,MAT3:9,MAT4:16},Ce={POSITION:"position",NORMAL:"normal",TANGENT:"tangent",TEXCOORD_0:"uv",TEXCOORD_1:"uv1",TEXCOORD_2:"uv2",TEXCOORD_3:"uv3",COLOR_0:"color",WEIGHTS_0:"skinWeight",JOINTS_0:"skinIndex"},I={scale:"scale",translation:"position",rotation:"quaternion",weights:"morphTargetInfluences"},It={CUBICSPLINE:void 0,LINEAR:Y,STEP:Ve},ce={OPAQUE:"OPAQUE",MASK:"MASK",BLEND:"BLEND"};function Ot(d){return d.DefaultMaterial===void 0&&(d.DefaultMaterial=new te({color:16777215,emissive:0,metalness:1,roughness:1,transparent:!1,depthTest:!0,side:He})),d.DefaultMaterial}function D(d,t,e){for(let r in e.extensions)d[r]===void 0&&(t.userData.gltfExtensions=t.userData.gltfExtensions||{},t.userData.gltfExtensions[r]=e.extensions[r])}function O(d,t){t.extras!==void 0&&(typeof t.extras=="object"?Object.assign(d.userData,t.extras):console.warn("THREE.GLTFLoader: Ignoring primitive type .extras, "+t.extras))}function Ct(d,t,e){let r=!1,n=!1,s=!1;for(let c=0,l=t.length;c<l;c++){let u=t[c];if(u.POSITION!==void 0&&(r=!0),u.NORMAL!==void 0&&(n=!0),u.COLOR_0!==void 0&&(s=!0),r&&n&&s)break}if(!r&&!n&&!s)return Promise.resolve(d);let i=[],a=[],o=[];for(let c=0,l=t.length;c<l;c++){let u=t[c];if(r){let f=u.POSITION!==void 0?e.getDependency("accessor",u.POSITION):d.attributes.position;i.push(f)}if(n){let f=u.NORMAL!==void 0?e.getDependency("accessor",u.NORMAL):d.attributes.normal;a.push(f)}if(s){let f=u.COLOR_0!==void 0?e.getDependency("accessor",u.COLOR_0):d.attributes.color;o.push(f)}}return Promise.all([Promise.all(i),Promise.all(a),Promise.all(o)]).then(function(c){let l=c[0],u=c[1],f=c[2];return r&&(d.morphAttributes.position=l),n&&(d.morphAttributes.normal=u),s&&(d.morphAttributes.color=f),d.morphTargetsRelative=!0,d})}function Dt(d,t){if(d.updateMorphTargets(),t.weights!==void 0)for(let e=0,r=t.weights.length;e<r;e++)d.morphTargetInfluences[e]=t.weights[e];if(t.extras&&Array.isArray(t.extras.targetNames)){let e=t.extras.targetNames;if(d.morphTargetInfluences.length===e.length){d.morphTargetDictionary={};for(let r=0,n=e.length;r<n;r++)d.morphTargetDictionary[e[r]]=r}else console.warn("THREE.GLTFLoader: Invalid extras.targetNames length. Ignoring names.")}}function Pt(d){let t,e=d.extensions&&d.extensions[A.KHR_DRACO_MESH_COMPRESSION];if(e?t="draco:"+e.bufferView+":"+e.indices+":"+ue(e.attributes):t=d.indices+":"+ue(d.attributes)+":"+d.mode,d.targets!==void 0)for(let r=0,n=d.targets.length;r<n;r++)t+=":"+ue(d.targets[r]);return t}function ue(d){let t="",e=Object.keys(d).sort();for(let r=0,n=e.length;r<n;r++)t+=e[r]+":"+d[e[r]]+";";return t}function De(d){switch(d){case Int8Array:return 1/127;case Uint8Array:return 1/255;case Int16Array:return 1/32767;case Uint16Array:return 1/65535;default:throw new Error("THREE.GLTFLoader: Unsupported normalized accessor component type.")}}function kt(d){return d.search(/\.jpe?g($|\?)/i)>0||d.search(/^data\:image\/jpeg/)===0?"image/jpeg":d.search(/\.webp($|\?)/i)>0||d.search(/^data\:image\/webp/)===0?"image/webp":"image/png"}var Ht=new F,Pe=class{constructor(t={},e={}){this.json=t,this.extensions={},this.plugins={},this.options=e,this.cache=new Lt,this.associations=new Map,this.primitiveCache={},this.nodeCache={},this.meshCache={refs:{},uses:{}},this.cameraCache={refs:{},uses:{}},this.lightCache={refs:{},uses:{}},this.sourceCache={},this.textureCache={},this.nodeNamesUsed={};let r=!1,n=!1,s=-1;typeof navigator<"u"&&(r=/^((?!chrome|android).)*safari/i.test(navigator.userAgent)===!0,n=navigator.userAgent.indexOf("Firefox")>-1,s=n?navigator.userAgent.match(/Firefox\/([0-9]+)\./)[1]:-1),typeof createImageBitmap>"u"||r||n&&s<98?this.textureLoader=new At(this.options.manager):this.textureLoader=new _t(this.options.manager),this.textureLoader.setCrossOrigin(this.options.crossOrigin),this.textureLoader.setRequestHeader(this.options.requestHeader),this.fileLoader=new ie(this.options.manager),this.fileLoader.setResponseType("arraybuffer"),this.options.crossOrigin==="use-credentials"&&this.fileLoader.setWithCredentials(!0)}setExtensions(t){this.extensions=t}setPlugins(t){this.plugins=t}parse(t,e){let r=this,n=this.json,s=this.extensions;this.cache.removeAll(),this.nodeCache={},this._invokeAll(function(i){return i._markDefs&&i._markDefs()}),Promise.all(this._invokeAll(function(i){return i.beforeRoot&&i.beforeRoot()})).then(function(){return Promise.all([r.getDependencies("scene"),r.getDependencies("animation"),r.getDependencies("camera")])}).then(function(i){let a={scene:i[0][n.scene||0],scenes:i[0],animations:i[1],cameras:i[2],asset:n.asset,parser:r,userData:{}};return D(s,a,n),O(a,n),Promise.all(r._invokeAll(function(o){return o.afterRoot&&o.afterRoot(a)})).then(function(){t(a)})}).catch(e)}_markDefs(){let t=this.json.nodes||[],e=this.json.skins||[],r=this.json.meshes||[];for(let n=0,s=e.length;n<s;n++){let i=e[n].joints;for(let a=0,o=i.length;a<o;a++)t[i[a]].isBone=!0}for(let n=0,s=t.length;n<s;n++){let i=t[n];i.mesh!==void 0&&(this._addNodeRef(this.meshCache,i.mesh),i.skin!==void 0&&(r[i.mesh].isSkinnedMesh=!0)),i.camera!==void 0&&this._addNodeRef(this.cameraCache,i.camera)}}_addNodeRef(t,e){e!==void 0&&(t.refs[e]===void 0&&(t.refs[e]=t.uses[e]=0),t.refs[e]++)}_getNodeRef(t,e,r){if(t.refs[e]<=1)return r;let n=r.clone(),s=(i,a)=>{let o=this.associations.get(i);o!=null&&this.associations.set(a,o);for(let[c,l]of i.children.entries())s(l,a.children[c])};return s(r,n),n.name+="_instance_"+t.uses[e]++,n}_invokeOne(t){let e=Object.values(this.plugins);e.push(this);for(let r=0;r<e.length;r++){let n=t(e[r]);if(n)return n}return null}_invokeAll(t){let e=Object.values(this.plugins);e.unshift(this);let r=[];for(let n=0;n<e.length;n++){let s=t(e[n]);s&&r.push(s)}return r}getDependency(t,e){let r=t+":"+e,n=this.cache.get(r);if(!n){switch(t){case"scene":n=this.loadScene(e);break;case"node":n=this._invokeOne(function(s){return s.loadNode&&s.loadNode(e)});break;case"mesh":n=this._invokeOne(function(s){return s.loadMesh&&s.loadMesh(e)});break;case"accessor":n=this.loadAccessor(e);break;case"bufferView":n=this._invokeOne(function(s){return s.loadBufferView&&s.loadBufferView(e)});break;case"buffer":n=this.loadBuffer(e);break;case"material":n=this._invokeOne(function(s){return s.loadMaterial&&s.loadMaterial(e)});break;case"texture":n=this._invokeOne(function(s){return s.loadTexture&&s.loadTexture(e)});break;case"skin":n=this.loadSkin(e);break;case"animation":n=this._invokeOne(function(s){return s.loadAnimation&&s.loadAnimation(e)});break;case"camera":n=this.loadCamera(e);break;default:if(n=this._invokeOne(function(s){return s!=this&&s.getDependency&&s.getDependency(t,e)}),!n)throw new Error("Unknown type: "+t);break}this.cache.add(r,n)}return n}getDependencies(t){let e=this.cache.get(t);if(!e){let r=this,n=this.json[t+(t==="mesh"?"es":"s")]||[];e=Promise.all(n.map(function(s,i){return r.getDependency(t,i)})),this.cache.add(t,e)}return e}loadBuffer(t){let e=this.json.buffers[t],r=this.fileLoader;if(e.type&&e.type!=="arraybuffer")throw new Error("THREE.GLTFLoader: "+e.type+" buffer type is not supported.");if(e.uri===void 0&&t===0)return Promise.resolve(this.extensions[A.KHR_BINARY_GLTF].body);let n=this.options;return new Promise(function(s,i){r.load(H.resolveURL(e.uri,n.path),s,void 0,function(){i(new Error('THREE.GLTFLoader: Failed to load buffer "'+e.uri+'".'))})})}loadBufferView(t){let e=this.json.bufferViews[t];return this.getDependency("buffer",e.buffer).then(function(r){let n=e.byteLength||0,s=e.byteOffset||0;return r.slice(s,s+n)})}loadAccessor(t){let e=this,r=this.json,n=this.json.accessors[t];if(n.bufferView===void 0&&n.sparse===void 0){let i=ae[n.type],a=B[n.componentType],o=n.normalized===!0,c=new a(n.count*i);return Promise.resolve(new G(c,i,o))}let s=[];return n.bufferView!==void 0?s.push(this.getDependency("bufferView",n.bufferView)):s.push(null),n.sparse!==void 0&&(s.push(this.getDependency("bufferView",n.sparse.indices.bufferView)),s.push(this.getDependency("bufferView",n.sparse.values.bufferView))),Promise.all(s).then(function(i){let a=i[0],o=ae[n.type],c=B[n.componentType],l=c.BYTES_PER_ELEMENT,u=l*o,f=n.byteOffset||0,h=n.bufferView!==void 0?r.bufferViews[n.bufferView].byteStride:void 0,p=n.normalized===!0,T,m;if(h&&h!==u){let g=Math.floor(f/h),_="InterleavedBuffer:"+n.bufferView+":"+n.componentType+":"+g+":"+n.count,E=e.cache.get(_);E||(T=new c(a,g*h,n.count*h/l),E=new et(T,h/l),e.cache.add(_,E)),m=new tt(E,o,f%h/l,p)}else a===null?T=new c(n.count*o):T=new c(a,f,n.count*o),m=new G(T,o,p);if(n.sparse!==void 0){let g=ae.SCALAR,_=B[n.sparse.indices.componentType],E=n.sparse.indices.byteOffset||0,R=n.sparse.values.byteOffset||0,y=new _(i[1],E,n.sparse.count*g),b=new c(i[2],R,n.sparse.count*o);a!==null&&(m=new G(m.array.slice(),m.itemSize,m.normalized));for(let S=0,v=y.length;S<v;S++){let L=y[S];if(m.setX(L,b[S*o]),o>=2&&m.setY(L,b[S*o+1]),o>=3&&m.setZ(L,b[S*o+2]),o>=4&&m.setW(L,b[S*o+3]),o>=5)throw new Error("THREE.GLTFLoader: Unsupported itemSize in sparse BufferAttribute.")}}return m})}loadTexture(t){let e=this.json,r=this.options,s=e.textures[t].source,i=e.images[s],a=this.textureLoader;if(i.uri){let o=r.manager.getHandler(i.uri);o!==null&&(a=o)}return this.loadTextureImage(t,s,a)}loadTextureImage(t,e,r){let n=this,s=this.json,i=s.textures[t],a=s.images[e],o=(a.uri||a.bufferView)+":"+i.sampler;if(this.textureCache[o])return this.textureCache[o];let c=this.loadImageSource(e,r).then(function(l){l.flipY=!1,l.name=i.name||a.name||"",l.name===""&&typeof a.uri=="string"&&a.uri.startsWith("data:image/")===!1&&(l.name=a.uri);let f=(s.samplers||{})[i.sampler]||{};return l.magFilter=yt[f.magFilter]||q,l.minFilter=yt[f.minFilter]||W,l.wrapS=wt[f.wrapS]||j,l.wrapT=wt[f.wrapT]||j,n.associations.set(l,{textures:t}),l}).catch(function(){return null});return this.textureCache[o]=c,c}loadImageSource(t,e){let r=this,n=this.json,s=this.options;if(this.sourceCache[t]!==void 0)return this.sourceCache[t].then(u=>u.clone());let i=n.images[t],a=self.URL||self.webkitURL,o=i.uri||"",c=!1;if(i.bufferView!==void 0)o=r.getDependency("bufferView",i.bufferView).then(function(u){c=!0;let f=new Blob([u],{type:i.mimeType});return o=a.createObjectURL(f),o});else if(i.uri===void 0)throw new Error("THREE.GLTFLoader: Image "+t+" is missing URI and bufferView");let l=Promise.resolve(o).then(function(u){return new Promise(function(f,h){let p=f;e.isImageBitmapLoader===!0&&(p=function(T){let m=new J(T);m.needsUpdate=!0,f(m)}),e.load(H.resolveURL(u,s.path),p,void 0,h)})}).then(function(u){return c===!0&&a.revokeObjectURL(o),u.userData.mimeType=i.mimeType||kt(i.uri),u}).catch(function(u){throw console.error("THREE.GLTFLoader: Couldn't load texture",o),u});return this.sourceCache[t]=l,l}assignTexture(t,e,r,n){let s=this;return this.getDependency("texture",r.index).then(function(i){if(!i)return null;if(r.texCoord!==void 0&&r.texCoord>0&&(i=i.clone(),i.channel=r.texCoord),s.extensions[A.KHR_TEXTURE_TRANSFORM]){let a=r.extensions!==void 0?r.extensions[A.KHR_TEXTURE_TRANSFORM]:void 0;if(a){let o=s.associations.get(i);i=s.extensions[A.KHR_TEXTURE_TRANSFORM].extendTexture(i,a),s.associations.set(i,o)}}return n!==void 0&&(i.colorSpace=n),t[e]=i,i})}assignFinalMaterial(t){let e=t.geometry,r=t.material,n=e.attributes.tangent===void 0,s=e.attributes.color!==void 0,i=e.attributes.normal===void 0;if(t.isPoints){let a="PointsMaterial:"+r.uuid,o=this.cache.get(a);o||(o=new ft,K.prototype.copy.call(o,r),o.color.copy(r.color),o.map=r.map,o.sizeAttenuation=!1,this.cache.add(a,o)),r=o}else if(t.isLine){let a="LineBasicMaterial:"+r.uuid,o=this.cache.get(a);o||(o=new at,K.prototype.copy.call(o,r),o.color.copy(r.color),o.map=r.map,this.cache.add(a,o)),r=o}if(n||s||i){let a="ClonedMaterial:"+r.uuid+":";n&&(a+="derivative-tangents:"),s&&(a+="vertex-colors:"),i&&(a+="flat-shading:");let o=this.cache.get(a);o||(o=r.clone(),s&&(o.vertexColors=!0),i&&(o.flatShading=!0),n&&(o.normalScale&&(o.normalScale.y*=-1),o.clearcoatNormalScale&&(o.clearcoatNormalScale.y*=-1)),this.cache.add(a,o),this.associations.set(o,this.associations.get(r))),r=o}t.material=r}getMaterialType(){return te}loadMaterial(t){let e=this,r=this.json,n=this.extensions,s=r.materials[t],i,a={},o=s.extensions||{},c=[];if(o[A.KHR_MATERIALS_UNLIT]){let u=n[A.KHR_MATERIALS_UNLIT];i=u.getMaterialType(),c.push(u.extendParams(a,s,e))}else{let u=s.pbrMetallicRoughness||{};if(a.color=new M(1,1,1),a.opacity=1,Array.isArray(u.baseColorFactor)){let f=u.baseColorFactor;a.color.setRGB(f[0],f[1],f[2],w),a.opacity=f[3]}u.baseColorTexture!==void 0&&c.push(e.assignTexture(a,"map",u.baseColorTexture,P)),a.metalness=u.metallicFactor!==void 0?u.metallicFactor:1,a.roughness=u.roughnessFactor!==void 0?u.roughnessFactor:1,u.metallicRoughnessTexture!==void 0&&(c.push(e.assignTexture(a,"metalnessMap",u.metallicRoughnessTexture)),c.push(e.assignTexture(a,"roughnessMap",u.metallicRoughnessTexture))),i=this._invokeOne(function(f){return f.getMaterialType&&f.getMaterialType(t)}),c.push(Promise.all(this._invokeAll(function(f){return f.extendMaterialParams&&f.extendMaterialParams(t,a)})))}s.doubleSided===!0&&(a.side=Be);let l=s.alphaMode||ce.OPAQUE;if(l===ce.BLEND?(a.transparent=!0,a.depthWrite=!1):(a.transparent=!1,l===ce.MASK&&(a.alphaTest=s.alphaCutoff!==void 0?s.alphaCutoff:.5)),s.normalTexture!==void 0&&i!==k&&(c.push(e.assignTexture(a,"normalMap",s.normalTexture)),a.normalScale=new Q(1,1),s.normalTexture.scale!==void 0)){let u=s.normalTexture.scale;a.normalScale.set(u,u)}if(s.occlusionTexture!==void 0&&i!==k&&(c.push(e.assignTexture(a,"aoMap",s.occlusionTexture)),s.occlusionTexture.strength!==void 0&&(a.aoMapIntensity=s.occlusionTexture.strength)),s.emissiveFactor!==void 0&&i!==k){let u=s.emissiveFactor;a.emissive=new M().setRGB(u[0],u[1],u[2],w)}return s.emissiveTexture!==void 0&&i!==k&&c.push(e.assignTexture(a,"emissiveMap",s.emissiveTexture,P)),Promise.all(c).then(function(){let u=new i(a);return s.name&&(u.name=s.name),O(u,s),e.associations.set(u,{materials:t}),s.extensions&&D(n,u,s),u})}createUniqueName(t){let e=Et.sanitizeNodeName(t||"");return e in this.nodeNamesUsed?e+"_"+ ++this.nodeNamesUsed[e]:(this.nodeNamesUsed[e]=0,e)}loadGeometries(t){let e=this,r=this.extensions,n=this.primitiveCache;function s(a){return r[A.KHR_DRACO_MESH_COMPRESSION].decodePrimitive(a,e).then(function(o){return Nt(o,a,e)})}let i=[];for(let a=0,o=t.length;a<o;a++){let c=t[a],l=Pt(c),u=n[l];if(u)i.push(u.promise);else{let f;c.extensions&&c.extensions[A.KHR_DRACO_MESH_COMPRESSION]?f=s(c):f=Nt(new Qe,c,e),n[l]={primitive:c,promise:f},i.push(f)}}return Promise.all(i)}loadMesh(t){let e=this,r=this.json,n=this.extensions,s=r.meshes[t],i=s.primitives,a=[];for(let o=0,c=i.length;o<c;o++){let l=i[o].material===void 0?Ot(this.cache):this.getDependency("material",i[o].material);a.push(l)}return a.push(e.loadGeometries(i)),Promise.all(a).then(function(o){let c=o.slice(0,o.length-1),l=o[o.length-1],u=[];for(let h=0,p=l.length;h<p;h++){let T=l[h],m=i[h],g,_=c[h];if(m.mode===x.TRIANGLES||m.mode===x.TRIANGLE_STRIP||m.mode===x.TRIANGLE_FAN||m.mode===void 0)g=s.isSkinnedMesh===!0?new nt(T,_):new Ze(T,_),g.isSkinnedMesh===!0&&g.normalizeSkinWeights(),m.mode===x.TRIANGLE_STRIP?g.geometry=oe(g.geometry,Xe):m.mode===x.TRIANGLE_FAN&&(g.geometry=oe(g.geometry,ze));else if(m.mode===x.LINES)g=new ut(T,_);else if(m.mode===x.LINE_STRIP)g=new ct(T,_);else if(m.mode===x.LINE_LOOP)g=new lt(T,_);else if(m.mode===x.POINTS)g=new dt(T,_);else throw new Error("THREE.GLTFLoader: Primitive mode unsupported: "+m.mode);Object.keys(g.geometry.morphAttributes).length>0&&Dt(g,s),g.name=e.createUniqueName(s.name||"mesh_"+t),O(g,s),m.extensions&&D(n,g,m),e.assignFinalMaterial(g),u.push(g)}for(let h=0,p=u.length;h<p;h++)e.associations.set(u[h],{meshes:t,primitives:h});if(u.length===1)return s.extensions&&D(n,u[0],s),u[0];let f=new V;s.extensions&&D(n,f,s),e.associations.set(f,{meshes:t});for(let h=0,p=u.length;h<p;h++)f.add(u[h]);return f})}loadCamera(t){let e,r=this.json.cameras[t],n=r[r.type];if(!n){console.warn("THREE.GLTFLoader: Missing camera parameters.");return}return r.type==="perspective"?e=new Je(qe.radToDeg(n.yfov),n.aspectRatio||1,n.znear||1,n.zfar||2e6):r.type==="orthographic"&&(e=new $e(-n.xmag,n.xmag,n.ymag,-n.ymag,n.znear,n.zfar)),r.name&&(e.name=this.createUniqueName(r.name)),O(e,r),Promise.resolve(e)}loadSkin(t){let e=this.json.skins[t],r=[];for(let n=0,s=e.joints.length;n<s;n++)r.push(this._loadNodeShallow(e.joints[n]));return e.inverseBindMatrices!==void 0?r.push(this.getDependency("accessor",e.inverseBindMatrices)):r.push(null),Promise.all(r).then(function(n){let s=n.pop(),i=n,a=[],o=[];for(let c=0,l=i.length;c<l;c++){let u=i[c];if(u){a.push(u);let f=new F;s!==null&&f.fromArray(s.array,c*16),o.push(f)}else console.warn('THREE.GLTFLoader: Joint "%s" could not be found.',e.joints[c])}return new rt(a,o)})}loadAnimation(t){let e=this.json,r=this,n=e.animations[t],s=n.name?n.name:"animation_"+t,i=[],a=[],o=[],c=[],l=[];for(let u=0,f=n.channels.length;u<f;u++){let h=n.channels[u],p=n.samplers[h.sampler],T=h.target,m=T.node,g=n.parameters!==void 0?n.parameters[p.input]:p.input,_=n.parameters!==void 0?n.parameters[p.output]:p.output;T.node!==void 0&&(i.push(this.getDependency("node",m)),a.push(this.getDependency("accessor",g)),o.push(this.getDependency("accessor",_)),c.push(p),l.push(T))}return Promise.all([Promise.all(i),Promise.all(a),Promise.all(o),Promise.all(c),Promise.all(l)]).then(function(u){let f=u[0],h=u[1],p=u[2],T=u[3],m=u[4],g=[];for(let _=0,E=f.length;_<E;_++){let R=f[_],y=h[_],b=p[_],S=T[_],v=m[_];if(R===void 0)continue;R.updateMatrix&&R.updateMatrix();let L=r._createAnimationTracks(R,y,b,S,v);if(L)for(let z=0;z<L.length;z++)g.push(L[z])}return new pt(s,void 0,g)})}createNodeMesh(t){let e=this.json,r=this,n=e.nodes[t];return n.mesh===void 0?null:r.getDependency("mesh",n.mesh).then(function(s){let i=r._getNodeRef(r.meshCache,n.mesh,s);return n.weights!==void 0&&i.traverse(function(a){if(a.isMesh)for(let o=0,c=n.weights.length;o<c;o++)a.morphTargetInfluences[o]=n.weights[o]}),i})}loadNode(t){let e=this.json,r=this,n=e.nodes[t],s=r._loadNodeShallow(t),i=[],a=n.children||[];for(let c=0,l=a.length;c<l;c++)i.push(r.getDependency("node",a[c]));let o=n.skin===void 0?Promise.resolve(null):r.getDependency("skin",n.skin);return Promise.all([s,Promise.all(i),o]).then(function(c){let l=c[0],u=c[1],f=c[2];f!==null&&l.traverse(function(h){h.isSkinnedMesh&&h.bind(f,Ht)});for(let h=0,p=u.length;h<p;h++)l.add(u[h]);return l})}_loadNodeShallow(t){let e=this.json,r=this.extensions,n=this;if(this.nodeCache[t]!==void 0)return this.nodeCache[t];let s=e.nodes[t],i=s.name?n.createUniqueName(s.name):"",a=[],o=n._invokeOne(function(c){return c.createNodeMesh&&c.createNodeMesh(t)});return o&&a.push(o),s.camera!==void 0&&a.push(n.getDependency("camera",s.camera).then(function(c){return n._getNodeRef(n.cameraCache,s.camera,c)})),n._invokeAll(function(c){return c.createNodeAttachment&&c.createNodeAttachment(t)}).forEach(function(c){a.push(c)}),this.nodeCache[t]=Promise.all(a).then(function(c){let l;if(s.isBone===!0?l=new st:c.length>1?l=new V:c.length===1?l=c[0]:l=new ee,l!==c[0])for(let u=0,f=c.length;u<f;u++)l.add(c[u]);if(s.name&&(l.userData.name=s.name,l.name=i),O(l,s),s.extensions&&D(r,l,s),s.matrix!==void 0){let u=new F;u.fromArray(s.matrix),l.applyMatrix4(u)}else s.translation!==void 0&&l.position.fromArray(s.translation),s.rotation!==void 0&&l.quaternion.fromArray(s.rotation),s.scale!==void 0&&l.scale.fromArray(s.scale);return n.associations.has(l)||n.associations.set(l,{}),n.associations.get(l).nodes=t,l}),this.nodeCache[t]}loadScene(t){let e=this.extensions,r=this.json.scenes[t],n=this,s=new V;r.name&&(s.name=n.createUniqueName(r.name)),O(s,r),r.extensions&&D(e,s,r);let i=r.nodes||[],a=[];for(let o=0,c=i.length;o<c;o++)a.push(n.getDependency("node",i[o]));return Promise.all(a).then(function(o){for(let l=0,u=o.length;l<u;l++)s.add(o[l]);let c=l=>{let u=new Map;for(let[f,h]of n.associations)(f instanceof K||f instanceof J)&&u.set(f,h);return l.traverse(f=>{let h=n.associations.get(f);h!=null&&u.set(f,h)}),u};return n.associations=c(s),s})}_createAnimationTracks(t,e,r,n,s){let i=[],a=t.name?t.name:t.uuid,o=[];I[s.path]===I.weights?t.traverse(function(f){f.morphTargetInfluences&&o.push(f.name?f.name:f.uuid)}):o.push(a);let c;switch(I[s.path]){case I.weights:c=ne;break;case I.rotation:c=se;break;case I.position:case I.scale:c=re;break;default:switch(r.itemSize){case 1:c=ne;break;case 2:case 3:default:c=re;break}break}let l=n.interpolation!==void 0?It[n.interpolation]:Y,u=this._getArrayFromAccessor(r);for(let f=0,h=o.length;f<h;f++){let p=new c(o[f]+"."+I[s.path],e.array,u,l);n.interpolation==="CUBICSPLINE"&&this._createCubicSplineTrackInterpolant(p),i.push(p)}return i}_getArrayFromAccessor(t){let e=t.array;if(t.normalized){let r=De(e.constructor),n=new Float32Array(e.length);for(let s=0,i=e.length;s<i;s++)n[s]=e[s]*r;e=n}return e}_createCubicSplineTrackInterpolant(t){t.createInterpolant=function(r){let n=this instanceof se?Oe:X;return new n(this.times,this.values,this.getValueSize()/3,r)},t.createInterpolant.isInterpolantFactoryMethodGLTFCubicSpline=!0}};function Bt(d,t,e){let r=t.attributes,n=new We;if(r.POSITION!==void 0){let a=e.json.accessors[r.POSITION],o=a.min,c=a.max;if(o!==void 0&&c!==void 0){if(n.set(new C(o[0],o[1],o[2]),new C(c[0],c[1],c[2])),a.normalized){let l=De(B[a.componentType]);n.min.multiplyScalar(l),n.max.multiplyScalar(l)}}else{console.warn("THREE.GLTFLoader: Missing min/max properties for accessor POSITION.");return}}else return;let s=t.targets;if(s!==void 0){let a=new C,o=new C;for(let c=0,l=s.length;c<l;c++){let u=s[c];if(u.POSITION!==void 0){let f=e.json.accessors[u.POSITION],h=f.min,p=f.max;if(h!==void 0&&p!==void 0){if(o.setX(Math.max(Math.abs(h[0]),Math.abs(p[0]))),o.setY(Math.max(Math.abs(h[1]),Math.abs(p[1]))),o.setZ(Math.max(Math.abs(h[2]),Math.abs(p[2]))),f.normalized){let T=De(B[f.componentType]);o.multiplyScalar(T)}a.max(o)}else console.warn("THREE.GLTFLoader: Missing min/max properties for accessor POSITION.")}}n.expandByVector(a)}d.boundingBox=n;let i=new Ye;n.getCenter(i.center),i.radius=n.min.distanceTo(n.max)/2,d.boundingSphere=i}function Nt(d,t,e){let r=t.attributes,n=[];function s(i,a){return e.getDependency("accessor",i).then(function(o){d.setAttribute(a,o)})}for(let i in r){let a=Ce[i]||i.toLowerCase();a in d.attributes||n.push(s(r[i],a))}if(t.indices!==void 0&&!d.index){let i=e.getDependency("accessor",t.indices).then(function(a){d.setIndex(a)});n.push(i)}return Z.workingColorSpace!==w&&"COLOR_0"in r&&console.warn('THREE.GLTFLoader: Converting vertex colors from "srgb-linear" to "'.concat(Z.workingColorSpace,'" not supported.')),O(d,t),Bt(d,t,e),Promise.all(n).then(function(){return t.targets!==void 0?Ct(d,t.targets,e):d})}export{xt as GLTFLoader};
@@ -0,0 +1 @@
1
+ import{a as vn}from"./chunk-OSMCRNNF.js";import"./chunk-H2E2454S.js";vn();var hn={},Kn=function(n,r,t,e,i){var a=new Worker(hn[r]||(hn[r]=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(o){var f=o.data,u=f.$e$;if(u){var s=new Error(u[0]);s.code=u[1],s.stack=u[2],i(s,null)}else i(null,f)},a.postMessage(t,e),a},T=Uint8Array,$=Uint16Array,pr=Uint32Array,gr=new T([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]),yr=new T([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]),Tr=new T([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),mn=function(n,r){for(var t=new $(31),e=0;e<31;++e)t[e]=r+=1<<n[e-1];for(var i=new pr(t[30]),e=1;e<30;++e)for(var a=t[e];a<t[e+1];++a)i[a]=a-t[e]<<5|e;return[t,i]},xn=mn(gr,2),Xr=xn[0],Gr=xn[1];Xr[28]=258,Gr[258]=28;var zn=mn(yr,0),An=zn[0],Hr=zn[1],Ur=new $(32768);for(C=0;C<32768;++C)nr=(C&43690)>>>1|(C&21845)<<1,nr=(nr&52428)>>>2|(nr&13107)<<2,nr=(nr&61680)>>>4|(nr&3855)<<4,Ur[C]=((nr&65280)>>>8|(nr&255)<<8)>>>1;var nr,C,V=function(n,r,t){for(var e=n.length,i=0,a=new $(r);i<e;++i)n[i]&&++a[n[i]-1];var o=new $(r);for(i=0;i<r;++i)o[i]=o[i-1]+a[i-1]<<1;var f;if(t){f=new $(1<<r);var u=15-r;for(i=0;i<e;++i)if(n[i])for(var s=i<<4|n[i],v=r-n[i],h=o[n[i]-1]++<<v,g=h|(1<<v)-1;h<=g;++h)f[Ur[h]>>>u]=s}else for(f=new $(e),i=0;i<e;++i)n[i]&&(f[i]=Ur[o[n[i]-1]++]>>>15-n[i]);return f},er=new T(288);for(C=0;C<144;++C)er[C]=8;var C;for(C=144;C<256;++C)er[C]=9;var C;for(C=256;C<280;++C)er[C]=7;var C;for(C=280;C<288;++C)er[C]=8;var C,lr=new T(32);for(C=0;C<32;++C)lr[C]=5;var C,Mn=V(er,9,0),Tn=V(er,9,1),Un=V(lr,5,0),Dn=V(lr,5,1),Br=function(n){for(var r=n[0],t=1;t<n.length;++t)n[t]>r&&(r=n[t]);return r},Q=function(n,r,t){var e=r/8|0;return(n[e]|n[e+1]<<8)>>(r&7)&t},Zr=function(n,r){var t=r/8|0;return(n[t]|n[t+1]<<8|n[t+2]<<16)>>(r&7)},Dr=function(n){return(n+7)/8|0},X=function(n,r,t){(r==null||r<0)&&(r=0),(t==null||t>n.length)&&(t=n.length);var e=new(n.BYTES_PER_ELEMENT==2?$:n.BYTES_PER_ELEMENT==4?pr:T)(t-r);return e.set(n.subarray(r,t)),e},it={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},Sn=["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"],p=function(n,r,t){var e=new Error(r||Sn[n]);if(e.code=n,Error.captureStackTrace&&Error.captureStackTrace(e,p),!t)throw e;return e},Sr=function(n,r,t){var e=n.length;if(!e||t&&t.f&&!t.l)return r||new T(0);var i=!r||t,a=!t||t.i;t||(t={}),r||(r=new T(e*3));var o=function(Fr){var Mr=r.length;if(Fr>Mr){var ur=new T(Math.max(Mr*2,Fr));ur.set(r),r=ur}},f=t.f||0,u=t.p||0,s=t.b||0,v=t.l,h=t.d,g=t.m,x=t.n,m=e*8;do{if(!v){f=Q(n,u,1);var z=Q(n,u+1,3);if(u+=3,z)if(z==1)v=Tn,h=Dn,g=9,x=5;else if(z==2){var A=Q(n,u,31)+257,w=Q(n,u+10,15)+4,I=A+Q(n,u+5,31)+1;u+=14;for(var S=new T(I),U=new T(19),l=0;l<w;++l)U[Tr[l]]=Q(n,u+l*3,7);u+=w*3;for(var k=Br(U),D=(1<<k)-1,N=V(U,k,1),l=0;l<I;){var B=N[Q(n,u,D)];u+=B&15;var c=B>>>4;if(c<16)S[l++]=c;else{var G=0,E=0;for(c==16?(E=3+Q(n,u,3),u+=2,G=S[l-1]):c==17?(E=3+Q(n,u,7),u+=3):c==18&&(E=11+Q(n,u,127),u+=7);E--;)S[l++]=G}}var L=S.subarray(0,A),Z=S.subarray(A);g=Br(L),x=Br(Z),v=V(L,g,1),h=V(Z,x,1)}else p(1);else{var c=Dr(u)+4,y=n[c-4]|n[c-3]<<8,M=c+y;if(M>e){a&&p(0);break}i&&o(s+y),r.set(n.subarray(c,M),s),t.b=s+=y,t.p=u=M*8,t.f=f;continue}if(u>m){a&&p(0);break}}i&&o(s+131072);for(var O=(1<<g)-1,q=(1<<x)-1,W=u;;W=u){var G=v[Zr(n,u)&O],K=G>>>4;if(u+=G&15,u>m){a&&p(0);break}if(G||p(2),K<256)r[s++]=K;else if(K==256){W=u,v=null;break}else{var H=K-254;if(K>264){var l=K-257,b=gr[l];H=Q(n,u,(1<<b)-1)+Xr[l],u+=b}var _=h[Zr(n,u)&q],j=_>>>4;_||p(3),u+=_&15;var Z=An[j];if(j>3){var b=yr[j];Z+=Zr(n,u)&(1<<b)-1,u+=b}if(u>m){a&&p(0);break}i&&o(s+131072);for(var R=s+H;s<R;s+=4)r[s]=r[s-Z],r[s+1]=r[s+1-Z],r[s+2]=r[s+2-Z],r[s+3]=r[s+3-Z];s=R}}t.l=v,t.p=W,t.b=s,t.f=f,v&&(f=1,t.m=g,t.d=h,t.n=x)}while(!f);return s==r.length?r:X(r,0,s)},rr=function(n,r,t){t<<=r&7;var e=r/8|0;n[e]|=t,n[e+1]|=t>>>8},vr=function(n,r,t){t<<=r&7;var e=r/8|0;n[e]|=t,n[e+1]|=t>>>8,n[e+2]|=t>>>16},kr=function(n,r){for(var t=[],e=0;e<n.length;++e)n[e]&&t.push({s:e,f:n[e]});var i=t.length,a=t.slice();if(!i)return[tr,0];if(i==1){var o=new T(t[0].s+1);return o[t[0].s]=1,[o,1]}t.sort(function(I,S){return I.f-S.f}),t.push({s:-1,f:25001});var f=t[0],u=t[1],s=0,v=1,h=2;for(t[0]={s:-1,f:f.f+u.f,l:f,r:u};v!=i-1;)f=t[t[s].f<t[h].f?s++:h++],u=t[s!=v&&t[s].f<t[h].f?s++:h++],t[v++]={s:-1,f:f.f+u.f,l:f,r:u};for(var g=a[0].s,e=1;e<i;++e)a[e].s>g&&(g=a[e].s);var x=new $(g+1),m=Or(t[v-1],x,0);if(m>r){var e=0,z=0,c=m-r,y=1<<c;for(a.sort(function(S,U){return x[U.s]-x[S.s]||S.f-U.f});e<i;++e){var M=a[e].s;if(x[M]>r)z+=y-(1<<m-x[M]),x[M]=r;else break}for(z>>>=c;z>0;){var A=a[e].s;x[A]<r?z-=1<<r-x[A]++-1:++e}for(;e>=0&&z;--e){var w=a[e].s;x[w]==r&&(--x[w],++z)}m=r}return[new T(x),m]},Or=function(n,r,t){return n.s==-1?Math.max(Or(n.l,r,t+1),Or(n.r,r,t+1)):r[n.s]=t},Yr=function(n){for(var r=n.length;r&&!n[--r];);for(var t=new $(++r),e=0,i=n[0],a=1,o=function(u){t[e++]=u},f=1;f<=r;++f)if(n[f]==i&&f!=r)++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[f]}return[t.subarray(0,e),r]},hr=function(n,r){for(var t=0,e=0;e<r.length;++e)t+=n[e]*r[e];return t},Lr=function(n,r,t){var e=t.length,i=Dr(r+2);n[i]=e&255,n[i+1]=e>>>8,n[i+2]=n[i]^255,n[i+3]=n[i+1]^255;for(var a=0;a<e;++a)n[i+a+4]=t[a];return(i+4+e)*8},Wr=function(n,r,t,e,i,a,o,f,u,s,v){rr(r,v++,t),++i[256];for(var h=kr(i,15),g=h[0],x=h[1],m=kr(a,15),z=m[0],c=m[1],y=Yr(g),M=y[0],A=y[1],w=Yr(z),I=w[0],S=w[1],U=new $(19),l=0;l<M.length;++l)U[M[l]&31]++;for(var l=0;l<I.length;++l)U[I[l]&31]++;for(var k=kr(U,7),D=k[0],N=k[1],B=19;B>4&&!D[Tr[B-1]];--B);var G=s+5<<3,E=hr(i,er)+hr(a,lr)+o,L=hr(i,g)+hr(a,z)+o+14+3*B+hr(U,D)+(2*U[16]+3*U[17]+7*U[18]);if(G<=E&&G<=L)return Lr(r,v,n.subarray(u,u+s));var Z,O,q,W;if(rr(r,v,1+(L<E)),v+=2,L<E){Z=V(g,x,0),O=g,q=V(z,c,0),W=z;var K=V(D,N,0);rr(r,v,A-257),rr(r,v+5,S-1),rr(r,v+10,B-4),v+=14;for(var l=0;l<B;++l)rr(r,v+3*l,D[Tr[l]]);v+=3*B;for(var H=[M,I],b=0;b<2;++b)for(var _=H[b],l=0;l<_.length;++l){var j=_[l]&31;rr(r,v,K[j]),v+=D[j],j>15&&(rr(r,v,_[l]>>>5&127),v+=_[l]>>>12)}}else Z=Mn,O=er,q=Un,W=lr;for(var l=0;l<f;++l)if(e[l]>255){var j=e[l]>>>18&31;vr(r,v,Z[j+257]),v+=O[j+257],j>7&&(rr(r,v,e[l]>>>23&31),v+=gr[j]);var R=e[l]&31;vr(r,v,q[R]),v+=W[R],R>3&&(vr(r,v,e[l]>>>5&8191),v+=yr[R])}else vr(r,v,Z[e[l]]),v+=O[e[l]];return vr(r,v,Z[256]),v+O[256]},Cn=new pr([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),tr=new T(0),En=function(n,r,t,e,i,a){var o=n.length,f=new T(e+o+5*(1+Math.ceil(o/7e3))+i),u=f.subarray(e,f.length-i),s=0;if(!r||o<8)for(var v=0;v<=o;v+=65535){var h=v+65535;h>=o&&(u[s>>3]=a),s=Lr(u,s+1,n.subarray(v,h))}else{for(var g=Cn[r-1],x=g>>>13,m=g&8191,z=(1<<t)-1,c=new $(32768),y=new $(z+1),M=Math.ceil(t/3),A=2*M,w=function($r){return(n[$r]^n[$r+1]<<M^n[$r+2]<<A)&z},I=new pr(25e3),S=new $(288),U=new $(32),l=0,k=0,v=0,D=0,N=0,B=0;v<o;++v){var G=w(v),E=v&32767,L=y[G];if(c[E]=L,y[G]=E,N<=v){var Z=o-v;if((l>7e3||D>24576)&&Z>423){s=Wr(n,u,0,I,S,U,k,D,B,v-B,s),D=l=k=0,B=v;for(var O=0;O<286;++O)S[O]=0;for(var O=0;O<30;++O)U[O]=0}var q=2,W=0,K=m,H=E-L&32767;if(Z>2&&G==w(v-H))for(var b=Math.min(x,Z)-1,_=Math.min(32767,v),j=Math.min(258,Z);H<=_&&--K&&E!=L;){if(n[v+q]==n[v+q-H]){for(var R=0;R<j&&n[v+R]==n[v+R-H];++R);if(R>q){if(q=R,W=H,R>b)break;for(var Fr=Math.min(H,R-2),Mr=0,O=0;O<Fr;++O){var ur=v-H+O+32768&32767,Jn=c[ur],fn=ur-Jn+32768&32767;fn>Mr&&(Mr=fn,L=ur)}}}E=L,L=c[E],H+=E-L+32768&32767}if(W){I[D++]=268435456|Gr[q]<<18|Hr[W];var sn=Gr[q]&31,un=Hr[W]&31;k+=gr[sn]+yr[un],++S[257+sn],++U[un],N=v+q,++l}else I[D++]=n[v],++S[n[v]]}}s=Wr(n,u,a,I,S,U,k,D,B,v-B,s),!a&&s&7&&(s=Lr(u,s+1,tr))}return X(f,0,e+Dr(s)+i)},Fn=function(){for(var n=new Int32Array(256),r=0;r<256;++r){for(var t=r,e=9;--e;)t=(t&1&&-306674912)^t>>>1;n[r]=t}return n}(),wr=function(){var n=-1;return{p:function(r){for(var t=n,e=0;e<r.length;++e)t=Fn[t&255^r[e]]^t>>>8;n=t},d:function(){return~n}}},dr=function(){var n=1,r=0;return{p:function(t){for(var e=n,i=r,a=t.length|0,o=0;o!=a;){for(var f=Math.min(o+2655,a);o<f;++o)i+=e+=t[o];e=(e&65535)+15*(e>>16),i=(i&65535)+15*(i>>16)}n=e,r=i},d:function(){return n%=65521,r%=65521,(n&255)<<24|n>>>8<<16|(r&255)<<8|r>>>8}}},sr=function(n,r,t,e,i){return En(n,r.level==null?6:r.level,r.mem==null?Math.ceil(Math.max(8,Math.min(13,Math.log(n.length)))*1.5):12+r.mem,t,e,!i)},Cr=function(n,r){var t={};for(var e in n)t[e]=n[e];for(var e in r)t[e]=r[e];return t},ln=function(n,r,t){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 f=e[o],u=a[o];if(typeof f=="function"){r+=";"+u+"=";var s=f.toString();if(f.prototype)if(s.indexOf("[native code]")!=-1){var v=s.indexOf(" ",8)+1;r+=s.slice(v,s.indexOf("(",v))}else{r+=s;for(var h in f.prototype)r+=";"+u+".prototype."+h+"="+f.prototype[h].toString()}else r+=s}else t[u]=f}return[r,t]},Ir=[],Qn=function(n){var r=[];for(var t in n)n[t].buffer&&r.push((n[t]=new n[t].constructor(n[t])).buffer);return r},In=function(n,r,t,e){var i;if(!Ir[t]){for(var a="",o={},f=n.length-1,u=0;u<f;++u)i=ln(n[u],a,o),a=i[0],o=i[1];Ir[t]=ln(n[f],a,o)}var s=Cr({},Ir[t][1]);return Kn(Ir[t][0]+";onmessage=function(e){for(var k in e.data)self[k]=e.data[k];onmessage="+r.toString()+"}",t,s,Qn(s),e)},mr=function(){return[T,$,pr,gr,yr,Tr,Xr,An,Tn,Dn,Ur,Sn,V,Br,Q,Zr,Dr,X,p,Sr,Er,or,br]},xr=function(){return[T,$,pr,gr,yr,Tr,Gr,Hr,Mn,er,Un,lr,Ur,Cn,tr,V,rr,vr,kr,Or,Yr,hr,Lr,Wr,Dr,X,En,sr,Rr,or]},Bn=function(){return[_r,nn,F,wr,Fn]},Zn=function(){return[rn,On]},kn=function(){return[tn,F,dr]},Gn=function(){return[Ln]},or=function(n){return postMessage(n,[n.buffer])},br=function(n){return n&&n.size&&new T(n.size)},zr=function(n,r,t,e,i,a){var o=In(t,e,i,function(f,u){o.terminate(),a(f,u)});return o.postMessage([n,r],r.consume?[n.buffer]:[]),function(){o.terminate()}},d=function(n){return n.ondata=function(r,t){return postMessage([r,t],[r.buffer])},function(r){return n.push(r.data[0],r.data[1])}},Ar=function(n,r,t,e,i){var a,o=In(n,e,i,function(f,u){f?(o.terminate(),r.ondata.call(r,f)):(u[1]&&o.terminate(),r.ondata.call(r,f,u[0],u[1]))});o.postMessage(t),r.push=function(f,u){r.ondata||p(5),a&&r.ondata(p(4,0,1),null,!!u),o.postMessage([f,a=u],[f.buffer])},r.terminate=function(){o.terminate()}},Y=function(n,r){return n[r]|n[r+1]<<8},P=function(n,r){return(n[r]|n[r+1]<<8|n[r+2]<<16|n[r+3]<<24)>>>0},qr=function(n,r){return P(n,r)+P(n,r+4)*4294967296},F=function(n,r,t){for(;t;++r)n[r]=t,t>>>=8},_r=function(n,r){var t=r.filename;if(n[0]=31,n[1]=139,n[2]=8,n[8]=r.level<2?4:r.level==9?2:0,n[9]=3,r.mtime!=0&&F(n,4,Math.floor(new Date(r.mtime||Date.now())/1e3)),t){n[3]=8;for(var e=0;e<=t.length;++e)n[e+10]=t.charCodeAt(e)}},rn=function(n){(n[0]!=31||n[1]!=139||n[2]!=8)&&p(6,"invalid gzip data");var r=n[3],t=10;r&4&&(t+=n[10]|(n[11]<<8)+2);for(var e=(r>>3&1)+(r>>4&1);e>0;e-=!n[t++]);return t+(r&2)},On=function(n){var r=n.length;return(n[r-4]|n[r-3]<<8|n[r-2]<<16|n[r-1]<<24)>>>0},nn=function(n){return 10+(n.filename&&n.filename.length+1||0)},tn=function(n,r){var t=r.level,e=t==0?0:t<6?1:t==9?3:2;n[0]=120,n[1]=e<<6|(e?32-2*e:1)},Ln=function(n){((n[0]&15)!=8||n[0]>>>4>7||(n[0]<<8|n[1])%31)&&p(6,"invalid zlib data"),n[1]&32&&p(6,"invalid zlib data: preset dictionaries not supported")};function en(n,r){return!r&&typeof n=="function"&&(r=n,n={}),this.ondata=r,n}var ir=function(){function n(r,t){!t&&typeof r=="function"&&(t=r,r={}),this.ondata=t,this.o=r||{}}return n.prototype.p=function(r,t){this.ondata(sr(r,this.o,0,0,!t),t)},n.prototype.push=function(r,t){this.ondata||p(5),this.d&&p(4),this.d=t,this.p(r,t||!1)},n}();var Vn=function(){function n(r,t){Ar([xr,function(){return[d,ir]}],this,en.call(this,r,t),function(e){var i=new ir(e.data);onmessage=d(i)},6)}return n}();function Xn(n,r,t){return t||(t=r,r={}),typeof t!="function"&&p(7),zr(n,r,[xr],function(e){return or(Rr(e.data[0],e.data[1]))},0,t)}function Rr(n,r){return sr(n,r||{},0,0)}var J=function(){function n(r){this.s={},this.p=new T(0),this.ondata=r}return n.prototype.e=function(r){this.ondata||p(5),this.d&&p(4);var t=this.p.length,e=new T(t+r.length);e.set(this.p),e.set(r,t),this.p=e},n.prototype.c=function(r){this.d=this.s.i=r||!1;var t=this.s.b,e=Sr(this.p,this.o,this.s);this.ondata(X(e,t,this.s.b),this.d),this.o=X(e,this.s.b-32768),this.s.b=this.o.length,this.p=X(this.p,this.s.p/8|0),this.s.p&=7},n.prototype.push=function(r,t){this.e(r),this.c(t)},n}();var Pn=function(){function n(r){this.ondata=r,Ar([mr,function(){return[d,J]}],this,0,function(){var t=new J;onmessage=d(t)},7)}return n}();function Nn(n,r,t){return t||(t=r,r={}),typeof t!="function"&&p(7),zr(n,r,[mr],function(e){return or(Er(e.data[0],br(e.data[1])))},1,t)}function Er(n,r){return Sr(n,r)}var cn=function(){function n(r,t){this.c=wr(),this.l=0,this.v=1,ir.call(this,r,t)}return n.prototype.push=function(r,t){ir.prototype.push.call(this,r,t)},n.prototype.p=function(r,t){this.c.p(r),this.l+=r.length;var e=sr(r,this.o,this.v&&nn(this.o),t&&8,!t);this.v&&(_r(e,this.o),this.v=0),t&&(F(e,e.length-8,this.c.d()),F(e,e.length-4,this.l)),this.ondata(e,t)},n}();var at=function(){function n(r,t){Ar([xr,Bn,function(){return[d,ir,cn]}],this,en.call(this,r,t),function(e){var i=new cn(e.data);onmessage=d(i)},8)}return n}();function ot(n,r,t){return t||(t=r,r={}),typeof t!="function"&&p(7),zr(n,r,[xr,Bn,function(){return[pn]}],function(e){return or(pn(e.data[0],e.data[1]))},2,t)}function pn(n,r){r||(r={});var t=wr(),e=n.length;t.p(n);var i=sr(n,r,nn(r),8),a=i.length;return _r(i,r),F(i,a-8,t.d()),F(i,a-4,e),i}var jr=function(){function n(r){this.v=1,J.call(this,r)}return n.prototype.push=function(r,t){if(J.prototype.e.call(this,r),this.v){var e=this.p.length>3?rn(this.p):4;if(e>=this.p.length&&!t)return;this.p=this.p.subarray(e),this.v=0}t&&(this.p.length<8&&p(6,"invalid gzip data"),this.p=this.p.subarray(0,-8)),J.prototype.c.call(this,t)},n}();var dn=function(){function n(r){this.ondata=r,Ar([mr,Zn,function(){return[d,J,jr]}],this,0,function(){var t=new jr;onmessage=d(t)},9)}return n}();function bn(n,r,t){return t||(t=r,r={}),typeof t!="function"&&p(7),zr(n,r,[mr,Zn,function(){return[Jr]}],function(e){return or(Jr(e.data[0]))},3,t)}function Jr(n,r){return Sr(n.subarray(rn(n),-8),r||new T(On(n)))}var gn=function(){function n(r,t){this.c=dr(),this.v=1,ir.call(this,r,t)}return n.prototype.push=function(r,t){ir.prototype.push.call(this,r,t)},n.prototype.p=function(r,t){this.c.p(r);var e=sr(r,this.o,this.v&&2,t&&4,!t);this.v&&(tn(e,this.o),this.v=0),t&&F(e,e.length-4,this.c.d()),this.ondata(e,t)},n}();var ft=function(){function n(r,t){Ar([xr,kn,function(){return[d,ir,gn]}],this,en.call(this,r,t),function(e){var i=new gn(e.data);onmessage=d(i)},10)}return n}();function st(n,r,t){return t||(t=r,r={}),typeof t!="function"&&p(7),zr(n,r,[xr,kn,function(){return[yn]}],function(e){return or(yn(e.data[0],e.data[1]))},4,t)}function yn(n,r){r||(r={});var t=dr();t.p(n);var e=sr(n,r,2,4);return tn(e,r),F(e,e.length-4,t.d()),e}var Kr=function(){function n(r){this.v=1,J.call(this,r)}return n.prototype.push=function(r,t){if(J.prototype.e.call(this,r),this.v){if(this.p.length<2&&!t)return;this.p=this.p.subarray(2),this.v=0}t&&(this.p.length<4&&p(6,"invalid zlib data"),this.p=this.p.subarray(0,-4)),J.prototype.c.call(this,t)},n}();var _n=function(){function n(r){this.ondata=r,Ar([mr,Gn,function(){return[d,J,Kr]}],this,0,function(){var t=new Kr;onmessage=d(t)},11)}return n}();function rt(n,r,t){return t||(t=r,r={}),typeof t!="function"&&p(7),zr(n,r,[mr,Gn,function(){return[Qr]}],function(e){return or(Qr(e.data[0],br(e.data[1])))},5,t)}function Qr(n,r){return Sr((Ln(n),n.subarray(2,-4)),r)}var nt=function(){function n(r){this.G=jr,this.I=J,this.Z=Kr,this.ondata=r}return n.prototype.push=function(r,t){if(this.ondata||p(5),this.s)this.s.push(r,t);else{if(this.p&&this.p.length){var e=new T(this.p.length+r.length);e.set(this.p),e.set(r,this.p.length)}else this.p=r;if(this.p.length>2){var i=this,a=function(){i.ondata.apply(i,arguments)};this.s=this.p[0]==31&&this.p[1]==139&&this.p[2]==8?new this.G(a):(this.p[0]&15)!=8||this.p[0]>>4>7||(this.p[0]<<8|this.p[1])%31?new this.I(a):new this.Z(a),this.s.push(this.p,t),this.p=null}}},n}();var ut=function(){function n(r){this.G=dn,this.I=Pn,this.Z=_n,this.ondata=r}return n.prototype.push=function(r,t){nt.prototype.push.call(this,r,t)},n}();function vt(n,r,t){return t||(t=r,r={}),typeof t!="function"&&p(7),n[0]==31&&n[1]==139&&n[2]==8?bn(n,r,t):(n[0]&15)!=8||n[0]>>4>7||(n[0]<<8|n[1])%31?Nn(n,r,t):rt(n,r,t)}function ht(n,r){return n[0]==31&&n[1]==139&&n[2]==8?Jr(n,r):(n[0]&15)!=8||n[0]>>4>7||(n[0]<<8|n[1])%31?Er(n,r):Qr(n,r)}var an=function(n,r,t,e){for(var i in n){var a=n[i],o=r+i,f=e;Array.isArray(a)&&(f=Cr(e,a[1]),a=a[0]),a instanceof T?t[o]=[a,f]:(t[o+="/"]=[new T(0),f],an(a,o,t,e))}},wn=typeof TextEncoder<"u"&&new TextEncoder,Vr=typeof TextDecoder<"u"&&new TextDecoder,Rn=0;try{Vr.decode(tr,{stream:!0}),Rn=1}catch{}var $n=function(n){for(var r="",t=0;;){var e=n[t++],i=(e>127)+(e>223)+(e>239);if(t+i>n.length)return[r,X(n,t-1)];i?i==3?(e=((e&15)<<18|(n[t++]&63)<<12|(n[t++]&63)<<6|n[t++]&63)-65536,r+=String.fromCharCode(55296|e>>10,56320|e&1023)):i&1?r+=String.fromCharCode((e&31)<<6|n[t++]&63):r+=String.fromCharCode((e&15)<<12|(n[t++]&63)<<6|n[t++]&63):r+=String.fromCharCode(e)}},lt=function(){function n(r){this.ondata=r,Rn?this.t=new TextDecoder:this.p=tr}return n.prototype.push=function(r,t){if(this.ondata||p(5),t=!!t,this.t){this.ondata(this.t.decode(r,{stream:!0}),t),t&&(this.t.decode().length&&p(8),this.t=null);return}this.p||p(4);var e=new T(this.p.length+r.length);e.set(this.p),e.set(r,this.p.length);var i=$n(e),a=i[0],o=i[1];t?(o.length&&p(8),this.p=null):this.p=o,this.ondata(a,t)},n}();var ct=function(){function n(r){this.ondata=r}return n.prototype.push=function(r,t){this.ondata||p(5),this.d&&p(4),this.ondata(fr(r),this.d=t||!1)},n}();function fr(n,r){if(r){for(var t=new T(n.length),e=0;e<n.length;++e)t[e]=n.charCodeAt(e);return t}if(wn)return wn.encode(n);for(var i=n.length,a=new T(n.length+(n.length>>1)),o=0,f=function(v){a[o++]=v},e=0;e<i;++e){if(o+5>a.length){var u=new T(o+8+(i-e<<1));u.set(a),a=u}var s=n.charCodeAt(e);s<128||r?f(s):s<2048?(f(192|s>>6),f(128|s&63)):s>55295&&s<57344?(s=65536+(s&1047552)|n.charCodeAt(++e)&1023,f(240|s>>18),f(128|s>>12&63),f(128|s>>6&63),f(128|s&63)):(f(224|s>>12),f(128|s>>6&63),f(128|s&63))}return X(a,0,o)}function qn(n,r){if(r){for(var t="",e=0;e<n.length;e+=16384)t+=String.fromCharCode.apply(null,n.subarray(e,e+16384));return t}else{if(Vr)return Vr.decode(n);var i=$n(n),a=i[0],o=i[1];return o.length&&p(8),a}}var Hn=function(n){return n==1?3:n<6?2:n==9?1:0},Yn=function(n,r){return r+30+Y(n,r+26)+Y(n,r+28)},Wn=function(n,r,t){var e=Y(n,r+28),i=qn(n.subarray(r+46,r+46+e),!(Y(n,r+8)&2048)),a=r+46+e,o=P(n,r+20),f=t&&o==4294967295?jn(n,a):[o,P(n,r+24),P(n,r+42)],u=f[0],s=f[1],v=f[2];return[Y(n,r+10),u,s,i,a+Y(n,r+30)+Y(n,r+32),v]},jn=function(n,r){for(;Y(n,r)!=1;r+=4+Y(n,r+2));return[qr(n,r+12),qr(n,r+4),qr(n,r+20)]},ar=function(n){var r=0;if(n)for(var t in n){var e=n[t].length;e>65535&&p(9),r+=e+4}return r},cr=function(n,r,t,e,i,a,o,f){var u=e.length,s=t.extra,v=f&&f.length,h=ar(s);F(n,r,o!=null?33639248:67324752),r+=4,o!=null&&(n[r++]=20,n[r++]=t.os),n[r]=20,r+=2,n[r++]=t.flag<<1|(a<0&&8),n[r++]=i&&8,n[r++]=t.compression&255,n[r++]=t.compression>>8;var g=new Date(t.mtime==null?Date.now():t.mtime),x=g.getFullYear()-1980;if((x<0||x>119)&&p(10),F(n,r,x<<25|g.getMonth()+1<<21|g.getDate()<<16|g.getHours()<<11|g.getMinutes()<<5|g.getSeconds()>>>1),r+=4,a!=-1&&(F(n,r,t.crc),F(n,r+4,a<0?-a-2:a),F(n,r+8,t.size)),F(n,r+12,u),F(n,r+14,h),r+=16,o!=null&&(F(n,r,v),F(n,r+6,t.attrs),F(n,r+10,o),r+=14),n.set(e,r),r+=u,h)for(var m in s){var z=s[m],c=z.length;F(n,r,+m),F(n,r+2,c),n.set(z,r+4),r+=4+c}return v&&(n.set(f,r),r+=v),r},on=function(n,r,t,e,i){F(n,r,101010256),F(n,r+8,t),F(n,r+10,t),F(n,r+12,e),F(n,r+16,i)},Pr=function(){function n(r){this.filename=r,this.c=wr(),this.size=0,this.compression=0}return n.prototype.process=function(r,t){this.ondata(null,r,t)},n.prototype.push=function(r,t){this.ondata||p(5),this.c.p(r),this.size+=r.length,t&&(this.crc=this.c.d()),this.process(r,t||!1)},n}();var pt=function(){function n(r,t){var e=this;t||(t={}),Pr.call(this,r),this.d=new ir(t,function(i,a){e.ondata(null,i,a)}),this.compression=8,this.flag=Hn(t.level)}return n.prototype.process=function(r,t){try{this.d.push(r,t)}catch(e){this.ondata(e,null,t)}},n.prototype.push=function(r,t){Pr.prototype.push.call(this,r,t)},n}();var gt=function(){function n(r,t){var e=this;t||(t={}),Pr.call(this,r),this.d=new Vn(t,function(i,a,o){e.ondata(i,a,o)}),this.compression=8,this.flag=Hn(t.level),this.terminate=this.d.terminate}return n.prototype.process=function(r,t){this.d.push(r,t)},n.prototype.push=function(r,t){Pr.prototype.push.call(this,r,t)},n}();var yt=function(){function n(r){this.ondata=r,this.u=[],this.d=1}return n.prototype.add=function(r){var t=this;if(this.ondata||p(5),this.d&2)this.ondata(p(4+(this.d&1)*8,0,1),null,!1);else{var e=fr(r.filename),i=e.length,a=r.comment,o=a&&fr(a),f=i!=r.filename.length||o&&a.length!=o.length,u=i+ar(r.extra)+30;i>65535&&this.ondata(p(11,0,1),null,!1);var s=new T(u);cr(s,0,r,e,f,-1);var v=[s],h=function(){for(var c=0,y=v;c<y.length;c++){var M=y[c];t.ondata(null,M,!1)}v=[]},g=this.d;this.d=0;var x=this.u.length,m=Cr(r,{f:e,u:f,o,t:function(){r.terminate&&r.terminate()},r:function(){if(h(),g){var c=t.u[x+1];c?c.r():t.d=1}g=1}}),z=0;r.ondata=function(c,y,M){if(c)t.ondata(c,y,M),t.terminate();else if(z+=y.length,v.push(y),M){var A=new T(16);F(A,0,134695760),F(A,4,r.crc),F(A,8,z),F(A,12,r.size),v.push(A),m.c=z,m.b=u+z+16,m.crc=r.crc,m.size=r.size,g&&m.r(),g=1}else g&&h()},this.u.push(m)}},n.prototype.end=function(){var r=this;if(this.d&2){this.ondata(p(4+(this.d&1)*8,0,1),null,!0);return}this.d?this.e():this.u.push({r:function(){r.d&1&&(r.u.splice(-1,1),r.e())},t:function(){}}),this.d=3},n.prototype.e=function(){for(var r=0,t=0,e=0,i=0,a=this.u;i<a.length;i++){var o=a[i];e+=46+o.f.length+ar(o.extra)+(o.o?o.o.length:0)}for(var f=new T(e+22),u=0,s=this.u;u<s.length;u++){var o=s[u];cr(f,r,o,o.f,o.u,-o.c-2,t,o.o),r+=46+o.f.length+ar(o.extra)+(o.o?o.o.length:0),t+=o.b}on(f,r,this.u.length,e,t),this.ondata(null,f,!0),this.d=2},n.prototype.terminate=function(){for(var r=0,t=this.u;r<t.length;r++){var e=t[r];e.t()}this.d=2},n}();function wt(n,r,t){t||(t=r,r={}),typeof t!="function"&&p(7);var e={};an(n,"",e,r);var i=Object.keys(e),a=i.length,o=0,f=0,u=a,s=new Array(a),v=[],h=function(){for(var c=0;c<v.length;++c)v[c]()},g=function(c,y){Nr(function(){t(c,y)})};Nr(function(){g=t});var x=function(){var c=new T(f+22),y=o,M=f-o;f=0;for(var A=0;A<u;++A){var w=s[A];try{var I=w.c.length;cr(c,f,w,w.f,w.u,I);var S=30+w.f.length+ar(w.extra),U=f+S;c.set(w.c,U),cr(c,o,w,w.f,w.u,I,f,w.m),o+=16+S+(w.m?w.m.length:0),f=U+I}catch(l){return g(l,null)}}on(c,o,s.length,M,y),g(null,c)};a||x();for(var m=function(c){var y=i[c],M=e[y],A=M[0],w=M[1],I=wr(),S=A.length;I.p(A);var U=fr(y),l=U.length,k=w.comment,D=k&&fr(k),N=D&&D.length,B=ar(w.extra),G=w.level==0?0:8,E=function(L,Z){if(L)h(),g(L,null);else{var O=Z.length;s[c]=Cr(w,{size:S,crc:I.d(),c:Z,f:U,m:D,u:l!=y.length||D&&k.length!=N,compression:G}),o+=30+l+B+O,f+=76+2*(l+B)+(N||0)+O,--a||x()}};if(l>65535&&E(p(11,0,1),null),!G)E(null,A);else if(S<16e4)try{E(null,Rr(A,w))}catch(L){E(L,null)}else v.push(Xn(A,w,E))},z=0;z<u;++z)m(z);return h}function mt(n,r){r||(r={});var t={},e=[];an(n,"",t,r);var i=0,a=0;for(var o in t){var f=t[o],u=f[0],s=f[1],v=s.level==0?0:8,h=fr(o),g=h.length,x=s.comment,m=x&&fr(x),z=m&&m.length,c=ar(s.extra);g>65535&&p(11);var y=v?Rr(u,s):u,M=y.length,A=wr();A.p(u),e.push(Cr(s,{size:u.length,crc:A.d(),c:y,f:h,m,u:g!=o.length||m&&x.length!=z,o:i,compression:v})),i+=30+g+c+M,a+=76+2*(g+c)+(z||0)+M}for(var w=new T(a+22),I=i,S=a-i,U=0;U<e.length;++U){var h=e[U];cr(w,h.o,h,h.f,h.u,h.c.length);var l=30+h.f.length+ar(h.extra);w.set(h.c,h.o+l),cr(w,i,h,h.f,h.u,h.c.length,h.o,h.m),i+=16+l+(h.m?h.m.length:0)}return on(w,i,e.length,S,I),w}var tt=function(){function n(){}return n.prototype.push=function(r,t){this.ondata(null,r,t)},n.compression=0,n}();var xt=function(){function n(){var r=this;this.i=new J(function(t,e){r.ondata(null,t,e)})}return n.prototype.push=function(r,t){try{this.i.push(r,t)}catch(e){this.ondata(e,null,t)}},n.compression=8,n}();var zt=function(){function n(r,t){var e=this;t<32e4?this.i=new J(function(i,a){e.ondata(null,i,a)}):(this.i=new Pn(function(i,a,o){e.ondata(i,a,o)}),this.terminate=this.i.terminate)}return n.prototype.push=function(r,t){this.i.terminate&&(r=X(r,0)),this.i.push(r,t)},n.compression=8,n}();var At=function(){function n(r){this.onfile=r,this.k=[],this.o={0:tt},this.p=tr}return n.prototype.push=function(r,t){var e=this;if(this.onfile||p(5),this.p||p(4),this.c>0){var i=Math.min(this.c,r.length),a=r.subarray(0,i);if(this.c-=i,this.d?this.d.push(a,!this.c):this.k[0].push(a),r=r.subarray(i),r.length)return this.push(r,t)}else{var o=0,f=0,u=void 0,s=void 0;this.p.length?r.length?(s=new T(this.p.length+r.length),s.set(this.p),s.set(r,this.p.length)):s=this.p:s=r;for(var v=s.length,h=this.c,g=h&&this.d,x=function(){var y,M=P(s,f);if(M==67324752){o=1,u=f,m.d=null,m.c=0;var A=Y(s,f+6),w=Y(s,f+8),I=A&2048,S=A&8,U=Y(s,f+26),l=Y(s,f+28);if(v>f+30+U+l){var k=[];m.k.unshift(k),o=2;var D=P(s,f+18),N=P(s,f+22),B=qn(s.subarray(f+30,f+=30+U),!I);D==4294967295?(y=S?[-2]:jn(s,f),D=y[0],N=y[1]):S&&(D=-1),f+=l,m.c=D;var G,E={name:B,compression:w,start:function(){if(E.ondata||p(5),!D)E.ondata(null,tr,!0);else{var L=e.o[w];L||E.ondata(p(14,"unknown compression type "+w,1),null,!1),G=D<0?new L(B):new L(B,D,N),G.ondata=function(W,K,H){E.ondata(W,K,H)};for(var Z=0,O=k;Z<O.length;Z++){var q=O[Z];G.push(q,!1)}e.k[0]==k&&e.c?e.d=G:G.push(tr,!0)}},terminate:function(){G&&G.terminate&&G.terminate()}};D>=0&&(E.size=D,E.originalSize=N),m.onfile(E)}return"break"}else if(h){if(M==134695760)return u=f+=12+(h==-2&&8),o=3,m.c=0,"break";if(M==33639248)return u=f-=4,o=3,m.c=0,"break"}},m=this;f<v-4;++f){var z=x();if(z==="break")break}if(this.p=tr,h<0){var c=o?s.subarray(0,u-12-(h==-2&&8)-(P(s,u-16)==134695760&&4)):s.subarray(0,f);g?g.push(c,!!o):this.k[+(o==2)].push(c)}if(o&2)return this.push(s.subarray(f),t);this.p=s.subarray(f)}t&&(this.c&&p(13),this.p=null)},n.prototype.register=function(r){this.o[r.compression]=r},n}();var Nr=typeof queueMicrotask=="function"?queueMicrotask:typeof setTimeout=="function"?setTimeout:function(n){n()};function Mt(n,r,t){t||(t=r,r={}),typeof t!="function"&&p(7);var e=[],i=function(){for(var c=0;c<e.length;++c)e[c]()},a={},o=function(c,y){Nr(function(){t(c,y)})};Nr(function(){o=t});for(var f=n.length-22;P(n,f)!=101010256;--f)if(!f||n.length-f>65558)return o(p(13,0,1),null),i;var u=Y(n,f+8);if(u){var s=u,v=P(n,f+16),h=v==4294967295||s==65535;if(h){var g=P(n,f-12);h=P(n,g)==101075792,h&&(s=u=P(n,g+32),v=P(n,g+48))}for(var x=r&&r.filter,m=function(c){var y=Wn(n,v,h),M=y[0],A=y[1],w=y[2],I=y[3],S=y[4],U=y[5],l=Yn(n,U);v=S;var k=function(N,B){N?(i(),o(N,null)):(B&&(a[I]=B),--u||o(null,a))};if(!x||x({name:I,size:A,originalSize:w,compression:M}))if(!M)k(null,X(n,l,l+A));else if(M==8){var D=n.subarray(l,l+A);if(A<32e4)try{k(null,Er(D,new T(w)))}catch(N){k(N,null)}else e.push(Nn(D,{size:w},k))}else k(p(14,"unknown compression type "+M,1),null);else k(null,null)},z=0;z<s;++z)m(z)}else o(null,{});return i}function Tt(n,r){for(var t={},e=n.length-22;P(n,e)!=101010256;--e)(!e||n.length-e>65558)&&p(13);var i=Y(n,e+8);if(!i)return{};var a=P(n,e+16),o=a==4294967295||i==65535;if(o){var f=P(n,e-12);o=P(n,f)==101075792,o&&(i=P(n,f+32),a=P(n,f+48))}for(var u=r&&r.filter,s=0;s<i;++s){var v=Wn(n,a,o),h=v[0],g=v[1],x=v[2],m=v[3],z=v[4],c=v[5],y=Yn(n,c);a=z,(!u||u({name:m,size:g,originalSize:x,compression:h}))&&(h?h==8?t[m]=Er(n.subarray(y,y+g),new T(x)):p(14,"unknown compression type "+h):t[m]=X(n,y,y+g))}return t}export{at as AsyncCompress,ut as AsyncDecompress,Vn as AsyncDeflate,dn as AsyncGunzip,at as AsyncGzip,Pn as AsyncInflate,zt as AsyncUnzipInflate,_n as AsyncUnzlib,gt as AsyncZipDeflate,ft as AsyncZlib,cn as Compress,lt as DecodeUTF8,nt as Decompress,ir as Deflate,ct as EncodeUTF8,it as FlateErrorCode,jr as Gunzip,cn as Gzip,J as Inflate,At as Unzip,xt as UnzipInflate,tt as UnzipPassThrough,Kr as Unzlib,yt as Zip,pt as ZipDeflate,Pr as ZipPassThrough,gn as Zlib,ot as compress,pn as compressSync,vt as decompress,ht as decompressSync,Xn as deflate,Rr as deflateSync,bn as gunzip,Jr as gunzipSync,ot as gzip,pn as gzipSync,Nn as inflate,Er as inflateSync,qn as strFromU8,fr as strToU8,Mt as unzip,Tt as unzipSync,rt as unzlib,Qr as unzlibSync,wt as zip,mt as zipSync,st as zlib,yn as zlibSync};
@@ -0,0 +1 @@
1
+ import{h as fr,i as un,j as cn}from"./chunk-OFHRQORP.js";import{a as dn}from"./chunk-VD44EZOA.js";import{$a as ln,A as Gt,Aa as an,H as z,Ha as sn,K as gt,M as ye,N as ae,P as Qr,S as en,Z as tn,b as Yr,c as qr,d as Kr,e as mt,ka as rn,n as Xr,o as Jr,oa as nn,pa as on,ra as Nt,w as dr}from"./chunk-JNSM5T55.js";import{a as f,b as x}from"./chunk-OSMCRNNF.js";import{b as Bi,d as zi,e as u,f as E,g as V,h as P}from"./chunk-H2E2454S.js";var oi=Bi((Mt,ot)=>{f();var Yo=200,jn="__lodash_hash_undefined__",qo=800,Ko=16,Bn=9007199254740991,zn="[object Arguments]",Xo="[object Array]",Jo="[object AsyncFunction]",Qo="[object Boolean]",ea="[object Date]",ta="[object Error]",Fn="[object Function]",ra="[object GeneratorFunction]",na="[object Map]",ia="[object Number]",oa="[object Null]",Vn="[object Object]",aa="[object Proxy]",sa="[object RegExp]",la="[object Set]",ua="[object String]",ca="[object Undefined]",da="[object WeakMap]",fa="[object ArrayBuffer]",pa="[object DataView]",ha="[object Float32Array]",ma="[object Float64Array]",ga="[object Int8Array]",ya="[object Int16Array]",ba="[object Int32Array]",va="[object Uint8Array]",xa="[object Uint8ClampedArray]",_a="[object Uint16Array]",Ta="[object Uint32Array]",Sa=/[\\^$.*+?()[\]{}|]/g,Ma=/^\[object .+?Constructor\]$/,ka=/^(?:0|[1-9]\d*)$/,O={};O[ha]=O[ma]=O[ga]=O[ya]=O[ba]=O[va]=O[xa]=O[_a]=O[Ta]=!0;O[zn]=O[Xo]=O[fa]=O[Qo]=O[pa]=O[ea]=O[ta]=O[Fn]=O[na]=O[ia]=O[Vn]=O[sa]=O[la]=O[ua]=O[da]=!1;var Un=typeof global=="object"&&global&&global.Object===Object&&global,wa=typeof self=="object"&&self&&self.Object===Object&&self,Dt=Un||wa||Function("return this")(),Hn=typeof Mt=="object"&&Mt&&!Mt.nodeType&&Mt,kt=Hn&&typeof ot=="object"&&ot&&!ot.nodeType&&ot,Zn=kt&&kt.exports===Hn,xr=Zn&&Un.process,En=function(){try{var t=kt&&kt.require&&kt.require("util").types;return t||xr&&xr.binding&&xr.binding("util")}catch{}}(),In=En&&En.isTypedArray;function $n(t,e,r){switch(r.length){case 0:return t.call(e);case 1:return t.call(e,r[0]);case 2:return t.call(e,r[0],r[1]);case 3:return t.call(e,r[0],r[1],r[2])}return t.apply(e,r)}function Da(t,e){for(var r=-1,n=Array(t);++r<t;)n[r]=e(r);return n}function Ca(t){return function(e){return t(e)}}function Ea(t,e){return t==null?void 0:t[e]}function Ia(t,e){return function(r){return t(e(r))}}var Oa=Array.prototype,Aa=Function.prototype,Yt=Object.prototype,_r=Dt["__core-js_shared__"],qt=Aa.toString,fe=Yt.hasOwnProperty,On=function(){var t=/[^.]+$/.exec(_r&&_r.keys&&_r.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""}(),Wn=Yt.toString,Pa=qt.call(Object),Ra=RegExp("^"+qt.call(fe).replace(Sa,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),$t=Zn?Dt.Buffer:void 0,An=Dt.Symbol,Pn=Dt.Uint8Array,Rn=$t?$t.allocUnsafe:void 0,Yn=Ia(Object.getPrototypeOf,Object),Ln=Object.create,La=Yt.propertyIsEnumerable,Ga=Oa.splice,Ze=An?An.toStringTag:void 0,Wt=function(){try{var t=Cr(Object,"defineProperty");return t({},"",{}),t}catch{}}(),Na=$t?$t.isBuffer:void 0,Gn=Math.max,ja=Date.now,qn=Cr(Dt,"Map"),wt=Cr(Object,"create"),Ba=function(){function t(){}return function(e){if(!de(e))return{};if(Ln)return Ln(e);t.prototype=e;var r=new t;return t.prototype=void 0,r}}();function $e(t){var e=-1,r=t==null?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}function za(){this.__data__=wt?wt(null):{},this.size=0}function Fa(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e}function Va(t){var e=this.__data__;if(wt){var r=e[t];return r===jn?void 0:r}return fe.call(e,t)?e[t]:void 0}function Ua(t){var e=this.__data__;return wt?e[t]!==void 0:fe.call(e,t)}function Ha(t,e){var r=this.__data__;return this.size+=this.has(t)?0:1,r[t]=wt&&e===void 0?jn:e,this}$e.prototype.clear=za;$e.prototype.delete=Fa;$e.prototype.get=Va;$e.prototype.has=Ua;$e.prototype.set=Ha;function pe(t){var e=-1,r=t==null?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}function Za(){this.__data__=[],this.size=0}function $a(t){var e=this.__data__,r=Kt(e,t);if(r<0)return!1;var n=e.length-1;return r==n?e.pop():Ga.call(e,r,1),--this.size,!0}function Wa(t){var e=this.__data__,r=Kt(e,t);return r<0?void 0:e[r][1]}function Ya(t){return Kt(this.__data__,t)>-1}function qa(t,e){var r=this.__data__,n=Kt(r,t);return n<0?(++this.size,r.push([t,e])):r[n][1]=e,this}pe.prototype.clear=Za;pe.prototype.delete=$a;pe.prototype.get=Wa;pe.prototype.has=Ya;pe.prototype.set=qa;function at(t){var e=-1,r=t==null?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}function Ka(){this.size=0,this.__data__={hash:new $e,map:new(qn||pe),string:new $e}}function Xa(t){var e=Jt(this,t).delete(t);return this.size-=e?1:0,e}function Ja(t){return Jt(this,t).get(t)}function Qa(t){return Jt(this,t).has(t)}function es(t,e){var r=Jt(this,t),n=r.size;return r.set(t,e),this.size+=r.size==n?0:1,this}at.prototype.clear=Ka;at.prototype.delete=Xa;at.prototype.get=Ja;at.prototype.has=Qa;at.prototype.set=es;function st(t){var e=this.__data__=new pe(t);this.size=e.size}function ts(){this.__data__=new pe,this.size=0}function rs(t){var e=this.__data__,r=e.delete(t);return this.size=e.size,r}function ns(t){return this.__data__.get(t)}function is(t){return this.__data__.has(t)}function os(t,e){var r=this.__data__;if(r instanceof pe){var n=r.__data__;if(!qn||n.length<Yo-1)return n.push([t,e]),this.size=++r.size,this;r=this.__data__=new at(n)}return r.set(t,e),this.size=r.size,this}st.prototype.clear=ts;st.prototype.delete=rs;st.prototype.get=ns;st.prototype.has=is;st.prototype.set=os;function as(t,e){var r=kr(t),n=!r&&Mr(t),i=!r&&!n&&ei(t),o=!r&&!n&&!i&&ri(t),a=r||n||i||o,s=a?Da(t.length,String):[],l=s.length;for(var c in t)(e||fe.call(t,c))&&!(a&&(c=="length"||i&&(c=="offset"||c=="parent")||o&&(c=="buffer"||c=="byteLength"||c=="byteOffset")||Jn(c,l)))&&s.push(c);return s}function Tr(t,e,r){(r!==void 0&&!Qt(t[e],r)||r===void 0&&!(e in t))&&wr(t,e,r)}function ss(t,e,r){var n=t[e];(!(fe.call(t,e)&&Qt(n,r))||r===void 0&&!(e in t))&&wr(t,e,r)}function Kt(t,e){for(var r=t.length;r--;)if(Qt(t[r][0],e))return r;return-1}function wr(t,e,r){e=="__proto__"&&Wt?Wt(t,e,{configurable:!0,enumerable:!0,value:r,writable:!0}):t[e]=r}var ls=xs();function Xt(t){return t==null?t===void 0?ca:oa:Ze&&Ze in Object(t)?_s(t):Ds(t)}function Nn(t){return Ct(t)&&Xt(t)==zn}function us(t){if(!de(t)||ks(t))return!1;var e=Ir(t)?Ra:Ma;return e.test(Os(t))}function cs(t){return Ct(t)&&ti(t.length)&&!!O[Xt(t)]}function ds(t){if(!de(t))return ws(t);var e=Qn(t),r=[];for(var n in t)n=="constructor"&&(e||!fe.call(t,n))||r.push(n);return r}function Dr(t,e,r,n,i){t!==e&&ls(e,function(o,a){if(i||(i=new st),de(o))fs(t,e,a,r,Dr,n,i);else{var s=n?n(Sr(t,a),o,a+"",t,e,i):void 0;s===void 0&&(s=o),Tr(t,a,s)}},ni)}function fs(t,e,r,n,i,o,a){var s=Sr(t,r),l=Sr(e,r),c=a.get(l);if(c){Tr(t,r,c);return}var d=o?o(s,l,r+"",t,e,a):void 0,m=d===void 0;if(m){var w=kr(l),D=!w&&ei(l),I=!w&&!D&&ri(l);d=l,w||D||I?kr(s)?d=s:As(s)?d=ys(s):D?(m=!1,d=hs(l,!0)):I?(m=!1,d=gs(l,!0)):d=[]:Ps(l)||Mr(l)?(d=s,Mr(s)?d=Rs(s):(!de(s)||Ir(s))&&(d=Ts(l))):m=!1}m&&(a.set(l,d),i(d,l,n,o,a),a.delete(l)),Tr(t,r,d)}function Kn(t,e){return Es(Cs(t,e,ii),t+"")}var ps=Wt?function(t,e){return Wt(t,"toString",{configurable:!0,enumerable:!1,value:Ns(e),writable:!0})}:ii;function hs(t,e){if(e)return t.slice();var r=t.length,n=Rn?Rn(r):new t.constructor(r);return t.copy(n),n}function ms(t){var e=new t.constructor(t.byteLength);return new Pn(e).set(new Pn(t)),e}function gs(t,e){var r=e?ms(t.buffer):t.buffer;return new t.constructor(r,t.byteOffset,t.length)}function ys(t,e){var r=-1,n=t.length;for(e||(e=Array(n));++r<n;)e[r]=t[r];return e}function bs(t,e,r,n){var i=!r;r||(r={});for(var o=-1,a=e.length;++o<a;){var s=e[o],l=n?n(r[s],t[s],s,r,t):void 0;l===void 0&&(l=t[s]),i?wr(r,s,l):ss(r,s,l)}return r}function vs(t){return Kn(function(e,r){var n=-1,i=r.length,o=i>1?r[i-1]:void 0,a=i>2?r[2]:void 0;for(o=t.length>3&&typeof o=="function"?(i--,o):void 0,a&&Ss(r[0],r[1],a)&&(o=i<3?void 0:o,i=1),e=Object(e);++n<i;){var s=r[n];s&&t(e,s,n,o)}return e})}function xs(t){return function(e,r,n){for(var i=-1,o=Object(e),a=n(e),s=a.length;s--;){var l=a[t?s:++i];if(r(o[l],l,o)===!1)break}return e}}function Xn(t,e,r,n,i,o){return de(t)&&de(e)&&(o.set(e,t),Dr(t,e,void 0,Xn,o),o.delete(e)),t}function Jt(t,e){var r=t.__data__;return Ms(e)?r[typeof e=="string"?"string":"hash"]:r.map}function Cr(t,e){var r=Ea(t,e);return us(r)?r:void 0}function _s(t){var e=fe.call(t,Ze),r=t[Ze];try{t[Ze]=void 0;var n=!0}catch{}var i=Wn.call(t);return n&&(e?t[Ze]=r:delete t[Ze]),i}function Ts(t){return typeof t.constructor=="function"&&!Qn(t)?Ba(Yn(t)):{}}function Jn(t,e){var r=typeof t;return e=e==null?Bn:e,!!e&&(r=="number"||r!="symbol"&&ka.test(t))&&t>-1&&t%1==0&&t<e}function Ss(t,e,r){if(!de(r))return!1;var n=typeof e;return(n=="number"?Er(r)&&Jn(e,r.length):n=="string"&&e in r)?Qt(r[e],t):!1}function Ms(t){var e=typeof t;return e=="string"||e=="number"||e=="symbol"||e=="boolean"?t!=="__proto__":t===null}function ks(t){return!!On&&On in t}function Qn(t){var e=t&&t.constructor,r=typeof e=="function"&&e.prototype||Yt;return t===r}function ws(t){var e=[];if(t!=null)for(var r in Object(t))e.push(r);return e}function Ds(t){return Wn.call(t)}function Cs(t,e,r){return e=Gn(e===void 0?t.length-1:e,0),function(){for(var n=arguments,i=-1,o=Gn(n.length-e,0),a=Array(o);++i<o;)a[i]=n[e+i];i=-1;for(var s=Array(e+1);++i<e;)s[i]=n[i];return s[e]=r(a),$n(t,this,s)}}function Sr(t,e){if(!(e==="constructor"&&typeof t[e]=="function")&&e!="__proto__")return t[e]}var Es=Is(ps);function Is(t){var e=0,r=0;return function(){var n=ja(),i=Ko-(n-r);if(r=n,i>0){if(++e>=qo)return arguments[0]}else e=0;return t.apply(void 0,arguments)}}function Os(t){if(t!=null){try{return qt.call(t)}catch{}try{return t+""}catch{}}return""}function Qt(t,e){return t===e||t!==t&&e!==e}var Mr=Nn(function(){return arguments}())?Nn:function(t){return Ct(t)&&fe.call(t,"callee")&&!La.call(t,"callee")},kr=Array.isArray;function Er(t){return t!=null&&ti(t.length)&&!Ir(t)}function As(t){return Ct(t)&&Er(t)}var ei=Na||js;function Ir(t){if(!de(t))return!1;var e=Xt(t);return e==Fn||e==ra||e==Jo||e==aa}function ti(t){return typeof t=="number"&&t>-1&&t%1==0&&t<=Bn}function de(t){var e=typeof t;return t!=null&&(e=="object"||e=="function")}function Ct(t){return t!=null&&typeof t=="object"}function Ps(t){if(!Ct(t)||Xt(t)!=Vn)return!1;var e=Yn(t);if(e===null)return!0;var r=fe.call(e,"constructor")&&e.constructor;return typeof r=="function"&&r instanceof r&&qt.call(r)==Pa}var ri=In?Ca(In):cs;function Rs(t){return bs(t,ni(t))}var Ls=Kn(function(t){return t.push(void 0,Xn),$n(Gs,void 0,t)});function ni(t){return Er(t)?as(t,!0):ds(t)}var Gs=vs(function(t,e,r,n){Dr(t,e,r,n)});function Ns(t){return function(){return t}}function ii(t){return t}function js(){return!1}ot.exports=Ls});f();var jt="[MappedinJS]",Fi=(i=>(i[i.LOG=0]="LOG",i[i.WARN=1]="WARN",i[i.ERROR=2]="ERROR",i[i.SILENT=3]="SILENT",i))(Fi||{});function Xl(t){0<=t&&t<=3&&(fn.logState=t)}var fn={logState:x.env.NODE_ENV==="test"?3:0,log(...t){this.logState<=0&&console.log(jt,...t)},warn(...t){this.logState<=1&&console.warn(jt,...t)},error(...t){this.logState<=2&&console.error(jt,...t)},assert(...t){console.assert(...t)},time(t){console.time(t)},timeEnd(t){console.timeEnd(t)},throw(t,e){throw new Error("".concat(jt," ").concat(t),e)}},se=fn;f();f();var De=class extends Error{};De.prototype.name="InvalidTokenError";function Vi(t){return decodeURIComponent(atob(t).replace(/(.)/g,(e,r)=>{let n=r.charCodeAt(0).toString(16).toUpperCase();return n.length<2&&(n="0"+n),"%"+n}))}function Ui(t){let e=t.replace(/-/g,"+").replace(/_/g,"/");switch(e.length%4){case 0:break;case 2:e+="==";break;case 3:e+="=";break;default:throw new Error("base64 string is not of the correct length")}try{return Vi(e)}catch{return atob(e)}}function pn(t,e){if(typeof t!="string")throw new De("Invalid token specified: must be a string");e||(e={});let r=e.header===!0?0:1,n=t.split(".")[r];if(typeof n!="string")throw new De("Invalid token specified: missing part #".concat(r+1));let i;try{i=Ui(n)}catch(o){throw new De("Invalid token specified: invalid base64 for part #".concat(r+1," (").concat(o.message,")"))}try{return JSON.parse(i)}catch(o){throw new De("Invalid token specified: invalid json for part #".concat(r+1," (").concat(o.message,")"))}}f();var Ce=63710088e-1;function au(t){var r,n;let e=pn(t);if(e.sub==null)throw new Error("Access token is missing sub claim.");return{sub:e.sub,aud:typeof e.aud=="string"?[e.aud]:(r=e.aud)!=null?r:[],capabilities:(n=e.capabilities)!=null?n:{}}}function be(t){return t*(Math.PI/180)}function Hi(t){return t*(180/Math.PI)}function hn(t,e){return(t%e+e)%e}function su([t,e],[r,n]){let i=be(n-e),o=be(r-t),a=be(e),s=be(n),l=Math.sin(i/2)*Math.sin(i/2)+Math.sin(o/2)*Math.sin(o/2)*Math.cos(a)*Math.cos(s),c=2*Math.atan2(Math.sqrt(l),Math.sqrt(1-l));return Ce*c}function lu([t,e],[r,n]){let i=be(e),o=be(t),a=be(n),l=be(r)-o,c=Math.sin(l)*Math.cos(a),d=Math.cos(i)*Math.sin(a)-Math.sin(i)*Math.cos(a)*Math.cos(l);return Hi((Math.atan2(c,d)+Math.PI*2)%(Math.PI*2))}function uu(t,e){let r=hn(t,Math.PI*2),n=hn(e,Math.PI*2),i=n-r,o=n+(i>Math.PI?-Math.PI*2:i<-Math.PI?Math.PI*2:0);return{start:r,end:o}}f();function fu(t,e,r=!1){let n=null,i=0;return function(...o){i++,i===1&&r===!0&&t(...o);let a=()=>{(!r||i>1)&&t(...o),n=null,i=0};clearTimeout(n),n=setTimeout(a,e)}}f();f();var yt=class{constructor(){u(this,"_subscribers",{})}publish(e,r){!this._subscribers||!this._subscribers[e]||this._subscribers[e].forEach(function(n){typeof n=="function"&&n(r)})}on(e,r){this._subscribers||(this._subscribers={}),this._subscribers[e]=this._subscribers[e]||[],this._subscribers[e].push(r)}off(e,r){if(!this._subscribers||this._subscribers[e]==null)return;let n=this._subscribers[e].indexOf(r);n!==-1&&this._subscribers[e].splice(n,1)}destroy(){this._subscribers={}}};f();f();var pr=[0,4,6,8,10],N=()=>{let t=new Array(16).fill(0),e=Math.random()*4294967296;for(let n=0;n<t.length;n++)n>0&&!(n&3)&&(e=Math.random()*4294967296),t[n]=e>>>((n&3)<<3)&255;let r=t.map(n=>n.toString(16).padStart(2,"0"));return r[6]="4"+r[6][1],r[8]=["8","9","a","b"].includes(r[7][0])?r[7]:"a"+r[7][1],pr.map((n,i)=>r.slice(n,i===pr.length-1?void 0:pr[i+1]).join("")).join("-")};var mn="mi-session-data",gn="mi-local-data",Ee,q,K,Bt=class Bt{constructor(){V(this,q,void 0);V(this,K,void 0);try{let e=sessionStorage.getItem(mn);e?P(this,q,JSON.parse(e)):P(this,q,{id:N()})}catch{P(this,q,{id:N()})}try{let e=localStorage.getItem(gn);e?P(this,K,JSON.parse(e)):P(this,K,{deviceId:N()})}catch{P(this,K,{deviceId:N()})}E(this,q).id||(E(this,q).id=N()),E(this,K).deviceId||(E(this,K).deviceId=N())}static getInstance(){return E(this,Ee)||P(this,Ee,new Bt),E(this,Ee)}static ___clearInstance(){P(this,Ee,void 0)}saveSessionData(e,r){E(this,q)[e]=r;try{return sessionStorage.setItem(mn,JSON.stringify(E(this,q))),!0}catch{return!1}}loadSessionData(e){let r=E(this,q)[e];if(r!=null)return r}saveLocalData(e,r){E(this,K)[e]=r;try{return localStorage.setItem(gn,JSON.stringify(E(this,K))),!0}catch{return!1}}loadLocalData(e){let r=E(this,K)[e];if(r!=null)return r}};Ee=new WeakMap,q=new WeakMap,K=new WeakMap,V(Bt,Ee,void 0);var hr=Bt;f();var k;(function(t){t.assertEqual=i=>i;function e(i){}t.assertIs=e;function r(i){throw new Error}t.assertNever=r,t.arrayToEnum=i=>{let o={};for(let a of i)o[a]=a;return o},t.getValidEnumValues=i=>{let o=t.objectKeys(i).filter(s=>typeof i[i[s]]!="number"),a={};for(let s of o)a[s]=i[s];return t.objectValues(a)},t.objectValues=i=>t.objectKeys(i).map(function(o){return i[o]}),t.objectKeys=typeof Object.keys=="function"?i=>Object.keys(i):i=>{let o=[];for(let a in i)Object.prototype.hasOwnProperty.call(i,a)&&o.push(a);return o},t.find=(i,o)=>{for(let a of i)if(o(a))return a},t.isInteger=typeof Number.isInteger=="function"?i=>Number.isInteger(i):i=>typeof i=="number"&&isFinite(i)&&Math.floor(i)===i;function n(i,o=" | "){return i.map(a=>typeof a=="string"?"'".concat(a,"'"):a).join(o)}t.joinValues=n,t.jsonStringifyReplacer=(i,o)=>typeof o=="bigint"?o.toString():o})(k||(k={}));var gr;(function(t){t.mergeShapes=(e,r)=>({...e,...r})})(gr||(gr={}));var y=k.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),ve=t=>{switch(typeof t){case"undefined":return y.undefined;case"string":return y.string;case"number":return isNaN(t)?y.nan:y.number;case"boolean":return y.boolean;case"function":return y.function;case"bigint":return y.bigint;case"symbol":return y.symbol;case"object":return Array.isArray(t)?y.array:t===null?y.null:t.then&&typeof t.then=="function"&&t.catch&&typeof t.catch=="function"?y.promise:typeof Map<"u"&&t instanceof Map?y.map:typeof Set<"u"&&t instanceof Set?y.set:typeof Date<"u"&&t instanceof Date?y.date:y.object;default:return y.unknown}},p=k.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]),Zi=t=>JSON.stringify(t,null,2).replace(/"([^"]+)":/g,"$1:"),U=class t extends Error{constructor(e){super(),this.issues=[],this.addIssue=n=>{this.issues=[...this.issues,n]},this.addIssues=(n=[])=>{this.issues=[...this.issues,...n]};let r=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,r):this.__proto__=r,this.name="ZodError",this.issues=e}get errors(){return this.issues}format(e){let r=e||function(o){return o.message},n={_errors:[]},i=o=>{for(let a of o.issues)if(a.code==="invalid_union")a.unionErrors.map(i);else if(a.code==="invalid_return_type")i(a.returnTypeError);else if(a.code==="invalid_arguments")i(a.argumentsError);else if(a.path.length===0)n._errors.push(r(a));else{let s=n,l=0;for(;l<a.path.length;){let c=a.path[l];l===a.path.length-1?(s[c]=s[c]||{_errors:[]},s[c]._errors.push(r(a))):s[c]=s[c]||{_errors:[]},s=s[c],l++}}};return i(this),n}static assert(e){if(!(e instanceof t))throw new Error("Not a ZodError: ".concat(e))}toString(){return this.message}get message(){return JSON.stringify(this.issues,k.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(e=r=>r.message){let r={},n=[];for(let i of this.issues)i.path.length>0?(r[i.path[0]]=r[i.path[0]]||[],r[i.path[0]].push(e(i))):n.push(e(i));return{formErrors:n,fieldErrors:r}}get formErrors(){return this.flatten()}};U.create=t=>new U(t);var Qe=(t,e)=>{let r;switch(t.code){case p.invalid_type:t.received===y.undefined?r="Required":r="Expected ".concat(t.expected,", received ").concat(t.received);break;case p.invalid_literal:r="Invalid literal value, expected ".concat(JSON.stringify(t.expected,k.jsonStringifyReplacer));break;case p.unrecognized_keys:r="Unrecognized key(s) in object: ".concat(k.joinValues(t.keys,", "));break;case p.invalid_union:r="Invalid input";break;case p.invalid_union_discriminator:r="Invalid discriminator value. Expected ".concat(k.joinValues(t.options));break;case p.invalid_enum_value:r="Invalid enum value. Expected ".concat(k.joinValues(t.options),", received '").concat(t.received,"'");break;case p.invalid_arguments:r="Invalid function arguments";break;case p.invalid_return_type:r="Invalid function return type";break;case p.invalid_date:r="Invalid date";break;case p.invalid_string:typeof t.validation=="object"?"includes"in t.validation?(r='Invalid input: must include "'.concat(t.validation.includes,'"'),typeof t.validation.position=="number"&&(r="".concat(r," at one or more positions greater than or equal to ").concat(t.validation.position))):"startsWith"in t.validation?r='Invalid input: must start with "'.concat(t.validation.startsWith,'"'):"endsWith"in t.validation?r='Invalid input: must end with "'.concat(t.validation.endsWith,'"'):k.assertNever(t.validation):t.validation!=="regex"?r="Invalid ".concat(t.validation):r="Invalid";break;case p.too_small:t.type==="array"?r="Array must contain ".concat(t.exact?"exactly":t.inclusive?"at least":"more than"," ").concat(t.minimum," element(s)"):t.type==="string"?r="String must contain ".concat(t.exact?"exactly":t.inclusive?"at least":"over"," ").concat(t.minimum," character(s)"):t.type==="number"?r="Number must be ".concat(t.exact?"exactly equal to ":t.inclusive?"greater than or equal to ":"greater than ").concat(t.minimum):t.type==="date"?r="Date must be ".concat(t.exact?"exactly equal to ":t.inclusive?"greater than or equal to ":"greater than ").concat(new Date(Number(t.minimum))):r="Invalid input";break;case p.too_big:t.type==="array"?r="Array must contain ".concat(t.exact?"exactly":t.inclusive?"at most":"less than"," ").concat(t.maximum," element(s)"):t.type==="string"?r="String must contain ".concat(t.exact?"exactly":t.inclusive?"at most":"under"," ").concat(t.maximum," character(s)"):t.type==="number"?r="Number must be ".concat(t.exact?"exactly":t.inclusive?"less than or equal to":"less than"," ").concat(t.maximum):t.type==="bigint"?r="BigInt must be ".concat(t.exact?"exactly":t.inclusive?"less than or equal to":"less than"," ").concat(t.maximum):t.type==="date"?r="Date must be ".concat(t.exact?"exactly":t.inclusive?"smaller than or equal to":"smaller than"," ").concat(new Date(Number(t.maximum))):r="Invalid input";break;case p.custom:r="Invalid input";break;case p.invalid_intersection_types:r="Intersection results could not be merged";break;case p.not_multiple_of:r="Number must be a multiple of ".concat(t.multipleOf);break;case p.not_finite:r="Number must be finite";break;default:r=e.defaultError,k.assertNever(t)}return{message:r}},vn=Qe;function $i(t){vn=t}function zt(){return vn}var Ft=t=>{let{data:e,path:r,errorMaps:n,issueData:i}=t,o=[...r,...i.path||[]],a={...i,path:o};if(i.message!==void 0)return{...i,path:o,message:i.message};let s="",l=n.filter(c=>!!c).slice().reverse();for(let c of l)s=c(a,{data:e,defaultError:s}).message;return{...i,path:o,message:s}},Wi=[];function g(t,e){let r=zt(),n=Ft({issueData:e,data:t.data,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,r,r===Qe?void 0:Qe].filter(i=>!!i)});t.common.issues.push(n)}var R=class t{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(e,r){let n=[];for(let i of r){if(i.status==="aborted")return T;i.status==="dirty"&&e.dirty(),n.push(i.value)}return{status:e.value,value:n}}static async mergeObjectAsync(e,r){let n=[];for(let i of r){let o=await i.key,a=await i.value;n.push({key:o,value:a})}return t.mergeObjectSync(e,n)}static mergeObjectSync(e,r){let n={};for(let i of r){let{key:o,value:a}=i;if(o.status==="aborted"||a.status==="aborted")return T;o.status==="dirty"&&e.dirty(),a.status==="dirty"&&e.dirty(),o.value!=="__proto__"&&(typeof a.value<"u"||i.alwaysSet)&&(n[o.value]=a.value)}return{status:e.value,value:n}}},T=Object.freeze({status:"aborted"}),Je=t=>({status:"dirty",value:t}),j=t=>({status:"valid",value:t}),yr=t=>t.status==="aborted",br=t=>t.status==="dirty",xt=t=>t.status==="valid",_t=t=>typeof Promise<"u"&&t instanceof Promise;function Vt(t,e,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!n:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(t):n?n.value:e.get(t)}function xn(t,e,r,n,i){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?t!==e||!i:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?i.call(t,r):i?i.value=r:e.set(t,r),r}var v;(function(t){t.errToObj=e=>typeof e=="string"?{message:e}:e||{},t.toString=e=>typeof e=="string"?e:e==null?void 0:e.message})(v||(v={}));var bt,vt,Y=class{constructor(e,r,n,i){this._cachedPath=[],this.parent=e,this.data=r,this._path=n,this._key=i}get path(){return this._cachedPath.length||(this._key instanceof Array?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}},yn=(t,e)=>{if(xt(e))return{success:!0,data:e.value};if(!t.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;let r=new U(t.common.issues);return this._error=r,this._error}}};function S(t){if(!t)return{};let{errorMap:e,invalid_type_error:r,required_error:n,description:i}=t;if(e&&(r||n))throw new Error('Can\'t use "invalid_type_error" or "required_error" in conjunction with custom error map.');return e?{errorMap:e,description:i}:{errorMap:(a,s)=>{var l,c;let{message:d}=t;return a.code==="invalid_enum_value"?{message:d!=null?d:s.defaultError}:typeof s.data>"u"?{message:(l=d!=null?d:n)!==null&&l!==void 0?l:s.defaultError}:a.code!=="invalid_type"?{message:s.defaultError}:{message:(c=d!=null?d:r)!==null&&c!==void 0?c:s.defaultError}},description:i}}var M=class{constructor(e){this.spa=this.safeParseAsync,this._def=e,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this)}get description(){return this._def.description}_getType(e){return ve(e.data)}_getOrReturnCtx(e,r){return r||{common:e.parent.common,data:e.data,parsedType:ve(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}_processInputParams(e){return{status:new R,ctx:{common:e.parent.common,data:e.data,parsedType:ve(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}}_parseSync(e){let r=this._parse(e);if(_t(r))throw new Error("Synchronous parse encountered promise.");return r}_parseAsync(e){let r=this._parse(e);return Promise.resolve(r)}parse(e,r){let n=this.safeParse(e,r);if(n.success)return n.data;throw n.error}safeParse(e,r){var n;let i={common:{issues:[],async:(n=r==null?void 0:r.async)!==null&&n!==void 0?n:!1,contextualErrorMap:r==null?void 0:r.errorMap},path:(r==null?void 0:r.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:ve(e)},o=this._parseSync({data:e,path:i.path,parent:i});return yn(i,o)}async parseAsync(e,r){let n=await this.safeParseAsync(e,r);if(n.success)return n.data;throw n.error}async safeParseAsync(e,r){let n={common:{issues:[],contextualErrorMap:r==null?void 0:r.errorMap,async:!0},path:(r==null?void 0:r.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:ve(e)},i=this._parse({data:e,path:n.path,parent:n}),o=await(_t(i)?i:Promise.resolve(i));return yn(n,o)}refine(e,r){let n=i=>typeof r=="string"||typeof r>"u"?{message:r}:typeof r=="function"?r(i):r;return this._refinement((i,o)=>{let a=e(i),s=()=>o.addIssue({code:p.custom,...n(i)});return typeof Promise<"u"&&a instanceof Promise?a.then(l=>l?!0:(s(),!1)):a?!0:(s(),!1)})}refinement(e,r){return this._refinement((n,i)=>e(n)?!0:(i.addIssue(typeof r=="function"?r(n,i):r),!1))}_refinement(e){return new H({schema:this,typeName:_.ZodEffects,effect:{type:"refinement",refinement:e}})}superRefine(e){return this._refinement(e)}optional(){return W.create(this,this._def)}nullable(){return re.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return ce.create(this,this._def)}promise(){return Te.create(this,this._def)}or(e){return Ge.create([this,e],this._def)}and(e){return Ne.create(this,e,this._def)}transform(e){return new H({...S(this._def),schema:this,typeName:_.ZodEffects,effect:{type:"transform",transform:e}})}default(e){let r=typeof e=="function"?e:()=>e;return new Ve({...S(this._def),innerType:this,defaultValue:r,typeName:_.ZodDefault})}brand(){return new Tt({typeName:_.ZodBranded,type:this,...S(this._def)})}catch(e){let r=typeof e=="function"?e:()=>e;return new Ue({...S(this._def),innerType:this,catchValue:r,typeName:_.ZodCatch})}describe(e){let r=this.constructor;return new r({...this._def,description:e})}pipe(e){return St.create(this,e)}readonly(){return He.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}},Yi=/^c[^\s-]{8,}$/i,qi=/^[0-9a-z]+$/,Ki=/^[0-9A-HJKMNP-TV-Z]{26}$/,Xi=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,Ji=/^[a-z0-9_-]{21}$/i,Qi=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,eo=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,to="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$",mr,ro=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,no=/^(([a-f0-9]{1,4}:){7}|::([a-f0-9]{1,4}:){0,6}|([a-f0-9]{1,4}:){1}:([a-f0-9]{1,4}:){0,5}|([a-f0-9]{1,4}:){2}:([a-f0-9]{1,4}:){0,4}|([a-f0-9]{1,4}:){3}:([a-f0-9]{1,4}:){0,3}|([a-f0-9]{1,4}:){4}:([a-f0-9]{1,4}:){0,2}|([a-f0-9]{1,4}:){5}:([a-f0-9]{1,4}:){0,1})([a-f0-9]{1,4}|(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2})))$/,io=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,_n="((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))",oo=new RegExp("^".concat(_n,"$"));function Tn(t){let e="([01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d";return t.precision?e="".concat(e,"\\.\\d{").concat(t.precision,"}"):t.precision==null&&(e="".concat(e,"(\\.\\d+)?")),e}function ao(t){return new RegExp("^".concat(Tn(t),"$"))}function Sn(t){let e="".concat(_n,"T").concat(Tn(t)),r=[];return r.push(t.local?"Z?":"Z"),t.offset&&r.push("([+-]\\d{2}:?\\d{2})"),e="".concat(e,"(").concat(r.join("|"),")"),new RegExp("^".concat(e,"$"))}function so(t,e){return!!((e==="v4"||!e)&&ro.test(t)||(e==="v6"||!e)&&no.test(t))}var xe=class t extends M{_parse(e){if(this._def.coerce&&(e.data=String(e.data)),this._getType(e)!==y.string){let o=this._getOrReturnCtx(e);return g(o,{code:p.invalid_type,expected:y.string,received:o.parsedType}),T}let n=new R,i;for(let o of this._def.checks)if(o.kind==="min")e.data.length<o.value&&(i=this._getOrReturnCtx(e,i),g(i,{code:p.too_small,minimum:o.value,type:"string",inclusive:!0,exact:!1,message:o.message}),n.dirty());else if(o.kind==="max")e.data.length>o.value&&(i=this._getOrReturnCtx(e,i),g(i,{code:p.too_big,maximum:o.value,type:"string",inclusive:!0,exact:!1,message:o.message}),n.dirty());else if(o.kind==="length"){let a=e.data.length>o.value,s=e.data.length<o.value;(a||s)&&(i=this._getOrReturnCtx(e,i),a?g(i,{code:p.too_big,maximum:o.value,type:"string",inclusive:!0,exact:!0,message:o.message}):s&&g(i,{code:p.too_small,minimum:o.value,type:"string",inclusive:!0,exact:!0,message:o.message}),n.dirty())}else if(o.kind==="email")eo.test(e.data)||(i=this._getOrReturnCtx(e,i),g(i,{validation:"email",code:p.invalid_string,message:o.message}),n.dirty());else if(o.kind==="emoji")mr||(mr=new RegExp(to,"u")),mr.test(e.data)||(i=this._getOrReturnCtx(e,i),g(i,{validation:"emoji",code:p.invalid_string,message:o.message}),n.dirty());else if(o.kind==="uuid")Xi.test(e.data)||(i=this._getOrReturnCtx(e,i),g(i,{validation:"uuid",code:p.invalid_string,message:o.message}),n.dirty());else if(o.kind==="nanoid")Ji.test(e.data)||(i=this._getOrReturnCtx(e,i),g(i,{validation:"nanoid",code:p.invalid_string,message:o.message}),n.dirty());else if(o.kind==="cuid")Yi.test(e.data)||(i=this._getOrReturnCtx(e,i),g(i,{validation:"cuid",code:p.invalid_string,message:o.message}),n.dirty());else if(o.kind==="cuid2")qi.test(e.data)||(i=this._getOrReturnCtx(e,i),g(i,{validation:"cuid2",code:p.invalid_string,message:o.message}),n.dirty());else if(o.kind==="ulid")Ki.test(e.data)||(i=this._getOrReturnCtx(e,i),g(i,{validation:"ulid",code:p.invalid_string,message:o.message}),n.dirty());else if(o.kind==="url")try{new URL(e.data)}catch{i=this._getOrReturnCtx(e,i),g(i,{validation:"url",code:p.invalid_string,message:o.message}),n.dirty()}else o.kind==="regex"?(o.regex.lastIndex=0,o.regex.test(e.data)||(i=this._getOrReturnCtx(e,i),g(i,{validation:"regex",code:p.invalid_string,message:o.message}),n.dirty())):o.kind==="trim"?e.data=e.data.trim():o.kind==="includes"?e.data.includes(o.value,o.position)||(i=this._getOrReturnCtx(e,i),g(i,{code:p.invalid_string,validation:{includes:o.value,position:o.position},message:o.message}),n.dirty()):o.kind==="toLowerCase"?e.data=e.data.toLowerCase():o.kind==="toUpperCase"?e.data=e.data.toUpperCase():o.kind==="startsWith"?e.data.startsWith(o.value)||(i=this._getOrReturnCtx(e,i),g(i,{code:p.invalid_string,validation:{startsWith:o.value},message:o.message}),n.dirty()):o.kind==="endsWith"?e.data.endsWith(o.value)||(i=this._getOrReturnCtx(e,i),g(i,{code:p.invalid_string,validation:{endsWith:o.value},message:o.message}),n.dirty()):o.kind==="datetime"?Sn(o).test(e.data)||(i=this._getOrReturnCtx(e,i),g(i,{code:p.invalid_string,validation:"datetime",message:o.message}),n.dirty()):o.kind==="date"?oo.test(e.data)||(i=this._getOrReturnCtx(e,i),g(i,{code:p.invalid_string,validation:"date",message:o.message}),n.dirty()):o.kind==="time"?ao(o).test(e.data)||(i=this._getOrReturnCtx(e,i),g(i,{code:p.invalid_string,validation:"time",message:o.message}),n.dirty()):o.kind==="duration"?Qi.test(e.data)||(i=this._getOrReturnCtx(e,i),g(i,{validation:"duration",code:p.invalid_string,message:o.message}),n.dirty()):o.kind==="ip"?so(e.data,o.version)||(i=this._getOrReturnCtx(e,i),g(i,{validation:"ip",code:p.invalid_string,message:o.message}),n.dirty()):o.kind==="base64"?io.test(e.data)||(i=this._getOrReturnCtx(e,i),g(i,{validation:"base64",code:p.invalid_string,message:o.message}),n.dirty()):k.assertNever(o);return{status:n.value,value:e.data}}_regex(e,r,n){return this.refinement(i=>e.test(i),{validation:r,code:p.invalid_string,...v.errToObj(n)})}_addCheck(e){return new t({...this._def,checks:[...this._def.checks,e]})}email(e){return this._addCheck({kind:"email",...v.errToObj(e)})}url(e){return this._addCheck({kind:"url",...v.errToObj(e)})}emoji(e){return this._addCheck({kind:"emoji",...v.errToObj(e)})}uuid(e){return this._addCheck({kind:"uuid",...v.errToObj(e)})}nanoid(e){return this._addCheck({kind:"nanoid",...v.errToObj(e)})}cuid(e){return this._addCheck({kind:"cuid",...v.errToObj(e)})}cuid2(e){return this._addCheck({kind:"cuid2",...v.errToObj(e)})}ulid(e){return this._addCheck({kind:"ulid",...v.errToObj(e)})}base64(e){return this._addCheck({kind:"base64",...v.errToObj(e)})}ip(e){return this._addCheck({kind:"ip",...v.errToObj(e)})}datetime(e){var r,n;return typeof e=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:e}):this._addCheck({kind:"datetime",precision:typeof(e==null?void 0:e.precision)>"u"?null:e==null?void 0:e.precision,offset:(r=e==null?void 0:e.offset)!==null&&r!==void 0?r:!1,local:(n=e==null?void 0:e.local)!==null&&n!==void 0?n:!1,...v.errToObj(e==null?void 0:e.message)})}date(e){return this._addCheck({kind:"date",message:e})}time(e){return typeof e=="string"?this._addCheck({kind:"time",precision:null,message:e}):this._addCheck({kind:"time",precision:typeof(e==null?void 0:e.precision)>"u"?null:e==null?void 0:e.precision,...v.errToObj(e==null?void 0:e.message)})}duration(e){return this._addCheck({kind:"duration",...v.errToObj(e)})}regex(e,r){return this._addCheck({kind:"regex",regex:e,...v.errToObj(r)})}includes(e,r){return this._addCheck({kind:"includes",value:e,position:r==null?void 0:r.position,...v.errToObj(r==null?void 0:r.message)})}startsWith(e,r){return this._addCheck({kind:"startsWith",value:e,...v.errToObj(r)})}endsWith(e,r){return this._addCheck({kind:"endsWith",value:e,...v.errToObj(r)})}min(e,r){return this._addCheck({kind:"min",value:e,...v.errToObj(r)})}max(e,r){return this._addCheck({kind:"max",value:e,...v.errToObj(r)})}length(e,r){return this._addCheck({kind:"length",value:e,...v.errToObj(r)})}nonempty(e){return this.min(1,v.errToObj(e))}trim(){return new t({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new t({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new t({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(e=>e.kind==="datetime")}get isDate(){return!!this._def.checks.find(e=>e.kind==="date")}get isTime(){return!!this._def.checks.find(e=>e.kind==="time")}get isDuration(){return!!this._def.checks.find(e=>e.kind==="duration")}get isEmail(){return!!this._def.checks.find(e=>e.kind==="email")}get isURL(){return!!this._def.checks.find(e=>e.kind==="url")}get isEmoji(){return!!this._def.checks.find(e=>e.kind==="emoji")}get isUUID(){return!!this._def.checks.find(e=>e.kind==="uuid")}get isNANOID(){return!!this._def.checks.find(e=>e.kind==="nanoid")}get isCUID(){return!!this._def.checks.find(e=>e.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(e=>e.kind==="cuid2")}get isULID(){return!!this._def.checks.find(e=>e.kind==="ulid")}get isIP(){return!!this._def.checks.find(e=>e.kind==="ip")}get isBase64(){return!!this._def.checks.find(e=>e.kind==="base64")}get minLength(){let e=null;for(let r of this._def.checks)r.kind==="min"&&(e===null||r.value>e)&&(e=r.value);return e}get maxLength(){let e=null;for(let r of this._def.checks)r.kind==="max"&&(e===null||r.value<e)&&(e=r.value);return e}};xe.create=t=>{var e;return new xe({checks:[],typeName:_.ZodString,coerce:(e=t==null?void 0:t.coerce)!==null&&e!==void 0?e:!1,...S(t)})};function lo(t,e){let r=(t.toString().split(".")[1]||"").length,n=(e.toString().split(".")[1]||"").length,i=r>n?r:n,o=parseInt(t.toFixed(i).replace(".","")),a=parseInt(e.toFixed(i).replace(".",""));return o%a/Math.pow(10,i)}var Ie=class t extends M{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(e){if(this._def.coerce&&(e.data=Number(e.data)),this._getType(e)!==y.number){let o=this._getOrReturnCtx(e);return g(o,{code:p.invalid_type,expected:y.number,received:o.parsedType}),T}let n,i=new R;for(let o of this._def.checks)o.kind==="int"?k.isInteger(e.data)||(n=this._getOrReturnCtx(e,n),g(n,{code:p.invalid_type,expected:"integer",received:"float",message:o.message}),i.dirty()):o.kind==="min"?(o.inclusive?e.data<o.value:e.data<=o.value)&&(n=this._getOrReturnCtx(e,n),g(n,{code:p.too_small,minimum:o.value,type:"number",inclusive:o.inclusive,exact:!1,message:o.message}),i.dirty()):o.kind==="max"?(o.inclusive?e.data>o.value:e.data>=o.value)&&(n=this._getOrReturnCtx(e,n),g(n,{code:p.too_big,maximum:o.value,type:"number",inclusive:o.inclusive,exact:!1,message:o.message}),i.dirty()):o.kind==="multipleOf"?lo(e.data,o.value)!==0&&(n=this._getOrReturnCtx(e,n),g(n,{code:p.not_multiple_of,multipleOf:o.value,message:o.message}),i.dirty()):o.kind==="finite"?Number.isFinite(e.data)||(n=this._getOrReturnCtx(e,n),g(n,{code:p.not_finite,message:o.message}),i.dirty()):k.assertNever(o);return{status:i.value,value:e.data}}gte(e,r){return this.setLimit("min",e,!0,v.toString(r))}gt(e,r){return this.setLimit("min",e,!1,v.toString(r))}lte(e,r){return this.setLimit("max",e,!0,v.toString(r))}lt(e,r){return this.setLimit("max",e,!1,v.toString(r))}setLimit(e,r,n,i){return new t({...this._def,checks:[...this._def.checks,{kind:e,value:r,inclusive:n,message:v.toString(i)}]})}_addCheck(e){return new t({...this._def,checks:[...this._def.checks,e]})}int(e){return this._addCheck({kind:"int",message:v.toString(e)})}positive(e){return this._addCheck({kind:"min",value:0,inclusive:!1,message:v.toString(e)})}negative(e){return this._addCheck({kind:"max",value:0,inclusive:!1,message:v.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:0,inclusive:!0,message:v.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:0,inclusive:!0,message:v.toString(e)})}multipleOf(e,r){return this._addCheck({kind:"multipleOf",value:e,message:v.toString(r)})}finite(e){return this._addCheck({kind:"finite",message:v.toString(e)})}safe(e){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:v.toString(e)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:v.toString(e)})}get minValue(){let e=null;for(let r of this._def.checks)r.kind==="min"&&(e===null||r.value>e)&&(e=r.value);return e}get maxValue(){let e=null;for(let r of this._def.checks)r.kind==="max"&&(e===null||r.value<e)&&(e=r.value);return e}get isInt(){return!!this._def.checks.find(e=>e.kind==="int"||e.kind==="multipleOf"&&k.isInteger(e.value))}get isFinite(){let e=null,r=null;for(let n of this._def.checks){if(n.kind==="finite"||n.kind==="int"||n.kind==="multipleOf")return!0;n.kind==="min"?(r===null||n.value>r)&&(r=n.value):n.kind==="max"&&(e===null||n.value<e)&&(e=n.value)}return Number.isFinite(r)&&Number.isFinite(e)}};Ie.create=t=>new Ie({checks:[],typeName:_.ZodNumber,coerce:(t==null?void 0:t.coerce)||!1,...S(t)});var Oe=class t extends M{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(e){if(this._def.coerce&&(e.data=BigInt(e.data)),this._getType(e)!==y.bigint){let o=this._getOrReturnCtx(e);return g(o,{code:p.invalid_type,expected:y.bigint,received:o.parsedType}),T}let n,i=new R;for(let o of this._def.checks)o.kind==="min"?(o.inclusive?e.data<o.value:e.data<=o.value)&&(n=this._getOrReturnCtx(e,n),g(n,{code:p.too_small,type:"bigint",minimum:o.value,inclusive:o.inclusive,message:o.message}),i.dirty()):o.kind==="max"?(o.inclusive?e.data>o.value:e.data>=o.value)&&(n=this._getOrReturnCtx(e,n),g(n,{code:p.too_big,type:"bigint",maximum:o.value,inclusive:o.inclusive,message:o.message}),i.dirty()):o.kind==="multipleOf"?e.data%o.value!==BigInt(0)&&(n=this._getOrReturnCtx(e,n),g(n,{code:p.not_multiple_of,multipleOf:o.value,message:o.message}),i.dirty()):k.assertNever(o);return{status:i.value,value:e.data}}gte(e,r){return this.setLimit("min",e,!0,v.toString(r))}gt(e,r){return this.setLimit("min",e,!1,v.toString(r))}lte(e,r){return this.setLimit("max",e,!0,v.toString(r))}lt(e,r){return this.setLimit("max",e,!1,v.toString(r))}setLimit(e,r,n,i){return new t({...this._def,checks:[...this._def.checks,{kind:e,value:r,inclusive:n,message:v.toString(i)}]})}_addCheck(e){return new t({...this._def,checks:[...this._def.checks,e]})}positive(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:v.toString(e)})}negative(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:v.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:v.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:v.toString(e)})}multipleOf(e,r){return this._addCheck({kind:"multipleOf",value:e,message:v.toString(r)})}get minValue(){let e=null;for(let r of this._def.checks)r.kind==="min"&&(e===null||r.value>e)&&(e=r.value);return e}get maxValue(){let e=null;for(let r of this._def.checks)r.kind==="max"&&(e===null||r.value<e)&&(e=r.value);return e}};Oe.create=t=>{var e;return new Oe({checks:[],typeName:_.ZodBigInt,coerce:(e=t==null?void 0:t.coerce)!==null&&e!==void 0?e:!1,...S(t)})};var Ae=class extends M{_parse(e){if(this._def.coerce&&(e.data=!!e.data),this._getType(e)!==y.boolean){let n=this._getOrReturnCtx(e);return g(n,{code:p.invalid_type,expected:y.boolean,received:n.parsedType}),T}return j(e.data)}};Ae.create=t=>new Ae({typeName:_.ZodBoolean,coerce:(t==null?void 0:t.coerce)||!1,...S(t)});var Pe=class t extends M{_parse(e){if(this._def.coerce&&(e.data=new Date(e.data)),this._getType(e)!==y.date){let o=this._getOrReturnCtx(e);return g(o,{code:p.invalid_type,expected:y.date,received:o.parsedType}),T}if(isNaN(e.data.getTime())){let o=this._getOrReturnCtx(e);return g(o,{code:p.invalid_date}),T}let n=new R,i;for(let o of this._def.checks)o.kind==="min"?e.data.getTime()<o.value&&(i=this._getOrReturnCtx(e,i),g(i,{code:p.too_small,message:o.message,inclusive:!0,exact:!1,minimum:o.value,type:"date"}),n.dirty()):o.kind==="max"?e.data.getTime()>o.value&&(i=this._getOrReturnCtx(e,i),g(i,{code:p.too_big,message:o.message,inclusive:!0,exact:!1,maximum:o.value,type:"date"}),n.dirty()):k.assertNever(o);return{status:n.value,value:new Date(e.data.getTime())}}_addCheck(e){return new t({...this._def,checks:[...this._def.checks,e]})}min(e,r){return this._addCheck({kind:"min",value:e.getTime(),message:v.toString(r)})}max(e,r){return this._addCheck({kind:"max",value:e.getTime(),message:v.toString(r)})}get minDate(){let e=null;for(let r of this._def.checks)r.kind==="min"&&(e===null||r.value>e)&&(e=r.value);return e!=null?new Date(e):null}get maxDate(){let e=null;for(let r of this._def.checks)r.kind==="max"&&(e===null||r.value<e)&&(e=r.value);return e!=null?new Date(e):null}};Pe.create=t=>new Pe({checks:[],coerce:(t==null?void 0:t.coerce)||!1,typeName:_.ZodDate,...S(t)});var et=class extends M{_parse(e){if(this._getType(e)!==y.symbol){let n=this._getOrReturnCtx(e);return g(n,{code:p.invalid_type,expected:y.symbol,received:n.parsedType}),T}return j(e.data)}};et.create=t=>new et({typeName:_.ZodSymbol,...S(t)});var Re=class extends M{_parse(e){if(this._getType(e)!==y.undefined){let n=this._getOrReturnCtx(e);return g(n,{code:p.invalid_type,expected:y.undefined,received:n.parsedType}),T}return j(e.data)}};Re.create=t=>new Re({typeName:_.ZodUndefined,...S(t)});var Le=class extends M{_parse(e){if(this._getType(e)!==y.null){let n=this._getOrReturnCtx(e);return g(n,{code:p.invalid_type,expected:y.null,received:n.parsedType}),T}return j(e.data)}};Le.create=t=>new Le({typeName:_.ZodNull,...S(t)});var _e=class extends M{constructor(){super(...arguments),this._any=!0}_parse(e){return j(e.data)}};_e.create=t=>new _e({typeName:_.ZodAny,...S(t)});var ue=class extends M{constructor(){super(...arguments),this._unknown=!0}_parse(e){return j(e.data)}};ue.create=t=>new ue({typeName:_.ZodUnknown,...S(t)});var X=class extends M{_parse(e){let r=this._getOrReturnCtx(e);return g(r,{code:p.invalid_type,expected:y.never,received:r.parsedType}),T}};X.create=t=>new X({typeName:_.ZodNever,...S(t)});var tt=class extends M{_parse(e){if(this._getType(e)!==y.undefined){let n=this._getOrReturnCtx(e);return g(n,{code:p.invalid_type,expected:y.void,received:n.parsedType}),T}return j(e.data)}};tt.create=t=>new tt({typeName:_.ZodVoid,...S(t)});var ce=class t extends M{_parse(e){let{ctx:r,status:n}=this._processInputParams(e),i=this._def;if(r.parsedType!==y.array)return g(r,{code:p.invalid_type,expected:y.array,received:r.parsedType}),T;if(i.exactLength!==null){let a=r.data.length>i.exactLength.value,s=r.data.length<i.exactLength.value;(a||s)&&(g(r,{code:a?p.too_big:p.too_small,minimum:s?i.exactLength.value:void 0,maximum:a?i.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:i.exactLength.message}),n.dirty())}if(i.minLength!==null&&r.data.length<i.minLength.value&&(g(r,{code:p.too_small,minimum:i.minLength.value,type:"array",inclusive:!0,exact:!1,message:i.minLength.message}),n.dirty()),i.maxLength!==null&&r.data.length>i.maxLength.value&&(g(r,{code:p.too_big,maximum:i.maxLength.value,type:"array",inclusive:!0,exact:!1,message:i.maxLength.message}),n.dirty()),r.common.async)return Promise.all([...r.data].map((a,s)=>i.type._parseAsync(new Y(r,a,r.path,s)))).then(a=>R.mergeArray(n,a));let o=[...r.data].map((a,s)=>i.type._parseSync(new Y(r,a,r.path,s)));return R.mergeArray(n,o)}get element(){return this._def.type}min(e,r){return new t({...this._def,minLength:{value:e,message:v.toString(r)}})}max(e,r){return new t({...this._def,maxLength:{value:e,message:v.toString(r)}})}length(e,r){return new t({...this._def,exactLength:{value:e,message:v.toString(r)}})}nonempty(e){return this.min(1,e)}};ce.create=(t,e)=>new ce({type:t,minLength:null,maxLength:null,exactLength:null,typeName:_.ZodArray,...S(e)});function Xe(t){if(t instanceof F){let e={};for(let r in t.shape){let n=t.shape[r];e[r]=W.create(Xe(n))}return new F({...t._def,shape:()=>e})}else return t instanceof ce?new ce({...t._def,type:Xe(t.element)}):t instanceof W?W.create(Xe(t.unwrap())):t instanceof re?re.create(Xe(t.unwrap())):t instanceof te?te.create(t.items.map(e=>Xe(e))):t}var F=class t extends M{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;let e=this._def.shape(),r=k.objectKeys(e);return this._cached={shape:e,keys:r}}_parse(e){if(this._getType(e)!==y.object){let c=this._getOrReturnCtx(e);return g(c,{code:p.invalid_type,expected:y.object,received:c.parsedType}),T}let{status:n,ctx:i}=this._processInputParams(e),{shape:o,keys:a}=this._getCached(),s=[];if(!(this._def.catchall instanceof X&&this._def.unknownKeys==="strip"))for(let c in i.data)a.includes(c)||s.push(c);let l=[];for(let c of a){let d=o[c],m=i.data[c];l.push({key:{status:"valid",value:c},value:d._parse(new Y(i,m,i.path,c)),alwaysSet:c in i.data})}if(this._def.catchall instanceof X){let c=this._def.unknownKeys;if(c==="passthrough")for(let d of s)l.push({key:{status:"valid",value:d},value:{status:"valid",value:i.data[d]}});else if(c==="strict")s.length>0&&(g(i,{code:p.unrecognized_keys,keys:s}),n.dirty());else if(c!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{let c=this._def.catchall;for(let d of s){let m=i.data[d];l.push({key:{status:"valid",value:d},value:c._parse(new Y(i,m,i.path,d)),alwaysSet:d in i.data})}}return i.common.async?Promise.resolve().then(async()=>{let c=[];for(let d of l){let m=await d.key,w=await d.value;c.push({key:m,value:w,alwaysSet:d.alwaysSet})}return c}).then(c=>R.mergeObjectSync(n,c)):R.mergeObjectSync(n,l)}get shape(){return this._def.shape()}strict(e){return v.errToObj,new t({...this._def,unknownKeys:"strict",...e!==void 0?{errorMap:(r,n)=>{var i,o,a,s;let l=(a=(o=(i=this._def).errorMap)===null||o===void 0?void 0:o.call(i,r,n).message)!==null&&a!==void 0?a:n.defaultError;return r.code==="unrecognized_keys"?{message:(s=v.errToObj(e).message)!==null&&s!==void 0?s:l}:{message:l}}}:{}})}strip(){return new t({...this._def,unknownKeys:"strip"})}passthrough(){return new t({...this._def,unknownKeys:"passthrough"})}extend(e){return new t({...this._def,shape:()=>({...this._def.shape(),...e})})}merge(e){return new t({unknownKeys:e._def.unknownKeys,catchall:e._def.catchall,shape:()=>({...this._def.shape(),...e._def.shape()}),typeName:_.ZodObject})}setKey(e,r){return this.augment({[e]:r})}catchall(e){return new t({...this._def,catchall:e})}pick(e){let r={};return k.objectKeys(e).forEach(n=>{e[n]&&this.shape[n]&&(r[n]=this.shape[n])}),new t({...this._def,shape:()=>r})}omit(e){let r={};return k.objectKeys(this.shape).forEach(n=>{e[n]||(r[n]=this.shape[n])}),new t({...this._def,shape:()=>r})}deepPartial(){return Xe(this)}partial(e){let r={};return k.objectKeys(this.shape).forEach(n=>{let i=this.shape[n];e&&!e[n]?r[n]=i:r[n]=i.optional()}),new t({...this._def,shape:()=>r})}required(e){let r={};return k.objectKeys(this.shape).forEach(n=>{if(e&&!e[n])r[n]=this.shape[n];else{let o=this.shape[n];for(;o instanceof W;)o=o._def.innerType;r[n]=o}}),new t({...this._def,shape:()=>r})}keyof(){return Mn(k.objectKeys(this.shape))}};F.create=(t,e)=>new F({shape:()=>t,unknownKeys:"strip",catchall:X.create(),typeName:_.ZodObject,...S(e)});F.strictCreate=(t,e)=>new F({shape:()=>t,unknownKeys:"strict",catchall:X.create(),typeName:_.ZodObject,...S(e)});F.lazycreate=(t,e)=>new F({shape:t,unknownKeys:"strip",catchall:X.create(),typeName:_.ZodObject,...S(e)});var Ge=class extends M{_parse(e){let{ctx:r}=this._processInputParams(e),n=this._def.options;function i(o){for(let s of o)if(s.result.status==="valid")return s.result;for(let s of o)if(s.result.status==="dirty")return r.common.issues.push(...s.ctx.common.issues),s.result;let a=o.map(s=>new U(s.ctx.common.issues));return g(r,{code:p.invalid_union,unionErrors:a}),T}if(r.common.async)return Promise.all(n.map(async o=>{let a={...r,common:{...r.common,issues:[]},parent:null};return{result:await o._parseAsync({data:r.data,path:r.path,parent:a}),ctx:a}})).then(i);{let o,a=[];for(let l of n){let c={...r,common:{...r.common,issues:[]},parent:null},d=l._parseSync({data:r.data,path:r.path,parent:c});if(d.status==="valid")return d;d.status==="dirty"&&!o&&(o={result:d,ctx:c}),c.common.issues.length&&a.push(c.common.issues)}if(o)return r.common.issues.push(...o.ctx.common.issues),o.result;let s=a.map(l=>new U(l));return g(r,{code:p.invalid_union,unionErrors:s}),T}}get options(){return this._def.options}};Ge.create=(t,e)=>new Ge({options:t,typeName:_.ZodUnion,...S(e)});var le=t=>t instanceof je?le(t.schema):t instanceof H?le(t.innerType()):t instanceof Be?[t.value]:t instanceof ze?t.options:t instanceof Fe?k.objectValues(t.enum):t instanceof Ve?le(t._def.innerType):t instanceof Re?[void 0]:t instanceof Le?[null]:t instanceof W?[void 0,...le(t.unwrap())]:t instanceof re?[null,...le(t.unwrap())]:t instanceof Tt||t instanceof He?le(t.unwrap()):t instanceof Ue?le(t._def.innerType):[],Ut=class t extends M{_parse(e){let{ctx:r}=this._processInputParams(e);if(r.parsedType!==y.object)return g(r,{code:p.invalid_type,expected:y.object,received:r.parsedType}),T;let n=this.discriminator,i=r.data[n],o=this.optionsMap.get(i);return o?r.common.async?o._parseAsync({data:r.data,path:r.path,parent:r}):o._parseSync({data:r.data,path:r.path,parent:r}):(g(r,{code:p.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[n]}),T)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(e,r,n){let i=new Map;for(let o of r){let a=le(o.shape[e]);if(!a.length)throw new Error("A discriminator value for key `".concat(e,"` could not be extracted from all schema options"));for(let s of a){if(i.has(s))throw new Error("Discriminator property ".concat(String(e)," has duplicate value ").concat(String(s)));i.set(s,o)}}return new t({typeName:_.ZodDiscriminatedUnion,discriminator:e,options:r,optionsMap:i,...S(n)})}};function vr(t,e){let r=ve(t),n=ve(e);if(t===e)return{valid:!0,data:t};if(r===y.object&&n===y.object){let i=k.objectKeys(e),o=k.objectKeys(t).filter(s=>i.indexOf(s)!==-1),a={...t,...e};for(let s of o){let l=vr(t[s],e[s]);if(!l.valid)return{valid:!1};a[s]=l.data}return{valid:!0,data:a}}else if(r===y.array&&n===y.array){if(t.length!==e.length)return{valid:!1};let i=[];for(let o=0;o<t.length;o++){let a=t[o],s=e[o],l=vr(a,s);if(!l.valid)return{valid:!1};i.push(l.data)}return{valid:!0,data:i}}else return r===y.date&&n===y.date&&+t==+e?{valid:!0,data:t}:{valid:!1}}var Ne=class extends M{_parse(e){let{status:r,ctx:n}=this._processInputParams(e),i=(o,a)=>{if(yr(o)||yr(a))return T;let s=vr(o.value,a.value);return s.valid?((br(o)||br(a))&&r.dirty(),{status:r.value,value:s.data}):(g(n,{code:p.invalid_intersection_types}),T)};return n.common.async?Promise.all([this._def.left._parseAsync({data:n.data,path:n.path,parent:n}),this._def.right._parseAsync({data:n.data,path:n.path,parent:n})]).then(([o,a])=>i(o,a)):i(this._def.left._parseSync({data:n.data,path:n.path,parent:n}),this._def.right._parseSync({data:n.data,path:n.path,parent:n}))}};Ne.create=(t,e,r)=>new Ne({left:t,right:e,typeName:_.ZodIntersection,...S(r)});var te=class t extends M{_parse(e){let{status:r,ctx:n}=this._processInputParams(e);if(n.parsedType!==y.array)return g(n,{code:p.invalid_type,expected:y.array,received:n.parsedType}),T;if(n.data.length<this._def.items.length)return g(n,{code:p.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),T;!this._def.rest&&n.data.length>this._def.items.length&&(g(n,{code:p.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),r.dirty());let o=[...n.data].map((a,s)=>{let l=this._def.items[s]||this._def.rest;return l?l._parse(new Y(n,a,n.path,s)):null}).filter(a=>!!a);return n.common.async?Promise.all(o).then(a=>R.mergeArray(r,a)):R.mergeArray(r,o)}get items(){return this._def.items}rest(e){return new t({...this._def,rest:e})}};te.create=(t,e)=>{if(!Array.isArray(t))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new te({items:t,typeName:_.ZodTuple,rest:null,...S(e)})};var Ht=class t extends M{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){let{status:r,ctx:n}=this._processInputParams(e);if(n.parsedType!==y.object)return g(n,{code:p.invalid_type,expected:y.object,received:n.parsedType}),T;let i=[],o=this._def.keyType,a=this._def.valueType;for(let s in n.data)i.push({key:o._parse(new Y(n,s,n.path,s)),value:a._parse(new Y(n,n.data[s],n.path,s)),alwaysSet:s in n.data});return n.common.async?R.mergeObjectAsync(r,i):R.mergeObjectSync(r,i)}get element(){return this._def.valueType}static create(e,r,n){return r instanceof M?new t({keyType:e,valueType:r,typeName:_.ZodRecord,...S(n)}):new t({keyType:xe.create(),valueType:e,typeName:_.ZodRecord,...S(r)})}},rt=class extends M{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){let{status:r,ctx:n}=this._processInputParams(e);if(n.parsedType!==y.map)return g(n,{code:p.invalid_type,expected:y.map,received:n.parsedType}),T;let i=this._def.keyType,o=this._def.valueType,a=[...n.data.entries()].map(([s,l],c)=>({key:i._parse(new Y(n,s,n.path,[c,"key"])),value:o._parse(new Y(n,l,n.path,[c,"value"]))}));if(n.common.async){let s=new Map;return Promise.resolve().then(async()=>{for(let l of a){let c=await l.key,d=await l.value;if(c.status==="aborted"||d.status==="aborted")return T;(c.status==="dirty"||d.status==="dirty")&&r.dirty(),s.set(c.value,d.value)}return{status:r.value,value:s}})}else{let s=new Map;for(let l of a){let c=l.key,d=l.value;if(c.status==="aborted"||d.status==="aborted")return T;(c.status==="dirty"||d.status==="dirty")&&r.dirty(),s.set(c.value,d.value)}return{status:r.value,value:s}}}};rt.create=(t,e,r)=>new rt({valueType:e,keyType:t,typeName:_.ZodMap,...S(r)});var nt=class t extends M{_parse(e){let{status:r,ctx:n}=this._processInputParams(e);if(n.parsedType!==y.set)return g(n,{code:p.invalid_type,expected:y.set,received:n.parsedType}),T;let i=this._def;i.minSize!==null&&n.data.size<i.minSize.value&&(g(n,{code:p.too_small,minimum:i.minSize.value,type:"set",inclusive:!0,exact:!1,message:i.minSize.message}),r.dirty()),i.maxSize!==null&&n.data.size>i.maxSize.value&&(g(n,{code:p.too_big,maximum:i.maxSize.value,type:"set",inclusive:!0,exact:!1,message:i.maxSize.message}),r.dirty());let o=this._def.valueType;function a(l){let c=new Set;for(let d of l){if(d.status==="aborted")return T;d.status==="dirty"&&r.dirty(),c.add(d.value)}return{status:r.value,value:c}}let s=[...n.data.values()].map((l,c)=>o._parse(new Y(n,l,n.path,c)));return n.common.async?Promise.all(s).then(l=>a(l)):a(s)}min(e,r){return new t({...this._def,minSize:{value:e,message:v.toString(r)}})}max(e,r){return new t({...this._def,maxSize:{value:e,message:v.toString(r)}})}size(e,r){return this.min(e,r).max(e,r)}nonempty(e){return this.min(1,e)}};nt.create=(t,e)=>new nt({valueType:t,minSize:null,maxSize:null,typeName:_.ZodSet,...S(e)});var Zt=class t extends M{constructor(){super(...arguments),this.validate=this.implement}_parse(e){let{ctx:r}=this._processInputParams(e);if(r.parsedType!==y.function)return g(r,{code:p.invalid_type,expected:y.function,received:r.parsedType}),T;function n(s,l){return Ft({data:s,path:r.path,errorMaps:[r.common.contextualErrorMap,r.schemaErrorMap,zt(),Qe].filter(c=>!!c),issueData:{code:p.invalid_arguments,argumentsError:l}})}function i(s,l){return Ft({data:s,path:r.path,errorMaps:[r.common.contextualErrorMap,r.schemaErrorMap,zt(),Qe].filter(c=>!!c),issueData:{code:p.invalid_return_type,returnTypeError:l}})}let o={errorMap:r.common.contextualErrorMap},a=r.data;if(this._def.returns instanceof Te){let s=this;return j(async function(...l){let c=new U([]),d=await s._def.args.parseAsync(l,o).catch(D=>{throw c.addIssue(n(l,D)),c}),m=await Reflect.apply(a,this,d);return await s._def.returns._def.type.parseAsync(m,o).catch(D=>{throw c.addIssue(i(m,D)),c})})}else{let s=this;return j(function(...l){let c=s._def.args.safeParse(l,o);if(!c.success)throw new U([n(l,c.error)]);let d=Reflect.apply(a,this,c.data),m=s._def.returns.safeParse(d,o);if(!m.success)throw new U([i(d,m.error)]);return m.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...e){return new t({...this._def,args:te.create(e).rest(ue.create())})}returns(e){return new t({...this._def,returns:e})}implement(e){return this.parse(e)}strictImplement(e){return this.parse(e)}static create(e,r,n){return new t({args:e||te.create([]).rest(ue.create()),returns:r||ue.create(),typeName:_.ZodFunction,...S(n)})}},je=class extends M{get schema(){return this._def.getter()}_parse(e){let{ctx:r}=this._processInputParams(e);return this._def.getter()._parse({data:r.data,path:r.path,parent:r})}};je.create=(t,e)=>new je({getter:t,typeName:_.ZodLazy,...S(e)});var Be=class extends M{_parse(e){if(e.data!==this._def.value){let r=this._getOrReturnCtx(e);return g(r,{received:r.data,code:p.invalid_literal,expected:this._def.value}),T}return{status:"valid",value:e.data}}get value(){return this._def.value}};Be.create=(t,e)=>new Be({value:t,typeName:_.ZodLiteral,...S(e)});function Mn(t,e){return new ze({values:t,typeName:_.ZodEnum,...S(e)})}var ze=class t extends M{constructor(){super(...arguments),bt.set(this,void 0)}_parse(e){if(typeof e.data!="string"){let r=this._getOrReturnCtx(e),n=this._def.values;return g(r,{expected:k.joinValues(n),received:r.parsedType,code:p.invalid_type}),T}if(Vt(this,bt,"f")||xn(this,bt,new Set(this._def.values),"f"),!Vt(this,bt,"f").has(e.data)){let r=this._getOrReturnCtx(e),n=this._def.values;return g(r,{received:r.data,code:p.invalid_enum_value,options:n}),T}return j(e.data)}get options(){return this._def.values}get enum(){let e={};for(let r of this._def.values)e[r]=r;return e}get Values(){let e={};for(let r of this._def.values)e[r]=r;return e}get Enum(){let e={};for(let r of this._def.values)e[r]=r;return e}extract(e,r=this._def){return t.create(e,{...this._def,...r})}exclude(e,r=this._def){return t.create(this.options.filter(n=>!e.includes(n)),{...this._def,...r})}};bt=new WeakMap;ze.create=Mn;var Fe=class extends M{constructor(){super(...arguments),vt.set(this,void 0)}_parse(e){let r=k.getValidEnumValues(this._def.values),n=this._getOrReturnCtx(e);if(n.parsedType!==y.string&&n.parsedType!==y.number){let i=k.objectValues(r);return g(n,{expected:k.joinValues(i),received:n.parsedType,code:p.invalid_type}),T}if(Vt(this,vt,"f")||xn(this,vt,new Set(k.getValidEnumValues(this._def.values)),"f"),!Vt(this,vt,"f").has(e.data)){let i=k.objectValues(r);return g(n,{received:n.data,code:p.invalid_enum_value,options:i}),T}return j(e.data)}get enum(){return this._def.values}};vt=new WeakMap;Fe.create=(t,e)=>new Fe({values:t,typeName:_.ZodNativeEnum,...S(e)});var Te=class extends M{unwrap(){return this._def.type}_parse(e){let{ctx:r}=this._processInputParams(e);if(r.parsedType!==y.promise&&r.common.async===!1)return g(r,{code:p.invalid_type,expected:y.promise,received:r.parsedType}),T;let n=r.parsedType===y.promise?r.data:Promise.resolve(r.data);return j(n.then(i=>this._def.type.parseAsync(i,{path:r.path,errorMap:r.common.contextualErrorMap})))}};Te.create=(t,e)=>new Te({type:t,typeName:_.ZodPromise,...S(e)});var H=class extends M{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===_.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(e){let{status:r,ctx:n}=this._processInputParams(e),i=this._def.effect||null,o={addIssue:a=>{g(n,a),a.fatal?r.abort():r.dirty()},get path(){return n.path}};if(o.addIssue=o.addIssue.bind(o),i.type==="preprocess"){let a=i.transform(n.data,o);if(n.common.async)return Promise.resolve(a).then(async s=>{if(r.value==="aborted")return T;let l=await this._def.schema._parseAsync({data:s,path:n.path,parent:n});return l.status==="aborted"?T:l.status==="dirty"||r.value==="dirty"?Je(l.value):l});{if(r.value==="aborted")return T;let s=this._def.schema._parseSync({data:a,path:n.path,parent:n});return s.status==="aborted"?T:s.status==="dirty"||r.value==="dirty"?Je(s.value):s}}if(i.type==="refinement"){let a=s=>{let l=i.refinement(s,o);if(n.common.async)return Promise.resolve(l);if(l instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return s};if(n.common.async===!1){let s=this._def.schema._parseSync({data:n.data,path:n.path,parent:n});return s.status==="aborted"?T:(s.status==="dirty"&&r.dirty(),a(s.value),{status:r.value,value:s.value})}else return this._def.schema._parseAsync({data:n.data,path:n.path,parent:n}).then(s=>s.status==="aborted"?T:(s.status==="dirty"&&r.dirty(),a(s.value).then(()=>({status:r.value,value:s.value}))))}if(i.type==="transform")if(n.common.async===!1){let a=this._def.schema._parseSync({data:n.data,path:n.path,parent:n});if(!xt(a))return a;let s=i.transform(a.value,o);if(s instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:r.value,value:s}}else return this._def.schema._parseAsync({data:n.data,path:n.path,parent:n}).then(a=>xt(a)?Promise.resolve(i.transform(a.value,o)).then(s=>({status:r.value,value:s})):a);k.assertNever(i)}};H.create=(t,e,r)=>new H({schema:t,typeName:_.ZodEffects,effect:e,...S(r)});H.createWithPreprocess=(t,e,r)=>new H({schema:e,effect:{type:"preprocess",transform:t},typeName:_.ZodEffects,...S(r)});var W=class extends M{_parse(e){return this._getType(e)===y.undefined?j(void 0):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}};W.create=(t,e)=>new W({innerType:t,typeName:_.ZodOptional,...S(e)});var re=class extends M{_parse(e){return this._getType(e)===y.null?j(null):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}};re.create=(t,e)=>new re({innerType:t,typeName:_.ZodNullable,...S(e)});var Ve=class extends M{_parse(e){let{ctx:r}=this._processInputParams(e),n=r.data;return r.parsedType===y.undefined&&(n=this._def.defaultValue()),this._def.innerType._parse({data:n,path:r.path,parent:r})}removeDefault(){return this._def.innerType}};Ve.create=(t,e)=>new Ve({innerType:t,typeName:_.ZodDefault,defaultValue:typeof e.default=="function"?e.default:()=>e.default,...S(e)});var Ue=class extends M{_parse(e){let{ctx:r}=this._processInputParams(e),n={...r,common:{...r.common,issues:[]}},i=this._def.innerType._parse({data:n.data,path:n.path,parent:{...n}});return _t(i)?i.then(o=>({status:"valid",value:o.status==="valid"?o.value:this._def.catchValue({get error(){return new U(n.common.issues)},input:n.data})})):{status:"valid",value:i.status==="valid"?i.value:this._def.catchValue({get error(){return new U(n.common.issues)},input:n.data})}}removeCatch(){return this._def.innerType}};Ue.create=(t,e)=>new Ue({innerType:t,typeName:_.ZodCatch,catchValue:typeof e.catch=="function"?e.catch:()=>e.catch,...S(e)});var it=class extends M{_parse(e){if(this._getType(e)!==y.nan){let n=this._getOrReturnCtx(e);return g(n,{code:p.invalid_type,expected:y.nan,received:n.parsedType}),T}return{status:"valid",value:e.data}}};it.create=t=>new it({typeName:_.ZodNaN,...S(t)});var uo=Symbol("zod_brand"),Tt=class extends M{_parse(e){let{ctx:r}=this._processInputParams(e),n=r.data;return this._def.type._parse({data:n,path:r.path,parent:r})}unwrap(){return this._def.type}},St=class t extends M{_parse(e){let{status:r,ctx:n}=this._processInputParams(e);if(n.common.async)return(async()=>{let o=await this._def.in._parseAsync({data:n.data,path:n.path,parent:n});return o.status==="aborted"?T:o.status==="dirty"?(r.dirty(),Je(o.value)):this._def.out._parseAsync({data:o.value,path:n.path,parent:n})})();{let i=this._def.in._parseSync({data:n.data,path:n.path,parent:n});return i.status==="aborted"?T:i.status==="dirty"?(r.dirty(),{status:"dirty",value:i.value}):this._def.out._parseSync({data:i.value,path:n.path,parent:n})}}static create(e,r){return new t({in:e,out:r,typeName:_.ZodPipeline})}},He=class extends M{_parse(e){let r=this._def.innerType._parse(e),n=i=>(xt(i)&&(i.value=Object.freeze(i.value)),i);return _t(r)?r.then(i=>n(i)):n(r)}unwrap(){return this._def.innerType}};He.create=(t,e)=>new He({innerType:t,typeName:_.ZodReadonly,...S(e)});function kn(t,e={},r){return t?_e.create().superRefine((n,i)=>{var o,a;if(!t(n)){let s=typeof e=="function"?e(n):typeof e=="string"?{message:e}:e,l=(a=(o=s.fatal)!==null&&o!==void 0?o:r)!==null&&a!==void 0?a:!0,c=typeof s=="string"?{message:s}:s;i.addIssue({code:"custom",...c,fatal:l})}}):_e.create()}var co={object:F.lazycreate},_;(function(t){t.ZodString="ZodString",t.ZodNumber="ZodNumber",t.ZodNaN="ZodNaN",t.ZodBigInt="ZodBigInt",t.ZodBoolean="ZodBoolean",t.ZodDate="ZodDate",t.ZodSymbol="ZodSymbol",t.ZodUndefined="ZodUndefined",t.ZodNull="ZodNull",t.ZodAny="ZodAny",t.ZodUnknown="ZodUnknown",t.ZodNever="ZodNever",t.ZodVoid="ZodVoid",t.ZodArray="ZodArray",t.ZodObject="ZodObject",t.ZodUnion="ZodUnion",t.ZodDiscriminatedUnion="ZodDiscriminatedUnion",t.ZodIntersection="ZodIntersection",t.ZodTuple="ZodTuple",t.ZodRecord="ZodRecord",t.ZodMap="ZodMap",t.ZodSet="ZodSet",t.ZodFunction="ZodFunction",t.ZodLazy="ZodLazy",t.ZodLiteral="ZodLiteral",t.ZodEnum="ZodEnum",t.ZodEffects="ZodEffects",t.ZodNativeEnum="ZodNativeEnum",t.ZodOptional="ZodOptional",t.ZodNullable="ZodNullable",t.ZodDefault="ZodDefault",t.ZodCatch="ZodCatch",t.ZodPromise="ZodPromise",t.ZodBranded="ZodBranded",t.ZodPipeline="ZodPipeline",t.ZodReadonly="ZodReadonly"})(_||(_={}));var fo=(t,e={message:"Input not instance of ".concat(t.name)})=>kn(r=>r instanceof t,e),wn=xe.create,Dn=Ie.create,po=it.create,ho=Oe.create,Cn=Ae.create,mo=Pe.create,go=et.create,yo=Re.create,bo=Le.create,vo=_e.create,xo=ue.create,_o=X.create,To=tt.create,So=ce.create,Mo=F.create,ko=F.strictCreate,wo=Ge.create,Do=Ut.create,Co=Ne.create,Eo=te.create,Io=Ht.create,Oo=rt.create,Ao=nt.create,Po=Zt.create,Ro=je.create,Lo=Be.create,Go=ze.create,No=Fe.create,jo=Te.create,bn=H.create,Bo=W.create,zo=re.create,Fo=H.createWithPreprocess,Vo=St.create,Uo=()=>wn().optional(),Ho=()=>Dn().optional(),Zo=()=>Cn().optional(),$o={string:t=>xe.create({...t,coerce:!0}),number:t=>Ie.create({...t,coerce:!0}),boolean:t=>Ae.create({...t,coerce:!0}),bigint:t=>Oe.create({...t,coerce:!0}),date:t=>Pe.create({...t,coerce:!0})},Wo=T,h=Object.freeze({__proto__:null,defaultErrorMap:Qe,setErrorMap:$i,getErrorMap:zt,makeIssue:Ft,EMPTY_PATH:Wi,addIssueToContext:g,ParseStatus:R,INVALID:T,DIRTY:Je,OK:j,isAborted:yr,isDirty:br,isValid:xt,isAsync:_t,get util(){return k},get objectUtil(){return gr},ZodParsedType:y,getParsedType:ve,ZodType:M,datetimeRegex:Sn,ZodString:xe,ZodNumber:Ie,ZodBigInt:Oe,ZodBoolean:Ae,ZodDate:Pe,ZodSymbol:et,ZodUndefined:Re,ZodNull:Le,ZodAny:_e,ZodUnknown:ue,ZodNever:X,ZodVoid:tt,ZodArray:ce,ZodObject:F,ZodUnion:Ge,ZodDiscriminatedUnion:Ut,ZodIntersection:Ne,ZodTuple:te,ZodRecord:Ht,ZodMap:rt,ZodSet:nt,ZodFunction:Zt,ZodLazy:je,ZodLiteral:Be,ZodEnum:ze,ZodNativeEnum:Fe,ZodPromise:Te,ZodEffects:H,ZodTransformer:H,ZodOptional:W,ZodNullable:re,ZodDefault:Ve,ZodCatch:Ue,ZodNaN:it,BRAND:uo,ZodBranded:Tt,ZodPipeline:St,ZodReadonly:He,custom:kn,Schema:M,ZodSchema:M,late:co,get ZodFirstPartyTypeKind(){return _},coerce:$o,any:vo,array:So,bigint:ho,boolean:Cn,date:mo,discriminatedUnion:Do,effect:bn,enum:Go,function:Po,instanceof:fo,intersection:Co,lazy:Ro,literal:Lo,map:Oo,nan:po,nativeEnum:No,never:_o,null:bo,nullable:zo,number:Dn,object:Mo,oboolean:Zo,onumber:Ho,optional:Bo,ostring:Uo,pipeline:Vo,preprocess:Fo,promise:jo,record:Io,set:Ao,strictObject:ko,string:wn,symbol:go,transformer:bn,tuple:Eo,undefined:yo,union:wo,unknown:xo,void:To,NEVER:Wo,ZodIssueCode:p,quotelessJson:Zi,ZodError:U});f();function er(t){return(t%(2*Math.PI)+2*Math.PI)%(2*Math.PI)}f();f();var We=class extends ye{},he=class{constructor(e,r){u(this,"id");u(this,"positionDirty",!0);u(this,"object3d",new We);u(this,"components");u(this,"disposed",!1);u(this,"worldPosition",new z);this.id=e.id||N(),this.components=[e],this.object3d=new We,this.object3d.position.copy(r),this.object3d.userData.entityId=this.id,this.object3d.userData.type=this.type}get type(){return this.components[0].type}get parentObject3D(){return this.object3d.parent}get position(){return this.object3d.getWorldPosition(this.worldPosition),this.worldPosition}setAltitude(e){this.object3d.position.z=e}};f();f();f();f();f();f();f();var B=63710088e-1,si={centimeters:B*100,centimetres:B*100,degrees:B/111325,feet:B*3.28084,inches:B*39.37,kilometers:B/1e3,kilometres:B/1e3,meters:B,metres:B,miles:B/1609.344,millimeters:B*1e3,millimetres:B*1e3,nauticalmiles:B/1852,radians:1,yards:B*1.0936},Fu={centimeters:100,centimetres:100,degrees:1/111325,feet:3.28084,inches:39.37,kilometers:1/1e3,kilometres:1/1e3,meters:1,metres:1,miles:1/1609.344,millimeters:1e3,millimetres:1e3,nauticalmiles:1/1852,radians:1/B,yards:1.0936133};function Ye(t,e,r){r===void 0&&(r={});var n={type:"Feature"};return(r.id===0||r.id)&&(n.id=r.id),r.bbox&&(n.bbox=r.bbox),n.properties=e||{},n.geometry=t,n}function Bs(t,e,r){if(r===void 0&&(r={}),!t)throw new Error("coordinates is required");if(!Array.isArray(t))throw new Error("coordinates must be an Array");if(t.length<2)throw new Error("coordinates must be at least 2 numbers long");if(!ai(t[0])||!ai(t[1]))throw new Error("coordinates must contain numbers");var n={type:"Point",coordinates:t};return Ye(n,e,r)}function Vu(t,e,r){r===void 0&&(r={});for(var n=0,i=t;n<i.length;n++){var o=i[n];if(o.length<4)throw new Error("Each LinearRing of a Polygon must have 4 or more Positions.");for(var a=0;a<o[o.length-1].length;a++)if(o[o.length-1][a]!==o[0][a])throw new Error("First and last Position are not equivalent.")}var s={type:"Polygon",coordinates:t};return Ye(s,e,r)}function li(t,e,r){if(r===void 0&&(r={}),t.length<2)throw new Error("coordinates must be an array of two or more positions");var n={type:"LineString",coordinates:t};return Ye(n,e,r)}function Uu(t,e){e===void 0&&(e={});var r={type:"FeatureCollection"};return e.id&&(r.id=e.id),e.bbox&&(r.bbox=e.bbox),r.features=t,r}function Hu(t,e,r){r===void 0&&(r={});var n={type:"MultiLineString",coordinates:t};return Ye(n,e,r)}function Zu(t,e){e===void 0&&(e="kilometers");var r=si[e];if(!r)throw new Error(e+" units is invalid");return t*r}function $u(t,e){e===void 0&&(e="kilometers");var r=si[e];if(!r)throw new Error(e+" units is invalid");return t/r}function Wu(t){var e=t%(2*Math.PI);return e*180/Math.PI}function Yu(t){var e=t%360;return e*Math.PI/180}function ai(t){return!isNaN(t)&&t!==null&&!Array.isArray(t)}function tr(t,e,r){if(t!==null)for(var n,i,o,a,s,l,c,d=0,m=0,w,D=t.type,I=D==="FeatureCollection",C=D==="Feature",L=I?t.features.length:1,G=0;G<L;G++){c=I?t.features[G].geometry:C?t.geometry:t,w=c?c.type==="GeometryCollection":!1,s=w?c.geometries.length:1;for(var ee=0;ee<s;ee++){var $=0,we=0;if(a=w?c.geometries[ee]:c,a!==null){l=a.coordinates;var ge=a.type;switch(d=r&&(ge==="Polygon"||ge==="MultiPolygon")?1:0,ge){case null:break;case"Point":if(e(l,m,G,$,we)===!1)return!1;m++,$++;break;case"LineString":case"MultiPoint":for(n=0;n<l.length;n++){if(e(l[n],m,G,$,we)===!1)return!1;m++,ge==="MultiPoint"&&$++}ge==="LineString"&&$++;break;case"Polygon":case"MultiLineString":for(n=0;n<l.length;n++){for(i=0;i<l[n].length-d;i++){if(e(l[n][i],m,G,$,we)===!1)return!1;m++}ge==="MultiLineString"&&$++,ge==="Polygon"&&we++}ge==="Polygon"&&$++;break;case"MultiPolygon":for(n=0;n<l.length;n++){for(we=0,i=0;i<l[n].length;i++){for(o=0;o<l[n][i].length-d;o++){if(e(l[n][i][o],m,G,$,we)===!1)return!1;m++}we++}$++}break;case"GeometryCollection":for(n=0;n<a.geometries.length;n++)if(tr(a.geometries[n],e,r)===!1)return!1;break;default:throw new Error("Unknown Geometry Type")}}}}}function Qu(t,e){if(t.type==="Feature")e(t,0);else if(t.type==="FeatureCollection")for(var r=0;r<t.features.length&&e(t.features[r],r)!==!1;r++);}function zs(t,e){var r,n,i,o,a,s,l,c,d,m,w=0,D=t.type==="FeatureCollection",I=t.type==="Feature",C=D?t.features.length:1;for(r=0;r<C;r++){for(s=D?t.features[r].geometry:I?t.geometry:t,c=D?t.features[r].properties:I?t.properties:{},d=D?t.features[r].bbox:I?t.bbox:void 0,m=D?t.features[r].id:I?t.id:void 0,l=s?s.type==="GeometryCollection":!1,a=l?s.geometries.length:1,i=0;i<a;i++){if(o=l?s.geometries[i]:s,o===null){if(e(null,w,c,d,m)===!1)return!1;continue}switch(o.type){case"Point":case"LineString":case"MultiPoint":case"Polygon":case"MultiLineString":case"MultiPolygon":{if(e(o,w,c,d,m)===!1)return!1;break}case"GeometryCollection":{for(n=0;n<o.geometries.length;n++)if(e(o.geometries[n],w,c,d,m)===!1)return!1;break}default:throw new Error("Unknown Geometry Type")}}w++}}function Fs(t,e){zs(t,function(r,n,i,o,a){var s=r===null?null:r.type;switch(s){case null:case"Point":case"LineString":case"Polygon":return e(Ye(r,i,{bbox:o,id:a}),n,0)===!1?!1:void 0}var l;switch(s){case"MultiPoint":l="Point";break;case"MultiLineString":l="LineString";break;case"MultiPolygon":l="Polygon";break}for(var c=0;c<r.coordinates.length;c++){var d=r.coordinates[c],m={type:l,coordinates:d};if(e(Ye(m,i),n,c)===!1)return!1}})}function Vs(t,e){Fs(t,function(r,n,i){var o=0;if(r.geometry){var a=r.geometry.type;if(!(a==="Point"||a==="MultiPoint")){var s,l=0,c=0,d=0;if(tr(r,function(m,w,D,I,C){if(s===void 0||n>l||I>c||C>d){s=m,l=n,c=I,d=C,o=0;return}var L=li([s,m],r.properties);if(e(L,n,i,C,o)===!1)return!1;o++,s=m})===!1)return!1}}})}function ec(t,e,r){var n=r,i=!1;return Vs(t,function(o,a,s,l,c){i===!1&&r===void 0?n=o:n=e(n,o,a,s,l,c),i=!0}),n}function Or(t){var e=[1/0,1/0,-1/0,-1/0];return tr(t,function(r){e[0]>r[0]&&(e[0]=r[0]),e[1]>r[1]&&(e[1]=r[1]),e[2]<r[0]&&(e[2]=r[0]),e[3]<r[1]&&(e[3]=r[1])}),e}Or.default=Or;var ui=Or;function ci(t){return ui(t)}f();var Ar="#ffffff";var Pr=class{constructor(e={}){u(this,"initialColor",Ar);u(this,"color",Ar);u(this,"topColor");u(this,"topTexture");u(this,"texture");u(this,"hoverColor");u(this,"dirty",!0);u(this,"visible",!0);u(this,"opacity",1);u(this,"width",.1);u(this,"height",.1);u(this,"initialHeight",.1);u(this,"altitude",0);u(this,"join","round");u(this,"cap","round");u(this,"outline",!0);u(this,"showImage",!0);u(this,"flipImageToFaceCamera",!0);u(this,"url");u(this,"side","double");u(this,"renderOrder",0);this.color=(e==null?void 0:e.color)!==void 0?e.color:this.color,this.initialColor=this.color,this.width=(e==null?void 0:e.width)!==void 0?e.width:this.width,this.opacity=(e==null?void 0:e.opacity)!==void 0?e.opacity:this.opacity,this.visible=(e==null?void 0:e.visible)!==void 0?e.visible:this.visible,this.height=(e==null?void 0:e.height)!==void 0?e.height:this.height,this.initialHeight=this.height,this.altitude=(e==null?void 0:e.altitude)!==void 0?e.altitude:this.altitude,this.join=(e==null?void 0:e.join)!==void 0?e.join:this.join,this.cap=(e==null?void 0:e.cap)!==void 0?e.cap:this.cap,this.topColor=e==null?void 0:e.topColor,this.texture=e==null?void 0:e.texture,this.topTexture=e==null?void 0:e.topTexture,this.outline=(e==null?void 0:e.outline)!==void 0?!!e.outline:this.outline,this.showImage=(e==null?void 0:e.showImage)!==void 0?e.showImage:this.showImage,this.flipImageToFaceCamera=(e==null?void 0:e.flipImageToFaceCamera)!==void 0?e.flipImageToFaceCamera:this.flipImageToFaceCamera,this.url=e==null?void 0:e.url,this.side=(e==null?void 0:e.side)!==void 0?e.side:this.side,this.renderOrder=(e==null?void 0:e.renderOrder)!==void 0?e.renderOrder:this.renderOrder}};var Se=class extends nn{constructor(){super(...arguments);u(this,"type","entityBatchedMesh");u(this,"userData",{entities:{}})}},Et,It,qe,ne=class{constructor(e){u(this,"mesh");u(this,"focusMesh");u(this,"outline");u(this,"imageMesh");u(this,"textMesh");u(this,"textEntityId");u(this,"type","geometry");u(this,"dirty",!0);u(this,"detached",!1);u(this,"instanceIndex",-1);u(this,"geometry");u(this,"material");u(this,"feature");u(this,"currentHeight",.1);u(this,"focusable",!1);u(this,"color",new ae);u(this,"topColor",new ae);u(this,"position",new z);V(this,Et,0);V(this,It,1);V(this,qe,void 0);u(this,"texturesVisible",!1);this.feature=e}get visible(){return this.mesh?this.mesh.getVisibleAt(this.instanceIndex):!1}set visible(e){this.mesh&&this.mesh.setVisibleAt(this.instanceIndex,e)}get renderOrder(){return this.mesh?this.mesh.renderOrder:0}set renderOrder(e){this.mesh&&(this.mesh.renderOrder=e)}setColor(e,r){this.color.set(e),this.topColor.set(r),this.material&&this.material.setColor(this.instanceIndex,this.color,this.topColor)}getColor(){var e;return(e=this.material)==null?void 0:e.getColor(this.instanceIndex)}get altitude(){return E(this,Et)}set altitude(e){this.mesh&&(this.mesh.position.z=e,P(this,Et,e))}get opacity(){return E(this,It)}set opacity(e){if(this.material&&(this.material.opacity=e,this.material.transparent=e<1,this.material.needsUpdate=!0),this.imageMesh){let r=Array.isArray(this.imageMesh.material)?this.imageMesh.material:[this.imageMesh.material];for(let n of r)n.opacity=e,n.needsUpdate=!0}P(this,It,e)}get texture(){var e,r;return(r=(e=this.material)==null?void 0:e.texture)==null?void 0:r.image.src}set texture(e){this.material&&(this.material.texture=e)}get textureInstance(){var e;return(e=this.material)==null?void 0:e.texture}set topTexture(e){this.material&&(this.material.topTexture=e)}get topTexture(){var e,r;return(r=(e=this.material)==null?void 0:e.topTexture)==null?void 0:r.image.src}get topTextureInstance(){var e;return(e=this.material)==null?void 0:e.topTexture}get featureBbox(){return E(this,qe)?E(this,qe):(P(this,qe,ci(this.feature)),E(this,qe))}showTextures(){this.material&&(this.material.showTextures(this.instanceIndex),this.texturesVisible=!0)}hideTextures(){this.material&&(this.material.hideTextures(this.instanceIndex),this.texturesVisible=!1)}removeSideTexture(){this.material&&this.material.removeSideTexture(this.instanceIndex)}removeTopTexture(){this.material&&this.material.removeTopTexture(this.instanceIndex)}};Et=new WeakMap,It=new WeakMap,qe=new WeakMap;f();var Hs="#ffffff",Me,rr=class{constructor(e={}){u(this,"color",Hs);u(this,"topColor");u(this,"opacity",1);u(this,"height");V(this,Me,void 0);u(this,"outline",!0);u(this,"texture");u(this,"topTexture");u(this,"dirty",!0);var r,n;this.color=(r=e==null?void 0:e.color)!=null?r:this.color,this.topColor=e==null?void 0:e.topColor,this.opacity=(n=e==null?void 0:e.opacity)!=null?n:this.opacity,this.height=e==null?void 0:e.height,this.shading=e==null?void 0:e.shading,this.outline=(e==null?void 0:e.outline)!==void 0?!!e.outline:this.outline}get shading(){return E(this,Me)}set shading(e){var r;if(!e){P(this,Me,void 0);return}P(this,Me,(r=E(this,Me))!=null?r:{start:0,end:0,intensity:0}),Object.assign(E(this,Me),e)}};Me=new WeakMap;f();f();function lt(t){var r;let e=(r=t.parent)==null?void 0:r.children.find(n=>n.userData.outlineOfEntityId===t.userData.entityId);return e instanceof Nt?e:void 0}f();f();f();f();var ut=class{constructor(){u(this,"hover",!1);u(this,"dirty",!1)}};f();f();var di=["","","low","medium","high","always-visible"];function fi(t){return Math.min(5,Math.max(2,t))}function ct(t){if(typeof t=="number")return fi(t);let e=di.indexOf(t);return e===-1?3:e}function Ec(t){let e=fi(t);return di[e]}var nr=4,Rr=h.object({rank:h.union([h.enum(["low","medium","high","always-visible"]),h.number()]).optional(),interactive:h.union([h.boolean(),h.literal("pointer-events-auto")]).optional(),id:h.string().optional(),anchor:h.union([h.enum(["top","bottom","left","right","center","top-left","top-right","bottom-left","bottom-right"]),h.array(h.enum(["top","bottom","left","right","center","top-left","top-right","bottom-left","bottom-right"]))]).optional(),dynamicResize:h.boolean().optional(),zIndex:h.number().optional()});function Nc(t,e,r){h.array(h.number()).refine(n=>n.length===2||n.length===3,{message:"Array length must be either 2 or 3"}).parse(t),h.string().parse(e),Rr.parse(r)}var dt=class dt{constructor(e,r={}){u(this,"id");u(this,"type","marker");u(this,"rank",0);u(this,"initialRank",0);u(this,"activeAnchor","center");u(this,"pointerEvents","none");u(this,"options",{rank:"low",interactive:!1,id:"",anchor:"center",dynamicResize:!1,zIndex:void 0});u(this,"projection",new Gt);u(this,"enabled",!0);u(this,"canShow",!1);u(this,"visible",!0);u(this,"offscreen",!1);u(this,"strategyIndex",-1);u(this,"activeBoundingBox",{x:0,y:0,w:0,h:0});u(this,"dimensions",{width:0,height:0});u(this,"containerEl");u(this,"contentEl",null);u(this,"contentHtml","");u(this,"style",{top:"0px",left:"0px"});u(this,"dirty",!1);u(this,"collisionDirty",!0);u(this,"visibilityNeedsUpdate","show");u(this,"animation",null);u(this,"currentStrategyIndex",-1);u(this,"onStrategySelected",(e,r=!1)=>{if(this.currentStrategyIndex===e||r)return;this.currentStrategyIndex=e,this.activeAnchor=this.strategies[e].name,this.containerEl.getAttribute("data-anchor")!==this.activeAnchor&&this.containerEl.setAttribute("data-anchor",this.activeAnchor);let{width:n,height:i}=this.dimensions,o=-i/2+"px",a=-n/2+"px";switch(this.style.top=o,this.style.left=a,this.activeAnchor){case"top":{this.style.top=-i+"px";break}case"bottom":{this.style.top="0px";break}case"left":{this.style.left=-n+"px";break}case"right":{this.style.left="0px";break}case"top-left":{this.style.top=-i+"px",this.style.left=-n+"px";break}case"top-right":{this.style.top=-i+"px",this.style.left="0px";break}case"bottom-left":{this.style.top="0px",this.style.left=-n+"px";break}case"bottom-right":{this.style.top="0px",this.style.left="0px";break}default:this.style.top=o,this.style.left=a}this.containerEl.style.top=this.style.top,this.containerEl.style.left=this.style.left});u(this,"packedMessage",{x:0,y:0,enabled:!1,rank:0,bboxes:[],lockedToStrategyIndex:-1,shouldCollideWithScreenEdges:!1});if(this.id=(r==null?void 0:r.id)||N(),this.options={...this.options,...r},typeof r.rank=="string")this.rank=ct(r.rank);else if(r.rank!=null&&r.rank>0)this.rank=r.rank;else{let i=Math.trunc(x.env.NODE_ENV==="test"?dt.testId:dt.testId*10)/10;dt.testId+=.001,this.rank=i}typeof r.interactive=="string"&&(this.pointerEvents=r.interactive==="pointer-events-auto"?"auto":"none"),this.contentHtml=e,this.initialRank=this.rank;let n=document.createElement("div");n.style.opacity="0",n.innerHTML='<div class="mappedin-marker">'.concat(this.contentHtml,"</div>"),this.containerEl=n.querySelector(".mappedin-marker"),this.containerEl.setAttribute("data-marker-id",this.id.toString()),this.contentEl=this.containerEl?this.containerEl.firstElementChild:null}updateDimensions(e,r){if(e!=null&&r!=null)this.dimensions={width:e,height:r};else{let{width:n,height:i}=this.containerEl.getBoundingClientRect();this.dimensions={width:n,height:i}}Object.assign(this.containerEl,{width:this.dimensions.width+"px",height:this.dimensions.height+"px"}),this.currentStrategyIndex=-1}get strategies(){let{width:e,height:r}=this.dimensions;return(Array.isArray(this.options.anchor)?this.options.anchor:[this.options.anchor]).map(i=>({name:i,getBoundingBox:()=>{let o=r/2,a=r/2,s=e/2,l=e/2;switch(i){case"top":{o=r,a=0;break}case"bottom":{o=0,a=r;break}case"left":{s=e,l=0;break}case"right":{s=0,l=e;break}case"top-left":{o=r,s=e,a=0,l=0;break}case"top-right":{o=r,l=e,a=0,s=0;break}case"bottom-left":{a=r,s=e,o=0,l=0;break}case"bottom-right":{a=r,l=e,o=0,s=0;break}}return[o+nr,a+nr,s+nr,l+nr]}}))}toPackedMessage(e=!1){return this.packedMessage.x=this.projection.x,this.packedMessage.y=this.projection.y,this.packedMessage.enabled=this.enabled,this.packedMessage.rank=this.rank,this.packedMessage.shouldCollideWithScreenEdges=!0,this.visible&&e&&this.currentStrategyIndex!==-1?this.packedMessage.lockedToStrategyIndex=this.currentStrategyIndex:this.packedMessage.lockedToStrategyIndex=-1,this.collisionDirty?(this.packedMessage.bboxes=this.strategies.map((r,n)=>[...r.getBoundingBox(),n]),this.collisionDirty=!1,this.packedMessage):this.packedMessage}destroy(){}};u(dt,"testId",0);var pi=dt;f();var ke=class t extends ye{constructor(r){super();u(this,"childrenIds",new Set);u(this,"children",[]);u(this,"type","group-container");u(this,"userData",{entityId:"",entities2D:new Set,dirty:!0});u(this,"components",[]);this.userData.entityId=r}addEntity(r){r instanceof t?(this.childrenIds.add(r.userData.entityId),this.add(r)):r instanceof he?(this.childrenIds.add(r.id),this.add(r.object3d),this.userData.entities2D.add(r.id)):r instanceof oe?(this.childrenIds.add(r.userData.entityId),this.add(r)):r instanceof ie&&r.object3d&&(this.childrenIds.add(r.id),this.add(r.object3d)),this.dispatchEvent({type:"childadded",child:this})}removeEntity(r){r instanceof t?(this.childrenIds.delete(r.userData.entityId),this.remove(r)):r instanceof he?(this.childrenIds.delete(r.id),this.userData.entities2D.delete(r.id),this.remove(r.object3d)):r instanceof oe?(this.childrenIds.delete(r.userData.entityId),this.remove(r)):r instanceof ie&&r.object3d&&(this.childrenIds.delete(r.id),this.add(r.object3d)),this.dispatchEvent({type:"childremoved",child:this})}setVisible(r){this.visible=r,this.dispatchEvent({type:"childremoved",child:this})}setAltitude(r){this.position.z=r,this.dispatchEvent({type:"childremoved",child:this})}get altitude(){return this.position.z}};f();f();function ir(t){"@babel/helpers - typeof";return ir=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},ir(t)}var Zs=/^\s+/,$s=/\s+$/;function b(t,e){if(t=t||"",e=e||{},t instanceof b)return t;if(!(this instanceof b))return new b(t,e);var r=Ws(t);this._originalInput=t,this._r=r.r,this._g=r.g,this._b=r.b,this._a=r.a,this._roundA=Math.round(100*this._a)/100,this._format=e.format||r.format,this._gradientType=e.gradientType,this._r<1&&(this._r=Math.round(this._r)),this._g<1&&(this._g=Math.round(this._g)),this._b<1&&(this._b=Math.round(this._b)),this._ok=r.ok}b.prototype={isDark:function(){return this.getBrightness()<128},isLight:function(){return!this.isDark()},isValid:function(){return this._ok},getOriginalInput:function(){return this._originalInput},getFormat:function(){return this._format},getAlpha:function(){return this._a},getBrightness:function(){var e=this.toRgb();return(e.r*299+e.g*587+e.b*114)/1e3},getLuminance:function(){var e=this.toRgb(),r,n,i,o,a,s;return r=e.r/255,n=e.g/255,i=e.b/255,r<=.03928?o=r/12.92:o=Math.pow((r+.055)/1.055,2.4),n<=.03928?a=n/12.92:a=Math.pow((n+.055)/1.055,2.4),i<=.03928?s=i/12.92:s=Math.pow((i+.055)/1.055,2.4),.2126*o+.7152*a+.0722*s},setAlpha:function(e){return this._a=xi(e),this._roundA=Math.round(100*this._a)/100,this},toHsv:function(){var e=mi(this._r,this._g,this._b);return{h:e.h*360,s:e.s,v:e.v,a:this._a}},toHsvString:function(){var e=mi(this._r,this._g,this._b),r=Math.round(e.h*360),n=Math.round(e.s*100),i=Math.round(e.v*100);return this._a==1?"hsv("+r+", "+n+"%, "+i+"%)":"hsva("+r+", "+n+"%, "+i+"%, "+this._roundA+")"},toHsl:function(){var e=hi(this._r,this._g,this._b);return{h:e.h*360,s:e.s,l:e.l,a:this._a}},toHslString:function(){var e=hi(this._r,this._g,this._b),r=Math.round(e.h*360),n=Math.round(e.s*100),i=Math.round(e.l*100);return this._a==1?"hsl("+r+", "+n+"%, "+i+"%)":"hsla("+r+", "+n+"%, "+i+"%, "+this._roundA+")"},toHex:function(e){return gi(this._r,this._g,this._b,e)},toHexString:function(e){return"#"+this.toHex(e)},toHex8:function(e){return Xs(this._r,this._g,this._b,this._a,e)},toHex8String:function(e){return"#"+this.toHex8(e)},toRgb:function(){return{r:Math.round(this._r),g:Math.round(this._g),b:Math.round(this._b),a:this._a}},toRgbString:function(){return this._a==1?"rgb("+Math.round(this._r)+", "+Math.round(this._g)+", "+Math.round(this._b)+")":"rgba("+Math.round(this._r)+", "+Math.round(this._g)+", "+Math.round(this._b)+", "+this._roundA+")"},toPercentageRgb:function(){return{r:Math.round(A(this._r,255)*100)+"%",g:Math.round(A(this._g,255)*100)+"%",b:Math.round(A(this._b,255)*100)+"%",a:this._a}},toPercentageRgbString:function(){return this._a==1?"rgb("+Math.round(A(this._r,255)*100)+"%, "+Math.round(A(this._g,255)*100)+"%, "+Math.round(A(this._b,255)*100)+"%)":"rgba("+Math.round(A(this._r,255)*100)+"%, "+Math.round(A(this._g,255)*100)+"%, "+Math.round(A(this._b,255)*100)+"%, "+this._roundA+")"},toName:function(){return this._a===0?"transparent":this._a<1?!1:ul[gi(this._r,this._g,this._b,!0)]||!1},toFilter:function(e){var r="#"+yi(this._r,this._g,this._b,this._a),n=r,i=this._gradientType?"GradientType = 1, ":"";if(e){var o=b(e);n="#"+yi(o._r,o._g,o._b,o._a)}return"progid:DXImageTransform.Microsoft.gradient("+i+"startColorstr="+r+",endColorstr="+n+")"},toString:function(e){var r=!!e;e=e||this._format;var n=!1,i=this._a<1&&this._a>=0,o=!r&&i&&(e==="hex"||e==="hex6"||e==="hex3"||e==="hex4"||e==="hex8"||e==="name");return o?e==="name"&&this._a===0?this.toName():this.toRgbString():(e==="rgb"&&(n=this.toRgbString()),e==="prgb"&&(n=this.toPercentageRgbString()),(e==="hex"||e==="hex6")&&(n=this.toHexString()),e==="hex3"&&(n=this.toHexString(!0)),e==="hex4"&&(n=this.toHex8String(!0)),e==="hex8"&&(n=this.toHex8String()),e==="name"&&(n=this.toName()),e==="hsl"&&(n=this.toHslString()),e==="hsv"&&(n=this.toHsvString()),n||this.toHexString())},clone:function(){return b(this.toString())},_applyModification:function(e,r){var n=e.apply(null,[this].concat([].slice.call(r)));return this._r=n._r,this._g=n._g,this._b=n._b,this.setAlpha(n._a),this},lighten:function(){return this._applyModification(tl,arguments)},brighten:function(){return this._applyModification(rl,arguments)},darken:function(){return this._applyModification(nl,arguments)},desaturate:function(){return this._applyModification(Js,arguments)},saturate:function(){return this._applyModification(Qs,arguments)},greyscale:function(){return this._applyModification(el,arguments)},spin:function(){return this._applyModification(il,arguments)},_applyCombination:function(e,r){return e.apply(null,[this].concat([].slice.call(r)))},analogous:function(){return this._applyCombination(sl,arguments)},complement:function(){return this._applyCombination(ol,arguments)},monochromatic:function(){return this._applyCombination(ll,arguments)},splitcomplement:function(){return this._applyCombination(al,arguments)},triad:function(){return this._applyCombination(bi,[3])},tetrad:function(){return this._applyCombination(bi,[4])}};b.fromRatio=function(t,e){if(ir(t)=="object"){var r={};for(var n in t)t.hasOwnProperty(n)&&(n==="a"?r[n]=t[n]:r[n]=Ot(t[n]));t=r}return b(t,e)};function Ws(t){var e={r:0,g:0,b:0},r=1,n=null,i=null,o=null,a=!1,s=!1;return typeof t=="string"&&(t=pl(t)),ir(t)=="object"&&(me(t.r)&&me(t.g)&&me(t.b)?(e=Ys(t.r,t.g,t.b),a=!0,s=String(t.r).substr(-1)==="%"?"prgb":"rgb"):me(t.h)&&me(t.s)&&me(t.v)?(n=Ot(t.s),i=Ot(t.v),e=Ks(t.h,n,i),a=!0,s="hsv"):me(t.h)&&me(t.s)&&me(t.l)&&(n=Ot(t.s),o=Ot(t.l),e=qs(t.h,n,o),a=!0,s="hsl"),t.hasOwnProperty("a")&&(r=t.a)),r=xi(r),{ok:a,format:t.format||s,r:Math.min(255,Math.max(e.r,0)),g:Math.min(255,Math.max(e.g,0)),b:Math.min(255,Math.max(e.b,0)),a:r}}function Ys(t,e,r){return{r:A(t,255)*255,g:A(e,255)*255,b:A(r,255)*255}}function hi(t,e,r){t=A(t,255),e=A(e,255),r=A(r,255);var n=Math.max(t,e,r),i=Math.min(t,e,r),o,a,s=(n+i)/2;if(n==i)o=a=0;else{var l=n-i;switch(a=s>.5?l/(2-n-i):l/(n+i),n){case t:o=(e-r)/l+(e<r?6:0);break;case e:o=(r-t)/l+2;break;case r:o=(t-e)/l+4;break}o/=6}return{h:o,s:a,l:s}}function qs(t,e,r){var n,i,o;t=A(t,360),e=A(e,100),r=A(r,100);function a(c,d,m){return m<0&&(m+=1),m>1&&(m-=1),m<1/6?c+(d-c)*6*m:m<1/2?d:m<2/3?c+(d-c)*(2/3-m)*6:c}if(e===0)n=i=o=r;else{var s=r<.5?r*(1+e):r+e-r*e,l=2*r-s;n=a(l,s,t+1/3),i=a(l,s,t),o=a(l,s,t-1/3)}return{r:n*255,g:i*255,b:o*255}}function mi(t,e,r){t=A(t,255),e=A(e,255),r=A(r,255);var n=Math.max(t,e,r),i=Math.min(t,e,r),o,a,s=n,l=n-i;if(a=n===0?0:l/n,n==i)o=0;else{switch(n){case t:o=(e-r)/l+(e<r?6:0);break;case e:o=(r-t)/l+2;break;case r:o=(t-e)/l+4;break}o/=6}return{h:o,s:a,v:s}}function Ks(t,e,r){t=A(t,360)*6,e=A(e,100),r=A(r,100);var n=Math.floor(t),i=t-n,o=r*(1-e),a=r*(1-i*e),s=r*(1-(1-i)*e),l=n%6,c=[r,a,o,o,s,r][l],d=[s,r,r,a,o,o][l],m=[o,o,s,r,r,a][l];return{r:c*255,g:d*255,b:m*255}}function gi(t,e,r,n){var i=[Q(Math.round(t).toString(16)),Q(Math.round(e).toString(16)),Q(Math.round(r).toString(16))];return n&&i[0].charAt(0)==i[0].charAt(1)&&i[1].charAt(0)==i[1].charAt(1)&&i[2].charAt(0)==i[2].charAt(1)?i[0].charAt(0)+i[1].charAt(0)+i[2].charAt(0):i.join("")}function Xs(t,e,r,n,i){var o=[Q(Math.round(t).toString(16)),Q(Math.round(e).toString(16)),Q(Math.round(r).toString(16)),Q(_i(n))];return i&&o[0].charAt(0)==o[0].charAt(1)&&o[1].charAt(0)==o[1].charAt(1)&&o[2].charAt(0)==o[2].charAt(1)&&o[3].charAt(0)==o[3].charAt(1)?o[0].charAt(0)+o[1].charAt(0)+o[2].charAt(0)+o[3].charAt(0):o.join("")}function yi(t,e,r,n){var i=[Q(_i(n)),Q(Math.round(t).toString(16)),Q(Math.round(e).toString(16)),Q(Math.round(r).toString(16))];return i.join("")}b.equals=function(t,e){return!t||!e?!1:b(t).toRgbString()==b(e).toRgbString()};b.random=function(){return b.fromRatio({r:Math.random(),g:Math.random(),b:Math.random()})};function Js(t,e){e=e===0?0:e||10;var r=b(t).toHsl();return r.s-=e/100,r.s=or(r.s),b(r)}function Qs(t,e){e=e===0?0:e||10;var r=b(t).toHsl();return r.s+=e/100,r.s=or(r.s),b(r)}function el(t){return b(t).desaturate(100)}function tl(t,e){e=e===0?0:e||10;var r=b(t).toHsl();return r.l+=e/100,r.l=or(r.l),b(r)}function rl(t,e){e=e===0?0:e||10;var r=b(t).toRgb();return r.r=Math.max(0,Math.min(255,r.r-Math.round(255*-(e/100)))),r.g=Math.max(0,Math.min(255,r.g-Math.round(255*-(e/100)))),r.b=Math.max(0,Math.min(255,r.b-Math.round(255*-(e/100)))),b(r)}function nl(t,e){e=e===0?0:e||10;var r=b(t).toHsl();return r.l-=e/100,r.l=or(r.l),b(r)}function il(t,e){var r=b(t).toHsl(),n=(r.h+e)%360;return r.h=n<0?360+n:n,b(r)}function ol(t){var e=b(t).toHsl();return e.h=(e.h+180)%360,b(e)}function bi(t,e){if(isNaN(e)||e<=0)throw new Error("Argument to polyad must be a positive number");for(var r=b(t).toHsl(),n=[b(t)],i=360/e,o=1;o<e;o++)n.push(b({h:(r.h+o*i)%360,s:r.s,l:r.l}));return n}function al(t){var e=b(t).toHsl(),r=e.h;return[b(t),b({h:(r+72)%360,s:e.s,l:e.l}),b({h:(r+216)%360,s:e.s,l:e.l})]}function sl(t,e,r){e=e||6,r=r||30;var n=b(t).toHsl(),i=360/r,o=[b(t)];for(n.h=(n.h-(i*e>>1)+720)%360;--e;)n.h=(n.h+i)%360,o.push(b(n));return o}function ll(t,e){e=e||6;for(var r=b(t).toHsv(),n=r.h,i=r.s,o=r.v,a=[],s=1/e;e--;)a.push(b({h:n,s:i,v:o})),o=(o+s)%1;return a}b.mix=function(t,e,r){r=r===0?0:r||50;var n=b(t).toRgb(),i=b(e).toRgb(),o=r/100,a={r:(i.r-n.r)*o+n.r,g:(i.g-n.g)*o+n.g,b:(i.b-n.b)*o+n.b,a:(i.a-n.a)*o+n.a};return b(a)};b.readability=function(t,e){var r=b(t),n=b(e);return(Math.max(r.getLuminance(),n.getLuminance())+.05)/(Math.min(r.getLuminance(),n.getLuminance())+.05)};b.isReadable=function(t,e,r){var n=b.readability(t,e),i,o;switch(o=!1,i=hl(r),i.level+i.size){case"AAsmall":case"AAAlarge":o=n>=4.5;break;case"AAlarge":o=n>=3;break;case"AAAsmall":o=n>=7;break}return o};b.mostReadable=function(t,e,r){var n=null,i=0,o,a,s,l;r=r||{},a=r.includeFallbackColors,s=r.level,l=r.size;for(var c=0;c<e.length;c++)o=b.readability(t,e[c]),o>i&&(i=o,n=b(e[c]));return b.isReadable(t,n,{level:s,size:l})||!a?n:(r.includeFallbackColors=!1,b.mostReadable(t,["#fff","#000"],r))};var Lr=b.names={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"0ff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000",blanchedalmond:"ffebcd",blue:"00f",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",burntsienna:"ea7e5d",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"0ff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkgrey:"a9a9a9",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkslategrey:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dimgrey:"696969",dodgerblue:"1e90ff",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"f0f",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",grey:"808080",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgray:"d3d3d3",lightgreen:"90ee90",lightgrey:"d3d3d3",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslategray:"789",lightslategrey:"789",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"0f0",limegreen:"32cd32",linen:"faf0e6",magenta:"f0f",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370db",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"db7093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",rebeccapurple:"663399",red:"f00",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",slategrey:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",wheat:"f5deb3",white:"fff",whitesmoke:"f5f5f5",yellow:"ff0",yellowgreen:"9acd32"},ul=b.hexNames=cl(Lr);function cl(t){var e={};for(var r in t)t.hasOwnProperty(r)&&(e[t[r]]=r);return e}function xi(t){return t=parseFloat(t),(isNaN(t)||t<0||t>1)&&(t=1),t}function A(t,e){dl(t)&&(t="100%");var r=fl(t);return t=Math.min(e,Math.max(0,parseFloat(t))),r&&(t=parseInt(t*e,10)/100),Math.abs(t-e)<1e-6?1:t%e/parseFloat(e)}function or(t){return Math.min(1,Math.max(0,t))}function Z(t){return parseInt(t,16)}function dl(t){return typeof t=="string"&&t.indexOf(".")!=-1&&parseFloat(t)===1}function fl(t){return typeof t=="string"&&t.indexOf("%")!=-1}function Q(t){return t.length==1?"0"+t:""+t}function Ot(t){return t<=1&&(t=t*100+"%"),t}function _i(t){return Math.round(parseFloat(t)*255).toString(16)}function vi(t){return Z(t)/255}var J=function(){var t="[-\\+]?\\d+%?",e="[-\\+]?\\d*\\.\\d+%?",r="(?:"+e+")|(?:"+t+")",n="[\\s|\\(]+("+r+")[,|\\s]+("+r+")[,|\\s]+("+r+")\\s*\\)?",i="[\\s|\\(]+("+r+")[,|\\s]+("+r+")[,|\\s]+("+r+")[,|\\s]+("+r+")\\s*\\)?";return{CSS_UNIT:new RegExp(r),rgb:new RegExp("rgb"+n),rgba:new RegExp("rgba"+i),hsl:new RegExp("hsl"+n),hsla:new RegExp("hsla"+i),hsv:new RegExp("hsv"+n),hsva:new RegExp("hsva"+i),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/}}();function me(t){return!!J.CSS_UNIT.exec(t)}function pl(t){t=t.replace(Zs,"").replace($s,"").toLowerCase();var e=!1;if(Lr[t])t=Lr[t],e=!0;else if(t=="transparent")return{r:0,g:0,b:0,a:0,format:"name"};var r;return(r=J.rgb.exec(t))?{r:r[1],g:r[2],b:r[3]}:(r=J.rgba.exec(t))?{r:r[1],g:r[2],b:r[3],a:r[4]}:(r=J.hsl.exec(t))?{h:r[1],s:r[2],l:r[3]}:(r=J.hsla.exec(t))?{h:r[1],s:r[2],l:r[3],a:r[4]}:(r=J.hsv.exec(t))?{h:r[1],s:r[2],v:r[3]}:(r=J.hsva.exec(t))?{h:r[1],s:r[2],v:r[3],a:r[4]}:(r=J.hex8.exec(t))?{r:Z(r[1]),g:Z(r[2]),b:Z(r[3]),a:vi(r[4]),format:e?"name":"hex8"}:(r=J.hex6.exec(t))?{r:Z(r[1]),g:Z(r[2]),b:Z(r[3]),format:e?"name":"hex"}:(r=J.hex4.exec(t))?{r:Z(r[1]+""+r[1]),g:Z(r[2]+""+r[2]),b:Z(r[3]+""+r[3]),a:vi(r[4]+""+r[4]),format:e?"name":"hex8"}:(r=J.hex3.exec(t))?{r:Z(r[1]+""+r[1]),g:Z(r[2]+""+r[2]),b:Z(r[3]+""+r[3]),format:e?"name":"hex"}:!1}function hl(t){var e,r;return t=t||{level:"AA",size:"small"},e=(t.level||"AA").toUpperCase(),r=(t.size||"small").toLowerCase(),e!=="AA"&&e!=="AAA"&&(e="AA"),r!=="small"&&r!=="large"&&(r="small"),{level:e,size:r}}var Gr=zi(oi());var jr=h.object({rank:h.union([h.enum(["low","medium","high","always-visible"]),h.number()]).optional(),interactive:h.boolean().optional(),appearance:h.object({margin:h.number().min(6).optional(),text:h.object({numLines:h.number().optional(),lineHeight:h.number().optional(),size:h.number().optional(),maxWidth:h.number().optional(),foregroundColor:h.string().optional(),backgroundColor:h.string().optional()}).optional(),marker:h.object({size:h.number().optional(),foregroundColor:h.object({active:h.string().optional(),inactive:h.string().optional()}).optional(),backgroundColor:h.object({active:h.string().optional(),inactive:h.string().optional()}).optional()}).optional()}).optional()});function td(t,e,r){h.array(h.number()).length(2).parse(t),h.string().parse(e),jr.parse(r||{})}var ft={margin:6,text:{numLines:2,lineHeight:1.2,size:11.5,maxWidth:150,foregroundColor:"white",backgroundColor:"#333"},marker:{size:5,foregroundColor:{active:"white",inactive:void 0},backgroundColor:{active:"#333",inactive:void 0}}},ml={lightOnDark:{...ft,text:{...ft.text,foregroundColor:"white",backgroundColor:"#333"},marker:{...ft.marker,foregroundColor:{active:"white",inactive:void 0},backgroundColor:{active:"#333",inactive:void 0}}},darkOnLight:{...ft,text:{...ft.text,foregroundColor:"#333",backgroundColor:"white"},marker:{...ft.marker,foregroundColor:{active:"#333",inactive:void 0},backgroundColor:{active:"white",inactive:void 0}}}},gl="LOW_PRIORITY",Ti=4,yl=6,bl=20,vl=2.5,xl=2,_l="cover",Si=.5,Mi=6.5,ki={heightAbovePolygon:0,appearance:ml.darkOnLight};var pt=class pt{constructor(e,r,n){u(this,"lines",0);u(this,"id");u(this,"rank");u(this,"type","label");u(this,"initialRank");u(this,"contextConfigured",!1);u(this,"fillText");u(this,"newStyle",{});u(this,"opacity",0);u(this,"visibilityNeedsUpdate",!1);u(this,"text");u(this,"style",{top:0,left:0,textLabelVisible:!0,pinVisibility:1,textAlign:"left"});u(this,"projection",new Gt);u(this,"_cache",{});u(this,"appearance");u(this,"options");u(this,"visible",!0);u(this,"enabled",!0);u(this,"offscreen",!1);u(this,"canShow",!1);u(this,"activeBoundingBox",{x:0,y:0,w:0,h:0});u(this,"dimensions",{width:0,height:0});u(this,"currentStrategyIndex",-1);u(this,"totalMarkerSize",0);u(this,"dirty",!0);u(this,"collisionDirty",!0);u(this,"lastTextAlign");u(this,"imageHash");u(this,"markerSize",0);u(this,"iconVisible",!1);u(this,"zoomProportion",0);u(this,"dp");u(this,"animate",!0);u(this,"onStrategySelected",e=>{if(this.currentStrategyIndex===e)return;let r=this.strategies[e];r&&r.onStrategySelected(this),this.currentStrategyIndex=e;let n=this.style;this.style=this.newStyle,this.newStyle=n});u(this,"packedMessage",{x:0,y:0,enabled:!1,rank:0,bboxes:[],shouldCollideWithScreenEdges:!1,lockedToStrategyIndex:-1});var o,a;if(this.id=(o=r.id)!=null?o:N(),this.options=(0,Gr.default)({},r,ki),this.text=e,this.dp=(s=1)=>s*n.pixelRatio,typeof r.rank=="string")this.rank=ct(r.rank),this.initialRank=this.rank;else if(r.rank!=null&&r.rank>0)this.rank=r.rank,this.initialRank=r.rank;else{let s=Math.trunc(x.env.NODE_ENV==="test"?pt.testId:pt.testId*10)/10;pt.testId+=.001,this.rank=s,this.initialRank=s}let i=(0,Gr.default)({},this.options.appearance,ki.appearance);this.appearance={margin:i.margin,text:{lineHeight:i.text.lineHeight,numLines:i.text.numLines,size:i.text.size,maxWidth:i.text.maxWidth,foregroundColor:i.text.foregroundColor,backgroundColor:i.text.backgroundColor},marker:{foregroundColor:{active:i.marker.foregroundColor.active,inactive:i.marker.foregroundColor.inactive||b(i.marker.foregroundColor.active).setAlpha(.5).toRgbString()},backgroundColor:{active:i.marker.backgroundColor.active,inactive:i.marker.backgroundColor.inactive||b(i.marker.backgroundColor.active).setAlpha(.5).toRgbString()},icon:i.marker.icon,iconSize:i.marker.iconSize||bl,iconPadding:(a=i.marker.iconPadding)!=null?a:xl,iconFit:i.marker.iconFit||_l,iconVisibilityThreshold:i.marker.iconVisibilityThreshold==null?Si:i.marker.iconVisibilityThreshold}},this.calculateMarkerSize()}setEntity(){}calculateMarkerSize(){let{iconVisibilityThreshold:e=Si}=this.appearance.marker,r=this.dp();this.zoomProportion<=e&&typeof this.appearance.marker.iconSize<"u"&&this.imageHash?(this.markerSize=this.dp(this.appearance.marker.iconSize),this.iconVisible=!0):(this.iconVisible=!1,this.markerSize=this.dp(Mi)),this.totalMarkerSize=Math.ceil((this.markerSize+vl)/r)}get lowPriorityStrategyIndex(){return this.text===""?-1:3}get strategies(){let{width:e,height:r}=this.dimensions,{margin:n}=this.appearance;this.calculateMarkerSize();let i=Math.max(yl,n),o=this.iconVisible?i/2:0,a=this.iconVisible?this.totalMarkerSize:Mi*2,s=[{name:"RIGHT",getBoundingBox:()=>{let l=Math.max(this.totalMarkerSize,r);return[l/2+i,l/2+i,this.totalMarkerSize/2+i,this.totalMarkerSize/2+e+i]},onStrategySelected:()=>{this.newStyle.textAlign="left",this.newStyle.pinVisibility=1,this.newStyle.top=-r/2,this.newStyle.left=this.totalMarkerSize/2+Ti,this.newStyle.textLabelVisible=!0}},{name:"LEFT",getBoundingBox:()=>{let l=Math.max(this.totalMarkerSize,r);return[l/2+i,l/2+i,this.totalMarkerSize/2+e+i,this.totalMarkerSize/2+i]},onStrategySelected:()=>{this.newStyle.textAlign="right",this.newStyle.pinVisibility=1,this.newStyle.top=-r/2,this.newStyle.left=-e-this.totalMarkerSize/2-Ti,this.newStyle.textLabelVisible=!0}},{name:"TOP",getBoundingBox:()=>{let l=this.dp();return[r+this.totalMarkerSize/2/l+i,this.totalMarkerSize/2+i,e/2+i,e/2+i]},onStrategySelected:()=>{this.newStyle.pinVisibility=1,this.newStyle.textAlign="center",this.newStyle.textLabelVisible=!0,this.newStyle.top=-r-this.totalMarkerSize/2,this.newStyle.left=-e/2}},{name:gl,getBoundingBox:()=>[a/2+o,a/2+o,a/2+o,a/2+o],onStrategySelected:()=>{this.newStyle.pinVisibility=.5,this.newStyle.textLabelVisible=!1,this.newStyle.top=0,this.newStyle.left=0}}];return this.text===""?[{name:"ICON_ONLY",getBoundingBox:()=>[this.totalMarkerSize/2+i,this.totalMarkerSize/2+i,this.totalMarkerSize/2+i,this.totalMarkerSize/2+i],onStrategySelected:()=>{this.newStyle.pinVisibility=1,this.newStyle.textLabelVisible=!1,this.newStyle.top=0,this.newStyle.left=0}}]:s}updatePosition(){}disable(){this.visible=!1}toPackedMessage(e=!1){return this.visible&&e&&this.currentStrategyIndex!=null&&this.currentStrategyIndex!==-1&&this.currentStrategyIndex!==this.lowPriorityStrategyIndex?this.packedMessage.lockedToStrategyIndex=this.currentStrategyIndex:this.packedMessage.lockedToStrategyIndex=-1,this.packedMessage.x=this.projection.x,this.packedMessage.y=this.projection.y,this.packedMessage.enabled=this.enabled,this.packedMessage.rank=this.rank,this.collisionDirty?(this.packedMessage.bboxes=this.strategies.map((r,n)=>[...r.getBoundingBox(),n]),this.packedMessage.shouldCollideWithScreenEdges=!1,this.collisionDirty=!1,this.packedMessage):this.packedMessage}destroy(){}};u(pt,"testId",0);var Nr=pt,rd=Nr;f();f();var wi=class extends yt{constructor(r,n){super();u(this,"rendererState");u(this,"convertTo3DMapPosition");u(this,"textSet",new Set);u(this,"batchedTextMap",new Map);u(this,"debugTextAreaMesh",new Map);this.rendererState=r,this.convertTo3DMapPosition=n}remove(r){this.textSet.delete(r)}update(r){var s,l,c;let n,i,o,a=[];for(let d of this.rendererState.geometry3DIdsInScene)if(n=this.rendererState.geometry3DMap.get(d),(n==null?void 0:n.type)==="text3d"){i=n.components[0],o=n.components[1];let m=(s=i.mesh)==null?void 0:s.parent;if(!m||!(m instanceof ke)||!(i instanceof sr))continue;if((l=i.feature.properties)!=null&&l.textArea&&i.mesh!=null&&i.polygonEntityId!=null&&i.textMesh==null&&i.mesh.parent!=null&&((c=i.feature.properties)==null?void 0:c.textArea.position)!=null){if(this.textSet.has(i.polygonEntityId))continue;this.textSet.add(i.polygonEntityId),this.batchedTextMap.has(m)||this.batchedTextMap.set(m,Fr().then(({BatchedText:I})=>{let C=new I;return C.type="batchedtext",m.add(C),C}));let D=this.batchedTextMap.get(m);if(!D)throw new Error("batched text required");a.push(Tl({entityId:d,textComponent:i,styleComponent:o,convertTo3DMapPosition:this.convertTo3DMapPosition,batchedMeshPromise:D,rendererState:this.rendererState}).then(()=>{this.publish("render")}))}let w=this.batchedTextMap.get(m);i.textMesh&&w&&Promise.all([w,Promise.resolve({meshComponent:i,styleComponent:o})]).then(([D,{meshComponent:I,styleComponent:C}])=>{let{textMesh:L}=I;if(D&&L){let G=Vr(D,L);I.visible&&!G?D.add(L):!I.visible&&G&&D.remove(L)}C.flipToFaceCamera&&this.flipIfNeeded(I,r)})}return Promise.all(a)}flipIfNeeded(r,n){let i=r.textMesh;if(!i)return!1;let o=i.rotation.z,a=er(o+n);a>Math.PI/2&&a<3*Math.PI/2&&(i.rotation.z=er(o+Math.PI))}showTextAreaMesh(){let r,n;for(let i of this.rendererState.geometry3DIdsInScene)if(r=this.rendererState.geometry3DMap.get(i),(r==null?void 0:r.type)==="text3d"){n=r.components[0];let o=n.feature.properties.textArea;if(!o)continue;let a=new tn(o.maxWidth,o.maxHeight),s=new en(a,new Qr({color:"pink"})),{textMesh:l}=n;if(!l)continue;let c=this.convertTo3DMapPosition(o.position,At);s.position.copy(c),s.position.z=l.position.z-.1,s.rotation.z=l.rotation.z,Br.identity(),Br.makeRotationAxis(new z(0,0,1),l.userData.rotationZ),At.set(o.maxWidth/2,0,0),At.applyMatrix4(Br),s.position.x-=At.x,s.position.y-=At.y,this.rendererState.entityScene.add(s),this.debugTextAreaMesh.set(i,s)}this.publish("render")}hideTextAreaMesh(){this.debugTextAreaMesh.forEach(r=>{this.rendererState.entityScene.remove(r)}),this.debugTextAreaMesh.clear(),this.publish("render")}},Br=new gt,At=new z,zr;async function fd(t){let{preloadFont:e}=await Fr();return e(t)}function Fr(){return zr||(zr=import("./text3d-7MFD4QFJ.js").then(t=>t)),zr}async function Tl({entityId:t,textComponent:e,styleComponent:r,convertTo3DMapPosition:n,batchedMeshPromise:i,rendererState:o}){return Promise.all([Fr(),Promise.resolve({entityId:t,meshComponent:e,styleComponent:r})]).then(([{createTroikaText:a},s])=>a(s.entityId,s.meshComponent,s.styleComponent,n)).catch(a=>{se.warn("Trouble creating text: ",a)}).then(a=>{if(a!=null&&a.text){if(e.polygonEntityId){let s=o.geometry3DMap.get(e.polygonEntityId);if((s==null?void 0:s.type)==="geometry"){let l=s.components[0],c=s.components[1];l.textMesh=a.text,l.mesh!=null&&(a.text.position.z=c.altitude+c.height+Sl)}}return Promise.all([Promise.resolve(a.text),i])}}).then(a=>{if(!a)return;let[s,l]=a;l.add(s),e.batchedText||(e.batchedText=l)})}function Vr(t,e){return t._members.has(e)}var Sl=.5;var Ml=h.object({visible:h.boolean(),color:h.string(),flipToFaceCamera:h.boolean(),font:h.string().optional(),fontSize:h.number(),margin:h.union([h.number(),h.tuple([h.number(),h.number(),h.number(),h.number()])]),outlineColor:h.string(),outlineOpacity:h.number(),outlineBlur:h.union([h.number(),h.string()]),outlineWidth:h.number(),outlineOffsetX:h.number(),outlineOffsetY:h.number(),strokeWidth:h.number(),maxWidth:h.number().optional(),maxHeight:h.number().optional(),strokeOpacity:h.number(),strokeColor:h.string(),fillOpacity:h.number(),hoverColor:h.string().optional(),id:h.union([h.string(),h.number()]),type:h.literal("text3d"),position:h.tuple([h.number(),h.number(),h.number()]),content:h.string()}),Di=Ml.partial().omit({id:!0,type:!0}).strict(),Ci=Di.omit({margin:!0,position:!0,maxWidth:!0,maxHeight:!0,content:!0}).strict(),vd=h.object({appearance:Di.optional(),parentId:h.string().optional()}).strict(),sr=class{constructor(e){u(this,"mesh",new Ke);u(this,"textMesh");u(this,"type","text3d");u(this,"feature");u(this,"parent");u(this,"batchedText");u(this,"polygonEntityId");this.feature=e}get visible(){return this.batchedText&&this.textMesh?Vr(this.batchedText,this.textMesh):this.textMesh?this.textMesh.visible:!1}set visible(e){this.batchedText&&this.textMesh?e?this.batchedText.addText(this.textMesh):this.batchedText.removeText(this.textMesh):this.textMesh&&(this.textMesh.visible=e),this.mesh.visible=e}};function Pt(t,e,r){if(e!==void 0){if(t.type==="model"||t.type==="path"||t.type==="marker"||t.type==="label"||t.type==="geometry"||t.type==="group-container")return e===!0?(t instanceof he&&t.components[1]===void 0?(t.components[1]=new ut,t.components[1].dirty=!0):t instanceof ie&&t.components[2]===void 0?(t.components[2]=new ut,t.components[2].dirty=!0):t instanceof ke&&t.components[1]===void 0&&(t.components[1]=new ut,t.components[1].dirty=!0),!0):(t instanceof he?t.components[1]=void 0:t instanceof ie?t.components[2]=void 0:t instanceof ke&&(t.components[1]=void 0),!0);if(t.type==="geometry-group"){let n;for(let i of t.userData.entities3D.values())n=r.geometry3DMap.get(i),Pt(n,e,r);return!0}}return!1}function Ld(t,e,r){if(!(!(r!=null&&r.color)&&!(r!=null&&r.topColor))){if(r!==void 0&&t.type==="geometry-group"&&t.components[0]!=null){let n,i,o=t.components[0];for(let a of t.userData.entities3D.values())n=e.geometry3DMap.get(a),n&&(i=n.components[1],i.color===o.color&&(i.initialColor=r.color||o.color,i.color=r.color||o.color,i.dirty=!0),i.topColor===o.topColor&&(i.topColor=r.topColor||o.topColor,i.dirty=!0));return r.color!==void 0&&(o.color=r.color,o.dirty=!0),r.topColor!==void 0&&(o.topColor=r.topColor,o.dirty=!0),!0}return!1}}function Gd(t,e){if(e!==void 0&&t.type==="geometry-group"&&t.components[0]!=null){let r=t.components[0];return r.shading=r.shading||{},r.shading&&(e.start!==r.shading.start||e.end!==r.shading.end||e.intensity!==r.shading.intensity)&&(Object.assign(r.shading,e),t.userData.shadingDirty=!0),!0}return!1}function Nd(t,e){e!==void 0&&t.type==="geometry"&&(e.showImage!==void 0&&(t.components[1].showImage=e.showImage),e.flipImageToFaceCamera!==void 0&&(t.components[1].flipImageToFaceCamera=e.flipImageToFaceCamera))}function jd(t,e,r){var n;if(r!==void 0){if(t.type==="geometry"){let i=t.components[1];if(i.height!==r)return i.height=r,i.dirty=!0,((n=t.parentObject3D)==null?void 0:n.type)==="geometry-group"&&(t.parentObject3D.userData.outlineDirty=!0),!0}else if(t.type==="geometry-group"){let i=t.components[0];for(let o of t.userData.entities3D.values()){let a=e.geometry3DMap.get(o),s;((a==null?void 0:a.type)==="geometry"||(a==null?void 0:a.type)==="model")&&(s=a.components[1],s.height===i.height&&(a.components[1].height=r,a.components[1].dirty=!0))}return t.components[0].height=r,t.userData.outlineDirty=!0,!0}}return!1}function wl(t,e){e!==void 0&&(t.type==="path"||t.type==="geometry")&&(e.initialColor!==void 0&&(t.components[1].initialColor=e.initialColor),e.color!==void 0&&(t.components[1].color=e.color),e.topColor!==void 0&&(t.components[1].topColor=e.topColor),t.components[1].dirty=!0)}function Bd(t,e,r){e!==void 0&&(t.type==="label"||t.type==="marker"?(t.object3d.position.copy(r(e[1],e[0],e[2]||0)),t.positionDirty=!0):t.type==="custom-geometry"&&t.components[0].position.copy(r(e[1],e[0],e[2]||0)))}function zd(t,e){var r;return e!==void 0&&(t.type==="marker"||t.type==="label"||t.type==="custom-geometry")&&t.parentObject3D!==e&&t.parentObject3D instanceof ke?((r=t.parentObject3D)==null||r.removeEntity(t),e.addEntity(t),!0):!1}function Fd(t,e){e!==void 0&&(t.type==="marker"||t.type==="label")&&t.components[0].enabled!==e&&(t.components[0].enabled=e)}function Vd(t,e,r){if(e!==void 0&&t.type==="marker"){let n=t.components[0];if(e.contentHTML!==void 0)return n.containerEl.innerHTML=e.contentHTML,!0;if(e.anchor!==void 0&&(n.options.anchor=e.anchor,n.collisionDirty=!0),e.dynamicResize!==void 0)return n.options.dynamicResize=e.dynamicResize,!0;if(e.options!=null){try{Rr.parse(e.options||{})}catch(i){return se.error(i),!1}return e.options.interactive==="pointer-events-auto"?(n.pointerEvents="auto",Pt(t,!1,r)):(n.pointerEvents="none",Pt(t,e.options.interactive,r)),Ei(t,e.options.rank),!0}}return!1}function Ei(t,e){return e!==void 0&&(t.type==="marker"||t.type==="label")?(t.components[0].rank=ct(e),!0):!1}function Ud(t,e,r){var n,i,o,a,s;if(e!==void 0&&t.type==="label"){let l=t.components[0];e.text!==void 0&&(l.text=e.text,l.dirty=!0);try{jr.parse(e.options||{})}catch(c){se.error(c);return}((n=e.options)==null?void 0:n.appearance)!==void 0&&Object.keys((i=e.options)==null?void 0:i.appearance).length>0&&(Hr(l.appearance,((o=e.options)==null?void 0:o.appearance)||{}),l.dirty=!0),Pt(t,(a=e.options)==null?void 0:a.interactive,r),Ei(t,(s=e.options)==null?void 0:s.rank)}}function Hd(t,e){e!==void 0&&t.type==="geometry"&&(t.components[1].hoverColor=e,t.components[1].dirty=!0)}function Zd(t,e){if(e!==void 0){let r=t.components[2];if(t.type==="geometry"&&r!=null)return r.hover=e,r.dirty=!0,!0}return!1}function $d(t,e){e!==void 0&&t.type==="image"&&(t.components[1].flipImageToFaceCamera=e)}function Ii(t,e){if(e!==void 0){if(t.type==="model"||t.type==="path"||t.type==="geometry"||t.type==="custom-geometry"||t.type==="image"||t.type==="text3d"){t.components[1].visible=e,t.components[1].dirty=!0;let r=t.parentObject3D;r instanceof oe&&(r.userData.outlineDirty=!0)}else t.type==="group-container"||t.type==="geometry-group"?t.setVisible(e):t.type==="label"&&(t.components[0].visible=e);return!0}return!1}function Wd(t,e,r){if(r!==void 0&&t.type==="geometry-group"){let n=t.components[0];for(let i of t.userData.entities3D.values()){let o=e.geometry3DMap.get(i),a;((o==null?void 0:o.type)==="geometry"||(o==null?void 0:o.type)==="model")&&(a=o.components[1],a.opacity===n.opacity&&(o.components[1].opacity=r,o.components[1].dirty=!0))}return t.setOpacity(r),n.opacity=r,!0}return!1}function Yd(t,e){if(e!==void 0&&t.type==="geometry-group"){let r=t.components[0];(e==null?void 0:e.texture)!=null&&r.texture!==(e==null?void 0:e.texture)&&(r.texture=e.texture,r.dirty=!0),(e==null?void 0:e.topTexture)!=null&&r.topTexture!==(e==null?void 0:e.topTexture)&&(r.topTexture=e.topTexture,r.dirty=!0)}}function qd(t,e){if(t.type==="geometry"){let r=!1,n=t.components[1];if((e==null?void 0:e.texture)!=null&&n.texture!==(e==null?void 0:e.texture)&&(n.texture=e.texture,r=!0),(e==null?void 0:e.topTexture)!=null&&n.topTexture!==(e==null?void 0:e.topTexture)&&(n.topTexture=e.topTexture,r=!0),r&&t.components[0]instanceof ne){let i=t.components[0];return i.detached===!1&&(i.detached=!0,i.dirty=!0),!0}}return!1}function Kd(t,e){if(e!==void 0&&t.type==="geometry"){let r=t.components[1];if(r.opacity!==e){r.opacity=e;let n=t.components[0];n.detached===!1&&(n.detached=!0,n.dirty=!0),e===0?r.visible=!1:r.visible=!0,r.dirty=!0;let i=t.parentObject3D;return(i==null?void 0:i.type)==="geometry-group"&&(i.userData.outlineDirty=!0,i.userData.shadingDirty=!0),!0}}return!1}function Xd(t,e){if(e!==void 0){if(t.type==="model"||t.type==="path"||t.type==="geometry"||t.type==="custom-geometry")t.components[1].altitude=e,t.components[1].dirty=!0;else if(t.type==="group-container"&&t.altitude!==e)return t.setAltitude(e),!0}return!1}function Jd(t,e){if(e!==void 0){if(t.type==="geometry-group"&&t.components[0]!=null)t.components[0].outline=e,t.userData.outlineDirty=!0;else if(t.type==="geometry"){t.components[1].outline=e,t.components[1].dirty=!0;let r=t.parentObject3D;r instanceof oe&&(r.userData.outlineDirty=!0)}return!0}return!1}function Qd(t,e){return e!==void 0&&t.type==="geometry"&&t.components[0]&&t.components[0]instanceof ne?(t.components[0].focusable=e,!0):!1}function ef(t,e){if(e!==void 0&&t.type==="geometry"){let r=t.components[1];if(r.renderOrder!==e){r.renderOrder=e;let n=t.components[0];return n.detached===!1&&(n.detached=!0,n.dirty=!0),n.imageMesh&&(n.imageMesh.renderOrder=e+1),r.dirty=!0,!0}}return!1}function tf(t,e){let{visible:r,color:n}=e;if(t.type!=="path")return;let i=t.components[0];r!=null&&Ii(t,r),n!=null&&wl(t,{color:n}),Object.assign(i,Dl(e)),Ur(e)||(i.materialDirty=!0,(e.nearRadius!=null||e.farRadius!=null)&&(i.dirty=!0))}function Dl(t){return lr(t,Cl)}var Cl=["animateArrowsOnPath","displayArrowsOnPath","nearRadius","farRadius","accentColor","completeFraction"];function rf(t){if(!(t instanceof ie&&t.type==="text3d"))throw new Error("expect target is TextGeometry3D")}var El=["visible","color","strokeWidth","outlineOffsetX","outlineOffsetY","outlineWidth","outlineBlur","outlineOpacity","outlineColor","strokeWidth","strokeColor","strokeOpacity","maxWidth","maxHeight","font","hoverColor","fillOpacity","fontSize","flipToFaceCamera"];function nf(t,e){Ii(t,e.visible);let r=t.components[1],n=lr(e,El);"margin"in e&&se.warn("update to margin is not supported atm"),"content"in e&&se.warn("content update is not supported atm");try{Ci.parse(n)}catch(i){se.error(i);return}Object.keys(n).length>0&&(Object.assign(r,n),r.dirty=!0)}f();f();f();f();var ur=class extends rn{constructor(r){let n=r,i=3,o=i*4;super(new Float32Array(r*o),i,r,Jr,Xr);u(this,"_width");u(this,"_height");u(this,"_propertiesLength");this._width=o,this._height=n,this._propertiesLength=i}setColor(r,n,i){let o=this.image.data,a=r*this._width;o[a]=n.r,o[a+1]=n.g,o[a+2]=n.b,o[a+3]=0,o[a+4]=i.r,o[a+5]=i.g,o[a+6]=i.b,o[a+7]=0,this.needsUpdate=!0}getColor(r){let n=this.image.data,i=r*this._width,o=new ae(n[i],n[i+1],n[i+2]),a=new ae(n[i+4],n[i+5],n[i+6]);return{color:o,topColor:a}}setTexture(r,n,i){let o=this.image.data,a=r*this._width;o[a+8]=n?1:0,o[a+9]=i?1:0,o[a+10]=0,o[a+11]=0,this.needsUpdate=!0}};var Oi="#define LAMBERT\nvarying vec3 vViewPosition;\nvarying vec4 vPosition;\nvarying vec2 vUv;\nvarying vec4 finalPosition;\nvarying vec3 vWorldPosition;\nvarying vec3 worldNormal;\nvarying float vBatchId;\n\n#include <common>\n#include <batching_pars_vertex>\n#include <uv_pars_vertex>\n#include <displacementmap_pars_vertex>\n#include <envmap_pars_vertex>\n#include <color_pars_vertex>\n#include <fog_pars_vertex>\n#include <normal_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n#include <shadowmap_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n vBatchId = batchId + 0.5;\n #include <uv_vertex>\n #include <color_vertex>\n #include <morphcolor_vertex>\n #include <batching_vertex>\n #include <beginnormal_vertex>\n #include <morphnormal_vertex>\n #include <skinbase_vertex>\n #include <skinnormal_vertex>\n #include <defaultnormal_vertex>\n #include <normal_vertex>\n #include <begin_vertex>\n #include <morphtarget_vertex>\n #include <skinning_vertex>\n #include <displacementmap_vertex>\n #include <project_vertex>\n #include <logdepthbuf_vertex>\n #include <clipping_planes_vertex>\n vViewPosition = - mvPosition.xyz;\n #include <worldpos_vertex>\n #include <envmap_vertex>\n #include <shadowmap_vertex>\n #include <fog_vertex>\n // vertex normal relative to world space\n worldNormal = normal;\n vUv = uv;\n // world position\n vWorldPosition = (modelMatrix * vec4(position, 1.0)).xyz;\n}";var Ai="#define LAMBERT\nuniform vec3 diffuse;\nuniform vec3 emissive;\nuniform float opacity;\nuniform float uGradientEnd;\nuniform float uGradientIntensity;\nuniform float uMinSideAlpha;\nuniform float uMaxSideAlpha;\nuniform float uGradientStart;\nuniform highp sampler2D uPropertiesTexture;\nuniform highp sampler2D uTopTexture;\nuniform highp sampler2D uTexture;\nuniform float uRepeatYFactor;\nvarying float vBatchId;\n\nvarying vec2 vUv;\nvarying vec3 vWorldPosition;\nvarying vec3 worldNormal;\n\n#include <common>\n#include <packing>\n#include <dithering_pars_fragment>\n#include <color_pars_fragment>\n#include <uv_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <alphatest_pars_fragment>\n#include <aomap_pars_fragment>\n#include <lightmap_pars_fragment>\n#include <emissivemap_pars_fragment>\n#include <envmap_common_pars_fragment>\n#include <envmap_pars_fragment>\n#include <fog_pars_fragment>\n#include <bsdfs>\n#include <lights_pars_begin>\n#include <normal_pars_fragment>\n#include <lights_lambert_pars_fragment>\n#include <shadowmap_pars_fragment>\n#include <bumpmap_pars_fragment>\n#include <normalmap_pars_fragment>\n#include <specularmap_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\n\nvoid main() {\n #include <clipping_planes_fragment>\n\n // get the normalized world normal of vertex fragment\n vec3 surfaceNormal = normalize(worldNormal);\n\n // get angle relative to Z up\n float angle = degrees(acos(abs(dot(surfaceNormal, vec3(0.0, 0.0, 1.0)))));\n\n int idx = int(vBatchId) * 1;\n vec3 diffuse = vec3(texelFetch(uPropertiesTexture, ivec2(0, idx), 0).rgb);\n bool shouldShowTexture = texelFetch(uPropertiesTexture, ivec2(2, idx), 0).r == 1.0;\n\n if(shouldShowTexture) {\n diffuse = texture2D(uTexture, vec2(vUv.x, vUv.y * uRepeatYFactor)).rgb;\n }\n\n // if this is a fragment facing upwards, use topColor\n if(angle == 0.0) {\n bool shouldShowTopTexture = texelFetch(uPropertiesTexture, ivec2(2, idx), 0).g == 1.0;\n\n if(shouldShowTopTexture) {\n diffuse = texture2D(uTopTexture, vUv).rgb;\n } else {\n diffuse = vec3(texelFetch(uPropertiesTexture, ivec2(1, idx), 0).rgb);\n }\n }\n\n vec4 diffuseColor = vec4(diffuse, opacity);\n\n // only for vertical surfaces\n if(angle > 89.0 && angle < 91.0) {\n\n // get the percentage of the z position from the ground, up\n float percentFromZeroZ = max((abs(vWorldPosition.z) - uGradientStart) / uGradientEnd, 0.0);\n\n // gradient based on percentage\n float alpha = smoothstep(uMinSideAlpha, uMaxSideAlpha, percentFromZeroZ);\n\n // mix the shadow color with the diffuse color based on the alpha and opacity\n diffuseColor = vec4(mix(diffuseColor.rgb, diffuseColor.rgb * (1.0 - uGradientIntensity), 1.0 - alpha), opacity);\n }\n\n ReflectedLight reflectedLight = ReflectedLight(vec3(0.0), vec3(0.0), vec3(0.0), vec3(0.0));\n vec3 totalEmissiveRadiance = emissive;\n #include <logdepthbuf_fragment>\n #include <map_fragment>\n #include <color_fragment>\n #include <alphamap_fragment>\n #include <alphatest_fragment>\n #include <specularmap_fragment>\n #include <normal_fragment_begin>\n #include <normal_fragment_maps>\n #include <emissivemap_fragment>\n #include <lights_lambert_fragment>\n #include <lights_fragment_begin>\n #include <lights_fragment_maps>\n #include <lights_fragment_end>\n #include <aomap_fragment>\n vec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + totalEmissiveRadiance;\n #include <envmap_fragment>\n #include <opaque_fragment>\n #include <tonemapping_fragment>\n #include <colorspace_fragment>\n #include <fog_fragment>\n #include <premultiplied_alpha_fragment>\n #include <dithering_fragment>\n}\n";var Pl=-.05,Rl=1,Rt=class extends sn{constructor(r,n,i=1){super(r);u(this,"propertiesTexture");u(this,"uniforms",{uGradientIntensity:{value:0},uGradientEnd:{value:0},uGradientStart:{value:0},uTopTexture:{value:null},uTexture:{value:null},uRepeatYFactor:{value:1}});u(this,"showTextures",r=>{let n=!!this.uniforms.uTexture.value,i=!!this.uniforms.uTopTexture.value;(n||i)&&(this.propertiesTexture.setTexture(r,n,i),this.needsUpdate=!0)});this.propertiesTexture=new ur(n),this.uniforms.uRepeatYFactor.value=i,this.onBeforeCompile=o=>{let a=this.uniforms.uGradientIntensity,s=this.uniforms.uGradientEnd,l=this.uniforms.uGradientStart,c=this.uniforms.uTopTexture,d=this.uniforms.uTexture,m=this.uniforms.uRepeatYFactor;this.uniforms=o.uniforms,o.vertexShader=Oi,o.fragmentShader=Ai,Object.assign(this.uniforms,{uGradientIntensity:a,uGradientEnd:s,uGradientStart:l,uMinSideAlpha:{value:Pl},uMaxSideAlpha:{value:Rl},uPropertiesTexture:{value:this.propertiesTexture},uTopTexture:c,uTexture:d,uRepeatYFactor:m})}}get repeatYFactor(){return this.uniforms.uRepeatYFactor.value}set repeatYFactor(r){r!==this.uniforms.uRepeatYFactor.value&&(this.uniforms.uRepeatYFactor.value=r,this.needsUpdate=!0)}get texture(){return this.uniforms.uTexture.value}set texture(r){r.wrapS=mt,r.wrapT=mt,r.colorSpace=dr,this.uniforms.uTexture.value=r}get topTexture(){return this.uniforms.uTopTexture.value}set topTexture(r){r.wrapS=mt,r.wrapT=mt,r.colorSpace=dr,this.uniforms.uTopTexture.value=r}setGradientShading(r,n,i){this.uniforms.uGradientStart.value=r,this.uniforms.uGradientEnd.value=n,this.uniforms.uGradientIntensity.value=i}setColor(r,n,i){this.propertiesTexture.setColor(r,n,i)}getColor(r){return this.propertiesTexture.getColor(r)}hideTextures(r){let n=!!this.uniforms.uTexture.value,i=!!this.uniforms.uTopTexture.value;(n||i)&&(this.propertiesTexture.setTexture(r,!1,!1),this.needsUpdate=!0)}removeSideTexture(r){if(this.texture){this.texture.dispose(),this.uniforms.uTexture.value=null;let n=!!this.uniforms.uTopTexture.value;this.propertiesTexture.setTexture(r,!1,n),this.needsUpdate=!0}}removeTopTexture(r){if(this.topTexture){this.topTexture.dispose(),this.uniforms.uTopTexture.value=null;let n=!!this.uniforms.uTexture.value;this.propertiesTexture.setTexture(r,n,!1),this.needsUpdate=!0}}dispose(){super.dispose(),this.propertiesTexture.dispose()}};f();var Pi="mappedin";var Gl=80;function jf(t,e){var s,l,c;let r=0;for(let d of t)r+=((l=(s=d.components[0])==null?void 0:s.geometry)==null?void 0:l.attributes.position.count)||0;let n=new ae(e.color),i;i=new Rt({color:n,side:e.side==="back"?qr:e.side==="front"?Yr:Kr,opacity:(c=e.opacity)!=null?c:1,transparent:e.opacity!==void 0?e.opacity<1:!1},t.length);let o=new Se(t.length,r,0,i),a;for(let d of t)a=d.components[0],!(!(a instanceof ne)||!a.geometry)&&(a.mesh=o,a.material=i,a.instanceIndex=o.addGeometry(a.geometry),o.userData.entities[a.instanceIndex]=d.id,i instanceof Rt&&i.setColor(a.instanceIndex,n,e.topColor?new ae(e.topColor):n));return o.perObjectFrustumCulled=!0,o.matrixAutoUpdate=!1,o}function Zr(t,e){e.polygonOffset=!0,e.polygonOffsetFactor=1,e.polygonOffsetUnits=1;let r=new an(t,Gl),n=Nl(e.color.getHexString()),i=new on({linewidth:1,color:n,transparent:!0}),o=new Nt(r,i);return o.layers.set(1),o}function Nl(t){return b(t).darken(30).toRgbString()}f();function Ri(t){t&&(t.map&&(t.map.dispose(),t.map=void 0),t.dispose())}function cr(t){for(let e=t.children.length-1;e>=0;e--)cr(t.children[e]);"geometry"in t&&t.geometry&&t.geometry.dispose(),t.parent&&t.parent.remove(t),"material"in t&&Array.isArray(t.material)?t.material.forEach(function(e){Ri(e)}):"material"in t&&typeof t.material<"u"&&Ri(t.material)}var Lt,ht,$r=class{constructor(e){u(this,"rendererState");u(this,"dirty",!0);V(this,Lt,!0);V(this,ht,0);this.rendererState=e}get geometries3DDirty(){return E(this,Lt)}set geometries3DDirty(e){P(this,Lt,e)}update(e,r=!1){var o,a;let n;if(this.geometries3DDirty){let s;for(let l of this.rendererState.geometry3DIdsInScene)if(n=this.rendererState.geometry3DMap.get(l),n&&n.type==="geometry-group"&&n.userData.modelURL===void 0&&n.userData.dirty===!1&&n.userData.outlineDirty===!0){let c=n.children[0];n.userData.outlineDirty=!1;let d=lt(n);if(d&&cr(d),!n.components[0].outline||!n.visible)continue;if(n.children.length>0){let m;if(c instanceof Se){let I=[],C,L,G,ee;for(let $ of n.userData.entities3D)ee=this.rendererState.geometry3DMap.get($),(ee==null?void 0:ee.type)==="geometry"&&(L=ee.components[0],G=ee.components[1],L instanceof ne&&G.visible&&G.opacity>0&&G.outline&&!L.detached&&(C=L==null?void 0:L.geometry,C&&I.push(C)));I.length>0&&(m=dn(I))}else m=c.geometry;m&&(s=Zr(m,c.material),s.position.z=n.altitude,s.userData.outlineOfEntityId=n.userData.entityId);let w,D;for(let I of n.userData.entities3D.values()){let C=this.rendererState.geometry3DMap.get(I);(C==null?void 0:C.type)==="geometry"&&(w=C.components[0],D=C.components[1],s&&(C==null?void 0:C.type)==="geometry"&&!w.detached?(C.components[0].outline=s,(o=n.parent)==null||o.add(s)):(C==null?void 0:C.type)==="geometry"&&w.geometry!=null&&w.material!=null&&w.detached&&(w.outline&&cr(w.outline),D&&D.opacity>0&&D.visible&&D.outline&&(w.outline=Zr(w.geometry,w.material),(a=n.parent)==null||a.add(w.outline))))}}this.dirty=!0}this.geometries3DDirty=!1}let i=r?Li(e,16,19,0,1):E(this,ht);if((i!==E(this,ht)||this.dirty)&&this.rendererState.geometry3DIdsInScene.size>0){let s;for(let l of this.rendererState.geometry3DIdsInScene)if(s=this.rendererState.geometry3DMap.get(l),(s==null?void 0:s.type)==="geometry-group"&&s.components[0]!=null&&s.components[0].outline&&s.visible){let c=lt(s);if(c&&c.visible){let d=Array.isArray(c.material)?c.material:[c.material];for(let m of d)m.opacity=Math.min(i,s.components[0].opacity)}}else if((s==null?void 0:s.type)==="geometry"&&s.components[0]instanceof ne&&s.components[0].detached){let c=s.components[0].outline;if(c){let d=Array.isArray(c.material)?c.material:[c.material];for(let m of d)m.opacity=Math.min(i,s.components[1].opacity)}}}P(this,ht,i),this.dirty=!1}};Lt=new WeakMap,ht=new WeakMap;var oe=class extends ye{constructor(r,n=new rr){super();u(this,"visible",!0);u(this,"type","geometry-group");u(this,"components");u(this,"userData",{entityId:"",entities3D:new Set,opacity:1,dirty:!0,outlineDirty:!0,shadingDirty:!0});this.components=[n],this.userData.entityId=r}setVisible(r){this.visible=r;let n=lt(this);n&&(n.visible=r),this.dispatchEvent({type:"childremoved",child:this})}getOpacity(){return this.userData.opacity}setOpacity(r){this.userData.opacity=r}removeEntity(){this.dispatchEvent({type:"childremoved",child:this})}getfirstChildEntityId(){let r;for(let i of this.children)if(!i.userData.detached){r=i;break}return r instanceof Se?Object.values(r.userData.entities)[0]:void 0}setAltitude(r){this.position.z=r,this.dispatchEvent({type:"childremoved",child:this})}get altitude(){return this.position.z}};var Ke=class extends ye{constructor(){super(...arguments);u(this,"type","geometry");u(this,"userData",{entityId:"",type:"geometry"})}},ie=class{constructor(e,r){u(this,"id",N());u(this,"components");u(this,"entities2D",new Map);this.components=[e,r]}get object3d(){return this.components[0].mesh}get parentObject3D(){var e;return(e=this.components[0].mesh)==null?void 0:e.parent}get type(){return this.components[0].type}addEntity(e){this.parentObject3D instanceof oe?(this.parentObject3D.add(e.object3d),e.object3d.userData.parentEntityId=this.id):this.entities2D.set(e.id,e)}removeEntity(e){var r;(r=e.parentObject3D)==null||r.remove(e.object3d),this.entities2D.delete(e.id)}removeAllEntities(){for(let e of this.entities2D.values())this.removeEntity(e)}};f();function zl(t){let e=t.min,r=t.max,n=new z(e.x,e.y,e.z),i=new z(r.x,e.y,e.z),o=new z(e.x,r.y,e.z),a=new z(r.x,r.y,e.z);return[n,i,o,a]}f();function Fl(){return typeof window>"u"?1:Math.min(window.devicePixelRatio,2)}f();function Vl(t,e,r=!1){let n=null,i=0;return function(...o){i++,i===1&&r===!0&&t(...o);let a=()=>{(!r||i>1)&&t(...o),n=null,i=0};clearTimeout(n),n=setTimeout(a,e)}}f();var Ul=(()=>{let t;return{getDeviceType(){if(t)return t;let{userAgent:e,platform:r,maxTouchPoints:n}=window.navigator,i=/(iphone|ipod|ipad)/i.test(e),o=r==="iPad"||r.indexOf("Mac")===0&&n>0&&!window.MSStream,a=/android/i.test(e);return t={isIpad:o,isMobile:a||i||o,isSafari12:/Version\/12.+Safari/.test(e),isFirefox:/Firefox/.test(e),isWindows:/windows/i.test(e)},t},_reset(){t=void 0}}})(),Gi=Ul.getDeviceType,Ni=(()=>{let t,e,r;function n(){if(e!==void 0)return e;t||(t=document.createElement("canvas"));let o=t.getContext("webgl")||t.getContext("experimental-webgl");if(!o)return e;try{let a=Gi().isFirefox?null:o.getExtension("WEBGL_debug_renderer_info");return e=a?o.getParameter(a.UNMASKED_RENDERER_WEBGL):o.getParameter(o.RENDERER),e}catch{let s=new Error("Failed getting device info");throw s.name="FailedGettingDeviceInfo",s}}function i(){var a,s;if(!Gi().isWindows)return!1;if(r!==void 0)return r;let o=(s=(a=Hl())==null?void 0:a.toLowerCase())!=null?s:"";return r=o.includes("intel")&&(o.includes("uhd")||o.includes("iris")),r}return{getInfo:n,shouldDisableOffscreenCanvas:i,_setCanvas(o){t=o,e=void 0,r=void 0}}})(),Hl=Ni.getInfo,Zl=Ni.shouldDisableOffscreenCanvas;f();function lr(t,e){let r={};for(let n=0;n<e.length;n++){let i=e[n];i in t&&(r[i]=t[i])}return r}function Ur(t){return Object.keys(t).length===0}f();var $l=t=>e=>{if(!e.includes("mappedin")){let r={};for(let n in t){let i=t[n];e.includes("mappedin")||(t[n]=i)}return{url:e,headers:r}}return{url:e,headers:t}};function jp(t,e,r,n){let i=t*(Math.PI/180),o=n/Ce,a=t+o*180/Math.PI,s=r/Ce/Math.cos(i),l=e+s*180/Math.PI;return{lat:a,lon:l}}function Bp(t,e,r,n){let i=r*(Math.PI/180),o=n*(Math.PI/180),a=t*(Math.PI/180),s=e*(Math.PI/180),l=i-a,c=o-s,d=Ce*c*Math.cos(a),m=Ce*l;return{x:d,y:m}}var Wl=(t,e)=>{var r;if(t.children&&t.visible)for(let n of t.children){if(n.visible&&n.type)if("entities3D"in n.userData&&((r=n.userData)!=null&&r.entities3D)&&n.type==="geometry-group"){e.add(n.userData.entityId);for(let i of n.userData.entities3D.values())e.add(i)}else(n.type==="group-container"||n.type==="custom-geometry"||n instanceof Ke)&&e.add(n.userData.entityId);Wl(n,e)}return e},Yl=(t,e)=>{var r;if(t.children&&t.visible&&!((r=t.userData)!=null&&r.hidden))for(let n of t.children)n.visible&&n instanceof We&&e.add(n.userData.entityId),Yl(n,e);return e};function Hr(t,e){for(let r in e){if(e[r]==null){t[r]=void 0;continue}typeof e[r]=="object"?Hr(t[r],e[r]):t[r]=e[r]}return t}function zp(t,e,r,n){let i={translateX:t.x,translateY:t.y,translateZ:t.z,scale:t.meterInMercatorCoordinateUnits()},o=new gt,a=new z(i.scale,-i.scale,i.scale),s=new gt().makeTranslation(i.translateX,i.translateY,i.translateZ).scale(a),l=r.elevation;return{id:Pi,type:"custom",renderingMode:"3d",render:(c,d)=>{if(o.fromArray(d),l!==r.elevation){let m=cn.fromLngLat(t.toLngLat(),r.elevation);s.makeTranslation(i.translateX,i.translateY,-m.z).scale(a)}e.projectionMatrix=o.multiply(s),l=r.elevation,n()}}}function ql(t){return fetch(t,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({grant_type:"client_credentials"})})}async function Fp(t){let e=await ql(t),{access_token:r}=await e.json();return{"x-mappedin-tiles-key":r}}function Vp(t,e=0){let r=3735928559^e,n=1103547991^e;for(let i=0,o;i<t.length;i++)o=t.charCodeAt(i),r=Math.imul(r^o,2654435761),n=Math.imul(n^o,1597334677);return r=Math.imul(r^r>>>16,2246822507)^Math.imul(n^n>>>13,3266489909),n=Math.imul(n^n>>>16,2246822507)^Math.imul(r^r>>>13,3266489909),4294967296*(2097151&n)+(r>>>0)}var Kl=t=>t;var Up=t=>1-Math.cos(t*Math.PI/2);function Li(t,e,r,n,i,o=Kl){t=Math.max(e,Math.min(t,r));let a=(t-Math.min(e,r))/Math.abs(r-e),s=o(a);return n+s*(i-n)}function Hp(t,e,r){let n=t*(Math.PI/180)/2,i=e/2;return r*Math.tan(n)/i}function Zp(t,e){let r;return typeof e=="string"||typeof e=="number"?(r=t.geometry2DMap.get(e),r==null&&(r=t.geometry3DMap.get(e))):typeof(e==null?void 0:e.id)=="string"||typeof(e==null?void 0:e.id)=="number"?(r=t.geometry2DMap.get(e.id),r==null&&(r=t.geometry3DMap.get(e.id))):r=e,r}function $p(t){return new un(new fr(t[0][0],t[0][1]),new fr(t[1][0],t[1][1])).getCenter().toArray()}function Wp(t){return Number.isFinite(t.min.x)&&Number.isFinite(t.min.y)&&Number.isFinite(t.max.x)&&Number.isFinite(t.max.y)&&(t instanceof ln||Number.isFinite(t.min.z)&&Number.isFinite(t.max.z))}f();var Wr=class{constructor(e){u(this,"visible");u(this,"altitude");u(this,"color");u(this,"dirty",!0);u(this,"maxWidth");u(this,"maxHeight");u(this,"hoverByPolygon");u(this,"flipToFaceCamera",ji.flipToFaceCamera);u(this,"font");u(this,"fillOpacity");u(this,"fontSize");u(this,"margin");u(this,"outlineWidth");u(this,"outlineBlur");u(this,"outlineOffsetX");u(this,"strokeColor");u(this,"strokeOpacity");u(this,"strokeWidth");u(this,"hoverColor");u(this,"outlineOffsetY");u(this,"outlineColor");u(this,"outlineOpacity");e&&Object.assign(this,e)}getState(e=!1){let r={};for(let n in this)!e&&n==="dirty"||this[n]!==void 0&&(r[n]=this[n]);return r}},ji=Object.freeze({visible:!0,color:"black",flipToFaceCamera:!0,fillOpacity:1,font:void 0,fontSize:2,margin:[.2,1,.2,1.5],outlineColor:"black",outlineOpacity:1,outlineWidth:0,outlineOffsetX:0,outlineOffsetY:0,outlineBlur:0,strokeOpacity:1,strokeWidth:0,maxWidth:void 0,maxHeight:void 0,strokeColor:"black",hoverColor:void 0});f();export{Fi as a,Xl as b,se as c,Ce as d,au as e,su as f,lu as g,uu as h,fu as i,yt as j,N as k,hr as l,Ye as m,Bs as n,Vu as o,li as p,Uu as q,Hu as r,Zu as s,$u as t,Wu as u,Yu as v,Qu as w,Fs as x,ec as y,ui as z,h as A,oi as B,Ar as C,Pr as D,Se as E,ne as F,rr as G,lt as H,Ec as I,Nc as J,pi as K,he as L,Ke as M,ie as N,Pi as O,zl as P,Fl as Q,Vl as R,Zl as S,lr as T,$l as U,er as V,jp as W,Bp as X,Wl as Y,Yl as Z,zp as _,Fp as $,Vp as aa,Kl as ba,Up as ca,Li as da,Hp as ea,Zp as fa,$p as ga,Wp as ha,b as ia,td as ja,rd as ka,Wr as la,ji as ma,wi as na,fd as oa,vd as pa,sr as qa,Pt as ra,Ld as sa,Gd as ta,Nd as ua,jd as va,wl as wa,Bd as xa,zd as ya,Fd as za,Vd as Aa,Ud as Ba,Hd as Ca,Zd as Da,$d as Ea,Ii as Fa,Wd as Ga,Yd as Ha,qd as Ia,Kd as Ja,Xd as Ka,Jd as La,Qd as Ma,ef as Na,tf as Oa,Dl as Pa,rf as Qa,El as Ra,nf as Sa,Rt as Ta,jf as Ua,Nl as Va,cr as Wa,$r as Xa,oe as Ya,ke as Za};
@@ -0,0 +1 @@
1
+ var h=Object.create;var f=Object.defineProperty;var i=Object.getOwnPropertyDescriptor;var j=Object.getOwnPropertyNames;var k=Object.getPrototypeOf,l=Object.prototype.hasOwnProperty;var m=(b,a,c)=>a in b?f(b,a,{enumerable:!0,configurable:!0,writable:!0,value:c}):b[a]=c;var o=(b,a)=>()=>(b&&(a=b(b=0)),a);var p=(b,a)=>()=>(a||b((a={exports:{}}).exports,a),a.exports),q=(b,a)=>{for(var c in a)f(b,c,{get:a[c],enumerable:!0})},n=(b,a,c,d)=>{if(a&&typeof a=="object"||typeof a=="function")for(let e of j(a))!l.call(b,e)&&e!==c&&f(b,e,{get:()=>a[e],enumerable:!(d=i(a,e))||d.enumerable});return b};var r=(b,a,c)=>(c=b!=null?h(k(b)):{},n(a||!b||!b.__esModule?f(c,"default",{value:b,enumerable:!0}):c,b));var s=(b,a,c)=>(m(b,typeof a!="symbol"?a+"":a,c),c),g=(b,a,c)=>{if(!a.has(b))throw TypeError("Cannot "+c)};var t=(b,a,c)=>(g(b,a,"read from private field"),c?c.call(b):a.get(b)),u=(b,a,c)=>{if(a.has(b))throw TypeError("Cannot add the same private member more than once");a instanceof WeakSet?a.add(b):a.set(b,c)},v=(b,a,c,d)=>(g(b,a,"write to private field"),d?d.call(b,c):a.set(b,c),c);var w=(b,a,c)=>(g(b,a,"access private method"),c);export{o as a,p as b,q as c,r as d,s as e,t as f,u as g,v as h,w as i};